├── .gitignore ├── .npmignore ├── ExampleApp ├── .babelrc ├── .buckconfig ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .watchmanconfig ├── __tests__ │ ├── index.android.js │ └── index.ios.js ├── android │ ├── app │ │ ├── BUCK │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── exampleapp │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── keystores │ │ ├── BUCK │ │ └── debug.keystore.properties │ ├── linkedin-sdk │ │ ├── build.gradle │ │ ├── libs │ │ │ └── volley.jar │ │ └── src │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── linkedin │ │ │ │ │ └── platform │ │ │ │ │ ├── APIHelper.java │ │ │ │ │ ├── AccessToken.java │ │ │ │ │ ├── DeepLinkHelper.java │ │ │ │ │ ├── LISession.java │ │ │ │ │ ├── LISessionManager.java │ │ │ │ │ ├── errors │ │ │ │ │ ├── ApiErrorResponse.java │ │ │ │ │ ├── LIApiError.java │ │ │ │ │ ├── LIAppErrorCode.java │ │ │ │ │ ├── LIAuthError.java │ │ │ │ │ └── LIDeepLinkError.java │ │ │ │ │ ├── internals │ │ │ │ │ ├── AppStore.java │ │ │ │ │ ├── BuildConfig.java │ │ │ │ │ ├── LIAppVersion.java │ │ │ │ │ └── QueueManager.java │ │ │ │ │ ├── listeners │ │ │ │ │ ├── ApiListener.java │ │ │ │ │ ├── ApiResponse.java │ │ │ │ │ ├── AuthListener.java │ │ │ │ │ └── DeepLinkListener.java │ │ │ │ │ └── utils │ │ │ │ │ └── Scope.java │ │ │ └── res │ │ │ │ ├── drawable-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ └── strings.xml │ │ │ └── test │ │ │ └── AndroidManifest.xml │ └── settings.gradle ├── index.android.js ├── index.ios.js ├── ios │ ├── ExampleApp-Bridging-Header.h │ ├── ExampleApp.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── ExampleApp.xcscheme │ ├── ExampleApp.xcworkspace │ │ └── contents.xcworkspacedata │ ├── ExampleApp │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Info.plist │ │ └── main.m │ ├── ExampleAppTests │ │ ├── ExampleAppTests.m │ │ └── Info.plist │ ├── Podfile │ ├── Podfile.lock │ └── Pods │ │ ├── AFNetworking │ │ ├── AFNetworking │ │ │ ├── AFHTTPSessionManager.h │ │ │ ├── AFHTTPSessionManager.m │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ ├── AFNetworkReachabilityManager.m │ │ │ ├── AFNetworking.h │ │ │ ├── AFSecurityPolicy.h │ │ │ ├── AFSecurityPolicy.m │ │ │ ├── AFURLRequestSerialization.h │ │ │ ├── AFURLRequestSerialization.m │ │ │ ├── AFURLResponseSerialization.h │ │ │ ├── AFURLResponseSerialization.m │ │ │ ├── AFURLSessionManager.h │ │ │ └── AFURLSessionManager.m │ │ ├── LICENSE │ │ ├── README.md │ │ └── UIKit+AFNetworking │ │ │ ├── AFAutoPurgingImageCache.h │ │ │ ├── AFAutoPurgingImageCache.m │ │ │ ├── AFImageDownloader.h │ │ │ ├── AFImageDownloader.m │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ ├── AFNetworkActivityIndicatorManager.m │ │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ │ ├── UIActivityIndicatorView+AFNetworking.m │ │ │ ├── UIButton+AFNetworking.h │ │ │ ├── UIButton+AFNetworking.m │ │ │ ├── UIImage+AFNetworking.h │ │ │ ├── UIImageView+AFNetworking.h │ │ │ ├── UIImageView+AFNetworking.m │ │ │ ├── UIKit+AFNetworking.h │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ ├── UIProgressView+AFNetworking.m │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ ├── UIRefreshControl+AFNetworking.m │ │ │ ├── UIWebView+AFNetworking.h │ │ │ └── UIWebView+AFNetworking.m │ │ ├── Headers │ │ ├── Private │ │ │ ├── AFNetworking │ │ │ │ ├── AFAutoPurgingImageCache.h │ │ │ │ ├── AFHTTPSessionManager.h │ │ │ │ ├── AFImageDownloader.h │ │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ │ ├── AFNetworking.h │ │ │ │ ├── AFSecurityPolicy.h │ │ │ │ ├── AFURLRequestSerialization.h │ │ │ │ ├── AFURLResponseSerialization.h │ │ │ │ ├── AFURLSessionManager.h │ │ │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ │ │ ├── UIButton+AFNetworking.h │ │ │ │ ├── UIImage+AFNetworking.h │ │ │ │ ├── UIImageView+AFNetworking.h │ │ │ │ ├── UIKit+AFNetworking.h │ │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ │ └── UIWebView+AFNetworking.h │ │ │ ├── IOSLinkedInAPIFix │ │ │ │ ├── LIALinkedInApplication.h │ │ │ │ ├── LIALinkedInAuthorizationViewController.h │ │ │ │ ├── LIALinkedInHttpClient.h │ │ │ │ └── NSString+LIAEncode.h │ │ │ └── LinkedinSwift │ │ │ │ ├── LSHeader.h │ │ │ │ ├── LSLinkedinToken.h │ │ │ │ ├── LSResponse.h │ │ │ │ ├── LinkedinSwiftConfiguration.h │ │ │ │ └── LinkedinSwiftHelper.h │ │ └── Public │ │ │ ├── AFNetworking │ │ │ ├── AFAutoPurgingImageCache.h │ │ │ ├── AFHTTPSessionManager.h │ │ │ ├── AFImageDownloader.h │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ ├── AFNetworking.h │ │ │ ├── AFSecurityPolicy.h │ │ │ ├── AFURLRequestSerialization.h │ │ │ ├── AFURLResponseSerialization.h │ │ │ ├── AFURLSessionManager.h │ │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ │ ├── UIButton+AFNetworking.h │ │ │ ├── UIImage+AFNetworking.h │ │ │ ├── UIImageView+AFNetworking.h │ │ │ ├── UIKit+AFNetworking.h │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ └── UIWebView+AFNetworking.h │ │ │ ├── IOSLinkedInAPIFix │ │ │ ├── LIALinkedInApplication.h │ │ │ ├── LIALinkedInAuthorizationViewController.h │ │ │ ├── LIALinkedInHttpClient.h │ │ │ └── NSString+LIAEncode.h │ │ │ └── LinkedinSwift │ │ │ ├── LSHeader.h │ │ │ ├── LSLinkedinToken.h │ │ │ ├── LSResponse.h │ │ │ ├── LinkedinSwiftConfiguration.h │ │ │ ├── LinkedinSwiftHelper.h │ │ │ └── linkedin-sdk │ │ │ ├── LISDK.h │ │ │ ├── LISDKAPIError.h │ │ │ ├── LISDKAPIHelper.h │ │ │ ├── LISDKAPIResponse.h │ │ │ ├── LISDKAccessToken.h │ │ │ ├── LISDKCallbackHandler.h │ │ │ ├── LISDKDeeplinkHelper.h │ │ │ ├── LISDKErrorCode.h │ │ │ ├── LISDKPermission.h │ │ │ ├── LISDKSession.h │ │ │ └── LISDKSessionManager.h │ │ ├── IOSLinkedInAPIFix │ │ ├── IOSLinkedInAPI │ │ │ ├── LIALinkedInApplication.h │ │ │ ├── LIALinkedInApplication.m │ │ │ ├── LIALinkedInAuthorizationViewController.h │ │ │ ├── LIALinkedInAuthorizationViewController.m │ │ │ ├── LIALinkedInHttpClient.h │ │ │ ├── LIALinkedInHttpClient.m │ │ │ ├── NSString+LIAEncode.h │ │ │ └── NSString+LIAEncode.m │ │ ├── LICENSE │ │ └── README.md │ │ ├── LinkedinSwift │ │ ├── LICENSE │ │ ├── LinkedinSwift │ │ │ └── LinkedinSwift │ │ │ │ └── sources │ │ │ │ ├── LSHeader.h │ │ │ │ ├── LSLinkedinToken.h │ │ │ │ ├── LSLinkedinToken.m │ │ │ │ ├── LSResponse.h │ │ │ │ ├── LSResponse.m │ │ │ │ ├── LinkedinSwiftConfiguration.h │ │ │ │ ├── LinkedinSwiftConfiguration.m │ │ │ │ ├── LinkedinSwiftHelper.h │ │ │ │ └── LinkedinSwiftHelper.m │ │ ├── README.md │ │ └── linkedin-sdk.framework │ │ │ ├── Headers │ │ │ ├── LISDK.h │ │ │ ├── LISDKAPIError.h │ │ │ ├── LISDKAPIHelper.h │ │ │ ├── LISDKAPIResponse.h │ │ │ ├── LISDKAccessToken.h │ │ │ ├── LISDKCallbackHandler.h │ │ │ ├── LISDKDeeplinkHelper.h │ │ │ ├── LISDKErrorCode.h │ │ │ ├── LISDKPermission.h │ │ │ ├── LISDKSession.h │ │ │ └── LISDKSessionManager.h │ │ │ ├── Versions │ │ │ ├── A │ │ │ │ ├── Headers │ │ │ │ │ ├── LISDK.h │ │ │ │ │ ├── LISDKAPIError.h │ │ │ │ │ ├── LISDKAPIHelper.h │ │ │ │ │ ├── LISDKAPIResponse.h │ │ │ │ │ ├── LISDKAccessToken.h │ │ │ │ │ ├── LISDKCallbackHandler.h │ │ │ │ │ ├── LISDKDeeplinkHelper.h │ │ │ │ │ ├── LISDKErrorCode.h │ │ │ │ │ ├── LISDKPermission.h │ │ │ │ │ ├── LISDKSession.h │ │ │ │ │ └── LISDKSessionManager.h │ │ │ │ └── linkedin-sdk │ │ │ └── Current │ │ │ │ ├── Headers │ │ │ │ ├── LISDK.h │ │ │ │ ├── LISDKAPIError.h │ │ │ │ ├── LISDKAPIHelper.h │ │ │ │ ├── LISDKAPIResponse.h │ │ │ │ ├── LISDKAccessToken.h │ │ │ │ ├── LISDKCallbackHandler.h │ │ │ │ ├── LISDKDeeplinkHelper.h │ │ │ │ ├── LISDKErrorCode.h │ │ │ │ ├── LISDKPermission.h │ │ │ │ ├── LISDKSession.h │ │ │ │ └── LISDKSessionManager.h │ │ │ │ └── linkedin-sdk │ │ │ └── linkedin-sdk │ │ ├── Manifest.lock │ │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ │ └── Target Support Files │ │ ├── AFNetworking │ │ ├── AFNetworking-dummy.m │ │ ├── AFNetworking-prefix.pch │ │ └── AFNetworking.xcconfig │ │ ├── IOSLinkedInAPIFix │ │ ├── IOSLinkedInAPIFix-dummy.m │ │ ├── IOSLinkedInAPIFix-prefix.pch │ │ └── IOSLinkedInAPIFix.xcconfig │ │ ├── LinkedinSwift │ │ ├── LinkedinSwift-dummy.m │ │ ├── LinkedinSwift-prefix.pch │ │ └── LinkedinSwift.xcconfig │ │ ├── Pods-ExampleApp │ │ ├── Pods-ExampleApp-acknowledgements.markdown │ │ ├── Pods-ExampleApp-acknowledgements.plist │ │ ├── Pods-ExampleApp-dummy.m │ │ ├── Pods-ExampleApp-frameworks.sh │ │ ├── Pods-ExampleApp-resources.sh │ │ ├── Pods-ExampleApp.debug.xcconfig │ │ └── Pods-ExampleApp.release.xcconfig │ │ └── Pods-ExampleAppTests │ │ ├── Pods-ExampleAppTests-acknowledgements.markdown │ │ ├── Pods-ExampleAppTests-acknowledgements.plist │ │ ├── Pods-ExampleAppTests-dummy.m │ │ ├── Pods-ExampleAppTests-frameworks.sh │ │ ├── Pods-ExampleAppTests-resources.sh │ │ ├── Pods-ExampleAppTests.debug.xcconfig │ │ └── Pods-ExampleAppTests.release.xcconfig └── package.json ├── LICENSE ├── README.md ├── android ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── reactlibrary │ └── linkedinsdk │ ├── RNLinkedInSessionManagerModule.java │ └── RNLinkedInSessionManagerPackage.java ├── index.js ├── ios ├── RNLinkedInSessionManager.xcworkspace │ └── contents.xcworkspacedata └── RNLinkedInSessionManager │ ├── RNLinkedInSessionManager.swift │ └── RNLinkedInSessionManagerBridge.m ├── js ├── LinkedInSessionManager.android.js └── LinkedInSessionManager.ios.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | # OS 2 | .DS_Store 3 | 4 | # Logs 5 | logs 6 | *.log 7 | npm-debug.log* 8 | 9 | # Runtime data 10 | pids 11 | *.pid 12 | *.seed 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # node-waf configuration 27 | .lock-wscript 28 | 29 | # Compiled binary addons (http://nodejs.org/api/addons.html) 30 | build/Release 31 | 32 | # Dependency directories 33 | node_modules 34 | jspm_packages 35 | 36 | # Optional npm cache directory 37 | .npm 38 | 39 | # Optional REPL history 40 | .node_repl_history 41 | 42 | # Android 43 | *.iml 44 | android/.idea/ 45 | android/gradle/wrapper/ 46 | android/build 47 | android/gradlew 48 | android/gradlew.bat 49 | android/local.properties 50 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # OS 2 | .DS_Store 3 | 4 | # Logs 5 | logs 6 | *.log 7 | npm-debug.log* 8 | 9 | # Runtime data 10 | pids 11 | *.pid 12 | *.seed 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # node-waf configuration 27 | .lock-wscript 28 | 29 | # Compiled binary addons (http://nodejs.org/api/addons.html) 30 | build/Release 31 | 32 | # Dependency directories 33 | node_modules 34 | jspm_packages 35 | 36 | # Optional npm cache directory 37 | .npm 38 | 39 | # Optional REPL history 40 | .node_repl_history 41 | 42 | # Android 43 | *.iml 44 | android/.idea/ 45 | android/gradle/wrapper/ 46 | android/build 47 | android/gradlew 48 | android/gradlew.bat 49 | android/local.properties 50 | 51 | # Don't add the example app to npm 52 | ExampleApp 53 | -------------------------------------------------------------------------------- /ExampleApp/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } -------------------------------------------------------------------------------- /ExampleApp/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /ExampleApp/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | .*/Libraries/react-native/ReactNative.js 16 | 17 | [include] 18 | 19 | [libs] 20 | node_modules/react-native/Libraries/react-native/react-native-interface.js 21 | node_modules/react-native/flow 22 | flow/ 23 | 24 | [options] 25 | module.system=haste 26 | 27 | experimental.strict_type_args=true 28 | 29 | munge_underscores=true 30 | 31 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 32 | 33 | suppress_type=$FlowIssue 34 | suppress_type=$FlowFixMe 35 | suppress_type=$FixMe 36 | 37 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-6]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 38 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-6]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 39 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 40 | 41 | unsafe.enable_getters_and_setters=true 42 | 43 | [version] 44 | ^0.36.0 45 | -------------------------------------------------------------------------------- /ExampleApp/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /ExampleApp/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | android/app/libs 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 50 | 51 | fastlane/report.xml 52 | fastlane/Preview.html 53 | fastlane/screenshots 54 | -------------------------------------------------------------------------------- /ExampleApp/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /ExampleApp/__tests__/index.android.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Index from '../index.android.js'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | const tree = renderer.create( 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /ExampleApp/__tests__/index.ios.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Index from '../index.ios.js'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | const tree = renderer.create( 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /ExampleApp/android/app/BUCK: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # To learn about Buck see [Docs](https://buckbuild.com/). 4 | # To run your application with Buck: 5 | # - install Buck 6 | # - `npm start` - to start the packager 7 | # - `cd android` 8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 10 | # - `buck install -r android/app` - compile, install and run application 11 | # 12 | 13 | lib_deps = [] 14 | for jarfile in glob(['libs/*.jar']): 15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) 16 | lib_deps.append(':' + name) 17 | prebuilt_jar( 18 | name = name, 19 | binary_jar = jarfile, 20 | ) 21 | 22 | for aarfile in glob(['libs/*.aar']): 23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) 24 | lib_deps.append(':' + name) 25 | android_prebuilt_aar( 26 | name = name, 27 | aar = aarfile, 28 | ) 29 | 30 | android_library( 31 | name = 'all-libs', 32 | exported_deps = lib_deps 33 | ) 34 | 35 | android_library( 36 | name = 'app-code', 37 | srcs = glob([ 38 | 'src/main/java/**/*.java', 39 | ]), 40 | deps = [ 41 | ':all-libs', 42 | ':build_config', 43 | ':res', 44 | ], 45 | ) 46 | 47 | android_build_config( 48 | name = 'build_config', 49 | package = 'com.exampleapp', 50 | ) 51 | 52 | android_resource( 53 | name = 'res', 54 | res = 'src/main/res', 55 | package = 'com.exampleapp', 56 | ) 57 | 58 | android_binary( 59 | name = 'app', 60 | package_type = 'debug', 61 | manifest = 'src/main/AndroidManifest.xml', 62 | keystore = '//android/keystores:debug', 63 | deps = [ 64 | ':app-code', 65 | ], 66 | ) 67 | -------------------------------------------------------------------------------- /ExampleApp/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # okhttp 54 | 55 | -keepattributes Signature 56 | -keepattributes *Annotation* 57 | -keep class okhttp3.** { *; } 58 | -keep interface okhttp3.** { *; } 59 | -dontwarn okhttp3.** 60 | 61 | # okio 62 | 63 | -keep class sun.misc.Unsafe { *; } 64 | -dontwarn java.nio.file.* 65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 66 | -dontwarn okio.** 67 | -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/java/com/exampleapp/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.exampleapp; 2 | 3 | import com.facebook.react.ReactActivity; 4 | import com.reactlibrary.linkedinsdk.RNLinkedInSessionManagerPackage; 5 | 6 | public class MainActivity extends ReactActivity { 7 | 8 | /** 9 | * Returns the name of the main component registered from JavaScript. 10 | * This is used to schedule rendering of the component. 11 | */ 12 | @Override 13 | protected String getMainComponentName() { 14 | return "ExampleApp"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/java/com/exampleapp/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.exampleapp; 2 | 3 | import android.app.Application; 4 | import android.util.Log; 5 | 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.react.shell.MainReactPackage; 11 | import com.facebook.soloader.SoLoader; 12 | import com.reactlibrary.linkedinsdk.RNLinkedInSessionManagerPackage; 13 | 14 | import java.util.Arrays; 15 | import java.util.List; 16 | 17 | public class MainApplication extends Application implements ReactApplication { 18 | 19 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 20 | @Override 21 | protected boolean getUseDeveloperSupport() { 22 | return BuildConfig.DEBUG; 23 | } 24 | 25 | @Override 26 | protected List getPackages() { 27 | return Arrays.asList( 28 | new MainReactPackage(), 29 | new RNLinkedInSessionManagerPackage() 30 | ); 31 | } 32 | }; 33 | 34 | @Override 35 | public ReactNativeHost getReactNativeHost() { 36 | return mReactNativeHost; 37 | } 38 | 39 | @Override 40 | public void onCreate() { 41 | super.onCreate(); 42 | SoLoader.init(this, /* native exopackage */ false); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ExampleApp 4 | 5 | -------------------------------------------------------------------------------- /ExampleApp/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ExampleApp/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.2.3' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | maven { 20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 21 | url "$rootDir/../node_modules/react-native/android" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ExampleApp/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /ExampleApp/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ExampleApp/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Jan 31 12:24:21 PST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /ExampleApp/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /ExampleApp/android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = 'debug', 3 | store = 'debug.keystore', 4 | properties = 'debug.keystore.properties', 5 | visibility = [ 6 | 'PUBLIC', 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /ExampleApp/android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | mavenCentral() 4 | } 5 | } 6 | 7 | buildscript { 8 | repositories { 9 | mavenCentral() 10 | } 11 | 12 | } 13 | 14 | apply plugin: 'android-library' 15 | 16 | android { 17 | sourceSets { 18 | androidTest { 19 | setRoot('src/test') 20 | } 21 | } 22 | compileSdkVersion 17 23 | buildToolsVersion "19.1.0" 24 | 25 | defaultConfig { 26 | minSdkVersion 8 27 | targetSdkVersion 16 28 | versionCode 1 29 | versionName "1.0" 30 | } 31 | buildTypes { 32 | release { 33 | minifyEnabled false 34 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 35 | } 36 | } 37 | lintOptions { 38 | abortOnError false 39 | } 40 | } 41 | 42 | configurations { 43 | } 44 | 45 | 46 | dependencies { 47 | compile 'com.android.support:support-annotations:20.0.0' 48 | compile 'com.android.support:support-v4:21.0.+' 49 | compile fileTree(dir: 'libs', include: ['*.jar']) 50 | compile files('libs/volley.jar') 51 | androidTestCompile('junit:junit:4.12') 52 | } 53 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/libs/volley.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/android/linkedin-sdk/libs/volley.jar -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/AccessToken.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 LinkedIn Corp. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package com.linkedin.platform; 18 | 19 | import android.util.Log; 20 | 21 | import org.json.JSONException; 22 | import org.json.JSONObject; 23 | 24 | import java.io.Serializable; 25 | 26 | public class AccessToken implements Serializable { 27 | 28 | private static final String ACCESS_TOKEN_VALUE = "accessTokenValue"; 29 | private static final String EXPIRES_ON = "expiresOn"; 30 | private static final String TAG = AccessToken.class.getSimpleName(); 31 | 32 | private final String accessTokenValue; 33 | private final long expiresOn; 34 | 35 | /** 36 | * build an accessToken from a previously retrieved value 37 | * @param accessToken obtained by calling {@link AccessToken#toString()} 38 | * @return 39 | */ 40 | public synchronized static AccessToken buildAccessToken(String accessToken) { 41 | if (accessToken == null || "".equals(accessToken)) { 42 | return null; 43 | } 44 | try { 45 | JSONObject jsonObject = new JSONObject(accessToken); 46 | return new AccessToken(jsonObject); 47 | } catch (JSONException e) { 48 | Log.d(TAG, e.getMessage()); 49 | return null; 50 | } 51 | } 52 | 53 | public synchronized static AccessToken buildAccessToken(JSONObject accessToken) { 54 | if (accessToken == null) { 55 | return null; 56 | } 57 | try { 58 | return new AccessToken(accessToken); 59 | } catch (JSONException e) { 60 | Log.d(TAG, e.getMessage()); 61 | return null; 62 | } 63 | } 64 | 65 | private AccessToken(JSONObject accessTokenJson) throws JSONException { 66 | accessTokenValue = accessTokenJson.getString(ACCESS_TOKEN_VALUE); 67 | expiresOn = accessTokenJson.getLong(EXPIRES_ON); 68 | } 69 | 70 | public AccessToken(String accessTokenValue, long expiresOn) { 71 | this.accessTokenValue = accessTokenValue; 72 | this.expiresOn = expiresOn; 73 | } 74 | 75 | public String getValue() { 76 | return accessTokenValue; 77 | } 78 | 79 | /** 80 | * @return the time when this AccessToken expires 81 | */ 82 | public long getExpiresOn() { 83 | return expiresOn; 84 | } 85 | 86 | /** 87 | * @return true if access token is expired; false otherwise 88 | */ 89 | public boolean isExpired() { 90 | return System.currentTimeMillis() > getExpiresOn(); 91 | } 92 | 93 | @Override 94 | public String toString() { 95 | try { 96 | JSONObject json = new JSONObject(); 97 | json.put(ACCESS_TOKEN_VALUE, accessTokenValue); 98 | json.put(EXPIRES_ON, expiresOn); 99 | return json.toString(); 100 | } catch (JSONException e) { 101 | } 102 | return null; 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/LISession.java: -------------------------------------------------------------------------------- 1 | package com.linkedin.platform; 2 | 3 | public interface LISession { 4 | 5 | /** 6 | * @return an AccessToken representing the user's authorization of the application 7 | */ 8 | public AccessToken getAccessToken(); 9 | 10 | /** 11 | * @return true if the AccessToken is valid 12 | * false is returned if the user has not granted the application access or if the 13 | * access token has expired 14 | */ 15 | public boolean isValid(); 16 | } 17 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/errors/ApiErrorResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 LinkedIn Corp. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package com.linkedin.platform.errors; 18 | 19 | import org.json.JSONException; 20 | import org.json.JSONObject; 21 | 22 | public class ApiErrorResponse { 23 | 24 | private static final String TAG = ApiErrorResponse.class.getName(); 25 | public static final String ERROR_CODE = "errorCode"; 26 | public static final String MESSAGE = "message"; 27 | public static final String REQUEST_ID = "requestId"; 28 | public static final String STATUS = "status"; 29 | public static final String TIMESTAMP = "timestamp"; 30 | private JSONObject jsonApiErrorResponse; 31 | 32 | final public int errorCode; 33 | final public String message; 34 | final public String requestId; 35 | final public int status; 36 | final public long timestamp; 37 | 38 | private ApiErrorResponse(JSONObject jsonApiErrorResponse, int errorCode, String message, String requestId, int status, long timestamp) { 39 | this.jsonApiErrorResponse = jsonApiErrorResponse; 40 | this.errorCode = errorCode; 41 | this.message = message; 42 | this.requestId = requestId; 43 | this.status = status; 44 | this.timestamp = timestamp; 45 | } 46 | 47 | public static ApiErrorResponse build(byte[] apiErrorResponseData) throws JSONException { 48 | return build(new JSONObject(new String(apiErrorResponseData))); 49 | 50 | } 51 | 52 | public static ApiErrorResponse build(JSONObject jsonErr) throws JSONException { 53 | return new ApiErrorResponse(jsonErr, jsonErr.optInt(ERROR_CODE, -1), jsonErr.optString(MESSAGE), 54 | jsonErr.optString(REQUEST_ID), jsonErr.optInt(STATUS, -1), jsonErr.optLong(TIMESTAMP, 0)); 55 | } 56 | 57 | public int getErrorCode() { 58 | return jsonApiErrorResponse.optInt(ERROR_CODE, -1); 59 | } 60 | 61 | public String getMessage() { 62 | return jsonApiErrorResponse.optString(MESSAGE); 63 | } 64 | 65 | public String getRequestId() { 66 | return jsonApiErrorResponse.optString(REQUEST_ID); 67 | } 68 | 69 | public int getStatus() { 70 | return jsonApiErrorResponse.optInt(STATUS, -1); 71 | } 72 | 73 | public long getTimestamp() { 74 | return jsonApiErrorResponse.optLong(TIMESTAMP, 0); 75 | } 76 | 77 | @Override 78 | public String toString() { 79 | try { 80 | return jsonApiErrorResponse.toString(2); 81 | } catch (JSONException e) { 82 | } 83 | return null; 84 | } 85 | } 86 | 87 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/errors/LIApiError.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 LinkedIn Corp. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package com.linkedin.platform.errors; 18 | 19 | import com.android.volley.VolleyError; 20 | 21 | import org.json.JSONException; 22 | 23 | public class LIApiError extends Exception { 24 | 25 | public static enum ErrorType { 26 | accessTokenIsNotSet, 27 | apiErrorResponse, 28 | other; 29 | } 30 | 31 | private VolleyError volleyError; 32 | private int httpStatusCode = -1; 33 | private ApiErrorResponse apiErrorResponse; 34 | private ErrorType errorType; 35 | 36 | public static LIApiError buildLiApiError(VolleyError volleyError) { 37 | return new LIApiError(volleyError); 38 | } 39 | 40 | public LIApiError(String detailMessage, Throwable throwable) { 41 | this(ErrorType.other, detailMessage, throwable); 42 | } 43 | 44 | public LIApiError(ErrorType errorType, String detailMessage, Throwable throwable) { 45 | super(detailMessage, throwable); 46 | this.errorType = errorType; 47 | } 48 | 49 | public LIApiError(VolleyError volleyError) { 50 | super(volleyError.getMessage(), volleyError.fillInStackTrace()); 51 | this.volleyError = volleyError; 52 | if (volleyError.networkResponse != null) { 53 | httpStatusCode = volleyError.networkResponse.statusCode; 54 | try { 55 | apiErrorResponse = ApiErrorResponse.build(volleyError.networkResponse.data); 56 | errorType = ErrorType.apiErrorResponse; 57 | } catch (JSONException e) { 58 | errorType = ErrorType.other; 59 | } 60 | } 61 | } 62 | 63 | public ApiErrorResponse getApiErrorResponse() { 64 | return apiErrorResponse; 65 | } 66 | 67 | public ErrorType getErrorType() { 68 | return errorType; 69 | } 70 | 71 | public int getHttpStatusCode() { 72 | return httpStatusCode; 73 | } 74 | 75 | @Override 76 | public String toString() { 77 | return apiErrorResponse == null ? "exceptionMsg: " + super.getMessage() : apiErrorResponse.toString(); 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/errors/LIAppErrorCode.java: -------------------------------------------------------------------------------- 1 | package com.linkedin.platform.errors; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public enum LIAppErrorCode { 7 | NONE("none"), 8 | INVALID_REQUEST("Invalid request"), 9 | NETWORK_UNAVAILABLE("Unavailable network connection"), 10 | USER_CANCELLED("User canceled action"), 11 | UNKNOWN_ERROR("Unknown or not defined error"), 12 | SERVER_ERROR("Server side error"), 13 | LINKEDIN_APP_NOT_FOUND("LinkedIn application not found"), 14 | NOT_AUTHENTICATED("User is not authenticated in LinkedIn app"), 15 | ; 16 | 17 | private static Map liAuthErrorCodeHashMap = buildMap(); 18 | 19 | private static Map buildMap() { 20 | HashMap map = new HashMap(); 21 | for (LIAppErrorCode code : LIAppErrorCode.values()) { 22 | map.put(code.name(), code); 23 | } 24 | return map; 25 | } 26 | 27 | private String description; 28 | 29 | LIAppErrorCode(String name) { 30 | this.description = name; 31 | } 32 | 33 | public String getDescription() { 34 | return description; 35 | } 36 | 37 | public static LIAppErrorCode findErrorCode(String errorCode) { 38 | LIAppErrorCode liAuthErrorCode = liAuthErrorCodeHashMap.get(errorCode); 39 | return liAuthErrorCode == null ? UNKNOWN_ERROR : liAuthErrorCode; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/errors/LIAuthError.java: -------------------------------------------------------------------------------- 1 | package com.linkedin.platform.errors; 2 | 3 | import android.util.Log; 4 | 5 | import org.json.JSONException; 6 | import org.json.JSONObject; 7 | 8 | public class LIAuthError { 9 | 10 | private static final String TAG = LIAuthError.class.getName(); 11 | 12 | private LIAppErrorCode errorCode; 13 | private String errorMsg; 14 | 15 | public LIAuthError(String errorInfo, String errorMsg) { 16 | LIAppErrorCode liAuthErrorCode = LIAppErrorCode.findErrorCode(errorInfo); 17 | errorCode = liAuthErrorCode; 18 | this.errorMsg = errorMsg; 19 | } 20 | 21 | public LIAuthError(LIAppErrorCode errorCode, String errorMsg) { 22 | this.errorCode = errorCode; 23 | this.errorMsg = errorMsg; 24 | } 25 | 26 | @Override 27 | public String toString() { 28 | try { 29 | JSONObject jsonObject = new JSONObject(); 30 | jsonObject.put("errorCode", errorCode.name()); 31 | jsonObject.put("errorMessage", errorMsg); 32 | return jsonObject.toString(2); 33 | } catch (JSONException e) { 34 | Log.d(TAG, e.getMessage()); 35 | } 36 | return null; 37 | } 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/errors/LIDeepLinkError.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 LinkedIn Corp. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package com.linkedin.platform.errors; 18 | 19 | import android.support.annotation.NonNull; 20 | import android.util.Log; 21 | 22 | import org.json.JSONException; 23 | import org.json.JSONObject; 24 | 25 | public class LIDeepLinkError { 26 | 27 | private static final String TAG = LIDeepLinkError.class.getName(); 28 | 29 | private LIAppErrorCode errorCode; 30 | private String errorMsg; 31 | 32 | public LIDeepLinkError(@NonNull String errorInfo, String errorMsg) { 33 | LIAppErrorCode liAppErrorCode = LIAppErrorCode.findErrorCode(errorInfo); 34 | this.errorCode = liAppErrorCode; 35 | this.errorMsg = errorMsg; 36 | } 37 | 38 | public LIDeepLinkError(LIAppErrorCode errorCode, String errorMsg) { 39 | this.errorCode = errorCode; 40 | this.errorMsg = errorMsg; 41 | } 42 | 43 | @Override 44 | public String toString() { 45 | try { 46 | JSONObject jsonObject = new JSONObject(); 47 | jsonObject.put("errorCode", errorCode.name()); 48 | jsonObject.put("errorMessage", errorMsg); 49 | return jsonObject.toString(2); 50 | } catch (JSONException e) { 51 | Log.d(TAG, e.getMessage()); 52 | } 53 | return null; 54 | } 55 | 56 | } -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/internals/AppStore.java: -------------------------------------------------------------------------------- 1 | package com.linkedin.platform.internals; 2 | 3 | import android.app.Activity; 4 | import android.app.AlertDialog; 5 | import android.content.DialogInterface; 6 | import android.content.Intent; 7 | import android.net.Uri; 8 | import android.os.Build; 9 | 10 | import com.linkedin.android.mobilesdk.R; 11 | 12 | public class AppStore { 13 | 14 | public static void goAppStore(final Activity activity, boolean showDialog) { 15 | if (!showDialog) { 16 | goToAppStore(activity); 17 | return; 18 | } 19 | AlertDialog.Builder builder = new AlertDialog.Builder(activity); 20 | builder.setMessage(R.string.update_linkedin_app_message) 21 | .setTitle(R.string.update_linkedin_app_title); 22 | builder.setPositiveButton(R.string.update_linkedin_app_download, new DialogInterface.OnClickListener() { 23 | @Override 24 | public void onClick(DialogInterface dialogInterface, int i) { 25 | goToAppStore(activity); 26 | dialogInterface.dismiss(); 27 | } 28 | }); 29 | builder.setNegativeButton(R.string.update_linkedin_app_cancel, new DialogInterface.OnClickListener() { 30 | @Override 31 | public void onClick(DialogInterface dialogInterface, int i) { 32 | dialogInterface.dismiss(); 33 | } 34 | }); 35 | builder.create().show(); 36 | } 37 | 38 | private static void goToAppStore(final Activity activity) { 39 | SupportedAppStore appStore = SupportedAppStore.fromDeviceManufacturer(); 40 | String appStoreUri = appStore.getAppStoreUri(); 41 | Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(appStoreUri)); 42 | try { 43 | activity.startActivity(intent); 44 | } catch (android.content.ActivityNotFoundException e) { 45 | //should not happen 46 | } 47 | } 48 | 49 | private static enum SupportedAppStore { 50 | amazonAppstore("amazon", "amzn://apps/android?p=com.linkedin.android"), 51 | googlePlay("google", "market://details?id=com.linkedin.android"), 52 | samsungApps("samsung", "samsungapps://ProductDetail/com.linkedin.android") 53 | ; 54 | 55 | private final String deviceManufacturer; 56 | private final String appStoreUri; 57 | 58 | private SupportedAppStore(String deviceManufacturer, String appStoreUri) { 59 | this.deviceManufacturer = deviceManufacturer; 60 | this.appStoreUri = appStoreUri; 61 | } 62 | 63 | public String getDeviceManufacturer() { 64 | return deviceManufacturer; 65 | } 66 | 67 | public String getAppStoreUri() { 68 | return appStoreUri; 69 | } 70 | 71 | public static SupportedAppStore fromDeviceManufacturer() { 72 | for (SupportedAppStore appStore : values()) { 73 | if(appStore.getDeviceManufacturer().equalsIgnoreCase(Build.MANUFACTURER)) { 74 | return appStore; 75 | } 76 | } 77 | //return google play by default 78 | return googlePlay; 79 | } 80 | }; 81 | 82 | } 83 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/internals/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 LinkedIn Corp. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package com.linkedin.platform.internals; 17 | 18 | public class BuildConfig { 19 | public static final String MSDK_VERSION = "1.1.4"; 20 | public static final int LI_APP_SUPPORTED_VER_CODE = 123; 21 | } 22 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/internals/LIAppVersion.java: -------------------------------------------------------------------------------- 1 | package com.linkedin.platform.internals; 2 | 3 | import android.content.Context; 4 | import android.content.pm.PackageInfo; 5 | import android.content.pm.PackageManager; 6 | import android.support.annotation.NonNull; 7 | 8 | public class LIAppVersion { 9 | 10 | public static final String LI_APP_PACKAGE_NAME = "com.linkedin.android"; 11 | 12 | public static boolean isLIAppCurrent(@NonNull Context ctx) { 13 | 14 | return isLIAppCurrent(ctx, LI_APP_PACKAGE_NAME); 15 | } 16 | 17 | private static boolean isLIAppCurrent(@NonNull Context ctx, @NonNull String packageName) { 18 | PackageManager packageManager = ctx.getPackageManager(); 19 | try { 20 | PackageInfo packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); 21 | return packageInfo.versionCode >= BuildConfig.LI_APP_SUPPORTED_VER_CODE; 22 | } catch (PackageManager.NameNotFoundException e) { 23 | } 24 | return false; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/internals/QueueManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 LinkedIn Corp. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package com.linkedin.platform.internals; 18 | 19 | import android.content.Context; 20 | import android.support.annotation.NonNull; 21 | 22 | import com.android.volley.RequestQueue; 23 | import com.android.volley.toolbox.Volley; 24 | 25 | public class QueueManager { 26 | 27 | private static final String TAG = QueueManager.class.getName(); 28 | private static QueueManager queueManager; 29 | private Context ctx; 30 | private RequestQueue requestQueue; 31 | 32 | private QueueManager(Context context) { 33 | ctx = context.getApplicationContext(); 34 | requestQueue = Volley.newRequestQueue(ctx); 35 | } 36 | 37 | public static void initQueueManager(@NonNull Context ctx) { 38 | getInstance(ctx); 39 | } 40 | 41 | public static synchronized QueueManager getInstance(Context context) { 42 | if (queueManager == null) { 43 | queueManager = new QueueManager(context); 44 | } 45 | return queueManager; 46 | } 47 | 48 | public RequestQueue getRequestQueue() { 49 | return requestQueue; 50 | } 51 | 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/listeners/ApiListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 LinkedIn Corp. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package com.linkedin.platform.listeners; 18 | 19 | import com.linkedin.platform.errors.LIApiError; 20 | 21 | public interface ApiListener { 22 | 23 | void onApiSuccess(ApiResponse apiResponse); 24 | 25 | void onApiError(LIApiError LIApiError); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/listeners/ApiResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 LinkedIn Corp. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package com.linkedin.platform.listeners; 18 | 19 | import android.util.Log; 20 | 21 | import org.json.JSONException; 22 | import org.json.JSONObject; 23 | 24 | public class ApiResponse { 25 | private static final String TAG = ApiResponse.class.getSimpleName(); 26 | private static final String LOCATION = "Location"; 27 | private static final String STATUS_CODE = "StatusCode"; 28 | private static final String DATA = "responseData"; 29 | 30 | private final int statusCode; 31 | private final String responseData; 32 | private final String locationHeader; 33 | 34 | public static synchronized ApiResponse buildApiResponse(JSONObject apiResponseAsJson) { 35 | try { 36 | int statusCode = apiResponseAsJson.optInt(STATUS_CODE); 37 | String locationHeader = apiResponseAsJson.optString(LOCATION); 38 | String responseData = apiResponseAsJson.getString(DATA); 39 | return new ApiResponse(statusCode, responseData, locationHeader); 40 | } catch (JSONException e) { 41 | Log.d(TAG, e.getMessage()); 42 | } 43 | return null; 44 | } 45 | 46 | public ApiResponse(int statusCode, String responseData, String locationHeader) { 47 | this.statusCode = statusCode; 48 | this.responseData = responseData; 49 | this.locationHeader = locationHeader; 50 | } 51 | 52 | public int getStatusCode() { 53 | return statusCode; 54 | } 55 | 56 | public String getResponseDataAsString() { 57 | return responseData; 58 | } 59 | 60 | public JSONObject getResponseDataAsJson() { 61 | if (responseData == null || "".equals(responseData)) { 62 | return null; 63 | } 64 | try { 65 | return new JSONObject(responseData); 66 | } catch (JSONException e) { 67 | Log.d(TAG, e.getMessage(), e); 68 | } 69 | return null; 70 | } 71 | 72 | public String getLocationHeader() { 73 | return locationHeader; 74 | } 75 | 76 | @Override 77 | public String toString() { 78 | JSONObject apiResponseAsJson = new JSONObject(); 79 | try { 80 | apiResponseAsJson.put(STATUS_CODE, statusCode); 81 | apiResponseAsJson.put(DATA, responseData); 82 | apiResponseAsJson.put(LOCATION, locationHeader); 83 | } catch (JSONException e) { 84 | Log.d(TAG, e.getMessage()); 85 | } 86 | return apiResponseAsJson.toString(); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/listeners/AuthListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 LinkedIn Corp. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package com.linkedin.platform.listeners; 18 | 19 | import com.linkedin.platform.errors.LIAuthError; 20 | import com.linkedin.platform.errors.LIDeepLinkError; 21 | 22 | public interface AuthListener { 23 | 24 | /** 25 | * called when the application has been granted authorization to access the LinkedIn member's data 26 | * see {@link com.linkedin.platform.APIHelper} and {@link com.linkedin.platform.DeepLinkHelper} for 27 | * how to access LinkedIn data and interact with the LinkedIn application 28 | */ 29 | void onAuthSuccess(); 30 | 31 | /** 32 | * called when the application has not been granted authorization to access the LinkedIn member's 33 | * data 34 | * @param error information on why the authorization did not occur 35 | */ 36 | void onAuthError(LIAuthError error); 37 | } 38 | 39 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/java/com/linkedin/platform/listeners/DeepLinkListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 LinkedIn Corp. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package com.linkedin.platform.listeners; 18 | 19 | import com.linkedin.platform.errors.LIDeepLinkError; 20 | 21 | public interface DeepLinkListener { 22 | 23 | void onDeepLinkSuccess(); 24 | 25 | void onDeepLinkError(LIDeepLinkError error); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/android/linkedin-sdk/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/android/linkedin-sdk/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/android/linkedin-sdk/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/android/linkedin-sdk/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Update LinkedIn app 3 | To connect with LinkedIn you need to update LinkedIn app. Would you like to do it? 4 | Download 5 | Cancel 6 | -------------------------------------------------------------------------------- /ExampleApp/android/linkedin-sdk/src/test/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ExampleApp/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ExampleApp' 2 | 3 | include ':app' 4 | include ':linkedin-sdk' 5 | include ':react-native-linkedin-sdk' 6 | project(':react-native-linkedin-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linkedin-sdk/android') 7 | -------------------------------------------------------------------------------- /ExampleApp/index.android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry, 10 | StyleSheet, 11 | Text, 12 | View, 13 | TouchableHighlight 14 | } from 'react-native'; 15 | import LinkedInSDK from 'react-native-linkedin-sdk'; 16 | 17 | export default class ExampleApp extends Component { 18 | render() { 19 | return ( 20 | 21 | 22 | Welcome to React Native! 23 | 24 | 25 | To get started, edit index.android.js 26 | 27 | 28 | Double tap R on your keyboard to reload,{'\n'} 29 | Shake or press menu button for dev menu 30 | 31 | { 32 | const token = await LinkedInSDK.signIn({ 33 | // https://developer.linkedin.com/docs/oauth2 34 | 35 | // iOS (Required) 36 | // The "API Key" value generated when you registered your application. 37 | clientID: '86ltc4i0wckzvo', 38 | 39 | // iOS (Required) 40 | clientSecret: 'KCPHGyyXOjmGy72S', 41 | 42 | // iOS (Required) 43 | // A unique string value of your choice that is hard to guess. Used to prevent CSRF. 44 | state: 'abcde', 45 | 46 | // iOS, Android (Required) 47 | scopes: [ 48 | 'r_basicprofile', 49 | ], 50 | 51 | // iOS (Required) 52 | // The URI your users will be sent back to after authorization. This value must match one of the defined OAuth 2.0 Redirect URLs in your application configuration. 53 | // e.g. https://www.example.com/auth/linkedin 54 | redirectUri: 'https://github.com/joonhocho/react-native-linkedin-sdk/oauth2callback', 55 | }); 56 | 57 | const profile = await LinkedInSDK.getRequest('https://api.linkedin.com/v1/people/~?format=json'); 58 | 59 | setTimeout(() => { 60 | alert(JSON.stringify({token, profile}, null, ' ')); 61 | }, 1500); 62 | }}> 63 | 64 | LinkedIn Sign-In 65 | 66 | 67 | 68 | ); 69 | } 70 | } 71 | 72 | const styles = StyleSheet.create({ 73 | container: { 74 | flex: 1, 75 | justifyContent: 'center', 76 | alignItems: 'center', 77 | backgroundColor: '#F5FCFF', 78 | }, 79 | welcome: { 80 | fontSize: 20, 81 | textAlign: 'center', 82 | margin: 10, 83 | }, 84 | instructions: { 85 | textAlign: 'center', 86 | color: '#333333', 87 | marginBottom: 5, 88 | }, 89 | }); 90 | 91 | AppRegistry.registerComponent('ExampleApp', () => ExampleApp); 92 | -------------------------------------------------------------------------------- /ExampleApp/index.ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry, 10 | StyleSheet, 11 | Text, 12 | View, 13 | TouchableHighlight 14 | } from 'react-native'; 15 | import LinkedInSDK from 'react-native-linkedin-sdk'; 16 | 17 | export default class ExampleApp extends Component { 18 | render() { 19 | return ( 20 | 21 | 22 | Welcome to React Native! 23 | 24 | 25 | To get started, edit index.ios.js 26 | 27 | 28 | Press Cmd+R to reload,{'\n'} 29 | Cmd+D or shake for dev menu 30 | 31 | { 32 | const token = await LinkedInSDK.signIn({ 33 | // https://developer.linkedin.com/docs/oauth2 34 | 35 | // iOS (Required) 36 | // The "API Key" value generated when you registered your application. 37 | clientID: '86ltc4i0wckzvo', 38 | 39 | // iOS (Required) 40 | clientSecret: 'KCPHGyyXOjmGy72S', 41 | 42 | // iOS (Required) 43 | // A unique string value of your choice that is hard to guess. Used to prevent CSRF. 44 | state: 'abcde', 45 | 46 | // iOS, Android (Required) 47 | scopes: [ 48 | 'r_basicprofile', 49 | ], 50 | 51 | // iOS (Required) 52 | // The URI your users will be sent back to after authorization. This value must match one of the defined OAuth 2.0 Redirect URLs in your application configuration. 53 | // e.g. https://www.example.com/auth/linkedin 54 | redirectUri: 'https://github.com/joonhocho/react-native-linkedin-sdk/oauth2callback', 55 | }); 56 | 57 | const profile = await LinkedInSDK.getRequest('https://api.linkedin.com/v1/people/~?format=json'); 58 | 59 | setTimeout(() => { 60 | alert(JSON.stringify({token, profile}, null, ' ')); 61 | }, 1500); 62 | }}> 63 | 64 | LinkedIn Sign-In 65 | 66 | 67 | 68 | ); 69 | } 70 | } 71 | 72 | const styles = StyleSheet.create({ 73 | container: { 74 | flex: 1, 75 | justifyContent: 'center', 76 | alignItems: 'center', 77 | backgroundColor: '#F5FCFF', 78 | }, 79 | welcome: { 80 | fontSize: 20, 81 | textAlign: 'center', 82 | margin: 10, 83 | }, 84 | instructions: { 85 | textAlign: 'center', 86 | color: '#333333', 87 | marginBottom: 5, 88 | }, 89 | }); 90 | 91 | AppRegistry.registerComponent('ExampleApp', () => ExampleApp); 92 | -------------------------------------------------------------------------------- /ExampleApp/ios/ExampleApp-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleApp-Bridging-Header.h 3 | // ExampleApp 4 | // 5 | // Created by Joon Ho Cho on 1/31/17. 6 | // Copyright © 2017 Facebook. All rights reserved. 7 | // 8 | 9 | #ifndef ExampleApp_Bridging_Header_h 10 | #define ExampleApp_Bridging_Header_h 11 | 12 | #import 13 | #import 14 | #import 15 | #import 16 | 17 | #endif /* ExampleApp_Bridging_Header_h */ 18 | -------------------------------------------------------------------------------- /ExampleApp/ios/ExampleApp.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ExampleApp/ios/ExampleApp/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | @interface AppDelegate : UIResponder 14 | 15 | @property (nonatomic, strong) UIWindow *window; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /ExampleApp/ios/ExampleApp/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import 13 | #import 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | NSURL *jsCodeLocation; 20 | 21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; 22 | 23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 24 | moduleName:@"ExampleApp" 25 | initialProperties:nil 26 | launchOptions:launchOptions]; 27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 28 | 29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 30 | UIViewController *rootViewController = [UIViewController new]; 31 | rootViewController.view = rootView; 32 | self.window.rootViewController = rootViewController; 33 | [self.window makeKeyAndVisible]; 34 | return YES; 35 | } 36 | 37 | - (BOOL)application:(UIApplication *)application 38 | openURL:(NSURL *)url 39 | sourceApplication:(NSString *)sourceApplication 40 | annotation:(id)annotation { 41 | if ([LinkedinSwiftHelper shouldHandleUrl:url]) { 42 | return [LinkedinSwiftHelper application:application openURL:url sourceApplication:sourceApplication annotation:annotation]; 43 | } 44 | 45 | return YES; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /ExampleApp/ios/ExampleApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /ExampleApp/ios/ExampleApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | LIAppId 54 | 5066126 55 | 56 | CFBundleURLTypes 57 | 58 | 59 | CFBundleURLSchemes 60 | 61 | li5066126 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /ExampleApp/ios/ExampleApp/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ExampleApp/ios/ExampleAppTests/ExampleAppTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import 14 | #import 15 | 16 | #define TIMEOUT_SECONDS 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface ExampleAppTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation ExampleAppTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /ExampleApp/ios/ExampleAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ExampleApp/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'ExampleApp' do 5 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 6 | # use_frameworks! 7 | 8 | # Pods for ExampleApp 9 | pod 'LinkedinSwift', '~> 1.6.6' 10 | 11 | target 'ExampleAppTests' do 12 | inherit! :search_paths 13 | # Pods for testing 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /ExampleApp/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (3.1.0): 3 | - AFNetworking/NSURLSession (= 3.1.0) 4 | - AFNetworking/Reachability (= 3.1.0) 5 | - AFNetworking/Security (= 3.1.0) 6 | - AFNetworking/Serialization (= 3.1.0) 7 | - AFNetworking/UIKit (= 3.1.0) 8 | - AFNetworking/NSURLSession (3.1.0): 9 | - AFNetworking/Reachability 10 | - AFNetworking/Security 11 | - AFNetworking/Serialization 12 | - AFNetworking/Reachability (3.1.0) 13 | - AFNetworking/Security (3.1.0) 14 | - AFNetworking/Serialization (3.1.0) 15 | - AFNetworking/UIKit (3.1.0): 16 | - AFNetworking/NSURLSession 17 | - IOSLinkedInAPIFix (2.0.4): 18 | - AFNetworking (>= 2.0.0) 19 | - LinkedinSwift (1.6.6): 20 | - AFNetworking (>= 2.6.3) 21 | - IOSLinkedInAPIFix (>= 2.0.3) 22 | 23 | DEPENDENCIES: 24 | - LinkedinSwift (~> 1.6.6) 25 | 26 | SPEC CHECKSUMS: 27 | AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 28 | IOSLinkedInAPIFix: a520fd805a03dade35f42904c7d89ded2a84c752 29 | LinkedinSwift: cda2916f08950f662fbec33176dc38aefc5b4c2c 30 | 31 | PODFILE CHECKSUM: d37dde0a3cfe6fc64d47844a391c7debfc605d0e 32 | 33 | COCOAPODS: 1.1.1 34 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/AFNetworking/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | // AFNetworking.h 2 | // 3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import 25 | #import 26 | 27 | #ifndef _AFNETWORKING_ 28 | #define _AFNETWORKING_ 29 | 30 | #import "AFURLRequestSerialization.h" 31 | #import "AFURLResponseSerialization.h" 32 | #import "AFSecurityPolicy.h" 33 | 34 | #if !TARGET_OS_WATCH 35 | #import "AFNetworkReachabilityManager.h" 36 | #endif 37 | 38 | #import "AFURLSessionManager.h" 39 | #import "AFHTTPSessionManager.h" 40 | 41 | #endif /* _AFNETWORKING_ */ 42 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/AFNetworking/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIActivityIndicatorView+AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS || TARGET_OS_TV 27 | 28 | #import 29 | 30 | /** 31 | This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a session task. 32 | */ 33 | @interface UIActivityIndicatorView (AFNetworking) 34 | 35 | ///---------------------------------- 36 | /// @name Animating for Session Tasks 37 | ///---------------------------------- 38 | 39 | /** 40 | Binds the animating state to the state of the specified task. 41 | 42 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 43 | */ 44 | - (void)setAnimatingWithStateOfTask:(nullable NSURLSessionTask *)task; 45 | 46 | @end 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+AFNetworking.h 3 | // 4 | // 5 | // Created by Paulo Ferreira on 08/07/15. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #if TARGET_OS_IOS || TARGET_OS_TV 26 | 27 | #import 28 | 29 | @interface UIImage (AFNetworking) 30 | 31 | + (UIImage*) safeImageWithData:(NSData*)data; 32 | 33 | @end 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIKit+AFNetworking.h 2 | // 3 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #if TARGET_OS_IOS || TARGET_OS_TV 24 | #import 25 | 26 | #ifndef _UIKIT_AFNETWORKING_ 27 | #define _UIKIT_AFNETWORKING_ 28 | 29 | #if TARGET_OS_IOS 30 | #import "AFAutoPurgingImageCache.h" 31 | #import "AFImageDownloader.h" 32 | #import "AFNetworkActivityIndicatorManager.h" 33 | #import "UIRefreshControl+AFNetworking.h" 34 | #import "UIWebView+AFNetworking.h" 35 | #endif 36 | 37 | #import "UIActivityIndicatorView+AFNetworking.h" 38 | #import "UIButton+AFNetworking.h" 39 | #import "UIImageView+AFNetworking.h" 40 | #import "UIProgressView+AFNetworking.h" 41 | #endif /* _UIKIT_AFNETWORKING_ */ 42 | #endif 43 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIProgressView+AFNetworking.h 2 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if TARGET_OS_IOS || TARGET_OS_TV 27 | 28 | #import 29 | 30 | NS_ASSUME_NONNULL_BEGIN 31 | 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task. 35 | */ 36 | @interface UIProgressView (AFNetworking) 37 | 38 | ///------------------------------------ 39 | /// @name Setting Session Task Progress 40 | ///------------------------------------ 41 | 42 | /** 43 | Binds the progress to the upload progress of the specified session task. 44 | 45 | @param task The session task. 46 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 47 | */ 48 | - (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task 49 | animated:(BOOL)animated; 50 | 51 | /** 52 | Binds the progress to the download progress of the specified session task. 53 | 54 | @param task The session task. 55 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 56 | */ 57 | - (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task 58 | animated:(BOOL)animated; 59 | 60 | @end 61 | 62 | NS_ASSUME_NONNULL_END 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIRefreshControl+AFNetworking.m 2 | // 3 | // Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | #import 26 | 27 | #if TARGET_OS_IOS 28 | 29 | #import 30 | 31 | NS_ASSUME_NONNULL_BEGIN 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically beginning and ending refreshing depending on the loading state of a session task. 35 | */ 36 | @interface UIRefreshControl (AFNetworking) 37 | 38 | ///----------------------------------- 39 | /// @name Refreshing for Session Tasks 40 | ///----------------------------------- 41 | 42 | /** 43 | Binds the refreshing state to the state of the specified task. 44 | 45 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 46 | */ 47 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; 48 | 49 | @end 50 | 51 | NS_ASSUME_NONNULL_END 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/AFAutoPurgingImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/AFImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFImageDownloader.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/IOSLinkedInAPIFix/LIALinkedInApplication.h: -------------------------------------------------------------------------------- 1 | ../../../IOSLinkedInAPIFix/IOSLinkedInAPI/LIALinkedInApplication.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/IOSLinkedInAPIFix/LIALinkedInAuthorizationViewController.h: -------------------------------------------------------------------------------- 1 | ../../../IOSLinkedInAPIFix/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/IOSLinkedInAPIFix/LIALinkedInHttpClient.h: -------------------------------------------------------------------------------- 1 | ../../../IOSLinkedInAPIFix/IOSLinkedInAPI/LIALinkedInHttpClient.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/IOSLinkedInAPIFix/NSString+LIAEncode.h: -------------------------------------------------------------------------------- 1 | ../../../IOSLinkedInAPIFix/IOSLinkedInAPI/NSString+LIAEncode.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/LinkedinSwift/LSHeader.h: -------------------------------------------------------------------------------- 1 | ../../../LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LSHeader.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/LinkedinSwift/LSLinkedinToken.h: -------------------------------------------------------------------------------- 1 | ../../../LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LSLinkedinToken.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/LinkedinSwift/LSResponse.h: -------------------------------------------------------------------------------- 1 | ../../../LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LSResponse.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/LinkedinSwift/LinkedinSwiftConfiguration.h: -------------------------------------------------------------------------------- 1 | ../../../LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LinkedinSwiftConfiguration.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Private/LinkedinSwift/LinkedinSwiftHelper.h: -------------------------------------------------------------------------------- 1 | ../../../LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LinkedinSwiftHelper.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/AFAutoPurgingImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/AFImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFImageDownloader.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/UIImage+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImage+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/IOSLinkedInAPIFix/LIALinkedInApplication.h: -------------------------------------------------------------------------------- 1 | ../../../IOSLinkedInAPIFix/IOSLinkedInAPI/LIALinkedInApplication.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/IOSLinkedInAPIFix/LIALinkedInAuthorizationViewController.h: -------------------------------------------------------------------------------- 1 | ../../../IOSLinkedInAPIFix/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/IOSLinkedInAPIFix/LIALinkedInHttpClient.h: -------------------------------------------------------------------------------- 1 | ../../../IOSLinkedInAPIFix/IOSLinkedInAPI/LIALinkedInHttpClient.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/IOSLinkedInAPIFix/NSString+LIAEncode.h: -------------------------------------------------------------------------------- 1 | ../../../IOSLinkedInAPIFix/IOSLinkedInAPI/NSString+LIAEncode.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/LSHeader.h: -------------------------------------------------------------------------------- 1 | ../../../LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LSHeader.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/LSLinkedinToken.h: -------------------------------------------------------------------------------- 1 | ../../../LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LSLinkedinToken.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/LSResponse.h: -------------------------------------------------------------------------------- 1 | ../../../LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LSResponse.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/LinkedinSwiftConfiguration.h: -------------------------------------------------------------------------------- 1 | ../../../LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LinkedinSwiftConfiguration.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/LinkedinSwiftHelper.h: -------------------------------------------------------------------------------- 1 | ../../../LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LinkedinSwiftHelper.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/linkedin-sdk/LISDK.h: -------------------------------------------------------------------------------- 1 | ../../../../LinkedinSwift/linkedin-sdk.framework/Headers/LISDK.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/linkedin-sdk/LISDKAPIError.h: -------------------------------------------------------------------------------- 1 | ../../../../LinkedinSwift/linkedin-sdk.framework/Headers/LISDKAPIError.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/linkedin-sdk/LISDKAPIHelper.h: -------------------------------------------------------------------------------- 1 | ../../../../LinkedinSwift/linkedin-sdk.framework/Headers/LISDKAPIHelper.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/linkedin-sdk/LISDKAPIResponse.h: -------------------------------------------------------------------------------- 1 | ../../../../LinkedinSwift/linkedin-sdk.framework/Headers/LISDKAPIResponse.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/linkedin-sdk/LISDKAccessToken.h: -------------------------------------------------------------------------------- 1 | ../../../../LinkedinSwift/linkedin-sdk.framework/Headers/LISDKAccessToken.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/linkedin-sdk/LISDKCallbackHandler.h: -------------------------------------------------------------------------------- 1 | ../../../../LinkedinSwift/linkedin-sdk.framework/Headers/LISDKCallbackHandler.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/linkedin-sdk/LISDKDeeplinkHelper.h: -------------------------------------------------------------------------------- 1 | ../../../../LinkedinSwift/linkedin-sdk.framework/Headers/LISDKDeeplinkHelper.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/linkedin-sdk/LISDKErrorCode.h: -------------------------------------------------------------------------------- 1 | ../../../../LinkedinSwift/linkedin-sdk.framework/Headers/LISDKErrorCode.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/linkedin-sdk/LISDKPermission.h: -------------------------------------------------------------------------------- 1 | ../../../../LinkedinSwift/linkedin-sdk.framework/Headers/LISDKPermission.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/linkedin-sdk/LISDKSession.h: -------------------------------------------------------------------------------- 1 | ../../../../LinkedinSwift/linkedin-sdk.framework/Headers/LISDKSession.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Headers/Public/LinkedinSwift/linkedin-sdk/LISDKSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../../LinkedinSwift/linkedin-sdk.framework/Headers/LISDKSessionManager.h -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/IOSLinkedInAPIFix/IOSLinkedInAPI/LIALinkedInApplication.m: -------------------------------------------------------------------------------- 1 | // LIALinkedInApplication.m 2 | // 3 | // Copyright (c) 2013 Ancientprogramming 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | 24 | #import "LIALinkedInApplication.h" 25 | 26 | 27 | @implementation LIALinkedInApplication 28 | 29 | - (id)initWithRedirectURL:(NSString *)redirectURL clientId:(NSString *)clientId clientSecret:(NSString *)clientSecret state:(NSString *)state grantedAccess:(NSArray *)grantedAccess { 30 | self = [super init]; 31 | if (self) { 32 | self.redirectURL = redirectURL; 33 | self.clientId = clientId; 34 | self.clientSecret = clientSecret; 35 | self.state = state; 36 | self.grantedAccess = grantedAccess; 37 | } 38 | 39 | return self; 40 | } 41 | 42 | + (id)applicationWithRedirectURL:(NSString *)redirectURL clientId:(NSString *)clientId clientSecret:(NSString *)clientSecret state:(NSString *)state grantedAccess:(NSArray *)grantedAccess { 43 | return [[self alloc] initWithRedirectURL:redirectURL clientId:clientId clientSecret:clientSecret state:state grantedAccess:grantedAccess]; 44 | } 45 | 46 | - (NSString *)grantedAccessString { 47 | return [self.grantedAccess componentsJoinedByString: @"%20"]; 48 | } 49 | 50 | @end -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/IOSLinkedInAPIFix/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.h: -------------------------------------------------------------------------------- 1 | // LIALinkedInAuthorizationViewController.h 2 | // 3 | // Copyright (c) 2013 Ancientprogramming 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | #import 23 | #import "LIALinkedInApplication.h" 24 | 25 | typedef void(^LIAAuthorizationCodeSuccessCallback)(NSString *code); 26 | typedef void(^LIAAuthorizationCodeCancelCallback)(void); 27 | typedef void(^LIAAuthorizationCodeFailureCallback)(NSError *errorReason); 28 | 29 | /** 30 | * View Controller subclass containing a `UIWebView` which will be used to display the LinkedIN web UI to perform the login. 31 | **/ 32 | @interface LIALinkedInAuthorizationViewController : UIViewController 33 | 34 | /** ************************************************************************************************ ** 35 | * @name Initializers 36 | ** ************************************************************************************************ **/ 37 | 38 | /** 39 | * Default initializer. 40 | * @param application A `LIALinkedInApplication` configured instance. 41 | * @param success A success block. 42 | * @param cancel A cancel block. 43 | * @param failure A failure block. 44 | * @returns An initialized instance 45 | **/ 46 | - (id)initWithApplication:(LIALinkedInApplication *)application 47 | success:(LIAAuthorizationCodeSuccessCallback)success 48 | cancel:(LIAAuthorizationCodeCancelCallback)cancel 49 | failure:(LIAAuthorizationCodeFailureCallback)failure; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/IOSLinkedInAPIFix/IOSLinkedInAPI/NSString+LIAEncode.h: -------------------------------------------------------------------------------- 1 | // NSString+LIAEncode.h 2 | // 3 | // Copyright (c) 2013 StocksCompare 4 | // Created by Eugene on 04/06/2013. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #import 26 | 27 | /** 28 | * NSString additions for the LIALinkedIn framework. 29 | **/ 30 | @interface NSString (LIAEncode) 31 | 32 | /** ************************************************************************************************ ** 33 | * @name Encoding 34 | ** ************************************************************************************************ **/ 35 | 36 | /** 37 | * String encoding. 38 | * @return An encoded string. 39 | **/ 40 | - (NSString *)LIAEncode; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/IOSLinkedInAPIFix/IOSLinkedInAPI/NSString+LIAEncode.m: -------------------------------------------------------------------------------- 1 | // NSString+LIAEncode.m 2 | // 3 | // Copyright (c) 2013 StocksCompare 4 | // Created by Eugene on 04/06/2013. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #import "NSString+LIAEncode.h" 26 | 27 | @implementation NSString (LIAEncode) 28 | 29 | -(NSString *) LIAEncode { 30 | return (NSString *)CFBridgingRelease( 31 | CFURLCreateStringByAddingPercentEscapes( 32 | NULL, 33 | (__bridge CFStringRef) self, 34 | NULL, 35 | CFSTR("!*'();:@&=+$,/?%#[]"), 36 | kCFStringEncodingUTF8 37 | ) 38 | ); 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/IOSLinkedInAPIFix/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Ancientprogramming (http://www.ancientprogramming.com/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2015 Li 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LSHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // LSHeader.h 3 | // LinkedinSwift 4 | // 5 | // Created by Li Jiantang on 19/11/2015. 6 | // Copyright © 2015 Carma. All rights reserved. 7 | // 8 | 9 | #ifndef LSHeader_h 10 | #define LSHeader_h 11 | 12 | #import "LinkedinSwiftHelper.h" 13 | #import "LinkedinSwiftConfiguration.h" 14 | 15 | #endif /* LSHeader_h */ 16 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LSLinkedinToken.h: -------------------------------------------------------------------------------- 1 | // 2 | // LSLinkedinToken.h 3 | // LinkedinSwift 4 | // 5 | // Created by Li Jiantang on 19/11/2015. 6 | // Copyright © 2015 Carma. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * LSLinkedinToken 13 | */ 14 | @interface LSLinkedinToken : NSObject 15 | 16 | /** 17 | * Linkedin access token 18 | */ 19 | @property (nonatomic, strong, readonly) NSString *accessToken; 20 | /** 21 | * token expire date 22 | */ 23 | @property (nonatomic, strong, readonly) NSDate *expireDate; 24 | /** 25 | * If token is from MobileSDK 26 | */ 27 | @property (nonatomic, readonly) BOOL isFromMobileSDK; 28 | 29 | 30 | - (instancetype)initWithAccessToken:(NSString*)_accessToken expireDate:(NSDate*)_expireDate fromMobileSDK:(BOOL)_isFromMobileSDK; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LSLinkedinToken.m: -------------------------------------------------------------------------------- 1 | // 2 | // LSLinkedinToken.m 3 | // LinkedinSwift 4 | // 5 | // Created by Li Jiantang on 19/11/2015. 6 | // Copyright © 2015 Carma. All rights reserved. 7 | // 8 | 9 | #import "LSLinkedinToken.h" 10 | 11 | @implementation LSLinkedinToken 12 | @synthesize accessToken, expireDate, isFromMobileSDK; 13 | 14 | - (instancetype)initWithAccessToken:(NSString*)_accessToken expireDate:(NSDate*)_expireDate fromMobileSDK:(BOOL)_isFromMobileSDK { 15 | 16 | if (self = [super init]) { 17 | 18 | accessToken = _accessToken; 19 | expireDate = _expireDate; 20 | isFromMobileSDK = _isFromMobileSDK; 21 | } 22 | 23 | return self; 24 | } 25 | 26 | - (NSString*)description { 27 | return [NSString stringWithFormat:@"", accessToken, expireDate]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LSResponse.h: -------------------------------------------------------------------------------- 1 | // 2 | // LSResponse.h 3 | // LinkedinSwift 4 | // 5 | // Created by Li Jiantang on 19/11/2015. 6 | // Copyright © 2015 Carma. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * LSResponse, responsed json object and http status code 13 | */ 14 | @interface LSResponse : NSObject 15 | 16 | @property (nonatomic, strong, readonly) NSDictionary *jsonObject; 17 | @property (nonatomic, readonly) int statusCode; 18 | 19 | /** 20 | * Init with string 21 | * 22 | * @param string string response 23 | * @param _statusCode http status code 24 | * 25 | * @return LSResponse 26 | */ 27 | - (instancetype)initWithString:(NSString*)string statusCode:(int)statusCode; 28 | /** 29 | * Init with data 30 | * 31 | * @param _data data resopnse 32 | * @param _statusCode http status code 33 | * 34 | * @return LSResponse 35 | */ 36 | - (instancetype)initWithData:(NSData*)data statusCode:(int)statusCode; 37 | /** 38 | * Init with json dictionary 39 | * 40 | * @param _dictionary dictionary 41 | * @param _statusCode http status code 42 | * 43 | * @return LSResponse 44 | */ 45 | - (instancetype)initWithDictionary:(NSDictionary*)_dictionary statusCode:(int)_statusCode; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LSResponse.m: -------------------------------------------------------------------------------- 1 | // 2 | // LSResponse.m 3 | // LinkedinSwift 4 | // 5 | // Created by Li Jiantang on 19/11/2015. 6 | // Copyright © 2015 Carma. All rights reserved. 7 | // 8 | 9 | #import "LSResponse.h" 10 | 11 | #import 12 | 13 | @implementation LSResponse 14 | @synthesize jsonObject, statusCode; 15 | 16 | /** 17 | * Init with string 18 | * 19 | * @param string string response 20 | * @param _statusCode http status code 21 | * 22 | * @return LSResponse 23 | */ 24 | - (instancetype)initWithString:(NSString*)string statusCode:(int)_statusCode { 25 | return [self initWithData:[string dataUsingEncoding:NSUTF8StringEncoding] statusCode:_statusCode]; 26 | } 27 | 28 | /** 29 | * Init with data 30 | * 31 | * @param _data data resopnse 32 | * @param _statusCode http status code 33 | * 34 | * @return LSResponse 35 | */ 36 | - (instancetype)initWithData:(NSData*)_data statusCode:(int)_statusCode { 37 | 38 | NSError *error = nil; 39 | id json = [NSJSONSerialization JSONObjectWithData:_data options:0 error:&error]; 40 | 41 | if (json != nil && error == nil) { 42 | self = [self initWithDictionary:json statusCode:_statusCode]; 43 | } 44 | 45 | return self; 46 | } 47 | 48 | /** 49 | * Init with json dictionary 50 | * 51 | * @param _dictionary dictionary 52 | * @param _statusCode http status code 53 | * 54 | * @return LSResponse 55 | */ 56 | - (instancetype)initWithDictionary:(NSDictionary*)_dictionary statusCode:(int)_statusCode { 57 | 58 | if (self = [super init]) { 59 | 60 | jsonObject = _dictionary; 61 | statusCode = _statusCode; 62 | } 63 | 64 | return self; 65 | } 66 | 67 | - (NSString*)description { 68 | 69 | return [NSString stringWithFormat:@"", jsonObject, statusCode]; 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LinkedinSwiftConfiguration.h: -------------------------------------------------------------------------------- 1 | // 2 | // LinkedinSwiftApplication.h 3 | // LinkedinSwift 4 | // 5 | // Created by Li Jiantang on 19/11/2015. 6 | // Copyright © 2015 Carma. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * Liknedin configuration most for oauth 13 | */ 14 | @interface LinkedinSwiftConfiguration : NSObject 15 | 16 | /** 17 | * Linkedin client id, lookup your https://developer.linkedin.com settings 18 | */ 19 | @property (nonatomic, strong, readonly) NSString *clientId; 20 | /** 21 | * Linkedin client secret, lookup your https://developer.linkedin.com settings 22 | */ 23 | @property (nonatomic, strong, readonly) NSString *clientSecret; 24 | /** 25 | * state to identify each oauth redirect calls, make a unique one 26 | */ 27 | @property (nonatomic, strong, readonly) NSString *state; 28 | /** 29 | * Linkedin permissions to ask 30 | */ 31 | @property (nonatomic, strong, readonly) NSArray *permissions; 32 | /** 33 | * Linkedin oauth redirect url 34 | */ 35 | @property (nonatomic, strong) NSString *redirectUrl; 36 | 37 | 38 | /** 39 | * Init with settings 40 | * 41 | * @param clientId Linkedin client id 42 | * @param clientSecret Linkedin client secret 43 | * @param state state to identify each oauth redirect calls, make a unique one 44 | * @param permisssions Linkedin permissions to ask 45 | * @param redirectUrl Linkedin oauth redirect url 46 | * 47 | * @return LinkedinSwiftConfiguration 48 | */ 49 | 50 | - (instancetype)initWithClientId:(NSString *)_clientId clientSecret:(NSString *)_clientSecret state:(NSString *)_state permissions:(NSArray *)_permisssions redirectUrl:(NSString *)redirectUrl; 51 | 52 | 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/LinkedinSwift/LinkedinSwift/sources/LinkedinSwiftConfiguration.m: -------------------------------------------------------------------------------- 1 | // 2 | // LinkedinSwiftApplication.m 3 | // LinkedinSwift 4 | // 5 | // Created by Li Jiantang on 19/11/2015. 6 | // Copyright © 2015 Carma. All rights reserved. 7 | // 8 | 9 | #import "LinkedinSwiftConfiguration.h" 10 | 11 | 12 | @implementation LinkedinSwiftConfiguration 13 | @synthesize clientId, clientSecret, state, permissions, redirectUrl; 14 | 15 | - (instancetype)initWithClientId:(NSString *)_clientId clientSecret:(NSString *)_clientSecret state:(NSString *)_state permissions:(NSArray *)_permisssions redirectUrl:(NSString *)_redirectUrl { 16 | 17 | if (self = [super init]) { 18 | clientId = _clientId; 19 | clientSecret = _clientSecret; 20 | state = _state; 21 | permissions = _permisssions; 22 | redirectUrl = _redirectUrl; 23 | } 24 | 25 | return self; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/README.md: -------------------------------------------------------------------------------- 1 | # LinkedinSwift 2 | 3 | [![CocoaPods](https://img.shields.io/cocoapods/v/LinkedinSwift.svg)](https://github.com/tonyli508/LinkedinSwift.git) 4 | [![Build Status](https://travis-ci.org/tonyli508/LinkedinSwift.svg?branch=master)](https://travis-ci.org/tonyli508/LinkedinSwift) 5 | [![codebeat badge](https://codebeat.co/badges/ea9c29be-fbd1-4b51-87ba-3881b6b90641)](https://codebeat.co/projects/github-com-tonyli508-linkedinswift) 6 | [![Gitter](https://badges.gitter.im/tonyli508/IOSLinkedInAPI.svg)](https://gitter.im/tonyli508/IOSLinkedInAPI?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) 7 | 8 | 9 | LinkedinSwift is a project for managing native LinkedIn SDK using [CocoaPods](https://cocoapods.org) 10 | 11 | Linkedin Oauth Helper, depend on Linkedin Native App installed or not, using Linkdin IOS SDK or UIWebView to login, support Swift with iOS 7 12 | 13 | Latest version is based on [LinkedIn SDK 1.0.7](https://content.linkedin.com/content/dam/developer/sdk/iOS/li-ios-sdk-1.0.6-release.zip) and [IOSLinkedinAPI for webview auth](https://github.com/jeyben/IOSLinkedInAPI). 14 | 15 | ## How to use 16 | 17 | ```ruby 18 | pod 'LinkedinSwift', '~> 1.6.5' 19 | ``` 20 | 21 | Check out Example project. 22 | 23 | - Setup configuration and helper instance. 24 | ```swift 25 | let linkedinHelper = LinkedinSwiftHelper(configuration: LinkedinSwiftConfiguration(clientId: "77tn2ar7gq6lgv", clientSecret: "iqkDGYpWdhf7WKzA", state: "DLKDJF45DIWOERCM", permissions: ["r_basicprofile", "r_emailaddress"])) 26 | ``` 27 | - Setup Linkedin SDK settings: [instruction here](https://developer.linkedin.com/docs/ios-sdk) 28 | - Setup redirect handler in AppDelegate 29 | ```swift 30 | 31 | func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool { 32 | 33 | // Linkedin sdk handle redirect 34 | if LinkedinSwiftHelper.shouldHandleUrl(url) { 35 | return LinkedinSwiftHelper.application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation) 36 | } 37 | 38 | return false 39 | } 40 | ``` 41 | - Login: 42 | ```swift 43 | 44 | linkedinHelper.authorizeSuccess({ (lsToken) -> Void in 45 | //Login success lsToken 46 | }, error: { (error) -> Void in 47 | //Encounter error: error.localizedDescription 48 | }, cancel: { () -> Void in 49 | //User Cancelled! 50 | }) 51 | ``` 52 | - Fetch profile: 53 | ```swift 54 | 55 | linkedinHelper.requestURL("https://api.linkedin.com/v1/people/~?format=json", requestType: LinkedinSwiftRequestGet, success: { (response) -> Void in 56 | 57 | //Request success response 58 | 59 | }) { [unowned self] (error) -> Void in 60 | 61 | //Encounter error 62 | } 63 | ``` 64 | 65 | Example project screenshots: 66 | 67 |

68 | Demo photo 69 |

70 | 71 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Headers/LISDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDK.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDK_h 8 | #define LISDK_h 9 | 10 | /** 11 | file for application to include to interact with LinkedIn SDK for ios. 12 | 13 | A typical usage flow might be: 14 | 15 | 1. use LISDKSessionManager to initialize a linkedin session if it is not already valid. 16 | This will ask the user to authorize the application to use his/her linkedin data. 17 | 18 | if (! [LISDKSessionManager hasValidSession] ) { 19 | [LISDKSessionManager createSessionWithAuthorize:[NSArray arrayWithObjects:LISDK_BASIC_PROFILE_PERMISSION, LISDK_EMAILADDRESS_PERMISSION, nil] 20 | state:@"some state" 21 | showGoToAppStoreDialog:NO 22 | successBlock:^(NSString *returnState) { 23 | } 24 | errorBlock:^(NSError *error) { 25 | }]; 26 | } 27 | 28 | 2. use LISDKAPIHelper or LISDKDeeplinkHelper to make API calls or to perform deep link operations 29 | 30 | */ 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Headers/LISDKAPIError.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKAPIError.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | /** 8 | LISDKAPIError - Error sent when a LinkedIn api call returns an error response. 9 | This class extends NSError to allow easy access to the LISDKAPIResponse object 10 | */ 11 | #ifndef LISDKAPIError_h 12 | #define LISDKAPIError_h 13 | 14 | #define LISDKAuthErrorAPIResponse @"LISDKAuthErrorAPIResponse" 15 | 16 | @class LISDKAPIResponse; 17 | 18 | @interface LISDKAPIError : NSError 19 | 20 | /** 21 | returns the LISDKAPIResponse object associated with the API error 22 | */ 23 | - (LISDKAPIResponse *)errorResponse; 24 | 25 | /** 26 | create LISDKAPIError object with the given LISDKAPIResponse object 27 | */ 28 | + (id)errorWithApiResponse:(LISDKAPIResponse *)response; 29 | 30 | /** 31 | create LISDKAPIError object with the given NSError object 32 | */ 33 | + (id)errorWithError:(NSError *)error; 34 | 35 | @end 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Headers/LISDKAPIHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKApiHelper.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKApiHelper_h 8 | #define LISDKApiHelper_h 9 | 10 | @class LISDKAPIResponse; 11 | @class LISDKAPIError; 12 | 13 | 14 | typedef void (^APISuccessBlock)(LISDKAPIResponse *); 15 | typedef void (^APIErrorBlock)(LISDKAPIResponse *, NSError *); 16 | 17 | #define LINKEDIN_API_URL @"https://api.linkedin.com/v1" 18 | 19 | /** 20 | This class is used to make API Requests to retrieve LinkedIn data. 21 | Calls should only be made once a valid session has been established. 22 | A typical use might be: 23 | 24 | if ([LISDKSessionManager hasValidSession]) { 25 | [[LISDKAPIHelper sharedInstance] getRequest:[NSString stringWithFormat:@"%@/people/~",LINKEDIN_API_URL] 26 | success:^(LISDKAPIResponse *response) { 27 | // do something with response 28 | } 29 | error:^(LISDKAPIError *apiError) { 30 | // do something with error 31 | }]; 32 | ] 33 | } 34 | 35 | */ 36 | @interface LISDKAPIHelper : NSObject 37 | /** 38 | access to singleton 39 | */ 40 | + (instancetype)sharedInstance; 41 | 42 | 43 | - (void)getRequest:(NSString *)url 44 | success:(void(^)(LISDKAPIResponse *))success 45 | error:(void(^)(LISDKAPIError *))error; 46 | 47 | - (void)deleteRequest:(NSString *)url 48 | success:(void(^)(LISDKAPIResponse *))successCompletion 49 | error:(void(^)(LISDKAPIError *))errorCompletion; 50 | 51 | - (void)putRequest:(NSString *)url 52 | body:(NSData *)body 53 | success:(void(^)(LISDKAPIResponse *))successCompletion 54 | error:(void(^)(LISDKAPIError *))errorCompletion; 55 | 56 | - (void)putRequest:(NSString *)url 57 | stringBody:(NSString *)stringBody 58 | success:(void(^)(LISDKAPIResponse *))successCompletion 59 | error:(void(^)(LISDKAPIError *))errorCompletion; 60 | 61 | - (void)postRequest:(NSString *)url 62 | body:(NSData *)body 63 | success:(void(^)(LISDKAPIResponse *))successCompletion 64 | error:(void(^)(LISDKAPIError *))errorCompletion; 65 | 66 | - (void)postRequest:(NSString *)url 67 | stringBody:(NSString *)stringBody 68 | success:(void(^)(LISDKAPIResponse *))successCompletion 69 | error:(void(^)(LISDKAPIError *))errorCompletion; 70 | 71 | // do we want to expose this one? 72 | - (void)apiRequest:(NSString *)url 73 | method:(NSString *)method 74 | body:(NSData *)body 75 | success:(void(^)(LISDKAPIResponse *))successCompletion 76 | error:(void(^)(LISDKAPIError *))errorCompletion; 77 | 78 | /** 79 | cancel any in process api calls 80 | */ 81 | - (void)cancelCalls; 82 | 83 | @end 84 | 85 | #endif 86 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Headers/LISDKAPIResponse.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKAPIResponse.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKAPIResponse_h 8 | #define LISDKAPIResponse_h 9 | 10 | /** 11 | Response from an API call 12 | */ 13 | @interface LISDKAPIResponse : NSObject 14 | @property (readonly,nonatomic) NSString *data; 15 | @property (readonly,nonatomic) int statusCode; 16 | @property (readonly,nonatomic) NSDictionary *headers; 17 | 18 | 19 | - (id)initWithData:(NSString *)data headers:(NSDictionary *)headers statusCode:(int)statusCode; 20 | @end 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Headers/LISDKAccessToken.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKAccessToken.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKAccessToken_h 8 | #define LISDKAccessToken_h 9 | 10 | @interface LISDKAccessToken : NSObject 11 | 12 | @property (readonly,nonatomic) NSString *accessTokenValue; 13 | @property (readonly,nonatomic) NSDate *expiration; 14 | 15 | +(instancetype)LISDKAccessTokenWithValue:(NSString*)value expiresOnMillis:(long long)expiresOnMillis; 16 | 17 | /** 18 | create by passing in a serialized access token obtained by calling serializedString 19 | */ 20 | +(instancetype)LISDKAccessTokenWithSerializedString:(NSString *)serString; 21 | 22 | -(NSString *)serializedString; 23 | 24 | @end 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Headers/LISDKCallbackHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKCallbackHandler.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKCallbackHandler_h 8 | #define LISDKCallbackHandler_h 9 | 10 | @class UIApplication; 11 | 12 | @interface LISDKCallbackHandler : NSObject 13 | 14 | /** 15 | call this from application:openURL:sourceApplication:annotation: in AppDelegate to check if the callback can be handled by LinkedIn SDK. 16 | */ 17 | + (BOOL)shouldHandleUrl:(NSURL *)url; 18 | 19 | /** 20 | call this from application:openURL:sourceApplication:annotation: in AppDelegate in order to properly handle the callbacks. This must be called only if shouldHandleUrl: returns YES. 21 | */ 22 | + (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; 23 | 24 | @end 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Headers/LISDKDeeplinkHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKDeeplinkHelper.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKDeeplinkHelper_h 8 | #define LISDKDeeplinkHelper_h 9 | 10 | @class UIApplication; 11 | 12 | /** 13 | This class is used to view member profiles in the LinkedIn native app. 14 | Calls should only be made once a valid session has been established. 15 | A typical use might be: 16 | 17 | if ([LISDKSessionManager hasValidSession]) { 18 | [[LISDKDeeplinkHelper sharedInstance] viewOtherProfile:@"x1y2z3abc" 19 | WithState:@"some state" 20 | success:^(NSString *) { 21 | // do something on success 22 | } 23 | error:^(NSError *deeplinkError, NSString *) { 24 | // do something with error 25 | }]; 26 | } 27 | */ 28 | typedef void (^DeeplinkSuccessBlock)(NSString *returnedState); 29 | typedef void (^DeeplinkErrorBlock)(NSError *error, NSString *returnedState); 30 | 31 | @interface LISDKDeeplinkHelper : NSObject 32 | 33 | /** 34 | access to singleton 35 | */ 36 | + (instancetype)sharedInstance; 37 | 38 | 39 | - (void)viewCurrentProfileWithState:(NSString *)state 40 | showGoToAppStoreDialog:(BOOL)showDialog 41 | success:(DeeplinkSuccessBlock)success 42 | error:(DeeplinkErrorBlock)error; 43 | 44 | - (void)viewOtherProfile:(NSString *)memberId 45 | withState:(NSString *)state 46 | showGoToAppStoreDialog:(BOOL)showDialog 47 | success:(DeeplinkSuccessBlock)success 48 | error:(DeeplinkErrorBlock)error; 49 | 50 | + (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; 51 | 52 | + (BOOL)shouldHandleUrl:(NSURL *)url; 53 | 54 | @end 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Headers/LISDKErrorCode.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKErrorCode.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKErrorCode_h 8 | #define LISDKErrorCode_h 9 | 10 | #define LISDK_ERROR_API_DOMAIN @"LISDKErrorAPIDomain" 11 | #define LISDK_ERROR_AUTH_DOMAIN @"LISDKErrorAuthDomain" 12 | #define LISDK_ERROR_DEEPLINK_DOMAIN @"LISDKErrorDeepLinkDomain" 13 | 14 | typedef NS_ENUM(int,LISDKErrorCode) { 15 | NONE, 16 | /** 17 | There is something wrong with the request 18 | */ 19 | INVALID_REQUEST, 20 | 21 | /** 22 | Unable to complete request due to a network error 23 | */ 24 | NETWORK_UNAVAILABLE, 25 | 26 | /** 27 | The user cancelled the operation 28 | */ 29 | USER_CANCELLED, 30 | 31 | /** 32 | Unknown error 33 | */ 34 | UNKNOWN_ERROR, 35 | 36 | /** 37 | An error occurred within LinkedIn's 38 | */ 39 | SERVER_ERROR, 40 | 41 | /** 42 | Linkedin App not found on device or the version of the Linkedin App installed does not support the sdk 43 | */ 44 | LINKEDIN_APP_NOT_FOUND, 45 | 46 | /** 47 | The user is not properly authenticated on this device 48 | */ 49 | NOT_AUTHENTICATED 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Headers/LISDKPermission.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKPermission.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKPermission_h 8 | #define LISDKPermission_h 9 | 10 | /** 11 | @file LISDKPermission.h 12 | list of valid permissions 13 | */ 14 | 15 | /** 16 | @def LISDK_BASIC_PROFILE_PERMISSION permission to retrieve name, photo, headline and current position 17 | */ 18 | #define LISDK_BASIC_PROFILE_PERMISSION @"r_basicprofile" 19 | 20 | /** 21 | LISDK_FULL_PROFILE_PERMISSION permission to retrieve full profile including experience, education, skills and recommendations 22 | This permission is not open to all developers. 23 | */ 24 | #define LISDK_FULL_PROFILE_PERMISSION @"r_fullprofile" 25 | 26 | /** 27 | LISDK_EMAILADDRESS_PERMISSION permission to retrieve email address 28 | */ 29 | #define LISDK_EMAILADDRESS_PERMISSION @"r_emailaddress" 30 | 31 | /** 32 | LISDK_W_SHARE_PERMISSION permission to post updates, make comments and like posts 33 | */ 34 | #define LISDK_W_SHARE_PERMISSION @"w_share" 35 | 36 | /** 37 | LISDK_CONTACT_INFO_PERMISSION permission to retrieve address, phone number, and bound accounts 38 | This permission is not open to all developers. 39 | */ 40 | #define LISDK_CONTACT_INFO_PERMISSION @"r_contactinfo" 41 | 42 | /** 43 | LISDK_RW_COMPANY_ADMIN_PERMISSION permission to edit company pages for which I am an Admin and post status updates on behalf of those companies 44 | */ 45 | #define LISDK_RW_COMPANY_ADMIN_PERMISSION @"rw_company_admin" 46 | 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Headers/LISDKSession.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISession.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKSession_h 8 | #define LISDKSession_h 9 | 10 | @class LISDKAccessToken; 11 | 12 | /** 13 | class representing a valid LinkedIn session. A valid session means that the LinkedIn member 14 | has granted access to the application to use some of his/her LinkedIn data. 15 | */ 16 | @interface LISDKSession : NSObject 17 | 18 | @property(nonatomic,strong) LISDKAccessToken *accessToken; 19 | 20 | - (BOOL)isValid; 21 | - (NSString *)value; 22 | /* 23 | - (LISDKAccessToken *)getAccessToken; 24 | 25 | - (void)setAccessToken:(LISDKAccessToken *)accessToken; 26 | */ 27 | @end 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Headers/LISDKSessionManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISessionManager.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | 8 | #ifndef LISDKSessionManager_h 9 | #define LISDKSessionManager_h 10 | 11 | @class LISDKSession; 12 | @class LISDKAuthError; 13 | @class UIApplication; 14 | @class LISDKScope; 15 | @class LISDKAccessToken; 16 | typedef void (^AuthSuccessBlock)(NSString *); 17 | typedef void (^AuthErrorBlock)(NSError *); 18 | 19 | /** 20 | * LISDKSessionManager. 21 | */ 22 | @interface LISDKSessionManager : NSObject 23 | 24 | 25 | + (instancetype)sharedInstance; 26 | 27 | @property (readonly,nonatomic) LISDKSession *session; 28 | 29 | /** 30 | @brief create a session with user authorization if needed. 31 | If the user previously authorized this application, the successBlock will be called and 32 | a valid session created. 33 | If needed, an authorization screen will be shown to the user. 34 | This method will bring the user to the LinkedIn flagship app. The application must 35 | call application:openURL from their AppDelegate:application:openURL in order for the 36 | successBlock and errorBlock completion handlers to be properly called. 37 | By default, sessions are saved in the keychain. 38 | @param permissions NSArray of permissions strings. For valid values see LISDKPermission.h 39 | @param showGoToAppStoreDialog YES if you want an alert to prompt the user to go to the App Store if the LinkedIn App is not installed. If NO, no alert will be shown and the user will be taken to the App Store directly. 40 | */ 41 | + (void)createSessionWithAuth:(NSArray *)permissions state:(NSString *)state showGoToAppStoreDialog:(BOOL)showDialog successBlock:(AuthSuccessBlock)successBlock errorBlock:(AuthErrorBlock)erroBlock; 42 | 43 | + (void)createSessionWithAccessToken:(LISDKAccessToken *)accessToken; 44 | 45 | /** 46 | call to clear any open session. Any saved session will also be cleared. 47 | */ 48 | + (void)clearSession; 49 | 50 | /** 51 | @return YES if session has been properly created. 52 | */ 53 | + (BOOL)hasValidSession; 54 | 55 | /** 56 | call this from AppDelegate:application:openURL in order to properly handle the authorization 57 | sequence 58 | @return YES if the url was handled 59 | */ 60 | + (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; 61 | 62 | /** 63 | call this within AppDelegate:application:openURL to determine whether or not to call 64 | this methods application:openURL method 65 | @return YES if the url is one that should be handled by the LinkedIn SDK 66 | */ 67 | + (BOOL)shouldHandleUrl:(NSURL *)url; 68 | 69 | @end 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/Headers/LISDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDK.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDK_h 8 | #define LISDK_h 9 | 10 | /** 11 | file for application to include to interact with LinkedIn SDK for ios. 12 | 13 | A typical usage flow might be: 14 | 15 | 1. use LISDKSessionManager to initialize a linkedin session if it is not already valid. 16 | This will ask the user to authorize the application to use his/her linkedin data. 17 | 18 | if (! [LISDKSessionManager hasValidSession] ) { 19 | [LISDKSessionManager createSessionWithAuthorize:[NSArray arrayWithObjects:LISDK_BASIC_PROFILE_PERMISSION, LISDK_EMAILADDRESS_PERMISSION, nil] 20 | state:@"some state" 21 | showGoToAppStoreDialog:NO 22 | successBlock:^(NSString *returnState) { 23 | } 24 | errorBlock:^(NSError *error) { 25 | }]; 26 | } 27 | 28 | 2. use LISDKAPIHelper or LISDKDeeplinkHelper to make API calls or to perform deep link operations 29 | 30 | */ 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/Headers/LISDKAPIError.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKAPIError.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | /** 8 | LISDKAPIError - Error sent when a LinkedIn api call returns an error response. 9 | This class extends NSError to allow easy access to the LISDKAPIResponse object 10 | */ 11 | #ifndef LISDKAPIError_h 12 | #define LISDKAPIError_h 13 | 14 | #define LISDKAuthErrorAPIResponse @"LISDKAuthErrorAPIResponse" 15 | 16 | @class LISDKAPIResponse; 17 | 18 | @interface LISDKAPIError : NSError 19 | 20 | /** 21 | returns the LISDKAPIResponse object associated with the API error 22 | */ 23 | - (LISDKAPIResponse *)errorResponse; 24 | 25 | /** 26 | create LISDKAPIError object with the given LISDKAPIResponse object 27 | */ 28 | + (id)errorWithApiResponse:(LISDKAPIResponse *)response; 29 | 30 | /** 31 | create LISDKAPIError object with the given NSError object 32 | */ 33 | + (id)errorWithError:(NSError *)error; 34 | 35 | @end 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/Headers/LISDKAPIHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKApiHelper.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKApiHelper_h 8 | #define LISDKApiHelper_h 9 | 10 | @class LISDKAPIResponse; 11 | @class LISDKAPIError; 12 | 13 | 14 | typedef void (^APISuccessBlock)(LISDKAPIResponse *); 15 | typedef void (^APIErrorBlock)(LISDKAPIResponse *, NSError *); 16 | 17 | #define LINKEDIN_API_URL @"https://api.linkedin.com/v1" 18 | 19 | /** 20 | This class is used to make API Requests to retrieve LinkedIn data. 21 | Calls should only be made once a valid session has been established. 22 | A typical use might be: 23 | 24 | if ([LISDKSessionManager hasValidSession]) { 25 | [[LISDKAPIHelper sharedInstance] getRequest:[NSString stringWithFormat:@"%@/people/~",LINKEDIN_API_URL] 26 | success:^(LISDKAPIResponse *response) { 27 | // do something with response 28 | } 29 | error:^(LISDKAPIError *apiError) { 30 | // do something with error 31 | }]; 32 | ] 33 | } 34 | 35 | */ 36 | @interface LISDKAPIHelper : NSObject 37 | /** 38 | access to singleton 39 | */ 40 | + (instancetype)sharedInstance; 41 | 42 | 43 | - (void)getRequest:(NSString *)url 44 | success:(void(^)(LISDKAPIResponse *))success 45 | error:(void(^)(LISDKAPIError *))error; 46 | 47 | - (void)deleteRequest:(NSString *)url 48 | success:(void(^)(LISDKAPIResponse *))successCompletion 49 | error:(void(^)(LISDKAPIError *))errorCompletion; 50 | 51 | - (void)putRequest:(NSString *)url 52 | body:(NSData *)body 53 | success:(void(^)(LISDKAPIResponse *))successCompletion 54 | error:(void(^)(LISDKAPIError *))errorCompletion; 55 | 56 | - (void)putRequest:(NSString *)url 57 | stringBody:(NSString *)stringBody 58 | success:(void(^)(LISDKAPIResponse *))successCompletion 59 | error:(void(^)(LISDKAPIError *))errorCompletion; 60 | 61 | - (void)postRequest:(NSString *)url 62 | body:(NSData *)body 63 | success:(void(^)(LISDKAPIResponse *))successCompletion 64 | error:(void(^)(LISDKAPIError *))errorCompletion; 65 | 66 | - (void)postRequest:(NSString *)url 67 | stringBody:(NSString *)stringBody 68 | success:(void(^)(LISDKAPIResponse *))successCompletion 69 | error:(void(^)(LISDKAPIError *))errorCompletion; 70 | 71 | // do we want to expose this one? 72 | - (void)apiRequest:(NSString *)url 73 | method:(NSString *)method 74 | body:(NSData *)body 75 | success:(void(^)(LISDKAPIResponse *))successCompletion 76 | error:(void(^)(LISDKAPIError *))errorCompletion; 77 | 78 | /** 79 | cancel any in process api calls 80 | */ 81 | - (void)cancelCalls; 82 | 83 | @end 84 | 85 | #endif 86 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/Headers/LISDKAPIResponse.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKAPIResponse.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKAPIResponse_h 8 | #define LISDKAPIResponse_h 9 | 10 | /** 11 | Response from an API call 12 | */ 13 | @interface LISDKAPIResponse : NSObject 14 | @property (readonly,nonatomic) NSString *data; 15 | @property (readonly,nonatomic) int statusCode; 16 | @property (readonly,nonatomic) NSDictionary *headers; 17 | 18 | 19 | - (id)initWithData:(NSString *)data headers:(NSDictionary *)headers statusCode:(int)statusCode; 20 | @end 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/Headers/LISDKAccessToken.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKAccessToken.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKAccessToken_h 8 | #define LISDKAccessToken_h 9 | 10 | @interface LISDKAccessToken : NSObject 11 | 12 | @property (readonly,nonatomic) NSString *accessTokenValue; 13 | @property (readonly,nonatomic) NSDate *expiration; 14 | 15 | +(instancetype)LISDKAccessTokenWithValue:(NSString*)value expiresOnMillis:(long long)expiresOnMillis; 16 | 17 | /** 18 | create by passing in a serialized access token obtained by calling serializedString 19 | */ 20 | +(instancetype)LISDKAccessTokenWithSerializedString:(NSString *)serString; 21 | 22 | -(NSString *)serializedString; 23 | 24 | @end 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/Headers/LISDKCallbackHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKCallbackHandler.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKCallbackHandler_h 8 | #define LISDKCallbackHandler_h 9 | 10 | @class UIApplication; 11 | 12 | @interface LISDKCallbackHandler : NSObject 13 | 14 | /** 15 | call this from application:openURL:sourceApplication:annotation: in AppDelegate to check if the callback can be handled by LinkedIn SDK. 16 | */ 17 | + (BOOL)shouldHandleUrl:(NSURL *)url; 18 | 19 | /** 20 | call this from application:openURL:sourceApplication:annotation: in AppDelegate in order to properly handle the callbacks. This must be called only if shouldHandleUrl: returns YES. 21 | */ 22 | + (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; 23 | 24 | @end 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/Headers/LISDKDeeplinkHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKDeeplinkHelper.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKDeeplinkHelper_h 8 | #define LISDKDeeplinkHelper_h 9 | 10 | @class UIApplication; 11 | 12 | /** 13 | This class is used to view member profiles in the LinkedIn native app. 14 | Calls should only be made once a valid session has been established. 15 | A typical use might be: 16 | 17 | if ([LISDKSessionManager hasValidSession]) { 18 | [[LISDKDeeplinkHelper sharedInstance] viewOtherProfile:@"x1y2z3abc" 19 | WithState:@"some state" 20 | success:^(NSString *) { 21 | // do something on success 22 | } 23 | error:^(NSError *deeplinkError, NSString *) { 24 | // do something with error 25 | }]; 26 | } 27 | */ 28 | typedef void (^DeeplinkSuccessBlock)(NSString *returnedState); 29 | typedef void (^DeeplinkErrorBlock)(NSError *error, NSString *returnedState); 30 | 31 | @interface LISDKDeeplinkHelper : NSObject 32 | 33 | /** 34 | access to singleton 35 | */ 36 | + (instancetype)sharedInstance; 37 | 38 | 39 | - (void)viewCurrentProfileWithState:(NSString *)state 40 | showGoToAppStoreDialog:(BOOL)showDialog 41 | success:(DeeplinkSuccessBlock)success 42 | error:(DeeplinkErrorBlock)error; 43 | 44 | - (void)viewOtherProfile:(NSString *)memberId 45 | withState:(NSString *)state 46 | showGoToAppStoreDialog:(BOOL)showDialog 47 | success:(DeeplinkSuccessBlock)success 48 | error:(DeeplinkErrorBlock)error; 49 | 50 | + (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; 51 | 52 | + (BOOL)shouldHandleUrl:(NSURL *)url; 53 | 54 | @end 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/Headers/LISDKErrorCode.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKErrorCode.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKErrorCode_h 8 | #define LISDKErrorCode_h 9 | 10 | #define LISDK_ERROR_API_DOMAIN @"LISDKErrorAPIDomain" 11 | #define LISDK_ERROR_AUTH_DOMAIN @"LISDKErrorAuthDomain" 12 | #define LISDK_ERROR_DEEPLINK_DOMAIN @"LISDKErrorDeepLinkDomain" 13 | 14 | typedef NS_ENUM(int,LISDKErrorCode) { 15 | NONE, 16 | /** 17 | There is something wrong with the request 18 | */ 19 | INVALID_REQUEST, 20 | 21 | /** 22 | Unable to complete request due to a network error 23 | */ 24 | NETWORK_UNAVAILABLE, 25 | 26 | /** 27 | The user cancelled the operation 28 | */ 29 | USER_CANCELLED, 30 | 31 | /** 32 | Unknown error 33 | */ 34 | UNKNOWN_ERROR, 35 | 36 | /** 37 | An error occurred within LinkedIn's 38 | */ 39 | SERVER_ERROR, 40 | 41 | /** 42 | Linkedin App not found on device or the version of the Linkedin App installed does not support the sdk 43 | */ 44 | LINKEDIN_APP_NOT_FOUND, 45 | 46 | /** 47 | The user is not properly authenticated on this device 48 | */ 49 | NOT_AUTHENTICATED 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/Headers/LISDKPermission.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKPermission.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKPermission_h 8 | #define LISDKPermission_h 9 | 10 | /** 11 | @file LISDKPermission.h 12 | list of valid permissions 13 | */ 14 | 15 | /** 16 | @def LISDK_BASIC_PROFILE_PERMISSION permission to retrieve name, photo, headline and current position 17 | */ 18 | #define LISDK_BASIC_PROFILE_PERMISSION @"r_basicprofile" 19 | 20 | /** 21 | LISDK_FULL_PROFILE_PERMISSION permission to retrieve full profile including experience, education, skills and recommendations 22 | This permission is not open to all developers. 23 | */ 24 | #define LISDK_FULL_PROFILE_PERMISSION @"r_fullprofile" 25 | 26 | /** 27 | LISDK_EMAILADDRESS_PERMISSION permission to retrieve email address 28 | */ 29 | #define LISDK_EMAILADDRESS_PERMISSION @"r_emailaddress" 30 | 31 | /** 32 | LISDK_W_SHARE_PERMISSION permission to post updates, make comments and like posts 33 | */ 34 | #define LISDK_W_SHARE_PERMISSION @"w_share" 35 | 36 | /** 37 | LISDK_CONTACT_INFO_PERMISSION permission to retrieve address, phone number, and bound accounts 38 | This permission is not open to all developers. 39 | */ 40 | #define LISDK_CONTACT_INFO_PERMISSION @"r_contactinfo" 41 | 42 | /** 43 | LISDK_RW_COMPANY_ADMIN_PERMISSION permission to edit company pages for which I am an Admin and post status updates on behalf of those companies 44 | */ 45 | #define LISDK_RW_COMPANY_ADMIN_PERMISSION @"rw_company_admin" 46 | 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/Headers/LISDKSession.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISession.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKSession_h 8 | #define LISDKSession_h 9 | 10 | @class LISDKAccessToken; 11 | 12 | /** 13 | class representing a valid LinkedIn session. A valid session means that the LinkedIn member 14 | has granted access to the application to use some of his/her LinkedIn data. 15 | */ 16 | @interface LISDKSession : NSObject 17 | 18 | @property(nonatomic,strong) LISDKAccessToken *accessToken; 19 | 20 | - (BOOL)isValid; 21 | - (NSString *)value; 22 | /* 23 | - (LISDKAccessToken *)getAccessToken; 24 | 25 | - (void)setAccessToken:(LISDKAccessToken *)accessToken; 26 | */ 27 | @end 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/Headers/LISDKSessionManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISessionManager.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | 8 | #ifndef LISDKSessionManager_h 9 | #define LISDKSessionManager_h 10 | 11 | @class LISDKSession; 12 | @class LISDKAuthError; 13 | @class UIApplication; 14 | @class LISDKScope; 15 | @class LISDKAccessToken; 16 | typedef void (^AuthSuccessBlock)(NSString *); 17 | typedef void (^AuthErrorBlock)(NSError *); 18 | 19 | /** 20 | * LISDKSessionManager. 21 | */ 22 | @interface LISDKSessionManager : NSObject 23 | 24 | 25 | + (instancetype)sharedInstance; 26 | 27 | @property (readonly,nonatomic) LISDKSession *session; 28 | 29 | /** 30 | @brief create a session with user authorization if needed. 31 | If the user previously authorized this application, the successBlock will be called and 32 | a valid session created. 33 | If needed, an authorization screen will be shown to the user. 34 | This method will bring the user to the LinkedIn flagship app. The application must 35 | call application:openURL from their AppDelegate:application:openURL in order for the 36 | successBlock and errorBlock completion handlers to be properly called. 37 | By default, sessions are saved in the keychain. 38 | @param permissions NSArray of permissions strings. For valid values see LISDKPermission.h 39 | @param showGoToAppStoreDialog YES if you want an alert to prompt the user to go to the App Store if the LinkedIn App is not installed. If NO, no alert will be shown and the user will be taken to the App Store directly. 40 | */ 41 | + (void)createSessionWithAuth:(NSArray *)permissions state:(NSString *)state showGoToAppStoreDialog:(BOOL)showDialog successBlock:(AuthSuccessBlock)successBlock errorBlock:(AuthErrorBlock)erroBlock; 42 | 43 | + (void)createSessionWithAccessToken:(LISDKAccessToken *)accessToken; 44 | 45 | /** 46 | call to clear any open session. Any saved session will also be cleared. 47 | */ 48 | + (void)clearSession; 49 | 50 | /** 51 | @return YES if session has been properly created. 52 | */ 53 | + (BOOL)hasValidSession; 54 | 55 | /** 56 | call this from AppDelegate:application:openURL in order to properly handle the authorization 57 | sequence 58 | @return YES if the url was handled 59 | */ 60 | + (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; 61 | 62 | /** 63 | call this within AppDelegate:application:openURL to determine whether or not to call 64 | this methods application:openURL method 65 | @return YES if the url is one that should be handled by the LinkedIn SDK 66 | */ 67 | + (BOOL)shouldHandleUrl:(NSURL *)url; 68 | 69 | @end 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/linkedin-sdk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/A/linkedin-sdk -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/Headers/LISDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDK.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDK_h 8 | #define LISDK_h 9 | 10 | /** 11 | file for application to include to interact with LinkedIn SDK for ios. 12 | 13 | A typical usage flow might be: 14 | 15 | 1. use LISDKSessionManager to initialize a linkedin session if it is not already valid. 16 | This will ask the user to authorize the application to use his/her linkedin data. 17 | 18 | if (! [LISDKSessionManager hasValidSession] ) { 19 | [LISDKSessionManager createSessionWithAuthorize:[NSArray arrayWithObjects:LISDK_BASIC_PROFILE_PERMISSION, LISDK_EMAILADDRESS_PERMISSION, nil] 20 | state:@"some state" 21 | showGoToAppStoreDialog:NO 22 | successBlock:^(NSString *returnState) { 23 | } 24 | errorBlock:^(NSError *error) { 25 | }]; 26 | } 27 | 28 | 2. use LISDKAPIHelper or LISDKDeeplinkHelper to make API calls or to perform deep link operations 29 | 30 | */ 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/Headers/LISDKAPIError.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKAPIError.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | /** 8 | LISDKAPIError - Error sent when a LinkedIn api call returns an error response. 9 | This class extends NSError to allow easy access to the LISDKAPIResponse object 10 | */ 11 | #ifndef LISDKAPIError_h 12 | #define LISDKAPIError_h 13 | 14 | #define LISDKAuthErrorAPIResponse @"LISDKAuthErrorAPIResponse" 15 | 16 | @class LISDKAPIResponse; 17 | 18 | @interface LISDKAPIError : NSError 19 | 20 | /** 21 | returns the LISDKAPIResponse object associated with the API error 22 | */ 23 | - (LISDKAPIResponse *)errorResponse; 24 | 25 | /** 26 | create LISDKAPIError object with the given LISDKAPIResponse object 27 | */ 28 | + (id)errorWithApiResponse:(LISDKAPIResponse *)response; 29 | 30 | /** 31 | create LISDKAPIError object with the given NSError object 32 | */ 33 | + (id)errorWithError:(NSError *)error; 34 | 35 | @end 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/Headers/LISDKAPIHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKApiHelper.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKApiHelper_h 8 | #define LISDKApiHelper_h 9 | 10 | @class LISDKAPIResponse; 11 | @class LISDKAPIError; 12 | 13 | 14 | typedef void (^APISuccessBlock)(LISDKAPIResponse *); 15 | typedef void (^APIErrorBlock)(LISDKAPIResponse *, NSError *); 16 | 17 | #define LINKEDIN_API_URL @"https://api.linkedin.com/v1" 18 | 19 | /** 20 | This class is used to make API Requests to retrieve LinkedIn data. 21 | Calls should only be made once a valid session has been established. 22 | A typical use might be: 23 | 24 | if ([LISDKSessionManager hasValidSession]) { 25 | [[LISDKAPIHelper sharedInstance] getRequest:[NSString stringWithFormat:@"%@/people/~",LINKEDIN_API_URL] 26 | success:^(LISDKAPIResponse *response) { 27 | // do something with response 28 | } 29 | error:^(LISDKAPIError *apiError) { 30 | // do something with error 31 | }]; 32 | ] 33 | } 34 | 35 | */ 36 | @interface LISDKAPIHelper : NSObject 37 | /** 38 | access to singleton 39 | */ 40 | + (instancetype)sharedInstance; 41 | 42 | 43 | - (void)getRequest:(NSString *)url 44 | success:(void(^)(LISDKAPIResponse *))success 45 | error:(void(^)(LISDKAPIError *))error; 46 | 47 | - (void)deleteRequest:(NSString *)url 48 | success:(void(^)(LISDKAPIResponse *))successCompletion 49 | error:(void(^)(LISDKAPIError *))errorCompletion; 50 | 51 | - (void)putRequest:(NSString *)url 52 | body:(NSData *)body 53 | success:(void(^)(LISDKAPIResponse *))successCompletion 54 | error:(void(^)(LISDKAPIError *))errorCompletion; 55 | 56 | - (void)putRequest:(NSString *)url 57 | stringBody:(NSString *)stringBody 58 | success:(void(^)(LISDKAPIResponse *))successCompletion 59 | error:(void(^)(LISDKAPIError *))errorCompletion; 60 | 61 | - (void)postRequest:(NSString *)url 62 | body:(NSData *)body 63 | success:(void(^)(LISDKAPIResponse *))successCompletion 64 | error:(void(^)(LISDKAPIError *))errorCompletion; 65 | 66 | - (void)postRequest:(NSString *)url 67 | stringBody:(NSString *)stringBody 68 | success:(void(^)(LISDKAPIResponse *))successCompletion 69 | error:(void(^)(LISDKAPIError *))errorCompletion; 70 | 71 | // do we want to expose this one? 72 | - (void)apiRequest:(NSString *)url 73 | method:(NSString *)method 74 | body:(NSData *)body 75 | success:(void(^)(LISDKAPIResponse *))successCompletion 76 | error:(void(^)(LISDKAPIError *))errorCompletion; 77 | 78 | /** 79 | cancel any in process api calls 80 | */ 81 | - (void)cancelCalls; 82 | 83 | @end 84 | 85 | #endif 86 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/Headers/LISDKAPIResponse.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKAPIResponse.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKAPIResponse_h 8 | #define LISDKAPIResponse_h 9 | 10 | /** 11 | Response from an API call 12 | */ 13 | @interface LISDKAPIResponse : NSObject 14 | @property (readonly,nonatomic) NSString *data; 15 | @property (readonly,nonatomic) int statusCode; 16 | @property (readonly,nonatomic) NSDictionary *headers; 17 | 18 | 19 | - (id)initWithData:(NSString *)data headers:(NSDictionary *)headers statusCode:(int)statusCode; 20 | @end 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/Headers/LISDKAccessToken.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKAccessToken.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKAccessToken_h 8 | #define LISDKAccessToken_h 9 | 10 | @interface LISDKAccessToken : NSObject 11 | 12 | @property (readonly,nonatomic) NSString *accessTokenValue; 13 | @property (readonly,nonatomic) NSDate *expiration; 14 | 15 | +(instancetype)LISDKAccessTokenWithValue:(NSString*)value expiresOnMillis:(long long)expiresOnMillis; 16 | 17 | /** 18 | create by passing in a serialized access token obtained by calling serializedString 19 | */ 20 | +(instancetype)LISDKAccessTokenWithSerializedString:(NSString *)serString; 21 | 22 | -(NSString *)serializedString; 23 | 24 | @end 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/Headers/LISDKCallbackHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKCallbackHandler.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKCallbackHandler_h 8 | #define LISDKCallbackHandler_h 9 | 10 | @class UIApplication; 11 | 12 | @interface LISDKCallbackHandler : NSObject 13 | 14 | /** 15 | call this from application:openURL:sourceApplication:annotation: in AppDelegate to check if the callback can be handled by LinkedIn SDK. 16 | */ 17 | + (BOOL)shouldHandleUrl:(NSURL *)url; 18 | 19 | /** 20 | call this from application:openURL:sourceApplication:annotation: in AppDelegate in order to properly handle the callbacks. This must be called only if shouldHandleUrl: returns YES. 21 | */ 22 | + (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; 23 | 24 | @end 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/Headers/LISDKDeeplinkHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKDeeplinkHelper.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKDeeplinkHelper_h 8 | #define LISDKDeeplinkHelper_h 9 | 10 | @class UIApplication; 11 | 12 | /** 13 | This class is used to view member profiles in the LinkedIn native app. 14 | Calls should only be made once a valid session has been established. 15 | A typical use might be: 16 | 17 | if ([LISDKSessionManager hasValidSession]) { 18 | [[LISDKDeeplinkHelper sharedInstance] viewOtherProfile:@"x1y2z3abc" 19 | WithState:@"some state" 20 | success:^(NSString *) { 21 | // do something on success 22 | } 23 | error:^(NSError *deeplinkError, NSString *) { 24 | // do something with error 25 | }]; 26 | } 27 | */ 28 | typedef void (^DeeplinkSuccessBlock)(NSString *returnedState); 29 | typedef void (^DeeplinkErrorBlock)(NSError *error, NSString *returnedState); 30 | 31 | @interface LISDKDeeplinkHelper : NSObject 32 | 33 | /** 34 | access to singleton 35 | */ 36 | + (instancetype)sharedInstance; 37 | 38 | 39 | - (void)viewCurrentProfileWithState:(NSString *)state 40 | showGoToAppStoreDialog:(BOOL)showDialog 41 | success:(DeeplinkSuccessBlock)success 42 | error:(DeeplinkErrorBlock)error; 43 | 44 | - (void)viewOtherProfile:(NSString *)memberId 45 | withState:(NSString *)state 46 | showGoToAppStoreDialog:(BOOL)showDialog 47 | success:(DeeplinkSuccessBlock)success 48 | error:(DeeplinkErrorBlock)error; 49 | 50 | + (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; 51 | 52 | + (BOOL)shouldHandleUrl:(NSURL *)url; 53 | 54 | @end 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/Headers/LISDKErrorCode.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKErrorCode.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKErrorCode_h 8 | #define LISDKErrorCode_h 9 | 10 | #define LISDK_ERROR_API_DOMAIN @"LISDKErrorAPIDomain" 11 | #define LISDK_ERROR_AUTH_DOMAIN @"LISDKErrorAuthDomain" 12 | #define LISDK_ERROR_DEEPLINK_DOMAIN @"LISDKErrorDeepLinkDomain" 13 | 14 | typedef NS_ENUM(int,LISDKErrorCode) { 15 | NONE, 16 | /** 17 | There is something wrong with the request 18 | */ 19 | INVALID_REQUEST, 20 | 21 | /** 22 | Unable to complete request due to a network error 23 | */ 24 | NETWORK_UNAVAILABLE, 25 | 26 | /** 27 | The user cancelled the operation 28 | */ 29 | USER_CANCELLED, 30 | 31 | /** 32 | Unknown error 33 | */ 34 | UNKNOWN_ERROR, 35 | 36 | /** 37 | An error occurred within LinkedIn's 38 | */ 39 | SERVER_ERROR, 40 | 41 | /** 42 | Linkedin App not found on device or the version of the Linkedin App installed does not support the sdk 43 | */ 44 | LINKEDIN_APP_NOT_FOUND, 45 | 46 | /** 47 | The user is not properly authenticated on this device 48 | */ 49 | NOT_AUTHENTICATED 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/Headers/LISDKPermission.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISDKPermission.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKPermission_h 8 | #define LISDKPermission_h 9 | 10 | /** 11 | @file LISDKPermission.h 12 | list of valid permissions 13 | */ 14 | 15 | /** 16 | @def LISDK_BASIC_PROFILE_PERMISSION permission to retrieve name, photo, headline and current position 17 | */ 18 | #define LISDK_BASIC_PROFILE_PERMISSION @"r_basicprofile" 19 | 20 | /** 21 | LISDK_FULL_PROFILE_PERMISSION permission to retrieve full profile including experience, education, skills and recommendations 22 | This permission is not open to all developers. 23 | */ 24 | #define LISDK_FULL_PROFILE_PERMISSION @"r_fullprofile" 25 | 26 | /** 27 | LISDK_EMAILADDRESS_PERMISSION permission to retrieve email address 28 | */ 29 | #define LISDK_EMAILADDRESS_PERMISSION @"r_emailaddress" 30 | 31 | /** 32 | LISDK_W_SHARE_PERMISSION permission to post updates, make comments and like posts 33 | */ 34 | #define LISDK_W_SHARE_PERMISSION @"w_share" 35 | 36 | /** 37 | LISDK_CONTACT_INFO_PERMISSION permission to retrieve address, phone number, and bound accounts 38 | This permission is not open to all developers. 39 | */ 40 | #define LISDK_CONTACT_INFO_PERMISSION @"r_contactinfo" 41 | 42 | /** 43 | LISDK_RW_COMPANY_ADMIN_PERMISSION permission to edit company pages for which I am an Admin and post status updates on behalf of those companies 44 | */ 45 | #define LISDK_RW_COMPANY_ADMIN_PERMISSION @"rw_company_admin" 46 | 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/Headers/LISDKSession.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISession.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | #ifndef LISDKSession_h 8 | #define LISDKSession_h 9 | 10 | @class LISDKAccessToken; 11 | 12 | /** 13 | class representing a valid LinkedIn session. A valid session means that the LinkedIn member 14 | has granted access to the application to use some of his/her LinkedIn data. 15 | */ 16 | @interface LISDKSession : NSObject 17 | 18 | @property(nonatomic,strong) LISDKAccessToken *accessToken; 19 | 20 | - (BOOL)isValid; 21 | - (NSString *)value; 22 | /* 23 | - (LISDKAccessToken *)getAccessToken; 24 | 25 | - (void)setAccessToken:(LISDKAccessToken *)accessToken; 26 | */ 27 | @end 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/Headers/LISDKSessionManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // LISessionManager.h 3 | // 4 | // Copyright (c) 2015 linkedin. All rights reserved. 5 | // 6 | 7 | 8 | #ifndef LISDKSessionManager_h 9 | #define LISDKSessionManager_h 10 | 11 | @class LISDKSession; 12 | @class LISDKAuthError; 13 | @class UIApplication; 14 | @class LISDKScope; 15 | @class LISDKAccessToken; 16 | typedef void (^AuthSuccessBlock)(NSString *); 17 | typedef void (^AuthErrorBlock)(NSError *); 18 | 19 | /** 20 | * LISDKSessionManager. 21 | */ 22 | @interface LISDKSessionManager : NSObject 23 | 24 | 25 | + (instancetype)sharedInstance; 26 | 27 | @property (readonly,nonatomic) LISDKSession *session; 28 | 29 | /** 30 | @brief create a session with user authorization if needed. 31 | If the user previously authorized this application, the successBlock will be called and 32 | a valid session created. 33 | If needed, an authorization screen will be shown to the user. 34 | This method will bring the user to the LinkedIn flagship app. The application must 35 | call application:openURL from their AppDelegate:application:openURL in order for the 36 | successBlock and errorBlock completion handlers to be properly called. 37 | By default, sessions are saved in the keychain. 38 | @param permissions NSArray of permissions strings. For valid values see LISDKPermission.h 39 | @param showGoToAppStoreDialog YES if you want an alert to prompt the user to go to the App Store if the LinkedIn App is not installed. If NO, no alert will be shown and the user will be taken to the App Store directly. 40 | */ 41 | + (void)createSessionWithAuth:(NSArray *)permissions state:(NSString *)state showGoToAppStoreDialog:(BOOL)showDialog successBlock:(AuthSuccessBlock)successBlock errorBlock:(AuthErrorBlock)erroBlock; 42 | 43 | + (void)createSessionWithAccessToken:(LISDKAccessToken *)accessToken; 44 | 45 | /** 46 | call to clear any open session. Any saved session will also be cleared. 47 | */ 48 | + (void)clearSession; 49 | 50 | /** 51 | @return YES if session has been properly created. 52 | */ 53 | + (BOOL)hasValidSession; 54 | 55 | /** 56 | call this from AppDelegate:application:openURL in order to properly handle the authorization 57 | sequence 58 | @return YES if the url was handled 59 | */ 60 | + (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; 61 | 62 | /** 63 | call this within AppDelegate:application:openURL to determine whether or not to call 64 | this methods application:openURL method 65 | @return YES if the url is one that should be handled by the LinkedIn SDK 66 | */ 67 | + (BOOL)shouldHandleUrl:(NSURL *)url; 68 | 69 | @end 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/linkedin-sdk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/Versions/Current/linkedin-sdk -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/linkedin-sdk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joonhocho/react-native-linkedin-sdk/01a848db86de9195a7571e4b75d76db6c0864ff9/ExampleApp/ios/Pods/LinkedinSwift/linkedin-sdk.framework/linkedin-sdk -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (3.1.0): 3 | - AFNetworking/NSURLSession (= 3.1.0) 4 | - AFNetworking/Reachability (= 3.1.0) 5 | - AFNetworking/Security (= 3.1.0) 6 | - AFNetworking/Serialization (= 3.1.0) 7 | - AFNetworking/UIKit (= 3.1.0) 8 | - AFNetworking/NSURLSession (3.1.0): 9 | - AFNetworking/Reachability 10 | - AFNetworking/Security 11 | - AFNetworking/Serialization 12 | - AFNetworking/Reachability (3.1.0) 13 | - AFNetworking/Security (3.1.0) 14 | - AFNetworking/Serialization (3.1.0) 15 | - AFNetworking/UIKit (3.1.0): 16 | - AFNetworking/NSURLSession 17 | - IOSLinkedInAPIFix (2.0.4): 18 | - AFNetworking (>= 2.0.0) 19 | - LinkedinSwift (1.6.6): 20 | - AFNetworking (>= 2.6.3) 21 | - IOSLinkedInAPIFix (>= 2.0.3) 22 | 23 | DEPENDENCIES: 24 | - LinkedinSwift (~> 1.6.6) 25 | 26 | SPEC CHECKSUMS: 27 | AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 28 | IOSLinkedInAPIFix: a520fd805a03dade35f42904c7d89ded2a84c752 29 | LinkedinSwift: cda2916f08950f662fbec33176dc38aefc5b4c2c 30 | 31 | PODFILE CHECKSUM: d37dde0a3cfe6fc64d47844a391c7debfc605d0e 32 | 33 | COCOAPODS: 1.1.1 34 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AFNetworking : NSObject 3 | @end 4 | @implementation PodsDummy_AFNetworking 5 | @end 6 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #ifndef TARGET_OS_IOS 6 | #define TARGET_OS_IOS TARGET_OS_IPHONE 7 | #endif 8 | 9 | #ifndef TARGET_OS_WATCH 10 | #define TARGET_OS_WATCH 0 11 | #endif 12 | 13 | #ifndef TARGET_OS_TV 14 | #define TARGET_OS_TV 0 15 | #endif 16 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AFNetworking 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/IOSLinkedInAPIFix" "${PODS_ROOT}/Headers/Public/LinkedinSwift" 4 | OTHER_LDFLAGS = -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/IOSLinkedInAPIFix/IOSLinkedInAPIFix-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_IOSLinkedInAPIFix : NSObject 3 | @end 4 | @implementation PodsDummy_IOSLinkedInAPIFix 5 | @end 6 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/IOSLinkedInAPIFix/IOSLinkedInAPIFix-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/IOSLinkedInAPIFix/IOSLinkedInAPIFix.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/IOSLinkedInAPIFix 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/IOSLinkedInAPIFix" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/IOSLinkedInAPIFix" "${PODS_ROOT}/Headers/Public/LinkedinSwift" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/LinkedinSwift/LinkedinSwift-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_LinkedinSwift : NSObject 3 | @end 4 | @implementation PodsDummy_LinkedinSwift 5 | @end 6 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/LinkedinSwift/LinkedinSwift-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/LinkedinSwift/LinkedinSwift.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/LinkedinSwift 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/LinkedinSwift" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/LinkedinSwift" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/IOSLinkedInAPIFix" "${PODS_ROOT}/Headers/Public/LinkedinSwift" 5 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/IOSLinkedInAPIFix" 6 | OTHER_LDFLAGS = -framework "linkedin-sdk" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/Pods-ExampleApp/Pods-ExampleApp-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AFNetworking 5 | 6 | Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/) 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | ## IOSLinkedInAPIFix 28 | 29 | Copyright (c) 2013 Ancientprogramming (http://www.ancientprogramming.com/) 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a copy 32 | of this software and associated documentation files (the "Software"), to deal 33 | in the Software without restriction, including without limitation the rights 34 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 35 | copies of the Software, and to permit persons to whom the Software is 36 | furnished to do so, subject to the following conditions: 37 | 38 | The above copyright notice and this permission notice shall be included in 39 | all copies or substantial portions of the Software. 40 | 41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 44 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 46 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 47 | THE SOFTWARE. 48 | 49 | 50 | ## LinkedinSwift 51 | 52 | The MIT License (MIT) 53 | Copyright (c) 2015 Li 54 | 55 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 56 | 57 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 58 | 59 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 60 | 61 | Generated by CocoaPods - https://cocoapods.org 62 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/Pods-ExampleApp/Pods-ExampleApp-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ExampleApp : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ExampleApp 5 | @end 6 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/Pods-ExampleApp/Pods-ExampleApp-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/Pods-ExampleApp/Pods-ExampleApp.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/LinkedinSwift" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/IOSLinkedInAPIFix" "${PODS_ROOT}/Headers/Public/LinkedinSwift" 5 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/IOSLinkedInAPIFix" "$PODS_CONFIGURATION_BUILD_DIR/LinkedinSwift" 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/IOSLinkedInAPIFix" -isystem "${PODS_ROOT}/Headers/Public/LinkedinSwift" 7 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"IOSLinkedInAPIFix" -l"LinkedinSwift" -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "linkedin-sdk" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/Pods-ExampleApp/Pods-ExampleApp.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/LinkedinSwift" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/IOSLinkedInAPIFix" "${PODS_ROOT}/Headers/Public/LinkedinSwift" 5 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/IOSLinkedInAPIFix" "$PODS_CONFIGURATION_BUILD_DIR/LinkedinSwift" 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/IOSLinkedInAPIFix" -isystem "${PODS_ROOT}/Headers/Public/LinkedinSwift" 7 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"IOSLinkedInAPIFix" -l"LinkedinSwift" -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -framework "linkedin-sdk" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/Pods-ExampleAppTests/Pods-ExampleAppTests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/Pods-ExampleAppTests/Pods-ExampleAppTests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/Pods-ExampleAppTests/Pods-ExampleAppTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ExampleAppTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ExampleAppTests 5 | @end 6 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/Pods-ExampleAppTests/Pods-ExampleAppTests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/Pods-ExampleAppTests/Pods-ExampleAppTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/IOSLinkedInAPIFix" "${PODS_ROOT}/Headers/Public/LinkedinSwift" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/IOSLinkedInAPIFix" "$PODS_CONFIGURATION_BUILD_DIR/LinkedinSwift" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/IOSLinkedInAPIFix" -isystem "${PODS_ROOT}/Headers/Public/LinkedinSwift" 6 | OTHER_LDFLAGS = $(inherited) -ObjC 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /ExampleApp/ios/Pods/Target Support Files/Pods-ExampleAppTests/Pods-ExampleAppTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/IOSLinkedInAPIFix" "${PODS_ROOT}/Headers/Public/LinkedinSwift" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/IOSLinkedInAPIFix" "$PODS_CONFIGURATION_BUILD_DIR/LinkedinSwift" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/IOSLinkedInAPIFix" -isystem "${PODS_ROOT}/Headers/Public/LinkedinSwift" 6 | OTHER_LDFLAGS = $(inherited) -ObjC 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /ExampleApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ExampleApp", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node node_modules/react-native/local-cli/cli.js start", 7 | "test": "jest" 8 | }, 9 | "dependencies": { 10 | "react": "15.4.2", 11 | "react-native": "0.40.0", 12 | "react-native-linkedin-sdk": "0.0.2" 13 | }, 14 | "devDependencies": { 15 | "babel-jest": "18.0.0", 16 | "babel-preset-react-native": "1.9.1", 17 | "jest": "18.1.0", 18 | "react-test-renderer": "15.4.2" 19 | }, 20 | "jest": { 21 | "preset": "react-native" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Joon Ho Cho 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.1" 6 | 7 | defaultConfig { 8 | minSdkVersion 16 9 | targetSdkVersion 22 10 | versionCode 1 11 | versionName "1.0" 12 | ndk { 13 | abiFilters "armeabi-v7a", "x86" 14 | } 15 | } 16 | 17 | lintOptions { 18 | abortOnError false 19 | } 20 | } 21 | 22 | dependencies { 23 | compile project(':linkedin-sdk') 24 | compile "com.facebook.react:react-native:+" 25 | } 26 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactlibrary/linkedinsdk/RNLinkedInSessionManagerPackage.java: -------------------------------------------------------------------------------- 1 | package com.reactlibrary.linkedinsdk; 2 | 3 | 4 | import com.facebook.react.ReactPackage; 5 | import com.facebook.react.bridge.JavaScriptModule; 6 | import com.facebook.react.bridge.NativeModule; 7 | import com.facebook.react.bridge.ReactApplicationContext; 8 | import com.facebook.react.uimanager.ViewManager; 9 | import java.util.Arrays; 10 | import java.util.Collections; 11 | import java.util.List; 12 | 13 | 14 | public class RNLinkedInSessionManagerPackage implements ReactPackage { 15 | @Override 16 | public List createNativeModules(ReactApplicationContext reactContext) { 17 | return Arrays.asList(new RNLinkedInSessionManagerModule(reactContext)); 18 | } 19 | 20 | // Deprecated RN 0.47 21 | public List> createJSModules() { 22 | return Collections.emptyList(); 23 | } 24 | 25 | @Override 26 | public List createViewManagers(ReactApplicationContext reactContext) { 27 | return Collections.emptyList(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./js/LinkedInSessionManager'); 2 | -------------------------------------------------------------------------------- /ios/RNLinkedInSessionManager.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 9 | 10 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ios/RNLinkedInSessionManager/RNLinkedInSessionManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RNLinkedInSignIn.swift 3 | // DropCard 4 | // 5 | // Created by Joon Ho Cho on 1/18/17. 6 | // Copyright © 2017 Facebook. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | @objc(RNLinkedInSessionManager) 12 | class RNLinkedInSessionManager: NSObject { 13 | 14 | static let sharedInstance = RNLinkedInSessionManager() 15 | 16 | var linkedinHelper: LinkedinSwiftHelper? 17 | 18 | @objc func configure(_ config: [String: Any]) { 19 | let clientID = config["clientID"] as! String 20 | let clientSecret = config["clientSecret"] as! String 21 | let state = config["state"] as! String 22 | let scopes = config["scopes"] as! [String] 23 | let redirectUri = config["redirectUri"] as! String 24 | 25 | linkedinHelper = LinkedinSwiftHelper(configuration: 26 | LinkedinSwiftConfiguration( 27 | clientId: clientID, 28 | clientSecret: clientSecret, 29 | state: state, 30 | permissions: scopes, 31 | redirectUrl: redirectUri 32 | ) 33 | ) 34 | } 35 | 36 | @objc func authorize(_ resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { 37 | if let linkedinHelper = linkedinHelper { 38 | DispatchQueue.main.async { 39 | linkedinHelper.authorizeSuccess({ (lsToken) in 40 | // Delay is necessary as ViewController is closing. 41 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { 42 | resolve(RNLinkedInSessionManager.tokenToJSON(lsToken)) 43 | } 44 | }, error: { (error) in 45 | reject("authorizeSuccessError", error.localizedDescription, error) 46 | }, cancel: { 47 | reject("authorizeSuccessCancel", "", nil) 48 | }) 49 | } 50 | } else { 51 | reject("uninitialized", "call configure first", nil) 52 | } 53 | } 54 | 55 | static func tokenToJSON(_ token: LSLinkedinToken?) -> [String: Any]? { 56 | if let token = token { 57 | var body: [String: Any] = [:] 58 | 59 | if let accessToken = token.accessToken { 60 | body["accessToken"] = accessToken 61 | } 62 | 63 | if let expiration = token.expireDate { 64 | body["expiresOn"] = expiration.timeIntervalSince1970 65 | } 66 | 67 | body["fromMobileSDK"] = token.isFromMobileSDK 68 | 69 | return body 70 | } else { 71 | return nil 72 | } 73 | } 74 | 75 | @objc func getRequest(_ url: NSString, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { 76 | if let linkedinHelper = linkedinHelper { 77 | linkedinHelper.requestURL( 78 | url as String, 79 | requestType: LinkedinSwiftRequestGet, 80 | success: { (response) in 81 | resolve([ 82 | "status": response.statusCode, 83 | "data": response.jsonObject, 84 | ]) 85 | }, 86 | error: { (error) in 87 | reject("error", "", error) 88 | }) 89 | } else { 90 | reject("uninitialized", "call configure first", nil) 91 | } 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /ios/RNLinkedInSessionManager/RNLinkedInSessionManagerBridge.m: -------------------------------------------------------------------------------- 1 | // 2 | // RNLinkedInSessionManagerBridge.m 3 | // DropCard 4 | // 5 | // Created by Joon Ho Cho on 1/18/17. 6 | // Copyright © 2017 Facebook. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface RCT_EXTERN_MODULE(RNLinkedInSessionManager, NSObject) 15 | 16 | RCT_EXTERN_METHOD(configure:(NSDictionary *)config); 17 | RCT_EXTERN_METHOD(authorize: 18 | (RCTPromiseResolveBlock)resolve 19 | reject:(RCTPromiseRejectBlock)reject); 20 | RCT_EXTERN_METHOD(getRequest:(NSString *)url 21 | resolve:(RCTPromiseResolveBlock)resolve 22 | reject:(RCTPromiseRejectBlock)reject); 23 | 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /js/LinkedInSessionManager.android.js: -------------------------------------------------------------------------------- 1 | const ReactNative = require('react-native'); 2 | 3 | const { 4 | NativeModules, 5 | } = ReactNative; 6 | 7 | 8 | const { 9 | RNLinkedInSessionManager, 10 | } = NativeModules; 11 | 12 | 13 | const LinkedInSDK = { 14 | initSession(config) { 15 | return RNLinkedInSessionManager.initSession(config); 16 | }, 17 | signIn(config) { 18 | return LinkedInSDK.initSession(config) 19 | .then(LinkedInSDK.normalizeToken); 20 | }, 21 | normalizeToken({expiresOn, ...token}) { 22 | return { 23 | expiresOn: new Date(expiresOn), 24 | ...token, 25 | }; 26 | }, 27 | getRequest(url) { 28 | return RNLinkedInSessionManager.getRequest(url) 29 | .then(({ 30 | status, 31 | data, 32 | }) => ({ 33 | status, 34 | data: JSON.parse(data), 35 | })); 36 | }, 37 | }; 38 | 39 | module.exports = LinkedInSDK; 40 | -------------------------------------------------------------------------------- /js/LinkedInSessionManager.ios.js: -------------------------------------------------------------------------------- 1 | const ReactNative = require('react-native'); 2 | 3 | const { 4 | NativeModules, 5 | } = ReactNative; 6 | 7 | 8 | const { 9 | RNLinkedInSessionManager, 10 | } = NativeModules; 11 | 12 | 13 | const LinkedInSDK = { 14 | configure(config) { 15 | return RNLinkedInSessionManager.configure(config); 16 | }, 17 | authorize() { 18 | return RNLinkedInSessionManager.authorize(); 19 | }, 20 | signIn(config) { 21 | LinkedInSDK.configure(config); 22 | return LinkedInSDK.authorize() 23 | .then(LinkedInSDK.normalizeToken); 24 | }, 25 | normalizeToken({expiresOn, ...token}) { 26 | return { 27 | expiresOn: new Date(expiresOn * 1000), 28 | ...token, 29 | }; 30 | }, 31 | getRequest(url) { 32 | return RNLinkedInSessionManager.getRequest(url); 33 | }, 34 | }; 35 | 36 | module.exports = LinkedInSDK; 37 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "name": "react-native-linkedin-sdk", 4 | "version": "0.0.9", 5 | "description": "React Native Wrapper for Latest LinkedIn Mobile SDK for Sign-In / Auth and API Access", 6 | "main": "index.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "https://github.com/joonhocho/react-native-linkedin-sdk.git" 13 | }, 14 | "keywords": [ 15 | "react-native", 16 | "react", 17 | "native", 18 | "linkedin", 19 | "signin", 20 | "login", 21 | "oauth", 22 | "sdk", 23 | "api", 24 | "wrapper", 25 | "ios", 26 | "android" 27 | ], 28 | "author": "Joon Ho Cho ", 29 | "license": "MIT", 30 | "bugs": { 31 | "url": "https://github.com/joonhocho/react-native-linkedin-sdk/issues" 32 | }, 33 | "homepage": "https://github.com/joonhocho/react-native-linkedin-sdk#readme" 34 | } 35 | --------------------------------------------------------------------------------