diff --git a/BUCK b/BUCK new file mode 100644 index 00000000..9442f7d0 --- /dev/null +++ b/BUCK @@ -0,0 +1,21 @@ +include_defs("xplat//js/JS_DEFS") + +js_library( + name = "react-native-fbsdk", + srcs = js_glob( + [ + "**/*", + ], + excludes = [ + "bin/ios_setup.js", + ], + ), + visibility = ["PUBLIC"], + worker = "xplat//js:experimental-packager", + deps = [ + "xplat//js:node_modules", + "xplat//js:react-native", + "xplat//js:react-native-RNTester", + "xplat//js:react-native-addons-node_modules", + ], +) diff --git a/android/build.gradle b/android/build.gradle index 12c6b22e..c7b15990 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,7 +6,7 @@ android { defaultConfig { minSdkVersion 16 - targetSdkVersion 23 + targetSdkVersion 25 } buildTypes { release { @@ -19,5 +19,5 @@ android { dependencies { compile 'com.android.support:appcompat-v7:25.0.0' compile 'com.facebook.react:react-native:+' // support react-native-v0.22-rc+ - compile('com.facebook.android:facebook-android-sdk:4.22.1') + compile('com.facebook.android:facebook-android-sdk:4.+') } diff --git a/android/src/main/java/com/facebook/reactnative/androidsdk/FBAppEventsLoggerModule.java b/android/src/main/java/com/facebook/reactnative/androidsdk/FBAppEventsLoggerModule.java index 4e2ddcfc..c1c34ec5 100644 --- a/android/src/main/java/com/facebook/reactnative/androidsdk/FBAppEventsLoggerModule.java +++ b/android/src/main/java/com/facebook/reactnative/androidsdk/FBAppEventsLoggerModule.java @@ -196,10 +196,45 @@ public void logPushNotificationOpen(@Nullable ReadableMap payload) { * * @param userID A User ID */ - @ReactMethod - public void setUserID(final String userID) { + @ReactMethod + public void setUserID(final String userID) { + mAppEventLogger.setUserID(userID); + } + + /** + * Sets a user id to associate with all app events. This can be used to associate your own + * user id with the app events logged from this instance of an application. + * + * The user ID will be persisted between application instances. + * + * @param userID A User ID or null to reset + */ + @ReactMethod + public void setUserID(@Nullable String userID) { mAppEventLogger.setUserID(userID); - } + } + + /** + * Returns the set user id or null if not set + * + * @return The set User ID or null + */ + @ReactMethod(isBlockingSynchronousMethod = true) + @Nullable + public String getUserID() { + return mAppEventLogger.getUserID(); + } + + /** + * Sends a request to update the properties for the current user, set by + * setUserID. You must call setUserID before making this call. + * + * @param parameters Key-value pairs representing user properties and their values. + */ + @ReactMethod + public void updateUserProperties(ReadableMap parameters) { + mAppEventLogger.updateUserProperties(Arguments.toBundle(parameters), null); + } /** * Explicitly flush any stored events to the server. Implicit flushes may happen depending on diff --git a/android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKPackage.java b/android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKPackage.java index 837e53d5..49496328 100644 --- a/android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKPackage.java +++ b/android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKPackage.java @@ -34,7 +34,7 @@ public class FBSDKPackage implements ReactPackage { - public static final String VERSION_TO_RELEASE = "ReactNative-v0.6.1"; + public static final String VERSION_TO_RELEASE = "ReactNative-v0.6.2"; private CallbackManager mCallbackManager; public FBSDKPackage(CallbackManager callbackManager) { diff --git a/bin/ios_setup.js b/bin/ios_setup.js index 1d6f358b..146337ba 100644 --- a/bin/ios_setup.js +++ b/bin/ios_setup.js @@ -1,150 +1,157 @@ -// Copyright 2004-present Facebook. All Rights Reserved. /* + Copyright 2004-present Facebook. All Rights Reserved. + A node script to help set up FBSDK frameworks for use with https://github.com/facebook/react-native-fbsdk after you have already run `rnpm install react-native-fbsdk`. Note that you need to create a Facebook App in https://developers.facebook.com/ and get the Facebook APP ID and Facebook APP Name in order to set up the Info.plist. - Usage: - 1. add to the package.json of your react-native project the following: + + 1. add to the 'script' section in package.json of your react-native project the following: '"ios:setup": "node ./node_modules/react-native-fbsdk/bin/ios_setup.js"'. 2. do 'npm run ios:setup '. */ -'use strict' +'use strict'; + +/* eslint-disable no-console */ -const fs = require('fs') -const path = require('path') -const plist = require('plist') -const xcode = require('xcode') -const AdmZip = require('adm-zip') -const ProgressBar = require('progress') -const got = require('got') -const fall = require('fastfall')() -const pump = require('pump') +const AdmZip = require('adm-zip'); +const ProgressBar = require('progress'); -const progressBarPattern = ' downloading [:bar] :rate/bps :percent :etas' -const frameworkDir = 'ios/Frameworks/' -const zipFileName = 'fbsdk.zip' -const zipFilePath = path.join(frameworkDir, zipFileName) -const frameworkUrl = 'https://origincache.facebook.com/developers/resources/?id=facebook-ios-sdk-current.zip' +const fall = require('fastfall'); +const fs = require('fs'); +const got = require('got'); +const path = require('path'); +const plist = require('plist'); +const pump = require('pump'); +const xcode = require('xcode'); + +const progressBarPattern = ' downloading [:bar] :rate/bps :percent :etas'; +const frameworkDir = 'ios/Frameworks/'; +const zipFileName = 'fbsdk.zip'; +const zipFilePath = path.join(frameworkDir, zipFileName); +const frameworkUrl = 'https://origincache.facebook.com/developers/resources/?id=facebook-ios-sdk-current.zip'; // Get Facebook App ID and App Name. if (process.argv.length <= 3) { - console.log('Usage: ios_setup.js ') - process.exit(-1) + console.log('Usage: ios_setup.js '); + process.exit(-1); } -const appId = process.argv[2] -const appName = process.argv[3] +const appId = process.argv[2]; +const appName = process.argv[3]; function downloadFbSdk (next) { try { - fs.accessSync(frameworkDir, fs.F_OK) + fs.accessSync(frameworkDir, fs.F_OK); } catch (e) { - fs.mkdirSync(frameworkDir) + fs.mkdirSync(frameworkDir); } - var bar = null + var bar = null; var download = got.stream(frameworkUrl) .on('data', chunk => { - bar.tick(chunk.length) + bar.tick(chunk.length); }) .on('response', res => { - const len = parseInt(res.headers['content-length'], 10) + const len = parseInt(res.headers['content-length'], 10); bar = new ProgressBar(progressBarPattern, { complete: '=', incomplete: ' ', width: 20, - total: len - }) - }) + total: len, + }); + }); - var writeToFile = fs.createWriteStream(zipFilePath) - pump(download, writeToFile, next) + var writeToFile = fs.createWriteStream(zipFilePath); + pump(download, writeToFile, next); } function unzipFramework (next) { - console.log('Unzipping the framework') - const zip = new AdmZip(zipFilePath) - zip.extractAllTo(frameworkDir, true) - fs.unlinkSync(zipFilePath) - console.log('Framework Unzipped!') - next() + console.log('Unzipping the framework'); + const zip = new AdmZip(zipFilePath); + zip.extractAllTo(frameworkDir, true); + fs.unlinkSync(zipFilePath); + console.log('Framework Unzipped!'); + next(); } function correctSearchPaths (next) { - const rctfbsdkProjectPath = './node_modules/react-native-fbsdk/ios/RCTFBSDK.xcodeproj/project.pbxproj' - const rctfbsdkProject = xcode.project(rctfbsdkProjectPath) + const rctfbsdkProjectPath = './node_modules/react-native-fbsdk/ios/RCTFBSDK.xcodeproj/project.pbxproj'; + const rctfbsdkProject = xcode.project(rctfbsdkProjectPath); rctfbsdkProject.parse(function (err) { if (err) { - return next(err) + return next(err); } - rctfbsdkProject.updateBuildProperty('FRAMEWORK_SEARCH_PATHS', '"$(PROJECT_DIR)/../../../ios/Frameworks"') - fs.writeFileSync(rctfbsdkProjectPath, rctfbsdkProject.writeSync()) - console.log('Updated RCTFBSDK FRAMEWORK_SEARCH_PATHS') - next() - }) + rctfbsdkProject.updateBuildProperty('FRAMEWORK_SEARCH_PATHS', '"$(PROJECT_DIR)/../../../ios/Frameworks"'); + fs.writeFileSync(rctfbsdkProjectPath, rctfbsdkProject.writeSync()); + console.log('Updated RCTFBSDK FRAMEWORK_SEARCH_PATHS'); + next(); + }); } function updateFBSDKFrameworks (next) { - const files = fs.readdirSync('./ios/') - var myProjName = files.filter((f) => { return f.substr(-10) === '.xcodeproj' })[0] - const myProjPath = path.join('./ios/', myProjName, '/project.pbxproj') - myProjName = myProjName.replace('.xcodeproj', '') - console.log('Updating target:' + myProjName + ' at ' + myProjPath + ' ...') + const files = fs.readdirSync('./ios/'); + var myProjName = files.filter((f) => { return f.substr(-10) === '.xcodeproj'; })[0]; + const myProjPath = path.join('./ios/', myProjName, '/project.pbxproj'); + myProjName = myProjName.replace('.xcodeproj', ''); + console.log('Updating target:' + myProjName + ' at ' + myProjPath + ' ...'); - const myProj = xcode.project(myProjPath) + const myProj = xcode.project(myProjPath); myProj.parse(function (err) { if (err) { - return next(err) + return next(err); } - myProj.pbxCreateGroup('Frameworks', './ios/Frameworks') + myProj.pbxCreateGroup('Frameworks', './ios/Frameworks'); // NOTE: Assumes first target is the app. - const target = myProj.getFirstTarget().uuid - myProj.addFramework('./ios/Frameworks/FBSDKCoreKit.framework', { 'customFramework': true, 'target': target, 'link': true }) - myProj.addFramework('./ios/Frameworks/FBSDKShareKit.framework', { 'customFramework': true, 'target': target, 'link': true }) - myProj.addFramework('./ios/Frameworks/FBSDKLoginKit.framework', { 'customFramework': true, 'target': target, 'link': true }) + const target = myProj.getFirstTarget().uuid; + myProj.addFramework('./ios/Frameworks/FBSDKCoreKit.framework', { 'customFramework': true, 'target': target, 'link': true }); + myProj.addFramework('./ios/Frameworks/FBSDKShareKit.framework', { 'customFramework': true, 'target': target, 'link': true }); + myProj.addFramework('./ios/Frameworks/FBSDKLoginKit.framework', { 'customFramework': true, 'target': target, 'link': true }); // WARNING: this will overwrite any existing search paths - myProj.updateBuildProperty('FRAMEWORK_SEARCH_PATHS', '"$(PROJECT_DIR)/Frameworks/"') - fs.writeFileSync(myProjPath, myProj.writeSync()) - console.log('Finished updating ' + myProjPath) + myProj.updateBuildProperty('FRAMEWORK_SEARCH_PATHS', '"$(PROJECT_DIR)/Frameworks/"'); + fs.writeFileSync(myProjPath, myProj.writeSync()); + console.log('Finished updating ' + myProjPath); - next(null, files) - }) + next(null, files); + }); } function updatePlist (files, next) { - console.dir(files) - var plistDirPath = '' + console.dir(files); + var plistDirPath = ''; files.map(function (file) { - return path.join('./ios/', file) + return path.join('./ios/', file); }).filter(function (file) { - return fs.statSync(file).isDirectory() + return fs.statSync(file).isDirectory(); }).forEach(function (file) { if (fs.readdirSync(file).indexOf('Base.lproj') !== -1) { - plistDirPath = file + plistDirPath = file; } - }) - const plistFilePath = path.join(plistDirPath, '/Info.plist') - const plistFile = fs.readFileSync(plistFilePath, 'utf8') - const plistObject = plist.parse(plistFile) - plistObject.CFBundleURLTypes = [{CFBundleURLSchemes: ['fb' + appId]}] - plistObject.FacebookAppID = appId - plistObject.FacebookDisplayName = appName - plistObject.LSApplicationQueriesSchemes = ['fbapi', 'fb-messenger-api', 'fbauth2', 'fbshareextension'] - plistObject.NSLocationWhenInUseUsageDescription = '' - fs.writeFileSync(plistFilePath, plist.build(plistObject)) - console.log('Finished updating ' + plistFilePath) - next() + }); + const plistFilePath = path.join(plistDirPath, '/Info.plist'); + const plistFile = fs.readFileSync(plistFilePath, 'utf8'); + const plistObject = plist.parse(plistFile); + plistObject.CFBundleURLTypes = [{CFBundleURLSchemes: ['fb' + appId]}]; + plistObject.FacebookAppID = appId; + plistObject.FacebookDisplayName = appName; + plistObject.LSApplicationQueriesSchemes = ['fbapi', 'fb-messenger-api', 'fbauth2', 'fbshareextension']; + plistObject.NSLocationWhenInUseUsageDescription = ''; + fs.writeFileSync(plistFilePath, plist.build(plistObject)); + console.log('Finished updating ' + plistFilePath); + next(); } function done (err) { - if (err) console.error(err) - else console.log('DONE!') + if (err) { + console.error(err); + } else { + console.log('DONE!'); + } } -fall([downloadFbSdk, unzipFramework, correctSearchPaths, updateFBSDKFrameworks, updatePlist], done) +fall([downloadFbSdk, unzipFramework, correctSearchPaths, updateFBSDKFrameworks, updatePlist], done); diff --git a/ios/BUCK b/ios/BUCK deleted file mode 100644 index 8088d1b9..00000000 --- a/ios/BUCK +++ /dev/null @@ -1,103 +0,0 @@ -if THIS_IS_FBOBJC: - ios_library( - name = 'RNSDKCoreKit', - inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, - configs = fbobjc_configs( - FBOBJC_STATIC_LIBRARY, - extra_target_config={ - 'HEADER_SEARCH_PATHS': '$(inherited) $(REPO_ROOT)/ios-sdk/FBSDKCoreKit/** \ - $(REPO_ROOT)/Libraries/FBReactKit/js/react-native-github/React/**', - }, - ), - preprocessor_flags = OBJC_ARC_PREPROCESSOR_FLAGS + DEBUG_PREPROCESSOR_FLAGS, - compiler_flags = ['-w'], - srcs = glob([ - 'RCTFBSDK/core/*.m', - ]), - exported_headers = glob([ - 'RCTFBSDK/core/*.h' - ]), - frameworks = [ - '$SDKROOT/System/Library/Frameworks/Foundation.framework', - ], - deps = [ - '//Libraries/FBReactKit:RCTNetwork', - '//Libraries/FBReactKit:RCTText', - '//Libraries/FBReactKit:React', - '//ios-sdk:FacebookSDK', - ], - visibility = [ 'PUBLIC' ], - ) - - ios_library( - name = 'RNSDKLoginKit', - inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, - configs = fbobjc_configs(FBOBJC_STATIC_LIBRARY), - preprocessor_flags = OBJC_ARC_PREPROCESSOR_FLAGS + DEBUG_PREPROCESSOR_FLAGS, - compiler_flags = ['-w'], - srcs = glob([ - 'RCTFBSDK/login/*.m' - ]), - exported_headers = glob([ - 'RCTFBSDK/login/*.h', - ]), - frameworks = [ - '$SDKROOT/System/Library/Frameworks/Foundation.framework', - ], - deps = [ - ':RNSDKCoreKit', - ], - visibility = [ 'PUBLIC' ], - ) - - ios_library( - name = 'RNSDKShareKit', - inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, - configs = fbobjc_configs(FBOBJC_STATIC_LIBRARY), - preprocessor_flags = OBJC_ARC_PREPROCESSOR_FLAGS + DEBUG_PREPROCESSOR_FLAGS, - compiler_flags = ['-w'], - srcs = glob([ - 'RCTFBSDK/share/*.m', - ]), - exported_headers = glob([ - 'RCTFBSDK/share/*.h', - ]), - frameworks = [ - '$SDKROOT/System/Library/Frameworks/Foundation.framework', - ], - deps = [ - ':RNSDKCoreKit', - ], - visibility = [ 'PUBLIC' ], - ) - - ios_library( - name = 'RNSDK', - inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, - configs = fbobjc_configs(FBOBJC_STATIC_LIBRARY), - preprocessor_flags = OBJC_ARC_PREPROCESSOR_FLAGS + DEBUG_PREPROCESSOR_FLAGS, - compiler_flags = ['-w'], - srcs = [], - frameworks = [ - '$SDKROOT/System/Library/Frameworks/Foundation.framework', - ], - deps = [ - ':RNSDKCoreKit', - ':RNSDKLoginKit', - ':RNSDKShareKit', - ], - visibility = [ 'PUBLIC' ], - ) - -elif THIS_IS_FBANDROID: - android_library( - name = 'RNSDK', - srcs = [], - provided_deps = [ - ], - deps = [ - ], - visibility = [ - 'PUBLIC', - ], - ) diff --git a/ios/RCTFBSDK.xcodeproj/project.pbxproj b/ios/RCTFBSDK.xcodeproj/project.pbxproj index 29d9211a..267453ac 100644 --- a/ios/RCTFBSDK.xcodeproj/project.pbxproj +++ b/ios/RCTFBSDK.xcodeproj/project.pbxproj @@ -364,9 +364,10 @@ buildSettings = { COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", "~/Documents/FacebookSDK", "$(PROJECT_DIR)/../../../ios/Frameworks", - "$(inherited)", + "$(PROJECT_DIR)/../../../ios/Pods", ); HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -388,9 +389,10 @@ buildSettings = { COPY_PHASE_STRIP = YES; FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", "~/Documents/FacebookSDK", "$(PROJECT_DIR)/../../../ios/Frameworks", - "$(inherited)", + "$(PROJECT_DIR)/../../../ios/Pods", ); HEADER_SEARCH_PATHS = ( "$(inherited)", diff --git a/ios/RCTFBSDK/core/RCTFBSDKAppEvents.m b/ios/RCTFBSDK/core/RCTFBSDKAppEvents.m index be1866a2..5099c900 100644 --- a/ios/RCTFBSDK/core/RCTFBSDKAppEvents.m +++ b/ios/RCTFBSDK/core/RCTFBSDKAppEvents.m @@ -24,7 +24,7 @@ @implementation RCTConvert (RCTFBSDKAppEvents) RCT_ENUM_CONVERTER(FBSDKAppEventsFlushBehavior, (@{ @"auto": @(FBSDKAppEventsFlushBehaviorAuto), - @"explicit-only": @(FBSDKAppEventsFlushBehaviorExplicitOnly), + @"explicit_only": @(FBSDKAppEventsFlushBehaviorExplicitOnly), }), FBSDKAppEventsFlushBehaviorAuto, unsignedIntegerValue) @end @@ -70,6 +70,17 @@ - (dispatch_queue_t)methodQueue [FBSDKAppEvents setUserID:userID]; } +RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getUserID) +{ + return [FBSDKAppEvents userID]; +} + +RCT_EXPORT_METHOD(updateUserProperties:(NSDictionary *)parameters) +{ + [FBSDKAppEvents updateUserProperties:parameters + handler:nil]; +} + RCT_EXPORT_METHOD(setFlushBehavior:(FBSDKAppEventsFlushBehavior)flushBehavior) { [FBSDKAppEvents setFlushBehavior:flushBehavior]; diff --git a/ios/RCTFBSDK/core/RCTFBSDKInitializer.m b/ios/RCTFBSDK/core/RCTFBSDKInitializer.m index 9eb353fe..d16f61f9 100644 --- a/ios/RCTFBSDK/core/RCTFBSDKInitializer.m +++ b/ios/RCTFBSDK/core/RCTFBSDKInitializer.m @@ -40,7 +40,7 @@ @implementation RCTFBSDKInitializer - (instancetype)init { if ((self = [super init])) { - [FBSDKSettings setUserAgentSuffix:@"ReactNative-v0.6.1"]; + [FBSDKSettings setUserAgentSuffix:@"ReactNative-v0.6.2"]; } return self; } diff --git a/ios/ios.xcodeproj/project.pbxproj b/ios/ios.xcodeproj/project.pbxproj deleted file mode 100644 index 75bccf0e..00000000 --- a/ios/ios.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1591 +0,0 @@ - - - - - archiveVersion - 1 - classes - - - objectVersion - 46 - objects - - 1DD70E29C049749700000000 - - isa - PBXFileReference - name - RNSDK-Debug.xcconfig - path - ../../../../../buck-out/gen/Libraries/FBReactKit/js/react-native-fbsdk/ios/RNSDK-Debug.xcconfig - sourceTree - SOURCE_ROOT - explicitFileType - text.xcconfig - - 1DD70E29B8E1424100000000 - - isa - PBXFileReference - name - RNSDK-Profile.xcconfig - path - ../../../../../buck-out/gen/Libraries/FBReactKit/js/react-native-fbsdk/ios/RNSDK-Profile.xcconfig - sourceTree - SOURCE_ROOT - explicitFileType - text.xcconfig - - 1DD70E292C77EDA300000000 - - isa - PBXFileReference - name - RNSDK-Release.xcconfig - path - ../../../../../buck-out/gen/Libraries/FBReactKit/js/react-native-fbsdk/ios/RNSDK-Release.xcconfig - sourceTree - SOURCE_ROOT - explicitFileType - text.xcconfig - - 1DD70E29F349631C00000000 - - isa - PBXFileReference - name - RNSDKCoreKit-Debug.xcconfig - path - ../../../../../buck-out/gen/Libraries/FBReactKit/js/react-native-fbsdk/ios/RNSDKCoreKit-Debug.xcconfig - sourceTree - SOURCE_ROOT - explicitFileType - text.xcconfig - - 1DD70E292B9FA38600000000 - - isa - PBXFileReference - name - RNSDKCoreKit-Profile.xcconfig - path - ../../../../../buck-out/gen/Libraries/FBReactKit/js/react-native-fbsdk/ios/RNSDKCoreKit-Profile.xcconfig - sourceTree - SOURCE_ROOT - explicitFileType - text.xcconfig - - 1DD70E299F364EE800000000 - - isa - PBXFileReference - name - RNSDKCoreKit-Release.xcconfig - path - ../../../../../buck-out/gen/Libraries/FBReactKit/js/react-native-fbsdk/ios/RNSDKCoreKit-Release.xcconfig - sourceTree - SOURCE_ROOT - explicitFileType - text.xcconfig - - 1DD70E297A21682A00000000 - - isa - PBXFileReference - name - RNSDKLoginKit-Debug.xcconfig - path - ../../../../../buck-out/gen/Libraries/FBReactKit/js/react-native-fbsdk/ios/RNSDKLoginKit-Debug.xcconfig - sourceTree - SOURCE_ROOT - explicitFileType - text.xcconfig - - 1DD70E295C8A9D1400000000 - - isa - PBXFileReference - name - RNSDKLoginKit-Profile.xcconfig - path - ../../../../../buck-out/gen/Libraries/FBReactKit/js/react-native-fbsdk/ios/RNSDKLoginKit-Profile.xcconfig - sourceTree - SOURCE_ROOT - explicitFileType - text.xcconfig - - 1DD70E29D021487600000000 - - isa - PBXFileReference - name - RNSDKLoginKit-Release.xcconfig - path - ../../../../../buck-out/gen/Libraries/FBReactKit/js/react-native-fbsdk/ios/RNSDKLoginKit-Release.xcconfig - sourceTree - SOURCE_ROOT - explicitFileType - text.xcconfig - - 1DD70E2971F1D72000000000 - - isa - PBXFileReference - name - RNSDKShareKit-Debug.xcconfig - path - ../../../../../buck-out/gen/Libraries/FBReactKit/js/react-native-fbsdk/ios/RNSDKShareKit-Debug.xcconfig - sourceTree - SOURCE_ROOT - explicitFileType - text.xcconfig - - 1DD70E29A1FB268A00000000 - - isa - PBXFileReference - name - RNSDKShareKit-Profile.xcconfig - path - ../../../../../buck-out/gen/Libraries/FBReactKit/js/react-native-fbsdk/ios/RNSDKShareKit-Profile.xcconfig - sourceTree - SOURCE_ROOT - explicitFileType - text.xcconfig - - 1DD70E291591D1EC00000000 - - isa - PBXFileReference - name - RNSDKShareKit-Release.xcconfig - path - ../../../../../buck-out/gen/Libraries/FBReactKit/js/react-native-fbsdk/ios/RNSDKShareKit-Release.xcconfig - sourceTree - SOURCE_ROOT - explicitFileType - text.xcconfig - - B401C9792F7F325000000000 - - isa - PBXGroup - name - Buck (Do Not Modify) - sourceTree - ]]> - children - - 1DD70E29C049749700000000 - 1DD70E29B8E1424100000000 - 1DD70E292C77EDA300000000 - 1DD70E29F349631C00000000 - 1DD70E292B9FA38600000000 - 1DD70E299F364EE800000000 - 1DD70E297A21682A00000000 - 1DD70E295C8A9D1400000000 - 1DD70E29D021487600000000 - 1DD70E2971F1D72000000000 - 1DD70E29A1FB268A00000000 - 1DD70E291591D1EC00000000 - - - B401C979B781F65D00000000 - - isa - PBXGroup - name - Configurations - sourceTree - ]]> - children - - B401C9792F7F325000000000 - - - 1DD70E291ECB10AC00000000 - - isa - PBXFileReference - name - libRNSDK.a - path - libRNSDK.a - sourceTree - BUILT_PRODUCTS_DIR - explicitFileType - archive.ar - - 1DD70E29AC0CD5F100000000 - - isa - PBXFileReference - name - libRNSDKCoreKit.a - path - libRNSDKCoreKit.a - sourceTree - BUILT_PRODUCTS_DIR - explicitFileType - archive.ar - - 1DD70E29031DBF3900000000 - - isa - PBXFileReference - name - libRNSDKLoginKit.a - path - libRNSDKLoginKit.a - sourceTree - BUILT_PRODUCTS_DIR - explicitFileType - archive.ar - - 1DD70E2900B6388300000000 - - isa - PBXFileReference - name - libRNSDKShareKit.a - path - libRNSDKShareKit.a - sourceTree - BUILT_PRODUCTS_DIR - explicitFileType - archive.ar - - B401C979C806358400000000 - - isa - PBXGroup - name - Products - sourceTree - ]]> - children - - 1DD70E291ECB10AC00000000 - 1DD70E29AC0CD5F100000000 - 1DD70E29031DBF3900000000 - 1DD70E2900B6388300000000 - - - 1DD70E29001F47FB00000000 - - isa - PBXFileReference - name - BUCK - path - BUCK - sourceTree - SOURCE_ROOT - explicitFileType - text.script.python - - B401C979EAB5339800000000 - - isa - PBXGroup - name - Sources - sourceTree - ]]> - children - - - - B401C97904A83C5E00000000 - - isa - PBXGroup - name - RNSDK - sourceTree - ]]> - children - - 1DD70E29001F47FB00000000 - B401C979EAB5339800000000 - - - 1DD70E29001F47FB00000001 - - isa - PBXFileReference - name - BUCK - path - BUCK - sourceTree - SOURCE_ROOT - explicitFileType - text.script.python - - 1DD70E29239FB7EC00000000 - - isa - PBXFileReference - name - RCTConvert+FBSDKAccessToken.h - path - RCTFBSDK/core/RCTConvert+FBSDKAccessToken.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E29239FB7F100000000 - - isa - PBXFileReference - name - RCTConvert+FBSDKAccessToken.m - path - RCTFBSDK/core/RCTConvert+FBSDKAccessToken.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E29BECE3BF400000000 - - isa - PBXFileReference - name - RCTFBSDKAccessToken.h - path - RCTFBSDK/core/RCTFBSDKAccessToken.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E29BECE3BF900000000 - - isa - PBXFileReference - name - RCTFBSDKAccessToken.m - path - RCTFBSDK/core/RCTFBSDKAccessToken.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E291A45CB9900000000 - - isa - PBXFileReference - name - RCTFBSDKAppEvents.h - path - RCTFBSDK/core/RCTFBSDKAppEvents.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E291A45CB9E00000000 - - isa - PBXFileReference - name - RCTFBSDKAppEvents.m - path - RCTFBSDK/core/RCTFBSDKAppEvents.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E29C57E516100000000 - - isa - PBXFileReference - name - RCTFBSDKGraphRequestConnectionContainer.h - path - RCTFBSDK/core/RCTFBSDKGraphRequestConnectionContainer.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E29C57E516600000000 - - isa - PBXFileReference - name - RCTFBSDKGraphRequestConnectionContainer.m - path - RCTFBSDK/core/RCTFBSDKGraphRequestConnectionContainer.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E2931E55D4B00000000 - - isa - PBXFileReference - name - RCTFBSDKGraphRequestManager.h - path - RCTFBSDK/core/RCTFBSDKGraphRequestManager.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E2931E55D5000000000 - - isa - PBXFileReference - name - RCTFBSDKGraphRequestManager.m - path - RCTFBSDK/core/RCTFBSDKGraphRequestManager.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E2928DCC8A600000000 - - isa - PBXFileReference - name - RCTFBSDKInitializer.m - path - RCTFBSDK/core/RCTFBSDKInitializer.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - B401C979EAB5339800000001 - - isa - PBXGroup - name - Sources - sourceTree - ]]> - children - - 1DD70E29239FB7EC00000000 - 1DD70E29239FB7F100000000 - 1DD70E29BECE3BF400000000 - 1DD70E29BECE3BF900000000 - 1DD70E291A45CB9900000000 - 1DD70E291A45CB9E00000000 - 1DD70E29C57E516100000000 - 1DD70E29C57E516600000000 - 1DD70E2931E55D4B00000000 - 1DD70E2931E55D5000000000 - 1DD70E2928DCC8A600000000 - - - B401C97975ABB47900000000 - - isa - PBXGroup - name - RNSDKCoreKit - sourceTree - ]]> - children - - 1DD70E29001F47FB00000001 - B401C979EAB5339800000001 - - - 1DD70E29001F47FB00000002 - - isa - PBXFileReference - name - BUCK - path - BUCK - sourceTree - SOURCE_ROOT - explicitFileType - text.script.python - - 1DD70E29F12CB92000000000 - - isa - PBXFileReference - name - RCTConvert+FBSDKLogin.h - path - RCTFBSDK/login/RCTConvert+FBSDKLogin.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E29F12CB92500000000 - - isa - PBXFileReference - name - RCTConvert+FBSDKLogin.m - path - RCTFBSDK/login/RCTConvert+FBSDKLogin.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E29373304C700000000 - - isa - PBXFileReference - name - RCTFBSDKLoginButtonManager.h - path - RCTFBSDK/login/RCTFBSDKLoginButtonManager.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E29373304CC00000000 - - isa - PBXFileReference - name - RCTFBSDKLoginButtonManager.m - path - RCTFBSDK/login/RCTFBSDKLoginButtonManager.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E29A8F8915900000000 - - isa - PBXFileReference - name - RCTFBSDKLoginManager.h - path - RCTFBSDK/login/RCTFBSDKLoginManager.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E29A8F8915E00000000 - - isa - PBXFileReference - name - RCTFBSDKLoginManager.m - path - RCTFBSDK/login/RCTFBSDKLoginManager.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - B401C979EAB5339800000002 - - isa - PBXGroup - name - Sources - sourceTree - ]]> - children - - 1DD70E29F12CB92000000000 - 1DD70E29F12CB92500000000 - 1DD70E29373304C700000000 - 1DD70E29373304CC00000000 - 1DD70E29A8F8915900000000 - 1DD70E29A8F8915E00000000 - - - B401C979D437F52B00000000 - - isa - PBXGroup - name - RNSDKLoginKit - sourceTree - ]]> - children - - 1DD70E29001F47FB00000002 - B401C979EAB5339800000002 - - - 1DD70E29001F47FB00000003 - - isa - PBXFileReference - name - BUCK - path - BUCK - sourceTree - SOURCE_ROOT - explicitFileType - text.script.python - - 1DD70E298740595A00000000 - - isa - PBXFileReference - name - RCTConvert+FBSDKSharingContent.h - path - RCTFBSDK/share/RCTConvert+FBSDKSharingContent.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E298740595F00000000 - - isa - PBXFileReference - name - RCTConvert+FBSDKSharingContent.m - path - RCTFBSDK/share/RCTConvert+FBSDKSharingContent.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E2920FC65B100000000 - - isa - PBXFileReference - name - RCTFBSDKAppInviteDialog.h - path - RCTFBSDK/share/RCTFBSDKAppInviteDialog.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E2920FC65B600000000 - - isa - PBXFileReference - name - RCTFBSDKAppInviteDialog.m - path - RCTFBSDK/share/RCTFBSDKAppInviteDialog.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E2940AA372400000000 - - isa - PBXFileReference - name - RCTFBSDKGameRequestDialog.h - path - RCTFBSDK/share/RCTFBSDKGameRequestDialog.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E2940AA372900000000 - - isa - PBXFileReference - name - RCTFBSDKGameRequestDialog.m - path - RCTFBSDK/share/RCTFBSDKGameRequestDialog.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E29F7DF835C00000000 - - isa - PBXFileReference - name - RCTFBSDKLikeControlManager.h - path - RCTFBSDK/share/RCTFBSDKLikeControlManager.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E29F7DF836100000000 - - isa - PBXFileReference - name - RCTFBSDKLikeControlManager.m - path - RCTFBSDK/share/RCTFBSDKLikeControlManager.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E299BAF8D6E00000000 - - isa - PBXFileReference - name - RCTFBSDKMessageDialog.h - path - RCTFBSDK/share/RCTFBSDKMessageDialog.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E299BAF8D7300000000 - - isa - PBXFileReference - name - RCTFBSDKMessageDialog.m - path - RCTFBSDK/share/RCTFBSDKMessageDialog.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E29EBCCFB3200000000 - - isa - PBXFileReference - name - RCTFBSDKSendButtonManager.h - path - RCTFBSDK/share/RCTFBSDKSendButtonManager.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E29EBCCFB3700000000 - - isa - PBXFileReference - name - RCTFBSDKSendButtonManager.m - path - RCTFBSDK/share/RCTFBSDKSendButtonManager.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E29ED6CD2D000000000 - - isa - PBXFileReference - name - RCTFBSDKShareAPI.h - path - RCTFBSDK/share/RCTFBSDKShareAPI.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E29ED6CD2D500000000 - - isa - PBXFileReference - name - RCTFBSDKShareAPI.m - path - RCTFBSDK/share/RCTFBSDKShareAPI.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E293963E99100000000 - - isa - PBXFileReference - name - RCTFBSDKShareButtonManager.h - path - RCTFBSDK/share/RCTFBSDKShareButtonManager.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E293963E99600000000 - - isa - PBXFileReference - name - RCTFBSDKShareButtonManager.m - path - RCTFBSDK/share/RCTFBSDKShareButtonManager.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E29F96A828600000000 - - isa - PBXFileReference - name - RCTFBSDKShareDialog.h - path - RCTFBSDK/share/RCTFBSDKShareDialog.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E29F96A828B00000000 - - isa - PBXFileReference - name - RCTFBSDKShareDialog.m - path - RCTFBSDK/share/RCTFBSDKShareDialog.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - 1DD70E29D84F936C00000000 - - isa - PBXFileReference - name - RCTFBSDKShareHelper.h - path - RCTFBSDK/share/RCTFBSDKShareHelper.h - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.h - - 1DD70E29D84F937100000000 - - isa - PBXFileReference - name - RCTFBSDKShareHelper.m - path - RCTFBSDK/share/RCTFBSDKShareHelper.m - sourceTree - SOURCE_ROOT - lastKnownFileType - sourcecode.c.objc - - B401C979EAB5339800000003 - - isa - PBXGroup - name - Sources - sourceTree - ]]> - children - - 1DD70E298740595A00000000 - 1DD70E298740595F00000000 - 1DD70E2920FC65B100000000 - 1DD70E2920FC65B600000000 - 1DD70E2940AA372400000000 - 1DD70E2940AA372900000000 - 1DD70E29F7DF835C00000000 - 1DD70E29F7DF836100000000 - 1DD70E299BAF8D6E00000000 - 1DD70E299BAF8D7300000000 - 1DD70E29EBCCFB3200000000 - 1DD70E29EBCCFB3700000000 - 1DD70E29ED6CD2D000000000 - 1DD70E29ED6CD2D500000000 - 1DD70E293963E99100000000 - 1DD70E293963E99600000000 - 1DD70E29F96A828600000000 - 1DD70E29F96A828B00000000 - 1DD70E29D84F936C00000000 - 1DD70E29D84F937100000000 - - - B401C9792F5238F500000000 - - isa - PBXGroup - name - RNSDKShareKit - sourceTree - ]]> - children - - 1DD70E29001F47FB00000003 - B401C979EAB5339800000003 - - - B401C979EFB6AC4600000000 - - isa - PBXGroup - name - mainGroup - sourceTree - ]]> - children - - B401C979B781F65D00000000 - B401C979C806358400000000 - B401C97904A83C5E00000000 - B401C97975ABB47900000000 - B401C979D437F52B00000000 - B401C9792F5238F500000000 - - - 4952437303EDA63300000000 - - isa - XCBuildConfiguration - name - Debug - buildSettings - - - baseConfigurationReference - 1DD70E29C049749700000000 - - 4952437350C7218900000000 - - isa - XCBuildConfiguration - name - Profile - buildSettings - - - baseConfigurationReference - 1DD70E29B8E1424100000000 - - 49524373A439BFE700000000 - - isa - XCBuildConfiguration - name - Release - buildSettings - - - baseConfigurationReference - 1DD70E292C77EDA300000000 - - 218C37090000000000000000 - - isa - XCConfigurationList - buildConfigurations - - 4952437303EDA63300000000 - 4952437350C7218900000000 - 49524373A439BFE700000000 - - defaultConfigurationIsVisible - - - E66DC04E04A83C5E00000000 - - isa - PBXNativeTarget - name - RNSDK - productName - RNSDK - productReference - 1DD70E291ECB10AC00000000 - productType - com.apple.product-type.library.static - dependencies - - - buildPhases - - - buildConfigurationList - 218C37090000000000000000 - - E7A30F04239FB7F100000000 - - isa - PBXBuildFile - fileRef - 1DD70E29239FB7F100000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F04BECE3BF900000000 - - isa - PBXBuildFile - fileRef - 1DD70E29BECE3BF900000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F041A45CB9E00000000 - - isa - PBXBuildFile - fileRef - 1DD70E291A45CB9E00000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F04C57E516600000000 - - isa - PBXBuildFile - fileRef - 1DD70E29C57E516600000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F0431E55D5000000000 - - isa - PBXBuildFile - fileRef - 1DD70E2931E55D5000000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F0428DCC8A600000000 - - isa - PBXBuildFile - fileRef - 1DD70E2928DCC8A600000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - 1870857F0000000000000000 - - isa - PBXSourcesBuildPhase - files - - E7A30F04239FB7F100000000 - E7A30F04BECE3BF900000000 - E7A30F041A45CB9E00000000 - E7A30F04C57E516600000000 - E7A30F0431E55D5000000000 - E7A30F0428DCC8A600000000 - - - 4952437303EDA63300000001 - - isa - XCBuildConfiguration - name - Debug - buildSettings - - - baseConfigurationReference - 1DD70E29F349631C00000000 - - 4952437350C7218900000001 - - isa - XCBuildConfiguration - name - Profile - buildSettings - - - baseConfigurationReference - 1DD70E292B9FA38600000000 - - 49524373A439BFE700000001 - - isa - XCBuildConfiguration - name - Release - buildSettings - - - baseConfigurationReference - 1DD70E299F364EE800000000 - - 218C37090000000000000001 - - isa - XCConfigurationList - buildConfigurations - - 4952437303EDA63300000001 - 4952437350C7218900000001 - 49524373A439BFE700000001 - - defaultConfigurationIsVisible - - - E66DC04E75ABB47900000000 - - isa - PBXNativeTarget - name - RNSDKCoreKit - productName - RNSDKCoreKit - productReference - 1DD70E29AC0CD5F100000000 - productType - com.apple.product-type.library.static - dependencies - - - buildPhases - - 1870857F0000000000000000 - - buildConfigurationList - 218C37090000000000000001 - - E7A30F04F12CB92500000000 - - isa - PBXBuildFile - fileRef - 1DD70E29F12CB92500000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F04373304CC00000000 - - isa - PBXBuildFile - fileRef - 1DD70E29373304CC00000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F04A8F8915E00000000 - - isa - PBXBuildFile - fileRef - 1DD70E29A8F8915E00000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - 1870857F0000000000000001 - - isa - PBXSourcesBuildPhase - files - - E7A30F04F12CB92500000000 - E7A30F04373304CC00000000 - E7A30F04A8F8915E00000000 - - - 4952437303EDA63300000002 - - isa - XCBuildConfiguration - name - Debug - buildSettings - - - baseConfigurationReference - 1DD70E297A21682A00000000 - - 4952437350C7218900000002 - - isa - XCBuildConfiguration - name - Profile - buildSettings - - - baseConfigurationReference - 1DD70E295C8A9D1400000000 - - 49524373A439BFE700000002 - - isa - XCBuildConfiguration - name - Release - buildSettings - - - baseConfigurationReference - 1DD70E29D021487600000000 - - 218C37090000000000000002 - - isa - XCConfigurationList - buildConfigurations - - 4952437303EDA63300000002 - 4952437350C7218900000002 - 49524373A439BFE700000002 - - defaultConfigurationIsVisible - - - E66DC04ED437F52B00000000 - - isa - PBXNativeTarget - name - RNSDKLoginKit - productName - RNSDKLoginKit - productReference - 1DD70E29031DBF3900000000 - productType - com.apple.product-type.library.static - dependencies - - - buildPhases - - 1870857F0000000000000001 - - buildConfigurationList - 218C37090000000000000002 - - E7A30F048740595F00000000 - - isa - PBXBuildFile - fileRef - 1DD70E298740595F00000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F0420FC65B600000000 - - isa - PBXBuildFile - fileRef - 1DD70E2920FC65B600000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F0440AA372900000000 - - isa - PBXBuildFile - fileRef - 1DD70E2940AA372900000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F04F7DF836100000000 - - isa - PBXBuildFile - fileRef - 1DD70E29F7DF836100000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F049BAF8D7300000000 - - isa - PBXBuildFile - fileRef - 1DD70E299BAF8D7300000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F04EBCCFB3700000000 - - isa - PBXBuildFile - fileRef - 1DD70E29EBCCFB3700000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F04ED6CD2D500000000 - - isa - PBXBuildFile - fileRef - 1DD70E29ED6CD2D500000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F043963E99600000000 - - isa - PBXBuildFile - fileRef - 1DD70E293963E99600000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F04F96A828B00000000 - - isa - PBXBuildFile - fileRef - 1DD70E29F96A828B00000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - E7A30F04D84F937100000000 - - isa - PBXBuildFile - fileRef - 1DD70E29D84F937100000000 - settings - - COMPILER_FLAGS - -stdlib=libc++ -D_LIBCPP_HAS_NO_STRONG_ENUMS=1 - - - 1870857F0000000000000002 - - isa - PBXSourcesBuildPhase - files - - E7A30F048740595F00000000 - E7A30F0420FC65B600000000 - E7A30F0440AA372900000000 - E7A30F04F7DF836100000000 - E7A30F049BAF8D7300000000 - E7A30F04EBCCFB3700000000 - E7A30F04ED6CD2D500000000 - E7A30F043963E99600000000 - E7A30F04F96A828B00000000 - E7A30F04D84F937100000000 - - - 4952437303EDA63300000003 - - isa - XCBuildConfiguration - name - Debug - buildSettings - - - baseConfigurationReference - 1DD70E2971F1D72000000000 - - 4952437350C7218900000003 - - isa - XCBuildConfiguration - name - Profile - buildSettings - - - baseConfigurationReference - 1DD70E29A1FB268A00000000 - - 49524373A439BFE700000003 - - isa - XCBuildConfiguration - name - Release - buildSettings - - - baseConfigurationReference - 1DD70E291591D1EC00000000 - - 218C37090000000000000003 - - isa - XCConfigurationList - buildConfigurations - - 4952437303EDA63300000003 - 4952437350C7218900000003 - 49524373A439BFE700000003 - - defaultConfigurationIsVisible - - - E66DC04E2F5238F500000000 - - isa - PBXNativeTarget - name - RNSDKShareKit - productName - RNSDKShareKit - productReference - 1DD70E2900B6388300000000 - productType - com.apple.product-type.library.static - dependencies - - - buildPhases - - 1870857F0000000000000002 - - buildConfigurationList - 218C37090000000000000003 - - 4952437303EDA63300000004 - - isa - XCBuildConfiguration - name - Debug - buildSettings - - - - 4952437350C7218900000004 - - isa - XCBuildConfiguration - name - Profile - buildSettings - - - - 49524373A439BFE700000004 - - isa - XCBuildConfiguration - name - Release - buildSettings - - - - 218C37090000000000000004 - - isa - XCConfigurationList - buildConfigurations - - 4952437303EDA63300000004 - 4952437350C7218900000004 - 49524373A439BFE700000004 - - defaultConfigurationIsVisible - - - 96C847930001980D00000000 - - isa - PBXProject - mainGroup - B401C979EFB6AC4600000000 - targets - - E66DC04E04A83C5E00000000 - E66DC04E75ABB47900000000 - E66DC04ED437F52B00000000 - E66DC04E2F5238F500000000 - - buildConfigurationList - 218C37090000000000000004 - compatibilityVersion - Xcode 3.2 - attributes - - LastUpgradeCheck - 9999 - - - - rootObject - 96C847930001980D00000000 - - \ No newline at end of file diff --git a/js/FBAccessToken.js b/js/FBAccessToken.js index 344206f0..ccba5511 100644 --- a/js/FBAccessToken.js +++ b/js/FBAccessToken.js @@ -18,6 +18,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; @@ -99,7 +100,7 @@ class FBAccessToken { */ static getCurrentAccessToken(): Promise { return new Promise((resolve, reject) => { - AccessToken.getCurrentAccessToken((tokenMap) => { + AccessToken.getCurrentAccessToken(tokenMap => { if (tokenMap) { resolve(new FBAccessToken(tokenMap)); } else { @@ -128,7 +129,7 @@ class FBAccessToken { * Gets the date at which the access token expires. The value is the number of * milliseconds since Jan. 1, 1970, midnight GMT. */ - getExpires():number { + getExpires(): number { return this.expirationTime; } @@ -169,7 +170,6 @@ class FBAccessToken { return this.applicationID; } - /** * Gets user ID associated with this access token. */ diff --git a/js/FBAppEventsLogger.js b/js/FBAppEventsLogger.js index 3cbe6b2b..af845e4b 100644 --- a/js/FBAppEventsLogger.js +++ b/js/FBAppEventsLogger.js @@ -18,6 +18,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; @@ -30,11 +31,11 @@ type AppEventsFlushBehavior = * Flush automatically: periodically (every 15 seconds or after every 100 events), and * always at app reactivation. This is the default value. */ - 'auto' | + | 'auto' /** * Only flush when AppEventsLogger.flush() is explicitly invoked. */ - 'explicity-only'; + | 'explicit_only'; type Params = {[key: string]: string | number}; module.exports = { @@ -70,7 +71,11 @@ module.exports = { /** * Logs a purchase. See http://en.wikipedia.org/wiki/ISO_4217 for currencyCode. */ - logPurchase(purchaseAmount: number, currencyCode: string, parameters: ?Object) { + logPurchase( + purchaseAmount: number, + currencyCode: string, + parameters?: ?Params, + ) { AppEventsLogger.logPurchase(purchaseAmount, currencyCode, parameters); }, @@ -81,19 +86,34 @@ module.exports = { AppEventsLogger.logPushNotificationOpen(payload); }, + /** + * Explicitly kicks off flushing of events to Facebook. + */ + flush() { + AppEventsLogger.flush(); + }, + /** * Sets a custom user ID to associate with all app events. * The userID is persisted until it is cleared by passing nil. */ - setUserID(userID: string) { + setUserID(userID: string | null) { AppEventsLogger.setUserID(userID); }, /** - * Explicitly kicks off flushing of events to Facebook. + * Returns user id or null if not set */ - flush() { - AppEventsLogger.flush(); + async getUserID(): Promise { + return await AppEventsLogger.getUserID(); + }, + + /** + * Sends a request to update the properties for the current user, set by + * setUserID. You must call setUserID before making this call. + */ + updateUserProperties(parameters: Params) { + AppEventsLogger.updateUserProperties(parameters); }, /** @@ -104,12 +124,11 @@ module.exports = { AppEventsLogger.setPushNotificationsDeviceToken(deviceToken); }, - /** + /** * For Android only, sets and sends registration id to register the current app for push notifications. * @platform Android */ setPushNotificationsRegistrationId(registrationId: string) { AppEventsLogger.setPushNotificationsRegistrationId(registrationId); }, - }; diff --git a/js/FBAppInviteDialog.js b/js/FBAppInviteDialog.js index cfe0214a..f35d4f7c 100644 --- a/js/FBAppInviteDialog.js +++ b/js/FBAppInviteDialog.js @@ -18,11 +18,12 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; const AppInviteDialog = require('react-native').NativeModules.FBAppInviteDialog; -import type { AppInviteContent } from './models/FBAppInviteContent'; +import type {AppInviteContent} from './models/FBAppInviteContent'; module.exports = { /** diff --git a/js/FBGameRequestDialog.js b/js/FBGameRequestDialog.js index 50cb986c..9c37e71f 100644 --- a/js/FBGameRequestDialog.js +++ b/js/FBGameRequestDialog.js @@ -18,11 +18,13 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; -const GameRequestDialog = require('react-native').NativeModules.FBGameRequestDialog; -import type { GameRequestContent } from './models/FBGameRequestContent'; +const GameRequestDialog = require('react-native').NativeModules + .FBGameRequestDialog; +import type {GameRequestContent} from './models/FBGameRequestContent'; module.exports = { /** diff --git a/js/FBGraphRequest.js b/js/FBGraphRequest.js index 5e710b33..d3791d56 100644 --- a/js/FBGraphRequest.js +++ b/js/FBGraphRequest.js @@ -18,6 +18,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow +* @format */ 'use strict'; @@ -39,7 +40,7 @@ type GraphRequestConfig = { /** * The access token used by the request. */ - accessToken?: string + accessToken?: string, }; type GraphRequestParameters = {[key: string]: Object}; @@ -80,7 +81,7 @@ class FBGraphRequest { */ addStringParameter(paramString: string, key: string) { if (this.config != null && this.config.parameters != null) { - this.config.parameters[key] = { string: paramString }; + this.config.parameters[key] = {string: paramString}; } } } diff --git a/js/FBGraphRequestManager.js b/js/FBGraphRequestManager.js index 6eb01002..a8059e53 100644 --- a/js/FBGraphRequestManager.js +++ b/js/FBGraphRequestManager.js @@ -18,11 +18,13 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow +* @format */ 'use strict'; -const NativeGraphRequestManager = require('react-native').NativeModules.FBGraphRequest; +const NativeGraphRequestManager = require('react-native').NativeModules + .FBGraphRequest; import type GraphRequest from './FBGraphRequest'; @@ -36,8 +38,10 @@ function _verifyParameters(request: GraphRequest) { continue; } throw new Error( - 'Unexpected value for parameter \'' + key + '\'. Request parameters ' + - 'need to be objects with a \'string\' field.' + "Unexpected value for parameter '" + + key + + "'. Request parameters " + + "need to be objects with a 'string' field.", ); } } @@ -68,7 +72,9 @@ class FBGraphRequestManager { * Note that invocation of the batch callback does not indicate success of every * graph request made, only that the entire batch has finished executing. */ - addBatchCallback(callback: (error: ?Object, result: ?Object) => void): FBGraphRequestManager { + addBatchCallback( + callback: (error: ?Object, result: ?Object) => void, + ): FBGraphRequestManager { this.batchCallback = callback; return this; } diff --git a/js/FBLikeView.js b/js/FBLikeView.js index 7c3b1dab..b4136006 100644 --- a/js/FBLikeView.js +++ b/js/FBLikeView.js @@ -18,76 +18,68 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; import PropTypes from 'prop-types'; -import React from 'react'; -import { - requireNativeComponent, - StyleSheet, - ViewPropTypes, -} from 'react-native'; +import * as React from 'react'; +import {requireNativeComponent, StyleSheet, ViewPropTypes} from 'react-native'; -import type { ObjectIdAndType } from './models/FBObjectIdAndType'; +import type {ObjectIdAndType} from './models/FBObjectIdAndType'; type AuxiliaryViewPosition = 'top' | 'bottom' | 'inline'; type HorizontalAlignment = 'center' | 'left' | 'right'; -type LikeViewStyle = 'button'| //Note 'button' is only available on Android. - 'standard' | - 'box_count'; +type LikeViewStyle = + | 'button' //Note 'button' is only available on Android. + | 'standard' + | 'box_count'; /** * UI control to like an object in the Facebook graph. */ -class LikeView extends React.Component { +class LikeView extends React.Component<{ + /** + * The objectId and type for the object to like. + */ + objectIdAndType: ObjectIdAndType, + + /** + * The style to use for the receiver. Distinct from React styling. + */ + likeViewStyle?: LikeViewStyle, + + /** + * The position for the auxiliary view for the receiver. + */ + auxiliaryViewPosition?: AuxiliaryViewPosition, + + /** + * The text alignment of the social sentence. + */ + horizontalAlignment?: HorizontalAlignment, + + /** + * The foreground color to use for the content of the receiver. + */ + foregroundColor?: number, + + /** + * If true, a sound is played when the receiver is toggled. + */ + soundEnabled?: boolean, + + /** + * View style, if any. + */ + style?: any, +}> { static defaultProps: { - style: typeof styles.defaultButtonStyle, - }; - - props: { - /** - * The objectId and type for the object to like. - */ - objectIdAndType: ObjectIdAndType, - - /** - * The style to use for the receiver. Distinct from React styling. - */ - likeViewStyle?: LikeViewStyle, - - /** - * The position for the auxiliary view for the receiver. - */ - auxiliaryViewPosition?: AuxiliaryViewPosition, - - /** - * The text alignment of the social sentence. - */ - horizontalAlignment?: HorizontalAlignment, - - /** - * The foreground color to use for the content of the receiver. - */ - foregroundColor?: number, - - /** - * If true, a sound is played when the receiver is toggled. - */ - soundEnabled?: bool, - - /** - * View style, if any. - */ - style?: any, + style: typeof styles.defaultButtonStyle, }; render() { - return ( - - ); + return ; } } @@ -105,16 +97,13 @@ LikeView.propTypes = { const styles = StyleSheet.create({ defaultButtonStyle: { - height: 65, - width: 300, + height: 65, + width: 300, }, }); -LikeView.defaultProps = { style: styles.defaultButtonStyle }; +LikeView.defaultProps = {style: styles.defaultButtonStyle}; -const RCTFBLikeView = requireNativeComponent( - 'RCTFBLikeView', - LikeView -); +const RCTFBLikeView = requireNativeComponent('RCTFBLikeView', LikeView); module.exports = LikeView; diff --git a/js/FBLoginButton.js b/js/FBLoginButton.js index b7a9bb53..97c4a962 100644 --- a/js/FBLoginButton.js +++ b/js/FBLoginButton.js @@ -18,16 +18,13 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; import PropTypes from 'prop-types'; -import React from 'react'; -import { - requireNativeComponent, - StyleSheet, - ViewPropTypes, -} from 'react-native'; +import * as React from 'react'; +import {requireNativeComponent, StyleSheet, ViewPropTypes} from 'react-native'; import type { DefaultAudience, @@ -42,67 +39,65 @@ type TooltipBehaviorIOS = 'auto' | 'force_display' | 'disable'; /** * A button that initiates a log in or log out flow upon tapping. */ -class LoginButton extends React.Component { +class LoginButton extends React.Component<{ + /** + * Represents the read permissions to request when the login button + * is pressed. + */ + readPermissions?: Array, + + /** + * Represents the publish permissions to request when the login + * button is pressed. + */ + publishPermissions?: Array, + + /** + * The callback invoked upon error/completion of a login request. + */ + onLoginFinished?: (error: Object, result: LoginResult) => void, + + /** + * The callback invoked upon completion of a logout request. + */ + onLogoutFinished?: () => void, + + /** + * The behavior to use when attempting a login. + * @platform android + */ + loginBehaviorAndroid?: LoginBehaviorAndroid, + + /** + * The behavior to use when attempting a login. + * @platform ios + */ + loginBehaviorIOS?: LoginBehaviorIOS, + + /** + * The default audience to target when attempting a login. + */ + defaultAudience?: DefaultAudience, + + /** + * For iOS only, the desired tooltip behavior. + * @platform ios + */ + tooltipBehaviorIOS?: TooltipBehaviorIOS, + + /** + * View style, if any. + */ + style?: any, +}> { static defaultProps: { style: typeof styles.defaultButtonStyle, }; - props: { - /** - * Represents the read permissions to request when the login button - * is pressed. - */ - readPermissions?: Array, - - /** - * Represents the publish permissions to request when the login - * button is pressed. - */ - publishPermissions?: Array, - - /** - * The callback invoked upon error/completion of a login request. - */ - onLoginFinished?: (error: Object, result: LoginResult) => void, - - /** - * The callback invoked upon completion of a logout request. - */ - onLogoutFinished?: () => void, - - /** - * The behavior to use when attempting a login. - * @platform android - */ - loginBehaviorAndroid?: LoginBehaviorAndroid, - - /** - * The behavior to use when attempting a login. - * @platform ios - */ - loginBehaviorIOS?: LoginBehaviorIOS, - - /** - * The default audience to target when attempting a login. - */ - defaultAudience?: DefaultAudience, - - /** - * For iOS only, the desired tooltip behavior. - * @platform ios - */ - tooltipBehaviorIOS?: TooltipBehaviorIOS, - - /** - * View style, if any. - */ - style?: any, - }; - _eventHandler(event: Event) { const eventDict = event.nativeEvent; if (eventDict.type === 'loginFinished') { - if (this.props.onLoginFinished){ + if (this.props.onLoginFinished) { this.props.onLoginFinished(eventDict.error, eventDict.result); } } else if (eventDict.type === 'logoutFinished') { @@ -130,8 +125,17 @@ LoginButton.propTypes = { publishPermissions: PropTypes.arrayOf(PropTypes.string), onLoginFinished: PropTypes.func, onLogoutFinished: PropTypes.func, - loginBehaviorAndroid: PropTypes.oneOf(['native_with_fallback', 'native_only', 'web_only']), - loginBehaviorIOS: PropTypes.oneOf(['native', 'browser', 'system_account', 'web']), + loginBehaviorAndroid: PropTypes.oneOf([ + 'native_with_fallback', + 'native_only', + 'web_only', + ]), + loginBehaviorIOS: PropTypes.oneOf([ + 'native', + 'browser', + 'system_account', + 'web', + ]), defaultAudience: PropTypes.oneOf(['only_me', 'friends', 'everyone']), tooltipBehaviorIOS: PropTypes.oneOf(['auto', 'force_display', 'disable']), }; @@ -150,7 +154,7 @@ LoginButton.defaultProps = { const RCTFBLoginButton = requireNativeComponent( 'RCTFBLoginButton', LoginButton, - { nativeOnly: { onChange: true } } + {nativeOnly: {onChange: true}}, ); module.exports = LoginButton; diff --git a/js/FBLoginManager.js b/js/FBLoginManager.js index 7b571113..469e0984 100644 --- a/js/FBLoginManager.js +++ b/js/FBLoginManager.js @@ -18,6 +18,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; @@ -27,22 +28,22 @@ const LoginManager = require('react-native').NativeModules.FBLoginManager; */ export type DefaultAudience = // Indicates that the user's friends are able to see posts made by the application. - 'friends' | + | 'friends' // Indicates that all Facebook users are able to see posts made by the application. - 'everyone' | + | 'everyone' // Indicates that only the user is able to see posts made by the application. - 'only_me'; + | 'only_me'; export type LoginBehavior = LoginBehaviorIOS | LoginBehaviorAndroid; /** * Indicate how Facebook Login should be attempted on Android. */ export type LoginBehaviorAndroid = // Attempt login in using the Facebook App, and if that does not work fall back to web dialog auth. - 'native_with_fallback'| + | 'native_with_fallback' // Only attempt to login using the Facebook App. - 'native_only'| + | 'native_only' // Only the web dialog auth should be used. - 'web_only'; + | 'web_only'; /** * Indicate how Facebook Login should be attempted on iOS. */ @@ -50,13 +51,13 @@ export type LoginBehaviorIOS = // Attempts log in through the native Facebook app. // The SDK may still use Safari instead. // See details in https://developers.facebook.com/blog/post/2015/10/29/Facebook-Login-iOS9/ - 'native' | + | 'native' // Attempts log in through the Safari browser. - 'browser' | + | 'browser' // Attempts log in through the Facebook account currently signed in through Settings. - 'system_account' | + | 'system_account' // Attempts log in through a modal UIWebView pop-up. - 'web'; + | 'web'; /** * Shows the results of a login operation. */ @@ -77,7 +78,9 @@ module.exports = { /** * Logs the user in with the requested publish permissions. */ - logInWithPublishPermissions(permissions: Array): Promise { + logInWithPublishPermissions( + permissions: Array, + ): Promise { return LoginManager.logInWithPublishPermissions(permissions); }, diff --git a/js/FBMessageDialog.js b/js/FBMessageDialog.js index 4a3d99c8..32a6a5b3 100644 --- a/js/FBMessageDialog.js +++ b/js/FBMessageDialog.js @@ -18,12 +18,13 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; const MessageDialog = require('react-native').NativeModules.FBMessageDialog; -import type { ShareContent } from './models/FBShareContent'; +import type {ShareContent} from './models/FBShareContent'; module.exports = { /** diff --git a/js/FBSendButton.js b/js/FBSendButton.js index 1f2f3c42..31e88dd2 100644 --- a/js/FBSendButton.js +++ b/js/FBSendButton.js @@ -18,42 +18,33 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; import PropTypes from 'prop-types'; -import React from 'react'; -import { - requireNativeComponent, - StyleSheet, - ViewPropTypes, -} from 'react-native'; +import * as React from 'react'; +import {requireNativeComponent, StyleSheet, ViewPropTypes} from 'react-native'; -import type { ShareContent } from './models/FBShareContent'; +import type {ShareContent} from './models/FBShareContent'; -class SendButton extends React.Component { +class SendButton extends React.Component<{ + /** + * Content to be shared. + */ + shareContent: ShareContent, + + /** + * View style, if any. + */ + style?: any, +}> { static defaultProps: { style: typeof styles.defaultButtonStyle, }; - props: { - /** - * Content to be shared. - */ - shareContent: ShareContent, - - /** - * View style, if any. - */ - style?: any, - }; - render() { - return ( - - ); + return ; } } @@ -75,9 +66,6 @@ SendButton.defaultProps = { style: styles.defaultButtonStyle, }; -const RCTFBSendButton = requireNativeComponent( - 'RCTFBSendButton', - SendButton -); +const RCTFBSendButton = requireNativeComponent('RCTFBSendButton', SendButton); module.exports = SendButton; diff --git a/js/FBShareApi.js b/js/FBShareApi.js index 785a30a7..af6b5ebb 100644 --- a/js/FBShareApi.js +++ b/js/FBShareApi.js @@ -18,13 +18,14 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; const ShareApi = require('react-native').NativeModules.FBShareApi; const ShareOpenGraphObject = require('./models/FBShareOpenGraphObject'); -import type { ShareContent } from './models/FBShareContent'; +import type {ShareContent} from './models/FBShareContent'; module.exports = { /** @@ -47,7 +48,11 @@ module.exports = { * Shares the specified content with a message. * NOTE: Only one share action can be performed at a time. */ - share(shareContent: ShareContent, graphNode: string, message: string): Promise { + share( + shareContent: ShareContent, + graphNode: string, + message: string, + ): Promise { return ShareApi.share(shareContent, graphNode, message); }, }; diff --git a/js/FBShareButton.js b/js/FBShareButton.js index d9a96f4f..dedff074 100644 --- a/js/FBShareButton.js +++ b/js/FBShareButton.js @@ -18,43 +18,34 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow +* @format */ 'use strict'; import PropTypes from 'prop-types'; -import React from 'react'; -import { - requireNativeComponent, - StyleSheet, - ViewPropTypes, -} from 'react-native'; +import * as React from 'react'; +import {requireNativeComponent, StyleSheet, ViewPropTypes} from 'react-native'; -import type { ShareContent } from './models/FBShareContent'; +import type {ShareContent} from './models/FBShareContent'; -class ShareButton extends React.Component { +class ShareButton extends React.Component<{ + /** + * Content to be shared. + */ + shareContent: ShareContent, + + /** + * View style, if any. + */ + style?: any, +}> { static defaultProps: { style: typeof styles.defaultButtonStyle, }; - props: { - /** - * Content to be shared. - */ - shareContent: ShareContent, - - /** - * View style, if any. - */ - style?: any, - }; - render() { - return ( - - ); + return ; } } @@ -78,7 +69,7 @@ ShareButton.defaultProps = { const RCTFBShareButton = requireNativeComponent( 'RCTFBShareButton', - ShareButton + ShareButton, ); module.exports = ShareButton; diff --git a/js/FBShareDialog.js b/js/FBShareDialog.js index 6c0c2b54..ed9a038f 100644 --- a/js/FBShareDialog.js +++ b/js/FBShareDialog.js @@ -18,43 +18,44 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; const ShareDialog = require('react-native').NativeModules.FBShareDialog; -import type { ShareContent } from './models/FBShareContent'; +import type {ShareContent} from './models/FBShareContent'; type ShareDialogMode = ShareDialogModeIOS | ShareDialogModeAndroid; type ShareDialogModeAndroid = /** * The mode is determined automatically. */ - "automatic"| + | 'automatic' /** * The native dialog is used. */ - "native"| + | 'native' /** * The web dialog is used. */ - "web"| + | 'web' /** * The feed dialog is used. */ - "feed"; + | 'feed'; type ShareDialogModeIOS = /* * Acts with the most appropriate mode that is available. */ - 'automatic'| + | 'automatic' /* * Displays the dialog in Safari. */ - 'browser'| + | 'browser' /* * Displays the dialog in a UIWebView within the app. */ - 'webview'; + | 'webview'; module.exports = { /** diff --git a/js/index.js b/js/index.js index 573e569e..f6145b65 100644 --- a/js/index.js +++ b/js/index.js @@ -18,29 +18,66 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; -//native models -exports.ShareOpenGraphAction = require('./models/FBShareOpenGraphAction'); -exports.ShareOpenGraphObject = require('./models/FBShareOpenGraphObject'); -exports.ShareOpenGraphValueContainer = require('./models/FBShareOpenGraphValueContainer'); +module.exports = { + //native models + get ShareOpenGraphAction() { + return require('./models/FBShareOpenGraphAction'); + }, + get ShareOpenGraphObject() { + return require('./models/FBShareOpenGraphObject'); + }, + get ShareOpenGraphValueContainer() { + return require('./models/FBShareOpenGraphValueContainer'); + }, -//native modules -exports.AccessToken = require('./FBAccessToken'); -exports.AppEventsLogger = require('./FBAppEventsLogger'); -exports.AppInviteDialog = require('./FBAppInviteDialog'); -exports.GameRequestDialog = require('./FBGameRequestDialog'); -exports.GraphRequest = require('./FBGraphRequest'); -exports.GraphRequestManager = require('./FBGraphRequestManager'); -exports.LoginManager = require('./FBLoginManager'); -exports.MessageDialog = require('./FBMessageDialog'); -exports.ShareApi = require('./FBShareApi'); -exports.ShareDialog = require('./FBShareDialog'); + //native modules + get AccessToken() { + return require('./FBAccessToken'); + }, + get AppEventsLogger() { + return require('./FBAppEventsLogger'); + }, + get AppInviteDialog() { + return require('./FBAppInviteDialog'); + }, + get GameRequestDialog() { + return require('./FBGameRequestDialog'); + }, + get GraphRequest() { + return require('./FBGraphRequest'); + }, + get GraphRequestManager() { + return require('./FBGraphRequestManager'); + }, + get LoginManager() { + return require('./FBLoginManager'); + }, + get MessageDialog() { + return require('./FBMessageDialog'); + }, + get ShareApi() { + return require('./FBShareApi'); + }, + get ShareDialog() { + return require('./FBShareDialog'); + }, -//native components -exports.LikeView = require('./FBLikeView'); -exports.LoginButton = require('./FBLoginButton'); -exports.SendButton = require('./FBSendButton'); -exports.ShareButton = require('./FBShareButton'); + //native components + get LikeView() { + return require('./FBLikeView'); + }, + get LoginButton() { + return require('./FBLoginButton'); + }, + get SendButton() { + return require('./FBSendButton'); + }, + get ShareButton() { + return require('./FBShareButton'); + }, +}; diff --git a/js/models/FBAppGroupCreationContent.js b/js/models/FBAppGroupCreationContent.js index d576b38f..db81b5c1 100644 --- a/js/models/FBAppGroupCreationContent.js +++ b/js/models/FBAppGroupCreationContent.js @@ -18,17 +18,18 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ - 'use strict'; +'use strict'; /** * Specifies the privacy of a group. */ type AppGroupPrivacy = // Anyone can see the group, who's in in and what members post. - 'Open' | + | 'Open' // Anyone can see the group and who's in it, but only members can see posts. - 'Closed'; + | 'Closed'; /** * A model for app invites. diff --git a/js/models/FBAppInviteContent.js b/js/models/FBAppInviteContent.js index b011963c..7a94ea92 100644 --- a/js/models/FBAppInviteContent.js +++ b/js/models/FBAppInviteContent.js @@ -18,8 +18,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ - 'use strict'; +'use strict'; /** * A model for app invites. @@ -39,11 +40,11 @@ export type AppInviteContent = { * This is optional. This can be between 0 and 10 characters long and can contain * alphanumeric characters only. To set a promo code, you need to set promo text. */ - promotionCode?:string, - /** + promotionCode?: string, + /** * Promotional text to be displayed while sending and receiving the invite. * This is optional. This can be between 0 and 80 characters long and can contain * alphanumeric and spaces only. */ - promotionText?:string, + promotionText?: string, }; diff --git a/js/models/FBGameRequestContent.js b/js/models/FBGameRequestContent.js index a247a5dc..3440d90c 100644 --- a/js/models/FBGameRequestContent.js +++ b/js/models/FBGameRequestContent.js @@ -18,22 +18,23 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; type ActionType = // The user is sending an object to their friends. - 'send' | + | 'send' // The user is asking for an object from friends. - 'askfor' | + | 'askfor' // It is the turn of the friends to play against the user in a match. - 'turn'; + | 'turn'; type Filters = // Friends using the app can be displayed. - 'app_users' | + | 'app_users' // Friends not using the app can be displayed. - 'app_non_users'; + | 'app_non_users'; /** * A model for a game request. diff --git a/js/models/FBObjectIdAndType.js b/js/models/FBObjectIdAndType.js index 9f85444f..3f4da916 100644 --- a/js/models/FBObjectIdAndType.js +++ b/js/models/FBObjectIdAndType.js @@ -18,6 +18,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; diff --git a/js/models/FBShareContent.js b/js/models/FBShareContent.js index 20518648..06e2fd97 100644 --- a/js/models/FBShareContent.js +++ b/js/models/FBShareContent.js @@ -18,15 +18,20 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; -import type { ShareLinkContent } from './FBShareLinkContent'; -import type { ShareOpenGraphContent } from './FBShareOpenGraphContent'; -import type { SharePhotoContent } from './FBSharePhotoContent'; -import type { ShareVideoContent } from './FBShareVideoContent'; +import type {ShareLinkContent} from './FBShareLinkContent'; +import type {ShareOpenGraphContent} from './FBShareOpenGraphContent'; +import type {SharePhotoContent} from './FBSharePhotoContent'; +import type {ShareVideoContent} from './FBShareVideoContent'; -export type ShareContent = ShareLinkContent | SharePhotoContent | ShareVideoContent | ShareOpenGraphContent; +export type ShareContent = + | ShareLinkContent + | SharePhotoContent + | ShareVideoContent + | ShareOpenGraphContent; /** * A base interface for content to be shared. */ diff --git a/js/models/FBShareLinkContent.js b/js/models/FBShareLinkContent.js index 23e73e02..b1263fb5 100644 --- a/js/models/FBShareLinkContent.js +++ b/js/models/FBShareLinkContent.js @@ -18,10 +18,11 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; -import type { ShareContentCommonParameters } from './FBShareContent'; +import type {ShareContentCommonParameters} from './FBShareContent'; /** * A model for status and link content to be shared. diff --git a/js/models/FBShareOpenGraphAction.js b/js/models/FBShareOpenGraphAction.js index 8a4fe64b..53b44e0a 100644 --- a/js/models/FBShareOpenGraphAction.js +++ b/js/models/FBShareOpenGraphAction.js @@ -18,6 +18,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow +* @format */ 'use strict'; diff --git a/js/models/FBShareOpenGraphContent.js b/js/models/FBShareOpenGraphContent.js index 582dbfb2..f2428156 100644 --- a/js/models/FBShareOpenGraphContent.js +++ b/js/models/FBShareOpenGraphContent.js @@ -18,13 +18,14 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow +* @format */ 'use strict'; const ShareOpenGraphAction = require('./FBShareOpenGraphAction'); -import type { ShareContentCommonParameters } from './FBShareContent'; +import type {ShareContentCommonParameters} from './FBShareContent'; /** * Represents a content object containing information about an Open Graph Action. diff --git a/js/models/FBShareOpenGraphObject.js b/js/models/FBShareOpenGraphObject.js index 33fda204..0bbcb5fb 100644 --- a/js/models/FBShareOpenGraphObject.js +++ b/js/models/FBShareOpenGraphObject.js @@ -18,6 +18,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow +* @format */ 'use strict'; @@ -27,7 +28,6 @@ const ShareOpenGraphValueContainer = require('./FBShareOpenGraphValueContainer') /** * Represents an open graph object. */ -class ShareOpenGraphObject extends ShareOpenGraphValueContainer { -} +class ShareOpenGraphObject extends ShareOpenGraphValueContainer {} module.exports = ShareOpenGraphObject; diff --git a/js/models/FBShareOpenGraphValueContainer.js b/js/models/FBShareOpenGraphValueContainer.js index 09826e30..ac4f97b8 100644 --- a/js/models/FBShareOpenGraphValueContainer.js +++ b/js/models/FBShareOpenGraphValueContainer.js @@ -18,22 +18,19 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow +* @format */ 'use strict'; -import type { SharePhoto } from './FBSharePhoto'; +import type {SharePhoto} from './FBSharePhoto'; type OpenGraphProperties = {[key: string]: OpenGraphValue}; type OpenGraphValue = { type: OpenGraphValueType, value: any, }; -type OpenGraphValueType = - 'number' | - 'open-graph-object' | - 'photo' | - 'string'; +type OpenGraphValueType = 'number' | 'open-graph-object' | 'photo' | 'string'; /** * Represents an interface for adding and retrieving values to open graph objects and actions. @@ -49,36 +46,36 @@ class ShareOpenGraphValueContainer { * Sets a number for the specified key. */ putNumber(key: string, number: number) { - this._properties[key] = { type: 'number', value: number}; + this._properties[key] = {type: 'number', value: number}; } /** * Sets an open graph object for the specified key. */ putObject(key: string, object: ShareOpenGraphValueContainer) { - this._properties[key] = { type: 'open-graph-object', value: object }; + this._properties[key] = {type: 'open-graph-object', value: object}; } /** * Sets a photo for the specified key. */ putPhoto(key: string, photo: SharePhoto) { - this._properties[key] = { type: 'photo', value: photo }; + this._properties[key] = {type: 'photo', value: photo}; } /** * Sets a string for the specified key. */ putString(key: string, string: string) { - this._properties[key] = { type: 'string', value: string }; + this._properties[key] = {type: 'string', value: string}; } /** * Gets an entry for the given key. */ - getEntry(key: string): OpenGraphValue { - return this._properties[key]; - } + getEntry(key: string): OpenGraphValue { + return this._properties[key]; + } } module.exports = ShareOpenGraphValueContainer; diff --git a/js/models/FBSharePhoto.js b/js/models/FBSharePhoto.js index e43b1a96..53b2f03f 100644 --- a/js/models/FBSharePhoto.js +++ b/js/models/FBSharePhoto.js @@ -18,6 +18,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; diff --git a/js/models/FBSharePhotoContent.js b/js/models/FBSharePhotoContent.js index 485d7c62..aec3c54e 100644 --- a/js/models/FBSharePhotoContent.js +++ b/js/models/FBSharePhotoContent.js @@ -18,11 +18,12 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; -import type { ShareContentCommonParameters } from './FBShareContent'; -import type { SharePhoto } from './FBSharePhoto'; +import type {ShareContentCommonParameters} from './FBShareContent'; +import type {SharePhoto} from './FBSharePhoto'; /** * A model for photo content to be shared. diff --git a/js/models/FBShareVideo.js b/js/models/FBShareVideo.js index b6b2c293..800064c0 100644 --- a/js/models/FBShareVideo.js +++ b/js/models/FBShareVideo.js @@ -18,6 +18,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; diff --git a/js/models/FBShareVideoContent.js b/js/models/FBShareVideoContent.js index 7428e860..f19d3ebf 100644 --- a/js/models/FBShareVideoContent.js +++ b/js/models/FBShareVideoContent.js @@ -18,12 +18,13 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow + * @format */ 'use strict'; -import type { ShareContentCommonParameters } from './FBShareContent'; -import type { SharePhoto } from './FBSharePhoto'; -import type { ShareVideo } from './FBShareVideo'; +import type {ShareContentCommonParameters} from './FBShareContent'; +import type {SharePhoto} from './FBSharePhoto'; +import type {ShareVideo} from './FBShareVideo'; /** * A model for video content to be shared. diff --git a/package.json b/package.json index c0403f3b..f2fd9211 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,14 @@ { "name": "react-native-fbsdk", - "version": "0.6.1", + "version": "0.6.2", "description": "Facebook SDK support for React Native apps.", "main": "./js/index.js", "author": { "name": "Zhuowen Deng" }, "contributors": { - "name": "Chris Hackmann" + "name": "Chris Hackmann", + "name": "Pouya Larjani" }, "repository": { "type": "git", @@ -24,10 +25,6 @@ "core" ], "license": "Facebook Platform License", - "peerDependencies": { - "react-native": ">=0.44.0", - "prop-types": "15.x.x" - }, "dependencies": { "adm-zip": "^0.4.7", "fastfall": "^1.5.1", @@ -36,5 +33,9 @@ "progress": "^2.0.0", "pump": "^1.0.2", "xcode": "^0.9.3" + }, + "peerDependencies": { + "react-native": ">=0.44.0", + "prop-types": "15.x.x" } } diff --git a/sample/HelloFacebook/index.android.js b/sample/HelloFacebook/index.android.js index bd187d34..8ea835e6 100644 --- a/sample/HelloFacebook/index.android.js +++ b/sample/HelloFacebook/index.android.js @@ -16,12 +16,14 @@ * 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. + * + * @format */ 'use strict'; const FBSDK = require('react-native-fbsdk'); -import React, { Component } from 'react'; +import React, {Component} from 'react'; import { AppRegistry, StyleSheet, @@ -29,10 +31,7 @@ import { TouchableHighlight, View, } from 'react-native'; -const { - LoginButton, - ShareDialog, -} = FBSDK; +const {LoginButton, ShareDialog} = FBSDK; class HelloFacebook extends Component { constructor(props) { @@ -49,31 +48,32 @@ class HelloFacebook extends Component { shareLinkWithShareDialog() { var tmp = this; - ShareDialog.canShow(this.state.shareLinkContent).then( - function(canShow) { + ShareDialog.canShow(this.state.shareLinkContent) + .then(function(canShow) { if (canShow) { return ShareDialog.show(tmp.state.shareLinkContent); } - } - ).then( - function(result) { - if (result.isCancelled) { - alert('Share cancelled'); - } else { - alert('Share success'); - } - }, - function(error) { - alert('Share fail with error: ' + error); - } - ); + }) + .then( + function(result) { + if (result.isCancelled) { + alert('Share cancelled'); + } else { + alert('Share success'); + } + }, + function(error) { + alert('Share fail with error: ' + error); + }, + ); } render() { return ( - Share link with ShareDialog diff --git a/sample/HelloFacebook/index.ios.js b/sample/HelloFacebook/index.ios.js index bc16edc7..34354617 100644 --- a/sample/HelloFacebook/index.ios.js +++ b/sample/HelloFacebook/index.ios.js @@ -16,12 +16,14 @@ * 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. + * + * @format */ 'use strict'; const FBSDK = require('react-native-fbsdk'); -import React, { Component } from 'react'; +import React, {Component} from 'react'; import { AppRegistry, StyleSheet, @@ -29,10 +31,7 @@ import { TouchableHighlight, View, } from 'react-native'; -const { - LoginButton, - ShareDialog, -} = FBSDK; +const {LoginButton, ShareDialog} = FBSDK; class HelloFacebook extends Component { constructor(props) { @@ -49,32 +48,32 @@ class HelloFacebook extends Component { shareLinkWithShareDialog() { var tmp = this; - ShareDialog.canShow(this.state.shareLinkContent).then( - function(canShow) { + ShareDialog.canShow(this.state.shareLinkContent) + .then(function(canShow) { if (canShow) { return ShareDialog.show(tmp.state.shareLinkContent); } - } - ).then( - function(result) { - if (result.isCancelled) { - alert('Share cancelled'); - } else { - alert('Share success with postId: ' - + result.postId); - } - }, - function(error) { - alert('Share fail with error: ' + error); - } - ); + }) + .then( + function(result) { + if (result.isCancelled) { + alert('Share cancelled'); + } else { + alert('Share success with postId: ' + result.postId); + } + }, + function(error) { + alert('Share fail with error: ' + error); + }, + ); } render() { return ( - Share link with ShareDialog diff --git a/sample/HelloFacebook/ios/HelloFacebook.xcodeproj/project.pbxproj b/sample/HelloFacebook/ios/HelloFacebook.xcodeproj/project.pbxproj index 3abb9305..1d715659 100644 --- a/sample/HelloFacebook/ios/HelloFacebook.xcodeproj/project.pbxproj +++ b/sample/HelloFacebook/ios/HelloFacebook.xcodeproj/project.pbxproj @@ -681,7 +681,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh"; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; }; /* End PBXShellScriptBuildPhase section */