diff --git a/FirebaseFacebook.xcodeproj/project.pbxproj b/FirebaseFacebook.xcodeproj/project.pbxproj new file mode 100644 index 0000000..457e78c --- /dev/null +++ b/FirebaseFacebook.xcodeproj/project.pbxproj @@ -0,0 +1,782 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 9477D24222004A030064135D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9477D24122004A030064135D /* AppDelegate.swift */; }; + 9477D24422004A030064135D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9477D24322004A030064135D /* ViewController.swift */; }; + 9477D24722004A030064135D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9477D24522004A030064135D /* Main.storyboard */; }; + 9477D24922004A0F0064135D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9477D24822004A0F0064135D /* Assets.xcassets */; }; + 9477D24C22004A0F0064135D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9477D24A22004A0F0064135D /* LaunchScreen.storyboard */; }; + 9477D25722004A0F0064135D /* FirebaseFacebookTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9477D25622004A0F0064135D /* FirebaseFacebookTests.swift */; }; + 9477D26222004A100064135D /* FirebaseFacebookUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9477D26122004A100064135D /* FirebaseFacebookUITests.swift */; }; + C90EBB5216AF4F2D7A7F89CA /* Pods_FirebaseFacebook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B384B8848B919C7F1FB2EB9 /* Pods_FirebaseFacebook.framework */; }; + CAF7E0A88215A0530FC6A2EF /* Pods_FirebaseFacebookUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5053124A758168CE1FF3C069 /* Pods_FirebaseFacebookUITests.framework */; }; + F6AA9EE5477E41FAD94BC9F7 /* Pods_FirebaseFacebookTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C94E427160E061A377287FE4 /* Pods_FirebaseFacebookTests.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 9477D25322004A0F0064135D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9477D23622004A030064135D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9477D23D22004A030064135D; + remoteInfo = FirebaseFacebook; + }; + 9477D25E22004A100064135D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9477D23622004A030064135D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9477D23D22004A030064135D; + remoteInfo = FirebaseFacebook; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 10753C7E0354305B2CA74801 /* Pods-FirebaseFacebookTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseFacebookTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.release.xcconfig"; sourceTree = ""; }; + 2B384B8848B919C7F1FB2EB9 /* Pods_FirebaseFacebook.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FirebaseFacebook.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5053124A758168CE1FF3C069 /* Pods_FirebaseFacebookUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FirebaseFacebookUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9477D23E22004A030064135D /* FirebaseFacebook.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FirebaseFacebook.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 9477D24122004A030064135D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 9477D24322004A030064135D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 9477D24622004A030064135D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 9477D24822004A0F0064135D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 9477D24B22004A0F0064135D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 9477D24D22004A0F0064135D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9477D25222004A0F0064135D /* FirebaseFacebookTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FirebaseFacebookTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 9477D25622004A0F0064135D /* FirebaseFacebookTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebaseFacebookTests.swift; sourceTree = ""; }; + 9477D25822004A0F0064135D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9477D25D22004A100064135D /* FirebaseFacebookUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FirebaseFacebookUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 9477D26122004A100064135D /* FirebaseFacebookUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebaseFacebookUITests.swift; sourceTree = ""; }; + 9477D26322004A100064135D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9BDCFA65CB1E545C826D3E39 /* Pods-FirebaseFacebook.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseFacebook.release.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.release.xcconfig"; sourceTree = ""; }; + B884F94B0290605173271AF9 /* Pods-FirebaseFacebookUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseFacebookUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.release.xcconfig"; sourceTree = ""; }; + C94E427160E061A377287FE4 /* Pods_FirebaseFacebookTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FirebaseFacebookTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F8A9462461C1171FC594A050 /* Pods-FirebaseFacebookUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseFacebookUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.debug.xcconfig"; sourceTree = ""; }; + FC32FCB2361A399CC749ABDB /* Pods-FirebaseFacebook.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseFacebook.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.debug.xcconfig"; sourceTree = ""; }; + FF83CBD526DA01B298C6996D /* Pods-FirebaseFacebookTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseFacebookTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 9477D23B22004A030064135D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C90EBB5216AF4F2D7A7F89CA /* Pods_FirebaseFacebook.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9477D24F22004A0F0064135D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + F6AA9EE5477E41FAD94BC9F7 /* Pods_FirebaseFacebookTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9477D25A22004A100064135D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + CAF7E0A88215A0530FC6A2EF /* Pods_FirebaseFacebookUITests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9477D23522004A030064135D = { + isa = PBXGroup; + children = ( + 9477D24022004A030064135D /* FirebaseFacebook */, + 9477D25522004A0F0064135D /* FirebaseFacebookTests */, + 9477D26022004A100064135D /* FirebaseFacebookUITests */, + 9477D23F22004A030064135D /* Products */, + D64CB8FF33C6CBD909880BBC /* Pods */, + E3898A7D461E990359B1B9A1 /* Frameworks */, + ); + sourceTree = ""; + }; + 9477D23F22004A030064135D /* Products */ = { + isa = PBXGroup; + children = ( + 9477D23E22004A030064135D /* FirebaseFacebook.app */, + 9477D25222004A0F0064135D /* FirebaseFacebookTests.xctest */, + 9477D25D22004A100064135D /* FirebaseFacebookUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 9477D24022004A030064135D /* FirebaseFacebook */ = { + isa = PBXGroup; + children = ( + 9477D24122004A030064135D /* AppDelegate.swift */, + 9477D24322004A030064135D /* ViewController.swift */, + 9477D24522004A030064135D /* Main.storyboard */, + 9477D24822004A0F0064135D /* Assets.xcassets */, + 9477D24A22004A0F0064135D /* LaunchScreen.storyboard */, + 9477D24D22004A0F0064135D /* Info.plist */, + ); + path = FirebaseFacebook; + sourceTree = ""; + }; + 9477D25522004A0F0064135D /* FirebaseFacebookTests */ = { + isa = PBXGroup; + children = ( + 9477D25622004A0F0064135D /* FirebaseFacebookTests.swift */, + 9477D25822004A0F0064135D /* Info.plist */, + ); + path = FirebaseFacebookTests; + sourceTree = ""; + }; + 9477D26022004A100064135D /* FirebaseFacebookUITests */ = { + isa = PBXGroup; + children = ( + 9477D26122004A100064135D /* FirebaseFacebookUITests.swift */, + 9477D26322004A100064135D /* Info.plist */, + ); + path = FirebaseFacebookUITests; + sourceTree = ""; + }; + D64CB8FF33C6CBD909880BBC /* Pods */ = { + isa = PBXGroup; + children = ( + FC32FCB2361A399CC749ABDB /* Pods-FirebaseFacebook.debug.xcconfig */, + 9BDCFA65CB1E545C826D3E39 /* Pods-FirebaseFacebook.release.xcconfig */, + FF83CBD526DA01B298C6996D /* Pods-FirebaseFacebookTests.debug.xcconfig */, + 10753C7E0354305B2CA74801 /* Pods-FirebaseFacebookTests.release.xcconfig */, + F8A9462461C1171FC594A050 /* Pods-FirebaseFacebookUITests.debug.xcconfig */, + B884F94B0290605173271AF9 /* Pods-FirebaseFacebookUITests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + E3898A7D461E990359B1B9A1 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 2B384B8848B919C7F1FB2EB9 /* Pods_FirebaseFacebook.framework */, + C94E427160E061A377287FE4 /* Pods_FirebaseFacebookTests.framework */, + 5053124A758168CE1FF3C069 /* Pods_FirebaseFacebookUITests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 9477D23D22004A030064135D /* FirebaseFacebook */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9477D26622004A100064135D /* Build configuration list for PBXNativeTarget "FirebaseFacebook" */; + buildPhases = ( + 83447922E8A76E1D3F0F98B1 /* [CP] Check Pods Manifest.lock */, + 9477D23A22004A030064135D /* Sources */, + 9477D23B22004A030064135D /* Frameworks */, + 9477D23C22004A030064135D /* Resources */, + FF298FC28F70F7114B16A2F7 /* [CP] Embed Pods Frameworks */, + B5A430F1034C16E4FA21E1FF /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = FirebaseFacebook; + productName = FirebaseFacebook; + productReference = 9477D23E22004A030064135D /* FirebaseFacebook.app */; + productType = "com.apple.product-type.application"; + }; + 9477D25122004A0F0064135D /* FirebaseFacebookTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9477D26922004A100064135D /* Build configuration list for PBXNativeTarget "FirebaseFacebookTests" */; + buildPhases = ( + 67949AA67C3C8490CC6D8908 /* [CP] Check Pods Manifest.lock */, + 9477D24E22004A0F0064135D /* Sources */, + 9477D24F22004A0F0064135D /* Frameworks */, + 9477D25022004A0F0064135D /* Resources */, + C499C698127A70D34B63D913 /* [CP] Embed Pods Frameworks */, + 1501E3066BF191F17F050546 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + 9477D25422004A0F0064135D /* PBXTargetDependency */, + ); + name = FirebaseFacebookTests; + productName = FirebaseFacebookTests; + productReference = 9477D25222004A0F0064135D /* FirebaseFacebookTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 9477D25C22004A100064135D /* FirebaseFacebookUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9477D26C22004A100064135D /* Build configuration list for PBXNativeTarget "FirebaseFacebookUITests" */; + buildPhases = ( + 25778CB8F6623A6D5C9A73D7 /* [CP] Check Pods Manifest.lock */, + 9477D25922004A100064135D /* Sources */, + 9477D25A22004A100064135D /* Frameworks */, + 9477D25B22004A100064135D /* Resources */, + 97D8A510DF9160C847D064D0 /* [CP] Embed Pods Frameworks */, + E5B54FE83E5CA884A32DC815 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + 9477D25F22004A100064135D /* PBXTargetDependency */, + ); + name = FirebaseFacebookUITests; + productName = FirebaseFacebookUITests; + productReference = 9477D25D22004A100064135D /* FirebaseFacebookUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 9477D23622004A030064135D /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = Seemu; + TargetAttributes = { + 9477D23D22004A030064135D = { + CreatedOnToolsVersion = 10.1; + }; + 9477D25122004A0F0064135D = { + CreatedOnToolsVersion = 10.1; + TestTargetID = 9477D23D22004A030064135D; + }; + 9477D25C22004A100064135D = { + CreatedOnToolsVersion = 10.1; + TestTargetID = 9477D23D22004A030064135D; + }; + }; + }; + buildConfigurationList = 9477D23922004A030064135D /* Build configuration list for PBXProject "FirebaseFacebook" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 9477D23522004A030064135D; + productRefGroup = 9477D23F22004A030064135D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 9477D23D22004A030064135D /* FirebaseFacebook */, + 9477D25122004A0F0064135D /* FirebaseFacebookTests */, + 9477D25C22004A100064135D /* FirebaseFacebookUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 9477D23C22004A030064135D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9477D24C22004A0F0064135D /* LaunchScreen.storyboard in Resources */, + 9477D24922004A0F0064135D /* Assets.xcassets in Resources */, + 9477D24722004A030064135D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9477D25022004A0F0064135D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9477D25B22004A100064135D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 1501E3066BF191F17F050546 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 25778CB8F6623A6D5C9A73D7 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-FirebaseFacebookUITests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 67949AA67C3C8490CC6D8908 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-FirebaseFacebookTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 83447922E8A76E1D3F0F98B1 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-FirebaseFacebook-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 97D8A510DF9160C847D064D0 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + B5A430F1034C16E4FA21E1FF /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + C499C698127A70D34B63D913 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + E5B54FE83E5CA884A32DC815 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + FF298FC28F70F7114B16A2F7 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Bolts/Bolts.framework", + "${BUILT_PRODUCTS_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework", + "${BUILT_PRODUCTS_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework", + "${BUILT_PRODUCTS_DIR}/FacebookCore/FacebookCore.framework", + "${BUILT_PRODUCTS_DIR}/FacebookLogin/FacebookLogin.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Bolts.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKCoreKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKLoginKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FacebookCore.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FacebookLogin.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 9477D23A22004A030064135D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9477D24422004A030064135D /* ViewController.swift in Sources */, + 9477D24222004A030064135D /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9477D24E22004A0F0064135D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9477D25722004A0F0064135D /* FirebaseFacebookTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9477D25922004A100064135D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9477D26222004A100064135D /* FirebaseFacebookUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 9477D25422004A0F0064135D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9477D23D22004A030064135D /* FirebaseFacebook */; + targetProxy = 9477D25322004A0F0064135D /* PBXContainerItemProxy */; + }; + 9477D25F22004A100064135D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9477D23D22004A030064135D /* FirebaseFacebook */; + targetProxy = 9477D25E22004A100064135D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 9477D24522004A030064135D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 9477D24622004A030064135D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 9477D24A22004A0F0064135D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 9477D24B22004A0F0064135D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 9477D26422004A100064135D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 9477D26522004A100064135D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 9477D26722004A100064135D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FC32FCB2361A399CC749ABDB /* Pods-FirebaseFacebook.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = XLDG57CC7V; + INFOPLIST_FILE = FirebaseFacebook/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = seemu.FirebaseFacebook; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 9477D26822004A100064135D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9BDCFA65CB1E545C826D3E39 /* Pods-FirebaseFacebook.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = XLDG57CC7V; + INFOPLIST_FILE = FirebaseFacebook/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = seemu.FirebaseFacebook; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 9477D26A22004A100064135D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FF83CBD526DA01B298C6996D /* Pods-FirebaseFacebookTests.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = XLDG57CC7V; + INFOPLIST_FILE = FirebaseFacebookTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = seemu.FirebaseFacebookTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FirebaseFacebook.app/FirebaseFacebook"; + }; + name = Debug; + }; + 9477D26B22004A100064135D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 10753C7E0354305B2CA74801 /* Pods-FirebaseFacebookTests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = XLDG57CC7V; + INFOPLIST_FILE = FirebaseFacebookTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = seemu.FirebaseFacebookTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FirebaseFacebook.app/FirebaseFacebook"; + }; + name = Release; + }; + 9477D26D22004A100064135D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F8A9462461C1171FC594A050 /* Pods-FirebaseFacebookUITests.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = XLDG57CC7V; + INFOPLIST_FILE = FirebaseFacebookUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = seemu.FirebaseFacebookUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = FirebaseFacebook; + }; + name = Debug; + }; + 9477D26E22004A100064135D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B884F94B0290605173271AF9 /* Pods-FirebaseFacebookUITests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = XLDG57CC7V; + INFOPLIST_FILE = FirebaseFacebookUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = seemu.FirebaseFacebookUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = FirebaseFacebook; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 9477D23922004A030064135D /* Build configuration list for PBXProject "FirebaseFacebook" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9477D26422004A100064135D /* Debug */, + 9477D26522004A100064135D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9477D26622004A100064135D /* Build configuration list for PBXNativeTarget "FirebaseFacebook" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9477D26722004A100064135D /* Debug */, + 9477D26822004A100064135D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9477D26922004A100064135D /* Build configuration list for PBXNativeTarget "FirebaseFacebookTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9477D26A22004A100064135D /* Debug */, + 9477D26B22004A100064135D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9477D26C22004A100064135D /* Build configuration list for PBXNativeTarget "FirebaseFacebookUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9477D26D22004A100064135D /* Debug */, + 9477D26E22004A100064135D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 9477D23622004A030064135D /* Project object */; +} diff --git a/FirebaseFacebook.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/FirebaseFacebook.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..3194625 --- /dev/null +++ b/FirebaseFacebook.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/FirebaseFacebook.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/FirebaseFacebook.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/FirebaseFacebook.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/FirebaseFacebook.xcodeproj/project.xcworkspace/xcuserdata/andrewseeley.xcuserdatad/UserInterfaceState.xcuserstate b/FirebaseFacebook.xcodeproj/project.xcworkspace/xcuserdata/andrewseeley.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..0344c81 Binary files /dev/null and b/FirebaseFacebook.xcodeproj/project.xcworkspace/xcuserdata/andrewseeley.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/FirebaseFacebook.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/xcschememanagement.plist b/FirebaseFacebook.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..c1a41ab --- /dev/null +++ b/FirebaseFacebook.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + FirebaseFacebook.xcscheme_^#shared#^_ + + orderHint + 8 + + + + diff --git a/FirebaseFacebook.xcworkspace/contents.xcworkspacedata b/FirebaseFacebook.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..724e3a3 --- /dev/null +++ b/FirebaseFacebook.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/FirebaseFacebook.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/FirebaseFacebook.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/FirebaseFacebook.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/FirebaseFacebook.xcworkspace/xcuserdata/andrewseeley.xcuserdatad/UserInterfaceState.xcuserstate b/FirebaseFacebook.xcworkspace/xcuserdata/andrewseeley.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..cbd9af6 Binary files /dev/null and b/FirebaseFacebook.xcworkspace/xcuserdata/andrewseeley.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/FirebaseFacebook/AppDelegate.swift b/FirebaseFacebook/AppDelegate.swift new file mode 100644 index 0000000..0eb047a --- /dev/null +++ b/FirebaseFacebook/AppDelegate.swift @@ -0,0 +1,52 @@ +// +// AppDelegate.swift +// FirebaseFacebook +// +// Created by Andrew Seeley on 29/1/19. +// Copyright © 2019 Seemu. All rights reserved. +// + +import UIKit +import FacebookCore + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + SDKApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions) + return true + } + + func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { + return SDKApplicationDelegate.shared.application(app, open: url, options: options) + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/FirebaseFacebook/Assets.xcassets/AppIcon.appiconset/Contents.json b/FirebaseFacebook/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/FirebaseFacebook/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/FirebaseFacebook/Assets.xcassets/Contents.json b/FirebaseFacebook/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/FirebaseFacebook/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/FirebaseFacebook/Base.lproj/LaunchScreen.storyboard b/FirebaseFacebook/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/FirebaseFacebook/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FirebaseFacebook/Base.lproj/Main.storyboard b/FirebaseFacebook/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f1bcf38 --- /dev/null +++ b/FirebaseFacebook/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FirebaseFacebook/Info.plist b/FirebaseFacebook/Info.plist new file mode 100644 index 0000000..118abff --- /dev/null +++ b/FirebaseFacebook/Info.plist @@ -0,0 +1,70 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + + CFBundleURLTypes + + + CFBundleURLSchemes + + fb254686711725675 + + + + FacebookAppID + 254686711725675 + FacebookDisplayName + Seeley Test + + LSApplicationQueriesSchemes + + fbapi + fb-messenger-share-api + fbauth2 + fbshareextension + + + + + diff --git a/FirebaseFacebook/ViewController.swift b/FirebaseFacebook/ViewController.swift new file mode 100644 index 0000000..df2c18b --- /dev/null +++ b/FirebaseFacebook/ViewController.swift @@ -0,0 +1,49 @@ +// +// ViewController.swift +// FirebaseFacebook +// +// Created by Andrew Seeley on 29/1/19. +// Copyright © 2019 Seemu. All rights reserved. +// + +import UIKit +import FacebookCore +import FacebookLogin + +class ViewController: UIViewController, LoginButtonDelegate { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + let loginButton = LoginButton(readPermissions: [.publicProfile]) + loginButton.center = view.center + loginButton.delegate = self + self.view.addSubview(loginButton) + + if let accessToken = AccessToken.current { + // User is already logged in with facebook + print("User is already logged in") + print(accessToken) + } + } + + func loginButtonDidCompleteLogin(_ loginButton: LoginButton, result: LoginResult) { + print("User logged in") + + switch result { + case .failed(let err): + print(err) + case .cancelled: + print("cancelled") + case .success(let grantedPermissions, let declinedPermissions, let accessToken): + print("success") + } + } + + func loginButtonDidLogOut(_ loginButton: LoginButton) { + print("User logged out") + } + + +} + diff --git a/FirebaseFacebookTests/FirebaseFacebookTests.swift b/FirebaseFacebookTests/FirebaseFacebookTests.swift new file mode 100644 index 0000000..f4fde34 --- /dev/null +++ b/FirebaseFacebookTests/FirebaseFacebookTests.swift @@ -0,0 +1,34 @@ +// +// FirebaseFacebookTests.swift +// FirebaseFacebookTests +// +// Created by Andrew Seeley on 29/1/19. +// Copyright © 2019 Seemu. All rights reserved. +// + +import XCTest +@testable import FirebaseFacebook + +class FirebaseFacebookTests: XCTestCase { + + override func setUp() { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/FirebaseFacebookTests/Info.plist b/FirebaseFacebookTests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/FirebaseFacebookTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/FirebaseFacebookUITests/FirebaseFacebookUITests.swift b/FirebaseFacebookUITests/FirebaseFacebookUITests.swift new file mode 100644 index 0000000..f2b4e3d --- /dev/null +++ b/FirebaseFacebookUITests/FirebaseFacebookUITests.swift @@ -0,0 +1,34 @@ +// +// FirebaseFacebookUITests.swift +// FirebaseFacebookUITests +// +// Created by Andrew Seeley on 29/1/19. +// Copyright © 2019 Seemu. All rights reserved. +// + +import XCTest + +class FirebaseFacebookUITests: XCTestCase { + + override func setUp() { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} diff --git a/FirebaseFacebookUITests/Info.plist b/FirebaseFacebookUITests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/FirebaseFacebookUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..c1fe36f --- /dev/null +++ b/Podfile @@ -0,0 +1,22 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +target 'FirebaseFacebook' do + # Comment the next line if you're not using Swift and don't want to use dynamic frameworks + use_frameworks! + + # Pods for FirebaseFacebook + pod 'FacebookCore' + pod 'FacebookLogin' + + target 'FirebaseFacebookTests' do + inherit! :search_paths + # Pods for testing + end + + target 'FirebaseFacebookUITests' do + inherit! :search_paths + # Pods for testing + end + +end diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..de7e424 --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,34 @@ +PODS: + - Bolts (1.9.0): + - Bolts/AppLinks (= 1.9.0) + - Bolts/Tasks (= 1.9.0) + - Bolts/AppLinks (1.9.0): + - Bolts/Tasks + - Bolts/Tasks (1.9.0) + - FacebookCore (0.5.0): + - Bolts (~> 1.9) + - FBSDKCoreKit (~> 4.37) + - FacebookLogin (0.5.0): + - Bolts (~> 1.9) + - FacebookCore (~> 0.5) + - FBSDKCoreKit (~> 4.37) + - FBSDKLoginKit (~> 4.37) + - FBSDKCoreKit (4.40.0): + - Bolts (~> 1.9) + - FBSDKLoginKit (4.40.0): + - FBSDKCoreKit + +DEPENDENCIES: + - FacebookCore + - FacebookLogin + +SPEC CHECKSUMS: + Bolts: ac6567323eac61e203f6a9763667d0f711be34c8 + FacebookCore: 74288d0add931d361b1596beae787ab72c438249 + FacebookLogin: ebcf34714a1cb9f0759d9f071cfb01ed500996cf + FBSDKCoreKit: ae214474b25033399c131dc81d258e412582a2ba + FBSDKLoginKit: 7a1e411d46acc8834588eca437daf34de42e1d52 + +PODFILE CHECKSUM: e13f62bc5f7a93789bee67f1b90bf380a8fa3a80 + +COCOAPODS: 1.4.0 diff --git a/Pods/Bolts/Bolts/Common/BFCancellationToken.h b/Pods/Bolts/Bolts/Common/BFCancellationToken.h new file mode 100644 index 0000000..bda32ee --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFCancellationToken.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + A block that will be called when a token is cancelled. + */ +typedef void(^BFCancellationBlock)(void); + +/*! + The consumer view of a CancellationToken. + Propagates notification that operations should be canceled. + A BFCancellationToken has methods to inspect whether the token has been cancelled. + */ +@interface BFCancellationToken : NSObject + +/*! + Whether cancellation has been requested for this token source. + */ +@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested; + +/*! + Register a block to be notified when the token is cancelled. + If the token is already cancelled the delegate will be notified immediately. + */ +- (BFCancellationTokenRegistration *)registerCancellationObserverWithBlock:(BFCancellationBlock)block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/BFCancellationToken.m b/Pods/Bolts/Bolts/Common/BFCancellationToken.m new file mode 100644 index 0000000..4acd589 --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFCancellationToken.m @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFCancellationToken.h" +#import "BFCancellationTokenRegistration.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface BFCancellationToken () + +@property (nullable, nonatomic, strong) NSMutableArray *registrations; +@property (nonatomic, strong) NSObject *lock; +@property (nonatomic) BOOL disposed; + +@end + +@interface BFCancellationTokenRegistration (BFCancellationToken) + ++ (instancetype)registrationWithToken:(BFCancellationToken *)token delegate:(BFCancellationBlock)delegate; + +- (void)notifyDelegate; + +@end + +@implementation BFCancellationToken + +@synthesize cancellationRequested = _cancellationRequested; + +#pragma mark - Initializer + +- (instancetype)init { + self = [super init]; + if (!self) return self; + + _registrations = [NSMutableArray array]; + _lock = [NSObject new]; + + return self; +} + +#pragma mark - Custom Setters/Getters + +- (BOOL)isCancellationRequested { + @synchronized(self.lock) { + [self throwIfDisposed]; + return _cancellationRequested; + } +} + +- (void)cancel { + NSArray *registrations; + @synchronized(self.lock) { + [self throwIfDisposed]; + if (_cancellationRequested) { + return; + } + [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(cancelPrivate) object:nil]; + _cancellationRequested = YES; + registrations = [self.registrations copy]; + } + + [self notifyCancellation:registrations]; +} + +- (void)notifyCancellation:(NSArray *)registrations { + for (BFCancellationTokenRegistration *registration in registrations) { + [registration notifyDelegate]; + } +} + +- (BFCancellationTokenRegistration *)registerCancellationObserverWithBlock:(BFCancellationBlock)block { + @synchronized(self.lock) { + BFCancellationTokenRegistration *registration = [BFCancellationTokenRegistration registrationWithToken:self delegate:[block copy]]; + [self.registrations addObject:registration]; + + return registration; + } +} + +- (void)unregisterRegistration:(BFCancellationTokenRegistration *)registration { + @synchronized(self.lock) { + [self throwIfDisposed]; + [self.registrations removeObject:registration]; + } +} + +// Delay on a non-public method to prevent interference with a user calling performSelector or +// cancelPreviousPerformRequestsWithTarget on the public method +- (void)cancelPrivate { + [self cancel]; +} + +- (void)cancelAfterDelay:(int)millis { + [self throwIfDisposed]; + if (millis < -1) { + [NSException raise:NSInvalidArgumentException format:@"Delay must be >= -1"]; + } + + if (millis == 0) { + [self cancel]; + return; + } + + @synchronized(self.lock) { + [self throwIfDisposed]; + [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(cancelPrivate) object:nil]; + if (self.cancellationRequested) { + return; + } + + if (millis != -1) { + double delay = (double)millis / 1000; + [self performSelector:@selector(cancelPrivate) withObject:nil afterDelay:delay]; + } + } +} + +- (void)dispose { + @synchronized(self.lock) { + if (self.disposed) { + return; + } + [self.registrations makeObjectsPerformSelector:@selector(dispose)]; + self.registrations = nil; + self.disposed = YES; + } +} + +- (void)throwIfDisposed { + if (self.disposed) { + [NSException raise:NSInternalInconsistencyException format:@"Object already disposed"]; + } +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.h b/Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.h new file mode 100644 index 0000000..fa6090f --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + Represents the registration of a cancellation observer with a cancellation token. + Can be used to unregister the observer at a later time. + */ +@interface BFCancellationTokenRegistration : NSObject + +/*! + Removes the cancellation observer registered with the token + and releases all resources associated with this registration. + */ +- (void)dispose; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.m b/Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.m new file mode 100644 index 0000000..f396c1c --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFCancellationTokenRegistration.m @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFCancellationTokenRegistration.h" + +#import "BFCancellationToken.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface BFCancellationTokenRegistration () + +@property (nonatomic, weak) BFCancellationToken *token; +@property (nullable, nonatomic, strong) BFCancellationBlock cancellationObserverBlock; +@property (nonatomic, strong) NSObject *lock; +@property (nonatomic) BOOL disposed; + +@end + +@interface BFCancellationToken (BFCancellationTokenRegistration) + +- (void)unregisterRegistration:(BFCancellationTokenRegistration *)registration; + +@end + +@implementation BFCancellationTokenRegistration + ++ (instancetype)registrationWithToken:(BFCancellationToken *)token delegate:(BFCancellationBlock)delegate { + BFCancellationTokenRegistration *registration = [BFCancellationTokenRegistration new]; + registration.token = token; + registration.cancellationObserverBlock = delegate; + return registration; +} + +- (instancetype)init { + self = [super init]; + if (!self) return self; + + _lock = [NSObject new]; + + return self; +} + +- (void)dispose { + @synchronized(self.lock) { + if (self.disposed) { + return; + } + self.disposed = YES; + } + + BFCancellationToken *token = self.token; + if (token != nil) { + [token unregisterRegistration:self]; + self.token = nil; + } + self.cancellationObserverBlock = nil; +} + +- (void)notifyDelegate { + @synchronized(self.lock) { + [self throwIfDisposed]; + self.cancellationObserverBlock(); + } +} + +- (void)throwIfDisposed { + NSAssert(!self.disposed, @"Object already disposed"); +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/BFCancellationTokenSource.h b/Pods/Bolts/Bolts/Common/BFCancellationTokenSource.h new file mode 100644 index 0000000..4627e99 --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFCancellationTokenSource.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class BFCancellationToken; + +/*! + BFCancellationTokenSource represents the producer side of a CancellationToken. + Signals to a CancellationToken that it should be canceled. + It is a cancellation token that also has methods + for changing the state of a token by cancelling it. + */ +@interface BFCancellationTokenSource : NSObject + +/*! + Creates a new cancellation token source. + */ ++ (instancetype)cancellationTokenSource; + +/*! + The cancellation token associated with this CancellationTokenSource. + */ +@property (nonatomic, strong, readonly) BFCancellationToken *token; + +/*! + Whether cancellation has been requested for this token source. + */ +@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested; + +/*! + Cancels the token if it has not already been cancelled. + */ +- (void)cancel; + +/*! + Schedules a cancel operation on this CancellationTokenSource after the specified number of milliseconds. + @param millis The number of milliseconds to wait before completing the returned task. + If delay is `0` the cancel is executed immediately. If delay is `-1` any scheduled cancellation is stopped. + */ +- (void)cancelAfterDelay:(int)millis; + +/*! + Releases all resources associated with this token source, + including disposing of all registrations. + */ +- (void)dispose; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/BFCancellationTokenSource.m b/Pods/Bolts/Bolts/Common/BFCancellationTokenSource.m new file mode 100644 index 0000000..ee05cf0 --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFCancellationTokenSource.m @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFCancellationTokenSource.h" + +#import "BFCancellationToken.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface BFCancellationToken (BFCancellationTokenSource) + +- (void)cancel; +- (void)cancelAfterDelay:(int)millis; + +- (void)dispose; +- (void)throwIfDisposed; + +@end + +@implementation BFCancellationTokenSource + +#pragma mark - Initializer + +- (instancetype)init { + self = [super init]; + if (!self) return self; + + _token = [BFCancellationToken new]; + + return self; +} + ++ (instancetype)cancellationTokenSource { + return [BFCancellationTokenSource new]; +} + +#pragma mark - Custom Setters/Getters + +- (BOOL)isCancellationRequested { + return _token.isCancellationRequested; +} + +- (void)cancel { + [_token cancel]; +} + +- (void)cancelAfterDelay:(int)millis { + [_token cancelAfterDelay:millis]; +} + +- (void)dispose { + [_token dispose]; +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/BFExecutor.h b/Pods/Bolts/Bolts/Common/BFExecutor.h new file mode 100644 index 0000000..694c8a5 --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFExecutor.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + An object that can run a given block. + */ +@interface BFExecutor : NSObject + +/*! + Returns a default executor, which runs continuations immediately until the call stack gets too + deep, then dispatches to a new GCD queue. + */ ++ (instancetype)defaultExecutor; + +/*! + Returns an executor that runs continuations on the thread where the previous task was completed. + */ ++ (instancetype)immediateExecutor; + +/*! + Returns an executor that runs continuations on the main thread. + */ ++ (instancetype)mainThreadExecutor; + +/*! + Returns a new executor that uses the given block to execute continuations. + @param block The block to use. + */ ++ (instancetype)executorWithBlock:(void(^)(void(^block)(void)))block; + +/*! + Returns a new executor that runs continuations on the given queue. + @param queue The instance of `dispatch_queue_t` to dispatch all continuations onto. + */ ++ (instancetype)executorWithDispatchQueue:(dispatch_queue_t)queue; + +/*! + Returns a new executor that runs continuations on the given queue. + @param queue The instance of `NSOperationQueue` to run all continuations on. + */ ++ (instancetype)executorWithOperationQueue:(NSOperationQueue *)queue; + +/*! + Runs the given block using this executor's particular strategy. + @param block The block to execute. + */ +- (void)execute:(void(^)(void))block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/BFExecutor.m b/Pods/Bolts/Bolts/Common/BFExecutor.m new file mode 100644 index 0000000..05d49f1 --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFExecutor.m @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFExecutor.h" + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + Get the remaining stack-size of the current thread. + + @param totalSize The total stack size of the current thread. + + @return The remaining size, in bytes, available to the current thread. + + @note This function cannot be inlined, as otherwise the internal implementation could fail to report the proper + remaining stack space. + */ +__attribute__((noinline)) static size_t remaining_stack_size(size_t *restrict totalSize) { + pthread_t currentThread = pthread_self(); + + // NOTE: We must store stack pointers as uint8_t so that the pointer math is well-defined + uint8_t *endStack = pthread_get_stackaddr_np(currentThread); + *totalSize = pthread_get_stacksize_np(currentThread); + + // NOTE: If the function is inlined, this value could be incorrect + uint8_t *frameAddr = __builtin_frame_address(0); + + return (*totalSize) - (size_t)(endStack - frameAddr); +} + +@interface BFExecutor () + +@property (nonatomic, copy) void(^block)(void(^block)(void)); + +@end + +@implementation BFExecutor + +#pragma mark - Executor methods + ++ (instancetype)defaultExecutor { + static BFExecutor *defaultExecutor = NULL; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + defaultExecutor = [self executorWithBlock:^void(void(^block)(void)) { + // We prefer to run everything possible immediately, so that there is callstack information + // when debugging. However, we don't want the stack to get too deep, so if the remaining stack space + // is less than 10% of the total space, we dispatch to another GCD queue. + size_t totalStackSize = 0; + size_t remainingStackSize = remaining_stack_size(&totalStackSize); + + if (remainingStackSize < (totalStackSize / 10)) { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block); + } else { + @autoreleasepool { + block(); + } + } + }]; + }); + return defaultExecutor; +} + ++ (instancetype)immediateExecutor { + static BFExecutor *immediateExecutor = NULL; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + immediateExecutor = [self executorWithBlock:^void(void(^block)(void)) { + block(); + }]; + }); + return immediateExecutor; +} + ++ (instancetype)mainThreadExecutor { + static BFExecutor *mainThreadExecutor = NULL; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + mainThreadExecutor = [self executorWithBlock:^void(void(^block)(void)) { + if (![NSThread isMainThread]) { + dispatch_async(dispatch_get_main_queue(), block); + } else { + @autoreleasepool { + block(); + } + } + }]; + }); + return mainThreadExecutor; +} + ++ (instancetype)executorWithBlock:(void(^)(void(^block)(void)))block { + return [[self alloc] initWithBlock:block]; +} + ++ (instancetype)executorWithDispatchQueue:(dispatch_queue_t)queue { + return [self executorWithBlock:^void(void(^block)(void)) { + dispatch_async(queue, block); + }]; +} + ++ (instancetype)executorWithOperationQueue:(NSOperationQueue *)queue { + return [self executorWithBlock:^void(void(^block)(void)) { + [queue addOperation:[NSBlockOperation blockOperationWithBlock:block]]; + }]; +} + +#pragma mark - Initializer + +- (instancetype)initWithBlock:(void(^)(void(^block)(void)))block { + self = [super init]; + if (!self) return self; + + _block = block; + + return self; +} + +#pragma mark - Execution + +- (void)execute:(void(^)(void))block { + self.block(block); +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/BFGeneric.h b/Pods/Bolts/Bolts/Common/BFGeneric.h new file mode 100644 index 0000000..99b2cf7 --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFGeneric.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +#pragma once + +/** + This exists to use along with `BFTask` and `BFTaskCompletionSource`. + + Instead of returning a `BFTask` with no generic type, or a generic type of 'NSNull' + when there is no usable result from a task, we use the type 'BFVoid', which will always have a value of `nil`. + + This allows you to provide a more enforced API contract to the caller, + as sending any message to `BFVoid` will result in a compile time error. + */ +@class _BFVoid_Nonexistant; +typedef _BFVoid_Nonexistant *BFVoid; diff --git a/Pods/Bolts/Bolts/Common/BFTask.h b/Pods/Bolts/Bolts/Common/BFTask.h new file mode 100644 index 0000000..074c182 --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFTask.h @@ -0,0 +1,266 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + Error domain used if there was multiple errors on . + */ +extern NSString *const BFTaskErrorDomain; + +/*! + An error code used for , if there were multiple errors. + */ +extern NSInteger const kBFMultipleErrorsError; + +/*! + An error userInfo key used if there were multiple errors on . + Value type is `NSArray *`. + */ +extern NSString *const BFTaskMultipleErrorsUserInfoKey; + +@class BFExecutor; +@class BFTask; + +/*! + The consumer view of a Task. A BFTask has methods to + inspect the state of the task, and to add continuations to + be run once the task is complete. + */ +@interface BFTask<__covariant ResultType> : NSObject + +/*! + A block that can act as a continuation for a task. + */ +typedef __nullable id(^BFContinuationBlock)(BFTask *t); + +/*! + Creates a task that is already completed with the given result. + @param result The result for the task. + */ ++ (instancetype)taskWithResult:(nullable ResultType)result; + +/*! + Creates a task that is already completed with the given error. + @param error The error for the task. + */ ++ (instancetype)taskWithError:(NSError *)error; + +/*! + Creates a task that is already cancelled. + */ ++ (instancetype)cancelledTask; + +/*! + Returns a task that will be completed (with result == nil) once + all of the input tasks have completed. + @param tasks An `NSArray` of the tasks to use as an input. + */ ++ (instancetype)taskForCompletionOfAllTasks:(nullable NSArray *)tasks; + +/*! + Returns a task that will be completed once all of the input tasks have completed. + If all tasks complete successfully without being faulted or cancelled the result will be + an `NSArray` of all task results in the order they were provided. + @param tasks An `NSArray` of the tasks to use as an input. + */ ++ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray *)tasks; + +/*! + Returns a task that will be completed once there is at least one successful task. + The first task to successuly complete will set the result, all other tasks results are + ignored. + @param tasks An `NSArray` of the tasks to use as an input. + */ ++ (instancetype)taskForCompletionOfAnyTask:(nullable NSArray *)tasks; + +/*! + Returns a task that will be completed a certain amount of time in the future. + @param millis The approximate number of milliseconds to wait before the + task will be finished (with result == nil). + */ ++ (BFTask *)taskWithDelay:(int)millis; + +/*! + Returns a task that will be completed a certain amount of time in the future. + @param millis The approximate number of milliseconds to wait before the + task will be finished (with result == nil). + @param token The cancellation token (optional). + */ ++ (BFTask *)taskWithDelay:(int)millis cancellationToken:(nullable BFCancellationToken *)token; + +/*! + Returns a task that will be completed after the given block completes with + the specified executor. + @param executor A BFExecutor responsible for determining how the + continuation block will be run. + @param block The block to immediately schedule to run with the given executor. + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + this method will not be completed until that task is completed. + */ ++ (instancetype)taskFromExecutor:(BFExecutor *)executor withBlock:(nullable id (^)(void))block; + +// Properties that will be set on the task once it is completed. + +/*! + The result of a successful task. + */ +@property (nullable, nonatomic, strong, readonly) ResultType result; + +/*! + The error of a failed task. + */ +@property (nullable, nonatomic, strong, readonly) NSError *error; + +/*! + Whether this task has been cancelled. + */ +@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled; + +/*! + Whether this task has completed due to an error. + */ +@property (nonatomic, assign, readonly, getter=isFaulted) BOOL faulted; + +/*! + Whether this task has completed. + */ +@property (nonatomic, assign, readonly, getter=isCompleted) BOOL completed; + +/*! + Enqueues the given block to be run once this task is complete. + This method uses a default execution strategy. The block will be + run on the thread where the previous task completes, unless the + the stack depth is too deep, in which case it will be run on a + dispatch queue with default priority. + @param block The block to be run once this task is complete. + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + this method will not be completed until that task is completed. + */ +- (BFTask *)continueWithBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueWith(block:)); + +/*! + Enqueues the given block to be run once this task is complete. + This method uses a default execution strategy. The block will be + run on the thread where the previous task completes, unless the + the stack depth is too deep, in which case it will be run on a + dispatch queue with default priority. + @param block The block to be run once this task is complete. + @param cancellationToken The cancellation token (optional). + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + this method will not be completed until that task is completed. + */ +- (BFTask *)continueWithBlock:(BFContinuationBlock)block + cancellationToken:(nullable BFCancellationToken *)cancellationToken NS_SWIFT_NAME(continueWith(block:cancellationToken:)); + +/*! + Enqueues the given block to be run once this task is complete. + @param executor A BFExecutor responsible for determining how the + continuation block will be run. + @param block The block to be run once this task is complete. + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + this method will not be completed until that task is completed. + */ +- (BFTask *)continueWithExecutor:(BFExecutor *)executor + withBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueWith(executor:block:)); + +/*! + Enqueues the given block to be run once this task is complete. + @param executor A BFExecutor responsible for determining how the + continuation block will be run. + @param block The block to be run once this task is complete. + @param cancellationToken The cancellation token (optional). + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + his method will not be completed until that task is completed. + */ +- (BFTask *)continueWithExecutor:(BFExecutor *)executor + block:(BFContinuationBlock)block + cancellationToken:(nullable BFCancellationToken *)cancellationToken +NS_SWIFT_NAME(continueWith(executor:block:cancellationToken:)); + +/*! + Identical to continueWithBlock:, except that the block is only run + if this task did not produce a cancellation or an error. + If it did, then the failure will be propagated to the returned + task. + @param block The block to be run once this task is complete. + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + this method will not be completed until that task is completed. + */ +- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueOnSuccessWith(block:)); + +/*! + Identical to continueWithBlock:, except that the block is only run + if this task did not produce a cancellation or an error. + If it did, then the failure will be propagated to the returned + task. + @param block The block to be run once this task is complete. + @param cancellationToken The cancellation token (optional). + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + this method will not be completed until that task is completed. + */ +- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block + cancellationToken:(nullable BFCancellationToken *)cancellationToken +NS_SWIFT_NAME(continueOnSuccessWith(block:cancellationToken:)); + +/*! + Identical to continueWithExecutor:withBlock:, except that the block + is only run if this task did not produce a cancellation, error, or an error. + If it did, then the failure will be propagated to the returned task. + @param executor A BFExecutor responsible for determining how the + continuation block will be run. + @param block The block to be run once this task is complete. + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + this method will not be completed until that task is completed. + */ +- (BFTask *)continueWithExecutor:(BFExecutor *)executor + withSuccessBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueOnSuccessWith(executor:block:)); + +/*! + Identical to continueWithExecutor:withBlock:, except that the block + is only run if this task did not produce a cancellation or an error. + If it did, then the failure will be propagated to the returned task. + @param executor A BFExecutor responsible for determining how the + continuation block will be run. + @param block The block to be run once this task is complete. + @param cancellationToken The cancellation token (optional). + @returns A task that will be completed after block has run. + If block returns a BFTask, then the task returned from + this method will not be completed until that task is completed. + */ +- (BFTask *)continueWithExecutor:(BFExecutor *)executor + successBlock:(BFContinuationBlock)block + cancellationToken:(nullable BFCancellationToken *)cancellationToken +NS_SWIFT_NAME(continueOnSuccessWith(executor:block:cancellationToken:)); + +/*! + Waits until this operation is completed. + This method is inefficient and consumes a thread resource while + it's running. It should be avoided. This method logs a warning + message if it is used on the main thread. + */ +- (void)waitUntilFinished; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/BFTask.m b/Pods/Bolts/Bolts/Common/BFTask.m new file mode 100644 index 0000000..0d6bd4c --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFTask.m @@ -0,0 +1,465 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFTask.h" + +#import + +#import "Bolts.h" + +NS_ASSUME_NONNULL_BEGIN + +__attribute__ ((noinline)) void warnBlockingOperationOnMainThread() { + NSLog(@"Warning: A long-running operation is being executed on the main thread. \n" + " Break on warnBlockingOperationOnMainThread() to debug."); +} + +NSString *const BFTaskErrorDomain = @"bolts"; +NSInteger const kBFMultipleErrorsError = 80175001; + +NSString *const BFTaskMultipleErrorsUserInfoKey = @"errors"; + +@interface BFTask () { + id _result; + NSError *_error; +} + +@property (nonatomic, assign, readwrite, getter=isCancelled) BOOL cancelled; +@property (nonatomic, assign, readwrite, getter=isFaulted) BOOL faulted; +@property (nonatomic, assign, readwrite, getter=isCompleted) BOOL completed; + +@property (nonatomic, strong) NSObject *lock; +@property (nonatomic, strong) NSCondition *condition; +@property (nonatomic, strong) NSMutableArray *callbacks; + +@end + +@implementation BFTask + +#pragma mark - Initializer + +- (instancetype)init { + self = [super init]; + if (!self) return self; + + _lock = [[NSObject alloc] init]; + _condition = [[NSCondition alloc] init]; + _callbacks = [NSMutableArray array]; + + return self; +} + +- (instancetype)initWithResult:(nullable id)result { + self = [super init]; + if (!self) return self; + + [self trySetResult:result]; + + return self; +} + +- (instancetype)initWithError:(NSError *)error { + self = [super init]; + if (!self) return self; + + [self trySetError:error]; + + return self; +} + +- (instancetype)initCancelled { + self = [super init]; + if (!self) return self; + + [self trySetCancelled]; + + return self; +} + +#pragma mark - Task Class methods + ++ (instancetype)taskWithResult:(nullable id)result { + return [[self alloc] initWithResult:result]; +} + ++ (instancetype)taskWithError:(NSError *)error { + return [[self alloc] initWithError:error]; +} + ++ (instancetype)cancelledTask { + return [[self alloc] initCancelled]; +} + ++ (instancetype)taskForCompletionOfAllTasks:(nullable NSArray *)tasks { + __block int32_t total = (int32_t)tasks.count; + if (total == 0) { + return [self taskWithResult:nil]; + } + + __block int32_t cancelled = 0; + NSObject *lock = [[NSObject alloc] init]; + NSMutableArray *errors = [NSMutableArray array]; + + BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource]; + for (BFTask *task in tasks) { + [task continueWithBlock:^id(BFTask *t) { + if (t.error) { + @synchronized (lock) { + [errors addObject:t.error]; + } + } else if (t.cancelled) { + OSAtomicIncrement32Barrier(&cancelled); + } + + if (OSAtomicDecrement32Barrier(&total) == 0) { + if (errors.count > 0) { + if (errors.count == 1) { + tcs.error = [errors firstObject]; + } else { + NSError *error = [NSError errorWithDomain:BFTaskErrorDomain + code:kBFMultipleErrorsError + userInfo:@{ BFTaskMultipleErrorsUserInfoKey: errors }]; + tcs.error = error; + } + } else if (cancelled > 0) { + [tcs cancel]; + } else { + tcs.result = nil; + } + } + return nil; + }]; + } + return tcs.task; +} + ++ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray *)tasks { + return [[self taskForCompletionOfAllTasks:tasks] continueWithSuccessBlock:^id(BFTask * __unused task) { + return [tasks valueForKey:@"result"]; + }]; +} + ++ (instancetype)taskForCompletionOfAnyTask:(nullable NSArray *)tasks +{ + __block int32_t total = (int32_t)tasks.count; + if (total == 0) { + return [self taskWithResult:nil]; + } + + __block int completed = 0; + __block int32_t cancelled = 0; + + NSObject *lock = [NSObject new]; + NSMutableArray *errors = [NSMutableArray new]; + + BFTaskCompletionSource *source = [BFTaskCompletionSource taskCompletionSource]; + for (BFTask *task in tasks) { + [task continueWithBlock:^id(BFTask *t) { + if (t.error != nil) { + @synchronized(lock) { + [errors addObject:t.error]; + } + } else if (t.cancelled) { + OSAtomicIncrement32Barrier(&cancelled); + } else { + if(OSAtomicCompareAndSwap32Barrier(0, 1, &completed)) { + [source setResult:t.result]; + } + } + + if (OSAtomicDecrement32Barrier(&total) == 0 && + OSAtomicCompareAndSwap32Barrier(0, 1, &completed)) { + if (cancelled > 0) { + [source cancel]; + } else if (errors.count > 0) { + if (errors.count == 1) { + source.error = errors.firstObject; + } else { + NSError *error = [NSError errorWithDomain:BFTaskErrorDomain + code:kBFMultipleErrorsError + userInfo:@{ @"errors": errors }]; + source.error = error; + } + } + } + // Abort execution of per tasks continuations + return nil; + }]; + } + return source.task; +} + + ++ (BFTask *)taskWithDelay:(int)millis { + BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource]; + dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, millis * NSEC_PER_MSEC); + dispatch_after(popTime, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){ + tcs.result = nil; + }); + return tcs.task; +} + ++ (BFTask *)taskWithDelay:(int)millis cancellationToken:(nullable BFCancellationToken *)token { + if (token.cancellationRequested) { + return [BFTask cancelledTask]; + } + + BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource]; + dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, millis * NSEC_PER_MSEC); + dispatch_after(popTime, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){ + if (token.cancellationRequested) { + [tcs cancel]; + return; + } + tcs.result = nil; + }); + return tcs.task; +} + ++ (instancetype)taskFromExecutor:(BFExecutor *)executor withBlock:(nullable id (^)(void))block { + return [[self taskWithResult:nil] continueWithExecutor:executor withBlock:^id(BFTask *task) { + return block(); + }]; +} + +#pragma mark - Custom Setters/Getters + +- (nullable id)result { + @synchronized(self.lock) { + return _result; + } +} + +- (BOOL)trySetResult:(nullable id)result { + @synchronized(self.lock) { + if (self.completed) { + return NO; + } + self.completed = YES; + _result = result; + [self runContinuations]; + return YES; + } +} + +- (nullable NSError *)error { + @synchronized(self.lock) { + return _error; + } +} + +- (BOOL)trySetError:(NSError *)error { + @synchronized(self.lock) { + if (self.completed) { + return NO; + } + self.completed = YES; + self.faulted = YES; + _error = error; + [self runContinuations]; + return YES; + } +} + +- (BOOL)isCancelled { + @synchronized(self.lock) { + return _cancelled; + } +} + +- (BOOL)isFaulted { + @synchronized(self.lock) { + return _faulted; + } +} + +- (BOOL)trySetCancelled { + @synchronized(self.lock) { + if (self.completed) { + return NO; + } + self.completed = YES; + self.cancelled = YES; + [self runContinuations]; + return YES; + } +} + +- (BOOL)isCompleted { + @synchronized(self.lock) { + return _completed; + } +} + +- (void)runContinuations { + @synchronized(self.lock) { + [self.condition lock]; + [self.condition broadcast]; + [self.condition unlock]; + for (void (^callback)(void) in self.callbacks) { + callback(); + } + [self.callbacks removeAllObjects]; + } +} + +#pragma mark - Chaining methods + +- (BFTask *)continueWithExecutor:(BFExecutor *)executor withBlock:(BFContinuationBlock)block { + return [self continueWithExecutor:executor block:block cancellationToken:nil]; +} + +- (BFTask *)continueWithExecutor:(BFExecutor *)executor + block:(BFContinuationBlock)block + cancellationToken:(nullable BFCancellationToken *)cancellationToken { + BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource]; + + // Capture all of the state that needs to used when the continuation is complete. + dispatch_block_t executionBlock = ^{ + if (cancellationToken.cancellationRequested) { + [tcs cancel]; + return; + } + + id result = block(self); + if ([result isKindOfClass:[BFTask class]]) { + + id (^setupWithTask) (BFTask *) = ^id(BFTask *task) { + if (cancellationToken.cancellationRequested || task.cancelled) { + [tcs cancel]; + } else if (task.error) { + tcs.error = task.error; + } else { + tcs.result = task.result; + } + return nil; + }; + + BFTask *resultTask = (BFTask *)result; + + if (resultTask.completed) { + setupWithTask(resultTask); + } else { + [resultTask continueWithBlock:setupWithTask]; + } + + } else { + tcs.result = result; + } + }; + + BOOL completed; + @synchronized(self.lock) { + completed = self.completed; + if (!completed) { + [self.callbacks addObject:[^{ + [executor execute:executionBlock]; + } copy]]; + } + } + if (completed) { + [executor execute:executionBlock]; + } + + return tcs.task; +} + +- (BFTask *)continueWithBlock:(BFContinuationBlock)block { + return [self continueWithExecutor:[BFExecutor defaultExecutor] block:block cancellationToken:nil]; +} + +- (BFTask *)continueWithBlock:(BFContinuationBlock)block cancellationToken:(nullable BFCancellationToken *)cancellationToken { + return [self continueWithExecutor:[BFExecutor defaultExecutor] block:block cancellationToken:cancellationToken]; +} + +- (BFTask *)continueWithExecutor:(BFExecutor *)executor + withSuccessBlock:(BFContinuationBlock)block { + return [self continueWithExecutor:executor successBlock:block cancellationToken:nil]; +} + +- (BFTask *)continueWithExecutor:(BFExecutor *)executor + successBlock:(BFContinuationBlock)block + cancellationToken:(nullable BFCancellationToken *)cancellationToken { + if (cancellationToken.cancellationRequested) { + return [BFTask cancelledTask]; + } + + return [self continueWithExecutor:executor block:^id(BFTask *task) { + if (task.faulted || task.cancelled) { + return task; + } else { + return block(task); + } + } cancellationToken:cancellationToken]; +} + +- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block { + return [self continueWithExecutor:[BFExecutor defaultExecutor] successBlock:block cancellationToken:nil]; +} + +- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block cancellationToken:(nullable BFCancellationToken *)cancellationToken { + return [self continueWithExecutor:[BFExecutor defaultExecutor] successBlock:block cancellationToken:cancellationToken]; +} + +#pragma mark - Syncing Task (Avoid it) + +- (void)warnOperationOnMainThread { + warnBlockingOperationOnMainThread(); +} + +- (void)waitUntilFinished { + if ([NSThread isMainThread]) { + [self warnOperationOnMainThread]; + } + + @synchronized(self.lock) { + if (self.completed) { + return; + } + [self.condition lock]; + } + // TODO: (nlutsenko) Restructure this to use Bolts-Swift thread access synchronization architecture + // In the meantime, it's absolutely safe to get `_completed` aka an ivar, as long as it's a `BOOL` aka less than word size. + while (!_completed) { + [self.condition wait]; + } + [self.condition unlock]; +} + +#pragma mark - NSObject + +- (NSString *)description { + // Acquire the data from the locked properties + BOOL completed; + BOOL cancelled; + BOOL faulted; + NSString *resultDescription = nil; + + @synchronized(self.lock) { + completed = self.completed; + cancelled = self.cancelled; + faulted = self.faulted; + resultDescription = completed ? [NSString stringWithFormat:@" result = %@", self.result] : @""; + } + + // Description string includes status information and, if available, the + // result since in some ways this is what a promise actually "is". + return [NSString stringWithFormat:@"<%@: %p; completed = %@; cancelled = %@; faulted = %@;%@>", + NSStringFromClass([self class]), + self, + completed ? @"YES" : @"NO", + cancelled ? @"YES" : @"NO", + faulted ? @"YES" : @"NO", + resultDescription]; +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/BFTaskCompletionSource.h b/Pods/Bolts/Bolts/Common/BFTaskCompletionSource.h new file mode 100644 index 0000000..f94c18f --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFTaskCompletionSource.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class BFTask<__covariant ResultType>; + +/*! + A BFTaskCompletionSource represents the producer side of tasks. + It is a task that also has methods for changing the state of the + task by settings its completion values. + */ +@interface BFTaskCompletionSource<__covariant ResultType> : NSObject + +/*! + Creates a new unfinished task. + */ ++ (instancetype)taskCompletionSource; + +/*! + The task associated with this TaskCompletionSource. + */ +@property (nonatomic, strong, readonly) BFTask *task; + +/*! + Completes the task by setting the result. + Attempting to set this for a completed task will raise an exception. + @param result The result of the task. + */ +- (void)setResult:(nullable ResultType)result NS_SWIFT_NAME(set(result:)); + +/*! + Completes the task by setting the error. + Attempting to set this for a completed task will raise an exception. + @param error The error for the task. + */ +- (void)setError:(NSError *)error NS_SWIFT_NAME(set(error:)); + +/*! + Completes the task by marking it as cancelled. + Attempting to set this for a completed task will raise an exception. + */ +- (void)cancel; + +/*! + Sets the result of the task if it wasn't already completed. + @returns whether the new value was set. + */ +- (BOOL)trySetResult:(nullable ResultType)result NS_SWIFT_NAME(trySet(result:)); + +/*! + Sets the error of the task if it wasn't already completed. + @param error The error for the task. + @returns whether the new value was set. + */ +- (BOOL)trySetError:(NSError *)error NS_SWIFT_NAME(trySet(error:)); + +/*! + Sets the cancellation state of the task if it wasn't already completed. + @returns whether the new value was set. + */ +- (BOOL)trySetCancelled; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/BFTaskCompletionSource.m b/Pods/Bolts/Bolts/Common/BFTaskCompletionSource.m new file mode 100644 index 0000000..33a6f89 --- /dev/null +++ b/Pods/Bolts/Bolts/Common/BFTaskCompletionSource.m @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFTaskCompletionSource.h" + +#import "BFTask.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface BFTask (BFTaskCompletionSource) + +- (BOOL)trySetResult:(nullable id)result; +- (BOOL)trySetError:(NSError *)error; +- (BOOL)trySetCancelled; + +@end + +@implementation BFTaskCompletionSource + +#pragma mark - Initializer + ++ (instancetype)taskCompletionSource { + return [[self alloc] init]; +} + +- (instancetype)init { + self = [super init]; + if (!self) return self; + + _task = [[BFTask alloc] init]; + + return self; +} + +#pragma mark - Custom Setters/Getters + +- (void)setResult:(nullable id)result { + if (![self.task trySetResult:result]) { + [NSException raise:NSInternalInconsistencyException + format:@"Cannot set the result on a completed task."]; + } +} + +- (void)setError:(NSError *)error { + if (![self.task trySetError:error]) { + [NSException raise:NSInternalInconsistencyException + format:@"Cannot set the error on a completed task."]; + } +} + +- (void)cancel { + if (![self.task trySetCancelled]) { + [NSException raise:NSInternalInconsistencyException + format:@"Cannot cancel a completed task."]; + } +} + +- (BOOL)trySetResult:(nullable id)result { + return [self.task trySetResult:result]; +} + +- (BOOL)trySetError:(NSError *)error { + return [self.task trySetError:error]; +} + +- (BOOL)trySetCancelled { + return [self.task trySetCancelled]; +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/Bolts.h b/Pods/Bolts/Bolts/Common/Bolts.h new file mode 100644 index 0000000..a3f2bd6 --- /dev/null +++ b/Pods/Bolts/Bolts/Common/Bolts.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import +#import +#import +#import +#import +#import +#import + +#if __has_include() && TARGET_OS_IPHONE && !TARGET_OS_WATCH && !TARGET_OS_TV +#import +#import +#import +#import +#import +#import +#import +#import +#import +#endif + + +NS_ASSUME_NONNULL_BEGIN + +/** + A string containing the version of the Bolts Framework used by the current application. + */ +extern NSString *const BoltsFrameworkVersionString; + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/Common/Bolts.m b/Pods/Bolts/Bolts/Common/Bolts.m new file mode 100644 index 0000000..c202687 --- /dev/null +++ b/Pods/Bolts/Bolts/Common/Bolts.m @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "Bolts.h" + +NS_ASSUME_NONNULL_BEGIN + +NSString *const BoltsFrameworkVersionString = @"1.9.0"; + +NS_ASSUME_NONNULL_END diff --git a/Pods/Bolts/Bolts/iOS/BFAppLink.h b/Pods/Bolts/Bolts/iOS/BFAppLink.h new file mode 100644 index 0000000..aa89efc --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFAppLink.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +/*! The version of the App Link protocol that this library supports */ +FOUNDATION_EXPORT NSString *const BFAppLinkVersion; + +/*! + Contains App Link metadata relevant for navigation on this device + derived from the HTML at a given URL. + */ +@interface BFAppLink : NSObject + +/*! + Creates a BFAppLink with the given list of BFAppLinkTargets and target URL. + + Generally, this will only be used by implementers of the BFAppLinkResolving protocol, + as these implementers will produce App Link metadata for a given URL. + + @param sourceURL the URL from which this App Link is derived + @param targets an ordered list of BFAppLinkTargets for this platform derived + from App Link metadata. + @param webURL the fallback web URL, if any, for the app link. + */ ++ (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL + targets:(NSArray *)targets + webURL:(NSURL *)webURL; + +/*! The URL from which this BFAppLink was derived */ +@property (nonatomic, strong, readonly) NSURL *sourceURL; + +/*! + The ordered list of targets applicable to this platform that will be used + for navigation. + */ +@property (nonatomic, copy, readonly) NSArray *targets; + +/*! The fallback web URL to use if no targets are installed on this device. */ +@property (nonatomic, strong, readonly) NSURL *webURL; + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFAppLink.m b/Pods/Bolts/Bolts/iOS/BFAppLink.m new file mode 100644 index 0000000..77fd311 --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFAppLink.m @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFAppLink_Internal.h" + +NSString *const BFAppLinkDataParameterName = @"al_applink_data"; +NSString *const BFAppLinkTargetKeyName = @"target_url"; +NSString *const BFAppLinkUserAgentKeyName = @"user_agent"; +NSString *const BFAppLinkExtrasKeyName = @"extras"; +NSString *const BFAppLinkRefererAppLink = @"referer_app_link"; +NSString *const BFAppLinkRefererAppName = @"app_name"; +NSString *const BFAppLinkRefererUrl = @"url"; +NSString *const BFAppLinkVersionKeyName = @"version"; +NSString *const BFAppLinkVersion = @"1.0"; + +@interface BFAppLink () + +@property (nonatomic, strong, readwrite) NSURL *sourceURL; +@property (nonatomic, copy, readwrite) NSArray *targets; +@property (nonatomic, strong, readwrite) NSURL *webURL; + +@property (nonatomic, assign, readwrite, getter=isBackToReferrer) BOOL backToReferrer; + +@end + +@implementation BFAppLink + ++ (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL + targets:(NSArray *)targets + webURL:(NSURL *)webURL + isBackToReferrer:(BOOL)isBackToReferrer { + BFAppLink *link = [[self alloc] initWithIsBackToReferrer:isBackToReferrer]; + link.sourceURL = sourceURL; + link.targets = [targets copy]; + link.webURL = webURL; + return link; +} + ++ (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL + targets:(NSArray *)targets + webURL:(NSURL *)webURL { + return [self appLinkWithSourceURL:sourceURL + targets:targets + webURL:webURL + isBackToReferrer:NO]; +} + +- (BFAppLink *)initWithIsBackToReferrer:(BOOL)backToReferrer { + if ((self = [super init])) { + _backToReferrer = backToReferrer; + } + return self; +} + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.h b/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.h new file mode 100644 index 0000000..4b8a71e --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.h @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +#import + +/*! + The result of calling navigate on a BFAppLinkNavigation + */ +typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) { + /*! Indicates that the navigation failed and no app was opened */ + BFAppLinkNavigationTypeFailure, + /*! Indicates that the navigation succeeded by opening the URL in the browser */ + BFAppLinkNavigationTypeBrowser, + /*! Indicates that the navigation succeeded by opening the URL in an app on the device */ + BFAppLinkNavigationTypeApp +}; + +@protocol BFAppLinkResolving; +@class BFTask; + +/*! + Represents a pending request to navigate to an App Link. Most developers will + simply use navigateToURLInBackground: to open a URL, but developers can build + custom requests with additional navigation and app data attached to them by + creating BFAppLinkNavigations themselves. + */ +NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension") +@interface BFAppLinkNavigation : NSObject + +/*! + The extras for the AppLinkNavigation. This will generally contain application-specific + data that should be passed along with the request, such as advertiser or affiliate IDs or + other such metadata relevant on this device. + */ +@property (nonatomic, copy, readonly) NSDictionary *extras; + +/*! + The al_applink_data for the AppLinkNavigation. This will generally contain data common to + navigation attempts such as back-links, user agents, and other information that may be used + in routing and handling an App Link request. + */ +@property (nonatomic, copy, readonly) NSDictionary *appLinkData; + +/*! The AppLink to navigate to */ +@property (nonatomic, strong, readonly) BFAppLink *appLink; + +/*! Creates an AppLinkNavigation with the given link, extras, and App Link data */ ++ (instancetype)navigationWithAppLink:(BFAppLink *)appLink + extras:(NSDictionary *)extras + appLinkData:(NSDictionary *)appLinkData; + +/*! + Creates an NSDictionary with the correct format for iOS callback URLs, + to be used as 'appLinkData' argument in the call to navigationWithAppLink:extras:appLinkData: + */ ++ (NSDictionary *)callbackAppLinkDataForAppWithName:(NSString *)appName url:(NSString *)url; + +/*! Performs the navigation */ +- (BFAppLinkNavigationType)navigate:(NSError **)error; + +/*! Returns a BFAppLink for the given URL */ ++ (BFTask *)resolveAppLinkInBackground:(NSURL *)destination; + +/*! Returns a BFAppLink for the given URL using the given App Link resolution strategy */ ++ (BFTask *)resolveAppLinkInBackground:(NSURL *)destination resolver:(id)resolver; + +/*! Navigates to a BFAppLink and returns whether it opened in-app or in-browser */ ++ (BFAppLinkNavigationType)navigateToAppLink:(BFAppLink *)link error:(NSError **)error; + +/*! + Returns a BFAppLinkNavigationType based on a BFAppLink. + It's essentially a no-side-effect version of navigateToAppLink:error:, + allowing apps to determine flow based on the link type (e.g. open an + internal web view instead of going straight to the browser for regular links.) + */ ++ (BFAppLinkNavigationType)navigationTypeForLink:(BFAppLink *)link; + +/*! + Return navigation type for current instance. + No-side-effect version of navigate: + */ +- (BFAppLinkNavigationType)navigationType; + +/*! Navigates to a URL (an asynchronous action) and returns a BFNavigationType */ ++ (BFTask *)navigateToURLInBackground:(NSURL *)destination; + +/*! + Navigates to a URL (an asynchronous action) using the given App Link resolution + strategy and returns a BFNavigationType + */ ++ (BFTask *)navigateToURLInBackground:(NSURL *)destination resolver:(id)resolver; + +/*! + Gets the default resolver to be used for App Link resolution. If the developer has not set one explicitly, + a basic, built-in resolver will be used. + */ ++ (id)defaultResolver; + +/*! + Sets the default resolver to be used for App Link resolution. Setting this to nil will revert the + default resolver to the basic, built-in resolver provided by Bolts. + */ ++ (void)setDefaultResolver:(id)resolver; + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.m b/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.m new file mode 100644 index 0000000..7ea12de --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.m @@ -0,0 +1,284 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFAppLinkNavigation.h" + +#import + +#import "BFMeasurementEvent_Internal.h" +#import "BFAppLink_Internal.h" + +FOUNDATION_EXPORT NSString *const BFAppLinkDataParameterName; +FOUNDATION_EXPORT NSString *const BFAppLinkTargetKeyName; +FOUNDATION_EXPORT NSString *const BFAppLinkUserAgentKeyName; +FOUNDATION_EXPORT NSString *const BFAppLinkExtrasKeyName; +FOUNDATION_EXPORT NSString *const BFAppLinkVersionKeyName; +FOUNDATION_EXPORT NSString *const BFAppLinkRefererAppLink; +FOUNDATION_EXPORT NSString *const BFAppLinkRefererAppName; +FOUNDATION_EXPORT NSString *const BFAppLinkRefererUrl; + +static id defaultResolver; + +@interface BFAppLinkNavigation () + +@property (nonatomic, copy, readwrite) NSDictionary *extras; +@property (nonatomic, copy, readwrite) NSDictionary *appLinkData; +@property (nonatomic, strong, readwrite) BFAppLink *appLink; + +@end + +@implementation BFAppLinkNavigation + ++ (instancetype)navigationWithAppLink:(BFAppLink *)appLink + extras:(NSDictionary *)extras + appLinkData:(NSDictionary *)appLinkData { + BFAppLinkNavigation *navigation = [[self alloc] init]; + navigation.appLink = appLink; + navigation.extras = extras; + navigation.appLinkData = appLinkData; + return navigation; +} + ++ (NSDictionary *)callbackAppLinkDataForAppWithName:(NSString *)appName url:(NSString *)url { + return @{BFAppLinkRefererAppLink: @{BFAppLinkRefererAppName: appName, BFAppLinkRefererUrl: url}}; +} + +- (NSString *)stringByEscapingQueryString:(NSString *)string { +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9 + return [string stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; +#else + return (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(NULL, + (CFStringRef)string, + NULL, + (CFStringRef) @":/?#[]@!$&'()*+,;=", + kCFStringEncodingUTF8)); +#endif +} + +- (NSURL *)appLinkURLWithTargetURL:(NSURL *)targetUrl error:(NSError **)error { + NSMutableDictionary *appLinkData = [NSMutableDictionary dictionaryWithDictionary:self.appLinkData ?: @{}]; + + // Add applink protocol data + if (!appLinkData[BFAppLinkUserAgentKeyName]) { + appLinkData[BFAppLinkUserAgentKeyName] = [NSString stringWithFormat:@"Bolts iOS %@", BoltsFrameworkVersionString]; + } + if (!appLinkData[BFAppLinkVersionKeyName]) { + appLinkData[BFAppLinkVersionKeyName] = BFAppLinkVersion; + } + appLinkData[BFAppLinkTargetKeyName] = [self.appLink.sourceURL absoluteString]; + appLinkData[BFAppLinkExtrasKeyName] = self.extras ?: @{}; + + // JSON-ify the applink data + NSError *jsonError = nil; + NSData *jsonBlob = [NSJSONSerialization dataWithJSONObject:appLinkData options:0 error:&jsonError]; + if (!jsonError) { + NSString *jsonString = [[NSString alloc] initWithData:jsonBlob encoding:NSUTF8StringEncoding]; + NSString *encoded = [self stringByEscapingQueryString:jsonString]; + + NSString *endUrlString = [NSString stringWithFormat:@"%@%@%@=%@", + [targetUrl absoluteString], + targetUrl.query ? @"&" : @"?", + BFAppLinkDataParameterName, + encoded]; + + return [NSURL URLWithString:endUrlString]; + } else { + if (error) { + *error = jsonError; + } + + // If there was an error encoding the app link data, fail hard. + return nil; + } +} + +- (BFAppLinkNavigationType)navigate:(NSError **)error { + NSURL *openedURL = nil; + NSError *encodingError = nil; + BFAppLinkNavigationType retType = BFAppLinkNavigationTypeFailure; + + // Find the first eligible/launchable target in the BFAppLink. + for (BFAppLinkTarget *target in self.appLink.targets) { + NSURL *appLinkAppURL = [self appLinkURLWithTargetURL:target.URL error:&encodingError]; + if (encodingError || !appLinkAppURL) { + if (error) { + *error = encodingError; + } + } else if ([[UIApplication sharedApplication] openURL:appLinkAppURL]) { + retType = BFAppLinkNavigationTypeApp; + openedURL = appLinkAppURL; + break; + } + } + + if (!openedURL && self.appLink.webURL) { + // Fall back to opening the url in the browser if available. + NSURL *appLinkBrowserURL = [self appLinkURLWithTargetURL:self.appLink.webURL error:&encodingError]; + if (encodingError || !appLinkBrowserURL) { + // If there was an error encoding the app link data, fail hard. + if (error) { + *error = encodingError; + } + } else if ([[UIApplication sharedApplication] openURL:appLinkBrowserURL]) { + // This was a browser navigation. + retType = BFAppLinkNavigationTypeBrowser; + openedURL = appLinkBrowserURL; + } + } + + [self postAppLinkNavigateEventNotificationWithTargetURL:openedURL + error:error ? *error : nil + type:retType]; + return retType; +} + +- (void)postAppLinkNavigateEventNotificationWithTargetURL:(NSURL *)outputURL error:(NSError *)error type:(BFAppLinkNavigationType)type { + NSString *const EVENT_YES_VAL = @"1"; + NSString *const EVENT_NO_VAL = @"0"; + NSMutableDictionary *logData = [[NSMutableDictionary alloc] init]; + + NSString *outputURLScheme = [outputURL scheme]; + NSString *outputURLString = [outputURL absoluteString]; + if (outputURLScheme) { + logData[@"outputURLScheme"] = outputURLScheme; + } + if (outputURLString) { + logData[@"outputURL"] = outputURLString; + } + + NSString *sourceURLString = [self.appLink.sourceURL absoluteString]; + NSString *sourceURLHost = [self.appLink.sourceURL host]; + NSString *sourceURLScheme = [self.appLink.sourceURL scheme]; + if (sourceURLString) { + logData[@"sourceURL"] = sourceURLString; + } + if (sourceURLHost) { + logData[@"sourceHost"] = sourceURLHost; + } + if (sourceURLScheme) { + logData[@"sourceScheme"] = sourceURLScheme; + } + if ([error localizedDescription]) { + logData[@"error"] = [error localizedDescription]; + } + NSString *success = nil; //no + NSString *linkType = nil; // unknown; + switch (type) { + case BFAppLinkNavigationTypeFailure: + success = EVENT_NO_VAL; + linkType = @"fail"; + break; + case BFAppLinkNavigationTypeBrowser: + success = EVENT_YES_VAL; + linkType = @"web"; + break; + case BFAppLinkNavigationTypeApp: + success = EVENT_YES_VAL; + linkType = @"app"; + break; + default: + break; + } + if (success) { + logData[@"success"] = success; + } + if (linkType) { + logData[@"type"] = linkType; + } + + if ([self.appLink isBackToReferrer]) { + [BFMeasurementEvent postNotificationForEventName:BFAppLinkNavigateBackToReferrerEventName args:logData]; + } else { + [BFMeasurementEvent postNotificationForEventName:BFAppLinkNavigateOutEventName args:logData]; + } +} + ++ (BFTask *)resolveAppLinkInBackground:(NSURL *)destination resolver:(id)resolver { + return [resolver appLinkFromURLInBackground:destination]; +} + ++ (BFTask *)resolveAppLinkInBackground:(NSURL *)destination { + return [self resolveAppLinkInBackground:destination resolver:[self defaultResolver]]; +} + ++ (BFTask *)navigateToURLInBackground:(NSURL *)destination { + return [self navigateToURLInBackground:destination + resolver:[self defaultResolver]]; +} + ++ (BFTask *)navigateToURLInBackground:(NSURL *)destination + resolver:(id)resolver { + BFTask *resolutionTask = [self resolveAppLinkInBackground:destination + resolver:resolver]; + return [resolutionTask continueWithExecutor:[BFExecutor mainThreadExecutor] + withSuccessBlock:^id(BFTask *task) { + NSError *error = nil; + BFAppLinkNavigationType result = [self navigateToAppLink:task.result + error:&error]; + if (error) { + return [BFTask taskWithError:error]; + } else { + return @(result); + } + }]; +} + ++ (BFAppLinkNavigationType)navigateToAppLink:(BFAppLink *)link error:(NSError **)error { + return [[BFAppLinkNavigation navigationWithAppLink:link + extras:nil + appLinkData:nil] navigate:error]; +} + ++ (BFAppLinkNavigationType)navigationTypeForLink:(BFAppLink *)link { + return [[self navigationWithAppLink:link extras:nil appLinkData:nil] navigationType]; +} + +- (BFAppLinkNavigationType)navigationType { + BFAppLinkTarget *eligibleTarget = nil; + for (BFAppLinkTarget *target in self.appLink.targets) { + if ([[UIApplication sharedApplication] canOpenURL:target.URL]) { + eligibleTarget = target; + break; + } + } + + if (eligibleTarget != nil) { + NSURL *appLinkURL = [self appLinkURLWithTargetURL:eligibleTarget.URL error:nil]; + if (appLinkURL != nil) { + return BFAppLinkNavigationTypeApp; + } else { + return BFAppLinkNavigationTypeFailure; + } + } + + if (self.appLink.webURL != nil) { + NSURL *appLinkURL = [self appLinkURLWithTargetURL:eligibleTarget.URL error:nil]; + if (appLinkURL != nil) { + return BFAppLinkNavigationTypeBrowser; + } else { + return BFAppLinkNavigationTypeFailure; + } + } + + return BFAppLinkNavigationTypeFailure; +} + ++ (id)defaultResolver { + if (defaultResolver) { + return defaultResolver; + } + return [BFWebViewAppLinkResolver sharedInstance]; +} + ++ (void)setDefaultResolver:(id)resolver { + defaultResolver = resolver; +} + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFAppLinkResolving.h b/Pods/Bolts/Bolts/iOS/BFAppLinkResolving.h new file mode 100644 index 0000000..5c78bff --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFAppLinkResolving.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +@class BFTask; + +/*! + Implement this protocol to provide an alternate strategy for resolving + App Links that may include pre-fetching, caching, or querying for App Link + data from an index provided by a service provider. + */ +@protocol BFAppLinkResolving + +/*! + Asynchronously resolves App Link data for a given URL. + + @param url The URL to resolve into an App Link. + @returns A BFTask that will return a BFAppLink for the given URL. + */ +- (BFTask *)appLinkFromURLInBackground:(NSURL *)url NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension"); + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.h b/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.h new file mode 100644 index 0000000..436c528 --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.h @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import +#import + +#import + +@class BFAppLink; +@class BFAppLinkReturnToRefererController; + +/*! + Protocol that a class can implement in order to be notified when the user has navigated back + to the referer of an App Link. + */ +@protocol BFAppLinkReturnToRefererControllerDelegate + +@optional + +/*! Called when the user has tapped to navigate, but before the navigation has been performed. */ +- (void)returnToRefererController:(BFAppLinkReturnToRefererController *)controller + willNavigateToAppLink:(BFAppLink *)appLink; + +/*! Called after the navigation has been attempted, with an indication of whether the referer + app link was successfully opened. */ +- (void)returnToRefererController:(BFAppLinkReturnToRefererController *)controller + didNavigateToAppLink:(BFAppLink *)url + type:(BFAppLinkNavigationType)type; + +@end + +/*! + A controller class that implements default behavior for a BFAppLinkReturnToRefererView, including + the ability to display the view above the navigation bar for navigation-based apps. + */ +NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension") +@interface BFAppLinkReturnToRefererController : NSObject + +/*! + The delegate that will be notified when the user navigates back to the referer. + */ +@property (nonatomic, weak) id delegate; + +/*! + The BFAppLinkReturnToRefererView this controller is controlling. + */ +@property (nonatomic, strong) BFAppLinkReturnToRefererView *view; + +/*! + Initializes a controller suitable for controlling a BFAppLinkReturnToRefererView that is to be displayed + contained within another UIView (i.e., not displayed above the navigation bar). + */ +- (instancetype)init; + +/*! + Initializes a controller suitable for controlling a BFAppLinkReturnToRefererView that is to be displayed + displayed above the navigation bar. + */ +- (instancetype)initForDisplayAboveNavController:(UINavigationController *)navController; + +/*! + Removes the view entirely from the navigation controller it is currently displayed in. + */ +- (void)removeFromNavController; + +/*! + Shows the BFAppLinkReturnToRefererView with the specified referer information. If nil or missing data, + the view will not be displayed. */ +- (void)showViewForRefererAppLink:(BFAppLink *)refererAppLink; + +/*! + Shows the BFAppLinkReturnToRefererView with referer information extracted from the specified URL. + If nil or missing referer App Link data, the view will not be displayed. */ +- (void)showViewForRefererURL:(NSURL *)url; + +/*! + Closes the view, possibly animating it. + */ +- (void)closeViewAnimated:(BOOL)animated; + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.m b/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.m new file mode 100644 index 0000000..d380635 --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.m @@ -0,0 +1,230 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFAppLinkReturnToRefererController.h" + +#import "BFAppLink.h" +#import "BFAppLinkReturnToRefererView_Internal.h" +#import "BFURL_Internal.h" + +static const CFTimeInterval kBFViewAnimationDuration = 0.25f; + +@implementation BFAppLinkReturnToRefererController { + UINavigationController *_navigationController; + BFAppLinkReturnToRefererView *_view; +} + +#pragma mark - Object lifecycle + +- (instancetype)init { + return [self initForDisplayAboveNavController:nil]; +} + +- (instancetype)initForDisplayAboveNavController:(UINavigationController *)navController { + self = [super init]; + if (self) { + _navigationController = navController; + + if (_navigationController != nil) { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self + selector:@selector(statusBarFrameWillChange:) + name:UIApplicationWillChangeStatusBarFrameNotification + object:nil]; + [nc addObserver:self + selector:@selector(statusBarFrameDidChange:) + name:UIApplicationDidChangeStatusBarFrameNotification + object:nil]; + [nc addObserver:self + selector:@selector(orientationDidChange:) + name:UIDeviceOrientationDidChangeNotification + object:nil]; + } + } + return self; +} + +- (void)dealloc { + _view.delegate = nil; + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +#pragma mark - Public API + +- (BFAppLinkReturnToRefererView *)view { + if (!_view) { + self.view = [[BFAppLinkReturnToRefererView alloc] initWithFrame:CGRectZero]; + if (_navigationController) { + [_navigationController.view addSubview:_view]; + } + } + return _view; +} + +- (void)setView:(BFAppLinkReturnToRefererView *)view { + if (_view != view) { + _view.delegate = nil; + } + + _view = view; + _view.delegate = self; + + if (_navigationController) { + _view.includeStatusBarInSize = BFIncludeStatusBarInSizeAlways; + } +} + +- (void)showViewForRefererAppLink:(BFAppLink *)refererAppLink { + self.view.refererAppLink = refererAppLink; + + [_view sizeToFit]; + + if (_navigationController) { + if (!_view.closed) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self moveNavigationBar]; + }); + } + } +} + +- (void)showViewForRefererURL:(NSURL *)url { + BFAppLink *appLink = [BFURL URLForRenderBackToReferrerBarURL:url].appLinkReferer; + [self showViewForRefererAppLink:appLink]; +} + +- (void)removeFromNavController { + if (_navigationController) { + [_view removeFromSuperview]; + _navigationController = nil; + } +} + +#pragma mark - BFAppLinkReturnToRefererViewDelegate + +- (void)returnToRefererViewDidTapInsideCloseButton:(BFAppLinkReturnToRefererView *)view { + [self closeViewAnimated:YES explicitlyClosed:YES]; +} + +- (void)returnToRefererViewDidTapInsideLink:(BFAppLinkReturnToRefererView *)view + link:(BFAppLink *)link { + [self openRefererAppLink:link]; + [self closeViewAnimated:NO explicitlyClosed:NO]; +} + +#pragma mark - Private + +- (void)statusBarFrameWillChange:(NSNotification *)notification { + NSValue *rectValue = [[notification userInfo] valueForKey:UIApplicationStatusBarFrameUserInfoKey]; + CGRect newFrame; + [rectValue getValue:&newFrame]; + + if (_navigationController && !_view.closed) { + if (CGRectGetHeight(newFrame) == 40) { + UIViewAnimationOptions options = UIViewAnimationOptionBeginFromCurrentState; + [UIView animateWithDuration:kBFViewAnimationDuration delay:0.0 options:options animations:^{ + _view.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(_view.bounds), 0.0); + } completion:nil]; + } + } +} + +- (void)statusBarFrameDidChange:(NSNotification *)notification { + NSValue *rectValue = [[notification userInfo] valueForKey:UIApplicationStatusBarFrameUserInfoKey]; + CGRect newFrame; + [rectValue getValue:&newFrame]; + + if (_navigationController && !_view.closed) { + if (CGRectGetHeight(newFrame) == 40) { + UIViewAnimationOptions options = UIViewAnimationOptionBeginFromCurrentState; + [UIView animateWithDuration:kBFViewAnimationDuration delay:0.0 options:options animations:^{ + [_view sizeToFit]; + [self moveNavigationBar]; + } completion:nil]; + } + } +} + +- (void)orientationDidChange:(NSNotificationCenter *)notification { + if (_navigationController && !_view.closed && CGRectGetHeight(_view.bounds) > 0) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self moveNavigationBar]; + }); + } +} + +- (void)moveNavigationBar { + if (_view.closed || !_view.refererAppLink) { + return; + } + + [self updateNavigationBarY:CGRectGetHeight(_view.bounds)]; +} + +- (void)updateNavigationBarY:(CGFloat)y { + UINavigationBar *navigationBar = _navigationController.navigationBar; + CGRect navigationBarFrame = navigationBar.frame; + CGFloat oldContainerViewY = CGRectGetMaxY(navigationBarFrame); + navigationBarFrame.origin.y = y; + navigationBar.frame = navigationBarFrame; + + CGFloat dy = CGRectGetMaxY(navigationBarFrame) - oldContainerViewY; + UIView *containerView = _navigationController.visibleViewController.view.superview; + containerView.frame = UIEdgeInsetsInsetRect(containerView.frame, UIEdgeInsetsMake(dy, 0.0, 0.0, 0.0)); +} + +- (void)closeViewAnimated:(BOOL)animated { + [self closeViewAnimated:animated explicitlyClosed:YES]; +} + +- (void)closeViewAnimated:(BOOL)animated explicitlyClosed:(BOOL)explicitlyClosed { + void (^closer)(void) = ^{ + if (_navigationController) { + [self updateNavigationBarY:_view.statusBarHeight]; + } + + CGRect frame = _view.frame; + frame.size.height = 0.0; + _view.frame = frame; + }; + + if (animated) { + [UIView animateWithDuration:kBFViewAnimationDuration animations:^{ + closer(); + } completion:^(BOOL finished) { + if (explicitlyClosed) { + _view.closed = YES; + } + }]; + } else { + closer(); + if (explicitlyClosed) { + _view.closed = YES; + } + } +} + +- (void)openRefererAppLink:(BFAppLink *)refererAppLink { + if (refererAppLink) { + id delegate = _delegate; + if ([delegate respondsToSelector:@selector(returnToRefererController:willNavigateToAppLink:)]) { + [delegate returnToRefererController:self willNavigateToAppLink:refererAppLink]; + } + + NSError *error = nil; + BFAppLinkNavigationType type = [BFAppLinkNavigation navigateToAppLink:refererAppLink error:&error]; + + if ([delegate respondsToSelector:@selector(returnToRefererController:didNavigateToAppLink:type:)]) { + [delegate returnToRefererController:self didNavigateToAppLink:refererAppLink type:type]; + } + } +} + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererView.h b/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererView.h new file mode 100644 index 0000000..f62bc66 --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererView.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import +#import + +#import + +@class BFAppLinkReturnToRefererView; +@class BFURL; + +typedef NS_ENUM(NSUInteger, BFIncludeStatusBarInSize) { + BFIncludeStatusBarInSizeNever, + BFIncludeStatusBarInSizeIOS7AndLater, + BFIncludeStatusBarInSizeAlways, +}; + +/*! + Protocol that a class can implement in order to be notified when the user has navigated back + to the referer of an App Link. + */ +@protocol BFAppLinkReturnToRefererViewDelegate + +/*! + Called when the user has tapped inside the close button. + */ +- (void)returnToRefererViewDidTapInsideCloseButton:(BFAppLinkReturnToRefererView *)view; + +/*! + Called when the user has tapped inside the App Link portion of the view. + */ +- (void)returnToRefererViewDidTapInsideLink:(BFAppLinkReturnToRefererView *)view + link:(BFAppLink *)link; + +@end + +/*! + Provides a UIView that displays a button allowing users to navigate back to the + application that launched the App Link currently being handled, if the App Link + contained referer data. The user can also close the view by clicking a close button + rather than navigating away. If the view is provided an App Link that does not contain + referer data, it will have zero size and no UI will be displayed. + */ +NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension") +@interface BFAppLinkReturnToRefererView : UIView + +/*! + The delegate that will be notified when the user navigates back to the referer. + */ +@property (nonatomic, weak) id delegate; + +/*! + The color of the text label and close button. + */ +@property (nonatomic, strong) UIColor *textColor; + +@property (nonatomic, strong) BFAppLink *refererAppLink; + +/*! + Indicates whether to extend the size of the view to include the current status bar + size, for use in scenarios where the view might extend under the status bar on iOS 7 and + above; this property has no effect on earlier versions of iOS. + */ +@property (nonatomic, assign) BFIncludeStatusBarInSize includeStatusBarInSize; + +/*! + Indicates whether the user has closed the view by clicking the close button. + */ +@property (nonatomic, assign) BOOL closed; + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererView.m b/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererView.m new file mode 100644 index 0000000..f2d0e79 --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererView.m @@ -0,0 +1,268 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFAppLinkReturnToRefererView.h" + +#import "BFAppLink.h" +#import "BFAppLinkTarget.h" + +static const CGFloat BFMarginX = 8.5f; +static const CGFloat BFMarginY = 8.5f; + +static NSString *const BFRefererAppLink = @"referer_app_link"; +static NSString *const BFRefererAppName = @"app_name"; +static NSString *const BFRefererUrl = @"url"; +static const CGFloat BFCloseButtonWidth = 12.0; +static const CGFloat BFCloseButtonHeight = 12.0; + +@interface BFAppLinkReturnToRefererView () + +@property (nonatomic, strong) UILabel *labelView; +@property (nonatomic, strong) UIButton *closeButton; +@property (nonatomic, strong) UITapGestureRecognizer *insideTapGestureRecognizer; + +@end + +@implementation BFAppLinkReturnToRefererView { + BOOL _explicitlyHidden; +} + +#pragma mark - Initialization + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self commonInit]; + [self sizeToFit]; + } + return self; +} + +- (instancetype)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self commonInit]; + } + return self; +} + +- (void)commonInit { + // Initialization code + _includeStatusBarInSize = BFIncludeStatusBarInSizeIOS7AndLater; + + // iOS 7 system blue color + self.backgroundColor = [UIColor colorWithRed:0.0f green:122.0f / 255.0f blue:1.0f alpha:1.0f]; + self.textColor = [UIColor whiteColor]; + self.clipsToBounds = YES; + + [self initViews]; +} + +- (void)initViews { + if (!_labelView && !_closeButton) { + _closeButton = [UIButton buttonWithType:UIButtonTypeCustom]; + _closeButton.backgroundColor = [UIColor clearColor]; + _closeButton.userInteractionEnabled = YES; + _closeButton.clipsToBounds = YES; + _closeButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin; + _closeButton.contentMode = UIViewContentModeCenter; + [_closeButton addTarget:self action:@selector(closeButtonTapped:) forControlEvents:UIControlEventTouchUpInside]; + + [self addSubview:_closeButton]; + + _labelView = [[UILabel alloc] initWithFrame:CGRectZero]; + _labelView.font = [UIFont systemFontOfSize:[UIFont smallSystemFontSize]]; + _labelView.textColor = [UIColor whiteColor]; + _labelView.backgroundColor = [UIColor clearColor]; +#ifdef __IPHONE_6_0 + _labelView.textAlignment = NSTextAlignmentCenter; +#else + _labelView.textAlignment = UITextAlignmentCenter; +#endif + _labelView.clipsToBounds = YES; + [self updateLabelText]; + [self addSubview:_labelView]; + + _insideTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTapInside:)]; + _labelView.userInteractionEnabled = YES; + [_labelView addGestureRecognizer:_insideTapGestureRecognizer]; + + [self updateColors]; + } +} + +#pragma mark - Layout + +- (CGSize)intrinsicContentSize { + CGSize size = self.bounds.size; + if (_closed || !self.hasRefererData) { + size.height = 0.0; + } else { + CGSize labelSize = [_labelView sizeThatFits:size]; + size = CGSizeMake(size.width, labelSize.height + 2 * BFMarginY + self.statusBarHeight); + } + return size; +} + +- (void)layoutSubviews { + [super layoutSubviews]; + + CGRect bounds = self.bounds; + + _labelView.preferredMaxLayoutWidth = _labelView.bounds.size.width; + CGSize labelSize = [_labelView sizeThatFits:bounds.size]; + _labelView.frame = CGRectMake(BFMarginX, + CGRectGetMaxY(bounds) - labelSize.height - 1.5f * BFMarginY, + CGRectGetMaxX(bounds) - BFCloseButtonWidth - 3 * BFMarginX, + labelSize.height + BFMarginY); + + _closeButton.frame = CGRectMake(CGRectGetMaxX(bounds) - BFCloseButtonWidth - 2 * BFMarginX, + _labelView.center.y - BFCloseButtonHeight / 2.0f - BFMarginY, + BFCloseButtonWidth + 2 * BFMarginX, + BFCloseButtonHeight + 2 * BFMarginY); +} + +- (CGSize)sizeThatFits:(CGSize)size { + if (_closed || !self.hasRefererData) { + size = CGSizeMake(size.width, 0.0); + } else { + CGSize labelSize = [_labelView sizeThatFits:size]; + size = CGSizeMake(size.width, labelSize.height + 2 * BFMarginY + self.statusBarHeight); + } + return size; +} + +- (CGFloat)statusBarHeight { + UIApplication *application = [UIApplication sharedApplication]; + + BOOL include; + switch (_includeStatusBarInSize) { + case BFIncludeStatusBarInSizeAlways: + include = YES; + break; + case BFIncludeStatusBarInSizeIOS7AndLater: { + float systemVersion = [[[UIDevice currentDevice] systemVersion] floatValue]; + include = (systemVersion >= 7.0); + break; + } + case BFIncludeStatusBarInSizeNever: + include = NO; + break; + } + if (include && !application.statusBarHidden) { + BOOL landscape = UIInterfaceOrientationIsLandscape(application.statusBarOrientation); + CGRect statusBarFrame = application.statusBarFrame; + return landscape ? CGRectGetWidth(statusBarFrame) : CGRectGetHeight(statusBarFrame); + } + + return 0; +} + +#pragma mark - Public API + +- (void)setIncludeStatusBarInSize:(BFIncludeStatusBarInSize)includeStatusBarInSize { + _includeStatusBarInSize = includeStatusBarInSize; + [self setNeedsLayout]; + [self invalidateIntrinsicContentSize]; +} + +- (void)setTextColor:(UIColor *)textColor { + _textColor = textColor; + [self updateColors]; +} + +- (void)setRefererAppLink:(BFAppLink *)refererAppLink { + _refererAppLink = refererAppLink; + [self updateLabelText]; + [self updateHidden]; + [self invalidateIntrinsicContentSize]; +} + +- (void)setClosed:(BOOL)closed { + if (_closed != closed) { + _closed = closed; + [self updateHidden]; + [self invalidateIntrinsicContentSize]; + } +} + +- (void)setHidden:(BOOL)hidden { + _explicitlyHidden = hidden; + [self updateHidden]; +} + +#pragma mark - Private + +- (void)updateLabelText { + NSString *appName = (_refererAppLink && _refererAppLink.targets[0]) ? [_refererAppLink.targets[0] appName] : nil; + _labelView.text = [self localizedLabelForReferer:appName]; +} + +- (void)updateColors { + UIImage *closeButtonImage = [self drawCloseButtonImageWithColor:_textColor]; + + _labelView.textColor = _textColor; + [_closeButton setImage:closeButtonImage forState:UIControlStateNormal]; +} + +- (UIImage *)drawCloseButtonImageWithColor:(UIColor *)color { + + UIGraphicsBeginImageContextWithOptions(CGSizeMake(BFCloseButtonWidth, BFCloseButtonHeight), NO, 0.0f); + + CGContextRef context = UIGraphicsGetCurrentContext(); + + CGContextSetStrokeColorWithColor(context, [color CGColor]); + CGContextSetFillColorWithColor(context, [color CGColor]); + + CGContextSetLineWidth(context, 1.25f); + + CGFloat inset = 0.5f; + + CGContextMoveToPoint(context, inset, inset); + CGContextAddLineToPoint(context, BFCloseButtonWidth - inset, BFCloseButtonHeight - inset); + CGContextStrokePath(context); + + CGContextMoveToPoint(context, BFCloseButtonWidth - inset, inset); + CGContextAddLineToPoint(context, inset, BFCloseButtonHeight - inset); + CGContextStrokePath(context); + + UIImage *result = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + return result; +} + +- (NSString *)localizedLabelForReferer:(NSString *)refererName { + if (!refererName) { + return nil; + } + + NSString *format = NSLocalizedString(@"Touch to return to %1$@", @"Format for the string to return to a calling app."); + + return [NSString stringWithFormat:format, refererName]; +} + +- (BOOL)hasRefererData { + return _refererAppLink && _refererAppLink.targets[0]; +} + +- (void)closeButtonTapped:(id)sender { + [_delegate returnToRefererViewDidTapInsideCloseButton:self]; +} + +- (void)onTapInside:(UIGestureRecognizer *)sender { + [_delegate returnToRefererViewDidTapInsideLink:self link:_refererAppLink]; +} + +- (void)updateHidden { + [super setHidden:_explicitlyHidden || _closed || !self.hasRefererData]; +} + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFAppLinkTarget.h b/Pods/Bolts/Bolts/iOS/BFAppLinkTarget.h new file mode 100644 index 0000000..6172126 --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFAppLinkTarget.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +/*! + Represents a target defined in App Link metadata, consisting of at least + a URL, and optionally an App Store ID and name. + */ +@interface BFAppLinkTarget : NSObject + +/*! Creates a BFAppLinkTarget with the given app site and target URL. */ ++ (instancetype)appLinkTargetWithURL:(NSURL *)url + appStoreId:(NSString *)appStoreId + appName:(NSString *)appName; + +/*! The URL prefix for this app link target */ +@property (nonatomic, strong, readonly) NSURL *URL; + +/*! The app ID for the app store */ +@property (nonatomic, copy, readonly) NSString *appStoreId; + +/*! The name of the app */ +@property (nonatomic, copy, readonly) NSString *appName; + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFAppLinkTarget.m b/Pods/Bolts/Bolts/iOS/BFAppLinkTarget.m new file mode 100644 index 0000000..5518cba --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFAppLinkTarget.m @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFAppLinkTarget.h" + +@interface BFAppLinkTarget () + +@property (nonatomic, strong, readwrite) NSURL *URL; +@property (nonatomic, copy, readwrite) NSString *appStoreId; +@property (nonatomic, copy, readwrite) NSString *appName; + +@end + +@implementation BFAppLinkTarget + ++ (instancetype)appLinkTargetWithURL:(NSURL *)url + appStoreId:(NSString *)appStoreId + appName:(NSString *)appName { + BFAppLinkTarget *target = [[self alloc] init]; + target.URL = url; + target.appStoreId = appStoreId; + target.appName = appName; + return target; +} + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFMeasurementEvent.h b/Pods/Bolts/Bolts/iOS/BFMeasurementEvent.h new file mode 100644 index 0000000..b3173fc --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFMeasurementEvent.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +/*! The name of the notification posted by BFMeasurementEvent */ +FOUNDATION_EXPORT NSString *const BFMeasurementEventNotificationName; + +/*! Defines keys in the userInfo object for the notification named BFMeasurementEventNotificationName */ +/*! The string field for the name of the event */ +FOUNDATION_EXPORT NSString *const BFMeasurementEventNameKey; +/*! The dictionary field for the arguments of the event */ +FOUNDATION_EXPORT NSString *const BFMeasurementEventArgsKey; + +/*! Bolts Events raised by BFMeasurementEvent for Applink */ +/*! + The name of the event posted when [BFURL URLWithURL:] is called successfully. This represents the successful parsing of an app link URL. + */ +FOUNDATION_EXPORT NSString *const BFAppLinkParseEventName; + +/*! + The name of the event posted when [BFURL URLWithInboundURL:] is called successfully. + This represents parsing an inbound app link URL from a different application + */ +FOUNDATION_EXPORT NSString *const BFAppLinkNavigateInEventName; + +/*! The event raised when the user navigates from your app to other apps */ +FOUNDATION_EXPORT NSString *const BFAppLinkNavigateOutEventName; + +/*! + The event raised when the user navigates out from your app and back to the referrer app. + e.g when the user leaves your app after tapping the back-to-referrer navigation bar + */ +FOUNDATION_EXPORT NSString *const BFAppLinkNavigateBackToReferrerEventName; + +@interface BFMeasurementEvent : NSObject + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFMeasurementEvent.m b/Pods/Bolts/Bolts/iOS/BFMeasurementEvent.m new file mode 100644 index 0000000..e3e6cde --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFMeasurementEvent.m @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFMeasurementEvent_Internal.h" + +NSString *const BFMeasurementEventNotificationName = @"com.parse.bolts.measurement_event"; + +NSString *const BFMeasurementEventNameKey = @"event_name"; +NSString *const BFMeasurementEventArgsKey = @"event_args"; + +/* app Link Event raised by this BFURL */ +NSString *const BFAppLinkParseEventName = @"al_link_parse"; +NSString *const BFAppLinkNavigateInEventName = @"al_nav_in"; + +/*! AppLink events raised in this class */ +NSString *const BFAppLinkNavigateOutEventName = @"al_nav_out"; +NSString *const BFAppLinkNavigateBackToReferrerEventName = @"al_ref_back_out"; + +__attribute__((noinline)) void warnOnMissingEventName() { + NSLog(@"Warning: Missing event name when logging bolts measurement event. \n" + " Ignoring this event in logging."); +} + +@implementation BFMeasurementEvent { + NSString *_name; + NSDictionary *_args; +} + +- (void)postNotification { + if (!_name) { + warnOnMissingEventName(); + return; + } + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + NSDictionary *userInfo = @{BFMeasurementEventNameKey : _name, + BFMeasurementEventArgsKey : _args}; + + [center postNotificationName:BFMeasurementEventNotificationName + object:self + userInfo:userInfo]; +} + +- (instancetype)initEventWithName:(NSString *)name args:(NSDictionary *)args { + if ((self = [super init])) { + _name = name; + _args = args ? args : @{}; + } + return self; +} + ++ (void)postNotificationForEventName:(NSString *)name args:(NSDictionary *)args { + [[[self alloc] initEventWithName:name args:args] postNotification]; +} + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFURL.h b/Pods/Bolts/Bolts/iOS/BFURL.h new file mode 100644 index 0000000..924c91d --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFURL.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +@class BFAppLink; + +/*! + Provides a set of utilities for working with NSURLs, such as parsing of query parameters + and handling for App Link requests. + */ +@interface BFURL : NSObject + +/*! + Creates a link target from a raw URL. + On success, this posts the BFAppLinkParseEventName measurement event. If you are constructing the BFURL within your application delegate's + application:openURL:sourceApplication:annotation:, you should instead use URLWithInboundURL:sourceApplication: + to support better BFMeasurementEvent notifications + @param url The instance of `NSURL` to create BFURL from. + */ ++ (BFURL *)URLWithURL:(NSURL *)url; + +/*! + Creates a link target from a raw URL received from an external application. This is typically called from the app delegate's + application:openURL:sourceApplication:annotation: and will post the BFAppLinkNavigateInEventName measurement event. + @param url The instance of `NSURL` to create BFURL from. + @param sourceApplication the bundle ID of the app that is requesting your app to open the URL. The same sourceApplication in application:openURL:sourceApplication:annotation: + */ ++ (BFURL *)URLWithInboundURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication; + +/*! + Gets the target URL. If the link is an App Link, this is the target of the App Link. + Otherwise, it is the url that created the target. + */ +@property (nonatomic, strong, readonly) NSURL *targetURL; + +/*! + Gets the query parameters for the target, parsed into an NSDictionary. + */ +@property (nonatomic, strong, readonly) NSDictionary *targetQueryParameters; + +/*! + If this link target is an App Link, this is the data found in al_applink_data. + Otherwise, it is nil. + */ +@property (nonatomic, strong, readonly) NSDictionary *appLinkData; + +/*! + If this link target is an App Link, this is the data found in extras. + */ +@property (nonatomic, strong, readonly) NSDictionary *appLinkExtras; + +/*! + The App Link indicating how to navigate back to the referer app, if any. + */ +@property (nonatomic, strong, readonly) BFAppLink *appLinkReferer; + +/*! + The URL that was used to create this BFURL. + */ +@property (nonatomic, strong, readonly) NSURL *inputURL; + +/*! + The query parameters of the inputURL, parsed into an NSDictionary. + */ +@property (nonatomic, strong, readonly) NSDictionary *inputQueryParameters; + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFURL.m b/Pods/Bolts/Bolts/iOS/BFURL.m new file mode 100644 index 0000000..14a1384 --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFURL.m @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import "BFURL_Internal.h" +#import "BFAppLink_Internal.h" +#import "BFAppLinkTarget.h" +#import "BFMeasurementEvent_Internal.h" + +@implementation BFURL + +- (instancetype)initWithURL:(NSURL *)url forOpenInboundURL:(BOOL)forOpenURLEvent sourceApplication:(NSString *)sourceApplication forRenderBackToReferrerBar:(BOOL)forRenderBackToReferrerBar { + self = [super init]; + if (!self) return nil; + + _inputURL = url; + _targetURL = url; + + // Parse the query string parameters for the base URL + NSDictionary *baseQuery = [BFURL queryParametersForURL:url]; + _inputQueryParameters = baseQuery; + _targetQueryParameters = baseQuery; + + // Check for applink_data + NSString *appLinkDataString = baseQuery[BFAppLinkDataParameterName]; + if (appLinkDataString) { + // Try to parse the JSON + NSError *error = nil; + NSDictionary *applinkData = [NSJSONSerialization JSONObjectWithData:[appLinkDataString dataUsingEncoding:NSUTF8StringEncoding] + options:0 + error:&error]; + if (!error && [applinkData isKindOfClass:[NSDictionary class]]) { + // If the version is not specified, assume it is 1. + NSString *version = applinkData[BFAppLinkVersionKeyName] ?: @"1.0"; + NSString *target = applinkData[BFAppLinkTargetKeyName]; + if ([version isKindOfClass:[NSString class]] && + [version isEqual:BFAppLinkVersion]) { + // There's applink data! The target should actually be the applink target. + _appLinkData = applinkData; + id applinkExtras = applinkData[BFAppLinkExtrasKeyName]; + if (applinkExtras && [applinkExtras isKindOfClass:[NSDictionary class]]) { + _appLinkExtras = applinkExtras; + } + _targetURL = ([target isKindOfClass:[NSString class]] ? [NSURL URLWithString:target] : url); + _targetQueryParameters = [BFURL queryParametersForURL:_targetURL]; + + NSDictionary *refererAppLink = _appLinkData[BFAppLinkRefererAppLink]; + NSString *refererURLString = refererAppLink[BFAppLinkRefererUrl]; + NSString *refererAppName = refererAppLink[BFAppLinkRefererAppName]; + + if (refererURLString && refererAppName) { + BFAppLinkTarget *appLinkTarget = [BFAppLinkTarget appLinkTargetWithURL:[NSURL URLWithString:refererURLString] + appStoreId:nil + appName:refererAppName]; + _appLinkReferer = [BFAppLink appLinkWithSourceURL:[NSURL URLWithString:refererURLString] + targets:@[ appLinkTarget ] + webURL:nil + isBackToReferrer:YES]; + } + + // Raise Measurement Event + NSString *const EVENT_YES_VAL = @"1"; + NSString *const EVENT_NO_VAL = @"0"; + NSMutableDictionary *logData = [[NSMutableDictionary alloc] init]; + logData[@"version"] = version; + if (refererURLString) { + logData[@"refererURL"] = refererURLString; + } + if (refererAppName) { + logData[@"refererAppName"] = refererAppName; + } + if (sourceApplication) { + logData[@"sourceApplication"] = sourceApplication; + } + if ([_targetURL absoluteString]) { + logData[@"targetURL"] = [_targetURL absoluteString]; + } + if ([_inputURL absoluteString]) { + logData[@"inputURL"] = [_inputURL absoluteString]; + } + if ([_inputURL scheme]) { + logData[@"inputURLScheme"] = [_inputURL scheme]; + } + logData[@"forRenderBackToReferrerBar"] = forRenderBackToReferrerBar ? EVENT_YES_VAL : EVENT_NO_VAL; + logData[@"forOpenUrl"] = forOpenURLEvent ? EVENT_YES_VAL : EVENT_NO_VAL; + [BFMeasurementEvent postNotificationForEventName:BFAppLinkParseEventName args:logData]; + if (forOpenURLEvent) { + [BFMeasurementEvent postNotificationForEventName:BFAppLinkNavigateInEventName args:logData]; + } + } + } + } + + return self; +} + ++ (BFURL *)URLWithURL:(NSURL *)url { + return [[BFURL alloc] initWithURL:url forOpenInboundURL:NO sourceApplication:nil forRenderBackToReferrerBar:NO]; +} + ++ (BFURL *)URLWithInboundURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication { + return [[BFURL alloc] initWithURL:url forOpenInboundURL:YES sourceApplication:sourceApplication forRenderBackToReferrerBar:NO]; +} + ++ (BFURL *)URLForRenderBackToReferrerBarURL:(NSURL *)url { + return [[BFURL alloc] initWithURL:url forOpenInboundURL:NO sourceApplication:nil forRenderBackToReferrerBar:YES]; +} + ++ (NSString *)decodeURLString:(NSString *)string { + return (NSString *)CFBridgingRelease(CFURLCreateStringByReplacingPercentEscapes(NULL, + (CFStringRef)string, + CFSTR(""))); +} + ++ (NSDictionary *)queryParametersForURL:(NSURL *)url { + NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; + NSString *query = url.query; + if ([query isEqualToString:@""]) { + return @{}; + } + NSArray *queryComponents = [query componentsSeparatedByString:@"&"]; + for (NSString *component in queryComponents) { + NSRange equalsLocation = [component rangeOfString:@"="]; + if (equalsLocation.location == NSNotFound) { + // There's no equals, so associate the key with NSNull + parameters[[self decodeURLString:component]] = [NSNull null]; + } else { + NSString *key = [self decodeURLString:[component substringToIndex:equalsLocation.location]]; + NSString *value = [self decodeURLString:[component substringFromIndex:equalsLocation.location + 1]]; + parameters[key] = value; + } + } + return [NSDictionary dictionaryWithDictionary:parameters]; +} + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFWebViewAppLinkResolver.h b/Pods/Bolts/Bolts/iOS/BFWebViewAppLinkResolver.h new file mode 100644 index 0000000..3782ae2 --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFWebViewAppLinkResolver.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +#import + +/*! + A reference implementation for an App Link resolver that uses a hidden UIWebView + to parse the HTML containing App Link metadata. + */ +@interface BFWebViewAppLinkResolver : NSObject + +/*! + Gets the instance of a BFWebViewAppLinkResolver. + */ ++ (instancetype)sharedInstance; + +@end diff --git a/Pods/Bolts/Bolts/iOS/BFWebViewAppLinkResolver.m b/Pods/Bolts/Bolts/iOS/BFWebViewAppLinkResolver.m new file mode 100644 index 0000000..0e0d58c --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/BFWebViewAppLinkResolver.m @@ -0,0 +1,296 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +#import "BFWebViewAppLinkResolver.h" +#import "BFAppLink.h" +#import "BFAppLinkTarget.h" +#import "BFTask.h" +#import "BFTaskCompletionSource.h" +#import "BFExecutor.h" + +// Defines JavaScript to extract app link tags from HTML content +static NSString *const BFWebViewAppLinkResolverTagExtractionJavaScript = @"" +"(function() {" +" var metaTags = document.getElementsByTagName('meta');" +" var results = [];" +" for (var i = 0; i < metaTags.length; i++) {" +" var property = metaTags[i].getAttribute('property');" +" if (property && property.substring(0, 'al:'.length) === 'al:') {" +" var tag = { \"property\": metaTags[i].getAttribute('property') };" +" if (metaTags[i].hasAttribute('content')) {" +" tag['content'] = metaTags[i].getAttribute('content');" +" }" +" results.push(tag);" +" }" +" }" +" return JSON.stringify(results);" +"})()"; +static NSString *const BFWebViewAppLinkResolverIOSURLKey = @"url"; +static NSString *const BFWebViewAppLinkResolverIOSAppStoreIdKey = @"app_store_id"; +static NSString *const BFWebViewAppLinkResolverIOSAppNameKey = @"app_name"; +static NSString *const BFWebViewAppLinkResolverDictionaryValueKey = @"_value"; +static NSString *const BFWebViewAppLinkResolverPreferHeader = @"Prefer-Html-Meta-Tags"; +static NSString *const BFWebViewAppLinkResolverMetaTagPrefix = @"al"; +static NSString *const BFWebViewAppLinkResolverWebKey = @"web"; +static NSString *const BFWebViewAppLinkResolverIOSKey = @"ios"; +static NSString *const BFWebViewAppLinkResolverIPhoneKey = @"iphone"; +static NSString *const BFWebViewAppLinkResolverIPadKey = @"ipad"; +static NSString *const BFWebViewAppLinkResolverWebURLKey = @"url"; +static NSString *const BFWebViewAppLinkResolverShouldFallbackKey = @"should_fallback"; + +@interface BFWebViewAppLinkResolverWebViewDelegate : NSObject + +@property (nonatomic, copy) void (^didFinishLoad)(UIWebView *webView); +@property (nonatomic, copy) void (^didFailLoadWithError)(UIWebView *webView, NSError *error); +@property (nonatomic, assign) BOOL hasLoaded; + +@end + +@implementation BFWebViewAppLinkResolverWebViewDelegate + +- (void)webViewDidFinishLoad:(UIWebView *)webView { + if (self.didFinishLoad) { + self.didFinishLoad(webView); + } +} + +- (void)webViewDidStartLoad:(UIWebView *)webView { +} + +- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { + if (self.didFailLoadWithError) { + self.didFailLoadWithError(webView, error); + } +} + +- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { + if (self.hasLoaded) { + // Consider loading a second resource to be "success", since it indicates an inner frame + // or redirect is happening. We can run the tag extraction script at this point. + self.didFinishLoad(webView); + return NO; + } + self.hasLoaded = YES; + return YES; +} + +@end + +@implementation BFWebViewAppLinkResolver + ++ (instancetype)sharedInstance { + static id instance; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc] init]; + }); + return instance; +} + +- (BFTask *)followRedirects:(NSURL *)url { + // This task will be resolved with either the redirect NSURL + // or a dictionary with the response data to be returned. + BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request setValue:BFWebViewAppLinkResolverMetaTagPrefix forHTTPHeaderField:BFWebViewAppLinkResolverPreferHeader]; + + void (^completion)(NSURLResponse *response, NSData *data, NSError *error) = ^(NSURLResponse *response, NSData *data, NSError *error) { + if (error) { + [tcs setError:error]; + return; + } + + if ([response isKindOfClass:[NSHTTPURLResponse class]]) { + NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; + + // NSURLConnection usually follows redirects automatically, but the + // documentation is unclear what the default is. This helps it along. + if (httpResponse.statusCode >= 300 && httpResponse.statusCode < 400) { + NSString *redirectString = httpResponse.allHeaderFields[@"Location"]; + NSURL *redirectURL = [NSURL URLWithString:redirectString]; + [tcs setResult:redirectURL]; + return; + } + } + + [tcs setResult:@{ @"response" : response, @"data" : data }]; + }; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9 + NSURLSession *session = [NSURLSession sharedSession]; + [[session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + completion(response, data, error); + }] resume]; +#else + [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:completion]; +#endif + + return [tcs.task continueWithSuccessBlock:^id(BFTask *task) { + // If we redirected, just keep recursing. + if ([task.result isKindOfClass:[NSURL class]]) { + return [self followRedirects:task.result]; + } + return task; + }]; +} + +- (BFTask *)appLinkFromURLInBackground:(NSURL *)url NS_EXTENSION_UNAVAILABLE_IOS("") { + return [[self followRedirects:url] continueWithExecutor:[BFExecutor mainThreadExecutor] + withSuccessBlock:^id(BFTask *task) { + NSData *responseData = task.result[@"data"]; + NSHTTPURLResponse *response = task.result[@"response"]; + BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource]; + + UIWebView *webView = [[UIWebView alloc] init]; + BFWebViewAppLinkResolverWebViewDelegate *listener = [[BFWebViewAppLinkResolverWebViewDelegate alloc] init]; + __block BFWebViewAppLinkResolverWebViewDelegate *retainedListener = listener; + listener.didFinishLoad = ^(UIWebView *view) { + if (retainedListener) { + NSDictionary *ogData = [self getALDataFromLoadedPage:view]; + [view removeFromSuperview]; + view.delegate = nil; + retainedListener = nil; + [tcs setResult:[self appLinkFromALData:ogData destination:url]]; + } + }; + listener.didFailLoadWithError = ^(UIWebView* view, NSError *error) { + if (retainedListener) { + [view removeFromSuperview]; + view.delegate = nil; + retainedListener = nil; + [tcs setError:error]; + } + }; + webView.delegate = listener; + webView.hidden = YES; + [webView loadData:responseData + MIMEType:response.MIMEType + textEncodingName:response.textEncodingName + baseURL:response.URL]; + UIWindow *window = [UIApplication sharedApplication].windows.firstObject; + [window addSubview:webView]; + + return tcs.task; + }]; +} + +/* + Builds up a data structure filled with the app link data from the meta tags on a page. + The structure of this object is a dictionary where each key holds an array of app link + data dictionaries. Values are stored in a key called "_value". + */ +- (NSDictionary *)parseALData:(NSArray *)dataArray { + NSMutableDictionary *al = [NSMutableDictionary dictionary]; + for (NSDictionary *tag in dataArray) { + NSString *name = tag[@"property"]; + if (![name isKindOfClass:[NSString class]]) { + continue; + } + NSArray *nameComponents = [name componentsSeparatedByString:@":"]; + if (![nameComponents[0] isEqualToString:BFWebViewAppLinkResolverMetaTagPrefix]) { + continue; + } + NSMutableDictionary *root = al; + for (NSUInteger i = 1; i < nameComponents.count; i++) { + NSMutableArray *children = root[nameComponents[i]]; + if (!children) { + children = [NSMutableArray array]; + root[nameComponents[i]] = children; + } + NSMutableDictionary *child = children.lastObject; + if (!child || i == nameComponents.count - 1) { + child = [NSMutableDictionary dictionary]; + [children addObject:child]; + } + root = child; + } + if (tag[@"content"]) { + root[BFWebViewAppLinkResolverDictionaryValueKey] = tag[@"content"]; + } + } + return al; +} + +- (NSDictionary *)getALDataFromLoadedPage:(UIWebView *)webView { + // Run some JavaScript in the webview to fetch the meta tags. + NSString *jsonString = [webView stringByEvaluatingJavaScriptFromString:BFWebViewAppLinkResolverTagExtractionJavaScript]; + NSError *error = nil; + NSArray *arr = [NSJSONSerialization JSONObjectWithData:[jsonString dataUsingEncoding:NSUTF8StringEncoding] + options:0 + error:&error]; + return [self parseALData:arr]; +} + +/* + Converts app link data into a BFAppLink containing the targets relevant for this platform. + */ +- (BFAppLink *)appLinkFromALData:(NSDictionary *)appLinkDict destination:(NSURL *)destination { + NSMutableArray *linkTargets = [NSMutableArray array]; + + NSArray *platformData = nil; + + const UIUserInterfaceIdiom idiom = UI_USER_INTERFACE_IDIOM(); + if (idiom == UIUserInterfaceIdiomPad) { + platformData = @[ appLinkDict[BFWebViewAppLinkResolverIPadKey] ?: @{}, + appLinkDict[BFWebViewAppLinkResolverIOSKey] ?: @{} ]; + } else if (idiom == UIUserInterfaceIdiomPhone) { + platformData = @[ appLinkDict[BFWebViewAppLinkResolverIPhoneKey] ?: @{}, + appLinkDict[BFWebViewAppLinkResolverIOSKey] ?: @{} ]; + } else { + // Future-proofing. Other User Interface idioms should only hit ios. + platformData = @[ appLinkDict[BFWebViewAppLinkResolverIOSKey] ?: @{} ]; + } + + for (NSArray *platformObjects in platformData) { + for (NSDictionary *platformDict in platformObjects) { + // The schema requires a single url/app store id/app name, + // but we could find multiple of them. We'll make a best effort + // to interpret this data. + NSArray *urls = platformDict[BFWebViewAppLinkResolverIOSURLKey]; + NSArray *appStoreIds = platformDict[BFWebViewAppLinkResolverIOSAppStoreIdKey]; + NSArray *appNames = platformDict[BFWebViewAppLinkResolverIOSAppNameKey]; + + NSUInteger maxCount = MAX(urls.count, MAX(appStoreIds.count, appNames.count)); + + for (NSUInteger i = 0; i < maxCount; i++) { + NSString *urlString = urls[i][BFWebViewAppLinkResolverDictionaryValueKey]; + NSURL *url = urlString ? [NSURL URLWithString:urlString] : nil; + NSString *appStoreId = appStoreIds[i][BFWebViewAppLinkResolverDictionaryValueKey]; + NSString *appName = appNames[i][BFWebViewAppLinkResolverDictionaryValueKey]; + BFAppLinkTarget *target = [BFAppLinkTarget appLinkTargetWithURL:url + appStoreId:appStoreId + appName:appName]; + [linkTargets addObject:target]; + } + } + } + + NSDictionary *webDict = appLinkDict[BFWebViewAppLinkResolverWebKey][0]; + NSString *webUrlString = webDict[BFWebViewAppLinkResolverWebURLKey][0][BFWebViewAppLinkResolverDictionaryValueKey]; + NSString *shouldFallbackString = webDict[BFWebViewAppLinkResolverShouldFallbackKey][0][BFWebViewAppLinkResolverDictionaryValueKey]; + + NSURL *webUrl = destination; + + if (shouldFallbackString && + [@[ @"no", @"false", @"0" ] containsObject:[shouldFallbackString lowercaseString]]) { + webUrl = nil; + } + if (webUrl && webUrlString) { + webUrl = [NSURL URLWithString:webUrlString]; + } + + return [BFAppLink appLinkWithSourceURL:destination + targets:linkTargets + webURL:webUrl]; +} + +@end diff --git a/Pods/Bolts/Bolts/iOS/Internal/BFAppLinkReturnToRefererView_Internal.h b/Pods/Bolts/Bolts/iOS/Internal/BFAppLinkReturnToRefererView_Internal.h new file mode 100644 index 0000000..8b85823 --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/Internal/BFAppLinkReturnToRefererView_Internal.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +@interface BFAppLinkReturnToRefererView (Internal) + +- (CGFloat)statusBarHeight; + +@end diff --git a/Pods/Bolts/Bolts/iOS/Internal/BFAppLink_Internal.h b/Pods/Bolts/Bolts/iOS/Internal/BFAppLink_Internal.h new file mode 100644 index 0000000..aeeaa53 --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/Internal/BFAppLink_Internal.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +FOUNDATION_EXPORT NSString *const BFAppLinkDataParameterName; +FOUNDATION_EXPORT NSString *const BFAppLinkTargetKeyName; +FOUNDATION_EXPORT NSString *const BFAppLinkUserAgentKeyName; +FOUNDATION_EXPORT NSString *const BFAppLinkExtrasKeyName; +FOUNDATION_EXPORT NSString *const BFAppLinkVersionKeyName; +FOUNDATION_EXPORT NSString *const BFAppLinkRefererAppLink; +FOUNDATION_EXPORT NSString *const BFAppLinkRefererAppName; +FOUNDATION_EXPORT NSString *const BFAppLinkRefererUrl; + +@interface BFAppLink (Internal) + ++ (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL + targets:(NSArray *)targets + webURL:(NSURL *)webURL + isBackToReferrer:(BOOL)isBackToReferrer; + +/*! return if this AppLink is to go back to referrer. */ +@property (nonatomic, assign, readonly, getter=isBackToReferrer) BOOL backToReferrer; + +@end diff --git a/Pods/Bolts/Bolts/iOS/Internal/BFMeasurementEvent_Internal.h b/Pods/Bolts/Bolts/iOS/Internal/BFMeasurementEvent_Internal.h new file mode 100644 index 0000000..7d46fd0 --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/Internal/BFMeasurementEvent_Internal.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import +/*! + Provides methods for posting notifications from the Bolts framework + */ +@interface BFMeasurementEvent (Internal) + ++ (void)postNotificationForEventName:(NSString *)name args:(NSDictionary *)args; + +@end diff --git a/Pods/Bolts/Bolts/iOS/Internal/BFURL_Internal.h b/Pods/Bolts/Bolts/iOS/Internal/BFURL_Internal.h new file mode 100644 index 0000000..03b6bc6 --- /dev/null +++ b/Pods/Bolts/Bolts/iOS/Internal/BFURL_Internal.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#import + +@interface BFURL (Internal) ++ (BFURL *)URLForRenderBackToReferrerBarURL:(NSURL *)url; +@end diff --git a/Pods/Bolts/LICENSE b/Pods/Bolts/LICENSE new file mode 100644 index 0000000..e1a5831 --- /dev/null +++ b/Pods/Bolts/LICENSE @@ -0,0 +1,30 @@ +BSD License + +For Bolts software + +Copyright (c) 2013-present, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Pods/Bolts/README.md b/Pods/Bolts/README.md new file mode 100644 index 0000000..5e972c8 --- /dev/null +++ b/Pods/Bolts/README.md @@ -0,0 +1,683 @@ +Bolts +============ +[![Build Status](https://img.shields.io/travis/BoltsFramework/Bolts-ObjC/master.svg?style=flat)](https://travis-ci.org/BoltsFramework/Bolts-ObjC) +[![Coverage Status](https://codecov.io/github/BoltsFramework/Bolts-ObjC/coverage.svg?branch=master)](https://codecov.io/github/BoltsFramework/Bolts-ObjC?branch=master) +[![Pod Platform](https://img.shields.io/cocoapods/p/Bolts.svg?style=flat)](https://cocoapods.org/pods/Bolts) +[![Pod License](https://img.shields.io/cocoapods/l/Bolts.svg?style=flat)](https://github.com/BoltsFramework/Bolts-ObjC/blob/master/LICENSE) +[![Reference Status](https://www.versioneye.com/objective-c/bolts/reference_badge.svg?style=flat)](https://www.versioneye.com/objective-c/bolts/references) + +[![Pod Version](https://img.shields.io/cocoapods/v/Bolts.svg?style=flat)](https://cocoapods.org/pods/Bolts) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) + +Bolts is a collection of low-level libraries designed to make developing mobile +apps easier. Bolts was designed by Parse and Facebook for our own internal use, +and we have decided to open source these libraries to make them available to +others. Using these libraries does not require using any Parse services. Nor +do they require having a Parse or Facebook developer account. + +Bolts includes: + +* "Tasks", which make organization of complex asynchronous code more manageable. A task is kind of like a JavaScript Promise, but available for iOS and Android. +* An implementation of the [App Links protocol](http://applinks.org/), helping you link to content in other apps and handle incoming deep-links. + +For more information, see the [Bolts iOS API Reference](http://boltsframework.github.io/docs/ios/). + +# Tasks + +To build a truly responsive iOS application, you must keep long-running operations off of the UI thread, and be careful to avoid blocking anything the UI thread might be waiting on. This means you will need to execute various operations in the background. To make this easier, we've added a class called `BFTask`. A task represents the result of an asynchronous operation. Typically, a `BFTask` is returned from an asynchronous function and gives the ability to continue processing the result of the task. When a task is returned from a function, it's already begun doing its job. A task is not tied to a particular threading model: it represents the work being done, not where it is executing. Tasks have many advantages over other methods of asynchronous programming, such as callbacks. `BFTask` is not a replacement for `NSOperation` or GCD. In fact, they play well together. But tasks do fill in some gaps that those technologies don't address. +* `BFTask` takes care of managing dependencies for you. Unlike using `NSOperation` for dependency management, you don't have to declare all dependencies before starting a `BFTask`. For example, imagine you need to save a set of objects and each one may or may not require saving child objects. With an `NSOperation`, you would normally have to create operations for each of the child saves ahead of time. But you don't always know before you start the work whether that's going to be necessary. That can make managing dependencies with `NSOperation` very painful. Even in the best case, you have to create your dependencies before the operations that depend on them, which results in code that appears in a different order than it executes. With `BFTask`, you can decide during your operation's work whether there will be subtasks and return the other task in just those cases. +* `BFTasks` release their dependencies. `NSOperation` strongly retains its dependencies, so if you have a queue of ordered operations and sequence them using dependencies, you have a leak, because every operation gets retained forever. `BFTasks` release their callbacks as soon as they are run, so everything cleans up after itself. This can reduce memory use, and simplify memory management. +* `BFTasks` keep track of the state of finished tasks: It tracks whether there was a returned value, the task was cancelled, or if an error occurred. It also has convenience methods for propagating errors. With `NSOperation`, you have to build all of this stuff yourself. +* `BFTasks` don't depend on any particular threading model. So it's easy to have some tasks perform their work with an operation queue, while others perform work using blocks with GCD. These tasks can depend on each other seamlessly. +* Performing several tasks in a row will not create nested "pyramid" code as you would get when using only callbacks. +* `BFTasks` are fully composable, allowing you to perform branching, parallelism, and complex error handling, without the spaghetti code of having many named callbacks. +* You can arrange task-based code in the order that it executes, rather than having to split your logic across scattered callback functions. + +For the examples in this doc, assume there are async versions of some common Parse methods, called `saveAsync:` and `findAsync:` which return a `Task`. In a later section, we'll show how to define these functions yourself. + +## The `continueWithBlock` Method + +Every `BFTask` has a method named `continueWithBlock:` which takes a continuation block. A continuation is a block that will be executed when the task is complete. You can then inspect the task to check if it was successful and to get its result. + +```objective-c +// Objective-C +[[self saveAsync:obj] continueWithBlock:^id(BFTask *task) { + if (task.isCancelled) { + // the save was cancelled. + } else if (task.error) { + // the save failed. + } else { + // the object was saved successfully. + PFObject *object = task.result; + } + return nil; +}]; +``` + +```swift +// Swift +self.saveAsync(obj).continueWithBlock { + (task: BFTask!) -> BFTask in + if task.isCancelled() { + // the save was cancelled. + } else if task.error != nil { + // the save failed. + } else { + // the object was saved successfully. + var object = task.result() as PFObject + } +} +``` + +BFTasks use Objective-C blocks, so the syntax should be pretty straightforward. Let's look closer at the types involved with an example. + +```objective-c +// Objective-C +/** + * Gets an NSString asynchronously. + */ +- (BFTask *)getStringAsync { + // Let's suppose getNumberAsync returns a BFTask whose result is an NSNumber. + return [[self getNumberAsync] continueWithBlock:^id(BFTask *task) { + // This continuation block takes the NSNumber BFTask as input, + // and provides an NSString as output. + + NSNumber *number = task.result; + return [NSString stringWithFormat:@"%@", number]; + )]; +} +``` + +```swift +// Swift +/** + * Gets an NSString asynchronously. + */ +func getStringAsync() -> BFTask { + //Let's suppose getNumberAsync returns a BFTask whose result is an NSNumber. + return self.getNumberAsync().continueWithBlock { + (task: BFTask!) -> NSString in + // This continuation block takes the NSNumber BFTask as input, + // and provides an NSString as output. + + let number = task.result() as NSNumber + return NSString(format:"%@", number) + } +} +``` + +In many cases, you only want to do more work if the previous task was successful, and propagate any errors or cancellations to be dealt with later. To do this, use the `continueWithSuccessBlock:` method instead of `continueWithBlock:`. + +```objective-c +// Objective-C +[[self saveAsync:obj] continueWithSuccessBlock:^id(BFTask *task) { + // the object was saved successfully. + return nil; +}]; +``` + +```swift +// Swift +self.saveAsync(obj).continueWithSuccessBlock { + (task: BFTask!) -> AnyObject! in + // the object was saved successfully. + return nil +} +``` + +## Chaining Tasks Together + +BFTasks are a little bit magical, in that they let you chain them without nesting. If you return a BFTask from `continueWithBlock:`, then the task returned by `continueWithBlock:` will not be considered finished until the new task returned from the new continuation block. This lets you perform multiple actions without incurring the pyramid code you would get with callbacks. Likewise, you can return a `BFTask` from `continueWithSuccessBlock:`. So, return a `BFTask` to do more asynchronous work. + +```objective-c +// Objective-C +PFQuery *query = [PFQuery queryWithClassName:@"Student"]; +[query orderByDescending:@"gpa"]; +[[[[[self findAsync:query] continueWithSuccessBlock:^id(BFTask *task) { + NSArray *students = task.result; + PFObject *valedictorian = [students objectAtIndex:0]; + [valedictorian setObject:@YES forKey:@"valedictorian"]; + return [self saveAsync:valedictorian]; +}] continueWithSuccessBlock:^id(BFTask *task) { + PFObject *valedictorian = task.result; + return [self findAsync:query]; +}] continueWithSuccessBlock:^id(BFTask *task) { + NSArray *students = task.result; + PFObject *salutatorian = [students objectAtIndex:1]; + [salutatorian setObject:@YES forKey:@"salutatorian"]; + return [self saveAsync:salutatorian]; +}] continueWithSuccessBlock:^id(BFTask *task) { + // Everything is done! + return nil; +}]; +``` + +```swift +// Swift +var query = PFQuery(className:"Student") +query.orderByDescending("gpa") +findAsync(query).continueWithSuccessBlock { + (task: BFTask!) -> BFTask in + let students = task.result() as NSArray + var valedictorian = students.objectAtIndex(0) as PFObject + valedictorian["valedictorian"] = true + return self.saveAsync(valedictorian) +}.continueWithSuccessBlock { + (task: BFTask!) -> BFTask in + var valedictorian = task.result() as PFObject + return self.findAsync(query) +}.continueWithSuccessBlock { + (task: BFTask!) -> BFTask in + let students = task.result() as NSArray + var salutatorian = students.objectAtIndex(1) as PFObject + salutatorian["salutatorian"] = true + return self.saveAsync(salutatorian) +}.continueWithSuccessBlock { + (task: BFTask!) -> AnyObject! in + // Everything is done! + return nil +} +``` + +## Error Handling + +By carefully choosing whether to call `continueWithBlock:` or `continueWithSuccessBlock:`, you can control how errors are propagated in your application. Using `continueWithBlock:` lets you handle errors by transforming them or dealing with them. You can think of failed tasks kind of like throwing an exception. In fact, if you throw an exception inside a continuation, the resulting task will be faulted with that exception. + +```objective-c +// Objective-C +PFQuery *query = [PFQuery queryWithClassName:@"Student"]; +[query orderByDescending:@"gpa"]; +[[[[[self findAsync:query] continueWithSuccessBlock:^id(BFTask *task) { + NSArray *students = task.result; + PFObject *valedictorian = [students objectAtIndex:0]; + [valedictorian setObject:@YES forKey:@"valedictorian"]; + // Force this callback to fail. + return [BFTask taskWithError:[NSError errorWithDomain:@"example.com" + code:-1 + userInfo:nil]]; +}] continueWithSuccessBlock:^id(BFTask *task) { + // Now this continuation will be skipped. + PFQuery *valedictorian = task.result; + return [self findAsync:query]; +}] continueWithBlock:^id(BFTask *task) { + if (task.error) { + // This error handler WILL be called. + // The error will be the NSError returned above. + // Let's handle the error by returning a new value. + // The task will be completed with nil as its value. + return nil; + } + // This will also be skipped. + NSArray *students = task.result; + PFObject *salutatorian = [students objectAtIndex:1]; + [salutatorian setObject:@YES forKey:@"salutatorian"]; + return [self saveAsync:salutatorian]; +}] continueWithSuccessBlock:^id(BFTask *task) { + // Everything is done! This gets called. + // The task's result is nil. + return nil; +}]; +``` + +```swift +// Swift +var query = PFQuery(className:"Student") +query.orderByDescending("gpa") +findAsync(query).continueWithSuccessBlock { + (task: BFTask!) -> BFTask in + let students = task.result() as NSArray + var valedictorian = students.objectAtIndex(0) as PFObject + valedictorian["valedictorian"] = true + //Force this callback to fail. + return BFTask(error:NSError(domain:"example.com", + code:-1, userInfo: nil)) +}.continueWithSuccessBlock { + (task: BFTask!) -> AnyObject! in + //Now this continuation will be skipped. + var valedictorian = task.result() as PFObject + return self.findAsync(query) +}.continueWithBlock { + (task: BFTask!) -> AnyObject! in + if task.error != nil { + // This error handler WILL be called. + // The error will be the NSError returned above. + // Let's handle the error by returning a new value. + // The task will be completed with nil as its value. + return nil + } + // This will also be skipped. + let students = task.result() as NSArray + var salutatorian = students.objectAtIndex(1) as PFObject + salutatorian["salutatorian"] = true + return self.saveAsync(salutatorian) +}.continueWithSuccessBlock { + (task: BFTask!) -> AnyObject! in + // Everything is done! This gets called. + // The tasks result is nil. + return nil +} +``` + +It's often convenient to have a long chain of success callbacks with only one error handler at the end. + +## Creating Tasks + +When you're getting started, you can just use the tasks returned from methods like `findAsync:` or `saveAsync:`. However, for more advanced scenarios, you may want to make your own tasks. To do that, you create a `BFTaskCompletionSource`. This object will let you create a new `BFTask`, and control whether it gets marked as finished or cancelled. After you create a `BFTaskCompletionSource`, you'll need to call `setResult:`, `setError:`, or `cancel` to trigger its continuations. + +```objective-c +// Objective-C +- (BFTask *)successAsync { + BFTaskCompletionSource *successful = [BFTaskCompletionSource taskCompletionSource]; + [successful setResult:@"The good result."]; + return successful.task; +} + +- (BFTask *)failAsync { + BFTaskCompletionSource *failed = [BFTaskCompletionSource taskCompletionSource]; + [failed setError:[NSError errorWithDomain:@"example.com" code:-1 userInfo:nil]]; + return failed.task; +} +``` + +```swift +// Swift +func successAsync() -> BFTask { + var successful = BFTaskCompletionSource() + successful.setResult("The good result.") + return successful.task +} + +func failAsync() -> BFTask { + var failed = BFTaskCompletionSource() + failed.setError(NSError(domain:"example.com", code:-1, userInfo:nil)) + return failed.task +} +``` + +If you know the result of a task at the time it is created, there are some convenience methods you can use. + +```objective-c +// Objective-C +BFTask *successful = [BFTask taskWithResult:@"The good result."]; + +BFTask *failed = [BFTask taskWithError:anError]; +``` + +```swift +// Swift +let successful = BFTask(result:"The good result") + +let failed = BFTask(error:anError) +``` + +## Creating Async Methods + +With these tools, it's easy to make your own asynchronous functions that return tasks. For example, you can make a task-based version of `fetchAsync:` easily. + +```objective-c +// Objective-C +- (BFTask *) fetchAsync:(PFObject *)object { + BFTaskCompletionSource *task = [BFTaskCompletionSource taskCompletionSource]; + [object fetchInBackgroundWithBlock:^(PFObject *object, NSError *error) { + if (!error) { + [task setResult:object]; + } else { + [task setError:error]; + } + }]; + return task.task; +} +``` + +```swift +// Swift +func fetchAsync(object: PFObject) -> BFTask { + var task = BFTaskCompletionSource() + object.fetchInBackgroundWithBlock { + (object: PFObject?, error: NSError?) -> Void in + if error == nil { + task.setResult(object) + } else { + task.setError(error) + } + } + return task.task +} + +``` + +It's similarly easy to create `saveAsync:`, `findAsync:` or `deleteAsync:`. + +## Tasks in Series + +`BFTasks` are convenient when you want to do a series of tasks in a row, each one waiting for the previous to finish. For example, imagine you want to delete all of the comments on your blog. + +```objective-c +// Objective-C +PFQuery *query = [PFQuery queryWithClassName:@"Comments"]; +[query whereKey:@"post" equalTo:@123]; + +[[[self findAsync:query] continueWithBlock:^id(BFTask *task) { + NSArray *results = task.result; + + // Create a trivial completed task as a base case. + BFTask *task = [BFTask taskWithResult:nil]; + for (PFObject *result in results) { + // For each item, extend the task with a function to delete the item. + task = [task continueWithBlock:^id(BFTask *task) { + // Return a task that will be marked as completed when the delete is finished. + return [self deleteAsync:result]; + }]; + } + return task; +}] continueWithBlock:^id(BFTask *task) { + // Every comment was deleted. + return nil; +}]; +``` + +```swift +// Swift +var query = PFQuery(className:"Comments") +query.whereKey("post", equalTo:123) +findAsync(query).continueWithBlock { + (task: BFTask!) -> BFTask in + let results = task.result() as NSArray + + // Create a trivial completed task as a base case. + let task = BFTask(result:nil) + for result : PFObject in results { + // For each item, extend the task with a function to delete the item. + task = task.continueWithBlock { + (task: BFTask!) -> BFTask in + return self.deleteAsync(result) + } + } + return task +}.continueWithBlock { + (task: BFTask!) -> AnyObject! in + // Every comment was deleted. + return nil +} +``` + +## Tasks in Parallel + +You can also perform several tasks in parallel, using the `taskForCompletionOfAllTasks:` method. You can start multiple operations at once, and use `taskForCompletionOfAllTasks:` to create a new task that will be marked as completed when all of its input tasks are completed. The new task will be successful only if all of the passed-in tasks succeed. Performing operations in parallel will be faster than doing them serially, but may consume more system resources and bandwidth. + +```objective-c +// Objective-C +PFQuery *query = [PFQuery queryWithClassName:@"Comments"]; +[query whereKey:@"post" equalTo:@123]; + +[[[self findAsync:query] continueWithBlock:^id(BFTask *results) { + // Collect one task for each delete into an array. + NSMutableArray *tasks = [NSMutableArray array]; + for (PFObject *result in results) { + // Start this delete immediately and add its task to the list. + [tasks addObject:[self deleteAsync:result]]; + } + // Return a new task that will be marked as completed when all of the deletes are + // finished. + return [BFTask taskForCompletionOfAllTasks:tasks]; +}] continueWithBlock:^id(BFTask *task) { + // Every comment was deleted. + return nil; +}]; +``` + +```swift +// Swift +var query = PFQuery(className:"Comments") +query.whereKey("post", equalTo:123) + +findAsync(query).continueWithBlock { + (task: BFTask!) -> BFTask in + // Collect one task for each delete into an array. + var tasks = NSMutableArray.array() + var results = task.result() as NSArray + for result : PFObject! in results { + // Start this delete immediately and add its task to the list. + tasks.addObject(self.deleteAsync(result)) + } + // Return a new task that will be marked as completed when all of the deletes + // are finished. + return BFTask(forCompletionOfAllTasks:tasks) +}.continueWithBlock { + (task: BFTask!) -> AnyObject! in + // Every comment was deleted. + return nil +} +``` + +## Task Executors + +Both `continueWithBlock:` and `continueWithSuccessBlock:` methods have another form that takes an instance of `BFExecutor`. These are `continueWithExecutor:withBlock:` and `continueWithExecutor:withSuccessBlock:`. These methods allow you to control how the continuation is executed. The default executor will dispatch to GCD, but you can provide your own executor to schedule work onto a different thread. For example, if you want to continue with work on the UI thread: + +```objective-c +// Create a BFExecutor that uses the main thread. +BFExecutor *myExecutor = [BFExecutor executorWithBlock:^void(void(^block)()) { + dispatch_async(dispatch_get_main_queue(), block); +}]; + +// And use the Main Thread Executor like this. The executor applies only to the new +// continuation being passed into continueWithBlock. +[[self fetchAsync:object] continueWithExecutor:myExecutor withBlock:^id(BFTask *task) { + myTextView.text = [object objectForKey:@"name"]; +}]; +``` + +For common cases, such as dispatching on the main thread, we have provided default implementations of `BFExecutor`. These include `defaultExecutor`, `immediateExecutor`, `mainThreadExecutor`, `executorWithDispatchQueue:`, and `executorWithOperationQueue:`. For example: + +```objective-c +// Continue on the Main Thread, using a built-in executor. +[[self fetchAsync:object] continueWithExecutor:[BFExecutor mainThreadExecutor] withBlock:^id(BFTask *task) { + myTextView.text = [object objectForKey:@"name"]; +}]; +``` + +## Task Cancellation + +It's generally bad design to keep track of the `BFTaskCompletionSource` for cancellation. A better model is to create a "cancellation token" at the top level, and pass that to each async function that you want to be part of the same "cancelable operation". Then, in your continuation blocks, you can check whether the cancellation token has been cancelled and bail out early by returning a `[BFTask cancelledTask]`. For example: + +```objective-c +- (void)doSomethingComplicatedAsync:(MYCancellationToken *)cancellationToken { + [[self doSomethingAsync:cancellationToken] continueWithBlock:^{ + if (cancellationToken.isCancelled) { + return [BFTask cancelledTask]; + } + // Do something that takes a while. + return result; + }]; +} + +// Somewhere else. +MYCancellationToken *cancellationToken = [[MYCancellationToken alloc] init]; +[obj doSomethingComplicatedAsync:cancellationToken]; + +// When you get bored... +[cancellationToken cancel]; +``` + +**Note:** The cancellation token implementation should be thread-safe. +We are likely to add some concept like this to Bolts at some point in the future. + +# App Links + +[App Links](http://applinks.org/) provide a cross-platform mechanism that allows a developer to define and publish a deep-linking scheme for their content, allowing other apps to link directly to an experience optimized for the device they are running on. Whether you are building an app that receives incoming links or one that may link out to other apps' content, Bolts provides tools to simplify implementation of the [App Links protocol](http://applinks.org/documentation). + +## Handling an App Link + +The most common case will be making your app receive App Links. In-linking will allow your users to quickly access the richest, most native-feeling presentation of linked content on their devices. Bolts makes it easy to handle an inbound App Link (as well as general inbound deep-links) by providing utilities for processing an incoming URL. + +For example, you can use the `BFURL` utility class to parse an incoming URL in your `AppDelegate`: + +```objective-c +- (BOOL)application:(UIApplication *)application + openURL:(NSURL *)url + sourceApplication:(NSString *)sourceApplication + annotation:(id)annotation { + BFURL *parsedUrl = [BFURL URLWithInboundURL:url sourceApplication:sourceApplication]; + + // Use the target URL from the App Link to locate content. + if ([parsedUrl.targetURL.pathComponents[1] isEqualToString:@"profiles"]) { + // Open a profile viewer. + } + + // You can also check the query string easily. + NSString *query = parsedUrl.targetQueryParameters[@"query"]; + + // Apps that have existing deep-linking support and map their App Links to existing + // deep-linking functionality may instead want to perform these operations on the input URL. + // Use the target URL from the App Link to locate content. + if ([parsedUrl.inputURL.pathComponents[1] isEqualToString:@"profiles"]) { + // Open a profile viewer. + } + + // You can also check the query string easily. + NSString *query = parsedUrl.inputQueryParameters[@"query"]; + + // Apps can easily check the Extras and App Link data from the App Link as well. + NSString *fbAccessToken = parsedUrl.appLinkExtras[@"fb_access_token"]; + NSDictionary *refererData = parsedUrl.appLinkExtras[@"referer"]; +} +``` + +## Navigating to a URL + +Following an App Link allows your app to provide the best user experience (as defined by the receiving app) when a user navigates to a link. Bolts makes this process simple, automating the steps required to follow a link: + +1. Resolve the App Link by getting the App Link metadata from the HTML at the URL specified. +2. Step through App Link targets relevant to the device being used, checking whether the app that can handle the target is present on the device. +3. If an app is present, build a URL with the appropriate al_applink_data specified and navigate to that URL. +4. Otherwise, open the browser with the original URL specified. + +In the simplest case, it takes just one line of code to navigate to a URL that may have an App Link: + +```objective-c +[BFAppLinkNavigation navigateToURLInBackground:url]; +``` + +### Adding App and Navigation Data + +Under most circumstances, the data that will need to be passed along to an app during a navigation will be contained in the URL itself, so that whether or not the app is actually installed on the device, users are taken to the correct content. Occasionally, however, apps will want to pass along data that is relevant for app-to-app navigation, or will want to augment the App Link protocol with information that might be used by the app to adjust how the app should behave (e.g. showing a link back to the referring app). + +If you want to take advantage of these features, you can break apart the navigation process. First, you must have an App Link to which you wish to navigate: + +```objective-c +[[BFAppLinkNavigation resolveAppLinkInBackground:url] continueWithSuccessBlock:^id(BFTask *task) { + BFAppLink *link = task.result; +}]; +``` + +Then, you can build an App Link request with any additional data you would like and navigate: + +```objective-c +BFAppLinkNavigation *navigation = [BFAppLinkNavigation navigationWithAppLink:link + extras:@{ @"access_token": @"t0kEn" } + appLinkData:@{ @"ref": @"12345" }]; +NSError *error = nil; +[navigation navigate:&error]; +``` + +### Resolving App Link Metadata + +Bolts allows for custom App Link resolution, which may be used as a performance optimization (e.g. caching the metadata) or as a mechanism to allow developers to use a centralized index for obtaining App Link metadata. A custom App Link resolver just needs to be able to take a URL and return a `BFAppLink` containing the ordered list of `BFAppLinkTarget`s that are applicable for this device. Bolts provides one of these out of the box that performs this resolution on the device using a hidden UIWebView. + +You can use any resolver that implements the `BFAppLinkResolving` protocol by using one of the overloads on `BFAppLinkNavigation`: + +```objective-c +[BFAppLinkNavigation navigateToURLInBackground:url + resolver:resolver]; +``` + +Alternatively, a you can swap out the default resolver to be used by the built-in APIs: + +```objective-c +[BFAppLinkNavigation setDefaultResolver:resolver]; +[BFAppLinkNavigation navigateToURLInBackground:url]; +``` + +## App Link Return-to-Referer View + +When an application is opened via an App Link, a banner allowing the user to "Touch to return to " should be displayed. The `BFAppLinkReturnToRefererView` provides this functionality. It will take an incoming App Link and parse the referer information to display the appropriate calling app name. + +```objective-c +- (void)viewDidLoad { + [super viewDidLoad]; + + // Perform other view initialization. + + self.returnToRefererController = [[BFAppLinkReturnToRefererController alloc] init]; + + // self.returnToRefererView is a BFAppLinkReturnToRefererView. + // You may initialize the view either by loading it from a NIB or programmatically. + self.returnToRefererController.view = self.returnToRefererView; + + // If you have a UINavigationController in the view, then the bar must be shown above it. + [self.returnToRefererController] +} +``` + +The following code assumes that the view controller has an `openedAppLinkURL` `NSURL` property that has already been populated with the URL used to open the app. You can then do something like this to show the view: + +```objective-c +- (void)viewWillAppear { + [super viewWillAppear]; + + // Show only if you have a back AppLink. + [self.returnToRefererController showViewForRefererURL:self.openedAppLinkURL]; +} +``` + +In a navigation-controller view hierarchy, the banner should be displayed above the navigation bar, and `BFAppLinkReturnToRefererController` provides an `initForDisplayAboveNavController` method to assist with this. + +## Analytics + +Bolts introduces Measurement Event. App Links posts three different Measurement Event notifications to the application, which can be caught and integrated with existing analytics components in your application. + +* `al_nav_out` — Raised when your app switches out to an App Links URL. +* `al_nav_in` — Raised when your app opens an incoming App Links URL. +* `al_ref_back_out` — Raised when your app returns back the referrer app using the built-in top navigation back bar view. + +### Listen for App Links Measurement Events + +There are other analytics tools that are integrated with Bolts' App Links events, but you can also listen for these events yourself: + +```objective-c +[[NSNotificationCenter defaultCenter] addObserverForName:BFMeasurementEventNotificationName object:nil queue:nil usingBlock:^(NSNotification *note) { + NSDictionary *event = note.userInfo; + NSDictionary *eventData = event[BFMeasurementEventArgsKey]; + // Integrate to your logging/analytics component. +}]; +``` + +### App Links Event Fields + +App Links Measurement Events sends additional information from App Links Intents in flattened string key value pairs. Here are some of the useful fields for the three events. + +* `al_nav_in` + * `inputURL`: the URL that opens the app. + * `inputURLScheme`: the scheme of `inputURL`. + * `refererURL`: the URL that the referrer app added into `al_applink_data`: `referer_app_link`. + * `refererAppName`: the app name that the referrer app added to `al_applink_data`: `referer_app_link`. + * `sourceApplication`: the bundle of referrer application. + * `targetURL`: the `target_url` field in `al_applink_data`. + * `version`: App Links API version. + +* `al_nav_out` / `al_ref_back_out` + * `outputURL`: the URL used to open the other app (or browser). If there is an eligible app to open, this will be the custom scheme url/intent in `al_applink_data`. + * `outputURLScheme`: the scheme of `outputURL`. + * `sourceURL`: the URL of the page hosting App Links meta tags. + * `sourceURLHost`: the hostname of `sourceURL`. + * `success`: `“1”` to indicate success in opening the App Link in another app or browser; `“0”` to indicate failure to open the App Link. + * `type`: `“app”` for open in app, `“web”` for open in browser; `“fail”` when the success field is `“0”`. + * `version`: App Links API version. + +# Installation + +You can download the latest framework files from our [Releases page](https://github.com/BoltsFramework/Bolts-ObjC/releases). + +Bolts is also available through [CocoaPods](https://cocoapods.org/). To install it simply add the following line to your Podfile: + + pod 'Bolts' diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.h new file mode 100644 index 0000000..ff73de5 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.h @@ -0,0 +1,247 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import +#import + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +/** + Notification indicating that the `currentAccessToken` has changed. + + the userInfo dictionary of the notification will contain keys + `FBSDKAccessTokenChangeOldKey` and + `FBSDKAccessTokenChangeNewKey`. + */ +FOUNDATION_EXPORT NSNotificationName const FBSDKAccessTokenDidChangeNotification; + +#else + +/** + Notification indicating that the `currentAccessToken` has changed. + + the userInfo dictionary of the notification will contain keys + `FBSDKAccessTokenChangeOldKey` and + `FBSDKAccessTokenChangeNewKey`. + */ +FOUNDATION_EXPORT NSString *const FBSDKAccessTokenDidChangeNotification; + +#endif + +/** + A key in the notification's userInfo that will be set + if and only if the user ID changed between the old and new tokens. + + Token refreshes can occur automatically with the SDK + which do not change the user. If you're only interested in user + changes (such as logging out), you should check for the existence + of this key. The value is a NSNumber with a boolValue. + + On a fresh start of the app where the SDK reads in the cached value + of an access token, this key will also exist since the access token + is moving from a null state (no user) to a non-null state (user). + */ +FOUNDATION_EXPORT NSString *const FBSDKAccessTokenDidChangeUserIDKey; + +FOUNDATION_EXPORT NSString *const FBSDKAccessTokenDidChangeUserID +DEPRECATED_MSG_ATTRIBUTE("Renamed `FBSDKAccessTokenDidChangeUserIDKey`"); + +/* + key in notification's userInfo object for getting the old token. + + If there was no old token, the key will not be present. + */ +FOUNDATION_EXPORT NSString *const FBSDKAccessTokenChangeOldKey; + +/* + key in notification's userInfo object for getting the new token. + + If there is no new token, the key will not be present. + */ +FOUNDATION_EXPORT NSString *const FBSDKAccessTokenChangeNewKey; + +/* + A key in the notification's userInfo that will be set + if and only if the token has expired. + */ +FOUNDATION_EXPORT NSString *const FBSDKAccessTokenDidExpireKey; + +FOUNDATION_EXPORT NSString *const FBSDKAccessTokenDidExpire +DEPRECATED_MSG_ATTRIBUTE("Renamed `FBSDKAccessTokenDidExpireKey`"); + + +/** + Represents an immutable access token for using Facebook services. + */ +@interface FBSDKAccessToken : NSObject + +/** + Returns the app ID. + */ +@property (readonly, copy, nonatomic) NSString *appID; + +/** + Returns the expiration date for data access + */ +@property (readonly, copy, nonatomic) NSDate *dataAccessExpirationDate; + +/** + Returns the known declined permissions. + */ +@property (readonly, copy, nonatomic) NSSet *declinedPermissions; + +/** + Returns the expiration date. + */ +@property (readonly, copy, nonatomic) NSDate *expirationDate; + +/** + Returns the known granted permissions. + */ +@property (readonly, copy, nonatomic) NSSet *permissions; + +/** + Returns the date the token was last refreshed. +*/ +@property (readonly, copy, nonatomic) NSDate *refreshDate; + +/** + Returns the opaque token string. + */ +@property (readonly, copy, nonatomic) NSString *tokenString; + +/** + Returns the user ID. + */ +@property (readonly, copy, nonatomic) NSString *userID; + +/** + Returns whether the access token is expired by checking its expirationDate property + */ +@property (readonly, assign, nonatomic, getter = isExpired) BOOL expired; + +/** + Returns whether user data access is still active for the given access token + */ +@property (readonly, assign, nonatomic, getter = isDataAccessExpired) BOOL dataAccessExpired; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + Initializes a new instance. + @param tokenString the opaque token string. + @param permissions the granted permissions. Note this is converted to NSSet and is only + an NSArray for the convenience of literal syntax. + @param declinedPermissions the declined permissions. Note this is converted to NSSet and is only + an NSArray for the convenience of literal syntax. + @param appID the app ID. + @param userID the user ID. + @param expirationDate the optional expiration date (defaults to distantFuture). + @param refreshDate the optional date the token was last refreshed (defaults to today). + + This initializer should only be used for advanced apps that + manage tokens explicitly. Typical login flows only need to use `FBSDKLoginManager` + along with `+currentAccessToken`. + */ +- (instancetype)initWithTokenString:(NSString *)tokenString + permissions:(NSArray *)permissions + declinedPermissions:(NSArray *)declinedPermissions + appID:(NSString *)appID + userID:(NSString *)userID + expirationDate:(NSDate *)expirationDate + refreshDate:(NSDate *)refreshDate; + +/** + Initializes a new instance. + @param tokenString the opaque token string. + @param permissions the granted permissions. Note this is converted to NSSet and is only + an NSArray for the convenience of literal syntax. + @param declinedPermissions the declined permissions. Note this is converted to NSSet and is only + an NSArray for the convenience of literal syntax. + @param appID the app ID. + @param userID the user ID. + @param expirationDate the optional expiration date (defaults to distantFuture). + @param refreshDate the optional date the token was last refreshed (defaults to today). + @param dataAccessExpirationDate the date which data access will expire for the given user + (defaults to distantFuture). + + This initializer should only be used for advanced apps that + manage tokens explicitly. Typical login flows only need to use `FBSDKLoginManager` + along with `+currentAccessToken`. + */ +- (instancetype)initWithTokenString:(NSString *)tokenString + permissions:(NSArray *)permissions + declinedPermissions:(NSArray *)declinedPermissions + appID:(NSString *)appID + userID:(NSString *)userID + expirationDate:(NSDate *)expirationDate + refreshDate:(NSDate *)refreshDate + dataAccessExpirationDate:(NSDate *)dataAccessExpirationDate +NS_DESIGNATED_INITIALIZER; + +/** + Convenience getter to determine if a permission has been granted + @param permission The permission to check. + */ +- (BOOL)hasGranted:(NSString *)permission; + +/** + Compares the receiver to another FBSDKAccessToken + @param token The other token + @return YES if the receiver's values are equal to the other token's values; otherwise NO + */ +- (BOOL)isEqualToAccessToken:(FBSDKAccessToken *)token; + +/** + Returns the "global" access token that represents the currently logged in user. + + The `currentAccessToken` is a convenient representation of the token of the + current user and is used by other SDK components (like `FBSDKLoginManager`). + */ ++ (FBSDKAccessToken *)currentAccessToken; + +/** + Returns YES if currentAccessToken is not nil AND currentAccessToken is not expired + + */ ++ (BOOL)currentAccessTokenIsActive; + +/** + Sets the "global" access token that represents the currently logged in user. + @param token The access token to set. + + This will broadcast a notification and save the token to the app keychain. + */ ++ (void)setCurrentAccessToken:(FBSDKAccessToken *)token; + +/** + Refresh the current access token's permission state and extend the token's expiration date, + if possible. + @param completionHandler an optional callback handler that can surface any errors related to permission refreshing. + + On a successful refresh, the currentAccessToken will be updated so you typically only need to + observe the `FBSDKAccessTokenDidChangeNotification` notification. + + If a token is already expired, it cannot be refreshed. + */ ++ (void)refreshCurrentAccessToken:(FBSDKGraphRequestHandler)completionHandler; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.m new file mode 100644 index 0000000..f26a9e2 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.m @@ -0,0 +1,252 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAccessToken.h" + +#import "FBSDKGraphRequestPiggybackManager.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKMath.h" +#import "FBSDKSettings+Internal.h" + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +NSNotificationName const FBSDKAccessTokenDidChangeNotification = @"com.facebook.sdk.FBSDKAccessTokenData.FBSDKAccessTokenDidChangeNotification"; + +#else + +NSString *const FBSDKAccessTokenDidChangeNotification = @"com.facebook.sdk.FBSDKAccessTokenData.FBSDKAccessTokenDidChangeNotification"; + +#endif + +NSString *const FBSDKAccessTokenDidChangeUserIDKey = @"FBSDKAccessTokenDidChangeUserID"; +NSString *const FBSDKAccessTokenDidChangeUserID = @"FBSDKAccessTokenDidChangeUserID"; +NSString *const FBSDKAccessTokenChangeNewKey = @"FBSDKAccessToken"; +NSString *const FBSDKAccessTokenChangeOldKey = @"FBSDKAccessTokenOld"; +NSString *const FBSDKAccessTokenDidExpireKey = @"FBSDKAccessTokenDidExpire"; +NSString *const FBSDKAccessTokenDidExpire = @"FBSDKAccessTokenDidExpire"; + +static FBSDKAccessToken *g_currentAccessToken; + +#define FBSDK_ACCESSTOKEN_TOKENSTRING_KEY @"tokenString" +#define FBSDK_ACCESSTOKEN_PERMISSIONS_KEY @"permissions" +#define FBSDK_ACCESSTOKEN_DECLINEDPERMISSIONS_KEY @"declinedPermissions" +#define FBSDK_ACCESSTOKEN_APPID_KEY @"appID" +#define FBSDK_ACCESSTOKEN_USERID_KEY @"userID" +#define FBSDK_ACCESSTOKEN_REFRESHDATE_KEY @"refreshDate" +#define FBSDK_ACCESSTOKEN_EXPIRATIONDATE_KEY @"expirationDate" +#define FBSDK_ACCESSTOKEN_DATA_EXPIRATIONDATE_KEY @"dataAccessExpirationDate" + + +@implementation FBSDKAccessToken + +- (instancetype)initWithTokenString:(NSString *)tokenString + permissions:(NSArray *)permissions + declinedPermissions:(NSArray *)declinedPermissions + appID:(NSString *)appID + userID:(NSString *)userID + expirationDate:(NSDate *)expirationDate + refreshDate:(NSDate *)refreshDate +{ + return [self initWithTokenString:tokenString + permissions:permissions + declinedPermissions:declinedPermissions + appID:appID + userID:userID + expirationDate:expirationDate + refreshDate:refreshDate + dataAccessExpirationDate:[NSDate distantFuture]]; +} + +- (instancetype)initWithTokenString:(NSString *)tokenString + permissions:(NSArray *)permissions + declinedPermissions:(NSArray *)declinedPermissions + appID:(NSString *)appID + userID:(NSString *)userID + expirationDate:(NSDate *)expirationDate + refreshDate:(NSDate *)refreshDate + dataAccessExpirationDate:(NSDate *)dataAccessExpirationDate +{ + if ((self = [super init])) { + _tokenString = [tokenString copy]; + _permissions = [NSSet setWithArray:permissions]; + _declinedPermissions = [NSSet setWithArray:declinedPermissions]; + _appID = [appID copy]; + _userID = [userID copy]; + _expirationDate = [expirationDate copy] ?: [NSDate distantFuture]; + _refreshDate = [refreshDate copy] ?: [NSDate date]; + _dataAccessExpirationDate = [dataAccessExpirationDate copy] ?: [NSDate distantFuture]; + } + return self; +} + +- (BOOL)hasGranted:(NSString *)permission +{ + return [self.permissions containsObject:permission]; + +} + +- (BOOL)isDataAccessExpired +{ + return [self.dataAccessExpirationDate compare:NSDate.date] == NSOrderedAscending; +} + +- (BOOL)isExpired +{ + return [self.expirationDate compare:NSDate.date] == NSOrderedAscending; +} + ++ (FBSDKAccessToken *)currentAccessToken +{ + return g_currentAccessToken; +} + ++ (void)setCurrentAccessToken:(FBSDKAccessToken *)token +{ + if (token != g_currentAccessToken) { + NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + [FBSDKInternalUtility dictionary:userInfo setObject:token forKey:FBSDKAccessTokenChangeNewKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:g_currentAccessToken forKey:FBSDKAccessTokenChangeOldKey]; + // We set this flag also when the current Access Token was not valid, since there might be legacy code relying on it + if (![g_currentAccessToken.userID isEqualToString:token.userID] || ![self currentAccessTokenIsActive]) { + userInfo[FBSDKAccessTokenDidChangeUserIDKey] = @YES; + } + + g_currentAccessToken = token; + + // Only need to keep current session in web view for the case when token is current + // When token is abandoned cookies must to be cleaned up immediately + if (token == nil) { + [FBSDKInternalUtility deleteFacebookCookies]; + } + + [FBSDKSettings accessTokenCache].accessToken = token; + [[NSNotificationCenter defaultCenter] postNotificationName:FBSDKAccessTokenDidChangeNotification + object:[self class] + userInfo:userInfo]; + } +} + ++ (BOOL)currentAccessTokenIsActive +{ + FBSDKAccessToken *currentAccessToken = [self currentAccessToken]; + return currentAccessToken != nil && !currentAccessToken.isExpired; +} + ++ (void)refreshCurrentAccessToken:(FBSDKGraphRequestHandler)completionHandler +{ + if ([FBSDKAccessToken currentAccessToken]) { + FBSDKGraphRequestConnection *connection = [[FBSDKGraphRequestConnection alloc] init]; + [FBSDKGraphRequestPiggybackManager addRefreshPiggyback:connection permissionHandler:completionHandler]; + [connection start]; + } else { + if (completionHandler) { + completionHandler(nil, nil, [NSError fbErrorWithCode:FBSDKErrorAccessTokenRequired message:@"No current access token to refresh"]); + } + } +} + +#pragma mark - Equality + +- (NSUInteger)hash +{ + NSUInteger subhashes[] = { + self.tokenString.hash, + self.permissions.hash, + self.declinedPermissions.hash, + self.appID.hash, + self.userID.hash, + self.refreshDate.hash, + self.expirationDate.hash, + self.dataAccessExpirationDate.hash + }; + return [FBSDKMath hashWithIntegerArray:subhashes count:sizeof(subhashes) / sizeof(subhashes[0])]; +} + +- (BOOL)isEqual:(id)object +{ + if (self == object) { + return YES; + } + if (![object isKindOfClass:[FBSDKAccessToken class]]) { + return NO; + } + return [self isEqualToAccessToken:(FBSDKAccessToken *)object]; +} + +- (BOOL)isEqualToAccessToken:(FBSDKAccessToken *)token +{ + return (token && + [FBSDKInternalUtility object:self.tokenString isEqualToObject:token.tokenString] && + [FBSDKInternalUtility object:self.permissions isEqualToObject:token.permissions] && + [FBSDKInternalUtility object:self.declinedPermissions isEqualToObject:token.declinedPermissions] && + [FBSDKInternalUtility object:self.appID isEqualToObject:token.appID] && + [FBSDKInternalUtility object:self.userID isEqualToObject:token.userID] && + [FBSDKInternalUtility object:self.refreshDate isEqualToObject:token.refreshDate] && + [FBSDKInternalUtility object:self.expirationDate isEqualToObject:token.expirationDate] && + [FBSDKInternalUtility object:self.dataAccessExpirationDate isEqualToObject:token.dataAccessExpirationDate] ); +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone +{ + // we're immutable. + return self; +} + +#pragma mark NSCoding + ++ (BOOL)supportsSecureCoding +{ + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + NSString *appID = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_ACCESSTOKEN_APPID_KEY]; + NSSet *declinedPermissions = [decoder decodeObjectOfClass:[NSSet class] forKey:FBSDK_ACCESSTOKEN_DECLINEDPERMISSIONS_KEY]; + NSSet *permissions = [decoder decodeObjectOfClass:[NSSet class] forKey:FBSDK_ACCESSTOKEN_PERMISSIONS_KEY]; + NSString *tokenString = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_ACCESSTOKEN_TOKENSTRING_KEY]; + NSString *userID = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_ACCESSTOKEN_USERID_KEY]; + NSDate *refreshDate = [decoder decodeObjectOfClass:[NSDate class] forKey:FBSDK_ACCESSTOKEN_REFRESHDATE_KEY]; + NSDate *expirationDate = [decoder decodeObjectOfClass:[NSDate class] forKey:FBSDK_ACCESSTOKEN_EXPIRATIONDATE_KEY]; + NSDate *dataAccessExpirationDate = [decoder decodeObjectOfClass:[NSDate class] forKey:FBSDK_ACCESSTOKEN_DATA_EXPIRATIONDATE_KEY]; + + return [self initWithTokenString:tokenString + permissions:permissions.allObjects + declinedPermissions:declinedPermissions.allObjects + appID:appID + userID:userID + expirationDate:expirationDate + refreshDate:refreshDate + dataAccessExpirationDate:dataAccessExpirationDate]; +} + +- (void)encodeWithCoder:(NSCoder *)encoder +{ + [encoder encodeObject:self.appID forKey:FBSDK_ACCESSTOKEN_APPID_KEY]; + [encoder encodeObject:self.declinedPermissions forKey:FBSDK_ACCESSTOKEN_DECLINEDPERMISSIONS_KEY]; + [encoder encodeObject:self.permissions forKey:FBSDK_ACCESSTOKEN_PERMISSIONS_KEY]; + [encoder encodeObject:self.tokenString forKey:FBSDK_ACCESSTOKEN_TOKENSTRING_KEY]; + [encoder encodeObject:self.userID forKey:FBSDK_ACCESSTOKEN_USERID_KEY]; + [encoder encodeObject:self.expirationDate forKey:FBSDK_ACCESSTOKEN_EXPIRATIONDATE_KEY]; + [encoder encodeObject:self.refreshDate forKey:FBSDK_ACCESSTOKEN_REFRESHDATE_KEY]; + [encoder encodeObject:self.dataAccessExpirationDate forKey:FBSDK_ACCESSTOKEN_DATA_EXPIRATIONDATE_KEY]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h new file mode 100644 index 0000000..4216bfd --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h @@ -0,0 +1,822 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#if !TARGET_OS_TV +#import +#endif + +#import + +@class FBSDKAccessToken; +@class FBSDKGraphRequest; + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +/** NSNotificationCenter name indicating a result of a failed log flush attempt. The posted object will be an NSError instance. */ +FOUNDATION_EXPORT NSNotificationName const FBSDKAppEventsLoggingResultNotification; + +#else + +/** NSNotificationCenter name indicating a result of a failed log flush attempt. The posted object will be an NSError instance. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventsLoggingResultNotification; + +#endif + +/** optional plist key ("FacebookLoggingOverrideAppID") for setting `loggingOverrideAppID` */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventsOverrideAppIDBundleKey; + +/** + + NS_ENUM (NSUInteger, FBSDKAppEventsFlushBehavior) + + Specifies when `FBSDKAppEvents` sends log events to the server. + + */ +typedef NS_ENUM(NSUInteger, FBSDKAppEventsFlushBehavior) +{ + + /** Flush automatically: periodically (once a minute or every 100 logged events) and always at app reactivation. */ + FBSDKAppEventsFlushBehaviorAuto = 0, + + /** Only flush when the `flush` method is called. When an app is moved to background/terminated, the + events are persisted and re-established at activation, but they will only be written with an + explicit call to `flush`. */ + FBSDKAppEventsFlushBehaviorExplicitOnly, + +}; + +/** + NS_ENUM(NSUInteger, FBSDKProductAvailability) + Specifies product availability for Product Catalog product item update + */ +typedef NS_ENUM(NSUInteger, FBSDKProductAvailability) +{ + /** + * Item ships immediately + */ + FBSDKProductAvailabilityInStock = 0, + /** + * No plan to restock + */ + FBSDKProductAvailabilityOutOfStock, + /** + * Available in future + */ + FBSDKProductAvailabilityPreOrder, + /** + * Ships in 1-2 weeks + */ + FBSDKProductAvailabilityAvailableForOrder, + /** + * Discontinued + */ + FBSDKProductAvailabilityDiscontinued, +}; + +/** + NS_ENUM(NSUInteger, FBSDKProductCondition) + Specifies product condition for Product Catalog product item update + */ +typedef NS_ENUM(NSUInteger, FBSDKProductCondition) +{ + FBSDKProductConditionNew = 0, + FBSDKProductConditionRefurbished, + FBSDKProductConditionUsed, +}; + +/** + @methodgroup Predefined event names for logging events common to many apps. Logging occurs through the `logEvent` family of methods on `FBSDKAppEvents`. + Common event parameters are provided in the `FBSDKAppEventsParameterNames*` constants. + */ + +/** Log this event when the user has achieved a level in the app. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameAchievedLevel; + +/** Log this event when the user has entered their payment info. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameAddedPaymentInfo; + +/** Log this event when the user has added an item to their cart. The valueToSum passed to logEvent should be the item's price. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameAddedToCart; + +/** Log this event when the user has added an item to their wishlist. The valueToSum passed to logEvent should be the item's price. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameAddedToWishlist; + +/** Log this event when a user has completed registration with the app. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameCompletedRegistration; + +/** Log this event when the user has completed a tutorial in the app. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameCompletedTutorial; + +/** Log this event when the user has entered the checkout process. The valueToSum passed to logEvent should be the total price in the cart. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameInitiatedCheckout; + +/** Log this event when the user has rated an item in the app. The valueToSum passed to logEvent should be the numeric rating. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameRated; + +/** Log this event when a user has performed a search within the app. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameSearched; + +/** Log this event when the user has spent app credits. The valueToSum passed to logEvent should be the number of credits spent. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameSpentCredits; + +/** Log this event when the user has unlocked an achievement in the app. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameUnlockedAchievement; + +/** Log this event when a user has viewed a form of content in the app. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameViewedContent; + +/** A telephone/SMS, email, chat or other type of contact between a customer and your business. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameContact; + +/** The customization of products through a configuration tool or other application your business owns. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameCustomizeProduct; + +/** The donation of funds to your organization or cause. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameDonate; + +/** When a person finds one of your locations via web or application, with an intention to visit (example: find product at a local store). */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFindLocation; + +/** The booking of an appointment to visit one of your locations. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameSchedule; + +/** The start of a free trial of a product or service you offer (example: trial subscription). */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameStartTrial; + +/** The submission of an application for a product, service or program you offer (example: credit card, educational program or job). */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameSubmitApplication; + +/** The start of a paid subscription for a product or service you offer. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameSubscribe; + +/** Log this event when the user views an ad. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameAdImpression; + +/** Log this event when the user clicks an ad. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameAdClick; + +/** + @methodgroup Predefined event name parameters for common additional information to accompany events logged through the `logEvent` family + of methods on `FBSDKAppEvents`. Common event names are provided in the `FBAppEventName*` constants. + */ + + /** + * Parameter key used to specify data for the one or more pieces of content being logged about. + * Data should be a JSON encoded string. + * Example: + * "[{\"id\": \"1234\", \"quantity\": 2, \"item_price\": 5.99}, {\"id\": \"5678\", \"quantity\": 1, \"item_price\": 9.99}]" + */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameContent; + +/** Parameter key used to specify an ID for the specific piece of content being logged about. Could be an EAN, article identifier, etc., depending on the nature of the app. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameContentID; + +/** Parameter key used to specify a generic content type/family for the logged event, e.g. "music", "photo", "video". Options to use will vary based upon what the app is all about. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameContentType; + +/** Parameter key used to specify currency used with logged event. E.g. "USD", "EUR", "GBP". See ISO-4217 for specific values. One reference for these is . */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameCurrency; + +/** Parameter key used to specify a description appropriate to the event being logged. E.g., the name of the achievement unlocked in the `FBAppEventNameAchievementUnlocked` event. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameDescription; + +/** Parameter key used to specify the level achieved in a `FBAppEventNameAchieved` event. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameLevel; + +/** Parameter key used to specify the maximum rating available for the `FBAppEventNameRate` event. E.g., "5" or "10". */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameMaxRatingValue; + +/** Parameter key used to specify how many items are being processed for an `FBAppEventNameInitiatedCheckout` or `FBAppEventNamePurchased` event. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameNumItems; + +/** Parameter key used to specify whether payment info is available for the `FBAppEventNameInitiatedCheckout` event. `FBSDKAppEventParameterValueYes` and `FBSDKAppEventParameterValueNo` are good canonical values to use for this parameter. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNamePaymentInfoAvailable; + +/** Parameter key used to specify method user has used to register for the app, e.g., "Facebook", "email", "Twitter", etc */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameRegistrationMethod; + +/** Parameter key used to specify the string provided by the user for a search operation. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameSearchString; + +/** Parameter key used to specify whether the activity being logged about was successful or not. `FBSDKAppEventParameterValueYes` and `FBSDKAppEventParameterValueNo` are good canonical values to use for this parameter. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameSuccess; + +/** + @methodgroup Predefined event name parameters for common additional information to accompany events logged through the `logProductItem` method on `FBSDKAppEvents`. + */ + +/** Parameter key used to specify the product item's custom label 0. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductCustomLabel0; + +/** Parameter key used to specify the product item's custom label 1. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductCustomLabel1; + +/** Parameter key used to specify the product item's custom label 2. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductCustomLabel2; + +/** Parameter key used to specify the product item's custom label 3. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductCustomLabel3; + +/** Parameter key used to specify the product item's custom label 4. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductCustomLabel4; + +/** Parameter key used to specify the product item's AppLink app URL for iOS. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkIOSUrl; + +/** Parameter key used to specify the product item's AppLink app ID for iOS App Store. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkIOSAppStoreID; + +/** Parameter key used to specify the product item's AppLink app name for iOS. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkIOSAppName; + +/** Parameter key used to specify the product item's AppLink app URL for iPhone. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkIPhoneUrl; + +/** Parameter key used to specify the product item's AppLink app ID for iPhone App Store. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkIPhoneAppStoreID; + +/** Parameter key used to specify the product item's AppLink app name for iPhone. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkIPhoneAppName; + +/** Parameter key used to specify the product item's AppLink app URL for iPad. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkIPadUrl; + +/** Parameter key used to specify the product item's AppLink app ID for iPad App Store. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkIPadAppStoreID; + +/** Parameter key used to specify the product item's AppLink app name for iPad. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkIPadAppName; + +/** Parameter key used to specify the product item's AppLink app URL for Android. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkAndroidUrl; + +/** Parameter key used to specify the product item's AppLink fully-qualified package name for intent generation. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkAndroidPackage; + +/** Parameter key used to specify the product item's AppLink app name for Android. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkAndroidAppName; + +/** Parameter key used to specify the product item's AppLink app URL for Windows Phone. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkWindowsPhoneUrl; + +/** Parameter key used to specify the product item's AppLink app ID, as a GUID, for App Store. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkWindowsPhoneAppID; + +/** Parameter key used to specify the product item's AppLink app name for Windows Phone. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterProductAppLinkWindowsPhoneAppName; + +/* + @methodgroup Predefined values to assign to event parameters that accompany events logged through the `logEvent` family + of methods on `FBSDKAppEvents`. Common event parameters are provided in the `FBSDKAppEventParameterName*` constants. + */ + +/** Yes-valued parameter value to be used with parameter keys that need a Yes/No value */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterValueYes; + +/** No-valued parameter value to be used with parameter keys that need a Yes/No value */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterValueNo; + +/** Parameter key used to specify the type of ad in an FBSDKAppEventNameAdImpression + * or FBSDKAppEventNameAdClick event. + * E.g. "banner", "interstitial", "rewarded_video", "native" */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameAdType; + +/** Parameter key used to specify the unique ID for all events within a subscription + * in an FBSDKAppEventNameSubscribe or FBSDKAppEventNameStartTrial event. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterNameOrderID; + +/** + + + Client-side event logging for specialized application analytics available through Facebook App Insights + and for use with Facebook Ads conversion tracking and optimization. + + + + The `FBSDKAppEvents` static class has a few related roles: + + + Logging predefined and application-defined events to Facebook App Insights with a + numeric value to sum across a large number of events, and an optional set of key/value + parameters that define "segments" for this event (e.g., 'purchaserStatus' : 'frequent', or + 'gamerLevel' : 'intermediate') + + + Logging events to later be used for ads optimization around lifetime value. + + + Methods that control the way in which events are flushed out to the Facebook servers. + + Here are some important characteristics of the logging mechanism provided by `FBSDKAppEvents`: + + + Events are not sent immediately when logged. They're cached and flushed out to the Facebook servers + in a number of situations: + - when an event count threshold is passed (currently 100 logged events). + - when a time threshold is passed (currently 15 seconds). + - when an app has gone to background and is then brought back to the foreground. + + + Events will be accumulated when the app is in a disconnected state, and sent when the connection is + restored and one of the above 'flush' conditions are met. + + + The `FBSDKAppEvents` class is thread-safe in that events may be logged from any of the app's threads. + + + The developer can set the `flushBehavior` on `FBSDKAppEvents` to force the flushing of events to only + occur on an explicit call to the `flush` method. + + + The developer can turn on console debug output for event logging and flushing to the server by using + the `FBSDKLoggingBehaviorAppEvents` value in `[FBSettings setLoggingBehavior:]`. + + Some things to note when logging events: + + + There is a limit on the number of unique event names an app can use, on the order of 1000. + + There is a limit to the number of unique parameter names in the provided parameters that can + be used per event, on the order of 25. This is not just for an individual call, but for all + invocations for that eventName. + + Event names and parameter names (the keys in the NSDictionary) must be between 2 and 40 characters, and + must consist of alphanumeric characters, _, -, or spaces. + + The length of each parameter value can be no more than on the order of 100 characters. + + */ +@interface FBSDKAppEvents : NSObject + +/* + * Basic event logging + */ + +/** + + Log an event with just an eventName. + + @param eventName The name of the event to record. Limitations on number of events and name length + are given in the `FBSDKAppEvents` documentation. + + */ ++ (void)logEvent:(NSString *)eventName; + +/** + + Log an event with an eventName and a numeric value to be aggregated with other events of this name. + + @param eventName The name of the event to record. Limitations on number of events and name length + are given in the `FBSDKAppEvents` documentation. Common event names are provided in `FBAppEventName*` constants. + + @param valueToSum Amount to be aggregated into all events of this eventName, and App Insights will report + the cumulative and average value of this amount. + */ ++ (void)logEvent:(NSString *)eventName + valueToSum:(double)valueToSum; + + +/** + + Log an event with an eventName and a set of key/value pairs in the parameters dictionary. + Parameter limitations are described above. + + @param eventName The name of the event to record. Limitations on number of events and name construction + are given in the `FBSDKAppEvents` documentation. Common event names are provided in `FBAppEventName*` constants. + + @param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must + be NSString's, and the values are expected to be NSString or NSNumber. Limitations on the number of + parameters and name construction are given in the `FBSDKAppEvents` documentation. Commonly used parameter names + are provided in `FBSDKAppEventParameterName*` constants. + */ ++ (void)logEvent:(NSString *)eventName + parameters:(NSDictionary *)parameters; + +/** + + Log an event with an eventName, a numeric value to be aggregated with other events of this name, + and a set of key/value pairs in the parameters dictionary. + + @param eventName The name of the event to record. Limitations on number of events and name construction + are given in the `FBSDKAppEvents` documentation. Common event names are provided in `FBAppEventName*` constants. + + @param valueToSum Amount to be aggregated into all events of this eventName, and App Insights will report + the cumulative and average value of this amount. + + @param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must + be NSString's, and the values are expected to be NSString or NSNumber. Limitations on the number of + parameters and name construction are given in the `FBSDKAppEvents` documentation. Commonly used parameter names + are provided in `FBSDKAppEventParameterName*` constants. + + */ ++ (void)logEvent:(NSString *)eventName + valueToSum:(double)valueToSum + parameters:(NSDictionary *)parameters; + + +/** + + Log an event with an eventName, a numeric value to be aggregated with other events of this name, + and a set of key/value pairs in the parameters dictionary. Providing session lets the developer + target a particular . If nil is provided, then `[FBSession activeSession]` will be used. + + @param eventName The name of the event to record. Limitations on number of events and name construction + are given in the `FBSDKAppEvents` documentation. Common event names are provided in `FBAppEventName*` constants. + + @param valueToSum Amount to be aggregated into all events of this eventName, and App Insights will report + the cumulative and average value of this amount. Note that this is an NSNumber, and a value of `nil` denotes + that this event doesn't have a value associated with it for summation. + + @param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must + be NSString's, and the values are expected to be NSString or NSNumber. Limitations on the number of + parameters and name construction are given in the `FBSDKAppEvents` documentation. Commonly used parameter names + are provided in `FBSDKAppEventParameterName*` constants. + + @param accessToken The optional access token to log the event as. + */ ++ (void)logEvent:(NSString *)eventName + valueToSum:(NSNumber *)valueToSum + parameters:(NSDictionary *)parameters + accessToken:(FBSDKAccessToken *)accessToken; + +/* + * Purchase logging + */ + +/** + + Log a purchase of the specified amount, in the specified currency. + + @param purchaseAmount Purchase amount to be logged, as expressed in the specified currency. This value + will be rounded to the thousandths place (e.g., 12.34567 becomes 12.346). + + @param currency Currency, is denoted as, e.g. "USD", "EUR", "GBP". See ISO-4217 for + specific values. One reference for these is . + + + This event immediately triggers a flush of the `FBSDKAppEvents` event queue, unless the `flushBehavior` is set + to `FBSDKAppEventsFlushBehaviorExplicitOnly`. + + */ ++ (void)logPurchase:(double)purchaseAmount + currency:(NSString *)currency; + +/** + + Log a purchase of the specified amount, in the specified currency, also providing a set of + additional characteristics describing the purchase. + + @param purchaseAmount Purchase amount to be logged, as expressed in the specified currency.This value + will be rounded to the thousandths place (e.g., 12.34567 becomes 12.346). + + @param currency Currency, is denoted as, e.g. "USD", "EUR", "GBP". See ISO-4217 for + specific values. One reference for these is . + + @param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must + be NSString's, and the values are expected to be NSString or NSNumber. Limitations on the number of + parameters and name construction are given in the `FBSDKAppEvents` documentation. Commonly used parameter names + are provided in `FBSDKAppEventParameterName*` constants. + + + This event immediately triggers a flush of the `FBSDKAppEvents` event queue, unless the `flushBehavior` is set + to `FBSDKAppEventsFlushBehaviorExplicitOnly`. + + */ ++ (void)logPurchase:(double)purchaseAmount + currency:(NSString *)currency + parameters:(NSDictionary *)parameters; + +/** + + Log a purchase of the specified amount, in the specified currency, also providing a set of + additional characteristics describing the purchase, as well as an to log to. + + @param purchaseAmount Purchase amount to be logged, as expressed in the specified currency.This value + will be rounded to the thousandths place (e.g., 12.34567 becomes 12.346). + + @param currency Currency, is denoted as, e.g. "USD", "EUR", "GBP". See ISO-4217 for + specific values. One reference for these is . + + @param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must + be NSString's, and the values are expected to be NSString or NSNumber. Limitations on the number of + parameters and name construction are given in the `FBSDKAppEvents` documentation. Commonly used parameter names + are provided in `FBSDKAppEventParameterName*` constants. + + @param accessToken The optional access token to log the event as. + + + This event immediately triggers a flush of the `FBSDKAppEvents` event queue, unless the `flushBehavior` is set + to `FBSDKAppEventsFlushBehaviorExplicitOnly`. + + */ ++ (void)logPurchase:(double)purchaseAmount + currency:(NSString *)currency + parameters:(NSDictionary *)parameters + accessToken:(FBSDKAccessToken *)accessToken; + + +/* + * Push Notifications Logging + */ + +/** + Log an app event that tracks that the application was open via Push Notification. + + @param payload Notification payload received via `UIApplicationDelegate`. + */ ++ (void)logPushNotificationOpen:(NSDictionary *)payload; + +/** + Log an app event that tracks that a custom action was taken from a push notification. + + @param payload Notification payload received via `UIApplicationDelegate`. + @param action Name of the action that was taken. + */ ++ (void)logPushNotificationOpen:(NSDictionary *)payload action:(NSString *)action; + +/** + Uploads product catalog product item as an app event + @param itemID Unique ID for the item. Can be a variant for a product. + Max size is 100. + @param availability If item is in stock. Accepted values are: + in stock - Item ships immediately + out of stock - No plan to restock + preorder - Available in future + available for order - Ships in 1-2 weeks + discontinued - Discontinued + @param condition Product condition: new, refurbished or used. + @param description Short text describing product. Max size is 5000. + @param imageLink Link to item image used in ad. + @param link Link to merchant's site where someone can buy the item. + @param title Title of item. + @param priceAmount Amount of purchase, in the currency specified by the 'currency' + parameter. This value will be rounded to the thousandths place + (e.g., 12.34567 becomes 12.346). + @param currency Currency used to specify the amount. + E.g. "USD", "EUR", "GBP". See ISO-4217 for specific values. One reference for these is + @param gtin Global Trade Item Number including UPC, EAN, JAN and ISBN + @param mpn Unique manufacture ID for product + @param brand Name of the brand + Note: Either gtin, mpn or brand is required. + @param parameters Optional fields for deep link specification. + */ ++ (void)logProductItem:(NSString *)itemID + availability:(FBSDKProductAvailability)availability + condition:(FBSDKProductCondition)condition + description:(NSString *)description + imageLink:(NSString *)imageLink + link:(NSString *)link + title:(NSString *)title + priceAmount:(double)priceAmount + currency:(NSString *)currency + gtin:(NSString *)gtin + mpn:(NSString *)mpn + brand:(NSString *)brand + parameters:(NSDictionary *)parameters; + +/** + + Notifies the events system that the app has launched and, when appropriate, logs an "activated app" event. + This function is called automatically from FBSDKApplicationDelegate applicationDidBecomeActive, unless + one overrides 'FacebookAutoLogAppEventsEnabled' key to false in the project info plist file. + In case 'FacebookAutoLogAppEventsEnabled' is set to false, then it should typically be placed in the + app delegates' `applicationDidBecomeActive:` method. + + This method also takes care of logging the event indicating the first time this app has been launched, which, among other things, is used to + track user acquisition and app install ads conversions. + + + + `activateApp` will not log an event on every app launch, since launches happen every time the app is backgrounded and then foregrounded. + "activated app" events will be logged when the app has not been active for more than 60 seconds. This method also causes a "deactivated app" + event to be logged when sessions are "completed", and these events are logged with the session length, with an indication of how much + time has elapsed between sessions, and with the number of background/foreground interruptions that session had. This data + is all visible in your app's App Events Insights. + */ ++ (void)activateApp; + +/* + * Push Notifications Registration and Uninstall Tracking + */ + +/** + Sets and sends device token to register the current application for push notifications. + + + + Sets and sends a device token from `NSData` representation that you get from `UIApplicationDelegate.-application:didRegisterForRemoteNotificationsWithDeviceToken:`. + + @param deviceToken Device token data. + */ ++ (void)setPushNotificationsDeviceToken:(NSData *)deviceToken; + +/** + Sets and sends device token string to register the current application for push notifications. + + + + Sets and sends a device token string + + @param deviceTokenString Device token string. + */ ++ (void)setPushNotificationsDeviceTokenString:(NSString *)deviceTokenString; + +/* + * Control over event batching/flushing + */ + +/** + + Get the current event flushing behavior specifying when events are sent back to Facebook servers. + */ ++ (FBSDKAppEventsFlushBehavior)flushBehavior; + +/** + + Set the current event flushing behavior specifying when events are sent back to Facebook servers. + + @param flushBehavior The desired `FBSDKAppEventsFlushBehavior` to be used. + */ ++ (void)setFlushBehavior:(FBSDKAppEventsFlushBehavior)flushBehavior; + +/** + Set the 'override' App ID for App Event logging. + + + + In some cases, apps want to use one Facebook App ID for login and social presence and another + for App Event logging. (An example is if multiple apps from the same company share an app ID for login, but + want distinct logging.) By default, this value is `nil`, and defers to the `FBSDKAppEventsOverrideAppIDBundleKey` + plist value. If that's not set, it defaults to `[FBSDKSettings appID]`. + + This should be set before any other calls are made to `FBSDKAppEvents`. Thus, you should set it in your application + delegate's `application:didFinishLaunchingWithOptions:` delegate. + + @param appID The Facebook App ID to be used for App Event logging. + */ ++ (void)setLoggingOverrideAppID:(NSString *)appID; + +/** + Get the 'override' App ID for App Event logging. + + +@see setLoggingOverrideAppID: + + */ ++ (NSString *)loggingOverrideAppID; + + +/** + Explicitly kick off flushing of events to Facebook. This is an asynchronous method, but it does initiate an immediate + kick off. Server failures will be reported through the NotificationCenter with notification ID `FBSDKAppEventsLoggingResultNotification`. + */ ++ (void)flush; + +/** + Creates a request representing the Graph API call to retrieve a Custom Audience "third party ID" for the app's Facebook user. + Callers will send this ID back to their own servers, collect up a set to create a Facebook Custom Audience with, + and then use the resultant Custom Audience to target ads. + + @param accessToken The access token to use to establish the user's identity for users logged into Facebook through this app. + If `nil`, then the `[FBSDKAccessToken currentAccessToken]` is used. + + + + The JSON in the request's response will include an "custom_audience_third_party_id" key/value pair, with the value being the ID retrieved. + This ID is an encrypted encoding of the Facebook user's ID and the invoking Facebook app ID. + Multiple calls with the same user will return different IDs, thus these IDs cannot be used to correlate behavior + across devices or applications, and are only meaningful when sent back to Facebook for creating Custom Audiences. + + The ID retrieved represents the Facebook user identified in the following way: if the specified access token is valid, + the ID will represent the user associated with that token; otherwise the ID will represent the user logged into the + native Facebook app on the device. If there is no native Facebook app, no one is logged into it, or the user has opted out + at the iOS level from ad tracking, then a `nil` ID will be returned. + + This method returns `nil` if either the user has opted-out (via iOS) from Ad Tracking, the app itself has limited event usage + via the `[FBSDKSettings limitEventAndDataUsage]` flag, or a specific Facebook user cannot be identified. + */ ++ (FBSDKGraphRequest *)requestForCustomAudienceThirdPartyIDWithAccessToken:(FBSDKAccessToken *)accessToken; + +/* + Sets a custom user ID to associate with all app events. + + The userID is persisted until it is cleared by passing nil. + */ ++ (void)setUserID:(NSString *)userID; + +/* + Clears the custom user ID to associate with all app events. + */ ++ (void)clearUserID; + +/* + Returns the set custom user ID. + */ ++ (NSString *)userID; + +/* + Sets custom user data to associate with all app events. All user data are hashed + and used to match Facebook user from this instance of an application. + + The user data will be persisted between application instances. + + @param userData user data to identify the user. User data should be formated as + a NSDictionary of data type name and value. + Supported data types and names are: + Email: em + First Name: fn + Last Name: ln + Phone: ph + Date of Birth: db + Gender: ge + City: ct + State: st + Zip: zp + Country: country + */ ++ (void)setUserData:(NSDictionary *)userData + DEPRECATED_MSG_ATTRIBUTE("Renamed `setUserEmail:firstName: ...`"); + +/* + Sets custom user data to associate with all app events. All user data are hashed + and used to match Facebook user from this instance of an application. + + The user data will be persisted between application instances. + + @param email user's email + @param firstName user's first name + @param lastName user's last name + @param phone user's phone + @param dateOfBirth user's date of birth + @param gender user's gender + @param city user's city + @param state user's state + @param zip user's zip + @param country user's country + */ ++ (void)setUserEmail:(NSString *)email + firstName:(NSString *)firstName + lastName:(NSString *)lastName + phone:(NSString *)phone + dateOfBirth:(NSString *)dateOfBirth + gender:(NSString *)gender + city:(NSString *)city + state:(NSString *)state + zip:(NSString *)zip + country:(NSString *)country; +/* + Returns the set user data else nil +*/ ++ (NSString *)getUserData; + +/* + Clears the current user data +*/ ++ (void)clearUserData; + +/* + Sends a request to update the properties for the current user, set by `setUserID:` + + You must call `FBSDKAppEvents setUserID:` before making this call. + @param properties the custom user properties + @param handler the optional completion handler + */ ++ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler; + +#if !TARGET_OS_TV +/* + Intended to be used as part of a hybrid webapp. + If you call this method, the FB SDK will inject a new JavaScript object into your webview. + If the FB Pixel is used within the webview, and references the app ID of this app, + then it will detect the presence of this injected JavaScript object + and pass Pixel events back to the FB SDK for logging using the AppEvents framework. + + @param webView The webview to augment with the additional JavaScript behaviour + */ ++ (void)augmentHybridWKWebView:(WKWebView *)webView; +#endif + +/* + * Unity helper functions + */ + +/** + + Set if the Unity is already initialized + + @param isUnityInit whether Unity is initialized. + + */ ++ (void)setIsUnityInit:(BOOL)isUnityInit; + +/* + Send event binding to Unity + */ ++ (void)sendEventBindingsToUnity; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.m new file mode 100644 index 0000000..416cd82 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.m @@ -0,0 +1,1336 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppEvents.h" +#import "FBSDKAppEvents+Internal.h" + +#import + +#import + +#import "FBSDKAccessToken.h" +#import "FBSDKAppEventsState.h" +#import "FBSDKAppEventsStateManager.h" +#import "FBSDKAppEventsUtility.h" +#import "FBSDKConstants.h" +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKError.h" +#import "FBSDKGraphRequest+Internal.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKPaymentObserver.h" +#import "FBSDKServerConfiguration.h" +#import "FBSDKServerConfigurationManager.h" +#import "FBSDKSettings.h" +#import "FBSDKTimeSpentData.h" +#import "FBSDKUtility.h" +#import "FBSDKUserDataStore.h" + +#if !TARGET_OS_TV +#import "FBSDKEventBindingManager.h" +#import "FBSDKHybridAppEventsScriptMessageHandler.h" +#endif + +// +// Public event names +// + +// General purpose +NSString *const FBSDKAppEventNameCompletedRegistration = @"fb_mobile_complete_registration"; +NSString *const FBSDKAppEventNameViewedContent = @"fb_mobile_content_view"; +NSString *const FBSDKAppEventNameSearched = @"fb_mobile_search"; +NSString *const FBSDKAppEventNameRated = @"fb_mobile_rate"; +NSString *const FBSDKAppEventNameCompletedTutorial = @"fb_mobile_tutorial_completion"; +NSString *const FBSDKAppEventNameContact = @"Contact"; +NSString *const FBSDKAppEventNameCustomizeProduct = @"CustomizeProduct"; +NSString *const FBSDKAppEventNameDonate = @"Donate"; +NSString *const FBSDKAppEventNameFindLocation = @"FindLocation"; +NSString *const FBSDKAppEventNameSchedule = @"Schedule"; +NSString *const FBSDKAppEventNameStartTrial = @"StartTrial"; +NSString *const FBSDKAppEventNameSubmitApplication = @"SubmitApplication"; +NSString *const FBSDKAppEventNameSubscribe = @"Subscribe"; +NSString *const FBSDKAppEventNameAdImpression = @"AdImpression"; +NSString *const FBSDKAppEventNameAdClick = @"AdClick"; + +// Ecommerce related +NSString *const FBSDKAppEventNameAddedToCart = @"fb_mobile_add_to_cart"; +NSString *const FBSDKAppEventNameAddedToWishlist = @"fb_mobile_add_to_wishlist"; +NSString *const FBSDKAppEventNameInitiatedCheckout = @"fb_mobile_initiated_checkout"; +NSString *const FBSDKAppEventNameAddedPaymentInfo = @"fb_mobile_add_payment_info"; +NSString *const FBSDKAppEventNameProductCatalogUpdate = @"fb_mobile_catalog_update"; + +// Gaming related +NSString *const FBSDKAppEventNameAchievedLevel = @"fb_mobile_level_achieved"; +NSString *const FBSDKAppEventNameUnlockedAchievement = @"fb_mobile_achievement_unlocked"; +NSString *const FBSDKAppEventNameSpentCredits = @"fb_mobile_spent_credits"; + +// +// Public event parameter names +// + +NSString *const FBSDKAppEventParameterNameCurrency = @"fb_currency"; +NSString *const FBSDKAppEventParameterNameRegistrationMethod = @"fb_registration_method"; +NSString *const FBSDKAppEventParameterNameContentType = @"fb_content_type"; +NSString *const FBSDKAppEventParameterNameContent = @"fb_content"; +NSString *const FBSDKAppEventParameterNameContentID = @"fb_content_id"; +NSString *const FBSDKAppEventParameterNameSearchString = @"fb_search_string"; +NSString *const FBSDKAppEventParameterNameSuccess = @"fb_success"; +NSString *const FBSDKAppEventParameterNameMaxRatingValue = @"fb_max_rating_value"; +NSString *const FBSDKAppEventParameterNamePaymentInfoAvailable = @"fb_payment_info_available"; +NSString *const FBSDKAppEventParameterNameNumItems = @"fb_num_items"; +NSString *const FBSDKAppEventParameterNameLevel = @"fb_level"; +NSString *const FBSDKAppEventParameterNameDescription = @"fb_description"; +NSString *const FBSDKAppEventParameterLaunchSource = @"fb_mobile_launch_source"; +NSString *const FBSDKAppEventParameterNameAdType = @"ad_type"; +NSString *const FBSDKAppEventParameterNameOrderID = @"fb_order_id"; + +// +// Public event parameter names for DPA Catalog +// + +NSString *const FBSDKAppEventParameterProductCustomLabel0 = @"fb_product_custom_label_0"; +NSString *const FBSDKAppEventParameterProductCustomLabel1 = @"fb_product_custom_label_1"; +NSString *const FBSDKAppEventParameterProductCustomLabel2 = @"fb_product_custom_label_2"; +NSString *const FBSDKAppEventParameterProductCustomLabel3 = @"fb_product_custom_label_3"; +NSString *const FBSDKAppEventParameterProductCustomLabel4 = @"fb_product_custom_label_4"; +NSString *const FBSDKAppEventParameterProductAppLinkIOSUrl = @"fb_product_applink_ios_url"; +NSString *const FBSDKAppEventParameterProductAppLinkIOSAppStoreID = @"fb_product_applink_ios_app_store_id"; +NSString *const FBSDKAppEventParameterProductAppLinkIOSAppName = @"fb_product_applink_ios_app_name"; +NSString *const FBSDKAppEventParameterProductAppLinkIPhoneUrl = @"fb_product_applink_iphone_url"; +NSString *const FBSDKAppEventParameterProductAppLinkIPhoneAppStoreID = @"fb_product_applink_iphone_app_store_id"; +NSString *const FBSDKAppEventParameterProductAppLinkIPhoneAppName = @"fb_product_applink_iphone_app_name"; +NSString *const FBSDKAppEventParameterProductAppLinkIPadUrl = @"fb_product_applink_ipad_url"; +NSString *const FBSDKAppEventParameterProductAppLinkIPadAppStoreID = @"fb_product_applink_ipad_app_store_id"; +NSString *const FBSDKAppEventParameterProductAppLinkIPadAppName = @"fb_product_applink_ipad_app_name"; +NSString *const FBSDKAppEventParameterProductAppLinkAndroidUrl = @"fb_product_applink_android_url"; +NSString *const FBSDKAppEventParameterProductAppLinkAndroidPackage = @"fb_product_applink_android_package"; +NSString *const FBSDKAppEventParameterProductAppLinkAndroidAppName = @"fb_product_applink_android_app_name"; +NSString *const FBSDKAppEventParameterProductAppLinkWindowsPhoneUrl = @"fb_product_applink_windows_phone_url"; +NSString *const FBSDKAppEventParameterProductAppLinkWindowsPhoneAppID = @"fb_product_applink_windows_phone_app_id"; +NSString *const FBSDKAppEventParameterProductAppLinkWindowsPhoneAppName = @"fb_product_applink_windows_phone_app_name"; + +// +// Public event parameter values +// + +NSString *const FBSDKAppEventParameterValueNo = @"0"; +NSString *const FBSDKAppEventParameterValueYes = @"1"; + +// +// Event names internal to this file +// +NSString *const FBSDKAppEventNamePurchased = @"fb_mobile_purchase"; + +NSString *const FBSDKAppEventNameLoginViewUsage = @"fb_login_view_usage"; +NSString *const FBSDKAppEventNameShareSheetLaunch = @"fb_share_sheet_launch"; +NSString *const FBSDKAppEventNameShareSheetDismiss = @"fb_share_sheet_dismiss"; +NSString *const FBSDKAppEventNameShareTrayDidLaunch = @"fb_share_tray_did_launch"; +NSString *const FBSDKAppEventNameShareTrayDidSelectActivity = @"fb_share_tray_did_select_activity"; +NSString *const FBSDKAppEventNamePermissionsUILaunch = @"fb_permissions_ui_launch"; +NSString *const FBSDKAppEventNamePermissionsUIDismiss = @"fb_permissions_ui_dismiss"; +NSString *const FBSDKAppEventNameFBDialogsPresentShareDialog = @"fb_dialogs_present_share"; +NSString *const FBSDKAppEventNameFBDialogsPresentShareDialogPhoto = @"fb_dialogs_present_share_photo"; +NSString *const FBSDKAppEventNameFBDialogsPresentShareDialogOG = @"fb_dialogs_present_share_og"; +NSString *const FBSDKAppEventNameFBDialogsPresentLikeDialogOG = @"fb_dialogs_present_like_og"; +NSString *const FBSDKAppEventNameFBDialogsPresentMessageDialog = @"fb_dialogs_present_message"; +NSString *const FBSDKAppEventNameFBDialogsPresentMessageDialogPhoto = @"fb_dialogs_present_message_photo"; +NSString *const FBSDKAppEventNameFBDialogsPresentMessageDialogOG = @"fb_dialogs_present_message_og"; + +NSString *const FBSDKAppEventNameFBDialogsNativeLoginDialogStart = @"fb_dialogs_native_login_dialog_start"; +NSString *const FBSDKAppEventsNativeLoginDialogStartTime = @"fb_native_login_dialog_start_time"; + +NSString *const FBSDKAppEventNameFBDialogsNativeLoginDialogEnd = @"fb_dialogs_native_login_dialog_end"; +NSString *const FBSDKAppEventsNativeLoginDialogEndTime = @"fb_native_login_dialog_end_time"; + +NSString *const FBSDKAppEventNameFBDialogsWebLoginCompleted = @"fb_dialogs_web_login_dialog_complete"; +NSString *const FBSDKAppEventsWebLoginE2E = @"fb_web_login_e2e"; + +NSString *const FBSDKAppEventNameFBSessionAuthStart = @"fb_mobile_login_start"; +NSString *const FBSDKAppEventNameFBSessionAuthEnd = @"fb_mobile_login_complete"; +NSString *const FBSDKAppEventNameFBSessionAuthMethodStart = @"fb_mobile_login_method_start"; +NSString *const FBSDKAppEventNameFBSessionAuthMethodEnd = @"fb_mobile_login_method_complete"; + +NSString *const FBSDKAppEventNameFBSDKLikeButtonImpression = @"fb_like_button_impression"; +NSString *const FBSDKAppEventNameFBSDKLoginButtonImpression = @"fb_login_button_impression"; +NSString *const FBSDKAppEventNameFBSDKSendButtonImpression = @"fb_send_button_impression"; +NSString *const FBSDKAppEventNameFBSDKShareButtonImpression = @"fb_share_button_impression"; +NSString *const FBSDKAppEventNameFBSDKLiveStreamingButtonImpression = @"fb_live_streaming_button_impression"; + +NSString *const FBSDKAppEventNameFBSDKSmartLoginService = @"fb_smart_login_service"; + +NSString *const FBSDKAppEventNameFBSDKLikeButtonDidTap = @"fb_like_button_did_tap"; +NSString *const FBSDKAppEventNameFBSDKLoginButtonDidTap = @"fb_login_button_did_tap"; +NSString *const FBSDKAppEventNameFBSDKSendButtonDidTap = @"fb_send_button_did_tap"; +NSString *const FBSDKAppEventNameFBSDKShareButtonDidTap = @"fb_share_button_did_tap"; +NSString *const FBSDKAppEventNameFBSDKLiveStreamingButtonDidTap = @"fb_live_streaming_button_did_tap"; + +NSString *const FBSDKAppEventNameFBSDKLikeControlDidDisable = @"fb_like_control_did_disable"; +NSString *const FBSDKAppEventNameFBSDKLikeControlDidLike = @"fb_like_control_did_like"; +NSString *const FBSDKAppEventNameFBSDKLikeControlDidPresentDialog = @"fb_like_control_did_present_dialog"; +NSString *const FBSDKAppEventNameFBSDKLikeControlDidTap = @"fb_like_control_did_tap"; +NSString *const FBSDKAppEventNameFBSDKLikeControlDidUnlike = @"fb_like_control_did_unlike"; +NSString *const FBSDKAppEventNameFBSDKLikeControlError = @"fb_like_control_error"; +NSString *const FBSDKAppEventNameFBSDKLikeControlImpression = @"fb_like_control_impression"; +NSString *const FBSDKAppEventNameFBSDKLikeControlNetworkUnavailable = @"fb_like_control_network_unavailable"; + +NSString *const FBSDLAppEventNameFBSDKEventShareDialogResult = @"fb_dialog_share_result"; +NSString *const FBSDKAppEventNameFBSDKEventMessengerShareDialogResult = @"fb_messenger_dialog_share_result"; +NSString *const FBSDKAppEventNameFBSDKEventAppInviteShareDialogResult = @"fb_app_invite_dialog_share_result"; + +NSString *const FBSDKAppEventNameFBSDKEventShareDialogShow = @"fb_dialog_share_show"; +NSString *const FBSDKAppEventNameFBSDKEventMessengerShareDialogShow = @"fb_messenger_dialog_share_show"; +NSString *const FBSDKAppEventNameFBSDKEventAppInviteShareDialogShow = @"fb_app_invite_share_show"; + +NSString *const FBSDKAppEventNameFBSessionFASLoginDialogResult = @"fb_mobile_login_fas_dialog_result"; + +NSString *const FBSDKAppEventNameFBSDKLiveStreamingStart = @"fb_sdk_live_streaming_start"; +NSString *const FBSDKAppEventNameFBSDKLiveStreamingStop = @"fb_sdk_live_streaming_stop"; +NSString *const FBSDKAppEventNameFBSDKLiveStreamingPause = @"fb_sdk_live_streaming_pause"; +NSString *const FBSDKAppEventNameFBSDKLiveStreamingResume = @"fb_sdk_live_streaming_resume"; +NSString *const FBSDKAppEventNameFBSDKLiveStreamingError = @"fb_sdk_live_streaming_error"; +NSString *const FBSDKAppEventNameFBSDKLiveStreamingUpdateStatus = @"fb_sdk_live_streaming_update_status"; +NSString *const FBSDKAppEventNameFBSDKLiveStreamingVideoID = @"fb_sdk_live_streaming_video_id"; +NSString *const FBSDKAppEventNameFBSDKLiveStreamingMic = @"fb_sdk_live_streaming_mic"; +NSString *const FBSDKAppEventNameFBSDKLiveStreamingCamera = @"fb_sdk_live_streaming_camera"; + +// Event Parameters internal to this file +NSString *const FBSDKAppEventParameterDialogOutcome = @"fb_dialog_outcome"; +NSString *const FBSDKAppEventParameterDialogErrorMessage = @"fb_dialog_outcome_error_message"; +NSString *const FBSDKAppEventParameterDialogMode = @"fb_dialog_mode"; +NSString *const FBSDKAppEventParameterDialogShareContentType = @"fb_dialog_share_content_type"; +NSString *const FBSDKAppEventParameterDialogShareContentUUID = @"fb_dialog_share_content_uuid"; +NSString *const FBSDKAppEventParameterDialogShareContentPageID = @"fb_dialog_share_content_page_id"; +NSString *const FBSDKAppEventParameterShareTrayActivityName = @"fb_share_tray_activity"; +NSString *const FBSDKAppEventParameterShareTrayResult = @"fb_share_tray_result"; +NSString *const FBSDKAppEventParameterLogTime = @"_logTime"; +NSString *const FBSDKAppEventParameterEventName = @"_eventName"; +NSString *const FBSDKAppEventParameterImplicitlyLogged = @"_implicitlyLogged"; + +NSString *const FBSDKAppEventParameterLiveStreamingPrevStatus = @"live_streaming_prev_status"; +NSString *const FBSDKAppEventParameterLiveStreamingStatus = @"live_streaming_status"; +NSString *const FBSDKAppEventParameterLiveStreamingError = @"live_streaming_error"; +NSString *const FBSDKAppEventParameterLiveStreamingVideoID = @"live_streaming_video_id"; +NSString *const FBSDKAppEventParameterLiveStreamingMicEnabled = @"live_streaming_mic_enabled"; +NSString *const FBSDKAppEventParameterLiveStreamingCameraEnabled = @"live_streaming_camera_enabled"; + +NSString *const FBSDKAppEventParameterProductItemID = @"fb_product_item_id"; +NSString *const FBSDKAppEventParameterProductAvailability = @"fb_product_availability"; +NSString *const FBSDKAppEventParameterProductCondition = @"fb_product_condition"; +NSString *const FBSDKAppEventParameterProductDescription = @"fb_product_description"; +NSString *const FBSDKAppEventParameterProductImageLink = @"fb_product_image_link"; +NSString *const FBSDKAppEventParameterProductLink = @"fb_product_link"; +NSString *const FBSDKAppEventParameterProductTitle = @"fb_product_title"; +NSString *const FBSDKAppEventParameterProductGTIN = @"fb_product_gtin"; +NSString *const FBSDKAppEventParameterProductMPN = @"fb_product_mpn"; +NSString *const FBSDKAppEventParameterProductBrand = @"fb_product_brand"; +NSString *const FBSDKAppEventParameterProductPriceAmount = @"fb_product_price_amount"; +NSString *const FBSDKAppEventParameterProductPriceCurrency = @"fb_product_price_currency"; + +// Event parameter values internal to this file +NSString *const FBSDKAppEventsDialogOutcomeValue_Completed = @"Completed"; +NSString *const FBSDKAppEventsDialogOutcomeValue_Cancelled = @"Cancelled"; +NSString *const FBSDKAppEventsDialogOutcomeValue_Failed = @"Failed"; + +NSString *const FBSDKAppEventsDialogShareModeAutomatic = @"Automatic"; +NSString *const FBSDKAppEventsDialogShareModeBrowser = @"Browser"; +NSString *const FBSDKAppEventsDialogShareModeNative = @"Native"; +NSString *const FBSDKAppEventsDialogShareModeShareSheet = @"ShareSheet"; +NSString *const FBSDKAppEventsDialogShareModeWeb = @"Web"; +NSString *const FBSDKAppEventsDialogShareModeFeedBrowser = @"FeedBrowser"; +NSString *const FBSDKAppEventsDialogShareModeFeedWeb = @"FeedWeb"; +NSString *const FBSDKAppEventsDialogShareModeUnknown = @"Unknown"; + +NSString *const FBSDKAppEventsDialogShareContentTypeOpenGraph = @"OpenGraph"; +NSString *const FBSDKAppEventsDialogShareContentTypeStatus = @"Status"; +NSString *const FBSDKAppEventsDialogShareContentTypePhoto = @"Photo"; +NSString *const FBSDKAppEventsDialogShareContentTypeVideo = @"Video"; +NSString *const FBSDKAppEventsDialogShareContentTypeCamera = @"Camera"; +NSString *const FBSDKAppEventsDialogShareContentTypeMessengerGenericTemplate = @"GenericTemplate"; +NSString *const FBSDKAppEventsDialogShareContentTypeMessengerMediaTemplate = @"MediaTemplate"; +NSString *const FBSDKAppEventsDialogShareContentTypeMessengerOpenGraphMusicTemplate = @"OpenGraphMusicTemplate"; +NSString *const FBSDKAppEventsDialogShareContentTypeUnknown = @"Unknown"; + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +NSNotificationName const FBSDKAppEventsLoggingResultNotification = @"com.facebook.sdk:FBSDKAppEventsLoggingResultNotification"; + +#else + +NSString *const FBSDKAppEventsLoggingResultNotification = @"com.facebook.sdk:FBSDKAppEventsLoggingResultNotification"; + +#endif + +NSString *const FBSDKAppEventsOverrideAppIDBundleKey = @"FacebookLoggingOverrideAppID"; + +// +// Push Notifications +// +// Activities Endpoint Parameter +static NSString *const FBSDKActivitesParameterPushDeviceToken = @"device_token"; +// Event Names +static NSString *const FBSDKAppEventNamePushTokenObtained = @"fb_mobile_obtain_push_token"; +static NSString *const FBSDKAppEventNamePushOpened = @"fb_mobile_push_opened"; +// Event Parameter +static NSString *const FBSDKAppEventParameterPushCampaign = @"fb_push_campaign"; +static NSString *const FBSDKAppEventParameterPushAction = @"fb_push_action"; +// Payload Keys +static NSString *const FBSDKAppEventsPushPayloadKey = @"fb_push_payload"; +static NSString *const FBSDKAppEventsPushPayloadCampaignKey = @"campaign"; + +// +// Augmentation of web browser constants +// +NSString *const FBSDKAppEventsWKWebViewMessagesPixelIDKey = @"pixelID"; +NSString *const FBSDKAppEventsWKWebViewMessagesHandlerKey = @"fbmqHandler"; +NSString *const FBSDKAppEventsWKWebViewMessagesEventKey = @"event"; +NSString *const FBSDKAppEventsWKWebViewMessagesParamsKey = @"params"; +NSString *const FBSDKAPPEventsWKWebViewMessagesProtocolKey = @"fbmq-0.1"; + + +#define NUM_LOG_EVENTS_TO_TRY_TO_FLUSH_AFTER 100 +#define FLUSH_PERIOD_IN_SECONDS 15 +#define USER_ID_USER_DEFAULTS_KEY @"com.facebook.sdk.appevents.userid" + +#define FBUnityUtilityClassName "FBUnityUtility" +#define FBUnityUtilityUpdateBindingsSelector @"triggerUpdateBindings:" + +#define UNINSTALL_TRACKING_DEVICE_ID_KEY @"device_id" +#define UNINSTALL_TRACKING_PLATFORM_KEY @"platform" +#define UNINSTALL_TRACKING_DEVICE_TOKEN_KEY @"device_token" +#define UNINSTALL_TRACKING_TOKEN_ENDPOINT @"app_push_device_token" + +static NSString *g_overrideAppID = nil; + +@interface FBSDKAppEvents () + +@property (nonatomic, assign) FBSDKAppEventsFlushBehavior flushBehavior; +//for testing only. +@property (nonatomic, assign) BOOL disableTimer; + +@property (nonatomic, copy) NSString *pushNotificationsDeviceTokenString; + +@property (nonatomic, strong) dispatch_source_t flushTimer; + +@end + +@implementation FBSDKAppEvents +{ + BOOL _explicitEventsLoggedYet; + FBSDKServerConfiguration *_serverConfiguration; + FBSDKAppEventsState *_appEventsState; +#if !TARGET_OS_TV + FBSDKEventBindingManager *_eventBindingManager; +#endif + NSString *_userID; + BOOL _isUnityInit; +} + +#pragma mark - Object Lifecycle + ++ (void)initialize +{ + if (self == [FBSDKAppEvents class]) { + g_overrideAppID = [[[NSBundle mainBundle] objectForInfoDictionaryKey:FBSDKAppEventsOverrideAppIDBundleKey] copy]; + } +} + +- (FBSDKAppEvents *)init +{ + self = [super init]; + if (self) { + _flushBehavior = FBSDKAppEventsFlushBehaviorAuto; + + typeof(self) __weak weakSelf = self; + self.flushTimer = [FBSDKUtility startGCDTimerWithInterval:FLUSH_PERIOD_IN_SECONDS + block:^{ + [weakSelf flushTimerFired:nil]; + }]; + + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + _userID = [defaults stringForKey:USER_ID_USER_DEFAULTS_KEY]; + [self fetchServerConfiguration:nil]; + } + + return self; +} + +- (void)registerNotifications { + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(applicationMovingFromActiveStateOrTerminating) + name:UIApplicationWillResignActiveNotification + object:NULL]; + + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(applicationMovingFromActiveStateOrTerminating) + name:UIApplicationWillTerminateNotification + object:NULL]; + + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(applicationDidBecomeActive) + name:UIApplicationDidBecomeActiveNotification + object:NULL]; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; + [FBSDKUtility stopGCDTimer:self.flushTimer]; +} + +#pragma mark - Public Methods + ++ (void)logEvent:(NSString *)eventName +{ + [FBSDKAppEvents logEvent:eventName + parameters:nil]; +} + ++ (void)logEvent:(NSString *)eventName + valueToSum:(double)valueToSum +{ + [FBSDKAppEvents logEvent:eventName + valueToSum:valueToSum + parameters:nil]; +} + ++ (void)logEvent:(NSString *)eventName + parameters:(NSDictionary *)parameters +{ + [FBSDKAppEvents logEvent:eventName + valueToSum:nil + parameters:parameters + accessToken:nil]; +} + ++ (void)logEvent:(NSString *)eventName + valueToSum:(double)valueToSum + parameters:(NSDictionary *)parameters +{ + [FBSDKAppEvents logEvent:eventName + valueToSum:@(valueToSum) + parameters:parameters + accessToken:nil]; +} + ++ (void)logEvent:(NSString *)eventName + valueToSum:(NSNumber *)valueToSum + parameters:(NSDictionary *)parameters + accessToken:(FBSDKAccessToken *)accessToken +{ + [[FBSDKAppEvents singleton] instanceLogEvent:eventName + valueToSum:valueToSum + parameters:parameters + isImplicitlyLogged:(BOOL)parameters[FBSDKAppEventParameterImplicitlyLogged] + accessToken:accessToken]; +} + ++ (void)logPurchase:(double)purchaseAmount + currency:(NSString *)currency +{ + [FBSDKAppEvents logPurchase:purchaseAmount + currency:currency + parameters:nil]; +} + ++ (void)logPurchase:(double)purchaseAmount + currency:(NSString *)currency + parameters:(NSDictionary *)parameters +{ + [FBSDKAppEvents logPurchase:purchaseAmount + currency:currency + parameters:parameters + accessToken:nil]; +} + ++ (void)logPurchase:(double)purchaseAmount + currency:(NSString *)currency + parameters:(NSDictionary *)parameters + accessToken:(FBSDKAccessToken *)accessToken +{ + + // A purchase event is just a regular logged event with a given event name + // and treating the currency value as going into the parameters dictionary. + NSDictionary *newParameters; + if (!parameters) { + newParameters = @{ FBSDKAppEventParameterNameCurrency : currency }; + } else { + newParameters = [NSMutableDictionary dictionaryWithDictionary:parameters]; + [newParameters setValue:currency forKey:FBSDKAppEventParameterNameCurrency]; + } + + [FBSDKAppEvents logEvent:FBSDKAppEventNamePurchased + valueToSum:@(purchaseAmount) + parameters:newParameters + accessToken:accessToken]; + + // Unless the behavior is set to only allow explicit flushing, we go ahead and flush, since purchase events + // are relatively rare and relatively high value and worth getting across on wire right away. + if ([FBSDKAppEvents flushBehavior] != FBSDKAppEventsFlushBehaviorExplicitOnly) { + [[FBSDKAppEvents singleton] flushForReason:FBSDKAppEventsFlushReasonEagerlyFlushingEvent]; + } +} + +/* + * Push Notifications Logging + */ + ++ (void)logPushNotificationOpen:(NSDictionary *)payload +{ + [self logPushNotificationOpen:payload action:nil]; +} + ++ (void)logPushNotificationOpen:(NSDictionary *)payload action:(NSString *)action +{ + NSDictionary *facebookPayload = payload[FBSDKAppEventsPushPayloadKey]; + if (!facebookPayload) { + return; + } + NSString *campaign = facebookPayload[FBSDKAppEventsPushPayloadCampaignKey]; + if (campaign.length == 0) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"Malformed payload specified for logging a push notification open."]; + return; + } + + NSMutableDictionary *parameters = [NSMutableDictionary dictionaryWithObject:campaign forKey:FBSDKAppEventParameterPushCampaign]; + if (action) { + parameters[FBSDKAppEventParameterPushAction] = action; + } + [self logEvent:FBSDKAppEventNamePushOpened parameters:parameters]; +} + +/* + * Uploads product catalog product item as an app event + */ ++ (void)logProductItem:(NSString *)itemID + availability:(FBSDKProductAvailability)availability + condition:(FBSDKProductCondition)condition + description:(NSString *)description + imageLink:(NSString *)imageLink + link:(NSString *)link + title:(NSString *)title + priceAmount:(double)priceAmount + currency:(NSString *)currency + gtin:(NSString *)gtin + mpn:(NSString *)mpn + brand:(NSString *)brand + parameters:(NSDictionary *)parameters { + if (itemID == nil) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"itemID cannot be null"]; + return; + } else if (description == nil) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"description cannot be null"]; + return; + } else if (imageLink == nil) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"imageLink cannot be null"]; + return; + } else if (link == nil) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"link cannot be null"]; + return; + } else if (title == nil) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"title cannot be null"]; + return; + } else if (currency == nil) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"currency cannot be null"]; + return; + } else if (gtin == nil && mpn == nil && brand == nil) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"Either gtin, mpn or brand is required"]; + return; + } + + NSMutableDictionary *dict = [NSMutableDictionary dictionary]; + if (nil != parameters) { + [dict setValuesForKeysWithDictionary:parameters]; + } + + dict[FBSDKAppEventParameterProductItemID] = itemID; + + NSString *avail = nil; + switch (availability) { + case FBSDKProductAvailabilityInStock: + avail = @"IN_STOCK"; break; + case FBSDKProductAvailabilityOutOfStock: + avail = @"OUT_OF_STOCK"; break; + case FBSDKProductAvailabilityPreOrder: + avail = @"PREORDER"; break; + case FBSDKProductAvailabilityAvailableForOrder: + avail = @"AVALIABLE_FOR_ORDER"; break; + case FBSDKProductAvailabilityDiscontinued: + avail = @"DISCONTINUED"; break; + } + if (avail) { + dict[FBSDKAppEventParameterProductAvailability] = avail; + } + + NSString *cond = nil; + switch (condition) { + case FBSDKProductConditionNew: + cond = @"NEW"; break; + case FBSDKProductConditionRefurbished: + cond = @"REFURBISHED"; break; + case FBSDKProductConditionUsed: + cond = @"USED"; break; + } + if (cond) { + dict[FBSDKAppEventParameterProductCondition] = cond; + } + + dict[FBSDKAppEventParameterProductDescription] = description; + dict[FBSDKAppEventParameterProductImageLink] = imageLink; + dict[FBSDKAppEventParameterProductLink] = link; + dict[FBSDKAppEventParameterProductTitle] = title; + dict[FBSDKAppEventParameterProductPriceAmount] = [NSString stringWithFormat:@"%.3lf", priceAmount]; + dict[FBSDKAppEventParameterProductPriceCurrency] = currency; + if (gtin) { + dict[FBSDKAppEventParameterProductGTIN] = gtin; + } + if (mpn) { + dict[FBSDKAppEventParameterProductMPN] = mpn; + } + if (brand) { + dict[FBSDKAppEventParameterProductBrand] = brand; + } + + [FBSDKAppEvents logEvent:FBSDKAppEventNameProductCatalogUpdate + parameters:dict]; +} + ++ (void)activateApp +{ + [FBSDKAppEventsUtility ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass(self)]; + + // Fetch app settings and register for transaction notifications only if app supports implicit purchase + // events + FBSDKAppEvents *instance = [FBSDKAppEvents singleton]; + [instance publishInstall]; + [instance fetchServerConfiguration:NULL]; + + // Restore time spent data, indicating that we're being called from "activateApp", which will, + // when appropriate, result in logging an "activated app" and "deactivated app" (for the + // previous session) App Event. + [FBSDKTimeSpentData restore:YES]; + [FBSDKUserDataStore initStore]; +} + ++ (void)setPushNotificationsDeviceToken:(NSData *)deviceToken +{ + NSString *deviceTokenString = [FBSDKInternalUtility hexadecimalStringFromData:deviceToken]; + [FBSDKAppEvents setPushNotificationsDeviceTokenString:deviceTokenString]; +} + ++ (void)setPushNotificationsDeviceTokenString:(NSString *)deviceTokenString +{ + if (deviceTokenString == nil) { + [FBSDKAppEvents singleton].pushNotificationsDeviceTokenString = nil; + return; + } + + if (![deviceTokenString isEqualToString:([FBSDKAppEvents singleton].pushNotificationsDeviceTokenString)]) { + [FBSDKAppEvents singleton].pushNotificationsDeviceTokenString = deviceTokenString; + + [FBSDKAppEvents logEvent:FBSDKAppEventNamePushTokenObtained]; + + // Unless the behavior is set to only allow explicit flushing, we go ahead and flush the event + if ([FBSDKAppEvents flushBehavior] != FBSDKAppEventsFlushBehaviorExplicitOnly) { + [[FBSDKAppEvents singleton] flushForReason:FBSDKAppEventsFlushReasonEagerlyFlushingEvent]; + } + } +} + ++ (FBSDKAppEventsFlushBehavior)flushBehavior +{ + return [FBSDKAppEvents singleton].flushBehavior; +} + ++ (void)setFlushBehavior:(FBSDKAppEventsFlushBehavior)flushBehavior +{ + [FBSDKAppEvents singleton].flushBehavior = flushBehavior; +} + ++ (NSString *)loggingOverrideAppID +{ + return g_overrideAppID; +} + ++ (void)setLoggingOverrideAppID:(NSString *)appID +{ + if (![g_overrideAppID isEqualToString:appID]) { + FBSDKConditionalLog(![FBSDKAppEvents singleton]->_explicitEventsLoggedYet, + FBSDKLoggingBehaviorDeveloperErrors, + @"[FBSDKAppEvents setLoggingOverrideAppID:] should only be called prior to any events being logged."); + g_overrideAppID = appID; + } +} + ++ (void)flush +{ + [[FBSDKAppEvents singleton] flushForReason:FBSDKAppEventsFlushReasonExplicit]; +} + ++ (void)setUserID:(NSString *)userID +{ + if ([[[self class] singleton]->_userID isEqualToString:userID]) { + return; + } + [[self class] singleton]->_userID = userID; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults setObject:userID forKey:USER_ID_USER_DEFAULTS_KEY]; + [defaults synchronize]; +} + ++ (void)clearUserID +{ + [self setUserID:nil]; +} + ++ (NSString *)userID +{ + return [[self class] singleton]->_userID; +} + ++ (void)setUserData:(NSDictionary*)userData +{ + [FBSDKUserDataStore setUserDataAndHash:userData]; +} + ++ (void)setUserEmail:(NSString *)email + firstName:(NSString *)firstName + lastName:(NSString *)lastName + phone:(NSString *)phone + dateOfBirth:(NSString *)dateOfBirth + gender:(NSString *)gender + city:(NSString *)city + state:(NSString *)state + zip:(NSString *)zip + country:(NSString *)country +{ + [FBSDKUserDataStore setUserDataAndHash:email + firstName:firstName + lastName:lastName + phone:phone + dateOfBirth:dateOfBirth + gender:gender + city:city + state:state + zip:zip + country:country]; +} + ++ (NSString*)getUserData +{ + return [FBSDKUserDataStore getHashedUserData]; +} + ++ (void)clearUserData +{ + [FBSDKUserDataStore setUserDataAndHash:nil + firstName:nil + lastName:nil + phone:nil + dateOfBirth:nil + gender:nil + city:nil + state:nil + zip:nil + country:nil]; +} + ++ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler +{ + NSString *userID = [[self class] userID]; + + if (userID.length == 0) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors logEntry:@"Missing [FBSDKAppEvents userID] for [FBSDKAppEvents updateUserProperties:]"]; + NSError *error = [NSError fbRequiredArgumentErrorWithName:@"userID" message:@"Missing [FBSDKAppEvents userID] for [FBSDKAppEvents updateUserProperties:]"]; + if (handler) { + handler(nil, nil, error); + } + return; + } + NSMutableDictionary *dataDictionary = [NSMutableDictionary dictionaryWithCapacity:3]; + dataDictionary[@"user_unique_id"] = [FBSDKAppEvents userID]; + [FBSDKInternalUtility dictionary:dataDictionary setObject:[FBSDKAppEventsUtility advertiserID] forKey:@"advertiser_id"]; + [FBSDKInternalUtility dictionary:dataDictionary setObject:properties forKey:@"custom_data"]; + + NSError *error; + __block NSError *invalidObjectError; + NSString *dataJSONString = [FBSDKInternalUtility JSONStringForObject:@[dataDictionary] error:&error invalidObjectHandler:^id(id object, BOOL *stop) { + *stop = YES; + invalidObjectError = [NSError fbUnknownErrorWithMessage:@"The values in the properties dictionary must be NSStrings or NSNumbers"]; + return nil; + }]; + if (!error) { + error = invalidObjectError; + } + if (error) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors logEntry:@"Failed to serialize properties for [FBSDKAppEvents updateUserProperties:]"]; + if (handler) { + handler(nil, nil, error); + } + return; + } + NSDictionary *params = @{ @"data" : dataJSONString }; + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:[NSString stringWithFormat:@"%@/user_properties", [[self singleton] appID]] + parameters:params + tokenString:[FBSDKAccessToken currentAccessToken].tokenString + HTTPMethod:@"POST" + flags:FBSDKGraphRequestFlagDisableErrorRecovery | + FBSDKGraphRequestFlagDoNotInvalidateTokenOnError | + FBSDKGraphRequestFlagSkipClientToken + ]; + [request startWithCompletionHandler:handler]; +} + +#if !TARGET_OS_TV ++ (void)augmentHybridWKWebView:(WKWebView *)webView { + // Ensure we can instantiate WebKit before trying this + Class WKWebViewClass = fbsdkdfl_WKWebViewClass(); + if (WKWebViewClass != nil && [webView isKindOfClass:WKWebViewClass]) { + Class WKUserScriptClass = fbsdkdfl_WKUserScriptClass(); + if (WKUserScriptClass != nil) { + WKUserContentController *controller = webView.configuration.userContentController; + FBSDKHybridAppEventsScriptMessageHandler *scriptHandler = [[FBSDKHybridAppEventsScriptMessageHandler alloc] init]; + [controller addScriptMessageHandler:scriptHandler name:FBSDKAppEventsWKWebViewMessagesHandlerKey]; + + NSString *js = [NSString stringWithFormat:@"window.fbmq_%@={'sendEvent': function(pixel_id,event_name,custom_data){var msg={\"%@\":pixel_id, \"%@\":event_name,\"%@\":custom_data};window.webkit.messageHandlers[\"%@\"].postMessage(msg);}, 'getProtocol':function(){return \"%@\";}}", + [[self singleton] appID], + FBSDKAppEventsWKWebViewMessagesPixelIDKey, + FBSDKAppEventsWKWebViewMessagesEventKey, + FBSDKAppEventsWKWebViewMessagesParamsKey, + FBSDKAppEventsWKWebViewMessagesHandlerKey, + FBSDKAPPEventsWKWebViewMessagesProtocolKey + ]; + + [controller addUserScript:[[WKUserScriptClass alloc] initWithSource:js injectionTime:WKUserScriptInjectionTimeAtDocumentStart forMainFrameOnly:NO]]; + } + } + else { + [FBSDKAppEventsUtility logAndNotify:@"You must call augmentHybridWKWebView with WebKit linked to your project and a WKWebView instance"]; + } +} +#endif + ++ (void)setIsUnityInit:(BOOL)isUnityInit +{ + [FBSDKAppEvents singleton]->_isUnityInit = isUnityInit; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" ++ (void)sendEventBindingsToUnity +{ + // Send event bindings to Unity only Unity is initialized + if ([FBSDKAppEvents singleton]->_isUnityInit + && [FBSDKAppEvents singleton]->_serverConfiguration + && [NSJSONSerialization isValidJSONObject:[FBSDKAppEvents singleton]->_serverConfiguration.eventBindings] + ) { + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:[FBSDKAppEvents singleton]->_serverConfiguration.eventBindings ?: @"" + options:0 + error:nil]; + NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + Class classFBUnityUtility = objc_lookUpClass(FBUnityUtilityClassName); + SEL updateBindingSelector = NSSelectorFromString(FBUnityUtilityUpdateBindingsSelector); + if ([classFBUnityUtility respondsToSelector:updateBindingSelector]) { + [classFBUnityUtility performSelector:updateBindingSelector withObject:jsonString]; + } + } +} +#pragma clang diagnostic pop + +#pragma mark - Internal Methods + ++ (void)logImplicitEvent:(NSString *)eventName + valueToSum:(NSNumber *)valueToSum + parameters:(NSDictionary *)parameters + accessToken:(FBSDKAccessToken *)accessToken +{ + [[FBSDKAppEvents singleton] instanceLogEvent:eventName + valueToSum:valueToSum + parameters:parameters + isImplicitlyLogged:YES + accessToken:accessToken]; +} + ++ (FBSDKAppEvents *)singleton +{ + static dispatch_once_t pred; + static FBSDKAppEvents *shared = nil; + + dispatch_once(&pred, ^{ + shared = [[FBSDKAppEvents alloc] init]; + }); + return shared; +} + +- (void)flushForReason:(FBSDKAppEventsFlushReason)flushReason +{ + // Always flush asynchronously, even on main thread, for two reasons: + // - most consistent code path for all threads. + // - allow locks being held by caller to be released prior to actual flushing work being done. + @synchronized (self) { + if (!_appEventsState) { + return; + } + FBSDKAppEventsState *copy = [_appEventsState copy]; + _appEventsState = [[FBSDKAppEventsState alloc] initWithToken:copy.tokenString + appID:copy.appID]; + dispatch_async(dispatch_get_main_queue(), ^{ + [self flushOnMainQueue:copy forReason:flushReason]; + }); + } +} + +#pragma mark - Private Methods +- (NSString *)appID +{ + return [FBSDKAppEvents loggingOverrideAppID] ?: [FBSDKSettings appID]; +} + +- (void)publishInstall +{ + NSString *appID = [self appID]; + if (appID.length == 0) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors logEntry:@"Missing [FBSDKAppEvents appID] for [FBSDKAppEvents publishInstall:]"]; + return; + } + NSString *lastAttributionPingString = [NSString stringWithFormat:@"com.facebook.sdk:lastAttributionPing%@", appID]; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + if ([defaults objectForKey:lastAttributionPingString]) { + return; + } + [self fetchServerConfiguration:^{ + NSDictionary *params = [FBSDKAppEventsUtility activityParametersDictionaryForEvent:@"MOBILE_APP_INSTALL" + implicitEventsOnly:NO + shouldAccessAdvertisingID:self->_serverConfiguration.isAdvertisingIDEnabled]; + NSString *path = [NSString stringWithFormat:@"%@/activities", appID]; + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:path + parameters:params + tokenString:nil + HTTPMethod:@"POST" + flags:FBSDKGraphRequestFlagDoNotInvalidateTokenOnError | FBSDKGraphRequestFlagDisableErrorRecovery]; + [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + if (!error) { + [defaults setObject:[NSDate date] forKey:lastAttributionPingString]; + NSString *lastInstallResponseKey = [NSString stringWithFormat:@"com.facebook.sdk:lastInstallResponse%@", appID]; + [defaults setObject:result forKey:lastInstallResponseKey]; + [defaults synchronize]; + } + }]; + }]; +} + +#if !TARGET_OS_TV +- (void)enableCodelessEvents { + if (_serverConfiguration.isCodelessEventsEnabled) { + if (!_eventBindingManager) { + _eventBindingManager = [[FBSDKEventBindingManager alloc] init]; + [_eventBindingManager start]; + } + + if ([FBSDKInternalUtility isUnity]) { + [FBSDKAppEvents sendEventBindingsToUnity]; + } else { + [_eventBindingManager updateBindings:[FBSDKEventBindingManager + parseArray:_serverConfiguration.eventBindings]]; + } + } +} +#endif + +// app events can use a server configuration up to 24 hours old to minimize network traffic. +- (void)fetchServerConfiguration:(void (^)(void))callback +{ + [FBSDKServerConfigurationManager loadServerConfigurationWithCompletionBlock:^(FBSDKServerConfiguration *serverConfiguration, NSError *error) { + self->_serverConfiguration = serverConfiguration; + + if (self->_serverConfiguration.implicitPurchaseLoggingEnabled) { + [FBSDKPaymentObserver startObservingTransactions]; + } else { + [FBSDKPaymentObserver stopObservingTransactions]; + } +#if !TARGET_OS_TV + [self enableCodelessEvents]; +#endif + if (callback) { + callback(); + } + }]; +} + +- (void)instanceLogEvent:(NSString *)eventName + valueToSum:(NSNumber *)valueToSum + parameters:(NSDictionary *)parameters + isImplicitlyLogged:(BOOL)isImplicitlyLogged + accessToken:(FBSDKAccessToken *)accessToken +{ + if (isImplicitlyLogged && _serverConfiguration && !_serverConfiguration.isImplicitLoggingSupported) { + return; + } + + if (!isImplicitlyLogged && !_explicitEventsLoggedYet) { + _explicitEventsLoggedYet = YES; + } + + __block BOOL failed = NO; + + if (![FBSDKAppEventsUtility validateIdentifier:eventName]) { + failed = YES; + } + + // Make sure parameter dictionary is well formed. Log and exit if not. + [parameters enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { + if (![key isKindOfClass:[NSString class]]) { + [FBSDKAppEventsUtility logAndNotify:[NSString stringWithFormat:@"The keys in the parameters must be NSStrings, '%@' is not.", key]]; + failed = YES; + } + if (![FBSDKAppEventsUtility validateIdentifier:key]) { + failed = YES; + } + if (![obj isKindOfClass:[NSString class]] && ![obj isKindOfClass:[NSNumber class]]) { + [FBSDKAppEventsUtility logAndNotify:[NSString stringWithFormat:@"The values in the parameters dictionary must be NSStrings or NSNumbers, '%@' is not.", obj]]; + failed = YES; + } + } + ]; + + if (failed) { + return; + } + + NSMutableDictionary *eventDictionary = [NSMutableDictionary dictionaryWithDictionary:parameters]; + eventDictionary[FBSDKAppEventParameterEventName] = eventName; + if (!eventDictionary[FBSDKAppEventParameterLogTime]) { + eventDictionary[FBSDKAppEventParameterLogTime] = @([FBSDKAppEventsUtility unixTimeNow]); + } + [FBSDKInternalUtility dictionary:eventDictionary setObject:valueToSum forKey:@"_valueToSum"]; + if (isImplicitlyLogged) { + eventDictionary[FBSDKAppEventParameterImplicitlyLogged] = @"1"; + } + + NSString *currentViewControllerName; + if ([NSThread isMainThread]) { + // We only collect the view controller when on the main thread, as the behavior off + // the main thread is unpredictable. Besides, UI state for off-main-thread computations + // isn't really relevant anyhow. + UIViewController *vc = [UIApplication sharedApplication].keyWindow.rootViewController.presentedViewController; + if (vc) { + currentViewControllerName = [[vc class] description]; + } else { + currentViewControllerName = @"no_ui"; + } + } else { + currentViewControllerName = @"off_thread"; + } + eventDictionary[@"_ui"] = currentViewControllerName; + + NSString *tokenString = [FBSDKAppEventsUtility tokenStringToUseFor:accessToken]; + NSString *appID = [self appID]; + + @synchronized (self) { + if (!_appEventsState) { + _appEventsState = [[FBSDKAppEventsState alloc] initWithToken:tokenString appID:appID]; + } else if (![_appEventsState isCompatibleWithTokenString:tokenString appID:appID]) { + if (self.flushBehavior == FBSDKAppEventsFlushBehaviorExplicitOnly) { + [FBSDKAppEventsStateManager persistAppEventsData:_appEventsState]; + } else { + [self flushForReason:FBSDKAppEventsFlushReasonSessionChange]; + } + _appEventsState = [[FBSDKAppEventsState alloc] initWithToken:tokenString appID:appID]; + } + + [_appEventsState addEvent:eventDictionary isImplicit:isImplicitlyLogged]; + if (!isImplicitlyLogged) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents + formatString:@"FBSDKAppEvents: Recording event @ %ld: %@", + [FBSDKAppEventsUtility unixTimeNow], + eventDictionary]; + } + + [self checkPersistedEvents]; + + if (_appEventsState.events.count > NUM_LOG_EVENTS_TO_TRY_TO_FLUSH_AFTER && + self.flushBehavior != FBSDKAppEventsFlushBehaviorExplicitOnly) { + [self flushForReason:FBSDKAppEventsFlushReasonEventThreshold]; + } + } +} + +// this fetches persisted event states. +// for those matching the currently tracked events, add it. +// otherwise, either flush (if not explicitonly behavior) or persist them back. +- (void)checkPersistedEvents +{ + NSArray *existingEventsStates = [FBSDKAppEventsStateManager retrievePersistedAppEventsStates]; + if (existingEventsStates.count == 0) { + return; + } + FBSDKAppEventsState *matchingEventsPreviouslySaved = nil; + // reduce lock time by creating a new FBSDKAppEventsState to collect matching persisted events. + @synchronized(self) { + if (_appEventsState) { + matchingEventsPreviouslySaved = [[FBSDKAppEventsState alloc] initWithToken:_appEventsState.tokenString + appID:_appEventsState.appID]; + } + } + for (FBSDKAppEventsState *saved in existingEventsStates) { + if ([saved isCompatibleWithAppEventsState:matchingEventsPreviouslySaved]) { + [matchingEventsPreviouslySaved addEventsFromAppEventState:saved]; + } else { + if (self.flushBehavior == FBSDKAppEventsFlushBehaviorExplicitOnly) { + [FBSDKAppEventsStateManager persistAppEventsData:saved]; + } else { + dispatch_async(dispatch_get_main_queue(), ^{ + [self flushOnMainQueue:saved forReason:FBSDKAppEventsFlushReasonPersistedEvents]; + }); + } + } + } + if (matchingEventsPreviouslySaved.events.count > 0) { + @synchronized(self) { + if ([_appEventsState isCompatibleWithAppEventsState:matchingEventsPreviouslySaved]) { + [_appEventsState addEventsFromAppEventState:matchingEventsPreviouslySaved]; + } + } + } +} + +- (void)flushOnMainQueue:(FBSDKAppEventsState *)appEventsState + forReason:(FBSDKAppEventsFlushReason)reason +{ + + if (appEventsState.events.count == 0) { + return; + } + + if (appEventsState.appID.length == 0) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors logEntry:@"Missing [FBSDKAppEvents appEventsState.appID] for [FBSDKAppEvents flushOnMainQueue:]"]; + return; + } + + [FBSDKAppEventsUtility ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass([self class])]; + + [self fetchServerConfiguration:^(void) { + NSString *receipt_data = [appEventsState extractReceiptData]; + NSString *encodedEvents = [appEventsState JSONStringForEvents:self->_serverConfiguration.implicitLoggingEnabled]; + if (!encodedEvents) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents + logEntry:@"FBSDKAppEvents: Flushing skipped - no events after removing implicitly logged ones.\n"]; + return; + } + NSMutableDictionary *postParameters = [FBSDKAppEventsUtility + activityParametersDictionaryForEvent:@"CUSTOM_APP_EVENTS" + implicitEventsOnly:appEventsState.areAllEventsImplicit + shouldAccessAdvertisingID:self->_serverConfiguration.advertisingIDEnabled]; + NSInteger length = receipt_data.length; + if (length > 0) { + postParameters[@"receipt_data"] = receipt_data; + } + + postParameters[@"custom_events"] = encodedEvents; + if (appEventsState.numSkipped > 0) { + postParameters[@"num_skipped_events"] = [NSString stringWithFormat:@"%lu", (unsigned long)appEventsState.numSkipped]; + } + if (self.pushNotificationsDeviceTokenString) { + postParameters[FBSDKActivitesParameterPushDeviceToken] = self.pushNotificationsDeviceTokenString; + } + + NSString *loggingEntry = nil; + if ([FBSDKSettings.loggingBehaviors containsObject:FBSDKLoggingBehaviorAppEvents]) { + NSData *prettyJSONData = [NSJSONSerialization dataWithJSONObject:appEventsState.events + options:NSJSONWritingPrettyPrinted + error:NULL]; + NSString *prettyPrintedJsonEvents = [[NSString alloc] initWithData:prettyJSONData + encoding:NSUTF8StringEncoding]; + // Remove this param -- just an encoding of the events which we pretty print later. + NSMutableDictionary *paramsForPrinting = [postParameters mutableCopy]; + [paramsForPrinting removeObjectForKey:@"custom_events_file"]; + + loggingEntry = [NSString stringWithFormat:@"FBSDKAppEvents: Flushed @ %ld, %lu events due to '%@' - %@\nEvents: %@", + [FBSDKAppEventsUtility unixTimeNow], + (unsigned long)appEventsState.events.count, + [FBSDKAppEventsUtility flushReasonToString:reason], + paramsForPrinting, + prettyPrintedJsonEvents]; + } + + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:[NSString stringWithFormat:@"%@/activities", appEventsState.appID] + parameters:postParameters + tokenString:appEventsState.tokenString + HTTPMethod:@"POST" + flags:FBSDKGraphRequestFlagDoNotInvalidateTokenOnError | FBSDKGraphRequestFlagDisableErrorRecovery]; + + [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + [self handleActivitiesPostCompletion:error + loggingEntry:loggingEntry + appEventsState:(FBSDKAppEventsState *)appEventsState]; + }]; + + }]; +} + +- (void)handleActivitiesPostCompletion:(NSError *)error + loggingEntry:(NSString *)loggingEntry + appEventsState:(FBSDKAppEventsState *)appEventsState +{ + typedef NS_ENUM(NSUInteger, FBSDKAppEventsFlushResult) { + FlushResultSuccess, + FlushResultServerError, + FlushResultNoConnectivity + }; + + [FBSDKAppEventsUtility ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass([self class])]; + + FBSDKAppEventsFlushResult flushResult = FlushResultSuccess; + if (error) { + NSInteger errorCode = [error.userInfo[FBSDKGraphRequestErrorHTTPStatusCodeKey] integerValue]; + + // We interpret a 400 coming back from FBRequestConnection as a server error due to improper data being + // sent down. Otherwise we assume no connectivity, or another condition where we could treat it as no connectivity. + // Adding 404 as having wrong/missing appID results in 404 and that is not a connectivity issue + flushResult = (errorCode == 400 || errorCode == 404) ? FlushResultServerError : FlushResultNoConnectivity; + } + + if (flushResult == FlushResultServerError) { + // Only log events that developer can do something with (i.e., if parameters are incorrect). + // as opposed to cases where the token is bad. + if ([error.userInfo[FBSDKGraphRequestErrorKey] unsignedIntegerValue] == FBSDKGraphRequestErrorOther) { + NSString *message = [NSString stringWithFormat:@"Failed to send AppEvents: %@", error]; + [FBSDKAppEventsUtility logAndNotify:message allowLogAsDeveloperError:!appEventsState.areAllEventsImplicit]; + } + } else if (flushResult == FlushResultNoConnectivity) { + @synchronized(self) { + if ([appEventsState isCompatibleWithAppEventsState:_appEventsState]) { + [_appEventsState addEventsFromAppEventState:appEventsState]; + } else { + // flush failed due to connectivity. Persist to be tried again later. + [FBSDKAppEventsStateManager persistAppEventsData:appEventsState]; + } + } + } + + NSString *resultString = @""; + switch (flushResult) { + case FlushResultSuccess: + resultString = @"Success"; + break; + + case FlushResultNoConnectivity: + resultString = @"No Connectivity"; + break; + + case FlushResultServerError: + resultString = [NSString stringWithFormat:@"Server Error - %@", error.description]; + break; + } + + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents + formatString:@"%@\nFlush Result : %@", loggingEntry, resultString]; +} + +- (void)flushTimerFired:(id)arg +{ + [FBSDKAppEventsUtility ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass([self class])]; + if (self.flushBehavior != FBSDKAppEventsFlushBehaviorExplicitOnly && !self.disableTimer) { + [self flushForReason:FBSDKAppEventsFlushReasonTimer]; + } +} + +- (void)applicationDidBecomeActive +{ + [FBSDKAppEventsUtility ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass([self class])]; + + [self checkPersistedEvents]; + + // Restore time spent data, indicating that we're not being called from "activateApp". + [FBSDKTimeSpentData restore:NO]; +} + +- (void)applicationMovingFromActiveStateOrTerminating +{ + // When moving from active state, we don't have time to wait for the result of a flush, so + // just persist events to storage, and we'll process them at the next activation. + FBSDKAppEventsState *copy = nil; + @synchronized (self) { + copy = [_appEventsState copy]; + _appEventsState = nil; + } + if (copy) { + [FBSDKAppEventsStateManager persistAppEventsData:copy]; + } + [FBSDKTimeSpentData suspend]; +} + +#pragma mark - Custom Audience + ++ (FBSDKGraphRequest *)requestForCustomAudienceThirdPartyIDWithAccessToken:(FBSDKAccessToken *)accessToken +{ + accessToken = accessToken ?: [FBSDKAccessToken currentAccessToken]; + // Rules for how we use the attribution ID / advertiser ID for an 'custom_audience_third_party_id' Graph API request + // 1) if the OS tells us that the user has Limited Ad Tracking, then just don't send, and return a nil in the token. + // 2) if the app has set 'limitEventAndDataUsage', this effectively implies that app-initiated ad targeting shouldn't happen, + // so use that data here to return nil as well. + // 3) if we have a user session token, then no need to send attribution ID / advertiser ID back as the udid parameter + // 4) otherwise, send back the udid parameter. + + if ([FBSDKAppEventsUtility advertisingTrackingStatus] == FBSDKAdvertisingTrackingDisallowed || [FBSDKSettings limitEventAndDataUsage]) { + return nil; + } + + NSString *tokenString = [FBSDKAppEventsUtility tokenStringToUseFor:accessToken]; + NSString *udid = nil; + if (!accessToken) { + // We don't have a logged in user, so we need some form of udid representation. Prefer advertiser ID if + // available, and back off to attribution ID if not. Note that this function only makes sense to be + // called in the context of advertising. + udid = [FBSDKAppEventsUtility advertiserID]; + if (!udid) { + udid = [FBSDKAppEventsUtility attributionID]; + } + + if (!udid) { + // No udid, and no user token. No point in making the request. + return nil; + } + } + + NSDictionary *parameters = nil; + if (udid) { + parameters = @{ @"udid" : udid }; + } + + NSString *graphPath = [NSString stringWithFormat:@"%@/custom_audience_third_party_id", [[self singleton] appID]]; + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:graphPath + parameters:parameters + tokenString:tokenString + HTTPMethod:nil + flags:FBSDKGraphRequestFlagDoNotInvalidateTokenOnError | FBSDKGraphRequestFlagDisableErrorRecovery]; + + return request; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLink.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLink.h new file mode 100644 index 0000000..4bd2d01 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLink.h @@ -0,0 +1,63 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKAppLinkTarget.h" + +NS_ASSUME_NONNULL_BEGIN + +/*! The version of the App Link protocol that this library supports */ +FOUNDATION_EXPORT NSString *const FBSDKAppLinkVersion; + +/*! + Contains App Link metadata relevant for navigation on this device + derived from the HTML at a given URL. + */ +@interface FBSDKAppLink : NSObject + +/*! + Creates a FBSDKAppLink with the given list of FBSDKAppLinkTargets and target URL. + + Generally, this will only be used by implementers of the FBSDKAppLinkResolving protocol, + as these implementers will produce App Link metadata for a given URL. + + @param sourceURL the URL from which this App Link is derived + @param targets an ordered list of FBSDKAppLinkTargets for this platform derived + from App Link metadata. + @param webURL the fallback web URL, if any, for the app link. + */ ++ (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL + targets:(NSArray *)targets + webURL:(nullable NSURL *)webURL; + +/*! The URL from which this FBSDKAppLink was derived */ +@property (nonatomic, strong, readonly) NSURL *sourceURL; + +/*! + The ordered list of targets applicable to this platform that will be used + for navigation. + */ +@property (nonatomic, copy, readonly) NSArray *targets; + +/*! The fallback web URL to use if no targets are installed on this device. */ +@property (nonatomic, strong, readonly, nullable) NSURL *webURL; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLink.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLink.m new file mode 100644 index 0000000..57597dd --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLink.m @@ -0,0 +1,70 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppLink_Internal.h" + +NSString *const FBSDKAppLinkDataParameterName = @"al_applink_data"; +NSString *const FBSDKAppLinkTargetKeyName = @"target_url"; +NSString *const FBSDKAppLinkUserAgentKeyName = @"user_agent"; +NSString *const FBSDKAppLinkExtrasKeyName = @"extras"; +NSString *const FBSDKAppLinkRefererAppLink = @"referer_app_link"; +NSString *const FBSDKAppLinkRefererAppName = @"app_name"; +NSString *const FBSDKAppLinkRefererUrl = @"url"; +NSString *const FBSDKAppLinkVersionKeyName = @"version"; +NSString *const FBSDKAppLinkVersion = @"1.0"; + +@interface FBSDKAppLink () + +@property (nonatomic, strong) NSURL *sourceURL; +@property (nonatomic, copy) NSArray *targets; +@property (nonatomic, strong) NSURL *webURL; + +@property (nonatomic, assign, getter=isBackToReferrer) BOOL backToReferrer; + +@end + +@implementation FBSDKAppLink + ++ (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL + targets:(NSArray *)targets + webURL:(NSURL *)webURL + isBackToReferrer:(BOOL)isBackToReferrer { + FBSDKAppLink *link = [[self alloc] initWithIsBackToReferrer:isBackToReferrer]; + link.sourceURL = sourceURL; + link.targets = [targets copy]; + link.webURL = webURL; + return link; +} + ++ (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL + targets:(NSArray *)targets + webURL:(NSURL *)webURL { + return [self appLinkWithSourceURL:sourceURL + targets:targets + webURL:webURL + isBackToReferrer:NO]; +} + +- (FBSDKAppLink *)initWithIsBackToReferrer:(BOOL)backToReferrer { + if ((self = [super init])) { + _backToReferrer = backToReferrer; + } + return self; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkNavigation.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkNavigation.h new file mode 100644 index 0000000..daf124f --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkNavigation.h @@ -0,0 +1,137 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKAppLink.h" +#import "FBSDKAppLinkResolving.h" + +NS_ASSUME_NONNULL_BEGIN + +/*! + The result of calling navigate on a FBSDKAppLinkNavigation + */ +typedef NS_ENUM(NSInteger, FBSDKAppLinkNavigationType) { + /*! Indicates that the navigation failed and no app was opened */ + FBSDKAppLinkNavigationTypeFailure, + /*! Indicates that the navigation succeeded by opening the URL in the browser */ + FBSDKAppLinkNavigationTypeBrowser, + /*! Indicates that the navigation succeeded by opening the URL in an app on the device */ + FBSDKAppLinkNavigationTypeApp +}; + +/** + Describes the callback for appLinkFromURLInBackground. + @param navType the FBSDKAppLink representing the deferred App Link + @param error the error during the request, if any + + */ +typedef void (^FBSDKAppLinkNavigationHandler)(FBSDKAppLinkNavigationType navType, NSError * _Nullable error); + +/*! + Represents a pending request to navigate to an App Link. Most developers will + simply use navigateToURLInBackground: to open a URL, but developers can build + custom requests with additional navigation and app data attached to them by + creating FBSDKAppLinkNavigations themselves. + */ +NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension") +@interface FBSDKAppLinkNavigation : NSObject + +/*! + The extras for the AppLinkNavigation. This will generally contain application-specific + data that should be passed along with the request, such as advertiser or affiliate IDs or + other such metadata relevant on this device. + */ +@property (nonatomic, copy, readonly) NSDictionary *extras; + +/*! + The al_applink_data for the AppLinkNavigation. This will generally contain data common to + navigation attempts such as back-links, user agents, and other information that may be used + in routing and handling an App Link request. + */ +@property (nonatomic, copy, readonly) NSDictionary *appLinkData; + +/*! The AppLink to navigate to */ +@property (nonatomic, strong, readonly) FBSDKAppLink *appLink; + +/*! + Return navigation type for current instance. + No-side-effect version of navigate: + */ +@property (nonatomic, readonly) FBSDKAppLinkNavigationType navigationType; + +/*! Creates an AppLinkNavigation with the given link, extras, and App Link data */ ++ (instancetype)navigationWithAppLink:(FBSDKAppLink *)appLink + extras:(NSDictionary *)extras + appLinkData:(NSDictionary *)appLinkData; + +/*! + Creates an NSDictionary with the correct format for iOS callback URLs, + to be used as 'appLinkData' argument in the call to navigationWithAppLink:extras:appLinkData: + */ ++ (NSDictionary *> *)callbackAppLinkDataForAppWithName:(NSString *)appName + url:(NSString *)url; + +/*! Performs the navigation */ +- (FBSDKAppLinkNavigationType)navigate:(NSError *__autoreleasing *)error; + +/*! Returns a FBSDKAppLink for the given URL */ ++ (void)resolveAppLink:(NSURL *)destination handler:(FBSDKAppLinkFromURLHandler)handler; + +/*! Returns a FBSDKAppLink for the given URL using the given App Link resolution strategy */ ++ (void)resolveAppLink:(NSURL *)destination + resolver:(id)resolver + handler:(FBSDKAppLinkFromURLHandler)handler; + +/*! Navigates to a FBSDKAppLink and returns whether it opened in-app or in-browser */ ++ (FBSDKAppLinkNavigationType)navigateToAppLink:(FBSDKAppLink *)link error:(NSError *__autoreleasing *)error; + +/*! + Returns a FBSDKAppLinkNavigationType based on a FBSDKAppLink. + It's essentially a no-side-effect version of navigateToAppLink:error:, + allowing apps to determine flow based on the link type (e.g. open an + internal web view instead of going straight to the browser for regular links.) + */ ++ (FBSDKAppLinkNavigationType)navigationTypeForLink:(FBSDKAppLink *)link; + +/*! Navigates to a URL (an asynchronous action) and returns a FBSDKNavigationType */ ++ (void)navigateToURL:(NSURL *)destination handler:(FBSDKAppLinkNavigationHandler)handler; + +/*! + Navigates to a URL (an asynchronous action) using the given App Link resolution + strategy and returns a FBSDKNavigationType + */ ++ (void)navigateToURL:(NSURL *)destination + resolver:(id)resolver + handler:(FBSDKAppLinkNavigationHandler)handler; + +/*! + Gets the default resolver to be used for App Link resolution. If the developer has not set one explicitly, + a basic, built-in resolver will be used. + */ ++ (id)defaultResolver; + +/*! + Sets the default resolver to be used for App Link resolution. Setting this to nil will revert the + default resolver to the basic, built-in resolver provided by FBSDK. + */ ++ (void)setDefaultResolver:(id)resolver; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkNavigation.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkNavigation.m new file mode 100644 index 0000000..436ceb4 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkNavigation.m @@ -0,0 +1,294 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppLinkNavigation.h" + +#import "FBSDKAppLinkTarget.h" +#import "FBSDKAppLink_Internal.h" +#import "FBSDKMeasurementEvent_Internal.h" +#import "FBSDKSettings.h" +#import "FBSDKWebViewAppLinkResolver.h" + +FOUNDATION_EXPORT NSString *const FBSDKAppLinkDataParameterName; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkTargetKeyName; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkUserAgentKeyName; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkExtrasKeyName; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkVersionKeyName; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkRefererAppLink; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkRefererAppName; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkRefererUrl; + +static id defaultResolver; + +@interface FBSDKAppLinkNavigation () + +@property (nonatomic, copy) NSDictionary *extras; +@property (nonatomic, copy) NSDictionary *appLinkData; +@property (nonatomic, strong) FBSDKAppLink *appLink; + +@end + +@implementation FBSDKAppLinkNavigation + ++ (instancetype)navigationWithAppLink:(FBSDKAppLink *)appLink + extras:(NSDictionary *)extras + appLinkData:(NSDictionary *)appLinkData { + FBSDKAppLinkNavigation *navigation = [[self alloc] init]; + navigation.appLink = appLink; + navigation.extras = extras; + navigation.appLinkData = appLinkData; + return navigation; +} + ++ (NSDictionary *> *)callbackAppLinkDataForAppWithName:(NSString *)appName + url:(NSString *)url { + return @{FBSDKAppLinkRefererAppLink: @{FBSDKAppLinkRefererAppName: appName, FBSDKAppLinkRefererUrl: url}}; +} + +- (NSString *)stringByEscapingQueryString:(NSString *)string { + return [string stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; +} + +- (NSURL *)appLinkURLWithTargetURL:(NSURL *)targetUrl error:(NSError **)error { + NSMutableDictionary *appLinkData = + [NSMutableDictionary dictionaryWithDictionary:self.appLinkData ?: @{}]; + + // Add applink protocol data + if (!appLinkData[FBSDKAppLinkUserAgentKeyName]) { + appLinkData[FBSDKAppLinkUserAgentKeyName] = [NSString stringWithFormat:@"FBSDK %@", FBSDKSettings.sdkVersion]; + } + if (!appLinkData[FBSDKAppLinkVersionKeyName]) { + appLinkData[FBSDKAppLinkVersionKeyName] = FBSDKAppLinkVersion; + } + if (self.appLink.sourceURL.absoluteString) { + appLinkData[FBSDKAppLinkTargetKeyName] = self.appLink.sourceURL.absoluteString; + } + appLinkData[FBSDKAppLinkExtrasKeyName] = self.extras ?: @{}; + + // JSON-ify the applink data + NSError *jsonError = nil; + NSData *jsonBlob = [NSJSONSerialization dataWithJSONObject:appLinkData options:0 error:&jsonError]; + if (!jsonError) { + NSString *jsonString = [[NSString alloc] initWithData:jsonBlob encoding:NSUTF8StringEncoding]; + NSString *encoded = [self stringByEscapingQueryString:jsonString]; + + NSString *endUrlString = [NSString stringWithFormat:@"%@%@%@=%@", + targetUrl.absoluteString, + targetUrl.query ? @"&" : @"?", + FBSDKAppLinkDataParameterName, + encoded]; + + return [NSURL URLWithString:endUrlString]; + } else { + if (error) { + *error = jsonError; + } + + // If there was an error encoding the app link data, fail hard. + return nil; + } +} + +- (FBSDKAppLinkNavigationType)navigate:(NSError **)error { + NSURL *openedURL = nil; + NSError *encodingError = nil; + FBSDKAppLinkNavigationType retType = FBSDKAppLinkNavigationTypeFailure; + + // Find the first eligible/launchable target in the FBSDKAppLink. + for (FBSDKAppLinkTarget *target in self.appLink.targets) { + NSURL *appLinkAppURL = [self appLinkURLWithTargetURL:target.URL error:&encodingError]; + if (encodingError || !appLinkAppURL) { + if (error) { + *error = encodingError; + } + } else if ([[UIApplication sharedApplication] openURL:appLinkAppURL]) { + retType = FBSDKAppLinkNavigationTypeApp; + openedURL = appLinkAppURL; + break; + } + } + + if (!openedURL && self.appLink.webURL) { + // Fall back to opening the url in the browser if available. + NSURL *appLinkBrowserURL = [self appLinkURLWithTargetURL:self.appLink.webURL error:&encodingError]; + if (encodingError || !appLinkBrowserURL) { + // If there was an error encoding the app link data, fail hard. + if (error) { + *error = encodingError; + } + } else if ([[UIApplication sharedApplication] openURL:appLinkBrowserURL]) { + // This was a browser navigation. + retType = FBSDKAppLinkNavigationTypeBrowser; + openedURL = appLinkBrowserURL; + } + } + + [self postAppLinkNavigateEventNotificationWithTargetURL:openedURL + error:error ? *error : nil + type:retType]; + return retType; +} + +- (void)postAppLinkNavigateEventNotificationWithTargetURL:(NSURL *)outputURL error:(NSError *)error type:(FBSDKAppLinkNavigationType)type { + NSString *const EVENT_YES_VAL = @"1"; + NSString *const EVENT_NO_VAL = @"0"; + NSMutableDictionary *logData = + [[NSMutableDictionary alloc] init]; + + NSString *outputURLScheme = outputURL.scheme; + NSString *outputURLString = outputURL.absoluteString; + if (outputURLScheme) { + logData[@"outputURLScheme"] = outputURLScheme; + } + if (outputURLString) { + logData[@"outputURL"] = outputURLString; + } + + NSString *sourceURLString = self.appLink.sourceURL.absoluteString; + NSString *sourceURLHost = self.appLink.sourceURL.host; + NSString *sourceURLScheme = self.appLink.sourceURL.scheme; + if (sourceURLString) { + logData[@"sourceURL"] = sourceURLString; + } + if (sourceURLHost) { + logData[@"sourceHost"] = sourceURLHost; + } + if (sourceURLScheme) { + logData[@"sourceScheme"] = sourceURLScheme; + } + if (error.localizedDescription) { + logData[@"error"] = error.localizedDescription; + } + NSString *success = nil; //no + NSString *linkType = nil; // unknown; + switch (type) { + case FBSDKAppLinkNavigationTypeFailure: + success = EVENT_NO_VAL; + linkType = @"fail"; + break; + case FBSDKAppLinkNavigationTypeBrowser: + success = EVENT_YES_VAL; + linkType = @"web"; + break; + case FBSDKAppLinkNavigationTypeApp: + success = EVENT_YES_VAL; + linkType = @"app"; + break; + default: + break; + } + if (success) { + logData[@"success"] = success; + } + if (linkType) { + logData[@"type"] = linkType; + } + + if (self.appLink.backToReferrer) { + [FBSDKMeasurementEvent postNotificationForEventName:FBSDKAppLinkNavigateBackToReferrerEventName args:logData]; + } else { + [FBSDKMeasurementEvent postNotificationForEventName:FBSDKAppLinkNavigateOutEventName args:logData]; + } +} + ++ (void)resolveAppLink:(NSURL *)destination + resolver:(id)resolver + handler:(FBSDKAppLinkFromURLHandler)handler { + [resolver appLinkFromURL:destination handler:handler]; +} + ++ (void)resolveAppLink:(NSURL *)destination handler:(FBSDKAppLinkFromURLHandler)handler { + [self resolveAppLink:destination resolver:[self defaultResolver] handler:handler]; +} + ++ (void)navigateToURL:(NSURL *)destination handler:(FBSDKAppLinkNavigationHandler)handler { + [self navigateToURL:destination resolver:[self defaultResolver] handler:handler]; +} + ++ (void)navigateToURL:(NSURL *)destination + resolver:(id)resolver + handler:(FBSDKAppLinkNavigationHandler)handler { + + dispatch_async(dispatch_get_main_queue(), ^{ + [self resolveAppLink:destination + resolver:resolver + handler:^(FBSDKAppLink * _Nullable appLink, NSError * _Nullable error) { + if (error) { + handler(FBSDKAppLinkNavigationTypeFailure, error); + return; + } + + NSError *navigateError = nil; + FBSDKAppLinkNavigationType result = [self navigateToAppLink:appLink error:&navigateError]; + handler(result, navigateError); + }]; + }); +} + ++ (FBSDKAppLinkNavigationType)navigateToAppLink:(FBSDKAppLink *)link error:(NSError **)error { + return [[FBSDKAppLinkNavigation navigationWithAppLink:link + extras:@{} + appLinkData:@{}] navigate:error]; +} + ++ (FBSDKAppLinkNavigationType)navigationTypeForLink:(FBSDKAppLink *)link { + return [[self navigationWithAppLink:link extras:@{} appLinkData:@{}] navigationType]; +} + +- (FBSDKAppLinkNavigationType)navigationType { + FBSDKAppLinkTarget *eligibleTarget = nil; + for (FBSDKAppLinkTarget *target in self.appLink.targets) { + if ([[UIApplication sharedApplication] canOpenURL:target.URL]) { + eligibleTarget = target; + break; + } + } + + if (eligibleTarget != nil) { + NSURL *appLinkURL = [self appLinkURLWithTargetURL:eligibleTarget.URL error:nil]; + if (appLinkURL != nil) { + return FBSDKAppLinkNavigationTypeApp; + } else { + return FBSDKAppLinkNavigationTypeFailure; + } + } + + if (self.appLink.webURL != nil) { + NSURL *appLinkURL = [self appLinkURLWithTargetURL:eligibleTarget.URL error:nil]; + if (appLinkURL != nil) { + return FBSDKAppLinkNavigationTypeBrowser; + } else { + return FBSDKAppLinkNavigationTypeFailure; + } + } + + return FBSDKAppLinkNavigationTypeFailure; +} + ++ (id)defaultResolver { + if (defaultResolver) { + return defaultResolver; + } + return [FBSDKWebViewAppLinkResolver sharedInstance]; +} + ++ (void)setDefaultResolver:(id)resolver { + defaultResolver = resolver; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h new file mode 100644 index 0000000..39b5dc0 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h @@ -0,0 +1,107 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKAppLinkResolving.h" + +@class BFTask; + + +// Check if Bolts.framework is available for import +#if __has_include() +// Import it if it's available +#import +#else +// Otherwise - redeclare BFAppLinkResolving protocol to resolve the problem of missing symbols +// Please note: Bolts.framework is still required for AppLink resolving to work, +// but this allows FBSDKCoreKit to weakly link Bolts.framework as well as this enables clang modulemaps to work. + +/** + Implement this protocol to provide an alternate strategy for resolving + App Links that may include pre-fetching, caching, or querying for App Link + data from an index provided by a service provider. + */ +DEPRECATED_MSG_ATTRIBUTE("Use `FBSDKAppLinkResolving`") +@protocol BFAppLinkResolving + +/** + Asynchronously resolves App Link data for a given URL. + + @param url The URL to resolve into an App Link. + @return A BFTask that will return a BFAppLink for the given URL. + */ +- (BFTask *)appLinkFromURLInBackground:(NSURL *)url +DEPRECATED_MSG_ATTRIBUTE("Use `appLinkFromURL:handler:`"); + +@end + +#endif + +/** + + Provides an implementation of the BFAppLinkResolving protocol that uses the Facebook App Link + Index API to resolve App Links given a URL. It also provides an additional helper method that can resolve + multiple App Links in a single call. + + + + Usage of this type requires a client token. See `[FBSDKSettings setClientToken:]` and linking + Bolts.framework + */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +@interface FBSDKAppLinkResolver : NSObject +#pragma clang diagnostic pop + +/** + Asynchronously resolves App Link data for multiple URLs. + + @param urls An array of NSURLs to resolve into App Links. + @return A BFTask that will return dictionary mapping input NSURLs to their + corresponding BFAppLink. + + You should set the client token before making this call. See `[FBSDKSettings setClientToken:]` + */ +- (BFTask *)appLinksFromURLsInBackground:(NSArray *)urls +DEPRECATED_MSG_ATTRIBUTE("Use `appLinkFromURLs:handler:`"); + +/** + Asynchronously resolves App Link data for a given URL. + + @param url The URL to resolve into an App Link. + @return A BFTask that will return a BFAppLink for the given URL. + */ +- (BFTask *)appLinkFromURLInBackground:(NSURL *)url +DEPRECATED_MSG_ATTRIBUTE("Use `appLinkFromURL:handler:`"); + +/** + Asynchronously resolves App Link data for a given array of URLs. + + @param urls The URLs to resolve into an App Link. + @param handler The completion block that will return an App Link for the given URL. + */ +- (void)appLinksFromURLs:(NSArray *)urls handler:(FBSDKAppLinksFromURLArrayHandler)handler +NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension"); + +/** + Allocates and initializes a new instance of FBSDKAppLinkResolver. + */ ++ (instancetype)resolver; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.m new file mode 100644 index 0000000..b83ec5b --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.m @@ -0,0 +1,299 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppLinkResolver.h" + +#import + +#import +#import +#import +#import + +#import "FBSDKAccessToken.h" +#import "FBSDKAppLink.h" +#import "FBSDKGraphRequest+Internal.h" +#import "FBSDKGraphRequestConnection.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKSettings+Internal.h" +#import "FBSDKUtility.h" + +static NSString *const kURLKey = @"url"; +static NSString *const kIOSAppStoreIdKey = @"app_store_id"; +static NSString *const kIOSAppNameKey = @"app_name"; +static NSString *const kWebKey = @"web"; +static NSString *const kIOSKey = @"ios"; +static NSString *const kIPhoneKey = @"iphone"; +static NSString *const kIPadKey = @"ipad"; +static NSString *const kShouldFallbackKey = @"should_fallback"; +static NSString *const kAppLinksKey = @"app_links"; + +@interface FBSDKAppLinkResolver () + +@property (nonatomic, strong) NSMutableDictionary *cachedBFAppLinks; +@property (nonatomic, strong) NSMutableDictionary *cachedFBSDKAppLinks; +@property (nonatomic, assign) UIUserInterfaceIdiom userInterfaceIdiom; +@end + +@implementation FBSDKAppLinkResolver + +static Class g_BFTaskCompletionSourceClass; +static Class g_BFAppLinkTargetClass; +static Class g_BFAppLinkClass; +static Class g_BFTaskClass; + ++ (void)initialize +{ + if (self == [FBSDKAppLinkResolver class]) { + g_BFTaskCompletionSourceClass = [FBSDKInternalUtility + resolveBoltsClassWithName:@"BFTaskCompletionSource"]; + g_BFAppLinkTargetClass = [FBSDKInternalUtility resolveBoltsClassWithName:@"BFAppLinkTarget"]; + g_BFTaskClass = [FBSDKInternalUtility resolveBoltsClassWithName:@"BFTask"]; + g_BFAppLinkClass = [FBSDKInternalUtility resolveBoltsClassWithName:@"BFAppLink"]; + } +} + +- (instancetype)initWithUserInterfaceIdiom:(UIUserInterfaceIdiom)userInterfaceIdiom +{ + if (self = [super init]) { + self.cachedBFAppLinks = [NSMutableDictionary dictionary]; + self.cachedFBSDKAppLinks = [NSMutableDictionary dictionary]; + self.userInterfaceIdiom = userInterfaceIdiom; + } + return self; +} + +- (void)appLinkFromURL:(NSURL *)url handler:(FBSDKAppLinkFromURLHandler)handler +{ + [self appLinksFromURLs:@[url] handler:^(NSDictionary *urls, NSError * _Nullable error) { + handler(urls[url], error); + }]; +} + +- (void)appLinksFromURLs:(NSArray *)urls handler:(FBSDKAppLinksFromURLArrayHandler)handler +{ + if (![FBSDKSettings clientToken] && ![FBSDKAccessToken currentAccessToken]) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"A user access token or clientToken is required to use FBAppLinkResolver"]; + } + NSMutableDictionary *appLinks = [NSMutableDictionary dictionary]; + NSMutableArray *toFind = [NSMutableArray array]; + NSMutableArray *toFindStrings = [NSMutableArray array]; + + @synchronized (self.cachedFBSDKAppLinks) { + for (NSURL *url in urls) { + if (self.cachedFBSDKAppLinks[url]) { + appLinks[url] = self.cachedFBSDKAppLinks[url]; + } else { + [toFind addObject:url]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + NSString *toFindString = [url.absoluteString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; +#pragma clang diagnostic pop + if (toFindString) { + [toFindStrings addObject:toFindString]; + } + } + } + } + if (toFind.count == 0) { + // All of the URLs have already been found. + handler(_cachedFBSDKAppLinks, nil); + } + NSMutableArray *fields = [NSMutableArray arrayWithObject:kIOSKey]; + + NSString *idiomSpecificField = nil; + + switch (self.userInterfaceIdiom) { + case UIUserInterfaceIdiomPad: + idiomSpecificField = kIPadKey; + break; + case UIUserInterfaceIdiomPhone: + idiomSpecificField = kIPhoneKey; + break; + default: + break; + } + if (idiomSpecificField) { + [fields addObject:idiomSpecificField]; + } + NSString *path = [NSString stringWithFormat:@"?fields=%@.fields(%@)&ids=%@", + kAppLinksKey, + [fields componentsJoinedByString:@","], + [toFindStrings componentsJoinedByString:@","]]; + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:path + parameters:nil + flags:FBSDKGraphRequestFlagDoNotInvalidateTokenOnError | FBSDKGraphRequestFlagDisableErrorRecovery]; + + [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + if (error) { + handler(@{}, error); + return; + } + for (NSURL *url in toFind) { + id nestedObject = result[url.absoluteString][kAppLinksKey]; + NSMutableArray *rawTargets = [NSMutableArray array]; + if (idiomSpecificField) { + [rawTargets addObjectsFromArray:nestedObject[idiomSpecificField]]; + } + [rawTargets addObjectsFromArray:nestedObject[kIOSKey]]; + + NSMutableArray *targets = [NSMutableArray arrayWithCapacity:rawTargets.count]; + for (id rawTarget in rawTargets) { + [targets addObject:[FBSDKAppLinkTarget appLinkTargetWithURL:[NSURL URLWithString:rawTarget[kURLKey]] + appStoreId:rawTarget[kIOSAppStoreIdKey] + appName:rawTarget[kIOSAppNameKey]]]; + } + + id webTarget = nestedObject[kWebKey]; + NSString *webFallbackString = webTarget[kURLKey]; + NSURL *fallbackUrl = webFallbackString ? [NSURL URLWithString:webFallbackString] : url; + + NSNumber *shouldFallback = webTarget[kShouldFallbackKey]; + if (shouldFallback && !shouldFallback.boolValue) { + fallbackUrl = nil; + } + + FBSDKAppLink *link = [FBSDKAppLink appLinkWithSourceURL:url + targets:targets + webURL:fallbackUrl]; + @synchronized (self.cachedFBSDKAppLinks) { + self.cachedFBSDKAppLinks[url] = link; + } + appLinks[url] = link; + } + handler(appLinks, nil); + }]; +} + +- (BFTask *)appLinksFromURLsInBackground:(NSArray *)urls +{ + if (![FBSDKSettings clientToken] && ![FBSDKAccessToken currentAccessToken]) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"A user access token or clientToken is required to use FBAppLinkResolver"]; + } + NSMutableDictionary *appLinks = [NSMutableDictionary dictionary]; + NSMutableArray *toFind = [NSMutableArray array]; + NSMutableArray *toFindStrings = [NSMutableArray array]; + + @synchronized (self.cachedBFAppLinks) { + for (NSURL *url in urls) { + if (self.cachedBFAppLinks[url]) { + appLinks[url] = self.cachedBFAppLinks[url]; + } else { + [toFind addObject:url]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + NSString *toFindString = [url.absoluteString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; +#pragma clang diagnostic pop + if (toFindString) { + [toFindStrings addObject:toFindString]; + } + } + } + } + if (toFind.count == 0) { + // All of the URLs have already been found. + return [g_BFTaskClass taskWithResult:appLinks]; + } + NSMutableArray *fields = [NSMutableArray arrayWithObject:kIOSKey]; + + NSString *idiomSpecificField = nil; + + switch (self.userInterfaceIdiom) { + case UIUserInterfaceIdiomPad: + idiomSpecificField = kIPadKey; + break; + case UIUserInterfaceIdiomPhone: + idiomSpecificField = kIPhoneKey; + break; + default: + break; + } + if (idiomSpecificField) { + [fields addObject:idiomSpecificField]; + } + NSString *path = [NSString stringWithFormat:@"?fields=%@.fields(%@)&ids=%@", + kAppLinksKey, + [fields componentsJoinedByString:@","], + [toFindStrings componentsJoinedByString:@","]]; + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:path + parameters:nil + flags:FBSDKGraphRequestFlagDoNotInvalidateTokenOnError | FBSDKGraphRequestFlagDisableErrorRecovery]; + BFTaskCompletionSource *tcs = [g_BFTaskCompletionSourceClass taskCompletionSource]; + [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + if (error) { + [tcs setError:error]; + return; + } + for (NSURL *url in toFind) { + id nestedObject = result[url.absoluteString][kAppLinksKey]; + NSMutableArray *rawTargets = [NSMutableArray array]; + if (idiomSpecificField) { + [rawTargets addObjectsFromArray:nestedObject[idiomSpecificField]]; + } + [rawTargets addObjectsFromArray:nestedObject[kIOSKey]]; + + NSMutableArray *targets = [NSMutableArray arrayWithCapacity:rawTargets.count]; + for (id rawTarget in rawTargets) { + [targets addObject:[g_BFAppLinkTargetClass appLinkTargetWithURL:[NSURL URLWithString:rawTarget[kURLKey]] + appStoreId:rawTarget[kIOSAppStoreIdKey] + appName:rawTarget[kIOSAppNameKey]]]; + } + + id webTarget = nestedObject[kWebKey]; + NSString *webFallbackString = webTarget[kURLKey]; + NSURL *fallbackUrl = webFallbackString ? [NSURL URLWithString:webFallbackString] : url; + + NSNumber *shouldFallback = webTarget[kShouldFallbackKey]; + if (shouldFallback && !shouldFallback.boolValue) { + fallbackUrl = nil; + } + + BFAppLink *link = [g_BFAppLinkClass appLinkWithSourceURL:url + targets:targets + webURL:fallbackUrl]; + @synchronized (self.cachedBFAppLinks) { + self.cachedBFAppLinks[url] = link; + } + appLinks[url] = link; + } + [tcs setResult:appLinks]; + }]; + return tcs.task; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +- (BFTask *)appLinkFromURLInBackground:(NSURL *)url +{ + // Implement in terms of appLinksFromURLsInBackground + BFTask *resolveTask = [self appLinksFromURLsInBackground:@[url]]; + return [resolveTask continueWithSuccessBlock:^id(BFTask *task) { + return task.result[url]; + }]; +} +#pragma clang diagnostic pop + ++ (instancetype)resolver +{ + return [[self alloc] initWithUserInterfaceIdiom:UI_USER_INTERFACE_IDIOM()]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolving.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolving.h new file mode 100644 index 0000000..fac2425 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolving.h @@ -0,0 +1,60 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class FBSDKAppLink; + +/** + Describes the callback for appLinkFromURLInBackground. + @param appLink the FBSDKAppLink representing the deferred App Link + @param error the error during the request, if any + + */ +typedef void (^FBSDKAppLinkFromURLHandler)(FBSDKAppLink * _Nullable appLink, NSError * _Nullable error); + + +/** + Describes the callback for appLinkFromURLInBackground. + @param appLinks the FBSDKAppLinks representing the deferred App Links + @param error the error during the request, if any + */ +typedef void (^FBSDKAppLinksFromURLArrayHandler)(NSDictionary * appLinks, + NSError * _Nullable error); + +/*! + Implement this protocol to provide an alternate strategy for resolving + App Links that may include pre-fetching, caching, or querying for App Link + data from an index provided by a service provider. + */ +@protocol FBSDKAppLinkResolving + +/** + Asynchronously resolves App Link data for a given URL. + + @param url The URL to resolve into an App Link. + @param handler The completion block that will return an App Link for the given URL. + */ +- (void)appLinkFromURL:(NSURL *)url handler:(FBSDKAppLinkFromURLHandler)handler +NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension"); + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererController.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererController.h new file mode 100644 index 0000000..3f587a6 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererController.h @@ -0,0 +1,100 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import +#import + +#import "FBSDKAppLinkReturnToRefererView.h" + +NS_ASSUME_NONNULL_BEGIN + +@class FBSDKAppLink; +@class FBSDKAppLinkReturnToRefererController; + +/*! + Protocol that a class can implement in order to be notified when the user has navigated back + to the referer of an App Link. + */ +@protocol FBSDKAppLinkReturnToRefererControllerDelegate + +@optional + +/*! Called when the user has tapped to navigate, but before the navigation has been performed. */ +- (void)returnToRefererController:(FBSDKAppLinkReturnToRefererController *)controller + willNavigateToAppLink:(FBSDKAppLink *)appLink; + +/*! Called after the navigation has been attempted, with an indication of whether the referer + app link was successfully opened. */ +- (void)returnToRefererController:(FBSDKAppLinkReturnToRefererController *)controller + didNavigateToAppLink:(FBSDKAppLink *)url + type:(FBSDKAppLinkNavigationType)type; + +@end + +/*! + A controller class that implements default behavior for a FBSDKAppLinkReturnToRefererView, including + the ability to display the view above the navigation bar for navigation-based apps. + */ +NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension") +@interface FBSDKAppLinkReturnToRefererController : NSObject + +/*! + The delegate that will be notified when the user navigates back to the referer. + */ +@property (nonatomic, weak, nullable) id delegate; + +/*! + The FBSDKAppLinkReturnToRefererView this controller is controlling. + */ +@property (nonatomic, strong) FBSDKAppLinkReturnToRefererView *view; + +/*! + Initializes a controller suitable for controlling a FBSDKAppLinkReturnToRefererView that is to be displayed + contained within another UIView (i.e., not displayed above the navigation bar). + */ +- (instancetype)init NS_DESIGNATED_INITIALIZER; + +/*! + Initializes a controller suitable for controlling a FBSDKAppLinkReturnToRefererView that is to be displayed + displayed above the navigation bar. + */ +- (instancetype)initForDisplayAboveNavController:(UINavigationController *)navController; + +/*! + Removes the view entirely from the navigation controller it is currently displayed in. + */ +- (void)removeFromNavController; + +/*! + Shows the FBSDKAppLinkReturnToRefererView with the specified referer information. If nil or missing data, + the view will not be displayed. */ +- (void)showViewForRefererAppLink:(FBSDKAppLink *)refererAppLink; + +/*! + Shows the FBSDKAppLinkReturnToRefererView with referer information extracted from the specified URL. + If nil or missing referer App Link data, the view will not be displayed. */ +- (void)showViewForRefererURL:(NSURL *)url; + +/*! + Closes the view, possibly animating it. + */ +- (void)closeViewAnimated:(BOOL)animated; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererController.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererController.m new file mode 100644 index 0000000..c2268f6 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererController.m @@ -0,0 +1,238 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppLinkReturnToRefererController.h" + +#import "FBSDKAppLink.h" +#import "FBSDKAppLinkReturnToRefererView_Internal.h" +#import "FBSDKURL_Internal.h" + +static const CFTimeInterval kFBSDKViewAnimationDuration = 0.25f; + +@implementation FBSDKAppLinkReturnToRefererController { + UINavigationController *_navigationController; + FBSDKAppLinkReturnToRefererView *_view; +} + +#pragma mark - Object lifecycle + +- (instancetype)init { + return [super init]; +} + +- (instancetype)initForDisplayAboveNavController:(UINavigationController *)navController { + self = [self init]; + if (self) { + _navigationController = navController; + + if (_navigationController != nil) { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self + selector:@selector(statusBarFrameWillChange:) + name:UIApplicationWillChangeStatusBarFrameNotification + object:nil]; + [nc addObserver:self + selector:@selector(statusBarFrameDidChange:) + name:UIApplicationDidChangeStatusBarFrameNotification + object:nil]; + [nc addObserver:self + selector:@selector(orientationDidChange:) + name:UIDeviceOrientationDidChangeNotification + object:nil]; + } + } + return self; +} + +- (void)dealloc { + _view.delegate = nil; + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +#pragma mark - Public API + +- (FBSDKAppLinkReturnToRefererView *)view { + if (!_view) { + self.view = [[FBSDKAppLinkReturnToRefererView alloc] initWithFrame:CGRectZero]; + if (_navigationController) { + [_navigationController.view addSubview:_view]; + } + } + return _view; +} + +- (void)setView:(FBSDKAppLinkReturnToRefererView *)view { + if (_view != view) { + _view.delegate = nil; + } + + _view = view; + _view.delegate = self; + + if (_navigationController) { + _view.includeStatusBarInSize = FBSDKIncludeStatusBarInSizeAlways; + } +} + +- (void)showViewForRefererAppLink:(FBSDKAppLink *)refererAppLink { + self.view.refererAppLink = refererAppLink; + + [_view sizeToFit]; + + if (_navigationController) { + if (!_view.closed) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self moveNavigationBar]; + }); + } + } +} + +- (void)showViewForRefererURL:(NSURL *)url { + FBSDKAppLink *appLink = [FBSDKURL URLForRenderBackToReferrerBarURL:url].appLinkReferer; + [self showViewForRefererAppLink:appLink]; +} + +- (void)removeFromNavController { + if (_navigationController) { + [_view removeFromSuperview]; + _navigationController = nil; + } +} + +#pragma mark - FBSDKAppLinkReturnToRefererViewDelegate + +- (void)returnToRefererViewDidTapInsideCloseButton:(FBSDKAppLinkReturnToRefererView *)view { + [self closeViewAnimated:YES explicitlyClosed:YES]; +} + +- (void)returnToRefererViewDidTapInsideLink:(FBSDKAppLinkReturnToRefererView *)view + link:(FBSDKAppLink *)link { + [self openRefererAppLink:link]; + [self closeViewAnimated:NO explicitlyClosed:NO]; +} + +#pragma mark - Private + +- (void)statusBarFrameWillChange:(NSNotification *)notification { + NSValue *rectValue = [notification.userInfo valueForKey:UIApplicationStatusBarFrameUserInfoKey]; + CGRect newFrame; + [rectValue getValue:&newFrame]; + + if (_navigationController && !_view.closed) { + if (CGRectGetHeight(newFrame) == 40) { + UIViewAnimationOptions options = UIViewAnimationOptionBeginFromCurrentState; + [UIView animateWithDuration:kFBSDKViewAnimationDuration delay:0.0 options:options animations:^{ + self->_view.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(self->_view.bounds), 0.0); + } completion:nil]; + } + } +} + +- (void)statusBarFrameDidChange:(NSNotification *)notification { + NSValue *rectValue = [notification.userInfo valueForKey:UIApplicationStatusBarFrameUserInfoKey]; + CGRect newFrame; + [rectValue getValue:&newFrame]; + + if (_navigationController && !_view.closed) { + if (CGRectGetHeight(newFrame) == 40) { + UIViewAnimationOptions options = UIViewAnimationOptionBeginFromCurrentState; + [UIView animateWithDuration:kFBSDKViewAnimationDuration delay:0.0 options:options animations:^{ + [self->_view sizeToFit]; + [self moveNavigationBar]; + } completion:nil]; + } + } +} + +- (void)orientationDidChange:(NSNotificationCenter *)notification { + if (_navigationController && !_view.closed && CGRectGetHeight(_view.bounds) > 0) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self moveNavigationBar]; + }); + } +} + +- (void)moveNavigationBar { + if (_view.closed || !_view.refererAppLink) { + return; + } + + [self updateNavigationBarY:CGRectGetHeight(_view.bounds)]; +} + +- (void)updateNavigationBarY:(CGFloat)y { + UINavigationBar *navigationBar = _navigationController.navigationBar; + CGRect navigationBarFrame = navigationBar.frame; + CGFloat oldContainerViewY = CGRectGetMaxY(navigationBarFrame); + navigationBarFrame.origin.y = y; + navigationBar.frame = navigationBarFrame; + + CGFloat dy = CGRectGetMaxY(navigationBarFrame) - oldContainerViewY; + UIView *containerView = _navigationController.visibleViewController.view.superview; + containerView.frame = UIEdgeInsetsInsetRect(containerView.frame, UIEdgeInsetsMake(dy, 0.0, 0.0, 0.0)); +} + +- (void)closeViewAnimated:(BOOL)animated { + [self closeViewAnimated:animated explicitlyClosed:YES]; +} + +- (void)closeViewAnimated:(BOOL)animated explicitlyClosed:(BOOL)explicitlyClosed { + void (^closer)(void) = ^{ + if (self->_navigationController) { + [self updateNavigationBarY:self->_view.statusBarHeight]; + } + + CGRect frame = self->_view.frame; + frame.size.height = 0.0; + self->_view.frame = frame; + }; + + if (animated) { + [UIView animateWithDuration:kFBSDKViewAnimationDuration animations:^{ + closer(); + } completion:^(BOOL finished) { + if (explicitlyClosed) { + self->_view.closed = YES; + } + }]; + } else { + closer(); + if (explicitlyClosed) { + self->_view.closed = YES; + } + } +} + +- (void)openRefererAppLink:(FBSDKAppLink *)refererAppLink { + if (refererAppLink) { + id delegate = _delegate; + if ([delegate respondsToSelector:@selector(returnToRefererController:willNavigateToAppLink:)]) { + [delegate returnToRefererController:self willNavigateToAppLink:refererAppLink]; + } + + NSError *error = nil; + FBSDKAppLinkNavigationType type = [FBSDKAppLinkNavigation navigateToAppLink:refererAppLink error:&error]; + + if ([delegate respondsToSelector:@selector(returnToRefererController:didNavigateToAppLink:type:)]) { + [delegate returnToRefererController:self didNavigateToAppLink:refererAppLink type:type]; + } + } +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererView.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererView.h new file mode 100644 index 0000000..c5378b7 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererView.h @@ -0,0 +1,90 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import +#import + +#import "FBSDKAppLinkNavigation.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, FBSDKIncludeStatusBarInSize) { + FBSDKIncludeStatusBarInSizeNever, + FBSDKIncludeStatusBarInSizeIOS7AndLater, + FBSDKIncludeStatusBarInSizeAlways, +}; + +@class FBSDKAppLinkReturnToRefererView; +@class FBSDKURL; + +/*! + Protocol that a class can implement in order to be notified when the user has navigated back + to the referer of an App Link. + */ +@protocol FBSDKAppLinkReturnToRefererViewDelegate + +/*! + Called when the user has tapped inside the close button. + */ +- (void)returnToRefererViewDidTapInsideCloseButton:(FBSDKAppLinkReturnToRefererView *)view; + +/*! + Called when the user has tapped inside the App Link portion of the view. + */ +- (void)returnToRefererViewDidTapInsideLink:(FBSDKAppLinkReturnToRefererView *)view + link:(FBSDKAppLink *)link; + +@end + +/*! + Provides a UIView that displays a button allowing users to navigate back to the + application that launched the App Link currently being handled, if the App Link + contained referer data. The user can also close the view by clicking a close button + rather than navigating away. If the view is provided an App Link that does not contain + referer data, it will have zero size and no UI will be displayed. + */ +NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension") +@interface FBSDKAppLinkReturnToRefererView : UIView + +/*! + The delegate that will be notified when the user navigates back to the referer. + */ +@property (nonatomic, weak, nullable) id delegate; + +/*! + The color of the text label and close button. + */ +@property (nonatomic, strong) UIColor *textColor; + +@property (nonatomic, strong) FBSDKAppLink *refererAppLink; + +/*! + Indicates whether to extend the size of the view to include the current status bar + size, for use in scenarios where the view might extend under the status bar on iOS 7 and + above; this property has no effect on earlier versions of iOS. + */ +@property (nonatomic, assign) FBSDKIncludeStatusBarInSize includeStatusBarInSize; + +/*! + Indicates whether the user has closed the view by clicking the close button. + */ +@property (nonatomic, assign) BOOL closed; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererView.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererView.m new file mode 100644 index 0000000..82ede34 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererView.m @@ -0,0 +1,271 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppLinkReturnToRefererView.h" + +#import "FBSDKAppLink.h" +#import "FBSDKAppLinkTarget.h" + +static const CGFloat FBSDKMarginX = 8.5f; +static const CGFloat FBSDKMarginY = 8.5f; + +static NSString *const FBSDKRefererAppLink = @"referer_app_link"; +static NSString *const FBSDKRefererAppName = @"app_name"; +static NSString *const FBSDKRefererUrl = @"url"; +static const CGFloat FBSDKCloseButtonWidth = 12.0; +static const CGFloat FBSDKCloseButtonHeight = 12.0; + +@interface FBSDKAppLinkReturnToRefererView () + +@property (nonatomic, strong) UILabel *labelView; +@property (nonatomic, strong) UIButton *closeButton; +@property (nonatomic, strong) UITapGestureRecognizer *insideTapGestureRecognizer; + +@end + +@implementation FBSDKAppLinkReturnToRefererView { + BOOL _explicitlyHidden; +} + +#pragma mark - Initialization + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self commonInit]; + [self sizeToFit]; + } + return self; +} + +- (instancetype)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self commonInit]; + } + return self; +} + +- (void)commonInit { + // Initialization code + _includeStatusBarInSize = FBSDKIncludeStatusBarInSizeIOS7AndLater; + + // iOS 7 system blue color + self.backgroundColor = [UIColor colorWithRed:0.0f green:122.0f / 255.0f blue:1.0f alpha:1.0f]; + self.textColor = [UIColor whiteColor]; + self.clipsToBounds = YES; + + [self initViews]; +} + +- (void)initViews { + if (!_labelView && !_closeButton) { + _closeButton = [UIButton buttonWithType:UIButtonTypeCustom]; + _closeButton.backgroundColor = [UIColor clearColor]; + _closeButton.userInteractionEnabled = YES; + _closeButton.clipsToBounds = YES; + _closeButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin; + _closeButton.contentMode = UIViewContentModeCenter; + [_closeButton addTarget:self action:@selector(closeButtonTapped:) forControlEvents:UIControlEventTouchUpInside]; + + [self addSubview:_closeButton]; + + _labelView = [[UILabel alloc] initWithFrame:CGRectZero]; + _labelView.font = [UIFont systemFontOfSize:[UIFont smallSystemFontSize]]; + _labelView.textColor = [UIColor whiteColor]; + _labelView.backgroundColor = [UIColor clearColor]; + _labelView.textAlignment = NSTextAlignmentCenter; + _labelView.clipsToBounds = YES; + [self updateLabelText]; + [self addSubview:_labelView]; + + _insideTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTapInside:)]; + _labelView.userInteractionEnabled = YES; + [_labelView addGestureRecognizer:_insideTapGestureRecognizer]; + + [self updateColors]; + } +} + +#pragma mark - Layout + +- (CGSize)intrinsicContentSize { + CGSize size = self.bounds.size; + if (_closed || !self.hasRefererData) { + size.height = 0.0; + } else { + CGSize labelSize = [_labelView sizeThatFits:size]; + size = CGSizeMake(size.width, labelSize.height + 2 * FBSDKMarginY + self.statusBarHeight); + } + return size; +} + +- (void)layoutSubviews { + [super layoutSubviews]; + + CGRect bounds = self.bounds; + + _labelView.preferredMaxLayoutWidth = _labelView.bounds.size.width; + CGSize labelSize = [_labelView sizeThatFits:bounds.size]; + _labelView.frame = CGRectMake(FBSDKMarginX, + CGRectGetMaxY(bounds) - labelSize.height - 1.5f * FBSDKMarginY, + CGRectGetMaxX(bounds) - FBSDKCloseButtonWidth - 3 * FBSDKMarginX, + labelSize.height + FBSDKMarginY); + + _closeButton.frame = CGRectMake(CGRectGetMaxX(bounds) - FBSDKCloseButtonWidth - 2 * FBSDKMarginX, + _labelView.center.y - FBSDKCloseButtonHeight / 2.0f - FBSDKMarginY, + FBSDKCloseButtonWidth + 2 * FBSDKMarginX, + FBSDKCloseButtonHeight + 2 * FBSDKMarginY); +} + +- (CGSize)sizeThatFits:(CGSize)size { + if (_closed || !self.hasRefererData) { + size = CGSizeMake(size.width, 0.0); + } else { + CGSize labelSize = [_labelView sizeThatFits:size]; + size = CGSizeMake(size.width, labelSize.height + 2 * FBSDKMarginY + self.statusBarHeight); + } + return size; +} + +- (CGFloat)statusBarHeight { + UIApplication *application = [UIApplication sharedApplication]; + + BOOL include; + switch (_includeStatusBarInSize) { + case FBSDKIncludeStatusBarInSizeAlways: + include = YES; + break; + case FBSDKIncludeStatusBarInSizeIOS7AndLater: { + float systemVersion = [UIDevice currentDevice].systemVersion.floatValue; + include = (systemVersion >= 7.0); + break; + } + case FBSDKIncludeStatusBarInSizeNever: + include = NO; + break; + } + if (include && !application.statusBarHidden) { + BOOL landscape = UIInterfaceOrientationIsLandscape(application.statusBarOrientation); + CGRect statusBarFrame = application.statusBarFrame; + return landscape ? CGRectGetWidth(statusBarFrame) : CGRectGetHeight(statusBarFrame); + } + + return 0; +} + +#pragma mark - Public API + +- (void)setIncludeStatusBarInSize:(FBSDKIncludeStatusBarInSize)includeStatusBarInSize { + _includeStatusBarInSize = includeStatusBarInSize; + [self setNeedsLayout]; + [self invalidateIntrinsicContentSize]; +} + +- (void)setTextColor:(UIColor *)textColor { + _textColor = textColor; + [self updateColors]; +} + +- (void)setRefererAppLink:(FBSDKAppLink *)refererAppLink { + _refererAppLink = refererAppLink; + [self updateLabelText]; + [self updateHidden]; + [self invalidateIntrinsicContentSize]; +} + +- (void)setClosed:(BOOL)closed { + if (_closed != closed) { + _closed = closed; + [self updateHidden]; + [self invalidateIntrinsicContentSize]; + } +} + +- (void)setHidden:(BOOL)hidden { + _explicitlyHidden = hidden; + [self updateHidden]; +} + +#pragma mark - Private + +- (void)updateLabelText { + NSString *appName = (_refererAppLink && _refererAppLink.targets[0]) ? _refererAppLink.targets[0].appName : nil; + _labelView.text = [self localizedLabelForReferer:appName]; +} + +- (void)updateColors { + UIImage *closeButtonImage = [self drawCloseButtonImageWithColor:_textColor]; + + _labelView.textColor = _textColor; + [_closeButton setImage:closeButtonImage forState:UIControlStateNormal]; +} + +- (UIImage *)drawCloseButtonImageWithColor:(UIColor *)color { + + UIGraphicsBeginImageContextWithOptions(CGSizeMake(FBSDKCloseButtonWidth, FBSDKCloseButtonHeight), NO, 0.0f); + + CGContextRef context = UIGraphicsGetCurrentContext(); + + CGContextSetStrokeColorWithColor(context, color.CGColor); + CGContextSetFillColorWithColor(context, color.CGColor); + + CGContextSetLineWidth(context, 1.25f); + + CGFloat inset = 0.5f; + + CGContextMoveToPoint(context, inset, inset); + CGContextAddLineToPoint(context, FBSDKCloseButtonWidth - inset, FBSDKCloseButtonHeight - inset); + CGContextStrokePath(context); + + CGContextMoveToPoint(context, FBSDKCloseButtonWidth - inset, inset); + CGContextAddLineToPoint(context, inset, FBSDKCloseButtonHeight - inset); + CGContextStrokePath(context); + + UIImage *result = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + return result; +} + +- (NSString *)localizedLabelForReferer:(NSString *)refererName { + if (!refererName) { + return nil; + } + + NSString *format = NSLocalizedString(@"Touch to return to %1$@", @"Format for the string to return to a calling app."); + return [NSString stringWithFormat:format, refererName]; +} + +- (BOOL)hasRefererData { + return _refererAppLink && _refererAppLink.targets[0]; +} + +- (void)closeButtonTapped:(id)sender { + [_delegate returnToRefererViewDidTapInsideCloseButton:self]; +} + +- (void)onTapInside:(UIGestureRecognizer *)sender { + [_delegate returnToRefererViewDidTapInsideLink:self link:_refererAppLink]; +} + +- (void)updateHidden { + super.hidden = _explicitlyHidden || _closed || !self.hasRefererData; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkTarget.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkTarget.h new file mode 100644 index 0000000..091d66a --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkTarget.h @@ -0,0 +1,45 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + Represents a target defined in App Link metadata, consisting of at least + a URL, and optionally an App Store ID and name. + */ +@interface FBSDKAppLinkTarget : NSObject + +/*! Creates a FBSDKAppLinkTarget with the given app site and target URL. */ ++ (instancetype)appLinkTargetWithURL:(NSURL *)url + appStoreId:(nullable NSString *)appStoreId + appName:(NSString *)appName; + +/*! The URL prefix for this app link target */ +@property (nonatomic, strong, readonly) NSURL *URL; + +/*! The app ID for the app store */ +@property (nonatomic, copy, readonly, nullable) NSString *appStoreId; + +/*! The name of the app */ +@property (nonatomic, copy, readonly) NSString *appName; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkTarget.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkTarget.m new file mode 100644 index 0000000..250ed1a --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkTarget.m @@ -0,0 +1,41 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppLinkTarget.h" + +@interface FBSDKAppLinkTarget () + +@property (nonatomic, strong) NSURL *URL; +@property (nonatomic, copy) NSString *appStoreId; +@property (nonatomic, copy) NSString *appName; + +@end + +@implementation FBSDKAppLinkTarget + ++ (instancetype)appLinkTargetWithURL:(NSURL *)url + appStoreId:(NSString *)appStoreId + appName:(NSString *)appName { + FBSDKAppLinkTarget *target = [[self alloc] init]; + target.URL = url; + target.appStoreId = appStoreId; + target.appName = appName; + return target; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.h new file mode 100644 index 0000000..8a971b2 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.h @@ -0,0 +1,89 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +/** + Describes the callback for fetchDeferredAppLink. + @param url the url representing the deferred App Link + @param error the error during the request, if any + + + The url may also have a fb_click_time_utc query parameter that + represents when the click occurred that caused the deferred App Link to be created. + */ +typedef void (^FBSDKDeferredAppLinkHandler)(NSURL *url, NSError *error); + + +/** + Describes the callback for fetchOrganicDeferredAppLink. + @param url the url representing the deferred App Link + */ +typedef void (^FBSDKDeferredAppInviteHandler)(NSURL *url); + + +/** + Class containing App Links related utility methods. + */ +@interface FBSDKAppLinkUtility : NSObject + +/** + Call this method from the main thread to fetch deferred applink data if you use Mobile App + Engagement Ads (https://developers.facebook.com/docs/ads-for-apps/mobile-app-ads-engagement). + This may require a network round trip. If successful, the handler is invoked with the link + data (this will only return a valid URL once, and future calls will result in a nil URL + value in the callback). + + @param handler the handler to be invoked if there is deferred App Link data + + + The handler may contain an NSError instance to capture any errors. In the + common case where there simply was no app link data, the NSError instance will be nil. + + This method should only be called from a location that occurs after any launching URL has + been processed (e.g., you should call this method from your application delegate's + applicationDidBecomeActive:). + */ ++ (void)fetchDeferredAppLink:(FBSDKDeferredAppLinkHandler)handler; + +/** + +@warning This method is no longer available and will always return NO. + */ ++ (BOOL)fetchDeferredAppInvite:(FBSDKDeferredAppInviteHandler)handler +DEPRECATED_MSG_ATTRIBUTE("This method is no longer available."); + +/* + Call this method to fetch promotion code from the url, if it's present. This function + requires Bolts framework. + + Note: This throws an exception if Bolts.framework is not linked. Add '[BFURL class]' in intialize method + of your AppDelegate. + + @param url App Link url that was passed to the app. + + @return Promotion code string. + + + Call this method to fetch App Invite Promotion Code from applink if present. + This can be used to fetch the promotion code that was associated with the invite when it + was created. This method should be called with the url from the openURL method. +*/ ++ (NSString*)appInvitePromotionCodeFromURL:(NSURL*)url; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.m new file mode 100644 index 0000000..9b180c2 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.m @@ -0,0 +1,108 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppLinkUtility.h" + +#import + +#import "FBSDKAppEventsUtility.h" +#import "FBSDKGraphRequest.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKSettings.h" +#import "FBSDKUtility.h" + +static NSString *const FBSDKLastDeferredAppLink = @"com.facebook.sdk:lastDeferredAppLink%@"; +static NSString *const FBSDKDeferredAppLinkEvent = @"DEFERRED_APP_LINK"; + +@implementation FBSDKAppLinkUtility {} + ++ (void)fetchDeferredAppLink:(FBSDKDeferredAppLinkHandler)handler +{ + NSAssert([NSThread isMainThread], @"FBSDKAppLink fetchDeferredAppLink: must be invoked from main thread."); + + NSString *appID = [FBSDKSettings appID]; + + // Deferred app links are only currently used for engagement ads, thus we consider the app to be an advertising one. + // If this is considered for organic, non-ads scenarios, we'll need to retrieve the FBAppEventsUtility.shouldAccessAdvertisingID + // before we make this call. + NSMutableDictionary *deferredAppLinkParameters = + [FBSDKAppEventsUtility activityParametersDictionaryForEvent:FBSDKDeferredAppLinkEvent + implicitEventsOnly:NO + shouldAccessAdvertisingID:YES]; + + FBSDKGraphRequest *deferredAppLinkRequest = [[FBSDKGraphRequest alloc] initWithGraphPath:[NSString stringWithFormat:@"%@/activities", appID, nil] + parameters:deferredAppLinkParameters + tokenString:nil + version:nil + HTTPMethod:@"POST"]; + + [deferredAppLinkRequest startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, + id result, + NSError *error) { + NSURL *applinkURL = nil; + if (!error) { + NSString *appLinkString = result[@"applink_url"]; + if (appLinkString) { + applinkURL = [NSURL URLWithString:appLinkString]; + + NSString *createTimeUtc = result[@"click_time"]; + if (createTimeUtc) { + // append/translate the create_time_utc so it can be used by clients + NSString *modifiedURLString = [applinkURL.absoluteString + stringByAppendingFormat:@"%@fb_click_time_utc=%@", + (applinkURL.query) ? @"&" : @"?" , + createTimeUtc]; + applinkURL = [NSURL URLWithString:modifiedURLString]; + } + } + } + + if (handler) { + dispatch_async(dispatch_get_main_queue(), ^{ + handler(applinkURL, error); + }); + } + }]; +} + ++ (BOOL)fetchDeferredAppInvite:(FBSDKDeferredAppInviteHandler)handler +{ + return NO; +} + ++ (NSString*)appInvitePromotionCodeFromURL:(NSURL*)url; +{ + BFURL *parsedUrl = [[FBSDKInternalUtility resolveBoltsClassWithName:@"BFURL"] URLWithURL:url]; + NSDictionary *extras = parsedUrl.appLinkExtras; + if (extras) { + NSString *deeplinkContextString = extras[@"deeplink_context"]; + + // Parse deeplinkContext and extract promo code + if (deeplinkContextString.length > 0) { + NSError *error = nil; + NSDictionary *deeplinkContextData = [FBSDKInternalUtility objectForJSONString:deeplinkContextString error:&error]; + if (!error && [deeplinkContextData isKindOfClass:[NSDictionary class]]) { + return deeplinkContextData[@"promo_code"]; + } + } + } + + return nil; + +} +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.h new file mode 100644 index 0000000..c1eca10 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.h @@ -0,0 +1,92 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +/** + + The FBSDKApplicationDelegate is designed to post process the results from Facebook Login + or Facebook Dialogs (or any action that requires switching over to the native Facebook + app or Safari). + + + + The methods in this class are designed to mirror those in UIApplicationDelegate, and you + should call them in the respective methods in your AppDelegate implementation. + */ +@interface FBSDKApplicationDelegate : NSObject + +/** + Gets the singleton instance. + */ ++ (instancetype)sharedInstance; + +/** + Call this method from the [UIApplicationDelegate application:openURL:sourceApplication:annotation:] method + of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction + with the native Facebook app or Safari as part of SSO authorization flow or Facebook dialogs. + + @param application The application as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. + + @param url The URL as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. + + @param sourceApplication The sourceApplication as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. + + @param annotation The annotation as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. + + @return YES if the url was intended for the Facebook SDK, NO if not. + */ +- (BOOL)application:(UIApplication *)application + openURL:(NSURL *)url + sourceApplication:(NSString *)sourceApplication + annotation:(id)annotation; + +#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_9_0 +/** + Call this method from the [UIApplicationDelegate application:openURL:options:] method + of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction + with the native Facebook app or Safari as part of SSO authorization flow or Facebook dialogs. + + @param application The application as passed to [UIApplicationDelegate application:openURL:options:]. + + @param url The URL as passed to [UIApplicationDelegate application:openURL:options:]. + + @param options The options dictionary as passed to [UIApplicationDelegate application:openURL:options:]. + + @return YES if the url was intended for the Facebook SDK, NO if not. + */ +- (BOOL)application:(UIApplication *)application + openURL:(NSURL *)url + options:(NSDictionary *)options; +#endif + +/** + Call this method from the [UIApplicationDelegate application:didFinishLaunchingWithOptions:] method + of the AppDelegate for your app. It should be invoked for the proper use of the Facebook SDK. + As part of SDK initialization basic auto logging of app events will occur, this can be +controlled via 'FacebookAutoLogAppEventsEnabled' key in the project info plist file. + + @param application The application as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. + + @param launchOptions The launchOptions as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. + + @return YES if the url was intended for the Facebook SDK, NO if not. + */ +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.m new file mode 100644 index 0000000..5bdd10b --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.m @@ -0,0 +1,635 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKApplicationDelegate.h" +#import "FBSDKApplicationDelegate+Internal.h" + +#import + +#if !TARGET_OS_TV +#import +#endif + +#import "FBSDKAppEvents+Internal.h" +#import "FBSDKConstants.h" +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKError.h" +#import "FBSDKGateKeeperManager.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKServerConfiguration.h" +#import "FBSDKServerConfigurationManager.h" +#import "FBSDKSettings+Internal.h" +#import "FBSDKTimeSpentData.h" +#import "FBSDKUtility.h" + +#if !TARGET_OS_TV +#import "FBSDKBoltsMeasurementEventListener.h" +#import "FBSDKBridgeAPIRequest.h" +#import "FBSDKBridgeAPIResponse.h" +#import "FBSDKContainerViewController.h" +#import "FBSDKProfile+Internal.h" +#endif + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +NSNotificationName const FBSDKApplicationDidBecomeActiveNotification = @"com.facebook.sdk.FBSDKApplicationDidBecomeActiveNotification"; + +#else + +NSString *const FBSDKApplicationDidBecomeActiveNotification = @"com.facebook.sdk.FBSDKApplicationDidBecomeActiveNotification"; + +#endif + +static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound"; + +typedef void (^FBSDKAuthenticationCompletionHandler)(NSURL *_Nullable callbackURL, NSError *_Nullable error); + +@protocol FBSDKAuthenticationSession + +- (instancetype)initWithURL:(NSURL *)URL callbackURLScheme:(nullable NSString *)callbackURLScheme completionHandler:(FBSDKAuthenticationCompletionHandler)completionHandler; +- (BOOL)start; +- (void)cancel; + +@end + +@implementation FBSDKApplicationDelegate +{ +#if !TARGET_OS_TV + FBSDKBridgeAPIRequest *_pendingRequest; + FBSDKBridgeAPICallbackBlock _pendingRequestCompletionBlock; + id _pendingURLOpen; + id _authenticationSession NS_AVAILABLE_IOS(11_0); + FBSDKAuthenticationCompletionHandler _authenticationSessionCompletionHandler NS_AVAILABLE_IOS(11_0); +#endif + BOOL _expectingBackground; + BOOL _isRequestingSFAuthenticationSession; + UIViewController *_safariViewController; + BOOL _isDismissingSafariViewController; + BOOL _isAppLaunched; +} + +#pragma mark - Class Methods + ++ (void)load +{ + // when the app becomes active by any means, kick off the initialization. + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(initializeWithLaunchData:) + name:UIApplicationDidFinishLaunchingNotification + object:nil]; +} + +// Initialize SDK listeners +// Don't call this function in any place else. It should only be called when the class is loaded. ++ (void)initializeWithLaunchData:(NSNotification *)note +{ + NSDictionary *launchData = note.userInfo; + + [[self sharedInstance] application:[UIApplication sharedApplication] didFinishLaunchingWithOptions:launchData]; + +#if !TARGET_OS_TV + // Register Listener for Bolts measurement events + [FBSDKBoltsMeasurementEventListener defaultListener]; +#endif + // Set the SourceApplication for time spent data. This is not going to update the value if the app has already launched. + [FBSDKTimeSpentData setSourceApplication:launchData[UIApplicationLaunchOptionsSourceApplicationKey] + openURL:launchData[UIApplicationLaunchOptionsURLKey]]; + // Register on UIApplicationDidEnterBackgroundNotification events to reset source application data when app backgrounds. + [FBSDKTimeSpentData registerAutoResetSourceApplication]; + + [FBSDKInternalUtility validateFacebookReservedURLSchemes]; + // Remove the observer + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + ++ (instancetype)sharedInstance +{ + static FBSDKApplicationDelegate *_sharedInstance; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _sharedInstance = [[self alloc] _init]; + }); + return _sharedInstance; +} + +#pragma mark - Object Lifecycle + +- (instancetype)_init +{ + if ((self = [super init]) != nil) { + NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter]; + [defaultCenter addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil]; + [defaultCenter addObserver:self selector:@selector(applicationDidBecomeActive:) name:UIApplicationDidBecomeActiveNotification object:nil]; + + [[FBSDKAppEvents singleton] registerNotifications]; + } + return self; +} + +- (instancetype)init +{ + return nil; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +#pragma mark - UIApplicationDelegate + +#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_9_0 +- (BOOL)application:(UIApplication *)application + openURL:(NSURL *)url + options:(NSDictionary *)options +{ + if (@available(iOS 9.0, *)) { + return [self application:application + openURL:url + sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey] + annotation:options[UIApplicationOpenURLOptionsAnnotationKey]]; + } + + return NO; +} +#endif + +- (BOOL)application:(UIApplication *)application + openURL:(NSURL *)url + sourceApplication:(NSString *)sourceApplication + annotation:(id)annotation +{ + if (sourceApplication != nil && ![sourceApplication isKindOfClass:[NSString class]]) { + @throw [NSException exceptionWithName:NSInvalidArgumentException + reason:@"Expected 'sourceApplication' to be NSString. Please verify you are passing in 'sourceApplication' from your app delegate (not the UIApplication* parameter). If your app delegate implements iOS 9's application:openURL:options:, you should pass in options[UIApplicationOpenURLOptionsSourceApplicationKey]. " + userInfo:nil]; + } + [FBSDKTimeSpentData setSourceApplication:sourceApplication openURL:url]; + +#if !TARGET_OS_TV + id pendingURLOpen = _pendingURLOpen; + + void (^completePendingOpenURLBlock)(void) = ^{ + self->_pendingURLOpen = nil; + [pendingURLOpen application:application + openURL:url + sourceApplication:sourceApplication + annotation:annotation]; + self->_isDismissingSafariViewController = NO; + }; + // if they completed a SFVC flow, dismiss it. + if (_safariViewController) { + _isDismissingSafariViewController = YES; + [_safariViewController.presentingViewController dismissViewControllerAnimated:YES + completion:completePendingOpenURLBlock]; + _safariViewController = nil; + } else if (@available(iOS 11.0, *)) { + if (_authenticationSession != nil) { + [_authenticationSession cancel]; + _authenticationSession = nil; + } + completePendingOpenURLBlock(); + } + + if ([pendingURLOpen canOpenURL:url + forApplication:application + sourceApplication:sourceApplication + annotation:annotation]) { + return YES; + } + if ([self _handleBridgeAPIResponseURL:url sourceApplication:sourceApplication]) { + return YES; + } +#endif + [self _logIfAppLinkEvent:url]; + + return NO; +} + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + if (_isAppLaunched) { + return NO; + } + + _isAppLaunched = YES; + FBSDKAccessToken *cachedToken = [FBSDKSettings accessTokenCache].accessToken; + [FBSDKAccessToken setCurrentAccessToken:cachedToken]; + // fetch app settings + [FBSDKServerConfigurationManager loadServerConfigurationWithCompletionBlock:NULL]; + // fetch gate keepers + [FBSDKGateKeeperManager loadGateKeepers]; + + if ([FBSDKSettings autoLogAppEventsEnabled].boolValue) { + [self _logSDKInitialize]; + } +#if !TARGET_OS_TV + FBSDKProfile *cachedProfile = [FBSDKProfile fetchCachedProfile]; + [FBSDKProfile setCurrentProfile:cachedProfile]; + + NSURL *launchedURL = launchOptions[UIApplicationLaunchOptionsURLKey]; + NSString *sourceApplication = launchOptions[UIApplicationLaunchOptionsSourceApplicationKey]; + + if (launchedURL && + sourceApplication) { + Class loginManagerClass = NSClassFromString(@"FBSDKLoginManager"); + if (loginManagerClass) { + id annotation = launchOptions[UIApplicationLaunchOptionsAnnotationKey]; + id loginManager = [[loginManagerClass alloc] init]; + return [loginManager application:application + openURL:launchedURL + sourceApplication:sourceApplication + annotation:annotation]; + } + } +#endif + return NO; +} + +- (void)applicationDidEnterBackground:(NSNotification *)notification +{ + _isRequestingSFAuthenticationSession = NO; + _active = NO; + _expectingBackground = NO; +} + +- (void)applicationDidBecomeActive:(NSNotification *)notification +{ + // Auto log basic events in case autoLogAppEventsEnabled is set + if ([FBSDKSettings autoLogAppEventsEnabled].boolValue) { + [FBSDKAppEvents activateApp]; + } + // _expectingBackground can be YES if the caller started doing work (like login) + // within the app delegate's lifecycle like openURL, in which case there + // might have been a "didBecomeActive" event pending that we want to ignore. + BOOL notExpectingBackground = !_expectingBackground && !_safariViewController && !_isDismissingSafariViewController && !_isRequestingSFAuthenticationSession; +#if !TARGET_OS_TV + if (@available(iOS 11.0, *)) { + if (notExpectingBackground && _authenticationSessionCompletionHandler != nil) { + _authenticationSessionCompletionHandler(nil, nil); + } + + notExpectingBackground = notExpectingBackground && !_authenticationSession; + } +#endif + if (notExpectingBackground) { + _active = YES; +#if !TARGET_OS_TV + [_pendingURLOpen applicationDidBecomeActive:notification.object]; + [self _cancelBridgeRequest]; +#endif + [[NSNotificationCenter defaultCenter] postNotificationName:FBSDKApplicationDidBecomeActiveNotification object:self]; + } +} + +#pragma mark - Internal Methods + +#pragma mark -- (non-tvos) + +#if !TARGET_OS_TV + +- (void)openURL:(NSURL *)url sender:(id)sender handler:(void(^)(BOOL, NSError *))handler +{ + _expectingBackground = YES; + _pendingURLOpen = sender; + dispatch_async(dispatch_get_main_queue(), ^{ + // Dispatch openURL calls to prevent hangs if we're inside the current app delegate's openURL flow already + NSOperatingSystemVersion iOS10Version = { .majorVersion = 10, .minorVersion = 0, .patchVersion = 0 }; + if ([FBSDKInternalUtility isOSRunTimeVersionAtLeast:iOS10Version]) { + if (@available(iOS 10.0, *)) { + [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) { + handler(success, nil); + }]; + } + } else { + BOOL opened = [[UIApplication sharedApplication] openURL:url]; + + if ([url.scheme hasPrefix:@"http"] && !opened) { + NSOperatingSystemVersion iOS8Version = { .majorVersion = 8, .minorVersion = 0, .patchVersion = 0 }; + if (![FBSDKInternalUtility isOSRunTimeVersionAtLeast:iOS8Version]) { + // Safari openURL calls can wrongly return NO on iOS 7 so manually overwrite that case to YES. + // Otherwise we would rather trust in the actual result of openURL + opened = YES; + } + } + if (handler) { + handler(opened, nil); + } + } + }); +} + +- (void)openBridgeAPIRequest:(FBSDKBridgeAPIRequest *)request + useSafariViewController:(BOOL)useSafariViewController + fromViewController:(UIViewController *)fromViewController + completionBlock:(FBSDKBridgeAPICallbackBlock)completionBlock +{ + if (!request) { + return; + } + NSError *error; + NSURL *requestURL = [request requestURL:&error]; + if (!requestURL) { + FBSDKBridgeAPIResponse *response = [FBSDKBridgeAPIResponse bridgeAPIResponseWithRequest:request error:error]; + completionBlock(response); + return; + } + _pendingRequest = request; + _pendingRequestCompletionBlock = [completionBlock copy]; + void (^handler)(BOOL, NSError *) = ^(BOOL openedURL, NSError *anError) { + if (!openedURL) { + self->_pendingRequest = nil; + self->_pendingRequestCompletionBlock = nil; + NSError *openedURLError; + if ([request.scheme hasPrefix:@"http"]) { + openedURLError = [NSError fbErrorWithCode:FBSDKErrorBrowserUnavailable + message:@"the app switch failed because the browser is unavailable"]; + } else { + openedURLError = [NSError fbErrorWithCode:FBSDKErrorAppVersionUnsupported + message:@"the app switch failed because the destination app is out of date"]; + } + FBSDKBridgeAPIResponse *response = [FBSDKBridgeAPIResponse bridgeAPIResponseWithRequest:request + error:openedURLError]; + completionBlock(response); + return; + } + }; + if (useSafariViewController) { + [self openURLWithSafariViewController:requestURL sender:nil fromViewController:fromViewController handler:handler]; + } else { + [self openURL:requestURL sender:nil handler:handler]; + } +} + +- (void)openURLWithSafariViewController:(NSURL *)url + sender:(id)sender + fromViewController:(UIViewController *)fromViewController + handler:(void(^)(BOOL, NSError *))handler +{ + if (![url.scheme hasPrefix:@"http"]) { + [self openURL:url sender:sender handler:handler]; + return; + } + + _expectingBackground = NO; + _pendingURLOpen = sender; + + if (@available(iOS 11.0, *)) { + if ([sender isAuthenticationURL:url]) { + [self _setSessionCompletionHandlerFromHandler:handler]; + [self _openURLWithAuthenticationSession:url]; + return; + } + } + + // trying to dynamically load SFSafariViewController class + // so for the cases when it is available we can send users through Safari View Controller flow + // in cases it is not available regular flow will be selected + Class SFSafariViewControllerClass = fbsdkdfl_SFSafariViewControllerClass(); + + if (SFSafariViewControllerClass) { + UIViewController *parent = fromViewController ?: [FBSDKInternalUtility topMostViewController]; + if (parent == nil) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"There are no valid ViewController to present SafariViewController with", nil]; + return; + } + + NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO]; + NSURLQueryItem *sfvcQueryItem = [[NSURLQueryItem alloc] initWithName:@"sfvc" value:@"1"]; + components.queryItems = [components.queryItems arrayByAddingObject:sfvcQueryItem]; + url = components.URL; + FBSDKContainerViewController *container = [[FBSDKContainerViewController alloc] init]; + container.delegate = self; + if (parent.transitionCoordinator != nil) { + // Wait until the transition is finished before presenting SafariVC to avoid a blank screen. + [parent.transitionCoordinator animateAlongsideTransition:NULL completion:^(id context) { + // Note SFVC init must occur inside block to avoid blank screen. + self->_safariViewController = [[SFSafariViewControllerClass alloc] initWithURL:url]; + // Disable dismissing with edge pan gesture + self->_safariViewController.modalPresentationStyle = UIModalPresentationOverFullScreen; + [self->_safariViewController performSelector:@selector(setDelegate:) withObject:self]; + [container displayChildController:self->_safariViewController]; + [parent presentViewController:container animated:YES completion:nil]; + }]; + } else { + _safariViewController = [[SFSafariViewControllerClass alloc] initWithURL:url]; + // Disable dismissing with edge pan gesture + _safariViewController.modalPresentationStyle = UIModalPresentationOverFullScreen; + [_safariViewController performSelector:@selector(setDelegate:) withObject:self]; + [container displayChildController:_safariViewController]; + [parent presentViewController:container animated:YES completion:nil]; + } + + // Assuming Safari View Controller always opens + if (handler) { + handler(YES, nil); + } + } else { + [self openURL:url sender:sender handler:handler]; + } +} + +- (void)_openURLWithAuthenticationSession:(NSURL *)url +{ + Class AuthenticationSessionClass = fbsdkdfl_ASWebAuthenticationSessionClass(); + + if (!AuthenticationSessionClass) { + AuthenticationSessionClass = fbsdkdfl_SFAuthenticationSessionClass(); + } + + if (AuthenticationSessionClass != nil) { + if (_authenticationSession != nil) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"There is already a request for authenticated session. Cancelling active SFAuthenticationSession before starting the new one.", nil]; + [_authenticationSession cancel]; + } + _authenticationSession = [[AuthenticationSessionClass alloc] initWithURL:url + callbackURLScheme:[FBSDKInternalUtility appURLScheme] + completionHandler:_authenticationSessionCompletionHandler]; + _isRequestingSFAuthenticationSession = YES; + [_authenticationSession start]; + } +} + +- (void)_setSessionCompletionHandlerFromHandler:(void(^)(BOOL, NSError *))handler +{ + __weak typeof(self) weakSelf = self; + _authenticationSessionCompletionHandler = ^ (NSURL *aURL, NSError *error) { + typeof(self) strongSelf = weakSelf; + strongSelf->_isRequestingSFAuthenticationSession = NO; + handler(error == nil, error); + if (error == nil) { + [strongSelf application:[UIApplication sharedApplication] openURL:aURL sourceApplication:@"com.apple" annotation:nil]; + } + strongSelf->_authenticationSession = nil; + strongSelf->_authenticationSessionCompletionHandler = nil; + }; +} + +#pragma mark -- SFSafariViewControllerDelegate + +// This means the user tapped "Done" which we should treat as a cancellation. +- (void)safariViewControllerDidFinish:(UIViewController *)safariViewController +{ + if (_pendingURLOpen) { + id pendingURLOpen = _pendingURLOpen; + + _pendingURLOpen = nil; + + [pendingURLOpen application:nil + openURL:nil + sourceApplication:nil + annotation:nil]; + + } + [self _cancelBridgeRequest]; + _safariViewController = nil; +} + +#pragma mark -- FBSDKContainerViewControllerDelegate + +- (void)viewControllerDidDisappear:(FBSDKContainerViewController *)viewController animated:(BOOL)animated +{ + if (_safariViewController) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"**ERROR**:\n The SFSafariViewController's parent view controller was dismissed.\n" + "This can happen if you are triggering login from a UIAlertController. Instead, make sure your top most view " + "controller will not be prematurely dismissed."]; + [self safariViewControllerDidFinish:_safariViewController]; + } +} + +#endif + +#pragma mark - Helper Methods + +- (void)_logIfAppLinkEvent:(NSURL *)url +{ + if (!url) { + return; + } + NSDictionary *params = [FBSDKUtility dictionaryWithQueryString:url.query]; + NSString *applinkDataString = params[@"al_applink_data"]; + if (!applinkDataString) { + return; + } + + NSDictionary *applinkData = [FBSDKInternalUtility objectForJSONString:applinkDataString error:NULL]; + if (!applinkData) { + return; + } + + NSString *targetURLString = applinkData[@"target_url"]; + NSURL *targetURL = [targetURLString isKindOfClass:[NSString class]] ? [NSURL URLWithString:targetURLString] : nil; + + NSMutableDictionary *logData = [[NSMutableDictionary alloc] init]; + [FBSDKInternalUtility dictionary:logData setObject:targetURL.absoluteString forKey:@"targetURL"]; + [FBSDKInternalUtility dictionary:logData setObject:targetURL.host forKey:@"targetURLHost"]; + + NSDictionary *refererData = applinkData[@"referer_data"]; + if (refererData) { + [FBSDKInternalUtility dictionary:logData setObject:refererData[@"target_url"] forKey:@"referralTargetURL"]; + [FBSDKInternalUtility dictionary:logData setObject:refererData[@"url"] forKey:@"referralURL"]; + [FBSDKInternalUtility dictionary:logData setObject:refererData[@"app_name"] forKey:@"referralAppName"]; + } + [FBSDKInternalUtility dictionary:logData setObject:url.absoluteString forKey:@"inputURL"]; + [FBSDKInternalUtility dictionary:logData setObject:url.scheme forKey:@"inputURLScheme"]; + + [FBSDKAppEvents logImplicitEvent:FBSDKAppLinkInboundEvent + valueToSum:nil + parameters:logData + accessToken:nil]; +} + +- (void)_logSDKInitialize +{ + NSMutableDictionary *params = [NSMutableDictionary new]; + params[@"core_lib_included"] = @1; + if (objc_lookUpClass("FBSDKShareDialog") != nil) { + params[@"share_lib_included"] = @1; + } + if (objc_lookUpClass("FBSDKLoginManager") != nil) { + params[@"login_lib_included"] = @1; + } + if (objc_lookUpClass("FBSDKPlacesManager") != nil) { + params[@"places_lib_included"] = @1; + } + if (objc_lookUpClass("FBSDKMessengerButton") != nil) { + params[@"messenger_lib_included"] = @1; + } + if (objc_lookUpClass("FBSDKMessengerButton") != nil) { + params[@"messenger_lib_included"] = @1; + } + if (objc_lookUpClass("FBSDKTVInterfaceFactory.m") != nil) { + params[@"tv_lib_included"] = @1; + } + if (objc_lookUpClass("FBSDKAutoLog") != nil) { + params[@"marketing_lib_included"] = @1; + } + [FBSDKAppEvents logEvent:@"fb_sdk_initialize" parameters:params]; +} + +#pragma mark -- (non-tvos) +#if !TARGET_OS_TV +- (BOOL)_handleBridgeAPIResponseURL:(NSURL *)responseURL sourceApplication:(NSString *)sourceApplication +{ + FBSDKBridgeAPIRequest *request = _pendingRequest; + FBSDKBridgeAPICallbackBlock completionBlock = _pendingRequestCompletionBlock; + _pendingRequest = nil; + _pendingRequestCompletionBlock = NULL; + if (![responseURL.scheme isEqualToString:[FBSDKInternalUtility appURLScheme]]) { + return NO; + } + if (![responseURL.host isEqualToString:@"bridge"]) { + return NO; + } + if (!request) { + return NO; + } + if (!completionBlock) { + return YES; + } + NSError *error; + FBSDKBridgeAPIResponse *response = [FBSDKBridgeAPIResponse bridgeAPIResponseWithRequest:request + responseURL:responseURL + sourceApplication:sourceApplication + error:&error]; + if (response) { + completionBlock(response); + return YES; + } else if (error) { + completionBlock([FBSDKBridgeAPIResponse bridgeAPIResponseWithRequest:request error:error]); + return YES; + } else { + return NO; + } +} + +- (void)_cancelBridgeRequest +{ + if (_pendingRequest && _pendingRequestCompletionBlock) { + _pendingRequestCompletionBlock([FBSDKBridgeAPIResponse bridgeAPIResponseCancelledWithRequest:_pendingRequest]); + } + _pendingRequest = nil; + _pendingRequestCompletionBlock = NULL; +} +#endif + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.h new file mode 100644 index 0000000..ca53966 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.h @@ -0,0 +1,26 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +/** + A base class for common SDK buttons. + */ +@interface FBSDKButton : UIButton + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.m new file mode 100644 index 0000000..834f9e5 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.m @@ -0,0 +1,457 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKButton.h" +#import "FBSDKButton+Subclass.h" + +#import "FBSDKAccessToken.h" +#import "FBSDKAppEvents+Internal.h" +#import "FBSDKAppEvents.h" +#import "FBSDKApplicationDelegate+Internal.h" +#import "FBSDKLogo.h" +#import "FBSDKMath.h" +#import "FBSDKUIUtility.h" +#import "FBSDKViewImpressionTracker.h" + +#define HEIGHT_TO_FONT_SIZE 0.47 +#define HEIGHT_TO_MARGIN 0.27 +#define HEIGHT_TO_PADDING 0.23 +#define HEIGHT_TO_TEXT_PADDING_CORRECTION 0.08 + +@implementation FBSDKButton +{ + BOOL _skipIntrinsicContentSizing; + BOOL _isExplicitlyDisabled; +} + +#pragma mark - Object Lifecycle + +- (instancetype)initWithFrame:(CGRect)frame +{ + if ((self = [super initWithFrame:frame])) { + _skipIntrinsicContentSizing = YES; + [self configureButton]; + _skipIntrinsicContentSizing = NO; + } + return self; +} + +- (void)awakeFromNib +{ + [super awakeFromNib]; + _skipIntrinsicContentSizing = YES; + [self configureButton]; + _skipIntrinsicContentSizing = NO; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +#pragma mark - Properties + +- (void)setEnabled:(BOOL)enabled +{ + _isExplicitlyDisabled = !enabled; + [self checkImplicitlyDisabled]; +} + +#pragma mark - Layout + +- (CGRect)imageRectForContentRect:(CGRect)contentRect +{ + if (self.hidden || CGRectIsEmpty(self.bounds)) { + return CGRectZero; + } + CGRect imageRect = UIEdgeInsetsInsetRect(contentRect, self.imageEdgeInsets); + CGFloat margin = [self _marginForHeight:[self _heightForContentRect:contentRect]]; + imageRect = CGRectInset(imageRect, margin, margin); + imageRect.size.width = CGRectGetHeight(imageRect); + return imageRect; +} + +- (CGSize)intrinsicContentSize +{ + if (_skipIntrinsicContentSizing) { + return CGSizeZero; + } + _skipIntrinsicContentSizing = YES; + CGSize size = [self sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)]; + _skipIntrinsicContentSizing = NO; + return size; +} + +- (void)layoutSubviews +{ + // automatic impression tracking if the button conforms to FBSDKButtonImpressionTracking + if ([self conformsToProtocol:@protocol(FBSDKButtonImpressionTracking)]) { + NSString *eventName = ((id)self).impressionTrackingEventName; + NSString *identifier = ((id)self).impressionTrackingIdentifier; + NSDictionary *parameters = ((id)self).analyticsParameters; + if (eventName && identifier) { + FBSDKViewImpressionTracker *impressionTracker = [FBSDKViewImpressionTracker impressionTrackerWithEventName:eventName]; + [impressionTracker logImpressionWithIdentifier:identifier parameters:parameters]; + } + } + [super layoutSubviews]; +} + +- (CGSize)sizeThatFits:(CGSize)size +{ + if (self.hidden) { + return CGSizeZero; + } + CGSize normalSize = [self sizeThatFits:size title:[self titleForState:UIControlStateNormal]]; + CGSize selectedSize = [self sizeThatFits:size title:[self titleForState:UIControlStateSelected]]; + return CGSizeMake(MAX(normalSize.width, selectedSize.width), MAX(normalSize.height, selectedSize.height)); +} + +- (void)sizeToFit +{ + CGRect bounds = self.bounds; + bounds.size = [self sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)]; + self.bounds = bounds; +} + +- (CGRect)titleRectForContentRect:(CGRect)contentRect +{ + if (self.hidden || CGRectIsEmpty(self.bounds)) { + return CGRectZero; + } + CGRect imageRect = [self imageRectForContentRect:contentRect]; + CGFloat height = [self _heightForContentRect:contentRect]; + CGFloat padding = [self _paddingForHeight:height]; + CGFloat titleX = CGRectGetMaxX(imageRect) + padding; + CGRect titleRect = CGRectMake(titleX, 0.0, CGRectGetWidth(contentRect) - titleX, CGRectGetHeight(contentRect)); + + UIEdgeInsets titleEdgeInsets = UIEdgeInsetsZero; + if (!self.layer.needsLayout) { + UILabel *titleLabel = self.titleLabel; + if (titleLabel.textAlignment == NSTextAlignmentCenter) { + // if the text is centered, we need to adjust the frame for the titleLabel based on the size of the text in order + // to keep the text centered in the button without adding extra blank space to the right when unnecessary + // 1. the text fits centered within the button without colliding with the image (imagePaddingWidth) + // 2. the text would run into the image, so adjust the insets to effectively left align it (textPaddingWidth) + CGSize titleSize = FBSDKTextSize(titleLabel.text, + titleLabel.font, + titleRect.size, + titleLabel.lineBreakMode); + CGFloat titlePaddingWidth = (CGRectGetWidth(titleRect) - titleSize.width) / 2; + CGFloat imagePaddingWidth = titleX / 2; + CGFloat inset = MIN(titlePaddingWidth, imagePaddingWidth); + titleEdgeInsets.left -= inset; + titleEdgeInsets.right += inset; + } + } + return UIEdgeInsetsInsetRect(titleRect, titleEdgeInsets); +} + +#pragma mark - Subclass Methods + +- (void)logTapEventWithEventName:(NSString *)eventName parameters:(NSDictionary *)parameters +{ + [FBSDKAppEvents logImplicitEvent:eventName + valueToSum:nil + parameters:parameters + accessToken:[FBSDKAccessToken currentAccessToken]]; +} + +- (void)checkImplicitlyDisabled +{ + BOOL enabled = !_isExplicitlyDisabled && !self.implicitlyDisabled; + BOOL currentEnabled = self.enabled; + super.enabled = enabled; + if (currentEnabled != enabled) { + [self invalidateIntrinsicContentSize]; + [self setNeedsLayout]; + } +} + +- (void)configureButton +{ + [self configureWithIcon:[self defaultIcon] + title:nil + backgroundColor:[self defaultBackgroundColor] + highlightedColor:[self defaultHighlightedColor]]; +} + +- (void)configureWithIcon:(FBSDKIcon *)icon + title:(NSString *)title + backgroundColor:(UIColor *)backgroundColor + highlightedColor:(UIColor *)highlightedColor +{ + [self _configureWithIcon:icon + title:title + backgroundColor:backgroundColor + highlightedColor:highlightedColor + selectedTitle:nil + selectedIcon:nil + selectedColor:nil + selectedHighlightedColor:nil]; +} + +- (void)configureWithIcon:(FBSDKIcon *)icon + title:(NSString *)title + backgroundColor:(UIColor *)backgroundColor + highlightedColor:(UIColor *)highlightedColor + selectedTitle:(NSString *)selectedTitle + selectedIcon:(FBSDKIcon *)selectedIcon + selectedColor:(UIColor *)selectedColor + selectedHighlightedColor:(UIColor *)selectedHighlightedColor +{ + [self _configureWithIcon:icon + title:title + backgroundColor:backgroundColor + highlightedColor:highlightedColor + selectedTitle:selectedTitle + selectedIcon:selectedIcon + selectedColor:selectedColor + selectedHighlightedColor:selectedHighlightedColor]; +} + +- (UIColor *)defaultBackgroundColor +{ + return [UIColor colorWithRed:65.0/255.0 green:93.0/255.0 blue:174.0/255.0 alpha:1.0]; +} + +- (UIColor *)defaultDisabledColor +{ + return [UIColor colorWithRed:189.0/255.0 green:193.0/255.0 blue:201.0/255.0 alpha:1.0]; +} + +- (UIFont *)defaultFont +{ + return [UIFont systemFontOfSize:14]; +} + +- (UIColor *)defaultHighlightedColor +{ + return [UIColor colorWithRed:47.0/255.0 green:71.0/255.0 blue:122.0/255.0 alpha:1.0]; +} + +- (FBSDKIcon *)defaultIcon +{ + return [[FBSDKLogo alloc] init]; +} + +- (UIColor *)defaultSelectedColor +{ + return [UIColor colorWithRed:124.0/255.0 green:143.0/255.0 blue:200.0/255.0 alpha:1.0]; +} + +- (BOOL)isImplicitlyDisabled +{ + return NO; +} + +- (CGSize)sizeThatFits:(CGSize)size title:(NSString *)title +{ + UIFont *font = self.titleLabel.font; + CGFloat height = [self _heightForFont:font]; + + UIEdgeInsets contentEdgeInsets = self.contentEdgeInsets; + + CGSize constrainedContentSize = FBSDKEdgeInsetsInsetSize(size, contentEdgeInsets); + + CGSize titleSize = FBSDKTextSize(title, font, constrainedContentSize, self.titleLabel.lineBreakMode); + + CGFloat padding = [self _paddingForHeight:height]; + CGFloat textPaddingCorrection = [self _textPaddingCorrectionForHeight:height]; + CGSize contentSize = CGSizeMake(height + padding + titleSize.width - textPaddingCorrection, height); + return FBSDKEdgeInsetsOutsetSize(contentSize, contentEdgeInsets); +} + +#pragma mark - Helper Methods + +- (void)_applicationDidBecomeActiveNotification:(NSNotification *)notification +{ + [self checkImplicitlyDisabled]; +} + +- (UIImage *)_backgroundImageWithColor:(UIColor *)color cornerRadius:(CGFloat)cornerRadius scale:(CGFloat)scale +{ + CGFloat size = 1.0 + 2 * cornerRadius; + UIGraphicsBeginImageContextWithOptions(CGSizeMake(size, size), NO, scale); + CGContextRef context = UIGraphicsGetCurrentContext(); + CGContextSetFillColorWithColor(context, color.CGColor); + CGMutablePathRef path = CGPathCreateMutable(); + CGPathMoveToPoint(path, NULL, cornerRadius + 1.0, 0.0); + CGPathAddArcToPoint(path, NULL, size, 0.0, size, cornerRadius, cornerRadius); + CGPathAddLineToPoint(path, NULL, size, cornerRadius + 1.0); + CGPathAddArcToPoint(path, NULL, size, size, cornerRadius + 1.0, size, cornerRadius); + CGPathAddLineToPoint(path, NULL, cornerRadius, size); + CGPathAddArcToPoint(path, NULL, 0.0, size, 0.0, cornerRadius + 1.0, cornerRadius); + CGPathAddLineToPoint(path, NULL, 0.0, cornerRadius); + CGPathAddArcToPoint(path, NULL, 0.0, 0.0, cornerRadius, 0.0, cornerRadius); + CGPathCloseSubpath(path); + CGContextAddPath(context, path); + CGPathRelease(path); + CGContextFillPath(context); + UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); +#if TARGET_OS_TV + return [image resizableImageWithCapInsets:UIEdgeInsetsMake(cornerRadius, cornerRadius, cornerRadius, cornerRadius) + resizingMode:UIImageResizingModeStretch]; +#else + return [image stretchableImageWithLeftCapWidth:cornerRadius topCapHeight:cornerRadius]; +#endif +} + +- (void)_configureWithIcon:(FBSDKIcon *)icon + title:(NSString *)title + backgroundColor:(UIColor *)backgroundColor + highlightedColor:(UIColor *)highlightedColor + selectedTitle:(NSString *)selectedTitle + selectedIcon:(FBSDKIcon *)selectedIcon + selectedColor:(UIColor *)selectedColor + selectedHighlightedColor:(UIColor *)selectedHighlightedColor +{ + [self checkImplicitlyDisabled]; + + if (!icon) { + icon = [self defaultIcon]; + } + if (!backgroundColor) { + backgroundColor = [self defaultBackgroundColor]; + } + if (!highlightedColor) { + highlightedColor = [self defaultHighlightedColor]; + } + if (!selectedColor) { + selectedColor = [self defaultSelectedColor]; + } + if (!selectedHighlightedColor) { + selectedHighlightedColor = highlightedColor; + } + + self.adjustsImageWhenDisabled = NO; + self.adjustsImageWhenHighlighted = NO; + self.contentHorizontalAlignment = UIControlContentHorizontalAlignmentFill; + self.contentVerticalAlignment = UIControlContentVerticalAlignmentFill; + self.tintColor = [UIColor whiteColor]; + + BOOL forceSizeToFit = CGRectIsEmpty(self.bounds); + + CGFloat scale = [UIScreen mainScreen].scale; + UIImage *backgroundImage; + + backgroundImage = [self _backgroundImageWithColor:backgroundColor cornerRadius:3.0 scale:scale]; + [self setBackgroundImage:backgroundImage forState:UIControlStateNormal]; +#if TARGET_OS_TV + [self setBackgroundImage:backgroundImage forState:UIControlStateFocused]; +#endif + + backgroundImage = [self _backgroundImageWithColor:highlightedColor cornerRadius:3.0 scale:scale]; + [self setBackgroundImage:backgroundImage forState:UIControlStateHighlighted]; + + backgroundImage = [self _backgroundImageWithColor:[self defaultDisabledColor] cornerRadius:3.0 scale:scale]; + [self setBackgroundImage:backgroundImage forState:UIControlStateDisabled]; + + if (selectedColor) { + backgroundImage = [self _backgroundImageWithColor:selectedColor cornerRadius:3.0 scale:scale]; + [self setBackgroundImage:backgroundImage forState:UIControlStateSelected]; + } + + if (selectedHighlightedColor) { + backgroundImage = [self _backgroundImageWithColor:selectedHighlightedColor cornerRadius:3.0 scale:scale]; + [self setBackgroundImage:backgroundImage forState:UIControlStateSelected | UIControlStateHighlighted]; +#if TARGET_OS_TV + [self setBackgroundImage:backgroundImage forState:UIControlStateSelected | UIControlStateFocused]; +#endif + } + + [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + + [self setTitle:title forState:UIControlStateNormal]; +#if TARGET_OS_TV + [self setTitle:title forState:UIControlStateFocused]; +#endif + if (selectedTitle) { + [self setTitle:selectedTitle forState:UIControlStateSelected]; + [self setTitle:selectedTitle forState:UIControlStateSelected | UIControlStateHighlighted]; +#if TARGET_OS_TV + [self setTitle:selectedTitle forState:UIControlStateSelected | UIControlStateFocused]; +#endif + } + + UILabel *titleLabel = self.titleLabel; + titleLabel.lineBreakMode = NSLineBreakByClipping; + UIFont *font = [self defaultFont]; + titleLabel.font = font; + + CGSize imageSize = CGSizeMake(font.pointSize, font.pointSize); + UIImage *image = [icon imageWithSize:imageSize]; + image = [image resizableImageWithCapInsets:UIEdgeInsetsZero resizingMode:UIImageResizingModeStretch]; + [self setImage:image forState:UIControlStateNormal]; +#if TARGET_OS_TV + [self setImage:image forState:UIControlStateFocused]; +#endif + + if (selectedIcon) { + UIImage *selectedImage = [selectedIcon imageWithSize:imageSize]; + selectedImage = [selectedImage resizableImageWithCapInsets:UIEdgeInsetsZero + resizingMode:UIImageResizingModeStretch]; + [self setImage:selectedImage forState:UIControlStateSelected]; + [self setImage:selectedImage forState:UIControlStateSelected | UIControlStateHighlighted]; +#if TARGET_OS_TV + [self setImage:selectedImage forState:UIControlStateSelected | UIControlStateFocused]; +#endif + } + + if (forceSizeToFit) { + [self sizeToFit]; + } + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(_applicationDidBecomeActiveNotification:) + name:FBSDKApplicationDidBecomeActiveNotification + object:[FBSDKApplicationDelegate sharedInstance]]; +} + +- (CGFloat)_fontSizeForHeight:(CGFloat)height +{ + return floorf(height * HEIGHT_TO_FONT_SIZE); +} + +- (CGFloat)_heightForContentRect:(CGRect)contentRect +{ + UIEdgeInsets contentEdgeInsets = self.contentEdgeInsets; + return contentEdgeInsets.top + CGRectGetHeight(contentRect) + contentEdgeInsets.bottom; +} + +- (CGFloat)_heightForFont:(UIFont *)font +{ + return floorf(font.pointSize / (1 - 2 * HEIGHT_TO_MARGIN)); +} + +- (CGFloat)_marginForHeight:(CGFloat)height +{ + return floorf(height * HEIGHT_TO_MARGIN); +} + +- (CGFloat)_paddingForHeight:(CGFloat)height +{ + return roundf(height * HEIGHT_TO_PADDING) - [self _textPaddingCorrectionForHeight:height]; +} + +- (CGFloat)_textPaddingCorrectionForHeight:(CGFloat)height +{ + return floorf(height * HEIGHT_TO_TEXT_PADDING_CORRECTION); +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.h new file mode 100644 index 0000000..55003d0 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.h @@ -0,0 +1,361 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +/** + The error domain for all errors from FBSDKCoreKit. + + Error codes from the SDK in the range 0-99 are reserved for this domain. + */ +FOUNDATION_EXPORT NSErrorDomain const FBSDKErrorDomain; + +#else + +/** + The error domain for all errors from FBSDKCoreKit. + + Error codes from the SDK in the range 0-99 are reserved for this domain. + */ +FOUNDATION_EXPORT NSString *const FBSDKErrorDomain; + +#endif + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0 + +/* + @methodgroup error userInfo keys + */ + +/** + The userInfo key for the invalid collection for errors with FBSDKErrorInvalidArgument. + + If the invalid argument is a collection, the collection can be found with this key and the individual + invalid item can be found with FBSDKErrorArgumentValueKey. + */ +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKErrorArgumentCollectionKey; + +/** + The userInfo key for the invalid argument name for errors with FBSDKErrorInvalidArgument. + */ +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKErrorArgumentNameKey; + +/** + The userInfo key for the invalid argument value for errors with FBSDKErrorInvalidArgument. + */ +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKErrorArgumentValueKey; + +/** + The userInfo key for the message for developers in NSErrors that originate from the SDK. + + The developer message will not be localized and is not intended to be presented within the app. + */ +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKErrorDeveloperMessageKey; + +/** + The userInfo key describing a localized description that can be presented to the user. + */ +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKErrorLocalizedDescriptionKey; + +/** + The userInfo key describing a localized title that can be presented to the user, used with `FBSDKLocalizedErrorDescriptionKey`. + */ +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKErrorLocalizedTitleKey; + +/* + @methodgroup FBSDKGraphRequest error userInfo keys + */ + +/** + The userInfo key describing the error category, for error recovery purposes. + + See `FBSDKGraphErrorRecoveryProcessor` and `[FBSDKGraphRequest disableErrorRecovery]`. + */ +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKGraphRequestErrorKey; + +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKGraphRequestErrorCategoryKey +DEPRECATED_MSG_ATTRIBUTE("use FBSDKGraphRequestErrorKey instead"); + +/* + The userInfo key for the Graph API error code. + */ +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKGraphRequestErrorGraphErrorCodeKey; + +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKGraphRequestErrorGraphErrorCode +DEPRECATED_MSG_ATTRIBUTE("use FBSDKGraphRequestErrorGraphErrorCodeKey instead"); + +/* + The userInfo key for the Graph API error subcode. + */ +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKGraphRequestErrorGraphErrorSubcodeKey; + +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKGraphRequestErrorGraphErrorSubcode +DEPRECATED_MSG_ATTRIBUTE("use FBSDKGraphRequestErrorGraphErrorSubcodeKey instead"); + +/* + The userInfo key for the HTTP status code. + */ +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKGraphRequestErrorHTTPStatusCodeKey; + +/* + The userInfo key for the raw JSON response. + */ +FOUNDATION_EXPORT NSErrorUserInfoKey const FBSDKGraphRequestErrorParsedJSONResponseKey; + +#else + +/* + @methodgroup error userInfo keys + */ + +/** + The userInfo key for the invalid collection for errors with FBSDKErrorInvalidArgument. + + If the invalid argument is a collection, the collection can be found with this key and the individual + invalid item can be found with FBSDKErrorArgumentValueKey. + */ +FOUNDATION_EXPORT NSString *const FBSDKErrorArgumentCollectionKey; + +/** + The userInfo key for the invalid argument name for errors with FBSDKErrorInvalidArgument. + */ +FOUNDATION_EXPORT NSString *const FBSDKErrorArgumentNameKey; + +/** + The userInfo key for the invalid argument value for errors with FBSDKErrorInvalidArgument. + */ +FOUNDATION_EXPORT NSString *const FBSDKErrorArgumentValueKey; + +/** + The userInfo key for the message for developers in NSErrors that originate from the SDK. + + The developer message will not be localized and is not intended to be presented within the app. + */ +FOUNDATION_EXPORT NSString *const FBSDKErrorDeveloperMessageKey; + +/** + The userInfo key describing a localized description that can be presented to the user. + */ +FOUNDATION_EXPORT NSString *const FBSDKErrorLocalizedDescriptionKey; + +/** + The userInfo key describing a localized title that can be presented to the user, used with `FBSDKLocalizedErrorDescriptionKey`. + */ +FOUNDATION_EXPORT NSString *const FBSDKErrorLocalizedTitleKey; + +/* + @methodgroup FBSDKGraphRequest error userInfo keys + */ + +/** + The userInfo key describing the error category, for error recovery purposes. + + See `FBSDKGraphErrorRecoveryProcessor` and `[FBSDKGraphRequest disableErrorRecovery]`. + */ +FOUNDATION_EXPORT NSString *const FBSDKGraphRequestErrorKey; + +FOUNDATION_EXPORT NSString *const FBSDKGraphRequestErrorCategoryKey +DEPRECATED_MSG_ATTRIBUTE("use FBSDKGraphRequestErrorKey instead"); + +/* + The userInfo key for the Graph API error code. + */ +FOUNDATION_EXPORT NSString *const FBSDKGraphRequestErrorGraphErrorCodeKey; + +FOUNDATION_EXPORT NSString *const FBSDKGraphRequestErrorGraphErrorCode +DEPRECATED_MSG_ATTRIBUTE("use FBSDKGraphRequestErrorGraphErrorCodeKey instead"); + +/* + The userInfo key for the Graph API error subcode. + */ +FOUNDATION_EXPORT NSString *const FBSDKGraphRequestErrorGraphErrorSubcodeKey; + +FOUNDATION_EXPORT NSString *const FBSDKGraphRequestErrorGraphErrorSubcode +DEPRECATED_MSG_ATTRIBUTE("use FBSDKGraphRequestErrorGraphErrorSubcodeKey instead"); + +/* + The userInfo key for the HTTP status code. + */ +FOUNDATION_EXPORT NSString *const FBSDKGraphRequestErrorHTTPStatusCodeKey; + +/* + The userInfo key for the raw JSON response. + */ +FOUNDATION_EXPORT NSString *const FBSDKGraphRequestErrorParsedJSONResponseKey; + +#endif + +#ifndef NS_ERROR_ENUM +#define NS_ERROR_ENUM(_domain, _name) \ +enum _name: NSInteger _name; \ +enum __attribute__((ns_error_domain(_domain))) _name: NSInteger +#endif + +/** + FBSDKError + Error codes for FBSDKErrorDomain. + */ +typedef NS_ERROR_ENUM(FBSDKErrorDomain, FBSDKError) +{ + /** + Reserved. + */ + FBSDKErrorReserved = 0, + + /** + The error code for errors from invalid encryption on incoming encryption URLs. + */ + FBSDKErrorEncryption, + + /** + The error code for errors from invalid arguments to SDK methods. + */ + FBSDKErrorInvalidArgument, + + /** + The error code for unknown errors. + */ + FBSDKErrorUnknown, + + /** + A request failed due to a network error. Use NSUnderlyingErrorKey to retrieve + the error object from the NSURLSession for more information. + */ + FBSDKErrorNetwork, + + /** + The error code for errors encountered during an App Events flush. + */ + FBSDKErrorAppEventsFlush, + + /** + An endpoint that returns a binary response was used with FBSDKGraphRequestConnection. + + Endpoints that return image/jpg, etc. should be accessed using NSURLRequest + */ + FBSDKErrorGraphRequestNonTextMimeTypeReturned, + + /** + The operation failed because the server returned an unexpected response. + + You can get this error if you are not using the most recent SDK, or you are accessing a version of the + Graph API incompatible with the current SDK. + */ + FBSDKErrorGraphRequestProtocolMismatch, + + /** + The Graph API returned an error. + + See below for useful userInfo keys (beginning with FBSDKGraphRequestError*) + */ + FBSDKErrorGraphRequestGraphAPI, + + /** + The specified dialog configuration is not available. + + This error may signify that the configuration for the dialogs has not yet been downloaded from the server + or that the dialog is unavailable. Subsequent attempts to use the dialog may succeed as the configuration is loaded. + */ + FBSDKErrorDialogUnavailable, + + /** + Indicates an operation failed because a required access token was not found. + */ + FBSDKErrorAccessTokenRequired, + + /** + Indicates an app switch (typically for a dialog) failed because the destination app is out of date. + */ + FBSDKErrorAppVersionUnsupported, + + /** + Indicates an app switch to the browser (typically for a dialog) failed. + */ + FBSDKErrorBrowserUnavailable, +}; + +/** + FBSDKGraphRequestError + Describes the category of Facebook error. See `FBSDKGraphRequestErrorKey`. + */ +typedef NS_ENUM(NSUInteger, FBSDKGraphRequestError) +{ + /** The default error category that is not known to be recoverable. Check `FBSDKLocalizedErrorDescriptionKey` for a user facing message. */ + FBSDKGraphRequestErrorOther = 0, + /** Indicates the error is temporary (such as server throttling). While a recoveryAttempter will be provided with the error instance, the attempt is guaranteed to succeed so you can simply retry the operation if you do not want to present an alert. */ + FBSDKGraphRequestErrorTransient = 1, + /** Indicates the error can be recovered (such as requiring a login). A recoveryAttempter will be provided with the error instance that can take UI action. */ + FBSDKGraphRequestErrorRecoverable = 2 +}; + +/** + a formal protocol very similar to the informal protocol NSErrorRecoveryAttempting + */ +@protocol FBSDKErrorRecoveryAttempting + +/** + attempt the recovery + @param error the error + @param recoveryOptionIndex the selected option index + @param delegate the delegate + @param didRecoverSelector the callback selector, see discussion. + @param contextInfo context info to pass back to callback selector, see discussion. + + + Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: + + - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; + + The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. + */ +- (void)attemptRecoveryFromError:(NSError *)error optionIndex:(NSUInteger)recoveryOptionIndex delegate:(id)delegate didRecoverSelector:(SEL)didRecoverSelector contextInfo:(void *)contextInfo; + +@end + +/** + Deprecated + */ +typedef NS_ENUM(NSInteger, FBSDKErrorCode) +{ + FBSDKReservedErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorReserved instead") = 0, + FBSDKEncryptionErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorEncryption instead"), + FBSDKInvalidArgumentErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorInvalidArgument instead"), + FBSDKUnknownErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorUnknown instead"), + FBSDKNetworkErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorNetwork instead"), + FBSDKAppEventsFlushErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorAppEventsFlush instead"), + FBSDKGraphRequestNonTextMimeTypeReturnedErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorGraphRequestNonTextMimeTypeReturned instead"), + FBSDKGraphRequestProtocolMismatchErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorGraphRequestProtocolMismatch instead"), + FBSDKGraphRequestGraphAPIErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorGraphRequestGraphAPI instead"), + FBSDKDialogUnavailableErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorDialogUnavailable instead"), + FBSDKAccessTokenRequiredErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorAccessTokenRequired instead"), + FBSDKAppVersionUnsupportedErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorAppVersionUnsupported instead"), + FBSDKBrowserUnavailableErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorBrowserUnavailable instead"), + FBSDKBrowswerUnavailableErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKErrorBrowserUnavailable instead") = FBSDKBrowserUnavailableErrorCode, +} DEPRECATED_MSG_ATTRIBUTE("use FBSDKError instead"); + +/** + Deprecated + */ +typedef NS_ENUM(NSUInteger, FBSDKGraphRequestErrorCategory) +{ + FBSDKGraphRequestErrorCategoryOther DEPRECATED_MSG_ATTRIBUTE("use FBSDKGraphRequestErrorOther instead") = 0, + FBSDKGraphRequestErrorCategoryTransient DEPRECATED_MSG_ATTRIBUTE("use FBSDKGraphRequestErrorTransient instead") = 1, + FBSDKGraphRequestErrorCategoryRecoverable DEPRECATED_MSG_ATTRIBUTE("use FBSDKGraphRequestErrorRecoverable instead") = 2 +} DEPRECATED_MSG_ATTRIBUTE("use FBSDKGraphRequestError instead"); diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.m new file mode 100644 index 0000000..24f9d57 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.m @@ -0,0 +1,68 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKConstants.h" + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +NSErrorDomain const FBSDKErrorDomain = @"com.facebook.sdk.core"; + +#else + +NSString *const FBSDKErrorDomain = @"com.facebook.sdk.core"; + +#endif + + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +NSErrorUserInfoKey const FBSDKErrorArgumentCollectionKey = @"com.facebook.sdk:FBSDKErrorArgumentCollectionKey"; +NSErrorUserInfoKey const FBSDKErrorArgumentNameKey = @"com.facebook.sdk:FBSDKErrorArgumentNameKey"; +NSErrorUserInfoKey const FBSDKErrorArgumentValueKey = @"com.facebook.sdk:FBSDKErrorArgumentValueKey"; +NSErrorUserInfoKey const FBSDKErrorDeveloperMessageKey = @"com.facebook.sdk:FBSDKErrorDeveloperMessageKey"; +NSErrorUserInfoKey const FBSDKErrorLocalizedDescriptionKey = @"com.facebook.sdk:FBSDKErrorLocalizedDescriptionKey"; +NSErrorUserInfoKey const FBSDKErrorLocalizedTitleKey = @"com.facebook.sdk:FBSDKErrorLocalizedErrorTitleKey"; + +NSErrorUserInfoKey const FBSDKGraphRequestErrorKey = @"com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey"; +NSErrorUserInfoKey const FBSDKGraphRequestErrorCategoryKey = @"com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey"; +NSErrorUserInfoKey const FBSDKGraphRequestErrorGraphErrorCodeKey = @"com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode"; +NSErrorUserInfoKey const FBSDKGraphRequestErrorGraphErrorCode = @"com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode"; +NSErrorUserInfoKey const FBSDKGraphRequestErrorGraphErrorSubcodeKey = @"com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorSubcode"; +NSErrorUserInfoKey const FBSDKGraphRequestErrorGraphErrorSubcode = @"com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorSubcode"; +NSErrorUserInfoKey const FBSDKGraphRequestErrorHTTPStatusCodeKey = @"com.facebook.sdk:FBSDKGraphRequestErrorHTTPStatusCodeKey"; +NSErrorUserInfoKey const FBSDKGraphRequestErrorParsedJSONResponseKey = @"com.facebook.sdk:FBSDKGraphRequestErrorParsedJSONResponseKey"; + +#else + +NSString *const FBSDKErrorArgumentCollectionKey = @"com.facebook.sdk:FBSDKErrorArgumentCollectionKey"; +NSString *const FBSDKErrorArgumentNameKey = @"com.facebook.sdk:FBSDKErrorArgumentNameKey"; +NSString *const FBSDKErrorArgumentValueKey = @"com.facebook.sdk:FBSDKErrorArgumentValueKey"; +NSString *const FBSDKErrorDeveloperMessageKey = @"com.facebook.sdk:FBSDKErrorDeveloperMessageKey"; +NSString *const FBSDKErrorLocalizedDescriptionKey = @"com.facebook.sdk:FBSDKErrorLocalizedDescriptionKey"; +NSString *const FBSDKErrorLocalizedTitleKey = @"com.facebook.sdk:FBSDKErrorLocalizedErrorTitleKey"; + +NSString *const FBSDKGraphRequestErrorKey = @"com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey"; +NSString *const FBSDKGraphRequestErrorCategoryKey = @"com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey"; +NSString *const FBSDKGraphRequestErrorGraphErrorCodeKey = @"com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode"; +NSString *const FBSDKGraphRequestErrorGraphErrorCode = @"com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode"; +NSString *const FBSDKGraphRequestErrorGraphErrorSubcodeKey = @"com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorSubcode"; +NSString *const FBSDKGraphRequestErrorGraphErrorSubcode = @"com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorSubcode"; +NSString *const FBSDKGraphRequestErrorHTTPStatusCodeKey = @"com.facebook.sdk:FBSDKGraphRequestErrorHTTPStatusCodeKey"; +NSString *const FBSDKGraphRequestErrorParsedJSONResponseKey = @"com.facebook.sdk:FBSDKGraphRequestErrorParsedJSONResponseKey"; + +#endif diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCopying.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCopying.h new file mode 100644 index 0000000..039302b --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCopying.h @@ -0,0 +1,34 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +/** + Extension protocol for NSCopying that adds the copy method, which is implemented on NSObject. + + NSObject implicitly conforms to this protocol. + */ +@protocol FBSDKCopying + +/** + Implemented by NSObject as a convenience to copyWithZone:. + @return A copy of the receiver. + */ +- (id)copy; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit.h new file mode 100644 index 0000000..78c5836 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit.h @@ -0,0 +1,57 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#if !TARGET_OS_TV +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#else +#import +#import +#endif + +#define FBSDK_VERSION_STRING @"4.40.0" +#define FBSDK_TARGET_PLATFORM_VERSION @"v3.2" diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.h new file mode 100644 index 0000000..820be4b --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.h @@ -0,0 +1,99 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKConstants.h" + +@class FBSDKGraphErrorRecoveryProcessor; +@class FBSDKGraphRequest; + +/** + Defines a delegate for `FBSDKGraphErrorRecoveryProcessor`. + */ +@protocol FBSDKGraphErrorRecoveryProcessorDelegate + +/** + Indicates the error recovery has been attempted. + @param processor the processor instance. + @param didRecover YES if the recovery was successful. + @param error the error that that was attempted to be recovered from. + */ +- (void)processorDidAttemptRecovery:(FBSDKGraphErrorRecoveryProcessor *)processor didRecover:(BOOL)didRecover error:(NSError *)error; + +@optional +/** + Indicates the processor is about to process the error. + @param processor the processor instance. + @param error the error is about to be processed. + + return NO if the processor should not process the error. For example, + if you want to prevent alerts of localized messages but otherwise perform retries and recoveries, + you could return NO for errors where userInfo[FBSDKGraphRequestErrorKey] equal to FBSDKGraphRequestErrorOther + */ +- (BOOL)processorWillProcessError:(FBSDKGraphErrorRecoveryProcessor *)processor error:(NSError *)error; + +@end + +/** + Defines a type that can process Facebook NSErrors with best practices. + + Facebook NSErrors can contain FBSDKErrorRecoveryAttempting instances to recover from errors, or + localized messages to present to the user. This class will process the instances as follows: + + 1. If the error is temporary as indicated by FBSDKGraphRequestErrorKey, assume the recovery succeeded and + notify the delegate. + 2. If a FBSDKErrorRecoveryAttempting instance is available, display an alert (dispatched to main thread) + with the recovery options and call the instance's [ attemptRecoveryFromError:optionIndex:...]. + 3. If a FBSDKErrorRecoveryAttempting is not available, check the userInfo for FBSDKLocalizedErrorDescriptionKey + and present that in an alert (dispatched to main thread). + + By default, FBSDKGraphRequests use this type to process errors and retry the request upon a successful + recovery. + + Note that Facebook recovery attempters can present UI or even cause app switches (such as to login). Any such + work is dispatched to the main thread (therefore your request handlers may then run on the main thread). + + Login recovery requires FBSDKLoginKit. Login will use FBSDKLoginBehaviorNative and will prompt the user + for all permissions last granted. If any are declined on the new request, the recovery is not successful but + the `[FBSDKAccessToken currentAccessToken]` might still have been updated. + . + */ +@interface FBSDKGraphErrorRecoveryProcessor : NSObject + +/** + Gets the delegate. Note this is a strong reference, and is nil'ed out after recovery is complete. + */ +@property (nonatomic, strong, readonly) iddelegate; + +/** + Attempts to process the error, return YES if the error can be processed. + @param error the error to process. + @param request the related request that may be reissued. + @param delegate the delegate that will be retained until recovery is complete. + */ +- (BOOL)processError:(NSError *)error request:(FBSDKGraphRequest *)request delegate:(id) delegate; + +/** + The callback for FBSDKErrorRecoveryAttempting + @param didRecover if the recovery succeeded + @param contextInfo unused + */ +- (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.m new file mode 100644 index 0000000..bd21cec --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.m @@ -0,0 +1,172 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. +#import "FBSDKGraphErrorRecoveryProcessor.h" + +#import "FBSDKCoreKit+Internal.h" +#import "FBSDKErrorRecoveryAttempter.h" + +@interface FBSDKGraphErrorRecoveryProcessor() +{ + FBSDKErrorRecoveryAttempter *_recoveryAttempter; + NSError *_error; +} + +@property (nonatomic, strong) iddelegate; + +@end + +@implementation FBSDKGraphErrorRecoveryProcessor + +- (void)dealloc +{ + +} + +- (BOOL)processError:(NSError *)error request:(FBSDKGraphRequest *)request delegate:(id) delegate +{ + self.delegate = delegate; + if ([self.delegate respondsToSelector:@selector(processorWillProcessError:error:)]) { + if (![self.delegate processorWillProcessError:self error:error]) { + return NO; + } + } + + FBSDKGraphRequestError errorCategory = [error.userInfo[FBSDKGraphRequestErrorKey] unsignedIntegerValue]; + switch (errorCategory) { + case FBSDKGraphRequestErrorTransient : + [self.delegate processorDidAttemptRecovery:self didRecover:YES error:nil]; + self.delegate = nil; + return YES; + case FBSDKGraphRequestErrorRecoverable : + if ([request.tokenString isEqualToString:[FBSDKAccessToken currentAccessToken].tokenString]) { + _recoveryAttempter = error.recoveryAttempter; + BOOL isLoginRecoveryAttempter = [_recoveryAttempter isKindOfClass:NSClassFromString(@"_FBSDKLoginRecoveryAttempter")]; + + // Set up a block to do the typical recovery work so that we can chain it for ios auth special cases. + // the block returns YES if recovery UI is started (meaning we wait for the alertviewdelegate to resume control flow). + BOOL (^standardRecoveryWork)(void) = ^BOOL{ + NSArray *recoveryOptionsTitles = error.userInfo[NSLocalizedRecoveryOptionsErrorKey]; + if (recoveryOptionsTitles.count > 0 && self->_recoveryAttempter) { + NSString *recoverySuggestion = error.userInfo[NSLocalizedRecoverySuggestionErrorKey]; + self->_error = error; + dispatch_async(dispatch_get_main_queue(), ^{ + [self displayAlertWithRecoverySuggestion:recoverySuggestion recoveryOptionsTitles:recoveryOptionsTitles]; + }); + return YES; + } + return NO; + }; + + if ([request.tokenString isEqualToString:[FBSDKSystemAccountStoreAdapter sharedInstance].accessTokenString] && + isLoginRecoveryAttempter) { + // special system auth case: if user has granted permissions we can simply renew. On a successful + // renew, treat this as immediately recovered without the standard alert prompty. + // (for example, this can repair expired tokens seamlessly) + [[FBSDKSystemAccountStoreAdapter sharedInstance] + renewSystemAuthorization:^(ACAccountCredentialRenewResult result, NSError *renewError) { + dispatch_async(dispatch_get_main_queue(), ^{ + if (result == ACAccountCredentialRenewResultRenewed) { + [self.delegate processorDidAttemptRecovery:self didRecover:YES error:nil]; + self.delegate = nil; + } else if (!standardRecoveryWork()) { + [self.delegate processorDidAttemptRecovery:self didRecover:NO error:self->_error]; + }; + }); + }]; + // short-circuit YES so that the renew callback resumes the control flow. + return YES; + } + + return standardRecoveryWork(); + } + return NO; + case FBSDKGraphRequestErrorOther : + if ([request.tokenString isEqualToString:[FBSDKAccessToken currentAccessToken].tokenString]) { + NSString *message = error.userInfo[FBSDKErrorLocalizedDescriptionKey]; + NSString *title = error.userInfo[FBSDKErrorLocalizedTitleKey]; + if (message) { + dispatch_async(dispatch_get_main_queue(), ^{ + NSString *localizedOK = + NSLocalizedStringWithDefaultValue(@"ErrorRecovery.Alert.OK", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"OK", + @"The title of the label to dismiss the alert when presenting user facing error messages"); + [self displayAlertWithTitle:title message:message cancelButtonTitle:localizedOK]; + }); + } + } + return NO; + } + return NO; +} + +#pragma mark - UIAlertController support + +- (void)displayAlertWithRecoverySuggestion:(NSString *)recoverySuggestion recoveryOptionsTitles:(NSArray *)recoveryOptionsTitles +{ + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil + message:recoverySuggestion + preferredStyle:UIAlertControllerStyleAlert]; + for (NSUInteger i = 0; i < recoveryOptionsTitles.count; i++) { + NSString *title = recoveryOptionsTitles[i]; + UIAlertAction *option = [UIAlertAction actionWithTitle:title + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * _Nonnull action) { + [self->_recoveryAttempter attemptRecoveryFromError:self->_error + optionIndex:i + delegate:self + didRecoverSelector:@selector(didPresentErrorWithRecovery:contextInfo:) + contextInfo:nil]; + }]; + [alertController addAction:option]; + } + UIViewController *topMostViewController = [FBSDKInternalUtility topMostViewController]; + [topMostViewController presentViewController:alertController + animated:YES + completion:nil]; +} + +- (void)displayAlertWithTitle:(NSString *)title message:(NSString *)message cancelButtonTitle:(NSString *)localizedOK +{ + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil + message:message + preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction *OKAction = [UIAlertAction actionWithTitle:localizedOK + style:UIAlertActionStyleCancel + handler:^(UIAlertAction * _Nonnull action) { + [self->_recoveryAttempter attemptRecoveryFromError:self->_error + optionIndex:0 + delegate:self + didRecoverSelector:@selector(didPresentErrorWithRecovery:contextInfo:) + contextInfo:nil]; + }]; + [alertController addAction:OKAction]; + UIViewController *topMostViewController = [FBSDKInternalUtility topMostViewController]; + [topMostViewController presentViewController:alertController + animated:YES + completion:nil]; +} + +#pragma mark - FBSDKErrorRecoveryAttempting "delegate" + +- (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo +{ + [self.delegate processorDidAttemptRecovery:self didRecover:didRecover error:_error]; + self.delegate = nil; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.h new file mode 100644 index 0000000..bcb5149 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.h @@ -0,0 +1,126 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +@class FBSDKAccessToken; + +/** + Represents a request to the Facebook Graph API. + + + `FBSDKGraphRequest` encapsulates the components of a request (the + Graph API path, the parameters, error recovery behavior) and should be + used in conjunction with `FBSDKGraphRequestConnection` to issue the request. + + Nearly all Graph APIs require an access token. Unless specified, the + `[FBSDKAccessToken currentAccessToken]` is used. Therefore, most requests + will require login first (see `FBSDKLoginManager` in FBSDKLoginKit.framework). + + A `- start` method is provided for convenience for single requests. + + By default, FBSDKGraphRequest will attempt to recover any errors returned from + Facebook. You can disable this via `disableErrorRecovery:`. + + @see FBSDKGraphErrorRecoveryProcessor + */ +@interface FBSDKGraphRequest : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + Initializes a new instance that use use `[FBSDKAccessToken currentAccessToken]`. + @param graphPath the graph path (e.g., @"me"). + @param parameters the optional parameters dictionary. + */ +- (instancetype)initWithGraphPath:(NSString *)graphPath + parameters:(NSDictionary *)parameters; + +/** + Initializes a new instance that use use `[FBSDKAccessToken currentAccessToken]`. + @param graphPath the graph path (e.g., @"me"). + @param parameters the optional parameters dictionary. + @param HTTPMethod the optional HTTP method. nil defaults to @"GET". + */ +- (instancetype)initWithGraphPath:(NSString *)graphPath + parameters:(NSDictionary *)parameters + HTTPMethod:(NSString *)HTTPMethod; + +/** + Initializes a new instance. + @param graphPath the graph path (e.g., @"me"). + @param parameters the optional parameters dictionary. + @param tokenString the token string to use. Specifying nil will cause no token to be used. + @param version the optional Graph API version (e.g., @"v2.0"). nil defaults to `[FBSDKSettings graphAPIVersion]`. + @param HTTPMethod the optional HTTP method (e.g., @"POST"). nil defaults to @"GET". + */ +- (instancetype)initWithGraphPath:(NSString *)graphPath + parameters:(NSDictionary *)parameters + tokenString:(NSString *)tokenString + version:(NSString *)version + HTTPMethod:(NSString *)HTTPMethod +NS_DESIGNATED_INITIALIZER; + +/** + The request parameters. + */ +@property (nonatomic, strong, readonly) NSMutableDictionary *parameters; + +/** + The access token string used by the request. + */ +@property (nonatomic, copy, readonly) NSString *tokenString; + +/** + The Graph API endpoint to use for the request, for example "me". + */ +@property (nonatomic, copy, readonly) NSString *graphPath; + +/** + The HTTPMethod to use for the request, for example "GET" or "POST". + */ +@property (nonatomic, copy, readonly) NSString *HTTPMethod; + +/** + The Graph API version to use (e.g., "v2.0") + */ +@property (nonatomic, copy, readonly) NSString *version; + +/** + If set, disables the automatic error recovery mechanism. + @param disable whether to disable the automatic error recovery mechanism + + By default, non-batched FBSDKGraphRequest instances will automatically try to recover + from errors by constructing a `FBSDKGraphErrorRecoveryProcessor` instance that + re-issues the request on successful recoveries. The re-issued request will call the same + handler as the receiver but may occur with a different `FBSDKGraphRequestConnection` instance. + + This will override [FBSDKSettings setGraphErrorRecoveryDisabled:]. + */ +- (void)setGraphErrorRecoveryDisabled:(BOOL)disable; + +/** + Starts a connection to the Graph API. + @param handler The handler block to call when the request completes. + */ +- (FBSDKGraphRequestConnection *)startWithCompletionHandler:(FBSDKGraphRequestHandler)handler; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.m new file mode 100644 index 0000000..93ad56f --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.m @@ -0,0 +1,212 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKGraphRequest+Internal.h" + +#import + +#import "FBSDKAccessToken.h" +#import "FBSDKCoreKit.h" +#import "FBSDKGraphRequestConnection.h" +#import "FBSDKGraphRequestDataAttachment.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKSettings+Internal.h" + +// constants +static NSString *const kGetHTTPMethod = @"GET"; +static NSString *const kPostHTTPMethod = @"POST"; + +@interface FBSDKGraphRequest() +@property (nonatomic, assign) FBSDKGraphRequestFlags flags; +@end + +@implementation FBSDKGraphRequest + +- (instancetype)initWithGraphPath:(NSString *)graphPath + parameters:(NSDictionary *)parameters { + return [self initWithGraphPath:graphPath + parameters:parameters + flags:FBSDKGraphRequestFlagNone]; +} + +- (instancetype)initWithGraphPath:(NSString *)graphPath + parameters:(NSDictionary *)parameters + HTTPMethod:(NSString *)HTTPMethod { + return [self initWithGraphPath:graphPath + parameters:parameters + tokenString:[FBSDKAccessToken currentAccessToken].tokenString + version:nil + HTTPMethod:HTTPMethod]; +} + +- (instancetype)initWithGraphPath:(NSString *)graphPath + parameters:(NSDictionary *)parameters + flags:(FBSDKGraphRequestFlags)flags { + return [self initWithGraphPath:graphPath + parameters:parameters + tokenString:[FBSDKAccessToken currentAccessToken].tokenString + HTTPMethod:nil + flags:flags]; +} + +- (instancetype)initWithGraphPath:(NSString *)graphPath + parameters:(NSDictionary *)parameters + tokenString:(NSString *)tokenString + HTTPMethod:(NSString *)HTTPMethod + flags:(FBSDKGraphRequestFlags)flags { + if ((self = [self initWithGraphPath:graphPath + parameters:parameters + tokenString:tokenString + version:[FBSDKSettings graphAPIVersion] + HTTPMethod:HTTPMethod])) { + self.flags |= flags; + } + return self; +} + +- (instancetype)initWithGraphPath:(NSString *)graphPath + parameters:(NSDictionary *)parameters + tokenString:(NSString *)tokenString + version:(NSString *)version + HTTPMethod:(NSString *)HTTPMethod { + if ((self = [super init])) { + _tokenString = [tokenString copy]; + _version = version ? [version copy] : [FBSDKSettings graphAPIVersion]; + _graphPath = [graphPath copy]; + _HTTPMethod = HTTPMethod ? [HTTPMethod copy] : kGetHTTPMethod; + _parameters = [[NSMutableDictionary alloc] initWithDictionary:parameters]; + if ([FBSDKSettings isGraphErrorRecoveryDisabled]) { + _flags = FBSDKGraphRequestFlagDisableErrorRecovery; + } + } + return self; +} + +- (BOOL)isGraphErrorRecoveryDisabled +{ + return (self.flags & FBSDKGraphRequestFlagDisableErrorRecovery); +} + +- (void)setGraphErrorRecoveryDisabled:(BOOL)disable +{ + if (disable) { + self.flags |= FBSDKGraphRequestFlagDisableErrorRecovery; + } else { + self.flags &= ~FBSDKGraphRequestFlagDisableErrorRecovery; + } +} + +- (BOOL)hasAttachments +{ + __block BOOL hasAttachments = NO; + [self.parameters enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { + if ([FBSDKGraphRequest isAttachment:obj]) { + hasAttachments = YES; + *stop = YES; + } + }]; + return hasAttachments; +} + ++ (BOOL)isAttachment:(id)item +{ + return ([item isKindOfClass:[UIImage class]] || + [item isKindOfClass:[NSData class]] || + [item isKindOfClass:[FBSDKGraphRequestDataAttachment class]]); +} + + ++ (NSString *)serializeURL:(NSString *)baseUrl + params:(NSDictionary *)params { + return [self serializeURL:baseUrl params:params httpMethod:kGetHTTPMethod]; +} + ++ (NSString *)serializeURL:(NSString *)baseUrl + params:(NSDictionary *)params + httpMethod:(NSString *)httpMethod { + return [self serializeURL:baseUrl params:params httpMethod:httpMethod forBatch:NO]; +} + ++ (NSString *)serializeURL:(NSString *)baseUrl + params:(NSDictionary *)params + httpMethod:(NSString *)httpMethod + forBatch:(BOOL)forBatch { + params = [self preprocessParams: params]; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + NSURL *parsedURL = [NSURL URLWithString:[baseUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; +#pragma clang pop + + if ([httpMethod isEqualToString:kPostHTTPMethod] && !forBatch) { + return baseUrl; + } + + NSString *queryPrefix = parsedURL.query ? @"&" : @"?"; + + NSString *query = [FBSDKInternalUtility queryStringWithDictionary:params error:NULL invalidObjectHandler:^id(id object, BOOL *stop) { + if ([self isAttachment:object]) { + if ([httpMethod isEqualToString:kGetHTTPMethod]) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors logEntry:@"can not use GET to upload a file"]; + } + return nil; + } + return object; + }]; + return [NSString stringWithFormat:@"%@%@%@", baseUrl, queryPrefix, query]; +} + ++ (NSDictionary *)preprocessParams:(NSDictionary *)params +{ + NSString *debugValue = [FBSDKSettings graphAPIDebugParamValue]; + if (debugValue) { + NSMutableDictionary *mutableParams = [NSMutableDictionary dictionaryWithDictionary:params]; + mutableParams[@"debug"] = debugValue; + return mutableParams; + } + + return params; +} + +- (FBSDKGraphRequestConnection *)startWithCompletionHandler:(FBSDKGraphRequestHandler)handler +{ + FBSDKGraphRequestConnection *connection = [[FBSDKGraphRequestConnection alloc] init]; + [connection addRequest:self completionHandler:handler]; + [connection start]; + return connection; +} + +#pragma mark - Debugging helpers + +- (NSString *)description +{ + NSMutableString *result = [NSMutableString stringWithFormat:@"<%@: %p", + NSStringFromClass([self class]), + self]; + if (self.graphPath) { + [result appendFormat:@", graphPath: %@", self.graphPath]; + } + if (self.HTTPMethod) { + [result appendFormat:@", HTTPMethod: %@", self.HTTPMethod]; + } + [result appendFormat:@", parameters: %@>", self.parameters.description]; + return result; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.h new file mode 100644 index 0000000..af10a85 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.h @@ -0,0 +1,332 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@class FBSDKGraphRequest; +@class FBSDKGraphRequestConnection; + +/** + FBSDKGraphRequestHandler + + A block that is passed to addRequest to register for a callback with the results of that + request once the connection completes. + + + + Pass a block of this type when calling addRequest. This will be called once + the request completes. The call occurs on the UI thread. + + @param connection The `FBSDKGraphRequestConnection` that sent the request. + + @param result The result of the request. This is a translation of + JSON data to `NSDictionary` and `NSArray` objects. This + is nil if there was an error. + + @param error The `NSError` representing any error that occurred. + + */ +typedef void (^FBSDKGraphRequestHandler)(FBSDKGraphRequestConnection *connection, + id result, + NSError *error); + +/** + @protocol + + The `FBSDKGraphRequestConnectionDelegate` protocol defines the methods used to receive network + activity progress information from a . + */ +@protocol FBSDKGraphRequestConnectionDelegate + +@optional + +/** + @method + + Tells the delegate the request connection will begin loading + + + + If the is created using one of the convenience factory methods prefixed with + start, the object returned from the convenience method has already begun loading and this method + will not be called when the delegate is set. + + @param connection The request connection that is starting a network request + */ +- (void)requestConnectionWillBeginLoading:(FBSDKGraphRequestConnection *)connection; + +/** + @method + + Tells the delegate the request connection finished loading + + + + If the request connection completes without a network error occurring then this method is called. + Invocation of this method does not indicate success of every made, only that the + request connection has no further activity. Use the error argument passed to the FBSDKGraphRequestHandler + block to determine success or failure of each . + + This method is invoked after the completion handler for each . + + @param connection The request connection that successfully completed a network request + */ +- (void)requestConnectionDidFinishLoading:(FBSDKGraphRequestConnection *)connection; + +/** + @method + + Tells the delegate the request connection failed with an error + + + + If the request connection fails with a network error then this method is called. The `error` + argument specifies why the network connection failed. The `NSError` object passed to the + FBSDKGraphRequestHandler block may contain additional information. + + @param connection The request connection that successfully completed a network request + @param error The `NSError` representing the network error that occurred, if any. May be nil + in some circumstances. Consult the `NSError` for the for reliable + failure information. + */ +- (void)requestConnection:(FBSDKGraphRequestConnection *)connection + didFailWithError:(NSError *)error; + +/** + @method + + Tells the delegate how much data has been sent and is planned to send to the remote host + + + + The byte count arguments refer to the aggregated objects, not a particular . + + Like `NSURLSession`, the values may change in unexpected ways if data needs to be resent. + + @param connection The request connection transmitting data to a remote host + @param bytesWritten The number of bytes sent in the last transmission + @param totalBytesWritten The total number of bytes sent to the remote host + @param totalBytesExpectedToWrite The total number of bytes expected to send to the remote host + */ +- (void)requestConnection:(FBSDKGraphRequestConnection *)connection + didSendBodyData:(NSInteger)bytesWritten + totalBytesWritten:(NSInteger)totalBytesWritten +totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite; + +@end + +/** + + The `FBSDKGraphRequestConnection` represents a single connection to Facebook to service a request. + + + + The request settings are encapsulated in a reusable object. The + `FBSDKGraphRequestConnection` object encapsulates the concerns of a single communication + e.g. starting a connection, canceling a connection, or batching requests. + + */ +@interface FBSDKGraphRequestConnection : NSObject + +/** + The delegate object that receives updates. + */ +@property (nonatomic, weak) id delegate; + +/** + Gets or sets the timeout interval to wait for a response before giving up. + */ +@property (nonatomic, assign) NSTimeInterval timeout; + +/** + The raw response that was returned from the server. (readonly) + + + + This property can be used to inspect HTTP headers that were returned from + the server. + + The property is nil until the request completes. If there was a response + then this property will be non-nil during the FBSDKGraphRequestHandler callback. + */ +@property (nonatomic, retain, readonly) NSHTTPURLResponse *URLResponse; + +/** + @methodgroup Class methods + */ + +/** + @method + + This method sets the default timeout on all FBSDKGraphRequestConnection instances. Defaults to 60 seconds. + + @param defaultConnectionTimeout The timeout interval. + */ ++ (void)setDefaultConnectionTimeout:(NSTimeInterval)defaultConnectionTimeout; + +/** + @methodgroup Adding requests + */ + +/** + @method + + This method adds an object to this connection. + + @param request A request to be included in the round-trip when start is called. + @param handler A handler to call back when the round-trip completes or times out. + + + + The completion handler is retained until the block is called upon the + completion or cancellation of the connection. + */ +- (void)addRequest:(FBSDKGraphRequest *)request + completionHandler:(FBSDKGraphRequestHandler)handler; + +/** + @method + + This method adds an object to this connection. + + @param request A request to be included in the round-trip when start is called. + + @param handler A handler to call back when the round-trip completes or times out. + The handler will be invoked on the main thread. + + @param name An optional name for this request. This can be used to feed + the results of one request to the input of another in the same + `FBSDKGraphRequestConnection` as described in + [Graph API Batch Requests]( https://developers.facebook.com/docs/reference/api/batch/ ). + + + + The completion handler is retained until the block is called upon the + completion or cancellation of the connection. This request can be named + to allow for using the request's response in a subsequent request. + */ +- (void)addRequest:(FBSDKGraphRequest *)request + batchEntryName:(NSString *)name + completionHandler:(FBSDKGraphRequestHandler)handler; + +- (void)addRequest:(FBSDKGraphRequest *)request + completionHandler:(FBSDKGraphRequestHandler)handler + batchEntryName:(NSString *)name +DEPRECATED_MSG_ATTRIBUTE("Renamed `addRequest:batchEntryName:completionHandler:`"); + +/** + @method + + This method adds an object to this connection. + + @param request A request to be included in the round-trip when start is called. + + @param handler A handler to call back when the round-trip completes or times out. + + @param batchParameters The optional dictionary of parameters to include for this request + as described in [Graph API Batch Requests]( https://developers.facebook.com/docs/reference/api/batch/ ). + Examples include "depends_on", "name", or "omit_response_on_success". + + + + The completion handler is retained until the block is called upon the + completion or cancellation of the connection. This request can be named + to allow for using the request's response in a subsequent request. + */ +- (void)addRequest:(FBSDKGraphRequest *)request + batchParameters:(NSDictionary *)batchParameters + completionHandler:(FBSDKGraphRequestHandler)handler; + +- (void)addRequest:(FBSDKGraphRequest *)request + completionHandler:(FBSDKGraphRequestHandler)handler + batchParameters:(NSDictionary *)batchParameters +DEPRECATED_MSG_ATTRIBUTE("Renamed `addRequest:batchParameters:completionHandler:`"); + +/** + @methodgroup Instance methods + */ + +/** + @method + + Signals that a connection should be logically terminated as the + application is no longer interested in a response. + + + + Synchronously calls any handlers indicating the request was cancelled. Cancel + does not guarantee that the request-related processing will cease. It + does promise that all handlers will complete before the cancel returns. A call to + cancel prior to a start implies a cancellation of all requests associated + with the connection. + */ +- (void)cancel; + +/** + @method + + This method starts a connection with the server and is capable of handling all of the + requests that were added to the connection. + + + By default, a connection is scheduled on the current thread in the default mode when it is created. + See `setDelegateQueue:` for other options. + + This method cannot be called twice for an `FBSDKGraphRequestConnection` instance. + */ +- (void)start; + +/** + Determines the operation queue that is used to call methods on the connection's delegate. + @param queue The operation queue to use when calling delegate methods. + + By default, a connection is scheduled on the current thread in the default mode when it is created. + You cannot reschedule a connection after it has started. + */ +- (void)setDelegateQueue:(NSOperationQueue *)queue; + +/** + @method + + Overrides the default version for a batch request + + + + The SDK automatically prepends a version part, such as "v2.0" to API paths in order to simplify API versioning + for applications. If you want to override the version part while using batch requests on the connection, call + this method to set the version for the batch request. + + @param version This is a string in the form @"v2.0" which will be used for the version part of an API path + */ +- (void)overrideGraphAPIVersion:(NSString *)version; + +- (void)overrideVersionPartWith:(NSString *)version +DEPRECATED_MSG_ATTRIBUTE("Renamed `overrideGraphAPIVersion`"); + +@end + +/** + The key in the result dictionary for requests to old versions of the Graph API + whose response is not a JSON object. + + + When a request returns a non-JSON response (such as a "true" literal), that response + will be wrapped into a dictionary using this const as the key. This only applies for very few Graph API + prior to v2.1. + */ +FOUNDATION_EXPORT NSString *const FBSDKNonJSONResponseProperty; diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.m new file mode 100644 index 0000000..990be5f --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.m @@ -0,0 +1,1084 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKGraphRequestConnection+Internal.h" + +#import "FBSDKAppEvents+Internal.h" +#import "FBSDKConstants.h" +#import "FBSDKCoreKit+Internal.h" +#import "FBSDKError.h" +#import "FBSDKErrorConfiguration.h" +#import "FBSDKGraphRequest+Internal.h" +#import "FBSDKGraphRequestBody.h" +#import "FBSDKGraphRequestDataAttachment.h" +#import "FBSDKGraphRequestMetadata.h" +#import "FBSDKGraphRequestPiggybackManager.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKSettings+Internal.h" +#import "FBSDKURLSessionTask.h" + +NSString *const FBSDKNonJSONResponseProperty = @"FACEBOOK_NON_JSON_RESULT"; + +// URL construction constants +static NSString *const kGraphURLPrefix = @"graph."; +static NSString *const kGraphVideoURLPrefix = @"graph-video."; + +static NSString *const kBatchKey = @"batch"; +static NSString *const kBatchMethodKey = @"method"; +static NSString *const kBatchRelativeURLKey = @"relative_url"; +static NSString *const kBatchAttachmentKey = @"attached_files"; +static NSString *const kBatchFileNamePrefix = @"file"; +static NSString *const kBatchEntryName = @"name"; + +static NSString *const kAccessTokenKey = @"access_token"; +#if TARGET_OS_TV +static NSString *const kSDK = @"tvos"; +static NSString *const kUserAgentBase = @"FBtvOSSDK"; +#else +static NSString *const kSDK = @"ios"; +static NSString *const kUserAgentBase = @"FBiOSSDK"; +#endif +static NSString *const kBatchRestMethodBaseURL = @"method/"; + +static NSTimeInterval g_defaultTimeout = 60.0; + +static FBSDKErrorConfiguration *g_errorConfiguration; + +#if !TARGET_OS_TV +static FBSDKAccessToken *_CreateExpiredAccessToken(FBSDKAccessToken *accessToken) +{ + if (accessToken == nil) { + return nil; + } + if (accessToken.isExpired) { + return accessToken; + } + NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-1]; + return [[FBSDKAccessToken alloc] initWithTokenString:accessToken.tokenString + permissions:accessToken.permissions.allObjects + declinedPermissions:accessToken.declinedPermissions.allObjects + appID:accessToken.appID + userID:accessToken.userID + expirationDate:expirationDate + refreshDate:expirationDate + dataAccessExpirationDate:expirationDate]; +} +#endif + +// ---------------------------------------------------------------------------- +// FBSDKGraphRequestConnectionState + +typedef NS_ENUM(NSUInteger, FBSDKGraphRequestConnectionState) +{ + kStateCreated, + kStateSerialized, + kStateStarted, + kStateCompleted, + kStateCancelled, +}; + +// ---------------------------------------------------------------------------- +// Private properties and methods + +@interface FBSDKGraphRequestConnection () < +NSURLSessionDataDelegate +#if !TARGET_OS_TV +, FBSDKGraphErrorRecoveryProcessorDelegate +#endif +> + +@property (nonatomic, strong) NSURLSession *session; +@property (nonatomic, strong) FBSDKURLSessionTask *task; +@property (nonatomic, retain) NSMutableArray *requests; +@property (nonatomic, assign) FBSDKGraphRequestConnectionState state; +@property (nonatomic, strong) FBSDKLogger *logger; +@property (nonatomic, assign) uint64_t requestStartTime; + +@end + +// ---------------------------------------------------------------------------- +// FBSDKGraphRequestConnection + +@implementation FBSDKGraphRequestConnection +{ + NSString *_overrideVersionPart; + NSUInteger _expectingResults; + NSOperationQueue *_delegateQueue; +#if !TARGET_OS_TV + FBSDKGraphRequestMetadata *_recoveringRequestMetadata; + FBSDKGraphErrorRecoveryProcessor *_errorRecoveryProcessor; +#endif +} + +- (instancetype)init +{ + if ((self = [super init])) { + _requests = [[NSMutableArray alloc] init]; + _timeout = g_defaultTimeout; + _state = kStateCreated; + _logger = [[FBSDKLogger alloc] initWithLoggingBehavior:FBSDKLoggingBehaviorNetworkRequests]; + } + return self; +} + +- (void)dealloc +{ + [_session invalidateAndCancel]; +} + +#pragma mark - Public + ++ (void)setDefaultConnectionTimeout:(NSTimeInterval)defaultTimeout +{ + if (defaultTimeout >= 0) { + g_defaultTimeout = defaultTimeout; + } +} + +- (void)addRequest:(FBSDKGraphRequest *)request + completionHandler:(FBSDKGraphRequestHandler)handler +{ + [self addRequest:request batchEntryName:nil completionHandler:handler]; +} + +- (void)addRequest:(FBSDKGraphRequest *)request + batchEntryName:(NSString *)name + completionHandler:(FBSDKGraphRequestHandler)handler +{ + NSDictionary *batchParams = (name)? @{kBatchEntryName : name } : nil; + [self addRequest:request batchParameters:batchParams completionHandler:handler]; +} + +- (void)addRequest:(FBSDKGraphRequest *)request + batchParameters:(NSDictionary *)batchParameters + completionHandler:(FBSDKGraphRequestHandler)handler +{ + if (self.state != kStateCreated) { + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:@"Cannot add requests once started or if a URLRequest is set" + userInfo:nil]; + } + FBSDKGraphRequestMetadata *metadata = [[FBSDKGraphRequestMetadata alloc] initWithRequest:request + completionHandler:handler + batchParameters:batchParameters]; + + [self.requests addObject:metadata]; +} + +- (void)addRequest:(FBSDKGraphRequest *)request + completionHandler:(FBSDKGraphRequestHandler)handler + batchEntryName:(NSString *)name +{ + [self addRequest:request batchEntryName:name completionHandler:handler]; +} + +- (void)addRequest:(FBSDKGraphRequest *)request + completionHandler:(FBSDKGraphRequestHandler)handler + batchParameters:(NSDictionary *)batchParameters +{ + [self addRequest:request batchParameters:batchParameters completionHandler:handler]; +} + +- (void)cancel +{ + self.state = kStateCancelled; + [self.task cancel]; + [self cleanUpSession]; +} + +- (void)overrideGraphAPIVersion:(NSString *)version +{ + if (![_overrideVersionPart isEqualToString:version]) { + _overrideVersionPart = [version copy]; + } +} + +- (void)overrideVersionPartWith:(NSString *)version +{ + [self overrideGraphAPIVersion:version]; +} + +- (void)start +{ + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + g_errorConfiguration = [[FBSDKErrorConfiguration alloc] initWithDictionary:nil]; + }); + //optimistically check for updated server configuration; + g_errorConfiguration = [FBSDKServerConfigurationManager cachedServerConfiguration].errorConfiguration ?: g_errorConfiguration; + + if (self.state != kStateCreated && self.state != kStateSerialized) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"FBSDKGraphRequestConnection cannot be started again."]; + return; + } + [FBSDKGraphRequestPiggybackManager addPiggybackRequests:self]; + NSMutableURLRequest *request = [self requestWithBatch:self.requests timeout:_timeout]; + + self.state = kStateStarted; + + [self logRequest:request bodyLength:0 bodyLogger:nil attachmentLogger:nil]; + _requestStartTime = [FBSDKInternalUtility currentTimeInMilliseconds]; + + FBSDKURLSessionTaskHandler handler = ^(NSError *error, + NSURLResponse *response, + NSData *responseData) { + [self completeFBSDKURLSessionWithResponse:response + data:responseData + networkError:error]; + }; + + if (!self.session) { + self.session = [self defaultSession]; + } + + self.task = [[FBSDKURLSessionTask alloc] initWithRequest:request + fromSession:self.session + completionHandler:handler]; + [self.task start]; + + id delegate = self.delegate; + if ([delegate respondsToSelector:@selector(requestConnectionWillBeginLoading:)]) { + if (_delegateQueue) { + [_delegateQueue addOperationWithBlock:^{ + [delegate requestConnectionWillBeginLoading:self]; + }]; + } else { + [delegate requestConnectionWillBeginLoading:self]; + } + } +} + +- (void)setDelegateQueue:(NSOperationQueue *)queue +{ + _delegateQueue = queue; +} + +#pragma mark - Private methods (request generation) + +// +// Adds request data to a batch in a format expected by the JsonWriter. +// Binary attachments are referenced by name in JSON and added to the +// attachments dictionary. +// +- (void)addRequest:(FBSDKGraphRequestMetadata *)metadata + toBatch:(NSMutableArray *)batch + attachments:(NSMutableDictionary *)attachments + batchToken:(NSString *)batchToken +{ + NSMutableDictionary *requestElement = [[NSMutableDictionary alloc] init]; + + if (metadata.batchParameters) { + [requestElement addEntriesFromDictionary:metadata.batchParameters]; + } + + if (batchToken) { + metadata.request.parameters[kAccessTokenKey] = batchToken; + [self registerTokenToOmitFromLog:batchToken]; + } + + NSString *urlString = [self urlStringForSingleRequest:metadata.request forBatch:YES]; + requestElement[kBatchRelativeURLKey] = urlString; + requestElement[kBatchMethodKey] = metadata.request.HTTPMethod; + + NSMutableArray *attachmentNames = [NSMutableArray array]; + + [metadata.request.parameters enumerateKeysAndObjectsUsingBlock:^(id key, id value, BOOL *stop) { + if ([FBSDKGraphRequest isAttachment:value]) { + NSString *name = [NSString stringWithFormat:@"%@%lu", + kBatchFileNamePrefix, + (unsigned long)attachments.count]; + [attachmentNames addObject:name]; + attachments[name] = value; + } + }]; + + if (attachmentNames.count) { + requestElement[kBatchAttachmentKey] = [attachmentNames componentsJoinedByString:@","]; + } + + [batch addObject:requestElement]; +} + +- (void)appendAttachments:(NSDictionary *)attachments + toBody:(FBSDKGraphRequestBody *)body + addFormData:(BOOL)addFormData + logger:(FBSDKLogger *)logger +{ + [attachments enumerateKeysAndObjectsUsingBlock:^(id key, id value, BOOL *stop) { + value = [FBSDKInternalUtility convertRequestValue:value]; + if ([value isKindOfClass:[NSString class]]) { + if (addFormData) { + [body appendWithKey:key formValue:(NSString *)value logger:logger]; + } + } else if ([value isKindOfClass:[UIImage class]]) { + [body appendWithKey:key imageValue:(UIImage *)value logger:logger]; + } else if ([value isKindOfClass:[NSData class]]) { + [body appendWithKey:key dataValue:(NSData *)value logger:logger]; + } else if ([value isKindOfClass:[FBSDKGraphRequestDataAttachment class]]) { + [body appendWithKey:key dataAttachmentValue:(FBSDKGraphRequestDataAttachment *)value logger:logger]; + } else { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors formatString:@"Unsupported FBSDKGraphRequest attachment:%@, skipping.", value]; + } + }]; +} + +// +// Serializes all requests in the batch to JSON and appends the result to +// body. Also names all attachments that need to go as separate blocks in +// the body of the request. +// +// All the requests are serialized into JSON, with any binary attachments +// named and referenced by name in the JSON. +// +- (void)appendJSONRequests:(NSArray *)requests + toBody:(FBSDKGraphRequestBody *)body + andNameAttachments:(NSMutableDictionary *)attachments + logger:(FBSDKLogger *)logger +{ + NSMutableArray *batch = [[NSMutableArray alloc] init]; + NSString *batchToken = nil; + for (FBSDKGraphRequestMetadata *metadata in requests) { + NSString *individualToken = [self accessTokenWithRequest:metadata.request]; + BOOL isClientToken = [FBSDKSettings clientToken] && [individualToken hasSuffix:[FBSDKSettings clientToken]]; + if (!batchToken && + !isClientToken) { + batchToken = individualToken; + } + [self addRequest:metadata + toBatch:batch + attachments:attachments + batchToken:[batchToken isEqualToString:individualToken] ? nil : individualToken]; + } + + NSString *jsonBatch = [FBSDKInternalUtility JSONStringForObject:batch error:NULL invalidObjectHandler:NULL]; + + [body appendWithKey:kBatchKey formValue:jsonBatch logger:logger]; + if (batchToken) { + [body appendWithKey:kAccessTokenKey formValue:batchToken logger:logger]; + } +} + +- (BOOL)_shouldWarnOnMissingFieldsParam:(FBSDKGraphRequest *)request +{ + NSString *minVersion = @"2.4"; + NSString *version = request.version; + if (!version) { + return YES; + } + if ([version hasPrefix:@"v"]) { + version = [version substringFromIndex:1]; + } + + NSComparisonResult result = [version compare:minVersion options:NSNumericSearch]; + + // if current version is the same as minVersion, or if the current version is > minVersion + return (result == NSOrderedSame) || (result == NSOrderedDescending); +} + +// Validate that all GET requests after v2.4 have a "fields" param +- (void)_validateFieldsParamForGetRequests:(NSArray *)requests +{ + for (FBSDKGraphRequestMetadata *metadata in requests) { + FBSDKGraphRequest *request = metadata.request; + if ([request.HTTPMethod.uppercaseString isEqualToString:@"GET"] && + [self _shouldWarnOnMissingFieldsParam:request] && + !request.parameters[@"fields"] && + [request.graphPath rangeOfString:@"fields="].location == NSNotFound) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"starting with Graph API v2.4, GET requests for /%@ should contain an explicit \"fields\" parameter", request.graphPath]; + } + } +} + +// +// Generates a NSURLRequest based on the contents of self.requests, and sets +// options on the request. Chooses between URL-based request for a single +// request and JSON-based request for batches. +// +- (NSMutableURLRequest *)requestWithBatch:(NSArray *)requests + timeout:(NSTimeInterval)timeout +{ + FBSDKGraphRequestBody *body = [[FBSDKGraphRequestBody alloc] init]; + FBSDKLogger *bodyLogger = [[FBSDKLogger alloc] initWithLoggingBehavior:_logger.loggingBehavior]; + FBSDKLogger *attachmentLogger = [[FBSDKLogger alloc] initWithLoggingBehavior:_logger.loggingBehavior]; + + NSMutableURLRequest *request; + + if (requests.count == 0) { + [[NSException exceptionWithName:NSInvalidArgumentException + reason:@"FBSDKGraphRequestConnection: Must have at least one request or urlRequest not specified." + userInfo:nil] + raise]; + + } + + [self _validateFieldsParamForGetRequests:requests]; + + if (requests.count == 1) { + FBSDKGraphRequestMetadata *metadata = requests[0]; + NSURL *url = [NSURL URLWithString:[self urlStringForSingleRequest:metadata.request forBatch:NO]]; + request = [NSMutableURLRequest requestWithURL:url + cachePolicy:NSURLRequestUseProtocolCachePolicy + timeoutInterval:timeout]; + + // HTTP methods are case-sensitive; be helpful in case someone provided a mixed case one. + NSString *httpMethod = metadata.request.HTTPMethod.uppercaseString; + request.HTTPMethod = httpMethod; + [self appendAttachments:metadata.request.parameters + toBody:body + addFormData:[httpMethod isEqualToString:@"POST"] + logger:attachmentLogger]; + } else { + // Find the session with an app ID and use that as the batch_app_id. If we can't + // find one, try to load it from the plist. As a last resort, pass 0. + NSString *batchAppID = [FBSDKSettings appID]; + if (!batchAppID || batchAppID.length == 0) { + // The Graph API batch method requires either an access token or batch_app_id. + // If we can't determine an App ID to use for the batch, we can't issue it. + [[NSException exceptionWithName:NSInternalInconsistencyException + reason:@"FBSDKGraphRequestConnection: [FBSDKSettings appID] must be specified for batch requests" + userInfo:nil] + raise]; + } + + [body appendWithKey:@"batch_app_id" formValue:batchAppID logger:bodyLogger]; + + NSMutableDictionary *attachments = [[NSMutableDictionary alloc] init]; + + [self appendJSONRequests:requests + toBody:body + andNameAttachments:attachments + logger:bodyLogger]; + + [self appendAttachments:attachments + toBody:body + addFormData:NO + logger:attachmentLogger]; + + NSURL *url = [FBSDKInternalUtility facebookURLWithHostPrefix:kGraphURLPrefix path:nil queryParameters:nil defaultVersion:_overrideVersionPart error:NULL]; + request = [NSMutableURLRequest requestWithURL:url + cachePolicy:NSURLRequestUseProtocolCachePolicy + timeoutInterval:timeout]; + request.HTTPMethod = @"POST"; + } + + request.HTTPBody = body.data; + NSUInteger bodyLength = body.data.length / 1024; + + [request setValue:[FBSDKGraphRequestConnection userAgent] forHTTPHeaderField:@"User-Agent"]; + [request setValue:[body mimeContentType] forHTTPHeaderField:@"Content-Type"]; + [request setHTTPShouldHandleCookies:NO]; + + [self logRequest:request bodyLength:bodyLength bodyLogger:bodyLogger attachmentLogger:attachmentLogger]; + + return request; +} + +// +// Generates a URL for a batch containing only a single request, +// and names all attachments that need to go in the body of the +// request. +// +// The URL contains all parameters that are not body attachments, +// including the session key if present. +// +// Attachments are named and referenced by name in the URL. +// +- (NSString *)urlStringForSingleRequest:(FBSDKGraphRequest *)request forBatch:(BOOL)forBatch +{ + request.parameters[@"format"] = @"json"; + request.parameters[@"sdk"] = kSDK; + request.parameters[@"include_headers"] = @"false"; + + NSString *baseURL; + if (forBatch) { + baseURL = request.graphPath; + } else { + NSString *token = [self accessTokenWithRequest:request]; + if (token) { + [request.parameters setValue:token forKey:kAccessTokenKey]; + [self registerTokenToOmitFromLog:token]; + } + + NSString *prefix = kGraphURLPrefix; + // We special case a graph post to /videos and send it to graph-video.facebook.com + // We only do this for non batch post requests + NSString *graphPath = request.graphPath.lowercaseString; + if ([request.HTTPMethod.uppercaseString isEqualToString:@"POST"] && + [graphPath hasSuffix:@"/videos"]) { + graphPath = [graphPath stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]]; + NSArray *components = [graphPath componentsSeparatedByString:@"/"]; + if (components.count == 2) { + prefix = kGraphVideoURLPrefix; + } + } + + baseURL = [FBSDKInternalUtility facebookURLWithHostPrefix:prefix path:request.graphPath queryParameters:nil defaultVersion:request.version error:NULL].absoluteString; + } + + NSString *url = [FBSDKGraphRequest serializeURL:baseURL + params:request.parameters + httpMethod:request.HTTPMethod + forBatch:forBatch]; + return url; +} + +#pragma mark - Private methods (response parsing) + +- (void)completeFBSDKURLSessionWithResponse:(NSURLResponse *)response + data:(NSData *)data + networkError:(NSError *)error +{ + if (self.state != kStateCancelled) { + NSAssert(self.state == kStateStarted, + @"Unexpected state %lu in completeWithResponse", + (unsigned long)self.state); + self.state = kStateCompleted; + } + + NSArray *results = nil; + _URLResponse = (NSHTTPURLResponse *)response; + if (response) { + NSAssert([response isKindOfClass:[NSHTTPURLResponse class]], + @"Expected NSHTTPURLResponse, got %@", + response); + + NSInteger statusCode = _URLResponse.statusCode; + + if (!error && [response.MIMEType hasPrefix:@"image"]) { + error = [NSError fbErrorWithCode:FBSDKErrorGraphRequestNonTextMimeTypeReturned + message:@"Response is a non-text MIME type; endpoints that return images and other " + @"binary data should be fetched using NSURLRequest and NSURLSession"]; + } else { + results = [self parseJSONResponse:data + error:&error + statusCode:statusCode]; + } + } else if (!error) { + error = [NSError fbErrorWithCode:FBSDKErrorUnknown + message:@"Missing NSURLResponse"]; + } + + if (!error) { + if (self.requests.count != results.count) { + error = [NSError fbErrorWithCode:FBSDKErrorGraphRequestProtocolMismatch + message:@"Unexpected number of results returned from server."]; + } else { + [_logger appendFormat:@"Response <#%lu>\nDuration: %llu msec\nSize: %lu kB\nResponse Body:\n%@\n\n", + (unsigned long)_logger.loggerSerialNumber, + [FBSDKInternalUtility currentTimeInMilliseconds] - _requestStartTime, + (unsigned long)data.length, + results]; + } + } + + if (error) { + [_logger appendFormat:@"Response <#%lu> :\n%@\n%@\n", + (unsigned long)_logger.loggerSerialNumber, + error.localizedDescription, + error.userInfo]; + } + [_logger emitToNSLog]; + + [self completeWithResults:results networkError:error]; + + [self cleanUpSession]; +} + +// +// If there is one request, the JSON is the response. +// If there are multiple requests, the JSON has an array of dictionaries whose +// body property is the response. +// [{ "code":200, +// "body":"JSON-response-as-a-string" }, +// { "code":200, +// "body":"JSON-response-as-a-string" }] +// +// In both cases, this function returns an NSArray containing the results. +// The NSArray looks just like the multiple request case except the body +// value is converted from a string to parsed JSON. +// +- (NSArray *)parseJSONResponse:(NSData *)data + error:(NSError **)error + statusCode:(NSInteger)statusCode; +{ + // Graph API can return "true" or "false", which is not valid JSON. + // Translate that before asking JSON parser to look at it. + NSString *responseUTF8 = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSMutableArray *results = [[NSMutableArray alloc] init];; + id response = [self parseJSONOrOtherwise:responseUTF8 error:error]; + + if (responseUTF8 == nil) { + NSString *base64Data = data.length != 0 ? [data base64EncodedStringWithOptions:0] : @""; + if (base64Data != nil) { + [FBSDKAppEvents logImplicitEvent:@"fb_response_invalid_utf8" + valueToSum:nil + parameters:nil + accessToken:nil]; + } + } + + NSDictionary *responseError = nil; + if (!response) { + if ((error != NULL) && (*error == nil)) { + *error = [self errorWithCode:FBSDKErrorUnknown + statusCode:statusCode + parsedJSONResponse:nil + innerError:nil + message:@"The server returned an unexpected response."]; + } + } else if (self.requests.count == 1) { + // response is the entry, so put it in a dictionary under "body" and add + // that to array of responses. + [results addObject:@{ + @"code":@(statusCode), + @"body":response + }]; + } else if ([response isKindOfClass:[NSArray class]]) { + // response is the array of responses, but the body element of each needs + // to be decoded from JSON. + for (id item in response) { + // Don't let errors parsing one response stop us from parsing another. + NSError *batchResultError = nil; + if (![item isKindOfClass:[NSDictionary class]]) { + [results addObject:item]; + } else { + NSMutableDictionary *result = [((NSDictionary *)item) mutableCopy]; + if (result[@"body"]) { + result[@"body"] = [self parseJSONOrOtherwise:result[@"body"] error:&batchResultError]; + } + [results addObject:result]; + } + if (batchResultError) { + // We'll report back the last error we saw. + *error = batchResultError; + } + } + } else if ([response isKindOfClass:[NSDictionary class]] && + (responseError = [FBSDKTypeUtility dictionaryValue:response[@"error"]]) != nil && + [responseError[@"type"] isEqualToString:@"OAuthException"]) { + // if there was one request then return the only result. if there were multiple requests + // but only one error then the server rejected the batch access token + NSDictionary *result = @{ + @"code":@(statusCode), + @"body":response + }; + + for (NSUInteger resultIndex = 0, resultCount = self.requests.count; resultIndex < resultCount; ++resultIndex) { + [results addObject:result]; + } + } else if (error != NULL) { + *error = [self errorWithCode:FBSDKErrorGraphRequestProtocolMismatch + statusCode:statusCode + parsedJSONResponse:results + innerError:nil + message:nil]; + } + + return results; +} + +- (id)parseJSONOrOtherwise:(NSString *)utf8 + error:(NSError **)error +{ + id parsed = nil; + if (!(*error) && [utf8 isKindOfClass:[NSString class]]) { + parsed = [FBSDKInternalUtility objectForJSONString:utf8 error:error]; + // if we fail parse we attempt a re-parse of a modified input to support results in the form "foo=bar", "true", etc. + // which is shouldn't be necessary since Graph API v2.1. + if (*error) { + // we round-trip our hand-wired response through the parser in order to remain + // consistent with the rest of the output of this function (note, if perf turns out + // to be a problem -- unlikely -- we can return the following dictionary outright) + NSDictionary *original = @{ FBSDKNonJSONResponseProperty : utf8 }; + NSString *jsonrep = [FBSDKInternalUtility JSONStringForObject:original error:NULL invalidObjectHandler:NULL]; + NSError *reparseError = nil; + parsed = [FBSDKInternalUtility objectForJSONString:jsonrep error:&reparseError]; + if (!reparseError) { + *error = nil; + } + } + } + return parsed; +} + +- (void)completeWithResults:(NSArray *)results + networkError:(NSError *)networkError +{ + NSUInteger count = self.requests.count; + _expectingResults = count; + NSUInteger disabledRecoveryCount = 0; + for (FBSDKGraphRequestMetadata *metadata in self.requests) { + if (metadata.request.graphErrorRecoveryDisabled) { + disabledRecoveryCount++; + } + } +#if !TARGET_OS_TV + BOOL isSingleRequestToRecover = (count - disabledRecoveryCount == 1); +#endif + + [self.requests enumerateObjectsUsingBlock:^(FBSDKGraphRequestMetadata *metadata, NSUInteger i, BOOL *stop) { + id result = networkError ? nil : results[i]; + NSError *resultError = networkError ?: [self errorFromResult:result request:metadata.request]; + + id body = nil; + if (!resultError && [result isKindOfClass:[NSDictionary class]]) { + NSDictionary *resultDictionary = [FBSDKTypeUtility dictionaryValue:result]; + body = [FBSDKTypeUtility dictionaryValue:resultDictionary[@"body"]]; + } + +#if !TARGET_OS_TV + if (resultError && !metadata.request.graphErrorRecoveryDisabled && isSingleRequestToRecover) { + self->_recoveringRequestMetadata = metadata; + self->_errorRecoveryProcessor = [[FBSDKGraphErrorRecoveryProcessor alloc] init]; + if ([self->_errorRecoveryProcessor processError:resultError request:metadata.request delegate:self]) { + return; + } + } +#endif + + [self processResultBody:body error:resultError metadata:metadata canNotifyDelegate:networkError == nil]; + }]; + + if (networkError) { + if ([_delegate respondsToSelector:@selector(requestConnection:didFailWithError:)]) { + [_delegate requestConnection:self didFailWithError:networkError]; + } + } +} + +- (void)processResultBody:(NSDictionary *)body error:(NSError *)error metadata:(FBSDKGraphRequestMetadata *)metadata canNotifyDelegate:(BOOL)canNotifyDelegate +{ + void (^finishAndInvokeCompletionHandler)(void) = ^{ + NSDictionary *graphDebugDict = body[@"__debug__"]; + if ([graphDebugDict isKindOfClass:[NSDictionary class]]) { + [self processResultDebugDictionary: graphDebugDict]; + } + [metadata invokeCompletionHandlerForConnection:self withResults:body error:error]; + + if (--self->_expectingResults == 0) { + if (canNotifyDelegate && [self->_delegate respondsToSelector:@selector(requestConnectionDidFinishLoading:)]) { + [self->_delegate requestConnectionDidFinishLoading:self]; + } + } + }; + +#if !TARGET_OS_TV + void (^clearToken)(NSInteger) = ^(NSInteger errorSubcode){ + if (metadata.request.flags & FBSDKGraphRequestFlagDoNotInvalidateTokenOnError) { + return; + } + if (errorSubcode == 493) { + [FBSDKAccessToken setCurrentAccessToken:_CreateExpiredAccessToken([FBSDKAccessToken currentAccessToken])]; + } else { + [FBSDKAccessToken setCurrentAccessToken:nil]; + } + + }; + + FBSDKSystemAccountStoreAdapter *adapter = [FBSDKSystemAccountStoreAdapter sharedInstance]; + NSString *metadataTokenString = metadata.request.tokenString; + NSString *currentTokenString = [FBSDKAccessToken currentAccessToken].tokenString; + NSString *accountStoreTokenString = adapter.accessTokenString; + BOOL isAccountStoreLogin = [metadataTokenString isEqualToString:accountStoreTokenString]; + + if ([metadataTokenString isEqualToString:currentTokenString] || isAccountStoreLogin) { + NSInteger errorCode = [error.userInfo[FBSDKGraphRequestErrorGraphErrorCodeKey] integerValue]; + NSInteger errorSubcode = [error.userInfo[FBSDKGraphRequestErrorGraphErrorSubcodeKey] integerValue]; + if (errorCode == 190 || errorCode == 102) { + if (isAccountStoreLogin) { + if (errorSubcode == 460) { + // For iOS6, when the password is changed on the server, the system account store + // will continue to issue the old token until the user has changed the + // password AND _THEN_ a renew call is made. To prevent opening + // with an old token which would immediately be closed, we tell our adapter + // that we want to force a blocking renew until success. + adapter.forceBlockingRenew = YES; + } else { + [adapter renewSystemAuthorization:^(ACAccountCredentialRenewResult result, NSError *renewError) { + NSOperationQueue *queue = self->_delegateQueue ?: [NSOperationQueue mainQueue]; + [queue addOperationWithBlock:^{ + clearToken(errorSubcode); + finishAndInvokeCompletionHandler(); + }]; + }]; + return; + } + } + clearToken(errorSubcode); + } else if (errorCode >= 200 && errorCode < 300) { + // permission error + [adapter renewSystemAuthorization:^(ACAccountCredentialRenewResult result, NSError *renewError) { + NSOperationQueue *queue = self->_delegateQueue ?: [NSOperationQueue mainQueue]; + [queue addOperationWithBlock:finishAndInvokeCompletionHandler]; + }]; + return; + } + } +#endif + // this is already on the queue since we are currently in the NSURLSession callback. + finishAndInvokeCompletionHandler(); +} + +- (void)processResultDebugDictionary:(NSDictionary *)dict +{ + NSArray *messages = [FBSDKTypeUtility arrayValue:dict[@"messages"]]; + if (!messages.count) { + return; + } + + [messages enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { + NSDictionary *messageDict = [FBSDKTypeUtility dictionaryValue:obj]; + NSString *message = [FBSDKTypeUtility stringValue:messageDict[@"message"]]; + NSString *type = [FBSDKTypeUtility stringValue:messageDict[@"type"]]; + NSString *link = [FBSDKTypeUtility stringValue:messageDict[@"link"]]; + if (!message || !type) { + return; + } + + NSString *loggingBehavior = FBSDKLoggingBehaviorGraphAPIDebugInfo; + if ([type isEqualToString:@"warning"]) { + loggingBehavior = FBSDKLoggingBehaviorGraphAPIDebugWarning; + } + if (link) { + message = [message stringByAppendingFormat:@" Link: %@", link]; + } + + [FBSDKLogger singleShotLogEntry:loggingBehavior logEntry:message]; + }]; + +} + +- (NSError *)errorFromResult:(id)result request:(FBSDKGraphRequest *)request +{ + if ([result isKindOfClass:[NSDictionary class]]) { + NSDictionary *errorDictionary = [FBSDKTypeUtility dictionaryValue:result[@"body"]][@"error"]; + + if ([errorDictionary isKindOfClass:[NSDictionary class]]) { + NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + [FBSDKInternalUtility dictionary:userInfo setObject:errorDictionary[@"code"] forKey:FBSDKGraphRequestErrorGraphErrorCodeKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:errorDictionary[@"error_subcode"] forKey:FBSDKGraphRequestErrorGraphErrorSubcodeKey]; + //"message" is preferred over error_msg or error_reason. + [FBSDKInternalUtility dictionary:userInfo setObject:errorDictionary[@"error_msg"] forKey:FBSDKErrorDeveloperMessageKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:errorDictionary[@"error_reason"] forKey:FBSDKErrorDeveloperMessageKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:errorDictionary[@"message"] forKey:FBSDKErrorDeveloperMessageKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:errorDictionary[@"error_user_title"] forKey:FBSDKErrorLocalizedTitleKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:errorDictionary[@"error_user_msg"] forKey:FBSDKErrorLocalizedDescriptionKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:errorDictionary[@"error_user_msg"] forKey:NSLocalizedDescriptionKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:result[@"code"] forKey:FBSDKGraphRequestErrorHTTPStatusCodeKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:result forKey:FBSDKGraphRequestErrorParsedJSONResponseKey]; + + FBSDKErrorRecoveryConfiguration *recoveryConfiguration = [g_errorConfiguration + recoveryConfigurationForCode:[userInfo[FBSDKGraphRequestErrorGraphErrorCodeKey] stringValue] + subcode:[userInfo[FBSDKGraphRequestErrorGraphErrorSubcodeKey] stringValue] + request:request]; + if ([errorDictionary[@"is_transient"] boolValue]) { + userInfo[FBSDKGraphRequestErrorKey] = @(FBSDKGraphRequestErrorTransient); + } else { + [FBSDKInternalUtility dictionary:userInfo setObject:@(recoveryConfiguration.errorCategory) forKey:FBSDKGraphRequestErrorKey]; + } + [FBSDKInternalUtility dictionary:userInfo setObject:recoveryConfiguration.localizedRecoveryDescription forKey:NSLocalizedRecoverySuggestionErrorKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:recoveryConfiguration.localizedRecoveryOptionDescriptions forKey:NSLocalizedRecoveryOptionsErrorKey]; + FBSDKErrorRecoveryAttempter *attempter = [FBSDKErrorRecoveryAttempter recoveryAttempterFromConfiguration:recoveryConfiguration]; + [FBSDKInternalUtility dictionary:userInfo setObject:attempter forKey:NSRecoveryAttempterErrorKey]; + + return [NSError fbErrorWithCode:FBSDKErrorGraphRequestGraphAPI + userInfo:userInfo + message:nil + underlyingError:nil]; + } + } + + return nil; +} + +- (NSError *)errorWithCode:(FBSDKError)code + statusCode:(NSInteger)statusCode + parsedJSONResponse:(id)response + innerError:(NSError *)innerError + message:(NSString *)message { + NSMutableDictionary *userInfo = [[NSMutableDictionary alloc] init]; + userInfo[FBSDKGraphRequestErrorHTTPStatusCodeKey] = @(statusCode); + + if (response) { + userInfo[FBSDKGraphRequestErrorParsedJSONResponseKey] = response; + } + + if (innerError) { + userInfo[FBSDKGraphRequestErrorParsedJSONResponseKey] = innerError; + } + + if (message) { + userInfo[FBSDKErrorDeveloperMessageKey] = message; + } + + NSError *error = [[NSError alloc] + initWithDomain:FBSDKErrorDomain + code:code + userInfo:userInfo]; + + return error; +} + +#pragma mark - Private methods (miscellaneous) + +- (void)logRequest:(NSMutableURLRequest *)request + bodyLength:(NSUInteger)bodyLength + bodyLogger:(FBSDKLogger *)bodyLogger + attachmentLogger:(FBSDKLogger *)attachmentLogger +{ + if (_logger.isActive) { + [_logger appendFormat:@"Request <#%lu>:\n", (unsigned long)_logger.loggerSerialNumber]; + [_logger appendKey:@"URL" value:request.URL.absoluteString]; + [_logger appendKey:@"Method" value:request.HTTPMethod]; + [_logger appendKey:@"UserAgent" value:[request valueForHTTPHeaderField:@"User-Agent"]]; + [_logger appendKey:@"MIME" value:[request valueForHTTPHeaderField:@"Content-Type"]]; + + if (bodyLength != 0) { + [_logger appendKey:@"Body Size" value:[NSString stringWithFormat:@"%lu kB", (unsigned long)bodyLength / 1024]]; + } + + if (bodyLogger != nil) { + [_logger appendKey:@"Body (w/o attachments)" value:bodyLogger.contents]; + } + + if (attachmentLogger != nil) { + [_logger appendKey:@"Attachments" value:attachmentLogger.contents]; + } + + [_logger appendString:@"\n"]; + + [_logger emitToNSLog]; + } +} + +- (NSString *)accessTokenWithRequest:(FBSDKGraphRequest *)request +{ + NSString *token = request.tokenString ?: request.parameters[kAccessTokenKey]; + if (!token && !(request.flags & FBSDKGraphRequestFlagSkipClientToken) && [FBSDKSettings clientToken].length > 0) { + return [NSString stringWithFormat:@"%@|%@", [FBSDKSettings appID], [FBSDKSettings clientToken]]; + } + return token; +} + +- (void)registerTokenToOmitFromLog:(NSString *)token +{ + if (![FBSDKSettings.loggingBehaviors containsObject:FBSDKLoggingBehaviorAccessTokens]) { + [FBSDKLogger registerStringToReplace:token replaceWith:@"ACCESS_TOKEN_REMOVED"]; + } +} + ++ (NSString *)userAgent +{ + static NSString *agent = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + agent = [NSString stringWithFormat:@"%@.%@", kUserAgentBase, FBSDK_VERSION_STRING]; + }); + + if ([FBSDKSettings userAgentSuffix]) { + return [NSString stringWithFormat:@"%@/%@", agent, [FBSDKSettings userAgentSuffix]]; + } + return agent; +} + +- (NSURLSession *)defaultSession +{ + NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration]; + return [NSURLSession sessionWithConfiguration:config + delegate:self + delegateQueue:_delegateQueue]; +} + +- (void)cleanUpSession +{ + [self.session invalidateAndCancel]; + self.session = nil; +} + +#pragma mark - NSURLSessionDataDelegate + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task + didSendBodyData:(int64_t)bytesSent + totalBytesSent:(int64_t)totalBytesSent +totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend +{ + id delegate = self.delegate; + + if ([delegate respondsToSelector:@selector(requestConnection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:)]) { + [delegate requestConnection:self + didSendBodyData:(NSUInteger)bytesSent + totalBytesWritten:(NSUInteger)totalBytesSent + totalBytesExpectedToWrite:(NSUInteger)totalBytesExpectedToSend]; + } +} + +#pragma mark - FBSDKGraphErrorRecoveryProcessorDelegate + +#if !TARGET_OS_TV +- (void)processorDidAttemptRecovery:(FBSDKGraphErrorRecoveryProcessor *)processor didRecover:(BOOL)didRecover error:(NSError *)error +{ + if (didRecover) { + FBSDKGraphRequest *originalRequest = _recoveringRequestMetadata.request; + FBSDKGraphRequest *retryRequest = [[FBSDKGraphRequest alloc] initWithGraphPath:originalRequest.graphPath + parameters:originalRequest.parameters + tokenString:[FBSDKAccessToken currentAccessToken].tokenString + version:originalRequest.version + HTTPMethod:originalRequest.HTTPMethod]; + // prevent further attempts at recovery (i.e., additional retries). + [retryRequest setGraphErrorRecoveryDisabled:YES]; + FBSDKGraphRequestMetadata *retryMetadata = [[FBSDKGraphRequestMetadata alloc] initWithRequest:retryRequest completionHandler:_recoveringRequestMetadata.completionHandler batchParameters:_recoveringRequestMetadata.batchParameters]; + [retryRequest startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *retriedError) { + [self processResultBody:result error:retriedError metadata:retryMetadata canNotifyDelegate:YES]; + self->_errorRecoveryProcessor = nil; + self->_recoveringRequestMetadata = nil; + }]; + } else { + [self processResultBody:nil error:error metadata:_recoveringRequestMetadata canNotifyDelegate:YES]; + _errorRecoveryProcessor = nil; + _recoveringRequestMetadata = nil; + } +} +#endif + +#pragma mark - Debugging helpers + +- (NSString *)description +{ + NSMutableString *result = [NSMutableString stringWithFormat:@"<%@: %p, %lu request(s): (\n", + NSStringFromClass([self class]), + self, + (unsigned long)self.requests.count]; + BOOL comma = NO; + for (FBSDKGraphRequestMetadata *metadata in self.requests) { + FBSDKGraphRequest *request = metadata.request; + if (comma) { + [result appendString:@",\n"]; + } + [result appendString:request.description]; + comma = YES; + } + [result appendString:@"\n)>"]; + return result; + +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.h new file mode 100644 index 0000000..7ad50dc --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.h @@ -0,0 +1,55 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +/** + A container class for data attachments so that additional metadata can be provided about the attachment. + */ +@interface FBSDKGraphRequestDataAttachment : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + Initializes the receiver with the attachment data and metadata. + @param data The attachment data (retained, not copied) + @param filename The filename for the attachment + @param contentType The content type for the attachment + */ +- (instancetype)initWithData:(NSData *)data + filename:(NSString *)filename + contentType:(NSString *)contentType +NS_DESIGNATED_INITIALIZER; + +/** + The content type for the attachment. + */ +@property (nonatomic, copy, readonly) NSString *contentType; + +/** + The attachment data. + */ +@property (nonatomic, strong, readonly) NSData *data; + +/** + The filename for the attachment. + */ +@property (nonatomic, copy, readonly) NSString *filename; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.m new file mode 100644 index 0000000..9a61611 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.m @@ -0,0 +1,33 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKGraphRequestDataAttachment.h" + +@implementation FBSDKGraphRequestDataAttachment + +- (instancetype)initWithData:(NSData *)data filename:(NSString *)filename contentType:(NSString *)contentType +{ + if ((self = [super init])) { + _data = data; + _filename = [filename copy]; + _contentType = [contentType copy]; + } + return self; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMacros.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMacros.h new file mode 100644 index 0000000..d749579 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMacros.h @@ -0,0 +1,19 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMeasurementEvent.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMeasurementEvent.h new file mode 100644 index 0000000..3798330 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMeasurementEvent.h @@ -0,0 +1,69 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +NS_ASSUME_NONNULL_BEGIN + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +/*! The name of the notification posted by FBSDKMeasurementEvent */ +FOUNDATION_EXPORT NSNotificationName const FBSDKMeasurementEventNotification; + +#else + +/*! The name of the notification posted by FBSDKMeasurementEvent */ +FOUNDATION_EXPORT NSString *const FBSDKMeasurementEventNotification; + +#endif + +FOUNDATION_EXPORT NSString *const FBSDKMeasurementEventNotificationName +DEPRECATED_MSG_ATTRIBUTE("Use `FBSDKMeasurementEventNotification` instead"); + +/*! Defines keys in the userInfo object for the notification named FBSDKMeasurementEventNotificationName */ +/*! The string field for the name of the event */ +FOUNDATION_EXPORT NSString *const FBSDKMeasurementEventNameKey; +/*! The dictionary field for the arguments of the event */ +FOUNDATION_EXPORT NSString *const FBSDKMeasurementEventArgsKey; + +/*! Events raised by FBSDKMeasurementEvent for Applink */ +/*! + The name of the event posted when [FBSDKURL URLWithURL:] is called successfully. This represents the successful parsing of an app link URL. + */ +FOUNDATION_EXPORT NSString *const FBSDKAppLinkParseEventName; + +/*! + The name of the event posted when [FBSDKURL URLWithInboundURL:] is called successfully. + This represents parsing an inbound app link URL from a different application + */ +FOUNDATION_EXPORT NSString *const FBSDKAppLinkNavigateInEventName; + +/*! The event raised when the user navigates from your app to other apps */ +FOUNDATION_EXPORT NSString *const FBSDKAppLinkNavigateOutEventName; + +/*! + The event raised when the user navigates out from your app and back to the referrer app. + e.g when the user leaves your app after tapping the back-to-referrer navigation bar + */ +FOUNDATION_EXPORT NSString *const FBSDKAppLinkNavigateBackToReferrerEventName; + +@interface FBSDKMeasurementEvent : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMeasurementEvent.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMeasurementEvent.m new file mode 100644 index 0000000..ef96d3e --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMeasurementEvent.m @@ -0,0 +1,78 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKMeasurementEvent_Internal.h" + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +NSNotificationName const FBSDKMeasurementEventNotification = @"com.facebook.facebook-objc-sdk.measurement_event"; + +#else + +NSString *const FBSDKMeasurementEventNotification = @"com.facebook.facebook-objc-sdk.measurement_event"; + +#endif + +NSString *const FBSDKMeasurementEventNotificationName = @"com.facebook.facebook-objc-sdk.measurement_event"; + +NSString *const FBSDKMeasurementEventNameKey = @"event_name"; +NSString *const FBSDKMeasurementEventArgsKey = @"event_args"; + +/* app Link Event raised by this FBSDKURL */ +NSString *const FBSDKAppLinkParseEventName = @"al_link_parse"; +NSString *const FBSDKAppLinkNavigateInEventName = @"al_nav_in"; + +/*! AppLink events raised in this class */ +NSString *const FBSDKAppLinkNavigateOutEventName = @"al_nav_out"; +NSString *const FBSDKAppLinkNavigateBackToReferrerEventName = @"al_ref_back_out"; + +@implementation FBSDKMeasurementEvent { + NSString *_name; + NSDictionary *_args; +} + +- (void)postNotification { + if (!_name) { + NSLog(@"Warning: Missing event name when logging FBSDK measurement event. \n" + " Ignoring this event in logging."); + return; + } + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + NSDictionary *userInfo = @{FBSDKMeasurementEventNameKey : _name, + FBSDKMeasurementEventArgsKey : _args}; + + [center postNotificationName:FBSDKMeasurementEventNotification + object:self + userInfo:userInfo]; +} + +- (instancetype)initEventWithName:(NSString *)name + args:(NSDictionary *)args { + if ((self = [super init])) { + _name = name; + _args = args ? args : @{}; + } + return self; +} + ++ (void)postNotificationForEventName:(NSString *)name + args:(NSDictionary *)args { + [[[self alloc] initEventWithName:name args:args] postNotification]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMutableCopying.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMutableCopying.h new file mode 100644 index 0000000..3fada94 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKMutableCopying.h @@ -0,0 +1,36 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +/** + Extension protocol for NSMutableCopying that adds the mutableCopy method, which is implemented on NSObject. + + NSObject implicitly conforms to this protocol. + */ +@protocol FBSDKMutableCopying + +/** + Implemented by NSObject as a convenience to mutableCopyWithZone:. + @return A mutable copy of the receiver. + */ +- (id)mutableCopy; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.h new file mode 100644 index 0000000..d0e245b --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.h @@ -0,0 +1,183 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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." + +#import "FBSDKProfilePictureView.h" + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +/** + Notification indicating that the `currentProfile` has changed. + + the userInfo dictionary of the notification will contain keys + `FBSDKProfileChangeOldKey` and + `FBSDKProfileChangeNewKey`. + */ +FOUNDATION_EXPORT NSNotificationName const FBSDKProfileDidChangeNotification; + +#else + +/** + Notification indicating that the `currentProfile` has changed. + + the userInfo dictionary of the notification will contain keys + `FBSDKProfileChangeOldKey` and + `FBSDKProfileChangeNewKey`. + */ +FOUNDATION_EXPORT NSString *const FBSDKProfileDidChangeNotification; + +#endif + +/* key in notification's userInfo object for getting the old profile. + + If there was no old profile, the key will not be present. + */ +FOUNDATION_EXPORT NSString *const FBSDKProfileChangeOldKey; + +/* key in notification's userInfo object for getting the new profile. + + If there is no new profile, the key will not be present. + */ +FOUNDATION_EXPORT NSString *const FBSDKProfileChangeNewKey; + +/** + Represents an immutable Facebook profile + + This class provides a global "currentProfile" instance to more easily + add social context to your application. When the profile changes, a notification is + posted so that you can update relevant parts of your UI and is persisted to NSUserDefaults. + + Typically, you will want to call `enableUpdatesOnAccessTokenChange:YES` so that + it automatically observes changes to the `[FBSDKAccessToken currentAccessToken]`. + + You can use this class to build your own `FBSDKProfilePictureView` or in place of typical requests to "/me". + */ +@interface FBSDKProfile : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + initializes a new instance. + @param userID the user ID + @param firstName the user's first name + @param middleName the user's middle name + @param lastName the user's last name + @param name the user's complete name + @param linkURL the link for this profile + @param refreshDate the optional date this profile was fetched. Defaults to [NSDate date]. + */ +- (instancetype)initWithUserID:(NSString *)userID + firstName:(NSString *)firstName + middleName:(NSString *)middleName + lastName:(NSString *)lastName + name:(NSString *)name + linkURL:(NSURL *)linkURL + refreshDate:(NSDate *)refreshDate NS_DESIGNATED_INITIALIZER; +/** + The user id + */ +@property (nonatomic, copy, readonly) NSString *userID; +/** + The user's first name + */ +@property (nonatomic, copy, readonly) NSString *firstName; +/** + The user's middle name + */ +@property (nonatomic, copy, readonly) NSString *middleName; +/** + The user's last name + */ +@property (nonatomic, copy, readonly) NSString *lastName; +/** + The user's complete name + */ +@property (nonatomic, copy, readonly) NSString *name; +/** + A URL to the user's profile. + + Consider using Bolts and `FBSDKAppLinkResolver` to resolve this + to an app link to link directly to the user's profile in the Facebook app. + */ +@property (nonatomic, readonly) NSURL *linkURL; + +/** + The last time the profile data was fetched. + */ +@property (nonatomic, readonly) NSDate *refreshDate; + +/** + Gets the current FBSDKProfile instance. + */ ++ (FBSDKProfile *)currentProfile; + +/** + Sets the current instance and posts the appropriate notification if the profile parameter is different + than the receiver. + @param profile the profile to set + + This persists the profile to NSUserDefaults. + */ ++ (void)setCurrentProfile:(FBSDKProfile *)profile; + +/** + Indicates if `currentProfile` will automatically observe `FBSDKAccessTokenDidChangeNotification` notifications + @param enable YES is observing + + If observing, this class will issue a graph request for public profile data when the current token's userID + differs from the current profile. You can observe `FBSDKProfileDidChangeNotification` for when the profile is updated. + + Note that if `[FBSDKAccessToken currentAccessToken]` is unset, the `currentProfile` instance remains. It's also possible + for `currentProfile` to return nil until the data is fetched. + */ ++ (void)enableUpdatesOnAccessTokenChange:(BOOL)enable; + +/** + Loads the current profile and passes it to the completion block. + @param completion The block to be executed once the profile is loaded + + If the profile is already loaded, this method will call the completion block synchronously, otherwise it + will begin a graph request to update `currentProfile` and then call the completion block when finished. + */ ++ (void)loadCurrentProfileWithCompletion:(void(^)(FBSDKProfile *profile, NSError *error))completion; + +/** + A convenience method for returning a complete `NSURL` for retrieving the user's profile image. + @param mode The picture mode + @param size The height and width. This will be rounded to integer precision. + */ +- (NSURL *)imageURLForPictureMode:(FBSDKProfilePictureMode)mode size:(CGSize)size; + +/** + A convenience method for returning a Graph API path for retrieving the user's profile image. + +@warning use `imageURLForPictureMode:size:` instead + + You can pass this to a `FBSDKGraphRequest` instance to download the image. + @param mode The picture mode + @param size The height and width. This will be rounded to integer precision. + */ +- (NSString *)imagePathForPictureMode:(FBSDKProfilePictureMode)mode size:(CGSize)size +DEPRECATED_MSG_ATTRIBUTE("use imageURLForPictureMode:size: instead"); + +/** + Returns YES if the profile is equivalent to the receiver. + @param profile the profile to compare to. + */ +- (BOOL)isEqualToProfile:(FBSDKProfile *)profile; +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.m new file mode 100644 index 0000000..c785d1a --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.m @@ -0,0 +1,295 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKProfile+Internal.h" + +#import "FBSDKCoreKit+Internal.h" + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +NSNotificationName const FBSDKProfileDidChangeNotification = @"com.facebook.sdk.FBSDKProfile.FBSDKProfileDidChangeNotification";; + +#else + +NSString *const FBSDKProfileDidChangeNotification = @"com.facebook.sdk.FBSDKProfile.FBSDKProfileDidChangeNotification";; + +#endif + +NSString *const FBSDKProfileChangeOldKey = @"FBSDKProfileOld"; +NSString *const FBSDKProfileChangeNewKey = @"FBSDKProfileNew"; +static NSString *const FBSDKProfileUserDefaultsKey = @"com.facebook.sdk.FBSDKProfile.currentProfile"; +static FBSDKProfile *g_currentProfile; + +#define FBSDKPROFILE_USERID_KEY @"userID" +#define FBSDKPROFILE_FIRSTNAME_KEY @"firstName" +#define FBSDKPROFILE_MIDDLENAME_KEY @"middleName" +#define FBSDKPROFILE_LASTNAME_KEY @"lastName" +#define FBSDKPROFILE_NAME_KEY @"name" +#define FBSDKPROFILE_LINKURL_KEY @"linkURL" +#define FBSDKPROFILE_REFRESHDATE_KEY @"refreshDate" + +// Once a day +#define FBSDKPROFILE_STALE_IN_SECONDS (60 * 60 * 24) + +@implementation FBSDKProfile + +- (instancetype)initWithUserID:(NSString *)userID + firstName:(NSString *)firstName + middleName:(NSString *)middleName + lastName:(NSString *)lastName + name:(NSString *)name + linkURL:(NSURL *)linkURL + refreshDate:(NSDate *)refreshDate +{ + if ((self = [super init])) { + _userID = [userID copy]; + _firstName = [firstName copy]; + _middleName = [middleName copy]; + _lastName = [lastName copy]; + _name = [name copy]; + _linkURL = [linkURL copy]; + _refreshDate = [refreshDate copy] ?: [NSDate date]; + } + return self; +} + ++ (FBSDKProfile *)currentProfile +{ + return g_currentProfile; +} + ++ (void)setCurrentProfile:(FBSDKProfile *)profile +{ + if (profile != g_currentProfile && ![profile isEqualToProfile:g_currentProfile]) { + [[self class] cacheProfile:profile]; + NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + + [FBSDKInternalUtility dictionary:userInfo setObject:profile forKey:FBSDKProfileChangeNewKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:g_currentProfile forKey:FBSDKProfileChangeOldKey]; + g_currentProfile = profile; + [[NSNotificationCenter defaultCenter] postNotificationName:FBSDKProfileDidChangeNotification + object:[self class] + userInfo:userInfo]; + } +} + +- (NSURL *)imageURLForPictureMode:(FBSDKProfilePictureMode)mode size:(CGSize)size +{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + NSString *path = [self imagePathForPictureMode:mode size:size]; +#pragma clang diagnostic pop + return [FBSDKInternalUtility facebookURLWithHostPrefix:@"graph" + path:path + queryParameters:nil + error:NULL]; +} + +- (NSString *)imagePathForPictureMode:(FBSDKProfilePictureMode)mode size:(CGSize)size +{ + NSString *type; + switch (mode) { + case FBSDKProfilePictureModeNormal: type = @"normal"; break; + case FBSDKProfilePictureModeSquare: type = @"square"; break; + } + return [NSString stringWithFormat:@"%@/picture?type=%@&width=%d&height=%d", + _userID, + type, + (int) roundf(size.width), + (int) roundf(size.height)]; +} + ++ (void)enableUpdatesOnAccessTokenChange:(BOOL)enable +{ + if (enable) { + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(observeChangeAccessTokenChange:) + name:FBSDKAccessTokenDidChangeNotification + object:nil]; + } else { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + } +} + ++ (void)loadCurrentProfileWithCompletion:(void (^)(FBSDKProfile *, NSError *))completion +{ + [self loadProfileWithToken:[FBSDKAccessToken currentAccessToken] completion:completion]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone +{ + //immutable + return self; +} + +#pragma mark - Equality + +- (NSUInteger)hash +{ + NSUInteger subhashes[] = { + self.userID.hash, + self.firstName.hash, + self.middleName.hash, + self.lastName.hash, + self.name.hash, + self.linkURL.hash, + self.refreshDate.hash + }; + return [FBSDKMath hashWithIntegerArray:subhashes count:sizeof(subhashes) / sizeof(subhashes[0])]; +} + +- (BOOL)isEqual:(id)object +{ + if (self == object) { + return YES; + } + if (![object isKindOfClass:[FBSDKProfile class]]){ + return NO; + } + return [self isEqualToProfile:object]; +} + +- (BOOL)isEqualToProfile:(FBSDKProfile *)profile +{ + return ([_userID isEqualToString:profile.userID] && + [_firstName isEqualToString:profile.firstName] && + [_middleName isEqualToString:profile.middleName] && + [_lastName isEqualToString:profile.lastName] && + [_name isEqualToString:profile.name] && + [_linkURL isEqual:profile.linkURL] && + [_refreshDate isEqualToDate:profile.refreshDate]); +} +#pragma mark NSCoding + ++ (BOOL)supportsSecureCoding +{ + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + NSString *userID = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDKPROFILE_USERID_KEY]; + NSString *firstName = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDKPROFILE_FIRSTNAME_KEY]; + NSString *middleName = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDKPROFILE_MIDDLENAME_KEY]; + NSString *lastName = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDKPROFILE_LASTNAME_KEY]; + NSString *name = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDKPROFILE_NAME_KEY]; + NSURL *linkURL = [decoder decodeObjectOfClass:[NSURL class] forKey:FBSDKPROFILE_LINKURL_KEY]; + NSDate *refreshDate = [decoder decodeObjectOfClass:[NSURL class] forKey:FBSDKPROFILE_REFRESHDATE_KEY]; + return [self initWithUserID:userID + firstName:firstName + middleName:middleName + lastName:lastName + name:name + linkURL:linkURL + refreshDate:refreshDate]; +} + +- (void)encodeWithCoder:(NSCoder *)encoder +{ + [encoder encodeObject:self.userID forKey:FBSDKPROFILE_USERID_KEY]; + [encoder encodeObject:self.firstName forKey:FBSDKPROFILE_FIRSTNAME_KEY]; + [encoder encodeObject:self.middleName forKey:FBSDKPROFILE_MIDDLENAME_KEY]; + [encoder encodeObject:self.lastName forKey:FBSDKPROFILE_LASTNAME_KEY]; + [encoder encodeObject:self.name forKey:FBSDKPROFILE_NAME_KEY]; + [encoder encodeObject:self.linkURL forKey:FBSDKPROFILE_LINKURL_KEY]; + [encoder encodeObject:self.refreshDate forKey:FBSDKPROFILE_REFRESHDATE_KEY]; +} + +#pragma mark - Private + ++ (void)loadProfileWithToken:(FBSDKAccessToken *)token completion:(void (^)(FBSDKProfile *, NSError *))completion +{ + static FBSDKGraphRequestConnection *executingRequestConnection = nil; + + BOOL isStale = [[NSDate date] timeIntervalSinceDate:g_currentProfile.refreshDate] > FBSDKPROFILE_STALE_IN_SECONDS; + if (token && + (isStale || ![g_currentProfile.userID isEqualToString:token.userID])) { + FBSDKProfile *expectedCurrentProfile = g_currentProfile; + + NSString *graphPath = @"me?fields=id,first_name,middle_name,last_name,name,link"; + [executingRequestConnection cancel]; + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:graphPath + parameters:nil + flags:FBSDKGraphRequestFlagDoNotInvalidateTokenOnError | FBSDKGraphRequestFlagDisableErrorRecovery]; + executingRequestConnection = [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + if (expectedCurrentProfile != g_currentProfile) { + // current profile has already changed since request was started. Let's not overwrite. + if (completion != NULL) { + completion(nil, nil); + } + return; + } + FBSDKProfile *profile = nil; + if (!error) { + profile = [[FBSDKProfile alloc] initWithUserID:result[@"id"] + firstName:result[@"first_name"] + middleName:result[@"middle_name"] + lastName:result[@"last_name"] + name:result[@"name"] + linkURL:[NSURL URLWithString:result[@"link"]] + refreshDate:[NSDate date]]; + } + [[self class] setCurrentProfile:profile]; + if (completion != NULL) { + completion(profile, error); + } + }]; + } else if (completion != NULL) { + completion(g_currentProfile, nil); + } +} + ++ (void)observeChangeAccessTokenChange:(NSNotification *)notification +{ + FBSDKAccessToken *token = notification.userInfo[FBSDKAccessTokenChangeNewKey]; + [self loadProfileWithToken:token completion:NULL]; +} + +@end + +@implementation FBSDKProfile(Internal) + ++ (void)cacheProfile:(FBSDKProfile *) profile +{ + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; + if (profile) { + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:profile]; + [userDefaults setObject:data forKey:FBSDKProfileUserDefaultsKey]; + } else { + [userDefaults removeObjectForKey:FBSDKProfileUserDefaultsKey]; + } + [userDefaults synchronize]; +} + ++ (FBSDKProfile *)fetchCachedProfile +{ + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; + NSData *data = [userDefaults objectForKey:FBSDKProfileUserDefaultsKey]; + if (data != nil) { + @try { + return [NSKeyedUnarchiver unarchiveObjectWithData:data]; + } @catch (NSException *exception) { + return nil; + } + } + return nil; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.h new file mode 100644 index 0000000..aaf9bca --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.h @@ -0,0 +1,60 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +/** + FBSDKProfilePictureMode enum + Defines the aspect ratio mode for the source image of the profile picture. + */ +typedef NS_ENUM(NSUInteger, FBSDKProfilePictureMode) +{ + /** + A square cropped version of the image will be included in the view. + */ + FBSDKProfilePictureModeSquare, + /** + The original picture's aspect ratio will be used for the source image in the view. + */ + FBSDKProfilePictureModeNormal, +}; + +/** + A view to display a profile picture. + */ +@interface FBSDKProfilePictureView : UIView + +/** + The mode for the receiver to determine the aspect ratio of the source image. + */ +@property (nonatomic, assign) FBSDKProfilePictureMode pictureMode; + +/** + The profile ID to show the picture for. + */ +@property (nonatomic, copy) NSString *profileID; + +/** + Explicitly marks the receiver as needing to update the image. + + This method is called whenever any properties that affect the source image are modified, but this can also + be used to trigger a manual update of the image if it needs to be re-downloaded. + */ +- (void)setNeedsImageUpdate; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.m new file mode 100644 index 0000000..850aad3 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.m @@ -0,0 +1,373 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKProfilePictureView.h" + +#import "FBSDKAccessToken.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKMaleSilhouetteIcon.h" +#import "FBSDKMath.h" +#import "FBSDKUtility.h" + +@interface FBSDKProfilePictureViewState : NSObject + +- (instancetype)initWithProfileID:(NSString *)profileID + size:(CGSize)size + scale:(CGFloat)scale + pictureMode:(FBSDKProfilePictureMode)pictureMode + imageShouldFit:(BOOL)imageShouldFit; + +@property (nonatomic, assign, readonly) BOOL imageShouldFit; +@property (nonatomic, assign, readonly) FBSDKProfilePictureMode pictureMode; +@property (nonatomic, copy, readonly) NSString *profileID; +@property (nonatomic, assign, readonly) CGFloat scale; +@property (nonatomic, assign, readonly) CGSize size; + +- (BOOL)isEqualToState:(FBSDKProfilePictureViewState *)other; +- (BOOL)isValidForState:(FBSDKProfilePictureViewState *)other; + +@end + +@implementation FBSDKProfilePictureViewState + +- (instancetype)initWithProfileID:(NSString *)profileID + size:(CGSize)size + scale:(CGFloat)scale + pictureMode:(FBSDKProfilePictureMode)pictureMode + imageShouldFit:(BOOL)imageShouldFit +{ + if ((self = [super init])) { + _profileID = [profileID copy]; + _size = size; + _scale = scale; + _pictureMode = pictureMode; + _imageShouldFit = imageShouldFit; + } + return self; +} + +- (NSUInteger)hash +{ + NSUInteger subhashes[] = { + (NSUInteger)_imageShouldFit, + (NSUInteger)_size.width, + (NSUInteger)_size.height, + (NSUInteger)_scale, + (NSUInteger)_pictureMode, + _profileID.hash, + }; + return [FBSDKMath hashWithIntegerArray:subhashes count:sizeof(subhashes) / sizeof(subhashes[0])]; +} + +- (BOOL)isEqual:(id)object +{ + if (![object isKindOfClass:[FBSDKProfilePictureViewState class]]) { + return NO; + } + FBSDKProfilePictureViewState *other = (FBSDKProfilePictureViewState *)object; + return [self isEqualToState:other]; +} + +- (BOOL)isEqualToState:(FBSDKProfilePictureViewState *)other +{ + return ([self isValidForState:other] && + CGSizeEqualToSize(_size, other->_size) && + (_scale == other->_scale)); +} + +- (BOOL)isValidForState:(FBSDKProfilePictureViewState *)other +{ + return (other != nil && + (_imageShouldFit == other->_imageShouldFit) && + (_pictureMode == other->_pictureMode) && + [FBSDKInternalUtility object:_profileID isEqualToObject:other->_profileID]); +} + +@end + +@implementation FBSDKProfilePictureView +{ + BOOL _hasProfileImage; + UIImageView *_imageView; + FBSDKProfilePictureViewState *_lastState; + BOOL _needsImageUpdate; + BOOL _placeholderImageIsValid; +} + +#pragma mark - Object Lifecycle + +- (instancetype)initWithFrame:(CGRect)frame +{ + if ((self = [super initWithFrame:frame])) { + [self _configureProfilePictureView]; + } + return self; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder +{ + if ((self = [super initWithCoder:decoder])) { + [self _configureProfilePictureView]; + } + return self; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +#pragma mark - Properties + +- (void)setBounds:(CGRect)bounds +{ + CGRect currentBounds = self.bounds; + if (!CGRectEqualToRect(currentBounds, bounds)) { + super.bounds = bounds; + if (!CGSizeEqualToSize(currentBounds.size, bounds.size)) { + _placeholderImageIsValid = NO; + [self setNeedsImageUpdate]; + } + } +} + +- (UIViewContentMode)contentMode +{ + return _imageView.contentMode; +} + +- (void)setContentMode:(UIViewContentMode)contentMode +{ + if (_imageView.contentMode != contentMode) { + _imageView.contentMode = contentMode; + super.contentMode = contentMode; + [self setNeedsImageUpdate]; + } +} + +- (void)setMode:(FBSDKProfilePictureMode)pictureMode +{ + if (_pictureMode != pictureMode) { + _pictureMode = pictureMode; + [self setNeedsImageUpdate]; + } +} + +- (void)setProfileID:(NSString *)profileID +{ + if (![FBSDKInternalUtility object:_profileID isEqualToObject:profileID]) { + _profileID = [profileID copy]; + _placeholderImageIsValid = NO; + [self setNeedsImageUpdate]; + } +} + +#pragma mark - Public Methods + +- (void)setNeedsImageUpdate +{ + if (!_imageView || CGRectIsEmpty(self.bounds)) { + // we can't do anything with an empty view, so just bail out until we have a size + return; + } + + // ensure that we have an image. do this here so we can draw the placeholder image synchronously if we don't have one + if (!_placeholderImageIsValid && !_hasProfileImage) { + [self _setPlaceholderImage]; + } + + // debounce calls to needsImage against the main runloop + if (_needsImageUpdate) { + return; + } + _needsImageUpdate = YES; + __weak FBSDKProfilePictureView *weakSelf = self; + dispatch_async(dispatch_get_main_queue(), ^{ + [weakSelf _needsImageUpdate]; + }); +} + +#pragma mark - Helper Methods + ++ (void)_downloadImageWithState:(FBSDKProfilePictureViewState *)state + completionBlock:(void(^)(NSData *data))completionBlock; +{ + NSURL *imageURL = [self _imageURLWithState:state]; + if (!imageURL) { + return; + } + + NSURLRequest *request = [[NSURLRequest alloc] initWithURL:imageURL]; + NSURLSession *session = [NSURLSession sharedSession]; + [[session + dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + if (!error && data.length) { + completionBlock(data); + } + }] resume]; +} + ++ (NSURL *)_imageURLWithState:(FBSDKProfilePictureViewState *)state +{ + FBSDKAccessToken *accessToken = [FBSDKAccessToken currentAccessToken]; + if ([state.profileID isEqualToString:@"me"] && !accessToken) { + return nil; + } + NSString *path = [[NSString alloc] initWithFormat:@"/%@/picture", [FBSDKUtility URLEncode:state.profileID]]; + CGSize size = state.size; + NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init]; + parameters[@"width"] = @(size.width); + parameters[@"height"] = @(size.height); + [FBSDKInternalUtility dictionary:parameters setObject:accessToken.tokenString forKey:@"access_token"]; + return [FBSDKInternalUtility facebookURLWithHostPrefix:@"graph" path:path queryParameters:parameters error:NULL]; +} + +- (void)_accessTokenDidChangeNotification:(NSNotification *)notification +{ + if (![_profileID isEqualToString:@"me"] || !notification.userInfo[FBSDKAccessTokenDidChangeUserIDKey]) { + return; + } + _lastState = nil; + [self setNeedsImageUpdate]; +} + +- (void)_configureProfilePictureView +{ + _imageView = [[UIImageView alloc] initWithFrame:self.bounds]; + _imageView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); + [self addSubview:_imageView]; + + _profileID = @"me"; + self.backgroundColor = [UIColor whiteColor]; + self.contentMode = UIViewContentModeScaleAspectFit; + self.userInteractionEnabled = NO; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(_accessTokenDidChangeNotification:) + name:FBSDKAccessTokenDidChangeNotification + object:nil]; + + [self setNeedsImageUpdate]; +} + +- (BOOL)_imageShouldFit +{ + switch (self.contentMode) { + case UIViewContentModeBottom: + case UIViewContentModeBottomLeft: + case UIViewContentModeBottomRight: + case UIViewContentModeCenter: + case UIViewContentModeLeft: + case UIViewContentModeRedraw: + case UIViewContentModeRight: + case UIViewContentModeScaleAspectFit: + case UIViewContentModeTop: + case UIViewContentModeTopLeft: + case UIViewContentModeTopRight: + return YES; + case UIViewContentModeScaleAspectFill: + case UIViewContentModeScaleToFill: + return NO; + } +} + +- (CGSize)_imageSize:(BOOL)imageShouldFit scale:(CGFloat)scale +{ + // get the image size based on the contentMode and pictureMode + CGSize size = self.bounds.size; + switch (_pictureMode) { + case FBSDKProfilePictureModeSquare:{ + CGFloat imageSize; + if (imageShouldFit) { + imageSize = MIN(size.width, size.height); + } else { + imageSize = MAX(size.width, size.height); + } + size = CGSizeMake(imageSize, imageSize); + break; + } + case FBSDKProfilePictureModeNormal: + // use the bounds size + break; + } + + // adjust for the screen scale + size = CGSizeMake(size.width * scale, size.height * scale); + + return size; +} + +- (void)_needsImageUpdate +{ + _needsImageUpdate = NO; + + if (!_profileID) { + if (!_placeholderImageIsValid) { + [self _setPlaceholderImage]; + } + return; + } + + // if the current image is no longer representative of the current state, clear the current value out; otherwise, + // leave the current value until the new resolution image is downloaded + BOOL imageShouldFit = [self _imageShouldFit]; + UIScreen *screen = self.window.screen ?: [UIScreen mainScreen]; + CGFloat scale = screen.scale; + CGSize imageSize = [self _imageSize:imageShouldFit scale:scale]; + FBSDKProfilePictureViewState *state = [[FBSDKProfilePictureViewState alloc] initWithProfileID:_profileID + size:imageSize + scale:scale + pictureMode:_pictureMode + imageShouldFit:imageShouldFit]; + if (![_lastState isValidForState:state]) { + [self _setPlaceholderImage]; + } + _lastState = state; + + __weak FBSDKProfilePictureView *weakSelf = self; + [[self class] _downloadImageWithState:state completionBlock:^(NSData *data) { + [weakSelf _updateImageWithData:data state:state]; + }]; +} + +- (void)_setPlaceholderImage +{ + UIColor *fillColor = [UIColor colorWithRed:157.0/255.0 green:177.0/255.0 blue:204.0/255.0 alpha:1.0]; + _imageView.image = [[[FBSDKMaleSilhouetteIcon alloc] initWithColor:fillColor] imageWithSize:_imageView.bounds.size]; + _placeholderImageIsValid = YES; + _hasProfileImage = NO; +} + +- (void)_updateImageWithData:(NSData *)data state:(FBSDKProfilePictureViewState *)state +{ + // make sure we haven't updated the state since we began fetching the image + if (![state isValidForState:_lastState]) { + return; + } + UIImage *image = [[UIImage alloc] initWithData:data scale:state.scale]; + if (image) { + _imageView.image = image; + _hasProfileImage = YES; + } else { + _hasProfileImage = NO; + _placeholderImageIsValid = NO; + [self setNeedsImageUpdate]; + } +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.h new file mode 100644 index 0000000..4f79de5 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.h @@ -0,0 +1,272 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +/* + * Constants defining logging behavior. Use with <[FBSDKSettings setLoggingBehavior]>. + */ + +/** Include access token in logging. */ +FOUNDATION_EXPORT NSString *const FBSDKLoggingBehaviorAccessTokens; + +/** Log performance characteristics */ +FOUNDATION_EXPORT NSString *const FBSDKLoggingBehaviorPerformanceCharacteristics; + +/** Log FBSDKAppEvents interactions */ +FOUNDATION_EXPORT NSString *const FBSDKLoggingBehaviorAppEvents; + +/** Log Informational occurrences */ +FOUNDATION_EXPORT NSString *const FBSDKLoggingBehaviorInformational; + +/** Log cache errors. */ +FOUNDATION_EXPORT NSString *const FBSDKLoggingBehaviorCacheErrors; + +/** Log errors from SDK UI controls */ +FOUNDATION_EXPORT NSString *const FBSDKLoggingBehaviorUIControlErrors; + +/** Log debug warnings from API response, i.e. when friends fields requested, but user_friends permission isn't granted. */ +FOUNDATION_EXPORT NSString *const FBSDKLoggingBehaviorGraphAPIDebugWarning; + +/** Log warnings from API response, i.e. when requested feature will be deprecated in next version of API. + Info is the lowest level of severity, using it will result in logging all previously mentioned levels. + */ +FOUNDATION_EXPORT NSString *const FBSDKLoggingBehaviorGraphAPIDebugInfo; + +/** Log errors from SDK network requests */ +FOUNDATION_EXPORT NSString *const FBSDKLoggingBehaviorNetworkRequests; + +/** Log errors likely to be preventable by the developer. This is in the default set of enabled logging behaviors. */ +FOUNDATION_EXPORT NSString *const FBSDKLoggingBehaviorDeveloperErrors; + +@interface FBSDKSettings : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + Get the Facebook App ID used by the SDK. + + If not explicitly set, the default will be read from the application's plist (FacebookAppID). + */ ++ (NSString *)appID; + +/** + Set the Facebook App ID to be used by the SDK. + @param appID The Facebook App ID to be used by the SDK. + */ ++ (void)setAppID:(NSString *)appID; + +/** + Get the default url scheme suffix used for sessions. + + If not explicitly set, the default will be read from the application's plist (FacebookUrlSchemeSuffix). + */ ++ (NSString *)appURLSchemeSuffix; + +/** + Set the app url scheme suffix used by the SDK. + @param appURLSchemeSuffix The url scheme suffix to be used by the SDK. + */ ++ (void)setAppURLSchemeSuffix:(NSString *)appURLSchemeSuffix; + +/** + Retrieve the Client Token that has been set via [FBSDKSettings setClientToken]. + + If not explicitly set, the default will be read from the application's plist (FacebookClientToken). + */ ++ (NSString *)clientToken; + +/** + Sets the Client Token for the Facebook App. + + This is needed for certain API calls when made anonymously, without a user-based access token. + @param clientToken The Facebook App's "client token", which, for a given appid can be found in the Security + section of the Advanced tab of the Facebook App settings found at + */ ++ (void)setClientToken:(NSString *)clientToken; + +/** + A convenient way to toggle error recovery for all FBSDKGraphRequest instances created after this is set. + @param disableGraphErrorRecovery YES or NO. + */ ++ (void)setGraphErrorRecoveryDisabled:(BOOL)disableGraphErrorRecovery; + +/** + Get the Facebook Display Name used by the SDK. + + If not explicitly set, the default will be read from the application's plist (FacebookDisplayName). + */ ++ (NSString *)displayName; + +/** + Set the default Facebook Display Name to be used by the SDK. + + This should match the Display Name that has been set for the app with the corresponding Facebook App ID, + in the Facebook App Dashboard. + @param displayName The Facebook Display Name to be used by the SDK. + */ ++ (void)setDisplayName:(NSString *)displayName; + +/** + Get the Facebook domain part. + + If not explicitly set, the default will be read from the application's plist (FacebookDomainPart). + */ ++ (NSString *)facebookDomainPart; + +/** + Set the subpart of the Facebook domain. + + This can be used to change the Facebook domain (e.g. @"beta") so that requests will be sent to + graph.beta.facebook.com + @param facebookDomainPart The domain part to be inserted into facebook.com. + */ ++ (void)setFacebookDomainPart:(NSString *)facebookDomainPart; + +/** + The quality of JPEG images sent to Facebook from the SDK. + + If not explicitly set, the default is 0.9. + + @see [UIImageJPEGRepresentation](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIKitFunctionReference/#//apple_ref/c/func/UIImageJPEGRepresentation) */ ++ (CGFloat)JPEGCompressionQuality; + +/** + Set the quality of JPEG images sent to Facebook from the SDK. + @param JPEGCompressionQuality The quality for JPEG images, expressed as a value from 0.0 to 1.0. + + @see [UIImageJPEGRepresentation](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIKitFunctionReference/#//apple_ref/c/func/UIImageJPEGRepresentation) */ ++ (void)setJPEGCompressionQuality:(CGFloat)JPEGCompressionQuality; + +/** + Flag which controls the auto logging of basic app events, such as activateApp and deactivateApp. + If not explicitly set, the default is 1 - true + */ ++ (NSNumber *)autoLogAppEventsEnabled; + +/** + Set the flag which controls the auto logging of basic app events, such as activateApp and deactivateApp. + @param AutoLogAppEventsEnabled Flag value, expressed as a value from 0 - false or 1 - true. + */ ++ (void)setAutoLogAppEventsEnabled:(NSNumber *)AutoLogAppEventsEnabled; + +/** + Flag which controls the fb_codeless_debug logging event + If not explicitly set, the default is 1 - true + */ ++ (NSNumber *)codelessDebugLogEnabled; + +/** + Set the flag which controls the fb_codeless_debug logging event + @param CodelessDebugLogEnabled Flag value, expressed as a value from 0 - false or 1 - true. + */ ++ (void)setCodelessDebugLogEnabled:(NSNumber *)CodelessDebugLogEnabled; + +/** + Flag which controls whether advertiserID could be collected. + If not explicitly set, the default is 1 - true + */ ++ (NSNumber *)advertiserIDCollectionEnabled; + +/** + Set the flag which controls ontrols whether advertiserID could be collected. + @param AdvertiserIDCollectionEnabled Flag value, expressed as a value from 0 - false or 1 - true. + */ ++ (void)setAdvertiserIDCollectionEnabled:(NSNumber *)AdvertiserIDCollectionEnabled; + +/** + Gets whether data such as that generated through FBSDKAppEvents and sent to Facebook should be restricted from being used for other than analytics and conversions. Defaults to NO. This value is stored on the device and persists across app launches. + */ ++ (BOOL)limitEventAndDataUsage; + +/** + Sets whether data such as that generated through FBSDKAppEvents and sent to Facebook should be restricted from being used for other than analytics and conversions. Defaults to NO. This value is stored on the device and persists across app launches. + + @param limitEventAndDataUsage The desired value. + */ ++ (void)setLimitEventAndDataUsage:(BOOL)limitEventAndDataUsage; + +/** + Retrieve the current iOS SDK version. + */ ++ (NSString *)sdkVersion; + +/** + The current Facebook SDK logging behavior. + */ +@property (class, nonatomic, copy) NSSet *loggingBehaviors; + ++ (NSSet *)loggingBehavior +DEPRECATED_MSG_ATTRIBUTE("Renamed `loggingBehaviors`"); + +/** + Set the current Facebook SDK logging behavior. This should consist of strings defined as + constants with FBSDKLoggingBehavior*. + + @param loggingBehavior A set of strings indicating what information should be logged. If nil is provided, the logging + behavior is reset to the default set of enabled behaviors. Set to an empty set in order to disable all logging. + + + You can also define this via an array in your app plist with key "FacebookLoggingBehavior" or add and remove individual values via enableLoggingBehavior: or disableLogginBehavior: + */ ++ (void)setLoggingBehavior:(NSSet *)loggingBehavior; + +/** + Enable a particular Facebook SDK logging behavior. + + @param loggingBehavior The LoggingBehavior to enable. This should be a string defined as a constant with FBSDKLoggingBehavior*. + */ ++ (void)enableLoggingBehavior:(NSString *)loggingBehavior; + +/** + Disable a particular Facebook SDK logging behavior. + + @param loggingBehavior The LoggingBehavior to disable. This should be a string defined as a constant with FBSDKLoggingBehavior*. + */ ++ (void)disableLoggingBehavior:(NSString *)loggingBehavior; + +/** + Set the user defaults key used by legacy token caches. + + @param tokenInformationKeyName the key used by legacy token caches. + + + Use this only if you customized FBSessionTokenCachingStrategy in v3.x of + the Facebook SDK for iOS. +*/ ++ (void)setLegacyUserDefaultTokenInformationKeyName:(NSString *)tokenInformationKeyName; + +/** + Get the user defaults key used by legacy token caches. +*/ ++ (NSString *)legacyUserDefaultTokenInformationKeyName; + +/** + Overrides the default Graph API version to use with `FBSDKGraphRequests`. This overrides `FBSDK_TARGET_PLATFORM_VERSION`. + + The string should be of the form `@"v2.7"`. +*/ ++ (void)setGraphAPIVersion:(NSString *)version; + +/** + Returns the default Graph API version. Defaults to `FBSDK_TARGET_PLATFORM_VERSION` +*/ ++ (NSString *)graphAPIVersion; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.m new file mode 100644 index 0000000..4790f1c --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.m @@ -0,0 +1,306 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKSettings+Internal.h" + +#import "FBSDKAccessTokenCache.h" +#import "FBSDKAccessTokenExpirer.h" +#import "FBSDKCoreKit.h" + +#define FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(TYPE, PLIST_KEY, GETTER, SETTER, DEFAULT_VALUE) \ +static TYPE *g_##PLIST_KEY = nil; \ ++ (TYPE *)GETTER \ +{ \ + if (!g_##PLIST_KEY) { \ + g_##PLIST_KEY = [[[NSBundle mainBundle] objectForInfoDictionaryKey:@#PLIST_KEY] copy] ?: DEFAULT_VALUE; \ + } \ + return g_##PLIST_KEY; \ +} \ ++ (void)SETTER:(TYPE *)value { \ + g_##PLIST_KEY = [value copy]; \ +} + +#define FBSDKSETTINGS_AUTOLOG_APPEVENTS_ENABLED_USER_DEFAULTS_KEY @"com.facebook.sdk:autoLogAppEventsEnabled%@" +#define FBSDKSETTINGS_ADVERTISERID_COLLECTION_ENABLED_USER_DEFAULTS_KEY @"com.facebook.sdk:advertiserIDCollectionEnabled%@" + +NSString *const FBSDKLoggingBehaviorAccessTokens = @"include_access_tokens"; +NSString *const FBSDKLoggingBehaviorPerformanceCharacteristics = @"perf_characteristics"; +NSString *const FBSDKLoggingBehaviorAppEvents = @"app_events"; +NSString *const FBSDKLoggingBehaviorInformational = @"informational"; +NSString *const FBSDKLoggingBehaviorCacheErrors = @"cache_errors"; +NSString *const FBSDKLoggingBehaviorUIControlErrors = @"ui_control_errors"; +NSString *const FBSDKLoggingBehaviorDeveloperErrors = @"developer_errors"; +NSString *const FBSDKLoggingBehaviorGraphAPIDebugWarning = @"graph_api_debug_warning"; +NSString *const FBSDKLoggingBehaviorGraphAPIDebugInfo = @"graph_api_debug_info"; +NSString *const FBSDKLoggingBehaviorNetworkRequests = @"network_requests"; + +static NSObject *g_tokenCache; +static NSMutableSet *g_loggingBehaviors; +static NSString *g_legacyUserDefaultTokenInformationKeyName = @"FBAccessTokenInformationKey"; +static NSString *const FBSDKSettingsLimitEventAndDataUsage = @"com.facebook.sdk:FBSDKSettingsLimitEventAndDataUsage"; +static BOOL g_disableErrorRecovery; +static NSString *g_userAgentSuffix; +static NSString *g_defaultGraphAPIVersion; +static FBSDKAccessTokenExpirer *g_accessTokenExpirer; +static NSString *const FBSDKSettingsAutoLogAppEventsEnabled = @"FacebookAutoLogAppEventsEnabled"; +static NSString *const FBSDKSettingsAdvertiserIDCollectionEnabled = @"FacebookAdvertiserIDCollectionEnabled"; +static NSNumber *g_autoLogAppEventsEnabled; +static NSNumber *g_advertiserIDCollectionEnabled; + +@implementation FBSDKSettings + ++ (void)initialize +{ + if (self == [FBSDKSettings class]) { + NSString *appID = [self appID]; + g_tokenCache = [[FBSDKAccessTokenCache alloc] init]; + g_accessTokenExpirer = [[FBSDKAccessTokenExpirer alloc] init]; + // Fetch meta data from plist and overwrite the value with NSUserDefaults if possible + g_autoLogAppEventsEnabled = [self appEventSettingsForPlistKey:FBSDKSettingsAutoLogAppEventsEnabled defaultValue:@YES]; + g_autoLogAppEventsEnabled = [self appEventSettingsForUserDefaultsKey:[NSString stringWithFormat:FBSDKSETTINGS_AUTOLOG_APPEVENTS_ENABLED_USER_DEFAULTS_KEY, appID] defaultValue:g_autoLogAppEventsEnabled]; + [[NSUserDefaults standardUserDefaults] setObject:g_autoLogAppEventsEnabled forKey:[NSString stringWithFormat:FBSDKSETTINGS_AUTOLOG_APPEVENTS_ENABLED_USER_DEFAULTS_KEY, appID]]; + g_advertiserIDCollectionEnabled = [self appEventSettingsForPlistKey:FBSDKSettingsAdvertiserIDCollectionEnabled defaultValue:@YES]; + g_advertiserIDCollectionEnabled = [self appEventSettingsForUserDefaultsKey:[NSString stringWithFormat:FBSDKSETTINGS_ADVERTISERID_COLLECTION_ENABLED_USER_DEFAULTS_KEY, appID] defaultValue:g_advertiserIDCollectionEnabled]; + [[NSUserDefaults standardUserDefaults] setObject:g_advertiserIDCollectionEnabled forKey:[NSString stringWithFormat:FBSDKSETTINGS_ADVERTISERID_COLLECTION_ENABLED_USER_DEFAULTS_KEY, appID]]; + } +} + +#pragma mark - Plist Configuration Settings + +FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(NSString, FacebookAppID, appID, setAppID, nil); +FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(NSString, FacebookUrlSchemeSuffix, appURLSchemeSuffix, setAppURLSchemeSuffix, nil); +FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(NSString, FacebookClientToken, clientToken, setClientToken, nil); +FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(NSString, FacebookDisplayName, displayName, setDisplayName, nil); +FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(NSString, FacebookDomainPart, facebookDomainPart, setFacebookDomainPart, nil); +FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(NSNumber, FacebookJpegCompressionQuality, _JPEGCompressionQualityNumber, _setJPEGCompressionQualityNumber, @0.9); +FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(NSNumber, FacebookCodelessDebugLogEnabled, codelessDebugLogEnabled, + setCodelessDebugLogEnabled, @0); + ++ (void)setGraphErrorRecoveryDisabled:(BOOL)disableGraphErrorRecovery { + g_disableErrorRecovery = disableGraphErrorRecovery; +} + ++ (BOOL)isGraphErrorRecoveryDisabled { + return g_disableErrorRecovery; +} + ++ (CGFloat)JPEGCompressionQuality +{ + return [self _JPEGCompressionQualityNumber].floatValue; +} + ++ (void)setJPEGCompressionQuality:(CGFloat)JPEGCompressionQuality +{ + [self _setJPEGCompressionQualityNumber:@(JPEGCompressionQuality)]; +} + ++ (BOOL)limitEventAndDataUsage +{ + NSNumber *storedValue = [[NSUserDefaults standardUserDefaults] objectForKey:FBSDKSettingsLimitEventAndDataUsage]; + if (storedValue == nil) { + return NO; + } + return storedValue.boolValue; +} + ++ (void)setLimitEventAndDataUsage:(BOOL)limitEventAndDataUsage +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults setObject:@(limitEventAndDataUsage) forKey:FBSDKSettingsLimitEventAndDataUsage]; + [defaults synchronize]; +} + ++ (NSSet *)loggingBehaviors +{ + if (!g_loggingBehaviors) { + NSArray *bundleLoggingBehaviors = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"FacebookLoggingBehavior"]; + if (bundleLoggingBehaviors) { + g_loggingBehaviors = [[NSMutableSet alloc] initWithArray:bundleLoggingBehaviors]; + } else { + // Establish set of default enabled logging behaviors. You can completely disable logging by + // specifying an empty array for FacebookLoggingBehavior in your Info.plist. + g_loggingBehaviors = [[NSMutableSet alloc] initWithObjects:FBSDKLoggingBehaviorDeveloperErrors, nil]; + } + } + return [g_loggingBehaviors copy]; +} + ++ (void)setLoggingBehaviors:(NSSet *)loggingBehaviors +{ + if (![g_loggingBehaviors isEqualToSet:loggingBehaviors]) { + g_loggingBehaviors = [loggingBehaviors mutableCopy]; + + [self updateGraphAPIDebugBehavior]; + } +} + ++ (NSSet *)loggingBehavior +{ + return [self loggingBehaviors]; +} + ++ (void)setLoggingBehavior:(NSSet *)loggingBehavior +{ + [self setLoggingBehaviors:loggingBehavior]; +} + ++ (void)enableLoggingBehavior:(NSString *)loggingBehavior +{ + if (!g_loggingBehaviors) { + [self loggingBehaviors]; + } + [g_loggingBehaviors addObject:loggingBehavior]; + [self updateGraphAPIDebugBehavior]; +} + ++ (void)disableLoggingBehavior:(NSString *)loggingBehavior +{ + if (!g_loggingBehaviors) { + [self loggingBehaviors]; + } + [g_loggingBehaviors removeObject:loggingBehavior]; + [self updateGraphAPIDebugBehavior]; +} + ++ (void)setLegacyUserDefaultTokenInformationKeyName:(NSString *)tokenInformationKeyName +{ + if (![g_legacyUserDefaultTokenInformationKeyName isEqualToString:tokenInformationKeyName]) { + g_legacyUserDefaultTokenInformationKeyName = tokenInformationKeyName; + } +} + ++ (NSString *)legacyUserDefaultTokenInformationKeyName +{ + return g_legacyUserDefaultTokenInformationKeyName; +} + +#pragma mark - Readonly Configuration Settings + ++ (NSString *)sdkVersion +{ + return FBSDK_VERSION_STRING; +} + +#pragma mark - Internal + ++ (NSObject *)accessTokenCache +{ + return g_tokenCache; +} + ++ (void)setAccessTokenCache:(NSObject *)cache +{ + if (g_tokenCache != cache) { + g_tokenCache = cache; + } +} + ++ (NSString *)userAgentSuffix +{ + return g_userAgentSuffix; +} + ++ (void)setUserAgentSuffix:(NSString *)suffix +{ + if (![g_userAgentSuffix isEqualToString:suffix]) { + g_userAgentSuffix = suffix; + } +} + ++ (void)setGraphAPIVersion:(NSString *)version +{ + if (![g_defaultGraphAPIVersion isEqualToString:version]) + { + g_defaultGraphAPIVersion = version; + } +} + ++ (NSString *)graphAPIVersion +{ + return g_defaultGraphAPIVersion ?: FBSDK_TARGET_PLATFORM_VERSION; +} + ++ (NSNumber *)appEventSettingsForPlistKey:(NSString *)plistKey + defaultValue:(NSNumber *)defaultValue +{ + return [[[NSBundle mainBundle] objectForInfoDictionaryKey:plistKey] copy] ?: defaultValue; +} + ++ (NSNumber *)appEventSettingsForUserDefaultsKey:(NSString *)userDefaultsKey + defaultValue:(NSNumber *)defaultValue +{ + NSData *data = [[NSUserDefaults standardUserDefaults] objectForKey:userDefaultsKey]; + if ([data isKindOfClass:[NSNumber class]]) { + return (NSNumber *)data; + } + return defaultValue; +} + ++ (NSNumber *)autoLogAppEventsEnabled +{ + return g_autoLogAppEventsEnabled; +} + ++ (void)setAutoLogAppEventsEnabled:(NSNumber *)autoLogAppEventsEnabled +{ + if (autoLogAppEventsEnabled == nil || [g_autoLogAppEventsEnabled isEqual:autoLogAppEventsEnabled]) { + return; + } + + g_autoLogAppEventsEnabled = [autoLogAppEventsEnabled copy]; + [[NSUserDefaults standardUserDefaults] setObject:g_autoLogAppEventsEnabled forKey:[NSString stringWithFormat:FBSDKSETTINGS_AUTOLOG_APPEVENTS_ENABLED_USER_DEFAULTS_KEY, [self appID]]]; +} + ++ (NSNumber *)advertiserIDCollectionEnabled +{ + return g_advertiserIDCollectionEnabled; +} + ++ (void)setAdvertiserIDCollectionEnabled:(NSNumber *)advertiserIDCollectionEnabled +{ + if (advertiserIDCollectionEnabled == nil || [g_advertiserIDCollectionEnabled isEqual:advertiserIDCollectionEnabled]) { + return; + } + + g_advertiserIDCollectionEnabled = [advertiserIDCollectionEnabled copy]; + [[NSUserDefaults standardUserDefaults] setObject:g_advertiserIDCollectionEnabled forKey:[NSString stringWithFormat:FBSDKSETTINGS_ADVERTISERID_COLLECTION_ENABLED_USER_DEFAULTS_KEY, [self appID]]]; +} + +#pragma mark - Internal - Graph API Debug + ++ (void)updateGraphAPIDebugBehavior +{ + // Enable Warnings everytime Info is enabled + if ([g_loggingBehaviors containsObject:FBSDKLoggingBehaviorGraphAPIDebugInfo] + && ![g_loggingBehaviors containsObject:FBSDKLoggingBehaviorGraphAPIDebugWarning]) { + [g_loggingBehaviors addObject:FBSDKLoggingBehaviorGraphAPIDebugWarning]; + } +} + ++ (NSString *)graphAPIDebugParamValue +{ + if ([[self loggingBehaviors] containsObject:FBSDKLoggingBehaviorGraphAPIDebugInfo]) { + return @"info"; + } else if ([[self loggingBehaviors] containsObject:FBSDKLoggingBehaviorGraphAPIDebugWarning]) { + return @"warning"; + } + + return nil; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.h new file mode 100644 index 0000000..7373639 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.h @@ -0,0 +1,104 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@class FBSDKAccessToken; + +/** + + Callback block for returning an array of FBSDKAccessToken instances (and possibly `NSNull` instances); or an error. + */ +typedef void (^FBSDKTestUsersManagerRetrieveTestAccountTokensHandler)(NSArray *tokens, NSError *error) ; + +/** + + Callback block for removing a test user. + */ +typedef void (^FBSDKTestUsersManagerRemoveTestAccountHandler)(NSError *error) ; + + +/** + Provides methods for managing test accounts for testing Facebook integration. + + + Facebook allows developers to create test accounts for testing their applications' + Facebook integration (see https://developers.facebook.com/docs/test_users/). This class + simplifies use of these accounts for writing tests. It is not designed for use in + production application code. + + This class will make Graph API calls on behalf of your app to manage test accounts and requires + an app id and app secret. You will typically use this class to write unit or integration tests. + Make sure you NEVER include your app secret in your production app. + */ +@interface FBSDKTestUsersManager : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + construct or return the shared instance + @param appID the Facebook app id + @param appSecret the Facebook app secret + */ ++ (instancetype)sharedInstanceForAppID:(NSString *)appID appSecret:(NSString *)appSecret; + +/** + retrieve FBSDKAccessToken instances for test accounts with the specific permissions. + @param arraysOfPermissions an array of permissions sets, such as @[ [NSSet setWithObject:@"email"], [NSSet setWithObject:@"user_birthday"]] + if you needed two test accounts with email and birthday permissions, respectively. You can pass in empty nested sets + if you need two arbitrary test accounts. For convenience, passing nil is treated as @[ [NSSet set] ] + for fetching a single test user. + @param createIfNotFound if YES, new test accounts are created if no test accounts existed that fit the permissions + requirement + @param handler the callback to invoke which will return an array of `FBAccessTokenData` instances or an `NSError`. + If param `createIfNotFound` is NO, the array may contain `[NSNull null]` instances. + + + If you are requesting test accounts with differing number of permissions, try to order + `arrayOfPermissionsArrays` so that the most number of permissions come first to minimize creation of new + test accounts. + */ +- (void)requestTestAccountTokensWithArraysOfPermissions:(NSArray *)arraysOfPermissions + createIfNotFound:(BOOL)createIfNotFound + completionHandler:(FBSDKTestUsersManagerRetrieveTestAccountTokensHandler)handler; + +/** + add a test account with the specified permissions + @param permissions the set of permissions, e.g., [NSSet setWithObjects:@"email", @"user_friends"] + @param handler the callback handler + */ +- (void)addTestAccountWithPermissions:(NSSet *)permissions + completionHandler:(FBSDKTestUsersManagerRetrieveTestAccountTokensHandler)handler; + +/** + remove a test account for the given user id + @param userId the user id + @param handler the callback handler + */ +- (void)removeTestAccount:(NSString *)userId completionHandler:(FBSDKTestUsersManagerRemoveTestAccountHandler)handler; + +/** + Make two test users friends with each other. + @param first the token of the first user + @param second the token of the second user + @param callback the callback handler + */ +- (void)makeFriendsWithFirst:(FBSDKAccessToken *)first second:(FBSDKAccessToken *)second callback:(void (^)(NSError *))callback; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.m new file mode 100644 index 0000000..d6e45c7 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.m @@ -0,0 +1,328 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKTestUsersManager.h" + +#import "FBSDKCoreKit+Internal.h" + +static NSString *const kFBGraphAPITestUsersPathFormat = @"%@/accounts/test-users"; +static NSString *const kAccountsDictionaryTokenKey = @"access_token"; +static NSString *const kAccountsDictionaryPermissionsKey = @"permissions"; +static NSMutableDictionary *gInstancesDictionary; + +@interface FBSDKTestUsersManager() +- (instancetype)initWithAppID:(NSString *)appID appSecret:(NSString *)appSecret NS_DESIGNATED_INITIALIZER; +@end + +@implementation FBSDKTestUsersManager +{ + NSString *_appID; + NSString *_appSecret; + // dictionary with format like: + // { user_id : { kAccountsDictionaryTokenKey : "token", + // kAccountsDictionaryPermissionsKey : [ permissions ] } + NSMutableDictionary *_accounts; +} + +- (instancetype)initWithAppID:(NSString *)appID appSecret:(NSString *)appSecret { + if ((self = [super init])) { + _appID = [appID copy]; + _appSecret = [appSecret copy]; + _accounts = [NSMutableDictionary dictionary]; + } + return self; +} + ++ (instancetype)sharedInstanceForAppID:(NSString *)appID appSecret:(NSString *)appSecret { + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + gInstancesDictionary = [NSMutableDictionary dictionary]; + }); + + NSString *instanceKey = [NSString stringWithFormat:@"%@|%@", appID, appSecret]; + if (!gInstancesDictionary[instanceKey]) { + gInstancesDictionary[instanceKey] = [[FBSDKTestUsersManager alloc] initWithAppID:appID appSecret:appSecret]; + } + return gInstancesDictionary[instanceKey]; +} + +- (void)requestTestAccountTokensWithArraysOfPermissions:(NSArray *)arraysOfPermissions + createIfNotFound:(BOOL)createIfNotFound + completionHandler:(FBSDKTestUsersManagerRetrieveTestAccountTokensHandler)handler { + arraysOfPermissions = arraysOfPermissions ?: @[[NSSet set]]; + + // wrap work in a block so that we can chain it to after a fetch of existing accounts if we need to. + void (^helper)(NSError *) = ^(NSError *error){ + if (error) { + if (handler) { + handler(nil, error); + } + return; + } + NSMutableArray *tokenDatum = [NSMutableArray arrayWithCapacity:arraysOfPermissions.count]; + NSMutableSet *collectedUserIds = [NSMutableSet setWithCapacity:arraysOfPermissions.count]; + __block BOOL canInvokeHandler = YES; + __weak id weakSelf = self; + [arraysOfPermissions enumerateObjectsUsingBlock:^(NSSet *desiredPermissions, NSUInteger idx, BOOL *stop) { + NSArray* userIdAndTokenPair = [self userIdAndTokenOfExistingAccountWithPermissions:desiredPermissions skip:collectedUserIds]; + if (!userIdAndTokenPair) { + if (createIfNotFound) { + [self addTestAccountWithPermissions:desiredPermissions + completionHandler:^(NSArray *tokens, NSError *addError) { + if (addError) { + if (handler) { + handler(nil, addError); + } + } else { + [weakSelf requestTestAccountTokensWithArraysOfPermissions:arraysOfPermissions + createIfNotFound:createIfNotFound + completionHandler:handler]; + } + }]; + // stop the enumeration (ane flag so that callback to addTestAccount* will resolve our handler now). + canInvokeHandler = NO; + *stop = YES; + return; + } else { + [tokenDatum addObject:[NSNull null]]; + } + } else { + NSString *userId = userIdAndTokenPair[0]; + NSString *tokenString = userIdAndTokenPair[1]; + [collectedUserIds addObject:userId]; + [tokenDatum addObject:[self tokenDataForTokenString:tokenString + permissions:desiredPermissions + userId:userId]]; + } + }]; + + if (canInvokeHandler && handler) { + handler(tokenDatum, nil); + } + }; + if (_accounts.count == 0) { + [self fetchExistingTestAccountsWithAfterCursor:nil handler:helper]; + } else { + helper(NULL); + } +} + +- (void)addTestAccountWithPermissions:(NSSet *)permissions + completionHandler:(FBSDKTestUsersManagerRetrieveTestAccountTokensHandler)handler { + NSDictionary *params = @{ + @"installed" : @"true", + @"permissions" : [permissions.allObjects componentsJoinedByString:@","], + @"access_token" : self.appAccessToken + }; + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:[NSString stringWithFormat:kFBGraphAPITestUsersPathFormat, _appID] + parameters:params + tokenString:[self appAccessToken] + version:nil + HTTPMethod:@"POST"]; + [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + if (error) { + if (handler) { + handler(nil, error); + } + } else { + NSMutableDictionary *accountData = [NSMutableDictionary dictionaryWithCapacity:2]; + accountData[kAccountsDictionaryPermissionsKey] = [NSSet setWithSet:permissions]; + accountData[kAccountsDictionaryTokenKey] = result[@"access_token"]; + self->_accounts[result[@"id"]] = accountData; + + if (handler) { + FBSDKAccessToken *token = [self tokenDataForTokenString:accountData[kAccountsDictionaryTokenKey] + permissions:permissions + userId:result[@"id"]]; + handler(@[token], nil); + } + } + }]; +} + +- (void)makeFriendsWithFirst:(FBSDKAccessToken *)first second:(FBSDKAccessToken *)second callback:(void (^)(NSError *))callback +{ + __block int expectedCount = 2; + void (^complete)(NSError *) = ^(NSError *error) { + // ignore if they're already friends or pending request + if ([error.userInfo[FBSDKGraphRequestErrorGraphErrorCodeKey] integerValue] == 522 || + [error.userInfo[FBSDKGraphRequestErrorGraphErrorCodeKey] integerValue] == 520) { + error = nil; + } + if (--expectedCount == 0 || error) { + callback(error); + } + }; + FBSDKGraphRequest *one = [[FBSDKGraphRequest alloc] initWithGraphPath:[NSString stringWithFormat:@"%@/friends/%@", first.userID, second.userID] + parameters:nil + tokenString:first.tokenString + version:nil + HTTPMethod:@"POST"]; + FBSDKGraphRequest *two = [[FBSDKGraphRequest alloc] initWithGraphPath:[NSString stringWithFormat:@"%@/friends/%@", second.userID, first.userID] + parameters:nil + tokenString:second.tokenString + version:nil + HTTPMethod:@"POST"]; + FBSDKGraphRequestConnection *conn = [[FBSDKGraphRequestConnection alloc] init]; + [conn addRequest:one + batchEntryName:@"first" + completionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + complete(error); + }]; + [conn addRequest:two + batchParameters:@{ @"depends_on" : @"first"} + completionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + complete(error); + }]; + [conn start]; +} + +- (void)removeTestAccount:(NSString *)userId completionHandler:(FBSDKTestUsersManagerRemoveTestAccountHandler)handler { + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:userId + parameters:nil + tokenString:self.appAccessToken + version:nil + HTTPMethod:@"DELETE"]; + [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + if (handler) { + handler(error); + } + }]; + [_accounts removeObjectForKey:userId]; +} + +#pragma mark - private methods +- (FBSDKAccessToken *)tokenDataForTokenString:(NSString *)tokenString permissions:(NSSet *)permissions userId:(NSString *)userId{ + return [[FBSDKAccessToken alloc] initWithTokenString:tokenString + permissions:permissions.allObjects + declinedPermissions:nil + appID:_appID + userID:userId + expirationDate:nil + refreshDate:nil + dataAccessExpirationDate:nil]; +} + +- (NSArray *)userIdAndTokenOfExistingAccountWithPermissions:(NSSet *)permissions skip:(NSSet *)setToSkip { + __block NSString *userId = nil; + __block NSString *token = nil; + + [_accounts enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSDictionary *accountData, BOOL *stop) { + if ([setToSkip containsObject:key]) { + return; + } + NSSet *accountPermissions = accountData[kAccountsDictionaryPermissionsKey]; + if ([permissions isSubsetOfSet:accountPermissions]) { + token = accountData[kAccountsDictionaryTokenKey]; + userId = key; + *stop = YES; + } + }]; + if (userId && token) { + return @[userId, token]; + } else { + return nil; + } +} + +- (NSString *)appAccessToken { + return [NSString stringWithFormat:@"%@|%@", _appID, _appSecret]; +} + +- (void)fetchExistingTestAccountsWithAfterCursor:(NSString *)after handler:(void(^)(NSError *error))handler { + FBSDKGraphRequestConnection *connection = [[FBSDKGraphRequestConnection alloc] init]; + FBSDKGraphRequest *requestForAccountIds = [[FBSDKGraphRequest alloc] initWithGraphPath:[NSString stringWithFormat:kFBGraphAPITestUsersPathFormat, _appID] + parameters:@{@"limit" : @"50", + @"after" : after ?: @"", + @"fields": @"" + } + tokenString:self.appAccessToken + version:nil + HTTPMethod:nil]; + __block NSString *afterCursor = nil; + __block NSInteger expectedTestAccounts = 0; + FBSDKGraphRequestConnection *permissionConnection = [[FBSDKGraphRequestConnection alloc] init]; + [connection addRequest:requestForAccountIds completionHandler:^(FBSDKGraphRequestConnection *innerConnection, id result, NSError *error) { + if (error) { + if (handler) { + handler(error); + } + // on errors, clear out accounts since it may be in a bad state + [self->_accounts removeAllObjects]; + return; + } else { + for (NSDictionary *account in result[@"data"]) { + NSString *userId = account[@"id"]; + NSString *token = account[@"access_token"]; + if (userId && token) { + self->_accounts[userId] = [NSMutableDictionary dictionaryWithCapacity:2]; + self->_accounts[userId][kAccountsDictionaryTokenKey] = token; + expectedTestAccounts++; + [permissionConnection addRequest:[[FBSDKGraphRequest alloc] initWithGraphPath:[NSString stringWithFormat:@"%@?fields=permissions", userId] + parameters:nil + tokenString:self.appAccessToken + version:nil + HTTPMethod:nil] + completionHandler:^(FBSDKGraphRequestConnection *innerConnection2, id innerResult, NSError *innerError) { + if (self->_accounts.count == 0) { + // indicates an earlier error that was already passed to handler, so just short circuit. + return; + } + if (innerError) { + if (handler) { + handler(innerError); + } + [self->_accounts removeAllObjects]; + return; + } else { + NSMutableSet *grantedPermissions = [NSMutableSet set]; + NSArray *resultPermissionsDictionaries = innerResult[@"permissions"][@"data"]; + [resultPermissionsDictionaries enumerateObjectsUsingBlock:^(NSDictionary *obj, NSUInteger idx, BOOL *stop) { + if ([obj[@"status"] isEqualToString:@"granted"]) { + [grantedPermissions addObject:obj[@"permission"]]; + } + }]; + self->_accounts[userId][kAccountsDictionaryPermissionsKey] = grantedPermissions; + } + expectedTestAccounts--; + if (!expectedTestAccounts) { + if (afterCursor) { + [self fetchExistingTestAccountsWithAfterCursor:afterCursor handler:handler]; + } else if (handler) { + handler(nil); + } + } + } + ]; + } + } + afterCursor = result[@"paging"][@"cursors"][@"after"]; + } + + if (expectedTestAccounts) { + // finished fetching ids and tokens, now kick off the request for all the permissions + [permissionConnection start]; + } else { + if (handler) { + handler(nil); + } + } + }]; + [connection start]; +} +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKURL.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKURL.h new file mode 100644 index 0000000..e0e3d4c --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKURL.h @@ -0,0 +1,87 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class FBSDKAppLink; + +/*! + Provides a set of utilities for working with NSURLs, such as parsing of query parameters + and handling for App Link requests. + */ +@interface FBSDKURL : NSObject + +/*! + Creates a link target from a raw URL. + On success, this posts the FBSDKAppLinkParseEventName measurement event. If you are constructing the FBSDKURL within your application delegate's + application:openURL:sourceApplication:annotation:, you should instead use URLWithInboundURL:sourceApplication: + to support better FBSDKMeasurementEvent notifications + @param url The instance of `NSURL` to create FBSDKURL from. + */ ++ (FBSDKURL *)URLWithURL:(NSURL *)url; + +/*! + Creates a link target from a raw URL received from an external application. This is typically called from the app delegate's + application:openURL:sourceApplication:annotation: and will post the FBSDKAppLinkNavigateInEventName measurement event. + @param url The instance of `NSURL` to create FBSDKURL from. + @param sourceApplication the bundle ID of the app that is requesting your app to open the URL. The same sourceApplication in application:openURL:sourceApplication:annotation: + */ ++ (FBSDKURL *)URLWithInboundURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication; + +/*! + Gets the target URL. If the link is an App Link, this is the target of the App Link. + Otherwise, it is the url that created the target. + */ +@property (nonatomic, strong, readonly) NSURL *targetURL; + +/*! + Gets the query parameters for the target, parsed into an NSDictionary. + */ +@property (nonatomic, strong, readonly) NSDictionary *targetQueryParameters; + +/*! + If this link target is an App Link, this is the data found in al_applink_data. + Otherwise, it is nil. + */ +@property (nonatomic, strong, readonly) NSDictionary *appLinkData; + +/*! + If this link target is an App Link, this is the data found in extras. + */ +@property (nonatomic, strong, readonly) NSDictionary *appLinkExtras; + +/*! + The App Link indicating how to navigate back to the referer app, if any. + */ +@property (nonatomic, strong, readonly) FBSDKAppLink *appLinkReferer; + +/*! + The URL that was used to create this FBSDKURL. + */ +@property (nonatomic, strong, readonly) NSURL *inputURL; + +/*! + The query parameters of the inputURL, parsed into an NSDictionary. + */ +@property (nonatomic, strong, readonly) NSDictionary *inputQueryParameters; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKURL.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKURL.m new file mode 100644 index 0000000..adc4729 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKURL.m @@ -0,0 +1,152 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKURL_Internal.h" + +#import "FBSDKAppLinkTarget.h" +#import "FBSDKAppLink_Internal.h" +#import "FBSDKMeasurementEvent_Internal.h" + +@implementation FBSDKURL + +- (instancetype)initWithURL:(NSURL *)url forOpenInboundURL:(BOOL)forOpenURLEvent sourceApplication:(NSString *)sourceApplication forRenderBackToReferrerBar:(BOOL)forRenderBackToReferrerBar { + self = [super init]; + if (!self) return nil; + + _inputURL = url; + _targetURL = url; + + // Parse the query string parameters for the base URL + NSDictionary *baseQuery = [FBSDKURL queryParametersForURL:url]; + _inputQueryParameters = baseQuery; + _targetQueryParameters = baseQuery; + + // Check for applink_data + NSString *appLinkDataString = baseQuery[FBSDKAppLinkDataParameterName]; + if (appLinkDataString) { + // Try to parse the JSON + NSError *error = nil; + NSDictionary *applinkData = + [NSJSONSerialization JSONObjectWithData:[appLinkDataString dataUsingEncoding:NSUTF8StringEncoding] + options:0 + error:&error]; + if (!error && [applinkData isKindOfClass:[NSDictionary class]]) { + // If the version is not specified, assume it is 1. + NSString *version = applinkData[FBSDKAppLinkVersionKeyName] ?: @"1.0"; + NSString *target = applinkData[FBSDKAppLinkTargetKeyName]; + if ([version isKindOfClass:[NSString class]] && + [version isEqual:FBSDKAppLinkVersion]) { + // There's applink data! The target should actually be the applink target. + _appLinkData = applinkData; + id applinkExtras = applinkData[FBSDKAppLinkExtrasKeyName]; + if (applinkExtras && [applinkExtras isKindOfClass:[NSDictionary class]]) { + _appLinkExtras = applinkExtras; + } + _targetURL = ([target isKindOfClass:[NSString class]] ? [NSURL URLWithString:target] : url); + _targetQueryParameters = [FBSDKURL queryParametersForURL:_targetURL]; + + NSDictionary *refererAppLink = _appLinkData[FBSDKAppLinkRefererAppLink]; + NSString *refererURLString = refererAppLink[FBSDKAppLinkRefererUrl]; + NSString *refererAppName = refererAppLink[FBSDKAppLinkRefererAppName]; + + if (refererURLString && refererAppName) { + FBSDKAppLinkTarget *appLinkTarget = [FBSDKAppLinkTarget appLinkTargetWithURL:[NSURL URLWithString:refererURLString] + appStoreId:nil + appName:refererAppName]; + _appLinkReferer = [FBSDKAppLink appLinkWithSourceURL:[NSURL URLWithString:refererURLString] + targets:@[ appLinkTarget ] + webURL:nil + isBackToReferrer:YES]; + } + + // Raise Measurement Event + NSString *const EVENT_YES_VAL = @"1"; + NSString *const EVENT_NO_VAL = @"0"; + NSMutableDictionary *logData = [[NSMutableDictionary alloc] init]; + logData[@"version"] = version; + if (refererURLString) { + logData[@"refererURL"] = refererURLString; + } + if (refererAppName) { + logData[@"refererAppName"] = refererAppName; + } + if (sourceApplication) { + logData[@"sourceApplication"] = sourceApplication; + } + if (_targetURL.absoluteString) { + logData[@"targetURL"] = _targetURL.absoluteString; + } + if (_inputURL.absoluteString) { + logData[@"inputURL"] = _inputURL.absoluteString; + } + if (_inputURL.scheme) { + logData[@"inputURLScheme"] = _inputURL.scheme; + } + logData[@"forRenderBackToReferrerBar"] = forRenderBackToReferrerBar ? EVENT_YES_VAL : EVENT_NO_VAL; + logData[@"forOpenUrl"] = forOpenURLEvent ? EVENT_YES_VAL : EVENT_NO_VAL; + [FBSDKMeasurementEvent postNotificationForEventName:FBSDKAppLinkParseEventName args:logData]; + if (forOpenURLEvent) { + [FBSDKMeasurementEvent postNotificationForEventName:FBSDKAppLinkNavigateInEventName args:logData]; + } + } + } + } + + return self; +} + ++ (FBSDKURL *)URLWithURL:(NSURL *)url { + return [[FBSDKURL alloc] initWithURL:url forOpenInboundURL:NO sourceApplication:nil forRenderBackToReferrerBar:NO]; +} + ++ (FBSDKURL *)URLWithInboundURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication { + return [[FBSDKURL alloc] initWithURL:url forOpenInboundURL:YES sourceApplication:sourceApplication forRenderBackToReferrerBar:NO]; +} + ++ (FBSDKURL *)URLForRenderBackToReferrerBarURL:(NSURL *)url { + return [[FBSDKURL alloc] initWithURL:url forOpenInboundURL:NO sourceApplication:nil forRenderBackToReferrerBar:YES]; +} + ++ (NSString *)decodeURLString:(NSString *)string { + return (NSString *)CFBridgingRelease(CFURLCreateStringByReplacingPercentEscapes(NULL, + (CFStringRef)string, + CFSTR(""))); +} + ++ (NSDictionary *)queryParametersForURL:(NSURL *)url { + NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; + NSString *query = url.query; + if ([query isEqualToString:@""]) { + return @{}; + } + NSArray *queryComponents = [query componentsSeparatedByString:@"&"]; + for (NSString *component in queryComponents) { + NSRange equalsLocation = [component rangeOfString:@"="]; + if (equalsLocation.location == NSNotFound) { + // There's no equals, so associate the key with NSNull + parameters[[self decodeURLString:component]] = [NSNull null]; + } else { + NSString *key = [self decodeURLString:[component substringToIndex:equalsLocation.location]]; + NSString *value = [self decodeURLString:[component substringFromIndex:equalsLocation.location + 1]]; + parameters[key] = value; + } + } + return [NSDictionary dictionaryWithDictionary:parameters]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.h new file mode 100644 index 0000000..560b6b0 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.h @@ -0,0 +1,79 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +/** + Class to contain common utility methods. + */ +@interface FBSDKUtility : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + Parses a query string into a dictionary. + @param queryString The query string value. + @return A dictionary with the key/value pairs. + */ ++ (NSDictionary *)dictionaryWithQueryString:(NSString *)queryString; + +/** + Constructs a query string from a dictionary. + @param dictionary The dictionary with key/value pairs for the query string. + @param errorRef If an error occurs, upon return contains an NSError object that describes the problem. + @return Query string representation of the parameters. + */ ++ (NSString *)queryStringWithDictionary:(NSDictionary *)dictionary error:(NSError *__autoreleasing *)errorRef; + +/** + Decodes a value from an URL. + @param value The value to decode. + @return The decoded value. + */ ++ (NSString *)URLDecode:(NSString *)value; + +/** + Encodes a value for an URL. + @param value The value to encode. + @return The encoded value. + */ ++ (NSString *)URLEncode:(NSString *)value; + +/** + Creates a timer using Grand Central Dispatch. + @param interval The interval to fire the timer, in seconds. + @param block The code block to execute when timer is fired. + @return The dispatch handle. + */ ++ (dispatch_source_t)startGCDTimerWithInterval:(double)interval block:(dispatch_block_t)block; + +/** + Stop a timer that was started by startGCDTimerWithInterval. + @param timer The dispatch handle received from startGCDTimerWithInterval. + */ ++ (void)stopGCDTimer:(dispatch_source_t)timer; + +/** + Get SHA256 hased string of NSString/NSData + + @param input The data that needs to be hashed, it could be NSString or NSData. + */ ++ (NSString *)SHA256Hash:(NSObject *)input; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.m new file mode 100644 index 0000000..b6af8ab --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.m @@ -0,0 +1,135 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKUtility.h" + +#import + +#import "FBSDKInternalUtility.h" + +@implementation FBSDKUtility + ++ (NSDictionary *)dictionaryWithQueryString:(NSString *)queryString +{ + NSMutableDictionary *result = [[NSMutableDictionary alloc] init]; + NSArray *parts = [queryString componentsSeparatedByString:@"&"]; + + for (NSString *part in parts) { + if (part.length == 0) { + continue; + } + + NSRange index = [part rangeOfString:@"="]; + NSString *key; + NSString *value; + + if (index.location == NSNotFound) { + key = part; + value = @""; + } else { + key = [part substringToIndex:index.location]; + value = [part substringFromIndex:index.location + index.length]; + } + + key = [self URLDecode:key]; + value = [self URLDecode:value]; + if (key && value) { + result[key] = value; + } + } + return result; +} + ++ (NSString *)queryStringWithDictionary:(NSDictionary *)dictionary error:(NSError *__autoreleasing *)errorRef +{ + return [FBSDKInternalUtility queryStringWithDictionary:dictionary error:errorRef invalidObjectHandler:NULL]; +} + ++ (NSString *)URLDecode:(NSString *)value +{ + value = [value stringByReplacingOccurrencesOfString:@"+" withString:@" "]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + value = [value stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; +#pragma clang diagnostic pop + return value; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" ++ (NSString *)URLEncode:(NSString *)value +{ + return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, + (CFStringRef)value, + NULL, // characters to leave unescaped + CFSTR(":!*();@/&?+$,='"), + kCFStringEncodingUTF8); +} +#pragma clang diagnostic pop + ++ (dispatch_source_t)startGCDTimerWithInterval:(double)interval block:(dispatch_block_t)block +{ + dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, // source type + 0, // handle + 0, // mask + dispatch_get_main_queue()); // queue + + dispatch_source_set_timer(timer, // dispatch source + dispatch_time(DISPATCH_TIME_NOW, interval * NSEC_PER_SEC), // start + interval * NSEC_PER_SEC, // interval + 0 * NSEC_PER_SEC); // leeway + + dispatch_source_set_event_handler(timer, block); + + dispatch_resume(timer); + + return timer; +} + ++ (void)stopGCDTimer:(dispatch_source_t)timer +{ + if (timer) { + dispatch_source_cancel(timer); + } +} + ++ (NSString *)SHA256Hash:(NSObject *)input +{ + NSData *data = nil; + + if ([input isKindOfClass:[NSString class]]) { + data = [(NSString *)input dataUsingEncoding:NSUTF8StringEncoding]; + } else if ([input isKindOfClass:[NSData class]]) { + data = (NSData *)input; + } + + if (!data) { + return nil; + } + + uint8_t digest[CC_SHA256_DIGEST_LENGTH]; + CC_SHA256(data.bytes, (CC_LONG)data.length, digest); + NSMutableString *encryptedStuff = [NSMutableString stringWithCapacity:CC_SHA256_DIGEST_LENGTH * 2]; + for (int i = 0; i < CC_SHA256_DIGEST_LENGTH; i++) { + [encryptedStuff appendFormat:@"%02x", digest[i]]; + } + + return encryptedStuff; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKWebViewAppLinkResolver.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKWebViewAppLinkResolver.h new file mode 100644 index 0000000..33eba98 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKWebViewAppLinkResolver.h @@ -0,0 +1,38 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKAppLinkResolving.h" + +NS_ASSUME_NONNULL_BEGIN + +/*! + A reference implementation for an App Link resolver that uses a hidden UIWebView + to parse the HTML containing App Link metadata. + */ +@interface FBSDKWebViewAppLinkResolver : NSObject + +/*! + Gets the instance of a FBSDKWebViewAppLinkResolver. + */ ++ (instancetype)sharedInstance; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKWebViewAppLinkResolver.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKWebViewAppLinkResolver.m new file mode 100644 index 0000000..6b6839a --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKWebViewAppLinkResolver.m @@ -0,0 +1,304 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKWebViewAppLinkResolver.h" + +#import + +#import "FBSDKAppLink.h" +#import "FBSDKAppLinkTarget.h" + +/** + Describes the callback for appLinkFromURLInBackground. + @param result the results from following redirects + @param error the error during the request, if any + + */ +typedef void (^FBSDKURLFollowRedirectsHandler)(NSDictionary *result, NSError * _Nullable error); + +// Defines JavaScript to extract app link tags from HTML content +static NSString *const FBSDKWebViewAppLinkResolverTagExtractionJavaScript = @"" +"(function() {" +" var metaTags = document.getElementsByTagName('meta');" +" var results = [];" +" for (var i = 0; i < metaTags.length; i++) {" +" var property = metaTags[i].getAttribute('property');" +" if (property && property.substring(0, 'al:'.length) === 'al:') {" +" var tag = { \"property\": metaTags[i].getAttribute('property') };" +" if (metaTags[i].hasAttribute('content')) {" +" tag['content'] = metaTags[i].getAttribute('content');" +" }" +" results.push(tag);" +" }" +" }" +" return JSON.stringify(results);" +"})()"; +static NSString *const FBSDKWebViewAppLinkResolverIOSURLKey = @"url"; +static NSString *const FBSDKWebViewAppLinkResolverIOSAppStoreIdKey = @"app_store_id"; +static NSString *const FBSDKWebViewAppLinkResolverIOSAppNameKey = @"app_name"; +static NSString *const FBSDKWebViewAppLinkResolverDictionaryValueKey = @"_value"; +static NSString *const FBSDKWebViewAppLinkResolverPreferHeader = @"Prefer-Html-Meta-Tags"; +static NSString *const FBSDKWebViewAppLinkResolverMetaTagPrefix = @"al"; +static NSString *const FBSDKWebViewAppLinkResolverWebKey = @"web"; +static NSString *const FBSDKWebViewAppLinkResolverIOSKey = @"ios"; +static NSString *const FBSDKWebViewAppLinkResolverIPhoneKey = @"iphone"; +static NSString *const FBSDKWebViewAppLinkResolverIPadKey = @"ipad"; +static NSString *const FBSDKWebViewAppLinkResolverWebURLKey = @"url"; +static NSString *const FBSDKWebViewAppLinkResolverShouldFallbackKey = @"should_fallback"; + +@interface FBSDKWebViewAppLinkResolverWebViewDelegate : NSObject + +@property (nonatomic, copy) void (^didFinishLoad)(UIWebView *webView); +@property (nonatomic, copy) void (^didFailLoadWithError)(UIWebView *webView, NSError *error); +@property (nonatomic, assign) BOOL hasLoaded; + +@end + +@implementation FBSDKWebViewAppLinkResolverWebViewDelegate + +- (void)webViewDidFinishLoad:(UIWebView *)webView { + if (self.didFinishLoad) { + self.didFinishLoad(webView); + } +} + +- (void)webViewDidStartLoad:(UIWebView *)webView { +} + +- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { + if (self.didFailLoadWithError) { + self.didFailLoadWithError(webView, error); + } +} + +- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { + if (self.hasLoaded) { + // Consider loading a second resource to be "success", since it indicates an inner frame + // or redirect is happening. We can run the tag extraction script at this point. + self.didFinishLoad(webView); + return NO; + } + self.hasLoaded = YES; + return YES; +} + +@end + +@implementation FBSDKWebViewAppLinkResolver + ++ (instancetype)sharedInstance { + static id instance; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[self alloc] init]; + }); + return instance; +} + +- (void)followRedirects:(NSURL *)url handler:(FBSDKURLFollowRedirectsHandler)handler +{ + // This task will be resolved with either the redirect NSURL + // or a dictionary with the response data to be returned. + void (^completion)(NSURLResponse *response, NSData *data, NSError *error) = ^(NSURLResponse *response, NSData *data, NSError *error) { + if (error) { + handler(nil, error); + return; + } + + if ([response isKindOfClass:[NSHTTPURLResponse class]]) { + NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; + + // NSURLConnection usually follows redirects automatically, but the + // documentation is unclear what the default is. This helps it along. + if (httpResponse.statusCode >= 300 && httpResponse.statusCode < 400) { + NSString *redirectString = httpResponse.allHeaderFields[@"Location"]; + NSURL *redirectURL = [NSURL URLWithString:redirectString]; + [self followRedirects:redirectURL handler:handler]; + return; + } + } + + handler(@{ @"response" : response, @"data" : data }, nil); + }; + + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request setValue:FBSDKWebViewAppLinkResolverMetaTagPrefix forHTTPHeaderField:FBSDKWebViewAppLinkResolverPreferHeader]; + + NSURLSession *session = [NSURLSession sharedSession]; + [[session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + completion(response, data, error); + }] resume]; +} + +- (void)appLinkFromURL:(NSURL *)url handler:(FBSDKAppLinkFromURLHandler)handler +{ + dispatch_async(dispatch_get_main_queue(), ^{ + [self followRedirects:url handler:^(NSDictionary *result, NSError * _Nullable error) { + + if (error) { + handler(nil, error); + return; + } + + NSData *responseData = result[@"data"]; + NSHTTPURLResponse *response = result[@"response"]; + + UIWebView *webView = [[UIWebView alloc] init]; + FBSDKWebViewAppLinkResolverWebViewDelegate *listener = [[FBSDKWebViewAppLinkResolverWebViewDelegate alloc] init]; + __block FBSDKWebViewAppLinkResolverWebViewDelegate *retainedListener = listener; + listener.didFinishLoad = ^(UIWebView *view) { + if (retainedListener) { + NSDictionary *ogData = [self getALDataFromLoadedPage:view]; + [view removeFromSuperview]; + view.delegate = nil; + retainedListener = nil; + handler([self appLinkFromALData:ogData destination:url], nil); + } + }; + listener.didFailLoadWithError = ^(UIWebView* view, NSError *loadError) { + if (retainedListener) { + [view removeFromSuperview]; + view.delegate = nil; + retainedListener = nil; + handler(nil, loadError); + } + }; + webView.delegate = listener; + webView.hidden = YES; + [webView loadData:responseData + MIMEType:response.MIMEType + textEncodingName:response.textEncodingName + baseURL:response.URL]; + UIWindow *window = [UIApplication sharedApplication].windows.firstObject; + [window addSubview:webView]; + }]; + }); +} + +/* + Builds up a data structure filled with the app link data from the meta tags on a page. + The structure of this object is a dictionary where each key holds an array of app link + data dictionaries. Values are stored in a key called "_value". + */ +- (NSDictionary *)parseALData:(NSArray *> *)dataArray { + NSMutableDictionary *al = [NSMutableDictionary dictionary]; + for (NSDictionary *tag in dataArray) { + NSString *name = tag[@"property"]; + if (![name isKindOfClass:[NSString class]]) { + continue; + } + NSArray *nameComponents = [name componentsSeparatedByString:@":"]; + if (![nameComponents[0] isEqualToString:FBSDKWebViewAppLinkResolverMetaTagPrefix]) { + continue; + } + NSMutableDictionary *root = al; + for (NSUInteger i = 1; i < nameComponents.count; i++) { + NSMutableArray *> *children = root[nameComponents[i]]; + if (!children) { + children = [NSMutableArray array]; + root[nameComponents[i]] = children; + } + NSMutableDictionary *child = children.lastObject; + if (!child || i == nameComponents.count - 1) { + child = [NSMutableDictionary dictionary]; + [children addObject:child]; + } + root = child; + } + if (tag[@"content"]) { + root[FBSDKWebViewAppLinkResolverDictionaryValueKey] = tag[@"content"]; + } + } + return al; +} + +- (NSDictionary *)getALDataFromLoadedPage:(UIWebView *)webView { + // Run some JavaScript in the webview to fetch the meta tags. + NSString *jsonString = [webView stringByEvaluatingJavaScriptFromString:FBSDKWebViewAppLinkResolverTagExtractionJavaScript]; + NSError *error = nil; + NSArray *> *arr = + [NSJSONSerialization JSONObjectWithData:[jsonString dataUsingEncoding:NSUTF8StringEncoding] + options:0 + error:&error]; + return [self parseALData:arr]; +} + +/* + Converts app link data into a FBSDKAppLink containing the targets relevant for this platform. + */ +- (FBSDKAppLink *)appLinkFromALData:(NSDictionary *)appLinkDict destination:(NSURL *)destination { + NSMutableArray *linkTargets = [NSMutableArray array]; + + NSArray *platformData = nil; + + const UIUserInterfaceIdiom idiom = UI_USER_INTERFACE_IDIOM(); + if (idiom == UIUserInterfaceIdiomPad) { + platformData = @[ appLinkDict[FBSDKWebViewAppLinkResolverIPadKey] ?: @{}, + appLinkDict[FBSDKWebViewAppLinkResolverIOSKey] ?: @{} ]; + } else if (idiom == UIUserInterfaceIdiomPhone) { + platformData = @[ appLinkDict[FBSDKWebViewAppLinkResolverIPhoneKey] ?: @{}, + appLinkDict[FBSDKWebViewAppLinkResolverIOSKey] ?: @{} ]; + } else { + // Future-proofing. Other User Interface idioms should only hit ios. + platformData = @[ appLinkDict[FBSDKWebViewAppLinkResolverIOSKey] ?: @{} ]; + } + + for (NSArray *platformObjects in platformData) { + for (NSDictionary *platformDict in platformObjects) { + // The schema requires a single url/app store id/app name, + // but we could find multiple of them. We'll make a best effort + // to interpret this data. + NSArray *> *urls = platformDict[FBSDKWebViewAppLinkResolverIOSURLKey]; + NSArray *> *appStoreIds = platformDict[FBSDKWebViewAppLinkResolverIOSAppStoreIdKey]; + NSArray *> *appNames = platformDict[FBSDKWebViewAppLinkResolverIOSAppNameKey]; + + NSUInteger maxCount = MAX(urls.count, MAX(appStoreIds.count, appNames.count)); + + for (NSUInteger i = 0; i < maxCount; i++) { + NSString *urlString = urls[i][FBSDKWebViewAppLinkResolverDictionaryValueKey]; + NSURL *url = urlString ? [NSURL URLWithString:urlString] : nil; + NSString *appStoreId = appStoreIds[i][FBSDKWebViewAppLinkResolverDictionaryValueKey]; + NSString *appName = appNames[i][FBSDKWebViewAppLinkResolverDictionaryValueKey]; + FBSDKAppLinkTarget *target = [FBSDKAppLinkTarget appLinkTargetWithURL:url + appStoreId:appStoreId + appName:appName]; + [linkTargets addObject:target]; + } + } + } + + NSDictionary *webDict = appLinkDict[FBSDKWebViewAppLinkResolverWebKey][0]; + NSString *webUrlString = webDict[FBSDKWebViewAppLinkResolverWebURLKey][0][FBSDKWebViewAppLinkResolverDictionaryValueKey]; + NSString *shouldFallbackString = webDict[FBSDKWebViewAppLinkResolverShouldFallbackKey][0][FBSDKWebViewAppLinkResolverDictionaryValueKey]; + + NSURL *webUrl = destination; + + if (shouldFallbackString && + [@[ @"no", @"false", @"0" ] containsObject:shouldFallbackString.lowercaseString]) { + webUrl = nil; + } + if (webUrl && webUrlString) { + webUrl = [NSURL URLWithString:webUrlString]; + } + + return [FBSDKAppLink appLinkWithSourceURL:destination + targets:linkTargets + webURL:webUrl]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessIndexer.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessIndexer.h new file mode 100644 index 0000000..fcc4f42 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessIndexer.h @@ -0,0 +1,27 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +typedef void(^FBSDKCodelessSettingLoadBlock)(BOOL isCodelessSetupEnabled, NSError *error); + +@interface FBSDKCodelessIndexer : NSObject + ++ (NSString *)extInfo; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessIndexer.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessIndexer.m new file mode 100644 index 0000000..60ff531 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessIndexer.m @@ -0,0 +1,404 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKCodelessIndexer.h" + +#import +#import +#import + +#import + +#import +#import + +#import "FBSDKCoreKit+Internal.h" + +@implementation FBSDKCodelessIndexer + +static BOOL _isCodelessIndexing; +static BOOL _isCheckingSession; +static BOOL _isCodelessIndexingEnabled; + +static NSMutableDictionary *_codelessSetting; +static const NSTimeInterval kTimeout = 4.0; + +static NSString *_deviceSessionID; +static NSTimer *_appIndexingTimer; +static NSString *_lastTreeHash; + ++ (void)load +{ +#if TARGET_OS_SIMULATOR + [self setupGesture]; +#else + [self loadCodelessSettingWithCompletionBlock:^(BOOL isCodelessSetupEnabled, NSError *error) { + if (isCodelessSetupEnabled) { + [self setupGesture]; + } + }]; +#endif +} + +// DO NOT call this function, it is only called once in the load function ++ (void)loadCodelessSettingWithCompletionBlock:(FBSDKCodelessSettingLoadBlock)completionBlock +{ + NSString *appID = [FBSDKSettings appID]; + if (appID == nil) { + return; + } + + [FBSDKServerConfigurationManager loadServerConfigurationWithCompletionBlock:^(FBSDKServerConfiguration *serverConfiguration, NSError *serverConfigurationLoadingError) { + if (!serverConfiguration.codelessEventsEnabled) { + return; + } + + // load the defaults + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *defaultKey = [NSString stringWithFormat:CODELESS_SETTING_KEY, appID]; + NSData *data = [defaults objectForKey:defaultKey]; + if ([data isKindOfClass:[NSData class]]) { + NSMutableDictionary *codelessSetting = [NSKeyedUnarchiver unarchiveObjectWithData:data]; + if (codelessSetting) { + _codelessSetting = codelessSetting; + } + } + if (!_codelessSetting) { + _codelessSetting = [[NSMutableDictionary alloc] init]; + } + + if (![self _codelessSetupTimestampIsValid:[_codelessSetting objectForKey:CODELESS_SETTING_TIMESTAMP_KEY]]) { + FBSDKGraphRequest *request = [self requestToLoadCodelessSetup:appID]; + if (request == nil) { + return; + } + FBSDKGraphRequestConnection *requestConnection = [[FBSDKGraphRequestConnection alloc] init]; + requestConnection.timeout = kTimeout; + [requestConnection addRequest:request completionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *codelessLoadingError) { + if (codelessLoadingError) { + return; + } + + NSDictionary *resultDictionary = [FBSDKTypeUtility dictionaryValue:result]; + if (resultDictionary) { + BOOL isCodelessSetupEnabled = [FBSDKTypeUtility boolValue:resultDictionary[CODELESS_SETUP_ENABLED_FIELD]]; + [_codelessSetting setObject:@(isCodelessSetupEnabled) forKey:CODELESS_SETUP_ENABLED_KEY]; + [_codelessSetting setObject:[NSDate date] forKey:CODELESS_SETTING_TIMESTAMP_KEY]; + // update the cached copy in user defaults + [defaults setObject:[NSKeyedArchiver archivedDataWithRootObject:_codelessSetting] forKey:defaultKey]; + completionBlock(isCodelessSetupEnabled, codelessLoadingError); + } + }]; + [requestConnection start]; + } else { + completionBlock([FBSDKTypeUtility boolValue:[_codelessSetting objectForKey:CODELESS_SETUP_ENABLED_KEY]], nil); + } + }]; +} + ++ (FBSDKGraphRequest *)requestToLoadCodelessSetup:(NSString *)appID +{ + NSString *advertiserID = [FBSDKAppEventsUtility advertiserID]; + if (!advertiserID) { + return nil; + } + + NSDictionary *parameters = @{ + @"fields": CODELESS_SETUP_ENABLED_FIELD, + @"advertiser_id": advertiserID + }; + + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:appID + parameters:parameters + tokenString:nil + HTTPMethod:nil + flags:FBSDKGraphRequestFlagSkipClientToken | FBSDKGraphRequestFlagDisableErrorRecovery]; + return request; +} + ++ (BOOL)_codelessSetupTimestampIsValid:(NSDate *)timestamp +{ + return (timestamp != nil && [[NSDate date] timeIntervalSinceDate:timestamp] < CODELESS_SETTING_CACHE_TIMEOUT); +} + ++ (void)setupGesture +{ + [UIApplication sharedApplication].applicationSupportsShakeToEdit = YES; + Class class = [UIApplication class]; + + [FBSDKSwizzler swizzleSelector:@selector(motionBegan:withEvent:) onClass:class withBlock:^{ + if ([FBSDKServerConfigurationManager cachedServerConfiguration].isCodelessEventsEnabled) { + [self checkCodelessIndexingSession]; + } + } named:@"motionBegan"]; +} + ++ (void)checkCodelessIndexingSession +{ + if (_isCheckingSession) return; + + _isCheckingSession = YES; + NSDictionary *parameters = @{ + CODELESS_INDEXING_SESSION_ID_KEY: [self currentSessionDeviceID], + CODELESS_INDEXING_EXT_INFO_KEY: [self extInfo] + }; + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] + initWithGraphPath:[NSString stringWithFormat:@"%@/%@", + [FBSDKSettings appID], CODELESS_INDEXING_SESSION_ENDPOINT] + parameters: parameters + HTTPMethod:@"POST"]; + [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + _isCheckingSession = NO; + if ([result isKindOfClass:[NSDictionary class]]) { + _isCodelessIndexingEnabled = [((NSDictionary *)result)[CODELESS_INDEXING_STATUS_KEY] boolValue]; + if (_isCodelessIndexingEnabled) { + _lastTreeHash = nil; + if (!_appIndexingTimer) { + _appIndexingTimer = [NSTimer timerWithTimeInterval:CODELESS_INDEXING_UPLOAD_INTERVAL_IN_SECONDS + target:self + selector:@selector(startIndexing) + userInfo:nil + repeats:YES]; + + [[NSRunLoop mainRunLoop] addTimer:_appIndexingTimer forMode:NSDefaultRunLoopMode]; + } + } else { + _deviceSessionID = nil; + } + } + }]; +} + ++ (NSString *)currentSessionDeviceID +{ + if (!_deviceSessionID) { + _deviceSessionID = [NSUUID UUID].UUIDString; + } + return _deviceSessionID; +} + ++ (NSString *)extInfo +{ + struct utsname systemInfo; + uname(&systemInfo); + NSString *machine = @(systemInfo.machine); + NSString *advertiserID = [FBSDKAppEventsUtility advertiserID] ?: @""; + machine = machine ?: @""; + NSString *debugStatus = [FBSDKAppEventsUtility isDebugBuild] ? @"1" : @"0"; +#if TARGET_IPHONE_SIMULATOR + NSString *isSimulator = @"1"; +#else + NSString *isSimulator = @"0"; +#endif + NSLocale *locale = [NSLocale currentLocale]; + NSString *languageCode = [locale objectForKey:NSLocaleLanguageCode]; + NSString *countryCode = [locale objectForKey:NSLocaleCountryCode]; + NSString *localeString = locale.localeIdentifier; + if (languageCode && countryCode) { + localeString = [NSString stringWithFormat:@"%@_%@", languageCode, countryCode]; + } + + NSString *extinfo = [FBSDKInternalUtility JSONStringForObject:@[machine, + advertiserID, + debugStatus, + isSimulator, + localeString] + error:NULL + invalidObjectHandler:NULL]; + + return extinfo ?: @""; +} + ++ (void)startIndexing { + if (!_isCodelessIndexingEnabled) { + return; + } + + if (UIApplicationStateActive != [UIApplication sharedApplication].applicationState) { + return; + } + + // If userAgentSuffix begins with Unity, trigger unity code to upload view hierarchy + NSString *userAgentSuffix = [FBSDKSettings userAgentSuffix]; + if (userAgentSuffix != nil && [userAgentSuffix hasPrefix:@"Unity"]) { + Class FBUnityUtility = objc_lookUpClass("FBUnityUtility"); + SEL selector = NSSelectorFromString(@"triggerUploadViewHierarchy"); + if (FBUnityUtility && selector && [FBUnityUtility respondsToSelector:selector]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + [FBUnityUtility performSelector:selector]; +#pragma clang diagnostic pop + } + } else { + [self uploadIndexing]; + } +} + ++ (void)uploadIndexing +{ + if (_isCodelessIndexing) { + return; + } + + NSString *tree = [FBSDKCodelessIndexer currentViewTree]; + + [self uploadIndexing:tree]; +} + ++ (void)uploadIndexing:(NSString *)tree +{ + if (_isCodelessIndexing) { + return; + } + + if (!tree) { + return; + } + + NSString *currentTreeHash = [FBSDKUtility SHA256Hash:tree]; + if (_lastTreeHash && [_lastTreeHash isEqualToString:currentTreeHash]) { + return; + } + + _lastTreeHash = currentTreeHash; + + NSBundle *mainBundle = [NSBundle mainBundle]; + NSString *version = [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; + + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] + initWithGraphPath:[NSString stringWithFormat:@"%@/%@", + [FBSDKSettings appID], CODELESS_INDEXING_ENDPOINT] + parameters:@{ + CODELESS_INDEXING_TREE_KEY: tree, + CODELESS_INDEXING_APP_VERSION_KEY: version ?: @"", + CODELESS_INDEXING_PLATFORM_KEY: @"iOS", + CODELESS_INDEXING_SESSION_ID_KEY: [self currentSessionDeviceID] + } + HTTPMethod:@"POST"]; + _isCodelessIndexing = YES; + [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + _isCodelessIndexing = NO; + if ([result isKindOfClass:[NSDictionary class]]) { + _isCodelessIndexingEnabled = [result[CODELESS_INDEXING_STATUS_KEY] boolValue]; + if (!_isCodelessIndexingEnabled) { + _deviceSessionID = nil; + } + } + }]; +} + ++ (NSString *)currentViewTree +{ + NSMutableArray *trees = [NSMutableArray array]; + + NSArray *windows = [UIApplication sharedApplication].windows; + for (UIWindow *window in windows) { + NSDictionary *tree = [FBSDKCodelessIndexer recursiveCaptureTree:window]; + if (tree) { + if (window.isKeyWindow) { + [trees insertObject:tree atIndex:0]; + } else { + [trees addObject:tree]; + } + } + } + + if (0 == trees.count) { + return nil; + } + + NSArray *viewTrees = [trees reverseObjectEnumerator].allObjects; + + NSData *data = UIImageJPEGRepresentation([FBSDKCodelessIndexer screenshot], 0.5); + NSString *screenshot = [data base64EncodedStringWithOptions:0]; + + NSMutableDictionary *treeInfo = [NSMutableDictionary dictionary]; + + treeInfo[@"view"] = viewTrees; + treeInfo[@"screenshot"] = screenshot ?: @""; + + NSString *tree = nil; + data = [NSJSONSerialization dataWithJSONObject:treeInfo options:0 error:nil]; + if (data) { + tree = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + } + + return tree; +} + ++ (NSDictionary *)recursiveCaptureTree:(NSObject *)obj +{ + if (!obj) { + return nil; + } + + NSMutableDictionary *result = [FBSDKViewHierarchy getDetailAttributesOf:obj]; + + NSArray *children = [FBSDKViewHierarchy getChildren:obj]; + NSMutableArray *childrenTrees = [NSMutableArray array]; + for (NSObject *child in children) { + NSDictionary *objTree = [self recursiveCaptureTree:child]; + [childrenTrees addObject:objTree]; + } + + if (childrenTrees.count > 0) { + [result setValue:[childrenTrees copy] forKey:CODELESS_VIEW_TREE_CHILDREN_KEY]; + } + + return [result copy]; +} + ++ (UIImage *)screenshot { + UIWindow *window = [UIApplication sharedApplication].delegate.window; + + UIGraphicsBeginImageContext(window.bounds.size); + [window drawViewHierarchyInRect:window.bounds afterScreenUpdates:YES]; + UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + return image; +} + ++ (NSDictionary *)dimensionOf:(NSObject *)obj +{ + UIView *view = nil; + + if ([obj isKindOfClass:[UIView class]]) { + view = (UIView *)obj; + } else if ([obj isKindOfClass:[UIViewController class]]) { + view = ((UIViewController *)obj).view; + } + + CGRect frame = view.frame; + CGPoint offset = CGPointZero; + + if ([view isKindOfClass:[UIScrollView class]]) + offset = ((UIScrollView *)view).contentOffset; + + return @{ + CODELESS_VIEW_TREE_TOP_KEY: @((int)frame.origin.y), + CODELESS_VIEW_TREE_LEFT_KEY: @((int)frame.origin.x), + CODELESS_VIEW_TREE_WIDTH_KEY: @((int)frame.size.width), + CODELESS_VIEW_TREE_HEIGHT_KEY: @((int)frame.size.height), + CODELESS_VIEW_TREE_OFFSET_X_KEY: @((int)offset.x), + CODELESS_VIEW_TREE_OFFSET_Y_KEY: @((int)offset.y), + CODELESS_VIEW_TREE_VISIBILITY_KEY: view.isHidden ? @4 : @0 + }; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessMacros.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessMacros.h new file mode 100644 index 0000000..002822f --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessMacros.h @@ -0,0 +1,91 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. +#ifndef FBSDKCodelessMacros_h +#define FBSDKCodelessMacros_h + +// keys for event binding path compoenent +#define CODELESS_MAPPING_METHOD_KEY @"method" +#define CODELESS_MAPPING_EVENT_NAME_KEY @"event_name" +#define CODELESS_MAPPING_EVENT_TYPE_KEY @"event_type" +#define CODELESS_MAPPING_APP_VERSION_KEY @"app_version" +#define CODELESS_MAPPING_PATH_KEY @"path" +#define CODELESS_MAPPING_PATH_TYPE_KEY @"path_type" +#define CODELESS_MAPPING_CLASS_NAME_KEY @"class_name" +#define CODELESS_MAPPING_MATCH_BITMASK_KEY @"match_bitmask" +#define CODELESS_MAPPING_ID_KEY @"id" +#define CODELESS_MAPPING_INDEX_KEY @"index" +#define CODELESS_MAPPING_SECTION_KEY @"section" +#define CODELESS_MAPPING_ROW_KEY @"row" +#define CODELESS_MAPPING_TEXT_KEY @"text" +#define CODELESS_MAPPING_TAG_KEY @"tag" +#define CODELESS_MAPPING_DESC_KEY @"description" +#define CODELESS_MAPPING_HINT_KEY @"hint" +#define CODELESS_MAPPING_PARAMETERS_KEY @"parameters" +#define CODELESS_MAPPING_PARAMETER_NAME_KEY @"name" +#define CODELESS_MAPPING_PARAMETER_VALUE_KEY @"value" + +#define CODELESS_MAPPING_PARENT_CLASS_NAME @".." +#define CODELESS_MAPPING_CURRENT_CLASS_NAME @"." + +#define ReactNativeClassRCTView "RCTView" +#define ReactNativeClassRCTRootView "RCTRootView" + +#define CODELESS_INDEXING_UPLOAD_INTERVAL_IN_SECONDS 1 +#define CODELESS_INDEXING_STATUS_KEY @"is_app_indexing_enabled" +#define CODELESS_INDEXING_SESSION_ID_KEY @"device_session_id" +#define CODELESS_INDEXING_APP_VERSION_KEY @"app_version" +#define CODELESS_INDEXING_SDK_VERSION_KEY @"sdk_version" +#define CODELESS_INDEXING_PLATFORM_KEY @"platform" +#define CODELESS_INDEXING_TREE_KEY @"tree" +#define CODELESS_INDEXING_SCREENSHOT_KEY @"screenshot" +#define CODELESS_INDEXING_EXT_INFO_KEY @"extinfo" + +#define CODELESS_INDEXING_ENDPOINT @"app_indexing" +#define CODELESS_INDEXING_SESSION_ENDPOINT @"app_indexing_session" + +#define CODELESS_SETUP_ENABLED_FIELD @"auto_event_setup_enabled" +#define CODELESS_SETUP_ENABLED_KEY @"codeless_setup_enabled" +#define CODELESS_SETTING_KEY @"com.facebook.sdk:codelessSetting%@" +#define CODELESS_SETTING_TIMESTAMP_KEY @"codeless_setting_timestamp" +#define CODELESS_SETTING_CACHE_TIMEOUT (7 * 24 * 60 * 60) + +// keys for view tree +#define CODELESS_VIEW_TREE_CLASS_NAME_KEY @"classname" +#define CODELESS_VIEW_TREE_CLASS_TYPE_BIT_MASK_KEY @"classtypebitmask" +#define CODELESS_VIEW_TREE_TEXT_KEY @"text" +#define CODELESS_VIEW_TREE_DESC_KEY @"description" +#define CODELESS_VIEW_TREE_DIMENSION_KEY @"dimension" +#define CODELESS_VIEW_TREE_TAG_KEY @"tag" +#define CODELESS_VIEW_TREE_CHILDREN_KEY @"childviews" +#define CODELESS_VIEW_TREE_HINT_KEY @"hint" +#define CODELESS_VIEW_TREE_ACTIONS_KEY @"actions" + +#define CODELESS_VIEW_TREE_TOP_KEY @"top" +#define CODELESS_VIEW_TREE_LEFT_KEY @"left" +#define CODELESS_VIEW_TREE_WIDTH_KEY @"width" +#define CODELESS_VIEW_TREE_HEIGHT_KEY @"height" +#define CODELESS_VIEW_TREE_OFFSET_X_KEY @"scrollx" +#define CODELESS_VIEW_TREE_OFFSET_Y_KEY @"scrolly" +#define CODELESS_VIEW_TREE_VISIBILITY_KEY @"visibility" + +#define CODELESS_VIEW_TREE_TEXT_STYLE_KEY @"text_style" +#define CODELESS_VIEW_TREE_TEXT_IS_BOLD_KEY @"is_bold" +#define CODELESS_VIEW_TREE_TEXT_IS_ITALIC_KEY @"is_italic" +#define CODELESS_VIEW_TREE_TEXT_SIZE_KEY @"font_size" + +#endif /* FBSDKCodelessMacros_h */ diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessParameterComponent.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessParameterComponent.h new file mode 100644 index 0000000..e2debc5 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessParameterComponent.h @@ -0,0 +1,30 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKCodelessParameterComponent : NSObject + +@property (nonatomic, copy, readonly) NSString *name; +@property (nonatomic, copy, readonly) NSString *value; +@property (nonatomic, readonly) NSArray *path; +@property (nonatomic, copy, readonly) NSString *pathType; + +- (instancetype)initWithJSON:(NSDictionary *)dict; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessParameterComponent.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessParameterComponent.m new file mode 100644 index 0000000..769ff88 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessParameterComponent.m @@ -0,0 +1,44 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKCodelessParameterComponent.h" + +#import "FBSDKCodelessMacros.h" +#import "FBSDKCodelessPathComponent.h" + +@implementation FBSDKCodelessParameterComponent + +- (instancetype)initWithJSON:(NSDictionary *)dict { + if (self = [super init]) { + _name = [dict[CODELESS_MAPPING_PARAMETER_NAME_KEY] copy]; + _value = [dict[CODELESS_MAPPING_PARAMETER_VALUE_KEY] copy]; + _pathType = [dict[CODELESS_MAPPING_PATH_TYPE_KEY] copy]; + + NSArray *ary = dict[CODELESS_MAPPING_PATH_KEY]; + NSMutableArray *mut = [NSMutableArray array]; + for (NSDictionary *info in ary) { + FBSDKCodelessPathComponent *component = [[FBSDKCodelessPathComponent alloc] initWithJSON:info]; + [mut addObject:component]; + } + _path = [mut copy]; + } + + return self; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessPathComponent.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessPathComponent.h new file mode 100644 index 0000000..15bed07 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessPathComponent.h @@ -0,0 +1,44 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +typedef NS_OPTIONS(int, FBSDKCodelessMatchBitmaskField) +{ + FBSDKCodelessMatchBitmaskFieldID = 1, + FBSDKCodelessMatchBitmaskFieldText = 1 << 1, + FBSDKCodelessMatchBitmaskFieldTag = 1 << 2, + FBSDKCodelessMatchBitmaskFieldDescription = 1 << 3, + FBSDKCodelessMatchBitmaskFieldHint = 1 << 4 +}; + +@interface FBSDKCodelessPathComponent : NSObject + +@property (nonatomic, copy, readonly) NSString *className; +@property (nonatomic, copy, readonly) NSString *text; +@property (nonatomic, copy, readonly) NSString *hint; +@property (nonatomic, copy, readonly) NSString *desc; // description +@property (nonatomic, readonly) int index; +@property (nonatomic, readonly) int tag; +@property (nonatomic, readonly) int section; +@property (nonatomic, readonly) int row; +@property (nonatomic, readonly) int matchBitmask; + +- (instancetype)initWithJSON:(NSDictionary*)dict; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessPathComponent.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessPathComponent.m new file mode 100644 index 0000000..1fc5108 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessPathComponent.m @@ -0,0 +1,58 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKCodelessPathComponent.h" + +#import "FBSDKCodelessMacros.h" + +@implementation FBSDKCodelessPathComponent + +- (instancetype)initWithJSON:(NSDictionary *)dict { + if (self = [super init]) { + _className = [dict[CODELESS_MAPPING_CLASS_NAME_KEY] copy]; + _text = [dict[CODELESS_MAPPING_TEXT_KEY] copy]; + _hint = [dict[CODELESS_MAPPING_HINT_KEY] copy]; + _desc = [dict[CODELESS_MAPPING_DESC_KEY] copy]; + + + if (dict[CODELESS_MAPPING_INDEX_KEY]) { + _index = [dict[CODELESS_MAPPING_INDEX_KEY] intValue]; + } else { + _index = -1; + } + + if (dict[CODELESS_MAPPING_SECTION_KEY]) { + _section = [dict[CODELESS_MAPPING_SECTION_KEY] intValue]; + } else { + _section = -1; + } + + if (dict[CODELESS_MAPPING_ROW_KEY]) { + _row = [dict[CODELESS_MAPPING_ROW_KEY] intValue]; + } else { + _row = -1; + } + + _tag = [dict[CODELESS_MAPPING_TAG_KEY] intValue]; + _matchBitmask = [dict[CODELESS_MAPPING_MATCH_BITMASK_KEY] intValue]; + } + + return self; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBinding.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBinding.h new file mode 100644 index 0000000..19e12f5 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBinding.h @@ -0,0 +1,37 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + + +#import +#import + +@interface FBSDKEventBinding : NSObject + +@property (nonatomic, copy, readonly) NSString *eventName; +@property (nonatomic, copy, readonly) NSString *eventType; +@property (nonatomic, copy, readonly) NSString *appVersion; +@property (nonatomic, readonly) NSArray *path; +@property (nonatomic, copy, readonly) NSString *pathType; +@property (nonatomic, readonly) NSArray *parameters; + ++ (BOOL)isViewMatchPath:(UIView *)view path:(NSArray *)path; ++ (BOOL)isPath:(NSArray *)path matchViewPath:(NSArray *)viewPath; +- (FBSDKEventBinding *)initWithJSON:(NSDictionary *)dict; +- (void)trackEvent:(id)sender; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBinding.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBinding.m new file mode 100644 index 0000000..322b4ef --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBinding.m @@ -0,0 +1,274 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKEventBinding.h" + +#import + +#import "FBSDKAppEventsUtility.h" +#import "FBSDKCodelessMacros.h" +#import "FBSDKCodelessParameterComponent.h" +#import "FBSDKCodelessPathComponent.h" +#import "FBSDKSwizzler.h" +#import "FBSDKViewHierarchy.h" + +#define CODELESS_PATH_TYPE_ABSOLUTE @"absolute" +#define CODELESS_PATH_TYPE_RELATIVE @"relative" +#define CODELESS_CODELESS_EVENT_KEY @"_is_fb_codeless" +#define PARAMETER_NAME_PRICE @"_valueToSum" + +@implementation FBSDKEventBinding + +- (FBSDKEventBinding *)initWithJSON:(NSDictionary *)dict +{ + if ((self = [super init])) { + _eventName = [dict[CODELESS_MAPPING_EVENT_NAME_KEY] copy]; + _eventType = [dict[CODELESS_MAPPING_EVENT_TYPE_KEY] copy]; + _appVersion = [dict[CODELESS_MAPPING_APP_VERSION_KEY] copy]; + _pathType = [dict[CODELESS_MAPPING_PATH_TYPE_KEY] copy]; + + NSArray *pathComponents = dict[CODELESS_MAPPING_PATH_KEY]; + NSMutableArray *mut = [NSMutableArray array]; + for (NSDictionary *info in pathComponents) { + FBSDKCodelessPathComponent *component = [[FBSDKCodelessPathComponent alloc] initWithJSON:info]; + [mut addObject:component]; + } + _path = [mut copy]; + + NSArray *parameters = dict[CODELESS_MAPPING_PARAMETERS_KEY]; + mut = [NSMutableArray array]; + for (NSDictionary *info in parameters) { + FBSDKCodelessParameterComponent *component = [[FBSDKCodelessParameterComponent alloc] initWithJSON:info]; + [mut addObject:component]; + } + _parameters = [mut copy]; + } + return self; +} + +- (void)trackEvent:(id)sender +{ + UIView *sourceView = [sender isKindOfClass:[UIView class]] ? (UIView *)sender : nil; + NSMutableDictionary *params = [NSMutableDictionary dictionary]; + params[CODELESS_CODELESS_EVENT_KEY] = @"1"; + for (FBSDKCodelessParameterComponent *component in self.parameters) { + NSString *text = component.value; + if (!text || text.length == 0) { + text = [FBSDKEventBinding findParameterOfPath:component.path + pathType:component.pathType + sourceView:sourceView]; + } + if (text) { + if ([component.name isEqualToString:PARAMETER_NAME_PRICE]) { + NSNumber *value = [FBSDKAppEventsUtility getNumberValue:text]; + params[component.name] = value; + } else { + params[component.name] = text; + } + } + } + + [FBSDKAppEvents logEvent:_eventName parameters:[params copy]]; +} + ++ (BOOL)matchAnyView:(NSArray *)views + pathComponent:(FBSDKCodelessPathComponent *)component +{ + for (NSObject *view in views) { + if ([self match:view pathComponent:component]) { + return YES; + } + } + return NO; +} + ++ (BOOL)match:(NSObject *)view +pathComponent:(FBSDKCodelessPathComponent *)component +{ + NSString *className = NSStringFromClass([view class]); + if (![className isEqualToString:component.className]) { + return NO; + } + + if (component.index >= 0) { + NSObject *parent = [FBSDKViewHierarchy getParent:view]; + if (parent) { + NSArray *children = [FBSDKViewHierarchy getChildren:[FBSDKViewHierarchy getParent:view]]; + NSUInteger index = [children indexOfObject:view]; + if (index == NSNotFound || index != component.index) { + return NO; + } + } else { + if (0 != component.index) { + return NO; + } + } + } + + if ((component.matchBitmask & FBSDKCodelessMatchBitmaskFieldText) > 0) { + NSString *text = [FBSDKViewHierarchy getText:view]; + BOOL match = ((text.length == 0 && component.text.length == 0) + || [text isEqualToString:component.text]); + if (!match) { + return NO; + } + } + + if ((component.matchBitmask & FBSDKCodelessMatchBitmaskFieldTag) > 0 + && [view isKindOfClass:[UIView class]] + && component.tag != ((UIView *)view).tag) { + return NO; + } + + if ((component.matchBitmask & FBSDKCodelessMatchBitmaskFieldHint) > 0) { + NSString *hint = [FBSDKViewHierarchy getHint:view]; + BOOL match = ((hint.length == 0 && component.hint.length == 0) + || [hint isEqualToString:component.hint]); + if (!match) { + return NO; + } + } + + return YES; +} + ++ (BOOL)isViewMatchPath:(UIView *)view path:(NSArray *)path +{ + NSArray *viewPath = [FBSDKViewHierarchy getPath:view]; + BOOL isMatch = [self isPath:path matchViewPath:viewPath]; + + return isMatch; +} + ++ (BOOL)isPath:(NSArray *)path matchViewPath:(NSArray *)viewPath { + for (NSInteger i = 0; i < MIN(path.count, viewPath.count); i++) { + NSInteger idxPath = path.count - i - 1; + NSInteger idxViewPath = viewPath.count - i - 1; + + FBSDKCodelessPathComponent *pathComponent = path[idxPath]; + FBSDKCodelessPathComponent *viewPathComponent = viewPath[idxViewPath]; + + if (![pathComponent.className isEqualToString:viewPathComponent.className]) { + return NO; + } + + if (pathComponent.index >= 0 + && pathComponent.index != viewPathComponent.index) { + return NO; + } + + if ((pathComponent.matchBitmask & FBSDKCodelessMatchBitmaskFieldText) > 0) { + NSString *text = viewPathComponent.text; + BOOL match = ((text.length == 0 && pathComponent.text.length == 0) + || [text isEqualToString:pathComponent.text]); + if (!match) { + return NO; + } + } + + if ((pathComponent.matchBitmask & FBSDKCodelessMatchBitmaskFieldTag) > 0 + && pathComponent.tag != viewPathComponent.tag) { + return NO; + } + + if ((pathComponent.matchBitmask & FBSDKCodelessMatchBitmaskFieldHint) > 0) { + NSString *hint = viewPathComponent.hint; + BOOL match = ((hint.length == 0 && pathComponent.hint.length == 0) + || [hint isEqualToString:pathComponent.hint]); + if (!match) { + return NO; + } + } + } + + return YES; +} + ++ (NSObject *)findViewByPath:(NSArray *)path parent:(NSObject *)parent level:(int)level { + if (level >= path.count) { + return nil; + } + + FBSDKCodelessPathComponent *pathComponent = path[level]; + + // If found parent, skip to next level + if ([pathComponent.className isEqualToString:CODELESS_MAPPING_PARENT_CLASS_NAME]) { + NSObject *nextParent = [FBSDKViewHierarchy getParent:parent]; + + return [FBSDKEventBinding findViewByPath:path parent:nextParent level:level + 1]; + } else if ([pathComponent.className isEqualToString:CODELESS_MAPPING_CURRENT_CLASS_NAME]) { + return parent; + } + + NSArray *children; + if (parent) { + children = [FBSDKViewHierarchy getChildren:parent]; + } else { + UIWindow *window = [UIApplication sharedApplication].delegate.window; + if (window) { + children = @[window]; + } else { + return nil; + } + } + + if (path.count - 1 == level) { + int index = pathComponent.index; + if (index >= 0) { + NSObject *child = index < children.count ? children[index] : nil; + if ([self match:child pathComponent:pathComponent]) { + return child; + } + } else { + for (NSObject *child in children) { + if ([self match:child pathComponent:pathComponent]) { + return child; + } + } + } + } else { + for (NSObject *child in children) { + NSObject *result = [self findViewByPath:path parent:child level:level + 1]; + if (result) { + return result; + } + } + } + + return nil; +} + +// MARK: - find event parameters via relative path ++ (NSString *)findParameterOfPath:(NSArray *)path + pathType:(NSString *)pathType + sourceView:(UIView *)sourceView { + if (0 == path.count) { + return nil; + } + + UIView *rootView = sourceView; + if (![pathType isEqualToString:CODELESS_PATH_TYPE_RELATIVE]) { + rootView = nil; + } + + NSObject *foundObj = [self findViewByPath:path parent:rootView level:0]; + + return [FBSDKViewHierarchy getText:foundObj]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBindingManager.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBindingManager.h new file mode 100644 index 0000000..863094e --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBindingManager.h @@ -0,0 +1,28 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKEventBindingManager : NSObject + +- (FBSDKEventBindingManager*)initWithJSON:(NSDictionary*)dict; +- (void)start; +- (void)updateBindings:(NSArray *)bindings; ++ (NSArray *)parseArray:(NSArray *)array; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBindingManager.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBindingManager.m new file mode 100644 index 0000000..fdfd027 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBindingManager.m @@ -0,0 +1,393 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKEventBindingManager.h" + +#import + +#import + +#import "FBSDKCodelessMacros.h" +#import "FBSDKCodelessPathComponent.h" +#import "FBSDKEventBinding.h" +#import "FBSDKSwizzler.h" +#import "FBSDKTypeUtility.h" +#import "FBSDKViewHierarchy.h" + +#define ReactNativeTargetKey @"target" +#define ReactNativeTouchEndEventName @"touchEnd" + +#define ReactNativeClassRCTTextView "RCTTextView" +#define ReactNativeClassRCTImageView "RCTImageVIew" +#define ReactNativeClassRCTTouchEvent "RCTTouchEvent" +#define ReactNativeClassRCTTouchHandler "RCTTouchHandler" + +static void fb_dispatch_on_main_thread(dispatch_block_t block) { + dispatch_async(dispatch_get_main_queue(), block); +} + +static void fb_dispatch_on_default_thread(dispatch_block_t block) { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block); +} + +@interface FBSDKEventBindingManager () +{ + BOOL isStarted; + NSMutableDictionary *reactBindings; + NSSet *validClasses; + BOOL hasReactNative; + NSArray *eventBindings; +} +@end + +@implementation FBSDKEventBindingManager + +- (id)init { + self = [super init]; + if (self) { + isStarted = NO; + hasReactNative = NO; + reactBindings = [NSMutableDictionary dictionary]; + + NSMutableSet *classes = [NSMutableSet set]; + [classes addObject:[UIControl class]]; + [classes addObject:[UITableView class]]; + [classes addObject:[UICollectionView class]]; + // ReactNative + Class classRCTRootView = objc_lookUpClass(ReactNativeClassRCTRootView); + if (classRCTRootView != nil) { + hasReactNative = YES; + Class classRCTView = objc_lookUpClass(ReactNativeClassRCTView); + Class classRCTTextView = objc_lookUpClass(ReactNativeClassRCTTextView); + Class classRCTImageView = objc_lookUpClass(ReactNativeClassRCTImageView); + if (classRCTView) { + [classes addObject:classRCTView]; + } + if (classRCTTextView) { + [classes addObject:classRCTTextView]; + } + if (classRCTImageView) { + [classes addObject:classRCTImageView]; + } + } + validClasses = [NSSet setWithSet:classes]; + } + return self; +} + ++ (NSArray *)parseArray:(NSArray *)array { + NSMutableArray *result = [NSMutableArray array]; + + for (NSDictionary *json in array) { + FBSDKEventBinding *binding = [[FBSDKEventBinding alloc] initWithJSON:json]; + [result addObject:binding]; + } + + return [result copy]; +} + +- (FBSDKEventBindingManager*)initWithJSON:(NSDictionary*)dict +{ + if ((self = [super init])) { + NSArray *eventBindingsDict = [FBSDKTypeUtility arrayValue:dict[@"event_bindings"]]; + NSMutableArray *bindings = [NSMutableArray array]; + for (NSDictionary *d in eventBindingsDict) { + FBSDKEventBinding *e = [[FBSDKEventBinding alloc] initWithJSON:d]; + [bindings addObject:e]; + } + eventBindings = [bindings copy]; + } + return self; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundeclared-selector" +- (void)start +{ + if (isStarted) { + return; + } + isStarted = YES; + + void (^blockToSuperview)(id view) = ^(id view) { + [self matchView:view delegate:nil]; + }; + + void (^blockToWindow)(id view) = ^(id view) { + [self matchView:view delegate:nil]; + }; + + [FBSDKSwizzler swizzleSelector:@selector(didMoveToSuperview) + onClass:[UIControl class] + withBlock:blockToSuperview named:@"map_control"]; + [FBSDKSwizzler swizzleSelector:@selector(didMoveToWindow) + onClass:[UIControl class] + withBlock:blockToWindow named:@"map_control"]; + + // ReactNative + if (hasReactNative) { // If app is built via ReactNative + Class classRCTView = objc_lookUpClass(ReactNativeClassRCTView); + Class classRCTTextView = objc_lookUpClass(ReactNativeClassRCTTextView); + Class classRCTImageView = objc_lookUpClass(ReactNativeClassRCTImageView); + Class classRCTTouchHandler = objc_lookUpClass(ReactNativeClassRCTTouchHandler); + + // All react-native views would be added tp RCTRootView, so no need to check didMoveToWindow + [FBSDKSwizzler swizzleSelector:@selector(didMoveToSuperview) + onClass:classRCTView + withBlock:blockToSuperview + named:@"match_react_native"]; + [FBSDKSwizzler swizzleSelector:@selector(didMoveToSuperview) + onClass:classRCTTextView + withBlock:blockToSuperview + named:@"match_react_native"]; + [FBSDKSwizzler swizzleSelector:@selector(didMoveToSuperview) + onClass:classRCTImageView + withBlock:blockToSuperview + named:@"match_react_native"]; + + // RCTTouchHandler handles with touch events, like touchEnd and uses RCTEventDispather to dispatch events, so we can check _updateAndDispatchTouches to fire events + [FBSDKSwizzler swizzleSelector:@selector(_updateAndDispatchTouches:eventName:) onClass:classRCTTouchHandler withBlock:^(id touchHandler, SEL command, id touches, id eventName){ + if ([touches isKindOfClass:[NSSet class]] && [eventName isKindOfClass:[NSString class]]) { + @try { + NSString *reactEventName = (NSString *)eventName; + NSSet *reactTouches = (NSSet *)touches; + if ([reactEventName isEqualToString:ReactNativeTouchEndEventName]) { + for (UITouch *touch in reactTouches) { + UIView *targetView = ((UITouch *)touch).view.superview; + NSNumber *reactTag = nil; + // Find the closest React-managed touchable view like RCTTouchHandler + while(targetView) { + reactTag = [FBSDKViewHierarchy getViewReactTag:targetView]; + if (reactTag != nil && targetView.userInteractionEnabled) { + break; + } + targetView = targetView.superview; + } + FBSDKEventBinding *eventBinding = self->reactBindings[reactTag]; + if (reactTag != nil && eventBinding != nil) { + [eventBinding trackEvent:nil]; + } + } + } + } + @catch(NSException *exception) { + // Catch exception here to prevent LytroKit from crashing app + } + } + } named:@"dispatch_rn_event"]; + } + + // UITableView + void (^tableViewBlock)(UITableView *tableView, + SEL cmd, + id delegate) = + ^(UITableView *tableView, SEL cmd, id delegate) { + if (!delegate) { + return; + } + + [self matchView:tableView delegate:delegate]; + }; + [FBSDKSwizzler swizzleSelector:@selector(setDelegate:) + onClass:[UITableView class] + withBlock:tableViewBlock + named:@"match_table_view"]; + // UICollectionView + void (^collectionViewBlock)(UICollectionView *collectionView, + SEL cmd, + id delegate) = + ^(UICollectionView *collectionView, SEL cmd, id delegate) { + if (nil == delegate) { + return; + } + + [self matchView:collectionView delegate:delegate]; + }; + [FBSDKSwizzler swizzleSelector:@selector(setDelegate:) + onClass:[UICollectionView class] + withBlock:collectionViewBlock + named:@"handle_collection_view"]; +} + +- (void)rematchBindings { + if (0 == eventBindings.count) { + return; + } + + NSArray *windows = [UIApplication sharedApplication].windows; + for (UIWindow *window in windows) { + [self matchSubviewsIn:window]; + } +} + +- (void)matchSubviewsIn:(UIView *)view { + if (!view) { + return; + } + + for (UIView *subview in view.subviews) { + BOOL isValidClass = NO; + for (Class cls in validClasses) { + if ([subview isKindOfClass:cls]) { + isValidClass = YES; + break; + } + } + + if (isValidClass) { + if ([subview isKindOfClass:[UITableView class]]) { + UITableView *tableView = (UITableView *)subview; + if (tableView.delegate) { + [self matchView:subview delegate:tableView.delegate]; + } + } else if ([subview isKindOfClass:[UICollectionView class]]) { + UICollectionView *collectionView = (UICollectionView *)subview; + if (collectionView.delegate) { + [self matchView:subview delegate:collectionView.delegate]; + } + } else { + [self matchView:subview delegate:nil]; + } + } + + if (![subview isKindOfClass:[UIControl class]]) { + [self matchSubviewsIn:subview]; + } + } +} + +// check if the view is matched to any event +- (void)matchView:(UIView *)view delegate:(id)delegate { + if (0 == eventBindings.count) { + return; + } + + fb_dispatch_on_main_thread(^{ + NSArray *path = [FBSDKViewHierarchy getPath:view]; + + fb_dispatch_on_default_thread(^{ + if ([view isKindOfClass:[UIControl class]]) { + UIControl *control = (UIControl *)view; + for (FBSDKEventBinding *binding in self->eventBindings) { + if ([FBSDKEventBinding isPath:binding.path matchViewPath:path]) { + fb_dispatch_on_main_thread(^{ + [control addTarget:binding + action:@selector(trackEvent:) + forControlEvents:UIControlEventTouchUpInside]; + }); + break; + } + } + } else if (self->hasReactNative + && [view respondsToSelector:@selector(reactTag)]) { + for (FBSDKEventBinding *binding in self->eventBindings) { + if ([FBSDKEventBinding isPath:binding.path matchViewPath:path]) { + fb_dispatch_on_main_thread(^{ + if (view) { + NSNumber *reactTag = [FBSDKViewHierarchy getViewReactTag:view]; + if (reactTag != nil) { + self->reactBindings[reactTag] = binding; + } + } + }); + break; + } + } + } else if ([view isKindOfClass:[UITableView class]] + && [delegate conformsToProtocol:@protocol(UITableViewDelegate)]) { + fb_dispatch_on_default_thread(^{ + NSMutableSet *matchedBindings = [NSMutableSet set]; + for (FBSDKEventBinding *binding in self->eventBindings) { + if (binding.path.count > 1) { + NSArray *shortPath = [binding.path + subarrayWithRange:NSMakeRange(0, binding.path.count - 1)]; + if ([FBSDKEventBinding isPath:shortPath matchViewPath:path]) { + [matchedBindings addObject:binding]; + } + } + } + + if (matchedBindings.count > 0) { + NSArray *bindings = matchedBindings.allObjects; + void (^block)(id, SEL, id, id) = ^(id target, SEL command, UITableView *tableView, NSIndexPath *indexPath) { + fb_dispatch_on_main_thread(^{ + for (FBSDKEventBinding *binding in bindings) { + FBSDKCodelessPathComponent *component = binding.path.lastObject; + if ((component.section == -1 || component.section == indexPath.section) + && (component.row == -1 || component.row == indexPath.row)) { + UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; + [binding trackEvent:cell]; + } + } + }); + }; + [FBSDKSwizzler swizzleSelector:@selector(tableView:didSelectRowAtIndexPath:) + onClass:[delegate class] + withBlock:block + named:@"handle_table_view"]; + } + }); + } else if ([view isKindOfClass:[UICollectionView class]] + && [delegate conformsToProtocol:@protocol(UICollectionViewDelegate)]) { + fb_dispatch_on_default_thread(^{ + NSMutableSet *matchedBindings = [NSMutableSet set]; + for (FBSDKEventBinding *binding in self->eventBindings) { + if (binding.path.count > 1) { + NSArray *shortPath = [binding.path + subarrayWithRange:NSMakeRange(0, binding.path.count - 1)]; + if ([FBSDKEventBinding isPath:shortPath matchViewPath:path]) { + [matchedBindings addObject:binding]; + } + } + } + + if (matchedBindings.count > 0) { + NSArray *bindings = matchedBindings.allObjects; + void (^block)(id, SEL, id, id) = ^(id target, SEL command, UICollectionView *collectionView, NSIndexPath *indexPath) { + fb_dispatch_on_main_thread(^{ + for (FBSDKEventBinding *binding in bindings) { + FBSDKCodelessPathComponent *component = binding.path.lastObject; + if ((component.section == -1 || component.section == indexPath.section) + && (component.row == -1 || component.row == indexPath.row)) { + UICollectionViewCell *cell = [collectionView cellForItemAtIndexPath:indexPath]; + [binding trackEvent:cell]; + } + } + }); + }; + [FBSDKSwizzler swizzleSelector:@selector(collectionView:didSelectItemAtIndexPath:) + onClass:[delegate class] + withBlock:block + named:@"handle_collection_view"]; + } + }); + } + }); + }); +} + +#pragma clang diagnostic pop +- (void)updateBindings:(NSArray *)bindings { + eventBindings = bindings; + [reactBindings removeAllObjects]; + fb_dispatch_on_main_thread(^{ + [self rematchBindings]; + }); +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKViewHierarchy.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKViewHierarchy.h new file mode 100644 index 0000000..980c785 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKViewHierarchy.h @@ -0,0 +1,38 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import +#import + +@interface FBSDKViewHierarchy : NSObject + ++ (NSObject *)getParent:(NSObject *)obj; ++ (NSArray *)getChildren:(NSObject *)obj; ++ (NSArray *)getPath:(NSObject *)obj; ++ (NSMutableDictionary *)getDetailAttributesOf:(NSObject *)obj; + ++ (NSString *)getText:(NSObject *)obj; ++ (NSString *)getHint:(NSObject *)obj; ++ (NSIndexPath *)getIndexPath:(NSObject *)obj; ++ (NSUInteger)getClassBitmask:(NSObject *)obj; ++ (UITableView *)getParentTableView:(UIView *)cell; ++ (UICollectionView *)getParentCollectionView:(UIView *)cell; ++ (NSInteger)getTag:(NSObject *)obj; ++ (NSNumber *)getViewReactTag:(UIView *)view; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKViewHierarchy.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKViewHierarchy.m new file mode 100644 index 0000000..62d2d98 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKViewHierarchy.m @@ -0,0 +1,619 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKViewHierarchy.h" + +#import + +#import + +#import "FBSDKCodelessMacros.h" +#import "FBSDKCodelessPathComponent.h" +#import "FBSDKCoreKit+Internal.h" + +#define MAX_VIEW_HIERARCHY_LEVEL 35 + +typedef NS_ENUM(NSUInteger, FBCodelessClassBitmask) { + /*! Indicates that the class is subclass of UIControl */ + FBCodelessClassBitmaskUIControl = 1 << 3, + /*! Indicates that the class is subclass of UIControl */ + FBCodelessClassBitmaskUIButton = 1 << 4, + /*! Indicates that the class is ReactNative Button */ + FBCodelessClassBitmaskReactNativeButton = 1 << 6, + /*! Indicates that the class is UITableViewCell */ + FBCodelessClassBitmaskUITableViewCell = 1 << 7, + /*! Indicates that the class is UICollectionViewCell */ + FBCodelessClassBitmaskUICollectionViewCell = 1 << 8, + /*! Indicates that the class is UILabel */ + FBCodelessClassBitmaskLabel = 1 << 10, + /*! Indicates that the class is UITextView or UITextField*/ + FBCodelessClassBitmaskInput = 1 << 11, + /*! Indicates that the class is UIPicker*/ + FBCodelessClassBitmaskPicker = 1 << 12, + /*! Indicates that the class is UISwitch*/ + FBCodelessClassBitmaskSwitch = 1 << 13, + /*! Indicates that the class is UIViewController*/ + FBCodelessClassBitmaskUIViewController = 1 << 17, +}; + +@implementation FBSDKViewHierarchy + ++ (NSArray*)getChildren:(NSObject*)obj +{ + if ([obj isKindOfClass:[UIControl class]]) { + return nil; + } + + NSMutableArray *children = [NSMutableArray array]; + + // children of window should be viewcontroller + if ([obj isKindOfClass:[UIWindow class]]) { + UIViewController *rootVC = ((UIWindow *)obj).rootViewController; + NSArray *subviews = ((UIWindow *)obj).subviews; + for (UIView *child in subviews) { + if (child != rootVC.view) { + UIViewController *vc = [FBSDKViewHierarchy getParentViewController:child]; + if (vc != nil && vc.view == child) { + [children addObject:vc]; + } else { + [children addObject:child]; + } + } else { + if (rootVC) { + [children addObject:rootVC]; + } + } + } + } else if ([obj isKindOfClass:[UIView class]]) { + NSArray *subviews = [((UIView *)obj).subviews copy]; + for (UIView *child in subviews) { + UIViewController *vc = [FBSDKViewHierarchy getParentViewController:child]; + if (vc && vc.view == child) { + [children addObject:vc]; + } else { + [children addObject:child]; + } + } + } else if ([obj isKindOfClass:[UINavigationController class]]) { + UIViewController *vc = ((UINavigationController*)obj).visibleViewController; + UIViewController *tc = ((UINavigationController*)obj).topViewController; + NSArray *nextChildren = [FBSDKViewHierarchy getChildren:((UIViewController*)obj).view]; + for (NSObject *child in nextChildren) { + if (tc && [self isView:child superViewOfView:tc.view]) { + [children addObject:tc]; + } else if (vc && [self isView:child superViewOfView:vc.view]) { + [children addObject:vc]; + } else { + if (child != vc.view && child != tc.view) { + [children addObject:child]; + } else { + if (vc && child == vc.view) { + [children addObject:vc]; + } else if (tc && child == tc.view) { + [children addObject:tc]; + } + } + } + } + + if (vc && ![children containsObject:vc]) { + [children addObject:vc]; + } + } else if ([obj isKindOfClass:[UITabBarController class]]) { + UIViewController *vc = ((UITabBarController *)obj).selectedViewController; + NSArray *nextChildren = [FBSDKViewHierarchy getChildren:((UIViewController*)obj).view]; + for (NSObject *child in nextChildren) { + if (vc && [self isView:child superViewOfView:vc.view]) { + [children addObject:vc]; + } else { + if (vc && child == vc.view) { + [children addObject:vc]; + } else { + [children addObject:child]; + } + } + } + + if (vc && ![children containsObject:vc]) { + [children addObject:vc]; + } + } else if ([obj isKindOfClass:[UIViewController class]]) { + UIViewController *vc = (UIViewController *)obj; + if (vc.isViewLoaded) { + NSArray *nextChildren = [FBSDKViewHierarchy getChildren:vc.view]; + if (nextChildren.count > 0) { + [children addObjectsFromArray:nextChildren]; + } + } + for (NSObject *child in vc.childViewControllers) { + [children addObject:child]; + } + UIViewController *presentedVC = vc.presentedViewController; + if (presentedVC) { + [children addObject:presentedVC]; + } + } + return children; +} + ++ (NSObject *)getParent:(NSObject *)obj +{ + if ([obj isKindOfClass:[UIView class]]) { + UIView *superview = ((UIView *)obj).superview; + UIViewController *superviewViewController = [FBSDKViewHierarchy + getParentViewController:superview]; + if (superviewViewController && superviewViewController.view == superview) { + return superviewViewController; + } + if (superview && superview != obj) { + return superview; + } + } + else if ([obj isKindOfClass:[UIViewController class]]) { + UIViewController *vc = (UIViewController *)obj; + UIViewController *parentVC = vc.parentViewController; + UIViewController *presentingVC = vc.presentingViewController; + UINavigationController *nav = vc.navigationController; + UITabBarController *tab = vc.tabBarController; + + if (nav) { + return nav; + } + + if (tab) { + return tab; + } + + if (parentVC) { + return parentVC; + } + + if (presentingVC && presentingVC.presentedViewController == vc) { + return presentingVC; + } + + // Return parent of view of UIViewController + NSObject *viewParent = [FBSDKViewHierarchy getParent:vc.view]; + if (viewParent) { + return viewParent; + } + } + return nil; +} + ++ (NSArray *)getPath:(NSObject *)obj +{ + return [FBSDKViewHierarchy getPath:obj limit:MAX_VIEW_HIERARCHY_LEVEL]; +} + ++ (NSArray *)getPath:(NSObject *)obj limit:(int)limit +{ + if (!obj || limit <= 0) { + return nil; + } + + NSMutableArray *path; + + NSObject *parent = [FBSDKViewHierarchy getParent:obj]; + if (parent) { + NSArray *parentPath = [FBSDKViewHierarchy getPath:parent limit:limit - 1]; + path = [NSMutableArray arrayWithArray:parentPath]; + } else { + path = [NSMutableArray array]; + } + + NSDictionary *componentInfo = [FBSDKViewHierarchy getAttributesOf:obj parent:parent]; + + FBSDKCodelessPathComponent *pathComponent = [[FBSDKCodelessPathComponent alloc] + initWithJSON:componentInfo]; + [path addObject:pathComponent]; + + return [NSArray arrayWithArray:path]; +} + ++ (NSDictionary *)getAttributesOf:(NSObject *)obj parent:(NSObject *)parent +{ + NSMutableDictionary *componentInfo = [NSMutableDictionary dictionary]; + componentInfo[CODELESS_MAPPING_CLASS_NAME_KEY] = NSStringFromClass([obj class]); + + NSString *text = [FBSDKViewHierarchy getText:obj]; + if (text) { + componentInfo[CODELESS_MAPPING_TEXT_KEY] = text; + } + + NSString *hint = [FBSDKViewHierarchy getHint:obj]; + if (hint) { + componentInfo[CODELESS_MAPPING_HINT_KEY] = hint; + } + + NSIndexPath *indexPath = [FBSDKViewHierarchy getIndexPath:obj]; + if (indexPath) { + componentInfo[CODELESS_MAPPING_SECTION_KEY] = @(indexPath.section); + componentInfo[CODELESS_MAPPING_ROW_KEY] = @(indexPath.row); + } + + if (parent != nil) { + NSArray *children = [FBSDKViewHierarchy getChildren:parent]; + NSUInteger index = [children indexOfObject:obj]; + if (index != NSNotFound) { + componentInfo[CODELESS_MAPPING_INDEX_KEY] = @(index); + } + } else { + componentInfo[CODELESS_MAPPING_INDEX_KEY] = @0; + } + + componentInfo[CODELESS_VIEW_TREE_TAG_KEY] = @([FBSDKViewHierarchy getTag:obj]); + + return [componentInfo copy]; +} + ++ (NSMutableDictionary *)getDetailAttributesOf:(NSObject *)obj +{ + if (!obj) { + return nil; + } + + NSObject *parent = [FBSDKViewHierarchy getParent:obj]; + + NSDictionary *simpleAttributes = [FBSDKViewHierarchy getAttributesOf:obj parent:parent]; + + NSMutableDictionary *result = [NSMutableDictionary dictionaryWithDictionary:simpleAttributes]; + + NSString *className = NSStringFromClass([obj class]); + result[CODELESS_VIEW_TREE_CLASS_NAME_KEY] = className; + + NSUInteger classBitmask = [FBSDKViewHierarchy getClassBitmask:obj]; + result[CODELESS_VIEW_TREE_CLASS_TYPE_BIT_MASK_KEY] = [NSString stringWithFormat:@"%lu", (unsigned long)classBitmask]; + + if ([obj isKindOfClass:[UIControl class]]) { + // Get actions of UIControl + UIControl *control = (UIControl *)obj; + NSMutableSet *actions = [NSMutableSet set]; + NSSet *targets = control.allTargets; + for (NSObject *target in targets) { + NSArray *ary = [control actionsForTarget:target forControlEvent:0]; + if (ary.count > 0) { + [actions addObjectsFromArray:ary]; + } + } + if (targets.count > 0) { + result[CODELESS_VIEW_TREE_ACTIONS_KEY] = actions.allObjects; + } + } + + result[CODELESS_VIEW_TREE_DIMENSION_KEY] = [FBSDKViewHierarchy getDimensionOf:obj]; + + NSDictionary *textStyle = [FBSDKViewHierarchy getTextStyle:obj]; + if (textStyle) { + result[CODELESS_VIEW_TREE_TEXT_STYLE_KEY] = textStyle; + } + + return result; +} + ++ (NSIndexPath *)getIndexPath:(NSObject *)obj +{ + NSIndexPath *indexPath = nil; + + if ([obj isKindOfClass:[UITableViewCell class]]) { + UITableView *tableView = [FBSDKViewHierarchy getParentTableView:(UIView *)obj]; + indexPath = [tableView indexPathForCell:(UITableViewCell *)obj]; + } else if ([obj isKindOfClass:[UICollectionViewCell class]]) { + UICollectionView *collectionView = [FBSDKViewHierarchy getParentCollectionView:(UIView *)obj]; + indexPath = [collectionView indexPathForCell:(UICollectionViewCell *)obj]; + } + + return indexPath; +} + ++ (NSString *)getText:(NSObject *)obj +{ + NSString *text = nil; + + if ([obj isKindOfClass:[UIButton class]]) { + text = ((UIButton *)obj).currentTitle; + } else if ([obj isKindOfClass:[UITextView class]] || + [obj isKindOfClass:[UITextField class]] || + [obj isKindOfClass:[UILabel class]]) { + text = ((UILabel *)obj).text; + } else if ([obj isKindOfClass:[UIPickerView class]]) { + UIPickerView *picker = (UIPickerView *)obj; + NSInteger sections = picker.numberOfComponents; + NSMutableArray *titles = [NSMutableArray array]; + + for (NSInteger i = 0; i < sections; i++) { + NSInteger row = [picker selectedRowInComponent:i]; + NSString *title; + if ([picker.delegate + respondsToSelector:@selector(pickerView:titleForRow:forComponent:)]) { + title = [picker.delegate pickerView:picker titleForRow:row forComponent:i]; + } else if ([picker.delegate + respondsToSelector:@selector(pickerView:attributedTitleForRow:forComponent:)]) { + title = [picker.delegate + pickerView:picker + attributedTitleForRow:row forComponent:i].string; + } + [titles addObject:title ?: @""]; + } + + if (titles.count > 0) { + text = [FBSDKInternalUtility JSONStringForObject:titles + error:NULL + invalidObjectHandler:NULL]; + } + } else if ([obj isKindOfClass:[UIDatePicker class]]) { + UIDatePicker *picker = (UIDatePicker *)obj; + NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; + formatter.dateFormat = @"yyyy-MM-dd HH:mm:ssZ"; + text = [formatter stringFromDate:picker.date]; + } else if ([obj isKindOfClass:objc_lookUpClass("RCTTextView")]) { + NSTextStorage *textStorage = [FBSDKAppEventsUtility getVariable:@"_textStorage" + fromInstance:obj]; + if (textStorage) { + text = textStorage.string; + } + } else if ([obj isKindOfClass:objc_lookUpClass("RCTBaseTextInputView")]) { + NSAttributedString *attributedText = [FBSDKAppEventsUtility getVariable:@"attributedText" + fromInstance:obj]; + text = attributedText.string; + } + + if ([obj conformsToProtocol:@protocol(UITextInput)]) { + id input = (id)obj; + if (input.secureTextEntry) { + text = nil; + } else { + switch (input.keyboardType) { + case UIKeyboardTypePhonePad: + case UIKeyboardTypeEmailAddress: + text = nil; + break; + default: break; + } + } + } + + if ([FBSDKAppEventsUtility isSensitiveUserData:text]) { + return nil; + } + + return text.length > 0 ? text : nil; +} + ++ (NSDictionary *)getTextStyle:(NSObject *)obj +{ + UIFont *font = nil; + if ([obj isKindOfClass:[UIButton class]]) { + font = ((UIButton *)obj).titleLabel.font; + } else if ([obj isKindOfClass:[UILabel class]]) { + font = ((UILabel *)obj).font; + } else if ([obj isKindOfClass:[UITextField class]]) { + font = ((UITextField *)obj).font; + } else if ([obj isKindOfClass:[UITextView class]]) { + font = ((UITextView *)obj).font; + } + + if (font) { + UIFontDescriptorSymbolicTraits traits = font.fontDescriptor.symbolicTraits; + BOOL isBold = (traits & UIFontDescriptorTraitBold) != 0; + BOOL isItalic = (traits & UIFontDescriptorTraitItalic) != 0; + CGFloat fontSize = font.pointSize; + + return @{ + CODELESS_VIEW_TREE_TEXT_IS_BOLD_KEY: @(isBold), + CODELESS_VIEW_TREE_TEXT_IS_ITALIC_KEY: @(isItalic), + CODELESS_VIEW_TREE_TEXT_SIZE_KEY: @(fontSize) + }; + } + + return nil; +} + ++ (NSString *)getHint:(NSObject *)obj +{ + NSString *hint = nil; + + if ([obj isKindOfClass:[UITextField class]]) { + hint = ((UITextField *)obj).placeholder; + } else if ([obj isKindOfClass:[UINavigationController class]]) { + UIViewController *top = ((UINavigationController *)obj).topViewController; + if (top) { + hint = NSStringFromClass([top class]); + } + } + + return hint.length > 0 ? hint : nil; +} + ++ (NSUInteger)getClassBitmask:(NSObject *)obj +{ + NSUInteger bitmask = 0; + + if ([obj isKindOfClass:[UIView class]]) { + if ([obj isKindOfClass:[UIControl class]]) { + bitmask |= FBCodelessClassBitmaskUIControl; + if ([obj isKindOfClass:[UIButton class]]) { + bitmask |= FBCodelessClassBitmaskUIButton; + } else if ([obj isKindOfClass:[UISwitch class]]) { + bitmask |= FBCodelessClassBitmaskSwitch; + }else if ([obj isKindOfClass:[UIDatePicker class]]) { + bitmask |= FBCodelessClassBitmaskPicker; + } + } else if ([obj isKindOfClass:[UITableViewCell class]]) { + bitmask |= FBCodelessClassBitmaskUITableViewCell; + } else if ([obj isKindOfClass:[UICollectionViewCell class]]) { + bitmask |= FBCodelessClassBitmaskUICollectionViewCell; + } else if ([obj isKindOfClass:[UIPickerView class]]) { + bitmask |= FBCodelessClassBitmaskPicker; + } else if ([obj isKindOfClass:[UILabel class]]) { + bitmask |= FBCodelessClassBitmaskLabel; + } + + if ([FBSDKViewHierarchy isRCTButton:((UIView *)obj)]) { + bitmask |= FBCodelessClassBitmaskReactNativeButton; + } + + // Check selector of UITextInput protocol instead of checking conformsToProtocol + if ([obj respondsToSelector:@selector(textInRange:)]) { + bitmask |= FBCodelessClassBitmaskInput; + } + } else if ([obj isKindOfClass:[UIViewController class]]) { + bitmask |= FBCodelessClassBitmaskUIViewController; + } + + return bitmask; +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundeclared-selector" ++ (BOOL)isRCTButton:(UIView *)view +{ + if (view == nil) { + return NO; + } + + Class classRCTView = objc_lookUpClass(ReactNativeClassRCTView); + if (classRCTView && [view isKindOfClass:classRCTView] && + [view respondsToSelector:@selector(reactTagAtPoint:)] && + [view respondsToSelector:@selector(reactTag)] && + view.userInteractionEnabled) { + // We check all its subviews locations and the view is clickable if there exists one that mathces reactTagAtPoint + for (UIView *subview in view.subviews) { + if (subview && ![subview isKindOfClass:classRCTView]) { + NSNumber *reactTag = [view performSelector:@selector(reactTagAtPoint:) + withObject:[NSValue valueWithCGPoint:subview.frame.origin]]; + NSNumber *subviewReactTag = [FBSDKViewHierarchy getViewReactTag:subview]; + if (reactTag != nil && subviewReactTag != nil && [reactTag isEqualToNumber:subviewReactTag]) { + return YES; + } + } + } + } + + return NO; +} + ++ (NSNumber *)getViewReactTag:(UIView *)view +{ + if (view != nil && [view respondsToSelector:@selector(reactTag)]) { + NSNumber *reactTag = [view performSelector:@selector(reactTag)]; + if (reactTag != nil && [reactTag isKindOfClass:[NSNumber class]]) { + return reactTag; + } + } + + return nil; +} +#pragma clang diagnostic pop + ++ (BOOL)isView:(NSObject *)obj1 superViewOfView:(UIView *)obj2 +{ + if (![obj1 isKindOfClass:[UIView class]] + || ![obj2 isKindOfClass:[UIView class]]) { + return NO; + } + UIView *view1 = (UIView *)obj1; + UIView *view2 = (UIView *)obj2; + UIView *superview = view2; + while (superview) { + superview = superview.superview; + if (superview == view1) { + return YES; + } + } + + return NO; +} + ++ (UIViewController *)getParentViewController:(UIView *)view +{ + UIResponder *parentResponder = view; + + while (parentResponder) { + parentResponder = parentResponder.nextResponder; + if ([parentResponder isKindOfClass:[UIViewController class]]) { + return (UIViewController *)parentResponder; + } + } + + return nil; +} + ++ (UITableView *)getParentTableView:(UIView *)cell +{ + UIView *superview = cell.superview; + while (superview) { + if ([superview isKindOfClass:[UITableView class]]) { + return (UITableView *)superview; + } + superview = superview.superview; + } + return nil; +} + ++ (UICollectionView *)getParentCollectionView:(UIView *)cell +{ + UIView *superview = cell.superview; + while (superview) { + if ([superview isKindOfClass:[UICollectionView class]]) { + return (UICollectionView *)superview; + } + superview = superview.superview; + } + return nil; +} + ++ (NSInteger)getTag:(NSObject *)obj +{ + if ([obj isKindOfClass:[UIView class]]) { + return ((UIView *)obj).tag; + } else if ([obj isKindOfClass:[UIViewController class]]) { + return ((UIViewController *)obj).view.tag; + } + + return 0; +} + ++ (NSDictionary *)getDimensionOf:(NSObject *)obj +{ + UIView *view = nil; + + if ([obj isKindOfClass:[UIView class]]) { + view = (UIView *)obj; + } else if ([obj isKindOfClass:[UIViewController class]]) { + view = ((UIViewController *)obj).view; + } + + CGRect frame = view.frame; + CGPoint offset = CGPointZero; + + if ([view isKindOfClass:[UIScrollView class]]) + offset = ((UIScrollView *)view).contentOffset; + + return @{ + CODELESS_VIEW_TREE_TOP_KEY: @((int)frame.origin.y), + CODELESS_VIEW_TREE_LEFT_KEY: @((int)frame.origin.x), + CODELESS_VIEW_TREE_WIDTH_KEY: @((int)frame.size.width), + CODELESS_VIEW_TREE_HEIGHT_KEY: @((int)frame.size.height), + CODELESS_VIEW_TREE_OFFSET_X_KEY: @((int)offset.x), + CODELESS_VIEW_TREE_OFFSET_Y_KEY: @((int)offset.y), + CODELESS_VIEW_TREE_VISIBILITY_KEY: view.isHidden ? @4 : @0 + }; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEvents+Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEvents+Internal.h new file mode 100644 index 0000000..41ab684 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEvents+Internal.h @@ -0,0 +1,211 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKAppEventsUtility.h" + +@class FBSDKGraphRequest; + +// Internally known event names + +FOUNDATION_EXPORT NSString *const FBSDKAppEventNamePurchased; + +/** Use to log that the share dialog was launched */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameShareSheetLaunch; + +/** Use to log that the share dialog was dismissed */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameShareSheetDismiss; + +/** Use to log that the permissions UI was launched */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNamePermissionsUILaunch; + +/** Use to log that the permissions UI was dismissed */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNamePermissionsUIDismiss; + +/** Use to log that the login view was used */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameLoginViewUsage; + +/*! Use to log that the share tray launched. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameShareTrayDidLaunch; + +/*! Use to log that the person selected a sharing target. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameShareTrayDidSelectActivity; + +// Internally known event parameters + +/** String parameter specifying the outcome of a dialog invocation */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterDialogOutcome; + +/** Parameter key used to specify which application launches this application. */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterLaunchSource; + +/** Use to log the result of a call to FBDialogs presentShareDialogWithParams: */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBDialogsPresentShareDialog; + +/** Use to log the result of a call to FBDialogs presentShareDialogWithOpenGraphActionParams: */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBDialogsPresentShareDialogOG; + +/** Use to log the result of a call to FBDialogs presentLikeDialogWithLikeParams: */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBDialogsPresentLikeDialogOG; + +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBDialogsPresentShareDialogPhoto; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBDialogsPresentMessageDialog; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBDialogsPresentMessageDialogPhoto; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBDialogsPresentMessageDialogOG; + +/** Use to log the start of an auth request that cannot be fulfilled by the token cache */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSessionAuthStart; + +/** Use to log the end of an auth request that was not fulfilled by the token cache */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSessionAuthEnd; + +/** Use to log the start of a specific auth method as part of an auth request */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSessionAuthMethodStart; + +/** Use to log the end of the last tried auth method as part of an auth request */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSessionAuthMethodEnd; + +/** Use to log the timestamp for the transition to the Facebook native login dialog */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBDialogsNativeLoginDialogStart; + +/** Use to log the timestamp for the transition back to the app after the Facebook native login dialog */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBDialogsNativeLoginDialogEnd; + +/** Use to log the e2e timestamp metrics for web login */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBDialogsWebLoginCompleted; + +/** Use to log the result of the App Switch OS AlertView. Only available on OS >= iOS10 */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSessionFASLoginDialogResult; + +/** Use to log the live streaming events from sdk */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLiveStreamingStart; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLiveStreamingStop; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLiveStreamingPause; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLiveStreamingResume; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLiveStreamingError; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLiveStreamingUpdateStatus; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLiveStreamingVideoID; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLiveStreamingMic; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLiveStreamingCamera; + +/** Use to log the results of a share dialog */ +FOUNDATION_EXPORT NSString *const FBSDLAppEventNameFBSDKEventShareDialogResult; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKEventMessengerShareDialogResult; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKEventAppInviteShareDialogResult; + +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKEventShareDialogShow; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKEventMessengerShareDialogShow; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKEventAppInviteShareDialogShow; + +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterDialogMode; +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterDialogShareContentType; +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterDialogShareContentUUID; +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterDialogShareContentPageID; + +/*! Use to log parameters for share tray use */ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterShareTrayActivityName; +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterShareTrayResult; + +/*! Use to log parameters for live streaming*/ +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterLiveStreamingPrevStatus; +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterLiveStreamingStatus; +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterLiveStreamingError; +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterLiveStreamingVideoID; +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterLiveStreamingMicEnabled; +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterLiveStreamingCameraEnabled; + +// Internally known event parameter values + +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogOutcomeValue_Completed; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogOutcomeValue_Cancelled; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogOutcomeValue_Failed; + +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareContentTypeOpenGraph; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareContentTypeStatus; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareContentTypePhoto; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareContentTypeVideo; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareContentTypeCamera; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareContentTypeMessengerGenericTemplate; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareContentTypeMessengerMediaTemplate; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareContentTypeMessengerOpenGraphMusicTemplate; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareContentTypeUnknown; + + +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareModeAutomatic; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareModeBrowser; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareModeNative; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareModeShareSheet; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareModeWeb; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareModeFeedBrowser; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareModeFeedWeb; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsDialogShareModeUnknown; + +FOUNDATION_EXPORT NSString *const FBSDKAppEventsNativeLoginDialogStartTime; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsNativeLoginDialogEndTime; + +FOUNDATION_EXPORT NSString *const FBSDKAppEventsWebLoginE2E; + +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLikeButtonImpression; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLoginButtonImpression; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKSendButtonImpression; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKShareButtonImpression; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLiveStreamingButtonImpression; + +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKSmartLoginService; + +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLikeButtonDidTap; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLoginButtonDidTap; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKSendButtonDidTap; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKShareButtonDidTap; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLiveStreamingButtonDidTap; + +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLikeControlDidDisable; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLikeControlDidLike; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLikeControlDidPresentDialog; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLikeControlDidTap; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLikeControlDidUnlike; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLikeControlError; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLikeControlImpression; +FOUNDATION_EXPORT NSString *const FBSDKAppEventNameFBSDKLikeControlNetworkUnavailable; + +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterDialogErrorMessage; +FOUNDATION_EXPORT NSString *const FBSDKAppEventParameterLogTime; + +FOUNDATION_EXPORT NSString *const FBSDKAppEventsWKWebViewMessagesHandlerKey; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsWKWebViewMessagesActionKey; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsWKWebViewMessagesEventKey; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsWKWebViewMessagesParamsKey; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsWKWebViewMessagesPixelTrackKey; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsWKWebViewMessagesPixelTrackCustomKey; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsWKWebViewMessagesPixelTrackSingleKey; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsWKWebViewMessagesPixelTrackSingleCustomKey; +FOUNDATION_EXPORT NSString *const FBSDKAppEventsWKWebViewMessagesPixelIDKey; + +@interface FBSDKAppEvents (Internal) + ++ (void)logImplicitEvent:(NSString *)eventName + valueToSum:(NSNumber *)valueToSum + parameters:(NSDictionary *)parameters + accessToken:(FBSDKAccessToken *)accessToken; + ++ (FBSDKAppEvents *)singleton; +- (void)flushForReason:(FBSDKAppEventsFlushReason)flushReason; +- (void)registerNotifications; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsDeviceInfo.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsDeviceInfo.h new file mode 100644 index 0000000..2de04b8 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsDeviceInfo.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKAppEventsDeviceInfo : NSObject + ++ (void)extendDictionaryWithDeviceInfo:(NSMutableDictionary *)dictionary; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsDeviceInfo.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsDeviceInfo.m new file mode 100644 index 0000000..2354a24 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsDeviceInfo.m @@ -0,0 +1,278 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppEventsDeviceInfo.h" + +#import +#import + +#if !TARGET_OS_TV +#import +#import +#endif +#import +#import + +#import "FBSDKAppEvents+Internal.h" +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKUtility.h" + +#define FB_ARRAY_COUNT(x) sizeof(x) / sizeof(x[0]) + +static const u_int FB_GROUP1_RECHECK_DURATION = 30 * 60; // seconds + +// Apple reports storage in binary gigabytes (1024^3) in their About menus, etc. +static const u_int FB_GIGABYTE = 1024 * 1024 * 1024; // bytes + +@implementation FBSDKAppEventsDeviceInfo +{ + // Ephemeral data, may change during the lifetime of an app. We collect them in different + // 'group' frequencies - group1 may gets collected once every 30 minutes. + + // group1 + NSString *_carrierName; + NSString *_timeZoneAbbrev; + unsigned long long _remainingDiskSpaceGB; + NSString *_timeZoneName; + + // Persistent data, but we maintain it to make rebuilding the device info as fast as possible. + NSString *_bundleIdentifier; + NSString *_longVersion; + NSString *_shortVersion; + NSString *_sysVersion; + NSString *_machine; + NSString *_language; + unsigned long long _totalDiskSpaceGB; + unsigned long long _coreCount; + CGFloat _width; + CGFloat _height; + CGFloat _density; + + // Other state + long _lastGroup1CheckTime; + BOOL _isEncodingDirty; + NSString *_encodedDeviceInfo; +} + +#pragma mark - Public Methods + ++ (void)extendDictionaryWithDeviceInfo:(NSMutableDictionary *)dictionary +{ + dictionary[@"extinfo"] = [[self sharedDeviceInfo] encodedDeviceInfo]; +} + +#pragma mark - Internal Methods + ++ (void)initialize +{ + if (self == [FBSDKAppEventsDeviceInfo class]) { + [[self sharedDeviceInfo] _collectPersistentData]; + } +} + ++ (instancetype)sharedDeviceInfo +{ + static FBSDKAppEventsDeviceInfo *_sharedDeviceInfo = nil; + if (_sharedDeviceInfo == nil) { + _sharedDeviceInfo = [[FBSDKAppEventsDeviceInfo alloc] init]; + } + return _sharedDeviceInfo; +} + +- (instancetype)init +{ + if ((self = [super init])) { + _isEncodingDirty = YES; + } + return self; +} + +- (NSString *)encodedDeviceInfo +{ + @synchronized (self) { + + BOOL isGroup1Expired = [self _isGroup1Expired]; + BOOL isEncodingExpired = isGroup1Expired; // Can || other groups in if we add them + + // As long as group1 hasn't expired, we can just return the last generated value + if (_encodedDeviceInfo && !isEncodingExpired) { + return _encodedDeviceInfo; + } + + if (isGroup1Expired) { + [self _collectGroup1Data]; + } + + if (_isEncodingDirty) { + self.encodedDeviceInfo = [self _generateEncoding]; + _isEncodingDirty = NO; + } + + return _encodedDeviceInfo; + } +} + +- (void)setEncodedDeviceInfo:(NSString *)encodedDeviceInfo +{ + @synchronized (self) { + if (![_encodedDeviceInfo isEqualToString:encodedDeviceInfo]) { + _encodedDeviceInfo = [encodedDeviceInfo copy]; + } + } +} + +// This data need only be collected once. +- (void)_collectPersistentData +{ + // Bundle stuff + NSBundle *mainBundle = [NSBundle mainBundle]; + _bundleIdentifier = mainBundle.bundleIdentifier; + _longVersion = [mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]; + _shortVersion = [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; + + // Locale stuff + _language = [NSLocale currentLocale].localeIdentifier; + + // Device stuff + UIDevice *device = [UIDevice currentDevice]; + _sysVersion = device.systemVersion; + _coreCount = [FBSDKAppEventsDeviceInfo _coreCount]; + + UIScreen *sc = [UIScreen mainScreen]; + CGRect sr = sc.bounds; + _width = sr.size.width; + _height = sr.size.height; + _density = sc.scale; + + struct utsname systemInfo; + uname(&systemInfo); + _machine = @(systemInfo.machine); + + // Disk space stuff + float totalDiskSpace = [FBSDKAppEventsDeviceInfo _getTotalDiskSpace].floatValue; + _totalDiskSpaceGB = (unsigned long long)round(totalDiskSpace / FB_GIGABYTE); +} + +- (BOOL)_isGroup1Expired +{ + return ([FBSDKAppEventsUtility unixTimeNow] - _lastGroup1CheckTime) > FB_GROUP1_RECHECK_DURATION; +} + +// This data is collected only once every GROUP1_RECHECK_DURATION. +- (void)_collectGroup1Data +{ + // Carrier + NSString *newCarrierName = [FBSDKAppEventsDeviceInfo _getCarrier]; + if (![newCarrierName isEqualToString:_carrierName]) { + _carrierName = newCarrierName; + _isEncodingDirty = YES; + } + + // Time zone + NSTimeZone *timeZone = [NSTimeZone systemTimeZone]; + NSString *timeZoneName = timeZone.name; + if (![timeZoneName isEqualToString:_timeZoneName]) { + _timeZoneName = timeZoneName; + _timeZoneAbbrev = timeZone.abbreviation; + _isEncodingDirty = YES; + } + + // Remaining disk space + float remainingDiskSpace = [FBSDKAppEventsDeviceInfo _getRemainingDiskSpace].floatValue; + unsigned long long newRemainingDiskSpaceGB = (unsigned long long)round(remainingDiskSpace / FB_GIGABYTE); + if (_remainingDiskSpaceGB != newRemainingDiskSpaceGB) { + _remainingDiskSpaceGB = newRemainingDiskSpaceGB; + _isEncodingDirty = YES; + } + + _lastGroup1CheckTime = [FBSDKAppEventsUtility unixTimeNow]; +} + +- (NSString *)_generateEncoding +{ + // Keep a bit of precision on density as it's the most likely to become non-integer. + NSString *densityString = _density ? [NSString stringWithFormat:@"%.02f", _density] : @""; + + NSArray *arr = @[ + @"i2", // version - starts with 'i' for iOS, we'll use 'a' for Android + _bundleIdentifier ?: @"", + _longVersion ?: @"", + _shortVersion ?: @"", + _sysVersion ?: @"", + _machine ?: @"", + _language ?: @"", + _timeZoneAbbrev ?: @"", + _carrierName ?: @"", + _width ? @((unsigned long)_width) : @"", + _height ? @((unsigned long)_height) : @"", + densityString, + @(_coreCount) ?: @"", + @(_totalDiskSpaceGB) ?: @"", + @(_remainingDiskSpaceGB) ?: @"", + _timeZoneName ?: @"" + ]; + + return [FBSDKInternalUtility JSONStringForObject:arr error:NULL invalidObjectHandler:NULL]; +} + +#pragma mark - Helper Methods + ++ (NSNumber *)_getTotalDiskSpace +{ + NSDictionary *attrs = [[[NSFileManager alloc] init] attributesOfFileSystemForPath:NSHomeDirectory() + error:nil]; + return attrs[NSFileSystemSize]; +} + ++ (NSNumber *)_getRemainingDiskSpace +{ + NSDictionary *attrs = [[[NSFileManager alloc] init] attributesOfFileSystemForPath:NSHomeDirectory() + error:nil]; + return attrs[NSFileSystemFreeSize]; +} + ++ (uint)_coreCount +{ + return [FBSDKAppEventsDeviceInfo _readSysCtlUInt:CTL_HW type:HW_AVAILCPU]; +} + ++ (uint)_readSysCtlUInt:(int)ctl type:(int)type +{ + int mib[2] = {ctl, type}; + uint value; + size_t size = sizeof value; + if (0 != sysctl(mib, FB_ARRAY_COUNT(mib), &value, &size, NULL, 0)) { + return 0; + } + return value; +} + ++ (NSString *)_getCarrier +{ +#if TARGET_OS_TV + return @"NoCarrier"; +#else + // Dynamically load class for this so calling app doesn't need to link framework in. + CTTelephonyNetworkInfo *networkInfo = [[fbsdkdfl_CTTelephonyNetworkInfoClass() alloc] init]; + CTCarrier *carrier = networkInfo.subscriberCellularProvider; + return carrier.carrierName ?: @"NoCarrier"; +#endif +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsState.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsState.h new file mode 100644 index 0000000..5bb5c2e --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsState.h @@ -0,0 +1,41 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +// this type is not thread safe. +@interface FBSDKAppEventsState : NSObject + +@property (nonatomic, readonly, copy) NSArray *events; +@property (nonatomic, readonly, assign) NSUInteger numSkipped; +@property (nonatomic, readonly, copy) NSString *tokenString; +@property (nonatomic, readonly, copy) NSString *appID; +@property (nonatomic, readonly) BOOL areAllEventsImplicit; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)initWithToken:(NSString *)tokenString appID:(NSString *)appID NS_DESIGNATED_INITIALIZER; + +- (void)addEvent:(NSDictionary *)eventDictionary isImplicit:(BOOL)isImplicit; +- (void)addEventsFromAppEventState:(FBSDKAppEventsState *)appEventsState; +- (BOOL)isCompatibleWithAppEventsState:(FBSDKAppEventsState *)appEventsState; +- (BOOL)isCompatibleWithTokenString:(NSString *)tokenString appID:(NSString *)appID; +- (NSString *)JSONStringForEvents:(BOOL)includeImplicitEvents; +- (NSString *)extractReceiptData; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsState.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsState.m new file mode 100644 index 0000000..cff1b8a --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsState.m @@ -0,0 +1,181 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppEventsState.h" + +#import "FBSDKInternalUtility.h" + +#define FBSDK_APPEVENTSTATE_ISIMPLICIT_KEY @"isImplicit" + +#define FBSDK_APPEVENTSSTATE_MAX_EVENTS 1000 + +#define FBSDK_APPEVENTSSTATE_APPID_KEY @"appID" +#define FBSDK_APPEVENTSSTATE_EVENTS_KEY @"events" +#define FBSDK_APPEVENTSSTATE_NUMSKIPPED_KEY @"numSkipped" +#define FBSDK_APPEVENTSSTATE_TOKENSTRING_KEY @"tokenString" +#define FBSDK_APPEVENTSTATE_RECEIPTDATA_KEY @"receipt_data" +#define FBSDK_APPEVENTSTATE_RECEIPTID_KEY @"receipt_id" + +@implementation FBSDKAppEventsState +{ + NSMutableArray *_mutableEvents; +} + +- (instancetype)initWithToken:(NSString *)tokenString appID:(NSString *)appID +{ + if ((self = [super init])) { + _tokenString = [tokenString copy]; + _appID = [appID copy]; + _mutableEvents = [NSMutableArray array]; + } + return self; +} + +- (instancetype)copyWithZone:(NSZone *)zone +{ + FBSDKAppEventsState *copy = [[FBSDKAppEventsState allocWithZone:zone] initWithToken:_tokenString appID:_appID]; + if (copy) { + [copy->_mutableEvents addObjectsFromArray:_mutableEvents]; + copy->_numSkipped = _numSkipped; + } + return copy; +} + +#pragma mark - NSCoding + ++ (BOOL)supportsSecureCoding +{ + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder +{ + NSString *appID = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_APPEVENTSSTATE_APPID_KEY]; + NSString *tokenString = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_APPEVENTSSTATE_TOKENSTRING_KEY]; + NSArray *events = [decoder decodeObjectOfClass:[NSArray class] forKey:FBSDK_APPEVENTSSTATE_EVENTS_KEY]; + NSUInteger numSkipped = [[decoder decodeObjectOfClass:[NSNumber class] forKey:FBSDK_APPEVENTSSTATE_NUMSKIPPED_KEY] unsignedIntegerValue]; + + if ((self = [self initWithToken:tokenString appID:appID])) { + _mutableEvents = [NSMutableArray arrayWithArray:events]; + _numSkipped = numSkipped; + } + return self; +} + +- (void)encodeWithCoder:(NSCoder *)encoder +{ + [encoder encodeObject:_appID forKey:FBSDK_APPEVENTSSTATE_APPID_KEY]; + [encoder encodeObject:_tokenString forKey:FBSDK_APPEVENTSSTATE_TOKENSTRING_KEY]; + [encoder encodeObject:@(_numSkipped) forKey:FBSDK_APPEVENTSSTATE_NUMSKIPPED_KEY]; + [encoder encodeObject:_mutableEvents forKey:FBSDK_APPEVENTSSTATE_EVENTS_KEY]; +} + +#pragma mark - Implementation + +- (NSArray *)events +{ + return [_mutableEvents copy]; +} + +- (void)addEventsFromAppEventState:(FBSDKAppEventsState *)appEventsState +{ + NSArray *toAdd = appEventsState->_mutableEvents; + NSInteger excess = _mutableEvents.count + toAdd.count - FBSDK_APPEVENTSSTATE_MAX_EVENTS; + if (excess > 0) { + NSInteger range = FBSDK_APPEVENTSSTATE_MAX_EVENTS - _mutableEvents.count; + toAdd = [toAdd subarrayWithRange:NSMakeRange(0, range)]; + _numSkipped += excess; + } + + [_mutableEvents addObjectsFromArray:toAdd]; +} + +- (void)addEvent:(NSDictionary *)eventDictionary + isImplicit:(BOOL)isImplicit { + if (_mutableEvents.count >= FBSDK_APPEVENTSSTATE_MAX_EVENTS) { + _numSkipped++; + } else { + [_mutableEvents addObject:@{ + @"event" : [eventDictionary mutableCopy], + FBSDK_APPEVENTSTATE_ISIMPLICIT_KEY : @(isImplicit) + }]; + } +} + +- (NSString *)extractReceiptData { + NSMutableString *receipts_string = [NSMutableString string]; + NSInteger transactionId = 1; + for (NSMutableDictionary* events in _mutableEvents) { + NSMutableDictionary *event = events[@"event"]; + + NSString* receipt = event[@"receipt_data"]; + // Add receipt id as the identifier for receipt data in event parameter. + // Receipt data will be sent as post parameter rather than the event parameter + if (receipt) { + NSString* idKey = [NSString stringWithFormat:@"receipt_%ld", (long)transactionId]; + event[FBSDK_APPEVENTSTATE_RECEIPTID_KEY] = idKey; + NSString* receiptWithId = [NSString stringWithFormat:@"%@::%@;;;", idKey, receipt]; + [receipts_string appendString:receiptWithId]; + transactionId++; + } + } + return receipts_string; +} + +- (BOOL)areAllEventsImplicit +{ + for (NSDictionary *event in _mutableEvents) { + if (![[event valueForKey:FBSDK_APPEVENTSTATE_ISIMPLICIT_KEY] boolValue]) { + return NO; + } + } + return YES; +} + +- (BOOL)isCompatibleWithAppEventsState:(FBSDKAppEventsState *)appEventsState +{ + return ([self isCompatibleWithTokenString:appEventsState.tokenString appID:appEventsState.appID]); +} + +- (BOOL)isCompatibleWithTokenString:(NSString *)tokenString appID:(NSString *)appID +{ + // token strings can be nil (e.g., no user token) but appIDs should not. + BOOL tokenCompatible = ([self.tokenString isEqualToString:tokenString] || + (self.tokenString == nil && tokenString == nil)); + return (tokenCompatible && + [self.appID isEqualToString:appID]); +} + +- (NSString *)JSONStringForEvents:(BOOL)includeImplicitEvents +{ + NSMutableArray *events = [[NSMutableArray alloc] initWithCapacity:_mutableEvents.count]; + for (NSDictionary *eventAndImplicitFlag in _mutableEvents) { + if (!includeImplicitEvents && [eventAndImplicitFlag[FBSDK_APPEVENTSTATE_ISIMPLICIT_KEY] boolValue]) { + continue; + } + NSMutableDictionary *event = eventAndImplicitFlag[@"event"]; + NSAssert(event != nil, @"event cannot be nil"); + [event removeObjectForKey:FBSDK_APPEVENTSTATE_RECEIPTDATA_KEY]; + + [events addObject:event]; + } + + return [FBSDKInternalUtility JSONStringForObject:events error:NULL invalidObjectHandler:NULL]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsStateManager.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsStateManager.h new file mode 100644 index 0000000..4c17a4c --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsStateManager.h @@ -0,0 +1,34 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@class FBSDKAppEventsState; + +@interface FBSDKAppEventsStateManager : NSObject + ++ (void)clearPersistedAppEventsStates; + +// reads all saved event states, appends the param, and writes them all. ++ (void)persistAppEventsData:(FBSDKAppEventsState *)appEventsState; + +// returns the array of saved app event states and deletes them. ++ (NSArray *)retrievePersistedAppEventsStates; + + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsStateManager.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsStateManager.m new file mode 100644 index 0000000..596d7a6 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsStateManager.m @@ -0,0 +1,78 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppEventsStateManager.h" + +#import + +#import "FBSDKAppEventsState.h" +#import "FBSDKAppEventsUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKSettings.h" + +// A quick optimization to allow returning empty array if we know there are no persisted events. +static BOOL g_canSkipDiskCheck = NO; + +@implementation FBSDKAppEventsStateManager + ++ (void)clearPersistedAppEventsStates +{ + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents + logEntry:@"FBSDKAppEvents Persist: Clearing"]; + [[NSFileManager defaultManager] removeItemAtPath:[[self class] filePath] + error:NULL]; + g_canSkipDiskCheck = YES; +} + ++ (void)persistAppEventsData:(FBSDKAppEventsState *)appEventsState +{ + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents + formatString:@"FBSDKAppEvents Persist: Writing %lu events", (unsigned long)appEventsState.events.count]; + + if (!appEventsState.events.count) { + return; + } + NSMutableArray *existingEvents = [NSMutableArray arrayWithArray:[[self class] retrievePersistedAppEventsStates]]; + [existingEvents addObject:appEventsState]; + + [NSKeyedArchiver archiveRootObject:existingEvents toFile:[[self class] filePath]]; + g_canSkipDiskCheck = NO; +} + ++ (NSArray *)retrievePersistedAppEventsStates +{ + NSMutableArray *eventsStates = [NSMutableArray array]; + if (!g_canSkipDiskCheck) { + [eventsStates addObjectsFromArray:[NSKeyedUnarchiver unarchiveObjectWithFile:[[self class] filePath]]]; + + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents + formatString:@"FBSDKAppEvents Persist: Read %lu event states. First state has %lu events", + (unsigned long)eventsStates.count, + (unsigned long)(eventsStates.count > 0 ? ((FBSDKAppEventsState *)eventsStates[0]).events.count : 0)]; + [[self class] clearPersistedAppEventsStates]; + } + return eventsStates; +} + +#pragma mark - Private Helpers + ++ (NSString *)filePath +{ + return [FBSDKAppEventsUtility persistenceFilePath:@"com-facebook-sdk-AppEventsPersistedEvents.json"]; +} +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsUtility.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsUtility.h new file mode 100644 index 0000000..42ec8c7 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsUtility.h @@ -0,0 +1,64 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@class FBSDKAccessToken; + +typedef NS_ENUM(NSUInteger, FBSDKAdvertisingTrackingStatus) +{ + FBSDKAdvertisingTrackingAllowed, + FBSDKAdvertisingTrackingDisallowed, + FBSDKAdvertisingTrackingUnspecified +}; + +typedef NS_ENUM(NSUInteger, FBSDKAppEventsFlushReason) +{ + FBSDKAppEventsFlushReasonExplicit, + FBSDKAppEventsFlushReasonTimer, + FBSDKAppEventsFlushReasonSessionChange, + FBSDKAppEventsFlushReasonPersistedEvents, + FBSDKAppEventsFlushReasonEventThreshold, + FBSDKAppEventsFlushReasonEagerlyFlushingEvent +}; + +@interface FBSDKAppEventsUtility : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + ++ (NSMutableDictionary *)activityParametersDictionaryForEvent:(NSString *)eventCategory + implicitEventsOnly:(BOOL)implicitEventsOnly + shouldAccessAdvertisingID:(BOOL)shouldAccessAdvertisingID; ++ (NSString *)advertiserID; ++ (FBSDKAdvertisingTrackingStatus)advertisingTrackingStatus; ++ (NSString *)attributionID; ++ (void)ensureOnMainThread:(NSString *)methodName className:(NSString *)className; ++ (NSString *)flushReasonToString:(FBSDKAppEventsFlushReason)flushReason; ++ (void)logAndNotify:(NSString *)msg allowLogAsDeveloperError:(BOOL)allowLogAsDeveloperError; ++ (void)logAndNotify:(NSString *)msg; ++ (NSString *)persistenceFilePath:(NSString *)filename; ++ (NSString *)tokenStringToUseFor:(FBSDKAccessToken *)token; ++ (long)unixTimeNow; ++ (BOOL)validateIdentifier:(NSString *)identifier; ++ (id)getVariable:(NSString *)variableName fromInstance:(NSObject *)instance; ++ (NSNumber *)getNumberValue:(NSString *)text; ++ (BOOL)isDebugBuild; ++ (BOOL)isSensitiveUserData:(NSString *)text; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsUtility.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsUtility.m new file mode 100644 index 0000000..dae2b1b --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsUtility.m @@ -0,0 +1,474 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppEventsUtility.h" + +#import + +#import + +#import "FBSDKAccessToken.h" +#import "FBSDKAppEvents.h" +#import "FBSDKAppEventsDeviceInfo.h" +#import "FBSDKConstants.h" +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKError.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKSettings.h" +#import "FBSDKTimeSpentData.h" + +#define FBSDK_APPEVENTSUTILITY_ANONYMOUSIDFILENAME @"com-facebook-sdk-PersistedAnonymousID.json" +#define FBSDK_APPEVENTSUTILITY_ANONYMOUSID_KEY @"anon_id" +#define FBSDK_APPEVENTSUTILITY_MAX_IDENTIFIER_LENGTH 40 + +@implementation FBSDKAppEventsUtility + ++ (NSMutableDictionary *)activityParametersDictionaryForEvent:(NSString *)eventCategory + implicitEventsOnly:(BOOL)implicitEventsOnly + shouldAccessAdvertisingID:(BOOL)shouldAccessAdvertisingID { + NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; + parameters[@"event"] = eventCategory; + +#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0 + NSString *attributionID = [[self class] attributionID]; // Only present on iOS 6 and below. + [FBSDKInternalUtility dictionary:parameters setObject:attributionID forKey:@"attribution"]; +#endif + + if (!implicitEventsOnly && shouldAccessAdvertisingID) { + NSString *advertiserID = [[self class] advertiserID]; + [FBSDKInternalUtility dictionary:parameters setObject:advertiserID forKey:@"advertiser_id"]; + } + + parameters[FBSDK_APPEVENTSUTILITY_ANONYMOUSID_KEY] = [self anonymousID]; + + FBSDKAdvertisingTrackingStatus advertisingTrackingStatus = [[self class] advertisingTrackingStatus]; + if (advertisingTrackingStatus != FBSDKAdvertisingTrackingUnspecified) { + BOOL allowed = (advertisingTrackingStatus == FBSDKAdvertisingTrackingAllowed); + parameters[@"advertiser_tracking_enabled"] = @(allowed).stringValue; + } + + parameters[@"application_tracking_enabled"] = @(!FBSDKSettings.limitEventAndDataUsage).stringValue; + + NSString *userID = [FBSDKAppEvents userID]; + if (userID) { + parameters[@"app_user_id"] = userID; + } + NSString *userData = [FBSDKAppEvents getUserData]; + if (userData){ + parameters[@"ud"] = userData; + } + + [FBSDKAppEventsDeviceInfo extendDictionaryWithDeviceInfo:parameters]; + + static dispatch_once_t fetchBundleOnce; + static NSMutableArray *urlSchemes; + + dispatch_once(&fetchBundleOnce, ^{ + NSBundle *mainBundle = [NSBundle mainBundle]; + urlSchemes = [[NSMutableArray alloc] init]; + for (NSDictionary *fields in [mainBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"]) { + NSArray *schemesForType = fields[@"CFBundleURLSchemes"]; + if (schemesForType) { + [urlSchemes addObjectsFromArray:schemesForType]; + } + } + }); + + if (urlSchemes.count > 0) { + parameters[@"url_schemes"] = [FBSDKInternalUtility JSONStringForObject:urlSchemes error:NULL invalidObjectHandler:NULL]; + } + + return parameters; +} + ++ (NSString *)advertiserID +{ + if (![[FBSDKSettings advertiserIDCollectionEnabled] boolValue]) { + return nil; + } + + NSString *result = nil; + + Class ASIdentifierManagerClass = fbsdkdfl_ASIdentifierManagerClass(); + if ([ASIdentifierManagerClass class]) { + ASIdentifierManager *manager = [ASIdentifierManagerClass sharedManager]; + result = manager.advertisingIdentifier.UUIDString; + } + + return result; +} + ++ (FBSDKAdvertisingTrackingStatus)advertisingTrackingStatus +{ + static dispatch_once_t fetchAdvertisingTrackingStatusOnce; + static FBSDKAdvertisingTrackingStatus status; + + dispatch_once(&fetchAdvertisingTrackingStatusOnce, ^{ + status = FBSDKAdvertisingTrackingUnspecified; + Class ASIdentifierManagerClass = fbsdkdfl_ASIdentifierManagerClass(); + if ([ASIdentifierManagerClass class]) { + ASIdentifierManager *manager = [ASIdentifierManagerClass sharedManager]; + if (manager) { + status = manager.advertisingTrackingEnabled ? FBSDKAdvertisingTrackingAllowed : FBSDKAdvertisingTrackingDisallowed; + } + } + }); + + return status; +} + ++ (NSString *)anonymousID +{ + // Grab previously written anonymous ID and, if none have been generated, create and + // persist a new one which will remain associated with this app. + NSString *result = [[self class] retrievePersistedAnonymousID]; + if (!result) { + // Generate a new anonymous ID. Create as a UUID, but then prepend the fairly + // arbitrary 'XZ' to the front so it's easily distinguishable from IDFA's which + // will only contain hex. + result = [NSString stringWithFormat:@"XZ%@", [NSUUID UUID].UUIDString]; + + [self persistAnonymousID:result]; + } + return result; +} + ++ (NSString *)attributionID +{ +#if TARGET_OS_TV + return nil; +#else + return [UIPasteboard pasteboardWithName:@"fb_app_attribution" create:NO].string; +#endif +} + +// for tests only. ++ (void)clearLibraryFiles +{ + [[NSFileManager defaultManager] removeItemAtPath:[[self class] persistenceFilePath:FBSDK_APPEVENTSUTILITY_ANONYMOUSIDFILENAME] + error:NULL]; + [[NSFileManager defaultManager] removeItemAtPath:[[self class] persistenceFilePath:FBSDKTimeSpentFilename] + error:NULL]; +} + ++ (void)ensureOnMainThread:(NSString *)methodName className:(NSString *)className +{ + FBSDKConditionalLog([NSThread isMainThread], + FBSDKLoggingBehaviorDeveloperErrors, + @"*** <%@, %@> is not called on the main thread. This can lead to errors.", + methodName, + className); +} + ++ (NSString *)flushReasonToString:(FBSDKAppEventsFlushReason)flushReason +{ + NSString *result = @"Unknown"; + switch (flushReason) { + case FBSDKAppEventsFlushReasonExplicit: + result = @"Explicit"; + break; + case FBSDKAppEventsFlushReasonTimer: + result = @"Timer"; + break; + case FBSDKAppEventsFlushReasonSessionChange: + result = @"SessionChange"; + break; + case FBSDKAppEventsFlushReasonPersistedEvents: + result = @"PersistedEvents"; + break; + case FBSDKAppEventsFlushReasonEventThreshold: + result = @"EventCountThreshold"; + break; + case FBSDKAppEventsFlushReasonEagerlyFlushingEvent: + result = @"EagerlyFlushingEvent"; + break; + } + return result; +} + ++ (void)logAndNotify:(NSString *)msg +{ + [[self class] logAndNotify:msg allowLogAsDeveloperError:YES]; +} + ++ (void)logAndNotify:(NSString *)msg allowLogAsDeveloperError:(BOOL)allowLogAsDeveloperError +{ + NSString *behaviorToLog = FBSDKLoggingBehaviorAppEvents; + if (allowLogAsDeveloperError) { + if ([FBSDKSettings.loggingBehaviors containsObject:FBSDKLoggingBehaviorDeveloperErrors]) { + // Rather than log twice, prefer 'DeveloperErrors' if it's set over AppEvents. + behaviorToLog = FBSDKLoggingBehaviorDeveloperErrors; + } + } + + [FBSDKLogger singleShotLogEntry:behaviorToLog logEntry:msg]; + NSError *error = [NSError fbErrorWithCode:FBSDKErrorAppEventsFlush message:msg]; + [[NSNotificationCenter defaultCenter] postNotificationName:FBSDKAppEventsLoggingResultNotification object:error]; +} + ++ (BOOL)matchString:(NSString *)string + firstCharacterSet:(NSCharacterSet *)firstCharacterSet +restOfStringCharacterSet:(NSCharacterSet *)restOfStringCharacterSet +{ + if (string.length == 0) { + return NO; + } + for (NSUInteger i = 0; i < string.length; i++) { + const unichar c = [string characterAtIndex:i]; + if (i == 0) { + if (![firstCharacterSet characterIsMember:c]) { + return NO; + } + } else { + if (![restOfStringCharacterSet characterIsMember:c]) { + return NO; + } + } + } + return YES; +} + ++ (BOOL)regexValidateIdentifier:(NSString *)identifier +{ + static NSCharacterSet *firstCharacterSet; + static NSCharacterSet *restOfStringCharacterSet; + static dispatch_once_t onceToken; + static NSMutableSet *cachedIdentifiers; + dispatch_once(&onceToken, ^{ + NSMutableCharacterSet *mutableSet = [NSMutableCharacterSet alphanumericCharacterSet]; + [mutableSet addCharactersInString:@"_"]; + firstCharacterSet = [mutableSet copy]; + + [mutableSet addCharactersInString:@"- "]; + restOfStringCharacterSet = [mutableSet copy]; + cachedIdentifiers = [[NSMutableSet alloc] init]; + }); + + @synchronized(self) { + if (![cachedIdentifiers containsObject:identifier]) { + if ([self matchString:identifier + firstCharacterSet:firstCharacterSet + restOfStringCharacterSet:restOfStringCharacterSet]) { + [cachedIdentifiers addObject:identifier]; + } else { + return NO; + } + } + } + return YES; +} + ++ (BOOL)validateIdentifier:(NSString *)identifier +{ + if (identifier == nil || identifier.length == 0 || identifier.length > FBSDK_APPEVENTSUTILITY_MAX_IDENTIFIER_LENGTH || ![[self class] regexValidateIdentifier:identifier]) { + [[self class] logAndNotify:[NSString stringWithFormat:@"Invalid identifier: '%@'. Must be between 1 and %d characters, and must be contain only alphanumerics, _, - or spaces, starting with alphanumeric or _.", + identifier, FBSDK_APPEVENTSUTILITY_MAX_IDENTIFIER_LENGTH]]; + return NO; + } + + return YES; +} + ++ (void)persistAnonymousID:(NSString *)anonymousID +{ + [[self class] ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass(self)]; + NSDictionary *data = @{ FBSDK_APPEVENTSUTILITY_ANONYMOUSID_KEY : anonymousID }; + NSString *content = [FBSDKInternalUtility JSONStringForObject:data error:NULL invalidObjectHandler:NULL]; + + [content writeToFile:[[self class] persistenceFilePath:FBSDK_APPEVENTSUTILITY_ANONYMOUSIDFILENAME] + atomically:YES + encoding:NSASCIIStringEncoding + error:nil]; +} + ++ (NSString *)persistenceFilePath:(NSString *)filename +{ + NSSearchPathDirectory directory = NSLibraryDirectory; + NSArray *paths = NSSearchPathForDirectoriesInDomains(directory, NSUserDomainMask, YES); + NSString *docDirectory = paths[0]; + return [docDirectory stringByAppendingPathComponent:filename]; +} + ++ (NSString *)retrievePersistedAnonymousID +{ + [[self class] ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass(self)]; + NSString *file = [[self class] persistenceFilePath:FBSDK_APPEVENTSUTILITY_ANONYMOUSIDFILENAME]; + NSString *content = [[NSString alloc] initWithContentsOfFile:file + encoding:NSASCIIStringEncoding + error:nil]; + NSDictionary *results = [FBSDKInternalUtility objectForJSONString:content error:NULL]; + return results[FBSDK_APPEVENTSUTILITY_ANONYMOUSID_KEY]; +} + +// Given a candidate token (which may be nil), find the real token to string to use. +// Precedence: 1) provided token, 2) current token, 3) app | client token, 4) fully anonymous session. ++ (NSString *)tokenStringToUseFor:(FBSDKAccessToken *)token +{ + if (!token) { + token = [FBSDKAccessToken currentAccessToken]; + } + + NSString *appID = [FBSDKAppEvents loggingOverrideAppID] ?: token.appID ?: [FBSDKSettings appID]; + NSString *tokenString = token.tokenString; + if (!tokenString || ![appID isEqualToString:token.appID]) { + // If there's an logging override app id present, then we don't want to use the client token since the client token + // is intended to match up with the primary app id (and AppEvents doesn't require a client token). + NSString *clientTokenString = [FBSDKSettings clientToken]; + if (clientTokenString && appID && [appID isEqualToString:token.appID]){ + tokenString = [NSString stringWithFormat:@"%@|%@", appID, clientTokenString]; + } else if (appID) { + tokenString = nil; + } + } + return tokenString; +} + ++ (long)unixTimeNow +{ + return (long)round([NSDate date].timeIntervalSince1970); +} + ++ (id)getVariable:(NSString *)variableName fromInstance:(NSObject *)instance { + Ivar ivar = class_getInstanceVariable([instance class], variableName.UTF8String); + if (ivar != NULL) { + const char *encoding = ivar_getTypeEncoding(ivar); + if (encoding != NULL && encoding[0] == '@') { + return object_getIvar(instance, ivar); + } + } + + return nil; +} + ++ (NSNumber *)getNumberValue:(NSString *)text { + NSNumber *value = @0; + + NSLocale *locale = [NSLocale currentLocale]; + + NSString *ds = [locale objectForKey:NSLocaleDecimalSeparator] ?: @"."; + NSString *gs = [locale objectForKey:NSLocaleGroupingSeparator] ?: @","; + NSString *separators = [ds stringByAppendingString:gs]; + + NSString *regex = [NSString stringWithFormat:@"[+-]?([0-9]+[%1$@]?)?[%1$@]?([0-9]+[%1$@]?)+", separators]; + NSRegularExpression *re = [NSRegularExpression regularExpressionWithPattern:regex + options:0 + error:nil]; + NSTextCheckingResult *match = [re firstMatchInString:text + options:0 + range:NSMakeRange(0, text.length)]; + if (match) { + NSString *validText = [text substringWithRange:match.range]; + NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; + formatter.locale = locale; + formatter.numberStyle = NSNumberFormatterDecimalStyle; + + value = [formatter numberFromString:validText]; + if (nil == value) { + value = @(validText.floatValue); + } + } + + return value; +} + ++ (BOOL)isDebugBuild { +#if TARGET_IPHONE_SIMULATOR + return YES; +#else + BOOL isDevelopment = NO; + + // There is no provisioning profile in AppStore Apps. + @try + { + NSData *data = [NSData dataWithContentsOfFile:[NSBundle.mainBundle pathForResource:@"embedded" ofType:@"mobileprovision"]]; + if (data) { + const char *bytes = [data bytes]; + NSMutableString *profile = [[NSMutableString alloc] initWithCapacity:data.length]; + for (NSUInteger i = 0; i < data.length; i++) { + [profile appendFormat:@"%c", bytes[i]]; + } + // Look for debug value, if detected we're in a development build. + NSString *cleared = [[profile componentsSeparatedByCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet] componentsJoinedByString:@""]; + isDevelopment = ([cleared rangeOfString:@"get-task-allow"].length > 0); + } + + return isDevelopment; + } + @catch(NSException *exception) + { + + } + + return NO; +#endif +} + ++ (BOOL)isSensitiveUserData:(NSString *)text +{ + if (0 == text.length) { + return NO; + } + + return [self isEmailAddress:text] || [self isCreditCardNumber:text]; +} + ++ (BOOL)isCreditCardNumber:(NSString *)text +{ + text = [[text componentsSeparatedByCharactersInSet:[NSCharacterSet.decimalDigitCharacterSet invertedSet]] componentsJoinedByString:@""]; + + if (text.doubleValue == 0) { + return NO; + } + + if (text.length < 9 || text.length > 21) { + return NO; + } + + const char *chars = [text cStringUsingEncoding:NSUTF8StringEncoding]; + if (NULL == chars) { + return NO; + } + + BOOL isOdd = YES; + int oddSum = 0; + int evenSum = 0; + + for (int i = (int)text.length - 1; i >= 0; i--) { + int digit = chars[i] - '0'; + + if (isOdd) + oddSum += digit; + else + evenSum += digit / 5 + (2 * digit) % 10; + + isOdd = !isOdd; + } + + return ((oddSum + evenSum) % 10 == 0); +} + ++ (BOOL)isEmailAddress:(NSString *)text +{ + NSString *pattern = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; + NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:pattern options:NSRegularExpressionCaseInsensitive error:nil]; + NSUInteger matches = [regex numberOfMatchesInString:text options:0 range:NSMakeRange(0, [text length])]; + return matches > 0; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKHybridAppEventsScriptMessageHandler.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKHybridAppEventsScriptMessageHandler.h new file mode 100644 index 0000000..0f6d1c8 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKHybridAppEventsScriptMessageHandler.h @@ -0,0 +1,26 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#if !TARGET_OS_TV +#import +#import + +@interface FBSDKHybridAppEventsScriptMessageHandler : NSObject + +@end +#endif diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKHybridAppEventsScriptMessageHandler.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKHybridAppEventsScriptMessageHandler.m new file mode 100644 index 0000000..3e62dcf --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKHybridAppEventsScriptMessageHandler.m @@ -0,0 +1,62 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKHybridAppEventsScriptMessageHandler.h" + +#import + +#import "FBSDKAppEvents+Internal.h" + +NSString *const FBSDKAppEventsWKWebViewMessagesPixelReferralParamKey = @"_fb_pixel_referral_id"; + +@class WKUserContentController; + +@implementation FBSDKHybridAppEventsScriptMessageHandler + +- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message { + + if ([message.name isEqualToString:FBSDKAppEventsWKWebViewMessagesHandlerKey]) { + NSString *event = message.body[FBSDKAppEventsWKWebViewMessagesEventKey]; + if (event.length > 0) { + NSString *stringedParams = message.body[FBSDKAppEventsWKWebViewMessagesParamsKey]; + NSMutableDictionary *params = nil; + NSError *jsonParseError = nil; + if ([stringedParams isKindOfClass:[NSString class]]) { + params = [NSJSONSerialization JSONObjectWithData:[stringedParams dataUsingEncoding:NSUTF8StringEncoding] + options:NSJSONReadingMutableContainers + error:&jsonParseError + ]; + } + NSString *pixelID = message.body[FBSDKAppEventsWKWebViewMessagesPixelIDKey]; + if (pixelID == nil) { + [FBSDKAppEventsUtility logAndNotify:@"Can't bridge an event without a referral Pixel ID. Check your webview Pixel configuration."]; + return; + } + if (jsonParseError != nil || ![params isKindOfClass:[NSDictionary class]] || params == nil) { + [FBSDKAppEventsUtility logAndNotify:@"Could not find parameters for your Pixel request. Check your webview Pixel configuration."]; + params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:pixelID, FBSDKAppEventsWKWebViewMessagesPixelReferralParamKey, nil]; + } + else { + params[FBSDKAppEventsWKWebViewMessagesPixelReferralParamKey] = pixelID; + } + [FBSDKAppEvents logEvent:event parameters:params]; + } + } +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.h new file mode 100644 index 0000000..a5f7a77 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +// Class to encapsulate implicit logging of purchase events +@interface FBSDKPaymentObserver : NSObject ++ (void)startObservingTransactions; ++ (void)stopObservingTransactions; +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.m new file mode 100644 index 0000000..858e103 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.m @@ -0,0 +1,358 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKPaymentObserver.h" + +#import + +#import "FBSDKAppEvents+Internal.h" +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKLogger.h" +#import "FBSDKSettings.h" + +static NSString *const FBSDKAppEventParameterImplicitlyLoggedPurchase = @"_implicitlyLogged"; +static NSString *const FBSDKAppEventNamePurchaseFailed = @"fb_mobile_purchase_failed"; +static NSString *const FBSDKAppEventNamePurchaseRestored = @"fb_mobile_purchase_restored"; +static NSString *const FBSDKAppEventParameterNameInAppPurchaseType = @"fb_iap_product_type"; +static NSString *const FBSDKAppEventParameterNameProductTitle = @"fb_content_title"; +static NSString *const FBSDKAppEventParameterNameTransactionID = @"fb_transaction_id"; +static NSString *const FBSDKAppEventParameterNameTransactionDate = @"fb_transaction_date"; +static NSString *const FBSDKAppEventParameterNameSubscriptionPeriod = @"fb_iap_subs_period"; +static NSString *const FBSDKAppEventParameterNameTrialPeriod = @"fb_iap_trial_period"; +static NSString *const FBSDKAppEventParameterNameTrialPrice = @"fb_iap_trial_price"; +static int const FBSDKMaxParameterValueLength = 100; +static NSMutableArray *g_pendingRequestors; + +@interface FBSDKPaymentProductRequestor : NSObject + +@property (nonatomic, retain) SKPaymentTransaction *transaction; + +- (instancetype)initWithTransaction:(SKPaymentTransaction*)transaction; +- (void)resolveProducts; + +@end + +@interface FBSDKPaymentObserver() +@end + +@implementation FBSDKPaymentObserver +{ + BOOL _observingTransactions; +} + ++ (void)startObservingTransactions +{ + [[self singleton] startObservingTransactions]; +} + ++ (void)stopObservingTransactions +{ + [[self singleton] stopObservingTransactions]; +} + +// +// Internal methods +// + ++ (FBSDKPaymentObserver *)singleton +{ + static dispatch_once_t pred; + static FBSDKPaymentObserver *shared = nil; + + dispatch_once(&pred, ^{ + shared = [[FBSDKPaymentObserver alloc] init]; + }); + return shared; +} + +- (instancetype) init +{ + self = [super init]; + if (self) { + _observingTransactions = NO; + } + return self; +} + +- (void)startObservingTransactions +{ + @synchronized (self) { + if (!_observingTransactions) { + [(SKPaymentQueue *)[fbsdkdfl_SKPaymentQueueClass() defaultQueue] addTransactionObserver:self]; + _observingTransactions = YES; + } + } +} + +- (void)stopObservingTransactions +{ + @synchronized (self) { + if (_observingTransactions) { + [(SKPaymentQueue *)[fbsdkdfl_SKPaymentQueueClass() defaultQueue] removeTransactionObserver:self]; + _observingTransactions = NO; + } + } +} + +- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions +{ + for (SKPaymentTransaction *transaction in transactions) { + switch (transaction.transactionState) { + case SKPaymentTransactionStatePurchasing: + case SKPaymentTransactionStatePurchased: + case SKPaymentTransactionStateFailed: + case SKPaymentTransactionStateRestored: + [self handleTransaction:transaction]; + break; + case SKPaymentTransactionStateDeferred: + break; + } + } +} + +- (void)handleTransaction:(SKPaymentTransaction *)transaction +{ + // Ignore restored transaction + if (transaction.originalTransaction != nil) { + return; + } + FBSDKPaymentProductRequestor *productRequest = [[FBSDKPaymentProductRequestor alloc] initWithTransaction:transaction]; + [productRequest resolveProducts]; +} + +@end + +@interface FBSDKPaymentProductRequestor() +@property (nonatomic, retain) SKProductsRequest *productRequest; +@end + +@implementation FBSDKPaymentProductRequestor + ++ (void)initialize +{ + if ([self class] == [FBSDKPaymentProductRequestor class]) { + g_pendingRequestors = [[NSMutableArray alloc] init]; + } +} + +- (instancetype)initWithTransaction:(SKPaymentTransaction*)transaction +{ + self = [super init]; + if (self) { + _transaction = transaction; + } + return self; +} + +- (void)setProductRequest:(SKProductsRequest *)productRequest +{ + if (productRequest != _productRequest) { + if (_productRequest) { + _productRequest.delegate = nil; + } + _productRequest = productRequest; + } +} + +- (void)resolveProducts +{ + NSString *productId = self.transaction.payment.productIdentifier; + NSSet *productIdentifiers = [NSSet setWithObjects:productId, nil]; + self.productRequest = [[fbsdkdfl_SKProductsRequestClass() alloc] initWithProductIdentifiers:productIdentifiers]; + self.productRequest.delegate = self; + @synchronized(g_pendingRequestors) { + [g_pendingRequestors addObject:self]; + } + [self.productRequest start]; +} + +- (NSString *)getTruncatedString:(NSString *)inputString +{ + if (!inputString) { + return @""; + } + + return inputString.length <= FBSDKMaxParameterValueLength ? inputString : [inputString substringToIndex:FBSDKMaxParameterValueLength]; +} + +- (void)logTransactionEvent:(SKProduct *)product +{ + NSString *eventName = nil; + NSString *transactionID = nil; + NSString *transactionDate = nil; + NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; + formatter.dateFormat = @"yyyy-MM-dd HH:mm:ssZ"; + switch (self.transaction.transactionState) { + case SKPaymentTransactionStatePurchasing: + eventName = FBSDKAppEventNameInitiatedCheckout; + break; + case SKPaymentTransactionStatePurchased: + eventName = FBSDKAppEventNamePurchased; + transactionID = self.transaction.transactionIdentifier; + transactionDate = [formatter stringFromDate:self.transaction.transactionDate]; + break; + case SKPaymentTransactionStateFailed: + eventName = FBSDKAppEventNamePurchaseFailed; + break; + case SKPaymentTransactionStateRestored: + eventName = FBSDKAppEventNamePurchaseRestored; + transactionDate = [formatter stringFromDate:self.transaction.transactionDate]; + break; + case SKPaymentTransactionStateDeferred: + return; + } + if (!eventName) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents + formatString:@"FBSDKPaymentObserver logTransactionEvent: event name cannot be nil"]; + return; + } + + SKPayment *payment = self.transaction.payment; + NSMutableDictionary *eventParameters = [NSMutableDictionary dictionaryWithDictionary: @{ + FBSDKAppEventParameterNameContentID: payment.productIdentifier ?: @"", + FBSDKAppEventParameterNameNumItems: @(payment.quantity), + FBSDKAppEventParameterNameTransactionDate: transactionDate ?: @"", + }]; + double totalAmount = 0; + if (product) { + totalAmount = payment.quantity * product.price.doubleValue; + [eventParameters addEntriesFromDictionary: @{ + FBSDKAppEventParameterNameCurrency: [product.priceLocale objectForKey:NSLocaleCurrencyCode], + FBSDKAppEventParameterNameNumItems: @(payment.quantity), + FBSDKAppEventParameterNameProductTitle: [self getTruncatedString:product.localizedTitle], + FBSDKAppEventParameterNameDescription: [self getTruncatedString:product.localizedDescription], + }]; + +#if !TARGET_OS_TV +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_2 + if (@available(iOS 11.2, *)) { + BOOL isSubscription = (product.subscriptionPeriod != nil) && ((unsigned long)product.subscriptionPeriod.numberOfUnits > 0); + if (isSubscription) { + // subs inapp + eventParameters[FBSDKAppEventParameterNameSubscriptionPeriod] = [self lengthOfSubscriptionPeriod:product.subscriptionPeriod]; + eventParameters[FBSDKAppEventParameterNameInAppPurchaseType] = @"subs"; + // trial information for subs + SKProductDiscount *discount = product.introductoryPrice; + if (discount) { + eventParameters[FBSDKAppEventParameterNameTrialPeriod] = [self lengthOfSubscriptionPeriod:discount.subscriptionPeriod]; + eventParameters[FBSDKAppEventParameterNameTrialPrice] = discount.price; + } + } else { + eventParameters[FBSDKAppEventParameterNameInAppPurchaseType] = @"inapp"; + } + } +#endif +#endif + if (transactionID) { + eventParameters[FBSDKAppEventParameterNameTransactionID] = transactionID; + } + } + + [self logImplicitPurchaseEvent:eventName + valueToSum:totalAmount + parameters:eventParameters]; +} + +- (NSString *)lengthOfSubscriptionPeriod:(id)subcriptionPeriod +{ +#if !TARGET_OS_TV +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_2 + if (@available(iOS 11.2, *)) { + if (subcriptionPeriod && [subcriptionPeriod isKindOfClass:[SKProductSubscriptionPeriod class]]) { + SKProductSubscriptionPeriod *period = (SKProductSubscriptionPeriod *)subcriptionPeriod; + NSString *unit = nil; + switch (period.unit) { + case SKProductPeriodUnitDay: unit = @"D"; break; + case SKProductPeriodUnitWeek: unit = @"W"; break; + case SKProductPeriodUnitMonth: unit = @"M"; break; + case SKProductPeriodUnitYear: unit = @"Y"; break; + } + return [NSString stringWithFormat:@"P%lu%@", (unsigned long)period.numberOfUnits, unit]; + } + } +#endif +#endif + return nil; +} + +- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response +{ + NSArray* products = response.products; + NSArray* invalidProductIdentifiers = response.invalidProductIdentifiers; + if (products.count + invalidProductIdentifiers.count != 1) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents + formatString:@"FBSDKPaymentObserver: Expect to resolve one product per request"]; + } + SKProduct *product = nil; + if (products.count) { + product = products[0]; + } + [self logTransactionEvent:product]; +} + +- (void)requestDidFinish:(SKRequest *)request +{ + [self cleanUp]; +} + +- (void)request:(SKRequest *)request didFailWithError:(NSError *)error +{ + [self logTransactionEvent:nil]; + [self cleanUp]; +} + +- (void)cleanUp +{ + @synchronized(g_pendingRequestors) { + [g_pendingRequestors removeObject:self]; + } +} + +- (void)logImplicitPurchaseEvent:(NSString *)eventName + valueToSum:(double)valueToSum + parameters:(NSDictionary *)parameters { + NSMutableDictionary *eventParameters = [NSMutableDictionary dictionaryWithDictionary:parameters]; + + if ([eventName isEqualToString:FBSDKAppEventNamePurchased]) { + NSData* receipt = [self fetchDeviceReceipt]; + if (receipt) { + NSString *base64encodedReceipt = [receipt base64EncodedStringWithOptions:0]; + eventParameters[@"receipt_data"] = base64encodedReceipt; + } + } + + eventParameters[FBSDKAppEventParameterImplicitlyLoggedPurchase] = @"1"; + [FBSDKAppEvents logEvent:eventName + valueToSum:valueToSum + parameters:eventParameters]; + + // Unless the behavior is set to only allow explicit flushing, we go ahead and flush, since purchase events + // are relatively rare and relatively high value and worth getting across on wire right away. + if ([FBSDKAppEvents flushBehavior] != FBSDKAppEventsFlushBehaviorExplicitOnly) { + [[FBSDKAppEvents singleton] flushForReason:FBSDKAppEventsFlushReasonEagerlyFlushingEvent]; + } +} + +// Fetch the current receipt for this application. +- (NSData*)fetchDeviceReceipt { + NSURL *receiptURL = [NSBundle bundleForClass:[self class]].appStoreReceiptURL; + NSData *receipt = [NSData dataWithContentsOfURL:receiptURL]; + return receipt; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKTimeSpentData.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKTimeSpentData.h new file mode 100644 index 0000000..b664af9 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKTimeSpentData.h @@ -0,0 +1,34 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +FOUNDATION_EXPORT NSString *const FBSDKTimeSpentFilename; + +// Class to encapsulate persisting of time spent data collected by [FBSDKAppEvents activateApp]. The activate app App Event is +// logged when restore: is called with sufficient time since the last deactivation. +@interface FBSDKTimeSpentData : NSObject + ++ (void)suspend; ++ (void)restore:(BOOL)calledFromActivateApp; + ++ (void)setSourceApplication:(NSString *)sourceApplication openURL:(NSURL *)url; ++ (void)setSourceApplication:(NSString *)sourceApplication isFromAppLink:(BOOL)isFromAppLink; ++ (void)registerAutoResetSourceApplication; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKTimeSpentData.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKTimeSpentData.m new file mode 100644 index 0000000..366c450 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKTimeSpentData.m @@ -0,0 +1,319 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKTimeSpentData.h" + +#import "FBSDKAppEvents+Internal.h" +#import "FBSDKAppEventsUtility.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKServerConfiguration.h" +#import "FBSDKServerConfigurationManager.h" +#import "FBSDKSettings.h" + + +// Filename and keys for session length +NSString *const FBSDKTimeSpentFilename = @"com-facebook-sdk-AppEventsTimeSpent.json"; +static NSString *const FBSDKTimeSpentPersistKeySessionSecondsSpent = @"secondsSpentInCurrentSession"; +static NSString *const FBSDKTimeSpentPersistKeySessionNumInterruptions = @"numInterruptions"; +static NSString *const FBSDKTimeSpentPersistKeyLastSuspendTime = @"lastSuspendTime"; +static NSString *const FBSDKTimeSpentPersistKeySessionID = @"sessionID"; + +static NSString *const FBSDKAppEventNameActivatedApp = @"fb_mobile_activate_app"; +static NSString *const FBSDKAppEventNameDeactivatedApp = @"fb_mobile_deactivate_app"; +static NSString *const FBSDKAppEventParameterNameSessionInterruptions = @"fb_mobile_app_interruptions"; +static NSString *const FBSDKAppEventParameterNameTimeBetweenSessions = @"fb_mobile_time_between_sessions"; +static NSString *const FBSDKAppEventParameterNameSessionID = @"_session_id"; + + +static const int SECS_PER_MIN = 60; +static const int SECS_PER_HOUR = 60 * SECS_PER_MIN; +static const int SECS_PER_DAY = 24 * SECS_PER_HOUR; + +static NSString *g_sourceApplication; +static BOOL g_isOpenedFromAppLink; + +// Will be translated and displayed in App Insights. Need to maintain same number and value of quanta on the server. +static const long INACTIVE_SECONDS_QUANTA[] = +{ + 5 * SECS_PER_MIN, + 15 * SECS_PER_MIN, + 30 * SECS_PER_MIN, + 1 * SECS_PER_HOUR, + 6 * SECS_PER_HOUR, + 12 * SECS_PER_HOUR, + 1 * SECS_PER_DAY, + 2 * SECS_PER_DAY, + 3 * SECS_PER_DAY, + 7 * SECS_PER_DAY, + 14 * SECS_PER_DAY, + 21 * SECS_PER_DAY, + 28 * SECS_PER_DAY, + 60 * SECS_PER_DAY, + 90 * SECS_PER_DAY, + 120 * SECS_PER_DAY, + 150 * SECS_PER_DAY, + 180 * SECS_PER_DAY, + 365 * SECS_PER_DAY, + LONG_MAX, // keep as LONG_MAX to guarantee loop will terminate +}; + +/** + * This class encapsulates the notion of an app 'session' - the length of time that the user has + * spent in the app that can be considered a single usage of the app. Apps may be frequently interrupted + * do to other device activity, like a text message, so this class allows those interruptions to be smoothed + * out and the time actually spent in the app excluding this interruption time to be accumulated. Also, + * once a certain amount of time has gone by where the app is not in the foreground, we consider the + * session to be complete, and a new session beginning. When this occurs, we log a 'deactivate app' event + * with the duration of the previous session as the 'value' of this event, along with the number of + * interruptions from that previous session as an event parameter. + */ +@implementation FBSDKTimeSpentData +{ + BOOL _isCurrentlyLoaded; + BOOL _shouldLogActivateEvent; + BOOL _shouldLogDeactivateEvent; + long _secondsSpentInCurrentSession; + long _timeSinceLastSuspend; + int _numInterruptionsInCurrentSession; + long _lastRestoreTime; + long _lastSuspendTime; + NSString *_sessionID; +} + +// +// Public methods +// + ++ (void)suspend +{ + [self.singleton instanceSuspend]; +} + ++ (void)restore:(BOOL)calledFromActivateApp +{ + [self.singleton instanceRestore:calledFromActivateApp]; +} + +// +// Internal methods +// ++ (FBSDKTimeSpentData *)singleton +{ + static dispatch_once_t pred; + static FBSDKTimeSpentData *shared = nil; + + dispatch_once(&pred, ^{ + shared = [[FBSDKTimeSpentData alloc] init]; + }); + return shared; +} + +// Calculate and persist time spent data for this instance of the app activation. +- (void)instanceSuspend +{ + + [FBSDKAppEventsUtility ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass([self class])]; + if (!_isCurrentlyLoaded) { + FBSDKConditionalLog(YES, FBSDKLoggingBehaviorInformational, @"[FBSDKTimeSpentData suspend] invoked without corresponding restore"); + return; + } + + long now = [FBSDKAppEventsUtility unixTimeNow]; + long timeSinceRestore = now - _lastRestoreTime; + + // Can happen if the clock on the device is changed + if (timeSinceRestore < 0) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents + formatString:@"Clock skew detected"]; + timeSinceRestore = 0; + } + + _secondsSpentInCurrentSession += timeSinceRestore; + + NSDictionary *timeSpentData = + @{ + FBSDKTimeSpentPersistKeySessionSecondsSpent : @(_secondsSpentInCurrentSession), + FBSDKTimeSpentPersistKeySessionNumInterruptions : @(_numInterruptionsInCurrentSession), + FBSDKTimeSpentPersistKeyLastSuspendTime : @(now), + FBSDKTimeSpentPersistKeySessionID : _sessionID, + }; + + NSString *content = [FBSDKInternalUtility JSONStringForObject:timeSpentData error:NULL invalidObjectHandler:NULL]; + + [content writeToFile:[FBSDKAppEventsUtility persistenceFilePath:FBSDKTimeSpentFilename] + atomically:YES + encoding:NSASCIIStringEncoding + error:nil]; + + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents + formatString:@"FBSDKTimeSpentData Persist: %@", content]; + + _isCurrentlyLoaded = NO; +} + + +// Called during activation - either through an explicit 'activateApp' call or implicitly when the app is foregrounded. +// In both cases, we restore the persisted event data. In the case of the activateApp, we log an 'app activated' +// event if there's been enough time between the last deactivation and now. +- (void)instanceRestore:(BOOL)calledFromActivateApp +{ + + [FBSDKAppEventsUtility ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass([self class])]; + + // It's possible to call this multiple times during the time the app is in the foreground. If this is the case, + // just restore persisted data the first time. + if (!_isCurrentlyLoaded) { + + NSString *content = + [[NSString alloc] initWithContentsOfFile:[FBSDKAppEventsUtility persistenceFilePath:FBSDKTimeSpentFilename] + usedEncoding:nil + error:nil]; + + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAppEvents + formatString:@"FBSDKTimeSpentData Restore: %@", content]; + + long now = [FBSDKAppEventsUtility unixTimeNow]; + if (!content) { + + // Nothing persisted, so this is the first launch. + _sessionID = [NSUUID UUID].UUIDString; + _secondsSpentInCurrentSession = 0; + _numInterruptionsInCurrentSession = 0; + _lastSuspendTime = 0; + + // We want to log the app activation event on the first launch, but not the deactivate event + _shouldLogActivateEvent = YES; + _shouldLogDeactivateEvent = NO; + + } else { + + NSDictionary *results = [FBSDKInternalUtility objectForJSONString:content error:NULL]; + + _lastSuspendTime = [results[FBSDKTimeSpentPersistKeyLastSuspendTime] longValue]; + + _timeSinceLastSuspend = now - _lastSuspendTime; + _secondsSpentInCurrentSession = [results[FBSDKTimeSpentPersistKeySessionSecondsSpent] intValue]; + _sessionID = results[FBSDKTimeSpentPersistKeySessionID] ? : [NSUUID UUID].UUIDString; + _numInterruptionsInCurrentSession = [results[FBSDKTimeSpentPersistKeySessionNumInterruptions] intValue]; + _shouldLogActivateEvent = (_timeSinceLastSuspend > [FBSDKServerConfigurationManager cachedServerConfiguration].sessionTimoutInterval); + + // Other than the first launch, we always log the last session's deactivate with this session's activate. + _shouldLogDeactivateEvent = _shouldLogActivateEvent; + + if (!_shouldLogDeactivateEvent) { + // If we're not logging, then the time we spent deactivated is considered another interruption. But cap it + // so errant or test uses doesn't blow out the cardinality on the backend processing + _numInterruptionsInCurrentSession = MIN(_numInterruptionsInCurrentSession + 1, 200); + } + + } + + _lastRestoreTime = now; + _isCurrentlyLoaded = YES; + + if (calledFromActivateApp) { + // It's important to log deactivate first to reset sessionID + if (_shouldLogDeactivateEvent) { + [FBSDKAppEvents logEvent:FBSDKAppEventNameDeactivatedApp + valueToSum:_secondsSpentInCurrentSession + parameters:[self appEventsParametersForDeactivate]]; + + // We've logged the session stats, now reset. + _secondsSpentInCurrentSession = 0; + _numInterruptionsInCurrentSession = 0; + _sessionID = [NSUUID UUID].UUIDString; + } + + if (_shouldLogActivateEvent) { + [FBSDKAppEvents logEvent:FBSDKAppEventNameActivatedApp + parameters:[self appEventsParametersForActivate]]; + // Unless the behavior is set to only allow explicit flushing, we go ahead and flush. App launch + // events are critical to Analytics so we don't want to lose them. + if ([FBSDKAppEvents flushBehavior] != FBSDKAppEventsFlushBehaviorExplicitOnly) { + [[FBSDKAppEvents singleton] flushForReason:FBSDKAppEventsFlushReasonEagerlyFlushingEvent]; + } + } + } + } +} + +- (NSDictionary *)appEventsParametersForActivate +{ + return @{ + FBSDKAppEventParameterLaunchSource: [[self class] getSourceApplication], + FBSDKAppEventParameterNameSessionID: _sessionID, + }; +} + +- (NSDictionary *)appEventsParametersForDeactivate +{ + int quantaIndex = 0; + while (_timeSinceLastSuspend > INACTIVE_SECONDS_QUANTA[quantaIndex]) { + quantaIndex++; + } + + NSMutableDictionary *params = [@{ FBSDKAppEventParameterNameSessionInterruptions : @(_numInterruptionsInCurrentSession), + FBSDKAppEventParameterNameTimeBetweenSessions : [NSString stringWithFormat:@"session_quanta_%d", quantaIndex], + FBSDKAppEventParameterLaunchSource: [[self class] getSourceApplication], + FBSDKAppEventParameterNameSessionID : _sessionID ?: @"", + } mutableCopy]; + if (_lastSuspendTime) { + params[FBSDKAppEventParameterLogTime] = @(_lastSuspendTime); + } + return [params copy]; +} + ++ (void)setSourceApplication:(NSString *)sourceApplication openURL:(NSURL *)url +{ + [self setSourceApplication:sourceApplication + isFromAppLink:[FBSDKInternalUtility dictionaryFromFBURL:url][@"al_applink_data"] != nil]; +} + ++ (void)setSourceApplication:(NSString *)sourceApplication isFromAppLink:(BOOL)isFromAppLink +{ + g_isOpenedFromAppLink = isFromAppLink; + g_sourceApplication = sourceApplication; +} + ++ (NSString *)getSourceApplication +{ + NSString *openType = @"Unclassified"; + if (g_isOpenedFromAppLink) { + openType = @"AppLink"; + } + return (g_sourceApplication ? + [NSString stringWithFormat:@"%@(%@)", openType, g_sourceApplication] + : openType); +} + ++ (void)resetSourceApplication +{ + g_sourceApplication = nil; + g_isOpenedFromAppLink = NO; +} + ++ (void)registerAutoResetSourceApplication +{ + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(resetSourceApplication) + name:UIApplicationDidEnterBackgroundNotification + object:nil]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKUserDataStore.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKUserDataStore.h new file mode 100644 index 0000000..dc1ab22 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKUserDataStore.h @@ -0,0 +1,40 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKUserDataStore : NSObject + ++ (void)initStore; + ++ (void)setUserDataAndHash:(NSDictionary *)ud; + ++ (void)setUserDataAndHash:(nullable NSString *)email + firstName:(nullable NSString *)firstName + lastName:(nullable NSString *)lastName + phone:(nullable NSString *)phone + dateOfBirth:(nullable NSString *)dateOfBirth + gender:(nullable NSString *)gender + city:(nullable NSString *)city + state:(nullable NSString *)state + zip:(nullable NSString *)zip + country:(nullable NSString *)country; + ++ (NSString *) getHashedUserData; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKUserDataStore.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKUserDataStore.m new file mode 100644 index 0000000..a850342 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKUserDataStore.m @@ -0,0 +1,215 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKUserDataStore.h" + +#import "FBSDKAppEventsUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKSettings.h" +#import "FBSDKUtility.h" + +#define USER_DATA_KEY @"com.facebook.appevents.UserDataStore.userData" + +static NSString *const FBSDKEmail = @"em"; +static NSString *const FBSDKFirstName = @"fn"; +static NSString *const FBSDKLastName = @"ln"; +static NSString *const FBSDKPhone = @"ph"; +static NSString *const FBSDKDateOfBirth = @"db"; +static NSString *const FBSDKGender = @"ge"; +static NSString *const FBSDKCity = @"ct"; +static NSString *const FBSDKState = @"st"; +static NSString *const FBSDKZip = @"zp"; +static NSString *const FBSDKCountry = @"country"; + +static NSString *hashedUserData; +static volatile bool initialized = false; + +@implementation FBSDKUserDataStore + ++ (void)initStore +{ + if (initialized){ + return; + } + + [FBSDKUserDataStore initAndWait]; +} + ++ (void)initAndWait +{ + if (initialized){ + return; + } + + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + hashedUserData = [defaults stringForKey:USER_DATA_KEY]; + initialized = true; +} + ++ (void)setUserDataAndHash:(NSDictionary *)ud +{ + if (!initialized){ + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"initStore should have been called before calling setUserData"]; + [FBSDKUserDataStore initAndWait]; + } + + hashedUserData = [FBSDKUserDataStore hashUserData:ud]; + NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; + [defaults setObject:(hashedUserData) forKey:(USER_DATA_KEY)]; +} + ++ (void)setUserDataAndHash:(nullable NSString *)email + firstName:(nullable NSString *)firstName + lastName:(nullable NSString *)lastName + phone:(nullable NSString *)phone + dateOfBirth:(nullable NSString *)dateOfBirth + gender:(nullable NSString *)gender + city:(nullable NSString *)city + state:(nullable NSString *)state + zip:(nullable NSString *)zip + country:(nullable NSString *)country +{ + if (!initialized){ + [FBSDKUserDataStore initAndWait]; + } + + NSMutableDictionary *ud = [[NSMutableDictionary alloc] init]; + if (email != nil) { + ud[FBSDKEmail] = email; + } + if (firstName != nil) { + ud[FBSDKFirstName] = firstName; + } + if (lastName != nil) { + ud[FBSDKLastName] = lastName; + } + if (phone != nil) { + ud[FBSDKPhone] = phone; + } + if (dateOfBirth != nil) { + ud[FBSDKDateOfBirth] = dateOfBirth; + } + if (gender != nil) { + ud[FBSDKGender] = gender; + } + if (city != nil) { + ud[FBSDKCity] = city; + } + if (state != nil) { + ud[FBSDKState] = state; + } + if (zip != nil) { + ud[FBSDKZip] = zip; + } + if (country != nil) { + ud[FBSDKCountry] = country; + } + + hashedUserData = [FBSDKUserDataStore hashUserData:ud]; + NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; + [defaults setObject:(hashedUserData) forKey:(USER_DATA_KEY)]; +} + ++ (NSString *)getHashedUserData +{ + if (!initialized){ + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"initStore should have been called before calling setUserID"]; + [FBSDKUserDataStore initAndWait]; + } + + return hashedUserData; +} + ++ (NSString *)hashUserData:(NSDictionary *)ud +{ + if (ud == nil){ + return nil; + } + + NSMutableDictionary *encryptUserData = [NSMutableDictionary dictionaryWithCapacity:ud.count]; + + for (NSString *key in ud){ + NSString *const value = ud[key]; + if ([FBSDKUserDataStore maybeSHA256Hashed:value]){ + encryptUserData[key] = value; + } else { + NSString *const normalizedValue = [FBSDKUserDataStore normalizeData:key data:value]; + NSString *const encryptedValue = [FBSDKUserDataStore encryptData:normalizedValue]; + if (encryptedValue != nil){ + encryptUserData[key] = encryptedValue; + } + } + } + + NSError *error; + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:encryptUserData + options:0 + error:&error]; + if (jsonData){ + return [[NSString alloc] initWithData:jsonData + encoding:NSUTF8StringEncoding]; + } else { + [FBSDKAppEventsUtility logAndNotify:[NSString stringWithFormat:@"invalid json object: %@", error]]; + return nil; + } +} + ++ (NSString *)encryptData:(NSString *)data +{ + if (data == nil || data.length == 0){ + return nil; + } + return [FBSDKUtility SHA256Hash:data]; +} + ++ (NSString *)normalizeData:(NSString *)type data:(NSString *)data{ + NSString *normalizedData = @""; + if ([type isEqualToString:FBSDKEmail] || [type isEqualToString:FBSDKFirstName] + || [type isEqualToString:FBSDKLastName] || [type isEqualToString:FBSDKCity] + || [type isEqualToString:FBSDKState] || [type isEqualToString:FBSDKCountry]) { + normalizedData = [data stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + normalizedData = normalizedData.lowercaseString; + } else if ([type isEqualToString:FBSDKPhone]){ + NSError *error = nil; + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"[^0-9]" + options:NSRegularExpressionCaseInsensitive + error:&error + ]; + normalizedData = [regex stringByReplacingMatchesInString:data + options:0 + range:NSMakeRange(0, data.length) + withTemplate:@"" + ]; + } else if ([type isEqualToString:FBSDKGender]){ + NSString *temp = [data stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + temp = temp.lowercaseString; + normalizedData = temp.length > 0 ? [temp substringToIndex:1]: @""; + } + + return normalizedData; +} + ++ (BOOL)maybeSHA256Hashed:(NSString *)data +{ + NSRange range = [data rangeOfString:@"[A-Fa-f0-9]{64}" options:NSRegularExpressionSearch]; + return (data.length == 64) && (range.location != NSNotFound); +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppLink/FBSDKBoltsMeasurementEventListener.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppLink/FBSDKBoltsMeasurementEventListener.h new file mode 100644 index 0000000..c42431b --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppLink/FBSDKBoltsMeasurementEventListener.h @@ -0,0 +1,23 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKBoltsMeasurementEventListener : NSObject ++ (FBSDKBoltsMeasurementEventListener *)defaultListener; +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppLink/FBSDKBoltsMeasurementEventListener.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppLink/FBSDKBoltsMeasurementEventListener.m new file mode 100644 index 0000000..718e23b --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppLink/FBSDKBoltsMeasurementEventListener.m @@ -0,0 +1,87 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKBoltsMeasurementEventListener.h" + +#import "FBSDKAppEvents+Internal.h" +#import "FBSDKTimeSpentData.h" + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +static NSNotificationName const BoltsMeasurementEventNotification = @"com.parse.bolts.measurement_event"; + +#else + +static NSString *const BoltsMeasurementEventNotification = @"com.parse.bolts.measurement_event"; + +#endif + +static NSString *const BoltsMeasurementEventName = @"event_name"; +static NSString *const BoltsMeasurementEventArgs = @"event_args"; +static NSString *const BoltsMeasurementEventPrefix = @"bf_"; + +@implementation FBSDKBoltsMeasurementEventListener + ++ (instancetype)defaultListener +{ + static dispatch_once_t dispatchOnceLocker = 0; + static FBSDKBoltsMeasurementEventListener *defaultListener = nil; + dispatch_once(&dispatchOnceLocker, ^{ + defaultListener = [[self alloc] init]; + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center addObserver:defaultListener + selector:@selector(logFBAppEventForNotification:) + name:BoltsMeasurementEventNotification + object:nil]; + }); + return defaultListener; +} + +- (void)logFBAppEventForNotification:(NSNotification *)note +{ + // when catch al_nav_in event, we set source application for FBAppEvents. + if ([note.userInfo[BoltsMeasurementEventName] isEqualToString:@"al_nav_in"]) { + NSString *sourceApplication = note.userInfo[BoltsMeasurementEventArgs][@"sourceApplication"]; + if (sourceApplication) { + [FBSDKTimeSpentData setSourceApplication:sourceApplication isFromAppLink:YES]; + } + } + NSDictionary *eventArgs = note.userInfo[BoltsMeasurementEventArgs]; + NSMutableDictionary *logData = [[NSMutableDictionary alloc] init]; + for(NSString *key in eventArgs.allKeys) { + NSError *error = nil; + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"[^0-9a-zA-Z _-]" options:0 error:&error]; + NSString *safeKey = [regex stringByReplacingMatchesInString:key + options:0 + range:NSMakeRange(0, key.length) + withTemplate:@"-"]; + safeKey = [safeKey stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@" -"]]; + logData[safeKey] = eventArgs[key]; + } + [FBSDKAppEvents logImplicitEvent:[BoltsMeasurementEventPrefix stringByAppendingString:note.userInfo[BoltsMeasurementEventName]] + valueToSum:nil + parameters:logData + accessToken:nil]; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Base64/FBSDKBase64.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Base64/FBSDKBase64.h new file mode 100644 index 0000000..d90e99e --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Base64/FBSDKBase64.h @@ -0,0 +1,51 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKBase64 : NSObject + +/** + Decodes a base-64 encoded string. + @param string The base-64 encoded string. + @return NSData containing the decoded bytes. + */ ++ (NSData *)decodeAsData:(NSString *)string; + +/** + Decodes a base-64 encoded string into a string. + @param string The base-64 encoded string. + @return NSString with the decoded UTF-8 value. + */ ++ (NSString *)decodeAsString:(NSString *)string; + +/** + Encodes data into a string. + @param data The data to be encoded. + @return The base-64 encoded string. + */ ++ (NSString *)encodeData:(NSData *)data; + +/** + Encodes string into a base-64 representation. + @param string The string to be encoded. + @return The base-64 encoded string. + */ ++ (NSString *)encodeString:(NSString *)string; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Base64/FBSDKBase64.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Base64/FBSDKBase64.m new file mode 100644 index 0000000..dd81d5a --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Base64/FBSDKBase64.m @@ -0,0 +1,99 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKBase64.h" + +@implementation FBSDKBase64 + +static FBSDKBase64 *_decoder; +static FBSDKBase64 *_encoder; + +#pragma mark - Class Methods + ++ (void)initialize +{ + if (self == [FBSDKBase64 class]) { + _decoder = [[FBSDKBase64 alloc] init]; + _encoder = [[FBSDKBase64 alloc] init]; + } +} + ++ (NSData *)decodeAsData:(NSString *)string +{ + return [_decoder decodeAsData:string]; +} + ++ (NSString *)decodeAsString:(NSString *)string +{ + return [_decoder decodeAsString:string]; +} + ++ (NSString *)encodeData:(NSData *)data +{ + return [_encoder encodeData:data]; +} + ++ (NSString *)encodeString:(NSString *)string +{ + return [_encoder encodeString:string]; +} + +#pragma mark - Object Lifecycle + +#pragma mark - Implementation Methods + +- (NSData *)decodeAsData:(NSString *)string +{ + if (!string) { + return nil; + } + // This padding will be appended before stripping unknown characters, so if there are unknown characters of count % 4 + // it will not be able to decode. Since we assume valid base64 data, we will take this as is. + int needPadding = string.length % 4; + if (needPadding > 0) { + needPadding = 4 - needPadding; + string = [string stringByPaddingToLength:string.length+needPadding withString:@"=" startingAtIndex:0]; + } + + return [[NSData alloc] initWithBase64EncodedString:string options:NSDataBase64DecodingIgnoreUnknownCharacters]; +} + +- (NSString *)decodeAsString:(NSString *)string +{ + NSData *data = [self decodeAsData:string]; + if (!data) { + return nil; + } + return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; +} + +- (NSString *)encodeData:(NSData *)data +{ + if (!data) { + return nil; + } + + return [data base64EncodedStringWithOptions:0]; +} + +- (NSString *)encodeString:(NSString *)string +{ + return [self encodeData:[string dataUsingEncoding:NSUTF8StringEncoding]]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPICrypto.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPICrypto.h new file mode 100644 index 0000000..1245f32 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPICrypto.h @@ -0,0 +1,34 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKBridgeAPIRequest.h" + +@interface FBSDKBridgeAPICrypto : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + ++ (void)addCipherKeyToQueryParameters:(NSMutableDictionary *)queryParameters; ++ (NSDictionary *)decryptResponseForRequest:(FBSDKBridgeAPIRequest *)request + queryParameters:(NSDictionary *)queryParameters + error:(NSError *__autoreleasing *)errorRef; ++ (void)reset; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPICrypto.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPICrypto.m new file mode 100644 index 0000000..80abc96 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPICrypto.m @@ -0,0 +1,130 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKBridgeAPICrypto.h" + +#import "FBSDKBridgeAPIProtocol.h" +#import "FBSDKConstants.h" +#import "FBSDKCrypto.h" +#import "FBSDKError.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKSettings.h" +#import "FBSDKUtility.h" + +static NSString *const FBSDKBridgeAPICryptoCipherKey = @"cipher"; +static NSString *const FBSDKBridgeAPICryptoCipherKeyKey = @"cipher_key"; +static NSString *g_cipherKey = nil; + +@implementation FBSDKBridgeAPICrypto + +#pragma mark - Class Methods + ++ (void)addCipherKeyToQueryParameters:(NSMutableDictionary *)queryParameters +{ + [FBSDKInternalUtility dictionary:queryParameters setObject:[self _cipherKey] forKey:FBSDKBridgeAPICryptoCipherKeyKey]; +} + ++ (NSDictionary *)decryptResponseForRequest:(FBSDKBridgeAPIRequest *)request + queryParameters:(NSDictionary *)queryParameters + error:(NSError *__autoreleasing *)errorRef +{ + if (errorRef != NULL) { + *errorRef = nil; + } + NSString *cipher = queryParameters[FBSDKBridgeAPICryptoCipherKey]; + if (!cipher) { + return queryParameters ?: @{}; + } + NSString *version = queryParameters[FBSDKBridgeAPIVersionKey]; + NSString *cipherKey = [self _cipherKey]; + if (!version || !cipherKey) { + if (errorRef != NULL) { + NSDictionary *userInfo = @{ + FBSDKErrorArgumentValueKey: queryParameters, + }; + *errorRef = [NSError fbErrorWithCode:FBSDKErrorEncryption + userInfo:userInfo + message:@"Error decrypting incoming query parameters." + underlyingError:nil]; + } + return nil; + } + NSArray *additionalSignedDataArray = @[ + [NSBundle mainBundle].bundleIdentifier, + [FBSDKSettings appID] ?: @"", + @"bridge", + request.methodName ?: @"", + version, + ]; + NSString *additionalSignedDataString = [additionalSignedDataArray componentsJoinedByString:@":"]; + NSData *additionalSignedData = [additionalSignedDataString dataUsingEncoding:NSUTF8StringEncoding]; + FBSDKCrypto *crypto = [[FBSDKCrypto alloc] initWithMasterKey:cipherKey]; + NSData *decryptedData = [crypto decrypt:cipher additionalSignedData:additionalSignedData]; + if (!decryptedData) { + if (errorRef != NULL) { + NSDictionary *userInfo = @{ + FBSDKErrorArgumentValueKey: @{ + @"cipher": cipher, + @"bundleIdentifier": additionalSignedDataArray[0], + @"appID": additionalSignedDataArray[1], + @"host": additionalSignedDataArray[2], + @"methodName": additionalSignedDataArray[3], + @"version": additionalSignedDataArray[4], + }, + }; + *errorRef = [NSError fbErrorWithCode:FBSDKErrorEncryption + userInfo:userInfo + message:@"Error decrypting incoming query parameters." + underlyingError:nil]; + } + return nil; + } + NSString *decryptedString = [[NSString alloc] initWithData:decryptedData encoding:NSUTF8StringEncoding]; + NSDictionary *decryptedDictionary = [FBSDKUtility dictionaryWithQueryString:decryptedString]; + NSMutableDictionary *decryptedQueryParameters = [[NSMutableDictionary alloc] initWithDictionary:decryptedDictionary]; + decryptedQueryParameters[FBSDKBridgeAPIVersionKey] = version; + return [decryptedQueryParameters copy]; +} + ++ (void)reset +{ + [self _resetCipherKey]; +} + +#pragma mark - Helper Methods + ++ (NSString *)_cipherKey +{ + if (g_cipherKey) { + return g_cipherKey; + } + g_cipherKey = [[[NSUserDefaults standardUserDefaults] stringForKey:FBSDKBridgeAPICryptoCipherKeyKey] copy]; + if (g_cipherKey) { + return g_cipherKey; + } + return [self _resetCipherKey]; +} + ++ (NSString *)_resetCipherKey +{ + g_cipherKey = [[FBSDKCrypto makeMasterKey] copy]; + [[NSUserDefaults standardUserDefaults] setObject:g_cipherKey forKey:FBSDKBridgeAPICryptoCipherKeyKey]; + return g_cipherKey; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIProtocol.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIProtocol.h new file mode 100644 index 0000000..0a5a9b4 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIProtocol.h @@ -0,0 +1,42 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKBridgeAPIProtocolType.h" + +@class FBSDKBridgeAPIRequest; + +FOUNDATION_EXPORT NSString *const FBSDKBridgeAPIAppIDKey; +FOUNDATION_EXPORT NSString *const FBSDKBridgeAPISchemeSuffixKey; +FOUNDATION_EXPORT NSString *const FBSDKBridgeAPIVersionKey; + +@protocol FBSDKBridgeAPIProtocol + +- (NSURL *)requestURLWithActionID:(NSString *)actionID + scheme:(NSString *)scheme + methodName:(NSString *)methodName + methodVersion:(NSString *)methodVersion + parameters:(NSDictionary *)parameters + error:(NSError *__autoreleasing *)errorRef; +- (NSDictionary *)responseParametersForActionID:(NSString *)actionID + queryParameters:(NSDictionary *)queryParameters + cancelled:(BOOL *)cancelledRef + error:(NSError *__autoreleasing *)errorRef; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIProtocolType.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIProtocolType.h new file mode 100644 index 0000000..b04e359 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIProtocolType.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +typedef NS_ENUM(NSUInteger, FBSDKBridgeAPIProtocolType) +{ + FBSDKBridgeAPIProtocolTypeNative, + FBSDKBridgeAPIProtocolTypeWeb, +}; diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest+Private.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest+Private.h new file mode 100644 index 0000000..4455e22 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest+Private.h @@ -0,0 +1,35 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKBridgeAPIProtocol.h" +#import "FBSDKBridgeAPIRequest.h" + +@interface FBSDKBridgeAPIRequest () + +- (instancetype)initWithProtocol:(id)protocol + protocolType:(FBSDKBridgeAPIProtocolType)protocolType + scheme:(NSString *)scheme + methodName:(NSString *)methodName + methodVersion:(NSString *)methodVersion + parameters:(NSDictionary *)parameters + userInfo:(NSDictionary *)userInfo +NS_DESIGNATED_INITIALIZER; + +@property (nonatomic, strong, readonly) id protocol; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest.h new file mode 100644 index 0000000..04689a3 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest.h @@ -0,0 +1,46 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +#import "FBSDKBridgeAPIProtocolType.h" + +@interface FBSDKBridgeAPIRequest : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; ++ (instancetype)bridgeAPIRequestWithProtocolType:(FBSDKBridgeAPIProtocolType)protocolType + scheme:(NSString *)scheme + methodName:(NSString *)methodName + methodVersion:(NSString *)methodVersion + parameters:(NSDictionary *)parameters + userInfo:(NSDictionary *)userInfo; + +@property (nonatomic, copy, readonly) NSString *actionID; +@property (nonatomic, copy, readonly) NSString *methodName; +@property (nonatomic, copy, readonly) NSString *methodVersion; +@property (nonatomic, copy, readonly) NSDictionary *parameters; +@property (nonatomic, assign, readonly) FBSDKBridgeAPIProtocolType protocolType; +@property (nonatomic, copy, readonly) NSString *scheme; +@property (nonatomic, copy, readonly) NSDictionary *userInfo; + +- (NSURL *)requestURL:(NSError *__autoreleasing *)errorRef; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest.m new file mode 100644 index 0000000..608bdce --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest.m @@ -0,0 +1,154 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKBridgeAPIRequest.h" +#import "FBSDKBridgeAPIRequest+Private.h" + +#import "FBSDKBridgeAPICrypto.h" +#import "FBSDKBridgeAPIProtocolNativeV1.h" +#import "FBSDKBridgeAPIProtocolWebV1.h" +#import "FBSDKBridgeAPIProtocolWebV2.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKSettings.h" +#import "FBSDKUtility.h" + +NSString *const FBSDKBridgeAPIAppIDKey = @"app_id"; +NSString *const FBSDKBridgeAPISchemeSuffixKey = @"scheme_suffix"; +NSString *const FBSDKBridgeAPIVersionKey = @"version"; + +@implementation FBSDKBridgeAPIRequest + +#pragma mark - Class Methods + ++ (instancetype)bridgeAPIRequestWithProtocolType:(FBSDKBridgeAPIProtocolType)protocolType + scheme:(NSString *)scheme + methodName:(NSString *)methodName + methodVersion:(NSString *)methodVersion + parameters:(NSDictionary *)parameters + userInfo:(NSDictionary *)userInfo +{ + return [[self alloc] initWithProtocol:[self _protocolForType:protocolType scheme:scheme] + protocolType:protocolType + scheme:scheme + methodName:methodName + methodVersion:methodVersion + parameters:parameters + userInfo:userInfo]; +} + ++ (NSDictionary *)protocolMap +{ + static NSDictionary *_protocolMap; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _protocolMap = @{ + @(FBSDKBridgeAPIProtocolTypeNative): @{ + FBSDK_CANOPENURL_FACEBOOK:[[FBSDKBridgeAPIProtocolNativeV1 alloc] initWithAppScheme:@"fbapi20130214"], + FBSDK_CANOPENURL_MESSENGER:[[FBSDKBridgeAPIProtocolNativeV1 alloc] initWithAppScheme:@"fb-messenger-share-api"], + FBSDK_CANOPENURL_MSQRD_PLAYER:[[FBSDKBridgeAPIProtocolNativeV1 alloc] initWithAppScheme:@"msqrdplayer-api20170208"] + }, + @(FBSDKBridgeAPIProtocolTypeWeb): @{ + @"https": [[FBSDKBridgeAPIProtocolWebV1 alloc] init], + @"web": [[FBSDKBridgeAPIProtocolWebV2 alloc] init] + }, + }; + }); + return _protocolMap; +} + +#pragma mark - Object Lifecycle + +- (instancetype)initWithProtocol:(id)protocol + protocolType:(FBSDKBridgeAPIProtocolType)protocolType + scheme:(NSString *)scheme + methodName:(NSString *)methodName + methodVersion:(NSString *)methodVersion + parameters:(NSDictionary *)parameters + userInfo:(NSDictionary *)userInfo +{ + if (!protocol) { + return nil; + } + if ((self = [super init])) { + _protocol = protocol; + _protocolType = protocolType; + _scheme = [scheme copy]; + _methodName = [methodName copy]; + _methodVersion = [methodVersion copy]; + _parameters = [parameters copy]; + _userInfo = [userInfo copy]; + + _actionID = [NSUUID UUID].UUIDString; + } + return self; +} + +#pragma mark - Public Methods + +- (NSURL *)requestURL:(NSError *__autoreleasing *)errorRef +{ + NSURL *requestURL = [_protocol requestURLWithActionID:self.actionID + scheme:self.scheme + methodName:self.methodName + methodVersion:self.methodVersion + parameters:self.parameters + error:errorRef]; + if (!requestURL) { + return nil; + } + + [FBSDKInternalUtility validateURLSchemes]; + + NSDictionary *requestQueryParameters = [FBSDKUtility dictionaryWithQueryString:requestURL.query]; + NSMutableDictionary *queryParameters = [[NSMutableDictionary alloc] initWithDictionary:requestQueryParameters]; + [FBSDKBridgeAPICrypto addCipherKeyToQueryParameters:queryParameters]; + [FBSDKInternalUtility dictionary:queryParameters setObject:[FBSDKSettings appID] forKey:FBSDKBridgeAPIAppIDKey]; + [FBSDKInternalUtility dictionary:queryParameters + setObject:[FBSDKSettings appURLSchemeSuffix] + forKey:FBSDKBridgeAPISchemeSuffixKey]; + requestURL = [FBSDKInternalUtility URLWithScheme:requestURL.scheme + host:requestURL.host + path:requestURL.path + queryParameters:queryParameters + error:errorRef]; + return requestURL; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone +{ + return self; +} + ++ (id)_protocolForType:(FBSDKBridgeAPIProtocolType)type scheme:(NSString *)scheme +{ + id protocol = [self protocolMap][@(type)][scheme]; + if (type == FBSDKBridgeAPIProtocolTypeWeb) { + return protocol; + } + NSURLComponents *components = [[NSURLComponents alloc] init]; + components.scheme = scheme; + components.path = @"/"; + if ([[UIApplication sharedApplication] canOpenURL:components.URL]) { + return protocol; + } + return nil; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIResponse.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIResponse.h new file mode 100644 index 0000000..a04cd90 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIResponse.h @@ -0,0 +1,42 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +#import "FBSDKBridgeAPIRequest.h" + +@interface FBSDKBridgeAPIResponse : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + ++ (instancetype)bridgeAPIResponseWithRequest:(FBSDKBridgeAPIRequest *)request error:(NSError *)error; ++ (instancetype)bridgeAPIResponseWithRequest:(FBSDKBridgeAPIRequest *)request + responseURL:(NSURL *)responseURL + sourceApplication:(NSString *)sourceApplication + error:(NSError *__autoreleasing *)errorRef; ++ (instancetype)bridgeAPIResponseCancelledWithRequest:(FBSDKBridgeAPIRequest *)request; + +@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled; +@property (nonatomic, copy, readonly) NSError *error; +@property (nonatomic, copy, readonly) FBSDKBridgeAPIRequest *request; +@property (nonatomic, copy, readonly) NSDictionary *responseParameters; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIResponse.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIResponse.m new file mode 100644 index 0000000..282d4c3 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIResponse.m @@ -0,0 +1,128 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKBridgeAPIResponse.h" + +#import "FBSDKBridgeAPICrypto.h" +#import "FBSDKBridgeAPIProtocol.h" +#import "FBSDKBridgeAPIProtocolType.h" +#import "FBSDKBridgeAPIRequest+Private.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKTypeUtility.h" +#import "FBSDKUtility.h" + +@interface FBSDKBridgeAPIResponse () +- (instancetype)initWithRequest:(FBSDKBridgeAPIRequest *)request + responseParameters:(NSDictionary *)responseParameters + cancelled:(BOOL)cancelled + error:(NSError *)error +NS_DESIGNATED_INITIALIZER; +@end + +@implementation FBSDKBridgeAPIResponse + +#pragma mark - Class Methods + ++ (instancetype)bridgeAPIResponseWithRequest:(FBSDKBridgeAPIRequest *)request error:(NSError *)error +{ + return [[self alloc] initWithRequest:request + responseParameters:nil + cancelled:NO + error:error]; +} + ++ (instancetype)bridgeAPIResponseWithRequest:(FBSDKBridgeAPIRequest *)request + responseURL:(NSURL *)responseURL + sourceApplication:(NSString *)sourceApplication + error:(NSError *__autoreleasing *)errorRef +{ + FBSDKBridgeAPIProtocolType protocolType = request.protocolType; + switch (protocolType) { + case FBSDKBridgeAPIProtocolTypeNative:{ + if (![FBSDKInternalUtility isFacebookBundleIdentifier:sourceApplication]) { + [FBSDKBridgeAPICrypto reset]; + return nil; + } + break; + } + case FBSDKBridgeAPIProtocolTypeWeb:{ + if (![FBSDKInternalUtility isSafariBundleIdentifier:sourceApplication]) { + [FBSDKBridgeAPICrypto reset]; + return nil; + } + break; + } + } + NSDictionary *queryParameters = [FBSDKUtility dictionaryWithQueryString:responseURL.query]; + queryParameters = [FBSDKBridgeAPICrypto decryptResponseForRequest:request + queryParameters:queryParameters + error:errorRef]; + if (!queryParameters) { + return nil; + } + id protocol = request.protocol; + BOOL cancelled; + NSError *error; + NSDictionary *responseParameters = [protocol responseParametersForActionID:request.actionID + queryParameters:queryParameters + cancelled:&cancelled + error:&error]; + if (errorRef != NULL) { + *errorRef = error; + } + if (!responseParameters) { + return nil; + } + return [[self alloc] initWithRequest:request + responseParameters:responseParameters + cancelled:cancelled + error:error]; +} + ++ (instancetype)bridgeAPIResponseCancelledWithRequest:(FBSDKBridgeAPIRequest *)request +{ + return [[self alloc] initWithRequest:request + responseParameters:nil + cancelled:YES + error:nil]; +} + +#pragma mark - Object Lifecycle + +- (instancetype)initWithRequest:(FBSDKBridgeAPIRequest *)request + responseParameters:(NSDictionary *)responseParameters + cancelled:(BOOL)cancelled + error:(NSError *)error +{ + if ((self = [super init])) { + _request = [request copy]; + _responseParameters = [responseParameters copy]; + _cancelled = cancelled; + _error = [error copy]; + } + return self; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone +{ + return self; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKURLOpening.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKURLOpening.h new file mode 100644 index 0000000..54cd167 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKURLOpening.h @@ -0,0 +1,41 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +@protocol FBSDKURLOpening + +// Implementations should make sure they can handle nil parameters +// which is possible in SafariViewController. +// see canOpenURL below. +- (BOOL)application:(UIApplication *)application + openURL:(NSURL *)url + sourceApplication:(NSString *)sourceApplication + annotation:(id)annotation; + +// create a different handler to return YES/NO if the receiver can process the above openURL:. +// This is separated so that we can process the openURL: in callbacks, while still returning +// the result of canOpenURL synchronously in FBSDKApplicationDelegate +- (BOOL)canOpenURL:(NSURL *)url + forApplication:(UIApplication *)application + sourceApplication:(NSString *)sourceApplication + annotation:(id)annotation; + +- (void)applicationDidBecomeActive:(UIApplication *)application; + +- (BOOL)isAuthenticationURL:(NSURL *)url; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolNativeV1.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolNativeV1.h new file mode 100644 index 0000000..ba001f0 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolNativeV1.h @@ -0,0 +1,71 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKBridgeAPIProtocol.h" + +typedef struct +{ + __unsafe_unretained NSString *bridgeArgs; + __unsafe_unretained NSString *methodArgs; + __unsafe_unretained NSString *methodVersion; +} FBSDKBridgeAPIProtocolNativeV1OutputKeysStruct; +FOUNDATION_EXPORT const FBSDKBridgeAPIProtocolNativeV1OutputKeysStruct FBSDKBridgeAPIProtocolNativeV1OutputKeys; + +typedef struct +{ + __unsafe_unretained NSString *actionID; + __unsafe_unretained NSString *appIcon; + __unsafe_unretained NSString *appName; + __unsafe_unretained NSString *sdkVersion; +} FBSDKBridgeAPIProtocolNativeV1BridgeParameterOutputKeysStruct; +FOUNDATION_EXPORT const FBSDKBridgeAPIProtocolNativeV1BridgeParameterOutputKeysStruct FBSDKBridgeAPIProtocolNativeV1BridgeParameterOutputKeys; + +typedef struct +{ + __unsafe_unretained NSString *bridgeArgs; + __unsafe_unretained NSString *methodResults; +} FBSDKBridgeAPIProtocolNativeV1InputKeysStruct; +FOUNDATION_EXPORT const FBSDKBridgeAPIProtocolNativeV1InputKeysStruct FBSDKBridgeAPIProtocolNativeV1InputKeys; + +typedef struct +{ + __unsafe_unretained NSString *actionID; + __unsafe_unretained NSString *error; +} FBSDKBridgeAPIProtocolNativeV1BridgeParameterInputKeysStruct; +FOUNDATION_EXPORT const FBSDKBridgeAPIProtocolNativeV1BridgeParameterInputKeysStruct FBSDKBridgeAPIProtocolNativeV1BridgeParameterInputKeys; + +@interface FBSDKBridgeAPIProtocolNativeV1 : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +- (instancetype)initWithAppScheme:(NSString *)appScheme; +- (instancetype)initWithAppScheme:(NSString *)appScheme + pasteboard:(UIPasteboard *)pasteboard + dataLengthThreshold:(NSUInteger)dataLengthThreshold + includeAppIcon:(BOOL)includeAppIcon +NS_DESIGNATED_INITIALIZER; + +@property (nonatomic, copy, readonly) NSString *appScheme; +@property (nonatomic, assign, readonly) NSUInteger dataLengthThreshold; +@property (nonatomic, assign, readonly) BOOL includeAppIcon; +@property (nonatomic, strong, readonly) UIPasteboard *pasteboard; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolNativeV1.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolNativeV1.m new file mode 100644 index 0000000..00b1b3c --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolNativeV1.m @@ -0,0 +1,335 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKBridgeAPIProtocolNativeV1.h" + +#import + +#import "FBSDKApplicationDelegate+Internal.h" +#import "FBSDKBase64.h" +#import "FBSDKBridgeAPIRequest.h" +#import "FBSDKConstants.h" +#import "FBSDKError.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKSettings.h" +#import "FBSDKTypeUtility.h" + +#define FBSDKBridgeAPIProtocolNativeV1BridgeMaxBase64DataLengthThreshold (1024 * 16) + +const FBSDKBridgeAPIProtocolNativeV1OutputKeysStruct FBSDKBridgeAPIProtocolNativeV1OutputKeys = +{ + .bridgeArgs = @"bridge_args", + .methodArgs = @"method_args", + .methodVersion = @"version", +}; + +const FBSDKBridgeAPIProtocolNativeV1BridgeParameterOutputKeysStruct FBSDKBridgeAPIProtocolNativeV1BridgeParameterOutputKeys = +{ + .actionID = @"action_id", + .appIcon = @"app_icon", + .appName = @"app_name", + .sdkVersion = @"sdk_version", +}; + +const FBSDKBridgeAPIProtocolNativeV1InputKeysStruct FBSDKBridgeAPIProtocolNativeV1InputKeys = +{ + .bridgeArgs = @"bridge_args", + .methodResults = @"method_results", +}; + +const FBSDKBridgeAPIProtocolNativeV1BridgeParameterInputKeysStruct FBSDKBridgeAPIProtocolNativeV1BridgeParameterInputKeys = +{ + .actionID = @"action_id", + .error = @"error", +}; + +static const struct +{ + __unsafe_unretained NSString *isBase64; + __unsafe_unretained NSString *isPasteboard; + __unsafe_unretained NSString *tag; + __unsafe_unretained NSString *value; +} FBSDKBridgeAPIProtocolNativeV1DataKeys = +{ + .isBase64 = @"isBase64", + .isPasteboard = @"isPasteboard", + .tag = @"tag", + .value = @"fbAppBridgeType_jsonReadyValue", +}; + +static NSString *const FBSDKBridgeAPIProtocolNativeV1DataPasteboardKey = @"com.facebook.Facebook.FBAppBridgeType"; + +static const struct +{ + __unsafe_unretained NSString *data; + __unsafe_unretained NSString *image; +} FBSDKBridgeAPIProtocolNativeV1DataTypeTags = +{ + .data = @"data", + // we serialize jpegs but use png for backward compatibility - it is any image format that UIImage can handle + .image = @"png", +}; + +static const struct +{ + __unsafe_unretained NSString *code; + __unsafe_unretained NSString *domain; + __unsafe_unretained NSString *userInfo; +} FBSDKBridgeAPIProtocolNativeV1ErrorKeys = +{ + .code = @"code", + .domain = @"domain", + .userInfo = @"user_info", +}; + +@implementation FBSDKBridgeAPIProtocolNativeV1 + +#pragma mark - Object Lifecycle + +- (instancetype)initWithAppScheme:(NSString *)appScheme +{ + return [self initWithAppScheme:appScheme + pasteboard:[UIPasteboard generalPasteboard] + dataLengthThreshold:FBSDKBridgeAPIProtocolNativeV1BridgeMaxBase64DataLengthThreshold + includeAppIcon:YES]; +} + +- (instancetype)initWithAppScheme:(NSString *)appScheme + pasteboard:(UIPasteboard *)pasteboard + dataLengthThreshold:(NSUInteger)dataLengthThreshold + includeAppIcon:(BOOL)includeAppIcon +{ + if ((self = [super init])) { + _appScheme = [appScheme copy]; + _pasteboard = pasteboard; + _dataLengthThreshold = dataLengthThreshold; + _includeAppIcon = includeAppIcon; + } + return self; +} + +#pragma mark - FBSDKBridgeAPIProtocol + +- (NSURL *)requestURLWithActionID:(NSString *)actionID + scheme:(NSString *)scheme + methodName:(NSString *)methodName + methodVersion:(NSString *)methodVersion + parameters:(NSDictionary *)parameters + error:(NSError *__autoreleasing *)errorRef +{ + NSString *const host = @"dialog"; + NSString *const path = [@"/" stringByAppendingString:methodName]; + + NSMutableDictionary *const queryParameters = [[NSMutableDictionary alloc] init]; + [FBSDKInternalUtility dictionary:queryParameters setObject:methodVersion + forKey:FBSDKBridgeAPIProtocolNativeV1OutputKeys.methodVersion]; + + if (parameters.count) { + NSString *const parametersString = [self _JSONStringForObject:parameters enablePasteboard:YES error:errorRef]; + if (!parametersString) { + return nil; + } + NSString *const escapedParametersString = [parametersString stringByReplacingOccurrencesOfString:@"&" + withString:@"%26" + options:NSCaseInsensitiveSearch + range:NSMakeRange(0, + parametersString.length)]; + [FBSDKInternalUtility dictionary:queryParameters + setObject:escapedParametersString + forKey:FBSDKBridgeAPIProtocolNativeV1OutputKeys.methodArgs]; + } + + NSDictionary *const bridgeParameters = [self _bridgeParametersWithActionID:actionID error:errorRef]; + if (!bridgeParameters) { + return nil; + } + NSString *const bridgeParametersString = [self _JSONStringForObject:bridgeParameters enablePasteboard:NO error:errorRef]; + if (!bridgeParametersString) { + return nil; + } + [FBSDKInternalUtility dictionary:queryParameters + setObject:bridgeParametersString + forKey:FBSDKBridgeAPIProtocolNativeV1OutputKeys.bridgeArgs]; + + + return [FBSDKInternalUtility URLWithScheme:self.appScheme + host:host + path:path + queryParameters:queryParameters + error:errorRef]; +} + +- (NSDictionary *)responseParametersForActionID:(NSString *)actionID + queryParameters:(NSDictionary *)queryParameters + cancelled:(BOOL *)cancelledRef + error:(NSError *__autoreleasing *)errorRef +{ + if (cancelledRef != NULL) { + *cancelledRef = NO; + } + if (errorRef != NULL) { + *errorRef = nil; + } + NSError *error; + NSString *bridgeParametersJSON = queryParameters[FBSDKBridgeAPIProtocolNativeV1InputKeys.bridgeArgs]; + NSDictionary *bridgeParameters = [FBSDKInternalUtility objectForJSONString:bridgeParametersJSON error:&error]; + bridgeParameters = [FBSDKTypeUtility dictionaryValue:bridgeParameters]; + if (!bridgeParameters) { + if (error && (errorRef != NULL)) { + *errorRef = [NSError fbInvalidArgumentErrorWithName:FBSDKBridgeAPIProtocolNativeV1InputKeys.bridgeArgs + value:bridgeParametersJSON + message:@"Invalid bridge_args." + underlyingError:error]; + } + return nil; + } + NSString *responseActionID = bridgeParameters[FBSDKBridgeAPIProtocolNativeV1BridgeParameterInputKeys.actionID]; + responseActionID = [FBSDKTypeUtility stringValue:responseActionID]; + if (![responseActionID isEqualToString:actionID]) { + return nil; + } + NSDictionary *errorDictionary = bridgeParameters[FBSDKBridgeAPIProtocolNativeV1BridgeParameterInputKeys.error]; + errorDictionary = [FBSDKTypeUtility dictionaryValue:errorDictionary]; + if (errorDictionary) { + error = [self _errorWithDictionary:errorDictionary]; + if (errorRef != NULL) { + *errorRef = error; + } + return nil; + } + NSString *resultParametersJSON = queryParameters[FBSDKBridgeAPIProtocolNativeV1InputKeys.methodResults]; + NSDictionary *resultParameters = [FBSDKInternalUtility objectForJSONString:resultParametersJSON error:&error]; + if (!resultParameters) { + if (errorRef != NULL) { + *errorRef = [NSError fbInvalidArgumentErrorWithName:FBSDKBridgeAPIProtocolNativeV1InputKeys.methodResults + value:resultParametersJSON + message:@"Invalid method_results." + underlyingError:error]; + } + return nil; + } + if (cancelledRef != NULL) { + NSString *completionGesture = [FBSDKTypeUtility stringValue:resultParameters[@"completionGesture"]]; + *cancelledRef = [completionGesture isEqualToString:@"cancel"]; + } + return resultParameters; +} + +#pragma mark - Helper Methods + +- (UIImage *)_appIcon +{ + if (!_includeAppIcon) { + return nil; + } + NSArray *files = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIcons"] + [@"CFBundlePrimaryIcon"] + [@"CFBundleIconFiles"]; + if (!files.count) { + return nil; + } + return [UIImage imageNamed:files[0]]; +} + +- (NSDictionary *)_bridgeParametersWithActionID:(NSString *)actionID error:(NSError *__autoreleasing *)errorRef +{ + NSMutableDictionary *bridgeParameters = [[NSMutableDictionary alloc] init]; + [FBSDKInternalUtility dictionary:bridgeParameters setObject:actionID + forKey:FBSDKBridgeAPIProtocolNativeV1BridgeParameterOutputKeys.actionID]; + [FBSDKInternalUtility dictionary:bridgeParameters setObject:[self _appIcon] + forKey:FBSDKBridgeAPIProtocolNativeV1BridgeParameterOutputKeys.appIcon]; + [FBSDKInternalUtility dictionary:bridgeParameters setObject:[FBSDKSettings displayName] + forKey:FBSDKBridgeAPIProtocolNativeV1BridgeParameterOutputKeys.appName]; + [FBSDKInternalUtility dictionary:bridgeParameters setObject:[FBSDKSettings sdkVersion] + forKey:FBSDKBridgeAPIProtocolNativeV1BridgeParameterOutputKeys.sdkVersion]; + return bridgeParameters; +} + +- (NSError *)_errorWithDictionary:(NSDictionary *)dictionary +{ + if (!dictionary) { + return nil; + } + NSString *domain = [FBSDKTypeUtility stringValue:dictionary[FBSDKBridgeAPIProtocolNativeV1ErrorKeys.domain]] ?: + FBSDKErrorDomain; + NSInteger code = [FBSDKTypeUtility integerValue:dictionary[FBSDKBridgeAPIProtocolNativeV1ErrorKeys.code]] ?: + FBSDKErrorUnknown; + NSDictionary *userInfo = [FBSDKTypeUtility dictionaryValue:dictionary[FBSDKBridgeAPIProtocolNativeV1ErrorKeys.userInfo]]; + return [NSError errorWithDomain:domain code:code userInfo:userInfo]; +} + +- (NSString *)_JSONStringForObject:(id)object enablePasteboard:(BOOL)enablePasteboard error:(NSError **)errorRef +{ + __block BOOL didAddToPasteboard = NO; + return [FBSDKInternalUtility JSONStringForObject:object error:errorRef invalidObjectHandler:^id(id invalidObject, BOOL *stop) { + NSString *dataTag = FBSDKBridgeAPIProtocolNativeV1DataTypeTags.data; + if ([invalidObject isKindOfClass:[UIImage class]]) { + UIImage *image = (UIImage *)invalidObject; + // due to backward compatibility, we must send UIImage as NSData even though UIPasteboard can handle UIImage + invalidObject = UIImageJPEGRepresentation(image, [FBSDKSettings JPEGCompressionQuality]); + dataTag = FBSDKBridgeAPIProtocolNativeV1DataTypeTags.image; + } + if ([invalidObject isKindOfClass:[NSData class]]) { + NSData *data = (NSData *)invalidObject; + NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] init]; + if (didAddToPasteboard || !enablePasteboard || !self->_pasteboard || (data.length < self->_dataLengthThreshold)) { + dictionary[FBSDKBridgeAPIProtocolNativeV1DataKeys.isBase64] = @YES; + dictionary[FBSDKBridgeAPIProtocolNativeV1DataKeys.tag] = dataTag; + [FBSDKInternalUtility dictionary:dictionary + setObject:[FBSDKBase64 encodeData:data] + forKey:FBSDKBridgeAPIProtocolNativeV1DataKeys.value]; + } else { + dictionary[FBSDKBridgeAPIProtocolNativeV1DataKeys.isPasteboard] = @YES; + dictionary[FBSDKBridgeAPIProtocolNativeV1DataKeys.tag] = dataTag; + dictionary[FBSDKBridgeAPIProtocolNativeV1DataKeys.value] = self->_pasteboard.name; + [self->_pasteboard setData:data forPasteboardType:FBSDKBridgeAPIProtocolNativeV1DataPasteboardKey]; + // this version of the protocol only supports a single item on the pasteboard, so if when we add an item, make + // sure we don't add another item + didAddToPasteboard = YES; + // if we are adding this to the general pasteboard, then we want to remove it when we are done with the share. + // the Facebook app will not clear the value with this version of the protocol, so we should do it when the app + // becomes active again + NSString *pasteboardName = self->_pasteboard.name; + if ([pasteboardName isEqualToString:UIPasteboardNameGeneral] || + [pasteboardName isEqualToString:UIPasteboardNameFind]) { + [[self class] clearData:data fromPasteboardOnApplicationDidBecomeActive:self->_pasteboard]; + } + } + return dictionary; + } else if ([invalidObject isKindOfClass:[NSURL class]]) { + return ((NSURL *)invalidObject).absoluteString; + } + return invalidObject; + }]; +} + ++ (void)clearData:(NSData *)data fromPasteboardOnApplicationDidBecomeActive:(UIPasteboard *)pasteboard +{ + void(^notificationBlock)(NSNotification *) = ^(NSNotification *note){ + NSData *pasteboardData = [pasteboard dataForPasteboardType:FBSDKBridgeAPIProtocolNativeV1DataPasteboardKey]; + if ([data isEqualToData:pasteboardData]) { + [pasteboard setData:[NSData data] forPasteboardType:FBSDKBridgeAPIProtocolNativeV1DataPasteboardKey]; + } + }; + [[NSNotificationCenter defaultCenter] addObserverForName:FBSDKApplicationDidBecomeActiveNotification + object:[FBSDKApplicationDelegate sharedInstance] + queue:nil + usingBlock:notificationBlock]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV1.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV1.h new file mode 100644 index 0000000..c7b28f4 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV1.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKBridgeAPIProtocol.h" + +@interface FBSDKBridgeAPIProtocolWebV1 : NSObject + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV1.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV1.m new file mode 100644 index 0000000..51af66f --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV1.m @@ -0,0 +1,115 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKBridgeAPIProtocolWebV1.h" + +#import + +#import "FBSDKBase64.h" +#import "FBSDKBridgeAPIRequest.h" +#import "FBSDKError.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKSettings.h" +#import "FBSDKTypeUtility.h" + +#define FBSDK_BRIDGE_API_PROTOCOL_WEB_V1_ACTION_ID_KEY @"action_id" +#define FBSDK_BRIDGE_API_PROTOCOL_WEB_V1_BRIDGE_ARGS_KEY @"bridge_args" + +@implementation FBSDKBridgeAPIProtocolWebV1 + +#pragma mark - FBSDKBridgeAPIProtocol + +- (NSURL *)requestURLWithActionID:(NSString *)actionID + scheme:(NSString *)scheme + methodName:(NSString *)methodName + methodVersion:(NSString *)methodVersion + parameters:(NSDictionary *)parameters + error:(NSError *__autoreleasing *)errorRef +{ + NSMutableDictionary *queryParameters = [[NSMutableDictionary alloc] initWithDictionary:parameters]; + queryParameters[@"display"] = @"touch"; + NSString *bridgeArgs = [FBSDKInternalUtility JSONStringForObject:@{ FBSDK_BRIDGE_API_PROTOCOL_WEB_V1_ACTION_ID_KEY: actionID } + error:NULL + invalidObjectHandler:NULL]; + NSDictionary *redirectQueryParameters = @{ FBSDK_BRIDGE_API_PROTOCOL_WEB_V1_BRIDGE_ARGS_KEY: bridgeArgs }; + NSURL *redirectURL = [FBSDKInternalUtility appURLWithHost:@"bridge" + path:methodName + queryParameters:redirectQueryParameters + error:NULL]; + [FBSDKInternalUtility dictionary:queryParameters setObject:redirectURL forKey:@"redirect_uri"]; + [queryParameters addEntriesFromDictionary:parameters]; + return [FBSDKInternalUtility facebookURLWithHostPrefix:@"m" + path:[@"/dialog/" stringByAppendingString:methodName] + queryParameters:queryParameters + error:NULL]; +} + +- (NSDictionary *)responseParametersForActionID:(NSString *)actionID + queryParameters:(NSDictionary *)queryParameters + cancelled:(BOOL *)cancelledRef + error:(NSError *__autoreleasing *)errorRef +{ + if (errorRef != NULL) { + *errorRef = nil; + } + NSInteger errorCode = [FBSDKTypeUtility integerValue:queryParameters[@"error_code"]]; + switch (errorCode) { + case 0:{ + // good to go, handle the other codes and bail + break; + } + case 4201:{ + return @{ + @"completionGesture": @"cancel", + }; + break; + } + default:{ + if (errorRef != NULL) { + *errorRef = [NSError fbErrorWithCode:errorCode + message:[FBSDKTypeUtility stringValue:queryParameters[@"error_message"]]]; + } + return nil; + break; + } + } + + NSError *error; + NSString *bridgeParametersJSON = [FBSDKTypeUtility stringValue:queryParameters[FBSDK_BRIDGE_API_PROTOCOL_WEB_V1_BRIDGE_ARGS_KEY]]; + NSDictionary *bridgeParameters = [FBSDKInternalUtility objectForJSONString:bridgeParametersJSON error:&error]; + if (!bridgeParameters) { + if (error && (errorRef != NULL)) { + *errorRef = [NSError fbInvalidArgumentErrorWithName:FBSDK_BRIDGE_API_PROTOCOL_WEB_V1_BRIDGE_ARGS_KEY + value:bridgeParametersJSON + message:nil + underlyingError:error]; + } + return nil; + } + NSString *responseActionID = bridgeParameters[FBSDK_BRIDGE_API_PROTOCOL_WEB_V1_ACTION_ID_KEY]; + responseActionID = [FBSDKTypeUtility stringValue:responseActionID]; + if (![responseActionID isEqualToString:actionID]) { + return nil; + } + NSMutableDictionary *resultParameters = [queryParameters mutableCopy]; + [resultParameters removeObjectForKey:FBSDK_BRIDGE_API_PROTOCOL_WEB_V1_BRIDGE_ARGS_KEY]; + resultParameters[@"didComplete"] = @YES; + return resultParameters; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV2.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV2.h new file mode 100644 index 0000000..3d7e340 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV2.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKBridgeAPIProtocol.h" + +@interface FBSDKBridgeAPIProtocolWebV2 : NSObject + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV2.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV2.m new file mode 100644 index 0000000..36b3bc0 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV2.m @@ -0,0 +1,130 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKBridgeAPIProtocolWebV2.h" + +#import "FBSDKBridgeAPIProtocolNativeV1.h" +#import "FBSDKDialogConfiguration.h" +#import "FBSDKError.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKServerConfiguration.h" +#import "FBSDKServerConfigurationManager.h" +#import "FBSDKUtility.h" + +@implementation FBSDKBridgeAPIProtocolWebV2 +{ + FBSDKBridgeAPIProtocolNativeV1 *_nativeProtocol; +} + +#pragma mark - Object Lifecycle + +- (instancetype)init +{ + if ((self = [super init])) { + _nativeProtocol = [[FBSDKBridgeAPIProtocolNativeV1 alloc] initWithAppScheme:nil + pasteboard:nil + dataLengthThreshold:0 + includeAppIcon:NO]; + } + return self; +} + +#pragma mark - FBSDKBridgeAPIProtocol + +- (NSURL *)_redirectURLWithActionID:(NSString *)actionID methodName:(NSString *)methodName error:(NSError **)errorRef +{ + NSDictionary *queryParameters = nil; + if (actionID) { + NSDictionary *bridgeArgs = @{ FBSDKBridgeAPIProtocolNativeV1BridgeParameterInputKeys.actionID: actionID }; + NSString *bridgeArgsString = [FBSDKInternalUtility JSONStringForObject:bridgeArgs + error:NULL + invalidObjectHandler:NULL]; + queryParameters = @{ FBSDKBridgeAPIProtocolNativeV1InputKeys.bridgeArgs: bridgeArgsString }; + } + return [FBSDKInternalUtility appURLWithHost:@"bridge" path:methodName queryParameters:queryParameters error:errorRef]; +} + +- (NSURL *)_requestURLForDialogConfiguration:(FBSDKDialogConfiguration *)dialogConfiguration error:(NSError **)errorRef +{ + NSURL *requestURL = dialogConfiguration.URL; + if (!requestURL.scheme) { + requestURL = [FBSDKInternalUtility facebookURLWithHostPrefix:@"m" + path:requestURL.path + queryParameters:nil + defaultVersion:@"" + error:errorRef]; + } + return requestURL; +} + +- (NSURL *)requestURLWithActionID:(NSString *)actionID + scheme:(NSString *)scheme + methodName:(NSString *)methodName + methodVersion:(NSString *)methodVersion + parameters:(NSDictionary *)parameters + error:(NSError *__autoreleasing *)errorRef +{ + FBSDKServerConfiguration *serverConfiguration = [FBSDKServerConfigurationManager cachedServerConfiguration]; + FBSDKDialogConfiguration *dialogConfiguration = [serverConfiguration dialogConfigurationForDialogName:methodName]; + if (!dialogConfiguration) { + if (errorRef != NULL) { + *errorRef = [NSError fbErrorWithCode:FBSDKErrorDialogUnavailable message:nil]; + } + return nil; + } + + NSURL *requestURL = [_nativeProtocol requestURLWithActionID:actionID + scheme:scheme + methodName:methodName + methodVersion:methodVersion + parameters:parameters error:errorRef]; + if (!requestURL) { + return nil; + } + + NSMutableDictionary *queryParameters = [[FBSDKUtility dictionaryWithQueryString:requestURL.query] mutableCopy]; + queryParameters[@"ios_bundle_id"] = [NSBundle mainBundle].bundleIdentifier; + NSURL *redirectURL = [self _redirectURLWithActionID:nil methodName:methodName error:errorRef]; + if (!redirectURL) { + return nil; + } + queryParameters[@"redirect_url"] = redirectURL; + + requestURL = [self _requestURLForDialogConfiguration:dialogConfiguration error:errorRef]; + if (!requestURL) { + return nil; + } + return [FBSDKInternalUtility URLWithScheme:requestURL.scheme + host:requestURL.host + path:requestURL.path + queryParameters:queryParameters + error:errorRef]; +} + +- (NSDictionary *)responseParametersForActionID:(NSString *)actionID + queryParameters:(NSDictionary *)queryParameters + cancelled:(BOOL *)cancelledRef + error:(NSError *__autoreleasing *)errorRef +{ + return [_nativeProtocol responseParametersForActionID:actionID + queryParameters:queryParameters + cancelled:cancelledRef + error:errorRef]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Cryptography/FBSDKCrypto.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Cryptography/FBSDKCrypto.h new file mode 100644 index 0000000..ae84c5d --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Cryptography/FBSDKCrypto.h @@ -0,0 +1,67 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKCrypto : NSObject + +/** + Generate numOfBytes random data. + + This calls the system-provided function SecRandomCopyBytes, based on /dev/random. + */ ++ (NSData *)randomBytes:(NSUInteger)numOfBytes; + +/** + * Generate numOfBytes random data, base64-encoded. + * This calls the system-provided function SecRandomCopyBytes, based on /dev/random. + */ ++ (NSString *)randomString:(NSUInteger)numOfBytes; + +/** + Generate a fresh master key using SecRandomCopyBytes, the result is encoded in base64/. + */ ++ (NSString *)makeMasterKey; + +/** + Initialize with a base64-encoded master key. + + This key and the current derivation function will be used to generate the encryption key and the mac key. + */ +- (instancetype)initWithMasterKey:(NSString *)masterKey; + +/** + Initialize with base64-encoded encryption key and mac key. + */ +- (instancetype)initWithEncryptionKey:(NSString *)encryptionKey macKey:(NSString *)macKey; + +/** + Encrypt plainText and return the base64 encoded result. + + MAC computation involves additionalDataToSign. + */ +- (NSString *)encrypt:(NSData *)plainText additionalDataToSign:(NSData *)additionalDataToSign; + +/** + Decrypt base64EncodedCipherText. + + MAC computation involves additionalSignedData. + */ +- (NSData *)decrypt:(NSString *)base64EncodedCipherText additionalSignedData:(NSData *)additionalSignedData; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Cryptography/FBSDKCrypto.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Cryptography/FBSDKCrypto.m new file mode 100644 index 0000000..7e17cc4 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Cryptography/FBSDKCrypto.m @@ -0,0 +1,287 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKCrypto.h" + +#import +#import +#import + +#import "FBSDKBase64.h" +#import "FBSDKDynamicFrameworkLoader.h" + +static const uint8_t kFBSDK_CRYPTO_CURRENT_VERSION = 1; +static const uint8_t kFBSDK_CRYPTO_CURRENT_MASTER_KEY_LENGTH = 16; + +static inline void FBSDKCryptoWriteIntBigEndian(uint8_t *buffer, uint32_t value) +{ + buffer[3] = (uint8_t)(value & 0xff); + buffer[2] = (uint8_t)((value >> 8) & 0xff); + buffer[1] = (uint8_t)((value >> 16) & 0xff); + buffer[0] = (uint8_t)((value >> 24) & 0xff); +} + +static inline void FBSDKCryptoBlankData(NSData *data) +{ + if (!data) { + return; + } + bzero((void *) [data bytes], [data length]); +} + +// Note: the following simple derivation function is NOT suitable for passwords or weak keys +static inline NSData *FBSDKCryptoMakeSubKey(uint8_t *key, size_t len, uint32_t idx) +{ + if (!key || len < 10) { + return nil; + } + + size_t macBufferLength = 4; + uint8_t macBuffer[4]; + FBSDKCryptoWriteIntBigEndian(macBuffer, idx); + + uint8_t *result = malloc(CC_SHA256_DIGEST_LENGTH); + if (!result) { + return nil; + } + + CCHmac(kCCHmacAlgSHA256, key, len, macBuffer, macBufferLength, result); + + return [NSData dataWithBytesNoCopy:result length:CC_SHA256_DIGEST_LENGTH]; +} + +@implementation FBSDKCrypto +{ + NSData *_encryptionKeyData; + NSData *_macKeyData; +} + +#pragma mark - Class Methods + ++ (NSString *)makeMasterKey +{ + NSData *masterKeyData = [FBSDKCrypto randomBytes:kFBSDK_CRYPTO_CURRENT_MASTER_KEY_LENGTH + 1]; + + // force the first byte to be the crypto version + uint8_t *first = (uint8_t *)masterKeyData.bytes; + *first = kFBSDK_CRYPTO_CURRENT_VERSION; + + NSString *masterKey = [FBSDKBase64 encodeData:masterKeyData]; + FBSDKCryptoBlankData(masterKeyData); + return masterKey; +} + ++ (NSData *)randomBytes:(NSUInteger)numOfBytes +{ + uint8_t *buffer = malloc(numOfBytes); + int result = fbsdkdfl_SecRandomCopyBytes([FBSDKDynamicFrameworkLoader loadkSecRandomDefault], numOfBytes, buffer); + if (result != 0) { + free(buffer); + return nil; + } + return [NSData dataWithBytesNoCopy:buffer length:numOfBytes]; +} + ++ (NSString *)randomString:(NSUInteger)numOfBytes +{ + NSData *randomStringData = [FBSDKCrypto randomBytes:numOfBytes]; + NSString *randomString = [FBSDKBase64 encodeData:randomStringData]; + FBSDKCryptoBlankData(randomStringData); + return randomString; +} + +#pragma mark - Object Lifecycle + +- (instancetype)initWithMasterKey:(NSString *)masterKey +{ + if ((self = [super init])) { + NSData *masterKeyData = [FBSDKBase64 decodeAsData:masterKey]; + NSUInteger len = masterKeyData.length; + uint8_t *first = (uint8_t *)masterKeyData.bytes; + + if (len == 0 || first == nil || *first != kFBSDK_CRYPTO_CURRENT_VERSION) { + // only one version supported at the moment + return nil; + } + + _encryptionKeyData = FBSDKCryptoMakeSubKey(first+1, len-1, 1); + _macKeyData = FBSDKCryptoMakeSubKey(first+1, len-1, 2); + FBSDKCryptoBlankData(masterKeyData); + return self; + } else { + return nil; + } +} + +- (instancetype)initWithEncryptionKey:(NSString *)encryptionKey macKey:(NSString *)macKey +{ + if ((self = [super init])) { + _macKeyData = [FBSDKBase64 decodeAsData:macKey]; + _encryptionKeyData = [FBSDKBase64 decodeAsData:encryptionKey]; + } + return self; +} + +- (void)dealloc +{ + FBSDKCryptoBlankData(_encryptionKeyData); + FBSDKCryptoBlankData(_macKeyData); +} + +#pragma mark - Public Methods + +/** + * return base64_encode([VERSION 1 byte] + [MAC 32 bytes] + [IV 16 bytes] + [AES256(Padded Data, multiples of 16)] + */ +- (NSString *)encrypt:(NSData *)plainText additionalDataToSign:(NSData *)additionalDataToSign +{ + NSAssert(plainText.length <= INT_MAX, @""); + int plainTextLength = (int)plainText.length; + + uint8_t numPaddingBytes = kCCBlockSizeAES128 - (plainText.length % kCCBlockSizeAES128); // Pad 1 .. 16 bytes + int cipherDataLength = plainTextLength + numPaddingBytes; + size_t bufferSize = 1 + CC_SHA256_DIGEST_LENGTH + kCCBlockSizeAES128 + cipherDataLength; + int offsetMAC = 1; + int offsetIV = offsetMAC + CC_SHA256_DIGEST_LENGTH; + int offsetCipherData = offsetIV + kCCBlockSizeAES128; + + uint8_t *buffer = calloc(bufferSize, sizeof(uint8_t)); + buffer[0] = kFBSDK_CRYPTO_CURRENT_VERSION; // First byte is the version number + NSData *IV = [[self class] randomBytes:kCCBlockSizeAES128]; + memcpy(buffer + offsetIV, IV.bytes, IV.length); + + memcpy(buffer + offsetCipherData, plainText.bytes, plainTextLength); // Copy input in + fbsdkdfl_SecRandomCopyBytes([FBSDKDynamicFrameworkLoader loadkSecRandomDefault], + numPaddingBytes, + buffer + offsetCipherData + plainTextLength); // Random pad + buffer[offsetCipherData + cipherDataLength - 1] = numPaddingBytes; // Record the number of padded bytes at the end + + size_t numOutputBytes = 0; + CCCryptorStatus cryptStatus = CCCrypt(kCCEncrypt, kCCAlgorithmAES128, 0, + _encryptionKeyData.bytes, kCCKeySizeAES256, + IV.bytes, + buffer + offsetCipherData, cipherDataLength, + buffer + offsetCipherData, cipherDataLength, + &numOutputBytes); + + NSData *mac = [self _macForIV:IV + cipherData:[NSData dataWithBytesNoCopy:buffer + offsetCipherData length:cipherDataLength freeWhenDone:NO] + additionalDataToSign:additionalDataToSign]; + memcpy(buffer + offsetMAC, mac.bytes, CC_SHA256_DIGEST_LENGTH); + + if (cryptStatus == kCCSuccess) { + return [FBSDKBase64 encodeData:[NSData dataWithBytesNoCopy:buffer length:bufferSize]]; + } + free(buffer); + return nil; +} + +- (NSData *)decrypt:(NSString *)base64EncodedCipherText additionalSignedData:(NSData *)additionalSignedData +{ + NSData *cipherText = [FBSDKBase64 decodeAsData:base64EncodedCipherText]; + NSAssert(cipherText.length <= INT_MAX, @""); + int cipherTextLength = (int)cipherText.length; + + if (!cipherText || cipherTextLength < 1 + CC_SHA256_DIGEST_LENGTH + kCCBlockSizeAES128) { + return nil; + } + int cipherDataLength = cipherTextLength - (1 + CC_SHA256_DIGEST_LENGTH + kCCBlockSizeAES128); + if (cipherDataLength % kCCBlockSizeAES128 != 0) { + return nil; + } + uint8_t *buffer = (uint8_t *)cipherText.bytes; + + int offsetMAC = 1; + int offsetIV = offsetMAC + CC_SHA256_DIGEST_LENGTH; + int offsetCipherData = offsetIV + kCCBlockSizeAES128; + + if (buffer[0] != kFBSDK_CRYPTO_CURRENT_VERSION) { + return nil; // Version does not match + } + + NSData *IV = [NSData dataWithBytesNoCopy:buffer + offsetIV length:kCCBlockSizeAES128 freeWhenDone:NO]; + NSData *cipherData = [NSData dataWithBytesNoCopy:buffer + offsetCipherData length:cipherDataLength freeWhenDone:NO]; + NSData *mac = [self _macForIV:IV cipherData:cipherData additionalDataToSign:additionalSignedData]; + NSData *macFromStream = [NSData dataWithBytesNoCopy:buffer + offsetMAC length:CC_SHA256_DIGEST_LENGTH freeWhenDone:NO]; + if (![mac isEqualToData:macFromStream]) { + return nil; // MAC does not match + } + + + uint8_t *outputBuffer = malloc(cipherDataLength); + size_t numOutputBytes = 0; + CCCryptorStatus cryptStatus = CCCrypt(kCCDecrypt, kCCAlgorithmAES128, 0, + _encryptionKeyData.bytes, kCCKeySizeAES256, + IV.bytes, + buffer + offsetCipherData, cipherDataLength, + outputBuffer, cipherDataLength, + &numOutputBytes); + if (cryptStatus == kCCSuccess) { + int numPaddingBytes = outputBuffer[cipherDataLength - 1]; + if (!(numPaddingBytes >= 1 && numPaddingBytes <= kCCBlockSizeAES128)) { + numPaddingBytes = 0; + } + return [NSData dataWithBytesNoCopy:outputBuffer length:cipherDataLength - numPaddingBytes]; + } + free(outputBuffer); + return nil; +} + +#pragma mark - Helper Methods + +/** + * + * [IV 16 bytes] . [length of ciphertext 4 bytes] . [ciphertext] . [length of additionalDataToSign, 4 bytes] . [additionalDataToSign]) + * length is written in big-endian + */ +- (NSData *)_macForIV:(NSData *)IV cipherData:(NSData *)cipherData additionalDataToSign:(NSData *)additionalDataToSign +{ + NSAssert(cipherData.length <= INT_MAX, @""); + int cipherDataLength = (int)cipherData.length; + + NSAssert(additionalDataToSign.length <= INT_MAX, @""); + int additionalDataToSignLength = (int)additionalDataToSign.length; + + size_t macBufferLength = kCCBlockSizeAES128 + 4 + cipherData.length + 4 + additionalDataToSign.length; + uint8_t *macBuffer = malloc(macBufferLength); + int offsetIV = 0; + int offsetCipherTextLength = offsetIV + kCCBlockSizeAES128; + int offsetCipherText = offsetCipherTextLength + 4; + + int offsetAdditionalDataLength = offsetCipherText + cipherDataLength; + int offsetAdditionalData = offsetAdditionalDataLength + 4; + + // [IV 16 bytes] + memcpy(macBuffer + offsetIV, IV.bytes, kCCBlockSizeAES128); + // [length of ciphertext 4 bytes] + FBSDKCryptoWriteIntBigEndian(macBuffer + offsetCipherTextLength, cipherDataLength); + // [ciphertext] + memcpy(macBuffer + offsetCipherText, cipherData.bytes, cipherDataLength); + // [length of additionalDataToSign, 4 bytes] + FBSDKCryptoWriteIntBigEndian(macBuffer + offsetAdditionalDataLength, additionalDataToSignLength); + memcpy(macBuffer + offsetAdditionalData, additionalDataToSign.bytes, additionalDataToSignLength); + + uint8_t *result = malloc(CC_SHA256_DIGEST_LENGTH); + + CCHmac(kCCHmacAlgSHA256, _macKeyData.bytes, _macKeyData.length, macBuffer, macBufferLength, result); + free(macBuffer); + + return [NSData dataWithBytesNoCopy:result length:CC_SHA256_DIGEST_LENGTH]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/FBSDKErrorRecoveryAttempter.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/FBSDKErrorRecoveryAttempter.h new file mode 100644 index 0000000..65d5e58 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/FBSDKErrorRecoveryAttempter.h @@ -0,0 +1,34 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +@class FBSDKErrorRecoveryConfiguration; + +@interface FBSDKErrorRecoveryAttempter : NSObject + +// can return nil if configuration is not supported. ++ (instancetype)recoveryAttempterFromConfiguration:(FBSDKErrorRecoveryConfiguration *)configuration; + +@end + +@interface FBSDKErrorRecoveryAttempter (Protected) +- (void)completeRecovery:(BOOL)didRecover delegate:(id)delegate didRecoverSelector:(SEL)didRecoverSelector contextInfo:(void *)contextInfo; +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/FBSDKErrorRecoveryAttempter.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/FBSDKErrorRecoveryAttempter.m new file mode 100644 index 0000000..07aa418 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/FBSDKErrorRecoveryAttempter.m @@ -0,0 +1,56 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKErrorRecoveryAttempter.h" + +#import "_FBSDKTemporaryErrorRecoveryAttempter.h" +#import "FBSDKErrorRecoveryConfiguration.h" + +@implementation FBSDKErrorRecoveryAttempter + ++ (instancetype)recoveryAttempterFromConfiguration:(FBSDKErrorRecoveryConfiguration *)configuration +{ + if (configuration.errorCategory == FBSDKGraphRequestErrorTransient) { + return [[_FBSDKTemporaryErrorRecoveryAttempter alloc] init]; + } else if (configuration.errorCategory == FBSDKGraphRequestErrorOther) { + return nil; + } + if ([configuration.recoveryActionName isEqualToString:@"login"]) { + Class loginRecoveryAttmpterClass = NSClassFromString(@"_FBSDKLoginRecoveryAttempter"); + if (loginRecoveryAttmpterClass) { + return [[loginRecoveryAttmpterClass alloc] init]; + } + } + return nil; +} + +- (void)attemptRecoveryFromError:(NSError *)error optionIndex:(NSUInteger)recoveryOptionIndex delegate:(id)delegate didRecoverSelector:(SEL)didRecoverSelector contextInfo:(void *)contextInfo +{ + // should be implemented by subclasses. +} +@end + +@implementation FBSDKErrorRecoveryAttempter(Protected) + +- (void)completeRecovery:(BOOL)didRecover delegate:(id)delegate didRecoverSelector:(SEL)didRecoverSelector contextInfo:(void *)contextInfo +{ + void (*callback)(id, SEL, BOOL, void *) = (void *)[delegate methodForSelector:didRecoverSelector]; + (*callback)(delegate, didRecoverSelector, didRecover, contextInfo); +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/_FBSDKTemporaryErrorRecoveryAttempter.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/_FBSDKTemporaryErrorRecoveryAttempter.h new file mode 100644 index 0000000..21ad040 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/_FBSDKTemporaryErrorRecoveryAttempter.h @@ -0,0 +1,23 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKErrorRecoveryAttempter.h" + +@interface _FBSDKTemporaryErrorRecoveryAttempter : FBSDKErrorRecoveryAttempter + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/_FBSDKTemporaryErrorRecoveryAttempter.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/_FBSDKTemporaryErrorRecoveryAttempter.m new file mode 100644 index 0000000..bb555aa --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/_FBSDKTemporaryErrorRecoveryAttempter.m @@ -0,0 +1,28 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "_FBSDKTemporaryErrorRecoveryAttempter.h" + +@implementation _FBSDKTemporaryErrorRecoveryAttempter + +- (void)attemptRecoveryFromError:(NSError *)error optionIndex:(NSUInteger)recoveryOptionIndex delegate:(id)delegate didRecoverSelector:(SEL)didRecoverSelector contextInfo:(void *)contextInfo +{ + [super completeRecovery:YES delegate:delegate didRecoverSelector:didRecoverSelector contextInfo:contextInfo]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLinkReturnToRefererView_Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLinkReturnToRefererView_Internal.h new file mode 100644 index 0000000..9699700 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLinkReturnToRefererView_Internal.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppLinkReturnToRefererView.h" + +@interface FBSDKAppLinkReturnToRefererView (Internal) + +- (CGFloat)statusBarHeight; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLink_Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLink_Internal.h new file mode 100644 index 0000000..c4d40cb --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLink_Internal.h @@ -0,0 +1,40 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAppLink.h" + +FOUNDATION_EXPORT NSString *const FBSDKAppLinkDataParameterName; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkTargetKeyName; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkUserAgentKeyName; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkExtrasKeyName; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkVersionKeyName; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkRefererAppLink; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkRefererAppName; +FOUNDATION_EXPORT NSString *const FBSDKAppLinkRefererUrl; + +@interface FBSDKAppLink (Internal) + ++ (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL + targets:(NSArray *)targets + webURL:(NSURL *)webURL + isBackToReferrer:(BOOL)isBackToReferrer; + +/*! return if this AppLink is to go back to referrer. */ +@property (nonatomic, assign, readonly, getter=isBackToReferrer) BOOL backToReferrer; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKApplicationDelegate+Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKApplicationDelegate+Internal.h new file mode 100644 index 0000000..b387ca3 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKApplicationDelegate+Internal.h @@ -0,0 +1,61 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +#import "FBSDKCoreKit+Internal.h" + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +FOUNDATION_EXPORT NSNotificationName const FBSDKApplicationDidBecomeActiveNotification; + +#else + +FOUNDATION_EXPORT NSString *const FBSDKApplicationDidBecomeActiveNotification; + +#endif + +@class FBSDKApplicationCall; + +#if !TARGET_OS_TV +typedef void(^FBSDKBridgeAPICallbackBlock)(FBSDKBridgeAPIResponse *response); +#endif + +@interface FBSDKApplicationDelegate () +#if !TARGET_OS_TV + + +- (void)openBridgeAPIRequest:(FBSDKBridgeAPIRequest *)request + useSafariViewController:(BOOL)useSafariViewController + fromViewController:(UIViewController *)fromViewController + completionBlock:(FBSDKBridgeAPICallbackBlock)completionBlock; + +- (void)openURLWithSafariViewController:(NSURL *)url + sender:(id)sender + fromViewController:(UIViewController *)fromViewController + handler:(void(^)(BOOL, NSError *))handler; + +- (void)openURL:(NSURL *)url sender:(id)sender handler:(void(^)(BOOL, NSError *))handler; + +#endif + +@property (nonatomic, readonly, getter=isActive) BOOL active; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAudioResourceLoader.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAudioResourceLoader.h new file mode 100644 index 0000000..2c05575 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAudioResourceLoader.h @@ -0,0 +1,36 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKAudioResourceLoader : NSObject + ++ (instancetype)sharedLoader; + +- (BOOL)loadSound:(NSError **)error; +- (void)playSound; + +@end + +@interface FBSDKAudioResourceLoader (Subclass) + ++ (NSString *)name; ++ (NSUInteger)version; ++ (NSData *)data; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAudioResourceLoader.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAudioResourceLoader.m new file mode 100644 index 0000000..b7ea5d7 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAudioResourceLoader.m @@ -0,0 +1,151 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAudioResourceLoader.h" + +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKLogger.h" +#import "FBSDKSettings.h" + +@implementation FBSDKAudioResourceLoader +{ + NSFileManager *_fileManager; + NSURL *_fileURL; + SystemSoundID _systemSoundID; +} + +#pragma mark - Class Methods + ++ (instancetype)sharedLoader +{ + static NSMutableDictionary *_loaderCache = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _loaderCache = [[NSMutableDictionary alloc] init]; + }); + + NSString *name = [self name]; + FBSDKAudioResourceLoader *loader; + @synchronized(_loaderCache) { + loader = _loaderCache[name]; + if (!loader) { + loader = [[self alloc] init]; + NSError *error = nil; + if ([loader loadSound:&error]) { + _loaderCache[name] = loader; + } else { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"%@ error: %@", self, error]; + } + } + } + + return loader; +} + +#pragma mark - Object Lifecycle + +- (instancetype)init +{ + if ((self = [super init])) { + _fileManager = [[NSFileManager alloc] init]; + } + return self; +} + +- (void)dealloc +{ + fbsdkdfl_AudioServicesDisposeSystemSoundID(_systemSoundID); +} + +#pragma mark - Public API + +- (BOOL)loadSound:(NSError **)errorRef +{ + NSURL *fileURL = [self _fileURL:errorRef]; + + if (![_fileManager fileExistsAtPath:fileURL.path]) { + NSData *data = [[self class] data]; + if (![data writeToURL:fileURL options:NSDataWritingAtomic error:errorRef]) { + return NO; + } + } + + OSStatus status = fbsdkdfl_AudioServicesCreateSystemSoundID((__bridge CFURLRef)fileURL, &_systemSoundID); + return (status == kAudioServicesNoError); +} + +- (void)playSound +{ + if ((_systemSoundID == 0) && ![self loadSound:NULL]) { + return; + } + fbsdkdfl_AudioServicesPlaySystemSound(_systemSoundID); +} + +#pragma mark - Helper Methods + +- (NSURL *)_fileURL:(NSError **)errorRef +{ + if (_fileURL) { + return _fileURL; + } + + NSURL *baseURL = [_fileManager URLForDirectory:NSCachesDirectory + inDomain:NSUserDomainMask + appropriateForURL:nil + create:YES + error:errorRef]; + if (!baseURL) { + return nil; + } + + NSURL *directoryURL = [baseURL URLByAppendingPathComponent:@"fb_audio" isDirectory:YES]; + NSURL *versionURL = [directoryURL URLByAppendingPathComponent:[NSString stringWithFormat:@"%lu", (unsigned long)[[self class] version]] + isDirectory:YES]; + if (![_fileManager createDirectoryAtURL:versionURL withIntermediateDirectories:YES attributes:nil error:errorRef]) { + return nil; + } + + _fileURL = [[versionURL URLByAppendingPathComponent:[[self class] name]] copy]; + + return _fileURL; +} + +@end + +@implementation FBSDKAudioResourceLoader (Subclass) + +#pragma mark - Subclass Methods + ++ (NSString *)name +{ + return nil; +} + ++ (NSUInteger)version +{ + return 0; +} + ++ (NSData *)data +{ + return nil; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKContainerViewController.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKContainerViewController.h new file mode 100644 index 0000000..5feed4f --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKContainerViewController.h @@ -0,0 +1,35 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@class FBSDKContainerViewController; + +@protocol FBSDKContainerViewControllerDelegate + +- (void)viewControllerDidDisappear:(FBSDKContainerViewController *)viewController animated:(BOOL)animated; + +@end + +@interface FBSDKContainerViewController : UIViewController + +@property (nonatomic, weak) id delegate; + +- (void)displayChildController:(UIViewController *)childController; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKContainerViewController.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKContainerViewController.m new file mode 100644 index 0000000..e1c2e6d --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKContainerViewController.m @@ -0,0 +1,78 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKContainerViewController.h" + +@implementation FBSDKContainerViewController + +- (void)viewDidDisappear:(BOOL)animated +{ + [super viewDidDisappear:animated]; + if ([self.delegate respondsToSelector:@selector(viewControllerDidDisappear:animated:)]) { + [self.delegate viewControllerDidDisappear:self animated:animated]; + } +} + +- (void)displayChildController:(UIViewController *)childController +{ + [self addChildViewController:childController]; + UIView *view = self.view; + UIView *childView = childController.view; + childView.translatesAutoresizingMaskIntoConstraints = NO; + childView.frame = view.frame; + [view addSubview:childView]; + + [view addConstraints: + @[ + [NSLayoutConstraint constraintWithItem:childView + attribute:NSLayoutAttributeTop + relatedBy:NSLayoutRelationEqual + toItem:view + attribute:NSLayoutAttributeTop + multiplier:1.0 + constant:0.0], + + [NSLayoutConstraint constraintWithItem:childView + attribute:NSLayoutAttributeBottom + relatedBy:NSLayoutRelationEqual + toItem:view + attribute:NSLayoutAttributeBottom + multiplier:1.0 + constant:0.0], + + [NSLayoutConstraint constraintWithItem:childView + attribute:NSLayoutAttributeLeading + relatedBy:NSLayoutRelationEqual + toItem:view + attribute:NSLayoutAttributeLeading + multiplier:1.0 + constant:0.0], + + [NSLayoutConstraint constraintWithItem:childView + attribute:NSLayoutAttributeTrailing + relatedBy:NSLayoutRelationEqual + toItem:view + attribute:NSLayoutAttributeTrailing + multiplier:1.0 + constant:0.0], + ]]; + + [childController didMoveToParentViewController:self]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKCoreKit+Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKCoreKit+Internal.h new file mode 100644 index 0000000..5a3ef84 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKCoreKit+Internal.h @@ -0,0 +1,85 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +#if !TARGET_OS_TV +#import "AppEvents/Codeless/FBSDKViewHierarchy.h" +#import "AppEvents/Codeless/FBSDKCodelessMacros.h" +#import "AppEvents/Codeless/FBSDKCodelessIndexer.h" +#import "BridgeAPI/FBSDKBridgeAPIProtocol.h" +#import "BridgeAPI/FBSDKBridgeAPIProtocolType.h" +#import "BridgeAPI/FBSDKBridgeAPIRequest.h" +#import "BridgeAPI/FBSDKBridgeAPIResponse.h" +#import "BridgeAPI/FBSDKURLOpening.h" +#import "Cryptography/FBSDKCrypto.h" +#import "FBSDKAudioResourceLoader.h" +#import "FBSDKContainerViewController.h" +#import "FBSDKMonotonicTime.h" +#import "FBSDKSystemAccountStoreAdapter.h" +#import "FBSDKTriStateBOOL.h" +#import "UI/FBSDKCloseIcon.h" +#import "UI/FBSDKColor.h" +#import "UI/FBSDKMaleSilhouetteIcon.h" +#import "UI/FBSDKUIUtility.h" +#import "UI/FBSDKViewImpressionTracker.h" +#import "WebDialog/FBSDKWebDialog.h" +#else +#import "Device/FBSDKDeviceButton+Internal.h" +#import "Device/FBSDKDeviceDialogView.h" +#import "Device/FBSDKSmartDeviceDialogView.h" +#import "Device/FBSDKDeviceViewControllerBase+Internal.h" +#import "Device/FBSDKModalFormPresentationController.h" +#endif + +#import "AppEvents/FBSDKAppEvents+Internal.h" +#import "AppEvents/FBSDKAppEventsState.h" +#import "AppEvents/FBSDKAppEventsStateManager.h" +#import "AppEvents/FBSDKAppEventsUtility.h" +#import "AppEvents/FBSDKTimeSpentData.h" +#import "Base64/FBSDKBase64.h" +#import "ErrorRecovery/FBSDKErrorRecoveryAttempter.h" +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKApplicationDelegate+Internal.h" +#import "FBSDKDeviceRequestsHelper.h" +#import "FBSDKError.h" +#import "FBSDKImageDownloader.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKMath.h" +#import "FBSDKSettings+Internal.h" +#import "FBSDKSwizzler.h" +#import "FBSDKTypeUtility.h" +#import "Network/FBSDKGraphRequest+Internal.h" +#import "Network/FBSDKGraphRequestConnection+Internal.h" +#import "Network/FBSDKGraphRequestMetadata.h" +#import "ServerConfiguration/FBSDKDialogConfiguration.h" +#import "ServerConfiguration/FBSDKServerConfiguration+Internal.h" +#import "ServerConfiguration/FBSDKServerConfiguration.h" +#import "ServerConfiguration/FBSDKServerConfigurationManager+Internal.h" +#import "ServerConfiguration/FBSDKServerConfigurationManager.h" +#import "TokenCaching/FBSDKAccessTokenCache.h" +#import "TokenCaching/FBSDKAccessTokenCaching.h" +#import "TokenCaching/FBSDKKeychainStore.h" +#import "TokenCaching/FBSDKKeychainStoreViaBundleID.h" +#import "UI/FBSDKButton+Subclass.h" +#import "UI/FBSDKIcon.h" +#import "UI/FBSDKLogo.h" + diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKDeviceRequestsHelper.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKDeviceRequestsHelper.h new file mode 100644 index 0000000..20d0f77 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKDeviceRequestsHelper.h @@ -0,0 +1,58 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import +#import + +#define FBSDK_DEVICE_INFO_PARAM @"device_info" + +/* + @class + + Helper class for device requests mDNS broadcasts. Note this is only intended for + internal consumption. + */ +@interface FBSDKDeviceRequestsHelper : NSObject + +/** + Get device info to include with the GraphRequest + */ ++ (NSString *)getDeviceInfo; + +/** + Start the mDNS advertisement service for a device request + @param loginCode The login code associated with the action for the device request. + @return True if the service broadcast was successfully started. + */ ++ (BOOL)startAdvertisementService:(NSString *)loginCode withDelegate:(id)delegate; + +/** + Check if a service delegate is registered with particular advertisement service + @param delegate The delegate to check if registered. + @param service The advertisement service to check for. + @return True if the service is the one the delegate registered with. + */ ++ (BOOL)isDelegate:(id)delegate forAdvertisementService:(NSNetService *)service; + +/** + Stop the mDNS advertisement service for a device request + @param delegate The delegate registered with the service. + */ ++ (void)cleanUpAdvertisementService:(id)delegate; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKDeviceRequestsHelper.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKDeviceRequestsHelper.m new file mode 100644 index 0000000..4bc1bd9 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKDeviceRequestsHelper.m @@ -0,0 +1,124 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKDeviceRequestsHelper.h" + +#import + +#import + +#import "FBSDKCoreKit+Internal.h" + +#define FBSDK_DEVICE_INFO_DEVICE @"device" +#define FBSDK_DEVICE_INFO_MODEL @"model" +#define FBSDK_HEADER @"fbsdk" +#if !TARGET_OS_TV +#define FBSDK_FLAVOR @"ios" +#else +#define FBSDK_FLAVOR @"tvos" +#endif +#define FBSDK_SERVICE_TYPE @"_fb._tcp." + +static NSMapTable *g_mdnsAdvertisementServices; + +@implementation FBSDKDeviceRequestsHelper + +#pragma mark - Class Methods + ++ (void)initialize { + // We use weak to strong in order to retain the advertisement services + // without having to pass them back to the delegate that started them + // Note that in case the delegate is destroyed before it had a chance to + // stop the service, the service will continue broadcasting until the map + // resizes itself and releases the service, causing it to stop + g_mdnsAdvertisementServices = [NSMapTable weakToStrongObjectsMapTable]; +} + ++ (NSString *)getDeviceInfo +{ + struct utsname systemInfo; + uname(&systemInfo); + NSDictionary *deviceInfo = @{ + FBSDK_DEVICE_INFO_DEVICE: @(systemInfo.machine), + FBSDK_DEVICE_INFO_MODEL: [UIDevice currentDevice].model, + }; + NSError *err; + NSData *jsonDeviceInfo = [NSJSONSerialization dataWithJSONObject:deviceInfo + options:0 + error:&err]; + + return [[NSString alloc] initWithData:jsonDeviceInfo encoding:NSUTF8StringEncoding]; +} + ++ (BOOL)startAdvertisementService:(NSString *)loginCode withDelegate:(id)delegate; +{ + static NSString *sdkVersion = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + // Dots in the version will mess up the bonjour DNS record parsing + sdkVersion = [[FBSDKSettings sdkVersion] stringByReplacingOccurrencesOfString:@"." withString:@"|"]; + if (sdkVersion.length > 10 || + ![[NSCharacterSet decimalDigitCharacterSet] characterIsMember:[sdkVersion characterAtIndex:0]]) { + sdkVersion = @"dev"; + } + }); + NSString *serviceName = [NSString stringWithFormat:@"%@_%@_%@", + FBSDK_HEADER, + [NSString stringWithFormat:@"%@-%@", + FBSDK_FLAVOR, + sdkVersion + ], + loginCode + ]; + if (serviceName.length > 60) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors logEntry:@"serviceName exceeded 60 characters"]; + } + NSNetService *mdnsAdvertisementService = [[NSNetService alloc] + initWithDomain:@"local." + type:FBSDK_SERVICE_TYPE + name:serviceName + port:0]; + mdnsAdvertisementService.delegate = delegate; + [mdnsAdvertisementService publishWithOptions:NSNetServiceNoAutoRename | NSNetServiceListenForConnections]; + [FBSDKAppEvents logImplicitEvent:FBSDKAppEventNameFBSDKSmartLoginService + valueToSum:nil + parameters:nil + accessToken:nil]; + [g_mdnsAdvertisementServices setObject:mdnsAdvertisementService forKey:delegate]; + + return YES; +} + ++ (BOOL)isDelegate:(id)delegate forAdvertisementService:(NSNetService *)service +{ + NSNetService *mdnsAdvertisementService = [g_mdnsAdvertisementServices objectForKey:delegate]; + return (mdnsAdvertisementService == service); +} + ++ (void)cleanUpAdvertisementService:(id)delegate +{ + NSNetService *mdnsAdvertisementService = [g_mdnsAdvertisementServices objectForKey:delegate]; + if (mdnsAdvertisementService != nil) { + // We are not interested in the stop publish event + mdnsAdvertisementService.delegate = nil; + [mdnsAdvertisementService stop]; + [g_mdnsAdvertisementServices removeObjectForKey:delegate]; + } +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKDynamicFrameworkLoader.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKDynamicFrameworkLoader.h new file mode 100644 index 0000000..d89d733 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKDynamicFrameworkLoader.h @@ -0,0 +1,239 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import +#import +#import + +/** + + This class provides a way to load constants and methods from Apple Frameworks in a dynamic + fashion. It allows the SDK to be just dragged into a project without having to specify additional + frameworks to link against. It is an internal class and not to be used by 3rd party developers. + + As new types are needed, they should be added and strongly typed. + */ +@interface FBSDKDynamicFrameworkLoader : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +#pragma mark - Security Constants + +/** + Load the kSecRandomDefault value from the Security Framework + + @return The kSecRandomDefault value or nil. + */ ++ (SecRandomRef)loadkSecRandomDefault; + +/** + Load the kSecAttrAccessible value from the Security Framework + + @return The kSecAttrAccessible value or nil. + */ ++ (CFTypeRef)loadkSecAttrAccessible; + +/** + Load the kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly value from the Security Framework + + @return The kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly value or nil. + */ ++ (CFTypeRef)loadkSecAttrAccessibleAfterFirstUnlockThisDeviceOnly; + +/** + Load the kSecAttrAccount value from the Security Framework + + @return The kSecAttrAccount value or nil. + */ ++ (CFTypeRef)loadkSecAttrAccount; + +/** + Load the kSecAttrService value from the Security Framework + + @return The kSecAttrService value or nil. + */ ++ (CFTypeRef)loadkSecAttrService; + +/** + Load the kSecAttrGeneric value from the Security Framework + + @return The kSecAttrGeneric value or nil. + */ ++ (CFTypeRef)loadkSecAttrGeneric; + +/** + Load the kSecValueData value from the Security Framework + + @return The kSecValueData value or nil. + */ ++ (CFTypeRef)loadkSecValueData; + +/** + Load the kSecClassGenericPassword value from the Security Framework + + @return The kSecClassGenericPassword value or nil. + */ ++ (CFTypeRef)loadkSecClassGenericPassword; + +/** + Load the kSecAttrAccessGroup value from the Security Framework + + @return The kSecAttrAccessGroup value or nil. + */ ++ (CFTypeRef)loadkSecAttrAccessGroup; + +/** + Load the kSecMatchLimitOne value from the Security Framework + + @return The kSecMatchLimitOne value or nil. + */ ++ (CFTypeRef)loadkSecMatchLimitOne; + +/** + Load the kSecMatchLimit value from the Security Framework + + @return The kSecMatchLimit value or nil. + */ ++ (CFTypeRef)loadkSecMatchLimit; + +/** + Load the kSecReturnData value from the Security Framework + + @return The kSecReturnData value or nil. + */ ++ (CFTypeRef)loadkSecReturnData; + +/** + Load the kSecClass value from the Security Framework + + @return The kSecClass value or nil. + */ ++ (CFTypeRef)loadkSecClass; + +@end + +#pragma mark - Security APIs + +// These are local wrappers around the corresponding methods in Security/SecRandom.h +FOUNDATION_EXPORT int fbsdkdfl_SecRandomCopyBytes(SecRandomRef rnd, size_t count, uint8_t *bytes); + +// These are local wrappers around Keychain API +FOUNDATION_EXPORT OSStatus fbsdkdfl_SecItemUpdate(CFDictionaryRef query, CFDictionaryRef attributesToUpdate); +FOUNDATION_EXPORT OSStatus fbsdkdfl_SecItemAdd(CFDictionaryRef attributes, CFTypeRef *result); +FOUNDATION_EXPORT OSStatus fbsdkdfl_SecItemCopyMatching(CFDictionaryRef query, CFTypeRef *result); +FOUNDATION_EXPORT OSStatus fbsdkdfl_SecItemDelete(CFDictionaryRef query); + +#pragma mark - Social Constants + +FOUNDATION_EXPORT NSString *fbsdkdfl_SLServiceTypeFacebook(void); +FOUNDATION_EXPORT NSString *fbsdkdfl_SLServiceTypeTwitter(void); + +#pragma mark - Social Classes + +FOUNDATION_EXPORT Class fbsdkdfl_SLComposeViewControllerClass(void); + +#pragma mark - MessageUI Classes + +FOUNDATION_EXPORT Class fbsdkdfl_MFMailComposeViewControllerClass(void); +FOUNDATION_EXPORT Class fbsdkdfl_MFMessageComposeViewControllerClass(void); + +#pragma mark - QuartzCore Classes + +FOUNDATION_EXPORT Class fbsdkdfl_CATransactionClass(void); + +#pragma mark - QuartzCore APIs + +// These are local wrappers around the corresponding transform methods from QuartzCore.framework/CATransform3D.h +FOUNDATION_EXPORT CATransform3D fbsdkdfl_CATransform3DMakeScale (CGFloat sx, CGFloat sy, CGFloat sz); +FOUNDATION_EXPORT CATransform3D fbsdkdfl_CATransform3DMakeTranslation (CGFloat tx, CGFloat ty, CGFloat tz); +FOUNDATION_EXPORT CATransform3D fbsdkdfl_CATransform3DConcat (CATransform3D a, CATransform3D b); + +FOUNDATION_EXPORT const CATransform3D fbsdkdfl_CATransform3DIdentity; + +#pragma mark - AudioToolbox APIs + +// These are local wrappers around the corresponding methods in AudioToolbox/AudioToolbox.h +FOUNDATION_EXPORT OSStatus fbsdkdfl_AudioServicesCreateSystemSoundID(CFURLRef inFileURL, SystemSoundID *outSystemSoundID); +FOUNDATION_EXPORT OSStatus fbsdkdfl_AudioServicesDisposeSystemSoundID(SystemSoundID inSystemSoundID); +FOUNDATION_EXPORT void fbsdkdfl_AudioServicesPlaySystemSound(SystemSoundID inSystemSoundID); + +#pragma mark - AdSupport Classes + +FOUNDATION_EXPORT Class fbsdkdfl_ASIdentifierManagerClass(void); + +#pragma mark - SafariServices Classes + +FOUNDATION_EXPORT Class fbsdkdfl_SFSafariViewControllerClass(void); +FOUNDATION_EXPORT Class fbsdkdfl_SFAuthenticationSessionClass(void); + +#pragma mark - AuthenticationServices Classes + +FOUNDATION_EXPORT Class fbsdkdfl_ASWebAuthenticationSessionClass(void); + +#pragma mark - Accounts Constants + +FOUNDATION_EXPORT NSString *fbsdkdfl_ACFacebookAppIdKey(void); +FOUNDATION_EXPORT NSString *fbsdkdfl_ACFacebookAudienceEveryone(void); +FOUNDATION_EXPORT NSString *fbsdkdfl_ACFacebookAudienceFriends(void); +FOUNDATION_EXPORT NSString *fbsdkdfl_ACFacebookAudienceKey(void); +FOUNDATION_EXPORT NSString *fbsdkdfl_ACFacebookAudienceOnlyMe(void); +FOUNDATION_EXPORT NSString *fbsdkdfl_ACFacebookPermissionsKey(void); + +#pragma mark - Accounts Classes + +FOUNDATION_EXPORT Class fbsdkdfl_ACAccountStoreClass(void); + +#pragma mark - StoreKit classes + +FOUNDATION_EXPORT Class fbsdkdfl_SKPaymentQueueClass(void); +FOUNDATION_EXPORT Class fbsdkdfl_SKProductsRequestClass(void); + +#pragma mark - AssetsLibrary Classes + +FOUNDATION_EXPORT Class fbsdkdfl_ALAssetsLibraryClass(void); + +#pragma mark - CoreTelephony Classes + +FOUNDATION_EXPORT Class fbsdkdfl_CTTelephonyNetworkInfoClass(void); + +#pragma mark - CoreImage + +FOUNDATION_EXPORT Class fbsdkdfl_CIImageClass(void); +FOUNDATION_EXPORT Class fbsdkdfl_CIFilterClass(void); +FOUNDATION_EXPORT NSString *fbsdkdfl_kCIInputImageKey(void); +FOUNDATION_EXPORT NSString *fbsdkdfl_kCIInputRadiusKey(void); +FOUNDATION_EXPORT NSString *fbsdkdfl_kCIOutputImageKey(void); + +#pragma mark - Photos.framework + +FOUNDATION_EXPORT Class fbsdkdfl_PHPhotoLibrary(void); +FOUNDATION_EXPORT Class fbsdkdfl_PHAssetChangeRequest(void); + +#pragma mark - MobileCoreServices + +FOUNDATION_EXPORT CFStringRef fbsdkdfl_UTTypeCopyPreferredTagWithClass(CFStringRef inUTI, + CFStringRef inTagClass); +FOUNDATION_EXPORT CFStringRef fbsdkdfl_kUTTagClassMIMEType(void); +FOUNDATION_EXPORT CFStringRef fbsdkdfl_kUTTypeJPEG(void); +FOUNDATION_EXPORT CFStringRef fbsdkdfl_kUTTypePNG(void); + +#pragma mark - WebKit Classes + +FOUNDATION_EXPORT Class fbsdkdfl_WKWebViewClass(void); +FOUNDATION_EXPORT Class fbsdkdfl_WKUserScriptClass(void); diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKError.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKError.h new file mode 100644 index 0000000..e6b73f4 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKError.h @@ -0,0 +1,93 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface NSError (FBSDKError) + ++ (NSError *)fbErrorWithCode:(NSInteger)code message:(NSString *)message; ++ (NSError *)fbErrorWithDomain:(NSErrorDomain)domain + code:(NSInteger)code + message:(NSString *)message; + ++ (NSError *)fbErrorWithCode:(NSInteger)code + message:(NSString *)message + underlyingError:(NSError *)underlyingError; + ++ (NSError *)fbErrorWithDomain:(NSErrorDomain)domain + code:(NSInteger)code + message:(NSString *)message + underlyingError:(NSError *)underlyingError; + ++ (NSError *)fbErrorWithCode:(NSInteger)code + userInfo:(NSDictionary *)userInfo + message:(NSString *)message + underlyingError:(NSError *)underlyingError; + ++ (NSError *)fbErrorWithDomain:(NSErrorDomain)domain + code:(NSInteger)code + userInfo:(NSDictionary *)userInfo + message:(NSString *)message + underlyingError:(NSError *)underlyingError; + ++ (NSError *)fbInvalidArgumentErrorWithName:(NSString *)name + value:(id)value + message:(NSString *)message; + ++ (NSError *)fbInvalidArgumentErrorWithDomain:(NSErrorDomain)domain + name:(NSString *)name + value:(id)value + message:(NSString *)message; + ++ (NSError *)fbInvalidArgumentErrorWithName:(NSString *)name + value:(id)value + message:(NSString *)message + underlyingError:(NSError *)underlyingError; + ++ (NSError *)fbInvalidArgumentErrorWithDomain:(NSErrorDomain)domain + name:(NSString *)name + value:(id)value + message:(NSString *)message + underlyingError:(NSError *)underlyingError; + ++ (NSError *)fbInvalidCollectionErrorWithName:(NSString *)name + collection:(id)collection + item:(id)item + message:(NSString *)message; + ++ (NSError *)fbInvalidCollectionErrorWithName:(NSString *)name + collection:(id)collection + item:(id)item + message:(NSString *)message + underlyingError:(NSError *)underlyingError; + ++ (NSError *)fbRequiredArgumentErrorWithName:(NSString *)name message:(NSString *)message; ++ (NSError *)fbRequiredArgumentErrorWithDomain:(NSErrorDomain)domain + name:(NSString *)name + message:(NSString *)message; + ++ (NSError *)fbRequiredArgumentErrorWithName:(NSString *)name + message:(NSString *)message + underlyingError:(NSError *)underlyingError; + ++ (NSError *)fbUnknownErrorWithMessage:(NSString *)message; + +@property (nonatomic, assign, readonly, getter=isNetworkError) BOOL networkError +NS_SWIFT_NAME(isNetworkError); + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKError.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKError.m new file mode 100644 index 0000000..bad2aae --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKError.m @@ -0,0 +1,205 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKError.h" + +#import "FBSDKConstants.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKTypeUtility.h" + +@implementation NSError (FBSDKError) + +#pragma mark - Class Methods + +- (BOOL)isNetworkError +{ + NSError *innerError = self.userInfo[NSUnderlyingErrorKey]; + if (innerError && innerError.isNetworkError) { + return YES; + } + + switch (self.code) { + case NSURLErrorTimedOut: + case NSURLErrorCannotFindHost: + case NSURLErrorCannotConnectToHost: + case NSURLErrorNetworkConnectionLost: + case NSURLErrorDNSLookupFailed: + case NSURLErrorNotConnectedToInternet: + case NSURLErrorInternationalRoamingOff: + case NSURLErrorCallIsActive: + case NSURLErrorDataNotAllowed: + return YES; + default: + return NO; + } +} + ++ (NSError *)fbErrorWithCode:(NSInteger)code message:(NSString *)message +{ + return [self fbErrorWithCode:code message:message underlyingError:nil]; +} + ++ (NSError *)fbErrorWithDomain:(NSErrorDomain)domain + code:(NSInteger)code + message:(NSString *)message +{ + return [self fbErrorWithDomain:domain code:code message:message underlyingError:nil]; +} + ++ (NSError *)fbErrorWithCode:(NSInteger)code message:(NSString *)message underlyingError:(NSError *)underlyingError +{ + return [self fbErrorWithCode:code userInfo:nil message:message underlyingError:underlyingError]; +} + ++ (NSError *)fbErrorWithDomain:(NSErrorDomain)domain + code:(NSInteger)code + message:(NSString *)message + underlyingError:(NSError *)underlyingError +{ + return [self fbErrorWithDomain:domain code:code userInfo:@{} message:message underlyingError:underlyingError]; +} + ++ (NSError *)fbErrorWithCode:(NSInteger)code + userInfo:(NSDictionary *)userInfo + message:(NSString *)message + underlyingError:(NSError *)underlyingError +{ + return [self fbErrorWithDomain:FBSDKErrorDomain code:code userInfo:userInfo message:message underlyingError:underlyingError]; +} + ++ (NSError *)fbErrorWithDomain:(NSErrorDomain)domain + code:(NSInteger)code + userInfo:(NSDictionary *)userInfo + message:(NSString *)message + underlyingError:(NSError *)underlyingError +{ + NSMutableDictionary *fullUserInfo = [[NSMutableDictionary alloc] initWithDictionary:userInfo]; + [FBSDKInternalUtility dictionary:fullUserInfo setObject:message forKey:FBSDKErrorDeveloperMessageKey]; + [FBSDKInternalUtility dictionary:fullUserInfo setObject:underlyingError forKey:NSUnderlyingErrorKey]; + userInfo = fullUserInfo.count ? [fullUserInfo copy] : nil; + return [[NSError alloc] initWithDomain:domain code:code userInfo:userInfo]; +} + ++ (NSError *)fbInvalidArgumentErrorWithName:(NSString *)name value:(id)value message:(NSString *)message +{ + return [self fbInvalidArgumentErrorWithName:name value:value message:message underlyingError:nil]; +} + ++ (NSError *)fbInvalidArgumentErrorWithDomain:(NSErrorDomain)domain + name:(NSString *)name + value:(id)value + message:(NSString *)message +{ + return [self fbInvalidArgumentErrorWithDomain:domain + name:name + value:value + message:message + underlyingError:nil]; +} + ++ (NSError *)fbInvalidArgumentErrorWithName:(NSString *)name + value:(id)value + message:(NSString *)message + underlyingError:(NSError *)underlyingError +{ + return [self fbInvalidArgumentErrorWithDomain:FBSDKErrorDomain + name:name + value:value + message:message + underlyingError:underlyingError]; +} ++ (NSError *)fbInvalidArgumentErrorWithDomain:(NSErrorDomain)domain + name:(NSString *)name + value:(id)value + message:(NSString *)message + underlyingError:(NSError *)underlyingError +{ + if (!message) { + message = [[NSString alloc] initWithFormat:@"Invalid value for %@: %@", name, value]; + } + NSMutableDictionary *userInfo = [[NSMutableDictionary alloc] init]; + [FBSDKInternalUtility dictionary:userInfo setObject:name forKey:FBSDKErrorArgumentNameKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:value forKey:FBSDKErrorArgumentValueKey]; + return [self fbErrorWithDomain:domain + code:FBSDKErrorInvalidArgument + userInfo:userInfo + message:message + underlyingError:underlyingError]; +} + ++ (NSError *)fbInvalidCollectionErrorWithName:(NSString *)name + collection:(id)collection + item:(id)item + message:(NSString *)message +{ + return [self fbInvalidCollectionErrorWithName:name collection:collection item:item message:message underlyingError:nil]; +} + ++ (NSError *)fbInvalidCollectionErrorWithName:(NSString *)name + collection:(id)collection + item:(id)item + message:(NSString *)message + underlyingError:(NSError *)underlyingError +{ + if (!message) { + message = [[NSString alloc] initWithFormat:@"Invalid item (%@) found in collection for %@: %@", item, name, collection]; + } + NSMutableDictionary *userInfo = [[NSMutableDictionary alloc] init]; + [FBSDKInternalUtility dictionary:userInfo setObject:name forKey:FBSDKErrorArgumentNameKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:item forKey:FBSDKErrorArgumentValueKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:collection forKey:FBSDKErrorArgumentCollectionKey]; + return [self fbErrorWithCode:FBSDKErrorInvalidArgument + userInfo:userInfo + message:message + underlyingError:underlyingError]; +} + ++ (NSError *)fbRequiredArgumentErrorWithName:(NSString *)name message:(NSString *)message +{ + return [self fbRequiredArgumentErrorWithName:name message:message underlyingError:nil]; +} + ++ (NSError *)fbRequiredArgumentErrorWithDomain:(NSErrorDomain)domain + name:(NSString *)name + message:(NSString *)message +{ + if (!message) { + message = [[NSString alloc] initWithFormat:@"Value for %@ is required.", name]; + } + return [self fbInvalidArgumentErrorWithDomain:domain name:name value:nil message:message underlyingError:nil]; +} + ++ (NSError *)fbRequiredArgumentErrorWithName:(NSString *)name + message:(NSString *)message + underlyingError:(NSError *)underlyingError +{ + if (!message) { + message = [[NSString alloc] initWithFormat:@"Value for %@ is required.", name]; + } + return [self fbInvalidArgumentErrorWithName:name value:nil message:message underlyingError:underlyingError]; +} + ++ (NSError *)fbUnknownErrorWithMessage:(NSString *)message +{ + return [self fbErrorWithCode:FBSDKErrorUnknown + userInfo:nil + message:message + underlyingError:nil]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKImageDownloader.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKImageDownloader.h new file mode 100644 index 0000000..aa98cd2 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKImageDownloader.h @@ -0,0 +1,41 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import +#import + +/* + simple class to manage image downloads + + this class is not smart enough to dedupe identical requests in flight. + */ +@interface FBSDKImageDownloader : NSObject + ++ (instancetype)sharedInstance; + +/* + download an image or retrieve it from cache + @param url the url to download + @param ttl the amount of time (in seconds) that using a cached version is acceptable. + @param completion the callback with the image - for simplicity nil is returned rather than surfacing an error. + */ +- (void)downloadImageWithURL:(NSURL *)url ttl:(NSTimeInterval)ttl completion:(void(^)(UIImage* image))completion; + +- (void)removeAll; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKImageDownloader.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKImageDownloader.m new file mode 100644 index 0000000..5c9de88 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKImageDownloader.m @@ -0,0 +1,93 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKImageDownloader.h" + +static NSString *const kImageDirectory = @"fbsdkimages"; +static NSString *const kCachedResponseUserInfoKeyTimestamp = @"timestamp"; + +@implementation FBSDKImageDownloader { + NSURLCache *_urlCache; +} + ++ (instancetype)sharedInstance +{ + static FBSDKImageDownloader *instance; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + instance = [[FBSDKImageDownloader alloc] init]; + }); + return instance; +} + +- (instancetype)init +{ + if ((self = [super init])) { + _urlCache = [[NSURLCache alloc] initWithMemoryCapacity:1024*1024*8 + diskCapacity:1024*1024*100 + diskPath:kImageDirectory]; + } + return self; +} + +- (void)removeAll +{ + [_urlCache removeAllCachedResponses]; +} + +- (void)downloadImageWithURL:(NSURL *)url ttl:(NSTimeInterval)ttl completion:(void(^)(UIImage* image))completion +{ + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + NSCachedURLResponse *cachedResponse = [_urlCache cachedResponseForRequest:request]; + NSDate *modificationDate = cachedResponse.userInfo[kCachedResponseUserInfoKeyTimestamp]; + BOOL isExpired = ([[modificationDate dateByAddingTimeInterval:ttl] compare:[NSDate date]] == NSOrderedAscending); + + void (^completionWrapper)(NSCachedURLResponse *) = ^(NSCachedURLResponse *responseData){ + if (completion != NULL) { + UIImage *image = [UIImage imageWithData:responseData.data]; + completion(image); + } + }; + + if (cachedResponse == nil || isExpired) { + NSURLSession *session = [NSURLSession sharedSession]; + NSURLSessionDataTask *task = [session dataTaskWithRequest:request + completionHandler: + ^(NSData *data, NSURLResponse *response, NSError *error) { + if ([response isKindOfClass:[NSHTTPURLResponse class]] && + ((NSHTTPURLResponse *)response).statusCode == 200 && + error == nil && + data != nil) { + NSCachedURLResponse *responseToCache = + [[NSCachedURLResponse alloc] initWithResponse:response + data:data + userInfo:@{ kCachedResponseUserInfoKeyTimestamp : [NSDate date] } + storagePolicy:NSURLCacheStorageAllowed]; + [self->_urlCache storeCachedResponse:responseToCache forRequest:request]; + completionWrapper(responseToCache); + } else if (completion != NULL) { + completion(nil); + } + }]; + [task resume]; + } else { + completionWrapper(cachedResponse); + } +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility.h new file mode 100644 index 0000000..6a5e0f5 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility.h @@ -0,0 +1,374 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import +#import + +#define FBSDK_CANOPENURL_FACEBOOK @"fbauth2" +#define FBSDK_CANOPENURL_FBAPI @"fbapi" +#define FBSDK_CANOPENURL_MESSENGER @"fb-messenger-share-api" +#define FBSDK_CANOPENURL_MSQRD_PLAYER @"msqrdplayer" +#define FBSDK_CANOPENURL_SHARE_EXTENSION @"fbshareextension" + +typedef NS_ENUM(int32_t, FBSDKUIKitVersion) +{ + FBSDKUIKitVersion_6_0 = 0x0944, + FBSDKUIKitVersion_6_1 = 0x094C, + FBSDKUIKitVersion_7_0 = 0x0B57, + FBSDKUIKitVersion_7_1 = 0x0B77, + FBSDKUIKitVersion_8_0 = 0x0CF6, +}; + +@interface FBSDKInternalUtility : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + Constructs the scheme for apps that come to the current app through the bridge. + */ ++ (NSString *)appURLScheme; + +/** + Constructs an URL for the current app. + @param host The host for the URL. + @param path The path for the URL. + @param queryParameters The query parameters for the URL. This will be converted into a query string. + @param errorRef If an error occurs, upon return contains an NSError object that describes the problem. + @return The app URL. + */ ++ (NSURL *)appURLWithHost:(NSString *)host + path:(NSString *)path + queryParameters:(NSDictionary *)queryParameters + error:(NSError *__autoreleasing *)errorRef; + +/** + Parses an FB url's query params (and potentially fragment) into a dictionary. + @param url The FB url. + @return A dictionary with the key/value pairs. + */ ++ (NSDictionary *)dictionaryFromFBURL:(NSURL *)url; + +/** + Adds an object to an array if it is not nil. + @param array The array to add the object to. + @param object The object to add to the array. + */ ++ (void)array:(NSMutableArray *)array addObject:(id)object; + +/** + Returns bundle for returning localized strings + + We assume a convention of a bundle named FBSDKStrings.bundle, otherwise we + return the main bundle. +*/ ++ (NSBundle *)bundleForStrings; + +/** + Converts simple value types to the string equivalent for serializing to a request query or body. + @param value The value to be converted. + @return The value that may have been converted if able (otherwise the input param). + */ ++ (id)convertRequestValue:(id)value; + +/** + Gets the milliseconds since the Unix Epoch. + + Changes in the system clock will affect this value. + @return The number of milliseconds since the Unix Epoch. + */ ++ (uint64_t)currentTimeInMilliseconds; + +/** + Sets an object for a key in a dictionary if it is not nil. + @param dictionary The dictionary to set the value for. + @param object The value to set after serializing to JSON. + @param key The key to set the value for. + @param errorRef If an error occurs, upon return contains an NSError object that describes the problem. + @return NO if an error occurred while serializing the object, otherwise YES. + */ ++ (BOOL)dictionary:(NSMutableDictionary *)dictionary +setJSONStringForObject:(id)object + forKey:(id)key + error:(NSError *__autoreleasing *)errorRef; + +/** + Sets an object for a key in a dictionary if it is not nil. + @param dictionary The dictionary to set the value for. + @param object The value to set. + @param key The key to set the value for. + */ ++ (void)dictionary:(NSMutableDictionary *)dictionary setObject:(id)object forKey:(id)key; + +/** + Constructs a Facebook URL. + @param hostPrefix The prefix for the host, such as 'm', 'graph', etc. + @param path The path for the URL. This may or may not include a version. + @param queryParameters The query parameters for the URL. This will be converted into a query string. + @param errorRef If an error occurs, upon return contains an NSError object that describes the problem. + @return The Facebook URL. + */ ++ (NSURL *)facebookURLWithHostPrefix:(NSString *)hostPrefix + path:(NSString *)path + queryParameters:(NSDictionary *)queryParameters + error:(NSError *__autoreleasing *)errorRef; + +/** + Constructs a Facebook URL. + @param hostPrefix The prefix for the host, such as 'm', 'graph', etc. + @param path The path for the URL. This may or may not include a version. + @param queryParameters The query parameters for the URL. This will be converted into a query string. + @param defaultVersion A version to add to the URL if none is found in the path. + @param errorRef If an error occurs, upon return contains an NSError object that describes the problem. + @return The Facebook URL. + */ ++ (NSURL *)facebookURLWithHostPrefix:(NSString *)hostPrefix + path:(NSString *)path + queryParameters:(NSDictionary *)queryParameters + defaultVersion:(NSString *)defaultVersion + error:(NSError *__autoreleasing *)errorRef; + +/** + Tests whether the supplied URL is a valid URL for opening in the browser. + @param URL The URL to test. + @return YES if the URL refers to an http or https resource, otherwise NO. + */ ++ (BOOL)isBrowserURL:(NSURL *)URL; + +/** + Tests whether the supplied bundle identifier references a Facebook app. + @param bundleIdentifier The bundle identifier to test. + @return YES if the bundle identifier refers to a Facebook app, otherwise NO. + */ ++ (BOOL)isFacebookBundleIdentifier:(NSString *)bundleIdentifier; + +/** + Tests whether the operating system is at least the specified version. + @param version The version to test against. + @return YES if the operating system is greater than or equal to the specified version, otherwise NO. + */ ++ (BOOL)isOSRunTimeVersionAtLeast:(NSOperatingSystemVersion)version; + +/** + Tests whether the supplied bundle identifier references the Safari app. + @param bundleIdentifier The bundle identifier to test. + @return YES if the bundle identifier refers to the Safari app, otherwise NO. + */ ++ (BOOL)isSafariBundleIdentifier:(NSString *)bundleIdentifier; + +/** + Tests whether the UIKit version that the current app was linked to is at least the specified version. + @param version The version to test against. + @return YES if the linked UIKit version is greater than or equal to the specified version, otherwise NO. + */ ++ (BOOL)isUIKitLinkTimeVersionAtLeast:(FBSDKUIKitVersion)version; + +/** + Tests whether the UIKit version in the runtime is at least the specified version. + @param version The version to test against. + @return YES if the runtime UIKit version is greater than or equal to the specified version, otherwise NO. + */ ++ (BOOL)isUIKitRunTimeVersionAtLeast:(FBSDKUIKitVersion)version; + +/** + Converts an object into a JSON string. + @param object The object to convert to JSON. + @param errorRef If an error occurs, upon return contains an NSError object that describes the problem. + @param invalidObjectHandler Handles objects that are invalid, returning a replacement value or nil to ignore. + @return A JSON string or nil if the object cannot be converted to JSON. + */ ++ (NSString *)JSONStringForObject:(id)object + error:(NSError *__autoreleasing *)errorRef + invalidObjectHandler:(id(^)(id object, BOOL *stop))invalidObjectHandler; + +/** + Checks equality between 2 objects. + + Checks for pointer equality, nils, isEqual:. + @param object The first object to compare. + @param other The second object to compare. + @return YES if the objects are equal, otherwise NO. + */ ++ (BOOL)object:(id)object isEqualToObject:(id)other; + +/** + Converts a JSON string into an object + @param string The JSON string to convert. + @param errorRef If an error occurs, upon return contains an NSError object that describes the problem. + @return An NSDictionary, NSArray, NSString or NSNumber containing the object representation, or nil if the string + cannot be converted. + */ ++ (id)objectForJSONString:(NSString *)string error:(NSError *__autoreleasing *)errorRef; + +/** + The version of the operating system on which the process is executing. + */ ++ (NSOperatingSystemVersion)operatingSystemVersion; + +/** + Constructs a query string from a dictionary. + @param dictionary The dictionary with key/value pairs for the query string. + @param errorRef If an error occurs, upon return contains an NSError object that describes the problem. + @param invalidObjectHandler Handles objects that are invalid, returning a replacement value or nil to ignore. + @return Query string representation of the parameters. + */ ++ (NSString *)queryStringWithDictionary:(NSDictionary *)dictionary + error:(NSError *__autoreleasing *)errorRef + invalidObjectHandler:(id(^)(id object, BOOL *stop))invalidObjectHandler; + +/** + Tests whether the orientation should be manually adjusted for views outside of the root view controller. + + With the legacy layout the developer must worry about device orientation when working with views outside of + the window's root view controller and apply the correct rotation transform and/or swap a view's width and height + values. If the application was linked with UIKit on iOS 7 or earlier or the application is running on iOS 7 or earlier + then we need to use the legacy layout code. Otherwise if the application was linked with UIKit on iOS 8 or later and + the application is running on iOS 8 or later, UIKit handles all of the rotation complexity and the origin is always in + the top-left and no rotation transform is necessary. + @return YES if if the orientation must be manually adjusted, otherwise NO. + */ ++ (BOOL)shouldManuallyAdjustOrientation; + +/** + Constructs an NSURL. + @param scheme The scheme for the URL. + @param host The host for the URL. + @param path The path for the URL. + @param queryParameters The query parameters for the URL. This will be converted into a query string. + @param errorRef If an error occurs, upon return contains an NSError object that describes the problem. + @return The URL. + */ ++ (NSURL *)URLWithScheme:(NSString *)scheme + host:(NSString *)host + path:(NSString *)path + queryParameters:(NSDictionary *)queryParameters + error:(NSError *__autoreleasing *)errorRef; + +/** + * Deletes all the cookies in the NSHTTPCookieStorage for Facebook web dialogs + */ ++ (void)deleteFacebookCookies; + +/** + Extracts permissions from a response fetched from me/permissions + @param responseObject the response + @param grantedPermissions the set to add granted permissions to + @param declinedPermissions the set to add declined permissions to. + */ ++ (void)extractPermissionsFromResponse:(NSDictionary *)responseObject + grantedPermissions:(NSMutableSet *)grantedPermissions + declinedPermissions:(NSMutableSet *)declinedPermissions; + +/** + Registers a transient object so that it will not be deallocated until unregistered + @param object The transient object + */ ++ (void)registerTransientObject:(id)object; + +/** + Unregisters a transient object that was previously registered with registerTransientObject: + @param object The transient object + */ ++ (void)unregisterTransientObject:(__weak id)object; + +/** + validates that the app ID is non-nil, throws an NSException if nil. + */ ++ (void)validateAppID; + +/** + Validates that the client access token is non-nil, otherwise - throws an NSException otherwise. + Returns the composed client access token. + */ ++ (NSString *)validateRequiredClientAccessToken; + +/** + validates that the right URL schemes are registered, throws an NSException if not. + */ ++ (void)validateURLSchemes; + +/** + validates that Facebook reserved URL schemes are not registered, throws an NSException if they are. + */ ++ (void)validateFacebookReservedURLSchemes; + +/** + Attempts to find the first UIViewController in the view's responder chain. Returns nil if not found. + */ ++ (UIViewController *)viewControllerForView:(UIView *)view; + +/** + returns true if the url scheme is registered in the CFBundleURLTypes + */ ++ (BOOL)isRegisteredURLScheme:(NSString *)urlScheme; + +/** + returns the current key window + */ ++ (UIWindow *)findWindow; + +/** + returns currently displayed top view controller. + */ ++ (UIViewController *)topMostViewController; + +/** + Converts NSData to a hexadecimal UTF8 String. + */ ++ (NSString *)hexadecimalStringFromData:(NSData *)data; + +/* + Checks if the permission is a publish permission. + */ ++ (BOOL)isPublishPermission:(NSString *)permission; + +/* + Checks if the set of permissions are all read permissions. + */ ++ (BOOL)areAllPermissionsReadPermissions:(NSSet *)permissions; + +/* + Checks if the set of permissions are all publish permissions. + */ ++ (BOOL)areAllPermissionsPublishPermissions:(NSSet *)permissions; + +/* + Checks if the app is Unity. + */ ++ (BOOL)isUnity; + +#pragma mark - FB Apps Installed + ++ (BOOL)isFacebookAppInstalled; ++ (BOOL)isMessengerAppInstalled; ++ (BOOL)isMSQRDPlayerAppInstalled; ++ (void)checkRegisteredCanOpenURLScheme:(NSString *)urlScheme; ++ (BOOL)isRegisteredCanOpenURLScheme:(NSString *)urlScheme; + +#define FBSDKConditionalLog(condition, loggingBehavior, desc, ...) \ +{ \ + if (!(condition)) { \ + NSString *msg = [NSString stringWithFormat:(desc), ##__VA_ARGS__]; \ + [FBSDKLogger singleShotLogEntry:loggingBehavior logEntry:msg]; \ + } \ +} + +#define FB_BASE_URL @"facebook.com" + ++ (Class)resolveBoltsClassWithName:(NSString *)className; +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility.m new file mode 100644 index 0000000..71c2fe8 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility.m @@ -0,0 +1,789 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKInternalUtility.h" + +#import + +#import + +#import "FBSDKCoreKit+Internal.h" +#import "FBSDKError.h" +#import "FBSDKSettings+Internal.h" +#import "FBSDKSettings.h" +#import "FBSDKUtility.h" + +typedef NS_ENUM(NSUInteger, FBSDKInternalUtilityVersionMask) +{ + FBSDKInternalUtilityMajorVersionMask = 0xFFFF0000, + //FBSDKInternalUtilityMinorVersionMask = 0x0000FF00, // unused + //FBSDKInternalUtilityPatchVersionMask = 0x000000FF, // unused +}; + +typedef NS_ENUM(NSUInteger, FBSDKInternalUtilityVersionShift) +{ + FBSDKInternalUtilityMajorVersionShift = 16, + //FBSDKInternalUtilityMinorVersionShift = 8, // unused + //FBSDKInternalUtilityPatchVersionShift = 0, // unused +}; + +@implementation FBSDKInternalUtility + +#pragma mark - Class Methods + ++ (NSString *)appURLScheme +{ + NSString *appID = ([FBSDKSettings appID] ?: @""); + NSString *suffix = ([FBSDKSettings appURLSchemeSuffix] ?: @""); + return [[NSString alloc] initWithFormat: @"fb%@%@", appID, suffix]; +} + ++ (NSURL *)appURLWithHost:(NSString *)host + path:(NSString *)path + queryParameters:(NSDictionary *)queryParameters + error:(NSError *__autoreleasing *)errorRef +{ + return [self URLWithScheme:[self appURLScheme] + host:host + path:path + queryParameters:queryParameters + error:errorRef]; +} + ++ (NSDictionary *)dictionaryFromFBURL:(NSURL *)url +{ + // version 3.2.3 of the Facebook app encodes the parameters in the query but + // version 3.3 and above encode the parameters in the fragment; + // merge them together with fragment taking priority. + NSMutableDictionary *params = [NSMutableDictionary dictionary]; + [params addEntriesFromDictionary:[FBSDKUtility dictionaryWithQueryString:url.query]]; + + // Only get the params from the fragment if it has authorize as the host + if ([url.host isEqualToString:@"authorize"]) { + [params addEntriesFromDictionary:[FBSDKUtility dictionaryWithQueryString:url.fragment]]; + } + return params; +} + ++ (void)array:(NSMutableArray *)array addObject:(id)object +{ + if (object) { + [array addObject:object]; + } +} + ++ (NSBundle *)bundleForStrings +{ + static NSBundle *bundle; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + NSString *stringsBundlePath = [[NSBundle bundleForClass:[FBSDKApplicationDelegate class]] + pathForResource:@"FacebookSDKStrings" + ofType:@"bundle"]; + bundle = [NSBundle bundleWithPath:stringsBundlePath] ?: [NSBundle mainBundle]; + }); + return bundle; +} + ++ (id)convertRequestValue:(id)value +{ + if ([value isKindOfClass:[NSNumber class]]) { + value = ((NSNumber *)value).stringValue; + } else if ([value isKindOfClass:[NSURL class]]) { + value = ((NSURL *)value).absoluteString; + } + return value; +} + ++ (uint64_t)currentTimeInMilliseconds +{ + struct timeval time; + gettimeofday(&time, NULL); + return ((uint64_t)time.tv_sec * 1000) + (time.tv_usec / 1000); +} + ++ (BOOL)dictionary:(NSMutableDictionary *)dictionary +setJSONStringForObject:(id)object + forKey:(id)key + error:(NSError *__autoreleasing *)errorRef +{ + if (!object || !key) { + return YES; + } + NSString *JSONString = [self JSONStringForObject:object error:errorRef invalidObjectHandler:NULL]; + if (!JSONString) { + return NO; + } + [self dictionary:dictionary setObject:JSONString forKey:key]; + return YES; +} + ++ (void)dictionary:(NSMutableDictionary *)dictionary setObject:(id)object forKey:(id)key +{ + if (object && key) { + dictionary[key] = object; + } +} + ++ (void)extractPermissionsFromResponse:(NSDictionary *)responseObject + grantedPermissions:(NSMutableSet *)grantedPermissions + declinedPermissions:(NSMutableSet *)declinedPermissions +{ + NSArray *resultData = responseObject[@"data"]; + if (resultData.count > 0) { + for (NSDictionary *permissionsDictionary in resultData) { + NSString *permissionName = permissionsDictionary[@"permission"]; + NSString *status = permissionsDictionary[@"status"]; + + if ([status isEqualToString:@"granted"]) { + [grantedPermissions addObject:permissionName]; + } else if ([status isEqualToString:@"declined"]) { + [declinedPermissions addObject:permissionName]; + } + } + } +} + ++ (NSURL *)facebookURLWithHostPrefix:(NSString *)hostPrefix + path:(NSString *)path + queryParameters:(NSDictionary *)queryParameters + error:(NSError *__autoreleasing *)errorRef +{ + return [self facebookURLWithHostPrefix:hostPrefix + path:path + queryParameters:queryParameters + defaultVersion:nil + error:errorRef]; +} + ++ (NSURL *)facebookURLWithHostPrefix:(NSString *)hostPrefix + path:(NSString *)path + queryParameters:(NSDictionary *)queryParameters + defaultVersion:(NSString *)defaultVersion + error:(NSError *__autoreleasing *)errorRef +{ + if (hostPrefix.length && ![hostPrefix hasSuffix:@"."]) { + hostPrefix = [hostPrefix stringByAppendingString:@"."]; + } + + NSString *host = @"facebook.com"; + NSString *domainPart = [FBSDKSettings facebookDomainPart]; + if (domainPart.length) { + host = [[NSString alloc] initWithFormat:@"%@.%@", domainPart, host]; + } + host = [NSString stringWithFormat:@"%@%@", hostPrefix ?: @"", host ?: @""]; + + NSString *version = defaultVersion ?: [FBSDKSettings graphAPIVersion]; + if (version.length) { + version = [@"/" stringByAppendingString:version]; + } + + if (path.length) { + NSScanner *versionScanner = [[NSScanner alloc] initWithString:path]; + if ([versionScanner scanString:@"/v" intoString:NULL] && + [versionScanner scanInteger:NULL] && + [versionScanner scanString:@"." intoString:NULL] && + [versionScanner scanInteger:NULL]) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:[NSString stringWithFormat:@"Invalid Graph API version:%@, assuming %@ instead", + version, + [FBSDKSettings graphAPIVersion]]]; + version = nil; + } + if (![path hasPrefix:@"/"]) { + path = [@"/" stringByAppendingString:path]; + } + } + path = [[NSString alloc] initWithFormat:@"%@%@", version ?: @"", path ?: @""]; + + return [self URLWithScheme:@"https" + host:host + path:path + queryParameters:queryParameters + error:errorRef]; +} + ++ (BOOL)isBrowserURL:(NSURL *)URL +{ + NSString *scheme = URL.scheme.lowercaseString; + return ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"]); +} + ++ (BOOL)isFacebookBundleIdentifier:(NSString *)bundleIdentifier +{ + return ([bundleIdentifier hasPrefix:@"com.facebook."] || + [bundleIdentifier hasPrefix:@".com.facebook."]); +} + ++ (BOOL)isOSRunTimeVersionAtLeast:(NSOperatingSystemVersion)version +{ + return ([self _compareOperatingSystemVersion:[self operatingSystemVersion] toVersion:version] != NSOrderedAscending); +} + ++ (BOOL)isSafariBundleIdentifier:(NSString *)bundleIdentifier +{ + return ([bundleIdentifier isEqualToString:@"com.apple.mobilesafari"] || + [bundleIdentifier isEqualToString:@"com.apple.SafariViewService"]); +} + ++ (BOOL)isUIKitLinkTimeVersionAtLeast:(FBSDKUIKitVersion)version +{ + static int32_t linkTimeMajorVersion; + static dispatch_once_t getVersionOnce; + dispatch_once(&getVersionOnce, ^{ + int32_t linkTimeVersion = NSVersionOfLinkTimeLibrary("UIKit"); + linkTimeMajorVersion = [self getMajorVersionFromFullLibraryVersion:linkTimeVersion]; + }); + return (version <= linkTimeMajorVersion); +} + ++ (BOOL)isUIKitRunTimeVersionAtLeast:(FBSDKUIKitVersion)version +{ + static int32_t runTimeMajorVersion; + static dispatch_once_t getVersionOnce; + dispatch_once(&getVersionOnce, ^{ + int32_t runTimeVersion = NSVersionOfRunTimeLibrary("UIKit"); + runTimeMajorVersion = [self getMajorVersionFromFullLibraryVersion:runTimeVersion]; + }); + return (version <= runTimeMajorVersion); +} + ++ (int32_t)getMajorVersionFromFullLibraryVersion:(int32_t)version +{ + // Negative values returned by NSVersionOfRunTimeLibrary/NSVersionOfLinkTimeLibrary + // are still valid version numbers, as long as it's not -1. + // After bitshift by 16, the negatives become valid positive major version number. + // We ran into this first time with iOS 12. + if (version != -1) { + return ((version & FBSDKInternalUtilityMajorVersionMask) >> FBSDKInternalUtilityMajorVersionShift); + } else { + return 0; + } +} + ++ (NSString *)JSONStringForObject:(id)object + error:(NSError *__autoreleasing *)errorRef + invalidObjectHandler:(id(^)(id object, BOOL *stop))invalidObjectHandler +{ + if (invalidObjectHandler || ![NSJSONSerialization isValidJSONObject:object]) { + object = [self _convertObjectToJSONObject:object invalidObjectHandler:invalidObjectHandler stop:NULL]; + if (![NSJSONSerialization isValidJSONObject:object]) { + if (errorRef != NULL) { + *errorRef = [NSError fbInvalidArgumentErrorWithName:@"object" + value:object + message:@"Invalid object for JSON serialization."]; + } + return nil; + } + } + NSData *data = [NSJSONSerialization dataWithJSONObject:object options:0 error:errorRef]; + if (!data) { + return nil; + } + return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; +} + ++ (BOOL)object:(id)object isEqualToObject:(id)other; +{ + if (object == other) { + return YES; + } + if (!object || !other) { + return NO; + } + return [object isEqual:other]; +} + ++ (id)objectForJSONString:(NSString *)string error:(NSError *__autoreleasing *)errorRef +{ + NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding]; + if (!data) { + if (errorRef != NULL) { + *errorRef = nil; + } + return nil; + } + return [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:errorRef]; +} + ++ (NSOperatingSystemVersion)operatingSystemVersion +{ + static NSOperatingSystemVersion operatingSystemVersion = { + .majorVersion = 0, + .minorVersion = 0, + .patchVersion = 0, + }; + static dispatch_once_t getVersionOnce; + dispatch_once(&getVersionOnce, ^{ + if ([NSProcessInfo instancesRespondToSelector:@selector(operatingSystemVersion)]) { + operatingSystemVersion = [NSProcessInfo processInfo].operatingSystemVersion; + } else { + NSArray *components = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."]; + switch (components.count) { + default: + case 3: + operatingSystemVersion.patchVersion = [components[2] integerValue]; + // fall through + case 2: + operatingSystemVersion.minorVersion = [components[1] integerValue]; + // fall through + case 1: + operatingSystemVersion.majorVersion = [components[0] integerValue]; + break; + case 0: + operatingSystemVersion.majorVersion = ([self isUIKitLinkTimeVersionAtLeast:FBSDKUIKitVersion_7_0] ? 7 : 6); + break; + } + } + }); + return operatingSystemVersion; +} + ++ (NSString *)queryStringWithDictionary:(NSDictionary *)dictionary + error:(NSError *__autoreleasing *)errorRef + invalidObjectHandler:(id(^)(id object, BOOL *stop))invalidObjectHandler +{ + NSMutableString *queryString = [[NSMutableString alloc] init]; + __block BOOL hasParameters = NO; + if (dictionary) { + NSMutableArray *keys = [dictionary.allKeys mutableCopy]; + // remove non-string keys, as they are not valid + [keys filterUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) { + return [evaluatedObject isKindOfClass:[NSString class]]; + }]]; + // sort the keys so that the query string order is deterministic + [keys sortUsingSelector:@selector(compare:)]; + BOOL stop = NO; + for (NSString *key in keys) { + id value = [self convertRequestValue:dictionary[key]]; + if ([value isKindOfClass:[NSString class]]) { + value = [FBSDKUtility URLEncode:value]; + } + if (invalidObjectHandler && ![value isKindOfClass:[NSString class]]) { + value = invalidObjectHandler(value, &stop); + if (stop) { + break; + } + } + if (value) { + if (hasParameters) { + [queryString appendString:@"&"]; + } + [queryString appendFormat:@"%@=%@", key, value]; + hasParameters = YES; + } + } + } + if (errorRef != NULL) { + *errorRef = nil; + } + return (queryString.length ? [queryString copy] : nil); +} + ++ (BOOL)shouldManuallyAdjustOrientation +{ + return (![self isUIKitLinkTimeVersionAtLeast:FBSDKUIKitVersion_8_0] || + ![self isUIKitRunTimeVersionAtLeast:FBSDKUIKitVersion_8_0]); +} + ++ (NSURL *)URLWithScheme:(NSString *)scheme + host:(NSString *)host + path:(NSString *)path + queryParameters:(NSDictionary *)queryParameters + error:(NSError *__autoreleasing *)errorRef +{ + if (![path hasPrefix:@"/"]) { + path = [@"/" stringByAppendingString:path ?: @""]; + } + + NSString *queryString = nil; + if (queryParameters.count) { + NSError *queryStringError; + queryString = [@"?" stringByAppendingString:[FBSDKUtility queryStringWithDictionary:queryParameters + error:&queryStringError]]; + if (!queryString) { + if (errorRef != NULL) { + *errorRef = [NSError fbInvalidArgumentErrorWithName:@"queryParameters" + value:queryParameters + message:nil + underlyingError:queryStringError]; + } + return nil; + } + } + + NSURL *URL = [[NSURL alloc] initWithString:[NSString stringWithFormat: + @"%@://%@%@%@", + scheme ?: @"", + host ?: @"", + path ?: @"", + queryString ?: @""]]; + if (errorRef != NULL) { + if (URL) { + *errorRef = nil; + } else { + *errorRef = [NSError fbUnknownErrorWithMessage:@"Unknown error building URL."]; + } + } + return URL; +} + ++ (void)deleteFacebookCookies +{ + NSHTTPCookieStorage *cookies = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + NSArray *facebookCookies = [cookies cookiesForURL:[self facebookURLWithHostPrefix:@"m." + path:@"/dialog/" + queryParameters:nil + error:NULL]]; + + for (NSHTTPCookie *cookie in facebookCookies) { + [cookies deleteCookie:cookie]; + } +} + +static NSMapTable *_transientObjects; + ++ (void)registerTransientObject:(id)object +{ + NSAssert([NSThread isMainThread], @"Must be called from the main thread!"); + if (!_transientObjects) { + _transientObjects = [[NSMapTable alloc] init]; + } + NSUInteger count = ((NSNumber *)[_transientObjects objectForKey:object]).unsignedIntegerValue; + [_transientObjects setObject:@(count + 1) forKey:object]; +} + ++ (void)unregisterTransientObject:(__weak id)object +{ + if (!object) { + return; + } + NSAssert([NSThread isMainThread], @"Must be called from the main thread!"); + NSUInteger count = ((NSNumber *)[_transientObjects objectForKey:object]).unsignedIntegerValue; + if (count == 1) { + [_transientObjects removeObjectForKey:object]; + } else if (count != 0) { + [_transientObjects setObject:@(count - 1) forKey:object]; + } else { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"unregisterTransientObject:%@ count is 0. This may indicate a bug in the FBSDK. Please" + " file a report to developers.facebook.com/bugs if you encounter any problems. Thanks!", [object class]]; + } +} + ++ (UIViewController *)viewControllerForView:(UIView *)view +{ + UIResponder *responder = view.nextResponder; + while (responder) { + if ([responder isKindOfClass:[UIViewController class]]) { + return (UIViewController *)responder; + } + responder = responder.nextResponder; + } + return nil; +} + +#pragma mark - FB Apps Installed + ++ (BOOL)isFacebookAppInstalled +{ + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + [FBSDKInternalUtility checkRegisteredCanOpenURLScheme:FBSDK_CANOPENURL_FACEBOOK]; + }); + return [self _canOpenURLScheme:FBSDK_CANOPENURL_FACEBOOK]; +} + ++ (BOOL)isMessengerAppInstalled +{ + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + [FBSDKInternalUtility checkRegisteredCanOpenURLScheme:FBSDK_CANOPENURL_MESSENGER]; + }); + return [self _canOpenURLScheme:FBSDK_CANOPENURL_MESSENGER]; +} + ++ (BOOL)isMSQRDPlayerAppInstalled +{ + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + [FBSDKInternalUtility checkRegisteredCanOpenURLScheme:FBSDK_CANOPENURL_MSQRD_PLAYER]; + }); + return [self _canOpenURLScheme:FBSDK_CANOPENURL_MSQRD_PLAYER]; +} + +#pragma mark - Helper Methods + ++ (NSComparisonResult)_compareOperatingSystemVersion:(NSOperatingSystemVersion)version1 + toVersion:(NSOperatingSystemVersion)version2 +{ + if (version1.majorVersion < version2.majorVersion) { + return NSOrderedAscending; + } else if (version1.majorVersion > version2.majorVersion) { + return NSOrderedDescending; + } else if (version1.minorVersion < version2.minorVersion) { + return NSOrderedAscending; + } else if (version1.minorVersion > version2.minorVersion) { + return NSOrderedDescending; + } else if (version1.patchVersion < version2.patchVersion) { + return NSOrderedAscending; + } else if (version1.patchVersion > version2.patchVersion) { + return NSOrderedDescending; + } else { + return NSOrderedSame; + } +} + ++ (id)_convertObjectToJSONObject:(id)object + invalidObjectHandler:(id(^)(id object, BOOL *stop))invalidObjectHandler + stop:(BOOL *)stopRef +{ + __block BOOL stop = NO; + if ([object isKindOfClass:[NSString class]] || [object isKindOfClass:[NSNumber class]]) { + // good to go, keep the object + } else if ([object isKindOfClass:[NSURL class]]) { + object = ((NSURL *)object).absoluteString; + } else if ([object isKindOfClass:[NSDictionary class]]) { + NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] init]; + [(NSDictionary *)object enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *dictionaryStop) { + [self dictionary:dictionary + setObject:[self _convertObjectToJSONObject:obj invalidObjectHandler:invalidObjectHandler stop:&stop] + forKey:[FBSDKTypeUtility stringValue:key]]; + if (stop) { + *dictionaryStop = YES; + } + }]; + object = dictionary; + } else if ([object isKindOfClass:[NSArray class]]) { + NSMutableArray *array = [[NSMutableArray alloc] init]; + for (id obj in (NSArray *)object) { + id convertedObj = [self _convertObjectToJSONObject:obj invalidObjectHandler:invalidObjectHandler stop:&stop]; + [self array:array addObject:convertedObj]; + if (stop) { + break; + } + } + object = array; + } else { + object = invalidObjectHandler(object, stopRef); + } + if (stopRef != NULL) { + *stopRef = stop; + } + return object; +} + ++ (BOOL)_canOpenURLScheme:(NSString *)scheme +{ + NSURLComponents *components = [[NSURLComponents alloc] init]; + components.scheme = scheme; + components.path = @"/"; + return [[UIApplication sharedApplication] canOpenURL:components.URL]; +} + ++ (void)validateAppID +{ + if (![FBSDKSettings appID]) { + NSString *reason = @"App ID not found. Add a string value with your app ID for the key " + @"FacebookAppID to the Info.plist or call [FBSDKSettings setAppID:]."; + @throw [NSException exceptionWithName:@"InvalidOperationException" reason:reason userInfo:nil]; + } +} + ++ (NSString *)validateRequiredClientAccessToken { + if (![FBSDKSettings clientToken]) { + NSString *reason = @"ClientToken is required to be set for this operation. " + @"Set the FacebookClientToken in the Info.plist or call [FBSDKSettings setClientToken:]. " + @"You can find your client token in your App Settings -> Advanced."; + @throw [NSException exceptionWithName:@"InvalidOperationException" reason:reason userInfo:nil]; + } + return [NSString stringWithFormat:@"%@|%@", [FBSDKSettings appID], [FBSDKSettings clientToken]]; +} + ++ (void)validateURLSchemes +{ + [self validateAppID]; + NSString *defaultUrlScheme = [NSString stringWithFormat:@"fb%@%@", [FBSDKSettings appID], [FBSDKSettings appURLSchemeSuffix] ?: @""]; + if (![self isRegisteredURLScheme:defaultUrlScheme]) { + NSString *reason = [NSString stringWithFormat:@"%@ is not registered as a URL scheme. Please add it in your Info.plist", defaultUrlScheme]; + @throw [NSException exceptionWithName:@"InvalidOperationException" reason:reason userInfo:nil]; + } +} + ++ (void)validateFacebookReservedURLSchemes +{ + for (NSString * fbUrlScheme in @[FBSDK_CANOPENURL_FACEBOOK, FBSDK_CANOPENURL_MESSENGER, FBSDK_CANOPENURL_FBAPI, FBSDK_CANOPENURL_SHARE_EXTENSION]) { + if ([self isRegisteredURLScheme:fbUrlScheme]) { + NSString *reason = [NSString stringWithFormat:@"%@ is registered as a URL scheme. Please move the entry from CFBundleURLSchemes in your Info.plist to LSApplicationQueriesSchemes. If you are trying to resolve \"canOpenURL: failed\" warnings, those only indicate that the Facebook app is not installed on your device or simulator and can be ignored.", fbUrlScheme]; + @throw [NSException exceptionWithName:@"InvalidOperationException" reason:reason userInfo:nil]; + } + } +} + ++ (UIWindow *)findWindow +{ + UIWindow *window = [UIApplication sharedApplication].keyWindow; + if (window == nil || window.windowLevel != UIWindowLevelNormal) { + for (window in [UIApplication sharedApplication].windows) { + if (window.windowLevel == UIWindowLevelNormal) { + break; + } + } + } + if (window == nil) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"Unable to find a valid UIWindow", nil]; + } + return window; +} + ++ (UIViewController *)topMostViewController +{ + UIWindow *keyWindow = [self findWindow]; + // SDK expects a key window at this point, if it is not, make it one + if (keyWindow != nil && !keyWindow.isKeyWindow) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"Unable to obtain a key window, marking %@ as keyWindow", keyWindow.description]; + [keyWindow makeKeyWindow]; + } + + UIViewController *topController = keyWindow.rootViewController; + while (topController.presentedViewController) { + topController = topController.presentedViewController; + } + return topController; +} + ++ (NSString *)hexadecimalStringFromData:(NSData *)data +{ + NSUInteger dataLength = data.length; + if (dataLength == 0) { + return nil; + } + + const unsigned char *dataBuffer = data.bytes; + NSMutableString *hexString = [NSMutableString stringWithCapacity:(dataLength * 2)]; + for (int i = 0; i < dataLength; ++i) { + [hexString appendFormat:@"%02x", dataBuffer[i]]; + } + return [hexString copy]; +} + ++ (BOOL)isRegisteredURLScheme:(NSString *)urlScheme { + static dispatch_once_t fetchBundleOnce; + static NSArray *urlTypes = nil; + + dispatch_once(&fetchBundleOnce, ^{ + urlTypes = [[NSBundle mainBundle].infoDictionary valueForKey:@"CFBundleURLTypes"]; + }); + for (NSDictionary *urlType in urlTypes) { + NSArray *urlSchemes = [urlType valueForKey:@"CFBundleURLSchemes"]; + if ([urlSchemes containsObject:urlScheme]) { + return YES; + } + } + return NO; +} + ++ (void)checkRegisteredCanOpenURLScheme:(NSString *)urlScheme +{ + static dispatch_once_t initCheckedSchemesOnce; + static NSMutableSet *checkedSchemes = nil; + + dispatch_once(&initCheckedSchemesOnce, ^{ + checkedSchemes = [NSMutableSet set]; + }); + + @synchronized(self) { + if ([checkedSchemes containsObject:urlScheme]) { + return; + } else { + [checkedSchemes addObject:urlScheme]; + } + } + + if (![self isRegisteredCanOpenURLScheme:urlScheme]){ + NSString *reason = [NSString stringWithFormat:@"%@ is missing from your Info.plist under LSApplicationQueriesSchemes and is required for iOS 9.0", urlScheme]; + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors logEntry:reason]; + } +} + ++ (BOOL)isRegisteredCanOpenURLScheme:(NSString *)urlScheme +{ + static dispatch_once_t fetchBundleOnce; + static NSArray *schemes = nil; + + dispatch_once(&fetchBundleOnce, ^{ + schemes = [[NSBundle mainBundle].infoDictionary valueForKey:@"LSApplicationQueriesSchemes"]; + }); + + return [schemes containsObject:urlScheme]; +} + ++ (BOOL)isPublishPermission:(NSString *)permission +{ + return [permission hasPrefix:@"publish"] || + [permission hasPrefix:@"manage"] || + [permission isEqualToString:@"ads_management"] || + [permission isEqualToString:@"create_event"] || + [permission isEqualToString:@"rsvp_event"]; +} + ++ (BOOL)areAllPermissionsReadPermissions:(NSSet *)permissions +{ + for (NSString *permission in permissions) { + if ([[self class] isPublishPermission:permission]) { + return NO; + } + } + return YES; +} + ++ (BOOL)areAllPermissionsPublishPermissions:(NSSet *)permissions +{ + for (NSString *permission in permissions) { + if (![[self class] isPublishPermission:permission]) { + return NO; + } + } + return YES; +} + ++ (Class)resolveBoltsClassWithName:(NSString *)className; +{ + Class clazz = NSClassFromString(className); + if (clazz == nil) { + NSString *message = [NSString stringWithFormat:@"Unable to load class %@. Did you link Bolts.framework?", className]; + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:message + userInfo:nil]; + } + + return clazz; +} + ++ (BOOL)isUnity +{ + NSString *userAgentSuffix = [FBSDKSettings userAgentSuffix]; + if (userAgentSuffix != nil && [userAgentSuffix rangeOfString:@"Unity"].location != NSNotFound) { + return YES; + } + return NO; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKLogger.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKLogger.h new file mode 100644 index 0000000..1672a8b --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKLogger.h @@ -0,0 +1,86 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +/** + + Simple logging utility for conditionally logging strings and then emitting them + via NSLog(). + + @unsorted + */ +@interface FBSDKLogger : NSObject + +// Access current accumulated contents of the logger. +@property (copy, nonatomic) NSString *contents; + +// Each FBSDKLogger gets a unique serial number to allow the client to log these numbers and, for instance, correlation of Request/Response +@property (nonatomic, readonly) NSUInteger loggerSerialNumber; + +// The logging behavior of this logger. See the FB_LOG_BEHAVIOR* constants in FBSession.h +@property (copy, nonatomic, readonly) NSString *loggingBehavior; + +// Is the current logger instance active, based on its loggingBehavior? +@property (nonatomic, readonly) BOOL isActive; + +// +// Instance methods +// + +// Create with specified logging behavior +- (instancetype)initWithLoggingBehavior:(NSString *)loggingBehavior; + +// Append string, or key/value pair +- (void)appendString:(NSString *)string; +- (void)appendFormat:(NSString *)formatString, ... NS_FORMAT_FUNCTION(1,2); +- (void)appendKey:(NSString *)key value:(NSString *)value; + +// Emit log, clearing out the logger contents. +- (void)emitToNSLog; + +// +// Class methods +// + +// +// Return a globally unique serial number to be used for correlating multiple output from the same logger. +// ++ (NSUInteger)generateSerialNumber; + +// Simple helper to write a single log entry, based upon whether the behavior matches a specified on. ++ (void)singleShotLogEntry:(NSString *)loggingBehavior + logEntry:(NSString *)logEntry; + ++ (void)singleShotLogEntry:(NSString *)loggingBehavior + formatString:(NSString *)formatString, ... NS_FORMAT_FUNCTION(2,3); + ++ (void)singleShotLogEntry:(NSString *)loggingBehavior + timestampTag:(NSObject *)timestampTag + formatString:(NSString *)formatString, ... NS_FORMAT_FUNCTION(3,4); + +// Register a timestamp label with the "current" time, to then be retrieved by singleShotLogEntry +// to include a duration. ++ (void)registerCurrentTime:(NSString *)loggingBehavior + withTag:(NSObject *)timestampTag; + +// When logging strings, replace all instances of 'replace' with instances of 'replaceWith'. ++ (void)registerStringToReplace:(NSString *)replace + replaceWith:(NSString *)replaceWith; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKLogger.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKLogger.m new file mode 100644 index 0000000..6b638fb --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKLogger.m @@ -0,0 +1,218 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLogger.h" + +#import "FBSDKInternalUtility.h" +#import "FBSDKSettings+Internal.h" + +static NSUInteger g_serialNumberCounter = 1111; +static NSMutableDictionary *g_stringsToReplace = nil; +static NSMutableDictionary *g_startTimesWithTags = nil; + +@interface FBSDKLogger () + +@property (nonatomic, strong, readonly) NSMutableString *internalContents; + +@end + +@implementation FBSDKLogger + +// Lifetime + +- (instancetype)initWithLoggingBehavior:(NSString *)loggingBehavior +{ + if ((self = [super init])) { + _isActive = [FBSDKSettings.loggingBehaviors containsObject:loggingBehavior]; + _loggingBehavior = loggingBehavior; + if (_isActive) { + _internalContents = [[NSMutableString alloc] init]; + _loggerSerialNumber = [FBSDKLogger generateSerialNumber]; + } + } + + return self; +} + +// Public properties + +- (NSString *)contents +{ + return _internalContents; +} + +- (void)setContents:(NSString *)contents +{ + if (_isActive) { + _internalContents = [NSMutableString stringWithString:contents]; + } +} + +// Public instance methods + +- (void)appendString:(NSString *)string +{ + if (_isActive) { + [_internalContents appendString:string]; + } +} + +- (void)appendFormat:(NSString *)formatString, ... +{ + if (_isActive) { + va_list vaArguments; + va_start(vaArguments, formatString); + NSString *logString = [[NSString alloc] initWithFormat:formatString arguments:vaArguments]; + va_end(vaArguments); + + [self appendString:logString]; + } +} + + +- (void)appendKey:(NSString *)key value:(NSString *)value +{ + if (_isActive && value.length) { + [_internalContents appendFormat:@" %@:\t%@\n", key, value]; + } +} + +- (void)emitToNSLog +{ + if (_isActive) { + + for (NSString *key in [g_stringsToReplace keyEnumerator]) { + [_internalContents replaceOccurrencesOfString:key + withString:g_stringsToReplace[key] + options:NSLiteralSearch + range:NSMakeRange(0, _internalContents.length)]; + } + + // Xcode 4.4 hangs on extremely long NSLog output (http://openradar.appspot.com/11972490). Truncate if needed. + const int MAX_LOG_STRING_LENGTH = 10000; + NSString *logString = _internalContents; + if (_internalContents.length > MAX_LOG_STRING_LENGTH) { + logString = [NSString stringWithFormat:@"TRUNCATED: %@", [_internalContents substringToIndex:MAX_LOG_STRING_LENGTH]]; + } + NSLog(@"FBSDKLog: %@", logString); + + [_internalContents setString:@""]; + } +} + +// Public static methods + ++ (NSUInteger)generateSerialNumber +{ + return g_serialNumberCounter++; +} + ++ (void)singleShotLogEntry:(NSString *)loggingBehavior + logEntry:(NSString *)logEntry { + if ([FBSDKSettings.loggingBehaviors containsObject:loggingBehavior]) { + FBSDKLogger *logger = [[FBSDKLogger alloc] initWithLoggingBehavior:loggingBehavior]; + [logger appendString:logEntry]; + [logger emitToNSLog]; + } +} + ++ (void)singleShotLogEntry:(NSString *)loggingBehavior + formatString:(NSString *)formatString, ... { + + if ([FBSDKSettings.loggingBehaviors containsObject:loggingBehavior]) { + va_list vaArguments; + va_start(vaArguments, formatString); + NSString *logString = [[NSString alloc] initWithFormat:formatString arguments:vaArguments]; + va_end(vaArguments); + + [self singleShotLogEntry:loggingBehavior logEntry:logString]; + } +} + + ++ (void)singleShotLogEntry:(NSString *)loggingBehavior + timestampTag:(NSObject *)timestampTag + formatString:(NSString *)formatString, ... { + + if ([FBSDKSettings.loggingBehaviors containsObject:loggingBehavior]) { + va_list vaArguments; + va_start(vaArguments, formatString); + NSString *logString = [[NSString alloc] initWithFormat:formatString arguments:vaArguments]; + va_end(vaArguments); + + // Start time of this "timestampTag" is stashed in the dictionary. + // Treat the incoming object tag simply as an address, since it's only used to identify during lifetime. If + // we send in as an object, the dictionary will try to copy it. + NSNumber *tagAsNumber = @((unsigned long)(__bridge void *)timestampTag); + NSNumber *startTimeNumber = g_startTimesWithTags[tagAsNumber]; + + // Only log if there's been an associated start time. + if (startTimeNumber) { + uint64_t elapsed = [FBSDKInternalUtility currentTimeInMilliseconds] - startTimeNumber.unsignedLongLongValue; + [g_startTimesWithTags removeObjectForKey:tagAsNumber]; // served its purpose, remove + + // Log string is appended with "%d msec", with nothing intervening. This gives the most control to the caller. + logString = [NSString stringWithFormat:@"%@%llu msec", logString, elapsed]; + + [self singleShotLogEntry:loggingBehavior logEntry:logString]; + } + } +} + ++ (void)registerCurrentTime:(NSString *)loggingBehavior + withTag:(NSObject *)timestampTag { + + if ([FBSDKSettings.loggingBehaviors containsObject:loggingBehavior]) { + + if (!g_startTimesWithTags) { + g_startTimesWithTags = [[NSMutableDictionary alloc] init]; + } + + if (g_startTimesWithTags.count >= 1000) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors logEntry: + @"Unexpectedly large number of outstanding perf logging start times, something is likely wrong."]; + } + + uint64_t currTime = [FBSDKInternalUtility currentTimeInMilliseconds]; + + // Treat the incoming object tag simply as an address, since it's only used to identify during lifetime. If + // we send in as an object, the dictionary will try to copy it. + unsigned long tagAsNumber = (unsigned long)(__bridge void *)timestampTag; + g_startTimesWithTags[@(tagAsNumber)] = @(currTime); + } +} + + ++ (void)registerStringToReplace:(NSString *)replace + replaceWith:(NSString *)replaceWith { + + // Strings sent in here never get cleaned up, but that's OK, don't ever expect too many. + + if (FBSDKSettings.loggingBehaviors.count > 0) { // otherwise there's no logging. + + if (!g_stringsToReplace) { + g_stringsToReplace = [[NSMutableDictionary alloc] init]; + } + + [g_stringsToReplace setValue:replaceWith forKey:replace]; + } +} + + + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMath.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMath.h new file mode 100644 index 0000000..5414e38 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMath.h @@ -0,0 +1,41 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import +#import + +@interface FBSDKMath : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + ++ (CGPoint)ceilForPoint:(CGPoint)value; ++ (CGSize)ceilForSize:(CGSize)value; ++ (CGPoint)floorForPoint:(CGPoint)value; ++ (CGSize)floorForSize:(CGSize)value; ++ (NSUInteger)hashWithCGFloat:(CGFloat)value; ++ (NSUInteger)hashWithCString:(const char *)value; ++ (NSUInteger)hashWithDouble:(double)value; ++ (NSUInteger)hashWithFloat:(float)value; ++ (NSUInteger)hashWithInteger:(NSUInteger)value; ++ (NSUInteger)hashWithInteger:(NSUInteger)value1 andInteger:(NSUInteger)value2; ++ (NSUInteger)hashWithIntegerArray:(NSUInteger *)values count:(NSUInteger)count; ++ (NSUInteger)hashWithLong:(unsigned long long)value; ++ (NSUInteger)hashWithPointer:(const void *)value; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMath.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMath.m new file mode 100644 index 0000000..302e80b --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMath.m @@ -0,0 +1,149 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +// +// Based on Thomas Wang 32/64 bit mix hash +// http://www.concentric.net/~Ttwang/tech/inthash.htm +// + +#import "FBSDKMath.h" + +#import + +@implementation FBSDKMath + +#pragma mark - Class Methods + ++ (CGPoint)ceilForPoint:(CGPoint)value +{ + return CGPointMake(ceilf(value.x), ceilf(value.x)); +} + ++ (CGSize)ceilForSize:(CGSize)value +{ + return CGSizeMake(ceilf(value.width), ceilf(value.height)); +} + ++ (CGPoint)floorForPoint:(CGPoint)value +{ + return CGPointMake(floorf(value.x), floorf(value.y)); +} + ++ (CGSize)floorForSize:(CGSize)value +{ + return CGSizeMake(floorf(value.width), floorf(value.height)); +} + ++ (NSUInteger)hashWithCGFloat:(CGFloat)value +{ +#if CGFLOAT_IS_DOUBLE + return [self hashWithDouble:value]; +#else + return [self hashWithFloat:value]; +#endif +} + ++ (NSUInteger)hashWithCString:(const char *)value +{ + // FNV-1a hash. + NSUInteger hash = sizeof(NSUInteger) == 4 ? 2166136261U : 14695981039346656037U; + while (*value) { + hash ^= *value++; + hash *= sizeof(NSUInteger) == 4 ? 16777619 : 1099511628211; + } + return hash; +} + ++ (NSUInteger)hashWithDouble:(double)value +{ + assert(sizeof(double) == sizeof(uint64_t)); // Size of double must be 8 bytes + union { + double key; + uint64_t bits; + } u; + u.key = value; + return [self hashWithLong:u.bits]; +} + ++ (NSUInteger)hashWithFloat:(float)value +{ + assert(sizeof(float) == sizeof(uint32_t)); // Size of float must be 4 bytes + union { + float key; + uint32_t bits; + } u; + u.key = value; + return [self hashWithInteger:u.bits]; +} + ++ (NSUInteger)hashWithInteger:(NSUInteger)value +{ + return [self hashWithPointer:(void *)value]; +} + ++ (NSUInteger)hashWithInteger:(NSUInteger)value1 andInteger:(NSUInteger)value2 +{ + return [self hashWithLong:(((unsigned long long)value1) << 32 | value2)]; +} + ++ (NSUInteger)hashWithIntegerArray:(NSUInteger *)values count:(NSUInteger)count +{ + if (count == 0) { + return 0; + } + NSUInteger hash = values[0]; + for (NSUInteger i = 1; i < count; ++i) { + hash = [self hashWithInteger:hash andInteger:values[i]]; + } + return hash; +} + ++ (NSUInteger)hashWithLong:(unsigned long long)value +{ + value = (~value) + (value << 18); // key = (key << 18) - key - 1; + value ^= (value >> 31); + value *= 21; // key = (key + (key << 2)) + (key << 4); + value ^= (value >> 11); + value += (value << 6); + value ^= (value >> 22); + return (NSUInteger)value; +} + ++ (NSUInteger)hashWithPointer:(const void *)value +{ + NSUInteger hash = (NSUInteger)value; +#if !TARGET_RT_64_BIT + hash = ~hash + (hash << 15); // key = (key << 15) - key - 1; + hash ^= (hash >> 12); + hash += (hash << 2); + hash ^= (hash >> 4); + hash *= 2057; // key = (key + (key << 3)) + (key << 11); + hash ^= (hash >> 16); +#else + hash += ~hash + (hash << 21); // key = (key << 21) - key - 1; + hash ^= (hash >> 24); + hash = (hash + (hash << 3)) + (hash << 8); + hash ^= (hash >> 14); + hash = (hash + (hash << 2)) + (hash << 4); // key * 21 + hash ^= (hash >> 28); + hash += (hash << 31); +#endif + return hash; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMeasurementEvent_Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMeasurementEvent_Internal.h new file mode 100644 index 0000000..e3b039f --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMeasurementEvent_Internal.h @@ -0,0 +1,33 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKMeasurementEvent.h" + +NS_ASSUME_NONNULL_BEGIN + +/*! + Provides methods for posting notifications from the Bolts framework + */ +@interface FBSDKMeasurementEvent (Internal) + ++ (void)postNotificationForEventName:(NSString *)name + args:(NSDictionary *)args; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMonotonicTime.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMonotonicTime.h new file mode 100644 index 0000000..d504d97 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMonotonicTime.h @@ -0,0 +1,67 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#include + +typedef double FBSDKMonotonicTimeSeconds; +typedef uint64_t FBSDKMonotonicTimeMilliseconds; +typedef uint64_t FBSDKMonotonicTimeNanoseconds; +typedef uint64_t FBSDKMachAbsoluteTimeUnits; + +/** + * return current monotonic time in Milliseconds + * Millisecond precision, uint64_t value. + * Avoids float/double math operations, thus more efficient than FBSDKMonotonicTimeGetCurrentSeconds. + * Should be preferred over FBSDKMonotonicTimeGetCurrentSeconds in case millisecond + * precision is required. + * IMPORTANT: this timer doesn't run while the device is sleeping. + */ +FBSDKMonotonicTimeMilliseconds FBSDKMonotonicTimeGetCurrentMilliseconds(void); + +/** + * return current monotonic time in Seconds + * Nanosecond precision, double value. + * Should be preferred over FBSDKMonotonicTimeGetCurrentMilliseconds in case + * nanosecond precision is required. + * IMPORTANT: this timer doesn't run while the device is sleeping. + */ +FBSDKMonotonicTimeSeconds FBSDKMonotonicTimeGetCurrentSeconds(void); + +/** + * return current monotonic time in NanoSeconds + * Nanosecond precision, uint64_t value. + * Useful when nanosecond precision is required but you want to avoid float/double math operations. + * IMPORTANT: this timer doesn't run while the device is sleeping. + */ +FBSDKMonotonicTimeNanoseconds FBSDKMonotonicTimeGetCurrentNanoseconds(void); + +/** + * return number of MachTimeUnits for given number of seconds + * this is useful when you want to use the really fast mach_absolute_time() function + * to calculate deltas between two points and then check it against a (precomputed) threshold. + * Nanosecond precision, uint64_t value. + */ +FBSDKMachAbsoluteTimeUnits FBSDKMonotonicTimeConvertSecondsToMachUnits(FBSDKMonotonicTimeSeconds seconds); + +/** + * return the number of seconds for a given amount of MachTimeUnits + * this is useful when you want to use the really fast mach_absolute_time() function, take + * deltas between time points, and when you're out of the timing critical section, use + * this function to compute how many seconds the delta works out to be. + */ +FBSDKMonotonicTimeSeconds FBSDKMonotonicTimeConvertMachUnitsToSeconds(FBSDKMachAbsoluteTimeUnits machUnits); diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMonotonicTime.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMonotonicTime.m new file mode 100644 index 0000000..1a52c81 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMonotonicTime.m @@ -0,0 +1,86 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#include +#include +#include +#include + +#import "FBSDKMonotonicTime.h" + +/** + * PLEASE NOTE: FBSDKSDKMonotonicTimeTests work fine, but are disabled + * because they take several seconds. Please re-enable them to test + * any changes you're making here! + */ +static uint64_t _get_time_nanoseconds(void) +{ + static struct mach_timebase_info tb_info = {0}; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + int ret = mach_timebase_info(&tb_info); + assert(0 == ret); + }); + + return (mach_absolute_time() * tb_info.numer) / tb_info.denom; +} + +FBSDKMonotonicTimeSeconds FBSDKMonotonicTimeGetCurrentSeconds(void) +{ + const uint64_t nowNanoSeconds = _get_time_nanoseconds(); + return (FBSDKMonotonicTimeSeconds)nowNanoSeconds / (FBSDKMonotonicTimeSeconds)1000000000.0; +} + +FBSDKMonotonicTimeMilliseconds FBSDKMonotonicTimeGetCurrentMilliseconds(void) +{ + const uint64_t nowNanoSeconds = _get_time_nanoseconds(); + return nowNanoSeconds / 1000000; +} + +FBSDKMonotonicTimeNanoseconds FBSDKMonotonicTimeGetCurrentNanoseconds(void) +{ + return _get_time_nanoseconds(); +} + +FBSDKMachAbsoluteTimeUnits FBSDKMonotonicTimeConvertSecondsToMachUnits(FBSDKMonotonicTimeSeconds seconds) +{ + static double ratio = 0; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + struct mach_timebase_info tb_info = {0}; + int ret = mach_timebase_info(&tb_info); + assert(0 == ret); + ratio = ((double) tb_info.denom / (double)tb_info.numer) * 1000000000.0; + }); + + return seconds * ratio; +} + +FBSDKMonotonicTimeSeconds FBSDKMonotonicTimeConvertMachUnitsToSeconds(FBSDKMachAbsoluteTimeUnits machUnits) +{ + static double ratio = 0; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + struct mach_timebase_info tb_info = {0}; + int ret = mach_timebase_info(&tb_info); + assert(0 == ret); + ratio = ((double) tb_info.numer / (double)tb_info.denom) / 1000000000.0; + }); + + return ratio * (double)machUnits; +} diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKProfile+Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKProfile+Internal.h new file mode 100644 index 0000000..d2298d5 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKProfile+Internal.h @@ -0,0 +1,26 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKProfile.h" + +@interface FBSDKProfile(Internal) + ++ (void)cacheProfile:(FBSDKProfile *) profile; ++ (FBSDKProfile *)fetchCachedProfile; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSettings+Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSettings+Internal.h new file mode 100644 index 0000000..0751f7a --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSettings+Internal.h @@ -0,0 +1,37 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@protocol FBSDKAccessTokenCaching; + +@interface FBSDKSettings(Internal) + ++ (NSObject *)accessTokenCache; + ++ (void)setAccessTokenCache:(NSObject *)accessTokenCache; + ++ (NSString *)graphAPIDebugParamValue; + ++ (BOOL)isGraphErrorRecoveryDisabled; + +// used by Unity. ++ (NSString *)userAgentSuffix; ++ (void)setUserAgentSuffix:(NSString *)suffix; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSwizzler.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSwizzler.h new file mode 100644 index 0000000..7e9f29c --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSwizzler.h @@ -0,0 +1,38 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +// Cast to turn things that are not ids into NSMapTable keys +#define MAPTABLE_ID(x) (__bridge id)((void *)x) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wstrict-prototypes" + +typedef void (^swizzleBlock)(); + +#pragma clang diagnostic pop + +// Rename to avoid duplicate symbol errors +@interface FBSDKSwizzler : NSObject + ++ (void)swizzleSelector:(SEL)aSelector onClass:(Class)aClass withBlock:(swizzleBlock)block named:(NSString *)aName; ++ (void)unswizzleSelector:(SEL)aSelector onClass:(Class)aClass named:(NSString *)aName; ++ (void)printSwizzles; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSwizzler.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSwizzler.m new file mode 100644 index 0000000..069ee5e --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSwizzler.m @@ -0,0 +1,310 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKSwizzler.h" + +#import + +#define MIN_ARGS 2 +#define MAX_ARGS 5 + +@interface FBSDKSwizzle : NSObject + +@property (nonatomic, assign) Class class; +@property (nonatomic, assign) SEL selector; +@property (nonatomic, assign) IMP originalMethod; +@property (nonatomic, assign) uint numArgs; +@property (nonatomic, copy) NSMapTable *blocks; + +- (instancetype)initWithBlock:(swizzleBlock)aBlock + named:(NSString *)aName + forClass:(Class)aClass + selector:(SEL)aSelector + originalMethod:(IMP)aMethod + withNumArgs:(uint)numArgs; + +@end + +static NSMapTable *swizzles; + +static FBSDKSwizzle* fb_findSwizzle(id self, SEL _cmd){ + Method aMethod = class_getInstanceMethod([self class], _cmd); + FBSDKSwizzle *swizzle = (FBSDKSwizzle *)[swizzles objectForKey:MAPTABLE_ID(aMethod)]; + Class this_class = [self class]; + while (!swizzle && class_getSuperclass(this_class)){ + this_class = class_getSuperclass(this_class); + aMethod = class_getInstanceMethod(this_class, _cmd); + swizzle = (FBSDKSwizzle *)[swizzles objectForKey:MAPTABLE_ID(aMethod)]; + } + return swizzle; +} + +static void fb_swizzledMethod_2(id self, SEL _cmd) +{ + FBSDKSwizzle *swizzle = fb_findSwizzle(self, _cmd); + if (swizzle) { + ((void(*)(id, SEL))swizzle.originalMethod)(self, _cmd); + + NSEnumerator *blocks = [swizzle.blocks objectEnumerator]; + swizzleBlock block; + while ((block = [blocks nextObject])) { + block(self, _cmd); + } + } +} + +static void fb_swizzledMethod_3(id self, SEL _cmd, id arg) +{ + FBSDKSwizzle *swizzle = fb_findSwizzle(self, _cmd); + if (swizzle) { + ((void(*)(id, SEL, id))swizzle.originalMethod)(self, _cmd, arg); + + NSEnumerator *blocks = [swizzle.blocks objectEnumerator]; + swizzleBlock block; + while ((block = [blocks nextObject])) { + block(self, _cmd, arg); + } + } +} + +static void fb_swizzledMethod_4(id self, SEL _cmd, id arg, id arg2) +{ + FBSDKSwizzle *swizzle = fb_findSwizzle(self, _cmd); + if (swizzle) { + ((void(*)(id, SEL, id, id))swizzle.originalMethod)(self, _cmd, arg, arg2); + + NSEnumerator *blocks = [swizzle.blocks objectEnumerator]; + swizzleBlock block; + while ((block = [blocks nextObject])) { + block(self, _cmd, arg, arg2); + } + } +} + +static void fb_swizzledMethod_5(id self, SEL _cmd, id arg, id arg2, id arg3) +{ + FBSDKSwizzle *swizzle = fb_findSwizzle(self, _cmd); + if (swizzle) { + ((void(*)(id, SEL, id, id, id))swizzle.originalMethod)(self, _cmd, arg, arg2, arg3); + + NSEnumerator *blocks = [swizzle.blocks objectEnumerator]; + swizzleBlock block; + while ((block = [blocks nextObject])) { + block(self, _cmd, arg, arg2, arg3); + } + } +} + +static void fb_swizzleMethod_4_io(id self, SEL _cmd, NSInteger arg, id arg2) +{ + FBSDKSwizzle *swizzle = fb_findSwizzle(self, _cmd); + if (swizzle) { + ((void(*)(id, SEL, NSInteger, id))swizzle.originalMethod)(self, _cmd, arg, arg2); + + NSEnumerator *blocks = [swizzle.blocks objectEnumerator]; + swizzleBlock block; + while ((block = [blocks nextObject])) { + block(self, _cmd, arg, arg2); + } + } +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wstrict-prototypes" + +static void (*fb_swizzledMethods[MAX_ARGS - MIN_ARGS + 1])() = {fb_swizzledMethod_2, fb_swizzledMethod_3, fb_swizzledMethod_4, fb_swizzledMethod_5}; + +#pragma clang diagnostic pop + +@implementation FBSDKSwizzler + ++ (void)setup { + if (!swizzles) { + swizzles = [NSMapTable mapTableWithKeyOptions:(NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality) + valueOptions:(NSPointerFunctionsStrongMemory | NSPointerFunctionsObjectPointerPersonality)]; + } +} + ++ (void)printSwizzles +{ + NSEnumerator *en = [swizzles objectEnumerator]; + FBSDKSwizzle *swizzle; + while ((swizzle = (FBSDKSwizzle *)[en nextObject])) { + NSLog(@"%@", swizzle); + } +} + ++ (FBSDKSwizzle *)swizzleForMethod:(Method)aMethod +{ + return (FBSDKSwizzle *)[swizzles objectForKey:MAPTABLE_ID(aMethod)]; +} + ++ (void)removeSwizzleForMethod:(Method)aMethod +{ + [swizzles removeObjectForKey:MAPTABLE_ID(aMethod)]; +} + ++ (void)setSwizzle:(FBSDKSwizzle *)swizzle forMethod:(Method)aMethod +{ + [swizzles setObject:swizzle forKey:MAPTABLE_ID(aMethod)]; +} + ++ (BOOL)isLocallyDefinedMethod:(Method)aMethod onClass:(Class)aClass +{ + uint count; + BOOL isLocal = NO; + Method *methods = class_copyMethodList(aClass, &count); + for (NSUInteger i = 0; i < count; i++) { + if (aMethod == methods[i]) { + isLocal = YES; + break; + } + } + free(methods); + return isLocal; +} + ++ (void)swizzleSelector:(SEL)aSelector onClass:(Class)aClass withBlock:(swizzleBlock)aBlock named:(NSString *)aName +{ + [FBSDKSwizzler setup]; + Method aMethod = class_getInstanceMethod(aClass, aSelector); + if (aMethod) { + uint numArgs = method_getNumberOfArguments(aMethod); + if (numArgs >= MIN_ARGS && numArgs <= MAX_ARGS) { + + BOOL isLocal = [self isLocallyDefinedMethod:aMethod onClass:aClass]; + IMP swizzledMethod = (IMP)fb_swizzledMethods[numArgs - 2]; + // Check whether the first parameter is integer + if (4 == numArgs) { + NSString *firstType = @(method_copyArgumentType(aMethod, 2)); + NSString *integerTypes = @"islq"; + if ([integerTypes containsString:firstType.lowercaseString]) { + swizzledMethod = (IMP)fb_swizzleMethod_4_io; + } + } + + FBSDKSwizzle *swizzle = [self swizzleForMethod:aMethod]; + + if (isLocal) { + if (!swizzle) { + IMP originalMethod = method_getImplementation(aMethod); + + // Replace the local implementation of this method with the swizzled one + method_setImplementation(aMethod,swizzledMethod); + + // Create and add the swizzle + swizzle = [[FBSDKSwizzle alloc] initWithBlock:aBlock named:aName forClass:aClass selector:aSelector originalMethod:originalMethod withNumArgs:numArgs]; + [self setSwizzle:swizzle forMethod:aMethod]; + + } else { + [swizzle.blocks setObject:aBlock forKey:aName]; + } + } else { + IMP originalMethod = swizzle ? swizzle.originalMethod : method_getImplementation(aMethod); + + // Add the swizzle as a new local method on the class. + if (!class_addMethod(aClass, aSelector, swizzledMethod, method_getTypeEncoding(aMethod))) { + return; + } + // Now re-get the Method, it should be the one we just added. + Method newMethod = class_getInstanceMethod(aClass, aSelector); + if (aMethod == newMethod) { + return; + } + + FBSDKSwizzle *newSwizzle = [[FBSDKSwizzle alloc] initWithBlock:aBlock named:aName forClass:aClass selector:aSelector originalMethod:originalMethod withNumArgs:numArgs]; + [self setSwizzle:newSwizzle forMethod:newMethod]; + } + } + } +} + ++ (void)unswizzleSelector:(SEL)aSelector onClass:(Class)aClass +{ + Method aMethod = class_getInstanceMethod(aClass, aSelector); + FBSDKSwizzle *swizzle = [self swizzleForMethod:aMethod]; + if (swizzle) { + method_setImplementation(aMethod, swizzle.originalMethod); + [self removeSwizzleForMethod:aMethod]; + } +} + +/* + Remove the named swizzle from the given class/selector. If aName is nil, remove all + swizzles for this class/selector +*/ ++ (void)unswizzleSelector:(SEL)aSelector onClass:(Class)aClass named:(NSString *)aName +{ + Method aMethod = class_getInstanceMethod(aClass, aSelector); + FBSDKSwizzle *swizzle = [self swizzleForMethod:aMethod]; + if (swizzle) { + if (aName) { + [swizzle.blocks removeObjectForKey:aName]; + } + if (!aName || swizzle.blocks.count == 0) { + method_setImplementation(aMethod, swizzle.originalMethod); + [self removeSwizzleForMethod:aMethod]; + } + } +} + +@end + + +@implementation FBSDKSwizzle + +- (instancetype)init +{ + if ((self = [super init])) { + self.blocks = [NSMapTable mapTableWithKeyOptions:(NSPointerFunctionsStrongMemory + | NSPointerFunctionsObjectPersonality) + valueOptions:(NSPointerFunctionsStrongMemory + | NSPointerFunctionsObjectPointerPersonality)]; + } + return self; +} + +- (instancetype)initWithBlock:(swizzleBlock)aBlock + named:(NSString *)aName + forClass:(Class)aClass + selector:(SEL)aSelector + originalMethod:(IMP)aMethod + withNumArgs:(uint)numArgs +{ + if ((self = [self init])) { + self.class = aClass; + self.selector = aSelector; + self.numArgs = numArgs; + self.originalMethod = aMethod; + [self.blocks setObject:aBlock forKey:aName]; + } + return self; +} + +- (NSString *)description +{ + NSString *descriptors = @""; + NSString *key; + NSEnumerator *keys = [self.blocks keyEnumerator]; + while ((key = [keys nextObject])) { + descriptors = [descriptors stringByAppendingFormat:@"\t%@ : %@\n", key, [self.blocks objectForKey:key]]; + } + return [NSString stringWithFormat:@"Swizzle on %@::%@ [\n%@]", NSStringFromClass(self.class), NSStringFromSelector(self.selector), descriptors]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSystemAccountStoreAdapter.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSystemAccountStoreAdapter.h new file mode 100644 index 0000000..b547dab --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSystemAccountStoreAdapter.h @@ -0,0 +1,76 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import +#import + +typedef void (^FBSDKGraphRequestAccessToAccountsHandler)(NSString *oauthToken, NSError *accountStoreError); + +/* + @class + + Adapter around system account store APIs. Note this is only intended for internal + consumption. If publicized, consider moving declarations to an internal only header and + reconsider dispatching semantics. + */ +@interface FBSDKSystemAccountStoreAdapter : NSObject + +/* + s gets the oauth token stored in the account store credential, if available. If not empty, + this implies user has granted access. + */ +@property (nonatomic, readonly, copy) NSString *accessTokenString; + +/* + Gets or sets the flag indicating if the next requestAccess call should block + on a renew call. + */ +@property (nonatomic, assign) BOOL forceBlockingRenew; + +/* + A convenience getter to the Facebook account type in the account store, if available. + */ +@property (strong, nonatomic, readonly) ACAccountType *accountType; + +/* + The singleton instance. + */ +@property (class, nonatomic, strong) FBSDKSystemAccountStoreAdapter *sharedInstance; + +/* + Requests access to the device's Facebook account for the given parameters. + @param permissions the permissions + @param defaultAudience the default audience + @param isReauthorize a flag describing if this is a reauth request + @param appID the app id + @param handler the handler that will be invoked on completion (dispatched to the main thread). the oauthToken is nil on failure. + */ +- (void)requestAccessToFacebookAccountStore:(NSSet *)permissions + defaultAudience:(NSString *)defaultAudience + isReauthorize:(BOOL)isReauthorize + appID:(NSString *)appID + handler:(FBSDKGraphRequestAccessToAccountsHandler)handler; + +/* + Sends a message to the device account store to renew the Facebook account credentials + + @param handler the handler that is invoked on completion + */ +- (void)renewSystemAuthorization:(void(^)(ACAccountCredentialRenewResult result, NSError *error))handler; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSystemAccountStoreAdapter.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSystemAccountStoreAdapter.m new file mode 100644 index 0000000..4c1601f --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSystemAccountStoreAdapter.m @@ -0,0 +1,278 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKSystemAccountStoreAdapter.h" + +#import "FBSDKAccessToken.h" +#import "FBSDKConstants.h" +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKError.h" +#import "FBSDKLogger.h" +#import "FBSDKSettings+Internal.h" + +@interface FBSDKSystemAccountStoreAdapter () + +@property (retain, nonatomic, readonly) ACAccountStore *accountStore; + +@end + +static NSString *const FBForceBlockingRenewKey = @"com.facebook.sdk:ForceBlockingRenewKey"; +static FBSDKSystemAccountStoreAdapter *_singletonInstance = nil; + +@implementation FBSDKSystemAccountStoreAdapter +{ + ACAccountStore *_accountStore; + ACAccountType *_accountType; +} + ++ (void)initialize +{ + if (self == [FBSDKSystemAccountStoreAdapter class]) { + _singletonInstance = [[self alloc] init]; + } +} + +- (instancetype)init +{ + self = [super init]; + if (self) { + _forceBlockingRenew = [[NSUserDefaults standardUserDefaults] boolForKey:FBForceBlockingRenewKey]; + } + return self; +} + +#pragma mark - Properties + +- (ACAccountStore *)accountStore +{ + if (_accountStore == nil) { + _accountStore = [[fbsdkdfl_ACAccountStoreClass() alloc] init]; + } + return _accountStore; +} + +- (ACAccountType *)accountType +{ + if (_accountType == nil) { + _accountType = [self.accountStore accountTypeWithAccountTypeIdentifier:@"com.apple.facebook"]; + } + return _accountType; +} + +- (void)setForceBlockingRenew:(BOOL)forceBlockingRenew +{ + if (_forceBlockingRenew != forceBlockingRenew) { + _forceBlockingRenew = forceBlockingRenew; + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; + [userDefaults setBool:forceBlockingRenew forKey:FBForceBlockingRenewKey]; + [userDefaults synchronize]; + } +} + ++ (FBSDKSystemAccountStoreAdapter *)sharedInstance +{ + return _singletonInstance; +} + ++ (void)setSharedInstance:(FBSDKSystemAccountStoreAdapter *)instance +{ + _singletonInstance = instance; +} + +- (NSString *)accessTokenString +{ + if (self.accountType && self.accountType.accessGranted) { + NSArray *fbAccounts = [self.accountStore accountsWithAccountType:self.accountType]; + if (fbAccounts.count > 0) { + id account = fbAccounts[0]; + id credential = [account credential]; + + return [credential oauthToken]; + } + } + return nil; +} + +#pragma mark - Public properties and methods + +- (void)requestAccessToFacebookAccountStore:(NSSet *)permissions + defaultAudience:(NSString *)defaultAudience + isReauthorize:(BOOL)isReauthorize + appID:(NSString *)appID + handler:(FBSDKGraphRequestAccessToAccountsHandler)handler +{ + if (appID == nil) { + @throw [NSException exceptionWithName:NSInvalidArgumentException + reason:@"appID cannot be nil" + userInfo:nil]; + } + + // no publish_* permissions are permitted with a nil audience + if (!defaultAudience && isReauthorize) { + for (NSString *p in permissions) { + if ([p hasPrefix:@"publish"]) { + [[NSException exceptionWithName:NSInvalidArgumentException + reason:@"FBSDKLoginManager: One or more publish permission was requested " + @"without specifying an audience; use FBSDKDefaultAudienceOnlyMe, " + @"FBSDKDefaultAudienceFriends, or FBSDKDefaultAudienceEveryone" + userInfo:nil] + raise]; + } + } + } + + // Construct access options. Constructing this way is tolerant for nil values. + NSMutableDictionary *optionsMutable = [[NSMutableDictionary alloc] initWithCapacity:3]; + optionsMutable[fbsdkdfl_ACFacebookAppIdKey()] = appID; + optionsMutable[fbsdkdfl_ACFacebookPermissionsKey()] = permissions.allObjects; + optionsMutable[fbsdkdfl_ACFacebookAudienceKey()] = defaultAudience; + NSDictionary *options = [optionsMutable copy]; + + if (self.forceBlockingRenew + && [self.accountStore accountsWithAccountType:self.accountType].count > 0) { + // If the force renew flag is set and an iOS FB account is still set, + // chain the requestAccessBlock to a successful renew result + [self renewSystemAuthorization:^(ACAccountCredentialRenewResult result, NSError *error) { + if (result == ACAccountCredentialRenewResultRenewed) { + self.forceBlockingRenew = NO; + [self requestAccessToFacebookAccountStore:options retrying:NO handler:handler]; + } else if (handler) { + // Otherwise, invoke the caller's handler back on the main thread with an + // error that will trigger the password change user message. + dispatch_async(dispatch_get_main_queue(), ^{ + handler(nil, error); + }); + } + }]; + } else { + // Otherwise go ahead and invoke normal request. + [self requestAccessToFacebookAccountStore:options retrying:NO handler:handler]; + } +} + +- (void)requestAccessToFacebookAccountStore:(NSDictionary *)options + retrying:(BOOL)retrying + handler:(FBSDKGraphRequestAccessToAccountsHandler)handler +{ + if (!self.accountType) { + if (handler) { + handler(nil, [NSError fbErrorWithCode:FBSDKErrorUnknown message:@"Invalid request to account store"]); + } + return; + } + // we will attempt an iOS integrated facebook login + [self.accountStore + requestAccessToAccountsWithType:self.accountType + options:options + completion:^(BOOL granted, NSError *error) { + if (!granted && + error.code == ACErrorPermissionDenied && + [error.description rangeOfString:@"remote_app_id does not match stored id"].location != NSNotFound) { + + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors formatString: + @"System authorization failed:'%@'. This may be caused by a mismatch between" + @" the bundle identifier and your app configuration on the server" + @" at developers.facebook.com/apps.", + error.localizedDescription]; + } + + // requestAccessToAccountsWithType:options:completion: completes on an + // arbitrary thread; let's process this back on our main thread + dispatch_async(dispatch_get_main_queue(), ^{ + NSError *accountStoreError = error; + NSString *oauthToken = nil; + id account = nil; + if (granted) { + NSArray *fbAccounts = [self.accountStore accountsWithAccountType:self.accountType]; + if (fbAccounts.count > 0) { + account = fbAccounts[0]; + + id credential = [account credential]; + + oauthToken = [credential oauthToken]; + } + self.forceBlockingRenew = NO; + } + + if (!accountStoreError && !oauthToken) { + if (!retrying) { + // This can happen as a result of, e.g., restoring from iCloud to a different device. Try once to renew. + [self renewSystemAuthorization:^(ACAccountCredentialRenewResult renewResult, NSError *renewError) { + // Call block again, regardless of result -- either we'll get credentials or we'll fail with the + // exception below. We want to treat failure here the same regardless of whether it was before or after the refresh attempt. + [self requestAccessToFacebookAccountStore:options retrying:YES handler:handler]; + }]; + return; + } + // else call handler with nils. + } + handler(oauthToken, accountStoreError); + }); + }]; +} + +- (void)renewSystemAuthorization:(void(^)(ACAccountCredentialRenewResult, NSError *))handler +{ + // if the slider has been set to off, renew calls to iOS simply hang, so we must + // preemptively check for that condition. + if (self.accountStore && self.accountType && self.accountType.accessGranted) { + NSArray *fbAccounts = [self.accountStore accountsWithAccountType:self.accountType]; + id account; + if (fbAccounts && fbAccounts.count > 0 && + (account = fbAccounts[0])) { + + FBSDKAccessToken *currentToken = [FBSDKAccessToken currentAccessToken]; + if (![currentToken.tokenString isEqualToString:self.accessTokenString]) { + currentToken = nil; + } + [self.accountStore renewCredentialsForAccount:account completion:^(ACAccountCredentialRenewResult renewResult, NSError *error) { + if (error) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorAccessTokens + logEntry:[NSString stringWithFormat:@"renewCredentialsForAccount result:%ld, error: %@", + (long)renewResult, + error]]; + } + if (renewResult == ACAccountCredentialRenewResultRenewed && + currentToken && + [currentToken isEqual:[FBSDKAccessToken currentAccessToken]]) { + // account store renewals can change the stored oauth token so we need to update the currentAccessToken + // so future comparisons to -[ accessTokenString] work correctly (e.g., error recovery). + FBSDKAccessToken *updatedToken = [[FBSDKAccessToken alloc] initWithTokenString:self.accessTokenString + permissions:currentToken.permissions.allObjects + declinedPermissions:currentToken.declinedPermissions.allObjects + appID:currentToken.appID + userID:currentToken.userID + expirationDate:[NSDate distantFuture] + refreshDate:[NSDate date] + dataAccessExpirationDate:[NSDate distantFuture]]; + [FBSDKAccessToken setCurrentAccessToken:updatedToken]; + } + if (handler) { + handler(renewResult, error); + } + }]; + return; + } + } + + if (handler) { + handler(ACAccountCredentialRenewResultFailed, nil); + } +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTriStateBOOL.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTriStateBOOL.h new file mode 100644 index 0000000..af06684 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTriStateBOOL.h @@ -0,0 +1,30 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +typedef NS_ENUM(NSInteger, FBSDKTriStateBOOL) +{ + FBSDKTriStateBOOLValueUnknown = -1, + FBSDKTriStateBOOLValueNO = 0, + FBSDKTriStateBOOLValueYES = 1, +}; + +FOUNDATION_EXPORT FBSDKTriStateBOOL FBSDKTriStateBOOLFromBOOL(BOOL value); +FOUNDATION_EXPORT FBSDKTriStateBOOL FBSDKTriStateBOOLFromNSNumber(NSNumber *value); +FOUNDATION_EXPORT BOOL BOOLFromFBSDKTriStateBOOL(FBSDKTriStateBOOL value, BOOL defaultValue); diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTriStateBOOL.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTriStateBOOL.m new file mode 100644 index 0000000..aafcb39 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTriStateBOOL.m @@ -0,0 +1,43 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKTriStateBOOL.h" + +FBSDKTriStateBOOL FBSDKTriStateBOOLFromBOOL(BOOL value) +{ + return value ? FBSDKTriStateBOOLValueYES : FBSDKTriStateBOOLValueNO; +} + +FBSDKTriStateBOOL FBSDKTriStateBOOLFromNSNumber(NSNumber *value) +{ + return ([value isKindOfClass:[NSNumber class]] ? + FBSDKTriStateBOOLFromBOOL(value.boolValue) : + FBSDKTriStateBOOLValueUnknown); +} + +BOOL BOOLFromFBSDKTriStateBOOL(FBSDKTriStateBOOL value, BOOL defaultValue) +{ + switch (value) { + case FBSDKTriStateBOOLValueYES: + return YES; + case FBSDKTriStateBOOLValueNO: + return NO; + case FBSDKTriStateBOOLValueUnknown: + return defaultValue; + } +} diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTypeUtility.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTypeUtility.h new file mode 100644 index 0000000..425b855 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTypeUtility.h @@ -0,0 +1,36 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKTypeUtility : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + ++ (NSArray *)arrayValue:(id)object; ++ (BOOL)boolValue:(id)object; ++ (NSDictionary *)dictionaryValue:(id)object; ++ (NSInteger)integerValue:(id)object; ++ (id)objectValue:(id)object; ++ (NSString *)stringValue:(id)object; ++ (NSTimeInterval)timeIntervalValue:(id)object; ++ (NSUInteger)unsignedIntegerValue:(id)object; ++ (NSURL *)URLValue:(id)object; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTypeUtility.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTypeUtility.m new file mode 100644 index 0000000..fd6c733 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTypeUtility.m @@ -0,0 +1,121 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKTypeUtility.h" + +@implementation FBSDKTypeUtility + +#pragma mark - Class Methods + ++ (NSArray *)arrayValue:(id)object +{ + return (NSArray *)[self _objectValue:object ofClass:[NSArray class]]; +} + ++ (BOOL)boolValue:(id)object +{ + if ([object isKindOfClass:[NSNumber class]]) { + // @0 or @NO returns NO, otherwise YES + return ((NSNumber *)object).boolValue; + } else if ([object isKindOfClass:[NSString class]]) { + // Returns YES on encountering one of "Y", "y", "T", "t", or a digit 1-9, otherwise NO + return ((NSString *)object).boolValue; + } else { + return ([self objectValue:object] != nil); + } +} + ++ (NSDictionary *)dictionaryValue:(id)object +{ + return (NSDictionary *)[self _objectValue:object ofClass:[NSDictionary class]]; +} + ++ (NSInteger)integerValue:(id)object +{ + if ([object isKindOfClass:[NSNumber class]]) { + return ((NSNumber *)object).integerValue; + } else if ([object isKindOfClass:[NSString class]]) { + return ((NSString *)object).integerValue; + } else { + return 0; + } +} + ++ (id)objectValue:(id)object +{ + return ([object isKindOfClass:[NSNull class]] ? nil : object); +} + ++ (NSString *)stringValue:(id)object +{ + if ([object isKindOfClass:[NSString class]]) { + return (NSString *)object; + } else if ([object isKindOfClass:[NSNumber class]]) { + return ((NSNumber *)object).stringValue; + } else if ([object isKindOfClass:[NSURL class]]) { + return ((NSURL *)object).absoluteString; + } else { + return nil; + } +} + ++ (NSTimeInterval)timeIntervalValue:(id)object +{ + if ([object isKindOfClass:[NSNumber class]]) { + return ((NSNumber *)object).doubleValue; + } else if ([object isKindOfClass:[NSString class]]) { + return ((NSString *)object).doubleValue; + } else { + return 0; + } +} + ++ (NSUInteger)unsignedIntegerValue:(id)object +{ + if ([object isKindOfClass:[NSNumber class]]) { + return ((NSNumber *)object).unsignedIntegerValue; + } else { + // there is no direct support for strings containing unsigned values > NSIntegerMax - not worth writing ourselves + // right now, so just cap unsigned values at NSIntegerMax until we have a need for larger + NSInteger integerValue = [self integerValue:object]; + if (integerValue < 0) { + integerValue = 0; + } + return (NSUInteger)integerValue; + } +} + ++ (NSURL *)URLValue:(id)object +{ + if ([object isKindOfClass:[NSURL class]]) { + return (NSURL *)object; + } else if ([object isKindOfClass:[NSString class]]) { + return [[NSURL alloc] initWithString:(NSString *)object]; + } else { + return nil; + } +} + +#pragma mark - Helper Methods + ++ (id)_objectValue:(id)object ofClass:(Class)expectedClass +{ + return ([object isKindOfClass:expectedClass] ? object : nil); +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKURL_Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKURL_Internal.h new file mode 100644 index 0000000..bb452f7 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKURL_Internal.h @@ -0,0 +1,23 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKURL.h" + +@interface FBSDKURL (Internal) ++ (FBSDKURL *)URLForRenderBackToReferrerBarURL:(NSURL *)url; +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequest+Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequest+Internal.h new file mode 100644 index 0000000..4d8ba91 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequest+Internal.h @@ -0,0 +1,58 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +typedef NS_OPTIONS(NSUInteger, FBSDKGraphRequestFlags) +{ + FBSDKGraphRequestFlagNone = 0, + // indicates this request should not use a client token as its token parameter + FBSDKGraphRequestFlagSkipClientToken = 1 << 1, + // indicates this request should not close the session if its response is an oauth error + FBSDKGraphRequestFlagDoNotInvalidateTokenOnError = 1 << 2, + // indicates this request should not perform error recovery + FBSDKGraphRequestFlagDisableErrorRecovery = 1 << 3, +}; +@interface FBSDKGraphRequest (Internal) + +- (instancetype)initWithGraphPath:(NSString *)graphPath + parameters:(NSDictionary *)parameters + flags:(FBSDKGraphRequestFlags)flags; +- (instancetype)initWithGraphPath:(NSString *)graphPath + parameters:(NSDictionary *)parameters + tokenString:(NSString *)tokenString + HTTPMethod:(NSString *)HTTPMethod + flags:(FBSDKGraphRequestFlags)flags; +// Generally, requests automatically issued by the SDK +// should not invalidate the token and should disableErrorRecovery +// so that we don't cause a sudden change in token state or trigger recovery +// out of context of any user action. +@property (nonatomic, assign) FBSDKGraphRequestFlags flags; + +@property (nonatomic, readonly, getter=isGraphErrorRecoveryDisabled) BOOL graphErrorRecoveryDisabled; +@property (nonatomic, readonly) BOOL hasAttachments; + ++ (BOOL)isAttachment:(id)item; ++ (NSString *)serializeURL:(NSString *)baseUrl + params:(NSDictionary *)params + httpMethod:(NSString *)httpMethod + forBatch:(BOOL)forBatch; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestBody.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestBody.h new file mode 100644 index 0000000..c9a0b2b --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestBody.h @@ -0,0 +1,47 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import +#import + +@class FBSDKGraphRequestDataAttachment; +@class FBSDKLogger; + +@interface FBSDKGraphRequestBody : NSObject + +@property (nonatomic, retain, readonly) NSData *data; + +- (void)appendWithKey:(NSString *)key + formValue:(NSString *)value + logger:(FBSDKLogger *)logger; + +- (void)appendWithKey:(NSString *)key + imageValue:(UIImage *)image + logger:(FBSDKLogger *)logger; + +- (void)appendWithKey:(NSString *)key + dataValue:(NSData *)data + logger:(FBSDKLogger *)logger; + +- (void)appendWithKey:(NSString *)key + dataAttachmentValue:(FBSDKGraphRequestDataAttachment *)dataAttachment + logger:(FBSDKLogger *)logger; + +- (NSString *)mimeContentType; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestBody.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestBody.m new file mode 100644 index 0000000..c454f95 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestBody.m @@ -0,0 +1,155 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKGraphRequestBody.h" + +#import "FBSDKCrypto.h" +#import "FBSDKGraphRequestDataAttachment.h" +#import "FBSDKLogger.h" +#import "FBSDKSettings.h" + +#define kNewline @"\r\n" + +@implementation FBSDKGraphRequestBody +{ + NSMutableData *_data; + NSMutableDictionary *_json; + NSString *_stringBoundary; +} + +- (instancetype)init +{ + if ((self = [super init])) { + _stringBoundary = [FBSDKCrypto randomString:32]; + _data = [[NSMutableData alloc] init]; + _json = [NSMutableDictionary dictionary]; + } + + return self; +} + +- (NSString *)mimeContentType +{ + if (_json) { + return @"application/json"; + } else { + return [NSString stringWithFormat:@"multipart/form-data; boundary=%@", _stringBoundary]; + } +} + +- (void)appendUTF8:(NSString *)utf8 +{ + if (!_data.length) { + NSString *headerUTF8 = [NSString stringWithFormat:@"--%@%@", _stringBoundary, kNewline]; + NSData *headerData = [headerUTF8 dataUsingEncoding:NSUTF8StringEncoding]; + [_data appendData:headerData]; + } + NSData *data = [utf8 dataUsingEncoding:NSUTF8StringEncoding]; + [_data appendData:data]; +} + +- (void)appendWithKey:(NSString *)key + formValue:(NSString *)value + logger:(FBSDKLogger *)logger +{ + [self _appendWithKey:key filename:nil contentType:nil contentBlock:^{ + [self appendUTF8:value]; + }]; + if (key && value) { + _json[key] = value; + } + [logger appendFormat:@"\n %@:\t%@", key, (NSString *)value]; +} + +- (void)appendWithKey:(NSString *)key + imageValue:(UIImage *)image + logger:(FBSDKLogger *)logger +{ + NSData *data = UIImageJPEGRepresentation(image, [FBSDKSettings JPEGCompressionQuality]); + [self _appendWithKey:key filename:key contentType:@"image/jpeg" contentBlock:^{ + [self->_data appendData:data]; + }]; + _json = nil; + [logger appendFormat:@"\n %@:\t", key, (unsigned long)(data.length / 1024)]; +} + +- (void)appendWithKey:(NSString *)key + dataValue:(NSData *)data + logger:(FBSDKLogger *)logger +{ + [self _appendWithKey:key filename:key contentType:@"content/unknown" contentBlock:^{ + [self->_data appendData:data]; + }]; + _json = nil; + [logger appendFormat:@"\n %@:\t", key, (unsigned long)(data.length / 1024)]; +} + +- (void)appendWithKey:(NSString *)key + dataAttachmentValue:(FBSDKGraphRequestDataAttachment *)dataAttachment + logger:(FBSDKLogger *)logger +{ + NSString *filename = dataAttachment.filename ?: key; + NSString *contentType = dataAttachment.contentType ?: @"content/unknown"; + NSData *data = dataAttachment.data; + [self _appendWithKey:key filename:filename contentType:contentType contentBlock:^{ + [self->_data appendData:data]; + }]; + _json = nil; + [logger appendFormat:@"\n %@:\t", key, (unsigned long)(data.length / 1024)]; +} + +- (NSData *)data +{ + if (_json) { + NSData *jsonData; + if (_json.allKeys.count > 0) { + jsonData = [NSJSONSerialization dataWithJSONObject:_json options:0 error:nil]; + } else { + jsonData = [NSData data]; + } + + return jsonData; + } + return [_data copy]; +} + +- (void)_appendWithKey:(NSString *)key + filename:(NSString *)filename + contentType:(NSString *)contentType + contentBlock:(void(^)(void))contentBlock +{ + NSMutableArray *disposition = [[NSMutableArray alloc] init]; + [disposition addObject:@"Content-Disposition: form-data"]; + if (key) { + [disposition addObject:[[NSString alloc] initWithFormat:@"name=\"%@\"", key]]; + } + if (filename) { + [disposition addObject:[[NSString alloc] initWithFormat:@"filename=\"%@\"", filename]]; + } + [self appendUTF8:[[NSString alloc] initWithFormat:@"%@%@", [disposition componentsJoinedByString:@"; "], kNewline]]; + if (contentType) { + [self appendUTF8:[[NSString alloc] initWithFormat:@"Content-Type: %@%@", contentType, kNewline]]; + } + [self appendUTF8:kNewline]; + if (contentBlock != NULL) { + contentBlock(); + } + [self appendUTF8:[[NSString alloc] initWithFormat:@"%@--%@%@", kNewline, _stringBoundary, kNewline]]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestConnection+Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestConnection+Internal.h new file mode 100644 index 0000000..c63688c --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestConnection+Internal.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKGraphRequestConnection(Internal) + +@property (nonatomic, readonly) NSMutableArray *requests; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestMetadata.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestMetadata.h new file mode 100644 index 0000000..75aa3dd --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestMetadata.h @@ -0,0 +1,43 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +// Internal only class to facilitate FBSDKGraphRequest processing, specifically +// associating FBSDKGraphRequest and FBSDKGraphRequestHandler instances and necessary +// data for retry processing. +@interface FBSDKGraphRequestMetadata : NSObject + +@property (nonatomic, retain) FBSDKGraphRequest *request; +@property (nonatomic, copy) FBSDKGraphRequestHandler completionHandler; +@property (nonatomic, copy) NSDictionary *batchParameters; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +- (instancetype)initWithRequest:(FBSDKGraphRequest *)request + completionHandler:(FBSDKGraphRequestHandler)handler + batchParameters:(NSDictionary *)batchParameters +NS_DESIGNATED_INITIALIZER; + +- (void)invokeCompletionHandlerForConnection:(FBSDKGraphRequestConnection *)connection + withResults:(id)results + error:(NSError *)error; +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestMetadata.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestMetadata.m new file mode 100644 index 0000000..e87f9b4 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestMetadata.m @@ -0,0 +1,55 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKGraphRequestMetadata.h" + +#import "FBSDKGraphRequest.h" + +@implementation FBSDKGraphRequestMetadata + +- (instancetype)initWithRequest:(FBSDKGraphRequest *)request + completionHandler:(FBSDKGraphRequestHandler)handler + batchParameters:(NSDictionary *)batchParameters { + + if ((self = [super init])) { + _request = request; + _batchParameters = [batchParameters copy]; + _completionHandler = [handler copy]; + } + return self; +} + +- (void)invokeCompletionHandlerForConnection:(FBSDKGraphRequestConnection *)connection + withResults:(id)results + error:(NSError *)error { + if (self.completionHandler) { + self.completionHandler(connection, results, error); + } +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: %p, batchParameters: %@, completionHandler: %@, request: %@>", + NSStringFromClass([self class]), + self, + self.batchParameters, + self.completionHandler, + self.request.description]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManager.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManager.h new file mode 100644 index 0000000..567f8ec --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManager.h @@ -0,0 +1,30 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKCoreKit+Internal.h" + +@interface FBSDKGraphRequestPiggybackManager : NSObject + ++ (void)addPiggybackRequests:(FBSDKGraphRequestConnection *)connection; + ++ (void)addRefreshPiggyback:(FBSDKGraphRequestConnection *)connection permissionHandler:(FBSDKGraphRequestHandler)permissionHandler; + ++ (void)addRefreshPiggybackIfStale:(FBSDKGraphRequestConnection *)connection; + ++ (void)addServerConfigurationPiggyback:(FBSDKGraphRequestConnection *)connection; +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManager.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManager.m new file mode 100644 index 0000000..bb85741 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManager.m @@ -0,0 +1,151 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKGraphRequestPiggybackManager.h" + +#import "FBSDKCoreKit+Internal.h" + +static int const FBSDKTokenRefreshThresholdSeconds = 24 * 60 * 60; // day +static int const FBSDKTokenRefreshRetrySeconds = 60 * 60; // hour + +@implementation FBSDKGraphRequestPiggybackManager + ++ (void)addPiggybackRequests:(FBSDKGraphRequestConnection *)connection +{ + if ([FBSDKSettings appID].length > 0) { + BOOL safeForPiggyback = YES; + for (FBSDKGraphRequestMetadata *metadata in connection.requests) { + if (![metadata.request.version isEqualToString:[FBSDKSettings graphAPIVersion]] || + metadata.request.hasAttachments) { + safeForPiggyback = NO; + break; + } + } + if (safeForPiggyback) { + [[self class] addRefreshPiggybackIfStale:connection]; + [[self class] addServerConfigurationPiggyback:connection]; + } + } +} + ++ (void)addRefreshPiggyback:(FBSDKGraphRequestConnection *)connection permissionHandler:(FBSDKGraphRequestHandler)permissionHandler +{ + FBSDKAccessToken *expectedToken = [FBSDKAccessToken currentAccessToken]; + __block NSMutableSet *permissions = nil; + __block NSMutableSet *declinedPermissions = nil; + __block NSString *tokenString = nil; + __block NSNumber *expirationDateNumber = nil; + __block NSNumber *dataAccessExpirationDateNumber = nil; + __block int expectingCallbacksCount = 2; + void (^expectingCallbackComplete)(void) = ^{ + if (--expectingCallbacksCount == 0) { + FBSDKAccessToken *currentToken = [FBSDKAccessToken currentAccessToken]; + NSDate *expirationDate = currentToken.expirationDate; + if (expirationDateNumber) { + expirationDate = (expirationDateNumber.doubleValue > 0 ? + [NSDate dateWithTimeIntervalSince1970:expirationDateNumber.doubleValue] : + [NSDate distantFuture]); + } + NSDate *dataExpirationDate = currentToken.dataAccessExpirationDate; + if (dataAccessExpirationDateNumber) { + dataExpirationDate = (dataAccessExpirationDateNumber.doubleValue > 0 ? + [NSDate dateWithTimeIntervalSince1970:dataAccessExpirationDateNumber.doubleValue] : + [NSDate distantFuture]); + } + FBSDKAccessToken *refreshedToken = [[FBSDKAccessToken alloc] initWithTokenString:tokenString ?: currentToken.tokenString + permissions:(permissions ?: currentToken.permissions).allObjects + declinedPermissions:(declinedPermissions ?: currentToken.declinedPermissions).allObjects + appID:currentToken.appID + userID:currentToken.userID + expirationDate:expirationDate + refreshDate:[NSDate date] + dataAccessExpirationDate:dataExpirationDate]; + if (expectedToken == currentToken) { + [FBSDKAccessToken setCurrentAccessToken:refreshedToken]; + } + } + }; + FBSDKGraphRequest *extendRequest = [[FBSDKGraphRequest alloc] initWithGraphPath:@"oauth/access_token" + parameters:@{@"grant_type" : @"fb_extend_sso_token", + @"fields": @"" + } + flags:FBSDKGraphRequestFlagDisableErrorRecovery]; + + [connection addRequest:extendRequest completionHandler:^(FBSDKGraphRequestConnection *innerConnection, id result, NSError *error) { + tokenString = result[@"access_token"]; + expirationDateNumber = result[@"expires_at"]; + dataAccessExpirationDateNumber = result[@"data_access_expiration_time"]; + expectingCallbackComplete(); + }]; + FBSDKGraphRequest *permissionsRequest = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me/permissions" + parameters:@{@"fields": @""} + flags:FBSDKGraphRequestFlagDisableErrorRecovery]; + + [connection addRequest:permissionsRequest completionHandler:^(FBSDKGraphRequestConnection *innerConnection, id result, NSError *error) { + if (!error) { + permissions = [NSMutableSet set]; + declinedPermissions = [NSMutableSet set]; + + [FBSDKInternalUtility extractPermissionsFromResponse:result + grantedPermissions:permissions + declinedPermissions:declinedPermissions]; + } + expectingCallbackComplete(); + if (permissionHandler) { + permissionHandler(innerConnection, result, error); + } + }]; +} + ++ (void)addRefreshPiggybackIfStale:(FBSDKGraphRequestConnection *)connection +{ + // don't piggy back more than once an hour as a cheap way of + // retrying in cases of errors and preventing duplicate refreshes. + // obviously this is not foolproof but is simple and sufficient. + static NSDate *lastRefreshTry; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + lastRefreshTry = [NSDate distantPast]; + }); + + NSDate *now = [NSDate date]; + NSDate *tokenRefreshDate = [FBSDKAccessToken currentAccessToken].refreshDate; + if (tokenRefreshDate && + [now timeIntervalSinceDate:lastRefreshTry] > FBSDKTokenRefreshRetrySeconds && + [now timeIntervalSinceDate:tokenRefreshDate] > FBSDKTokenRefreshThresholdSeconds) { + [self addRefreshPiggyback:connection permissionHandler:NULL]; + lastRefreshTry = [NSDate date]; + } +} + ++ (void)addServerConfigurationPiggyback:(FBSDKGraphRequestConnection *)connection +{ + if (![FBSDKServerConfigurationManager cachedServerConfiguration].isDefaults + && [[NSDate date] timeIntervalSinceDate:[FBSDKServerConfigurationManager cachedServerConfiguration].timestamp] + < FBSDK_SERVER_CONFIGURATION_MANAGER_CACHE_TIMEOUT) { + return; + } + NSString *appID = [FBSDKSettings appID]; + FBSDKGraphRequest *serverConfigurationRequest = [FBSDKServerConfigurationManager requestToLoadServerConfiguration:appID]; + [connection addRequest:serverConfigurationRequest + completionHandler:^(FBSDKGraphRequestConnection *conn, id result, NSError *error) { + [FBSDKServerConfigurationManager processLoadRequestResponse:result error:error appID:appID]; + }]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKURLSessionTask.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKURLSessionTask.h new file mode 100644 index 0000000..d0f35f7 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKURLSessionTask.h @@ -0,0 +1,38 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +typedef void (^FBSDKURLSessionTaskHandler)(NSError *error, + NSURLResponse *response, + NSData *responseData); + +@interface FBSDKURLSessionTask : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +- (instancetype)initWithRequest:(NSURLRequest *)request + fromSession:(NSURLSession *)session + completionHandler:(FBSDKURLSessionTaskHandler)handler +NS_DESIGNATED_INITIALIZER; + +- (void)cancel; +- (void)start; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKURLSessionTask.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKURLSessionTask.m new file mode 100644 index 0000000..10019c3 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKURLSessionTask.m @@ -0,0 +1,150 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKURLSessionTask.h" + +#import "FBSDKInternalUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKSettings.h" + +@interface FBSDKURLSessionTask () + +@property (nonatomic, strong) NSURLSessionTask *task; +@property (nonatomic, copy) FBSDKURLSessionTaskHandler handler; +@property (nonatomic, assign) uint64_t requestStartTime; +@property (nonatomic, assign, readonly) NSUInteger loggerSerialNumber; + +@end + +@implementation FBSDKURLSessionTask + +- (instancetype)initWithRequest:(NSURLRequest *)request + fromSession:(NSURLSession *)session + completionHandler:(FBSDKURLSessionTaskHandler)handler +{ + if ((self = [super init])) { + _requestStartTime = [FBSDKInternalUtility currentTimeInMilliseconds]; + _loggerSerialNumber = [FBSDKLogger generateSerialNumber]; + _handler = [handler copy]; + __weak FBSDKURLSessionTask *weakSelf = self; + _task = [session dataTaskWithRequest:request + completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { + if (error) { + [weakSelf taskDidCompleteWithError:error]; + } else { + [weakSelf taskDidCompleteWithResponse:response data:data]; + } + }]; + } + return self; +} + +#pragma mark - Logging and Completion + +- (void)logAndInvokeHandler:(FBSDKURLSessionTaskHandler)handler + error:(NSError *)error { + if (error) { + NSString *logEntry = [NSString + stringWithFormat:@"FBSDKURLSessionTask <#%lu>:\n Error: '%@'\n%@\n", + (unsigned long)self.loggerSerialNumber, + error.localizedDescription, + error.userInfo]; + + [self logMessage:logEntry]; + } + + [self invokeHandler:handler error:error response:nil responseData:nil]; +} + +- (void)logAndInvokeHandler:(FBSDKURLSessionTaskHandler)handler + response:(NSURLResponse *)response + responseData:(NSData *)responseData { + // Basic FBSDKURLSessionTask logging just prints out the URL. FBSDKGraphRequest logging provides more details. + NSString *mimeType = response.MIMEType; + NSMutableString *mutableLogEntry = [NSMutableString stringWithFormat:@"FBSDKURLSessionTask <#%lu>:\n Duration: %llu msec\nResponse Size: %lu kB\n MIME type: %@\n", + (unsigned long)self.loggerSerialNumber, + [FBSDKInternalUtility currentTimeInMilliseconds] - self.requestStartTime, + (unsigned long)responseData.length / 1024, + mimeType]; + + if ([mimeType isEqualToString:@"text/javascript"]) { + NSString *responseUTF8 = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; + [mutableLogEntry appendFormat:@" Response:\n%@\n\n", responseUTF8]; + } + + [self logMessage:mutableLogEntry]; + + [self invokeHandler:handler error:nil response:response responseData:responseData]; +} + +- (void)invokeHandler:(FBSDKURLSessionTaskHandler)handler + error:(NSError *)error + response:(NSURLResponse *)response + responseData:(NSData *)responseData { + if (handler != nil) { + dispatch_async(dispatch_get_main_queue(), ^{ + handler(error, response, responseData); + }); + } +} + +- (void)logMessage:(NSString *)message +{ + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorNetworkRequests formatString:@"%@", message]; +} + +- (void)taskDidCompleteWithResponse:(NSURLResponse *)response data:(NSData *)data +{ + @try { + [self logAndInvokeHandler:self.handler response:response responseData:data]; + } @finally { + self.handler = nil; + } +} + +- (void)taskDidCompleteWithError:(NSError *)error +{ + @try { + if ([error.domain isEqualToString:NSURLErrorDomain] && error.code == kCFURLErrorSecureConnectionFailed) { + NSOperatingSystemVersion iOS9Version = { .majorVersion = 9, .minorVersion = 0, .patchVersion = 0 }; + if ([FBSDKInternalUtility isOSRunTimeVersionAtLeast:iOS9Version]) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + logEntry:@"WARNING: FBSDK secure network request failed. Please verify you have configured your " + "app for Application Transport Security compatibility described at https://developers.facebook.com/docs/ios/ios9"]; + } + } + [self logAndInvokeHandler:self.handler error:error]; + } @finally { + self.handler = nil; + } +} + +#pragma mark - Task State + +- (void)start +{ + [self.task resume]; +} + +- (void)cancel +{ + [self.task cancel]; + self.handler = nil; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKDialogConfiguration.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKDialogConfiguration.h new file mode 100644 index 0000000..f329594 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKDialogConfiguration.h @@ -0,0 +1,37 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +@interface FBSDKDialogConfiguration : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +- (instancetype)initWithName:(NSString *)name + URL:(NSURL *)URL + appVersions:(NSArray *)appVersions +NS_DESIGNATED_INITIALIZER; + +@property (nonatomic, copy, readonly) NSArray *appVersions; +@property (nonatomic, copy, readonly) NSString *name; +@property (nonatomic, copy, readonly) NSURL *URL; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKDialogConfiguration.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKDialogConfiguration.m new file mode 100644 index 0000000..9010fb9 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKDialogConfiguration.m @@ -0,0 +1,70 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKDialogConfiguration.h" + +#define FBSDK_DIALOG_CONFIGURATION_APP_VERSIONS_KEY @"appVersions" +#define FBSDK_DIALOG_CONFIGURATION_NAME_KEY @"name" +#define FBSDK_DIALOG_CONFIGURATION_URL_KEY @"url" + +@implementation FBSDKDialogConfiguration + +#pragma mark - Object Lifecycle + +- (instancetype)initWithName:(NSString *)name URL:(NSURL *)URL appVersions:(NSArray *)appVersions +{ + if ((self = [super init])) { + _name = [name copy]; + _URL = [URL copy]; + _appVersions = [appVersions copy]; + } + return self; +} + +#pragma mark NSCoding + ++ (BOOL)supportsSecureCoding +{ + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder +{ + NSString *name = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_DIALOG_CONFIGURATION_NAME_KEY]; + NSURL *URL = [decoder decodeObjectOfClass:[NSURL class] forKey:FBSDK_DIALOG_CONFIGURATION_URL_KEY]; + NSSet *appVersionsClasses = [NSSet setWithObjects:[NSArray class], [NSNumber class], nil]; + NSArray *appVersions = [decoder decodeObjectOfClasses:appVersionsClasses + forKey:FBSDK_DIALOG_CONFIGURATION_APP_VERSIONS_KEY]; + return [self initWithName:name URL:URL appVersions:appVersions]; +} + +- (void)encodeWithCoder:(NSCoder *)encoder +{ + [encoder encodeObject:_appVersions forKey:FBSDK_DIALOG_CONFIGURATION_APP_VERSIONS_KEY]; + [encoder encodeObject:_name forKey:FBSDK_DIALOG_CONFIGURATION_NAME_KEY]; + [encoder encodeObject:_URL forKey:FBSDK_DIALOG_CONFIGURATION_URL_KEY]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone +{ + return self; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfiguration.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfiguration.h new file mode 100644 index 0000000..0c75bb8 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfiguration.h @@ -0,0 +1,39 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKErrorRecoveryConfiguration.h" + +@class FBSDKGraphRequest; + +// maps codes and subcodes pairs to FBSDKErrorRecoveryConfiguration instances. +@interface FBSDKErrorConfiguration : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +// initialize from optional dictionary of existing configurations. If not supplied a fallback will be created. +- (instancetype)initWithDictionary:(NSDictionary *)dictionary NS_DESIGNATED_INITIALIZER; + +// parses the array (supplied from app settings endpoint) +- (void)parseArray:(NSArray *)array; + +// NSString "code" instances support "*" wildcard semantics (nil is treated as "*" also) +// 'request' is optional, typically for identifying special graph request semantics (e.g., no recovery for client token) +- (FBSDKErrorRecoveryConfiguration *)recoveryConfigurationForCode:(NSString *)code subcode:(NSString *)subcode request:(FBSDKGraphRequest *)request; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfiguration.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfiguration.m new file mode 100644 index 0000000..fb98e36 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfiguration.m @@ -0,0 +1,171 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKErrorConfiguration.h" + +#import "FBSDKCoreKit+Internal.h" +#import "FBSDKErrorRecoveryConfiguration.h" + +static NSString *const kErrorCategoryOther = @"other"; +static NSString *const kErrorCategoryTransient = @"transient"; +static NSString *const kErrorCategoryLogin = @"login"; + +#define FBSDKERRORCONFIGURATION_DICTIONARY_KEY @"configurationDictionary" + +@implementation FBSDKErrorConfiguration +{ + NSMutableDictionary *_configurationDictionary; +} + +- (instancetype)initWithDictionary:(NSDictionary *)dictionary +{ + if ((self = [super init])) { + if (dictionary) { + _configurationDictionary = [NSMutableDictionary dictionaryWithDictionary:dictionary]; + } else { + _configurationDictionary = [NSMutableDictionary dictionary]; + NSString *localizedOK = + NSLocalizedStringWithDefaultValue(@"ErrorRecovery.OK", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"OK", + @"The title of the label to start attempting error recovery"); + NSString *localizedCancel = + NSLocalizedStringWithDefaultValue(@"ErrorRecovery.Cancel", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Cancel", + @"The title of the label to decline attempting error recovery"); + NSString *localizedTransientSuggestion = + NSLocalizedStringWithDefaultValue(@"ErrorRecovery.Transient.Suggestion", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"The server is temporarily busy, please try again.", + @"The fallback message to display to retry transient errors"); + NSString *localizedLoginRecoverableSuggestion = + NSLocalizedStringWithDefaultValue(@"ErrorRecovery.Login.Suggestion", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Please log into this app again to reconnect your Facebook account.", + @"The fallback message to display to recover invalidated tokens"); + NSArray *fallbackArray = @[ + @{ @"name" : @"login", + @"items" : @[ @{ @"code" : @102 }, + @{ @"code" : @190 } ], + @"recovery_message" : localizedLoginRecoverableSuggestion, + @"recovery_options" : @[ localizedOK, localizedCancel] + }, + @{ @"name" : @"transient", + @"items" : @[ @{ @"code" : @1 }, + @{ @"code" : @2 }, + @{ @"code" : @4 }, + @{ @"code" : @9 }, + @{ @"code" : @17 }, + @{ @"code" : @341 } ], + @"recovery_message" : localizedTransientSuggestion, + @"recovery_options" : @[ localizedOK] + }, + ]; + [self parseArray:fallbackArray]; + } + } + return self; +} + +- (FBSDKErrorRecoveryConfiguration *)recoveryConfigurationForCode:(NSString *)code subcode:(NSString *)subcode request:(FBSDKGraphRequest *)request +{ + code = code ?: @"*"; + subcode = subcode ?: @"*"; + FBSDKErrorRecoveryConfiguration *configuration = (_configurationDictionary[code][subcode] ?: + _configurationDictionary[code][@"*"] ?: + _configurationDictionary[@"*"][subcode] ?: + _configurationDictionary[@"*"][@"*"]); + if (configuration.errorCategory == FBSDKGraphRequestErrorRecoverable && + [FBSDKSettings clientToken] && + [request.parameters[@"access_token"] hasSuffix:[FBSDKSettings clientToken]]) { + // do not attempt to recovery client tokens. + return nil; + } + return configuration; +} + +- (void)parseArray:(NSArray *)array +{ + for (NSDictionary *dictionary in array) { + [dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *key, id obj, BOOL *stop) { + FBSDKGraphRequestError category; + NSString *action = dictionary[@"name"]; + if ([action isEqualToString:kErrorCategoryOther]) { + category = FBSDKGraphRequestErrorOther; + } else if ([action isEqualToString:kErrorCategoryTransient]) { + category = FBSDKGraphRequestErrorTransient; + } else { + category = FBSDKGraphRequestErrorRecoverable; + } + NSString *suggestion = dictionary[@"recovery_message"]; + NSArray *options = dictionary[@"recovery_options"]; + for (NSDictionary *codeSubcodesDictionary in dictionary[@"items"]) { + NSString *code = [codeSubcodesDictionary[@"code"] stringValue]; + + NSMutableDictionary *currentSubcodes = self->_configurationDictionary[code]; + if (!currentSubcodes) { + currentSubcodes = [NSMutableDictionary dictionary]; + self->_configurationDictionary[code] = currentSubcodes; + } + + NSArray *subcodes = codeSubcodesDictionary[@"subcodes"]; + if (subcodes.count > 0) { + for (NSNumber *subcodeNumber in subcodes) { + currentSubcodes[subcodeNumber.stringValue] = [[FBSDKErrorRecoveryConfiguration alloc] + initWithRecoveryDescription:suggestion + optionDescriptions:options + category:category + recoveryActionName:action]; + } + } else { + currentSubcodes[@"*"] = [[FBSDKErrorRecoveryConfiguration alloc] + initWithRecoveryDescription:suggestion + optionDescriptions:options + category:category + recoveryActionName:action]; + } + } + }]; + } +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding +{ + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder +{ + NSSet *classes = [[NSSet alloc] initWithObjects:[NSDictionary class], [FBSDKErrorRecoveryConfiguration class], nil]; + NSDictionary *configurationDictionary = [decoder decodeObjectOfClasses:classes + forKey:FBSDKERRORCONFIGURATION_DICTIONARY_KEY]; + return [self initWithDictionary:configurationDictionary]; +} + +- (void)encodeWithCoder:(NSCoder *)encoder +{ + [encoder encodeObject:_configurationDictionary forKey:FBSDKERRORCONFIGURATION_DICTIONARY_KEY]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone +{ + return self; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorRecoveryConfiguration.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorRecoveryConfiguration.h new file mode 100644 index 0000000..9785985 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorRecoveryConfiguration.h @@ -0,0 +1,38 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +//immutable +@interface FBSDKErrorRecoveryConfiguration : NSObject + +@property (nonatomic, readonly) NSString *localizedRecoveryDescription; +@property (nonatomic, readonly) NSArray *localizedRecoveryOptionDescriptions; +@property (nonatomic, readonly) FBSDKGraphRequestError errorCategory; +@property (nonatomic, readonly) NSString *recoveryActionName; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +- (instancetype)initWithRecoveryDescription:(NSString *)description + optionDescriptions:(NSArray *)optionDescriptions + category:(FBSDKGraphRequestError)category + recoveryActionName:(NSString *)recoveryActionName NS_DESIGNATED_INITIALIZER; +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorRecoveryConfiguration.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorRecoveryConfiguration.m new file mode 100644 index 0000000..97eb061 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorRecoveryConfiguration.m @@ -0,0 +1,77 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKErrorRecoveryConfiguration.h" + +#define FBSDK_ERROR_RECOVERY_CONFIGURATION_DESCRIPTION_KEY @"description" +#define FBSDK_ERROR_RECOVERY_CONFIGURATION_OPTIONS_KEY @"options" +#define FBSDK_ERROR_RECOVERY_CONFIGURATION_CATEGORY_KEY @"category" +#define FBSDK_ERROR_RECOVERY_CONFIGURATION_ACTION_KEY @"action" + +@implementation FBSDKErrorRecoveryConfiguration + +- (instancetype)initWithRecoveryDescription:(NSString *)description + optionDescriptions:(NSArray *)optionDescriptions + category:(FBSDKGraphRequestError)category + recoveryActionName:(NSString *)recoveryActionName { + if ((self = [super init])) { + _localizedRecoveryDescription = [description copy]; + _localizedRecoveryOptionDescriptions = [optionDescriptions copy]; + _errorCategory = category; + _recoveryActionName = [recoveryActionName copy]; + } + return self; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding +{ + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder +{ + NSString *description = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_ERROR_RECOVERY_CONFIGURATION_DESCRIPTION_KEY]; + NSArray *options = [decoder decodeObjectOfClass:[NSArray class] forKey:FBSDK_ERROR_RECOVERY_CONFIGURATION_OPTIONS_KEY]; + NSNumber *category = [decoder decodeObjectOfClass:[NSNumber class] forKey:FBSDK_ERROR_RECOVERY_CONFIGURATION_CATEGORY_KEY]; + NSString *action = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_ERROR_RECOVERY_CONFIGURATION_ACTION_KEY]; + + return [self initWithRecoveryDescription:description + optionDescriptions:options + category:category.unsignedIntegerValue + recoveryActionName:action]; +} + +- (void)encodeWithCoder:(NSCoder *)encoder +{ + [encoder encodeObject:_localizedRecoveryDescription forKey:FBSDK_ERROR_RECOVERY_CONFIGURATION_DESCRIPTION_KEY]; + [encoder encodeObject:_localizedRecoveryOptionDescriptions forKey:FBSDK_ERROR_RECOVERY_CONFIGURATION_OPTIONS_KEY]; + [encoder encodeObject:@(_errorCategory) forKey:FBSDK_ERROR_RECOVERY_CONFIGURATION_CATEGORY_KEY]; + [encoder encodeObject:_recoveryActionName forKey:FBSDK_ERROR_RECOVERY_CONFIGURATION_ACTION_KEY]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone +{ + //immutable + return self; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKGateKeeperManager.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKGateKeeperManager.h new file mode 100644 index 0000000..e2a9228 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKGateKeeperManager.h @@ -0,0 +1,43 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#define FBSDK_GATEKEEPER_MANAGER_CACHE_TIMEOUT (60 * 60) + +NS_ASSUME_NONNULL_BEGIN + +@interface FBSDKGateKeeperManager : NSObject +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + Returns the locally cached configuration. + */ ++ (BOOL)boolForKey:(NSString *)key + appID:(NSString *)appID + defaultValue:(BOOL)defaultValue; + +/** + Load the gate keeper configurations from server + */ ++ (void)loadGateKeepers; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKGateKeeperManager.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKGateKeeperManager.m new file mode 100644 index 0000000..59224c7 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKGateKeeperManager.m @@ -0,0 +1,176 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + + +#import "FBSDKGateKeeperManager.h" + +#import + +#import + +#import "FBSDKAppEventsUtility.h" +#import "FBSDKGraphRequest+Internal.h" +#import "FBSDKGraphRequest.h" +#import "FBSDKSettings.h" +#import "FBSDKTypeUtility.h" + +#define FBSDK_GATEKEEPER_USER_DEFAULTS_KEY @"com.facebook.sdk:gateKeeper%@" + +#define FBSDK_GATEKEEPER_APP_GATEKEEPER_EDGE @"mobile_sdk_gk" +#define FBSDK_GATEKEEPER_APP_GATEKEEPER_FIELDS @"gatekeepers" + +@implementation FBSDKGateKeeperManager + +static NSMutableDictionary *_gateKeepers; +static const NSTimeInterval kTimeout = 4.0; +static NSDate *_timestamp; +static BOOL _loadingGateKeepers; +static BOOL _requeryFinishedForAppStart; + +#pragma mark - Public Class Methods + ++ (BOOL)boolForKey:(NSString *)key + appID:(NSString *)appID + defaultValue:(BOOL)defaultValue +{ + [self loadGateKeepers]; + if (appID == nil || _gateKeepers == nil || _gateKeepers[appID] == nil) { + return defaultValue; + } + NSDictionary *gateKeeper = [FBSDKTypeUtility dictionaryValue:_gateKeepers[appID]]; + return gateKeeper[key] == nil ? defaultValue : [gateKeeper[key] boolValue]; +} + ++ (void)loadGateKeepers +{ + NSString *appID = [FBSDKSettings appID]; + @synchronized(self) { + if (_gateKeepers == nil) { + _gateKeepers = [[NSMutableDictionary alloc] init]; + } + // load the defaults + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *defaultKey = [NSString stringWithFormat:FBSDK_GATEKEEPER_USER_DEFAULTS_KEY, + appID]; + NSData *data = [defaults objectForKey:defaultKey]; + if ([data isKindOfClass:[NSData class]]) { + NSMutableDictionary *gatekeeper = [NSKeyedUnarchiver unarchiveObjectWithData:data]; + if (gatekeeper != nil && [gatekeeper isKindOfClass:[NSMutableDictionary class]] && appID != nil) { + _gateKeepers[appID] = gatekeeper; + } + } + + // Query the server when the requery is not finished for app start or the timestamp is not valid + if (![self _gateKeeperIsValid]) { + if (!_loadingGateKeepers) { + _loadingGateKeepers = YES; + FBSDKGraphRequest *request = [[self class] requestToLoadGateKeepers:appID]; + + // start request with specified timeout instead of the default 180s + FBSDKGraphRequestConnection *requestConnection = [[FBSDKGraphRequestConnection alloc] init]; + requestConnection.timeout = kTimeout; + [requestConnection addRequest:request completionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + _requeryFinishedForAppStart = YES; + [self processLoadRequestResponse:result error:error appID:appID]; + }]; + [requestConnection start]; + } + } + } +} + +#pragma mark - Internal Class Methods + ++ (FBSDKGraphRequest *)requestToLoadGateKeepers:(NSString *)appID +{ + NSString *sdkVersion = [FBSDKSettings sdkVersion]; + + NSDictionary *parameters = @{ @"platform": @"ios" , + @"sdk_version": sdkVersion, + @"fields": FBSDK_GATEKEEPER_APP_GATEKEEPER_FIELDS}; + + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:[NSString stringWithFormat:@"%@/%@", + appID, FBSDK_GATEKEEPER_APP_GATEKEEPER_EDGE] + parameters:parameters + tokenString:nil + HTTPMethod:nil + flags:FBSDKGraphRequestFlagSkipClientToken | FBSDKGraphRequestFlagDisableErrorRecovery]; + return request; +} + +#pragma mark - Helper Class Methods + ++ (void)processLoadRequestResponse:(id)result error:(NSError *)error appID:(NSString *)appID +{ + @synchronized(self) { + _loadingGateKeepers = NO; + + if (error) { + return; + } + + // Update the timestamp only when there is no error + _timestamp = [NSDate date]; + + NSMutableDictionary *gateKeeper = _gateKeepers[appID]; + if (gateKeeper == nil) { + gateKeeper = [[NSMutableDictionary alloc] init]; + } + NSDictionary *resultDictionary = [FBSDKTypeUtility dictionaryValue:result]; + NSDictionary *fetchedData = [FBSDKTypeUtility dictionaryValue:[resultDictionary[@"data"] firstObject]]; + NSArray *gateKeeperList = fetchedData != nil ? [FBSDKTypeUtility arrayValue:fetchedData[FBSDK_GATEKEEPER_APP_GATEKEEPER_FIELDS]] : nil; + + if (gateKeeperList != nil) { + // updates gate keeper with fetched data + for (id gateKeeperEntry in gateKeeperList) { + NSDictionary *entry = [FBSDKTypeUtility dictionaryValue:gateKeeperEntry]; + NSString *key = [FBSDKTypeUtility stringValue:entry[@"key"]]; + id value = entry[@"value"]; + if (entry != nil && key != nil && value != nil) { + gateKeeper[key] = value; + } + } + _gateKeepers[appID] = gateKeeper; + } + + // update the cached copy in user defaults + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *defaultKey = [NSString stringWithFormat:FBSDK_GATEKEEPER_USER_DEFAULTS_KEY, + appID]; + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:gateKeeper]; + [defaults setObject:data forKey:defaultKey]; + } +} + ++ (BOOL)_gateKeeperTimestampIsValid:(NSDate *)timestamp +{ + if (timestamp == nil) { + return NO; + } + return ([[NSDate date] timeIntervalSinceDate:timestamp] < FBSDK_GATEKEEPER_MANAGER_CACHE_TIMEOUT); +} + ++ (BOOL)_gateKeeperIsValid +{ + if (_requeryFinishedForAppStart && (_timestamp && [self _gateKeeperTimestampIsValid:_timestamp])) { + return YES; + } + return NO; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration+Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration+Internal.h new file mode 100644 index 0000000..2e71d7b --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration+Internal.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameDefault; +FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameSharing; + +FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationFeatureUseNativeFlow; +FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationFeatureUseSafariViewController; diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration.h new file mode 100644 index 0000000..b4e17ba --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration.h @@ -0,0 +1,105 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +#import "FBSDKDialogConfiguration.h" +#import "FBSDKErrorConfiguration.h" + +// login kit +FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameLogin; + +// share kit +FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameAppInvite; +FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameGameRequest; +FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameGroup; +FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameLike; +FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameMessage; +FOUNDATION_EXPORT NSString *const FBSDKDialogConfigurationNameShare; + +FOUNDATION_EXPORT const NSInteger FBSDKServerConfigurationVersion; + +typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationSmartLoginOptions) +{ + FBSDKServerConfigurationSmartLoginOptionsUnknown = 0, + FBSDKServerConfigurationSmartLoginOptionsEnabled = 1 << 0, + FBSDKServerConfigurationSmartLoginOptionsRequireConfirmation = 1 << 1, +}; + +@interface FBSDKServerConfiguration : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +- (instancetype)initWithAppID:(NSString *)appID + appName:(NSString *)appName + loginTooltipEnabled:(BOOL)loginTooltipEnabled + loginTooltipText:(NSString *)loginTooltipText + defaultShareMode:(NSString *)defaultShareMode + advertisingIDEnabled:(BOOL)advertisingIDEnabled + implicitLoggingEnabled:(BOOL)implicitLoggingEnabled +implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled + codelessEventsEnabled:(BOOL)codelessEventsEnabled + systemAuthenticationEnabled:(BOOL)systemAuthenticationEnabled + nativeAuthFlowEnabled:(BOOL)nativeAuthFlowEnabled + uninstallTrackingEnabled:(BOOL)uninstallTrackingEnabled + dialogConfigurations:(NSDictionary *)dialogConfigurations + dialogFlows:(NSDictionary *)dialogFlows + timestamp:(NSDate *)timestamp + errorConfiguration:(FBSDKErrorConfiguration *)errorConfiguration + sessionTimeoutInterval:(NSTimeInterval) sessionTimeoutInterval + defaults:(BOOL)defaults + loggingToken:(NSString *)loggingToken + smartLoginOptions:(FBSDKServerConfigurationSmartLoginOptions)smartLoginOptions + smartLoginBookmarkIconURL:(NSURL *)smartLoginBookmarkIconURL + smartLoginMenuIconURL:(NSURL *)smartLoginMenuIconURL + updateMessage:(NSString *)updateMessage + eventBindings:(NSArray *)eventBindings +NS_DESIGNATED_INITIALIZER; + +@property (nonatomic, assign, readonly, getter=isAdvertisingIDEnabled) BOOL advertisingIDEnabled; +@property (nonatomic, copy, readonly) NSString *appID; +@property (nonatomic, copy, readonly) NSString *appName; +@property (nonatomic, assign, readonly, getter=isDefaults) BOOL defaults; +@property (nonatomic, copy, readonly) NSString *defaultShareMode; +@property (nonatomic, strong, readonly) FBSDKErrorConfiguration *errorConfiguration; +@property (nonatomic, assign, readonly, getter=isImplicitLoggingSupported) BOOL implicitLoggingEnabled; +@property (nonatomic, assign, readonly, getter=isImplicitPurchaseLoggingSupported) BOOL implicitPurchaseLoggingEnabled; +@property (nonatomic, assign, readonly, getter=isCodelessEventsEnabled) BOOL codelessEventsEnabled; +@property (nonatomic, assign, readonly, getter=isLoginTooltipEnabled) BOOL loginTooltipEnabled; +@property (nonatomic, assign, readonly, getter=isNativeAuthFlowEnabled) BOOL nativeAuthFlowEnabled; +@property (nonatomic, assign, readonly, getter=isSystemAuthenticationEnabled) BOOL systemAuthenticationEnabled; +@property (nonatomic, assign, readonly, getter=isUninstallTrackingEnabled) BOOL uninstallTrackingEnabled; +@property (nonatomic, copy, readonly) NSString *loginTooltipText; +@property (nonatomic, copy, readonly) NSDate *timestamp; +@property (nonatomic, assign) NSTimeInterval sessionTimoutInterval; +@property (nonatomic, copy, readonly) NSString *loggingToken; +@property (nonatomic, assign, readonly) FBSDKServerConfigurationSmartLoginOptions smartLoginOptions; +@property (nonatomic, copy, readonly) NSURL *smartLoginBookmarkIconURL; +@property (nonatomic, copy, readonly) NSURL *smartLoginMenuIconURL; +@property (nonatomic, copy, readonly) NSString *updateMessage; +@property (nonatomic, copy, readonly) NSArray *eventBindings; +@property (nonatomic, readonly) NSInteger version; + +- (FBSDKDialogConfiguration *)dialogConfigurationForDialogName:(NSString *)dialogName; +- (BOOL)useNativeDialogForDialogName:(NSString *)dialogName; +- (BOOL)useSafariViewControllerForDialogName:(NSString *)dialogName; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration.m new file mode 100644 index 0000000..d437d72 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration.m @@ -0,0 +1,283 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKServerConfiguration.h" +#import "FBSDKServerConfiguration+Internal.h" + +#import "FBSDKInternalUtility.h" + +#define FBSDK_SERVER_CONFIGURATION_ADVERTISING_ID_ENABLED_KEY @"advertisingIDEnabled" +#define FBSDK_SERVER_CONFIGURATION_APP_ID_KEY @"appID" +#define FBSDK_SERVER_CONFIGURATION_APP_NAME_KEY @"appName" +#define FBSDK_SERVER_CONFIGURATION_DIALOG_CONFIGS_KEY @"dialogConfigs" +#define FBSDK_SERVER_CONFIGURATION_DIALOG_FLOWS_KEY @"dialogFlows" +#define FBSDK_SERVER_CONFIGURATION_ERROR_CONFIGS_KEY @"errorConfigs" +#define FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_KEY @"implicitLoggingEnabled" +#define FBSDK_SERVER_CONFIGURATION_DEFAULT_SHARE_MODE_KEY @"defaultShareMode" +#define FBSDK_SERVER_CONFIGURATION_IMPLICIT_PURCHASE_LOGGING_ENABLED_KEY @"implicitPurchaseLoggingEnabled" +#define FBSDK_SERVER_CONFIGURATION_CODELESS_EVENTS_ENABLED_KEY @"codelessEventsEnabled" +#define FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_ENABLED_KEY @"loginTooltipEnabled" +#define FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_KEY @"loginTooltipText" +#define FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_KEY @"systemAuthenticationEnabled" +#define FBSDK_SERVER_CONFIGURATION_NATIVE_AUTH_FLOW_ENABLED_KEY @"nativeAuthFlowEnabled" +#define FBSDK_SERVER_CONFIGURATION_TIMESTAMP_KEY @"timestamp" +#define FBSDK_SERVER_CONFIGURATION_SESSION_TIMEOUT_INTERVAL @"sessionTimeoutInterval" +#define FBSDK_SERVER_CONFIGURATION_LOGGING_TOKEN @"loggingToken" +#define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_KEY @"smartLoginEnabled" +#define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_KEY @"smarstLoginBookmarkIconURL" +#define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_KEY @"smarstLoginBookmarkMenuURL" +#define FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_KEY @"SDKUpdateMessage" +#define FBSDK_SERVER_CONFIGURATION_EVENT_BINDINGS @"eventBindings" +#define FBSDK_SERVER_CONFIGURATION_VERSION_KEY @"version" +#define FBSDK_SERVER_CONFIGURATION_TRACK_UNINSTALL_ENABLED_KEY @"trackAppUninstallEnabled" + +#pragma mark - Dialog Names + +NSString *const FBSDKDialogConfigurationNameDefault = @"default"; + +NSString *const FBSDKDialogConfigurationNameLogin = @"login"; + +NSString *const FBSDKDialogConfigurationNameSharing = @"sharing"; + +NSString *const FBSDKDialogConfigurationNameAppInvite = @"app_invite"; +NSString *const FBSDKDialogConfigurationNameGameRequest = @"game_request"; +NSString *const FBSDKDialogConfigurationNameGroup = @"group"; +NSString *const FBSDKDialogConfigurationNameLike = @"like"; +NSString *const FBSDKDialogConfigurationNameMessage = @"message"; +NSString *const FBSDKDialogConfigurationNameShare = @"share"; + +NSString *const FBSDKDialogConfigurationFeatureUseNativeFlow = @"use_native_flow"; +NSString *const FBSDKDialogConfigurationFeatureUseSafariViewController = @"use_safari_vc"; + +// Increase this value when adding new fields and previous cached configurations should be +// treated as stale. +const NSInteger FBSDKServerConfigurationVersion = 2; + +@implementation FBSDKServerConfiguration +{ + NSDictionary *_dialogConfigurations; + NSDictionary *_dialogFlows; + NSInteger _version; +} + +#pragma mark - Object Lifecycle + +- (instancetype)initWithAppID:(NSString *)appID + appName:(NSString *)appName + loginTooltipEnabled:(BOOL)loginTooltipEnabled + loginTooltipText:(NSString *)loginTooltipText + defaultShareMode:(NSString*)defaultShareMode + advertisingIDEnabled:(BOOL)advertisingIDEnabled + implicitLoggingEnabled:(BOOL)implicitLoggingEnabled +implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled + codelessEventsEnabled:(BOOL)codelessEventsEnabled + systemAuthenticationEnabled:(BOOL)systemAuthenticationEnabled + nativeAuthFlowEnabled:(BOOL)nativeAuthFlowEnabled + uninstallTrackingEnabled:(BOOL)uninstallTrackingEnabled + dialogConfigurations:(NSDictionary *)dialogConfigurations + dialogFlows:(NSDictionary *)dialogFlows + timestamp:(NSDate *)timestamp + errorConfiguration:(FBSDKErrorConfiguration *)errorConfiguration + sessionTimeoutInterval:(NSTimeInterval) sessionTimeoutInterval + defaults:(BOOL)defaults + loggingToken:(NSString *)loggingToken + smartLoginOptions:(FBSDKServerConfigurationSmartLoginOptions)smartLoginOptions + smartLoginBookmarkIconURL:(NSURL *)smartLoginBookmarkIconURL + smartLoginMenuIconURL:(NSURL *)smartLoginMenuIconURL + updateMessage:(NSString *)updateMessage + eventBindings:(NSArray *)eventBindings +{ + if ((self = [super init])) { + _appID = [appID copy]; + _appName = [appName copy]; + _loginTooltipEnabled = loginTooltipEnabled; + _loginTooltipText = [loginTooltipText copy]; + _defaultShareMode = defaultShareMode; + _advertisingIDEnabled = advertisingIDEnabled; + _implicitLoggingEnabled = implicitLoggingEnabled; + _implicitPurchaseLoggingEnabled = implicitPurchaseLoggingEnabled; + _codelessEventsEnabled = codelessEventsEnabled; + _systemAuthenticationEnabled = systemAuthenticationEnabled; + _uninstallTrackingEnabled = uninstallTrackingEnabled; + _nativeAuthFlowEnabled = nativeAuthFlowEnabled; + _dialogConfigurations = [dialogConfigurations copy]; + _dialogFlows = [dialogFlows copy]; + _timestamp = [timestamp copy]; + _errorConfiguration = [errorConfiguration copy]; + _sessionTimoutInterval = sessionTimeoutInterval; + _defaults = defaults; + _loggingToken = loggingToken; + _smartLoginOptions = smartLoginOptions; + _smartLoginMenuIconURL = [smartLoginMenuIconURL copy]; + _smartLoginBookmarkIconURL = [smartLoginBookmarkIconURL copy]; + _updateMessage = [updateMessage copy]; + _eventBindings = eventBindings; + _version = FBSDKServerConfigurationVersion; + } + return self; +} + +#pragma mark - Public Methods + +- (FBSDKDialogConfiguration *)dialogConfigurationForDialogName:(NSString *)dialogName +{ + return _dialogConfigurations[dialogName]; +} + +- (BOOL)useNativeDialogForDialogName:(NSString *)dialogName +{ + return [self _useFeatureWithKey:FBSDKDialogConfigurationFeatureUseNativeFlow dialogName:dialogName]; +} + +- (BOOL)useSafariViewControllerForDialogName:(NSString *)dialogName +{ + return [self _useFeatureWithKey:FBSDKDialogConfigurationFeatureUseSafariViewController dialogName:dialogName]; +} + +#pragma mark - Helper Methods + +- (BOOL)_useFeatureWithKey:(NSString *)key dialogName:(NSString *)dialogName +{ + if ([dialogName isEqualToString:FBSDKDialogConfigurationNameLogin]) { + return ((NSNumber *)(_dialogFlows[dialogName][key] ?: + _dialogFlows[FBSDKDialogConfigurationNameDefault][key])).boolValue; + } else { + return ((NSNumber *)(_dialogFlows[dialogName][key] ?: + _dialogFlows[FBSDKDialogConfigurationNameSharing][key] ?: + _dialogFlows[FBSDKDialogConfigurationNameDefault][key])).boolValue; + } +} + +#pragma mark - NSCoding + ++ (BOOL)supportsSecureCoding +{ + return YES; +} + +- (id)initWithCoder:(NSCoder *)decoder +{ + NSString *appID = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_SERVER_CONFIGURATION_APP_ID_KEY]; + NSString *appName = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_SERVER_CONFIGURATION_APP_NAME_KEY]; + BOOL loginTooltipEnabled = [decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_ENABLED_KEY]; + NSString *loginTooltipText = [decoder decodeObjectOfClass:[NSString class] + forKey:FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_KEY]; + NSString *defaultShareMode = [decoder decodeObjectOfClass:[NSString class] + forKey:FBSDK_SERVER_CONFIGURATION_DEFAULT_SHARE_MODE_KEY]; + BOOL advertisingIDEnabled = [decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_ADVERTISING_ID_ENABLED_KEY]; + BOOL implicitLoggingEnabled = [decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_KEY]; + BOOL implicitPurchaseLoggingEnabled = + [decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_PURCHASE_LOGGING_ENABLED_KEY]; + BOOL codelessEventsEnabled = + [decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_CODELESS_EVENTS_ENABLED_KEY]; + BOOL systemAuthenticationEnabled = + [decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_KEY]; + BOOL uninstallTrackingEnabled = + [decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_TRACK_UNINSTALL_ENABLED_KEY]; + FBSDKServerConfigurationSmartLoginOptions smartLoginOptions = [decoder decodeIntegerForKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_KEY]; + BOOL nativeAuthFlowEnabled = [decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_NATIVE_AUTH_FLOW_ENABLED_KEY]; + NSDate *timestamp = [decoder decodeObjectOfClass:[NSDate class] forKey:FBSDK_SERVER_CONFIGURATION_TIMESTAMP_KEY]; + NSSet *dialogConfigurationsClasses = [[NSSet alloc] initWithObjects: + [NSDictionary class], + [FBSDKDialogConfiguration class], + nil]; + NSDictionary *dialogConfigurations = [decoder decodeObjectOfClasses:dialogConfigurationsClasses + forKey:FBSDK_SERVER_CONFIGURATION_DIALOG_CONFIGS_KEY]; + NSSet *dialogFlowsClasses = [[NSSet alloc] initWithObjects: + [NSDictionary class], + [NSString class], + [NSNumber class], + nil]; + NSDictionary *dialogFlows = [decoder decodeObjectOfClasses:dialogFlowsClasses + forKey:FBSDK_SERVER_CONFIGURATION_DIALOG_FLOWS_KEY]; + FBSDKErrorConfiguration *errorConfiguration = [decoder decodeObjectOfClass:[FBSDKErrorConfiguration class] forKey:FBSDK_SERVER_CONFIGURATION_ERROR_CONFIGS_KEY]; + NSTimeInterval sessionTimeoutInterval = [decoder decodeDoubleForKey:FBSDK_SERVER_CONFIGURATION_SESSION_TIMEOUT_INTERVAL]; + NSString *loggingToken = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_SERVER_CONFIGURATION_LOGGING_TOKEN]; + NSURL *smartLoginBookmarkIconURL = [decoder decodeObjectOfClass:[NSURL class] forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_KEY]; + NSURL *smartLoginMenuIconURL = [decoder decodeObjectOfClass:[NSURL class] forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_KEY]; + NSString *updateMessage = [decoder decodeObjectOfClass:[NSString class] forKey:FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_KEY]; + NSArray *eventBindings = [decoder decodeObjectOfClass:[NSArray class] forKey:FBSDK_SERVER_CONFIGURATION_EVENT_BINDINGS]; + NSInteger version = [decoder decodeIntegerForKey:FBSDK_SERVER_CONFIGURATION_VERSION_KEY]; + FBSDKServerConfiguration *configuration = [self initWithAppID:appID + appName:appName + loginTooltipEnabled:loginTooltipEnabled + loginTooltipText:loginTooltipText + defaultShareMode:defaultShareMode + advertisingIDEnabled:advertisingIDEnabled + implicitLoggingEnabled:implicitLoggingEnabled + implicitPurchaseLoggingEnabled:implicitPurchaseLoggingEnabled + codelessEventsEnabled:codelessEventsEnabled + systemAuthenticationEnabled:systemAuthenticationEnabled + nativeAuthFlowEnabled:nativeAuthFlowEnabled + uninstallTrackingEnabled:uninstallTrackingEnabled + dialogConfigurations:dialogConfigurations + dialogFlows:dialogFlows + timestamp:timestamp + errorConfiguration:errorConfiguration + sessionTimeoutInterval:sessionTimeoutInterval + defaults:NO + loggingToken:loggingToken + smartLoginOptions:smartLoginOptions + smartLoginBookmarkIconURL:smartLoginBookmarkIconURL + smartLoginMenuIconURL:smartLoginMenuIconURL + updateMessage:updateMessage + eventBindings:eventBindings + ]; + configuration->_version = version; + return configuration; +} + +- (void)encodeWithCoder:(NSCoder *)encoder +{ + [encoder encodeBool:_advertisingIDEnabled forKey:FBSDK_SERVER_CONFIGURATION_ADVERTISING_ID_ENABLED_KEY]; + [encoder encodeObject:_appID forKey:FBSDK_SERVER_CONFIGURATION_APP_ID_KEY]; + [encoder encodeObject:_appName forKey:FBSDK_SERVER_CONFIGURATION_APP_NAME_KEY]; + [encoder encodeObject:_defaultShareMode forKey:FBSDK_SERVER_CONFIGURATION_DEFAULT_SHARE_MODE_KEY]; + [encoder encodeObject:_dialogConfigurations forKey:FBSDK_SERVER_CONFIGURATION_DIALOG_CONFIGS_KEY]; + [encoder encodeObject:_dialogFlows forKey:FBSDK_SERVER_CONFIGURATION_DIALOG_FLOWS_KEY]; + [encoder encodeObject:_errorConfiguration forKey:FBSDK_SERVER_CONFIGURATION_ERROR_CONFIGS_KEY]; + [encoder encodeBool:_implicitLoggingEnabled forKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_KEY]; + [encoder encodeBool:_implicitPurchaseLoggingEnabled + forKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_PURCHASE_LOGGING_ENABLED_KEY]; + [encoder encodeBool:_codelessEventsEnabled + forKey:FBSDK_SERVER_CONFIGURATION_CODELESS_EVENTS_ENABLED_KEY]; + [encoder encodeBool:_loginTooltipEnabled forKey:FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_ENABLED_KEY]; + [encoder encodeBool:_uninstallTrackingEnabled + forKey:FBSDK_SERVER_CONFIGURATION_TRACK_UNINSTALL_ENABLED_KEY]; + [encoder encodeObject:_loginTooltipText forKey:FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_KEY]; + [encoder encodeBool:_nativeAuthFlowEnabled forKey:FBSDK_SERVER_CONFIGURATION_NATIVE_AUTH_FLOW_ENABLED_KEY]; + [encoder encodeBool:_systemAuthenticationEnabled forKey:FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_KEY]; + [encoder encodeObject:_timestamp forKey:FBSDK_SERVER_CONFIGURATION_TIMESTAMP_KEY]; + [encoder encodeDouble:_sessionTimoutInterval forKey:FBSDK_SERVER_CONFIGURATION_SESSION_TIMEOUT_INTERVAL]; + [encoder encodeObject:_loggingToken forKey:FBSDK_SERVER_CONFIGURATION_LOGGING_TOKEN]; + [encoder encodeInteger:_smartLoginOptions forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_KEY]; + [encoder encodeObject:_smartLoginBookmarkIconURL forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_KEY]; + [encoder encodeObject:_smartLoginMenuIconURL forKey:FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_KEY]; + [encoder encodeObject:_updateMessage forKey:FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_KEY]; + [encoder encodeObject:_eventBindings forKey:FBSDK_SERVER_CONFIGURATION_EVENT_BINDINGS]; + [encoder encodeInteger:_version forKey:FBSDK_SERVER_CONFIGURATION_VERSION_KEY]; +} + +#pragma mark - NSCopying + +- (id)copyWithZone:(NSZone *)zone +{ + return self; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager+Internal.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager+Internal.h new file mode 100644 index 0000000..b84b023 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager+Internal.h @@ -0,0 +1,33 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKServerConfigurationManager.h" + +@class FBSDKGraphRequest; + +@interface FBSDKServerConfigurationManager () + ++ (void)processLoadRequestResponse:(id)result error:(NSError *)error appID:(NSString *)appID; + ++ (FBSDKGraphRequest *)requestToLoadServerConfiguration:(NSString *)appID; + ++ (void)clearCache; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.h new file mode 100644 index 0000000..d5b9240 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.h @@ -0,0 +1,43 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKServerConfiguration.h" + +#define FBSDK_SERVER_CONFIGURATION_MANAGER_CACHE_TIMEOUT (60 * 60) +typedef void(^FBSDKServerConfigurationManagerLoadBlock)(FBSDKServerConfiguration *serverConfiguration, NSError *error); + +@interface FBSDKServerConfigurationManager : NSObject + +/** + Returns the locally cached configuration. + + The result will be valid for the appID from FBSDKSettings, but may be expired. A network request will be + initiated to update the configuration if a valid and unexpired configuration is not available. + */ ++ (FBSDKServerConfiguration *)cachedServerConfiguration; + +/** + Executes the completionBlock with a valid and current configuration when it is available. + + This method will use a cached configuration if it is valid and not expired. + */ ++ (void)loadServerConfigurationWithCompletionBlock:(FBSDKServerConfigurationManagerLoadBlock)completionBlock; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.m new file mode 100644 index 0000000..5b0e548 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.m @@ -0,0 +1,456 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKServerConfigurationManager+Internal.h" + +#import + +#import "FBSDKAppEventsUtility.h" +#import "FBSDKGateKeeperManager.h" +#import "FBSDKGraphRequest+Internal.h" +#import "FBSDKGraphRequest.h" +#import "FBSDKImageDownloader.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKServerConfiguration+Internal.h" +#import "FBSDKServerConfiguration.h" +#import "FBSDKSettings.h" +#import "FBSDKTypeUtility.h" + +// one hour +#define DEFAULT_SESSION_TIMEOUT_INTERVAL 60 + +#define FBSDK_SERVER_CONFIGURATION_USER_DEFAULTS_KEY @"com.facebook.sdk:serverConfiguration%@" + +#define FBSDK_SERVER_CONFIGURATION_APP_EVENTS_FEATURES_FIELD @"app_events_feature_bitmask" +#define FBSDK_SERVER_CONFIGURATION_APP_NAME_FIELD @"name" +#define FBSDK_SERVER_CONFIGURATION_DEFAULT_SHARE_MODE_FIELD @"default_share_mode" +#define FBSDK_SERVER_CONFIGURATION_DIALOG_CONFIGS_FIELD @"ios_dialog_configs" +#define FBSDK_SERVER_CONFIGURATION_DIALOG_FLOWS_FIELD @"ios_sdk_dialog_flows" +#define FBSDK_SERVER_CONFIGURATION_ERROR_CONFIGURATION_FIELD @"ios_sdk_error_categories" +#define FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_FIELD @"supports_implicit_sdk_logging" +#define FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_ENABLED_FIELD @"gdpv4_nux_enabled" +#define FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_FIELD @"gdpv4_nux_content" +#define FBSDK_SERVER_CONFIGURATION_NATIVE_PROXY_AUTH_FLOW_ENABLED_FIELD @"ios_supports_native_proxy_auth_flow" +#define FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_FIELD @"ios_supports_system_auth" +#define FBSDK_SERVER_CONFIGURATION_SESSION_TIMEOUT_FIELD @"app_events_session_timeout" +#define FBSDK_SERVER_CONFIGURATION_LOGGIN_TOKEN_FIELD @"logging_token" +#define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_FIELD @"seamless_login" +#define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_FIELD @"smart_login_bookmark_icon_url" +#define FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_FIELD @"smart_login_menu_icon_url" +#define FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_FIELD @"sdk_update_message" +#define FBSDK_SERVER_CONFIGURATION_EVENT_BINDINGS_FIELD @"auto_event_mapping_ios" + +@implementation FBSDKServerConfigurationManager + +static NSMutableArray *_completionBlocks; +static BOOL _loadingServerConfiguration; +static FBSDKServerConfiguration *_serverConfiguration; +static NSError *_serverConfigurationError; +static NSDate *_serverConfigurationErrorTimestamp; +static const NSTimeInterval kTimeout = 4.0; +static BOOL _printedUpdateMessage; +static BOOL _requeryFinishedForAppStart; + +typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures) +{ + FBSDKServerConfigurationManagerAppEventsFeaturesNone = 0, + FBSDKServerConfigurationManagerAppEventsFeaturesAdvertisingIDEnabled = 1 << 0, + FBSDKServerConfigurationManagerAppEventsFeaturesImplicitPurchaseLoggingEnabled = 1 << 1, + FBSDKServerConfigurationManagerAppEventsFeaturesCodelessEventsTriggerEnabled = 1 << 5, + FBSDKServerConfigurationManagerAppEventsFeaturesUninstallTrackingEnabled = 1 << 7, +}; + +#pragma mark - Public Class Methods + ++ (void)initialize +{ + if (self == [FBSDKServerConfigurationManager class]) { + _completionBlocks = [[NSMutableArray alloc] init]; + } +} + ++ (void)clearCache +{ + _serverConfiguration = nil; + _serverConfigurationError = nil; + _serverConfigurationErrorTimestamp = nil; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *defaultsKey = [NSString stringWithFormat:FBSDK_SERVER_CONFIGURATION_USER_DEFAULTS_KEY, [FBSDKSettings appID]]; + [defaults removeObjectForKey:defaultsKey]; + [defaults synchronize]; +} + ++ (FBSDKServerConfiguration *)cachedServerConfiguration +{ + NSString *appID = [FBSDKSettings appID]; + @synchronized(self) { + // load the server configuration if we don't have it already + [self loadServerConfigurationWithCompletionBlock:NULL]; + + // use whatever configuration we have or the default + return _serverConfiguration ?: [self _defaultServerConfigurationForAppID:appID]; + } +} + ++ (void)loadServerConfigurationWithCompletionBlock:(FBSDKServerConfigurationManagerLoadBlock)completionBlock +{ + void (^loadBlock)(void) = NULL; + NSString *appID = [FBSDKSettings appID]; + @synchronized(self) { + // validate the cached configuration has the correct appID + if (_serverConfiguration && ![_serverConfiguration.appID isEqualToString:appID]) { + _serverConfiguration = nil; + _serverConfigurationError = nil; + _serverConfigurationErrorTimestamp = nil; + } + + // load the configuration from NSUserDefaults + if (!_serverConfiguration) { + // load the defaults + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *defaultsKey = [NSString stringWithFormat:FBSDK_SERVER_CONFIGURATION_USER_DEFAULTS_KEY, appID]; + NSData *data = [defaults objectForKey:defaultsKey]; + if ([data isKindOfClass:[NSData class]]) { + // decode the configuration + FBSDKServerConfiguration *serverConfiguration = [NSKeyedUnarchiver unarchiveObjectWithData:data]; + if ([serverConfiguration isKindOfClass:[FBSDKServerConfiguration class]]) { + // ensure that the configuration points to the current appID + if ([serverConfiguration.appID isEqualToString:appID]) { + _serverConfiguration = serverConfiguration; + } + } + } + } + + if (_requeryFinishedForAppStart && + ((_serverConfiguration && [self _serverConfigurationTimestampIsValid:_serverConfiguration.timestamp] && _serverConfiguration.version >= FBSDKServerConfigurationVersion) || + (_serverConfigurationErrorTimestamp && [self _serverConfigurationTimestampIsValid:_serverConfigurationErrorTimestamp]))) { + // we have a valid server configuration, use that + loadBlock = [self _wrapperBlockForLoadBlock:completionBlock]; + } else { + // hold onto the completion block + [FBSDKInternalUtility array:_completionBlocks addObject:[completionBlock copy]]; + + // check if we are already loading + if (!_loadingServerConfiguration) { + // load the configuration from the network + _loadingServerConfiguration = YES; + FBSDKGraphRequest *request = [[self class] requestToLoadServerConfiguration:appID]; + + // start request with specified timeout instead of the default 180s + FBSDKGraphRequestConnection *requestConnection = [[FBSDKGraphRequestConnection alloc] init]; + requestConnection.timeout = kTimeout; + [requestConnection addRequest:request completionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + _requeryFinishedForAppStart = YES; + [self processLoadRequestResponse:result error:error appID:appID]; + }]; + [requestConnection start]; + } + } + } + + if (loadBlock != NULL) { + loadBlock(); + } + + // Fetch app gatekeepers + [FBSDKGateKeeperManager loadGateKeepers]; +} + +#pragma mark - Internal Class Methods + ++ (void)processLoadRequestResponse:(id)result error:(NSError *)error appID:(NSString *)appID +{ + if (error) { + [self _didProcessConfigurationFromNetwork:nil appID:appID error:error]; + return; + } + + NSDictionary *resultDictionary = [FBSDKTypeUtility dictionaryValue:result]; + NSUInteger appEventsFeatures = [FBSDKTypeUtility unsignedIntegerValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_APP_EVENTS_FEATURES_FIELD]]; + BOOL advertisingIDEnabled = (appEventsFeatures & FBSDKServerConfigurationManagerAppEventsFeaturesAdvertisingIDEnabled) != 0; + BOOL implicitPurchaseLoggingEnabled = (appEventsFeatures & FBSDKServerConfigurationManagerAppEventsFeaturesImplicitPurchaseLoggingEnabled) != 0; + BOOL codelessEventsEnabled = (appEventsFeatures & FBSDKServerConfigurationManagerAppEventsFeaturesCodelessEventsTriggerEnabled) != 0; + BOOL uninstallTrackingEnabled = (appEventsFeatures & FBSDKServerConfigurationManagerAppEventsFeaturesUninstallTrackingEnabled) != 0; + NSString *appName = [FBSDKTypeUtility stringValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_APP_NAME_FIELD]]; + BOOL loginTooltipEnabled = [FBSDKTypeUtility boolValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_ENABLED_FIELD]]; + NSString *loginTooltipText = [FBSDKTypeUtility stringValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_FIELD]]; + NSString *defaultShareMode = [FBSDKTypeUtility stringValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_DEFAULT_SHARE_MODE_FIELD]]; + BOOL implicitLoggingEnabled = [FBSDKTypeUtility boolValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_FIELD]]; + BOOL systemAuthenticationEnabled = [FBSDKTypeUtility boolValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_FIELD]]; + BOOL nativeAuthFlowEnabled = [FBSDKTypeUtility boolValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_NATIVE_PROXY_AUTH_FLOW_ENABLED_FIELD]]; + NSDictionary *dialogConfigurations = [FBSDKTypeUtility dictionaryValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_DIALOG_CONFIGS_FIELD]]; + dialogConfigurations = [self _parseDialogConfigurations:dialogConfigurations]; + NSDictionary *dialogFlows = [FBSDKTypeUtility dictionaryValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_DIALOG_FLOWS_FIELD]]; + FBSDKErrorConfiguration *errorConfiguration = [[FBSDKErrorConfiguration alloc] initWithDictionary:nil]; + [errorConfiguration parseArray:resultDictionary[FBSDK_SERVER_CONFIGURATION_ERROR_CONFIGURATION_FIELD]]; + NSTimeInterval sessionTimeoutInterval = [FBSDKTypeUtility timeIntervalValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_SESSION_TIMEOUT_FIELD]] ?: DEFAULT_SESSION_TIMEOUT_INTERVAL; + NSString *loggingToken = [FBSDKTypeUtility stringValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_LOGGIN_TOKEN_FIELD]]; + FBSDKServerConfigurationSmartLoginOptions smartLoginOptions = [FBSDKTypeUtility integerValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_FIELD]]; + NSURL *smartLoginBookmarkIconURL = [FBSDKTypeUtility URLValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_FIELD]]; + NSURL *smartLoginMenuIconURL = [FBSDKTypeUtility URLValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_FIELD]]; + NSString *updateMessage = [FBSDKTypeUtility stringValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_FIELD]]; + NSArray *eventBindings = [FBSDKTypeUtility arrayValue:resultDictionary[FBSDK_SERVER_CONFIGURATION_EVENT_BINDINGS_FIELD]]; + FBSDKServerConfiguration *serverConfiguration = [[FBSDKServerConfiguration alloc] initWithAppID:appID + appName:appName + loginTooltipEnabled:loginTooltipEnabled + loginTooltipText:loginTooltipText + defaultShareMode:defaultShareMode + advertisingIDEnabled:advertisingIDEnabled + implicitLoggingEnabled:implicitLoggingEnabled + implicitPurchaseLoggingEnabled:implicitPurchaseLoggingEnabled + codelessEventsEnabled:codelessEventsEnabled + systemAuthenticationEnabled:systemAuthenticationEnabled + nativeAuthFlowEnabled:nativeAuthFlowEnabled + uninstallTrackingEnabled:uninstallTrackingEnabled + dialogConfigurations:dialogConfigurations + dialogFlows:dialogFlows + timestamp:[NSDate date] + errorConfiguration:errorConfiguration + sessionTimeoutInterval:sessionTimeoutInterval + defaults:NO + loggingToken:loggingToken + smartLoginOptions:smartLoginOptions + smartLoginBookmarkIconURL:smartLoginBookmarkIconURL + smartLoginMenuIconURL:smartLoginMenuIconURL + updateMessage:updateMessage + eventBindings:eventBindings + ]; +#if TARGET_OS_TV + // don't download icons more than once a day. + static const NSTimeInterval kSmartLoginIconsTTL = 60 * 60 * 24; + + BOOL smartLoginEnabled = (smartLoginOptions & FBSDKServerConfigurationSmartLoginOptionsEnabled); + // for TVs go ahead and prime the images + if (smartLoginEnabled && + smartLoginMenuIconURL && + smartLoginBookmarkIconURL) { + [[FBSDKImageDownloader sharedInstance] downloadImageWithURL:serverConfiguration.smartLoginBookmarkIconURL + ttl:kSmartLoginIconsTTL + completion:NULL]; + [[FBSDKImageDownloader sharedInstance] downloadImageWithURL:serverConfiguration.smartLoginMenuIconURL + ttl:kSmartLoginIconsTTL + completion:NULL]; + } +#endif + [self _didProcessConfigurationFromNetwork:serverConfiguration appID:appID error:nil]; +} + ++ (FBSDKGraphRequest *)requestToLoadServerConfiguration:(NSString *)appID +{ + NSOperatingSystemVersion operatingSystemVersion = [FBSDKInternalUtility operatingSystemVersion]; + NSString *dialogFlowsField = [NSString stringWithFormat:@"%@.os_version(%ti.%ti.%ti)", + FBSDK_SERVER_CONFIGURATION_DIALOG_FLOWS_FIELD, + operatingSystemVersion.majorVersion, + operatingSystemVersion.minorVersion, + operatingSystemVersion.patchVersion]; + NSArray *fields = @[FBSDK_SERVER_CONFIGURATION_APP_EVENTS_FEATURES_FIELD, + FBSDK_SERVER_CONFIGURATION_APP_NAME_FIELD, + FBSDK_SERVER_CONFIGURATION_DEFAULT_SHARE_MODE_FIELD, + FBSDK_SERVER_CONFIGURATION_DIALOG_CONFIGS_FIELD, + dialogFlowsField, + FBSDK_SERVER_CONFIGURATION_ERROR_CONFIGURATION_FIELD, + FBSDK_SERVER_CONFIGURATION_IMPLICIT_LOGGING_ENABLED_FIELD, + FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_ENABLED_FIELD, + FBSDK_SERVER_CONFIGURATION_LOGIN_TOOLTIP_TEXT_FIELD, + FBSDK_SERVER_CONFIGURATION_NATIVE_PROXY_AUTH_FLOW_ENABLED_FIELD, + FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_ENABLED_FIELD, + FBSDK_SERVER_CONFIGURATION_SESSION_TIMEOUT_FIELD, + FBSDK_SERVER_CONFIGURATION_LOGGIN_TOKEN_FIELD +#if !TARGET_OS_TV + ,FBSDK_SERVER_CONFIGURATION_EVENT_BINDINGS_FIELD +#endif +#ifdef DEBUG + ,FBSDK_SERVER_CONFIGURATION_UPDATE_MESSAGE_FIELD +#endif +#if TARGET_OS_TV + ,FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_OPTIONS_FIELD, + FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_BOOKMARK_ICON_URL_FIELD, + FBSDK_SERVER_CONFIGURATION_SMART_LOGIN_MENU_ICON_URL_FIELD +#endif + ]; + NSDictionary *parameters = @{ @"fields": [fields componentsJoinedByString:@","]}; + + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:appID + parameters:parameters + tokenString:nil + HTTPMethod:nil + flags:FBSDKGraphRequestFlagSkipClientToken | FBSDKGraphRequestFlagDisableErrorRecovery]; + return request; +} + +#pragma mark - Helper Class Methods + ++ (FBSDKServerConfiguration *)_defaultServerConfigurationForAppID:(NSString *)appID +{ + // Use a default configuration while we do not have a configuration back from the server. This allows us to set + // the default values for any of the dialog sets or anything else in a centralized location while we are waiting for + // the server to respond. + static FBSDKServerConfiguration *_defaultServerConfiguration = nil; + if (![_defaultServerConfiguration.appID isEqualToString:appID]) { + // Bypass the native dialog flow for iOS 9+, as it produces a series of additional confirmation dialogs that lead to + // extra friction that is not desirable. + NSOperatingSystemVersion iOS9Version = { .majorVersion = 9, .minorVersion = 0, .patchVersion = 0 }; + BOOL useNativeFlow = ![FBSDKInternalUtility isOSRunTimeVersionAtLeast:iOS9Version]; + // Also enable SFSafariViewController by default. + NSDictionary *dialogFlows = @{ + FBSDKDialogConfigurationNameDefault: @{ + FBSDKDialogConfigurationFeatureUseNativeFlow: @(useNativeFlow), + FBSDKDialogConfigurationFeatureUseSafariViewController: @YES, + }, + FBSDKDialogConfigurationNameMessage: @{ + FBSDKDialogConfigurationFeatureUseNativeFlow: @YES, + }, + }; + _defaultServerConfiguration = [[FBSDKServerConfiguration alloc] initWithAppID:appID + appName:nil + loginTooltipEnabled:NO + loginTooltipText:nil + defaultShareMode:nil + advertisingIDEnabled:NO + implicitLoggingEnabled:NO + implicitPurchaseLoggingEnabled:NO + codelessEventsEnabled:NO + systemAuthenticationEnabled:NO + nativeAuthFlowEnabled:NO + uninstallTrackingEnabled:NO + dialogConfigurations:nil + dialogFlows:dialogFlows + timestamp:nil + errorConfiguration:nil + sessionTimeoutInterval:DEFAULT_SESSION_TIMEOUT_INTERVAL + defaults:YES + loggingToken:nil + smartLoginOptions:FBSDKServerConfigurationSmartLoginOptionsUnknown + smartLoginBookmarkIconURL:nil + smartLoginMenuIconURL:nil + updateMessage:nil + eventBindings:nil + ]; + } + return _defaultServerConfiguration; +} + ++ (void)_didProcessConfigurationFromNetwork:(FBSDKServerConfiguration *)serverConfiguration + appID:(NSString *)appID + error:(NSError *)error +{ + NSMutableArray *completionBlocks = [[NSMutableArray alloc] init]; + @synchronized(self) { + if (error) { + // Only set the error if we don't have previously fetched app settings. + // (i.e., if we have app settings and a new call gets an error, we'll + // ignore the error and surface the last successfully fetched settings). + if (_serverConfiguration && [_serverConfiguration.appID isEqualToString:appID]) { + // We have older app settings but the refresh received an error. + // Log and ignore the error. + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorInformational + formatString:@"loadServerConfigurationWithCompletionBlock failed with %@", error]; + } else { + _serverConfiguration = nil; + } + _serverConfigurationError = error; + _serverConfigurationErrorTimestamp = [NSDate date]; + } else { + _serverConfiguration = serverConfiguration; + _serverConfigurationError = nil; + _serverConfigurationErrorTimestamp = nil; + +#ifdef DEBUG + NSString *updateMessage = _serverConfiguration.updateMessage; + if (updateMessage && updateMessage.length > 0 && !_printedUpdateMessage) { + _printedUpdateMessage = YES; + NSLog(@"%@", updateMessage); + } +#endif + } + + // update the cached copy in NSUserDefaults + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *defaultsKey = [NSString stringWithFormat:FBSDK_SERVER_CONFIGURATION_USER_DEFAULTS_KEY, appID]; + if (serverConfiguration) { + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:serverConfiguration]; + [defaults setObject:data forKey:defaultsKey]; + } + + // wrap the completion blocks + for (FBSDKServerConfigurationManagerLoadBlock completionBlock in _completionBlocks) { + [completionBlocks addObject:[self _wrapperBlockForLoadBlock:completionBlock]]; + } + [_completionBlocks removeAllObjects]; + _loadingServerConfiguration = NO; + } + + // release the lock before calling out of this class + for (void (^completionBlock)(void) in completionBlocks) { + completionBlock(); + } +} + ++ (NSDictionary *)_parseDialogConfigurations:(NSDictionary *)dictionary +{ + NSMutableDictionary *dialogConfigurations = [[NSMutableDictionary alloc] init]; + NSArray *dialogConfigurationsArray = [FBSDKTypeUtility arrayValue:dictionary[@"data"]]; + for (id dialogConfiguration in dialogConfigurationsArray) { + NSDictionary *dialogConfigurationDictionary = [FBSDKTypeUtility dictionaryValue:dialogConfiguration]; + if (dialogConfigurationDictionary) { + NSString *name = [FBSDKTypeUtility stringValue:dialogConfigurationDictionary[@"name"]]; + if (name.length) { + NSURL *URL = [FBSDKTypeUtility URLValue:dialogConfigurationDictionary[@"url"]]; + NSArray *appVersions = [FBSDKTypeUtility arrayValue:dialogConfigurationDictionary[@"versions"]]; + dialogConfigurations[name] = [[FBSDKDialogConfiguration alloc] initWithName:name + URL:URL + appVersions:appVersions]; + } + } + } + return dialogConfigurations; +} + ++ (BOOL)_serverConfigurationTimestampIsValid:(NSDate *)timestamp +{ + return ([[NSDate date] timeIntervalSinceDate:timestamp] < FBSDK_SERVER_CONFIGURATION_MANAGER_CACHE_TIMEOUT); +} + ++ (void(^)(void))_wrapperBlockForLoadBlock:(FBSDKServerConfigurationManagerLoadBlock)loadBlock +{ + if (loadBlock == NULL) { + return NULL; + } + + // create local vars to capture the current values from the ivars to allow this wrapper to be called outside of a lock + FBSDKServerConfiguration *serverConfiguration; + NSError *serverConfigurationError; + @synchronized(self) { + serverConfiguration = _serverConfiguration; + serverConfigurationError = _serverConfigurationError; + } + return ^{ + loadBlock(serverConfiguration, serverConfigurationError); + }; +} + +#pragma mark - Object Lifecycle + +- (instancetype)init +{ + return nil; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCache.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCache.h new file mode 100644 index 0000000..0d7a492 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCache.h @@ -0,0 +1,27 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +#import "FBSDKAccessTokenCaching.h" + +@interface FBSDKAccessTokenCache : NSObject + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCache.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCache.m new file mode 100644 index 0000000..b9acabb --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCache.m @@ -0,0 +1,82 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAccessTokenCache.h" + +#import "FBSDKAccessTokenCacheV3.h" +#import "FBSDKAccessTokenCacheV3_17.h" +#import "FBSDKAccessTokenCacheV3_21.h" +#import "FBSDKAccessTokenCacheV4.h" + +static BOOL g_tryDeprecatedCaches = YES; + +@implementation FBSDKAccessTokenCache + +- (FBSDKAccessToken*)accessToken +{ + FBSDKAccessToken *token = [[FBSDKAccessTokenCacheV4 alloc] init].accessToken; + if (token || !g_tryDeprecatedCaches) { + return token; + } + + g_tryDeprecatedCaches = NO; + NSArray *oldCacheClasses = [[self class] deprecatedCacheClasses]; + __block FBSDKAccessToken *oldToken = nil; + [oldCacheClasses enumerateObjectsUsingBlock:^(Class obj, NSUInteger idx, BOOL *stop) { + id cache = [[obj alloc] init]; + oldToken = cache.accessToken; + if (oldToken) { + *stop = YES; + [cache clearCache]; + } + }]; + if (oldToken) { + self.accessToken = oldToken; + } + return oldToken; +} + +- (void)setAccessToken:(FBSDKAccessToken *)token +{ + [[FBSDKAccessTokenCacheV4 alloc] init].accessToken = token; + if (g_tryDeprecatedCaches) { + g_tryDeprecatedCaches = NO; + NSArray *oldCacheClasses = [[self class] deprecatedCacheClasses]; + [oldCacheClasses enumerateObjectsUsingBlock:^(Class obj, NSUInteger idx, BOOL *stop) { + id cache = [[obj alloc] init]; + [cache clearCache]; + }]; + } +} + +- (void)clearCache +{ + [[[FBSDKAccessTokenCacheV4 alloc] init] clearCache]; +} + +// used by FBSDKAccessTokenCacheIntegrationTests ++ (void)resetV3CacheChecks +{ + g_tryDeprecatedCaches = YES; +} + ++ (NSArray *)deprecatedCacheClasses +{ + return @[ [FBSDKAccessTokenCacheV3_21 class], [FBSDKAccessTokenCacheV3_17 class], [FBSDKAccessTokenCacheV3 class]]; +} +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3.h new file mode 100644 index 0000000..3815831 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3.h @@ -0,0 +1,29 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKAccessTokenCaching.h" + +FOUNDATION_EXPORT NSString *const FBSDKTokenInformationUUIDKey; + +@interface FBSDKAccessTokenCacheV3 : NSObject + ++ (FBSDKAccessToken *)accessTokenForV3Dictionary:(NSDictionary *)dictionary; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3.m new file mode 100644 index 0000000..f118b00 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3.m @@ -0,0 +1,80 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAccessTokenCacheV3.h" + +#import "FBSDKAccessToken.h" +#import "FBSDKSettings.h" +#import "FBSDKTypeUtility.h" + +NSString *const FBSDKTokenInformationUUIDKey = @"com.facebook.sdk:TokenInformationUUIDKey"; + +#define FBSDK_TOKEN_INFORMATION_TOKEN_KEY @"com.facebook.sdk:TokenInformationTokenKey" +#define FBSDK_TOKEN_INFORMATION_EXPIRATION_DATE_KEY @"com.facebook.sdk:TokenInformationExpirationDateKey" +#define FBSDK_TOKEN_INFORMATION_USER_FBID_KEY @"com.facebook.sdk:TokenInformationUserFBIDKey" +#define FBSDK_TOKEN_INFORMATION_PERMISSIONS_KEY @"com.facebook.sdk:TokenInformationPermissionsKey" +#define FBSDK_TOKEN_INFORMATION_DECLINED_PERMISSIONS_KEY @"com.facebook.sdk:TokenInformationDeclinedPermissionsKey" +#define FBSDK_TOKEN_INFORMATION_APP_ID_KEY @"com.facebook.sdk:TokenInformationAppIDKey" +#define FBSDK_TOKEN_INFORMATION_REFRESH_DATE_KEY @"com.facebook.sdk:TokenInformationRefreshDateKey" + + +@implementation FBSDKAccessTokenCacheV3 + +- (FBSDKAccessToken *)accessToken +{ + // Check NSUserDefaults ( <= v3.16 ) + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSDictionary *tokenDictionary = [defaults objectForKey:[FBSDKSettings legacyUserDefaultTokenInformationKeyName]]; + return [[self class] accessTokenForV3Dictionary:tokenDictionary]; +} + +- (void)clearCache +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults removeObjectForKey:[FBSDKSettings legacyUserDefaultTokenInformationKeyName]]; + [defaults synchronize]; +} + +- (void)setAccessToken:(FBSDKAccessToken *)token +{ + //no-op. + NSAssert(NO, @"deprecated cache FBSDKAccessTokenCacheV3 should not be used to cache a token"); +} + ++ (FBSDKAccessToken *)accessTokenForV3Dictionary:(NSDictionary *)dictionary +{ + NSString *tokenString = [FBSDKTypeUtility stringValue:dictionary[FBSDK_TOKEN_INFORMATION_TOKEN_KEY]]; + if (tokenString.length > 0) { + NSDate *expirationDate = dictionary[FBSDK_TOKEN_INFORMATION_EXPIRATION_DATE_KEY]; + // Note we default to valid in cases where expiration date is missing. + BOOL isExpired = ([expirationDate compare:[NSDate date]] == NSOrderedAscending); + if (isExpired) { + return nil; + } + return [[FBSDKAccessToken alloc] initWithTokenString:tokenString + permissions:dictionary[FBSDK_TOKEN_INFORMATION_PERMISSIONS_KEY] + declinedPermissions:dictionary[FBSDK_TOKEN_INFORMATION_DECLINED_PERMISSIONS_KEY] + appID:dictionary[FBSDK_TOKEN_INFORMATION_APP_ID_KEY] + userID:dictionary[FBSDK_TOKEN_INFORMATION_USER_FBID_KEY] + expirationDate:expirationDate + refreshDate:dictionary[FBSDK_TOKEN_INFORMATION_REFRESH_DATE_KEY] + dataAccessExpirationDate:nil]; + } + return nil; +} +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_17.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_17.h new file mode 100644 index 0000000..7f486f3 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_17.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKAccessTokenCaching.h" + +@interface FBSDKAccessTokenCacheV3_17 : NSObject + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_17.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_17.m new file mode 100644 index 0000000..83f2cce --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_17.m @@ -0,0 +1,63 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAccessTokenCacheV3_17.h" + +#import "FBSDKAccessToken.h" +#import "FBSDKAccessTokenCacheV3.h" +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKKeychainStoreViaBundleID.h" +#import "FBSDKSettings.h" + +@implementation FBSDKAccessTokenCacheV3_17 +{ + FBSDKKeychainStoreViaBundleID *_keychainStore; +} + +- (instancetype)init +{ + if ((self = [super init])) { + _keychainStore = [[FBSDKKeychainStoreViaBundleID alloc] init]; + } + return self; +} +- (FBSDKAccessToken *)accessToken +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *uuidKey = [[FBSDKSettings legacyUserDefaultTokenInformationKeyName] stringByAppendingString:@"UUID"]; + NSString *uuid = [defaults objectForKey:uuidKey]; + NSDictionary *tokenDictionary = [_keychainStore dictionaryForKey:[FBSDKSettings legacyUserDefaultTokenInformationKeyName]]; + if (![tokenDictionary[FBSDKTokenInformationUUIDKey] isEqualToString:uuid]) { + [self clearCache]; + } + + return [FBSDKAccessTokenCacheV3 accessTokenForV3Dictionary:tokenDictionary]; +} + +- (void)clearCache +{ + [_keychainStore setDictionary:nil forKey:[FBSDKSettings legacyUserDefaultTokenInformationKeyName] accessibility:nil]; +} + +- (void)setAccessToken:(FBSDKAccessToken *)token +{ + //no-op. + NSAssert(NO, @"deprecated cache FBSDKAccessTokenCacheV3_17 should not be used to cache a token"); +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_21.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_21.h new file mode 100644 index 0000000..da1ac64 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_21.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKAccessTokenCaching.h" + +@interface FBSDKAccessTokenCacheV3_21 : NSObject + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_21.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_21.m new file mode 100644 index 0000000..6b25f0a --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_21.m @@ -0,0 +1,66 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAccessTokenCacheV3_21.h" + +#import "FBSDKAccessToken.h" +#import "FBSDKAccessTokenCacheV3.h" +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKKeychainStore.h" +#import "FBSDKSettings.h" + +@implementation FBSDKAccessTokenCacheV3_21 +{ + FBSDKKeychainStore *_keychainStore; +} + +- (instancetype)init +{ + if ((self = [super init])) { + NSString *keyChainServiceIdentifier = [NSString stringWithFormat:@"com.facebook.sdk.tokencache.%@", [NSBundle mainBundle].bundleIdentifier]; + _keychainStore = [[FBSDKKeychainStore alloc] initWithService:keyChainServiceIdentifier accessGroup:nil]; + } + return self; +} + +- (FBSDKAccessToken *)accessToken +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *uuidKey = [[FBSDKSettings legacyUserDefaultTokenInformationKeyName] stringByAppendingString:@"UUID"]; + NSString *uuid = [defaults objectForKey:uuidKey]; + NSDictionary *tokenDictionary = [_keychainStore dictionaryForKey:[FBSDKSettings legacyUserDefaultTokenInformationKeyName]]; + if (![tokenDictionary[FBSDKTokenInformationUUIDKey] isEqualToString:uuid]) { + [self clearCache]; + } + + return [FBSDKAccessTokenCacheV3 accessTokenForV3Dictionary:tokenDictionary]; +} + +- (void)clearCache +{ + [_keychainStore setDictionary:nil forKey:[FBSDKSettings legacyUserDefaultTokenInformationKeyName] accessibility:nil]; +} + +- (void)setAccessToken:(FBSDKAccessToken *)token +{ + //no-op. + NSAssert(NO, @"deprecated cache FBSDKAccessTokenCacheV3_21 should not be used to cache a token"); +} + + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV4.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV4.h new file mode 100644 index 0000000..7fa7d7f --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV4.h @@ -0,0 +1,26 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKAccessToken.h" +#import "FBSDKAccessTokenCaching.h" + +@interface FBSDKAccessTokenCacheV4 : NSObject + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV4.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV4.m new file mode 100644 index 0000000..0de90e4 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV4.m @@ -0,0 +1,99 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAccessTokenCacheV4.h" + +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKKeychainStore.h" + +static NSString *const kFBSDKAccessTokenUserDefaultsKey = @"com.facebook.sdk.v4.FBSDKAccessTokenInformationKey"; +static NSString *const kFBSDKAccessTokenKeychainKey = @"com.facebook.sdk.v4.FBSDKAccessTokenInformationKeychainKey"; +static NSString *const kFBSDKAccessTokenUUIDKey = @"tokenUUID"; +static NSString *const kFBSDKAccessTokenEncodedKey = @"tokenEncoded"; + +@implementation FBSDKAccessTokenCacheV4 +{ + FBSDKKeychainStore *_keychainStore; +} + +- (instancetype)init +{ + if ((self = [super init])) { + NSString *keyChainServiceIdentifier = [NSString stringWithFormat:@"com.facebook.sdk.tokencache.%@", [NSBundle mainBundle].bundleIdentifier]; + _keychainStore = [[FBSDKKeychainStore alloc] initWithService:keyChainServiceIdentifier accessGroup:nil]; + } + return self; +} + +- (FBSDKAccessToken *)accessToken +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *uuid = [defaults objectForKey:kFBSDKAccessTokenUserDefaultsKey]; + + NSDictionary *dict = [_keychainStore dictionaryForKey:kFBSDKAccessTokenKeychainKey]; + if ([dict[kFBSDKAccessTokenUUIDKey] isKindOfClass:[NSString class]]) { + // there is a bug while running on simulator that the uuid stored in dict can be NSData, + // do a type check to make sure it is NSString + if ([dict[kFBSDKAccessTokenUUIDKey] isEqualToString:uuid]) { + id tokenData = dict[kFBSDKAccessTokenEncodedKey]; + if ([tokenData isKindOfClass:[NSData class]]) { + return [NSKeyedUnarchiver unarchiveObjectWithData:tokenData]; + } + } + } + // if the uuid doesn't match (including if there is no uuid in defaults which means uninstalled case) + // clear the keychain and return nil. + [self clearCache]; + return nil; +} + +- (void)setAccessToken:(FBSDKAccessToken *)token +{ + if (!token) { + [self clearCache]; + return; + } + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSString *uuid = [defaults objectForKey:kFBSDKAccessTokenUserDefaultsKey]; + if (!uuid) { + uuid = [NSUUID UUID].UUIDString; + [defaults setObject:uuid forKey:kFBSDKAccessTokenUserDefaultsKey]; + [defaults synchronize]; + } + NSData *tokenData = [NSKeyedArchiver archivedDataWithRootObject:token]; + NSDictionary *dict = @{ + kFBSDKAccessTokenUUIDKey : uuid, + kFBSDKAccessTokenEncodedKey : tokenData + }; + + [_keychainStore setDictionary:dict + forKey:kFBSDKAccessTokenKeychainKey + accessibility:[FBSDKDynamicFrameworkLoader loadkSecAttrAccessibleAfterFirstUnlockThisDeviceOnly]]; +} + +- (void)clearCache +{ + [_keychainStore setDictionary:nil + forKey:kFBSDKAccessTokenKeychainKey + accessibility:NULL]; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults removeObjectForKey:kFBSDKAccessTokenUserDefaultsKey]; + [defaults synchronize]; +} +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCaching.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCaching.h new file mode 100644 index 0000000..ae780e3 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCaching.h @@ -0,0 +1,29 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@class FBSDKAccessToken; + +@protocol FBSDKAccessTokenCaching + +@property (nonatomic, copy) FBSDKAccessToken *accessToken; + +- (void)clearCache; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenExpirer.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenExpirer.h new file mode 100644 index 0000000..5754037 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenExpirer.h @@ -0,0 +1,23 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKAccessTokenExpirer : NSObject + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenExpirer.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenExpirer.m new file mode 100644 index 0000000..2744439 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenExpirer.m @@ -0,0 +1,71 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKAccessTokenExpirer.h" + +#import "FBSDKAccessToken.h" +#import "FBSDKApplicationDelegate+Internal.h" +#import "FBSDKInternalUtility.h" + +@implementation FBSDKAccessTokenExpirer +{ + NSTimer *_timer; +} + +- (instancetype)init +{ + if (self = [super init]) { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_checkAccessTokenExpirationDate) name:FBSDKAccessTokenDidChangeNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_checkAccessTokenExpirationDate) name:FBSDKApplicationDidBecomeActiveNotification object:nil]; + [self _checkAccessTokenExpirationDate]; + } + return self; +} + +- (void)dealloc +{ + [_timer invalidate]; + _timer = nil; + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (void)_checkAccessTokenExpirationDate +{ + [_timer invalidate]; + _timer = nil; + FBSDKAccessToken *accessToken = FBSDKAccessToken.currentAccessToken; + if (accessToken == nil || accessToken.isExpired) { + return; + } + _timer = [NSTimer scheduledTimerWithTimeInterval:accessToken.expirationDate.timeIntervalSinceNow target:self selector:@selector(_timerDidFire) userInfo:nil repeats:NO]; +} + +- (void)_timerDidFire +{ + FBSDKAccessToken *accessToken = FBSDKAccessToken.currentAccessToken; + NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + [FBSDKInternalUtility dictionary:userInfo setObject:accessToken forKey:FBSDKAccessTokenChangeNewKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:accessToken forKey:FBSDKAccessTokenChangeOldKey]; + userInfo[FBSDKAccessTokenDidExpireKey] = @YES; + + [[NSNotificationCenter defaultCenter] postNotificationName:FBSDKAccessTokenDidChangeNotification + object:[FBSDKAccessToken class] + userInfo:userInfo]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStore.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStore.h new file mode 100644 index 0000000..a99d5b3 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStore.h @@ -0,0 +1,42 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKKeychainStore : NSObject + +@property (nonatomic, readonly, copy) NSString *service; +@property (nonatomic, readonly, copy) NSString *accessGroup; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)initWithService:(NSString *)service accessGroup:(NSString *)accessGroup NS_DESIGNATED_INITIALIZER; + +- (BOOL)setDictionary:(NSDictionary *)value forKey:(NSString *)key accessibility:(CFTypeRef)accessibility; +- (NSDictionary *)dictionaryForKey:(NSString *)key; + +- (BOOL)setString:(NSString *)value forKey:(NSString *)key accessibility:(CFTypeRef)accessibility; +- (NSString *)stringForKey:(NSString *)key; + +- (BOOL)setData:(NSData *)value forKey:(NSString *)key accessibility:(CFTypeRef)accessibility; +- (NSData *)dataForKey:(NSString *)key; + +// hook for subclasses to override keychain query construction. +- (NSMutableDictionary *)queryForKey:(NSString *)key; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStore.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStore.m new file mode 100644 index 0000000..81141ad --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStore.m @@ -0,0 +1,168 @@ +/** + * Contains code from UICKeyChainStore + * + * Copyright (c) 2011 kishikawa katsumi + * + * 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: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 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. + */ + +#import "FBSDKKeychainStore.h" + +#import "FBSDKDynamicFrameworkLoader.h" + +@implementation FBSDKKeychainStore + +- (instancetype)initWithService:(NSString *)service accessGroup:(NSString *)accessGroup +{ + if ((self = [super init])) { + _service = service ? [service copy] : [NSBundle mainBundle].bundleIdentifier; + _accessGroup = [accessGroup copy]; + NSAssert(_service, @"Keychain must be initialized with service"); + } + + return self; +} + +- (BOOL)setDictionary:(NSDictionary *)value forKey:(NSString *)key accessibility:(CFTypeRef)accessibility +{ + NSData *data = value == nil ? nil : [NSKeyedArchiver archivedDataWithRootObject:value]; + return [self setData:data forKey:key accessibility:accessibility]; +} + +- (NSDictionary *)dictionaryForKey:(NSString *)key +{ + NSData *data = [self dataForKey:key]; + if (!data) { + return nil; + } + + NSDictionary *dict = [NSKeyedUnarchiver unarchiveObjectWithData:data]; + if (![dict isKindOfClass:[NSDictionary class]]) { + return nil; + } + + return dict; +} + +- (BOOL)setString:(NSString *)value forKey:(NSString *)key accessibility:(CFTypeRef)accessibility +{ + NSData *data = [value dataUsingEncoding:NSUTF8StringEncoding]; + return [self setData:data forKey:key accessibility:accessibility]; +} + +- (NSString *)stringForKey:(NSString *)key +{ + NSData *data = [self dataForKey:key]; + if (!data) { + return nil; + } + + return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; +} + +- (BOOL)setData:(NSData *)value forKey:(NSString *)key accessibility:(CFTypeRef)accessibility +{ + if (!key) { + return NO; + } + +#if TARGET_OS_SIMULATOR + NSLog(@"Falling back to storing access token in NSUserDefaults because of simulator bug"); + [[NSUserDefaults standardUserDefaults] setObject:value forKey:key]; + + return [[NSUserDefaults standardUserDefaults] synchronize]; +#else + NSMutableDictionary *query = [self queryForKey:key]; + + OSStatus status; + if (value) { + NSMutableDictionary *attributesToUpdate = [NSMutableDictionary dictionary]; + [attributesToUpdate setObject:value forKey:[FBSDKDynamicFrameworkLoader loadkSecValueData]]; + + status = fbsdkdfl_SecItemUpdate((__bridge CFDictionaryRef)query, (__bridge CFDictionaryRef)attributesToUpdate); + if (status == errSecItemNotFound) { +#if !TARGET_OS_TV + if (@available(macOS 10.9, iOS 8, *)) { + if (accessibility) { + [query setObject:(__bridge id)(accessibility) forKey:[FBSDKDynamicFrameworkLoader loadkSecAttrAccessible]]; + } + } +#endif + [query setObject:value forKey:[FBSDKDynamicFrameworkLoader loadkSecValueData]]; + + status = fbsdkdfl_SecItemAdd((__bridge CFDictionaryRef)query, NULL); + } + } else { + status = fbsdkdfl_SecItemDelete((__bridge CFDictionaryRef)query); + if (status == errSecItemNotFound) { + status = errSecSuccess; + } + } + + return (status == errSecSuccess); +#endif +} + +- (NSData *)dataForKey:(NSString *)key +{ + if (!key) { + return nil; + } + +#if TARGET_OS_SIMULATOR + NSLog(@"Falling back to loading access token from NSUserDefaults because of simulator bug"); + return [[NSUserDefaults standardUserDefaults] dataForKey:key]; +#else + NSMutableDictionary *query = [self queryForKey:key]; + [query setObject:(id)kCFBooleanTrue forKey:[FBSDKDynamicFrameworkLoader loadkSecReturnData]]; + [query setObject:[FBSDKDynamicFrameworkLoader loadkSecMatchLimitOne] forKey:[FBSDKDynamicFrameworkLoader loadkSecMatchLimit]]; + + CFTypeRef data = nil; + OSStatus status = fbsdkdfl_SecItemCopyMatching((__bridge CFDictionaryRef)query, &data); + if (status != errSecSuccess) { + return nil; + } + + if (!data || CFGetTypeID(data) != CFDataGetTypeID()) { + return nil; + } + + NSData *ret = [NSData dataWithData:(__bridge NSData *)(data)]; + CFRelease(data); + + return ret; +#endif +} + +- (NSMutableDictionary *)queryForKey:(NSString *)key +{ + NSMutableDictionary *query = [NSMutableDictionary dictionary]; + [query setObject:[FBSDKDynamicFrameworkLoader loadkSecClassGenericPassword] forKey:[FBSDKDynamicFrameworkLoader loadkSecClass]]; + [query setObject:_service forKey:[FBSDKDynamicFrameworkLoader loadkSecAttrService]]; + [query setObject:key forKey:[FBSDKDynamicFrameworkLoader loadkSecAttrAccount]]; +#if !TARGET_IPHONE_SIMULATOR + if (_accessGroup) { + [query setObject:_accessGroup forKey:[FBSDKDynamicFrameworkLoader loadkSecAttrAccessGroup]]; + } +#endif + + return query; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStoreViaBundleID.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStoreViaBundleID.h new file mode 100644 index 0000000..0a0fb86 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStoreViaBundleID.h @@ -0,0 +1,29 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKKeychainStore.h" + +// This is the keychainstore defined in 3.17 that incorrectly used the bundle id as the service id +// and should NOT be used outside of this cache. +@interface FBSDKKeychainStoreViaBundleID : FBSDKKeychainStore + +// since this subclass represents the old keychainstore behavior, +// the designated initializer is just the `init`. +- (instancetype)init NS_DESIGNATED_INITIALIZER; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStoreViaBundleID.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStoreViaBundleID.m new file mode 100644 index 0000000..78ed26f --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStoreViaBundleID.m @@ -0,0 +1,50 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKKeychainStoreViaBundleID.h" + +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKInternalUtility.h" + +@implementation FBSDKKeychainStoreViaBundleID + +- (instancetype)init +{ + return [super initWithService:[NSBundle mainBundle].bundleIdentifier accessGroup:nil]; +} + +- (instancetype)initWithService:(NSString *)service accessGroup:(NSString *)accessGroup +{ + return [self init]; +} + +- (NSMutableDictionary*)queryForKey:(NSString *)key +{ + NSMutableDictionary *query = [NSMutableDictionary dictionary]; + query[(__bridge id)[FBSDKDynamicFrameworkLoader loadkSecClass]] = (__bridge id)([FBSDKDynamicFrameworkLoader loadkSecClassGenericPassword]); + query[(__bridge id)[FBSDKDynamicFrameworkLoader loadkSecAttrService]] = self.service; + query[(__bridge id)[FBSDKDynamicFrameworkLoader loadkSecAttrGeneric]] = key; + +#if !TARGET_IPHONE_SIMULATOR + [FBSDKInternalUtility dictionary:query setObject:self.accessGroup forKey:[FBSDKDynamicFrameworkLoader loadkSecAttrAccessGroup]]; +#endif + + return query; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKButton+Subclass.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKButton+Subclass.h new file mode 100644 index 0000000..cd5afc8 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKButton+Subclass.h @@ -0,0 +1,61 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +#import "FBSDKIcon.h" + +@protocol FBSDKButtonImpressionTracking + +@property (nonatomic, readonly, copy) NSDictionary *analyticsParameters; +@property (nonatomic, readonly, copy) NSString *impressionTrackingEventName; +@property (nonatomic, readonly, copy) NSString *impressionTrackingIdentifier; + +@end + +@interface FBSDKButton () + +@property (nonatomic, readonly, getter=isImplicitlyDisabled) BOOL implicitlyDisabled; + +- (void)logTapEventWithEventName:(NSString *)eventName + parameters:(NSDictionary *)parameters; +- (void)checkImplicitlyDisabled; +- (void)configureButton; +- (void)configureWithIcon:(FBSDKIcon *)icon + title:(NSString *)title + backgroundColor:(UIColor *)backgroundColor + highlightedColor:(UIColor *)highlightedColor; +- (void)configureWithIcon:(FBSDKIcon *)icon + title:(NSString *)title + backgroundColor:(UIColor *)backgroundColor + highlightedColor:(UIColor *)highlightedColor + selectedTitle:(NSString *)selectedTitle + selectedIcon:(FBSDKIcon *)selectedIcon + selectedColor:(UIColor *)selectedColor + selectedHighlightedColor:(UIColor *)selectedHighlightedColor; +- (UIColor *)defaultBackgroundColor; +- (UIColor *)defaultDisabledColor; +- (UIFont *)defaultFont; +- (UIColor *)defaultHighlightedColor; +- (FBSDKIcon *)defaultIcon; +- (UIColor *)defaultSelectedColor; +- (CGSize)sizeThatFits:(CGSize)size title:(NSString *)title; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKCloseIcon.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKCloseIcon.h new file mode 100644 index 0000000..ec55385 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKCloseIcon.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKCloseIcon : NSObject + +- (UIImage *)imageWithSize:(CGSize)size; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKCloseIcon.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKCloseIcon.m new file mode 100644 index 0000000..93b3ee1 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKCloseIcon.m @@ -0,0 +1,87 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKCloseIcon.h" + +@implementation FBSDKCloseIcon + +#pragma mark - Public API + +- (UIImage *)imageWithSize:(CGSize)size +{ + CGFloat scale = [UIScreen mainScreen].scale; + UIGraphicsBeginImageContextWithOptions(size, NO, scale); + CGContextRef context = UIGraphicsGetCurrentContext(); + + CGFloat iconSize = MIN(size.width, size.height); + + CGRect rect = CGRectMake((size.width - iconSize) / 2, (size.height - iconSize) / 2, iconSize, iconSize); + CGFloat step = iconSize / 12; + + // shadow + rect = CGRectIntegral(CGRectInset(rect, step, step)); + NSArray *colors = @[ + (__bridge id)[UIColor colorWithWhite:0.0 alpha:0.7].CGColor, + (__bridge id)[UIColor colorWithWhite:0.0 alpha:0.3].CGColor, + (__bridge id)[UIColor colorWithWhite:0.0 alpha:0.1].CGColor, + (__bridge id)[UIColor colorWithWhite:0.0 alpha:0.0].CGColor, + ]; + CGFloat locations[4] = { + 0.70, + 0.80, + 0.90, + 1.0, + }; + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray(); + CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)colors, locations); + CGColorSpaceRelease(colorSpace); + CGPoint center = CGPointMake(CGRectGetMidX(rect) - step / 6, CGRectGetMidY(rect) + step / 4); + CGContextDrawRadialGradient(context, gradient, center, 0.0, center, (CGRectGetWidth(rect) - step / 2) / 2, 0); + CGGradientRelease(gradient); + + // outer circle + rect = CGRectIntegral(CGRectInset(rect, step, step)); + [[UIColor whiteColor] setFill]; + CGContextFillEllipseInRect(context, rect); + + // inner circle + rect = CGRectIntegral(CGRectInset(rect, step, step)); + [[UIColor blackColor] setFill]; + CGContextFillEllipseInRect(context, rect); + + // cross + rect = CGRectIntegral(CGRectInset(rect, step, step)); + CGFloat lineWidth = step * 5 / 4; + rect.origin.y = CGRectGetMidY(rect) - lineWidth / 2; + rect.size.height = lineWidth; + [[UIColor whiteColor] setFill]; + CGContextTranslateCTM(context, size.width / 2, size.height / 2); + CGContextRotateCTM(context, M_PI_4); + CGContextTranslateCTM(context, -size.width / 2, -size.height / 2); + CGContextFillRect(context, rect); + CGContextTranslateCTM(context, size.width / 2, size.height / 2); + CGContextRotateCTM(context, M_PI_2); + CGContextTranslateCTM(context, -size.width / 2, -size.height / 2); + CGContextFillRect(context, rect); + + UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + return image; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKColor.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKColor.h new file mode 100644 index 0000000..54825b6 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKColor.h @@ -0,0 +1,22 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +UIColor *FBSDKUIColorWithRGBA(uint8_t r, uint8_t g, uint8_t b, CGFloat a); +UIColor *FBSDKUIColorWithRGB(uint8_t r, uint8_t g, uint8_t b); diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKColor.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKColor.m new file mode 100644 index 0000000..71b3d80 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKColor.m @@ -0,0 +1,31 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKColor.h" + +static const CGFloat kFBRGBMax = 255.0; + +UIColor *FBSDKUIColorWithRGBA(uint8_t r, uint8_t g, uint8_t b, CGFloat a) +{ + return [UIColor colorWithRed:(r / kFBRGBMax) green:(g / kFBRGBMax) blue:(b / kFBRGBMax) alpha:a]; +} + +UIColor *FBSDKUIColorWithRGB(uint8_t r, uint8_t g, uint8_t b) +{ + return FBSDKUIColorWithRGBA(r, g, b, 1.0); +} diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKIcon.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKIcon.h new file mode 100644 index 0000000..5be3445 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKIcon.h @@ -0,0 +1,31 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKIcon : NSObject + +- (instancetype)initWithColor:(UIColor *)color NS_DESIGNATED_INITIALIZER; + +@property (nonatomic, strong, readonly) UIColor *color; + +- (UIImage *)imageWithSize:(CGSize)size; + +- (CGPathRef)pathWithSize:(CGSize)size; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKIcon.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKIcon.m new file mode 100644 index 0000000..b46a8d6 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKIcon.m @@ -0,0 +1,62 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKIcon.h" + +@implementation FBSDKIcon + +#pragma mark - Object Lifecycle + +- (instancetype)initWithColor:(UIColor *)color +{ + if ((self = [super init])) { + _color = [color copy]; + } + return self; +} + +- (instancetype)init +{ + return [self initWithColor:[UIColor whiteColor]]; +} + +#pragma mark - Public API + +- (UIImage *)imageWithSize:(CGSize)size +{ + if ((size.width == 0) || (size.height == 0)) { + return nil; + } + CGFloat scale = [UIScreen mainScreen].scale; + UIGraphicsBeginImageContextWithOptions(size, NO, scale); + CGContextRef context = UIGraphicsGetCurrentContext(); + CGPathRef path = [self pathWithSize:size]; + CGContextAddPath(context, path); + CGContextSetFillColorWithColor(context, self.color.CGColor); + CGContextFillPath(context); + UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + return image; +} + +- (CGPathRef)pathWithSize:(CGSize)size +{ + return NULL; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKLogo.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKLogo.h new file mode 100644 index 0000000..76affe6 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKLogo.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKIcon.h" + +@interface FBSDKLogo : FBSDKIcon + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKLogo.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKLogo.m new file mode 100644 index 0000000..47d0dc4 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKLogo.m @@ -0,0 +1,59 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLogo.h" + +@implementation FBSDKLogo + +- (CGPathRef)pathWithSize:(CGSize)size +{ + CGAffineTransform transformValue = CGAffineTransformMakeScale(size.width / 136.0, size.height / 136.0); + const CGAffineTransform *transform = &transformValue; + CGMutablePathRef path = CGPathCreateMutable(); + CGPathMoveToPoint(path, transform, 127.856, 0.676); + CGPathAddLineToPoint(path, transform, 7.469, 0.676); + CGPathAddCurveToPoint(path, transform, 3.344, 0.676, 0.0, 4.02, 0.0, 8.145); + CGPathAddLineToPoint(path, transform, 0.0, 128.531); + CGPathAddCurveToPoint(path, transform, 0.0, 132.656, 3.344, 136.0, 7.469, 136.0); + CGPathAddLineToPoint(path, transform, 72.282, 136.0); + CGPathAddLineToPoint(path, transform, 72.282, 83.596); + CGPathAddLineToPoint(path, transform, 54.646, 83.596); + CGPathAddLineToPoint(path, transform, 54.646, 63.173); + CGPathAddLineToPoint(path, transform, 72.282, 63.173); + CGPathAddLineToPoint(path, transform, 72.282, 48.112); + CGPathAddCurveToPoint(path, transform, 72.282, 30.633, 82.957, 21.116, 98.549, 21.116); + CGPathAddCurveToPoint(path, transform, 106.018, 21.116, 112.438, 21.671, 114.309, 21.92); + CGPathAddLineToPoint(path, transform, 114.309, 40.187); + CGPathAddLineToPoint(path, transform, 103.495, 40.191); + CGPathAddCurveToPoint(path, transform, 95.014, 40.191, 93.372, 44.221, 93.372, 50.133); + CGPathAddLineToPoint(path, transform, 93.372, 63.173); + CGPathAddLineToPoint(path, transform, 113.596, 63.173); + CGPathAddLineToPoint(path, transform, 110.963, 83.596); + CGPathAddLineToPoint(path, transform, 93.372, 83.596); + CGPathAddLineToPoint(path, transform, 93.372, 136.0); + CGPathAddLineToPoint(path, transform, 127.856, 136.0); + CGPathAddCurveToPoint(path, transform, 131.981, 136.0, 135.325, 132.656, 135.325, 128.531); + CGPathAddLineToPoint(path, transform, 135.325, 8.145); + CGPathAddCurveToPoint(path, transform, 135.325, 4.02, 131.981, 0.676, 127.856, 0.676); + CGPathCloseSubpath(path); + CGPathRef result = CGPathCreateCopy(path); + CGPathRelease(path); + return CFAutorelease(result); +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKMaleSilhouetteIcon.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKMaleSilhouetteIcon.h new file mode 100644 index 0000000..1a44797 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKMaleSilhouetteIcon.h @@ -0,0 +1,25 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKIcon.h" + +@interface FBSDKMaleSilhouetteIcon : FBSDKIcon + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKMaleSilhouetteIcon.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKMaleSilhouetteIcon.m new file mode 100644 index 0000000..6e0e1ed --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKMaleSilhouetteIcon.m @@ -0,0 +1,51 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKMaleSilhouetteIcon.h" + +@implementation FBSDKMaleSilhouetteIcon + +- (CGPathRef)pathWithSize:(CGSize)size +{ + CGAffineTransform transformValue = CGAffineTransformMakeScale(size.width / 158.783, size.height / 158.783); + CGAffineTransform *transform = &transformValue; + CGMutablePathRef path = CGPathCreateMutable(); + CGPathMoveToPoint(path, transform, 158.783, 158.783); + CGPathAddCurveToPoint(path, transform, 156.39, 131.441, 144.912, 136.964, 105.607, 117.32); + CGPathAddCurveToPoint(path, transform, 103.811, 113.941, 103.348, 108.8965, 103.013, 107.4781); + CGPathAddLineToPoint(path, transform, 100.434, 106.7803); + CGPathAddCurveToPoint(path, transform, 97.2363, 82.7701, 100.67, 101.5845, 106.006, 75.2188); + CGPathAddCurveToPoint(path, transform, 107.949, 76.2959, 108.268, 70.7417, 108.971, 66.5743); + CGPathAddCurveToPoint(path, transform, 109.673, 62.4068, 110.864, 58.9082, 107.139, 58.9082); + CGPathAddCurveToPoint(path, transform, 107.94, 42.7652, 110.299, 31.3848, 101.335, 23.3072); + CGPathAddCurveToPoint(path, transform, 92.3808, 15.23781, 87.874, 15.52349, 95.0483, 9.6036128); + CGPathAddCurveToPoint(path, transform, 91.2319, 8.892613, 70.2036, 12.01861, 57.4487, 23.3072); + CGPathAddCurveToPoint(path, transform, 48.4121, 31.3042, 50.8437, 42.7652, 51.6445, 58.9082); + CGPathAddCurveToPoint(path, transform, 47.9194, 58.9082, 49.1108, 62.4068, 49.813, 66.5743); + CGPathAddCurveToPoint(path, transform, 50.5156, 70.7417, 50.8349, 76.2959, 52.7778, 75.2188); + CGPathAddCurveToPoint(path, transform, 58.1138, 110.1135, 61.5478, 82.7701, 58.3501, 106.7803); + CGPathAddLineToPoint(path, transform, 55.7705, 107.4781); + CGPathAddCurveToPoint(path, transform, 55.4355, 108.8965, 54.9722, 113.941, 53.1767, 117.32); + CGPathAddCurveToPoint(path, transform, 13.8711, 136.964, 2.3945, 131.441, 0.0, 158.783); + CGPathAddLineToPoint(path, transform, 158.783, 158.783); + CGPathRef result = CGPathCreateCopy(path); + CGPathRelease(path); + return CFAutorelease(result); +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKUIUtility.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKUIUtility.h new file mode 100644 index 0000000..29e2912 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKUIUtility.h @@ -0,0 +1,79 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "../FBSDKMath.h" + +/** + Insets a CGSize with the insets in a UIEdgeInsets. + */ +static inline CGSize FBSDKEdgeInsetsInsetSize(CGSize size, UIEdgeInsets insets) +{ + CGRect rect = CGRectZero; + rect.size = size; + return UIEdgeInsetsInsetRect(rect, insets).size; +} + +/** + Outsets a CGSize with the insets in a UIEdgeInsets. + */ +static inline CGSize FBSDKEdgeInsetsOutsetSize(CGSize size, UIEdgeInsets insets) +{ + return CGSizeMake(insets.left + size.width + insets.right, + insets.top + size.height + insets.bottom); +} + +/** + Limits a CGFloat value, using the scale to limit to pixels (instead of points). + + + The limitFunction is frequention floorf, ceilf or roundf. If the scale is 2.0, + you may get back values of *.5 to correspond to pixels. + */ +typedef float (*FBSDKLimitFunctionType)(float); +static inline CGFloat FBSDKPointsForScreenPixels(FBSDKLimitFunctionType limitFunction, + CGFloat screenScale, + CGFloat pointValue) +{ + return limitFunction(pointValue * screenScale) / screenScale; +} + +static inline CGSize FBSDKTextSize(NSString *text, + UIFont *font, + CGSize constrainedSize, + NSLineBreakMode lineBreakMode) +{ + if (!text) { + return CGSizeZero; + } + + NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; + paragraphStyle.lineBreakMode = lineBreakMode; + NSDictionary *attributes = @{ + NSFontAttributeName: font, + NSParagraphStyleAttributeName: paragraphStyle, + }; + NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:text attributes:attributes]; + CGSize size = [FBSDKMath ceilForSize:[attributedString boundingRectWithSize:constrainedSize + options:(NSStringDrawingUsesDeviceMetrics | + NSStringDrawingUsesLineFragmentOrigin | + NSStringDrawingUsesFontLeading) + context:NULL].size]; + return [FBSDKMath ceilForSize:size]; +} diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKViewImpressionTracker.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKViewImpressionTracker.h new file mode 100644 index 0000000..f280228 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKViewImpressionTracker.h @@ -0,0 +1,29 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@interface FBSDKViewImpressionTracker : NSObject + ++ (instancetype)impressionTrackerWithEventName:(NSString *)eventName; + +@property (nonatomic, copy, readonly) NSString *eventName; + +- (void)logImpressionWithIdentifier:(NSString *)identifier parameters:(NSDictionary *)parameters; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKViewImpressionTracker.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKViewImpressionTracker.m new file mode 100644 index 0000000..4f95ad7 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKViewImpressionTracker.m @@ -0,0 +1,97 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKViewImpressionTracker.h" + +#import "FBSDKAccessToken.h" +#import "FBSDKAppEvents+Internal.h" + +@implementation FBSDKViewImpressionTracker +{ + NSMutableSet *_trackedImpressions; +} + +#pragma mark - Class Methods + ++ (instancetype)impressionTrackerWithEventName:(NSString *)eventName +{ + static NSMutableDictionary *_impressionTrackers = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _impressionTrackers = [[NSMutableDictionary alloc] init]; + }); + // Maintains a single instance of an impression tracker for each event name + FBSDKViewImpressionTracker *impressionTracker = _impressionTrackers[eventName]; + if (!impressionTracker) { + impressionTracker = [[self alloc] initWithEventName:eventName]; + _impressionTrackers[eventName] = impressionTracker; + } + return impressionTracker; +} + +#pragma mark - Object Lifecycle + +- (instancetype)initWithEventName:(NSString *)eventName +{ + if ((self = [super init])) { + _eventName = [eventName copy]; + _trackedImpressions = [[NSMutableSet alloc] init]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(_applicationDidEnterBackgroundNotification:) + name:UIApplicationDidEnterBackgroundNotification + object:[UIApplication sharedApplication]]; + } + return self; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +#pragma mark - Public API + +- (void)logImpressionWithIdentifier:(NSString *)identifier parameters:(NSDictionary *)parameters +{ + NSMutableDictionary *keys = [NSMutableDictionary dictionary]; + keys[@"__view_impression_identifier__"] = identifier; + [keys addEntriesFromDictionary:parameters]; + NSDictionary *impressionKey = [keys copy]; + // Ensure that each impression is only tracked once + if ([_trackedImpressions containsObject:impressionKey]) { + return; + } + [_trackedImpressions addObject:impressionKey]; + + [FBSDKAppEvents logImplicitEvent:self.eventName + valueToSum:nil + parameters:parameters + accessToken:[FBSDKAccessToken currentAccessToken]]; +} + +#pragma mark - Helper Methods + +- (void)_applicationDidEnterBackgroundNotification:(NSNotification *)notification +{ + // reset all tracked impressions when the app backgrounds so we will start tracking them again the next time they + // are triggered. + [_trackedImpressions removeAllObjects]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialog.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialog.h new file mode 100644 index 0000000..84dcd62 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialog.h @@ -0,0 +1,44 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@protocol FBSDKWebDialogDelegate; + +@interface FBSDKWebDialog : NSObject + ++ (instancetype)showWithName:(NSString *)name + parameters:(NSDictionary *)parameters + delegate:(id)delegate; + +@property (nonatomic, assign) BOOL deferVisibility; +@property (nonatomic, weak) id delegate; +@property (nonatomic, copy) NSString *name; +@property (nonatomic, copy) NSDictionary *parameters; + +- (BOOL)show; + +@end + +@protocol FBSDKWebDialogDelegate + +- (void)webDialog:(FBSDKWebDialog *)webDialog didCompleteWithResults:(NSDictionary *)results; +- (void)webDialog:(FBSDKWebDialog *)webDialog didFailWithError:(NSError *)error; +- (void)webDialogDidCancel:(FBSDKWebDialog *)webDialog; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialog.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialog.m new file mode 100644 index 0000000..aa177b3 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialog.m @@ -0,0 +1,342 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKWebDialog.h" + +#import "FBSDKAccessToken.h" +#import "FBSDKDynamicFrameworkLoader.h" +#import "FBSDKInternalUtility.h" +#import "FBSDKLogger.h" +#import "FBSDKSettings.h" +#import "FBSDKTypeUtility.h" +#import "FBSDKWebDialogView.h" + +#define FBSDK_WEB_DIALOG_SHOW_ANIMATION_DURATION 0.2 +#define FBSDK_WEB_DIALOG_DISMISS_ANIMATION_DURATION 0.3 + +static FBSDKWebDialog *g_currentDialog = nil; + +@interface FBSDKWebDialog () +@end + +@implementation FBSDKWebDialog +{ + UIView *_backgroundView; + FBSDKWebDialogView *_dialogView; +} + +#pragma mark - Class Methods + ++ (instancetype)showWithName:(NSString *)name + parameters:(NSDictionary *)parameters + delegate:(id)delegate +{ + FBSDKWebDialog *dialog = [[self alloc] init]; + dialog.name = name; + dialog.parameters = parameters; + dialog.delegate = delegate; + [dialog show]; + return dialog; +} + +#pragma mark - Object Lifecycle + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; + _dialogView.delegate = nil; + [_dialogView removeFromSuperview]; + [_backgroundView removeFromSuperview]; +} + +#pragma mark - Public Methods + +- (BOOL)show +{ + if (g_currentDialog == self) { + return NO; + } + [g_currentDialog _dismissAnimated:YES]; + + NSError *error; + NSURL *URL = [self _generateURL:&error]; + if (!URL) { + [self _failWithError:error]; + return NO; + } + + g_currentDialog = self; + + UIWindow *window = [FBSDKInternalUtility findWindow]; + if (!window) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"There are no valid ViewController to present FBSDKWebDialog", nil]; + [self _failWithError:nil]; + return NO; + } + + CGRect frame = [self _applicationFrameForOrientation]; + _dialogView = [[FBSDKWebDialogView alloc] initWithFrame:frame]; + + _dialogView.delegate = self; + [_dialogView loadURL:URL]; + + if (!_deferVisibility) { + [self _showWebView]; + } + + return YES; +} + +#pragma mark - FBSDKWebDialogViewDelegate + +- (void)webDialogView:(FBSDKWebDialogView *)webDialogView didCompleteWithResults:(NSDictionary *)results +{ + [self _completeWithResults:results]; +} + +- (void)webDialogView:(FBSDKWebDialogView *)webDialogView didFailWithError:(NSError *)error +{ + [self _failWithError:error]; +} + +- (void)webDialogViewDidCancel:(FBSDKWebDialogView *)webDialogView +{ + [self _cancel]; +} + +- (void)webDialogViewDidFinishLoad:(FBSDKWebDialogView *)webDialogView +{ + if (_deferVisibility) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.05 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + if (self->_dialogView) { + [self _showWebView]; + } + }); + } +} + +#pragma mark - Notifications + +- (void)_addObservers +{ + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self + selector:@selector(_deviceOrientationDidChangeNotification:) + name:UIDeviceOrientationDidChangeNotification + object:nil]; +} + +- (void)_deviceOrientationDidChangeNotification:(NSNotification *)notification +{ + BOOL animated = [FBSDKTypeUtility boolValue:notification.userInfo[@"UIDeviceOrientationRotateAnimatedUserInfoKey"]]; + Class CATransactionClass = fbsdkdfl_CATransactionClass(); + CFTimeInterval animationDuration = (animated ? [CATransactionClass animationDuration] : 0.0); + [self _updateViewsWithScale:1.0 alpha:1.0 animationDuration:animationDuration completion:^(BOOL finished) { + if (finished) { + [self->_dialogView setNeedsDisplay]; + } + }]; +} + +- (void)_removeObservers +{ + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil]; +} + +#pragma mark - Helper Methods + +- (void)_cancel +{ + FBSDKWebDialog *dialog = self; + [self _dismissAnimated:YES]; // may cause the receiver to be released + [_delegate webDialogDidCancel:dialog]; +} + +- (void)_completeWithResults:(NSDictionary *)results +{ + FBSDKWebDialog *dialog = self; + [self _dismissAnimated:YES]; // may cause the receiver to be released + [_delegate webDialog:dialog didCompleteWithResults:results]; +} + +- (void)_dismissAnimated:(BOOL)animated +{ + [self _removeObservers]; + UIView *backgroundView = _backgroundView; + _backgroundView = nil; + FBSDKWebDialogView *dialogView = _dialogView; + _dialogView.delegate = nil; + _dialogView = nil; + void(^didDismiss)(BOOL) = ^(BOOL finished){ + [backgroundView removeFromSuperview]; + [dialogView removeFromSuperview]; + }; + if (animated) { + [UIView animateWithDuration:FBSDK_WEB_DIALOG_DISMISS_ANIMATION_DURATION animations:^{ + dialogView.alpha = 0.0; + backgroundView.alpha = 0.0; + } completion:didDismiss]; + } else { + didDismiss(YES); + } + if (g_currentDialog == self) { + g_currentDialog = nil; + } +} + +- (void)_failWithError:(NSError *)error +{ + // defer so that the consumer is guaranteed to have an opportunity to set the delegate before we fail + dispatch_async(dispatch_get_main_queue(), ^{ + [self _dismissAnimated:YES]; + [self->_delegate webDialog:self didFailWithError:error]; + }); +} + +- (NSURL *)_generateURL:(NSError **)errorRef +{ + NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init]; + parameters[@"display"] = @"touch"; + parameters[@"sdk"] = [NSString stringWithFormat:@"ios-%@", [FBSDKSettings sdkVersion]]; + parameters[@"redirect_uri"] = @"fbconnect://success"; + [FBSDKInternalUtility dictionary:parameters setObject:[FBSDKSettings appID] forKey:@"app_id"]; + [FBSDKInternalUtility dictionary:parameters + setObject:[FBSDKAccessToken currentAccessToken].tokenString + forKey:@"access_token"]; + [parameters addEntriesFromDictionary:self.parameters]; + return [FBSDKInternalUtility facebookURLWithHostPrefix:@"m" + path:[@"/dialog/" stringByAppendingString:self.name] + queryParameters:parameters + error:errorRef]; +} + +- (BOOL)_showWebView +{ + UIWindow *window = [FBSDKInternalUtility findWindow]; + if (!window) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"There are no valid ViewController to present FBSDKWebDialog", nil]; + [self _failWithError:nil]; + return NO; + } + + [self _addObservers]; + + _backgroundView = [[UIView alloc] initWithFrame:window.bounds]; + _backgroundView.alpha = 0.0; + _backgroundView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); + _backgroundView.backgroundColor = [UIColor colorWithWhite:0.3 alpha:0.8]; + [window addSubview:_backgroundView]; + [window addSubview:_dialogView]; + + [_dialogView becomeFirstResponder]; // dismisses the keyboard if it there was another first responder with it + [self _updateViewsWithScale:0.001 alpha:0.0 animationDuration:0.0 completion:NULL]; + [self _updateViewsWithScale:1.1 alpha:1.0 animationDuration:FBSDK_WEB_DIALOG_SHOW_ANIMATION_DURATION completion:^(BOOL finished1) { + [self _updateViewsWithScale:0.9 alpha:1.0 animationDuration:FBSDK_WEB_DIALOG_SHOW_ANIMATION_DURATION completion:^(BOOL finished2) { + [self _updateViewsWithScale:1.0 alpha:1.0 animationDuration:FBSDK_WEB_DIALOG_SHOW_ANIMATION_DURATION completion:NULL]; + }]; + }]; + return YES; +} + +- (CGAffineTransform)_transformForOrientation +{ + // iOS 8 simply adjusts the application frame to adapt to the current orientation and deprecated the concept of + // interface orientations + if ([FBSDKInternalUtility shouldManuallyAdjustOrientation]) { + switch ([UIApplication sharedApplication].statusBarOrientation) { + case UIInterfaceOrientationLandscapeLeft: + return CGAffineTransformMakeRotation(M_PI * 1.5); + case UIInterfaceOrientationLandscapeRight: + return CGAffineTransformMakeRotation(M_PI/2); + case UIInterfaceOrientationPortraitUpsideDown: + return CGAffineTransformMakeRotation(-M_PI); + case UIInterfaceOrientationPortrait: + case UIInterfaceOrientationUnknown: + // don't adjust the orientation + break; + } + } + return CGAffineTransformIdentity; +} + +- (CGRect)_applicationFrameForOrientation +{ + CGRect applicationFrame = _dialogView.window.screen.bounds; + + UIEdgeInsets insets = UIEdgeInsetsZero; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0 + if (@available(iOS 11.0, *)) { + insets = _dialogView.window.safeAreaInsets; + } +#endif + + if (insets.top == 0.0) { + insets.top = [[UIApplication sharedApplication] statusBarFrame].size.height; + } + applicationFrame.origin.x += insets.left; + applicationFrame.origin.y += insets.top; + applicationFrame.size.width -= insets.left + insets.right; + applicationFrame.size.height -= insets.top + insets.bottom; + + if ([FBSDKInternalUtility shouldManuallyAdjustOrientation]) { + switch ([UIApplication sharedApplication].statusBarOrientation) { + case UIInterfaceOrientationLandscapeLeft: + case UIInterfaceOrientationLandscapeRight: + return CGRectMake(0, 0, CGRectGetHeight(applicationFrame), CGRectGetWidth(applicationFrame)); + case UIInterfaceOrientationPortraitUpsideDown: + case UIInterfaceOrientationPortrait: + case UIInterfaceOrientationUnknown: + return applicationFrame; + } + } else { + return applicationFrame; + } +} + +- (void)_updateViewsWithScale:(CGFloat)scale + alpha:(CGFloat)alpha + animationDuration:(CFTimeInterval)animationDuration + completion:(void(^)(BOOL finished))completion +{ + CGAffineTransform transform; + CGRect applicationFrame = [self _applicationFrameForOrientation]; + if (scale == 1.0) { + transform = _dialogView.transform; + _dialogView.transform = CGAffineTransformIdentity; + _dialogView.frame = applicationFrame; + _dialogView.transform = transform; + } + transform = CGAffineTransformScale([self _transformForOrientation], scale, scale); + void(^updateBlock)(void) = ^{ + self->_dialogView.transform = transform; + self->_dialogView.center = CGPointMake(CGRectGetMidX(applicationFrame), + CGRectGetMidY(applicationFrame)); + self->_dialogView.alpha = alpha; + self->_backgroundView.alpha = alpha; + }; + if (animationDuration == 0.0) { + updateBlock(); + } else { + [UIView animateWithDuration:animationDuration animations:updateBlock completion:completion]; + } +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialogView.h b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialogView.h new file mode 100644 index 0000000..08f17f6 --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialogView.h @@ -0,0 +1,39 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@protocol FBSDKWebDialogViewDelegate; + +@interface FBSDKWebDialogView : UIView + +@property (nonatomic, weak) id delegate; + +- (void)loadURL:(NSURL *)URL; +- (void)stopLoading; + +@end + +@protocol FBSDKWebDialogViewDelegate + +- (void)webDialogView:(FBSDKWebDialogView *)webDialogView didCompleteWithResults:(NSDictionary *)results; +- (void)webDialogView:(FBSDKWebDialogView *)webDialogView didFailWithError:(NSError *)error; +- (void)webDialogViewDidCancel:(FBSDKWebDialogView *)webDialogView; +- (void)webDialogViewDidFinishLoad:(FBSDKWebDialogView *)webDialogView; + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialogView.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialogView.m new file mode 100644 index 0000000..2836daf --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialogView.m @@ -0,0 +1,193 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKWebDialogView.h" + +#import "FBSDKCloseIcon.h" +#import "FBSDKError.h" +#import "FBSDKTypeUtility.h" +#import "FBSDKUtility.h" + +#define FBSDK_WEB_DIALOG_VIEW_BORDER_WIDTH 10.0 + +@interface FBSDKWebDialogView () +@end + +@implementation FBSDKWebDialogView +{ + UIButton *_closeButton; + UIActivityIndicatorView *_loadingView; + UIWebView *_webView; +} + +#pragma mark - Object Lifecycle + +- (instancetype)initWithFrame:(CGRect)frame +{ + if ((self = [super initWithFrame:frame])) { + self.backgroundColor = [UIColor clearColor]; + self.opaque = NO; + + _webView = [[UIWebView alloc] initWithFrame:CGRectZero]; + _webView.delegate = self; + [self addSubview:_webView]; + + _closeButton = [UIButton buttonWithType:UIButtonTypeCustom]; + UIImage *closeImage = [[[FBSDKCloseIcon alloc] init] imageWithSize:CGSizeMake(29.0, 29.0)]; + [_closeButton setImage:closeImage forState:UIControlStateNormal]; + [_closeButton setTitleColor:[UIColor colorWithRed:167.0/255.0 + green:184.0/255.0 + blue:216.0/255.0 + alpha:1.0] forState:UIControlStateNormal]; + [_closeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; + _closeButton.showsTouchWhenHighlighted = YES; + [_closeButton sizeToFit]; + [self addSubview:_closeButton]; + [_closeButton addTarget:self action:@selector(_close:) forControlEvents:UIControlEventTouchUpInside]; + + _loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; + _loadingView.color = [UIColor grayColor]; + [_webView addSubview:_loadingView]; + } + return self; +} + +- (void)dealloc +{ + _webView.delegate = nil; +} + +#pragma mark - Public Methods + +- (void)loadURL:(NSURL *)URL +{ + [_loadingView startAnimating]; + [_webView loadRequest:[NSURLRequest requestWithURL:URL]]; +} + +- (void)stopLoading +{ + [_webView stopLoading]; +} + +#pragma mark - Layout + +- (void)drawRect:(CGRect)rect +{ + CGContextRef context = UIGraphicsGetCurrentContext(); + CGContextSaveGState(context); + [self.backgroundColor setFill]; + CGContextFillRect(context, self.bounds); + [[UIColor blackColor] setStroke]; + CGContextSetLineWidth(context, 1.0 / self.layer.contentsScale); + CGContextStrokeRect(context, _webView.frame); + CGContextRestoreGState(context); + [super drawRect:rect]; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + + CGRect bounds = self.bounds; + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { + CGFloat horizontalInset = CGRectGetWidth(bounds) * 0.2; + CGFloat verticalInset = CGRectGetHeight(bounds) * 0.2; + UIEdgeInsets iPadInsets = UIEdgeInsetsMake(verticalInset, horizontalInset, verticalInset, horizontalInset); + bounds = UIEdgeInsetsInsetRect(bounds, iPadInsets); + } + UIEdgeInsets webViewInsets = UIEdgeInsetsMake(FBSDK_WEB_DIALOG_VIEW_BORDER_WIDTH, + FBSDK_WEB_DIALOG_VIEW_BORDER_WIDTH, + FBSDK_WEB_DIALOG_VIEW_BORDER_WIDTH, + FBSDK_WEB_DIALOG_VIEW_BORDER_WIDTH); + _webView.frame = CGRectIntegral(UIEdgeInsetsInsetRect(bounds, webViewInsets)); + + CGRect webViewBounds = _webView.bounds; + _loadingView.center = CGPointMake(CGRectGetMidX(webViewBounds), CGRectGetMidY(webViewBounds)); + + if (CGRectGetHeight(webViewBounds) == 0.0) { + _closeButton.alpha = 0.0; + } else { + _closeButton.alpha = 1.0; + CGRect closeButtonFrame = _closeButton.bounds; + closeButtonFrame.origin = bounds.origin; + _closeButton.frame = CGRectIntegral(closeButtonFrame); + } +} + +#pragma mark - Actions + +- (void)_close:(id)sender +{ + [_delegate webDialogViewDidCancel:self]; +} + +#pragma mark - UIWebViewDelegate + +- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error +{ + [_loadingView stopAnimating]; + + // 102 == WebKitErrorFrameLoadInterruptedByPolicyChange + // NSURLErrorCancelled == "Operation could not be completed", note NSURLErrorCancelled occurs when the user clicks + // away before the page has completely loaded, if we find cases where we want this to result in dialog failure + // (usually this just means quick-user), then we should add something more robust here to account for differences in + // application needs + if (!(([error.domain isEqualToString:NSURLErrorDomain] && error.code == NSURLErrorCancelled) || + ([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 102))) { + [_delegate webDialogView:self didFailWithError:error]; + } +} + +- (BOOL)webView:(UIWebView *)webView +shouldStartLoadWithRequest:(NSURLRequest *)request + navigationType:(UIWebViewNavigationType)navigationType +{ + NSURL *URL = request.URL; + + if ([URL.scheme isEqualToString:@"fbconnect"]) { + NSMutableDictionary *parameters = [[FBSDKUtility dictionaryWithQueryString:URL.query] mutableCopy]; + [parameters addEntriesFromDictionary:[FBSDKUtility dictionaryWithQueryString:URL.fragment]]; + if ([URL.resourceSpecifier hasPrefix:@"//cancel"]) { + NSInteger errorCode = [FBSDKTypeUtility integerValue:parameters[@"error_code"]]; + if (errorCode) { + NSString *errorMessage = [FBSDKTypeUtility stringValue:parameters[@"error_msg"]]; + NSError *error = [NSError fbErrorWithCode:errorCode message:errorMessage]; + [_delegate webDialogView:self didFailWithError:error]; + } else { + [_delegate webDialogViewDidCancel:self]; + } + } else { + [_delegate webDialogView:self didCompleteWithResults:parameters]; + } + return NO; + } else if (navigationType == UIWebViewNavigationTypeLinkClicked) { + [[UIApplication sharedApplication] openURL:request.URL]; + return NO; + } else { + return YES; + } +} + +- (void)webViewDidFinishLoad:(UIWebView *)webView +{ + [_loadingView stopAnimating]; + [_delegate webDialogViewDidFinishLoad:self]; +} + +@end diff --git a/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m new file mode 100644 index 0000000..234979d --- /dev/null +++ b/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m @@ -0,0 +1,589 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKDynamicFrameworkLoader.h" + +#import + +#import +#import +#import + +#import "FBSDKLogger.h" +#import "FBSDKSettings.h" + +static NSString *const g_frameworkPathTemplate = @"/System/Library/Frameworks/%@.framework/%@"; + +#pragma mark - Library and Symbol Loading + +struct FBSDKDFLLoadSymbolContext +{ + void *(*library)(void); // function to retrieve the library handle (it's a function instead of void * so it can be staticlly bound) + const char *name; // name of the symbol to retrieve + void **address; // [out] address of the symbol in the process address space +}; + +// Retrieves the handle for a library for framework. The paths for each are constructed +// differently so the loading function passed to dispatch_once() calls this. +static void *fbsdkdfl_load_library_once(const char *path) +{ + void *handle = dlopen(path, RTLD_LAZY); + if (handle) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorInformational formatString:@"Dynamically loaded library at %s", path]; + } else { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorInformational formatString:@"Failed to load library at %s", path]; + } + return handle; +} + +// Constructs the path for a system framework with the given name and returns the handle for dlsym +static void *fbsdkdfl_load_framework_once(NSString *framework) +{ + NSString *path = [NSString stringWithFormat:g_frameworkPathTemplate, framework, framework]; + return fbsdkdfl_load_library_once(path.fileSystemRepresentation); +} + +// Implements the callback for dispatch_once() that loads the handle for specified framework name +#define _fbsdkdfl_load_framework_once_impl_(FRAMEWORK) \ + static void fbsdkdfl_load_##FRAMEWORK##_once(void *context) { \ + *(void **)context = fbsdkdfl_load_framework_once(@#FRAMEWORK); \ + } + +// Implements the framework/library retrieval function for the given name. +// It calls the loading function once and caches the handle in a local static variable +#define _fbsdkdfl_handle_get_impl_(LIBRARY) \ + static void *fbsdkdfl_handle_get_##LIBRARY(void) { \ + static void *LIBRARY##_handle; \ + static dispatch_once_t LIBRARY##_once; \ + dispatch_once_f(&LIBRARY##_once, &LIBRARY##_handle, &fbsdkdfl_load_##LIBRARY##_once); \ + return LIBRARY##_handle;\ + } + +// Callback from dispatch_once() to load a specific symbol +static void fbsdkdfl_load_symbol_once(void *context) +{ + struct FBSDKDFLLoadSymbolContext *ctx = context; + *ctx->address = dlsym(ctx->library(), ctx->name); +} + +// The boilerplate code for loading a symbol from a given library once and caching it in a static local +#define _fbsdkdfl_symbol_get(LIBRARY, PREFIX, SYMBOL, TYPE, VARIABLE_NAME) \ + static TYPE VARIABLE_NAME; \ + static dispatch_once_t SYMBOL##_once; \ + static struct FBSDKDFLLoadSymbolContext ctx = { .library = &fbsdkdfl_handle_get_##LIBRARY, .name = PREFIX #SYMBOL, .address = (void **)&VARIABLE_NAME }; \ + dispatch_once_f(&SYMBOL##_once, &ctx, &fbsdkdfl_load_symbol_once) + +#define _fbsdkdfl_symbol_get_c(LIBRARY, SYMBOL) _fbsdkdfl_symbol_get(LIBRARY, "OBJC_CLASS_$_", SYMBOL, Class, c) // convenience symbol retrieval macro for getting an Objective-C class symbol and storing it in the local static c +#define _fbsdkdfl_symbol_get_f(LIBRARY, SYMBOL) _fbsdkdfl_symbol_get(LIBRARY, "", SYMBOL, SYMBOL##_type, f) // convenience symbol retrieval macro for getting a function pointer and storing it in the local static f +#define _fbsdkdfl_symbol_get_k(LIBRARY, SYMBOL, TYPE) _fbsdkdfl_symbol_get(LIBRARY, "", SYMBOL, TYPE, k) // convenience symbol retrieval macro for getting a pointer to a named variable and storing it in the local static k + +// convenience macro for verifying a pointer to a named variable was successfully loaded and returns the value +#define _fbsdkdfl_return_k(FRAMEWORK, SYMBOL) \ + NSCAssert(k != NULL, @"Failed to load constant %@ in the %@ framework", @#SYMBOL, @#FRAMEWORK); \ + return *k + +// convenience macro for getting a pointer to a named NSString, verifying it loaded correctly, and returning it +#define _fbsdkdfl_get_and_return_NSString(LIBRARY, SYMBOL) \ + _fbsdkdfl_symbol_get_k(LIBRARY, SYMBOL, NSString **); \ + NSCAssert([*k isKindOfClass:[NSString class]], @"Loaded symbol %@ is not of type NSString *", @#SYMBOL); \ + _fbsdkdfl_return_k(LIBRARY, SYMBOL) + +#pragma mark - Security Framework + +_fbsdkdfl_load_framework_once_impl_(Security) +_fbsdkdfl_handle_get_impl_(Security) + +#pragma mark - Security Constants + +@implementation FBSDKDynamicFrameworkLoader + +#define _fbsdkdfl_Security_get_k(SYMBOL) _fbsdkdfl_symbol_get_k(Security, SYMBOL, CFTypeRef *) + +#define _fbsdkdfl_Security_get_and_return_k(SYMBOL) \ + _fbsdkdfl_Security_get_k(SYMBOL); \ + _fbsdkdfl_return_k(Security, SYMBOL) + ++ (SecRandomRef)loadkSecRandomDefault +{ + _fbsdkdfl_symbol_get_k(Security, kSecRandomDefault, SecRandomRef *); + _fbsdkdfl_return_k(Security, kSecRandomDefault); +} + ++ (CFTypeRef)loadkSecAttrAccessible +{ + _fbsdkdfl_Security_get_and_return_k(kSecAttrAccessible); +} + ++ (CFTypeRef)loadkSecAttrAccessibleAfterFirstUnlockThisDeviceOnly +{ + _fbsdkdfl_Security_get_and_return_k(kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly); +} + ++ (CFTypeRef)loadkSecAttrAccount +{ + _fbsdkdfl_Security_get_and_return_k(kSecAttrAccount); +} + ++ (CFTypeRef)loadkSecAttrService +{ + _fbsdkdfl_Security_get_and_return_k(kSecAttrService); +} + ++ (CFTypeRef)loadkSecAttrGeneric +{ + _fbsdkdfl_Security_get_and_return_k(kSecAttrGeneric); +} + ++ (CFTypeRef)loadkSecValueData +{ + _fbsdkdfl_Security_get_and_return_k(kSecValueData); +} + ++ (CFTypeRef)loadkSecClassGenericPassword +{ + _fbsdkdfl_Security_get_and_return_k(kSecClassGenericPassword); +} + ++ (CFTypeRef)loadkSecAttrAccessGroup +{ + _fbsdkdfl_Security_get_and_return_k(kSecAttrAccessGroup); +} + ++ (CFTypeRef)loadkSecMatchLimitOne +{ + _fbsdkdfl_Security_get_and_return_k(kSecMatchLimitOne); +} + ++ (CFTypeRef)loadkSecMatchLimit +{ + _fbsdkdfl_Security_get_and_return_k(kSecMatchLimit); +} + ++ (CFTypeRef)loadkSecReturnData +{ + _fbsdkdfl_Security_get_and_return_k(kSecReturnData); +} + ++ (CFTypeRef)loadkSecClass +{ + _fbsdkdfl_Security_get_and_return_k(kSecClass); +} + +@end + +#pragma mark - Security APIs + +#define _fbsdkdfl_Security_get_f(SYMBOL) _fbsdkdfl_symbol_get_f(Security, SYMBOL) + +typedef int (*SecRandomCopyBytes_type)(SecRandomRef, size_t, uint8_t *); +typedef OSStatus (*SecItemUpdate_type)(CFDictionaryRef, CFDictionaryRef); +typedef OSStatus (*SecItemAdd_type)(CFDictionaryRef, CFTypeRef); +typedef OSStatus (*SecItemCopyMatching_type)(CFDictionaryRef, CFTypeRef); +typedef OSStatus (*SecItemDelete_type)(CFDictionaryRef); + +int fbsdkdfl_SecRandomCopyBytes(SecRandomRef rnd, size_t count, uint8_t *bytes) +{ + _fbsdkdfl_Security_get_f(SecRandomCopyBytes); + return f(rnd, count, bytes); +} + +OSStatus fbsdkdfl_SecItemUpdate(CFDictionaryRef query, CFDictionaryRef attributesToUpdate) +{ + _fbsdkdfl_Security_get_f(SecItemUpdate); + return f(query, attributesToUpdate); +} + +OSStatus fbsdkdfl_SecItemAdd(CFDictionaryRef attributes, CFTypeRef *result) +{ + _fbsdkdfl_Security_get_f(SecItemAdd); + return f(attributes, result); +} + +OSStatus fbsdkdfl_SecItemCopyMatching(CFDictionaryRef query, CFTypeRef *result) +{ + _fbsdkdfl_Security_get_f(SecItemCopyMatching); + return f(query, result); +} + +OSStatus fbsdkdfl_SecItemDelete(CFDictionaryRef query) +{ + _fbsdkdfl_Security_get_f(SecItemDelete); + return f(query); +} + +#pragma mark - Social Constants + +_fbsdkdfl_load_framework_once_impl_(Social) +_fbsdkdfl_handle_get_impl_(Social) + +#define _fbsdkdfl_Social_get_and_return_constant(SYMBOL) _fbsdkdfl_get_and_return_NSString(Social, SYMBOL) + +NSString *fbsdkdfl_SLServiceTypeFacebook(void) +{ + _fbsdkdfl_Social_get_and_return_constant(SLServiceTypeFacebook); +} + +NSString *fbsdkdfl_SLServiceTypeTwitter(void) +{ + _fbsdkdfl_Social_get_and_return_constant(SLServiceTypeTwitter); +} + +#pragma mark - Social Classes + +#define _fbsdkdfl_Social_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(Social, SYMBOL) + +Class fbsdkdfl_SLComposeViewControllerClass(void) +{ + _fbsdkdfl_Social_get_c(SLComposeViewController); + return c; +} + +#pragma mark - MessageUI Classes + +_fbsdkdfl_load_framework_once_impl_(MessageUI) +_fbsdkdfl_handle_get_impl_(MessageUI) + +#define _fbsdkdfl_MessageUI_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(MessageUI, SYMBOL) + +Class fbsdkdfl_MFMailComposeViewControllerClass(void) +{ + _fbsdkdfl_MessageUI_get_c(MFMailComposeViewController); + return c; +} + +Class fbsdkdfl_MFMessageComposeViewControllerClass(void) +{ + _fbsdkdfl_MessageUI_get_c(MFMessageComposeViewController); + return c; +} + +#pragma mark - QuartzCore Classes + +_fbsdkdfl_load_framework_once_impl_(QuartzCore) +_fbsdkdfl_handle_get_impl_(QuartzCore) + +#define _fbsdkdfl_QuartzCore_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(QuartzCore, SYMBOL); + +Class fbsdkdfl_CATransactionClass(void) +{ + _fbsdkdfl_QuartzCore_get_c(CATransaction); + return c; +} + +#pragma mark - QuartzCore APIs + +#define _fbsdkdfl_QuartzCore_get_f(SYMBOL) _fbsdkdfl_symbol_get_f(QuartzCore, SYMBOL) + +typedef CATransform3D (*CATransform3DMakeScale_type)(CGFloat, CGFloat, CGFloat); +typedef CATransform3D (*CATransform3DMakeTranslation_type)(CGFloat, CGFloat, CGFloat); +typedef CATransform3D (*CATransform3DConcat_type)(CATransform3D, CATransform3D); + +const CATransform3D fbsdkdfl_CATransform3DIdentity = {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}; + +CATransform3D fbsdkdfl_CATransform3DMakeScale(CGFloat sx, CGFloat sy, CGFloat sz) +{ + _fbsdkdfl_QuartzCore_get_f(CATransform3DMakeScale); + return f(sx, sy, sz); +} + +CATransform3D fbsdkdfl_CATransform3DMakeTranslation(CGFloat tx, CGFloat ty, CGFloat tz) +{ + _fbsdkdfl_QuartzCore_get_f(CATransform3DMakeTranslation); + return f(tx, ty, tz); +} + +CATransform3D fbsdkdfl_CATransform3DConcat(CATransform3D a, CATransform3D b) +{ + _fbsdkdfl_QuartzCore_get_f(CATransform3DConcat); + return f(a, b); +} + +#pragma mark - AudioToolbox APIs + +_fbsdkdfl_load_framework_once_impl_(AudioToolbox) +_fbsdkdfl_handle_get_impl_(AudioToolbox) + +#define _fbsdkdfl_AudioToolbox_get_f(SYMBOL) _fbsdkdfl_symbol_get_f(AudioToolbox, SYMBOL) + +typedef OSStatus (*AudioServicesCreateSystemSoundID_type)(CFURLRef, SystemSoundID *); +typedef OSStatus (*AudioServicesDisposeSystemSoundID_type)(SystemSoundID); +typedef void (*AudioServicesPlaySystemSound_type)(SystemSoundID); + +OSStatus fbsdkdfl_AudioServicesCreateSystemSoundID(CFURLRef inFileURL, SystemSoundID *outSystemSoundID) +{ + _fbsdkdfl_AudioToolbox_get_f(AudioServicesCreateSystemSoundID); + return f(inFileURL, outSystemSoundID); +} + +OSStatus fbsdkdfl_AudioServicesDisposeSystemSoundID(SystemSoundID inSystemSoundID) +{ + _fbsdkdfl_AudioToolbox_get_f(AudioServicesDisposeSystemSoundID); + return f(inSystemSoundID); +} + +void fbsdkdfl_AudioServicesPlaySystemSound(SystemSoundID inSystemSoundID) +{ + _fbsdkdfl_AudioToolbox_get_f(AudioServicesPlaySystemSound); + return f(inSystemSoundID); +} + +#pragma mark - Ad Support Classes + +_fbsdkdfl_load_framework_once_impl_(AdSupport) +_fbsdkdfl_handle_get_impl_(AdSupport) + +#define _fbsdkdfl_AdSupport_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(AdSupport, SYMBOL); + +Class fbsdkdfl_ASIdentifierManagerClass(void) +{ + _fbsdkdfl_AdSupport_get_c(ASIdentifierManager); + return c; +} + +#pragma mark - Safari Services +_fbsdkdfl_load_framework_once_impl_(SafariServices) +_fbsdkdfl_handle_get_impl_(SafariServices) + +#define _fbsdkdfl_SafariServices_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(SafariServices, SYMBOL); + +Class fbsdkdfl_SFSafariViewControllerClass(void) +{ + _fbsdkdfl_SafariServices_get_c(SFSafariViewController); + return c; +} + +Class fbsdkdfl_SFAuthenticationSessionClass(void) +{ + _fbsdkdfl_SafariServices_get_c(SFAuthenticationSession); + return c; +} + +#pragma mark - Authentication Services +_fbsdkdfl_load_framework_once_impl_(AuthenticationServices) +_fbsdkdfl_handle_get_impl_(AuthenticationServices) + +#define _fbsdkdfl_AuthenticationServices_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(AuthenticationServices, SYMBOL); + +Class fbsdkdfl_ASWebAuthenticationSessionClass(void) +{ + _fbsdkdfl_AuthenticationServices_get_c(ASWebAuthenticationSession); + return c; +} + +#pragma mark - Accounts Constants + +_fbsdkdfl_load_framework_once_impl_(Accounts) +_fbsdkdfl_handle_get_impl_(Accounts) + +#define _fbsdkdfl_Accounts_get_and_return_NSString(SYMBOL) _fbsdkdfl_get_and_return_NSString(Accounts, SYMBOL) + +NSString *fbsdkdfl_ACFacebookAppIdKey(void) +{ + _fbsdkdfl_Accounts_get_and_return_NSString(ACFacebookAppIdKey); +} + +NSString *fbsdkdfl_ACFacebookAudienceEveryone(void) +{ + _fbsdkdfl_Accounts_get_and_return_NSString(ACFacebookAudienceEveryone); +} + +NSString *fbsdkdfl_ACFacebookAudienceFriends(void) +{ + _fbsdkdfl_Accounts_get_and_return_NSString(ACFacebookAudienceFriends); +} + +NSString *fbsdkdfl_ACFacebookAudienceKey(void) +{ + _fbsdkdfl_Accounts_get_and_return_NSString(ACFacebookAudienceKey); +} + +NSString *fbsdkdfl_ACFacebookAudienceOnlyMe(void) +{ + _fbsdkdfl_Accounts_get_and_return_NSString(ACFacebookAudienceOnlyMe); +} + +NSString *fbsdkdfl_ACFacebookPermissionsKey(void) +{ + _fbsdkdfl_Accounts_get_and_return_NSString(ACFacebookPermissionsKey); +} + +#pragma mark - Accounts Classes + +#define _fbsdkdfl_Accounts_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(Accounts, SYMBOL); + +Class fbsdkdfl_ACAccountStoreClass(void) +{ + _fbsdkdfl_Accounts_get_c(ACAccountStore); + return c; +} + +#pragma mark - StoreKit Classes + +_fbsdkdfl_load_framework_once_impl_(StoreKit) +_fbsdkdfl_handle_get_impl_(StoreKit) + +#define _fbsdkdfl_StoreKit_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(StoreKit, SYMBOL); + +Class fbsdkdfl_SKPaymentQueueClass(void) +{ + _fbsdkdfl_StoreKit_get_c(SKPaymentQueue); + return c; +} + +Class fbsdkdfl_SKProductsRequestClass(void) +{ + _fbsdkdfl_StoreKit_get_c(SKProductsRequest); + return c; +} + +#pragma mark - AssetsLibrary Classes + +_fbsdkdfl_load_framework_once_impl_(AssetsLibrary) +_fbsdkdfl_handle_get_impl_(AssetsLibrary) + +#define _fbsdkdfl_AssetsLibrary_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(AssetsLibrary, SYMBOL); + +Class fbsdkdfl_ALAssetsLibraryClass(void) +{ + _fbsdkdfl_AssetsLibrary_get_c(ALAssetsLibrary); + return c; +} + +#pragma mark - CoreTelephony Classes + +_fbsdkdfl_load_framework_once_impl_(CoreTelephony) +_fbsdkdfl_handle_get_impl_(CoreTelephony) + +#define _fbsdkdfl_CoreTelephonyLibrary_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(CoreTelephony, SYMBOL); + +Class fbsdkdfl_CTTelephonyNetworkInfoClass(void) +{ + _fbsdkdfl_CoreTelephonyLibrary_get_c(CTTelephonyNetworkInfo); + return c; +} + +#pragma mark - CoreImage + +_fbsdkdfl_load_framework_once_impl_(CoreImage) +_fbsdkdfl_handle_get_impl_(CoreImage) + +#define _fbsdkdfl_CoreImage_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(CoreImage, SYMBOL); +#define _fbsdkdfl_CoreImage_get_and_return_NSString(SYMBOL) _fbsdkdfl_get_and_return_NSString(CoreImage, SYMBOL) + + +Class fbsdkdfl_CIImageClass(void) +{ + _fbsdkdfl_CoreImage_get_c(CIImage); + return c; +} + +Class fbsdkdfl_CIFilterClass(void) +{ + _fbsdkdfl_CoreImage_get_c(CIFilter); + return c; +} + +NSString *fbsdkdfl_kCIInputImageKey(void) +{ + _fbsdkdfl_CoreImage_get_and_return_NSString(kCIInputImageKey); +} + +NSString *fbsdkdfl_kCIInputRadiusKey(void) +{ + _fbsdkdfl_CoreImage_get_and_return_NSString(kCIInputRadiusKey); +} + +NSString *fbsdkdfl_kCIOutputImageKey(void) +{ + _fbsdkdfl_CoreImage_get_and_return_NSString(kCIOutputImageKey); +} + +#pragma mark - Photos.framework + +_fbsdkdfl_load_framework_once_impl_(Photos) +_fbsdkdfl_handle_get_impl_(Photos) + +#define _fbsdkdfl_Photos_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(Photos, SYMBOL); +#define _fbsdkdfl_Photos_get_and_return_NSString(SYMBOL) _fbsdkdfl_get_and_return_NSString(Photos, SYMBOL) + +Class fbsdkdfl_PHPhotoLibrary(void) +{ + _fbsdkdfl_Photos_get_c(PHPhotoLibrary); + return c; +} + +Class fbsdkdfl_PHAssetChangeRequest(void) +{ + _fbsdkdfl_Photos_get_c(PHAssetChangeRequest); + return c; +} + +#pragma mark - MobileCoreServices + +_fbsdkdfl_load_framework_once_impl_(MobileCoreServices) +_fbsdkdfl_handle_get_impl_(MobileCoreServices) + +#define _fbsdkdfl_MobileCoreServices_get_k(SYMBOL) _fbsdkdfl_symbol_get_k(MobileCoreServices, SYMBOL, CFStringRef *) + +#define _fbsdkdfl_MobileCoreServices_get_and_return_k(SYMBOL) \ +_fbsdkdfl_MobileCoreServices_get_k(SYMBOL); \ +_fbsdkdfl_return_k(MobileCoreServices, SYMBOL) + +#define _fbsdkdfl_MobileCoreServices_get_f(SYMBOL) _fbsdkdfl_symbol_get_f(MobileCoreServices, SYMBOL) + +typedef CFStringRef (*UTTypeCopyPreferredTagWithClass_type)(CFStringRef inUTI, CFStringRef inTagClass); + +CFStringRef fbsdkdfl_UTTypeCopyPreferredTagWithClass(CFStringRef inUTI, + CFStringRef inTagClass) +{ + _fbsdkdfl_MobileCoreServices_get_f(UTTypeCopyPreferredTagWithClass); + return f(inUTI, inTagClass); +} + +CFStringRef fbsdkdfl_kUTTagClassMIMEType(void) +{ + _fbsdkdfl_MobileCoreServices_get_and_return_k(kUTTagClassMIMEType); +} + +CFStringRef fbsdkdfl_kUTTypeJPEG(void) +{ + _fbsdkdfl_MobileCoreServices_get_and_return_k(kUTTypeJPEG); +} + +CFStringRef fbsdkdfl_kUTTypePNG(void) +{ + _fbsdkdfl_MobileCoreServices_get_and_return_k(kUTTypePNG); +} + +#pragma mark - WebKit Classes +_fbsdkdfl_load_framework_once_impl_(WebKit) +_fbsdkdfl_handle_get_impl_(WebKit) + +#define _fbsdkdfl_WebKit_get_c(SYMBOL) _fbsdkdfl_symbol_get_c(WebKit, SYMBOL); + +Class fbsdkdfl_WKWebViewClass(void) +{ + _fbsdkdfl_WebKit_get_c(WKWebView); + return c; +} + +Class fbsdkdfl_WKUserScriptClass(void) +{ + _fbsdkdfl_WebKit_get_c(WKUserScript); + return c; +} diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/af.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/af.lproj/FacebookSDK.strings new file mode 100644 index 0000000..e6bf3af --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/af.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Besoek %@ en voer die kode in wat hierbo vertoon word."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Om jou rekening te verbind, maak die Facebook-toepassing op jou mobiele toestel oop en kontroleer vir kennisgewings."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- OF -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "Goed"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Kanselleer"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Meld asseblief weer by hierdie toepassing aan om jou Facebook-rekening te herkoppel. "; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "Goed"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Die bediener is tydelik besig, probeer asseblief weer."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Hou van"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Hou van"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Kanselleer"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Meld af"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Met Facebook aangemeld"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "As %@ aangemeld"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Meld aan"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Gaan voort met Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Meld met Facebook aan"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Meld af"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Toegang is nie na die Facebook-rekening verleen nie. Verifieer toestelinstellings."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Kan nie aan Facebook koppel nie. Gaan jou netwerkverbinding na en probeer weer."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Jou Facebook-wagwoord het verander. Om jou wagwoord te bevestig, maak Instellings > Facebook oop en tik jou naam."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Die Facebook-rekening is nie op die toestel opgestel nie."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Jou rekening is nie bevestig nie. Meld asseblief by www.facebook.com aan en volg die gegewe instruksies."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Jy kan nie op die oomblik by toepassings aanmeld nie. Meld asseblief by www.facebook.com aan en volg die gegewe instruksies."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Jy is in beheer – kies watter inligting jy met toepassings wil deel."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Meld aan"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Stuur"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Deel"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Nie jy nie?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Bevestig aantekening"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Gaan voort as %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ar.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ar.lproj/FacebookSDK.strings new file mode 100644 index 0000000..0911c78 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ar.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "تفضل بزيارة %@ وإدخال الرمز الموضح أدناه."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "لربط حسابك، افتح تطبيق فيسبوك على جهازك المحمول ثم تفقد الإشعارات."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- أو -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "موافق"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "إلغاء"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "يرجى تسجيل الدخول إلى هذا التطبيق مرة أخرى لإعادة الاتصال بحساب فيسبوك."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "موافق"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "الخادم مشغول مؤقتًا، يرجى إعادة المحاولة."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "إعجاب"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "أعجبني"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "إلغاء"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "تسجيل الخروج"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "تم تسجيل الدخول بحساب فيسبوك"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "تم تسجيل الدخول باسم %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "تسجيل الدخول"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "متابعة بحساب فيسبوك"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "تسجيل الدخول بحساب فيسبوك"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "تسجيل الخروج"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "لم يتم منح إذن الوصول لحساب فيسبوك. تحقق من إعدادات الجهاز."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "تعذر الاتصال بفيسبوك. يُرجى التحقق من الاتصال بالإنترنت وإعادة المحاولة."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "تم تغيير كلمة سر فيسبوك الخاصة بك. لتأكيد كلمة السر، افتح الإعدادات > فيسبوك ثم اضغط على اسمك."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "لم تتم تهيئة حساب فيسبوك على الجهاز."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "لم يتم تأكيد حسابك. يُرجى تسجيل الدخول إلى www.facebook.com واتباع التعليمات الموضحة."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "لا يمكنك تسجيل الدخول إلى التطبيقات حاليًا. يُرجى تسجيل الدخول إلى www.facebook.com واتباع التعليمات الموضحة."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "أنت المتحكم - اختر المعلومات التي تريد مشاركتها مع التطبيقات."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "تسجيل الدخول"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "إرسال"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "مشاركة"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "لست أنت؟"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "تأكيد تسجيل الدخول"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "متابعة باسم %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/bn.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/bn.lproj/FacebookSDK.strings new file mode 100644 index 0000000..6570752 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/bn.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "%@ -এ যান এবং উপরে যে কোডটি দেখানো হয়েছে সেটি লিখুন।"; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "আপনার অ্যাকাউন্টে সংযোগ করতে, আপনার মোবাইল ডিভাইসে Facebook অ্যাপটি খুলুন এবং বিজ্ঞপ্তি চেক করুন।"; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- অথবা -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "ঠিক আছে"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "বাতিল করুন"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "আপনার Facebook অ্যাকাউন্টটিতে পুনরায় সংযোগ করার জন্য অনুগ্রহ করে এই অ্যাপটিতে লগ ইন করুন৷"; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "ঠিক আছে"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "এই সার্ভারটি সাময়িকভাবে ব্যস্ত আছে, অনুগ্রহ করে পুনরায় চেষ্টা করুন৷"; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "পছন্দ করুন"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "পছন্দ করা হয়েছে"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "বাতিল করুন"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "লগ আউট করুন"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Facebook ব্যবহার করে লগ ইন করা হয়েছে"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "%@ হিসাবে লগ ইন করা হয়েছে"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "লগ ইন করুন"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Facebook এর সাথে চালিয়ে যান"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Facebook -এর সাথে লগ ইন করুন"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "লগ আউট করুন"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Facebook অ্যাকাউন্টটিতে অ্যাক্সেস করার অনুমতি নেই৷ ডিভাইস সেটিংস যাচাই করুন৷"; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Facebook-এ সংযোগ করা যাচ্ছে না৷ আপনার নেটওয়ার্ক সংযোগটি পরীক্ষা করুন এবং পুনরায় চেষ্টা করুন৷"; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "আপনার Facebook পাসওয়ার্ডটি পরিবর্তিত হয়েছে৷ আপনার পাসওয়ার্ডটি নিশ্চিত করতে, সেটিংস > Facebook খুলুন এবং আপনার নামটি ট্যাপ করুন৷"; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Facebook অ্যাকাউন্টটি এই ডিভাইসে কনফিগার করা যাযনি৷"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "আপনার অ্যাকাউন্টটি নিশ্চিত করা যায়নি৷ অনুগ্রহ করে www.facebook.com-এ লগ ইন করুন এবং উল্লিখিত নির্দেশাবলী অনুসরণ করুন৷"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "এই সময়ে আপনি অ্যাপসে লগ ইন করতে পারবেন না৷ অনুগ্রহ করে www.facebook.com-এ লগ ইন করুন এবং উল্লিখিত নির্দেশাবলী অনুসরণ করুন৷"; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "আপনি নিয়ন্ত্রণে আছেন - অ্যাপ্সের সাথে আপনি যে তথ্য শেয়ার করতে চান তা বাছুন৷"; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "লগ ইন করুন"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "পাঠান"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "ভাগ করুন"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "আপনি নন?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "লগ ইন নিশ্চিত করুন"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "%@ হিসেবে চালিয়ে যান"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/cs.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/cs.lproj/FacebookSDK.strings new file mode 100644 index 0000000..1de061a --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/cs.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Navštivte %@ a zadejte nahoře uvedený kód."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Účet si můžete připojit tak, že si na mobilním zařízení spustíte aplikaci Facebook a podíváte se do upozornění."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- NEBO -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Zrušit"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Pokud se chcete ke svému Facebook účtu znovu připojit, přihlaste se k této aplikaci ještě jednou."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Server je dočasně zaneprázdněný, zkuste to znovu."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "To se mi líbí"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Už se mi to líbí"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Zrušit"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Odhlásit"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Přihlášen(a) přes Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Přihlášen(a) jako %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Přihlásit"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Pokračovat přes Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Přihlásit se přes Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Odhlásit"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Facebook účtu nebylo oprávnění uděleno. Ověřte nastavení zařízení."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "K Facebooku se nedá připojit. Zkontrolujte připojení k síti a zkuste to znovu."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Vaše heslo na Facebook je změněné. Pokud chcete heslo potvrdit, přejděte do Nastavení > Facebook a klepněte na své jméno."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "V tomto zařízení není Facebook účet konfigurovaný."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Váš účet není potvrzený. Přihlaste se na www. facebook.com a postupujte podle uvedených pokynů."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Do aplikací se v této chvíli přihlásit nemůžete. Přihlaste se na www. facebook.com a postupujte podle uvedených pokynů."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Je jen na vás, které informace chcete s aplikacemi sdílet."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Přihlásit"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Odeslat"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Sdílet"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Nejste to vy?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Potvrdit přihlášení"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Pokračovat jako %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/da.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/da.lproj/FacebookSDK.strings new file mode 100644 index 0000000..9a49bb5 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/da.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Gå til %@, og indtast den kode, der er angivet ovenfor."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Du kan tilknytte din konto ved at åbne Facebook-appen på din mobilenhed og tjekke notifikationerne."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- ELLER -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Annuller"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Log på denne app igen for at genoprette forbindelsen til din Facebook-konto."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Serveren er optaget i øjeblikket. Prøv igen."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Synes godt om"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Synes godt om"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Annuller"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Log af"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Logget på med Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Logget på som %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Log på"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Fortsæt med Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Log på med Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Log af"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Der er ikke blevet givet adgang til Facebook-kontoen. Kontrollér enhedsindstillingerne."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Kunne ikke oprette forbindelse til Facebook. Kontrollér din netværksforbindelse, og prøv igen."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Din Facebook-adgangskode er ændret. For at bekræfte din adgangskode skal du åbne Indstillinger > Facebook og trykke på dit navn."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Facebook-kontoen er ikke blevet konfigureret på enheden."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Din konto er ikke bekræftet. Log på www.facebook.com, og følg instruktionerne."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Du kan ikke logge på apps på nuværende tidspunkt. Log på www.facebook.com, og følg instruktionerne."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Du har styringen – vælg de oplysninger, som du vil dele med apps."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Log på"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Send"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Del"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Ikke dig?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Bekræft login"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Fortsæt som %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/de.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/de.lproj/FacebookSDK.strings new file mode 100644 index 0000000..331aa9b --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/de.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Besuche %@ und gib den oben angezeigten Code ein."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Um dein Konto zu verbinden, öffne die Facebook-App auf deinem Mobilgerät und prüfe, ob du Benachrichtigungen erhalten hast."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "– ODER –"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Abbrechen"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Melde dich bitte erneut bei dieser App an, um die Verbindung mit deinem Facebook-Konto wiederherzustellen."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Der Server ist vorübergehend beschäftigt. Bitte versuche es erneut."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Gefällt mir"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Gefällt dir"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Abbrechen"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Abmelden"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Über Facebook angemeldet"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Als %@ angemeldet"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Anmelden"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Mit Facebook fortfahren"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Über Facebook anmelden"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Abmelden"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Auf das Facebook-Konto wurde kein Zugriff erteilt. Überprüfe bitte die Geräteeinstellungen."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Verbindung zu Facebook kann nicht hergestellt werden. Bitte überprüfe deine Netzwerkverbindung und versuche es erneut."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Dein Facebook-Passwort hat sich geändert. Öffne „Einstellungen“ > „Facebook“ und tippe auf deinen Namen, um dein Passwort zu bestätigen."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Das Facebook-Konto wurde für dieses Gerät nicht konfiguriert."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Dein Konto wurde nicht bestätigt. Bitte melde dich unter www.facebook.com an und folge den Anweisungen."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Du kannst dich zurzeit nicht bei Apps anmelden. Bitte melde dich unter www.facebook.com an und folge den Anweisungen."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Es liegt ganz an dir – du kannst dir aussuchen, was du mit Apps teilen möchtest."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Anmelden"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Senden"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Teilen"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Nicht du?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Login bestätigen"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Fortfahren als %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/el.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/el.lproj/FacebookSDK.strings new file mode 100644 index 0000000..9b7a3bd --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/el.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Επισκεφτείτε τη διεύθυνση %@ και συμπληρώστε τον παραπάνω κωδικό."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Για να συνδεθείτε στο λογαριασμό σας, ανοίξτε την εφαρμογή Facebook στη φορητή συσκευή σας και ελέγξτε τις ειδοποιήσεις."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- Ή -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Άκυρο"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Συνδεθείτε ξανά σε αυτή την εφαρμογή για να συνδέσετε και πάλι το λογαριασμό σας στο Facebook."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Ο διακομιστής είναι προσωρινά απασχολημένος, προσπαθήστε ξανά."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Μου αρέσει!"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Σας αρέσει"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Άκυρο"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Αποσύνδεση"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Έχει γίνει σύνδεση μέσω Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Έχει γίνει σύνδεση ως %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Σύνδεση"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Συνεχίστε με το Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Σύνδεση μέσω Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Αποσύνδεση"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Δεν έχει παραχωρηθεί πρόσβαση στο λογαριασμό Facebook. Επαληθεύστε τις ρυθμίσεις της συσκευής σας."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Δεν είναι δυνατή η σύνδεση στο Facebook. Ελέγξτε τη σύνδεση στο δίκτυο και προσπαθήστε ξανά."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Ο κωδικός πρόσβασής σας στο Facebook άλλαξε. Για να επιβεβαιώσετε τον κωδικό σας, πηγαίνετε στις Ρυθμίσεις > Facebook και πατήστε το όνομά σας."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Ο λογαριασμός Facebook δεν έχει διαμορφωθεί στη συσκευή."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Ο λογαριασμός σας δεν επιβεβαιώθηκε. Συνδεθείτε στο www.facebook.com και ακολουθήστε τις οδηγίες που εμφανίζονται."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Προς το παρόν δεν μπορείτε να συνδεθείτε σε εφαρμογές. Συνδεθείτε στο www.facebook.com και ακολουθήστε τις οδηγίες που εμφανίζονται."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Έχετε τον έλεγχο - επιλέξτε ποιες πληροφορίες θέλετε να κοινοποιούνται στις εφαρμογές."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Σύνδεση"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Αποστολή"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Κοινοποίηση"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Δεν είστε εσείς;"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Επιβεβαίωση σύνδεσης"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Συνέχεια ως %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/en.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/en.lproj/FacebookSDK.strings new file mode 100644 index 0000000..12df4c2 Binary files /dev/null and b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/en.lproj/FacebookSDK.strings differ diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/en_GB.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/en_GB.lproj/FacebookSDK.strings new file mode 100644 index 0000000..358a92c --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/en_GB.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* The format string for device login instructions */ +"DeviceLogin.LogInPrompt" = "Visit %@ and enter the code shown above."; + +/* The 'or' string for smart login instructions */ +"DeviceLogin.SmartLogInOrLabel" = "-- OR --"; + +/* The string for smart login instructions */ +"DeviceLogin.SmartLogInPrompt" = "To connect your account, open the Facebook app on your mobile device and check for notifications."; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Cancel"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Please log in to this app again to reconnect your Facebook account."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "The server is temporarily busy, please try again."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Like"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Liked"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Cancel"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Log out"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Logged in using Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Logged in as %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Log in"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Continue with Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Log in with Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Log out"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Access has not been granted to the Facebook account. Verify device settings."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Unable to connect to Facebook. Please check your network connection and try again."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Your Facebook password has changed. To confirm your password, open Settings > Facebook and tap your name."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "The Facebook account has not been configured on the device."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Your account is not confirmed. Please log in to www.facebook.com and follow the instructions given."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "You cannot log in to apps at this time. Please log in to www.facebook.com and follow the instructions given."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "You're in control – choose what information you want to share with apps."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Log In"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Send"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Share"; + +/* The title for the alert when smart login requires confirmation */ +"SmartLogin.ConfirmationTitle" = "Confirm Login"; + +/* The format string to continue as for the alert when smart login requires confirmation */ +"SmartLogin.Continue" = "Continue as %@"; + +/* The cancel label for the alert when smart login requires confirmation */ +"SmartLogin.NotYou" = "Not you?"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/es.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/es.lproj/FacebookSDK.strings new file mode 100644 index 0000000..7038004 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/es.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Visita %@ e ingresa el código que se muestra arriba."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Para conectar tu cuenta, abre la aplicación de Facebook en tu dispositivo móvil y comprueba las notificaciones."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- O -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "Aceptar"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Cancelar"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Inicia sesión de nuevo en esta aplicación para volver a conectarte a tu cuenta de Facebook."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "Aceptar"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "El servidor está temporalmente ocupado. Vuelve a intentarlo."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Me gusta"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Te gusta"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Cancelar"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Cerrar sesión"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Sesión iniciada con Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Sesión iniciada como %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Inicio de sesión"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Continuar con Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Iniciar sesión con Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Salir"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "No se concedió acceso a la cuenta de Facebook. Verifica la configuración del dispositivo."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "No es posible conectarse a Facebook. Comprueba tu conexión a internet y vuelve a intentarlo."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Cambió tu contraseña de Facebook. Para confirmar tu contraseña, abre Configuración > Facebook y toca tu nombre."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "No se configuró la cuenta de Facebook en el dispositivo."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Tu cuenta no está confirmada. Inicia sesión en www.facebook.com y sigue las instrucciones."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "No puedes iniciar sesión en las aplicaciones en este momento. Inicia sesión en www.facebook.com y sigue las instrucciones."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Tú decides: elige qué información quieres compartir con las aplicaciones."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Inicio de sesión"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Enviar"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Compartir"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "¿No eres tú?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Confirmar inicio de sesión"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Continuar como %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/es_ES.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/es_ES.lproj/FacebookSDK.strings new file mode 100644 index 0000000..963fa96 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/es_ES.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Visita %@ e introduce el código que se muestra arriba."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Para conectar tu cuenta, abre la aplicación de Facebook en tu dispositivo móvil y comprueba las notificaciones."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- O -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "Aceptar"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Cancelar"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Vuelve a iniciar sesión en esta aplicación para volver a conectar tu cuenta de Facebook."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "Aceptar"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "El servidor está ocupado temporalmente. Vuelve a intentarlo más tarde."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Me gusta"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Te gusta"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Cancelar"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Salir"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Sesión iniciada con Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Sesión iniciada como %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Inicio de sesión"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Continuar con Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Iniciar sesión con Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Salir"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "No se ha otorgado acceso a la cuenta de Facebook. Verifica la configuración del dispositivo."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "No es posible conectarse a Facebook. Comprueba tu conexión de red y vuelve a intentarlo."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Tu contraseña de Facebook ha cambiado. Para confirmar tu contraseña, abre Configuración > Facebook y toca tu nombre."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "La cuenta de Facebook no se ha configurado en el dispositivo."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Tu cuenta no se ha confirmado. Inicia sesión en www.facebook.com y sigue las instrucciones."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "No puedes iniciar sesión en las aplicaciones en este momento. Inicia sesión en www.facebook.com y sigue las instrucciones."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Tú tienes el control: elige la información que quieres compartir con las aplicaciones."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Inicio de sesión"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Enviar"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Compartir"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "¿No eres tú?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Confirmar inicio de sesión"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Continuar como %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/fi.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/fi.lproj/FacebookSDK.strings new file mode 100644 index 0000000..1f1cc78 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/fi.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Siirry osoitteeseen %@ ja kirjoita oheinen koodi sivulle."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Pääset liittämään käyttäjätilisi avaamalla Facebook-sovelluksen mobiililaitteellasi ja tarkistamalla ilmoitukset."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- TAI -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Peruuta"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Kirjaudu tähän sovellukseen uudelleen, jotta voit yhdistää Facebook-tilisi uudelleen."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Palvelin on tilapäisesti varattu, yritä uudelleen."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Tykkää"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Tykätty"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Peruuta"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Kirjaudu ulos"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Sisäänkirjautunut Facebookin avulla"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Sisäänkirjautunut nimellä %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Kirjaudu sisään"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Jatka Facebook-tunnuksilla"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Kirjaudu sisään Facebookin avulla"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Kirjaudu ulos"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Pääsyä Facebook-tiliin ei ole myönnetty. Tarkista laiteasetukset."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Yhteyttä Facebookiin ei voi muodostaa. Tarkista verkkoyhteys ja yritä sitten uudelleen."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Facebook-salasanasi on vaihdettu. Vahvista salasanasi avaamalla Asetukset > Facebook ja napauttamalla nimeäsi."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Facebook-tiliä ei ole määritetty laitteessa."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Tiliäsi ei ole vahvistettu. Kirjaudu sisään osoitteeseen www.facebook.com ja noudata annettuja ohjeita."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Et pysty kirjautumaan sovelluksiin tällä hetkellä. Kirjaudu sisään osoitteeseen www.facebook.com ja noudata annettuja ohjeita."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Sinä voit valita, mitä tietoja jaat sovelluksille."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Kirjaudu sisään"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Lähetä"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Jaa"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Etkö tämä ole sinä?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Vahvista sisäänkirjautuminen"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Jatka nimellä %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/fil.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/fil.lproj/FacebookSDK.strings new file mode 100644 index 0000000..5daf341 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/fil.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Pumunta sa %@ at ilagay ang code na ipinapakita sa itaas."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Para ikonekta ang iyong account, buksan ang Facebook app sa iyong cellphone at tumingin ng mga notification."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- O KAYA -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Kanselahin"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Mangyaring mag-log in muli sa app na ito para ikonekta muli ang iyong Facebook account."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Pansamantalang abala ang server, pakisubukan muli."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Gustuhin"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Nagustuhan"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Kanselahin"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Mag-log Out"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Naka-log in gamit ang Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Naka-log in bilang si %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Mag-log in"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Magatuloy sa Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Mag-log in sa pamamagitan ng Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Mag-log out"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Hindi binigyan ng access ang Facebook account. Beripikahin ang mga setting ng device."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Hindi nakakonekta sa Facebook. Tingnan ang iyong koneksyon sa network at subukan muli."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Nagbago ang iyong password sa Facebook. Para makumpirma ang iyong password, buksan ang Mga Setting > Facebook at i-tap ang iyong pangalan."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Hindi na-configure sa device ang Facebook account."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Hindi nakumpirma ang iyong account. Mangyaring mag-log in sa www.facebook.com at sundin ang mga ibinigay na tagubilin."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Hindi ka makakapag-log in sa mga app sa oras na ito. Mangyaring mag-log in sa www.facebook.com at sundin ang mga ibinigay na tagubilin."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Ikaw ang may kontrol - piliin kung anong impormasyon ang gusto mong ibahagi sa mga app."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Mag-log In"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Ipadala"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Ibahagi"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Hindi ikaw?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "I-confirm ang Pag-log in"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Magpatuloy bilang %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/fr.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/fr.lproj/FacebookSDK.strings new file mode 100644 index 0000000..65fb07c --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/fr.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Consultez la page %@ et saisissez le code indiqué ci-dessus."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Pour connecter votre compte, lancez l’application Facebook sur votre appareil mobile et consultez les notifications."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- OU -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Annuler"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Veuillez vous connecter à nouveau à cette application pour reconnecter votre compte Facebook."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Le serveur est temporairement occupé. Veuillez réessayer plus tard."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "J’aime"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "J’aime déjà"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Annuler"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Déconnexion"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Connecté(e) à l’aide de Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Connecté(e) en tant que %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Connexion"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Continuer avec Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Connexion avec Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Déconnexion"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "L’accès au compte Facebook n’a pas été autorisé. Vérifiez les paramètres de l’appareil."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Connexion à Facebook impossible. Vérifiez votre connexion avant de réessayer."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Votre mot de passe Facebook a changé. Pour confirmer votre mot de passe, ouvrez Paramètres > Facebook et saisissez votre nom."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Le compte Facebook n’a pas été configuré sur l’appareil."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Votre compte n’est pas confirmé. Veuillez vous connecter à www.facebook.com et suivre les instructions indiquées."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Vous ne pouvez pas vous connecter à des applications pour le moment. Veuillez vous connecter à www.facebook.com et suivre les instructions indiquées."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Vous gardez le contrôle. Choisissez les informations que vous souhaitez partager avec les applications."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Connexion"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Envoyer"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Partager"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Ce n’est pas vous ?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Confirmer la connexion"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Continuer en tant que %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/gu.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/gu.lproj/FacebookSDK.strings new file mode 100644 index 0000000..a91785a --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/gu.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "%@ ની મુલાકાત લો અને ઉપર બતાવ્યા પ્રમાણે કોડ દાખલ કરો."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "તમારા એકાઉન્ટ સાથે જોડાવા માટે, તમારા મોબાઇલ ઉપકરણ પર Facebook એપ્લિકેશન ખોલો અને સૂચનો માટે તપાસો."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- અથવા -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "ઠીક"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "રદ કરો"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "તમારા ફેસબુક ખાતાને ફરીથી કનેક્ટ કરવા માટે કૃપા કરીને આ એપ્લિકેશનમાં ફરી લૉગ ઇન કરો."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "ઠીક"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "સર્વર અસ્થાયીરૂપે વ્યસ્ત છે, કૃપા કરીને ફરી પ્રયાસ કરો."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "પસંદ કરો"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "પસંદ કર્યું"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "રદ કરો"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "લૉગ આઉટ કરો"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "ફેસબુકનો ઉપયોગ કરીને લૉગ ઇન કરો"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "%@ તરીકે લૉગ ઇન થયાં"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "લૉગ ઇન કરો"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Facebook સાથે ચાલુ રાખો"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "ફેસબુક સાથે લૉગ ઇન કરો"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "લૉગ આઉટ કરો"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "ફેસબુક ખાતા પર ઍક્સેસ આપવામાં આવી નથી. ઉપકરણ સેટિંગ્સ ચકાસો"; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "ફેસબુકથી કનેક્ટ કરવામાં અસમર્થ. તમારું નેટવર્ક કનેક્શન તપાસો અને ફરી પ્રયાસ કરો."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "તમારો ફેસબુક પાસવર્ડ બદલાઈ ગયો છે. તમારા પાસવર્ડની પુષ્ટિ કરવા માટે, સેટિંગ્સ > ફેસબુક ખોલો અને તમારા નામ પર ટૅપ કરો."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "ઉપકરણ પર ફેસબુક ખાતું કન્ફિગર કરવામાં આવ્યું નથી."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "તમારા ખાતાની પુષ્ટિ કરવામાં આવી નથી. કૃપા કરીને www.facebook.com પર લૉગ ઇન કરો અને આપેલા સૂચનોને અનુસરો."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "તમે આ સમયે એપ્લિકેશન્સમાં લૉગ ઇન કરી શકતાં નથી. કૃપા કરીને www.facebook.com પર લૉગ ઇન કરો અને આપેલા સૂચનોને અનુસરો."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "તમે નિયંત્રણ કરો છો - તમે એપ્લિકેશન્સ સાથે કઈ માહિતી શેર કરવા માંગો છો તે પસંદ કરો."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "લૉગ ઇન કરો"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "મોકલો"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "શેર કરો"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "તમે નહિ?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "લૉગિનની પુષ્ટિ કરો"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "%@ તરીકે ચાલુ રાખો"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/he.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/he.lproj/FacebookSDK.strings new file mode 100644 index 0000000..2e2a3c5 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/he.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "בקר ב-%@ והזן את הקוד המופיע למעלה."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "כדי לחבר את החשבון שלך, פתח את אפליקציית פייסבוק במכשיר הנייד שלך ובדוק אם יש התראות."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- או -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "אישור"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "ביטול"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "התחבר לאפליקציה זו שוב כדי לחבר מחדש את חשבון הפייסבוק שלך."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "אישור"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "השרת עמוס באופן זמני, נסה שוב."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "אהבתי"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "אהבתי"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "ביטול"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "התנתק"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "מחובר באמצעות פייסבוק"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "מחובר בתור %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "התחבר"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "המשך עם פייסבוק"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "התחבר באמצעות פייסבוק"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "התנתק"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "לא הוענקה גישה לחשבון הפייסבוק. אמת את הגדרות המכשיר."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "לא ניתן להתחבר לפייסבוק. בדוק את החיבור שלך לרשת ונסה שוב."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "סיסמת הפייסבוק שלך השתנתה. כדי לאשר את הסיסמה, פתח את 'הגדרות' > 'פייסבוק' והקש על שמך."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "חשבון הפייסבוק לא הוגדר במכשיר."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "החשבון שלך לא אושר. התחבר ל-www.facebook.com ופעל בהתאם להוראות שיוצגו."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "לא ניתן להתחבר לאפליקציות כעת. התחבר ל-www.facebook.com ופעל בהתאם להוראות שיוצגו."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "אתה מחליט - בחר איזה מידע אתה רוצה לשתף עם אפליקציות."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "התחבר"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "שלח"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "שתף"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "לא אתה?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "אשר התחברות"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "המשך כ-%@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/hi.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/hi.lproj/FacebookSDK.strings new file mode 100644 index 0000000..14b1b95 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/hi.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "%@ पर जाएँ और ऊपर दिया गया कोड दर्ज करें."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "अपने खाते को कनेक्ट करने के लिए, अपने मोबाइल एप्लिकेशन में Facebook एप्लिकेशन खोलें और सूचनाओं के लिए जाँच करें."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- या -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "ठीक"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "रद्द करें"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "अपने Facebook खाते से फिर से कनेक्ट होने के लिए कृपया इस एप्लिकेशन में फिर से लॉग इन करें."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "ठीक"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "सर्वर अस्थायी रूप से व्यस्त है, कृपया फिर से कोशिश करें."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "पसंद करें"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "पसंद किया"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "रद्द करें"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "लॉग आउट करें"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Facebook का उपयोग करके लॉग इन किया हुआ है"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "%@ के रूप में लॉग इन किया हुआ है"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "लॉग इन करें"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Facebook के साथ जारी रखें"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Facebook से लॉग इन करें"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "लॉग आउट"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Facebook खाते को एक्सेस नहीं दी गई है. डिवाइस सेटिंग सत्यापित करें."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Facebook से कनेक्ट होने में असमर्थ. कृपया अपने नेटवर्क कनेक्शन की जाँच करें फिर से प्रयास करें."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "आपका Facebook पासवर्ड बदल गया है. अपना पासवर्ड कन्फ़र्म करने के लिए, सेटिंग > Facebook खोलें और अपना नाम टैप करें."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "डिवाइस पर Facebook खाता कॉन्फ़िगर नहीं किया गया है."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "आपका खाता कन्फ़र्म नहीं किया गया है. कृपया www.facebook.com में लॉग इन करें और दिए गए निर्देशों का पालन करें."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "आप इस समय एप्लिकेशन में लॉग इन नहीं कर सकते. कृपया www.facebook.com में लॉग इन करें और दिए गए निर्देशों का पालन करें."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "आप नियंत्रण में हैं - चुनें कि आप एप्लिकेशन से कौन-सी जानकारी साझा करना चाहते हैं."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "लॉग इन करें"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "भेजें"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "साझा करें"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "आप नहीं हैं?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "लॉग इन कन्फ़र्म करें"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "%@ के रूप में जारी रखें"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/hr.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/hr.lproj/FacebookSDK.strings new file mode 100644 index 0000000..45e3312 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/hr.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Posjetite adresu %@ i unesite gore prikazan kod."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Da biste povezali račun, otvorite aplikaciju Facebook na mobilnom uređaju i potražite obavijesti."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- ILI -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "U redu"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Odustani"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Ponovo se prijavite u ovu aplikaciju kako biste se ponovo povezali s Facebook računom."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "U redu"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Poslužitelj je privremeno zauzet, pokušajte ponovo."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Sviđa mi se"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Označeno sa \"sviđa mi se\""; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Odustani"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Odjavi se"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Prijavljen putem Facebooka"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Prijavljen kao %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Prijavi se"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Nastavite s korištenjem Facebooka"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Prijava putem Facebooka"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Odjavi se"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Pristup Facebook računu nije odobren. Provjerite postavke uređaja."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Povezivanje s Facebookom nije uspjelo. Provjerite mrežnu vezu i pokušajte ponovo."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Promijenili ste lozinku za Facebook. Za potvrdu lozinke otvorite Postavke > Facebook i dodirnite svoje ime."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Na uređaju nije konfiguriran račun za Facebook."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Vaš račun nije potvrđen. Prijavite se na www.facebook.com i slijedite upute."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "U ovome trenutku prijava u aplikacije nije moguća. Prijavite se na www.facebook.com i slijedite upute."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Vi odlučujete – odaberite koje podatke želite dijeliti u aplikacijama."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Prijava"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Pošalji"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Dijeli"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "To niste vi?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Potvrda prijave"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Nastavi kao %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/hu.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/hu.lproj/FacebookSDK.strings new file mode 100644 index 0000000..6d74f46 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/hu.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Keresd fel a %@ címet, és írd be a fent megjelenített kódot."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "A fiók hozzákapcsolásához nyisd meg a Facebook alkalmazást a mobilkészülékeden, és nézd meg az értesítéseket."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- VAGY -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Mégsem"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Kérjük, jelentkezz be újra ebbe az alkalmazásba, ha szeretnéd ismét összekapcsolni a Facebook-fiókoddal."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "A kiszolgáló átmenetileg foglalt, próbáld meg újra."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Tetszik"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Kedveled"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Mégsem"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Kijelentkezés"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Bejelentkezve a Facebook használatával"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Bejelentkezve %@ néven"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Bejelentkezés"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Folytatás a Facebookkal"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Bejelentkezés a Facebook használatával"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Kijelentkezés"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "A Facebook-fiókhoz nincs megadva a hozzáférés. Ellenőrizd az eszköz beállításait."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Nem sikerült kapcsolódni a Facebookhoz. Ellenőrizd a hálózati kapcsolatot, majd próbáld meg újra."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Facebook-jelszavad megváltozott. A jelszó megerősítéséhez nyisd meg a Settings (Beállítások) > Facebook pontot, és koppints a nevedre."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "A készüléken nincs beállítva a Facebook-fiók."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "A fiókod nincs megerősítve. Jelentkezz be a www.facebook.com címre, és kövesd az utasításokat."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Jelenleg nem tudsz alkalmazásokba bejelentkezni. Jelentkezz be a www.facebook.com címre, és kövesd az utasításokat."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "A döntés a kezedben van: kiválaszthatod, hogy milyen adatokat osztasz meg az alkalmazásokkal."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Bejelentkezés"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Küldés"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Megosztás"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Nem te vagy az?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Bejelentkezés megerősítése"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Folytatás mint %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/id.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/id.lproj/FacebookSDK.strings new file mode 100644 index 0000000..651b51b --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/id.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Kunjungi %@ dan masukkan kode yang ditampilkan di atas."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Untuk menghubungkan akun Anda, buka aplikasi Facebook di perangkat seluler Anda dan periksa pemberitahuan."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- ATAU -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Batal"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Harap masuk ke aplikasi ini lagi untuk menghubungkan kembali akun Facebook Anda."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Server untuk sementara sedang sibuk, harap coba lagi."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Suka"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Disukai"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Batal"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Keluar"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Masuk menggunakan Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Masuk sebagai %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Masuk"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Lanjutkan dengan Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Masuk menggunakan Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Keluar"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Akses belum diberikan ke akun Facebook. Verifikasi pengaturan perangkat."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Tidak dapat terhubung ke Facebook. Periksa koneksi jaringan dan coba lagi."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Kata sandi Facebook Anda telah diubah. Untuk mengonfirmasi kata sandi Anda, buka Pengaturan > Facebook, lalu ketuk nama Anda."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Akun Facebook belum dikonfigurasikan di perangkat."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Akun Anda tidak dikonfirmasi. Masuk ke www.facebook.com dan ikuti petunjuknya."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Saat ini Anda tidak dapat masuk ke aplikasi. Masuk ke www.facebook.com dan ikuti petunjuknya."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Anda memegang kendali - pilih info yang ingin Anda bagikan dengan aplikasi."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Masuk"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Kirim"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Berbagi"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Bukan Anda?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Konfirmasikan Masuk"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Lanjutkan sebagai %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/it.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/it.lproj/FacebookSDK.strings new file mode 100644 index 0000000..469ea53 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/it.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Visita %@ e inserisci il codice mostrato sopra."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Per collegare il tuo account, apri l'app Facebook sul tuo dispositivo mobile e controlla se hai notifiche."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- OPPURE -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Annulla"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Effettua di nuovo l'accesso a questa applicazione per riconnettere il tuo account Facebook."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Il server è temporaneamente occupato, riprova."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Mi piace"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Ti piace"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Annulla"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Esci"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Accesso effettuato tramite Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Accesso effettuato come %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Accedi"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Continua con Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Accedi con Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Esci"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "All'account Facebook non è stato concesso l'accesso. Verifica le impostazioni del dispositivo."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Impossibile connettersi a Facebook. Controlla la tua connessione e riprova."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "La tua password di Facebook è stata modificata. Per confermare la password, apri Impostazioni > Facebook e tocca il tuo nome."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "L'account Facebook non è stato configurato nel dispositivo."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Il tuo account non è stato verificato. Accedi a www.facebook.com e segui le istruzioni fornite."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Impossibile accedere alle applicazioni al momento. Accedi a www.facebook.com e segui le istruzioni fornite."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Il controllo è nelle tue mani: scegli quali informazioni condividere con le app."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Accedi"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Invia"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Condividi"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Non sei tu?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Conferma l'accesso"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Continua come %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ja.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ja.lproj/FacebookSDK.strings new file mode 100644 index 0000000..fb08bd7 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ja.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "%@にアクセスし、上に表示されているコードを入力してください。"; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "アカウントをリンクするには、お使いのモバイル機器でFacebookアプリを開き、お知らせをご確認ください。"; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- または -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "キャンセル"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "このアプリにもう一度ログインして、Facebookアカウントを再接続してください。"; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "サーバーが一時的にビジーです。もう一度お試しください。"; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "いいね!"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "いいね!済み"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "キャンセル"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "ログアウト"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Facebookを使用してログイン中"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "%@としてログイン中"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "ログイン"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Facebookで続ける"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Facebookでログイン"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "ログアウト"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Facebookアカウントにアクセス権が与えられていません。デバイス設定を確認してください。"; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Facebookに接続できませんでした。ネットワーク接続を確認してもう一度お試しください。"; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Facebookパスワードが変更されています。パスワードを確認するには、[設定] > [Facebook]の順に開き、名前をタップしてください。"; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "デバイスにFacebookアカウントが構成されていません。"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "アカウントが確認されません。www.facebook.comにログインし、表示される説明に従ってください。"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "今はアプリにログインできません。www.facebook.comにログインし、表示される説明に従ってください。"; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "アプリと共有する情報をコントロールできます。"; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "ログイン"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "送信"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "シェア"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "別のユーザーとしてログイン"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "ログインの確認"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "%@として続行"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/kn.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/kn.lproj/FacebookSDK.strings new file mode 100644 index 0000000..f743a27 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/kn.lproj/FacebookSDK.strings @@ -0,0 +1,77 @@ +/* The format string for device login instructions */ +"DeviceLogin.LogInPrompt" = "ನಿಮ್ಮ ಸ್ಮಾರ್ಟ್‌ ಫೋನ್‌ ಅಥವಾ ಕಂಪ್ಯೂಟರ್‌ನಲ್ಲಿ %@ ಗೆ ಭೇಟಿ ನೀಡಿ ಮತ್ತು ಈ ಕೋಡ್‌ ಅನ್ನು ನಮೂದಿಸಿ:"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "ಸರಿ"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "ರದ್ದುಮಾಡು"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "ನಿಮ್ಮ Facebook ಖಾತೆಯನ್ನು ಮರುಸಂಪರ್ಕಗೊಳಿಸಲು ಈ ಅಪ್ಲಿಕೇಶನ್‌ನಲ್ಲಿ ಮತ್ತೊಮ್ಮೆ ಲಾಗಿನ್‌ ಮಾಡಿ."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "ಸರಿ"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "ಸರ್ವರ್ ತಾತ್ಕಾಲಿಕವಾಗಿ ಕಾರ್ಯನಿರತವಾಗಿದೆ, ದಯವಿಟ್ಟು ನಂತರ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "ಇಷ್ಟವಾಗಿದೆ"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "ಇಷ್ಟಪಟ್ಟಿದ್ದಾರೆ"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "ರದ್ದುಮಾಡು"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "ಲಾಗ್‌ ಔಟ್‌"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Facebook ಬಳಸಿಕೊಂಡು ಲಾಗಿನ್‌ ಮಾಡಲಾಗಿದೆ"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "%@ ರಂತೆ ಲಾಗಿನ್‌ ಮಾಡಲಾಗಿದೆ"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "ಲಾಗ್‌ ಇನ್‌"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Facebook ಅನ್ನು ಮುಂದುವರಿಸಿ"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Facebook ಮೂಲಕ ಲಾಗ್‌ ಇನ್‌ ಮಾಡಿ"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "ಲಾಗ್‌ ಔಟ್‌"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Facebook ಖಾತೆಗೆ ಪ್ರವೇಶವನ್ನು ಅನುಮತಿಸಲಾಗಿಲ್ಲ. ಸಾಧನದ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಪರಿಶೀಲಿಸಿ."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Facebook ಗೆ ಸಂಪರ್ಕಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ. ನಿಮ್ಮ ನೆಟ್‌ವರ್ಕ್‌ ಸಂಪರ್ಕವನ್ನು ಪರಿಶೀಲಿಸಿ ಹಾಗೂ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "ನಿಮ್ಮ Facebook ಪಾಸ್‌ವರ್ಡ್‌ ಬದಲಿಸಲಾಗಿದೆ. ನಿಮ್ಮ ಪಾಸ್‌ವರ್ಡ್‌ ಖಚಿತಪಡಿಸಲು, ಸೆಟ್ಟಿಂಗ್‌ಗಳು > Facebook ತೆರೆಯಿರಿ ಮತ್ತು ನಿಮ್ಮ ಹೆಸರನ್ನು ಟ್ಯಾಪ್‌ ಮಾಡಿ."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Facebook ಖಾತೆಯನ್ನು ಸಾಧನದಲ್ಲಿ ಕಾನ್ಫಿಗರ್ ಮಾಡಲಾಗಿಲ್ಲ."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "ನಿಮ್ಮ ಖಾತೆಯನ್ನು ದೃಢೀಕರಿಸಿಲ್ಲ. ದಯವಿಟ್ಟು www.facebook.com ಗೆ ಲಾಗಿನ್‌ ಮಾಡಿ ಮತ್ತು ಕೆಳಗೆ ನೀಡಿದ ಸೂಚನೆಗಳನ್ನು ಅನುಸರಿಸಿ."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "ನೀವು ಈ ಸಮಯದಲ್ಲಿ ಅಪ್ಲಿಕೇಶನ್‌ಗಳಿಗೆ ಲಾಗಿನ್‌ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ. ದಯವಿಟ್ಟು www.facebook.com ಗೆ ಲಾಗಿನ್‌ ಮಾಡಿ ಮತ್ತು ಕೆಳಗೆ ನೀಡಿದ ಸೂಚನೆಗಳನ್ನು ಅನುಸರಿಸಿ."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "ನೀವು ನಿಯಂತ್ರಣದಲ್ಲಿರುವಿರಿ - ನೀವು ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ಬಳಸಿಕೊಂಡು ಹಂಚಿಕೊಳ್ಳಲು ಬಯಸುವ ವಿಷಯವನ್ನು ಆರಿಸಿ."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "ಲಾಗ್‌ ಇನ್‌"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "ಕಳುಹಿಸಿ"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "ಹಂಚಿಕೊಳ್ಳಿ"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ko.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ko.lproj/FacebookSDK.strings new file mode 100644 index 0000000..0dbd73f --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ko.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "%@를 방문하여 위에 표시된 코드를 입력하세요."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "계정을 연결하려면 모바일 기기에서 Facebook 앱을 열고 알림을 확인하세요."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- 또는 -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "확인"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "취소"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Facebook 계정을 다시 연결하려면 이 앱에 다시 로그인하세요."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "확인"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "일시적으로 서버 사용량이 많아졌습니다. 다시 시도하세요."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "좋아요"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "좋아요"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "취소"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "로그아웃"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Facebook 계정으로 로그인함"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "%@(으)로 로그인함"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "로그인"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Facebook으로 계속"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Facebook으로 로그인"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "로그아웃"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Facebook 계정에 대한 액세스가 승인되지 않았습니다. 기기 설정을 확인하세요."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Facebook에 연결할 수 없습니다. 네트워크 연결을 확인하고 다시 시도하세요."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Facebook 비밀번호가 변경되었습니다. 비밀번호를 확인하려면 설정 > Facebook으로 이동하여 이름을 누르세요."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Facebook 계정이 기기에 구성되어 있지 않습니다."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "계정이 확인되지 않았습니다. www.facebook.com에 로그인한 뒤 안내를 따라주세요."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "현재 앱에 로그인할 수 없습니다. www.facebook.com에 로그인한 뒤 안내를 따라주세요."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "원하는 정보를 선택하여 앱에 공유할 수 있습니다."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "로그인"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "보내기"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "공유하기"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "회원님이 아닌가요?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "로그인 확인"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "%@님으로 계속"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ml.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ml.lproj/FacebookSDK.strings new file mode 100644 index 0000000..e7a0189 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ml.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "%@ സന്ദർശിച്ച്‌ മുകളിൽ കാണിച്ച‌ കോഡ്‌ നൽകുക."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "നിങ്ങളുടെ അക്കൗണ്ട്‌ കണക്‌റ്റുചെയ്യാൻ, നിങ്ങളുടെ മൊബൈൽ ഉപകരണത്തിലെ Facebook ആപ്പ്‌ തുറന്ന്‌ അറിയിപ്പുകൾ പരിശോധിക്കുക."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- അല്ലെങ്കിൽ -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "ശരി"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "റദ്ദാക്കുക"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "നിങ്ങളുടെ Facebook അക്കൗണ്ടുമായി വീണ്ടും കണക്‌റ്റുചെയ്യുന്നതിന് ഈ ആപ്ലിക്കേഷനിൽ വീണ്ടും ലോഗിൻ ചെയ്യുക."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "ശരി"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "സെർവർ താൽക്കാലികമായി തിരക്കിലാണ്, വീണ്ടും ശ്രമിക്കുക."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "ലൈക്കുചെയ്യുക"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "ലൈക്കുചെയ്‌‌തു"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "റദ്ദാക്കുക"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "ലോഗ്ഔട്ട് ചെയ്യുക"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Facebook ഉപയോഗിച്ച് ലോഗിൻ ചെയ്‌തു"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "%@ എന്നതായി ലോഗിൻ ചെയ്‌തു"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "ലോഗിൻ ചെയ്യുക"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Facebook ഉപയോഗിച്ച് തുടരുക"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Facebook ഉപയോഗിച്ച് ലോഗിൻ ചെയ്യുക"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "ലോഗ്ഔട്ട് ചെയ്യുക"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Facebook അക്കൗണ്ടിലേക്ക് ആക്‌സസ് നൽകിയിട്ടില്ല. ഉപകരണ ക്രമീകരണങ്ങൾ പരിശോധിച്ചുറപ്പിക്കുക."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Facebook-ലേക്ക് കണക്‌റ്റുചെയ്യാനായില്ല. നിങ്ങളുടെ നെറ്റ്‌വർക്ക് കണക്ഷൻ പരിശോധിച്ച് വീണ്ടും ശ്രമിക്കുക."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "നിങ്ങളുടെ Facebook പാസ്‌വേഡ് മാറി. പാ‌സ്‌വേഡ് സ്ഥിരീകരിക്കുന്നതിന് ക്രമീകരണങ്ങൾ > Facebook എന്നത് തുറന്ന് പേര് ടാപ്പുചെയ്യുക."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "ഉപകരണത്തിൽ Facebook അക്കൗണ്ട് കോൺഫിഗർ ചെയ്‌തിട്ടില്ല."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "അക്കൗണ്ട് സ്ഥിരീകരിച്ചു. www.facebook.com എന്നതിലേക്ക് ലോഗിൻ ചെയ്‌ത് തന്നിരിക്കുന്ന നിർദ്ദേശങ്ങൾ പാലിക്കുക."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "നിങ്ങൾക്ക് ഈ സമയം ആപ്ലിക്കേഷനുകളിലേക്ക് ലോഗിൻ ചെയ്യാനാവില്ല. www.facebook.com എന്നതിലേക്ക് ലോഗിൻ ചെയ്‌ത് തന്നിരിക്കുന്ന നിർദ്ദേശങ്ങൾ പാലിക്കുക."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "നിങ്ങളുടെ നിയന്ത്രണത്തിലാണ് - നിങ്ങൾക്ക് ആപ്‌സുമായി ഏതെല്ലാം വിവരങ്ങൾ പങ്കിടണമെന്ന് തിരഞ്ഞെടുക്കുക."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "ലോഗിൻ ചെയ്യുക"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "അയയ്‌ക്കുക"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "പങ്കിടൂ"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "നിങ്ങൾ അല്ലേ?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "ലോഗിൻ സ്ഥിരീകരിക്കുക"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "%@ ആയി തുടരുക"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/mr.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/mr.lproj/FacebookSDK.strings new file mode 100644 index 0000000..246b692 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/mr.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "%@ वर भेट द्या आणि वर दर्शवलेला कोड प्रविष्ट करा."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "तुमचे खाते कनेक्ट करण्यासाठी, तुमच्या मोबाईल उपकरणावर Facebook अॅप उघडा आणि सूचना तपासा."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- किंवा -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "ठीक"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "रद्द करा"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "कृपया आपले फेसबुक खाते रीकनेक्ट करण्यासाठी या अनुप्रयोगावर पुन्हा लॉग इन करा."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "ठीक"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "सर्व्हर तात्पुरता व्यस्त आहे, कृपया पुन्हा प्रयत्न करा."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "आवडले"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "आवडलेले"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "रद्द करा"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "लॉग आउट करा"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "फेसबुक वापरून लॉग इन केले"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "%@ म्हणून लॉग इन केले"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "लॉग इन करा"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Facebook सह चालू ठेवा"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "फेसबुकसह लॉग इन करा"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "लॉग आउट करा"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "फेसबुक खात्यावर प्रवेशास मंजूरी दिली गेली नाही. डिव्हाइस सेटिंग्ज सत्यापित करा."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "फेसबुकशी कनेक्ट करण्यात अक्षम. आपले नेटवर्क कनेक्शन तपासा आणि पुन्हा प्रयत्न करा."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "आपला फेसबुक पासवर्ड बदलला आहे. आपल्या पासवर्डची पुष्टी करण्यासाठी, सेटिंग्ज > फेसबुक उघडा आणि आपले नाव टॅप करा."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "डिव्हाइसवर फेसबुक खाते कॉन्फिगर केले गेले नाही."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "आपल्या खात्याची पुष्टी झाली नाही. कृपया www.facebook.com वर लॉग इन करा आणि दिलेल्या सूचनांचे अनुसरण करा."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "आपण यावेळी अनुप्रयोगांवर लॉग इन करू शकत नाही. कृपया www.facebook.com वर लॉग इन करा आणि दिलेल्या सूचनांचे अनुसरण करा."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "तुम्ही नियंत्रणात आहात - तुम्ही कोणती माहिती अॅपसह सामायिक करू इच्छिता ते निवडा."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "लॉग इन करा"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "पाठवा"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "सामायिक करा"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "तुम्ही नाही?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "लॉग इन पुष्टी करा"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "%@ म्हणून चालू ठेवा"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ms.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ms.lproj/FacebookSDK.strings new file mode 100644 index 0000000..20b212a --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ms.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Lawati %@ dan masukkan kod yang ditunjukkan di atas."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Untuk menghubungkan akaun anda, buka apl Facebook di peranti mudah alih anda dan semak pemberitahuan."; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Bukan anda?"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Batal"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Sila log masuk ke aplikasi ini sekali lagi untuk menyambung semula akaun Facebook anda."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Pelayan ini sibuk buat sementara waktu, sila cuba lagi."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Suka"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Disukai"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Batal"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Log Keluar"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Dilog masuk menggunakan Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Dilog masuk sebagai %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Log masuk"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Teruskan dengan Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Log masuk dengan Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Log keluar"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Akses ke akaun Facebook tidak diberikan. Sahkan tetapan peranti."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Tidak dapat menyambung ke Facebook. Semak sambungan rangkaian anda dan cuba lagi."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Kata laluan Facebook anda telah ditukar. Untuk mengesahkan kata laluan anda, buka Tetapan > Facebook dan ketik nama anda."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Akaun Facebook masih belum dikonfigurasikan pada peranti."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Akaun anda tidak disahkan. Sila log masuk ke www.facebook.com dan ikuti arahan yang diberi."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Anda tidak boleh log masuk ke aplikasi pada masa ini. Sila log masuk ke www.facebook.com dan ikuti arahan yang diberi."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Anda yang mengawal - pilih maklumat yang anda ingin kongsi dengan apl."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Log Masuk"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Hantar"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Kongsi"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Sahkan Log Masuk"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Teruskan sebagai %@"; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- ATAU -"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/nb.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/nb.lproj/FacebookSDK.strings new file mode 100644 index 0000000..2307ecb --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/nb.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Gå til %@, og oppgi koden som vises ovenfor."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Koble til kontoen din ved å åpne Facebook-appen på mobilenheten din og se etter varsler."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- ELLER -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Avbryt"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Logg deg inn igjen på denne appen for å koble til Facebook-kontoen på nytt."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Serveren er midlertidig opptatt. Prøv på nytt."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Liker"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Likt"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Avbryt"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Logg ut"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Logget inn med Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Logget inn som %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Logg inn"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Fortsett med Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Logg inn med Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Logg ut"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Det er ikke gitt tilgang til Facebook-kontoen. Bekreft enhetsinnstillinger."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Kunne ikke koble til Facebook. Kontroller nettverkstilkoblingen, og prøv på nytt."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Facebook-passordet ditt er endret. Bekreft passordet ditt ved å gå til Innstillinger > Facebook og trykke på navnet ditt."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Facebook-kontoen er ikke konfigurert på enheten."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Kontoen din er bekreftet. Logg deg inn på www.facebook.com, og følg instruksjonene."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Du kan ikke logge deg inn på apper for øyeblikket. Logg deg inn på www.facebook.com, og følg instruksjonene."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Du bestemmer – velg hvilke opplysninger du vil dele med appene."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Logg inn"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Send"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Del"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Ikke deg?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Bekreft innlogging"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Fortsett som %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/nl.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/nl.lproj/FacebookSDK.strings new file mode 100644 index 0000000..899870e --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/nl.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Ga naar %@ en voer de bovenstaande code in."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Om je account te verbinden, open je de Facebook-app op je mobiele apparaat en controleer of je meldingen ziet."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- OF -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Annuleren"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Meld je nogmaals aan bij deze app om verbinding te maken met je Facebook-account."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "De server is tijdelijk niet beschikbaar. Probeer het opnieuw."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Vind ik leuk"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Vind ik leuk"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Annuleren"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Afmelden"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Aangemeld via Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Aangemeld als %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Aanmelden"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Doorgaan met Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Aanmelden met Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Afmelden"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Er is geen toegang verleend aan het Facebook-account. Verifieer de apparaatinstellingen."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Er kan geen verbinding worden gemaakt met Facebook. Controleer je netwerkverbinding en probeer het opnieuw."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Je Facebook-wachtwoord is gewijzigd. Open Instellingen > Facebook en tik op je naam om je wachtwoord te bevestigen."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Het Facebook-account is niet geconfigureerd op het apparaat."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Je account is niet bevestigd. Meld je aan bij www.facebook.com en volg de instructies."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Je kunt je momenteel niet aanmelden bij apps. Meld je aan bij www.facebook.com en volg de instructies."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Jij hebt de controle. Kies welke informatie je met apps wilt delen."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Aanmelden"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Verzenden"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Delen"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Ben jij dit niet?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Aanmelden bevestigen"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Doorgaan als %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/pa.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/pa.lproj/FacebookSDK.strings new file mode 100644 index 0000000..29ca536 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/pa.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "%@ ਵਿੱਚ ਜਾਓ ਅਤੇ ਉੱਤੇ ਦਿਖਾਏ ਗਏ ਕੋਡ ਨੂੰ ਦਾਖ਼ਲ ਕਰੋ।"; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "ਆਪਣੇ ਖਾਤੇ ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਲਈ, ਆਪਣੀ ਮੋਬਾਈਲ ਡਿਵਾਈਸ 'ਤੇ Facebook ਐਪ ਨੂੰ ਖੋਲ੍ਹੋ ਅਤੇ ਸੂਚਨਾਵਾਂ ਨੂੰ ਦੇਖੋ।"; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- ਜਾਂ -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "ਠੀਕ"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "ਰੱਦ ਕਰੋ"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "ਕਿਰਪਾ ਕਰਕੇ ਆਪਣੇ Facebook ਖਾਤੇ ਨਾਲ ਮੁੜ ਕਨੈਕਟ ਕਰਨ ਲਈ ਇਸ ਐਪ ਵਿੱਚ ਦੁਬਾਰਾ ਲੌਗ ਇਨ ਕਰੋ।"; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "ਠੀਕ"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "ਇਹ ਸਰਵਰ ਅਸਥਾਈ ਰੂਪ ਵਿੱਚ ਵਿਅਸਤ ਹੈ, ਕਿਰਪਾ ਕਰਕੇ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "ਪਸੰਦ ਕਰੋ"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "ਪਸੰਦ ਕੀਤਾ ਗਿਆ"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "ਰੱਦ ਕਰੋ"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "ਲੌਗ ਆਉਟ ਕਰੋ"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Facebook ਦਾ ਉਪਯੋਗ ਕਰਕੇ ਲੌਗ ਇਨ ਕੀਤਾ ਗਿਆ"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "%@ ਵੱਜੋਂ ਲੌਗ ਇਨ ਕੀਤਾ ਗਿਆ"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "ਲੌਗ ਇਨ ਕਰੋ"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Facebook ਦੇ ਨਾਲ ਜਾਰੀ ਰੱਖੋ"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Facebook ਦੇ ਨਾਲ ਲੌਗ ਇਨ ਕਰੋ"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "ਲੌਗ ਆਉਟ ਕਰੋ"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Facebook ਖਾਤੇ ਨੂੰ ਐਕਸੈਸ ਪ੍ਰਦਾਨ ਨਹੀਂ ਕੀਤੀ ਗਈ। ਡਿਵਾਈਸ ਸੈੱਟਿੰਗਜ਼ ਦੀ ਪੁਸ਼ਟੀ ਕਰੋ।"; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Facebook ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਅਸਮਰਥਿਤ ਆਪਣੇ ਨੈੱਟਵਰਕ ਕਨੈਕਸ਼ਨ ਦੀ ਜਾਂਚ ਕਰੋ ਅਤੇ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "ਤੁਹਾਡੇ Facebook ਪਾਸਵਰਡ ਨੂੰ ਬਦਲ ਦਿੱਤਾ ਗਿਆ ਹੈ। ਆਪਣੇ ਪਾਸਵਰਡ ਦੀ ਪੁਸ਼ਟੀ ਕਰਨ ਲਈ, ਸੈੱਟਿੰਗਜ਼ > Facebook ਖੋਲ੍ਹੋ ਅਤੇ ਆਪਣੇ ਨਾਂ ਨੂੰ ਟੈਪ ਕਰੋ।"; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Facebook ਖਾਤੇ ਨੂੰ ਡਿਵਾਈਸ 'ਤੇ ਕਨਫ਼ੀਗਰ ਨਹੀਂ ਕੀਤਾ ਗਿਆ ਹੈ।"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "ਤੁਹਾਡੇ ਖਾਤੇ ਦੀ ਪੁਸ਼ਟੀ ਨਹੀਂ ਕੀਤੀ ਗਈ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ www.facebook.com ਵਿੱਚ ਲੌਗ ਇਨ ਕਰੋ ਅਤੇ ਹੇਠਾਂ ਦਿੱਤੇ ਨਿਰਦੇਸ਼ਾਂ ਦਾ ਪਾਲਣ ਕਰੋ।"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "ਤੁਸੀਂ ਇਸ ਸਮੇਂ ਐਪ ਵਿੱਚ ਲੌਗ ਇਨ ਨਹੀਂ ਕਰ ਸਕਦੇ ਹੋ। ਕਿਰਪਾ ਕਰਕੇ www.facebook.com ਵਿੱਚ ਲੌਗ ਇਨ ਕਰੋ ਅਤੇ ਹੇਠਾਂ ਦਿੱਤੇ ਨਿਰਦੇਸ਼ਾਂ ਦਾ ਪਾਲਣ ਕਰੋ।"; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "ਤੁ\ਸੀਂ ਨਿਯੰਤਰਣ ਵਿੱਚ ਹੋ - ਉਹ ਜਾਣਕਾਰੀ ਚੁਣੋ ਜੋ ਤੁਸੀਂ ਐਪਸ ਦੇ ਨਾਲ ਸਾਂਝੀ ਕਰਨੀ ਚਾਹੁੰਦੇ ਹੋ।"; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "ਲੌਗ ਇਨ ਕਰੋ"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "ਸਾਂਝਾ ਕਰੋ"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "ਭੇਜੋ"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "ਕੀ ਤੁਸੀਂ ਨਹੀਂ ਹੋ?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "ਲੌਗਇਨ ਦੀ ਪੁਸ਼ਟੀ ਕਰੋ"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "%@ ਵੱਜੋਂ ਜਾਰੀ ਰੱਖੋ"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/pl.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/pl.lproj/FacebookSDK.strings new file mode 100644 index 0000000..f7e8681 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/pl.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Wejdź na stronę %@ i wprowadź podany powyżej kod."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Aby połączyć konto, otwórz aplikację Facebook na urządzeniu mobilnym i sprawdź powiadomienia."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- LUB -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Anuluj"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Zaloguj się jeszcze raz do aplikacji, aby ponownie przyłączyć swoje konto na Facebooku."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Serwer jest zajęty, spróbuj później."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Lubię to!"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Polubione"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Anuluj"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Wyloguj się"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Zalogowano przez Facebooka"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Zalogowano jako %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Zaloguj się"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Kontynuuj za pośrednictwem Facebooka"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Zaloguj się przez Facebooka"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Wyloguj się"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Brak dostępu z tego konta na Facebooku. Sprawdź ustawienia urządzenia."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Nie można połączyć się z Facebookiem. Sprawdź połączenie sieciowe i spróbuj ponownie."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Twoje hasło do Facebooka zostało zmienione. Aby potwierdzić hasło, otwórz Ustawienia > Facebook i dotknij swojego imienia i nazwiska."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Na tym urządzeniu nie skonfigurowano konta na Facebooku."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Konto niepotwierdzone. Zaloguj się przez stronę www.facebook.com i postępuj zgodnie ze wskazówkami."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Brak możliwości logowania się do aplikacji. Zaloguj się przez stronę www.facebook.com i postępuj zgodnie ze wskazówkami."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Masz pełną kontrolę – określ, jakie informacje chcesz udostępniać aplikacjom."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Zaloguj się"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Wyślij"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Udostępnij"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "To nie Ty?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Potwierdź logowanie"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Kontynuuj jako %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/pt.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/pt.lproj/FacebookSDK.strings new file mode 100644 index 0000000..7817912 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/pt.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Acesse %@ e introduza o código mostrado acima."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Para conectar sua conta, abra o aplicativo Facebook em seu dispositivo móvel e verifique se tem notificações."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "– OU –"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Cancelar"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Entre nesse aplicativo novamente para reconectar sua conta do Facebook."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "O servidor está temporariamente ocupado. Tente novamente."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Curtir"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Curtiu"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Cancelar"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Sair"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Você entrou usando o Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Conectado como %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Entrar"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Continuar com o Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Entrar com o Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Sair"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "O acesso à conta do Facebook não foi permitido. Verifique as configurações do dispositivo."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Não foi possível se conectar ao Facebook. Verifique sua conexão de rede e tente novamente."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "A sua senha do Facebook foi alterada. Para confirmar a sua senha, abra Configurações > Facebook e toque no seu nome."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "A conta do Facebook não foi configurada no dispositivo."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "A sua conta não foi confirmada. Entre no site www.facebook.com e siga as instruções fornecidas."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Não é possível entrar em aplicativos neste momento. Entre no site www.facebook.com e siga as instruções fornecidas."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Você é quem controla — escolha quais informações você quer compartilhar com os aplicativos."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Entrar"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Envio"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Compartilhar"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Não é você?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Confirme o login"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Continue como %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/pt_PT.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/pt_PT.lproj/FacebookSDK.strings new file mode 100644 index 0000000..1fd2d29 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/pt_PT.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Visita %@ e introduz o código mostrado acima."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Para ligares a tua conta, abre a app Facebook no teu dispositivo móvel e verifica se tens notificações."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "– OU –"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Cancelar"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Volta a iniciar sessão nesta aplicação para te ligares novamente à tua conta do Facebook."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "O servidor está temporariamente ocupado. Tenta novamente."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Gosto"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Gostei"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Cancelar"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Terminar sessão"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Com sessão iniciada através do Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Com sessão iniciada como %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Iniciar sessão"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Continuar com o Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Iniciar sessão com o Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Terminar a sessão"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "O acesso não foi concedido à conta do Facebook. Verificar as definições do dispositivo."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Não é possível ligar ao Facebook. Verifica a tua ligação à rede e tenta novamente."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "A tua palavra-passe do Facebook foi alterada. Para confirmares a tua palavra-passe, abre as Definições > Facebook e toca no teu nome."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "A conta do Facebook não foi configurada no dispositivo."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "A tua conta não foi confirmada. Inicia sessão em www.facebook.com e segue as instruções indicadas."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Não podes iniciar sessão em aplicações neste momento. Inicia sessão em www.facebook.com e segue as instruções indicadas."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Tens o controlo: escolhe a informação que pretendes partilhar com as apps."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Iniciar sessão"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Enviar"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Partilhar"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Não és tu?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Confirmar Início de Sessão"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Continuar como %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ru.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ru.lproj/FacebookSDK.strings new file mode 100644 index 0000000..114e0be --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ru.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Откройте страницу %@ и введите представленный выше код."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Чтобы подключить аккаунт, откройте приложение Facebook на мобильном устройстве и проверьте уведомления."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- ИЛИ -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Отменить"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Войдите в это приложение еще раз, чтобы повторно подключить ваш аккаунт Facebook."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Сервер временно загружен, повторите попытку."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Нравится"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Понравилось"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Отменить"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Выход"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Выполнен вход с помощью Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Вы вошли как %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Вход"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Продолжить с Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Вход через Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Выход"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Аккаунту Facebook доступ не предоставлен. Проверьте настройки устройства."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Не удалось подключиться к Facebook. Проверьте сетевое подключение и повторите попытку."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Ваш пароль Facebook изменен. Чтобы подтвердить пароль, откройте «Настройки» > Facebook и коснитесь вашего имени."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "На устройстве не настроен аккаунт Facebook."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Ваш аккаунт не подтвержден. Войдите на сайт www.facebook.com и следуйте инструкциям."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Сейчас нельзя войти в приложения. Войдите на сайт www.facebook.com и следуйте инструкциям."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Вы сами выбираете, какой информацией поделиться с приложениями."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Вход в систему"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Отправить"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Поделиться"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Это не вы?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Подтвердить вход"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Продолжить как %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/sk.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/sk.lproj/FacebookSDK.strings new file mode 100644 index 0000000..1c1e2a8 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/sk.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Navštívte stránku %@ a zadajte kód zobrazený vyššie."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Na pripojenie svojho účtu otvorte vo svojom mobilnom zariadení aplikáciu Facebook a skontrolujte upozornenia."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- ALEBO -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Zrušiť"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Ak sa chcete znova pripojiť k svojmu účtu na Facebooku, prihláste sa znova do tejto aplikácie."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Server je dočasne zaneprázdnený – skúste znova."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Páči sa mi to"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Páči sa mi to"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Zrušiť"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Odhlásiť"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Prihlásený cez Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Prihlásený ako %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Prihlásiť sa"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Pokračovať s Facebookom"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Prihlásiť sa cez Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Odhlásiť sa"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Danému účtu na Facebooku nebol poskytnutý prístup. Skontrolujte nastavenia zariadenia."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Nedá sa pripojiť k Facebooku. Skontrolujte svoje sieťové pripojenie a skúste znova."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Vaše heslo pre Facebook sa zmenilo. Na potvrdenie svojho hesla otvorte Nastavenia > Facebook a ťuknite na svoje meno."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Daný účet na Facebooku nebol nastavený v zariadení."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Váš účet nie je potvrdený. Prihláste sa na stránke www.facebook.com a postupujte podľa pokynov."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Momentálne sa nemôžete prihlásiť do aplikácií. Prihláste sa na stránke www.facebook.com a postupujte podľa pokynov."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Máte to pod kontrolou: vyberte, ktoré informácie chcete zdieľať s aplikáciami."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Prihlásenie sa"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Odoslať"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Zdieľať"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Nie ste to vy?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Potvrdiť prihlásenie"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Pokračovať ako %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/sv.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/sv.lproj/FacebookSDK.strings new file mode 100644 index 0000000..3fd3107 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/sv.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Besök %@ och ange koden som visas ovan."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Koppla ditt konto genom att öppna Facebook-appen på din mobila enhet och söka efter aviseringar."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- ELLER -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Avbryt"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Logga in på den här appen igen om du vill ansluta ditt Facebook-konto på nytt."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Servern är upptagen för tillfället. Försök igen."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Gilla"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Gillade"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Avbryt"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Logga ut"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Inloggad med Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Inloggad som %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Logga in"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Fortsätt med Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Logga in med Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Logga ut"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Du har inte fått tillgång till Facebook-kontot. Verifiera enhetsinställningar."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Det går inte att ansluta till Facebook. Kontrollera nätverksanslutningen och försök igen."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Ditt Facebook-lösenord har ändrats. Bekräfta lösenordet genom att öppna Inställningar > Facebook och skriva in ditt namn."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Facebook-konto har inte konfigurerats på enheten."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Ditt konto har inte bekräftats. Logga in på www.facebook.com och följ instruktionerna."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Du kan inte logga in på appar för närvarande. Logga in på www.facebook.com och följ instruktionerna."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Du bestämmer – välj vilken info du vill dela med appar."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Logga in"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Skicka"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Dela"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Inte du?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Bekräfta inloggning"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Fortsätt som %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ta.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ta.lproj/FacebookSDK.strings new file mode 100644 index 0000000..c0d2d08 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/ta.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "%@ என்பதற்குச் சென்று மேலே தெரியும் குறியீட்டை உள்ளிடவும்."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "உங்கள் கணக்குடன் இணைக்க, உங்கள் மொபைல் சாதனத்தில் Facebook பயன்பாட்டைத் திறந்து அறிவிப்புகளைப் பார்க்கவும்."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- அல்லது -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "சரி"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "ரத்துசெய்"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "உங்கள் Facebook கணக்கில் மீண்டும் இணைய, இந்தப் பயன்பாட்டில் மீண்டும் உள்நுழையவும்."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "சரி"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "சேவையகம் தற்காலிகமாக பிஸியாக உள்ளது, மீண்டும் முயற்சிக்கவும்."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "விருப்பம்"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "விரும்பப்பட்டது"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "ரத்துசெய்"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "வெளியேறு"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Facebook மூலம் உள்நுழையப்பட்டுள்ளது"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "%@ இல் உள்நுழைந்துள்ளீர்கள்"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "உள்நுழைவு"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Facebook இல் தொடரவும்"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Facebook மூலம் உள்நுழையவும்"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "வெளியேறு"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Facebook கணக்கிற்கு அணுகல் வழங்கப்படவில்லை. சாதன அமைப்புகளைச் சரிபார்க்கவும்."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Facebook இல் இணைய முடியவில்லை. இணைய இணைப்பைச் சரிபார்த்து, மீண்டும் முயற்சிக்கவும்."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Facebook கடவுச்சொல் மாற்றப்பட்டது. கடவுச்சொல்லை உறுதிசெய்ய, அமைப்புகள் > Facebook க்கு சென்று உங்கள் பெயரைத் தட்டவும்."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "சாதனத்தில் Facebook கணக்கு உள்ளமைக்கப்படவில்லை."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "உங்கள் கணக்கு உறுதிசெய்யப்படவில்லை. www.facebook.com இல் உள்நுழைந்து, வழங்கப்பட்டுள்ள வழிமுறைகளைப் பின்பற்றவும்."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "இப்போது பயன்பாடுகளில் உள்நுழைய முடியாது. www.facebook.com இல் உள்நுழைந்து, வழங்கப்பட்டுள்ள வழிமுறைகளைப் பின்பற்றவும்."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "பயன்பாடுகளில் எந்தத் தகவலைப் பகிர விரும்புகிறீர்கள் என்பதை நீங்கள் கட்டுப்படுத்தலாம்."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "உள்நுழைவு"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "அனுப்பு"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "பகிர்"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "நீங்கள் இல்லையா?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "உள்நுழைவை உறுதிப்படுத்தவும்"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "%@ ஆகத் தொடரவும்"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/te.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/te.lproj/FacebookSDK.strings new file mode 100644 index 0000000..7605c9b --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/te.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "%@ లింక్‌ను సందర్శించి, ఎగువ చూపిన కోడ్‌ను నమోదు చేయండి."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "మీ ఖాతాను అనుసంధానించడానికి, మీ మొబైల్ పరికరంలో Facebook అనువర్తనాన్ని తెరిచి, నోటిఫికేషన్‌లను తనిఖీ చేయండి."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- లేదా -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "ఒప్పుకుంటున్నాను"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "రద్దు చేయి"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "దయచేసి మీ Facebook ఖాతాను మళ్లీ కనెక్ట్ చేయడానికి ఈ అప్లికేషన్‌కు మళ్లీ లాగిన్ చేయండి."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "ఒప్పుకుంటున్నాను"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "సర్వర్ తాత్కాలికంగా బిజీగా ఉంది, దయచేసి మళ్లీ ప్రయత్నించండి."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "ఇష్టంగా గుర్తు పెట్టు"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "ఇష్టంగా గుర్తు పెట్టబడింది"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "రద్దు చేయి"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "లాగ్ అవుట్ చేయి"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Facebook ఉపయోగించి లాగిన్ చేసారు"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "%@గా లాగిన్ చేసారు"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "లాగిన్ చేయి"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Facebookతో కొనసాగించండి"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Facebookతో లాగిన్ చేయి"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "లాగ్ అవుట్ చేయి"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Facebook ఖాతాకు ప్రాప్యత మంజూరు చేయలేదు. పరికర సెట్టింగ్‌లను సరిచూడండి."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Facebookకి కనెక్ట్ చేయడం సాధ్యపడలేదు. మీ నెట్‌వర్క్ కనెక్షన్‌ను తనిఖీ చేసి, మళ్లీ ప్రయత్నించండి."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "మీ Facebook పాస్‌వర్డ్ మారింది. మీ పాస్‌వర్డ్‌ను నిర్ధారించడానికి, సెట్టింగ్‌లు > Facebook తెరిచి, మీ పేరు నొక్కండి."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "పరికరంలో Facebook ఖాతా కాన్ఫిగర్ చేయబడలేదు."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "మీ ఖాతా నిర్ధారించబడలేదు. దయచేసి www.facebook.comకి లాగిన్ చేసి, అందించిన సూచనలను అనుసరించండి."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "ప్రస్తుతం మీరు అప్లికేషన్‌లకు లాగిన్ చేయలేరు. దయచేసి www.facebook.comకి లాగిన్ చేసి, అందించిన సూచనలను అనుసరించండి."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "మీకు నియంత్రణ ఉంది - మీరు అనువర్తనాలతో భాగస్వామ్యం చేయాలనుకునే సమాచారాన్ని ఎంచుకోండి."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "లాగిన్ చేయండి"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "పంపు"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "భాగస్వామ్యం చేయండి"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "మీరు కాదా?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "లాగిన్‌ను నిర్ధారించండి"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "%@ వలె కొనసాగండి"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/th.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/th.lproj/FacebookSDK.strings new file mode 100644 index 0000000..8c5c9fd --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/th.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "ไปที่ %@ และใส่โค้ดที่แสดงด้านบน"; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "หากต้องการเชื่อมต่อบัญชีผู้ใช้ของคุณ ให้เปิดแอพ Facebook บนอุปกรณ์มือถือของคุณและตรวจสอบการแจ้งเตือน"; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- หรือ -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "ตกลง"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "ยกเลิก"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "โปรดลงชื่อเข้าใช้แอพนี้อีกครั้งเพื่อเชื่อมต่อบัญชีผู้ใช้ Facebook ของคุณใหม่"; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "ตกลง"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "เซิร์ฟเวอร์ไม่พร้อมให้บริการชั่วคราว โปรดลองใหม่อีกครั้ง"; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "ถูกใจ"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "ถูกใจแล้ว"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "ยกเลิก"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "ออกจากระบบ"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "เข้าสู่ระบบโดยใช้ Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "เข้าสู่ระบบในชื่อ %@"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "เข้าสู่ระบบ"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "ดำเนินการต่อด้วย Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "เข้าสู่ระบบด้วย Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "ออกจากระบบ"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "บัญชีผู้ใช้ Facebook ไม่ได้รับอนุญาตให้เข้าถึง ตรวจสอบการตั้งค่าของอุปกรณ์"; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "ไม่สามารถเชื่อมต่อกับ Facebook ตรวจสอบการเชื่อมต่อเครือข่ายและลองอีกครั้ง"; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "เปลี่ยนรหัสผ่าน Facebook ของคุณแล้ว เพื่อยืนยันรหัสผ่านของคุณ ให้เปิด การตั้งค่า > Facebook แล้วแตะชื่อของคุณ"; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "บัญชีผู้ใช้ Facebook ไม่ได้รับการกำหนดค่าบนอุปกรณ์เครื่องนี้"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "บัญชีผู้ใช้ของคุณไม่ได้รับการยืนยัน โปรดเข้าสู่ระบบที่ www.facebook.com และทำตามคำแนะนำที่ปรากฏ"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "คุณไม่สามารถเข้าสู่ระบบของแอพได้ในตอนนี้ โปรดเข้าสู่ระบบที่ www.facebook.com และทำตามคำแนะนำที่ปรากฏ"; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "คุณเป็นฝ่ายควบคุม โปรดเลือกข้อมูลที่คุณต้องการแชร์ด้วยแอพ"; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "เข้าสู่ระบบ"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "ส่ง"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "แชร์"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "หากไม่ใช่คุณ"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "ยืนยันการเข้าสู่ระบบ"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "ดำเนินการต่อในชื่อ %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/tr.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/tr.lproj/FacebookSDK.strings new file mode 100644 index 0000000..3d57b8f --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/tr.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "%@ adresini ziyaret edin ve yukarıda görülen kodu girin."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Hesabınızı bağlamak için, mobil cihazınızda Facebook uygulamasını açın ve bildirimlerinizi kontrol edin."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- YA DA -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "Tamam"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "İptal"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Facebook hesabına yeniden bağlanmak için lütfen bu uygulamaya tekrar giriş yap."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "Tamam"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Sunucu geçici olarak meşgul. Lütfen tekrar dene."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Beğen"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Beğendin"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "İptal"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Çıkış Yap"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Facebook ile giriş yapıldı"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "%@ olarak giriş yapıldı"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Giriş yap"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Facebook ile Devam Et"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Facebook ile giriş yap"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Çıkış yap"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Facebook hesabına erişim izni verilmedi. Cihaz ayarlarını doğrula."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Facebook'a bağlanılamıyor. Ağ bağlantını kontrol edip tekrar dene."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Facebook şifren değiştirildi. Şifreni onaylamak için Ayarlar > Facebook'u aç ve adına dokunun."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Facebook hesabı cihaz üzerinde yapılandırılmadı."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Hesabın onaylanmadı. Lütfen www.facebook.com adresine giriş yap ve verilen talimatları izle."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Şu an için uygulamalara giriş yapamazsın. Lütfen www.facebook.com adresine giriş yap ve verilen talimatları izle."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Kontrol sende. Uygulamalarla paylaşmak istediğin bilgileri seç."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Giriş Yap"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Gönder"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Paylaş"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Sen değil misin?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Girişi Onayla"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "%@ olarak devam et"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/vi.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/vi.lproj/FacebookSDK.strings new file mode 100644 index 0000000..e7b6946 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/vi.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "Truy cập %@ và nhập mã hiển thị ở trên."; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "Để kết nối tài khoản của bạn, hãy mở ứng dụng Facebook trên thiết bị di động và kiểm tra thông báo."; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- HOẶC -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "OK"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "Hủy"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "Vui lòng đăng nhập lại vào ứng dụng này để kết nối lại tài khoản Facebook của bạn."; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "OK"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "Máy chủ hiện đang bận, vui lòng thử lại sau."; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "Thích"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "Đã thích"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "Hủy"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "Đăng xuất"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "Đã đăng nhập bằng Facebook"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "Đã đăng nhập với tư cách là"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "Đăng nhập"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "Tiếp tục với Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "Đăng nhập bằng Facebook"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "Đăng xuất"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "Quyền truy cập chưa được cấp cho tài khoản Facebook. Xác minh thiết lập của thiết bị."; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "Không thể kết nối với Facebook. Vui lòng kiểm tra kết nối mạng của bạn và thử lại."; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "Mật khẩu Facebook của bạn đã thay đổi. Để xác nhận mật khẩu của bạn, hãy mở Thiết lập > Facebook và nhấn vào tên bạn."; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Tài khoản Facebook chưa được định cấu hình trên thiết bị."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "Tài khoản của bạn không được xác nhận. Vui lòng đăng nhập vào www.facebook.com và làm theo hướng dẫn được cung cấp."; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "Bạn không thể đăng nhập vào các ứng dụng lúc này. Vui lòng đăng nhập vào www.facebook.com và làm theo hướng dẫn được cung cấp."; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "Bạn đang có quyền kiểm soát - hãy chọn thông tin bạn muốn chia sẻ với ứng dụng."; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "Đăng nhập"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "Gửi"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "Chia sẻ"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "Không phải bạn?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "Xác nhận đăng nhập"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "Tiếp tục với tư cách %@"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/zh.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/zh.lproj/FacebookSDK.strings new file mode 100644 index 0000000..e153685 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/zh.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "请访问 %@ 并输入上方显示的验证码。"; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "要关联你的帐户,请在移动设备上打开 Facebook 应用,并查看通知。"; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- 或者 -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "确定"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "取消"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "请再次登录此应用,以便重新连接您的 Facebook 帐户。"; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "确定"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "服务器暂时繁忙,请重试。"; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "赞"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "赞了"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "取消"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "退出"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "已使用 Facebook 登录"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "已以 %@ 身份登录"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "登录"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "继续使用 Facebook 登录"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "使用 Facebook 登录"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "退出"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "未授予该 Facebook 帐户访问权限。验证设备设置。"; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "无法连接到 Facebook。检查网络连接并重试。"; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "您的 Facebook 密码已更改。要确认密码,请打开设置 > Facebook,并轻触您的姓名。"; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "未在设备上配置 Facebook 帐户。"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "您的帐户未确认。请登录 www.facebook.com,并按照提供的说明操作。"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "您此时不能登录应用。请登录 www.facebook.com,并按照提供的说明操作。"; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "一切任您掌控 — 选择您想通过应用分享的信息。"; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "登录"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "发送"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "分享"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "不是你?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "确认登录"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "以%@的身份继续"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/zh_Hant_HK.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/zh_Hant_HK.lproj/FacebookSDK.strings new file mode 100644 index 0000000..fcf0c3e --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/zh_Hant_HK.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "前往 %@ 並輸入上方的程式碼。"; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "若要連結您的帳戶,請在您的流動裝置上開啟 Facebook 應用程式並查看通知。"; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- 或 -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "確定"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "取消"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "請再次登入此應用程式以重新連接您的 Facebook 帳戶。"; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "確定"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "伺服器暫時忙碌中,請再試一次。"; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "讚好"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "已讚好"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "取消"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "登出"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "使用 Facebook 登入"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "以 %@ 身分登入"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "登入"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "繼續使用 Facebook"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "使用 Facebook 登入"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "登出"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "沒有獲得 Facebook 帳戶的存取授權。確認裝置設定。"; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "無法與 Facebook 連線。請檢查網絡連線,然後再試一次。"; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "您的 Facebook 密碼已經變更。要確認密碼,請開啟設定 > Facebook,然後點按您的名稱。"; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "Facebook 帳戶尚未在此裝置上設定。"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "您的帳戶尚未確認。請登入 www.facebook.com 並依據指示操作。"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "您現時無法登入應用程式。請登入 www.facebook.com 並依據指示操作。"; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "控制權在您 - 選擇您要與應用程式分享的資訊。"; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "登入"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "傳送"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "分享"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "這不是您?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "確認登入"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "以%@的身分繼續"; diff --git a/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/zh_Hant_TW.lproj/FacebookSDK.strings b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/zh_Hant_TW.lproj/FacebookSDK.strings new file mode 100644 index 0000000..f02b0c8 --- /dev/null +++ b/Pods/FBSDKCoreKit/FacebookSDKStrings.bundle/Resources/zh_Hant_TW.lproj/FacebookSDK.strings @@ -0,0 +1,92 @@ +/* Prompts a person to go to the URL listed to enter the confirmation code that is presented to them above the given string. */ +"DeviceLogin.LogInPrompt" = "請前往 %@ 並輸入上方顯示的代碼。"; + +/* Prompts a person that the next thing they need to do to finish connecting their Smart TV and Facebook application is to navigate to their Facebook application on their mobile device and look through their notifications for a message about the connection being formed */ +"DeviceLogin.SmartLogInPrompt" = "若要連結帳號,請從行動裝置開啟 Facebook 應用程式,並查看通知。"; + +/* Displayed as a separator between two options. First option is on a line above this, and second option is below */ +"DeviceLogin.SmartLogInOrLabel" = "- 或 -"; + +/* The title of the label to dismiss the alert when presenting user facing error messages */ +"ErrorRecovery.Alert.OK" = "是"; + +/* The title of the label to decline attempting error recovery */ +"ErrorRecovery.Cancel" = "取消"; + +/* The fallback message to display to recover invalidated tokens */ +"ErrorRecovery.Login.Suggestion" = "請重新登入此應用程式以重新連結您的 Facebook 帳號。"; + +/* The title of the label to start attempting error recovery */ +"ErrorRecovery.OK" = "是"; + +/* The fallback message to display to retry transient errors */ +"ErrorRecovery.Transient.Suggestion" = "伺服器暫時忙碌中,請再試一次。"; + +/* The label for the FBSDKLikeButton when the object is not currently liked. */ +"LikeButton.Like" = "讚"; + +/* The label for the FBSDKLikeButton when the object is currently liked. */ +"LikeButton.Liked" = "說讚"; + +/* The label for the FBSDKLoginButton action sheet to cancel logging out */ +"LoginButton.CancelLogout" = "取消"; + +/* The label for the FBSDKLoginButton action sheet to confirm logging out */ +"LoginButton.ConfirmLogOut" = "登出"; + +/* The fallback string for the FBSDKLoginButton label when the user name is not available yet */ +"LoginButton.LoggedIn" = "已使用 Facebook 登入"; + +/* The format string for the FBSDKLoginButton label when the user is logged in */ +"LoginButton.LoggedInAs" = "以 %@ 身分登入"; + +/* The short label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogIn" = "登入"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInContinue" = "繼續使用 Facebook 帳號"; + +/* The long label for the FBSDKLoginButton when the user is currently logged out */ +"LoginButton.LogInLong" = "使用 Facebook 登入"; + +/* The label for the FBSDKLoginButton when the user is currently logged in */ +"LoginButton.LogOut" = "登出"; + +/* The user facing error message when the app slider has been disabled and login fails. */ +"LoginError.SystemAccount.Disabled" = "尚未取得授權,無法存取 Facebook 帳號。請確認裝置設定。"; + +/* The user facing error message when the Accounts framework encounters a network error. */ +"LoginError.SystemAccount.Network" = "無法連線到 Facebook。請檢查網路連線,然後再試一次。"; + +/* The user facing error message when the device Facebook account password is incorrect and login fails. */ +"LoginError.SystemAccount.PasswordChange" = "您的 Facebook 密碼已經更改。若要確認您的密碼,請開啟「設定」>「Facebook」,然後點按您的姓名。"; + +/* The user facing error message when the device Facebook account is unavailable and login fails. */ +"LoginError.SystemAccount.Unavailable" = "尚未透過裝置設定 Facebook 帳號。"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed. */ +"LoginError.SystemAccount.UnconfirmedUser" = "您的帳號尚未確認。請登入 www.facebook.com,然後按照指示操作。"; + +/* The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed. */ +"LoginError.SystemAccount.UserCheckpointed" = "您目前無法登入應用程式。請登入 www.facebook.com,然後按照指示操作。"; + +/* The message of the FBSDKLoginTooltipView */ +"LoginTooltip.Message" = "您可以全盤掌控!選擇您想和應用程式分享的資訊內容。"; + +/* Title of the web dialog that prompts the user to log in to Facebook. */ +"LoginWeb.LogInTitle" = "登入"; + +/* The label for FBSDKSendButton */ +"SendButton.Send" = "傳送"; + +/* The label for FBSDKShareButton */ +"ShareButton.Share" = "分享"; + +/* Prompts a person if this is their current account */ +"SmartLogin.NotYou" = "這不是您?"; + +/* Text on a button that a person presses to confirm that they are finished with the login experience */ +"SmartLogin.ConfirmationTitle" = "確認登入"; + +/* Text on a button that lets a person continue with their name linked to a Facebook account (Name = %@) */ +"SmartLogin.Continue" = "以 %@ 身分繼續"; diff --git a/Pods/FBSDKCoreKit/LICENSE b/Pods/FBSDKCoreKit/LICENSE new file mode 100644 index 0000000..bdb9fc5 --- /dev/null +++ b/Pods/FBSDKCoreKit/LICENSE @@ -0,0 +1,17 @@ +Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + +You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +copy, modify, and distribute this software in source code or binary form for use +in connection with the web services and APIs provided by Facebook. + +As with any software that integrates with the Facebook platform, your use of +this software is subject to the Facebook Developer Principles and Policies +[http://developers.facebook.com/policy/]. This copyright notice shall be +included in all copies or substantial portions of the software. + +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. diff --git a/Pods/FBSDKCoreKit/README.md b/Pods/FBSDKCoreKit/README.md new file mode 100644 index 0000000..5449cbf --- /dev/null +++ b/Pods/FBSDKCoreKit/README.md @@ -0,0 +1,43 @@ +# Facebook SDK for iOS + +[![Build Status](https://travis-ci.org/facebook/facebook-objc-sdk.svg?branch=master)](https://travis-ci.org/facebook/facebook-objc-sdk) + +This open-source library allows you to integrate Facebook into your iOS app. + +Learn more about the provided samples, documentation, integrating the SDK into your app, accessing source code, and more at https://developers.facebook.com/docs/ios + +NOTE: By default, the Facebook SDK for iOS is installed in ~/Documents/FacebookSDK + +## TRY IT OUT + +1. Download the SDK at or via CocoaPods by adding the 'FBSDKCoreKit', 'FBSDKLoginKit', and 'FBSDKShareKit' pods. +2. Test your install: build and run the project at `~/Documents/FacebookSDK/Samples/Scrumptious/Scrumptious.xcodeproj` +3. Check-out the tutorials available online at: +4. Start coding! Visit for tutorials and reference documentation. + +## FEATURES + +- Login - +- Sharing - +- App Links - +- Graph API - +- Analytics - + +## GIVE FEEDBACK + +Please report bugs or issues to + +You can also join the [Facebook Developers Group on Facebook](https://www.facebook.com/groups/fbdevelopers/) or ask questions on [Stack Overflow](http://facebook.stackoverflow.com) + +## LICENSE + +See the [LICENSE](LICENSE) file. + +## DEVELOPER TERMS + +- By enabling Facebook integrations, including through this SDK, you can share information with Facebook, including information about people’s use of your app. Facebook will use information received in accordance with our [Data Use Policy](https://www.facebook.com/about/privacy/), including to provide you with insights about the effectiveness of your ads and the use of your app. These integrations also enable us and our partners to serve ads on and off Facebook. +- You may limit your sharing of information with us by updating the Insights control in the developer tool `https://developers.facebook.com/apps/{app_id}/settings/advanced`. +- If you use a Facebook integration, including to share information with us, you agree and confirm that you have provided appropriate and sufficiently prominent notice to and obtained the appropriate consent from your users regarding such collection, use, and disclosure (including, at a minimum, through your privacy policy). You further agree that you will not share information with us about children under the age of 13. +- You agree to comply with all applicable laws and regulations and also agree to our Terms , including our Platform Policies .and Advertising Guidelines, as applicable . + +By using the Facebook SDK for iOS you agree to these terms. diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.h new file mode 100644 index 0000000..52c1de7 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.h @@ -0,0 +1,62 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + @abstract Describes the initial response when starting the device login flow. + @discussion This is used by `FBSDKDeviceLoginManager`. + */ +@interface FBSDKDeviceLoginCodeInfo : NSObject + +/*! + @abstract There is no public initializer. + */ +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/*! + @abstract the unique id for this login flow. +*/ +@property (nonatomic, copy, readonly) NSString *identifier; + +/*! + @abstract the short "user_code" that should be presented to the user. +*/ +@property (nonatomic, copy, readonly) NSString *loginCode; + +/*! + @abstract the verification URL. +*/ +@property (nonatomic, copy, readonly) NSURL *verificationURL; + +/*! + @abstract the expiration date. +*/ +@property (nonatomic, copy, readonly) NSDate *expirationDate; + +/*! + @abstract the polling interval +*/ +@property (nonatomic, assign, readonly) NSUInteger pollingInterval; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.m new file mode 100644 index 0000000..edb94b3 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.m @@ -0,0 +1,38 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKDeviceLoginCodeInfo+Internal.h" + +@implementation FBSDKDeviceLoginCodeInfo + +- (instancetype) initWithIdentifier:(NSString *)identifier + loginCode:(NSString *)loginCode + verificationURL:(NSURL *)verificationURL + expirationDate:(NSDate *)expirationDate + pollingInterval:(NSUInteger)pollingInterval +{ + if ((self = [super init])) { + _identifier = [identifier copy]; + _loginCode = [loginCode copy]; + _verificationURL = [verificationURL copy]; + _expirationDate = [expirationDate copy]; + _pollingInterval = pollingInterval; + } + return self; +} +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.h new file mode 100644 index 0000000..3f6f036 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.h @@ -0,0 +1,105 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class FBSDKDeviceLoginManager; + +/*! + @abstract A delegate for `FBSDKDeviceLoginManager`. + */ +@protocol FBSDKDeviceLoginManagerDelegate + +/*! + @abstract Indicates the device login flow has started. You should parse `codeInfo` to + present the code to the user to enter. + @param loginManager the login manager instance. + @param codeInfo the code info data. + */ +- (void)deviceLoginManager:(FBSDKDeviceLoginManager *)loginManager startedWithCodeInfo:(FBSDKDeviceLoginCodeInfo *)codeInfo; + +/*! + @abstract Indicates the device login flow has finished. + @param loginManager the login manager instance. + @param result the results of the login flow. + @param error the error, if available. + @discussion The flow can be finished if the user completed the flow, cancelled, or if the code has expired. + */ +- (void)deviceLoginManager:(FBSDKDeviceLoginManager *)loginManager + completedWithResult:(nullable FBSDKDeviceLoginManagerResult *)result + error:(nullable NSError *)error; + +@end + +/*! + @abstract Use this class to perform a device login flow. + @discussion The device login flow starts by requesting a code from the device login API. + This class informs the delegate when this code is received. You should then present the + code to the user to enter. In the meantime, this class polls the device login API + periodically and informs the delegate of the results. + + See [Facebook Device Login](https://developers.facebook.com/docs/facebook-login/for-devices). + */ +@interface FBSDKDeviceLoginManager : NSObject + +/*! + @abstract Initializes a new instance. + @param permissions permissions to request. + */ +- (instancetype)initWithPermissions:(nullable NSArray *)permissions + enableSmartLogin:(BOOL)enableSmartLogin +NS_DESIGNATED_INITIALIZER; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/*! + @abstract the delegate. + */ +@property (nonatomic, weak) id delegate; + +/*! + @abstract the requested permissions. + */ +@property (nullable, nonatomic, copy, readonly) NSArray *permissions; + +/*! + @abstract the optional URL to redirect the user to after they complete the login. + @discussion the URL must be configured in your App Settings -> Advanced -> OAuth Redirect URIs + */ +@property (nullable, nonatomic, copy) NSURL *redirectURL; + +/*! + @abstract Starts the device login flow + @discussion This instance will retain self until the flow is finished or cancelled. + */ +- (void)start; + +/*! + @abstract Attempts to cancel the device login flow. + */ +- (void)cancel; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.m new file mode 100644 index 0000000..f293c26 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.m @@ -0,0 +1,235 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKDeviceLoginManager.h" +#import "FBSDKDeviceLoginManagerResult+Internal.h" + +#import + +#import "FBSDKCoreKit+Internal.h" +#import "FBSDKDeviceLoginCodeInfo+Internal.h" +#import "FBSDKLoginConstants.h" + +static NSMutableArray *g_loginManagerInstances; + +@implementation FBSDKDeviceLoginManager { + FBSDKDeviceLoginCodeInfo *_codeInfo; + BOOL _isCancelled; + NSNetService * _loginAdvertisementService; + BOOL _isSmartLoginEnabled; +} + ++ (void)initialize +{ + if (self == [FBSDKDeviceLoginManager class]) { + g_loginManagerInstances = [NSMutableArray array]; + } +} + +- (instancetype)initWithPermissions:(NSArray *)permissions enableSmartLogin:(BOOL)enableSmartLogin +{ + if ((self = [super init])) { + _permissions = [permissions copy]; + _isSmartLoginEnabled = enableSmartLogin; + } + return self; +} + +- (void)start +{ + [FBSDKInternalUtility validateAppID]; + [g_loginManagerInstances addObject:self]; + + NSDictionary *parameters = @{ + @"scope": [self.permissions componentsJoinedByString:@","] ?: @"", + @"redirect_uri": self.redirectURL.absoluteString ?: @"", + FBSDK_DEVICE_INFO_PARAM: [FBSDKDeviceRequestsHelper getDeviceInfo], + }; + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"device/login" + parameters:parameters + tokenString:[FBSDKInternalUtility validateRequiredClientAccessToken] + HTTPMethod:@"POST" + flags:FBSDKGraphRequestFlagNone]; + [request setGraphErrorRecoveryDisabled:YES]; + [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + if (error) { + [self _processError:error]; + return; + } + + self->_codeInfo = [[FBSDKDeviceLoginCodeInfo alloc] + initWithIdentifier:result[@"code"] + loginCode:result[@"user_code"] + verificationURL:[NSURL URLWithString:result[@"verification_uri"]] + expirationDate:[[NSDate date] dateByAddingTimeInterval:[result[@"expires_in"] doubleValue]] + pollingInterval:[result[@"interval"] integerValue]]; + + if (self->_isSmartLoginEnabled) { + [FBSDKDeviceRequestsHelper startAdvertisementService:self->_codeInfo.loginCode + withDelegate:self + ]; + } + + [self.delegate deviceLoginManager:self startedWithCodeInfo:self->_codeInfo]; + [self _schedulePoll:self->_codeInfo.pollingInterval]; + }]; + } + +- (void)cancel +{ + [FBSDKDeviceRequestsHelper cleanUpAdvertisementService:self]; + _isCancelled = YES; + [g_loginManagerInstances removeObject:self]; +} + +#pragma mark - Private impl + +- (void)_notifyError:(NSError *)error +{ + [FBSDKDeviceRequestsHelper cleanUpAdvertisementService:self]; + [self.delegate deviceLoginManager:self + completedWithResult:nil + error:error]; + [g_loginManagerInstances removeObject:self]; +} + +- (void)_notifyToken:(NSString *)tokenString +{ + [FBSDKDeviceRequestsHelper cleanUpAdvertisementService:self]; + void(^completeWithResult)(FBSDKDeviceLoginManagerResult *) = ^(FBSDKDeviceLoginManagerResult *result) { + [self.delegate deviceLoginManager:self completedWithResult:result error:nil]; + [g_loginManagerInstances removeObject:self]; + }; + + if (tokenString) { + FBSDKGraphRequest *permissionsRequest = + [[FBSDKGraphRequest alloc] initWithGraphPath:@"me" + parameters:@{@"fields": @"id,permissions"} + tokenString:tokenString + HTTPMethod:@"GET" + flags:FBSDKGraphRequestFlagDisableErrorRecovery]; + [permissionsRequest startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id permissionRawResult, NSError *error) { + NSString *userID = permissionRawResult[@"id"]; + NSDictionary *permissionResult = permissionRawResult[@"permissions"]; + if (error || + !userID || + !permissionResult) { +#if TARGET_TV_OS + NSError *wrappedError = [NSError fbErrorWithDomain:FBSDKShareErrorDomain + code:FBSDKErrorTVOSUnknown + message:@"Unable to fetch permissions for token" + underlyingError:error]; +#else + NSError *wrappedError = [NSError fbErrorWithDomain:FBSDKLoginErrorDomain + code:FBSDKErrorUnknown + message:@"Unable to fetch permissions for token" + underlyingError:error]; +#endif + [self _notifyError:wrappedError]; + } else { + NSMutableSet *permissions = [NSMutableSet set]; + NSMutableSet *declinedPermissions = [NSMutableSet set]; + + [FBSDKInternalUtility extractPermissionsFromResponse:permissionResult + grantedPermissions:permissions + declinedPermissions:declinedPermissions]; + FBSDKAccessToken *accessToken = [[FBSDKAccessToken alloc] initWithTokenString:tokenString + permissions:permissions.allObjects + declinedPermissions:declinedPermissions.allObjects + appID:[FBSDKSettings appID] + userID:userID + expirationDate:nil + refreshDate:nil + dataAccessExpirationDate:nil]; + FBSDKDeviceLoginManagerResult *result = [[FBSDKDeviceLoginManagerResult alloc] initWithToken:accessToken + isCancelled:NO]; + completeWithResult(result); + } + }]; + } else { + _isCancelled = YES; + FBSDKDeviceLoginManagerResult *result = [[FBSDKDeviceLoginManagerResult alloc] initWithToken:nil isCancelled:YES]; + completeWithResult(result); + } +} + +- (void)_processError:(NSError *)error +{ + FBSDKDeviceLoginError code = [error.userInfo[FBSDKGraphRequestErrorGraphErrorSubcodeKey] unsignedIntegerValue]; + switch (code) { + case FBSDKDeviceLoginErrorAuthorizationPending: + [self _schedulePoll:_codeInfo.pollingInterval]; + break; + case FBSDKDeviceLoginErrorCodeExpired: + case FBSDKDeviceLoginErrorAuthorizationDeclined: + [self _notifyToken:nil]; + break; + case FBSDKDeviceLoginErrorExcessivePolling: + [self _schedulePoll:_codeInfo.pollingInterval * 2]; + default: + [self _notifyError:error]; + break; + } +} + +- (void)_schedulePoll:(NSUInteger)interval +{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(interval * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + if (self->_isCancelled) { + return; + } + + NSDictionary *parameters = @{ @"code": self->_codeInfo.identifier }; + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"device/login_status" + parameters:parameters + tokenString:[FBSDKInternalUtility validateRequiredClientAccessToken] + HTTPMethod:@"POST" + flags:FBSDKGraphRequestFlagNone]; + [request setGraphErrorRecoveryDisabled:YES]; + [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + if (self->_isCancelled) { + return; + } + if (error) { + [self _processError:error]; + } else { + NSString *tokenString = result[@"access_token"]; + if (tokenString) { + [self _notifyToken:tokenString]; + } else { + NSError *unknownError = [NSError fbErrorWithDomain:FBSDKLoginErrorDomain + code:FBSDKErrorUnknown + message:@"Device Login poll failed. No token nor error was found."]; + [self _notifyError:unknownError]; + } + } + }]; + }); +} + +- (void)netService:(NSNetService *)sender + didNotPublish:(NSDictionary *)errorDict +{ + // Only cleanup if the publish error is from our advertising service + if ([FBSDKDeviceRequestsHelper isDelegate:self forAdvertisementService:sender]) + { + [FBSDKDeviceRequestsHelper cleanUpAdvertisementService:self]; + } +} + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManagerResult.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManagerResult.h new file mode 100644 index 0000000..ccce552 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManagerResult.h @@ -0,0 +1,50 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/*! + @abstract Represents the results of the a device login flow. + @discussion This is used by `FBSDKDeviceLoginManager`. + */ +@interface FBSDKDeviceLoginManagerResult : NSObject + +/*! + @abstract There is no public initializer. + */ +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/*! + @abstract The token. + */ +@property (nullable, nonatomic, strong, readonly) FBSDKAccessToken *accessToken; + +/*! + @abstract Indicates if the login was cancelled by the user, or if the device + login code has expired. + */ +@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManagerResult.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManagerResult.m new file mode 100644 index 0000000..a95f1cf --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManagerResult.m @@ -0,0 +1,33 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKDeviceLoginManagerResult+Internal.h" + +@implementation FBSDKDeviceLoginManagerResult + +- (instancetype)initWithToken:(FBSDKAccessToken *)token + isCancelled:(BOOL)cancelled +{ + if ((self = [super init])) { + _accessToken = token; + _cancelled = cancelled; + } + return self; +} + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h new file mode 100644 index 0000000..afa4029 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h @@ -0,0 +1,131 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +#import + +#import "FBSDKTooltipView.h" + +@protocol FBSDKLoginButtonDelegate; + +/** + NS_ENUM(NSUInteger, FBSDKLoginButtonTooltipBehavior) + Indicates the desired login tooltip behavior. + */ +typedef NS_ENUM(NSUInteger, FBSDKLoginButtonTooltipBehavior) +{ + /** The default behavior. The tooltip will only be displayed if + the app is eligible (determined by possible server round trip) */ + FBSDKLoginButtonTooltipBehaviorAutomatic = 0, + /** Force display of the tooltip (typically for UI testing) */ + FBSDKLoginButtonTooltipBehaviorForceDisplay = 1, + /** Force disable. In this case you can still exert more refined + control by manually constructing a `FBSDKLoginTooltipView` instance. */ + FBSDKLoginButtonTooltipBehaviorDisable = 2 +}; + +/** + A button that initiates a log in or log out flow upon tapping. + + `FBSDKLoginButton` works with `[FBSDKAccessToken currentAccessToken]` to + determine what to display, and automatically starts authentication when tapped (i.e., + you do not need to manually subscribe action targets). + + Like `FBSDKLoginManager`, you should make sure your app delegate is connected to + `FBSDKApplicationDelegate` in order for the button's delegate to receive messages. + + `FBSDKLoginButton` has a fixed height of @c 30 pixels, but you may change the width. `initWithFrame:CGRectZero` + will size the button to its minimum frame. +*/ +@interface FBSDKLoginButton : FBSDKButton + +/** + The default audience to use, if publish permissions are requested at login time. + */ +@property (assign, nonatomic) FBSDKDefaultAudience defaultAudience; +/** + Gets or sets the delegate. + */ +@property (weak, nonatomic) IBOutlet id delegate; +/** + Gets or sets the login behavior to use + */ +@property (assign, nonatomic) FBSDKLoginBehavior loginBehavior; +/** + The publish permissions to request. + + + Use `defaultAudience` to specify the default audience to publish to. + Note this is converted to NSSet and is only + an NSArray for the convenience of literal syntax. + */ +@property (copy, nonatomic) NSArray *publishPermissions; +/** + The read permissions to request. + + + Note, that if read permissions are specified, then publish permissions should not be specified. This is converted to NSSet and is only + an NSArray for the convenience of literal syntax. + */ +@property (copy, nonatomic) NSArray *readPermissions; +/** + Gets or sets the desired tooltip behavior. + */ +@property (assign, nonatomic) FBSDKLoginButtonTooltipBehavior tooltipBehavior; +/** + Gets or sets the desired tooltip color style. + */ +@property (assign, nonatomic) FBSDKTooltipColorStyle tooltipColorStyle; + +@end + +/** + @protocol + A delegate for `FBSDKLoginButton` + */ +@protocol FBSDKLoginButtonDelegate + +@required +/** + Sent to the delegate when the button was used to login. + @param loginButton the sender + @param result The results of the login + @param error The error (if any) from the login + */ +- (void)loginButton:(FBSDKLoginButton *)loginButton +didCompleteWithResult:(FBSDKLoginManagerLoginResult *)result + error:(NSError *)error; + +/** + Sent to the delegate when the button was used to logout. + @param loginButton The button that was clicked. +*/ +- (void)loginButtonDidLogOut:(FBSDKLoginButton *)loginButton; + +@optional +/** + Sent to the delegate when the button is about to login. + @param loginButton the sender + @return YES if the login should be allowed to proceed, NO otherwise + */ +- (BOOL)loginButtonWillLogin:(FBSDKLoginButton *)loginButton; + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.m new file mode 100644 index 0000000..672f70b --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.m @@ -0,0 +1,333 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLoginButton.h" + +#import "FBSDKCoreKit+Internal.h" +#import "FBSDKLoginTooltipView.h" + +static const CGFloat kFBLogoSize = 16.0; +static const CGFloat kFBLogoLeftMargin = 6.0; +static const CGFloat kButtonHeight = 28.0; +static const CGFloat kRightMargin = 8.0; +static const CGFloat kPaddingBetweenLogoTitle = 8.0; + +@interface FBSDKLoginButton() +@end + +@implementation FBSDKLoginButton +{ + BOOL _hasShownTooltipBubble; + FBSDKLoginManager *_loginManager; + NSString *_userID; + NSString *_userName; +} + +#pragma mark - Object Lifecycle + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +#pragma mark - Properties + +- (FBSDKDefaultAudience)defaultAudience +{ + return _loginManager.defaultAudience; +} + +- (void)setDefaultAudience:(FBSDKDefaultAudience)defaultAudience +{ + _loginManager.defaultAudience = defaultAudience; +} + +- (FBSDKLoginBehavior)loginBehavior +{ + return _loginManager.loginBehavior; +} + +- (void)setLoginBehavior:(FBSDKLoginBehavior)loginBehavior +{ + _loginManager.loginBehavior = loginBehavior; +} + +- (UIFont *)defaultFont +{ + return [UIFont systemFontOfSize:13]; +} + +- (UIColor *)backgroundColor +{ + return [UIColor colorWithRed:66.0/255.0 green:103.0/255.0 blue:178.0/255.0 alpha:1.0]; +} + +#pragma mark - UIView + +- (void)didMoveToWindow +{ + [super didMoveToWindow]; + + if (self.window && + ((self.tooltipBehavior == FBSDKLoginButtonTooltipBehaviorForceDisplay) || !_hasShownTooltipBubble)) { + [self performSelector:@selector(_showTooltipIfNeeded) withObject:nil afterDelay:0]; + _hasShownTooltipBubble = YES; + } +} + +#pragma mark - Layout + +- (CGRect)imageRectForContentRect:(CGRect)contentRect +{ + CGFloat centerY = CGRectGetMidY(contentRect); + CGFloat y = centerY - (kFBLogoSize / 2.0); + return CGRectMake(kFBLogoLeftMargin, y, kFBLogoSize, kFBLogoSize); +} + +- (CGRect)titleRectForContentRect:(CGRect)contentRect +{ + if (self.hidden || CGRectIsEmpty(self.bounds)) { + return CGRectZero; + } + CGRect imageRect = [self imageRectForContentRect:contentRect]; + CGFloat titleX = CGRectGetMaxX(imageRect) + kPaddingBetweenLogoTitle; + CGRect titleRect = CGRectMake(titleX, 0, CGRectGetWidth(contentRect) - titleX - kRightMargin, CGRectGetHeight(contentRect)); + + return titleRect; +} + +- (void)layoutSubviews +{ + CGSize size = self.bounds.size; + CGSize longTitleSize = [self sizeThatFits:size title:[self _longLogInTitle]]; + NSString *title = (longTitleSize.width <= size.width ? + [self _longLogInTitle] : + [self _shortLogInTitle]); + if (![title isEqualToString:[self titleForState:UIControlStateNormal]]) { + [self setTitle:title forState:UIControlStateNormal]; + } + + [super layoutSubviews]; +} + +- (CGSize)sizeThatFits:(CGSize)size +{ + if (self.hidden) { + return CGSizeZero; + } + UIFont *font = self.titleLabel.font; + + CGSize selectedSize = FBSDKTextSize([self _logOutTitle], font, size, self.titleLabel.lineBreakMode); + CGSize normalSize = FBSDKTextSize([self _longLogInTitle], font, size, self.titleLabel.lineBreakMode); + if (normalSize.width > size.width) { + normalSize = FBSDKTextSize([self _shortLogInTitle], font, size, self.titleLabel.lineBreakMode); + } + + CGFloat titleWidth = MAX(normalSize.width, selectedSize.width); + CGFloat buttonWidth = kFBLogoLeftMargin + kFBLogoSize + kPaddingBetweenLogoTitle + titleWidth + kRightMargin; + return CGSizeMake(buttonWidth, kButtonHeight); +} + +#pragma mark - FBSDKButtonImpressionTracking + +- (NSDictionary *)analyticsParameters +{ + return nil; +} + +- (NSString *)impressionTrackingEventName +{ + return FBSDKAppEventNameFBSDKLoginButtonImpression; +} + +- (NSString *)impressionTrackingIdentifier +{ + return @"login"; +} + +#pragma mark - FBSDKButton + +- (void)configureButton +{ + _loginManager = [[FBSDKLoginManager alloc] init]; + + NSString *logInTitle = [self _shortLogInTitle]; + NSString *logOutTitle = [self _logOutTitle]; + + [self configureWithIcon:nil + title:logInTitle + backgroundColor:self.backgroundColor + highlightedColor:nil + selectedTitle:logOutTitle + selectedIcon:nil + selectedColor:self.backgroundColor + selectedHighlightedColor:nil]; + self.titleLabel.textAlignment = NSTextAlignmentCenter; + [self addConstraint:[NSLayoutConstraint constraintWithItem:self + attribute:NSLayoutAttributeHeight + relatedBy:NSLayoutRelationEqual + toItem:nil + attribute:NSLayoutAttributeNotAnAttribute + multiplier:1 + constant:28]]; + [self _updateContent]; + + [self addTarget:self action:@selector(_buttonPressed:) forControlEvents:UIControlEventTouchUpInside]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(_accessTokenDidChangeNotification:) + name:FBSDKAccessTokenDidChangeNotification + object:nil]; +} + +#pragma mark - Helper Methods + +- (void)_accessTokenDidChangeNotification:(NSNotification *)notification +{ + if (notification.userInfo[FBSDKAccessTokenDidChangeUserIDKey] || notification.userInfo[FBSDKAccessTokenDidExpireKey]) { + [self _updateContent]; + } +} + +- (void)_buttonPressed:(id)sender +{ + [self logTapEventWithEventName:FBSDKAppEventNameFBSDKLoginButtonDidTap parameters:self.analyticsParameters]; + if ([FBSDKAccessToken currentAccessTokenIsActive]) { + NSString *title = nil; + + if (_userName) { + NSString *localizedFormatString = + NSLocalizedStringWithDefaultValue(@"LoginButton.LoggedInAs", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Logged in as %@", + @"The format string for the FBSDKLoginButton label when the user is logged in"); + title = [NSString localizedStringWithFormat:localizedFormatString, _userName]; + } else { + NSString *localizedLoggedIn = + NSLocalizedStringWithDefaultValue(@"LoginButton.LoggedIn", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Logged in using Facebook", + @"The fallback string for the FBSDKLoginButton label when the user name is not available yet"); + title = localizedLoggedIn; + } + NSString *cancelTitle = + NSLocalizedStringWithDefaultValue(@"LoginButton.CancelLogout", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Cancel", + @"The label for the FBSDKLoginButton action sheet to cancel logging out"); + NSString *logOutTitle = + NSLocalizedStringWithDefaultValue(@"LoginButton.ConfirmLogOut", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Log Out", + @"The label for the FBSDKLoginButton action sheet to confirm logging out"); + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title + message:nil + preferredStyle:UIAlertControllerStyleActionSheet]; + alertController.popoverPresentationController.sourceView = self; + alertController.popoverPresentationController.sourceRect = self.bounds; + UIAlertAction *cancel = [UIAlertAction actionWithTitle:cancelTitle + style:UIAlertActionStyleCancel + handler:nil]; + UIAlertAction *logout = [UIAlertAction actionWithTitle:logOutTitle + style:UIAlertActionStyleDestructive + handler:^(UIAlertAction * _Nonnull action) { + [self->_loginManager logOut]; + [self.delegate loginButtonDidLogOut:self]; + }]; + [alertController addAction:cancel]; + [alertController addAction:logout]; + UIViewController *topMostViewController = [FBSDKInternalUtility topMostViewController]; + [topMostViewController presentViewController:alertController + animated:YES + completion:nil]; + } else { + if ([self.delegate respondsToSelector:@selector(loginButtonWillLogin:)]) { + if (![self.delegate loginButtonWillLogin:self]) { + return; + } + } + + FBSDKLoginManagerRequestTokenHandler handler = ^(FBSDKLoginManagerLoginResult *result, NSError *error) { + if ([self.delegate respondsToSelector:@selector(loginButton:didCompleteWithResult:error:)]) { + [self.delegate loginButton:self didCompleteWithResult:result error:error]; + } + }; + + if (self.publishPermissions.count > 0) { + [_loginManager logInWithPublishPermissions:self.publishPermissions + fromViewController:[FBSDKInternalUtility viewControllerForView:self] + handler:handler]; + } else { + [_loginManager logInWithReadPermissions:self.readPermissions + fromViewController:[FBSDKInternalUtility viewControllerForView:self] + handler:handler]; + } + } +} + +- (NSString *)_logOutTitle +{ + return NSLocalizedStringWithDefaultValue(@"LoginButton.LogOut", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Log out", + @"The label for the FBSDKLoginButton when the user is currently logged in"); +} + +- (NSString *)_longLogInTitle +{ + return NSLocalizedStringWithDefaultValue(@"LoginButton.LogInContinue", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Continue with Facebook", + @"The long label for the FBSDKLoginButton when the user is currently logged out"); +} + +- (NSString *)_shortLogInTitle +{ + return NSLocalizedStringWithDefaultValue(@"LoginButton.LogIn", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Log in", + @"The short label for the FBSDKLoginButton when the user is currently logged out"); +} + +- (void)_showTooltipIfNeeded +{ + if ([FBSDKAccessToken currentAccessToken] || self.tooltipBehavior == FBSDKLoginButtonTooltipBehaviorDisable) { + return; + } else { + FBSDKLoginTooltipView *tooltipView = [[FBSDKLoginTooltipView alloc] init]; + tooltipView.colorStyle = self.tooltipColorStyle; + if (self.tooltipBehavior == FBSDKLoginButtonTooltipBehaviorForceDisplay) { + tooltipView.forceDisplay = YES; + } + [tooltipView presentFromView:self]; + } +} + +- (void)_updateContent +{ + BOOL accessTokenIsValid = [FBSDKAccessToken currentAccessTokenIsActive]; + self.selected = accessTokenIsValid; + if (accessTokenIsValid) { + if (![[FBSDKAccessToken currentAccessToken].userID isEqualToString:_userID]) { + FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me?fields=id,name" + parameters:nil + flags:FBSDKGraphRequestFlagDisableErrorRecovery]; + [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + NSString *userID = [FBSDKTypeUtility stringValue:result[@"id"]]; + if (!error && [[FBSDKAccessToken currentAccessToken].userID isEqualToString:userID]) { + self->_userName = [FBSDKTypeUtility stringValue:result[@"name"]]; + self->_userID = userID; + } + }]; + } + } +} + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.h new file mode 100644 index 0000000..bcbf9d6 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.h @@ -0,0 +1,142 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +/** + The error domain for all errors from FBSDKLoginKit + + Error codes from the SDK in the range 300-399 are reserved for this domain. + */ +FOUNDATION_EXPORT NSErrorDomain const FBSDKLoginErrorDomain; + +#else + +/** + The error domain for all errors from FBSDKLoginKit + + Error codes from the SDK in the range 300-399 are reserved for this domain. + */ +FOUNDATION_EXPORT NSString *const FBSDKLoginErrorDomain; + +#endif + +#ifndef NS_ERROR_ENUM +#define NS_ERROR_ENUM(_domain, _name) \ +enum _name: NSInteger _name; \ +enum __attribute__((ns_error_domain(_domain))) _name: NSInteger +#endif + +/** + FBSDKLoginError + Error codes for FBSDKLoginErrorDomain. + */ +typedef NS_ERROR_ENUM(FBSDKLoginErrorDomain, FBSDKLoginError) +{ + /** + Reserved. + */ + FBSDKLoginErrorReserved = 300, + /** + The error code for unknown errors. + */ + FBSDKLoginErrorUnknown, + + /** + The user's password has changed and must log in again + */ + FBSDKLoginErrorPasswordChanged, + /** + The user must log in to their account on www.facebook.com to restore access + */ + FBSDKLoginErrorUserCheckpointed, + /** + Indicates a failure to request new permissions because the user has changed. + */ + FBSDKLoginErrorUserMismatch, + /** + The user must confirm their account with Facebook before logging in + */ + FBSDKLoginErrorUnconfirmedUser, + + /** + The Accounts framework failed without returning an error, indicating the + app's slider in the iOS Facebook Settings (device Settings -> Facebook -> App Name) has + been disabled. + */ + FBSDKLoginErrorSystemAccountAppDisabled, + /** + An error occurred related to Facebook system Account store + */ + FBSDKLoginErrorSystemAccountUnavailable, + /** + The login response was missing a valid challenge string. + */ + FBSDKLoginErrorBadChallengeString, +}; + +/** + FBSDKDeviceLoginError + Error codes for FBSDKDeviceLoginErrorDomain. + */ +typedef NS_ERROR_ENUM(FBSDKLoginErrorDomain, FBSDKDeviceLoginError) { + /** + Your device is polling too frequently. + */ + FBSDKDeviceLoginErrorExcessivePolling = 1349172, + /** + User has declined to authorize your application. + */ + FBSDKDeviceLoginErrorAuthorizationDeclined = 1349173, + /** + User has not yet authorized your application. Continue polling. + */ + FBSDKDeviceLoginErrorAuthorizationPending = 1349174, + /** + The code you entered has expired. + */ + FBSDKDeviceLoginErrorCodeExpired = 1349152 +}; + +/** + Deprecated + */ +typedef NS_ENUM(NSInteger, FBSDKLoginErrorCode) +{ + FBSDKLoginReservedErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorReserved instead") = FBSDKLoginErrorReserved, + FBSDKLoginUnknownErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorUnknown instead"), + FBSDKLoginPasswordChangedErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorPasswordChanged instead"), + FBSDKLoginUserCheckpointedErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorUserCheckpointed instead"), + FBSDKLoginUserMismatchErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorUserMismatch instead"), + FBSDKLoginUnconfirmedUserErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorUnconfirmedUser instead"), + FBSDKLoginSystemAccountAppDisabledErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorSystemAccountAppDisabled instead"), + FBSDKLoginSystemAccountUnavailableErrorCode DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorSystemAccountUnavailable instead"), + FBSDKLoginBadChallengeString DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginErrorBadChallengeString instead"), +} DEPRECATED_MSG_ATTRIBUTE("use FBSDKLoginError instead"); + +/** + Deprecated + */ +typedef NS_ENUM(NSUInteger, FBSDKDeviceLoginErrorSubcode) { + FBSDKDeviceLoginExcessivePollingErrorSubcode DEPRECATED_MSG_ATTRIBUTE("use FBSDKDeviceLoginErrorExcessivePolling instead") = FBSDKDeviceLoginErrorExcessivePolling, + FBSDKDeviceLoginAuthorizationDeclinedErrorSubcode DEPRECATED_MSG_ATTRIBUTE("use FBSDKDeviceLoginErrorAuthorizationDeclined instead") = FBSDKDeviceLoginErrorAuthorizationDeclined, + FBSDKDeviceLoginAuthorizationPendingErrorSubcode DEPRECATED_MSG_ATTRIBUTE("use FBSDKDeviceLoginErrorAuthorizationPending instead") = FBSDKDeviceLoginErrorAuthorizationPending, + FBSDKDeviceLoginCodeExpiredErrorSubcode DEPRECATED_MSG_ATTRIBUTE("use FBSDKDeviceLoginErrorCodeExpired instead") = FBSDKDeviceLoginErrorCodeExpired +} DEPRECATED_MSG_ATTRIBUTE("use FBSDKDeviceLoginError instead"); diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.m new file mode 100644 index 0000000..0e6e6e5 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.m @@ -0,0 +1,29 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLoginConstants.h" + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 + +NSErrorDomain const FBSDKLoginErrorDomain = @"com.facebook.sdk.login"; + +#else + +NSString *const FBSDKLoginErrorDomain = @"com.facebook.sdk.login"; + +#endif diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit.h new file mode 100644 index 0000000..aafc577 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit.h @@ -0,0 +1,31 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import +#import +#import +#import + +#if !TARGET_TV_OS +#import +#import +#import +#import +#endif diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.h new file mode 100644 index 0000000..7b579d0 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.h @@ -0,0 +1,227 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import +#import +#import + +@class FBSDKLoginManagerLoginResult; + +/** + Describes the call back to the FBSDKLoginManager + @param result the result of the authorization + @param error the authorization error, if any. + */ +typedef void (^FBSDKLoginManagerRequestTokenHandler)(FBSDKLoginManagerLoginResult *result, NSError *error); + + +/** + FBSDKDefaultAudience enum + + Passed to open to indicate which default audience to use for sessions that post data to Facebook. + + + + Certain operations such as publishing a status or publishing a photo require an audience. When the user + grants an application permission to perform a publish operation, a default audience is selected as the + publication ceiling for the application. This enumerated value allows the application to select which + audience to ask the user to grant publish permission for. + */ +typedef NS_ENUM(NSUInteger, FBSDKDefaultAudience) +{ + /** Indicates that the user's friends are able to see posts made by the application */ + FBSDKDefaultAudienceFriends = 0, + /** Indicates that only the user is able to see posts made by the application */ + FBSDKDefaultAudienceOnlyMe, + /** Indicates that all Facebook users are able to see posts made by the application */ + FBSDKDefaultAudienceEveryone, +}; + +/** + FBSDKLoginBehavior enum + + Passed to the \c FBSDKLoginManager to indicate how Facebook Login should be attempted. + + + + Facebook Login authorizes the application to act on behalf of the user, using the user's + Facebook account. Usually a Facebook Login will rely on an account maintained outside of + the application, by the native Facebook application, the browser, or perhaps the device + itself. This avoids the need for a user to enter their username and password directly, and + provides the most secure and lowest friction way for a user to authorize the application to + interact with Facebook. + + The \c FBSDKLoginBehavior enum specifies which log-in methods may be used. The SDK + will determine the best behavior based on the current device (such as iOS version). + */ +typedef NS_ENUM(NSUInteger, FBSDKLoginBehavior) +{ + /** + This is the default behavior, and indicates logging in through the native + Facebook app may be used. The SDK may still use Safari instead. + */ + FBSDKLoginBehaviorNative = 0, + /** + Attempts log in through the Safari or SFSafariViewController, if available. + */ + FBSDKLoginBehaviorBrowser, + /** + Attempts log in through the Facebook account currently signed in through + the device Settings. + @note If the account is not available to the app (either not configured by user or + as determined by the SDK) this behavior falls back to \c FBSDKLoginBehaviorNative. + */ + FBSDKLoginBehaviorSystemAccount, + /** + Attempts log in through a modal \c UIWebView pop up + + @note This behavior is only available to certain types of apps. Please check the Facebook + Platform Policy to verify your app meets the restrictions. + */ + FBSDKLoginBehaviorWeb, +}; + +/** + `FBSDKLoginManager` provides methods for logging the user in and out. + + `FBSDKLoginManager` works directly with `[FBSDKAccessToken currentAccessToken]` and + sets the "currentAccessToken" upon successful authorizations (or sets `nil` in case of `logOut`). + + You should check `[FBSDKAccessToken currentAccessToken]` before calling logIn* to see if there is + a cached token available (typically in your viewDidLoad). + + If you are managing your own token instances outside of "currentAccessToken", you will need to set + "currentAccessToken" before calling logIn* to authorize further permissions on your tokens. + */ +@interface FBSDKLoginManager : NSObject + +/** + Auth type + */ +@property (strong, nonatomic) NSString *authType; +/** + the default audience. + + you should set this if you intend to ask for publish permissions. + */ +@property (assign, nonatomic) FBSDKDefaultAudience defaultAudience; + +/** + the login behavior + */ +@property (assign, nonatomic) FBSDKLoginBehavior loginBehavior; + +/** + +@warning use logInWithReadPermissions:fromViewController:handler: instead + */ +- (void)logInWithReadPermissions:(NSArray *)permissions handler:(FBSDKLoginManagerRequestTokenHandler)handler +DEPRECATED_MSG_ATTRIBUTE("use logInWithReadPermissions:fromViewController:handler: instead"); + +/** + +@warning use logInWithPublishPermissions:fromViewController:handler: instead + */ +- (void)logInWithPublishPermissions:(NSArray *)permissions handler:(FBSDKLoginManagerRequestTokenHandler)handler +DEPRECATED_MSG_ATTRIBUTE("use logInWithPublishPermissions:fromViewController:handler: instead"); + +/** + Logs the user in or authorizes additional permissions. + @param permissions the optional array of permissions. Note this is converted to NSSet and is only + an NSArray for the convenience of literal syntax. + @param fromViewController the view controller to present from. If nil, the topmost view controller will be + automatically determined as best as possible. + @param handler the callback. + + Use this method when asking for read permissions. You should only ask for permissions when they + are needed and explain the value to the user. You can inspect the result.declinedPermissions to also + provide more information to the user if they decline permissions. + + This method will present UI the user. You typically should check if `[FBSDKAccessToken currentAccessToken]` + already contains the permissions you need before asking to reduce unnecessary app switching. For example, + you could make that check at viewDidLoad. + You can only do one login call at a time. Calling a login method before the completion handler is called + on a previous login will return an error. + */ +- (void)logInWithReadPermissions:(NSArray *)permissions + fromViewController:(UIViewController *)fromViewController + handler:(FBSDKLoginManagerRequestTokenHandler)handler; + +/** + Logs the user in or authorizes additional permissions. + @param permissions the optional array of permissions. Note this is converted to NSSet and is only + an NSArray for the convenience of literal syntax. + @param fromViewController the view controller to present from. If nil, the topmost view controller will be + automatically determined as best as possible. + @param handler the callback. + + Use this method when asking for publish permissions. You should only ask for permissions when they + are needed and explain the value to the user. You can inspect the result.declinedPermissions to also + provide more information to the user if they decline permissions. + + This method will present UI the user. You typically should check if `[FBSDKAccessToken currentAccessToken]` + already contains the permissions you need before asking to reduce unnecessary app switching. For example, + you could make that check at viewDidLoad. + You can only do one login call at a time. Calling a login method before the completion handler is called + on a previous login will return an error. + */ +- (void)logInWithPublishPermissions:(NSArray *)permissions + fromViewController:(UIViewController *)fromViewController + handler:(FBSDKLoginManagerRequestTokenHandler)handler; + + +/** + Requests user's permission to reathorize application's data access, after it has expired due to inactivity. + @param fromViewController the view controller to present from. If nil, the topmost view controller will be + automatically determined as best as possible. + @param handler the callback. + Use this method when you need to reathorize your app's access to user data via Graph API, after such an access has expired. + You should provide as much context to the user as possible as to why you need to reauthorize the access, the scope of + access being reathorized, and what added value your app provides when the access is reathorized. + You can inspect the result.declinedPermissions to also provide more information to the user if they decline permissions. + This method will present UI the user. You typically should call this if `[FBSDKAccessToken isDataAccessExpired]` returns true. + */ +- (void)reauthorizeDataAccess:(UIViewController *)fromViewController + handler:(FBSDKLoginManagerRequestTokenHandler)handler; + +/** + Logs the user out + + This calls [FBSDKAccessToken setCurrentAccessToken:nil] and [FBSDKProfile setCurrentProfile:nil]. + */ +- (void)logOut; + +/** + @method + + Issues an asynchronous renewCredentialsForAccount call to the device's Facebook account store. + + @param handler The completion handler to call when the renewal is completed. This can be invoked on an arbitrary thread. + + + This can be used to explicitly renew account credentials and is provided as a convenience wrapper around + `[ACAccountStore renewCredentialsForAccount:completion]`. Note the method will not issue the renewal call if the the + Facebook account has not been set on the device, or if access had not been granted to the account (though the handler + wil receive an error). + + If the `[FBSDKAccessToken currentAccessToken]` was from the account store, a succesful renewal will also set + a new "currentAccessToken". + */ ++ (void)renewSystemCredentials:(void (^)(ACAccountCredentialRenewResult result, NSError *error))handler; + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.m new file mode 100644 index 0000000..dfd443e --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.m @@ -0,0 +1,885 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLoginManager+Internal.h" +#import "FBSDKLoginManagerLoginResult+Internal.h" + +#import +#import + +#import "_FBSDKLoginRecoveryAttempter.h" +#import "FBSDKCoreKit+Internal.h" +#import "FBSDKLoginCompletion.h" +#import "FBSDKLoginConstants.h" +#import "FBSDKLoginError.h" +#import "FBSDKLoginManagerLogger.h" +#import "FBSDKLoginUtility.h" + +static int const FBClientStateChallengeLength = 20; +static NSString *const FBSDKExpectedChallengeKey = @"expected_login_challenge"; +static NSString *const FBSDKOauthPath = @"/dialog/oauth"; +static NSString *const SFVCCanceledLogin = @"com.apple.SafariServices.Authentication"; +static NSString *const ASCanceledLogin = @"com.apple.AuthenticationServices.WebAuthenticationSession"; + +typedef NS_ENUM(NSInteger, FBSDKLoginManagerState) { + FBSDKLoginManagerStateIdle, + // We received a call to start login. + FBSDKLoginManagerStateStart, + // We're calling out to the Facebook app or Safari to perform a log in + FBSDKLoginManagerStatePerformingLogin, +}; + +@implementation FBSDKLoginManager +{ + FBSDKLoginManagerRequestTokenHandler _handler; + FBSDKLoginManagerLogger *_logger; + FBSDKLoginManagerState _state; + FBSDKKeychainStore *_keychainStore; + BOOL _usedSFAuthSession; +} + ++ (void)initialize +{ + if (self == [FBSDKLoginManager class]) { + [_FBSDKLoginRecoveryAttempter class]; + [FBSDKServerConfigurationManager loadServerConfigurationWithCompletionBlock:NULL]; + } +} + +- (instancetype)init +{ + self = [super init]; + if (self) { + self.authType = @"rerequest"; + NSString *keyChainServiceIdentifier = [NSString stringWithFormat:@"com.facebook.sdk.loginmanager.%@", [NSBundle mainBundle].bundleIdentifier]; + _keychainStore = [[FBSDKKeychainStore alloc] initWithService:keyChainServiceIdentifier accessGroup:nil]; + } + return self; +} + +- (void)logInWithReadPermissions:(NSArray *)permissions handler:(FBSDKLoginManagerRequestTokenHandler)handler +{ + [self logInWithReadPermissions:permissions + fromViewController:nil + handler:handler]; +} +- (void)logInWithReadPermissions:(NSArray *)permissions + fromViewController:(UIViewController *)fromViewController + handler:(FBSDKLoginManagerRequestTokenHandler)handler +{ + if (![self validateLoginStartState]) { + return; + } + [self assertPermissions:permissions]; + NSSet *permissionSet = [NSSet setWithArray:permissions]; + if (![FBSDKInternalUtility areAllPermissionsReadPermissions:permissionSet]) { + [self raiseLoginException:[NSException exceptionWithName:NSInvalidArgumentException + reason:@"Publish or manage permissions are not permitted to be requested with read permissions." + userInfo:nil]]; + } + self.fromViewController = fromViewController; + [self logInWithPermissions:permissionSet handler:handler]; +} + +- (void)logInWithPublishPermissions:(NSArray *)permissions handler:(FBSDKLoginManagerRequestTokenHandler)handler +{ + [self logInWithPublishPermissions:permissions + fromViewController:nil + handler:handler]; +} + +- (void)logInWithPublishPermissions:(NSArray *)permissions + fromViewController:(UIViewController *)fromViewController + handler:(FBSDKLoginManagerRequestTokenHandler)handler +{ + if (![self validateLoginStartState]) { + return; + } + [self assertPermissions:permissions]; + NSSet *permissionSet = [NSSet setWithArray:permissions]; + if (![FBSDKInternalUtility areAllPermissionsPublishPermissions:permissionSet]) { + [self raiseLoginException:[NSException exceptionWithName:NSInvalidArgumentException + reason:@"Read permissions are not permitted to be requested with publish or manage permissions." + userInfo:nil]]; + } + self.fromViewController = fromViewController; + [self logInWithPermissions:permissionSet handler:handler]; +} + +- (void)reauthorizeDataAccess:(UIViewController *)fromViewController handler:(FBSDKLoginManagerRequestTokenHandler)handler +{ + if (![self validateLoginStartState]) { + return; + } + self.fromViewController = fromViewController; + [self reauthorizeDataAccess:handler]; +} + + +- (void)logOut +{ + [FBSDKAccessToken setCurrentAccessToken:nil]; + [FBSDKProfile setCurrentProfile:nil]; +} + ++ (void)renewSystemCredentials:(void (^)(ACAccountCredentialRenewResult result, NSError *error))handler +{ + FBSDKSystemAccountStoreAdapter *adapter = [FBSDKSystemAccountStoreAdapter sharedInstance]; + + if (!adapter.accountType) { + handler(ACAccountCredentialRenewResultFailed, [NSError fbErrorForFailedLoginWithCode:FBSDKLoginErrorSystemAccountUnavailable]); + } else if (!adapter.accountType.accessGranted) { + handler(ACAccountCredentialRenewResultFailed, [NSError fbErrorForFailedLoginWithCode:FBSDKLoginErrorSystemAccountAppDisabled]); + } else { + [[FBSDKSystemAccountStoreAdapter sharedInstance] renewSystemAuthorization:handler]; + } +} + +#pragma mark - Private + +- (void)raiseLoginException:(NSException *)exception +{ + _state = FBSDKLoginManagerStateIdle; + [exception raise]; +} + +- (void)handleImplicitCancelOfLogIn +{ + FBSDKLoginManagerLoginResult *result = [[FBSDKLoginManagerLoginResult alloc] initWithToken:nil + isCancelled:YES + grantedPermissions:nil + declinedPermissions:nil]; + [result addLoggingExtra:@YES forKey:@"implicit_cancel"]; + [self invokeHandler:result error:nil]; +} + +- (BOOL)validateLoginStartState +{ + switch (_state) { + case FBSDKLoginManagerStateStart: { + if (self->_usedSFAuthSession) { + // Using SFAuthenticationSession makes an interestitial dialog that blocks the app, but in certain situations such as + // screen lock it can be dismissed and have the control returned to the app without invoking the completionHandler. + // In this case, the viewcontroller has the control back and tried to reinvoke the login. This is acceptable behavior + // and we should pop up the dialog again + return YES; + } + + NSString *errorStr = @"** WARNING: You are trying to start a login while a previous login has not finished yet." + "This is unsupported behavior. You should wait until the previous login handler gets called to start a new login."; + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"%@", errorStr]; + return NO; + } + case FBSDKLoginManagerStatePerformingLogin:{ + [self handleImplicitCancelOfLogIn]; + return YES; + } + case FBSDKLoginManagerStateIdle: + _state = FBSDKLoginManagerStateStart; + return YES; + } +} + +- (BOOL)isPerformingLogin +{ + return _state == FBSDKLoginManagerStatePerformingLogin; +} + +- (void)assertPermissions:(NSArray *)permissions +{ + for (NSString *permission in permissions) { + if (![permission isKindOfClass:[NSString class]]) { + [self raiseLoginException:[NSException exceptionWithName:NSInvalidArgumentException + reason:@"Permissions must be string values." + userInfo:nil]]; + } + if ([permission rangeOfString:@","].location != NSNotFound) { + [self raiseLoginException:[NSException exceptionWithName:NSInvalidArgumentException + reason:@"Permissions should each be specified in separate string values in the array." + userInfo:nil]]; + } + } +} + +- (void)completeAuthentication:(FBSDKLoginCompletionParameters *)parameters expectChallenge:(BOOL)expectChallenge +{ + NSSet *recentlyGrantedPermissions = nil; + NSSet *recentlyDeclinedPermissions = nil; + FBSDKLoginManagerLoginResult *result = nil; + NSError *error = parameters.error; + + NSString *tokenString = parameters.accessTokenString; + BOOL cancelled = (tokenString == nil); + + BOOL challengePassed = YES; + if (expectChallenge) { + // Perform this check early so we be sure to clear expected challenge in all cases. + NSString *challengeReceived = parameters.challenge; + NSString *challengeExpected = [[self loadExpectedChallenge] stringByReplacingOccurrencesOfString:@"+" withString:@" "]; + if (![challengeExpected isEqualToString:challengeReceived]) { + challengePassed = NO; + } + + // Don't overwrite an existing error, if any. + if (!error && !cancelled && !challengePassed) { + error = [NSError fbErrorForFailedLoginWithCode:FBSDKLoginErrorBadChallengeString]; + } + } + + [self storeExpectedChallenge:nil]; + + if (!error) { + if (!cancelled) { + NSSet *grantedPermissions = parameters.permissions; + NSSet *declinedPermissions = parameters.declinedPermissions; + + [self determineRecentlyGrantedPermissions:&recentlyGrantedPermissions + recentlyDeclinedPermissions:&recentlyDeclinedPermissions + forGrantedPermission:grantedPermissions + declinedPermissions:declinedPermissions]; + + if (recentlyGrantedPermissions.count > 0) { + FBSDKAccessToken *token = [[FBSDKAccessToken alloc] initWithTokenString:tokenString + permissions:grantedPermissions.allObjects + declinedPermissions:declinedPermissions.allObjects + appID:parameters.appID + userID:parameters.userID + expirationDate:parameters.expirationDate + refreshDate:[NSDate date] + dataAccessExpirationDate:parameters.dataAccessExpirationDate]; + result = [[FBSDKLoginManagerLoginResult alloc] initWithToken:token + isCancelled:NO + grantedPermissions:recentlyGrantedPermissions + declinedPermissions:recentlyDeclinedPermissions]; + + if ([FBSDKAccessToken currentAccessToken]) { + [self validateReauthentication:[FBSDKAccessToken currentAccessToken] withResult:result]; + // in a reauth, short circuit and let the login handler be called when the validation finishes. + return; + } + } + } + + if (cancelled || recentlyGrantedPermissions.count == 0) { + NSSet *declinedPermissions = nil; + if ([FBSDKAccessToken currentAccessToken] != nil) { + if (parameters.isSystemAccount) { + // If a System Account reauthorization was cancelled by the user tapping Don't Allow + // then add the declined permissions to the login result. The Accounts framework + // doesn't register the decline with Facebook, which is why we don't update the + // access token. + declinedPermissions = parameters.declinedPermissions; + } else { + // Always include the list of declined permissions from this login request + // if an access token is already cached by the SDK + declinedPermissions = recentlyDeclinedPermissions; + } + } + + result = [[FBSDKLoginManagerLoginResult alloc] initWithToken:nil + isCancelled:cancelled + grantedPermissions:nil + declinedPermissions:declinedPermissions]; + } + } + + if (result.token) { + [FBSDKAccessToken setCurrentAccessToken:result.token]; + } + + [self invokeHandler:result error:error]; +} + +- (void)determineRecentlyGrantedPermissions:(NSSet **)recentlyGrantedPermissionsRef + recentlyDeclinedPermissions:(NSSet **)recentlyDeclinedPermissionsRef + forGrantedPermission:(NSSet *)grantedPermissions + declinedPermissions:(NSSet *)declinedPermissions +{ + NSMutableSet *recentlyGrantedPermissions = [grantedPermissions mutableCopy]; + NSSet *previouslyGrantedPermissions = ([FBSDKAccessToken currentAccessToken] ? + [FBSDKAccessToken currentAccessToken].permissions : + nil); + if (previouslyGrantedPermissions.count > 0) { + // If there were no requested permissions for this auth - treat all permissions as granted. + // Otherwise this is a reauth, so recentlyGranted should be a subset of what was requested. + if (_requestedPermissions.count != 0) { + [recentlyGrantedPermissions intersectSet:_requestedPermissions]; + } + } + + NSMutableSet *recentlyDeclinedPermissions = [_requestedPermissions mutableCopy]; + [recentlyDeclinedPermissions intersectSet:declinedPermissions]; + + if (recentlyGrantedPermissionsRef != NULL) { + *recentlyGrantedPermissionsRef = [recentlyGrantedPermissions copy]; + } + if (recentlyDeclinedPermissionsRef != NULL) { + *recentlyDeclinedPermissionsRef = [recentlyDeclinedPermissions copy]; + } +} + +- (void)invokeHandler:(FBSDKLoginManagerLoginResult *)result error:(NSError *)error +{ + [_logger endLoginWithResult:result error:error]; + [_logger endSession]; + _logger = nil; + _state = FBSDKLoginManagerStateIdle; + + if (_handler) { + FBSDKLoginManagerRequestTokenHandler handler = _handler; + _handler(result, error); + if (handler == _handler) { + _handler = nil; + } else { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"** WARNING: You are requesting permissions inside the completion block of an existing login." + "This is unsupported behavior. You should request additional permissions only when they are needed, such as requesting for publish_actions" + "when the user performs a sharing action."]; + } + } +} + +- (NSString *)loadExpectedChallenge +{ + return [_keychainStore stringForKey:FBSDKExpectedChallengeKey]; +} + +- (NSDictionary *)logInParametersWithPermissions:(NSSet *)permissions serverConfiguration:(FBSDKServerConfiguration *)serverConfiguration +{ + [FBSDKInternalUtility validateURLSchemes]; + + NSMutableDictionary *loginParams = [NSMutableDictionary dictionary]; + loginParams[@"client_id"] = [FBSDKSettings appID]; + loginParams[@"response_type"] = @"token,signed_request"; + loginParams[@"redirect_uri"] = @"fbconnect://success"; + loginParams[@"display"] = @"touch"; + loginParams[@"sdk"] = @"ios"; + loginParams[@"return_scopes"] = @"true"; + loginParams[@"sdk_version"] = FBSDK_VERSION_STRING; + loginParams[@"fbapp_pres"] = @([FBSDKInternalUtility isFacebookAppInstalled]); + loginParams[@"auth_type"] = self.authType; + loginParams[@"logging_token"] = serverConfiguration.loggingToken; + + [FBSDKInternalUtility dictionary:loginParams setObject:[FBSDKSettings appURLSchemeSuffix] forKey:@"local_client_id"]; + [FBSDKInternalUtility dictionary:loginParams setObject:[FBSDKLoginUtility stringForAudience:self.defaultAudience] forKey:@"default_audience"]; + [FBSDKInternalUtility dictionary:loginParams setObject:[permissions.allObjects componentsJoinedByString:@","] forKey:@"scope"]; + + NSString *expectedChallenge = [FBSDKLoginManager stringForChallenge]; + NSDictionary *state = @{@"challenge": [FBSDKUtility URLEncode:expectedChallenge]}; + loginParams[@"state"] = [FBSDKInternalUtility JSONStringForObject:state error:NULL invalidObjectHandler:nil]; + + [self storeExpectedChallenge:expectedChallenge]; + + return loginParams; +} + +- (void)logInWithPermissions:(NSSet *)permissions handler:(FBSDKLoginManagerRequestTokenHandler)handler +{ + FBSDKServerConfiguration *serverConfiguration = [FBSDKServerConfigurationManager cachedServerConfiguration]; + _logger = [[FBSDKLoginManagerLogger alloc] initWithLoggingToken:serverConfiguration.loggingToken]; + + _handler = [handler copy]; + _requestedPermissions = permissions; + + [_logger startSessionForLoginManager:self]; + + [self logInWithBehavior:self.loginBehavior]; +} + +- (void)reauthorizeDataAccess:(FBSDKLoginManagerRequestTokenHandler)handler +{ + FBSDKServerConfiguration *serverConfiguration = [FBSDKServerConfigurationManager cachedServerConfiguration]; + _logger = [[FBSDKLoginManagerLogger alloc] initWithLoggingToken:serverConfiguration.loggingToken]; + _handler = [handler copy]; + // Don't need to pass permissions for data reauthorization. + _requestedPermissions = [NSSet set]; + self.authType = @"reauthorize"; + [_logger startSessionForLoginManager:self]; + [self logInWithBehavior:self.loginBehavior]; +} + +- (void)logInWithBehavior:(FBSDKLoginBehavior)loginBehavior +{ + FBSDKServerConfiguration *serverConfiguration = [FBSDKServerConfigurationManager cachedServerConfiguration]; + NSDictionary *loginParams = [self logInParametersWithPermissions:_requestedPermissions serverConfiguration:serverConfiguration]; + self->_usedSFAuthSession = NO; + + void(^completion)(BOOL, NSString *, NSError *) = ^void(BOOL didPerformLogIn, NSString *authMethod, NSError *error) { + if (didPerformLogIn) { + [self->_logger startAuthMethod:authMethod]; + self->_state = FBSDKLoginManagerStatePerformingLogin; + } else if ([error.domain isEqualToString:SFVCCanceledLogin] || + [error.domain isEqualToString:ASCanceledLogin]) { + [self handleImplicitCancelOfLogIn]; + } else { + if (!error) { + error = [NSError errorWithDomain:FBSDKLoginErrorDomain code:FBSDKLoginErrorUnknown userInfo:nil]; + } + [self invokeHandler:nil error:error]; + } + }; + + switch (loginBehavior) { + case FBSDKLoginBehaviorNative: { + if ([FBSDKInternalUtility isFacebookAppInstalled]) { + BOOL useNativeDialog = [serverConfiguration useNativeDialogForDialogName:FBSDKDialogConfigurationNameLogin]; + if (useNativeDialog) { + [self performNativeLogInWithParameters:loginParams handler:^(BOOL openedURL, NSError *openedURLError) { + if (openedURLError) { + [FBSDKLogger singleShotLogEntry:FBSDKLoggingBehaviorDeveloperErrors + formatString:@"FBSDKLoginBehaviorNative failed : %@\nTrying FBSDKLoginBehaviorBrowser", openedURLError]; + } + if (openedURL) { + completion(YES, FBSDKLoginManagerLoggerAuthMethod_Native, openedURLError); + } else { + [self logInWithBehavior:FBSDKLoginBehaviorBrowser]; + } + }]; + } else { + [self logInWithBehavior:FBSDKLoginBehaviorBrowser]; + } + break; + } + // Intentional fall through. Switching to browser login instead. + } + case FBSDKLoginBehaviorBrowser: { + [self performBrowserLogInWithParameters:loginParams handler:^(BOOL openedURL, + NSString *authMethod, + NSError *openedURLError) { + completion(openedURL, authMethod, openedURLError); + }]; + break; + } + case FBSDKLoginBehaviorSystemAccount: { + if (serverConfiguration.isSystemAuthenticationEnabled) { + [self beginSystemLogIn]; + } else { + [self logInWithBehavior:FBSDKLoginBehaviorNative]; + } + completion(YES, FBSDKLoginManagerLoggerAuthMethod_System, nil); + break; + } + case FBSDKLoginBehaviorWeb: + [self performWebLogInWithParameters:loginParams handler:^(BOOL openedURL, NSError *openedURLError) { + completion(openedURL, FBSDKLoginManagerLoggerAuthMethod_Webview, openedURLError); + }]; + break; + } +} + +- (void)storeExpectedChallenge:(NSString *)challengeExpected +{ + [_keychainStore setString:challengeExpected + forKey:FBSDKExpectedChallengeKey + accessibility:[FBSDKDynamicFrameworkLoader loadkSecAttrAccessibleAfterFirstUnlockThisDeviceOnly]]; +} + ++ (NSString *)stringForChallenge { + NSString *challenge = [FBSDKCrypto randomString:FBClientStateChallengeLength]; + + return [challenge stringByReplacingOccurrencesOfString:@"+" withString:@"="]; +} + +- (void)validateReauthentication:(FBSDKAccessToken *)currentToken withResult:(FBSDKLoginManagerLoginResult *)loginResult +{ + FBSDKGraphRequest *requestMe = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me" + parameters:@{@"fields":@""} + tokenString:loginResult.token.tokenString + HTTPMethod:nil + flags:FBSDKGraphRequestFlagDoNotInvalidateTokenOnError | FBSDKGraphRequestFlagDisableErrorRecovery]; + [requestMe startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + NSString *actualID = result[@"id"]; + if ([currentToken.userID isEqualToString:actualID]) { + [FBSDKAccessToken setCurrentAccessToken:loginResult.token]; + [self invokeHandler:loginResult error:nil]; + } else { + NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + [FBSDKInternalUtility dictionary:userInfo setObject:error forKey:NSUnderlyingErrorKey]; + NSError *resultError = [NSError errorWithDomain:FBSDKLoginErrorDomain + code:FBSDKLoginErrorUserMismatch + userInfo:userInfo]; + [self invokeHandler:nil error:resultError]; + } + }]; +} + +#pragma mark - Test Methods + +- (void)setHandler:(FBSDKLoginManagerRequestTokenHandler)handler +{ + _handler = [handler copy]; +} + +- (void)setRequestedPermissions:(NSSet *)requestedPermissions +{ + _requestedPermissions = [requestedPermissions copy]; +} + +@end + +#pragma mark - + +@implementation FBSDKLoginManager (Native) + +- (void)performNativeLogInWithParameters:(NSDictionary *)loginParams handler:(void(^)(BOOL, NSError*))handler +{ + [_logger willAttemptAppSwitchingBehavior]; + loginParams = [_logger parametersWithTimeStampAndClientState:loginParams forAuthMethod:FBSDKLoginManagerLoggerAuthMethod_Native]; + + NSString *scheme = ([FBSDKSettings appURLSchemeSuffix] ? @"fbauth2" : @"fbauth"); + NSMutableDictionary *mutableParams = [NSMutableDictionary dictionaryWithDictionary:loginParams]; + mutableParams[@"legacy_override"] = FBSDK_TARGET_PLATFORM_VERSION; + NSError *error; + NSURL *authURL = [FBSDKInternalUtility URLWithScheme:scheme host:@"authorize" path:@"" queryParameters:mutableParams error:&error]; + + NSDate *start = [NSDate date]; + [[FBSDKApplicationDelegate sharedInstance] openURL:authURL sender:self handler:^(BOOL openedURL, NSError *anError) { + [self->_logger logNativeAppDialogResult:openedURL dialogDuration:-start.timeIntervalSinceNow]; + if (handler) { + handler(openedURL, anError); + } + }]; +} + +// change bool to auth method string. +- (void)performBrowserLogInWithParameters:(NSDictionary *)loginParams + handler:(void(^)(BOOL didOpen, NSString *authMethod, NSError *error))handler +{ + [_logger willAttemptAppSwitchingBehavior]; + + FBSDKServerConfiguration *configuration = [FBSDKServerConfigurationManager cachedServerConfiguration]; + BOOL useSafariViewController = [configuration useSafariViewControllerForDialogName:FBSDKDialogConfigurationNameLogin]; + NSString *authMethod = (useSafariViewController ? FBSDKLoginManagerLoggerAuthMethod_SFVC : FBSDKLoginManagerLoggerAuthMethod_Browser); + + loginParams = [_logger parametersWithTimeStampAndClientState:loginParams forAuthMethod:authMethod]; + + NSURL *authURL = nil; + NSError *error; + NSURL *redirectURL = [FBSDKInternalUtility appURLWithHost:@"authorize" path:nil queryParameters:nil error:&error]; + if (!error) { + NSMutableDictionary *browserParams = [loginParams mutableCopy]; + [FBSDKInternalUtility dictionary:browserParams + setObject:redirectURL + forKey:@"redirect_uri"]; + authURL = [FBSDKInternalUtility facebookURLWithHostPrefix:@"m." + path:FBSDKOauthPath + queryParameters:browserParams + error:&error]; + } + if (authURL) { + void(^handlerWrapper)(BOOL, NSError*) = ^(BOOL didOpen, NSError *anError) { + if (handler) { + handler(didOpen, authMethod, anError); + } + }; + + if (useSafariViewController) { + // Note based on above, authURL must be a http scheme. If that changes, add a guard, otherwise SFVC can throw + self->_usedSFAuthSession = YES; + [[FBSDKApplicationDelegate sharedInstance] openURLWithSafariViewController:authURL + sender:self + fromViewController:self.fromViewController + handler:handlerWrapper]; + } else { + [[FBSDKApplicationDelegate sharedInstance] openURL:authURL sender:self handler:handlerWrapper]; + } + } else { + error = error ?: [NSError fbErrorWithCode:FBSDKLoginErrorUnknown message:@"Failed to construct oauth browser url"]; + if (handler) { + handler(NO, nil, error); + } + } +} + +- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation +{ + BOOL isFacebookURL = [self canOpenURL:url forApplication:application sourceApplication:sourceApplication annotation:annotation]; + + if (!isFacebookURL && [self isPerformingLogin]) { + [self handleImplicitCancelOfLogIn]; + } + + if (isFacebookURL) { + NSDictionary *urlParameters = [FBSDKLoginUtility queryParamsFromLoginURL:url]; + id completer = [[FBSDKLoginURLCompleter alloc] initWithURLParameters:urlParameters appID:[FBSDKSettings appID]]; + + if (_logger == nil) { + _logger = [FBSDKLoginManagerLogger loggerFromParameters:urlParameters]; + } + + // any necessary strong reference is maintained by the FBSDKLoginURLCompleter handler + [completer completeLogIn:self withHandler:^(FBSDKLoginCompletionParameters *parameters) { + [self completeAuthentication:parameters expectChallenge:YES]; + }]; + } + + return isFacebookURL; +} + +- (BOOL)canOpenURL:(NSURL *)url + forApplication:(UIApplication *)application + sourceApplication:(NSString *)sourceApplication + annotation:(id)annotation +{ + // verify the URL is intended as a callback for the SDK's log in + BOOL isFacebookURL = [url.scheme hasPrefix:[NSString stringWithFormat:@"fb%@", [FBSDKSettings appID]]] && + [url.host isEqualToString:@"authorize"]; + + BOOL isExpectedSourceApplication = [sourceApplication hasPrefix:@"com.facebook"] || [sourceApplication hasPrefix:@"com.apple"] || [sourceApplication hasPrefix:@"com.burbn"]; + + return isFacebookURL && isExpectedSourceApplication; +} + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + if ([self isPerformingLogin]) { + [self handleImplicitCancelOfLogIn]; + } +} + +- (BOOL)isAuthenticationURL:(NSURL *)url +{ + return [url.path hasSuffix:FBSDKOauthPath]; +} + +@end + +@implementation FBSDKLoginManager (Accounts) + +- (void)beginSystemLogIn +{ + // First, we need to validate the current access token. The user may have uninstalled the + // app, changed their password, etc., or the access token may have expired, which + // requires us to renew the account before asking for additional permissions. + NSString *accessTokenString = [FBSDKSystemAccountStoreAdapter sharedInstance].accessTokenString; + if (accessTokenString.length > 0) { + FBSDKGraphRequest *meRequest = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me" + parameters:@{ @"fields" : @"id" } + tokenString:accessTokenString + HTTPMethod:nil + flags:FBSDKGraphRequestFlagDoNotInvalidateTokenOnError | FBSDKGraphRequestFlagDisableErrorRecovery]; + [meRequest startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + if (!error) { + // If there was no error, make an explicit renewal call anyway to cover cases where user has revoked some read permission like email. + // Otherwise, iOS system account may continue to think email was granted and never prompt UI again. + [[FBSDKSystemAccountStoreAdapter sharedInstance] renewSystemAuthorization:^(ACAccountCredentialRenewResult renewResult, NSError *renewError) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self performSystemLogIn]; + }); + }]; + } else { + // If there was an error, FBSDKGraphRequestConnection would have already done work already (like renewal calls) + [self performSystemLogIn]; + } + }]; + } else { + [self performSystemLogIn]; + } +} + +- (void)performSystemLogIn +{ + if (![FBSDKSystemAccountStoreAdapter sharedInstance].accountType) { + // There is no Facebook system account type. Fallback to Native behavior + [self fallbackToNativeBehavior]; + return; + } + BOOL isReauthorize = [FBSDKAccessToken currentAccessToken] != nil; + + // app may be asking for nothing, but we will always have a set here + NSMutableSet *permissionsToUse = _requestedPermissions ? [_requestedPermissions mutableCopy] : [NSMutableSet set]; + // Only add basic info if this is not reauthorize case, if it is the app should already have basic info ToSed + if (!isReauthorize) { + // Ensure that basic info is among the permissions requested so that the app will install if necessary. + // "email" is used as a proxy for basic_info permission. + [permissionsToUse addObject:@"email"]; + } + + [permissionsToUse removeObject:@"public_profile"]; + [permissionsToUse removeObject:@"user_friends"]; + + NSString *audience; + switch (self.defaultAudience) { + case FBSDKDefaultAudienceOnlyMe: + audience = fbsdkdfl_ACFacebookAudienceOnlyMe(); + break; + case FBSDKDefaultAudienceFriends: + audience = fbsdkdfl_ACFacebookAudienceFriends(); + break; + case FBSDKDefaultAudienceEveryone: + audience = fbsdkdfl_ACFacebookAudienceEveryone(); + break; + default: + audience = nil; + } + + uint64_t timePriorToSystemAuthUI = [FBSDKInternalUtility currentTimeInMilliseconds]; + + // the FBSDKSystemAccountStoreAdapter completion handler maintains the strong reference during the the asynchronous operation + [[FBSDKSystemAccountStoreAdapter sharedInstance] + requestAccessToFacebookAccountStore:permissionsToUse + defaultAudience:audience + isReauthorize:isReauthorize + appID:[FBSDKSettings appID] + handler:^(NSString *oauthToken, NSError *accountStoreError) { + + // There doesn't appear to be a reliable way to determine whether UI was shown or + // whether the cached token was sufficient. So we use a timer heuristic assuming that + // human response time couldn't complete a dialog in under the interval given here, but + // the process will return here fast enough if the token is cached. The threshold was + // chosen empirically, so there may be some edge cases that are false negatives or + // false positives. + BOOL didShowDialog = [FBSDKInternalUtility currentTimeInMilliseconds] - timePriorToSystemAuthUI > 350; + BOOL isUnTOSedDevice = !oauthToken && accountStoreError.code == ACErrorAccountNotFound; + [self->_logger systemAuthDidShowDialog:didShowDialog isUnTOSedDevice:isUnTOSedDevice]; + + if (accountStoreError && [FBSDKSystemAccountStoreAdapter sharedInstance].forceBlockingRenew) { + accountStoreError = [NSError fbErrorForSystemPasswordChange:accountStoreError]; + } + if (!oauthToken && !accountStoreError) { + // This means iOS did not give an error nor granted, even after a renew. In order to + // surface this to users, stuff in our own error that can be inspected. + accountStoreError = [NSError fbErrorForFailedLoginWithCode:FBSDKLoginErrorSystemAccountAppDisabled]; + } + + FBSDKLoginManagerSystemAccountState *state = [[FBSDKLoginManagerSystemAccountState alloc] init]; + state.didShowDialog = didShowDialog; + state.reauthorize = isReauthorize; + state.unTOSedDevice = isUnTOSedDevice; + + [self continueSystemLogInWithTokenString:oauthToken error:accountStoreError state:state]; + }]; +} + +- (void)continueSystemLogInWithTokenString:(NSString *)oauthToken error:(NSError *)accountStoreError state:(FBSDKLoginManagerSystemAccountState *)state +{ + id completer = nil; + + if (!oauthToken && accountStoreError.code == ACErrorAccountNotFound) { + // Even with the Accounts framework we use the Facebook app or Safari to log in if + // the user has not signed in. This condition can only be detected by attempting to + // log in because the framework does not otherwise indicate whether a Facebook account + // exists on the device unless the user has granted the app permissions. + + // Do this asynchronously so the logger correctly notes the system account was skipped + dispatch_async(dispatch_get_main_queue(), ^{ + [self fallbackToNativeBehavior]; + }); + } else if (oauthToken) { + completer = [[FBSDKLoginSystemAccountCompleter alloc] initWithTokenString:oauthToken appID:[FBSDKSettings appID]]; + } else { + completer = [[FBSDKLoginSystemAccountErrorCompleter alloc] initWithError:accountStoreError permissions:_requestedPermissions]; + } + + // any necessary strong reference is maintained by the FBSDKLoginSystemAccount[Error]Completer handler + [completer completeLogIn:self withHandler:^(FBSDKLoginCompletionParameters *parameters) { + NSString *eventName = [NSString stringWithFormat:@"%@ %@", + (state.isReauthorize ? @"Reauthorization" : @"Authorization"), + (parameters.error ? @"Error" : (parameters.accessTokenString ? @"succeeded" : @"cancelled")) + ]; + + [self completeAuthentication:parameters expectChallenge:NO]; + + if (eventName != nil) { + NSString *sortedPermissions = (parameters.permissions.count == 0) + ? @"" + : [[parameters.permissions.allObjects sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)] componentsJoinedByString:@","]; + + [FBSDKAppEvents logImplicitEvent:FBSDKAppEventNamePermissionsUILaunch + valueToSum:nil + parameters:@{ @"ui_dialog_type" : @"iOS integrated auth", + @"permissions_requested" : sortedPermissions } + accessToken:nil]; + + [FBSDKAppEvents logImplicitEvent:FBSDKAppEventNamePermissionsUIDismiss + valueToSum:nil + parameters:@{ @"ui_dialog_type" : @"iOS integrated auth", + FBSDKAppEventParameterDialogOutcome : eventName, + @"permissions_requested" : sortedPermissions } + accessToken:nil]; + } + }]; +} + +- (void)fallbackToNativeBehavior +{ + FBSDKLoginManagerLoginResult *skippedResult = [[FBSDKLoginManagerLoginResult alloc] initWithToken:nil + isCancelled:NO + grantedPermissions:nil + declinedPermissions:nil]; + skippedResult.isSkipped = YES; + [_logger endLoginWithResult:skippedResult error:nil]; + // any necessary strong reference will be maintained by the mechanism that is used + [self logInWithBehavior:FBSDKLoginBehaviorNative]; +} + +@end + +@implementation FBSDKLoginManager (WebDialog) + +- (void)performWebLogInWithParameters:(NSDictionary *)loginParams handler:(void(^)(BOOL, NSError*))handler +{ + [FBSDKInternalUtility registerTransientObject:self]; + [FBSDKInternalUtility deleteFacebookCookies]; + NSMutableDictionary *parameters = [[NSMutableDictionary alloc] initWithDictionary:loginParams]; + parameters[@"title"] = NSLocalizedStringWithDefaultValue(@"LoginWeb.LogInTitle", + @"FacebookSDK", + [FBSDKInternalUtility bundleForStrings], + @"Log In", + @"Title of the web dialog that prompts the user to log in to Facebook."); + [FBSDKWebDialog showWithName:@"oauth" parameters:parameters delegate:self]; + + if (handler) { + handler(YES, nil); + } +} + +- (void)webDialog:(FBSDKWebDialog *)webDialog didCompleteWithResults:(NSDictionary *)results +{ + NSString *token = results[@"access_token"]; + + if (token.length == 0) { + [self webDialogDidCancel:webDialog]; + } else { + id completer = [[FBSDKLoginURLCompleter alloc] initWithURLParameters:results appID:[FBSDKSettings appID]]; + [completer completeLogIn:self withHandler:^(FBSDKLoginCompletionParameters *parameters) { + [self completeAuthentication:parameters expectChallenge:YES]; + }]; + [FBSDKInternalUtility unregisterTransientObject:self]; + } +} + +- (void)webDialog:(FBSDKWebDialog *)webDialog didFailWithError:(NSError *)error +{ + FBSDKLoginCompletionParameters *parameters = [[FBSDKLoginCompletionParameters alloc] initWithError:error]; + [self completeAuthentication:parameters expectChallenge:YES]; + [FBSDKInternalUtility unregisterTransientObject:self]; +} + +- (void)webDialogDidCancel:(FBSDKWebDialog *)webDialog +{ + FBSDKLoginCompletionParameters *parameters = [[FBSDKLoginCompletionParameters alloc] init]; + [self completeAuthentication:parameters expectChallenge:YES]; + [FBSDKInternalUtility unregisterTransientObject:self]; +} + +@end + +@implementation FBSDKLoginManagerSystemAccountState +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManagerLoginResult.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManagerLoginResult.h new file mode 100644 index 0000000..6601011 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManagerLoginResult.h @@ -0,0 +1,67 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@class FBSDKAccessToken; + +/** + Describes the result of a login attempt. + */ +@interface FBSDKLoginManagerLoginResult : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +/** + the access token. + */ +@property (copy, nonatomic) FBSDKAccessToken *token; + +/** + whether the login was cancelled by the user. + */ +@property (readonly, nonatomic) BOOL isCancelled; + +/** + the set of permissions granted by the user in the associated request. + + inspect the token's permissions set for a complete list. + */ +@property (copy, nonatomic) NSSet *grantedPermissions; + +/** + the set of permissions declined by the user in the associated request. + + inspect the token's permissions set for a complete list. + */ +@property (copy, nonatomic) NSSet *declinedPermissions; + +/** + Initializes a new instance. + @param token the access token + @param isCancelled whether the login was cancelled by the user + @param grantedPermissions the set of granted permissions + @param declinedPermissions the set of declined permissions + */ +- (instancetype)initWithToken:(FBSDKAccessToken *)token + isCancelled:(BOOL)isCancelled + grantedPermissions:(NSSet *)grantedPermissions + declinedPermissions:(NSSet *)declinedPermissions +NS_DESIGNATED_INITIALIZER; +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManagerLoginResult.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManagerLoginResult.m new file mode 100644 index 0000000..ce3969b --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManagerLoginResult.m @@ -0,0 +1,51 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLoginManagerLoginResult+Internal.h" + +#import "FBSDKCoreKit+Internal.h" + +@implementation FBSDKLoginManagerLoginResult { + NSMutableDictionary *_mutableLoggingExtras; +} + +- (instancetype)initWithToken:(FBSDKAccessToken *)token + isCancelled:(BOOL)isCancelled + grantedPermissions:(NSSet *)grantedPermissions + declinedPermissions:(NSSet *)declinedPermissions { + if ((self = [super init])) { + _mutableLoggingExtras = [NSMutableDictionary dictionary]; + _token = [token copy]; + _isCancelled = isCancelled; + _grantedPermissions = [grantedPermissions copy]; + _declinedPermissions = [declinedPermissions copy]; + }; + return self; +} + +- (void)addLoggingExtra:(id)object forKey:(id)key +{ + [FBSDKInternalUtility dictionary:_mutableLoggingExtras setObject:object forKey:key]; +} + +- (NSDictionary *)loggingExtras +{ + return [_mutableLoggingExtras copy]; +} + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginTooltipView.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginTooltipView.h new file mode 100644 index 0000000..1792197 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginTooltipView.h @@ -0,0 +1,90 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +@protocol FBSDKLoginTooltipViewDelegate; + +/** + + Represents a tooltip to be displayed next to a Facebook login button + to highlight features for new users. + + + The `FBSDKLoginButton` may display this view automatically. If you do + not use the `FBSDKLoginButton`, you can manually call one of the `present*` methods + as appropriate and customize behavior via `FBSDKLoginTooltipViewDelegate` delegate. + + By default, the `FBSDKLoginTooltipView` is not added to the superview until it is + determined the app has migrated to the new login experience. You can override this + (e.g., to test the UI layout) by implementing the delegate or setting `forceDisplay` to YES. + + */ +@interface FBSDKLoginTooltipView : FBSDKTooltipView + +/** the delegate */ +@property (nonatomic, weak) id delegate; + +/** if set to YES, the view will always be displayed and the delegate's + `loginTooltipView:shouldAppear:` will NOT be called. */ +@property (nonatomic, assign) BOOL forceDisplay; + +@end + +/** + @protocol + + The `FBSDKLoginTooltipViewDelegate` protocol defines the methods used to receive event + notifications from `FBSDKLoginTooltipView` objects. + */ +@protocol FBSDKLoginTooltipViewDelegate + +@optional + +/** + Asks the delegate if the tooltip view should appear + + @param view The tooltip view. + @param appIsEligible The value fetched from the server identifying if the app + is eligible for the new login experience. + + + Use this method to customize display behavior. + */ +- (BOOL)loginTooltipView:(FBSDKLoginTooltipView *)view shouldAppear:(BOOL)appIsEligible; + +/** + Tells the delegate the tooltip view will appear, specifically after it's been + added to the super view but before the fade in animation. + + @param view The tooltip view. + */ +- (void)loginTooltipViewWillAppear:(FBSDKLoginTooltipView *)view; + +/** + Tells the delegate the tooltip view will not appear (i.e., was not + added to the super view). + + @param view The tooltip view. + */ +- (void)loginTooltipViewWillNotAppear:(FBSDKLoginTooltipView *)view; + + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginTooltipView.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginTooltipView.m new file mode 100644 index 0000000..e1a17d4 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginTooltipView.m @@ -0,0 +1,62 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLoginTooltipView.h" + +#import "FBSDKCoreKit+Internal.h" + +@interface FBSDKLoginTooltipView () +@end + +@implementation FBSDKLoginTooltipView + +- (instancetype)init +{ + NSString *tooltipMessage = + NSLocalizedStringWithDefaultValue(@"LoginTooltip.Message", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"You're in control - choose what info you want to share with apps.", + @"The message of the FBSDKLoginTooltipView"); + return [super initWithTagline:nil message:tooltipMessage colorStyle:FBSDKTooltipColorStyleFriendlyBlue]; +} + +- (void)presentInView:(UIView *)view withArrowPosition:(CGPoint)arrowPosition direction:(FBSDKTooltipViewArrowDirection)arrowDirection +{ + if (self.forceDisplay) { + [super presentInView:view withArrowPosition:arrowPosition direction:arrowDirection]; + } else { + + [FBSDKServerConfigurationManager loadServerConfigurationWithCompletionBlock:^(FBSDKServerConfiguration *serverConfiguration, NSError *error) { + self.message = serverConfiguration.loginTooltipText; + BOOL shouldDisplay = serverConfiguration.loginTooltipEnabled; + if ([self.delegate respondsToSelector:@selector(loginTooltipView:shouldAppear:)]) { + shouldDisplay = [self.delegate loginTooltipView:self shouldAppear:shouldDisplay]; + } + if (shouldDisplay) { + [super presentInView:view withArrowPosition:arrowPosition direction:arrowDirection]; + if ([self.delegate respondsToSelector:@selector(loginTooltipViewWillAppear:)]) { + [self.delegate loginTooltipViewWillAppear:self]; + } + } else { + if ([self.delegate respondsToSelector:@selector(loginTooltipViewWillNotAppear:)]) { + [self.delegate loginTooltipViewWillNotAppear:self]; + } + } + }]; + } +} +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKTooltipView.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKTooltipView.h new file mode 100644 index 0000000..d77392c --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKTooltipView.h @@ -0,0 +1,136 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +/** + FBSDKTooltipViewArrowDirection enum + + Passed on construction to determine arrow orientation. + */ +typedef NS_ENUM(NSUInteger, FBSDKTooltipViewArrowDirection) +{ + /** View is located above given point, arrow is pointing down. */ + FBSDKTooltipViewArrowDirectionDown = 0, + /** View is located below given point, arrow is pointing up. */ + FBSDKTooltipViewArrowDirectionUp = 1, +}; + +/** + FBSDKTooltipColorStyle enum + + Passed on construction to determine color styling. + */ +typedef NS_ENUM(NSUInteger, FBSDKTooltipColorStyle) +{ + /** Light blue background, white text, faded blue close button. */ + FBSDKTooltipColorStyleFriendlyBlue = 0, + /** Dark gray background, white text, light gray close button. */ + FBSDKTooltipColorStyleNeutralGray = 1, +}; + +/** + + Tooltip bubble with text in it used to display tips for UI elements, + with a pointed arrow (to refer to the UI element). + + + + The tooltip fades in and will automatically fade out. See `displayDuration`. + */ +@interface FBSDKTooltipView : UIView + +/** + Gets or sets the amount of time in seconds the tooltip should be displayed. + Set this to zero to make the display permanent until explicitly dismissed. + Defaults to six seconds. + */ +@property (nonatomic, assign) CFTimeInterval displayDuration; + +/** + Gets or sets the color style after initialization. + Defaults to value passed to -initWithTagline:message:colorStyle:. + */ +@property (nonatomic, assign) FBSDKTooltipColorStyle colorStyle; + +/** + Gets or sets the message. + */ +@property (nonatomic, copy) NSString *message; + +/** + Gets or sets the optional phrase that comprises the first part of the label (and is highlighted differently). + */ +@property (nonatomic, copy) NSString *tagline; + +/** + Designated initializer. + + @param tagline First part of the label, that will be highlighted with different color. Can be nil. + + @param message Main message to display. + + @param colorStyle Color style to use for tooltip. + + + + If you need to show a tooltip for login, consider using the `FBSDKLoginTooltipView` view. + + + @see FBSDKLoginTooltipView + */ +- (instancetype)initWithTagline:(NSString *)tagline message:(NSString *)message colorStyle:(FBSDKTooltipColorStyle)colorStyle; + +/** + Show tooltip at the top or at the bottom of given view. + Tooltip will be added to anchorView.window.rootViewController.view + + @param anchorView view to show at, must be already added to window view hierarchy, in order to decide + where tooltip will be shown. (If there's not enough space at the top of the anchorView in window bounds - + tooltip will be shown at the bottom of it) + + + + Use this method to present the tooltip with automatic positioning or + use -presentInView:withArrowPosition:direction: for manual positioning + If anchorView is nil or has no window - this method does nothing. + */ +- (void)presentFromView:(UIView *)anchorView; + +/** + Adds tooltip to given view, with given position and arrow direction. + + @param view View to be used as superview. + + @param arrowPosition Point in view's cordinates, where arrow will be pointing + + @param arrowDirection whenever arrow should be pointing up (message bubble is below the arrow) or + down (message bubble is above the arrow). + */ +- (void)presentInView:(UIView *)view withArrowPosition:(CGPoint)arrowPosition direction:(FBSDKTooltipViewArrowDirection)arrowDirection; + +/** + Remove tooltip manually. + + + + Calling this method isn't necessary - tooltip will dismiss itself automatically after the `displayDuration`. + */ +- (void)dismiss; + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKTooltipView.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKTooltipView.m new file mode 100644 index 0000000..22f8f89 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKTooltipView.m @@ -0,0 +1,603 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKTooltipView.h" + +#import + +#import "FBSDKCoreKit+Internal.h" + +static const CGFloat kTransitionDuration = 0.3; +static const CGFloat kZoomOutScale = 0.001f; +static const CGFloat kZoomInScale = 1.1f; +static const CGFloat kZoomBounceScale = 0.98f; + +static const CGFloat kNUXRectInset = 6; +static const CGFloat kNUXBubbleMargin = 17 - kNUXRectInset; +static const CGFloat kNUXPointMargin = -3; +static const CGFloat kNUXCornerRadius = 4; +static const CGFloat kNUXStrokeLineWidth = 0.5f; +static const CGFloat kNUXSideCap = 6; +static const CGFloat kNUXFontSize = 10; +static const CGFloat kNUXCrossGlyphSize = 11; + +static CGMutablePathRef _fbsdkCreateUpPointingBubbleWithRect(CGRect rect, CGFloat arrowMidpoint, CGFloat arrowHeight, CGFloat radius); +static CGMutablePathRef _fbsdkCreateDownPointingBubbleWithRect(CGRect rect, CGFloat arrowMidpoint, CGFloat arrowHeight, CGFloat radius); + +#pragma mark - + +@implementation FBSDKTooltipView +{ + CGPoint _positionInView; + CFAbsoluteTime _displayTime; + CFTimeInterval _minimumDisplayDuration; + UILabel *_textLabel; + UITapGestureRecognizer *_insideTapGestureRecognizer; + CGFloat _leftWidth; + CGFloat _rightWidth; + CGFloat _arrowMidpoint; + BOOL _pointingUp; + BOOL _isFadingOut; + // style + UIColor *_innerStrokeColor; + CGFloat _arrowHeight; + CGFloat _textPadding; + CGFloat _maximumTextWidth; + CGFloat _verticalTextOffset; + CGFloat _verticalCrossOffset; + FBSDKTooltipColorStyle _colorStyle; + NSArray *_gradientColors; + UIColor *_crossCloseGlyphColor; +} + +- (instancetype)initWithTagline:(NSString *)tagline message:(NSString *)message colorStyle:(FBSDKTooltipColorStyle)colorStyle +{ + self = [super initWithFrame:CGRectZero]; + if (self) { + // Define style + _textLabel = [[UILabel alloc] initWithFrame:CGRectZero]; + _textLabel.backgroundColor = [UIColor clearColor]; + _textLabel.autoresizingMask = UIViewAutoresizingFlexibleRightMargin; + _textLabel.numberOfLines = 0; + _textLabel.font = [UIFont boldSystemFontOfSize: kNUXFontSize]; + _textLabel.textAlignment = NSTextAlignmentLeft; + _arrowHeight = 7; + _textPadding = 10; + _maximumTextWidth = 185; + _verticalCrossOffset = - 2.5f; + _verticalTextOffset = 0; + _displayDuration = 6.0; + self.colorStyle = colorStyle; + + _message = [message copy]; + _tagline = [tagline copy]; + [self setMessage:message tagline:tagline]; + [self addSubview:_textLabel]; + + _insideTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTapInTooltip:)]; + [self addGestureRecognizer:_insideTapGestureRecognizer]; + + self.opaque = NO; + self.backgroundColor = [UIColor clearColor]; + self.layer.needsDisplayOnBoundsChange = YES; + self.layer.shadowColor = [UIColor blackColor].CGColor; + self.layer.shadowOpacity = 0.5f; + self.layer.shadowOffset = CGSizeMake(0.0f, 2.0f); + self.layer.shadowRadius = 5.0f; + self.layer.masksToBounds = NO; + } + return self; +} + +- (void)dealloc +{ + [_insideTapGestureRecognizer removeTarget:self action:NULL]; +} + +#pragma mark - Public Methods + +- (void)setMessage:(NSString *)message +{ + if (![message isEqualToString:_message]) { + _message = [message copy]; + [self setMessage:_message tagline:self.tagline]; + } +} + +- (void)setTagline:(NSString *)tagline +{ + if (![tagline isEqualToString:_tagline]) { + _tagline = [tagline copy]; + [self setMessage:self.message tagline:_tagline]; + } +} + +#pragma mark Presentation + +- (void)presentFromView:(UIView *)anchorView +{ + UIView *superview = anchorView.window.rootViewController.view; + if (!superview) { + return; + } + + // By default - attach to the top, pointing down + CGPoint position = CGPointMake(CGRectGetMidX(anchorView.bounds), CGRectGetMinY(anchorView.bounds)); + CGPoint positionInSuperview = [superview convertPoint:position fromView:anchorView]; + FBSDKTooltipViewArrowDirection direction = FBSDKTooltipViewArrowDirectionDown; + + // If not enough space to point up from top of anchor view - point up to it's bottom + CGFloat bubbleHeight = CGRectGetHeight(_textLabel.bounds) + _verticalTextOffset + _textPadding * 2; + if (positionInSuperview.y - bubbleHeight - kNUXBubbleMargin < CGRectGetMinY(superview.bounds)) { + direction = FBSDKTooltipViewArrowDirectionUp; + position = CGPointMake(CGRectGetMidX(anchorView.bounds), CGRectGetMaxY(anchorView.bounds)); + positionInSuperview = [superview convertPoint:position fromView:anchorView]; + } + + [self presentInView:superview withArrowPosition:positionInSuperview direction:direction]; +} + +- (void)presentInView:(UIView *)view withArrowPosition:(CGPoint)arrowPosition direction:(FBSDKTooltipViewArrowDirection)arrowDirection +{ + _pointingUp = arrowDirection == FBSDKTooltipViewArrowDirectionUp; + _positionInView = arrowPosition; + self.frame = [self layoutSubviewsAndDetermineFrame]; + + // Add to view, while invisible. + self.hidden = YES; + if (self.superview) { + [self removeFromSuperview]; + } + [view addSubview:self]; + + // Layout & schedule dismissal. + _displayTime = CFAbsoluteTimeGetCurrent(); + _isFadingOut = NO; + [self scheduleAutomaticFadeout]; + [self layoutSubviews]; + + [self animateFadeIn]; +} + +- (void)dismiss +{ + if (_isFadingOut) { + return; + } + _isFadingOut = YES; + + [self animateFadeOutWithCompletion:^{ + [self removeFromSuperview]; + [self cancelAllScheduledFadeOutMethods]; + self->_isFadingOut = NO; + }]; +} + +#pragma mark Style + +- (FBSDKTooltipColorStyle)colorStyle +{ + return _colorStyle; +} + +- (void)setColorStyle:(FBSDKTooltipColorStyle)colorStyle +{ + _colorStyle = colorStyle; + switch (colorStyle) { + case FBSDKTooltipColorStyleNeutralGray: + _gradientColors = @[ + (id)(FBSDKUIColorWithRGB(0x51, 0x50, 0x4f).CGColor), + (id)(FBSDKUIColorWithRGB(0x2d, 0x2c, 0x2c).CGColor) + ]; + _innerStrokeColor = [UIColor colorWithWhite:0.13f alpha:1.0f]; + _crossCloseGlyphColor = [UIColor colorWithWhite:0.69f alpha:1.0f]; + break; + + case FBSDKTooltipColorStyleFriendlyBlue: + default: + _gradientColors = @[ + (id)(FBSDKUIColorWithRGB(0x6e, 0x9c, 0xf5).CGColor), + (id)(FBSDKUIColorWithRGB(0x49, 0x74, 0xc6).CGColor) + ]; + _innerStrokeColor = [UIColor colorWithRed:0.12f green:0.26f blue:0.55f alpha:1.0f]; + _crossCloseGlyphColor = [UIColor colorWithRed:0.60f green:0.73f blue:1.0f alpha:1.0f]; + break; + } + + _textLabel.textColor = [UIColor whiteColor]; +} + +#pragma mark - Private Methods +#pragma mark Animation + +- (void)animateFadeIn +{ + // Prepare Animation: Zoom in with bounce. Keep the arrow point in place. + // Set initial transform (zoomed out) & become visible. + CGFloat centerPos = self.bounds.size.width / 2.0; + CGFloat zoomOffsetX = (centerPos - _arrowMidpoint) * (kZoomOutScale - 1.0f); + CGFloat zoomOffsetY = -0.5f * self.bounds.size.height * (kZoomOutScale - 1.0f); + if (_pointingUp) { + zoomOffsetY = -zoomOffsetY; + } + self.layer.transform = fbsdkdfl_CATransform3DConcat(fbsdkdfl_CATransform3DMakeScale(kZoomOutScale, kZoomOutScale, kZoomOutScale), + fbsdkdfl_CATransform3DMakeTranslation(zoomOffsetX, zoomOffsetY, 0)); + self.hidden = NO; + + // Prepare animation steps + // 1st Step. + void (^zoomIn)(void) = ^{ + self.alpha = 1.0; + + CGFloat newZoomOffsetX = (centerPos - self->_arrowMidpoint) * (kZoomInScale - 1.0f); + CGFloat newZoomOffsetY = -0.5f * self.bounds.size.height * (kZoomInScale - 1.0f); + if (self->_pointingUp) { + newZoomOffsetY = -newZoomOffsetY; + } + + CATransform3D scale = fbsdkdfl_CATransform3DMakeScale(kZoomInScale, kZoomInScale, kZoomInScale); + CATransform3D translate =fbsdkdfl_CATransform3DMakeTranslation(newZoomOffsetX, newZoomOffsetY, 0); + self.layer.transform = fbsdkdfl_CATransform3DConcat(scale, translate); + }; + + // 2nd Step. + void (^bounceZoom)(void) = ^{ + CGFloat centerPos2 = self.bounds.size.width / 2.0; + CGFloat zoomOffsetX2 = (centerPos2 - self->_arrowMidpoint) * (kZoomBounceScale - 1.0f); + CGFloat zoomOffsetY2 = -0.5f * self.bounds.size.height * (kZoomBounceScale - 1.0f); + if (self->_pointingUp) { + zoomOffsetY2 = -zoomOffsetY2; + } + self.layer.transform = fbsdkdfl_CATransform3DConcat(fbsdkdfl_CATransform3DMakeScale(kZoomBounceScale, kZoomBounceScale, kZoomBounceScale), + fbsdkdfl_CATransform3DMakeTranslation(zoomOffsetX2, zoomOffsetY2, 0)); + }; + + // 3rd Step. + void (^normalizeZoom)(void) = ^{ + self.layer.transform = fbsdkdfl_CATransform3DIdentity; + }; + + // Animate 3 steps sequentially + [UIView animateWithDuration:kTransitionDuration/1.5 + delay:0 + options:UIViewAnimationOptionCurveEaseInOut + animations:zoomIn + completion:^(BOOL finished) { + [UIView animateWithDuration:kTransitionDuration/2.2 + animations:bounceZoom + completion:^(BOOL innerFinished) { + [UIView animateWithDuration:kTransitionDuration/5 + animations:normalizeZoom]; + }]; + }]; +} + +- (void) animateFadeOutWithCompletion: (void(^)(void)) completionHandler +{ + [UIView animateWithDuration:0.3 + delay:0 + options:UIViewAnimationOptionCurveEaseInOut + animations:^{ + self.alpha = 0.0; + } + completion:^(BOOL complete) { + if(completionHandler) + completionHandler(); + }]; +} + +#pragma mark Gestures + +- (void)onTapInTooltip:(UIGestureRecognizer*)sender +{ + // ignore incomplete tap gestures + if (sender.state != UIGestureRecognizerStateEnded) { + return; + } + + // fade out the tooltip view right away + [self dismiss]; +} + +#pragma mark Drawing + +CGMutablePathRef _fbsdkCreateUpPointingBubbleWithRect(CGRect rect, CGFloat arrowMidpoint, CGFloat arrowHeight, CGFloat radius) +{ + CGMutablePathRef path = CGPathCreateMutable(); + CGFloat arrowHalfWidth = arrowHeight; + // start with arrow + CGPathMoveToPoint(path, NULL, arrowMidpoint - arrowHalfWidth, CGRectGetMinY(rect)); + CGPathAddLineToPoint(path, NULL, arrowMidpoint, CGRectGetMinY(rect) - arrowHeight); + CGPathAddLineToPoint(path, NULL, arrowMidpoint + arrowHalfWidth, CGRectGetMinY(rect)); + + // rest of curved rectangle + CGPathAddArcToPoint(path, NULL, CGRectGetMaxX(rect), CGRectGetMinY(rect), CGRectGetMaxX(rect), CGRectGetMaxY(rect), radius); + CGPathAddArcToPoint(path, NULL, CGRectGetMaxX(rect), CGRectGetMaxY(rect), CGRectGetMinX(rect), CGRectGetMaxY(rect), radius); + CGPathAddArcToPoint(path, NULL, CGRectGetMinX(rect), CGRectGetMaxY(rect), CGRectGetMinX(rect), CGRectGetMinY(rect), radius); + CGPathAddArcToPoint(path, NULL, CGRectGetMinX(rect), CGRectGetMinY(rect), CGRectGetMaxX(rect), CGRectGetMinY(rect), radius); + CGPathCloseSubpath(path); + return path; +} + +CGMutablePathRef _fbsdkCreateDownPointingBubbleWithRect(CGRect rect, CGFloat arrowMidpoint, CGFloat arrowHeight, CGFloat radius) +{ + CGMutablePathRef path = CGPathCreateMutable(); + CGFloat arrowHalfWidth = arrowHeight; + + // start with arrow + CGPathMoveToPoint(path, NULL, arrowMidpoint + arrowHalfWidth, CGRectGetMaxY(rect)); + CGPathAddLineToPoint(path, NULL, arrowMidpoint, CGRectGetMaxY(rect) + arrowHeight); + CGPathAddLineToPoint(path, NULL, arrowMidpoint - arrowHalfWidth, CGRectGetMaxY(rect)); + + // rest of curved rectangle + CGPathAddArcToPoint(path, NULL, CGRectGetMinX(rect), CGRectGetMaxY(rect), CGRectGetMinX(rect), CGRectGetMinY(rect), radius); + CGPathAddArcToPoint(path, NULL, CGRectGetMinX(rect), CGRectGetMinY(rect), CGRectGetMaxX(rect), CGRectGetMinY(rect), radius); + CGPathAddArcToPoint(path, NULL, CGRectGetMaxX(rect), CGRectGetMinY(rect), CGRectGetMaxX(rect), CGRectGetMaxY(rect), radius); + CGPathAddArcToPoint(path, NULL, CGRectGetMaxX(rect), CGRectGetMaxY(rect), CGRectGetMinX(rect), CGRectGetMaxY(rect), radius); + CGPathCloseSubpath(path); + return path; +} + +static CGMutablePathRef _createCloseCrossGlyphWithRect(CGRect rect) +{ + CGFloat lineThickness = 0.20f * CGRectGetHeight(rect); + + // One rectangle + CGMutablePathRef path1 = CGPathCreateMutable(); + CGPathMoveToPoint(path1, NULL, CGRectGetMinX(rect), CGRectGetMinY(rect) + lineThickness); + CGPathAddLineToPoint(path1, NULL, CGRectGetMinX(rect) + lineThickness, CGRectGetMinY(rect)); + CGPathAddLineToPoint(path1, NULL, CGRectGetMaxX(rect), CGRectGetMaxY(rect) - lineThickness); + CGPathAddLineToPoint(path1, NULL, CGRectGetMaxX(rect) - lineThickness, CGRectGetMaxY(rect)); + CGPathCloseSubpath(path1); + + // 2nd rectangle - mirrored horizontally + CGMutablePathRef path2 = CGPathCreateMutable(); + CGPathMoveToPoint(path2, NULL, CGRectGetMinX(rect), CGRectGetMaxY(rect) - lineThickness); + CGPathAddLineToPoint(path2, NULL, CGRectGetMaxX(rect) - lineThickness, CGRectGetMinY(rect)); + CGPathAddLineToPoint(path2, NULL, CGRectGetMaxX(rect), CGRectGetMinY(rect) + lineThickness); + CGPathAddLineToPoint(path2, NULL, CGRectGetMinX(rect) + lineThickness, CGRectGetMaxY(rect)); + CGPathCloseSubpath(path2); + + CGMutablePathRef groupedPath = CGPathCreateMutable(); + CGPathAddPath(groupedPath, NULL, path1); + CGPathAddPath(groupedPath, NULL, path2); + CFRelease(path1); + CFRelease(path2); + + return groupedPath; +} + +- (void)drawRect:(CGRect)rect +{ + // Ignore dirty rect and just redraw the entire nux bubble + CGFloat arrowSideMargin = 1 + 0.5f * MAX(kNUXRectInset, _arrowHeight); + CGFloat arrowYMarginOffset = _pointingUp ? arrowSideMargin : kNUXRectInset; + CGFloat halfStroke = kNUXStrokeLineWidth / 2.0; + CGRect outerRect = CGRectMake(kNUXRectInset + halfStroke, + arrowYMarginOffset + halfStroke, + self.bounds.size.width - 2 * kNUXRectInset - kNUXStrokeLineWidth, + self.bounds.size.height - kNUXRectInset - arrowSideMargin - kNUXStrokeLineWidth); + outerRect = CGRectInset(outerRect, 5, 5); + CGRect innerRect = CGRectInset(outerRect, kNUXStrokeLineWidth, kNUXStrokeLineWidth); + CGRect fillRect = CGRectInset(innerRect, kNUXStrokeLineWidth/2.0, kNUXStrokeLineWidth/2.0); + CGFloat closeCrossGlyphPositionY = MIN(CGRectGetMinY(fillRect) + _textPadding + _verticalCrossOffset, + CGRectGetMidY(fillRect) - 0.5f * kNUXCrossGlyphSize); + CGRect closeCrossGlyphRect = CGRectMake(CGRectGetMaxX(fillRect) - 2 * kNUXFontSize, closeCrossGlyphPositionY, + kNUXCrossGlyphSize, kNUXCrossGlyphSize); + + // setup and get paths + CGContextRef context = UIGraphicsGetCurrentContext(); + CGMutablePathRef outerPath; + CGMutablePathRef innerPath; + CGMutablePathRef fillPath; + CGMutablePathRef crossCloseGlyphPath = _createCloseCrossGlyphWithRect(closeCrossGlyphRect); + CGRect gradientRect = fillRect; + if (_pointingUp) { + outerPath = _fbsdkCreateUpPointingBubbleWithRect(outerRect, + _arrowMidpoint, _arrowHeight, + kNUXCornerRadius + kNUXStrokeLineWidth); + innerPath = _fbsdkCreateUpPointingBubbleWithRect(innerRect, + _arrowMidpoint, _arrowHeight, + kNUXCornerRadius); + fillPath = _fbsdkCreateUpPointingBubbleWithRect(fillRect, + _arrowMidpoint, _arrowHeight, + kNUXCornerRadius - kNUXStrokeLineWidth); + gradientRect.origin.y -= _arrowHeight; + gradientRect.size.height += _arrowHeight; + } else { + outerPath = _fbsdkCreateDownPointingBubbleWithRect(outerRect, + _arrowMidpoint, _arrowHeight, + kNUXCornerRadius + kNUXStrokeLineWidth); + innerPath = _fbsdkCreateDownPointingBubbleWithRect(innerRect, + _arrowMidpoint, _arrowHeight, + kNUXCornerRadius); + fillPath = _fbsdkCreateDownPointingBubbleWithRect(fillRect, + _arrowMidpoint, _arrowHeight, + kNUXCornerRadius - kNUXStrokeLineWidth); + gradientRect.size.height += _arrowHeight; + } + self.layer.shadowPath = outerPath; + + // This tooltip has two borders, so draw two strokes and a fill. + CGColorRef strokeColor = _innerStrokeColor.CGColor; + CGContextSaveGState(context); + CGContextSetStrokeColorWithColor(context, strokeColor); + CGContextSetLineWidth(context, kNUXStrokeLineWidth); + CGContextAddPath(context, innerPath); + CGContextStrokePath(context); + CGContextAddPath(context, fillPath); + CGContextClip(context); + CGColorSpaceRef rgbColorspace = CGColorSpaceCreateDeviceRGB(); + CGGradientRef gradient = CGGradientCreateWithColors(rgbColorspace, (CFArrayRef)_gradientColors, nil); + CGColorSpaceRelease(rgbColorspace); + CGPoint start = CGPointMake(gradientRect.origin.x, gradientRect.origin.y); + CGPoint end = CGPointMake(gradientRect.origin.x, CGRectGetMaxY(gradientRect)); + CGContextDrawLinearGradient(context, gradient, start, end, 0); + CGContextAddPath(context, crossCloseGlyphPath); + CGContextSetFillColorWithColor(context, _crossCloseGlyphColor.CGColor); + CGContextFillPath(context); + CGGradientRelease(gradient); + CGContextRestoreGState(context); + CFRelease(outerPath); + CFRelease(innerPath); + CFRelease(fillPath); + CFRelease(crossCloseGlyphPath); +} + +#pragma mark Layout + +- (void)layoutSubviews +{ + [super layoutSubviews]; + + // We won't set the frame in layoutSubviews to avoid potential infinite loops. + // Frame is set in -presentInView:withArrowPosition:direction: method. + [self layoutSubviewsAndDetermineFrame]; +} + +- (CGRect)layoutSubviewsAndDetermineFrame +{ + // Compute the positioning of the arrow. + CGRect screenBounds = [UIScreen mainScreen].bounds; + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + if (!UIInterfaceOrientationIsPortrait(orientation)) { + screenBounds = CGRectMake(0, 0, screenBounds.size.height, screenBounds.size.width); + } + CGFloat arrowHalfWidth = _arrowHeight; + CGFloat arrowXPos = _positionInView.x - arrowHalfWidth; + arrowXPos = MAX(arrowXPos, kNUXSideCap + kNUXBubbleMargin); + arrowXPos = MIN(arrowXPos, screenBounds.size.width - kNUXBubbleMargin - kNUXSideCap - 2 * arrowHalfWidth); + _positionInView = CGPointMake(arrowXPos + arrowHalfWidth, _positionInView.y); + + CGFloat arrowYMarginOffset = _pointingUp ? MAX(kNUXRectInset, _arrowHeight) : kNUXRectInset; + + // Set the lock image frame. + CGFloat xPos = kNUXRectInset + _textPadding + kNUXStrokeLineWidth; + CGFloat yPos = arrowYMarginOffset + kNUXStrokeLineWidth + _textPadding; + + // Set the text label frame. + _textLabel.frame = CGRectMake(xPos, + yPos + _verticalTextOffset, // sizing function may not return desired height exactly + CGRectGetWidth(_textLabel.bounds), + CGRectGetHeight(_textLabel.bounds)); + + // Determine the size of the nux bubble. + CGFloat bubbleHeight = CGRectGetHeight(_textLabel.bounds) + _verticalTextOffset + _textPadding * 2; + CGFloat crossGlyphWidth = 2 * kNUXFontSize; + CGFloat bubbleWidth = CGRectGetWidth(_textLabel.bounds) + _textPadding * 2 + kNUXStrokeLineWidth * 2 + crossGlyphWidth; + + // Compute the widths to the left and right of the arrow. + _leftWidth = roundf(0.5f * (bubbleWidth - 2 * arrowHalfWidth)); + _rightWidth = _leftWidth; + CGFloat originX = arrowXPos - _leftWidth; + if (originX < kNUXBubbleMargin) { + CGFloat xShift = kNUXBubbleMargin - originX; + originX += xShift; + _leftWidth -= xShift; + _rightWidth += xShift; + } else if (originX + bubbleWidth > screenBounds.size.width - kNUXBubbleMargin) { + CGFloat xShift = originX + bubbleWidth - (screenBounds.size.width - kNUXBubbleMargin); + originX -= xShift; + _leftWidth += xShift; + _rightWidth -= xShift; + } + + _arrowMidpoint = _positionInView.x - originX + kNUXRectInset; + + // Set the frame for the view. + CGFloat nuxWidth = bubbleWidth + 2 * kNUXRectInset; + CGFloat nuxHeight = bubbleHeight + kNUXRectInset + MAX(kNUXRectInset, _arrowHeight) + 2 * kNUXStrokeLineWidth; + CGFloat yOrigin = 0; + if (_pointingUp) { + yOrigin = _positionInView.y + kNUXPointMargin - MAX(0, kNUXRectInset - _arrowHeight); + } else { + yOrigin = _positionInView.y - nuxHeight - kNUXPointMargin + MAX(0, kNUXRectInset - _arrowHeight); + } + + return CGRectMake(originX - kNUXRectInset, + yOrigin, + nuxWidth, + nuxHeight); +} + +#pragma mark Message & Tagline + +- (void)setMessage:(NSString *)message tagline:(NSString *)tagline +{ + message = message ?: @""; + // Ensure tagline is empty string or ends with space + tagline = tagline ?: @""; + if (tagline.length && ![tagline hasSuffix:@" "]) + tagline = [tagline stringByAppendingString:@" "]; + + // Concatenate tagline & main message + message = [tagline stringByAppendingString:message]; + + NSRange fullRange = NSMakeRange(0, message.length); + NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString: message]; + + UIFont *font=[UIFont boldSystemFontOfSize:kNUXFontSize]; + [attrString addAttribute:NSFontAttributeName value:font range:fullRange]; + [attrString addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:fullRange]; + if (tagline.length) { + [attrString addAttribute:NSForegroundColorAttributeName value: FBSDKUIColorWithRGB(0x6D, 0x87, 0xC7) range:NSMakeRange(0, tagline.length)]; + } + + _textLabel.attributedText = attrString; + + CGSize textLabelSize = [_textLabel sizeThatFits:CGSizeMake(_maximumTextWidth, MAXFLOAT)]; + _textLabel.bounds = CGRectMake(0, 0, textLabelSize.width, textLabelSize.height); + self.frame = [self layoutSubviewsAndDetermineFrame]; + [self setNeedsDisplay]; +} + +#pragma mark Auto Dismiss Timeout + +- (void)scheduleAutomaticFadeout +{ + [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(scheduleFadeoutRespectingMinimumDisplayDuration) object:nil]; + + if (_displayDuration > 0.0 && self.superview) { + CFTimeInterval intervalAlreadyDisplaying = CFAbsoluteTimeGetCurrent() - _displayTime; + CFTimeInterval timeRemainingBeforeAutomaticFadeout = _displayDuration - intervalAlreadyDisplaying; + if (timeRemainingBeforeAutomaticFadeout > 0.0) { + [self performSelector:@selector(scheduleFadeoutRespectingMinimumDisplayDuration) withObject:nil afterDelay:timeRemainingBeforeAutomaticFadeout]; + } else { + [self scheduleFadeoutRespectingMinimumDisplayDuration]; + } + } +} + +- (void)scheduleFadeoutRespectingMinimumDisplayDuration +{ + CFTimeInterval intervalAlreadyDisplaying = CFAbsoluteTimeGetCurrent() - _displayTime; + CFTimeInterval remainingDisplayTime = _minimumDisplayDuration - intervalAlreadyDisplaying; + if (remainingDisplayTime > 0.0) { + [self performSelector:@selector(dismiss) withObject:nil afterDelay:remainingDisplayTime]; + } else { + [self dismiss]; + } +} + +- (void)cancelAllScheduledFadeOutMethods +{ + [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(scheduleFadeoutRespectingMinimumDisplayDuration) object:nil]; + [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(dismiss) object:nil]; +} + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginCodeInfo+Internal.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginCodeInfo+Internal.h new file mode 100644 index 0000000..cf021e1 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginCodeInfo+Internal.h @@ -0,0 +1,43 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKDeviceLoginCodeInfo.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBSDKDeviceLoginCodeInfo () + +/*! + @abstract Initializes a new instance + @param identifier the unique id for this login flow instance. + @param loginCode the short "user_code". + @param verificationURL the verification URL. + @param expirationDate expiration date. + @param pollingInterval time between polling. + */ +- (instancetype)initWithIdentifier:(NSString *)identifier + loginCode:(NSString *)loginCode + verificationURL:(NSURL *)verificationURL + expirationDate:(NSDate *)expirationDate + pollingInterval:(NSUInteger)pollingInterval NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginManagerResult+Internal.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginManagerResult+Internal.h new file mode 100644 index 0000000..cc9e4ae --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginManagerResult+Internal.h @@ -0,0 +1,39 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +#import "FBSDKDeviceLoginManagerResult.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBSDKDeviceLoginManagerResult () + +/*! + @abstract Initializes a new instance + @param token The token + @param cancelled Indicates if the flow was cancelled. + */ +- (instancetype)initWithToken:(nullable FBSDKAccessToken *)token + isCancelled:(BOOL)cancelled NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion+Internal.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion+Internal.h new file mode 100644 index 0000000..6ddfa0d --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion+Internal.h @@ -0,0 +1,39 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLoginCompletion.h" + +@interface FBSDKLoginCompletionParameters () + +@property (nonatomic, copy) NSString *accessTokenString; + +@property (nonatomic, copy) NSSet *permissions; +@property (nonatomic, copy) NSSet *declinedPermissions; + +@property (nonatomic, copy) NSString *appID; +@property (nonatomic, copy) NSString *userID; + +@property (nonatomic, copy) NSError *error; + +@property (nonatomic, assign, getter=isSystemAccount) BOOL systemAccount; +@property (nonatomic, copy) NSDate *expirationDate; +@property (nonatomic, copy) NSDate *dataAccessExpirationDate; + +@property (nonatomic, copy) NSString *challenge; + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion.h new file mode 100644 index 0000000..30e0015 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion.h @@ -0,0 +1,104 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +@class FBSDKLoginManager; + +/** + Structured interface for accessing the parameters used to complete a log in request. + If \c accessTokenString is non-nil, the authentication succeeded. If \c error is + non-nil the request failed. If both are \c nil, the request was cancelled. + */ +@interface FBSDKLoginCompletionParameters : NSObject + +- (instancetype)init NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithError:(NSError *)error; + +@property (nonatomic, copy, readonly) NSString *accessTokenString; + +@property (nonatomic, copy, readonly) NSSet *permissions; +@property (nonatomic, copy, readonly) NSSet *declinedPermissions; + +@property (nonatomic, copy, readonly) NSString *appID; +@property (nonatomic, copy, readonly) NSString *userID; + +@property (nonatomic, copy, readonly) NSError *error; + +@property (nonatomic, readonly, getter=isSystemAccount) BOOL systemAccount; +@property (nonatomic, copy, readonly) NSDate *expirationDate; +@property (nonatomic, copy, readonly) NSDate *dataAccessExpirationDate; + +@property (nonatomic, copy, readonly) NSString *challenge; +@end + +@protocol FBSDKLoginCompleting + +/** + Invoke \p handler with the login parameters derived from the authentication result. + See the implementing class's documentation for whether it completes synchronously or asynchronously. + */ +- (void)completeLogIn:(FBSDKLoginManager *)loginManager withHandler:(void(^)(FBSDKLoginCompletionParameters *parameters))handler; + +@end + +#pragma mark - Completers + +/** + Extracts the log in completion parameters from the \p parameters dictionary, + which must contain the parsed result of the return URL query string. + + The \c user_id key is first used to derive the User ID. If that fails, \c signed_request + is used. + + Completion occurs synchronously. + */ +@interface FBSDKLoginURLCompleter : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)initWithURLParameters:(NSDictionary *)parameters appID:(NSString *)appID NS_DESIGNATED_INITIALIZER; + +@end + +/** + Requests the User ID, granted permissions and declined permissions from the server + using the given access token, which must occur before authentication can be completed. + + Completion occurs asynchronously. + */ +@interface FBSDKLoginSystemAccountCompleter : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)initWithTokenString:(NSString *)tokenString appID:(NSString *)appID NS_DESIGNATED_INITIALIZER; + +@end + +/** + Converts an Accounts framework error in to an error or cancellation result + + Completion occurs synchronously. + */ +@interface FBSDKLoginSystemAccountErrorCompleter : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)initWithError:(NSError *)accountStoreError permissions:(NSSet *)permissions NS_DESIGNATED_INITIALIZER; + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion.m new file mode 100644 index 0000000..9b81401 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion.m @@ -0,0 +1,317 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLoginCompletion+Internal.h" + +#import "FBSDKCoreKit+Internal.h" +#import "FBSDKLoginConstants.h" +#import "FBSDKLoginError.h" +#import "FBSDKLoginManager+Internal.h" +#import "FBSDKLoginUtility.h" + +static void FBSDKLoginRequestMeAndPermissions(FBSDKLoginCompletionParameters *parameters, void(^completionBlock)(void)) +{ + __block NSUInteger pendingCount = 1; + void(^didCompleteBlock)(void) = ^{ + if (--pendingCount == 0) { + completionBlock(); + } + }; + + NSString *tokenString = parameters.accessTokenString; + FBSDKGraphRequestConnection *connection = [[FBSDKGraphRequestConnection alloc] init]; + + pendingCount++; + FBSDKGraphRequest *userIDRequest = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me" + parameters:@{ @"fields" : @"id" } + tokenString:tokenString + HTTPMethod:nil + flags:FBSDKGraphRequestFlagDoNotInvalidateTokenOnError | FBSDKGraphRequestFlagDisableErrorRecovery]; + + [connection addRequest:userIDRequest completionHandler:^(FBSDKGraphRequestConnection *requestConnection, + id result, + NSError *error) { + parameters.userID = result[@"id"]; + if (error) { + parameters.error = error; + } + didCompleteBlock(); + }]; + + pendingCount++; + FBSDKGraphRequest *permissionsRequest = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me/permissions" + parameters:@{@"fields":@""} + tokenString:tokenString + HTTPMethod:nil + flags:FBSDKGraphRequestFlagDoNotInvalidateTokenOnError | FBSDKGraphRequestFlagDisableErrorRecovery]; + + [connection addRequest:permissionsRequest completionHandler:^(FBSDKGraphRequestConnection *requestConnection, + id result, + NSError *error) { + NSMutableSet *grantedPermissions = [NSMutableSet set]; + NSMutableSet *declinedPermissions = [NSMutableSet set]; + + [FBSDKInternalUtility extractPermissionsFromResponse:result + grantedPermissions:grantedPermissions + declinedPermissions:declinedPermissions]; + + parameters.permissions = [grantedPermissions copy]; + parameters.declinedPermissions = [declinedPermissions copy]; + if (error) { + parameters.error = error; + } + didCompleteBlock(); + }]; + + [connection start]; + didCompleteBlock(); +} + +@implementation FBSDKLoginCompletionParameters + +- (instancetype)init +{ + return [super init]; +} + +- (instancetype)initWithError:(NSError *)error +{ + if ((self = [self init]) != nil) { + self.error = error; + } + return self; +} + +@end + +#pragma mark - Completers + +@implementation FBSDKLoginURLCompleter +{ + FBSDKLoginCompletionParameters *_parameters; + id _observer; + BOOL _performExplicitFallback; +} + +- (instancetype)initWithURLParameters:(NSDictionary *)parameters appID:(NSString *)appID +{ + if ((self = [super init]) != nil) { + _parameters = [[FBSDKLoginCompletionParameters alloc] init]; + + _parameters.accessTokenString = parameters[@"access_token"]; + + if (_parameters.accessTokenString.length > 0) { + [self setParametersWithDictionary:parameters appID:appID]; + } else { + _parameters.accessTokenString = nil; + [self setErrorWithDictionary:parameters]; + } + } + return self; +} + +- (void)completeLogIn:(FBSDKLoginManager *)loginManager withHandler:(void(^)(FBSDKLoginCompletionParameters *parameters))handler +{ + if (_performExplicitFallback && loginManager.loginBehavior == FBSDKLoginBehaviorNative) { + // UIKit and iOS don't like an application opening a URL during a URL open callback, so + // we need to wait until *at least* the next turn of the run loop to open the URL to + // perform the browser log in behavior. However we also need to wait for the application + // to become active so FBSDKApplicationDelegate doesn't erroneously call back the URL + // opener before the URL has been opened. + if ([FBSDKApplicationDelegate sharedInstance].isActive) { + // The application is active so there's no need to wait. + [loginManager logInWithBehavior:FBSDKLoginBehaviorBrowser]; + } else { + // use the block version to guarantee there's a strong reference to self + _observer = [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidBecomeActiveNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^ (NSNotification *notification) { + [self attemptBrowserLogIn:loginManager]; + }]; + } + return; + } + + if (_parameters.accessTokenString && !_parameters.userID) { + void(^handlerCopy)(FBSDKLoginCompletionParameters *) = [handler copy]; + FBSDKLoginRequestMeAndPermissions(_parameters, ^{ + handlerCopy(self->_parameters); + }); + return; + } + + handler(_parameters); +} + +- (void)setParametersWithDictionary:(NSDictionary *)parameters appID:(NSString *)appID +{ + NSString *grantedPermissionsString = parameters[@"granted_scopes"]; + NSString *declinedPermissionsString = parameters[@"denied_scopes"]; + + NSString *signedRequest = parameters[@"signed_request"]; + NSString *userID = parameters[@"user_id"]; + + // check the string length so that we assign an empty set rather than a set with an empty string + _parameters.permissions = (grantedPermissionsString.length > 0) + ? [NSSet setWithArray:[grantedPermissionsString componentsSeparatedByString:@","]] + : [NSSet set]; + _parameters.declinedPermissions = (declinedPermissionsString.length > 0) + ? [NSSet setWithArray:[declinedPermissionsString componentsSeparatedByString:@","]] + : [NSSet set]; + + _parameters.appID = appID; + + if (userID.length == 0 && signedRequest.length > 0) { + _parameters.userID = [FBSDKLoginUtility userIDFromSignedRequest:signedRequest]; + } else { + _parameters.userID = userID; + } + + NSString *expirationDateString = parameters[@"expires"] ?: parameters[@"expires_at"]; + NSDate *expirationDate = [NSDate distantFuture]; + if (expirationDateString && expirationDateString.doubleValue > 0) { + expirationDate = [NSDate dateWithTimeIntervalSince1970:expirationDateString.doubleValue]; + } else if (parameters[@"expires_in"] && [parameters[@"expires_in"] integerValue] > 0) { + expirationDate = [NSDate dateWithTimeIntervalSinceNow:[parameters[@"expires_in"] integerValue]]; + } + _parameters.expirationDate = expirationDate; + + NSDate *dataAccessExpirationDate = [NSDate distantFuture]; + if (parameters[@"data_access_expiration_time"] && [parameters[@"data_access_expiration_time"] integerValue] > 0) { + dataAccessExpirationDate = [NSDate dateWithTimeIntervalSince1970:[parameters[@"data_access_expiration_time"] integerValue]]; + } + _parameters.dataAccessExpirationDate = dataAccessExpirationDate; + + NSError *error = nil; + NSDictionary *state = [FBSDKInternalUtility objectForJSONString:parameters[@"state"] error:&error]; + _parameters.challenge = [FBSDKUtility URLDecode:state[@"challenge"]]; +} + +- (void)setErrorWithDictionary:(NSDictionary *)parameters +{ + NSString *legacyErrorReason = parameters[@"error"]; + + if ([legacyErrorReason isEqualToString:@"service_disabled_use_browser"] || + [legacyErrorReason isEqualToString:@"service_disabled"]) { + _performExplicitFallback = YES; + } + + // if error is nil, then this should be processed as a cancellation unless + // _performExplicitFallback is set to YES and the log in behavior is Native. + _parameters.error = [NSError fbErrorFromReturnURLParameters:parameters]; +} + +- (void)attemptBrowserLogIn:(FBSDKLoginManager *)loginManager { + if (_observer != nil) { + [[NSNotificationCenter defaultCenter] removeObserver:_observer]; + _observer = nil; + } + + if ([FBSDKApplicationDelegate sharedInstance].isActive) { + [loginManager logInWithBehavior:FBSDKLoginBehaviorBrowser]; + } else { + // The application is active but due to notification ordering the FBSDKApplicationDelegate + // doesn't know it yet. Wait one more turn of the run loop. + dispatch_async(dispatch_get_main_queue(), ^{ + [self attemptBrowserLogIn:loginManager]; + }); + } +} + +@end + +@implementation FBSDKLoginSystemAccountCompleter +{ + FBSDKLoginCompletionParameters *_parameters; +} + +- (instancetype)initWithTokenString:(NSString *)tokenString appID:(NSString *)appID +{ + if ((self = [super init]) != nil) { + _parameters = [[FBSDKLoginCompletionParameters alloc] init]; + + _parameters.accessTokenString = tokenString; + _parameters.appID = appID; + + _parameters.systemAccount = YES; + } + return self; +} + +- (void)completeLogIn:(FBSDKLoginManager *)loginManager withHandler:(void(^)(FBSDKLoginCompletionParameters *parameters))handler +{ + void(^handlerCopy)(FBSDKLoginCompletionParameters *) = [handler copy]; + FBSDKLoginRequestMeAndPermissions(_parameters, ^{ + // Transform the FBSDKCoreKit error in to an FBSDKLoginKit error, if necessary. This specializes + // the graph errors in to User Checkpointed, Password Changed or Unconfirmed User. + // + // It's possible the graph error has a value set for NSRecoveryAttempterErrorKey but we don't + // have any login-specific attempter to provide since system auth succeeded and the error is a + // graph API error. + NSError *serverError = self->_parameters.error; + NSError *error = [NSError fbErrorFromServerError:serverError]; + if (error != nil) { + // In the event the user's password changed the Accounts framework will still return + // an access token but API calls will fail. Clear the access token from the result + // and use the special-case System Password changed error, which has different text + // to display to the user. + if (error.code == FBSDKLoginErrorPasswordChanged) { + [FBSDKSystemAccountStoreAdapter sharedInstance].forceBlockingRenew = YES; + + self->_parameters.accessTokenString = nil; + self->_parameters.appID = nil; + + error = [NSError fbErrorForSystemPasswordChange:serverError]; + } + + self->_parameters.error = error; + } + + handlerCopy(self->_parameters); + }); +} + +@end + +@implementation FBSDKLoginSystemAccountErrorCompleter +{ + FBSDKLoginCompletionParameters *_parameters; +} + +- (instancetype)initWithError:(NSError *)accountStoreError permissions:(NSSet *)permissions +{ + if ((self = [super init]) != nil) { + _parameters = [[FBSDKLoginCompletionParameters alloc] init]; + + NSError *error = [NSError fbErrorForSystemAccountStoreError:accountStoreError]; + if (error != nil) { + _parameters.error = error; + } else { + // The lack of an error indicates the user declined permissions + _parameters.declinedPermissions = permissions; + } + + _parameters.systemAccount = YES; + } + return self; +} + +- (void)completeLogIn:(FBSDKLoginManager *)loginManager withHandler:(void(^)(FBSDKLoginCompletionParameters *parameters))handler +{ + handler(_parameters); +} + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginError.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginError.h new file mode 100644 index 0000000..922cf68 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginError.h @@ -0,0 +1,36 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSError (FBSDKLoginError) + ++ (NSError *)fbErrorForFailedLoginWithCode:(FBSDKLoginError)code; ++ (NSError *)fbErrorForSystemAccountStoreError:(NSError *)accountStoreError; ++ (NSError *)fbErrorForSystemPasswordChange:(NSError *)innerError; + ++ (nullable NSError *)fbErrorFromReturnURLParameters:(NSDictionary *)parameters; ++ (nullable NSError *)fbErrorFromServerError:(NSError *)serverError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginError.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginError.m new file mode 100644 index 0000000..91e23f3 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginError.m @@ -0,0 +1,248 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLoginError.h" + +#import "FBSDKCoreKit+Internal.h" + +#ifndef NS_ERROR_ENUM +#define NS_ERROR_ENUM(_domain, _name) \ +enum _name: NSInteger _name; \ +enum __attribute__((ns_error_domain(_domain))) _name: NSInteger +#endif + +typedef NS_ERROR_ENUM(FBSDKLoginErrorDomain, FBSDKLoginErrorSubcode) +{ + FBSDKLoginErrorSubcodeUserCheckpointed = 459, + FBSDKLoginErrorSubcodePasswordChanged = 460, + FBSDKLoginErrorSubcodeUnconfirmedUser = 464, +}; + +@implementation NSError (FBSDKLoginError) + ++ (NSError *)fbErrorForFailedLoginWithCode:(FBSDKLoginError)code +{ + return [self fbErrorForFailedLoginWithCode:code innerError:nil]; +} + ++ (NSError *)fbErrorForFailedLoginWithCode:(FBSDKLoginError)code + innerError:(NSError *)innerError +{ + NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + + [FBSDKInternalUtility dictionary:userInfo setObject:innerError forKey:NSUnderlyingErrorKey]; + + NSString *errorDomain = FBSDKLoginErrorDomain; + NSString *localizedDescription = nil; + + switch ((NSInteger)code) { + case FBSDKErrorNetwork: + errorDomain = FBSDKErrorDomain; + localizedDescription = + NSLocalizedStringWithDefaultValue(@"LoginError.SystemAccount.Network", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Unable to connect to Facebook. Check your network connection and try again.", + @"The user facing error message when the Accounts framework encounters a network error."); + break; + case FBSDKLoginErrorUserCheckpointed: + localizedDescription = + NSLocalizedStringWithDefaultValue(@"LoginError.SystemAccount.UserCheckpointed", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"You cannot log in to apps at this time. Please log in to www.facebook.com and follow the instructions given.", + @"The user facing error message when the Facebook account signed in to the Accounts framework has been checkpointed."); + break; + case FBSDKLoginErrorUnconfirmedUser: + localizedDescription = + NSLocalizedStringWithDefaultValue(@"LoginError.SystemAccount.UnconfirmedUser", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Your account is not confirmed. Please log in to www.facebook.com and follow the instructions given.", + @"The user facing error message when the Facebook account signed in to the Accounts framework becomes unconfirmed."); + break; + case FBSDKLoginErrorSystemAccountAppDisabled: + localizedDescription = + NSLocalizedStringWithDefaultValue(@"LoginError.SystemAccount.Disabled", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Access has not been granted to the Facebook account. Verify device settings.", + @"The user facing error message when the app slider has been disabled and login fails."); + break; + case FBSDKLoginErrorSystemAccountUnavailable: + localizedDescription = + NSLocalizedStringWithDefaultValue(@"LoginError.SystemAccount.Unavailable", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"The Facebook account has not been configured on the device.", + @"The user facing error message when the device Facebook account is unavailable and login fails."); + break; + default: + break; + } + + [FBSDKInternalUtility dictionary:userInfo setObject:localizedDescription forKey:NSLocalizedDescriptionKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:localizedDescription forKey:FBSDKErrorLocalizedDescriptionKey]; + + return [NSError errorWithDomain:errorDomain + code:code + userInfo:userInfo]; +} + ++ (NSError *)fbErrorForSystemAccountStoreError:(NSError *)accountStoreError +{ + NSError *err = nil; + BOOL cancellation = NO; + + if ([accountStoreError.domain isEqualToString:FBSDKLoginErrorDomain] || + [accountStoreError.domain isEqualToString:FBSDKErrorDomain]) { + // If the requestAccess call results in a Facebook error, surface it as a top-level + // error. This implies it is not the typical user "disallows" case. + err = accountStoreError; + } else if ([accountStoreError.domain isEqualToString:@"com.apple.accounts"] && accountStoreError.code == 7) { + err = [self fbErrorWithSystemAccountStoreDeniedError:accountStoreError isCancellation:&cancellation]; + } + + if (err == nil && !cancellation) { + // create an error object with additional info regarding failed login + NSInteger errorCode = FBSDKLoginErrorSystemAccountUnavailable; + + NSString *errorDomain = accountStoreError.domain; + if ([errorDomain isEqualToString:NSURLErrorDomain] || + [errorDomain isEqualToString:@"kCFErrorDomainCFNetwork"]) { + errorCode = FBSDKErrorNetwork; + } + + err = [self fbErrorForFailedLoginWithCode:errorCode + innerError:accountStoreError]; + } + + return err; +} + ++ (NSError *)fbErrorForSystemPasswordChange:(NSError *)innerError +{ + NSString *failureReasonAndDescription = + NSLocalizedStringWithDefaultValue(@"LoginError.SystemAccount.PasswordChange", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings], + @"Your Facebook password has changed. To confirm your password, open Settings > Facebook and tap your name.", + @"The user facing error message when the device Facebook account password is incorrect and login fails."); + NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys: + failureReasonAndDescription, FBSDKErrorLocalizedDescriptionKey, + failureReasonAndDescription, NSLocalizedDescriptionKey, + nil]; + + [FBSDKInternalUtility dictionary:userInfo setObject:innerError forKey:NSUnderlyingErrorKey]; + + return [NSError errorWithDomain:FBSDKLoginErrorDomain + code:FBSDKLoginErrorPasswordChanged + userInfo:userInfo]; +} + ++ (NSError *)fbErrorFromReturnURLParameters:(NSDictionary *)parameters +{ + NSError *error = nil; + + NSMutableDictionary *userInfo = [[NSMutableDictionary alloc] init]; + [FBSDKInternalUtility dictionary:userInfo setObject:parameters[@"error_message"] forKey:FBSDKErrorDeveloperMessageKey]; + + if (userInfo.count > 0) { + [FBSDKInternalUtility dictionary:userInfo setObject:parameters[@"error"] forKey:FBSDKErrorDeveloperMessageKey]; + [FBSDKInternalUtility dictionary:userInfo setObject:parameters[@"error_code"] forKey:FBSDKGraphRequestErrorGraphErrorCodeKey]; + + if (!userInfo[FBSDKErrorDeveloperMessageKey]) { + [FBSDKInternalUtility dictionary:userInfo setObject:parameters[@"error_reason"] forKey:FBSDKErrorDeveloperMessageKey]; + } + + userInfo[FBSDKGraphRequestErrorKey] = @(FBSDKGraphRequestErrorOther); + + error = [NSError errorWithDomain:FBSDKErrorDomain + code:FBSDKErrorGraphRequestGraphAPI + userInfo:userInfo]; + } + + return error; +} + ++ (NSError *)fbErrorFromServerError:(NSError *)serverError +{ + NSError *loginError = nil; + + if ([serverError.domain isEqualToString:FBSDKErrorDomain]) { + NSDictionary *response = [FBSDKTypeUtility dictionaryValue:serverError.userInfo[FBSDKGraphRequestErrorParsedJSONResponseKey]]; + NSDictionary *body = [FBSDKTypeUtility dictionaryValue:response[@"body"]]; + NSDictionary *error = [FBSDKTypeUtility dictionaryValue:body[@"error"]]; + NSInteger subcode = [FBSDKTypeUtility integerValue:error[@"error_subcode"]]; + + switch (subcode) { + case FBSDKLoginErrorSubcodeUserCheckpointed: + loginError = [self fbErrorForFailedLoginWithCode:FBSDKLoginErrorUserCheckpointed + innerError:serverError]; + break; + case FBSDKLoginErrorSubcodePasswordChanged: + loginError = [self fbErrorForFailedLoginWithCode:FBSDKLoginErrorPasswordChanged + innerError:serverError]; + break; + case FBSDKLoginErrorSubcodeUnconfirmedUser: + loginError = [self fbErrorForFailedLoginWithCode:FBSDKLoginErrorUnconfirmedUser + innerError:serverError]; + break; + } + } + + return loginError; +} + ++ (NSError *)fbErrorWithSystemAccountStoreDeniedError:(NSError *)accountStoreError + isCancellation:(BOOL *)cancellation +{ + // The Accounts framework returns an ACErrorPermissionDenied error for both user denied errors, + // Facebook denied errors, and other things. Unfortunately examining the contents of the + // description is the only means available to determine the reason for the error. + NSString *description = accountStoreError.userInfo[NSLocalizedDescriptionKey]; + NSError *err = nil; + + if (description) { + // If a parenthetical error code exists, map it ot a Facebook server error + FBSDKLoginError errorCode = FBSDKLoginErrorReserved; + if ([description rangeOfString:@"(459)"].location != NSNotFound) { + // The Facebook server could not fulfill this access request: Error validating access token: + // You cannot access the app till you log in to www.facebook.com and follow the instructions given. (459) + + // The OAuth endpoint directs people to www.facebook.com when an account has been + // checkpointed. If the web address is present, assume it's due to a checkpoint. + errorCode = FBSDKLoginErrorUserCheckpointed; + } else if ([description rangeOfString:@"(452)"].location != NSNotFound || + [description rangeOfString:@"(460)"].location != NSNotFound) { + // The Facebook server could not fulfill this access request: Error validating access token: + // Session does not match current stored session. This may be because the user changed the password since + // the time the session was created or Facebook has changed the session for security reasons. (452)or(460) + + // If the login failed due to the session changing, maybe it's due to the password + // changing. Direct the user to update the password in the Settings > Facebook. + err = [self fbErrorForSystemPasswordChange:accountStoreError]; + } else if ([description rangeOfString:@"(464)"].location != NSNotFound) { + // The Facebook server could not fulfill this access request: Error validating access token: + // Sessions for the user are not allowed because the user is not a confirmed user. (464) + errorCode = FBSDKLoginErrorUnconfirmedUser; + } + + if (errorCode != FBSDKLoginErrorReserved) { + err = [self fbErrorForFailedLoginWithCode:errorCode]; + } + } else { + // If there is no description, assume this is a user cancellation. No error object is + // returned for a cancellation. + if (cancellation != NULL) { + *cancellation = YES; + } + } + + return err; +} + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginKit+Internal.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginKit+Internal.h new file mode 100644 index 0000000..74b6597 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginKit+Internal.h @@ -0,0 +1,24 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import "FBSDKLoginCompletion+Internal.h" +#import "FBSDKLoginError.h" +#import "FBSDKLoginManager+Internal.h" +#import "FBSDKLoginUtility.h" diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManager+Internal.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManager+Internal.h new file mode 100644 index 0000000..77ddb6d --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManager+Internal.h @@ -0,0 +1,81 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +#import "FBSDKCoreKit+Internal.h" + +@class FBSDKAccessToken; +@class FBSDKLoginCompletionParameters; + +@interface FBSDKLoginManagerSystemAccountState : NSObject +@property (nonatomic, assign) BOOL didShowDialog; +@property (nonatomic, getter=isReauthorize) BOOL reauthorize; +@property (nonatomic, getter=isUnTOSedDevice) BOOL unTOSedDevice; +@end + +@interface FBSDKLoginManager () +@property (nonatomic, weak) UIViewController *fromViewController; +@property (nonatomic, readonly) NSSet *requestedPermissions; + +- (void)completeAuthentication:(FBSDKLoginCompletionParameters *)parameters expectChallenge:(BOOL)expectChallenge; + +// available to internal types to trigger login without checking read/publish mixtures. +- (void)logInWithPermissions:(NSSet *)permissions handler:(FBSDKLoginManagerRequestTokenHandler)handler; +- (void)logInWithBehavior:(FBSDKLoginBehavior)loginBehavior; + +// made available for testing only +- (NSDictionary *)logInParametersWithPermissions:(NSSet *)permissions serverConfiguration:(FBSDKServerConfiguration *)serverConfiguration; +// made available for testing only +- (void)validateReauthentication:(FBSDKAccessToken *)currentToken withResult:(FBSDKLoginManagerLoginResult *)loginResult; + +// for testing only +- (void)setHandler:(FBSDKLoginManagerRequestTokenHandler)handler; +// for testing only +- (void)setRequestedPermissions:(NSSet *)requestedPermissions; +// for testing only +- (NSString *)loadExpectedChallenge; +@end + +// the category is made available for testing only +@interface FBSDKLoginManager (Native) + +- (void)performNativeLogInWithParameters:(NSDictionary *)loginParams handler:(void(^)(BOOL, NSError*))handler; +- (void)performBrowserLogInWithParameters:(NSDictionary *)loginParams handler:(void(^)(BOOL, NSString *,NSError*))handler; + +@end + +// the category is made available for testing only +@interface FBSDKLoginManager (Accounts) + +- (void)beginSystemLogIn; +- (void)performSystemLogIn; +- (void)continueSystemLogInWithTokenString:(NSString *)oauthToken error:(NSError *)accountStoreError state:(FBSDKLoginManagerSystemAccountState *)state; + +- (void)fallbackToNativeBehavior; + +@end + +// the category is made available for testing only +@interface FBSDKLoginManager (WebDialog) + +- (void)performWebLogInWithParameters:(NSDictionary *)loginParams handler:(void(^)(BOOL, NSError*))handler; + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLogger.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLogger.h new file mode 100644 index 0000000..640d47b --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLogger.h @@ -0,0 +1,48 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLoginManager+Internal.h" + +FOUNDATION_EXPORT NSString *const FBSDKLoginManagerLoggerAuthMethod_Native; +FOUNDATION_EXPORT NSString *const FBSDKLoginManagerLoggerAuthMethod_Browser; +FOUNDATION_EXPORT NSString *const FBSDKLoginManagerLoggerAuthMethod_System; +FOUNDATION_EXPORT NSString *const FBSDKLoginManagerLoggerAuthMethod_Webview; +FOUNDATION_EXPORT NSString *const FBSDKLoginManagerLoggerAuthMethod_SFVC; + + +@interface FBSDKLoginManagerLogger : NSObject ++ (FBSDKLoginManagerLogger *)loggerFromParameters:(NSDictionary *)parameters; + +- (instancetype)init NS_UNAVAILABLE; +- (instancetype)new NS_UNAVAILABLE; + +- (instancetype)initWithLoggingToken:(NSString *)loggingToken; + +// this must not retain loginManager - only used to conveniently grab various properties to log. +- (void)startSessionForLoginManager:(FBSDKLoginManager *)loginManager; +- (void)endSession; + +- (void)startAuthMethod:(NSString *)authMethod; +- (void)endLoginWithResult:(FBSDKLoginManagerLoginResult *)result error:(NSError *)error; + +- (NSDictionary *)parametersWithTimeStampAndClientState:(NSDictionary *)loginParams forAuthMethod:(NSString *)authMethod; +- (void)willAttemptAppSwitchingBehavior; +- (void)systemAuthDidShowDialog:(BOOL)didShowDialog isUnTOSedDevice:(BOOL)isUnTOSedDevice; + +- (void)logNativeAppDialogResult:(BOOL)result dialogDuration:(NSTimeInterval)dialogDuration; +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLogger.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLogger.m new file mode 100644 index 0000000..a47015c --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLogger.m @@ -0,0 +1,309 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLoginManagerLogger.h" + +#import "FBSDKCoreKit+Internal.h" +#import "FBSDKLoginError.h" +#import "FBSDKLoginManagerLoginResult+Internal.h" +#import "FBSDKLoginUtility.h" + +NSString *const FBSDKLoginManagerLoggerAuthMethod_Native = @"fb_application_web_auth"; +NSString *const FBSDKLoginManagerLoggerAuthMethod_Browser = @"browser_auth"; +NSString *const FBSDKLoginManagerLoggerAuthMethod_System = @"integrated_auth"; +NSString *const FBSDKLoginManagerLoggerAuthMethod_Webview = @"fallback_auth"; +NSString *const FBSDKLoginManagerLoggerAuthMethod_SFVC = @"sfvc_auth"; + +static NSString *const FBSDKLoginManagerLoggingClientStateKey = @"state"; +static NSString *const FBSDKLoginManagerLoggingClientStateIsClientState = @"com.facebook.sdk_client_state"; + +static NSString *const FBSDKLoginManagerLoggerParamIdentifierKey = @"0_auth_logger_id"; +static NSString *const FBSDKLoginManagerLoggerParamTimestampKey = @"1_timestamp_ms"; +static NSString *const FBSDKLoginManagerLoggerParamResultKey = @"2_result"; +static NSString *const FBSDKLoginManagerLoggerParamAuthMethodKey = @"3_method"; +static NSString *const FBSDKLoginManagerLoggerParamErrorCodeKey = @"4_error_code"; +static NSString *const FBSDKLoginManagerLoggerParamErrorMessageKey = @"5_error_message"; +static NSString *const FBSDKLoginManagerLoggerParamExtrasKey = @"6_extras"; +static NSString *const FBSDKLoginManagerLoggerParamLoggingTokenKey = @"7_logging_token"; + +static NSString *const FBSDKLoginManagerLoggerValueEmpty = @""; + +static NSString *const FBSDKLoginManagerLoggerResultSuccessString = @"success"; +static NSString *const FBSDKLoginManagerLoggerResultCancelString = @"cancelled"; +static NSString *const FBSDKLoginManagerLoggerResultErrorString = @"error"; +static NSString *const FBSDKLoginManagerLoggerResultSkippedString = @"skipped"; + +static NSString *const FBSDKLoginManagerLoggerTryNative = @"tryFBAppAuth"; +static NSString *const FBSDKLoginManagerLoggerTryBrowser = @"trySafariAuth"; +static NSString *const FBSDKLoginManagerLoggerTrySystemAccount = @"tryIntegratedAuth"; +static NSString *const FBSDKLoginManagerLoggerTryWebView = @"tryFallback"; + +@implementation FBSDKLoginManagerLogger +{ +@private + NSString *_identifier; + NSMutableDictionary *_extras; + + NSString *_lastResult; + NSError *_lastError; + + NSString *_authMethod; + NSString *_loggingToken; +} + ++ (FBSDKLoginManagerLogger *)loggerFromParameters:(NSDictionary *)parameters +{ + NSDictionary *clientState = [FBSDKInternalUtility objectForJSONString:parameters[FBSDKLoginManagerLoggingClientStateKey] error:NULL]; + + id isClientState = clientState[FBSDKLoginManagerLoggingClientStateIsClientState]; + if ([isClientState isKindOfClass:[NSNumber class]] && [isClientState boolValue]) { + FBSDKLoginManagerLogger *logger = [[self alloc] initWithLoggingToken:nil]; + if (logger != nil) { + logger->_identifier = clientState[FBSDKLoginManagerLoggerParamIdentifierKey]; + logger->_authMethod = clientState[FBSDKLoginManagerLoggerParamAuthMethodKey]; + logger->_loggingToken = clientState[FBSDKLoginManagerLoggerParamLoggingTokenKey]; + return logger; + } + } + return nil; +} + +- (instancetype)initWithLoggingToken:(NSString *)loggingToken +{ + if ((self = [super init]) != nil) { + _identifier = [NSUUID UUID].UUIDString; + _extras = [NSMutableDictionary dictionary]; + _loggingToken = [loggingToken copy]; + } + return self; +} + +- (void)startSessionForLoginManager:(FBSDKLoginManager *)loginManager +{ + BOOL isReauthorize = ([FBSDKAccessToken currentAccessToken] != nil); + BOOL willTryNative = NO; + BOOL willTryBrowser = NO; + BOOL willTrySystemAccount = NO; + BOOL willTryWebView = NO; + NSString *behaviorString = nil; + + switch (loginManager.loginBehavior) { + case FBSDKLoginBehaviorNative: + willTryNative = YES; + willTryBrowser = YES; + behaviorString = @"FBSDKLoginBehaviorNative"; + break; + case FBSDKLoginBehaviorBrowser: + willTryBrowser = YES; + behaviorString = @"FBSDKLoginBehaviorBrowser"; + break; + case FBSDKLoginBehaviorSystemAccount: + willTryNative = YES; + willTryBrowser = YES; + willTrySystemAccount = YES; + behaviorString = @"FBSDKLoginBehaviorSystemAccount"; + break; + case FBSDKLoginBehaviorWeb: + willTryWebView = YES; + behaviorString = @"FBSDKLoginBehaviorWeb"; + break; + } + + [_extras addEntriesFromDictionary:@{ + FBSDKLoginManagerLoggerTryNative : @(willTryNative), + FBSDKLoginManagerLoggerTryBrowser : @(willTryBrowser), + FBSDKLoginManagerLoggerTrySystemAccount : @(willTrySystemAccount), + FBSDKLoginManagerLoggerTryWebView : @(willTryWebView), + @"isReauthorize" : @(isReauthorize), + @"login_behavior" : behaviorString, + @"default_audience" : [FBSDKLoginUtility stringForAudience:loginManager.defaultAudience], + @"permissions" : [loginManager.requestedPermissions.allObjects componentsJoinedByString:@","] ?: @"" + }]; + + [self logEvent:FBSDKAppEventNameFBSessionAuthStart params:[self _parametersForNewEvent]]; +} + +- (void)endSession +{ + [self logEvent:FBSDKAppEventNameFBSessionAuthEnd result:_lastResult error:_lastError]; +} + +- (void)startAuthMethod:(NSString *)authMethod +{ + _authMethod = [authMethod copy]; + [self logEvent:FBSDKAppEventNameFBSessionAuthMethodStart params:[self _parametersForNewEvent]]; +} + +- (void)endLoginWithResult:(FBSDKLoginManagerLoginResult *)result error:(NSError *)error +{ + NSString *resultString = @""; + + if (error != nil) { + resultString = FBSDKLoginManagerLoggerResultErrorString; + } else if (result.isCancelled) { + resultString = FBSDKLoginManagerLoggerResultCancelString; + } else if (result.isSkipped) { + resultString = FBSDKLoginManagerLoggerResultSkippedString; + } else if (result.token) { + resultString = FBSDKLoginManagerLoggerResultSuccessString; + if (result.declinedPermissions.count) { + _extras[@"declined_permissions"] = [result.declinedPermissions.allObjects componentsJoinedByString:@","]; + } + } + + _lastResult = resultString; + _lastError = error; + [_extras addEntriesFromDictionary:result.loggingExtras]; + + [self logEvent:FBSDKAppEventNameFBSessionAuthMethodEnd result:resultString error:error]; +} + +- (NSDictionary *)parametersWithTimeStampAndClientState:(NSDictionary *)loginParams forAuthMethod:(NSString *)authMethod +{ + NSMutableDictionary *params = [loginParams mutableCopy]; + + NSTimeInterval timeValue = (NSTimeInterval)FBSDKMonotonicTimeGetCurrentSeconds(); + NSString *e2eTimestampString = [FBSDKInternalUtility JSONStringForObject:@{ @"init" : @(timeValue) } + error:NULL + invalidObjectHandler:NULL]; + params[@"e2e"] = e2eTimestampString; + + NSDictionary *existingState = [FBSDKInternalUtility objectForJSONString:params[FBSDKLoginManagerLoggingClientStateKey] error:NULL]; + params[FBSDKLoginManagerLoggingClientStateKey] = [self clientStateForAuthMethod:authMethod andExistingState:existingState]; + + return params; +} + +- (void)willAttemptAppSwitchingBehavior +{ + NSString *defaultUrlScheme = [NSString stringWithFormat:@"fb%@%@", [FBSDKSettings appID], [FBSDKSettings appURLSchemeSuffix] ?: @""]; + BOOL isURLSchemeRegistered = [FBSDKInternalUtility isRegisteredURLScheme:defaultUrlScheme]; + + BOOL isFacebookAppCanOpenURLSchemeRegistered = [FBSDKInternalUtility isRegisteredCanOpenURLScheme:FBSDK_CANOPENURL_FACEBOOK]; + BOOL isMessengerAppCanOpenURLSchemeRegistered = [FBSDKInternalUtility isRegisteredCanOpenURLScheme:FBSDK_CANOPENURL_MESSENGER]; + + [_extras addEntriesFromDictionary:@{ + @"isURLSchemeRegistered" : @(isURLSchemeRegistered), + @"isFacebookAppCanOpenURLSchemeRegistered" : @(isFacebookAppCanOpenURLSchemeRegistered), + @"isMessengerAppCanOpenURLSchemeRegistered" : @(isMessengerAppCanOpenURLSchemeRegistered), + }]; +} + +- (void)systemAuthDidShowDialog:(BOOL)didShowDialog isUnTOSedDevice:(BOOL)isUnTOSedDevice +{ + [_extras addEntriesFromDictionary:@{ + @"isUntosedDevice" : @(isUnTOSedDevice), + @"dialogShown" : @(didShowDialog), + }]; +} + +- (void)logNativeAppDialogResult:(BOOL)result dialogDuration:(NSTimeInterval)dialogDuration +{ + NSOperatingSystemVersion iOS10Version = { .majorVersion = 10, .minorVersion = 0, .patchVersion = 0 }; + if ([FBSDKInternalUtility isOSRunTimeVersionAtLeast:iOS10Version]) { + _extras[@"native_app_login_dialog_duration"] = @(dialogDuration); + _extras[@"native_app_login_dialog_result"] = @(result); + [self logEvent:FBSDKAppEventNameFBSessionFASLoginDialogResult params:[self _parametersForNewEvent]]; + } +} + +#pragma mark - Private + +- (NSString *)clientStateForAuthMethod:(NSString *)authMethod andExistingState:(NSDictionary *)existingState +{ + NSDictionary *clientState = @{ + FBSDKLoginManagerLoggerParamAuthMethodKey: authMethod ?: @"", + FBSDKLoginManagerLoggerParamIdentifierKey: _identifier, + FBSDKLoginManagerLoggingClientStateIsClientState: @YES, + }; + + if (existingState) { + NSMutableDictionary *mutableState = [clientState mutableCopy]; + [mutableState addEntriesFromDictionary:existingState]; + clientState = mutableState; + } + + return [FBSDKInternalUtility JSONStringForObject:clientState error:NULL invalidObjectHandler:NULL]; +} + +- (NSMutableDictionary *)_parametersForNewEvent +{ + NSMutableDictionary *eventParameters = [[NSMutableDictionary alloc] init]; + + // NOTE: We ALWAYS add all params to each event, to ensure predictable mapping on the backend. + eventParameters[FBSDKLoginManagerLoggerParamIdentifierKey] = _identifier ?: FBSDKLoginManagerLoggerValueEmpty; + eventParameters[FBSDKLoginManagerLoggerParamTimestampKey] = @(round(1000 * [NSDate date].timeIntervalSince1970)); + eventParameters[FBSDKLoginManagerLoggerParamResultKey] = FBSDKLoginManagerLoggerValueEmpty; + [FBSDKInternalUtility dictionary:eventParameters setObject:_authMethod forKey:FBSDKLoginManagerLoggerParamAuthMethodKey]; + eventParameters[FBSDKLoginManagerLoggerParamErrorCodeKey] = FBSDKLoginManagerLoggerValueEmpty; + eventParameters[FBSDKLoginManagerLoggerParamErrorMessageKey] = FBSDKLoginManagerLoggerValueEmpty; + eventParameters[FBSDKLoginManagerLoggerParamExtrasKey] = FBSDKLoginManagerLoggerValueEmpty; + eventParameters[FBSDKLoginManagerLoggerParamLoggingTokenKey] = _loggingToken ?: FBSDKLoginManagerLoggerValueEmpty; + + return eventParameters; +} + +- (void)logEvent:(NSString *)eventName params:(NSMutableDictionary *)params +{ + if (_identifier) { + NSString *extrasJSONString = [FBSDKInternalUtility JSONStringForObject:_extras + error:NULL + invalidObjectHandler:NULL]; + if (extrasJSONString) { + params[FBSDKLoginManagerLoggerParamExtrasKey] = extrasJSONString; + } + [_extras removeAllObjects]; + + [FBSDKAppEvents logImplicitEvent:eventName valueToSum:nil parameters:params accessToken:nil]; + } +} + +- (void)logEvent:(NSString *)eventName result:(NSString *)result error:(NSError *)error +{ + NSMutableDictionary *params = [self _parametersForNewEvent]; + + params[FBSDKLoginManagerLoggerParamResultKey] = result; + + if ([error.domain isEqualToString:FBSDKErrorDomain] || [error.domain isEqualToString:FBSDKLoginErrorDomain]) { + // tease apart the structure. + + // first see if there is an explicit message in the error's userInfo. If not, default to the reason, + // which is less useful. + NSString *value = error.userInfo[@"error_message"] ?: error.userInfo[FBSDKErrorLocalizedDescriptionKey]; + [FBSDKInternalUtility dictionary:params setObject:value forKey:FBSDKLoginManagerLoggerParamErrorMessageKey]; + + value = error.userInfo[FBSDKGraphRequestErrorGraphErrorCodeKey] ?: [NSString stringWithFormat:@"%ld", (long)error.code]; + [FBSDKInternalUtility dictionary:params setObject:value forKey:FBSDKLoginManagerLoggerParamErrorCodeKey]; + + NSError *innerError = error.userInfo[NSUnderlyingErrorKey]; + if (innerError != nil) { + value = innerError.userInfo[@"error_message"] ?: innerError.userInfo[NSLocalizedDescriptionKey]; + [FBSDKInternalUtility dictionary:_extras setObject:value forKey:@"inner_error_message"]; + + value = innerError.userInfo[FBSDKGraphRequestErrorGraphErrorCodeKey] ?: [NSString stringWithFormat:@"%ld", (long)innerError.code]; + [FBSDKInternalUtility dictionary:_extras setObject:value forKey:@"inner_error_code"]; + } + } else if (error) { + params[FBSDKLoginManagerLoggerParamErrorCodeKey] = @(error.code); + params[FBSDKLoginManagerLoggerParamErrorMessageKey] = error.localizedDescription; + } + + [self logEvent:eventName params:params]; +} + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLoginResult+Internal.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLoginResult+Internal.h new file mode 100644 index 0000000..545ef0e --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLoginResult+Internal.h @@ -0,0 +1,32 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +@interface FBSDKLoginManagerLoginResult() + +@property (nonatomic, readonly) NSDictionary *loggingExtras; + +// legacy flag indicating this is an intermediary result only for logging purposes. +@property (nonatomic, assign) BOOL isSkipped; + +// adds additional logging entry to extras - only sent as part of `endLoginWithResult:` +-(void)addLoggingExtra:(id)object forKey:(id)key; +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginUtility.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginUtility.h new file mode 100644 index 0000000..b8dcc4c --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginUtility.h @@ -0,0 +1,33 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import + +#import + +@interface FBSDKLoginUtility : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + ++ (NSString *)stringForAudience:(FBSDKDefaultAudience)audience; ++ (NSDictionary *)queryParamsFromLoginURL:(NSURL *)url; + ++ (NSString *)userIDFromSignedRequest:(NSString *)signedRequest; + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginUtility.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginUtility.m new file mode 100644 index 0000000..10592ba --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginUtility.m @@ -0,0 +1,80 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKLoginUtility.h" + +#import +#import + +#import "FBSDKCoreKit+Internal.h" +#import "FBSDKLoginConstants.h" + +@implementation FBSDKLoginUtility + ++ (NSString *)stringForAudience:(FBSDKDefaultAudience)audience +{ + switch (audience) { + case FBSDKDefaultAudienceOnlyMe: + return @"only_me"; + case FBSDKDefaultAudienceFriends: + return @"friends"; + case FBSDKDefaultAudienceEveryone: + return @"everyone"; + } +} + ++ (NSDictionary *)queryParamsFromLoginURL:(NSURL *)url +{ + NSString *expectedUrlPrefix = [FBSDKInternalUtility appURLWithHost:@"authorize" path:nil queryParameters:nil error:NULL].absoluteString; + if (![url.absoluteString hasPrefix:expectedUrlPrefix]) { + // Don't have an App ID, just verify path. + NSString *host = url.host; + if (![host isEqualToString:@"authorize"]) { + return nil; + } + } + NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:[FBSDKInternalUtility dictionaryFromFBURL:url]]; + + NSString *userID = [[self class] userIDFromSignedRequest:params[@"signed_request"]]; + if (userID) { + params[@"user_id"] = userID; + } + + return params; +} + ++ (NSString *)userIDFromSignedRequest:(NSString *)signedRequest +{ + if (!signedRequest) { + return nil; + } + + NSArray *signatureAndPayload = [signedRequest componentsSeparatedByString:@"."]; + NSString *userID = nil; + + if (signatureAndPayload.count == 2) { + NSData *data = [FBSDKBase64 decodeAsData:signatureAndPayload[1]]; + if (data) { + NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil]; + userID = dictionary[@"user_id"]; + } + } + return userID; +} + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.h b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.h new file mode 100644 index 0000000..b979138 --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.h @@ -0,0 +1,23 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "FBSDKCoreKit+Internal.h" + +@interface _FBSDKLoginRecoveryAttempter : FBSDKErrorRecoveryAttempter + +@end diff --git a/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.m b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.m new file mode 100644 index 0000000..3152cef --- /dev/null +++ b/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.m @@ -0,0 +1,47 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +#import "_FBSDKLoginRecoveryAttempter.h" + +#import "FBSDKLoginKit+Internal.h" + +@implementation _FBSDKLoginRecoveryAttempter + +- (void)attemptRecoveryFromError:(NSError *)error + optionIndex:(NSUInteger)recoveryOptionIndex + delegate:(id)delegate + didRecoverSelector:(SEL)didRecoverSelector + contextInfo:(void *)contextInfo { + + void(^handler)(BOOL) = ^(BOOL didRecover) { + [super completeRecovery:didRecover delegate:delegate didRecoverSelector:didRecoverSelector contextInfo:contextInfo]; + }; + NSSet *currentPermissions = [FBSDKAccessToken currentAccessToken].permissions; + if (recoveryOptionIndex == 0 && currentPermissions.count > 0) { + FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init]; + [login logInWithPermissions:currentPermissions handler:^(FBSDKLoginManagerLoginResult *result, NSError *loginError) { + // we can only consider a recovery successful if there are no declines + // (note this could still set an updated currentAccessToken). + handler(!loginError && !result.isCancelled && result.declinedPermissions.count == 0); + }]; + } else { + handler(NO); + } +} + +@end diff --git a/Pods/FBSDKLoginKit/LICENSE b/Pods/FBSDKLoginKit/LICENSE new file mode 100644 index 0000000..bdb9fc5 --- /dev/null +++ b/Pods/FBSDKLoginKit/LICENSE @@ -0,0 +1,17 @@ +Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + +You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +copy, modify, and distribute this software in source code or binary form for use +in connection with the web services and APIs provided by Facebook. + +As with any software that integrates with the Facebook platform, your use of +this software is subject to the Facebook Developer Principles and Policies +[http://developers.facebook.com/policy/]. This copyright notice shall be +included in all copies or substantial portions of the software. + +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. diff --git a/Pods/FBSDKLoginKit/README.md b/Pods/FBSDKLoginKit/README.md new file mode 100644 index 0000000..5449cbf --- /dev/null +++ b/Pods/FBSDKLoginKit/README.md @@ -0,0 +1,43 @@ +# Facebook SDK for iOS + +[![Build Status](https://travis-ci.org/facebook/facebook-objc-sdk.svg?branch=master)](https://travis-ci.org/facebook/facebook-objc-sdk) + +This open-source library allows you to integrate Facebook into your iOS app. + +Learn more about the provided samples, documentation, integrating the SDK into your app, accessing source code, and more at https://developers.facebook.com/docs/ios + +NOTE: By default, the Facebook SDK for iOS is installed in ~/Documents/FacebookSDK + +## TRY IT OUT + +1. Download the SDK at or via CocoaPods by adding the 'FBSDKCoreKit', 'FBSDKLoginKit', and 'FBSDKShareKit' pods. +2. Test your install: build and run the project at `~/Documents/FacebookSDK/Samples/Scrumptious/Scrumptious.xcodeproj` +3. Check-out the tutorials available online at: +4. Start coding! Visit for tutorials and reference documentation. + +## FEATURES + +- Login - +- Sharing - +- App Links - +- Graph API - +- Analytics - + +## GIVE FEEDBACK + +Please report bugs or issues to + +You can also join the [Facebook Developers Group on Facebook](https://www.facebook.com/groups/fbdevelopers/) or ask questions on [Stack Overflow](http://facebook.stackoverflow.com) + +## LICENSE + +See the [LICENSE](LICENSE) file. + +## DEVELOPER TERMS + +- By enabling Facebook integrations, including through this SDK, you can share information with Facebook, including information about people’s use of your app. Facebook will use information received in accordance with our [Data Use Policy](https://www.facebook.com/about/privacy/), including to provide you with insights about the effectiveness of your ads and the use of your app. These integrations also enable us and our partners to serve ads on and off Facebook. +- You may limit your sharing of information with us by updating the Insights control in the developer tool `https://developers.facebook.com/apps/{app_id}/settings/advanced`. +- If you use a Facebook integration, including to share information with us, you agree and confirm that you have provided appropriate and sufficiently prominent notice to and obtained the appropriate consent from your users regarding such collection, use, and disclosure (including, at a minimum, through your privacy policy). You further agree that you will not share information with us about children under the age of 13. +- You agree to comply with all applicable laws and regulations and also agree to our Terms , including our Platform Policies .and Advertising Guidelines, as applicable . + +By using the Facebook SDK for iOS you agree to these terms. diff --git a/Pods/FacebookCore/LICENSE b/Pods/FacebookCore/LICENSE new file mode 100644 index 0000000..d318575 --- /dev/null +++ b/Pods/FacebookCore/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2016-present, Facebook, Inc. All rights reserved. + +For Facebook Swift SDK software + +You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +copy, modify, and distribute this software in source code or binary form for use +in connection with the web services and APIs provided by Facebook. + +As with any software that integrates with the Facebook platform, your use of +this software is subject to the Facebook Developer Principles and Policies +[http://developers.facebook.com/policy/]. This copyright notice shall be +included in all copies or substantial portions of the software. + +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. diff --git a/Pods/FacebookCore/README.md b/Pods/FacebookCore/README.md new file mode 100644 index 0000000..4ce942a --- /dev/null +++ b/Pods/FacebookCore/README.md @@ -0,0 +1,232 @@ +# Facebook SDK in Swift (Beta) + +[![Swift Version](https://img.shields.io/badge/Swift-4.0.x-orange.svg)](https://swift.org) +[![Platforms](https://img.shields.io/cocoapods/p/FacebookCore.svg)](https://cocoapods.org/pods/FacebookCore) +[![Build Status](https://travis-ci.org/facebook/facebook-sdk-swift.svg?branch=master)](https://travis-ci.org/facebook/facebook-sdk-swift) + +[![CocoaPods](https://img.shields.io/cocoapods/v/FacebookCore.svg)](https://cocoapods.org/pods/FacebookCore) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) + +Swift-taylored experience to integrate your app with Facebook. Including: + +- [Facebook Login](https://developers.facebook.com/docs/swift/login) - Authenticate people with their Facebook credentials. +- [Share and Send Dialogs](https://developers.facebook.com/docs/swift/sharing) - Enable sharing content from your app to Facebook. +- [App Events](https://developers.facebook.com/docs/swift/appevents) - Understand your audience and the performance of your app. +- [Graph API](https://developers.facebook.com/docs/swift/graph) - Read and write directly to Facebook social graph. + +**NOTE:** This SDK is currently in Beta and may be unstable at times. Please also check out our [ObjC SDK](https://github.com/facebook/facebook-objc-sdk). + +## Installation + +### CocoaPods + +Make sure you are running the latest version of [CocoaPods](https://cocoapods.org) by running: + +```bash +gem install cocoapods + +# (or if the above fails) +sudo gem install cocoapods +``` + +**Note:** We support any version of CocoaPods 1.0.1 or later. + +Update your local specs repo by running: + +```bash +pod repo update +``` + +**Note:** This step is optional, if you updated the specs repo recently. + +Add the following lines to your Podfile: + +```ruby +pod 'FacebookCore' +pod 'FacebookLogin' +pod 'FacebookShare' +``` + +Run `pod install` and you're all set! + +You may also exclude any of these dependencies, if you do not need the features of those parts of the SDK. + +### Carthage + +Make sure you are running the latest version of [Carthage](https://github.com/carthage/carthage) by running: + +```bash +brew update +brew upgrade carthage +``` + +**Note:** We recommend using Carthage version 0.31.1 or later. + +Add the following line to your Cartfile: + +```bash +github "facebook/facebook-sdk-swift" + +# If you run into issues, try targeting the master branch +github "facebook/facebook-sdk-swift" "master" +``` + +Run `carthage update`. + +**Note:** This will fetch dependencies into a `Carthage/Checkouts` folder, then build each one. + +On your application targets' `General` settings tab, in the `Linked Frameworks and Libraries` section. + +At a minimum, you'll need to drag & drop the following frameworks from `Carthage/Build` folder on disk: + +- `FacebookCore.framework` +- `FBSDKCoreKit.framework` +- `Bolts.framework` + +To use Login with Facebook: + +- `FacebookLogin.framework` + +To use Share and Send Dialogs + +- `FacebookShare.framework` + +On your application targets' `Build Phases` tab: + +- Click `+` icon and choose `New Run Script Phase`. +- Create a script with a shell of your choice (e.g. `/bin/sh`). +- Add the following to the script area below the shell: + +```bash +/usr/local/bin/carthage copy-frameworks +``` + +- Add the paths to the frameworks you want to use under `Input Files`, for example: + +```bash +$(SRCROOT)/Carthage/Build/iOS/FacebookCore.framework +$(SRCROOT)/Carthage/Build/iOS/FBSDKCoreKit.framework +$(SRCROOT)/Carthage/Build/iOS/Bolts.framework +``` + +### Using Facebook SDK as a sub-project + +While not recommended, it is entirely possible for you to build the Facebook SDK for Swift outside of any dependency management system. + +**Note:** You will have to manage updating this solution (as well as the dependencies on the Facebook SDK for iOS) on your own. + +- Clone the repository. +- Run the following command in the root directory of the repository: `git submodule update --init --recursive` +- Add `FacebookSwift.xcodeproj` as a sub-project to your applications' project. +- Add the `FacebookCore.framework`, `FacebookLogin.framework`, and `FacebookShare.framework` build products from the sub-project to your applications `Link Frameworks and Libraries` and `Embedded Binaries` sections. + +Don't forget to also embed/link `FBSDKCoreKit.framework`, `FBSDKLoginKit.framework`, `FBSDKShareKit.framework` and `Bolts.framework` too! + +## Modules + +The frameworks for the Facebook SDK in Swift are organized in the same way that the Facebook SDK for iOS is. + +They also currently depend upon the Facebook SDK for iOS, although this may change at some point in the future. + +### FacebookCore + +[![FacebookCore on CocoaPods](https://img.shields.io/cocoapods/v/FacebookCore.svg)](https://cocoapods.org/pods/FacebookCore) + +Depends on `FBSDKCoreKit.framework` and `Bolts.framework`. + +The following types are included, with enhancements for Swift: + +- `AccessToken` +- `ApplicationDelegate` +- `AppEvents` + +A myriad of improvements, including type-safe built-in `AppEvent`s, an `AppEvent` struct, and more. + +- `GraphRequest` + +You can now implement your own type-safe `GraphRequest`s, including native-typed results. + +- `SDKSettings` + +Logging behaviors are now implemented as a type-safe set, based on Swift enums. + +- `Permission` + +Are no longer stringly-typed (string-based), but separate types for read and write permissions (also includes a built-in permission list, which includes most common permissions by default). + +### FacebookLogin + +[![FacebookCore on CocoaPods](https://img.shields.io/cocoapods/v/FacebookLogin.svg)](https://cocoapods.org/pods/FacebookLogin) + +Depends on `FacebookCore.framework` and `FBSDKLoginKit.framework`. + +The following types are included, with enhancements for Swift: + +- `LoginManager` + +Now uses the type-safe permissions from `FacebookCore`, and has constructors with `LoginBehavior` and `DefaultAudience`, instead of requiring manual setting of properties. + +- `LoginButton` + +Can no longer change permissions after creation, helping to enforce using a single login button for a given set of permissions. +Note that `LoginButton` is not intended to work with interface builder or storyboards at this time. We may re-address this in the future. + +### FacebookShare + +[![FacebookCore on CocoaPods](https://img.shields.io/cocoapods/v/FacebookShare.svg)](https://cocoapods.org/pods/FacebookShare) + +Depends on `FacebookCore.framework` and `FBSDKShareKit.framework`. + +The following types are included, with enhancements for Swift: + +- `LinkShareContent` + +Now a struct, and has a proper initializer enforcing required properties. + +- `OpenGraphShareContent` + +Now a struct, uses type-safe `OpenGraphPropertyName` and `OpenGraphPropertyValue`, as well as structs for `OpenGraphObject` and `OpenGraphAction`. + +- `PhotoShareContent` + +Now a struct, and better type-safety for properties on it. + +- `VideoShareContent` + +Now a struct, and better type-safety for properties on it. + +- `GraphSharer` + +Now a generic type, that can handle any type of content. + +- `ShareDialog` + +Now a generic type, that can handle any type of content. + +- `MessageDialog` + +Now a generic type, that can handle any type of content. + +- `GameRequest` + +Now a struct, contains proper type-safe enum for `Recipient`, `Result`. + +- `GameRequest.Dialog` +- `AppGroupRequest.Dialog` +- `AppInvite` + +Now a struct, use a type-safe `Promotion` property, instead of separate `promotionCode` and `promotionText`. + +- `AppInvite.Dialog` + +## Give Feedback + +Facebook SDK in Swift is still in beta, and we would love to hear your thoughts and feedback on it. + +- **Have an idea or feature request?** [Open an issue](https://github.com/facebook/facebook-sdk-swift/issues/new). Tell us more about the feature or an idea and why you think it's relevant. +- **Have a bug to report?** [Open an issue](https://github.com/facebook/facebook-sdk-swift/issues/new). If possible, include the version of the SDK you are using, and any technical details. +- **Need help with your code?** Join [Facebook Developers Group](https://www.facebook.com/groups/fbdevelopers) on Facebook or ask questions on [Stack Overflow](https://facebook.stackoverflow.com). + +## Contribute + +All of Facebook SDK for Swift development happens on GitHub. Contributions make for good karma and we welcome new contributors with tremendous joy. We request that you read our [contributing guidelines](.github/CONTRIBUTING.md) before submitting a Pull Request. diff --git a/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.Builtin.swift b/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.Builtin.swift new file mode 100644 index 0000000..1d81037 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.Builtin.swift @@ -0,0 +1,331 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit.FBSDKAppEvents + +//-------------------------------------- +// MARK: - General +//-------------------------------------- + +public extension AppEvent { + /** + Create an event that indicates that the user has completed registration. + + - parameter registrationMethod: Optional registration method used. + - parameter valueToSum: Optional value to sum. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func completedRegistration(registrationMethod: String? = nil, + valueToSum: Double? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + registrationMethod.onSome { parameters[.registrationMethod] = $0 } + return AppEvent(name: .completedRegistration, parameters: parameters, valueToSum: valueToSum) + } + + /** + Create an event that indicates that the user has completed tutorial. + + - parameter successful: Optional boolean value that indicates whether operation was succesful. + - parameter valueToSum: Optional value to sum. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func completedTutorial(successful: Bool? = nil, + valueToSum: Double? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + successful.onSome { parameters[.successful] = $0 ? FBSDKAppEventParameterValueYes : FBSDKAppEventParameterValueNo } + return AppEvent(name: .completedTutorial, parameters: parameters, valueToSum: valueToSum) + } + + /** + Create an event that indicates that the user viewed specific content. + + - parameter contentType: Optional content type. + - parameter contentId: Optional content identifier. + - parameter contentData: Optional content data. + - parameter currency: Optional string representation of currency. + - parameter valueToSum: Optional value to sum. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func viewedContent(contentType: String? = nil, + contentId: String? = nil, + contentData: String? = nil, + currency: String? = nil, + valueToSum: Double? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + contentType.onSome { parameters[.contentType] = $0 } + contentId.onSome { parameters[.contentId] = $0 } + contentData.onSome { parameters[.content] = $0 } + currency.onSome { parameters[.currency] = $0 } + return AppEvent(name: .viewedContent, parameters: parameters, valueToSum: valueToSum) + } + + /** + Create an event that indicatest that the user has performed a search within the app. + + - parameter contentId: Optional content identifer. + - parameter contentData: Optional content data. + - parameter contentType: Optional type of the content. + - parameter searchedString: Optional searched string. + - parameter successful: Optional boolean value that indicatest whether the operation was succesful. + - parameter valueToSum: Optional value to sum. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func searched(contentId: String? = nil, + contentData: String? = nil, + contentType: String? = nil, + searchedString: String? = nil, + successful: Bool? = nil, + valueToSum: Double? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + contentId.onSome { parameters[.contentId] = $0 } + contentData.onSome { parameters[.content] = $0 } + contentType.onSome { parameters[.contentType] = $0 } + searchedString.onSome { parameters[.searchedString] = $0 } + successful.onSome { parameters[.successful] = $0 ? FBSDKAppEventParameterValueYes : FBSDKAppEventParameterValueNo } + return AppEvent(name: .searched, parameters: parameters, valueToSum: valueToSum) + } + + /** + Create an event that indicatest the user has rated an item in the app. + + - parameter contentType: Optional type of the content. + - parameter contentId: Optional content identifier. + - parameter contentData: Optional content data. + - parameter maxRatingValue: Optional max rating value. + - parameter valueToSum: Optional value to sum. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func rated(contentType: String? = nil, + contentId: String? = nil, + contentData: String? = nil, + maxRatingValue: T? = nil, + valueToSum: Double? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + contentType.onSome { parameters[.contentType] = $0 } + contentId.onSome { parameters[.contentId] = $0 } + contentData.onSome { parameters[.content] = $0 } + maxRatingValue.onSome { parameters[.maxRatingValue] = NSNumber(value: UInt64($0)) } + return AppEvent(name: .rated, parameters: parameters, valueToSum: valueToSum) + } +} + +//-------------------------------------- +// MARK: - Commerce +//-------------------------------------- + +public extension AppEvent { + + /** + Create an app event that a user has purchased something in the application. + + - parameter amount: An amount of purchase. + - parameter currency: Optional string representation of currency. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func purchased(amount: Double, + currency: String? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + currency.onSome { parameters[.currency] = $0 } + return AppEvent(name: .purchased, parameters: parameters, valueToSum: amount) + } + + /** + Create an app event that indicatest that user has added an item to the cart. + + - parameter contentType: Optional content type. + - parameter contentId: Optional content identifier. + - parameter contentData: Optional content data. + - parameter currency: Optional string representation of currency. + - parameter valueToSum: Optional value to sum. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func addedToCart(contentType: String? = nil, + contentId: String? = nil, + contentData: String? = nil, + currency: String? = nil, + valueToSum: Double? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + contentType.onSome { parameters[.contentType] = $0 } + contentId.onSome { parameters[.contentId] = $0 } + contentData.onSome { parameters[.content] = $0 } + currency.onSome { parameters[.currency] = $0 } + return AppEvent(name: .addedToCart, parameters: parameters, valueToSum: valueToSum) + } + + /** + Create an app event that indicates that user added an item to the wishlist. + + - parameter contentType: Optional content type. + - parameter contentId: Optional content identifier. + - parameter contentData: Optional content data. + - parameter currency: Optional string representation of currency. + - parameter valueToSum: Optional value to sum. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func addedToWishlist(contentType: String? = nil, + contentId: String? = nil, + contentData: String? = nil, + currency: String? = nil, + valueToSum: Double? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + contentType.onSome { parameters[.contentType] = $0 } + contentId.onSome { parameters[.contentId] = $0 } + contentData.onSome { parameters[.content] = $0 } + currency.onSome { parameters[.currency] = $0 } + return AppEvent(name: .addedToWishlist, parameters: parameters, valueToSum: valueToSum) + } + + /** + Create an event that indicatest that a user added payment information. + + - parameter successful: Optional boolean value that indicates whether operation was succesful. + - parameter valueToSum: Optional value to sum. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func addedPaymentInfo(successful: Bool? = nil, + valueToSum: Double? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + successful.onSome { parameters[.successful] = $0 ? FBSDKAppEventParameterValueYes : FBSDKAppEventParameterValueNo } + return AppEvent(name: .addedPaymentInfo, parameters: parameters, valueToSum: valueToSum) + } + + /** + Create an event that indicatest that a user has initiated a checkout. + + - parameter contentType: Optional content type. + - parameter contentId: Optional content identifier. + - parameter contentData: Optional content data. + - parameter itemCount: Optional count of items. + - parameter paymentInfoAvailable: Optional boolean value that indicatest whether payment info is available. + - parameter currency: Optional string representation of currency. + - parameter valueToSum: Optional value to sum. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func initiatedCheckout(contentType: String? = nil, + contentId: String? = nil, + contentData: String? = nil, + itemCount: T? = nil, + paymentInfoAvailable: Bool? = nil, + currency: String? = nil, + valueToSum: Double? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + contentType.onSome { parameters[.contentType] = $0 } + contentId.onSome { parameters[.contentId] = $0 } + contentData.onSome { parameters[.content] = $0 } + itemCount.onSome { parameters[.itemCount] = NSNumber(value: UInt64($0)) } + paymentInfoAvailable.onSome { + parameters[.paymentInfoAvailable] = $0 ? FBSDKAppEventParameterValueYes : FBSDKAppEventParameterValueNo + } + currency.onSome { parameters[.currency] = $0 } + return AppEvent(name: .initiatedCheckout, parameters: parameters, valueToSum: valueToSum) + } +} + +//-------------------------------------- +// MARK: - Gaming +//-------------------------------------- + +public extension AppEvent { + + /** + Create an app event that indicates that a user has achieved a level in the application. + + - parameter level: Optional level achieved. Can be either a `String` or `NSNumber`. + - parameter valueToSum: Optional value to sum. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func achievedLevel(level: AppEventParameterValueType? = nil, + valueToSum: Double? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + level.onSome { parameters[.level] = $0 } + return AppEvent(name: .achievedLevel, parameters: parameters, valueToSum: valueToSum) + } + + /** + Create an app event that indicatest that a user has unlocked an achievement. + + - parameter description: Optional achievement description. + - parameter valueToSum: Optional value to sum. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func unlockedAchievement(description: String? = nil, + valueToSum: Double? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + description.onSome { parameters[.description] = $0 } + return AppEvent(name: .unlockedAchievement, parameters: parameters, valueToSum: valueToSum) + } + + /** + Create an event that indicatest that a user spent in-app credits. + + - parameter contentType: Optional content type. + - parameter contentId: Optional content identifier. + - parameter contentData: Optional content data. + - parameter valueToSum: Optional value to sum. + - parameter extraParameters: Optional dictionary of extra parameters. + + - returns: An app event that can be logged via `AppEventsLogger`. + */ + static func spentCredits(contentType: String? = nil, + contentId: String? = nil, + contentData: String? = nil, + valueToSum: Double? = nil, + extraParameters: ParametersDictionary = [:]) -> AppEvent { + var parameters = extraParameters + contentType.onSome { parameters[.contentType] = $0 } + contentId.onSome { parameters[.contentId] = $0 } + contentData.onSome { parameters[.content] = $0 } + return AppEvent(name: .spentCredits, parameters: parameters, valueToSum: valueToSum) + } +} diff --git a/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.swift b/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.swift new file mode 100644 index 0000000..fbb7eb1 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/AppEvents/AppEvent.swift @@ -0,0 +1,112 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +/** + Represents a single application event that can be logged to Facebook Analytics. + */ +public struct AppEvent: AppEventLoggable { + public typealias ParametersDictionary = [AppEventParameterName: AppEventParameterValueType] + + /// Name of the application event. + public let name: AppEventName + + /// Arbitrary parameter dictionary of characteristics of an event. + public var parameters: ParametersDictionary + + /** + Amount to be aggregated into all events of this eventName. + App Insights will report the cumulative and average value of this amount. + */ + public var valueToSum: Double? + + /** + Creates an app event. + + - parameter name: App event name. + - parameter parameters: Parameters dictionary. Default: empty. + - parameter valueToSum: Optional value to sum. Default: `nil`. + */ + public init(name: AppEventName, parameters: ParametersDictionary = [:], valueToSum: Double? = nil) { + self.name = name + self.parameters = parameters + self.valueToSum = valueToSum + } + + /** + Creates an app event. + + - parameter name: String representation of app event name. + - parameter parameters: Parameters dictionary. Default: empty. + - parameter valueToSum: Optional value to sum. Default: `nil`. + */ + public init(name: String, parameters: ParametersDictionary = [:], valueToSum: Double? = nil) { + self.init(name: AppEventName(name), parameters: parameters, valueToSum: valueToSum) + } +} + +/** + Protocol that describes a single application event that can be logged to Facebook Analytics. + */ +public protocol AppEventLoggable { + /// Name of the application event. + var name: AppEventName { get } + /// Arbitrary parameter dictionary of characteristics of an event. + var parameters: AppEvent.ParametersDictionary { get } + /// Amount to be aggregated into all events of this eventName. + var valueToSum: Double? { get } +} + +/** + Conforming types that can be logged as a parameter value of `AppEventLoggable`. + By default implemented for `NSNumber`, `String`, `IntegerLiteralType` and `FloatLiteralType`. + Should only return either a `String` or `NSNumber`. + */ +public protocol AppEventParameterValueType { + /// Object value. Can be either `NSNumber` or `String`. + var appEventParameterValue: Any { get } +} + +extension NSNumber: AppEventParameterValueType { + /// An object representation of `self`, suitable for parameter value of `AppEventLoggable`. + public var appEventParameterValue: Any { + return self + } +} + +extension IntegerLiteralType: AppEventParameterValueType { + /// An object representation of `self`, suitable for parameter value of `AppEventLoggable`. + public var appEventParameterValue: Any { + return self as NSNumber + } +} + +extension FloatLiteralType: AppEventParameterValueType { + /// An object representation of `self`, suitable for parameter value of `AppEventLoggable`. + public var appEventParameterValue: Any { + return self as NSNumber + } +} + +extension String: AppEventParameterValueType { + /// An object representation of `self`, suitable for parameter value of `AppEventLoggable`. + public var appEventParameterValue: Any { + return self + } +} diff --git a/Pods/FacebookCore/Sources/Core/AppEvents/AppEventName.swift b/Pods/FacebookCore/Sources/Core/AppEvents/AppEventName.swift new file mode 100644 index 0000000..e5f79a9 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/AppEvents/AppEventName.swift @@ -0,0 +1,167 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit.FBSDKAppEvents + +/** + Represents a name of the Facebook Analytics application event. + Could either be one of built-in names or a custom `String`. + + - seealso: AppEvent + - seealso: AppEventLoggable + */ +public enum AppEventName: Hashable, RawRepresentable, CustomStringConvertible, ExpressibleByStringLiteral { + + // MARK: General + + /// Name of the event that indicates that the user has completed a registration. + case completedRegistration + /// Name of the event that indicates that the user has completed a tutorial. + case completedTutorial + /// Name of the event that indicates that the user has viewed a content. + case viewedContent + /// Name of the event that indicates that the user has performed search within the application. + case searched + /// Name of the event that indicates that the user has has rated an item in the app. + case rated + + // MARK: Commerce + + /// Name of the event that indicates that the user has purchased something in the application. + case purchased + /// Name of the event that indicates that the user has added an item to the cart. + case addedToCart + /// Name of the event that indicates that the user has added an item to the wishlist. + case addedToWishlist + /// Name of the event that indicates that the user has added payment information. + case addedPaymentInfo + /// Name of the event that indicates that the user has initiated a checkout. + case initiatedCheckout + + // MARK: Gaming + + /// Name of the event that indicates that the user has achieved a level. + case achievedLevel + /// Name of the event that indicates that the user has unlocked an achievement. + case unlockedAchievement + /// Name of the event that indicates that the user has spent in-app credits. + case spentCredits + + // MARK: Custom + + /// Custom name of the event that is represented by a string. + case custom(String) + + /** + Create an `AppEventName` from `String`. + + - parameter string: String to create an app event name from. + */ + public init(_ string: String) { + self = .custom(string) + } + + // MARK: RawRepresentable + + /** + Create an `AppEventName` from `String`. + + - parameter rawValue: String to create an app event name from. + */ + public init?(rawValue: String) { + self = .custom(rawValue) + } + + /// The corresponding `String` value. + public var rawValue: String { + switch self { + case .completedRegistration: return FBSDKAppEventNameCompletedRegistration + case .completedTutorial: return FBSDKAppEventNameCompletedTutorial + case .viewedContent: return FBSDKAppEventNameViewedContent + case .searched: return FBSDKAppEventNameSearched + case .rated: return FBSDKAppEventNameRated + + case .purchased: return "fb_mobile_purchase" // Hard-coded as a string, since it's internal API of FBSDKCoreKit. + case .addedToCart: return FBSDKAppEventNameAddedToCart + case .addedToWishlist: return FBSDKAppEventNameAddedToWishlist + case .addedPaymentInfo: return FBSDKAppEventNameAddedPaymentInfo + case .initiatedCheckout: return FBSDKAppEventNameInitiatedCheckout + + case .achievedLevel: return FBSDKAppEventNameAchievedLevel + case .unlockedAchievement: return FBSDKAppEventNameUnlockedAchievement + case .spentCredits: return FBSDKAppEventNameSpentCredits + + case .custom(let string): return string + } + } + + // MARK: ExpressibleByStringLiteral + + /** + Create an `AppEventName` from a string literal. + + - parameter value: The string literal to create from. + */ + public init(stringLiteral value: StringLiteralType) { + self = .custom(value) + } + + /** + Create an `AppEventName` from a unicode scalar literal. + + - parameter value: The string literal to create from. + */ + public init(unicodeScalarLiteral value: String) { + self.init(stringLiteral: value) + } + + /** + Create an `AppEventName` from an extended grapheme cluster. + + - parameter value: The string literal to create from. + */ + public init(extendedGraphemeClusterLiteral value: String) { + self.init(stringLiteral: value) + } + + // MARK: Hashable + + /// The hash value. + public var hashValue: Int { + return self.rawValue.hashValue + } + + /** + Compare two `AppEventName`s for equality. + + - parameter lhs: The first app event name to compare. + - parameter rhs: The second app event name to compare. + + - returns: Whether or not the app event names are equal. + */ + public static func == (lhs: AppEventName, rhs: AppEventName) -> Bool { + return lhs.rawValue == rhs.rawValue + } + + // MARK: CustomStringConvertible + + /// Textual representation of an app event name. + public var description: String { + return rawValue + } +} diff --git a/Pods/FacebookCore/Sources/Core/AppEvents/AppEventParameterName.swift b/Pods/FacebookCore/Sources/Core/AppEvents/AppEventParameterName.swift new file mode 100644 index 0000000..7f687aa --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/AppEvents/AppEventParameterName.swift @@ -0,0 +1,145 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit.FBSDKAppEvents + +/** + Represents a parameter name of the Facebook Analytics application event. + */ +public enum AppEventParameterName: Hashable, RawRepresentable, ExpressibleByStringLiteral, CustomStringConvertible { + /// Data for the one or more pieces of content being logged about. + case content + /// Identifier for the specific piece of content. + case contentId + /// Type of the content, e.g. "music"/"photo"/"video". + case contentType + /// Currency. E.g. "USD"/"EUR"/"GBP". See ISO-4217 for specific values. + case currency + /// Appropriate description for the event. + case description + /// Current level or level achieved. + case level + /// Maximum rating available. E.g. "5"/"10". + case maxRatingValue + /// Count of items being proccessed. + case itemCount + /// Boolean value indicating whether payment information is available. + case paymentInfoAvailable + /// Registration method used. E.g. "Facebook"/"email"/"sms". + case registrationMethod + /// String provided by the user for a search operation. + case searchedString + /// Boolean value indicating wehtehr an activity being logged was succesful. + case successful + /// Custom name of the parameter that is represented by a string. + case custom(String) + + /** + Create an `AppEventParameterName` from `String`. + + - parameter string: String to create an app event name from. + */ + public init(_ string: String) { + self = .custom(string) + } + + // MARK: RawRepresentable + + /** + Create an `AppEventParameterName` from `String`. + + - parameter rawValue: String to create an app event name from. + */ + public init?(rawValue: String) { + self = .custom(rawValue) + } + + /// The corresponding `String` value. + public var rawValue: String { + switch self { + case .content: return FBSDKAppEventParameterNameContent + case .contentId: return FBSDKAppEventParameterNameContentID + case .contentType: return FBSDKAppEventParameterNameContentType + case .currency: return FBSDKAppEventParameterNameCurrency + case .description: return FBSDKAppEventParameterNameDescription + case .level: return FBSDKAppEventNameAchievedLevel + case .maxRatingValue: return FBSDKAppEventParameterNameMaxRatingValue + case .itemCount: return FBSDKAppEventParameterNameNumItems + case .paymentInfoAvailable: return FBSDKAppEventParameterNamePaymentInfoAvailable + case .registrationMethod: return FBSDKAppEventParameterNameRegistrationMethod + case .searchedString: return FBSDKAppEventParameterNameSearchString + case .successful: return FBSDKAppEventParameterNameSuccess + case .custom(let string): return string + } + } + + // MARK: ExpressibleByStringLiteral + + /** + Create an `AppEventParameterName` from a string literal. + + - parameter value: The string literal to create from. + */ + public init(stringLiteral value: StringLiteralType) { + self = .custom(value) + } + + /** + Create an `AppEventParameterName` from a unicode scalar literal. + + - parameter value: The string literal to create from. + */ + public init(unicodeScalarLiteral value: String) { + self.init(stringLiteral: value) + } + + /** + Create an `AppEventParameterName` from an extended grapheme cluster. + + - parameter value: The string literal to create from. + */ + public init(extendedGraphemeClusterLiteral value: String) { + self.init(stringLiteral: value) + } + + // MARK: Hashable + + /// The hash value. + public var hashValue: Int { + return self.rawValue.hashValue + } + + /** + Compare two `AppEventParameterName`s for equality. + + - parameter lhs: The first parameter name to compare. + - parameter rhs: The second parameter name to compare. + + - returns: Whether or not the parameter names are equal. + */ + public static func == (lhs: AppEventParameterName, rhs: AppEventParameterName) -> Bool { + return lhs.rawValue == rhs.rawValue + } + + // MARK: CustomStringConvertible + + /// Textual representation of an app event parameter name. + public var description: String { + return rawValue + } +} diff --git a/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.FlushBehavior.swift b/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.FlushBehavior.swift new file mode 100644 index 0000000..66c1c8c --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.FlushBehavior.swift @@ -0,0 +1,52 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit.FBSDKAppEvents + +public extension AppEventsLogger { + /** + Specifies when `AppEventsLogger` sends log events to the server. + */ + enum FlushBehavior { + /** + Flush automatically: periodically (once a minute or every 100 logged events) and always at app reactivation. + */ + case auto + + /** + Only flush when the `flush` method is called. + When an app is moved to background/terminated, the events are persisted and re-established at activation, + but they will only be written with an explicit call to `flush`. + */ + case explicitOnly + + internal init(sdkFlushBehavior: FBSDKAppEventsFlushBehavior) { + switch sdkFlushBehavior { + case .auto: self = .auto + case .explicitOnly: self = .explicitOnly + } + } + + internal var sdkFlushBehavior: FBSDKAppEventsFlushBehavior { + switch self { + case .auto: return .auto + case .explicitOnly: return .explicitOnly + } + } + } +} diff --git a/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.swift b/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.swift new file mode 100644 index 0000000..d3d8622 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/AppEvents/AppEventsLogger.swift @@ -0,0 +1,248 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit.FBSDKAppEvents +import Foundation + +/** + Client-side event logging for specialized application analytics available through Facebook App Insights + and for use with Facebook Ads conversion tracking and optimization. + + The `AppEventsLogger` static class has a few related roles: + + * Logging predefined and application-defined events to Facebook App Insights with a + numeric value to sum across a large number of events, and an optional set of key/value + parameters that define "segments" for this event (e.g., 'purchaserStatus' : 'frequent', or + 'gamerLevel' : 'intermediate') + + * Logging events to later be used for ads optimization around lifetime value. + + * Methods that control the way in which events are flushed out to the Facebook servers. + + Here are some important characteristics of the logging mechanism provided by `AppEventsLogger`: + + * Events are not sent immediately when logged. They're cached and flushed out to the Facebook servers + in a number of situations: + * when an event count threshold is passed (currently 100 logged events). + * when a time threshold is passed (currently 15 seconds). + * when an app has gone to background and is then brought back to the foreground. + + * Events will be accumulated when the app is in a disconnected state, and sent when the connection is + restored and one of the above 'flush' conditions are met. + + * The `AppEventsLogger` class is thread-safe in that events may be logged from any of the app's threads. + + * The developer can set the `flushBehavior` to force the flushing of events to only + occur on an explicit call to the `flush` method. + + * The developer can turn on console debug output for event logging and flushing to the server by using + the `FBSDKLoggingBehaviorAppEvents` value in `[FBSettings setLoggingBehavior:]`. + + Some things to note when logging events: + + * There is a limit on the number of unique event names an app can use, on the order of 1000. + * There is a limit to the number of unique parameter names in the provided parameters that can be used per event, + on the order of 25. This is not just for an individual call, but for all invocations for that eventName. + * Event names and parameter names (the keys in the Dictionary) must be between 2 and 40 characters, + and must consist of alphanumeric characters, _, -, or spaces. + * The length of each parameter value can be no more than on the order of 100 characters. + */ +public enum AppEventsLogger { + + public typealias UpdateUserPropertiesCompletion = + (_ httpResponse: HTTPURLResponse?, _ result: GraphRequestResult) -> Void + + //-------------------------------------- + // MARK: - Activate + //-------------------------------------- + + /** + Notifies the events system that the app has launched and, when appropriate, logs an "activated app" event. + Should typically be placed in the app delegates' `applicationDidBecomeActive()` function. + + This method also takes care of logging the event indicating the first time this app has been launched, + which, among other things, is used to track user acquisition and app install ads conversions. + + `activate()` will not log an event on every app launch, + since launches happen every time the app is backgrounded and then foregrounded. + "activated app" events will be logged when the app has not been active for more than 60 seconds. + This method also causes a "deactivated app" event to be logged when sessions are "completed", + and these events are logged with the session length, + with an indication of how much time has elapsed between sessions, + and with the number of background/foreground interruptions that session had. + This data is all visible in your app's App Events Insights. + + - parameter application: Optional instance of UIApplication. Default: `UIApplication.sharedApplication()`. + */ + public static func activate(_ application: UIApplication = UIApplication.shared) { + FBSDKAppEvents.activateApp() + } + + //-------------------------------------- + // MARK: - Log Events + //-------------------------------------- + + /** + Log an app event. + + - parameter event: The application event to log. + - parameter accessToken: Optional access token to use to log the event. Default: `AccessToken.current`. + */ + public static func log(_ event: AppEventLoggable, accessToken: AccessToken? = AccessToken.current) { + let valueToSum = event.valueToSum.map { NSNumber(value: $0 as Double) } + let parameters = event.parameters.keyValueMap { + ($0.0.rawValue as NSString, $0.1.appEventParameterValue) + } + FBSDKAppEvents.logEvent(event.name.rawValue, + valueToSum: valueToSum, + parameters: parameters, + accessToken: accessToken?.sdkAccessTokenRepresentation) + } + + /** + Log an app event. + + This overload is required, so dot-syntax works in this example: + ``` + AppEventsLogger().log(.Searched()) + ``` + + - parameter event: The application event to log. + - parameter accessToken: Optional access token to use to log the event. Default: `AccessToken.current`. + */ + public static func log(_ event: AppEvent, accessToken: AccessToken? = AccessToken.current) { + log(event as AppEventLoggable, accessToken: accessToken) + } + + /** + Log an app event. + + - parameter eventName: The name of the event to record. + - parameter parameters: Arbitrary parameter dictionary of characteristics. + - parameter valueToSum: Amount to be aggregated into all events of this eventName, and App Insights will report + the cumulative and average value of this amount. + - parameter accessToken: The optional access token to log the event as. Default: `AccessToken.current`. + */ + public static func log(_ eventName: String, + parameters: AppEvent.ParametersDictionary = [:], + valueToSum: Double? = nil, + accessToken: AccessToken? = AccessToken.current) { + let event = AppEvent(name: AppEventName(eventName), parameters: parameters, valueToSum: valueToSum) + log(event, accessToken: accessToken) + } + + //-------------------------------------- + // MARK: - Push Notifications + //-------------------------------------- + + /** + Sets a device token to register the current application installation for push notifications. + */ + public static var pushNotificationsDeviceToken: Data? { + didSet { + FBSDKAppEvents.setPushNotificationsDeviceToken(pushNotificationsDeviceToken) + } + } + + //-------------------------------------- + // MARK: - Flush + //-------------------------------------- + + /** + The current event flushing behavior specifying when events are sent to Facebook. + */ + public static var flushBehavior: FlushBehavior { + get { + return FlushBehavior(sdkFlushBehavior: FBSDKAppEvents.flushBehavior()) + } + set { + FBSDKAppEvents.setFlushBehavior(newValue.sdkFlushBehavior) + } + } + + /** + Explicitly kick off flushing of events to Facebook. + This is an asynchronous method, but it does initiate an immediate kick off. + Server failures will be reported through the NotificationCenter with notification ID + `FBSDKAppEventsLoggingResultNotification`. + */ + public static func flush() { + FBSDKAppEvents.flush() + } + + //-------------------------------------- + // MARK: - Override App Id + //-------------------------------------- + + /** + Facebook application id that is going to be used for logging all app events. + + In some cases, you might want to use one Facebook App ID for login + and social presence and another for App Event logging. + (An example is if multiple apps from the same company share an app ID for login, but want distinct logging.) + By default, this value defers to the `FBSDKAppEventsOverrideAppIDBundleKey` plist value. + If that's not set, it defaults to `FBSDKSettings.appId`. + */ + public static var loggingAppId: String? { + get { + if let appId = FBSDKAppEvents.loggingOverrideAppID() { + return appId + } + return FBSDKSettings.appID() + } + set { + return FBSDKAppEvents.setLoggingOverrideAppID(newValue) + } + } + + //-------------------------------------- + // MARK: - User Id + //-------------------------------------- + + /// + /// A custom user identifier to associate with all app events. + /// The `userId` is persisted until it is cleared by passing `nil`. + /// + public static var userId: String? { + get { + return FBSDKAppEvents.userID() as String? + } + set { + FBSDKAppEvents.setUserID(newValue) + } + } + + //-------------------------------------- + // MARK: - User Parameters + //-------------------------------------- + + /** + Sends a request to update the properties for the current user, set by `AppEventsLogger.userId`. + + - parameter properties: A dictionary of key-value pairs representing user properties and their values. + Values should be strings or numbers only. Each key must be less than 40 character in length, + and the key can contain only letters, number, whitespace, hyphens (`-`), or underscores (`_`). + Each value must be less than 100 characters. + - parameter completion: Optional completion closure that is going to be called when the request finishes or fails. + */ + public static func updateUserProperties(_ properties: [String: Any], + completion: @escaping UpdateUserPropertiesCompletion) { + FBSDKAppEvents.updateUserProperties(properties, + handler: GraphRequestConnection.sdkRequestCompletion(from: completion)) + } +} diff --git a/Pods/FacebookCore/Sources/Core/Common/AccessToken.swift b/Pods/FacebookCore/Sources/Core/Common/AccessToken.swift new file mode 100644 index 0000000..94643cc --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/Common/AccessToken.swift @@ -0,0 +1,144 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit +import Foundation + +//-------------------------------------- +// MARK: - Access Token +//-------------------------------------- + +/** + Represents an immutable access token used to authenticate with Facebook services. + */ +public struct AccessToken { + + /// The application id for this token. + public let appId: String + + /// An opaque authentication token. + public let authenticationToken: String + + /// The logged in user identifier. + public let userId: String? + + /// The date the token was last refreshed. + public let refreshDate: Date + + /// The expirate date for the token. + public let expirationDate: Date + + /// Known granted permissions. + public let grantedPermissions: Set? + + /// Known declined permissions. + public let declinedPermissions: Set? + + /** + Creates a new access token instance. + + - parameter appId: Optional application id for this token. Default: `SDKSettings.appId`. + - parameter authenticationToken: An opaque authentication token. + - parameter userId: Optional logged in user identifier. + - parameter refreshDate: Optional date the token was last refreshed (defaults to current date). + - parameter expirationDate: Optional expiration date (defaults to `NSDate.distantFuture()`). + - parameter grantedPermissions: Set of known granted permissions. + - parameter declinedPermissions: Set of known declined permissions. + */ + public init(appId: String = SDKSettings.appId, + authenticationToken: String, + userId: String? = nil, + refreshDate: Date = Date(), + expirationDate: Date = Date.distantFuture, + grantedPermissions: Set? = nil, + declinedPermissions: Set? = nil) { + self.appId = appId + self.authenticationToken = authenticationToken + self.userId = userId + self.refreshDate = refreshDate + self.expirationDate = expirationDate + self.grantedPermissions = grantedPermissions + self.declinedPermissions = declinedPermissions + } + + //-------------------------------------- + // MARK: - Current Token + //-------------------------------------- + + /** + A convenient representation of the authentication token of the current user + that is used by other SDK components (like `LoginManager` or `AppEventsLogger`). + */ + public static var current: AccessToken? { + get { + let token = FBSDKAccessToken.current() as FBSDKAccessToken? + return token.map(AccessToken.init) + } + set { + FBSDKAccessToken.setCurrent(newValue?.sdkAccessTokenRepresentation) + } + } + + /** + Refresh the current access token's permission state and extend the token's expiration date, if possible. + + On a successful refresh, the `current` access token will be updated automatically, so you don't need to set it again. + + - note: If a token is already expired, it can't be refreshed. + - parameter completion: Optional completion to call when the token was refreshed or failed. + */ + public static func refreshCurrentToken(_ completion: ((AccessToken?, Error?) -> Void)? = nil) { + FBSDKAccessToken.refreshCurrentAccessToken { (_, _, error: Error?) in + completion?(self.current, error) + } + } + + //-------------------------------------- + // MARK: - Internal + //-------------------------------------- + + internal init(sdkAccessToken: FBSDKAccessToken) { + self.init(appId: sdkAccessToken.appID, + authenticationToken: sdkAccessToken.tokenString, + userId: sdkAccessToken.userID, + refreshDate: sdkAccessToken.refreshDate, + expirationDate: sdkAccessToken.expirationDate, + grantedPermissions: sdkAccessToken.grantedSwiftPermissions, + declinedPermissions: sdkAccessToken.declinedSwiftPermissions) + } + + internal var sdkAccessTokenRepresentation: FBSDKAccessToken { + return FBSDKAccessToken(tokenString: authenticationToken, + permissions: grantedPermissions?.map { $0.name }, + declinedPermissions: declinedPermissions?.map { $0.name }, + appID: appId, + userID: userId, + expirationDate: expirationDate, + refreshDate: refreshDate) + } +} + +private extension FBSDKAccessToken { + var grantedSwiftPermissions: Set? { + return (permissions?.compactMap { $0 as? String }.map { Permission(name: $0) }).map(Set.init) + } + + var declinedSwiftPermissions: Set? { + return (declinedPermissions?.compactMap { $0 as? String }.map { Permission(name: $0) }).map(Set.init) + } +} diff --git a/Pods/FacebookCore/Sources/Core/Common/SDKApplicationDelegate.swift b/Pods/FacebookCore/Sources/Core/Common/SDKApplicationDelegate.swift new file mode 100644 index 0000000..cb3ba13 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/Common/SDKApplicationDelegate.swift @@ -0,0 +1,102 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit +import Foundation +import UIKit + +/** + The `SDKApplicationDelegate` is designed to post process the results from Facebook Login or Facebook Dialogs + (or any action that requires switching over to the native Facebook app or Safari). + + The methods in this class are designed to mirror those in UIApplicationDelegate, and you + should call them in the respective methods in your AppDelegate implementation. + */ +public final class SDKApplicationDelegate { + private weak var delegate: FBSDKApplicationDelegate? + + /// Returns the singleton instance of an application delegate. + public static let shared: SDKApplicationDelegate = SDKApplicationDelegate() + + private init() { + self.delegate = FBSDKApplicationDelegate.sharedInstance() + } + + /** + Call this function from the `UIApplicationDelegate.application(application:didFinishLaunchingWithOptions:)` function + of the AppDelegate of your app It should be invoked for the proper initialization of the Facebook SDK. + + - parameter application: The application as passed to `UIApplicationDelegate`. + - parameter launchOptions: The launchOptions as passed to `UIApplicationDelegate`. + + - returns: `true` if the url contained in the `launchOptions` was intended for the Facebook SDK, otherwise - `false`. + */ + @discardableResult + public func + application(_ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { + return delegate?.application(application, didFinishLaunchingWithOptions: launchOptions) ?? false + } + + /** + Call this function from the `UIApplicationDelegate.application(application:openURL:sourceApplication:annotation:)` + function of the AppDelegate for your app. It should be invoked for the proper processing of responses during + interaction with the native Facebook app or Safari as part of SSO authorization flow or Facebook dialogs. + + - parameter application: The application as passed to `UIApplicationDelegate`. + - parameter url: The URL as passed to `UIApplicationDelegate`. + - parameter sourceApplication: The sourceApplication as passed to `UIApplicationDelegate`. + - parameter annotation: The annotation as passed to `UIApplicationDelegate`. + + - returns: `true` if the url was intended for the Facebook SDK, otherwise - `false`. + */ + @available(iOS, deprecated: 9.0, message: "Please use application(_:open:options:).") + @discardableResult + public func application(_ application: UIApplication, + open url: URL, + sourceApplication: String?, + annotation: Any) -> Bool { + return delegate?.application(application, + open: url, + sourceApplication: sourceApplication, + annotation: annotation) ?? false + } + + /** + Call this function from the `UIApplicationDelegate.application(app:openURL:options:)` + function of the AppDelegate for your app. + It should be invoked for the proper processing of responses during interaction + with the native Facebook app or Safari as part of SSO authorization flow or Facebook dialogs. + + - parameter app: The application as passed to `UIApplicationDelegate`. + - parameter url: The URL as passed to `UIApplicationDelegate`. + - parameter options: The options as passed to `UIApplicationDelegate`. + + - returns: `true` if the url was intended for the Facebook SDK, otherwise - `false`. + */ + @available(iOS 9.0, *) + @discardableResult + public func application(_ app: UIApplication, + open url: URL, + options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { + return delegate?.application(app, + open: url, + sourceApplication: options[.sourceApplication] as? String, + annotation: options[.annotation]) ?? false + } +} diff --git a/Pods/FacebookCore/Sources/Core/Common/SDKLoggingBehavior.swift b/Pods/FacebookCore/Sources/Core/Common/SDKLoggingBehavior.swift new file mode 100644 index 0000000..969bbed --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/Common/SDKLoggingBehavior.swift @@ -0,0 +1,90 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit.FBSDKSettings + +/** + Defines logging behavior used by the SDK. + To set/enable/disable specific behaviors use `Settings.loggingBehaviors`. + */ +public enum SDKLoggingBehavior { + /// Include access token in logging. + case accessTokens + + /// Log performance characteristics + case performanceCharacteristics + + /// Log `AppEventsLogger` interactions. + case appEvents + + /// Log informational occurences. + case informational + + /// Log cache errors. + case cacheErrors + + /// Log errors from SDK UI controls. + case uiControlErrors + + /// Log debug warnings from API responses, e.g. when friends fields were requested, + /// but `user_friends` permissions isn't granted. + case graphAPIDebugWarning + + /** + Log warnings from API responses, e.g. when requested feature will be deprecated in next version of API. + Info is the lowest level of severity, using it will result in logging all previously mentioned levels. + */ + case graphAPIDebugInfo + + /// Log errors from SDK network requests. + case networkRequests + + /// Log errors likely to be preventable by the developer. This behavior is enabled by default. + case developerErrors + + internal init?(sdkStringValue: String) { + switch sdkStringValue { + case FBSDKLoggingBehaviorAccessTokens: self = .accessTokens + case FBSDKLoggingBehaviorPerformanceCharacteristics: self = .performanceCharacteristics + case FBSDKLoggingBehaviorAppEvents: self = .appEvents + case FBSDKLoggingBehaviorInformational: self = .informational + case FBSDKLoggingBehaviorCacheErrors: self = .cacheErrors + case FBSDKLoggingBehaviorUIControlErrors: self = .uiControlErrors + case FBSDKLoggingBehaviorGraphAPIDebugWarning: self = .graphAPIDebugWarning + case FBSDKLoggingBehaviorGraphAPIDebugInfo: self = .graphAPIDebugInfo + case FBSDKLoggingBehaviorNetworkRequests: self = .networkRequests + case FBSDKLoggingBehaviorDeveloperErrors: self = .developerErrors + default: return nil + } + } + + internal var sdkStringValue: String { + switch self { + case .accessTokens: return FBSDKLoggingBehaviorAccessTokens + case .performanceCharacteristics: return FBSDKLoggingBehaviorPerformanceCharacteristics + case .appEvents: return FBSDKLoggingBehaviorAppEvents + case .informational: return FBSDKLoggingBehaviorInformational + case .cacheErrors: return FBSDKLoggingBehaviorCacheErrors + case .uiControlErrors: return FBSDKLoggingBehaviorUIControlErrors + case .graphAPIDebugWarning: return FBSDKLoggingBehaviorGraphAPIDebugWarning + case .graphAPIDebugInfo: return FBSDKLoggingBehaviorGraphAPIDebugInfo + case .networkRequests: return FBSDKLoggingBehaviorNetworkRequests + case .developerErrors: return FBSDKLoggingBehaviorDeveloperErrors + } + } +} diff --git a/Pods/FacebookCore/Sources/Core/Common/SDKSettings.swift b/Pods/FacebookCore/Sources/Core/Common/SDKSettings.swift new file mode 100644 index 0000000..675f551 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/Common/SDKSettings.swift @@ -0,0 +1,181 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit.FBSDKSettings +import UIKit + +//-------------------------------------- +// MARK: - SDK Version +//-------------------------------------- + +/// Current SDK version. +public let SDKVersion = FBSDKSettings.sdkVersion() + +//-------------------------------------- +// MARK: - SDKSettings +//-------------------------------------- + +/** + Provides access to settings and configuration used by the entire SDK. + */ +public enum SDKSettings { + /** + Facebook App ID used by the SDK. + Default value is read from the application's Info.plist under `FacebookAppId` key. + */ + public static var appId: String { + get { + return FBSDKSettings.appID() + } + set { + FBSDKSettings.setAppID(newValue) + } + } + + /** + The default url scheme suffix used for sessions. + Default value is read from the applicaiton's Info.plist under `FacebookUrlSchemeSuffix` key. + */ + public static var appURLSchemeSuffix: String { + get { + return FBSDKSettings.appURLSchemeSuffix() + } + set { + FBSDKSettings.setAppURLSchemeSuffix(newValue) + } + } + + /** + The client token used by the SDK. + It's is required for certain API calls when made anonymously aka without a user-based access token. + + Default value is read from the application's Info.plist under `FacebookClientToken` key. + */ + public static var clientToken: String? { + get { + return FBSDKSettings.clientToken() + } + set { + FBSDKSettings.setClientToken(clientToken) + } + } + + /** + Facebook Display Name used by the SDK. + Default value is read from the application's Info.plist under `FacebookDisplayName` key. + */ + public static var displayName: String? { + get { + return FBSDKSettings.displayName() + } + set { + FBSDKSettings.setDisplayName(newValue) + } + } + + /** + Facebook sudomain name used by the SDK. + This can be used to add the subdomain for all network requests that SDK is sending, + e.g. setting this to `"beta"` will make all graph requests to be sent to `graph.beta.facebook.com`. + Default value is read from the application's Info.plist under `FacebookDomainPart` key. + */ + public static var facebookSubdomain: String? { + get { + return FBSDKSettings.facebookDomainPart() + } + set { + FBSDKSettings.setFacebookDomainPart(newValue) + } + } + + /** + The quality of JPEG images sent to Facebook from the SDK. + Default value is `0.9`. + */ + public static var JPEGCompressionQuality: Double { + get { + return Double(FBSDKSettings.jpegCompressionQuality()) + } + set { + FBSDKSettings.setJPEGCompressionQuality(CGFloat(newValue)) + } + } + + /** + If enabled, data such as that generated through `AppEventsLogger` and sent to Facebook + should be restricted from being used for other than analytics and conversions. + Defaults to `false`. This value is stored on the device and persists across app launches. + */ + public static var limitedEventAndDataUsage: Bool { + get { + return FBSDKSettings.limitEventAndDataUsage() + } + set { + FBSDKSettings.setLimitEventAndDataUsage(newValue) + } + } + + //-------------------------------------- + // MARK: - SDKSettings + Logging Behavior + //-------------------------------------- + + /** + Current logging behaviors of Facebook SDK. + The default enabled behavior is `.DeveloperErrors` only. + */ + public static var enabledLoggingBehaviors: Set { + get { + let createBehavior = { (object: AnyHashable) -> SDKLoggingBehavior? in + if let value = object as? String { + return SDKLoggingBehavior(sdkStringValue: value) + } + return nil + } + + #if swift(>=4.1) + let behaviors: [SDKLoggingBehavior] = FBSDKSettings.loggingBehavior().compactMap(createBehavior) + #else + let behaviors: [SDKLoggingBehavior] = FBSDKSettings.loggingBehavior().flatMap(createBehavior) + #endif + + return Set(behaviors) + } + set { + let behaviors = newValue.map { $0.sdkStringValue } + FBSDKSettings.setLoggingBehavior(Set(behaviors)) + } + } + + /** + Enable a particular Facebook SDK logging behavior. + + - parameter behavior: The behavior to enable + */ + public static func enableLoggingBehavior(_ behavior: SDKLoggingBehavior) { + FBSDKSettings.enableLoggingBehavior(behavior.sdkStringValue) + } + + /** + Disable a particular Facebook SDK logging behavior. + + - parameter behavior: The behavior to disable. + */ + public static func disableLoggingBehavior(_ behavior: SDKLoggingBehavior) { + FBSDKSettings.disableLoggingBehavior(behavior.sdkStringValue) + } +} diff --git a/Pods/FacebookCore/Sources/Core/GraphRequest/GraphAPIVersion.swift b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphAPIVersion.swift new file mode 100644 index 0000000..35eff37 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphAPIVersion.swift @@ -0,0 +1,84 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +import FBSDKCoreKit + +/** + Represents version of the Facebook Graph API. + + To find out the current latest version - refer to https://developers.facebook.com/docs/graph-api/overview + */ +public struct GraphAPIVersion: ExpressibleByStringLiteral, ExpressibleByFloatLiteral { + /// String representation of an api version. + public let stringValue: String + + /** + Represents the default Graph API version. + Note: This value may change between versions of the SDK. + */ + public static let defaultVersion: GraphAPIVersion = { + var version = FBSDK_TARGET_PLATFORM_VERSION + // ObjC SDK has a prefix of `v` on this constant + if version.hasPrefix("v") { + version = String(version.dropFirst()) + } + return GraphAPIVersion(stringLiteral: version) + }() + + // MARK: ExpressibleByStringLiteral + + /** + Create a `GraphAPIVersion` from a string literal. + + - parameter value: The string literal to create from. + */ + public init(stringLiteral value: StringLiteralType) { + stringValue = value + } + + /** + Create a `GraphAPIVersion` from a unicode scalar literal. + + - parameter value: The string literal to create from. + */ + public init(unicodeScalarLiteral value: String) { + self.init(stringLiteral: value) + } + + /** + Create a `GraphAPIVersion` from an extended grapheme cluster. + + - parameter value: The string literal to create from. + */ + public init(extendedGraphemeClusterLiteral value: String) { + self.init(stringLiteral: value) + } + + // MARK: ExpressibleByFloatLiteral + + /** + Create a `GraphAPIVersion` from a float literal. + + - parameter value: The float literal to create from. + */ + public init(floatLiteral value: FloatLiteralType) { + stringValue = String(format: "%.1f", value) + } +} diff --git a/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequest.swift b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequest.swift new file mode 100644 index 0000000..d303a28 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequest.swift @@ -0,0 +1,71 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +import FBSDKCoreKit + +/** + Represents a request to the Facebook Graph API. + + `GraphRequest` encapsulates the components of a request (the Graph API path, the parameters, error recovery behavior) + and should be used in conjunction with `GraphRequestConnection` to issue the request. + + Nearly all Graph APIs require an access token. + Unless specified, the `AccessToken.current` is used. Therefore, most requests + will require login first (see `LoginManager` in `FacebookLogin.framework`). + */ +public struct GraphRequest: GraphRequestProtocol { + public typealias Response = GraphResponse + + /// The Graph API endpoint to use for the request, e.g. `"me"`. + public let graphPath: String + + /// The request parameters. + public var parameters: [String: Any]? + + /// The `AccessToken` used by the request to authenticate. + public let accessToken: AccessToken? + + /// The `HTTPMethod` to use for the request, e.g. `.GET`/`.POST`/`.DELETE`. + public let httpMethod: GraphRequestHTTPMethod + + /// Graph API Version to use, e.g. `"2.7"`. Default: `GraphAPIVersion.defaultVersion`. + public let apiVersion: GraphAPIVersion + + /** + Initializes a new instance of graph request. + + - parameter graphPath: The Graph API endpoint to use for the request. + - parameter parameters: Optional parameters dictionary. + - parameter accessToken: Optional authentication token to use. Defaults to `AccessToken.current`. + - parameter httpMethod: Optional `GraphRequestHTTPMethod` to use for the request. Defaults to `.GET`. + - parameter apiVersion: Optional Graph API version to use. Defaults to `GraphAPIVersion.Default`. + */ + public init(graphPath: String, + parameters: [String: Any] = [:], + accessToken: AccessToken? = AccessToken.current, + httpMethod: GraphRequestHTTPMethod = .GET, + apiVersion: GraphAPIVersion = .defaultVersion) { + self.graphPath = graphPath + self.parameters = parameters + self.accessToken = accessToken + self.httpMethod = httpMethod + self.apiVersion = apiVersion + } +} diff --git a/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnection.swift b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnection.swift new file mode 100644 index 0000000..d0b954e --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnection.swift @@ -0,0 +1,156 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit.FBSDKGraphRequestConnection +import Foundation + +//-------------------------------------- +// MARK: - GraphRequestConnection +//-------------------------------------- +/** + Represents a single connection to Facebook to service a single or multiple requests. + + The request settings and properties are encapsulated in a reusable `GraphRequest` or a custom `GraphRequestProtocol`. + This object encapsulates the concerns of a single communication + e.g. starting a connection, canceling a connection, or batching requests. + */ +public class GraphRequestConnection { + /// A type of the closure that could be used to track network progress of a specific connection. + public typealias NetworkProgressHandler = + (_ bytesSent: Int64, _ totalBytesSent: Int64, _ totalExpectedBytes: Int64) -> Void + + /// A type of the closure that could be used to track network errors of a specific connection. + public typealias NetworkFailureHandler = (Error) -> Void + + /// Network progress closure that is going to be called every time data is sent to the server. + public var networkProgressHandler: NetworkProgressHandler? = nil { + didSet { + sdkDelegateBridge.networkProgressHandler = networkProgressHandler + } + } + + /** + Network failure handler that is going to be called when a connection fails with a network error. + Use completion on per request basis to get additional information, that is not related to network errors. + */ + public var networkFailureHandler: NetworkFailureHandler? = nil { + didSet { + sdkDelegateBridge.networkFailureHandler = networkFailureHandler + } + } + + /// The operation queue that is used to call all network handlers. + public var networkHandlerQueue: OperationQueue = OperationQueue.main { + didSet { + sdkConnection.setDelegateQueue(networkHandlerQueue) + } + } + + private var sdkConnection: FBSDKGraphRequestConnection = FBSDKGraphRequestConnection() + private var sdkDelegateBridge: GraphRequestConnectionDelegateBridge = GraphRequestConnectionDelegateBridge() + + /** + Initializes a connection. + */ + public init() { + sdkDelegateBridge.setupAsDelegateFor(sdkConnection) + } + + //-------------------------------------- + // MARK: - Requests + //-------------------------------------- + + public typealias Completion = + (_ httpResponse: HTTPURLResponse?, _ result: GraphRequestResult) -> Void + + /** + Adds a request object to this connection. + + - parameter request: Request to be included in this connection. + - parameter batchEntryName: Optional name for this request. + This can be used to feed the results of one request to the input of another, + as long as they are in the same `GraphRequestConnection` + As described in [Graph API Batch Requests](https://developers.facebook.com/docs/reference/api/batch/). + - parameter completion: Optional completion closure that is going to be called when the connection finishes or fails. + */ + public func add(_ request: T, + batchEntryName: String? = nil, + completion: Completion? = nil) { + let batchParameters = batchEntryName.map { ["name": $0] } + add(request, batchParameters: batchParameters as [String: Any]?, completion: completion) + } + + /** + Adds a request object to this connection. + + - parameter request: Request to be included in this connection. + - parameter batchParameters: Optional dictionary of parameters to include for this request + as described in [Graph API Batch Requests](https://developers.facebook.com/docs/reference/api/batch/). + Examples include "depends_on", "name", or "omit_response_on_success". + - parameter completion: Optional completion closure that is going to be called when the connection finishes or fails. + */ + public func add(_ request: T, + batchParameters: [String: Any]?, + completion: Completion? = nil) { + sdkConnection.add(request.sdkRequest, + completionHandler: completion.map(type(of: self).sdkRequestCompletion), + batchParameters: batchParameters) + } + + /** + Starts a connection with the server and sends all the requests in this connection. + - warning: This method can't be called twice per a single `GraphRequestConnection` instance. + */ + public func start() { + sdkConnection.start() + } + + /** + Signals that a connect should be logically terminated as per application is no longer interested in a response. + + Synchronouslly calls any handlers indicating the request was cancelled. + This doesn't guarantee that the request-related processing will cease. + It does promise that all handlers will complete before the cancel returns. + A call to `cancel` prior to a start implies a cancellation of all requests associated with the connection. + */ + public func cancel() { + sdkConnection.cancel() + } + + //-------------------------------------- + // MARK: - Private + //-------------------------------------- + + /// Custom typealias that is the same as FBSDKGraphRequestHandler, but without implicitly unwrapped optionals. + internal typealias SDKRequestCompletion = + (_ connection: FBSDKGraphRequestConnection?, _ rawResponse: Any?, _ error: Error?) -> Void + + internal static func sdkRequestCompletion(from completion: @escaping Completion) -> SDKRequestCompletion { + return { connection, rawResponse, error in + let result: GraphRequestResult = { + switch error { + case let error?: + return .failed(error) + default: + return .success(response: T.Response(rawResponse: rawResponse)) + } + }() + completion(connection?.urlResponse, result) + } + } +} diff --git a/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnectionDelegateBridge.swift b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnectionDelegateBridge.swift new file mode 100644 index 0000000..a07f12b --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestConnectionDelegateBridge.swift @@ -0,0 +1,48 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit.FBSDKGraphRequestConnection +import Foundation + +internal class GraphRequestConnectionDelegateBridge: NSObject, FBSDKGraphRequestConnectionDelegate { + var networkFailureHandler: GraphRequestConnection.NetworkFailureHandler? + var networkProgressHandler: GraphRequestConnection.NetworkProgressHandler? + + func setupAsDelegateFor(_ connection: FBSDKGraphRequestConnection) { + // We need for the connection to retain us, + // so we can stick around and keep calling into handlers, + // as long as the connection is alive/sending messages. + objc_setAssociatedObject(connection, Unmanaged.passUnretained(self).toOpaque(), self, .OBJC_ASSOCIATION_RETAIN) + connection.delegate = self + } + + // MARK: FBSDKGraphRequestConnectionDelegate + + // swiftlint:disable:next implicitly_unwrapped_optional + func requestConnection(_ connection: FBSDKGraphRequestConnection!, + didSendBodyData bytesWritten: Int, + totalBytesWritten: Int, + totalBytesExpectedToWrite: Int) { + networkProgressHandler?(Int64(bytesWritten), Int64(totalBytesWritten), Int64(totalBytesExpectedToWrite)) + } + + // swiftlint:disable:next implicitly_unwrapped_optional + func requestConnection(_ connection: FBSDKGraphRequestConnection!, didFailWithError error: Error!) { + networkFailureHandler?(error) + } +} diff --git a/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestDataAttachment.swift b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestDataAttachment.swift new file mode 100644 index 0000000..96085ae --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestDataAttachment.swift @@ -0,0 +1,57 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit +import Foundation + +/** + A container for data attachments so that additional metadata can be provided about the attachment + (like content type or filename). + */ +public class GraphRequestDataAttachment { + + /// The attachment data. + public let data: Data + + /// The file name of the attachment. + public let filename: String? + + /// The content type of the attachment. + public let contentType: String? + + /** + Initializes a data attachment + + - parameter data: The attachment data (retained, not copied). + - parameter filename: Optional filename for the attachment. Default: `nil`. + - parameter contentType: Optional content type for the attachment. Default: `nil`. + */ + public init(data: Data, filename: String? = nil, contentType: String? = nil) { + self.data = data + self.filename = filename + self.contentType = contentType + } + + //-------------------------------------- + // MARK: - Bridging + //-------------------------------------- + + internal var sdkDataAttachment: FBSDKGraphRequestDataAttachment { + return FBSDKGraphRequestDataAttachment(data: data, filename: filename, contentType: contentType) + } +} diff --git a/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.Bridge.swift b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.Bridge.swift new file mode 100644 index 0000000..8c964e1 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.Bridge.swift @@ -0,0 +1,40 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit.FBSDKGraphRequest +import Foundation + +extension GraphRequestProtocol { + internal var sdkRequest: FBSDKGraphRequest { + // TODO: (nlutsenko) Consider constraining `parameters` for specific types aka create `GraphRequestParameterValue` + let sdkParameters: [String: Any]? = parameters?.keyValueMap { key, value in + if let value = value as? GraphRequestDataAttachment { + return (key, value.sdkDataAttachment) + } + return (key, value) + } + + // ObjC SDK requires `v` as a prefix for the Graph API Version. + let apiVersion = "v" + self.apiVersion.stringValue + return FBSDKGraphRequest(graphPath: graphPath, + parameters: sdkParameters, + tokenString: accessToken?.authenticationToken, + version: apiVersion, + httpMethod: httpMethod.rawValue) + } +} diff --git a/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.swift b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.swift new file mode 100644 index 0000000..521436f --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestProtocol.swift @@ -0,0 +1,79 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +import FBSDKCoreKit + +/** + Protocol that represents a request to the Facebook Graph API. + + An implementation of this protocol is intended to be either generic and be used for a lot of separate endpoints, + or encapsulate a request + response type for a single endpoint, for example `Profile`. + + To send a request and receive a response - see `GraphRequestConnection`. + + Nearly all Graph APIs require an access token. + Unless specified, the `AccessToken.current` is used. Therefore, most requests + will require login first (see `LoginManager` in `FacebookLogin.framework`). + + A `start` function is provided for convenience for single requests. + */ +public protocol GraphRequestProtocol { + associatedtype Response: GraphResponseProtocol + + /// The Graph API endpoint to use for the request, e.g. `"me"`. + var graphPath: String { get } + + /// The request parameters. + var parameters: [String: Any]? { get } + + /// The `AccessToken` used by the request to authenticate. + var accessToken: AccessToken? { get } + + /// The `HTTPMethod` to use for the request, e.g. `.GET`/`.POST`/`.DELETE`. + var httpMethod: GraphRequestHTTPMethod { get } + + /// Graph API Version to use. Default: `GraphAPIVersion.defaultVersion`. + var apiVersion: GraphAPIVersion { get } +} + +public extension GraphRequestProtocol { + /** + A convenience method that creates and starts a connection to the Graph API. + + - parameter completion: Optional completion closure that is going to be called when the connection finishes or fails. + */ + func start(_ completion: GraphRequestConnection.Completion? = nil) { + let connection = GraphRequestConnection() + connection.add(self, completion: completion) + connection.start() + } +} + +/** + Represents HTTP methods that could be used to issue `GraphRequestProtocol`. + */ +public enum GraphRequestHTTPMethod: String { + /// `GET` graph request HTTP method. + case GET + /// `POST` graph request HTTP method. + case POST + /// `DELETE` graph request HTTP method. + case DELETE +} diff --git a/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestResult.swift b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestResult.swift new file mode 100644 index 0000000..6b75bbd --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphRequestResult.swift @@ -0,0 +1,34 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +/** + Represents result of a single request. + Can either be `.success` or `.failed` + */ +public enum GraphRequestResult { + /** + Represents succesful result of a `GraphRequestProtocol`. + Encapsulates response from the server. + */ + case success(response: T.Response) + /** + Represents errored result of a `GraphRequestProtocol`. + Encapsulates error that was encountered. + */ + case failed(Error) +} diff --git a/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponse.swift b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponse.swift new file mode 100644 index 0000000..f46a1f4 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponse.swift @@ -0,0 +1,60 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +/** + Represents a generic response that was received when `GraphRequest` succeeded. + */ +public struct GraphResponse: GraphResponseProtocol { + private let rawResponse: Any? + + /** + Initializes a `GraphResponse`. + + - parameter rawResponse: Raw response received from a server. + Usually is represented by either a `Dictionary` or `Array`. + */ + public init(rawResponse: Any?) { + self.rawResponse = rawResponse + } + + /** + Converts and returns a response in a form of `Dictionary`. + If the conversion fails or there is was response - returns `nil`. + */ + public var dictionaryValue: [String: Any]? { + return rawResponse as? [String: Any] + } + + /** + Converts and returns a response in a form of `Array` + If the conversion fails or there is was response - returns `nil`. + */ + public var arrayValue: [Any]? { + return rawResponse as? [Any] + } + + /** + Converts and returns a response in a form of `String`. + If the conversion fails or there is was response - returns `nil`. + */ + public var stringValue: String? { + return rawResponse as? String + } +} diff --git a/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponseProtocol.swift b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponseProtocol.swift new file mode 100644 index 0000000..f22f642 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/GraphRequest/GraphResponseProtocol.swift @@ -0,0 +1,32 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +/** + Protocol that represents a response for a given `GraphRequestProtocol`. + */ +public protocol GraphResponseProtocol { + /** + Initializes a response. + + - parameter rawResponse: Raw response received from a server. + Usually is represented by either a `Dictionary` or `Array`. + */ + init(rawResponse: Any?) +} diff --git a/Pods/FacebookCore/Sources/Core/Internal/Extensions/Dictionary+KeyValueMap.swift b/Pods/FacebookCore/Sources/Core/Internal/Extensions/Dictionary+KeyValueMap.swift new file mode 100644 index 0000000..51a496d --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/Internal/Extensions/Dictionary+KeyValueMap.swift @@ -0,0 +1,40 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +extension Dictionary { + func keyValueMap(_ transform: (Element) throws -> (K, V)) rethrows -> [K: V] { + var dictionary: [K: V] = [:] + try forEach { + let transformed = try transform($0) + dictionary[transformed.0] = transformed.1 + } + return dictionary + } + + func keyValueFlatMap(_ transform: (Element) throws -> (K?, V?)) rethrows -> [K: V] { + var dictionary: [K: V] = [:] + try forEach { + let transformed = try transform($0) + if let key = transformed.0, + let value = transformed.1 { + dictionary[key] = value + } + } + return dictionary + } +} diff --git a/Pods/FacebookCore/Sources/Core/Internal/Extensions/Optional+OnSome.swift b/Pods/FacebookCore/Sources/Core/Internal/Extensions/Optional+OnSome.swift new file mode 100644 index 0000000..8684ca1 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/Internal/Extensions/Optional+OnSome.swift @@ -0,0 +1,23 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +extension Optional { + internal func onSome(_ closure: (Wrapped) throws -> Void) rethrows { + _ = try map(closure) + } +} diff --git a/Pods/FacebookCore/Sources/Core/Permissions/Permission.swift b/Pods/FacebookCore/Sources/Core/Permissions/Permission.swift new file mode 100644 index 0000000..6e4bed9 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/Permissions/Permission.swift @@ -0,0 +1,91 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +/** + Represents a Graph API permission. + Each permission has its own set of requirements and suggested use cases. + See a full list at https://developers.facebook.com/docs/facebook-login/permissions + */ +public struct Permission: Hashable, ExpressibleByStringLiteral { + + /// Name of the permission. + public let name: String + + /** + Create a permission with a string value. + + - parameter name: Name of the permission. + */ + public init(name: String) { + self.name = name + } + + // MARK: ExpressibleByStringLiteral + + /** + Create a permission with a string value. + + - parameter value: String literal representation of the permission. + */ + public init(stringLiteral value: StringLiteralType) { + self.init(name: value) + } + + /** + Create a permission with a string value. + + - parameter value: String literal representation of the permission. + */ + public init(unicodeScalarLiteral value: String) { + self.init(name: value) + } + + /** + Create a permission with a string value. + + - parameter value: String literal representation of the permission. + */ + public init(extendedGraphemeClusterLiteral value: String) { + self.init(name: value) + } + + // MARK: Hashable + + /// The hash value. + public var hashValue: Int { + return name.hashValue + } + + /** + Compare two `Permission`s for equality. + + - parameter lhs: The first permission to compare. + - parameter rhs: The second permission to compare. + + - returns: Whether or not the permissions are equal. + */ + public static func == (lhs: Permission, rhs: Permission) -> Bool { + return lhs.name == rhs.name + } +} + +internal protocol PermissionRepresentable { + var permissionValue: Permission { get } +} diff --git a/Pods/FacebookCore/Sources/Core/Permissions/PublishPermission.swift b/Pods/FacebookCore/Sources/Core/Permissions/PublishPermission.swift new file mode 100644 index 0000000..5697111 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/Permissions/PublishPermission.swift @@ -0,0 +1,59 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +/** + Enum that represents a Graph API publish permission. + Each permission has its own set of requirements and suggested use cases. + See a full list at https://developers.facebook.com/docs/facebook-login/permissions + */ +public enum PublishPermission: PermissionRepresentable { + /** + Provides access to publish Posts, Open Graph actions, achievements, + scores and other activity on behalf of a person using your app. + */ + case publishActions + /// Enables your app to retrieve Page Access Tokens for the Pages and Apps that the person administrates. + case managePages + /** + When you also have the manage_pages permission, gives your app the ability to post, + comment and like as any of the Pages managed by a person using your app. + Apps need both manage_pages and publish_pages to be able to publish as a Page. + */ + case publishPages + /// Provides the ability to set a person's attendee status on Facebook Events (e.g. attending, maybe, or declined). + case rsvpEvent + /** + Permission with a custom string value. + See https://developers.facebook.com/docs/facebook-login/permissions for full list of available permissions. + */ + case custom(String) + + // MARK: PermissionRepresentable + + internal var permissionValue: Permission { + switch self { + case .publishActions: return "publish_actions" + case .managePages: return "manage_pages" + case .publishPages: return "publish_pages" + case .rsvpEvent: return "rsvp_event" + case .custom(let string): return Permission(name: string) + } + } +} diff --git a/Pods/FacebookCore/Sources/Core/Permissions/ReadPermission.swift b/Pods/FacebookCore/Sources/Core/Permissions/ReadPermission.swift new file mode 100644 index 0000000..10749e3 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/Permissions/ReadPermission.swift @@ -0,0 +1,153 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +/** + Enum that represents a Graph API read permission. + Each permission has its own set of requirements and suggested use cases. + See a full list at https://developers.facebook.com/docs/facebook-login/permissions + */ +public enum ReadPermission: PermissionRepresentable { + /// Provides access to a subset of items that are part of a person's public profile. + case publicProfile + /// Provides access the list of friends that also use your app. + case userFriends + /// Provides access to the person's primary email address. + case email + /// Provides access to a person's personal description (the 'About Me' section on their Profile) + case userAboutMe + /// Provides access to all common books actions published by any app the person has used. + /// This includes books they've read, want to read, rated or quoted. + case userActionsBooks + /// Provides access to all common Open Graph fitness actions published by any app the person has used. + /// This includes runs, walks and bikes actions. + case userActionsFitness + /// Provides access to all common Open Graph music actions published by any app the person has used. + /// This includes songs they've listened to, and playlists they've created. + case userActionsMusic + /// Provides access to all common Open Graph news actions published by any app the person + /// has used which publishes these actions. + /// This includes news articles they've read or news articles they've published. + case userActionsNews + /// Provides access to all common Open Graph video actions published by any app the person + /// has used which publishes these actions. + case userActionsVideo + /// Access the date and month of a person's birthday. This may or may not include the person's year of birth, + /// dependent upon their privacy settings and the access token being used to query this field. + case userBirthday + /// Provides access to a person's education history through the education field on the User object. + case userEducationHistory + /// Provides read-only access to the Events a person is hosting or has RSVP'd to. + case userEvents + /// Provides access to read a person's game activity (scores, achievements) in any game the person has played. + case userGamesActivity + /// Provides access to a person's gender. + case userGender + /// Provides access to a person's hometown location through the hometown field on the User object. + case userHometown + /// Provides access to the list of all Facebook Pages and Open Graph objects that a person has liked. + case userLikes + /// Provides access to a person's current city through the location field on the User object. + case userLocation + /// Lets your app read the content of groups a person is an admin of through the Groups edge on the User object. + case userManagedGroups + /// Provides access to the photos a person has uploaded or been tagged in. + case userPhotos + /// Provides access to the posts on a person's Timeline. Includes their own posts, posts they are tagged in, + /// and posts other people make on their Timeline. + case userPosts + /// Provides access to a person's relationship status, + /// significant other and family members as fields on the User object. + case userRelationships + /// Provides access to a person's relationship interests as the interested_in field on the User object. + case userRelationshipDetails + /// Provides access to a person's religious and political affiliations. + case userReligionPolitics + /// Provides access to the Places a person has been tagged at in photos, videos, statuses and links. + case userTaggedPlaces + /// Provides access to the videos a person has uploaded or been tagged in. + case userVideos + /// Provides access to the person's personal website URL via the website field on the User object. + case userWebsite + /// Provides access to a person's work history and list of employers via the work field on the User object. + case userWorkHistory + /// Provides access to the names of custom lists a person has created to organize their friends. + case readCustomFriendlists + /// Provides read-only access to the Insights data for Pages, Apps and web domains the person owns. + case readInsights + /// Provides read-only access to the Audience Network Insights data for Apps the person owns. + case readAudienceNetworkInsights + /// Provides the ability to read from the Page Inboxes of the Pages managed by a person. + case readPageMailboxes + /// Provides the access to show the list of the Pages that you manage. + case pagesShowList + /// Provides the access to manage call to actions of the Pages that you manage. + case pagesManageCta + /// Lets your app manage Instant Articles on behalf of Facebook Pages administered by people using your app. + case pagesManageInstantArticles + /// Provides the access to Ads Insights API to pull ads report information for ad accounts you have access to. + case adsRead + /** + Permission with a custom string value. + See https://developers.facebook.com/docs/facebook-login/permissions for full list of available permissions. + */ + case custom(String) + + // MARK: PermissionRepresentable + internal var permissionValue: Permission { + switch self { + case .publicProfile: return "public_profile" + case .userFriends: return "user_friends" + case .email: return "email" + case .userAboutMe: return "user_about_me" + case .userActionsBooks: return "user_actions.books" + case .userActionsFitness: return "user_action.fitness" + case .userActionsMusic: return "user_actions.music" + case .userActionsNews: return "user_actions.news" + case .userActionsVideo: return "user_actions.video" + case .userBirthday: return "user_birthday" + case .userEducationHistory: return "user_education_history" + case .userEvents: return "user_events" + case .userGamesActivity: return "user_games_activity" + case .userGender: return "user_gender" + case .userHometown: return "user_hometown" + case .userLikes: return "user_likes" + case .userLocation: return "user_location" + case .userManagedGroups: return "user_managed_groups" + case .userPhotos: return "user_photos" + case .userPosts: return "user_posts" + case .userRelationships: return "user_relationships" + case .userRelationshipDetails: return "user_relationship_details" + case .userReligionPolitics: return "user_religion_politics" + case .userTaggedPlaces: return "user_tagged_places" + case .userVideos: return "user_videos" + case .userWebsite: return "user_website" + case .userWorkHistory: return "user_work_history" + case .readCustomFriendlists: return "read_custom_friendlists" + case .readInsights: return "read_insights" + case .readAudienceNetworkInsights: return "read_audience_network_insights" + case .readPageMailboxes: return "read_page_mailboxes" + case .pagesShowList: return "pages_show_list" + case .pagesManageCta: return "pages_manage_cta" + case .pagesManageInstantArticles: return "pages_manage_instant_articles" + case .adsRead: return "ads_read" + case .custom(let string): return Permission(name: string) + } + } +} diff --git a/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.FetchResult.swift b/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.FetchResult.swift new file mode 100644 index 0000000..1522f53 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.FetchResult.swift @@ -0,0 +1,44 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit + +public extension UserProfile { + /** + Describes the result of a fetch of `UserProfile`. + */ + enum FetchResult { + /// Profile was succesfully fetched. + case success(UserProfile) + /// Profile fetch failed. + case failed(Error) + + internal init(sdkProfile: FBSDKProfile?, error: Error?) { + if let error = error { + self = .failed(error) + } else if let sdkProfile = sdkProfile { + let profile = UserProfile(sdkProfile: sdkProfile) + self = .success(profile) + } else { + //FIXME: (nlutsenko) Use a good error type here. + let error = NSError(domain: "", code: 42, userInfo: nil) + self = .failed(error) + } + } + } +} diff --git a/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.PictureView.swift b/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.PictureView.swift new file mode 100644 index 0000000..dd69c4a --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.PictureView.swift @@ -0,0 +1,87 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation +import UIKit + +import FBSDKCoreKit.FBSDKProfilePictureView + +public extension UserProfile { + + /// A view to display a profile picture. + final class PictureView: UIView { + + private let sdkProfilePictureView: FBSDKProfilePictureView = FBSDKProfilePictureView(frame: .zero) + + /// The aspect ratio of the source image of the profile picture. + public var pictureAspectRatio: UserProfile.PictureAspectRatio = .square { + didSet { + sdkProfilePictureView.pictureMode = pictureAspectRatio.sdkPictureMode + } + } + + /// The user id to show the picture for. + public var userId: String = "me" { + didSet { + sdkProfilePictureView.profileID = userId + } + } + + /** + Create a new instance of `UserProfilePictureView`. + + - parameter frame: Optional frame rectangle for the view, measured in points. + - parameter profile: Optional profile to display a picture for. Default: `UserProfile.current`. + */ + public init(frame: CGRect = .zero, profile: UserProfile? = nil) { + super.init(frame: frame) + + if let profile = profile { + userId = profile.userId + } + setupSDKProfilePictureView() + } + + /** + Create a new instance of `UserProfilePictureView` from an encoded interface file. + + - parameter decoder: The coder to initialize from. + */ + public required init?(coder decoder: NSCoder) { + super.init(coder: decoder) + setupSDKProfilePictureView() + } + + /** + Explicitly marks the receiver as needing to update the image. + + This method is called whenever any properties that affect the source image are modified, + but this can also be used to trigger a manual update of the image if it needs to be re-downloaded. + */ + public func setNeedsImageUpdate() { + sdkProfilePictureView.setNeedsImageUpdate() + } + + private func setupSDKProfilePictureView() { + sdkProfilePictureView.frame = bounds + sdkProfilePictureView.autoresizingMask = [.flexibleWidth, .flexibleHeight] + addSubview(sdkProfilePictureView) + setNeedsImageUpdate() // Trigger the update to refresh the image, just in case. + } + } +} diff --git a/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.swift b/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.swift new file mode 100644 index 0000000..a4d1e78 --- /dev/null +++ b/Pods/FacebookCore/Sources/Core/UserProfile/UserProfile.swift @@ -0,0 +1,248 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKCoreKit.FBSDKProfile +import Foundation +import UIKit + +//-------------------------------------- +// MARK: - UserProfile +//-------------------------------------- + +/** + Represents an immutable Facebook profile. + + This class provides a global `current` instance to more easily add social context to your application. + When the profile changes, a notification is posted so that you can update relevant parts of your UI + and is persisted to `NSUserDefaults`. + + Typically, you will want to call `Profile.updatesOnAccessTokenChange = true`, + so that it automatically observes changes to the `AccessToken.current`. + + You can use this class to build your own `ProfilePictureView` or in place of typical requests to "/me". + */ +public struct UserProfile { + /// The user id. + public let userId: String + + /// The user's first name. + public let firstName: String? + + /// The user's middle name. + public let middleName: String? + + /// The user's last name. + public let lastName: String? + + /// The user's complete name. + public let fullName: String? + + /// A URL to the user's profile. + public let profileURL: URL? + + /// The last time the profile was refreshed. + public let refreshDate: Date + + /** + Creates a new instance of `Profile`. + + - parameter userId: The user id. + - parameter firstName: Optional user's first name. + - parameter middleName: Optional user's middle name. + - parameter lastName: Optional user's last name. + - parameter fullName: Optional user's full name. + - parameter profileURL: Optional user's profile URL. + - parameter refreshDate: Optional user's last refresh date. Default: `NSDate()` aka current date/time. + */ + public init(userId: String, + firstName: String? = nil, + middleName: String? = nil, + lastName: String? = nil, + fullName: String? = nil, + profileURL: URL? = nil, + refreshDate: Date = Date()) { + self.userId = userId + self.firstName = firstName + self.middleName = middleName + self.lastName = lastName + self.fullName = fullName + self.profileURL = profileURL + self.refreshDate = refreshDate + } + + //-------------------------------------- + // MARK: - Loading Profile + //-------------------------------------- + + /// Convenience alias for type of closure that is used as a completion for fetching `UserProfile`. + public typealias Completion = (FetchResult) -> Void + + /** + Fetches a user profile by userId. + + If the `current` profile is set, and it has the same `userId`, + calling method will reset the current profile with the newly fetched one. + + - parameter userId: Facebook user id of the profile to fetch. + - parameter completion: The closure to be executed once the profile is refreshed. + */ + public static func fetch(userId: String, completion: @escaping Completion) { + let request = GraphRequest(graphPath: userId, + parameters: ["fields": "first_name,middle_name,last_name,name,link"], + httpMethod: .GET) + request.start { _, result in + switch result { + case .success(let response): + let responseDictionary = response.dictionaryValue + + let profile = UserProfile(userId: userId, + firstName: responseDictionary?["first_name"] as? String, + middleName: responseDictionary?["middle_name"] as? String, + lastName: responseDictionary?["last_name"] as? String, + fullName: responseDictionary?["name"] as? String, + profileURL: (responseDictionary?["link"] as? String).flatMap({ URL(string: $0) }), + refreshDate: Date()) + + // Reset the current profile if userId matches + if AccessToken.current?.userId == userId { + UserProfile.current = profile + } + completion(.success(profile)) + + case .failed(let error): + completion(.failed(error)) + } + } + } + + /** + Refreshes the existing user profile. + + If the `current` profile is set, and receiver has the same `userId`, + calling method will reset the current profile with the newly fetched one. + + - parameter completion: Optional closure to be executed once the profile is refreshed. Default: `nil`. + */ + public func refresh(_ completion: Completion?) { + UserProfile.fetch(userId: userId) { result in + completion?(result) + } + } + + //-------------------------------------- + // MARK: - Current Profile + //-------------------------------------- + + /** + Current instance of `Profile` that represents the currently logged in user's profile. + */ + public static var current: UserProfile? { + get { + let sdkProfile = FBSDKProfile.current() as FBSDKProfile? + return sdkProfile.map(UserProfile.init) + } + set { + FBSDKProfile.setCurrent(newValue?.sdkProfileRepresentation) + } + } + + /** + Loads the current profile and passes it to the completion closure. + + If the `current` profile is already loaded, this method will call the completion block synchronously, + otherwise it will begin a graph request to update `current` profile + and the call the completion closure when finished. + + - parameter completion: The closure to be executed once the profile is loaded. + */ + public static func loadCurrent(_ completion: Completion?) { + FBSDKProfile.loadCurrentProfile { (sdkProfile: FBSDKProfile?, error: Error?) in + if let completion = completion { + let result = FetchResult(sdkProfile: sdkProfile, error: error) + completion(result) + } + } + } + + /** + Allows controlling whether `current` profile should automatically update when `AccessToken.current` changes. + + - note: If `AccessToken.current` is unset (changes to `nil`), the `current` profile instance remains. + It's also possible for the `current` to return `nil` until the data is fetched. + */ + public static var updatesOnAccessTokenChange: Bool = false { + didSet { + FBSDKProfile.enableUpdates(onAccessTokenChange: updatesOnAccessTokenChange) + } + } + + //-------------------------------------- + // MARK: - Profile Picture + //-------------------------------------- + + /** + Defines the aspect ratio for the source image of the profile picture. + */ + public enum PictureAspectRatio { + /// A square cropped version of the profile picture. + case square + /// The original picture's aspect ratio. + case normal + + internal var sdkPictureMode: FBSDKProfilePictureMode { + switch self { + case .square: return .square + case .normal: return .normal + } + } + } + + /** + Returns a complete `NSURL` for retrieving the user's profile image. + + - parameter aspectRatio: Apsect ratio of the source image to use. + - parameter size: Requested height and width of the image. Will be rounded to integer precision. + */ + public func imageURLWith(_ aspectRatio: PictureAspectRatio, size: CGSize) -> URL { + return sdkProfileRepresentation.imageURL(for: aspectRatio.sdkPictureMode, size: size) + } + + //-------------------------------------- + // MARK: - Internal + //-------------------------------------- + + internal init(sdkProfile: FBSDKProfile) { + self.init(userId: sdkProfile.userID, + firstName: sdkProfile.firstName, + middleName: sdkProfile.middleName, + lastName: sdkProfile.lastName, + fullName: sdkProfile.name, + profileURL: sdkProfile.linkURL, + refreshDate: sdkProfile.refreshDate) + } + + internal var sdkProfileRepresentation: FBSDKProfile { + return FBSDKProfile(userID: userId, + firstName: firstName, + middleName: middleName, + lastName: lastName, + name: fullName, + linkURL: profileURL, + refreshDate: refreshDate) + } +} diff --git a/Pods/FacebookLogin/LICENSE b/Pods/FacebookLogin/LICENSE new file mode 100644 index 0000000..d318575 --- /dev/null +++ b/Pods/FacebookLogin/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2016-present, Facebook, Inc. All rights reserved. + +For Facebook Swift SDK software + +You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +copy, modify, and distribute this software in source code or binary form for use +in connection with the web services and APIs provided by Facebook. + +As with any software that integrates with the Facebook platform, your use of +this software is subject to the Facebook Developer Principles and Policies +[http://developers.facebook.com/policy/]. This copyright notice shall be +included in all copies or substantial portions of the software. + +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. diff --git a/Pods/FacebookLogin/README.md b/Pods/FacebookLogin/README.md new file mode 100644 index 0000000..4ce942a --- /dev/null +++ b/Pods/FacebookLogin/README.md @@ -0,0 +1,232 @@ +# Facebook SDK in Swift (Beta) + +[![Swift Version](https://img.shields.io/badge/Swift-4.0.x-orange.svg)](https://swift.org) +[![Platforms](https://img.shields.io/cocoapods/p/FacebookCore.svg)](https://cocoapods.org/pods/FacebookCore) +[![Build Status](https://travis-ci.org/facebook/facebook-sdk-swift.svg?branch=master)](https://travis-ci.org/facebook/facebook-sdk-swift) + +[![CocoaPods](https://img.shields.io/cocoapods/v/FacebookCore.svg)](https://cocoapods.org/pods/FacebookCore) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) + +Swift-taylored experience to integrate your app with Facebook. Including: + +- [Facebook Login](https://developers.facebook.com/docs/swift/login) - Authenticate people with their Facebook credentials. +- [Share and Send Dialogs](https://developers.facebook.com/docs/swift/sharing) - Enable sharing content from your app to Facebook. +- [App Events](https://developers.facebook.com/docs/swift/appevents) - Understand your audience and the performance of your app. +- [Graph API](https://developers.facebook.com/docs/swift/graph) - Read and write directly to Facebook social graph. + +**NOTE:** This SDK is currently in Beta and may be unstable at times. Please also check out our [ObjC SDK](https://github.com/facebook/facebook-objc-sdk). + +## Installation + +### CocoaPods + +Make sure you are running the latest version of [CocoaPods](https://cocoapods.org) by running: + +```bash +gem install cocoapods + +# (or if the above fails) +sudo gem install cocoapods +``` + +**Note:** We support any version of CocoaPods 1.0.1 or later. + +Update your local specs repo by running: + +```bash +pod repo update +``` + +**Note:** This step is optional, if you updated the specs repo recently. + +Add the following lines to your Podfile: + +```ruby +pod 'FacebookCore' +pod 'FacebookLogin' +pod 'FacebookShare' +``` + +Run `pod install` and you're all set! + +You may also exclude any of these dependencies, if you do not need the features of those parts of the SDK. + +### Carthage + +Make sure you are running the latest version of [Carthage](https://github.com/carthage/carthage) by running: + +```bash +brew update +brew upgrade carthage +``` + +**Note:** We recommend using Carthage version 0.31.1 or later. + +Add the following line to your Cartfile: + +```bash +github "facebook/facebook-sdk-swift" + +# If you run into issues, try targeting the master branch +github "facebook/facebook-sdk-swift" "master" +``` + +Run `carthage update`. + +**Note:** This will fetch dependencies into a `Carthage/Checkouts` folder, then build each one. + +On your application targets' `General` settings tab, in the `Linked Frameworks and Libraries` section. + +At a minimum, you'll need to drag & drop the following frameworks from `Carthage/Build` folder on disk: + +- `FacebookCore.framework` +- `FBSDKCoreKit.framework` +- `Bolts.framework` + +To use Login with Facebook: + +- `FacebookLogin.framework` + +To use Share and Send Dialogs + +- `FacebookShare.framework` + +On your application targets' `Build Phases` tab: + +- Click `+` icon and choose `New Run Script Phase`. +- Create a script with a shell of your choice (e.g. `/bin/sh`). +- Add the following to the script area below the shell: + +```bash +/usr/local/bin/carthage copy-frameworks +``` + +- Add the paths to the frameworks you want to use under `Input Files`, for example: + +```bash +$(SRCROOT)/Carthage/Build/iOS/FacebookCore.framework +$(SRCROOT)/Carthage/Build/iOS/FBSDKCoreKit.framework +$(SRCROOT)/Carthage/Build/iOS/Bolts.framework +``` + +### Using Facebook SDK as a sub-project + +While not recommended, it is entirely possible for you to build the Facebook SDK for Swift outside of any dependency management system. + +**Note:** You will have to manage updating this solution (as well as the dependencies on the Facebook SDK for iOS) on your own. + +- Clone the repository. +- Run the following command in the root directory of the repository: `git submodule update --init --recursive` +- Add `FacebookSwift.xcodeproj` as a sub-project to your applications' project. +- Add the `FacebookCore.framework`, `FacebookLogin.framework`, and `FacebookShare.framework` build products from the sub-project to your applications `Link Frameworks and Libraries` and `Embedded Binaries` sections. + +Don't forget to also embed/link `FBSDKCoreKit.framework`, `FBSDKLoginKit.framework`, `FBSDKShareKit.framework` and `Bolts.framework` too! + +## Modules + +The frameworks for the Facebook SDK in Swift are organized in the same way that the Facebook SDK for iOS is. + +They also currently depend upon the Facebook SDK for iOS, although this may change at some point in the future. + +### FacebookCore + +[![FacebookCore on CocoaPods](https://img.shields.io/cocoapods/v/FacebookCore.svg)](https://cocoapods.org/pods/FacebookCore) + +Depends on `FBSDKCoreKit.framework` and `Bolts.framework`. + +The following types are included, with enhancements for Swift: + +- `AccessToken` +- `ApplicationDelegate` +- `AppEvents` + +A myriad of improvements, including type-safe built-in `AppEvent`s, an `AppEvent` struct, and more. + +- `GraphRequest` + +You can now implement your own type-safe `GraphRequest`s, including native-typed results. + +- `SDKSettings` + +Logging behaviors are now implemented as a type-safe set, based on Swift enums. + +- `Permission` + +Are no longer stringly-typed (string-based), but separate types for read and write permissions (also includes a built-in permission list, which includes most common permissions by default). + +### FacebookLogin + +[![FacebookCore on CocoaPods](https://img.shields.io/cocoapods/v/FacebookLogin.svg)](https://cocoapods.org/pods/FacebookLogin) + +Depends on `FacebookCore.framework` and `FBSDKLoginKit.framework`. + +The following types are included, with enhancements for Swift: + +- `LoginManager` + +Now uses the type-safe permissions from `FacebookCore`, and has constructors with `LoginBehavior` and `DefaultAudience`, instead of requiring manual setting of properties. + +- `LoginButton` + +Can no longer change permissions after creation, helping to enforce using a single login button for a given set of permissions. +Note that `LoginButton` is not intended to work with interface builder or storyboards at this time. We may re-address this in the future. + +### FacebookShare + +[![FacebookCore on CocoaPods](https://img.shields.io/cocoapods/v/FacebookShare.svg)](https://cocoapods.org/pods/FacebookShare) + +Depends on `FacebookCore.framework` and `FBSDKShareKit.framework`. + +The following types are included, with enhancements for Swift: + +- `LinkShareContent` + +Now a struct, and has a proper initializer enforcing required properties. + +- `OpenGraphShareContent` + +Now a struct, uses type-safe `OpenGraphPropertyName` and `OpenGraphPropertyValue`, as well as structs for `OpenGraphObject` and `OpenGraphAction`. + +- `PhotoShareContent` + +Now a struct, and better type-safety for properties on it. + +- `VideoShareContent` + +Now a struct, and better type-safety for properties on it. + +- `GraphSharer` + +Now a generic type, that can handle any type of content. + +- `ShareDialog` + +Now a generic type, that can handle any type of content. + +- `MessageDialog` + +Now a generic type, that can handle any type of content. + +- `GameRequest` + +Now a struct, contains proper type-safe enum for `Recipient`, `Result`. + +- `GameRequest.Dialog` +- `AppGroupRequest.Dialog` +- `AppInvite` + +Now a struct, use a type-safe `Promotion` property, instead of separate `promotionCode` and `promotionText`. + +- `AppInvite.Dialog` + +## Give Feedback + +Facebook SDK in Swift is still in beta, and we would love to hear your thoughts and feedback on it. + +- **Have an idea or feature request?** [Open an issue](https://github.com/facebook/facebook-sdk-swift/issues/new). Tell us more about the feature or an idea and why you think it's relevant. +- **Have a bug to report?** [Open an issue](https://github.com/facebook/facebook-sdk-swift/issues/new). If possible, include the version of the SDK you are using, and any technical details. +- **Need help with your code?** Join [Facebook Developers Group](https://www.facebook.com/groups/fbdevelopers) on Facebook or ask questions on [Stack Overflow](https://facebook.stackoverflow.com). + +## Contribute + +All of Facebook SDK for Swift development happens on GitHub. Contributions make for good karma and we welcome new contributors with tremendous joy. We request that you read our [contributing guidelines](.github/CONTRIBUTING.md) before submitting a Pull Request. diff --git a/Pods/FacebookLogin/Sources/Login/LoginBehavior.swift b/Pods/FacebookLogin/Sources/Login/LoginBehavior.swift new file mode 100644 index 0000000..9304337 --- /dev/null +++ b/Pods/FacebookLogin/Sources/Login/LoginBehavior.swift @@ -0,0 +1,68 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +import FBSDKLoginKit + +/** + Indicates how Facebook Login should be attempted. + + Facebook Login authorizes the application to act on behalf of the user, using the user's Facebook account. + Usually a Facebook Login will rely on an account maintained outside of the application, + by the native Facebook application, the browser, or perhaps the device itself. + This avoids the need for a user to enter their username and password directly, + and provides the most secure and lowest friction way for a user to authorize the application to interact with Facebook. + + This enum specifies which log-in methods may be used. + The SDK will determine the best behavior based on the current device (such as OS version). + */ +public enum LoginBehavior { + /** + This is the default behavior, and indicates logging in through the native Facebook app may be used. + The SDK may still use Safari.app or `SFSafariViewController` instead. + */ + case native + /** + Attempts log in through the Safari.app or `SFSafariViewController`, if available. + */ + case browser + /** + Attempts log in through the Facebook account currently signed in through the the device Settings. + + - note: If the account is not available to the app (either not configured by user or + as determined by the SDK) this behavior falls back to `.Native`. + */ + case systemAccount + /** + Attempts log in through a modal `WebView` pop up. + + - note: This behavior is only available to certain types of apps. + Please check the Facebook Platform Policy to verify your app meets the restrictions. + */ + case web + + internal var sdkBehavior: FBSDKLoginBehavior { + switch self { + case .native: return .native + case .browser: return .browser + case .systemAccount: return .systemAccount + case .web: return .web + } + } +} diff --git a/Pods/FacebookLogin/Sources/Login/LoginButton.Tooltip.swift b/Pods/FacebookLogin/Sources/Login/LoginButton.Tooltip.swift new file mode 100644 index 0000000..fcfd6a3 --- /dev/null +++ b/Pods/FacebookLogin/Sources/Login/LoginButton.Tooltip.swift @@ -0,0 +1,61 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import FBSDKLoginKit +import Foundation + +public extension LoginButton { + /** + Indicates the desired login tooltip behavior. + */ + enum TooltipBehavior { + /// Tooltip will only be displayed if the app is eligible (determined by possible server round trip). + case automatic + /// Force display of the tooltip (typically for UI testing). + case forceDisplay + /// Force disable the tooltip. + case disable + + internal var sdkBehavior: FBSDKLoginButtonTooltipBehavior { + switch self { + case .automatic: return .automatic + case .forceDisplay: return .forceDisplay + case .disable: return .disable + } + } + } +} + +public extension LoginButton { + /** + Indicates the desired login tooltip color style. + */ + enum TooltipColorStyle { + /// Light blue background, white text, faded blue close button. + case friendlyBlue + /// Dark gray background, white text, light gray close button. + case neutralGray + + internal var sdkColorStyle: FBSDKTooltipColorStyle { + switch self { + case .friendlyBlue: return .friendlyBlue + case .neutralGray: return .neutralGray + } + } + } +} diff --git a/Pods/FacebookLogin/Sources/Login/LoginButton.swift b/Pods/FacebookLogin/Sources/Login/LoginButton.swift new file mode 100644 index 0000000..39ebe2f --- /dev/null +++ b/Pods/FacebookLogin/Sources/Login/LoginButton.swift @@ -0,0 +1,144 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import UIKit + +@testable import FacebookCore +import FBSDKLoginKit + +/** + A button that initiates a log in or log out flow upon tapping. + + `LoginButton` works with `AccessToken.current` to determine what to display, + and automatically starts authentication when tapped (i.e., you do not need to manually subscribe action targets). + + Like `LoginManager`, you should make sure your app delegate is connected to `ApplicationDelegate` + in order for the button's delegate to receive messages. + + `LoginButton` has a fixed height of @c 30 pixels, but you may change the width. + Initializing the button with `nil` frame will size the button to its minimum frame. + */ +public class LoginButton: UIView { + + private var sdkLoginButton: FBSDKLoginButton + + /// Delegate of the login button that can handle the result, logout events. + public weak var delegate: LoginButtonDelegate? + private var delegateBridge: LoginButtonDelegateBridge + + /// The login behavior that is going to be used. Default: `.Native`. + public var loginBehavior: LoginBehavior = .native { + didSet { + sdkLoginButton.loginBehavior = loginBehavior.sdkBehavior + } + } + + /// The default audience. Default: `.Friends`. + public var defaultAudience: LoginDefaultAudience = .friends { + didSet { + sdkLoginButton.defaultAudience = defaultAudience.sdkAudience + } + } + + /// The desired tooltip behavior. Default: `.Automatic`. + public var tooltipBehavior: TooltipBehavior = .automatic { + didSet { + sdkLoginButton.tooltipBehavior = tooltipBehavior.sdkBehavior + } + } + + /// The desired tooltip color style. Default: `.FriendlyBlue`. + public var tooltipColorStyle: TooltipColorStyle = .friendlyBlue { + didSet { + sdkLoginButton.tooltipColorStyle = tooltipColorStyle.sdkColorStyle + } + } + + /** + Create a new `LoginButton` with a given optional frame and read permissions. + + - parameter frame: Optional frame to initialize with. Default: `nil`, which uses a default size for the button. + - parameter readPermissions: Array of read permissions to request when logging in. + */ + public init(frame: CGRect? = nil, readPermissions: [ReadPermission]) { + let sdkLoginButton = FBSDKLoginButton() + sdkLoginButton.readPermissions = readPermissions.map { $0.permissionValue.name } + + self.sdkLoginButton = sdkLoginButton + delegateBridge = LoginButtonDelegateBridge() + + let frame = frame ?? CGRect(origin: .zero, size: sdkLoginButton.bounds.size) + super.init(frame: frame) + + delegateBridge.setupAsDelegateFor(sdkLoginButton, loginButton: self) + addSubview(sdkLoginButton) + } + + /** + Create a new `LoginButton` with a given optional frame and publish permissions. + + - parameter frame: Optional frame to initialize with. Default: `nil`, which uses a default size for the button. + - parameter publishPermissions: Array of publish permissions to request when logging in. + */ + public init(frame: CGRect? = nil, publishPermissions: [PublishPermission]) { + let sdkLoginButton = FBSDKLoginButton() + sdkLoginButton.publishPermissions = publishPermissions.map { $0.permissionValue.name } + + self.sdkLoginButton = sdkLoginButton + delegateBridge = LoginButtonDelegateBridge() + + let frame = frame ?? sdkLoginButton.bounds + super.init(frame: frame) + + delegateBridge.setupAsDelegateFor(sdkLoginButton, loginButton: self) + addSubview(sdkLoginButton) + } + + /** + Create a new `LoginButton` from an encoded interface file. + + - parameter decoder: The coder to initialize from. + */ + public required init?(coder decoder: NSCoder) { + sdkLoginButton = FBSDKLoginButton(coder: decoder) ?? FBSDKLoginButton() + delegateBridge = LoginButtonDelegateBridge() + + super.init(coder: decoder) + + delegateBridge.setupAsDelegateFor(sdkLoginButton, loginButton: self) + addSubview(sdkLoginButton) + } + + override public func layoutSubviews() { + super.layoutSubviews() + + sdkLoginButton.frame = CGRect(origin: .zero, size: bounds.size) + } + + override public func sizeToFit() { + bounds.size = sizeThatFits(CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude)) + } + + override public func sizeThatFits(_ size: CGSize) -> CGSize { + return sdkLoginButton.sizeThatFits(size) + } + + override public var intrinsicContentSize: CGSize { + return sdkLoginButton.intrinsicContentSize + } +} diff --git a/Pods/FacebookLogin/Sources/Login/LoginButtonDelegate.swift b/Pods/FacebookLogin/Sources/Login/LoginButtonDelegate.swift new file mode 100644 index 0000000..887041c --- /dev/null +++ b/Pods/FacebookLogin/Sources/Login/LoginButtonDelegate.swift @@ -0,0 +1,39 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +/** + A delegate for `LoginButton`. + */ +public protocol LoginButtonDelegate: class { + /** + Called when the button was used to login and the process finished. + + - parameter loginButton: Button that was used to login. + - parameter result: The result of the login. + */ + func loginButtonDidCompleteLogin(_ loginButton: LoginButton, result: LoginResult) + + /** + Called when the button was used to logout. + + - parameter loginButton: Button that was used to logout. + */ + func loginButtonDidLogOut(_ loginButton: LoginButton) +} diff --git a/Pods/FacebookLogin/Sources/Login/LoginButtonDelegateBridge.swift b/Pods/FacebookLogin/Sources/Login/LoginButtonDelegateBridge.swift new file mode 100644 index 0000000..4199cb3 --- /dev/null +++ b/Pods/FacebookLogin/Sources/Login/LoginButtonDelegateBridge.swift @@ -0,0 +1,57 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +import FBSDKLoginKit + +internal class LoginButtonDelegateBridge: NSObject, FBSDKLoginButtonDelegate { + internal weak var loginButton: LoginButton? + + func setupAsDelegateFor(_ sdkLoginButton: FBSDKLoginButton, loginButton: LoginButton) { + self.loginButton = loginButton + sdkLoginButton.delegate = self + } + + // MARK: FBSDKLoginButtonDelegate + + // swiftlint:disable:next implicitly_unwrapped_optional + func loginButton(_ sdkButton: FBSDKLoginButton!, + didCompleteWith sdkResult: FBSDKLoginManagerLoginResult?, + error: Error?) { + guard + let loginButton = loginButton, + let delegate = loginButton.delegate else { + return + } + + let result = LoginResult(sdkResult: sdkResult, error: error) + delegate.loginButtonDidCompleteLogin(loginButton, result: result) + } + + // swiftlint:disable:next implicitly_unwrapped_optional + func loginButtonDidLogOut(_ sdkButton: FBSDKLoginButton!) { + guard + let loginButton = loginButton, + let delegate = loginButton.delegate else { + return + } + + delegate.loginButtonDidLogOut(loginButton) + } +} diff --git a/Pods/FacebookLogin/Sources/Login/LoginDefaultAudience.swift b/Pods/FacebookLogin/Sources/Login/LoginDefaultAudience.swift new file mode 100644 index 0000000..de15351 --- /dev/null +++ b/Pods/FacebookLogin/Sources/Login/LoginDefaultAudience.swift @@ -0,0 +1,46 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +import Foundation + +import FBSDKLoginKit + +/** + Indicates which default audience to use for sessions that post data to Facebook. + + Certain operations such as publishing a status or publishing a photo require an audience. + When the user grants an application permission to perform a publish operation, + a default audience is selected as the publication ceiling for the application. + This enumerated value allows the application to select which audience to ask the user to grant publish permission for. + */ +public enum LoginDefaultAudience { + /// Indicates that the user's friends are able to see posts made by the application. + case friends + /// Indicates that only the user is able to see posts made by the application. + case onlyMe + /// Indicates that all Facebook users are able to see posts made by the application. + case everyone + + internal var sdkAudience: FBSDKDefaultAudience { + switch self { + case .friends: return .friends + case .onlyMe: return .onlyMe + case .everyone: return .everyone + } + } +} diff --git a/Pods/FacebookLogin/Sources/Login/LoginManager.swift b/Pods/FacebookLogin/Sources/Login/LoginManager.swift new file mode 100644 index 0000000..9c43675 --- /dev/null +++ b/Pods/FacebookLogin/Sources/Login/LoginManager.swift @@ -0,0 +1,131 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +@testable import FacebookCore +import FBSDKLoginKit +import Foundation +import UIKit + +/** + This class provides methods for logging the user in and out. + It works directly with `AccessToken.current` and + sets the "current" token upon successful authorizations (or sets `nil` in case of `logOut`). + + You should check `AccessToken.current` before calling `logIn()` to see if there is + a cached token available (typically in your `viewDidLoad`). + + If you are managing your own token instances outside of `AccessToken.current`, you will need to set + `current` before calling `logIn()` to authorize further permissions on your tokens. + */ +public final class LoginManager { + private let sdkManager: FBSDKLoginManager = FBSDKLoginManager() + + /// The login behavior that is going to be used. Default: `.Native`. + public var loginBehavior: LoginBehavior { + didSet { + sdkManager.loginBehavior = loginBehavior.sdkBehavior + } + } + + /// The default audience. Default: `.Friends`. + public var defaultAudience: LoginDefaultAudience { + didSet { + sdkManager.defaultAudience = defaultAudience.sdkAudience + } + } + + /** + Initialize an instance of `LoginManager.` + + - parameter loginBehavior: Optional login behavior to use. Default: `.Native`. + - parameter defaultAudience: Optional default audience to use. Default: `.Friends`. + */ + public init(loginBehavior: LoginBehavior = .native, + defaultAudience: LoginDefaultAudience = .friends) { + self.loginBehavior = loginBehavior + self.defaultAudience = defaultAudience + sdkManager.loginBehavior = loginBehavior.sdkBehavior + sdkManager.defaultAudience = defaultAudience.sdkAudience + } + + /** + Logs the user in or authorizes additional permissions. + + Use this method when asking for read permissions. You should only ask for permissions when they + are needed and explain the value to the user. You can inspect the `declinedPermissions` in the result to also + provide more information to the user if they decline permissions. + + This method will present UI the user. You typically should check if `AccessToken.current` already + contains the permissions you need before asking to reduce unnecessary app switching. + + - parameter permissions: Array of read permissions. Default: `[.PublicProfile]` + - parameter viewController: Optional view controller to present from. Default: topmost view controller. + - parameter completion: Optional callback. + */ + public func logIn(readPermissions: [ReadPermission] = [.publicProfile], + viewController: UIViewController? = nil, + completion: ((LoginResult) -> Void)? = nil) { + let sdkPermissions = readPermissions.map { $0.permissionValue.name } + sdkManager.logIn(withReadPermissions: sdkPermissions, + from: viewController, + handler: LoginManager.sdkCompletionFor(completion)) + } + + /** + Logs the user in or authorizes additional permissions. + + Use this method when asking for publish permissions. You should only ask for permissions when they + are needed and explain the value to the user. You can inspect the `declinedPermissions` in the result to also + provide more information to the user if they decline permissions. + + This method will present UI the user. You typically should check if `AccessToken.current` already + contains the permissions you need before asking to reduce unnecessary app switching. + + - parameter permissions: Array of publish permissions. Default: `[.PublishActions]` + - parameter viewController: Optional view controller to present from. Default: topmost view controller. + - parameter completion: Optional callback. + */ + public func logIn(publishPermissions: [PublishPermission] = [.publishActions], + viewController: UIViewController? = nil, + completion: ((LoginResult) -> Void)? = nil) { + let sdkPermissions = publishPermissions.map { $0.permissionValue.name } + sdkManager.logIn(withPublishPermissions: sdkPermissions, + from: viewController, + handler: LoginManager.sdkCompletionFor(completion)) + } + + /** + Logs the user out. + This calls `AccessToken.current = nil` and `Profile.current = nil`. + */ + public func logOut() { + AccessToken.current = nil + UserProfile.current = nil + + } + + private class func sdkCompletionFor(_ completion: ((LoginResult) -> Void)?) -> FBSDKLoginManagerRequestTokenHandler? { + guard let completion = completion else { + return nil + } + return { (sdkResult: FBSDKLoginManagerLoginResult?, error: Error?) -> Void in + let result = LoginResult(sdkResult: sdkResult, error: error) + completion(result) + } + } +} diff --git a/Pods/FacebookLogin/Sources/Login/LoginResult.swift b/Pods/FacebookLogin/Sources/Login/LoginResult.swift new file mode 100644 index 0000000..ff6b7cc --- /dev/null +++ b/Pods/FacebookLogin/Sources/Login/LoginResult.swift @@ -0,0 +1,61 @@ +// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// 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. + +@testable import FacebookCore +import FBSDKLoginKit +import Foundation + +/** + Describes the result of a login attempt. + */ +public enum LoginResult { + /// User succesfully logged in. Contains granted, declined permissions and access token. + case success(grantedPermissions: Set, declinedPermissions: Set, token: AccessToken) + /// Login attempt was cancelled by the user. + case cancelled + /// Login attempt failed. + case failed(Error) + + internal init(sdkResult: FBSDKLoginManagerLoginResult?, error: Error?) { + if let error = error { + self = .failed(error) + return + } + guard let sdkResult = sdkResult else { + //FIXME: (nlutsenko) Use a good error type here. + let error = NSError(domain: "", code: 42, userInfo: nil) + self = .failed(error) + return + } + + guard !sdkResult.isCancelled, let token = sdkResult.token else { + self = .cancelled + return + } + + let grantedPermissions = (sdkResult.grantedPermissions?.compactMap { $0 as? String } + .map { Permission(name: $0) }) + .map(Set.init) + let declinedPermissions = (sdkResult.declinedPermissions?.compactMap { $0 as? String } + .map { Permission(name: $0) }) + .map(Set.init) + self = .success(grantedPermissions: grantedPermissions ?? [], + declinedPermissions: declinedPermissions ?? [], + token: AccessToken(sdkAccessToken: token)) + } +} diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock new file mode 100644 index 0000000..de7e424 --- /dev/null +++ b/Pods/Manifest.lock @@ -0,0 +1,34 @@ +PODS: + - Bolts (1.9.0): + - Bolts/AppLinks (= 1.9.0) + - Bolts/Tasks (= 1.9.0) + - Bolts/AppLinks (1.9.0): + - Bolts/Tasks + - Bolts/Tasks (1.9.0) + - FacebookCore (0.5.0): + - Bolts (~> 1.9) + - FBSDKCoreKit (~> 4.37) + - FacebookLogin (0.5.0): + - Bolts (~> 1.9) + - FacebookCore (~> 0.5) + - FBSDKCoreKit (~> 4.37) + - FBSDKLoginKit (~> 4.37) + - FBSDKCoreKit (4.40.0): + - Bolts (~> 1.9) + - FBSDKLoginKit (4.40.0): + - FBSDKCoreKit + +DEPENDENCIES: + - FacebookCore + - FacebookLogin + +SPEC CHECKSUMS: + Bolts: ac6567323eac61e203f6a9763667d0f711be34c8 + FacebookCore: 74288d0add931d361b1596beae787ab72c438249 + FacebookLogin: ebcf34714a1cb9f0759d9f071cfb01ed500996cf + FBSDKCoreKit: ae214474b25033399c131dc81d258e412582a2ba + FBSDKLoginKit: 7a1e411d46acc8834588eca437daf34de42e1d52 + +PODFILE CHECKSUM: e13f62bc5f7a93789bee67f1b90bf380a8fa3a80 + +COCOAPODS: 1.4.0 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..6fa4a9d --- /dev/null +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,2949 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 001FA18266FF30AE17428E2F2E12663A /* FBSDKContainerViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 18754BB8FE565D9A2E55B9C52D0E1A0E /* FBSDKContainerViewController.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 00DA2710AF5B4DB2C7FB3B1D6EB25E86 /* GraphRequestProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CBAE8CF44FF29CE91439BCA91FB4CA7 /* GraphRequestProtocol.swift */; }; + 01B60EF69CEBA225852ACEB80A07CD2E /* FBSDKGraphRequestBody.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A54FF4B6015F32C352228C585B5744 /* FBSDKGraphRequestBody.m */; }; + 02EB6EDA6C12AAE30D54C9D76FCE8C86 /* FBSDKUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 76FC789005E45BCB003369E558662C02 /* FBSDKUtility.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0549E593D36576719A2F2D7BC155D5DE /* FBSDKMaleSilhouetteIcon.h in Headers */ = {isa = PBXBuildFile; fileRef = F53A5CFEE4C10BAB0BCD13FD80144B88 /* FBSDKMaleSilhouetteIcon.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 05E4C4328A15FF1DF3C4137922E7BD49 /* BFTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 85A089D6CFC6F31B8D83CC2666E4F65C /* BFTask.m */; }; + 05F435224C22B3AFE58F69197B6626BF /* GraphRequestResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A6A78BE914BA436BFD6DF88C61C82B /* GraphRequestResult.swift */; }; + 06C4A0BFFAC232710C57148C9BBC6774 /* BFTaskCompletionSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 176C6354CAE38FA683021B4116418E1C /* BFTaskCompletionSource.m */; }; + 06CBD7A9785F02FEBB7C800F888F81CC /* FBSDKProfilePictureView.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E693368BBE327350C8200163AE82FA /* FBSDKProfilePictureView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 06F45295FB891AC9665386F5145766F5 /* BFExecutor.m in Sources */ = {isa = PBXBuildFile; fileRef = EE8212EEAC3DF74C1562315B2FF82D44 /* BFExecutor.m */; }; + 0AB42CC2A0624726AB2447EEDC5A09C6 /* FBSDKCopying.h in Headers */ = {isa = PBXBuildFile; fileRef = 55103A354CFB38CA8F79D4F02ED9F5F4 /* FBSDKCopying.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0B0A24AC12A89E10BD249DE376BD3135 /* FBSDKDeviceLoginCodeInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FD5BC8E42321F4EF29A35368D4C7D08 /* FBSDKDeviceLoginCodeInfo.m */; }; + 0BCA89EE19E79DBFA97ABC5316A39754 /* BFCancellationTokenSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 0488933786947C2FFAC4EFEEF536F30B /* BFCancellationTokenSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0CAB0FF74BBC9B6CFE6291BDC0B34642 /* Dictionary+KeyValueMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF68EFF662855493828C51A3FEF684DF /* Dictionary+KeyValueMap.swift */; }; + 0E34D6EF53793978D077CE1155869AAB /* FBSDKPaymentObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F6AFB9EE426471F9878A9E87D758D17 /* FBSDKPaymentObserver.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0E3F0AE381F8DB44401FB0F29E5CC204 /* FBSDKViewHierarchy.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B4B00B057D64B3A8A5EFAAA83FB2E29 /* FBSDKViewHierarchy.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0F40D7B38E66E7E11EE776B88A3CC029 /* FBSDKGraphErrorRecoveryProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = ACF69CA922181130868433E106634488 /* FBSDKGraphErrorRecoveryProcessor.m */; }; + 0F9F32907125C076A9E9615333726EA0 /* FacebookLogin-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A9E0A2C0AE9A8955970495F9F47AB6FA /* FacebookLogin-dummy.m */; }; + 0F9F47F45AFFEAE2E493A66DF0E022CA /* BFCancellationToken.h in Headers */ = {isa = PBXBuildFile; fileRef = DF10086D121235A66D463AD9DCFC3F74 /* BFCancellationToken.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0FA3EA47F55A312602A35B66030C82F5 /* GraphResponseProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29F91F7115BD3894327D53747D147B6E /* GraphResponseProtocol.swift */; }; + 0FA84044B78E7B6139881A82E3B93741 /* FBSDKLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = F05DB6AF3AAB3EE955C2F088604050CB /* FBSDKLogger.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0FF1702D7EE705FFEB409A2BE7AF7911 /* FBSDKGateKeeperManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B6A4F1ADD9CC21860DBD7945DB4C59F /* FBSDKGateKeeperManager.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1002B6A69EB9FB398DEB7E47EF37124B /* FBSDKLoginConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = A3859C116A6CE2C05D14F9ED86CEAB54 /* FBSDKLoginConstants.m */; }; + 102213F42828E87C600095EAF61B315E /* FBSDKTypeUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 90554790C14FD77A55F208E389F60D21 /* FBSDKTypeUtility.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 10A06B370DA4EBB17115637CDE53DA14 /* FBSDKAppEvents+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = CFB9E6762417F3E09BC213BA3F5C1B64 /* FBSDKAppEvents+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 11043344A2791674C29A62432815188F /* FBSDKAppEventsStateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = EECAB8CCD1C7578176B5D1482ED766E8 /* FBSDKAppEventsStateManager.m */; }; + 119F2F86AD2B9D94682F4D7ECF3D810B /* FBSDKAppLink_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = CE9763CC6817F022E29B52DBC4AB1D94 /* FBSDKAppLink_Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 137143621B15454929037877AE0C96AE /* UserProfile.FetchResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB1E03597ACC0F3DB46F8D1810A528D9 /* UserProfile.FetchResult.swift */; }; + 1472B3C9BD8B244ABF98EB3BF04474E4 /* FBSDKLoginError.h in Headers */ = {isa = PBXBuildFile; fileRef = 66A66BED0939FB8D6118D647DD8E253B /* FBSDKLoginError.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1512BC37F27F9A56634727F51FE8C63F /* SDKSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48E00A0C8F23920BDE678AAF743BA66 /* SDKSettings.swift */; }; + 15481600EA05E501EC30595488FB55B2 /* FBSDKAppLinkUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = D45E6164CC3352856CA53D40EA09E8AB /* FBSDKAppLinkUtility.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 163237BC39E90D5A59EA066AFE09FE5A /* FBSDKAppLinkReturnToRefererController.m in Sources */ = {isa = PBXBuildFile; fileRef = 75160081AE8C4E14A74F6F575C3BC1CE /* FBSDKAppLinkReturnToRefererController.m */; }; + 167AC0D800CE5EE45F0D046894BBE2C7 /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 419995ECFFCD9828A3937FCC43EA8F41 /* Bolts.framework */; }; + 1723071110BA5F9D33A890269F22D9D3 /* _FBSDKLoginRecoveryAttempter.m in Sources */ = {isa = PBXBuildFile; fileRef = CBEAAF5625F4DC5F754D95D608FA5F54 /* _FBSDKLoginRecoveryAttempter.m */; }; + 197AB02F337E56CB50D8D637066CE888 /* FBSDKKeychainStoreViaBundleID.h in Headers */ = {isa = PBXBuildFile; fileRef = 50DAB0DE0F930A5186BC9D6F63E01D89 /* FBSDKKeychainStoreViaBundleID.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1A0F3C7487E4B465BF962B0D09DCA790 /* FBSDKAccessTokenExpirer.h in Headers */ = {isa = PBXBuildFile; fileRef = C8AC5FB43AC65A6315CA1A116362CAF9 /* FBSDKAccessTokenExpirer.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1A749C04428B263A30C900609143D743 /* FBSDKAccessTokenCache.h in Headers */ = {isa = PBXBuildFile; fileRef = F80A6A12E4650285D36A1F08431123D3 /* FBSDKAccessTokenCache.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1A83FA19D1CA1128D0FF873499B8ED08 /* FBSDKImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BDADD2E28AC3151EBF4513B514C01E /* FBSDKImageDownloader.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1AD2A1F424C3F5E69574C297282C3CDF /* BFURL_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = C25FAE41DB0C1B34DEB4944258323481 /* BFURL_Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1B2B21B50A4BDBC91CC93A4BF7B4EBC3 /* Pods-FirebaseFacebook-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F138D95F9F32235B6D185C288B0EF35 /* Pods-FirebaseFacebook-dummy.m */; }; + 1C48281A8B1687738BFF007B6CD73263 /* FBSDKDeviceLoginManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A5854EE903373AB4CA04BC00FB4DAF75 /* FBSDKDeviceLoginManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1C8B62CB56C976319FB06860477CE746 /* FBSDKLoginManager+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 72F49635737C28FF652052238D3CF25D /* FBSDKLoginManager+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1CC04C06BC8770E1A7B8185C532FFA47 /* FBSDKCoreKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 402CB3E0A41CAC932574FB450FBF2584 /* FBSDKCoreKit-dummy.m */; }; + 1D05958A8CFA384911AD7BB3256329C0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E039106125081C0B5EC75936CF35AB0B /* Foundation.framework */; }; + 1F34FA75264BBEA78C59F44F0EBB6004 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E039106125081C0B5EC75936CF35AB0B /* Foundation.framework */; }; + 1FD951BF1785EC907F90486CB8A4010B /* FBSDKSystemAccountStoreAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 32137B6B317C2F710879E7B153E1E28F /* FBSDKSystemAccountStoreAdapter.m */; }; + 1FF58542753D574B907357EB487400AB /* FBSDKWebDialogView.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DED741CAACFE9EC7386A4CEEBE378C7 /* FBSDKWebDialogView.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 21FE3E686800DE7273A38C7D49441848 /* Bolts.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7EF37E28F83B0CFAEBC6FBB6400E74 /* Bolts.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2214B4B2781DAA3D39475B83998B17F4 /* _FBSDKTemporaryErrorRecoveryAttempter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CE16F53157A7FECA312DE0CEBEAE7F7 /* _FBSDKTemporaryErrorRecoveryAttempter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 23483B74063FCC686705E1CA2728765A /* FBSDKEventBinding.h in Headers */ = {isa = PBXBuildFile; fileRef = 818221DD2890735F106BF6171CD90410 /* FBSDKEventBinding.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 23DD5AA6DC327EDD702FF502D5DDC82C /* Pods-FirebaseFacebookUITests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 89C5D51A0A9DD752ED4D43CADD15BFB1 /* Pods-FirebaseFacebookUITests-dummy.m */; }; + 27362A0ACFCF40CEB40D31D056707998 /* FBSDKMeasurementEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = E71F06DAC1ACFB29BAFE9B341A100D56 /* FBSDKMeasurementEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 28523FC9D0B141D4DA15E04AD71C2EB2 /* BFAppLink_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 70803D1269ADB5B88886491F0A107BC7 /* BFAppLink_Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2866A69E78E9CEE47AF86B5EE8626FEE /* FBSDKAppEventsUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9D8AF925D1BA2D636D73BB3FB86B2E /* FBSDKAppEventsUtility.m */; }; + 29D00807B2A39FA7DEA69C7457B1D7E7 /* FBSDKDeviceLoginCodeInfo+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6800F2B2A26092393CF160498E1AC179 /* FBSDKDeviceLoginCodeInfo+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 29FBE53E37046EC4CF796DFC8A0C5C52 /* FBSDKProfilePictureView.m in Sources */ = {isa = PBXBuildFile; fileRef = 45EC9391454286EDEFC8DF04998C9B5F /* FBSDKProfilePictureView.m */; }; + 2A4E26A63576F6A71D4839A3E478D228 /* FBSDKDeviceLoginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D49DD372CBA3494261D474403471894E /* FBSDKDeviceLoginManager.m */; }; + 2AAC8EAE5CF30398A2B1DB3712E018B4 /* FBSDKAccessToken.h in Headers */ = {isa = PBXBuildFile; fileRef = A1D0A680121F763405A39A5A9C59CCAD /* FBSDKAccessToken.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2AB74FFA58EC38C3F29F8BE08D27BB20 /* FBSDKMeasurementEvent_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 825EDEC34EA2DD2DAA89EDD32C11172F /* FBSDKMeasurementEvent_Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2B3B23C1076DA2C4362B02CD3378B9AA /* FBSDKAppEventsState.h in Headers */ = {isa = PBXBuildFile; fileRef = FAB1F1FAD6B53ABBDD1D17B0EFA473CE /* FBSDKAppEventsState.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2B84A2D3E7BA81389AE62EA6392C12EA /* FBSDKLoginManagerLoginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = B51B6E7A2807B73D9ED72471ACC3AE95 /* FBSDKLoginManagerLoginResult.m */; }; + 2E1103F21698CF31473709FE9DA7D88E /* Bolts-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 44780BB1B95EC481FE50C963188AFF4C /* Bolts-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2FD193E2DD70B059ED3CCC4B2D589DC2 /* FBSDKBridgeAPIResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 72A68A86707E2712D9979207A2B6C1B5 /* FBSDKBridgeAPIResponse.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 30894E78E845720881878E282174EB34 /* FBSDKMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 43D5DC1E7B96BCA4C3BE1F1F7461EAA6 /* FBSDKMath.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 30B0E5D10129ECD49DFCD6CC8E69CEBC /* FBSDKGraphRequestConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE20169CF16E55E7FAE321AAADD19F8 /* FBSDKGraphRequestConnection.m */; }; + 30B6DAA18DE3F27B6E05AF19BD61397D /* FBSDKLogo.m in Sources */ = {isa = PBXBuildFile; fileRef = F922E548BDE81C7086DB32B2CB3E8982 /* FBSDKLogo.m */; }; + 30B9C3AB35A6262B24E9B31679427855 /* AppEvent.Builtin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65ABB842B40570F4AA0A0F6DADF3EFC8 /* AppEvent.Builtin.swift */; }; + 32F1B01A60BE15B8E11EF3AEDF42B604 /* FBSDKBridgeAPIRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7177FFB0CC66C2F45EF1452219DE640E /* FBSDKBridgeAPIRequest.m */; }; + 339E9A1B126244052143190B51BDB0F3 /* FBSDKGraphRequestDataAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 566635E66501C376615ED896BE84D6AF /* FBSDKGraphRequestDataAttachment.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3485225D28592D4ADF4F09C9E02192C7 /* FBSDKError.h in Headers */ = {isa = PBXBuildFile; fileRef = 974F91CAFC2986D8C530D5B9A8A31235 /* FBSDKError.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 35CEE33CA3BE07FEABFCFCEAD9F2A80C /* FBSDKViewImpressionTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = A3A931E3C1D460AD4514752135484BF0 /* FBSDKViewImpressionTracker.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 35FAE588DF52D7D3F80247AED004F4FD /* GraphAPIVersion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 506F678893E0B99FEA2B9C80CA7002BC /* GraphAPIVersion.swift */; }; + 368D36D37F583E1008BDFF0D2072C01A /* FBSDKDynamicFrameworkLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F2DF17B1CB0DE2852A8D2DBAFD9499D /* FBSDKDynamicFrameworkLoader.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 37A57A4E6F88A40BD5658E948EE276BB /* FBSDKTimeSpentData.h in Headers */ = {isa = PBXBuildFile; fileRef = 290DB4CC76FBEA3DBC945D31E6101FE7 /* FBSDKTimeSpentData.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 38C883E92F87F2FBC5368E7509832C9C /* BFAppLinkReturnToRefererController.h in Headers */ = {isa = PBXBuildFile; fileRef = 80DBD8F230DB3428F2668396F7331B4F /* BFAppLinkReturnToRefererController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 398627714631F88549A3E7EDFF226539 /* FBSDKContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97BCFD43D7B4E914A1679DC55242A5F3 /* FBSDKContainerViewController.m */; }; + 3A685C4D065E4B2386DE8C2A5B61D205 /* FBSDKAppLink.h in Headers */ = {isa = PBXBuildFile; fileRef = A53E48D566E078C111A90ACB28CB9BE6 /* FBSDKAppLink.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3B8C6D726EA99B201A46B4AC7B956899 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E039106125081C0B5EC75936CF35AB0B /* Foundation.framework */; }; + 3C53ED2C53B45D5374B194C56FFA509B /* FBSDKBridgeAPIProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = AE148327F572476FCADE4E845B3BC9F1 /* FBSDKBridgeAPIProtocol.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3D2682BBDF72F1671A7CFD834E3189ED /* FBSDKAppEventsUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = ACBADAA6DCD285B6E4579FE96811548C /* FBSDKAppEventsUtility.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3D676BDE5A25185E31B2ED7DEE1329DC /* FBSDKButton+Subclass.h in Headers */ = {isa = PBXBuildFile; fileRef = 508684BFB52B9D5C59893D5F163EBB4A /* FBSDKButton+Subclass.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3E03ED9D542EE888317E7E402B60A6FD /* FBSDKURLOpening.h in Headers */ = {isa = PBXBuildFile; fileRef = D7D3B94D90F1EB7352622ECC5659FC20 /* FBSDKURLOpening.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3F888AD30840AC0999B4E7227556FC59 /* BFCancellationTokenRegistration.h in Headers */ = {isa = PBXBuildFile; fileRef = 557AE8E03BF7C5A71FA81C74C2826058 /* BFCancellationTokenRegistration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3FAF063A1BF13245A1683C291B5ED83F /* FBSDKAppLinkReturnToRefererView.h in Headers */ = {isa = PBXBuildFile; fileRef = D39B798959A8843588079617C7BAD560 /* FBSDKAppLinkReturnToRefererView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4044A2E6F601BC9EC577F3ECF616AE42 /* Bolts.m in Sources */ = {isa = PBXBuildFile; fileRef = 41A7F0608AB0737D45F20EAEFA04DF62 /* Bolts.m */; }; + 4084828F57AD57FD0FE676DFC0F22A6D /* FBSDKAppLinkResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = B1EA2B5AC5A737699DA9DBD7BDFA25EB /* FBSDKAppLinkResolver.m */; }; + 40FDBC63E4ACD92DD150ECEF8FCB8DB8 /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8AD401534246B014683F7A038308FE9B /* FBSDKCoreKit.framework */; }; + 41A0834451988DBB43B0B73352D6AEDB /* FBSDKLoginManagerLoginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = C8FFFB3AAD4500FC7B5285D003B73ECA /* FBSDKLoginManagerLoginResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 41B4AF46CEC88ADB9E66609638A47EF9 /* FBSDKDeviceLoginManagerResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 8727DC3E9D658A1257BB80C691F6AC6E /* FBSDKDeviceLoginManagerResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4297E89C5DB289321D0A78EBAE180CD2 /* FBSDKMonotonicTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 68AB049331A1392A3ED84FFD3CDB3A86 /* FBSDKMonotonicTime.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 440917719AAF68F3D2CF405FF824FC5F /* FBSDKEventBindingManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BADE1E77178E394700199FCD1A0F68A /* FBSDKEventBindingManager.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4481F98ABFDD9CCC8D4EDAC1B22C41E2 /* FBSDKGateKeeperManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EFE44A9F51381B04CD51D6CDB0C0C5D /* FBSDKGateKeeperManager.m */; }; + 449E51B17FBC1FDEB5B2774920EA3F65 /* FBSDKInternalUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = CDD371832057051B070A360AD037809B /* FBSDKInternalUtility.m */; }; + 46659D766A25A449FD9CE62A197686A2 /* FBSDKGraphRequestConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = D49590CD4CE7520BD3349F78F31D24C9 /* FBSDKGraphRequestConnection.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 46E5E72DBF6873F19C9AD4FBDA117D36 /* FBSDKColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 551D5A76159ABA66FF300C87A600B56C /* FBSDKColor.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 47AEFF2BE4CECDF5E8392151889B84C8 /* FBSDKCodelessIndexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8FEEB51211E5338A3D5EE865CB925E0C /* FBSDKCodelessIndexer.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4890F5DA6CCE3D517DFCA4C365AE40E6 /* BFCancellationTokenRegistration.m in Sources */ = {isa = PBXBuildFile; fileRef = 68FEE7F80D6DDE0FE7842DC410C77AA3 /* BFCancellationTokenRegistration.m */; }; + 49E2831BFAF57FF399DE6D2BC31B860A /* FBSDKAccessTokenCacheV3_21.m in Sources */ = {isa = PBXBuildFile; fileRef = 44E0DEC59529AAB006B6DA3151BBC56B /* FBSDKAccessTokenCacheV3_21.m */; }; + 4A5047292B1E4CF4227D323DCD03ED25 /* FBSDKPaymentObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = E2E6EACD9FCDC562690B3C02B6BDE9A7 /* FBSDKPaymentObserver.m */; }; + 4B9B578295370F9BC38E0479D45C02F1 /* FBSDKCoreKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B0A0DF1A607853D4F45A638BFF49F79 /* FBSDKCoreKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4CC846A4CA2567D16FBA6AEAA658BD94 /* Pods-FirebaseFacebookTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BD39BDF978EB5365CB2B0B4F6565F21 /* Pods-FirebaseFacebookTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4D86423305142A09FA939C8E4C62A734 /* FBSDKLoginManagerLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 16494F59C307A386B8DC2E3F08606D22 /* FBSDKLoginManagerLogger.m */; }; + 4E5A08D08073CC80938F6FA22C64D6B6 /* FBSDKSwizzler.h in Headers */ = {isa = PBXBuildFile; fileRef = ACADDC7CD7ED899576C70149BC64F7B8 /* FBSDKSwizzler.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4E8833EB4286647804331ADB1F0B1745 /* FBSDKErrorRecoveryConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = C3BDC625D9FAA6DD420C832C2CE18384 /* FBSDKErrorRecoveryConfiguration.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 507BE3FB73ED274BD8480684CDCBCB02 /* FBSDKErrorRecoveryAttempter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FB12D40B0E47271C94A72F7FE50484B /* FBSDKErrorRecoveryAttempter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5092564A3320954F35BD1201505F9F95 /* FBSDKError.m in Sources */ = {isa = PBXBuildFile; fileRef = F0CAD9103EAFEB61BA931197363A7B79 /* FBSDKError.m */; }; + 50E2BA3D103DB649946E279A6DE051EF /* FBSDKTooltipView.h in Headers */ = {isa = PBXBuildFile; fileRef = 59B98067869D7376683D02CBB745AF16 /* FBSDKTooltipView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 521E593D8C79C1C9C2059A6FE4E1743D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E039106125081C0B5EC75936CF35AB0B /* Foundation.framework */; }; + 524093B47B9725E9AD4884A62CD85209 /* FBSDKLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 65E70D0017D39D26B459F22371EE2031 /* FBSDKLogger.m */; }; + 530B9D2A115F723B7766AFB6774179AA /* AppEventName.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6F04EE6BF31E716FBA28D676C46A34E /* AppEventName.swift */; }; + 5494CAC8756642FA37C6EC558B1F1033 /* FBSDKAccessTokenCacheV4.m in Sources */ = {isa = PBXBuildFile; fileRef = B05479925008D2BF096F87D8F13B3B04 /* FBSDKAccessTokenCacheV4.m */; }; + 55298863F1F53C1A8A561CF12D913B99 /* LoginButton.Tooltip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE291DA920B96DAC8A4CFC6144F33E2 /* LoginButton.Tooltip.swift */; }; + 555103407C95EDB4A9BBF40E4F2583CB /* Pods-FirebaseFacebookUITests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B7D253DEF14B8D6D8E6593BACBDD8B17 /* Pods-FirebaseFacebookUITests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56044AA6F653CE2E27FEB0B0BFE801F5 /* BFAppLinkTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D2DA4C8E75E84F6BE220E5A536A0013 /* BFAppLinkTarget.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5875C6B0BE44FBEAB2D43D8CC7EF4808 /* FBSDKAppEventsStateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = F4EE392243C84B0B176AC7D8438A3E0B /* FBSDKAppEventsStateManager.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 595196F9DFCE186EF4402E18CF28B8C0 /* FBSDKBridgeAPIRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = D32ECDAA1E8E8F7C88E4FDDF83D11625 /* FBSDKBridgeAPIRequest+Private.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5A52C5A870731D782A68ADE01321A98E /* _FBSDKTemporaryErrorRecoveryAttempter.m in Sources */ = {isa = PBXBuildFile; fileRef = 500D2406916FB32BB5BFF17C434FAFFF /* _FBSDKTemporaryErrorRecoveryAttempter.m */; }; + 5A878EC807ECFED8759DEF6782BA782F /* FBSDKBoltsMeasurementEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 9EEB1ADA1399BDF8189396CC0B0B3A06 /* FBSDKBoltsMeasurementEventListener.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5B9F6E1F79B40D91080F1439B3B5F59C /* FBSDKUserDataStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 93515A6DE062C65528B6151B44DB9892 /* FBSDKUserDataStore.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5BECBE3547A4AE1B307FAFC7CC38C62C /* FBSDKAppLinkReturnToRefererController.h in Headers */ = {isa = PBXBuildFile; fileRef = 07F0EBFF83E0E3D91DB1BC3A7BE02DD1 /* FBSDKAppLinkReturnToRefererController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5C40A8806407DB0FB1921F4CD61EEA56 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E039106125081C0B5EC75936CF35AB0B /* Foundation.framework */; }; + 5CD8E4B385FE47DC7473B071A6A87332 /* FBSDKCodelessIndexer.m in Sources */ = {isa = PBXBuildFile; fileRef = CB5D96E7448BAC84C4C1E20A2977DD3A /* FBSDKCodelessIndexer.m */; }; + 5F9187EDCF1DCF717383592976472150 /* FBSDKGraphRequestDataAttachment.m in Sources */ = {isa = PBXBuildFile; fileRef = BBC1E4C79B04C9FF79A57EE8D624CAFF /* FBSDKGraphRequestDataAttachment.m */; }; + 606B0F636344D7E42EE4DE1BC380F192 /* FBSDKAccessTokenCacheV3.h in Headers */ = {isa = PBXBuildFile; fileRef = C2B21CFD10C228275797A9BE045F1C62 /* FBSDKAccessTokenCacheV3.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 60C13297717102598A4D186D42715BFF /* FBSDKBridgeAPIProtocolNativeV1.h in Headers */ = {isa = PBXBuildFile; fileRef = AFF88408E108181C1F206F5A3D8D74E3 /* FBSDKBridgeAPIProtocolNativeV1.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 610CC513736B2AB3A519B0BA7072C249 /* BFMeasurementEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 888EA34735AA4574DC7F4F977F73702D /* BFMeasurementEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 612296B871FDB01D118C34FA6547AE2D /* FBSDKBoltsMeasurementEventListener.m in Sources */ = {isa = PBXBuildFile; fileRef = D26B517EAD97A8CF5D1CFFDFC9E58D18 /* FBSDKBoltsMeasurementEventListener.m */; }; + 61A126566067B65D52547783EBB4604E /* BFWebViewAppLinkResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A09BBEB7FA6FA1B0B8FA3624A5008AE /* BFWebViewAppLinkResolver.m */; }; + 61AFD6E8A76361A07FD3A78A8F335BD6 /* FBSDKBridgeAPIProtocolNativeV1.m in Sources */ = {isa = PBXBuildFile; fileRef = D9DBD0D8C4E85414354E3DA5629C83EA /* FBSDKBridgeAPIProtocolNativeV1.m */; }; + 63341DB0786EDD9567C2106D1BFF55EF /* FBSDKCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = C5834D25320E9EF30710132BCA0F2675 /* FBSDKCrypto.m */; }; + 6414D8F1AB33F0232E35BC1B54DE575F /* FBSDKAccessTokenCacheV3.m in Sources */ = {isa = PBXBuildFile; fileRef = 93ED28F7262E6362F3C4F7572CA4AFFB /* FBSDKAccessTokenCacheV3.m */; }; + 668C7F7814CBC2327D840333E59213B8 /* FBSDKURL.m in Sources */ = {isa = PBXBuildFile; fileRef = A14E0460928F8BF4822273D3A7BB054F /* FBSDKURL.m */; }; + 67BA16D061A95379D98AD89CFB20DF3D /* FBSDKAppLinkTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = DF14CF83B18F464FF3EED94BBAB30F60 /* FBSDKAppLinkTarget.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 67C8E03E731FEA74E8469D62A412EADA /* FBSDKAppEventsState.m in Sources */ = {isa = PBXBuildFile; fileRef = A7FF088CA9018D07B73FDF3A7E74E660 /* FBSDKAppEventsState.m */; }; + 688894DCD0767FA211FA64A28FE410B3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E039106125081C0B5EC75936CF35AB0B /* Foundation.framework */; }; + 693B7CFB754828883E2E6EC222E47AC1 /* SDKLoggingBehavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C5DCA947D8FFFA5795F95F89E975537 /* SDKLoggingBehavior.swift */; }; + 69F3D835C2BC677CE7CB0AD718791D9B /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 419995ECFFCD9828A3937FCC43EA8F41 /* Bolts.framework */; }; + 6AE5D7DC2777A0E2D846B9233BC544CC /* FacebookSDKStrings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 7CD89427BE2200BCFF02B38E66B480C1 /* FacebookSDKStrings.bundle */; }; + 6AF3F0D78EFADDCB704DC0ECA87D0E70 /* FBSDKBase64.m in Sources */ = {isa = PBXBuildFile; fileRef = BB4E1694A0F3CA4C437482A99E1EB422 /* FBSDKBase64.m */; }; + 6C504F88B03185510578704238E7424C /* FBSDKCodelessPathComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F5E990956288A27C71F6B314D89D47C /* FBSDKCodelessPathComponent.m */; }; + 6D4159AE2DAF3428CB42FA2A8C1F011E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E039106125081C0B5EC75936CF35AB0B /* Foundation.framework */; }; + 6D57DCD6F325540D8A8C92E6F2F4841A /* FBSDKServerConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F24BEAE66928E93498FD1FC35558946 /* FBSDKServerConfiguration.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6E38F5D85DA1886DBB62884907DA69A0 /* FBSDKKeychainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEEB70E69C5DC328FCF02868C80588C /* FBSDKKeychainStore.m */; }; + 703EBFCD66B6DE11F316AB33F2DA6787 /* LoginResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3492E233CA691DB5918773AB8B7DA941 /* LoginResult.swift */; }; + 70951E19FF13C57BA43CFF4E9F456319 /* FBSDKCodelessMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = D4F13E7B4359C11837D1BD13FCCD96F2 /* FBSDKCodelessMacros.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 70A2A82E14C53471498C580726F8B354 /* FBSDKApplicationDelegate+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = C81482D3691E414A7290D7FA7B4E1D23 /* FBSDKApplicationDelegate+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 71E227DC49DE4E26C4CC886B4C29006D /* FBSDKAppEventsDeviceInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = D919921B742833D129A26696254B547E /* FBSDKAppEventsDeviceInfo.m */; }; + 728E288129307DDB2593EC6DCCB2E8A2 /* FBSDKAudioResourceLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = A04891767E0201B5351B2C4976989CE2 /* FBSDKAudioResourceLoader.m */; }; + 72E8FEE43AB898F198C96319AC911F27 /* FBSDKApplicationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 34BD021657BFF30318B56235BD1B4809 /* FBSDKApplicationDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 73F5E314C20CFB83A38CA0F0B1CA7087 /* FBSDKGraphRequestConnection+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 036C02FD7710A186D011F91E217F0FC4 /* FBSDKGraphRequestConnection+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 74205DBD50EA723F44708B276288788E /* FBSDKLoginKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 080FDF9149E53349A34ABF2116B90340 /* FBSDKLoginKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 74636C62F77A8EAE2A9211F83CA42E50 /* FBSDKBridgeAPIProtocolWebV2.h in Headers */ = {isa = PBXBuildFile; fileRef = 90C6813EE85691FDE9E4E877A5387FBA /* FBSDKBridgeAPIProtocolWebV2.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 749A083774940544E000702C88CAC232 /* FBSDKGraphErrorRecoveryProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = AC3F73CBCC3CD4E32CD5B2323A6C098F /* FBSDKGraphErrorRecoveryProcessor.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 74DAC0F0E92AA0D2927AA542CF1D4372 /* BFCancellationToken.m in Sources */ = {isa = PBXBuildFile; fileRef = C50043022E8B17E601C6169AF438B2A0 /* BFCancellationToken.m */; }; + 75FE1395739BD816E859608EA0EDEDBC /* FBSDKApplicationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D63183A1B1C7FBF7B2BD7D091C591C7 /* FBSDKApplicationDelegate.m */; }; + 76581E05FAEECC5B4A95E0C8678EF99C /* AppEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 488890756EAF6D6CA6A5781BAC2DEF79 /* AppEvent.swift */; }; + 77A9C305D35C38C9867D302DE79A1AD6 /* FBSDKSwizzler.m in Sources */ = {isa = PBXBuildFile; fileRef = B0631E10EBC97CD9CAF2F5492651BC24 /* FBSDKSwizzler.m */; }; + 77D4D2EADBC76131BE2D5AAE179C65CF /* FBSDKLoginKit+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C36EDD7EAB01DBE66E13CC551FC468A /* FBSDKLoginKit+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 78552DABA4BE14C8E4D0C05677D9B98A /* FBSDKLoginUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C518BFECA0DB0388E8906DF648169E1 /* FBSDKLoginUtility.m */; }; + 7883669940AA78CE08C3ADDADDC5B7B5 /* FBSDKAppEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = DFE7AE824015437D6F413F207B1CAADA /* FBSDKAppEvents.m */; }; + 78FE166D406504AAE46FB11C14F1BF27 /* BFExecutor.h in Headers */ = {isa = PBXBuildFile; fileRef = B4A4373FC834526B70A77BA8BFED61E2 /* BFExecutor.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7A4DDF4447A2997179BE98FED0AD9DB6 /* FBSDKURL.h in Headers */ = {isa = PBXBuildFile; fileRef = F348A070247702C9E77CF301D0730BF7 /* FBSDKURL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7A747E602BD7942557689BF836D2A298 /* FBSDKCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = D6DE8A857EE2449C8542BB3D1B98B254 /* FBSDKCrypto.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 7D3982CFC665F718EBEC144ACE606B68 /* FBSDKServerConfiguration+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = F101D72B1017C65C091D4F86F9DBCD35 /* FBSDKServerConfiguration+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 7E8683D8F563BF98193C9B9EA9DD7424 /* GraphRequestConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE3241E14BFC8824D49D2210C5E7B46D /* GraphRequestConnection.swift */; }; + 7EA8F690819D6E490059ECB07D85628E /* FBSDKCloseIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A15EB5D734DEEE5301586381E27C32 /* FBSDKCloseIcon.m */; }; + 7FD87548A784D6A8B2A27288C99566FE /* FBSDKAppLinkNavigation.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A6BFDA1C43824235592F8244419B702 /* FBSDKAppLinkNavigation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 805808D97BD380866B2ABCFFCAE2A53B /* GraphRequestConnectionDelegateBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C5B960E36A0EEE53764285037E50E0 /* GraphRequestConnectionDelegateBridge.swift */; }; + 80752BFF147ED8ADD5C02384464E1269 /* FBSDKEventBindingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A3281A4424598C2D800FD1F0DB68DD6 /* FBSDKEventBindingManager.m */; }; + 82149818FE33B9E0F8CBE208223AA3DB /* FBSDKUIUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 73A233A2F8588AAB75A32CFC1646D1DB /* FBSDKUIUtility.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 821BDF4AD8E30F826D3E163108E57134 /* UserProfile.PictureView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C96AD04EF07191B9D21F613334AD704 /* UserProfile.PictureView.swift */; }; + 829AA39ADD795A764897E2FF5AF93983 /* FBSDKCoreKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 28730EA0F7F3CC41073C0A179FBE5813 /* FBSDKCoreKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 82E5AEFE8B8C7BB05A8713586D629FE0 /* FBSDKAppLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F555D4B07FA80E66EBDE7DC1EC2BB2C /* FBSDKAppLink.m */; }; + 82FC1DD7CDE9DFD39474E658BA6DE998 /* FBSDKBridgeAPIProtocolWebV1.m in Sources */ = {isa = PBXBuildFile; fileRef = 766E593CE56CD82B0DE52F1CFAF3B901 /* FBSDKBridgeAPIProtocolWebV1.m */; }; + 83138049E955D6ECAD9611F4AC734407 /* BFWebViewAppLinkResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C5A6CD1DE4D9EB92493CFF2AE0BA65A /* BFWebViewAppLinkResolver.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 83F528D855F095703DA4D6B83492A38D /* AppEventsLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CB5510D98FAD5030D71F6F8C6B64D20 /* AppEventsLogger.swift */; }; + 844DA060B7733B44BBD2EC39C44D276D /* FBSDKAccessTokenCacheV3_17.m in Sources */ = {isa = PBXBuildFile; fileRef = 18A84310D38F8B95AFC3F8E9A550C16D /* FBSDKAccessTokenCacheV3_17.m */; }; + 85D33B4C9C529E7303DE7E2D7A341BA0 /* FBSDKLoginButton.h in Headers */ = {isa = PBXBuildFile; fileRef = D3A876B1E35D3E0CF594219303084E5A /* FBSDKLoginButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 86EBF0F5E8A6503AA928932F53B514B3 /* FBSDKBridgeAPIProtocolType.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BDC323EE51667D974FBF07B3AA3DAF4 /* FBSDKBridgeAPIProtocolType.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 86FBEB3BD444B5C55B842A40F9B893EE /* BFAppLinkReturnToRefererView.h in Headers */ = {isa = PBXBuildFile; fileRef = CDEE3D64FBA2AFED63F91D1C41E05D5C /* BFAppLinkReturnToRefererView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 872236732A2C6EC517825700760D4980 /* FBSDKErrorRecoveryConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = C3CE4CCE2DA2AA4CD3590647E839C28B /* FBSDKErrorRecoveryConfiguration.m */; }; + 879D3BAFB02204D2E4ED929CC53CC633 /* Bolts-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 05A428095E510B4C8641761BDC7CCA92 /* Bolts-dummy.m */; }; + 88F85828F62E3958E7D6A2CA624E42C0 /* Optional+OnSome.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAD2BA1020E28B0D93984586FB4D84BF /* Optional+OnSome.swift */; }; + 8958EBDBD07F22FA8DDBE48563D87B34 /* LoginBehavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2EA2A801F7321CA9042EF0A0D1B6DE7 /* LoginBehavior.swift */; }; + 8B1E53F21CC9665F8F631B8AB772B216 /* FBSDKImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A021C9B0EF3E3BB9B4FB51B43899C2E /* FBSDKImageDownloader.m */; }; + 8B533682B55D5ADC1BBABE5DA70EBDA1 /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8AD401534246B014683F7A038308FE9B /* FBSDKCoreKit.framework */; }; + 8D7AC51294909811B6E82064F66C97FE /* BFAppLinkReturnToRefererView.m in Sources */ = {isa = PBXBuildFile; fileRef = C8F9B880AB350C83C6F1F96732ECAAA6 /* BFAppLinkReturnToRefererView.m */; }; + 8DEF1D3995F528CD83D4EFC3E0FAA778 /* FBSDKWebDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 080DA838485EA5271F2A646D6854F625 /* FBSDKWebDialog.m */; }; + 8E7BD189BDEBFEB6202F533FB50ACC4C /* FBSDKDeviceLoginManagerResult+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 3159E9A22BE259EF934DC7CFB03ABADC /* FBSDKDeviceLoginManagerResult+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8EA44DD9087CC66063D154DF35923078 /* FBSDKTooltipView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA490C701DE1DB47E50D89315A67B2A8 /* FBSDKTooltipView.m */; }; + 8F7AC532B428EFD06E1A4293EE8EF84C /* FBSDKTriStateBOOL.h in Headers */ = {isa = PBXBuildFile; fileRef = 57C2D45CB3D2809A8B17C80E4E422F48 /* FBSDKTriStateBOOL.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8FDB76BD1A0C6AF6ED7C96E94015E393 /* FBSDKAccessToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BC9A6EC951C13228E2A7E729B1EE38B /* FBSDKAccessToken.m */; }; + 908C503123B7415DB5777ECBC81B6BEC /* BFAppLinkResolving.h in Headers */ = {isa = PBXBuildFile; fileRef = C136E040D485DC612A5079BC5F5875F4 /* BFAppLinkResolving.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 91964100925F5C066916BEBADA11A614 /* FBSDKErrorConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = B5FE03B932C29FEC3A8BDA1CD1A7BC2A /* FBSDKErrorConfiguration.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 92B24D6398699897F8F9F1DE4362F4C4 /* FBSDKLoginTooltipView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4046826AE70D9501BD9C197763055674 /* FBSDKLoginTooltipView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 936F9B52CB6B4663B06F8C5D0EEEF58E /* FBSDKLoginCompletion.m in Sources */ = {isa = PBXBuildFile; fileRef = C1F634BB4EAB39C6CAC69641F45B0230 /* FBSDKLoginCompletion.m */; }; + 9391322062A67966035A60FC5F5AB51C /* BFTaskCompletionSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 15EB6728949AB9B127E1705D4DD0EBA8 /* BFTaskCompletionSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 93AE625232437525747BD760B4D221CE /* FBSDKDeviceLoginManagerResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6336A21020CE6493E4B67A4521F275F8 /* FBSDKDeviceLoginManagerResult.m */; }; + 93F1A9F96D6F4239F9B4EAD183A76820 /* FBSDKConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 90CBCB02EBF0A97CFAA6A138CD9DB025 /* FBSDKConstants.m */; }; + 95ABD183D52D54CD2460C4EFB326B716 /* FBSDKLoginCompletion+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7FF74577E9533ED83CEA3EFF57B45BD8 /* FBSDKLoginCompletion+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 966109F7772395BF01FE8ABC571BCA4F /* FBSDKUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 06B036555D7FF3F3BFAC7F253BE14C33 /* FBSDKUtility.m */; }; + 986149DFBF2D006806E7DE055378548A /* FBSDKBase64.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A52CF09EDC435AB4C0E6C6B80F17DE6 /* FBSDKBase64.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9894AB4A4CF55C33704D7F0C135E8B92 /* FBSDKCloseIcon.h in Headers */ = {isa = PBXBuildFile; fileRef = 91C6D8038755CCB150C24666E4E1B6C2 /* FBSDKCloseIcon.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 98F6D91FE7DA32F6713967FE14EEDF8C /* FBSDKDeviceLoginCodeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E3846D343E80CEB87CF9BFDFC980538 /* FBSDKDeviceLoginCodeInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9971E46C4A7FAE441C964D11ED028880 /* FBSDKURL_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A97D7E745468B5A9CAC25746EF54EA4F /* FBSDKURL_Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 99C50433212EC25D746CA0E1157FD3A8 /* ReadPermission.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AE5B86C3C82964117C6526DE84BF3F0 /* ReadPermission.swift */; }; + 99DA429F118B230FCB9379239608C931 /* _FBSDKLoginRecoveryAttempter.h in Headers */ = {isa = PBXBuildFile; fileRef = DD82114FE772AE114C3F202312D6508E /* _FBSDKLoginRecoveryAttempter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9AE09678D6DE901407F5259823BFEF20 /* FBSDKDeviceRequestsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = FD5DE46B1410494DAAC27BFAFFC61434 /* FBSDKDeviceRequestsHelper.m */; }; + 9C3E0026A95F0C386069B6C63CFB33C4 /* FBSDKWebDialog.h in Headers */ = {isa = PBXBuildFile; fileRef = 42D35AF347118FAA295ED95428EDC8D6 /* FBSDKWebDialog.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9C4B6D703AE5D4CDAED221D59B142781 /* BFMeasurementEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 13774A590DCE4E404826237859DF9962 /* BFMeasurementEvent.m */; }; + 9D0EDFB5997462721C450160FEAC9B03 /* FBSDKAppLinkReturnToRefererView_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = C6B4CEC742828D8414EB2385220750F3 /* FBSDKAppLinkReturnToRefererView_Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9D5BF18FC7CCF4940DB8DC3977DCBDBD /* FBSDKLoginManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 235BE672B5D832598057684ADFB3A248 /* FBSDKLoginManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9E5FE40120C670A8779A573E2232BA8D /* FBSDKErrorRecoveryAttempter.m in Sources */ = {isa = PBXBuildFile; fileRef = F4C3F281790DBB4E8AC29B4CCB33760B /* FBSDKErrorRecoveryAttempter.m */; }; + 9ECC256735D6116A19F4244D3F42947A /* FBSDKServerConfigurationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B485EA057B27512FE1A27D1A9231C81A /* FBSDKServerConfigurationManager.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9F4712CCFACFB4BAD8936012C804F4D2 /* FBSDKAccessTokenCaching.h in Headers */ = {isa = PBXBuildFile; fileRef = D588C69EDC10372A11B58993B951BDC0 /* FBSDKAccessTokenCaching.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9FD4EC67629E630FAF533FD7419709A6 /* AccessToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24420724F01C19ACBEAB9F0E88E470A8 /* AccessToken.swift */; }; + A0CD38F8FECE405B0AF36263813585DC /* FBSDKDeviceRequestsHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 8D762D9DCA27F47BED5C50990CE7E953 /* FBSDKDeviceRequestsHelper.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A3BF9B49EB8EED72C6B7CC4BEF5FEF70 /* FBSDKViewHierarchy.m in Sources */ = {isa = PBXBuildFile; fileRef = E588E2C51BEF7AD7D9180235C5A0DAD3 /* FBSDKViewHierarchy.m */; }; + A3EE0B3315E24C17B7C6C4DA4375E2D6 /* FBSDKMeasurementEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 13F06BB2F400742BCC521EA52F38A869 /* FBSDKMeasurementEvent.m */; }; + A4562956B252088DECB1F92534AF7319 /* FBSDKAppLinkUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = C96B6FE17CDB3AEEED9EF5CB531FFDE6 /* FBSDKAppLinkUtility.m */; }; + A4627A0304C6FCFE8AF5A7D9C47CB6E6 /* BFMeasurementEvent_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5809D826AF490B7F1B20FC8E1ADD0C72 /* BFMeasurementEvent_Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A4844515FB953F33B28FBDF62AA47717 /* BFGeneric.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D7A52CC5F230A23B4EBD2882DA4F43E /* BFGeneric.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A4AE3EAA7D54715636DC1C387B00E50D /* FBSDKGraphRequestMetadata.m in Sources */ = {isa = PBXBuildFile; fileRef = 7180A7CD963BD168F047FAABA580D433 /* FBSDKGraphRequestMetadata.m */; }; + A73F6B3FD41D74402874DCAE60E326E4 /* FBSDKDialogConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = CEF393AABD76AE0929B837F2998993A0 /* FBSDKDialogConfiguration.m */; }; + A7907075A537DED782AA25C5538F3051 /* FBSDKSettings+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 20E1A868B08F99B5BCA4EB104A8A347A /* FBSDKSettings+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A7DC849091B662BE72C63CDCCB80EA23 /* FBSDKAccessTokenCacheV3_17.h in Headers */ = {isa = PBXBuildFile; fileRef = 54958EBB4CE557FCD1D9957CD44DE3E2 /* FBSDKAccessTokenCacheV3_17.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A92758B2CBF990597679AB4534B0D9A1 /* FBSDKKeychainStoreViaBundleID.m in Sources */ = {isa = PBXBuildFile; fileRef = 96592F50C3B97805DB5A36FE234F3AD1 /* FBSDKKeychainStoreViaBundleID.m */; }; + AA9E25B81DE0514C290DF3728B431E12 /* FBSDKAppLinkReturnToRefererView.m in Sources */ = {isa = PBXBuildFile; fileRef = FCEA4B1E1425F3E0A0F8238073B6CA5E /* FBSDKAppLinkReturnToRefererView.m */; }; + AACE50EE21580B023B3FCD70AE066BFF /* GraphRequestProtocol.Bridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 241DFB105BD5F1824A244549AFC77D31 /* GraphRequestProtocol.Bridge.swift */; }; + ACFFDCD15150DE7B22C2A6C146994239 /* FBSDKLoginKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 204430D013CE1451DF1FA2EB5F892E85 /* FBSDKLoginKit.framework */; }; + AD118EC64163B5283C513FE42D4D539F /* BFAppLinkReturnToRefererController.m in Sources */ = {isa = PBXBuildFile; fileRef = 41E89AE5A2F82EAC24FB1A1EB204E02B /* BFAppLinkReturnToRefererController.m */; }; + AD74B40867BE59D8F40DEFE07E9F36BC /* FBSDKAccessTokenCacheV4.h in Headers */ = {isa = PBXBuildFile; fileRef = DD29DE9F60DC273B9A5C29EF49BE8340 /* FBSDKAccessTokenCacheV4.h */; settings = {ATTRIBUTES = (Project, ); }; }; + AE0F82EA1B209E49571FB4D7BE87960E /* BFTask.h in Headers */ = {isa = PBXBuildFile; fileRef = F40E0DA716D3F4B73232D39EA2216605 /* BFTask.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AEC5EC0403C6D47845356840B7EBBDC8 /* FBSDKLoginUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 8206DFFBD6ACDD0175B4360BD7CC5082 /* FBSDKLoginUtility.h */; settings = {ATTRIBUTES = (Project, ); }; }; + AFF5B9191C05F6B9189163B87519E1A7 /* GraphRequestDataAttachment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A57EF173E4DAFB9C352F18D7D72A722 /* GraphRequestDataAttachment.swift */; }; + B01CB8A24B585D6BE36C546C69408276 /* FBSDKBridgeAPIResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F1406A54D2780F66960BFD6C78D65CF /* FBSDKBridgeAPIResponse.m */; }; + B05BE2F9678AF095D31691806C4C660E /* LoginManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D35148D2C221D14A8F873DE1E702D33 /* LoginManager.swift */; }; + B063A9B62888A5ACE2E2B46283496602 /* FBSDKLoginError.m in Sources */ = {isa = PBXBuildFile; fileRef = 43224DF54EC5DAD85AD52774ECE7EBE1 /* FBSDKLoginError.m */; }; + B17D8E2F0B7FC6A5E798661586A02DDC /* FBSDKMutableCopying.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F6CFEEB0C3D9A3B4FFBDBC1FDCBAFF /* FBSDKMutableCopying.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B1A3C1270EC95A830264CCDD661676D3 /* FBSDKProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8150BAF9D1CD23158A7DB3C79B0109C8 /* FBSDKProfile.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B2601B2BCDC8606F2A85B4DF9AE8B810 /* UserProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EC3FFE1F66DCBF5A5EC2ACB4A80B1B /* UserProfile.swift */; }; + B2DE6D4F458E3A98AE85BBA3C0FFC9FA /* LoginButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 634E36D0027CC5840ACAC848176495BB /* LoginButton.swift */; }; + B3318911BAEADEE7D22907344269AD33 /* FBSDKURLSessionTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 08BE087D58E8AB263FE0190B9BE6F8E6 /* FBSDKURLSessionTask.m */; }; + B457AE0ADB177768F54242C20A7E23AC /* FBSDKAppLinkNavigation.m in Sources */ = {isa = PBXBuildFile; fileRef = 21BC737718AECE8F072C7751B6F365D2 /* FBSDKAppLinkNavigation.m */; }; + B5646360A99FAC35299A69CD075E4860 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E039106125081C0B5EC75936CF35AB0B /* Foundation.framework */; }; + B5A239E340D70F27CA47EE93F666D492 /* BFCancellationTokenSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 899486C2BB09BC75D1941CCA01558952 /* BFCancellationTokenSource.m */; }; + B5C056E7570B8312A1C9459BBFB42101 /* FBSDKLoginConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = AD72B034D91FFF4FC30C9177D412A80B /* FBSDKLoginConstants.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B776A2FB233C19447327EB72FB0B8C03 /* FBSDKHybridAppEventsScriptMessageHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A202ECEC2738B56C1FF5F6D18834421 /* FBSDKHybridAppEventsScriptMessageHandler.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B8AC53A4C8F58BDFD9F42F507BE636A3 /* FBSDKLoginManagerLoginResult+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D7B504FF4C1F7EEDB8AABA9C07A60F7 /* FBSDKLoginManagerLoginResult+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B9C8E0591F7ED6732FAF560F46CAB7D0 /* FBSDKEventBinding.m in Sources */ = {isa = PBXBuildFile; fileRef = 8AAE70DBB6B225D1520AEDEF4AF2A6E7 /* FBSDKEventBinding.m */; }; + BABE6311442206D70620CCD3CFF6FCDB /* FBSDKProfile+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 10E12239F1746A09FA0557B85CE03B99 /* FBSDKProfile+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BB046EA973B2AA90ECA3F93929783D69 /* BFAppLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 18F8D6DE5BAB0900AFB9035F788D117A /* BFAppLink.m */; }; + BB10F8720D6E2479E0662D963CBE05CA /* FBSDKBridgeAPIRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = D1CF000AADE920FD4875CF67539B26EB /* FBSDKBridgeAPIRequest.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BB45E86070B2668A96080D986ADAEFBF /* FBSDKHybridAppEventsScriptMessageHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 624997EE99258B4AE2E35E76F1083B14 /* FBSDKHybridAppEventsScriptMessageHandler.m */; }; + BB7A7198F1D0A4A8E3985E7E07564DFB /* FBSDKCodelessParameterComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B3CD6B3A7D5D891FEC7B475932BBC1B /* FBSDKCodelessParameterComponent.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BC11060B4209F367393C2DDA51362FDF /* FBSDKTestUsersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 108C8E190CCC474C7F8DE9CB44745612 /* FBSDKTestUsersManager.m */; }; + BCDF640199FA64092CE4C5EA1C50FAF7 /* BFAppLinkNavigation.m in Sources */ = {isa = PBXBuildFile; fileRef = 07CC757BB8A135EDCF929495184B8A4D /* BFAppLinkNavigation.m */; }; + BD25A92AEE68C38E69DC72DD635D40A6 /* FBSDKLogo.h in Headers */ = {isa = PBXBuildFile; fileRef = D5F026FB8682B880E1E59A57F77A103E /* FBSDKLogo.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BDE62EE2BCE10E1A58C0936759E3BA7D /* FBSDKSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 57F991D4E6E2B0B252E7C36113A2E345 /* FBSDKSettings.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BF68DDBA0E8A75559908E4A022DD501A /* FBSDKGraphRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 36C362E809BFDB0F79E2E39D9D576A4D /* FBSDKGraphRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BFD727930570DFAC2E57B81E37A0A6FC /* FBSDKBridgeAPIProtocolWebV2.m in Sources */ = {isa = PBXBuildFile; fileRef = FB743AD6C0A7205C001AAD14611B4576 /* FBSDKBridgeAPIProtocolWebV2.m */; }; + C4EC34541AC3292BAFFA7C3C0B4DB876 /* FBSDKGraphRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = F7E0BE1C1FCCFECB2934EE101C7003F7 /* FBSDKGraphRequest.m */; }; + C633DF373080F3F3C3F3EB1DBBEDCED6 /* FBSDKLoginManagerLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D856B32878CF155E6E4CB78AF143180 /* FBSDKLoginManagerLogger.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C774C8E1117106FA68E4A75DD0A305B9 /* FBSDKGraphRequestPiggybackManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 962DB8E603E7E2D0C1F2215E93550848 /* FBSDKGraphRequestPiggybackManager.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C87CF7F54DF37C9958504B656449E795 /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8AD401534246B014683F7A038308FE9B /* FBSDKCoreKit.framework */; }; + C89CB7A06A3418D1D5302DA304D41851 /* FacebookCore-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F0575992DC4D9911DD9BEBD28758C8D3 /* FacebookCore-dummy.m */; }; + C8C6F31857BDEE6A14C2C0C7F3629D5C /* FBSDKGraphRequestPiggybackManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E372B90109D9ED8B6E7BE6380F567C1 /* FBSDKGraphRequestPiggybackManager.m */; }; + C9BE322DF5352D209DDD8F519031FCA0 /* FBSDKTestUsersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D7BB1BA6543EF77E98E8C1E2EE4E4DA /* FBSDKTestUsersManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CADACE233EDFF7177706ED22AAA1FF87 /* FacebookCore-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A309F5CFAD1C525F46D765436B1F8962 /* FacebookCore-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CC0C7FDF12D51F78E958F598334E90CF /* FBSDKAppLinkResolving.h in Headers */ = {isa = PBXBuildFile; fileRef = C9D43EAE5481C8F331A6B65AA9FC88CF /* FBSDKAppLinkResolving.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CC288963FDA6EC6B2B51FBFA10C6FBF2 /* FBSDKTriStateBOOL.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E937589E0646B44063C1F5C0C984B57 /* FBSDKTriStateBOOL.m */; }; + CC762FB99CB65B71C0172135C27E1DD1 /* BFURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A64A93180E959D3C1E984064A56A259 /* BFURL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CF26ECAFBD60031B5843CEA4BBE97FDA /* FBSDKMaleSilhouetteIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = EA2130A517470A0B098259342AE1A936 /* FBSDKMaleSilhouetteIcon.m */; }; + D1B7351EDF42AA40B43AC63AA11AFB4B /* FBSDKAppLinkTarget.m in Sources */ = {isa = PBXBuildFile; fileRef = 437637CA4E9EB48CBCE3CE6763BB284B /* FBSDKAppLinkTarget.m */; }; + D1FFF438491170B616EE99D129E23BBC /* FBSDKURLSessionTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 36A0C4639EF2EB2FC3EB2EBEAA8763B9 /* FBSDKURLSessionTask.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D28F5A88DB962EAA066F7D300A6B580D /* FacebookLogin-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 82526418E9EA5F73EE0A80B274AA3BC0 /* FacebookLogin-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D312F5712754D5ABEA7082A30A9CFA75 /* FBSDKBridgeAPIProtocolWebV1.h in Headers */ = {isa = PBXBuildFile; fileRef = CD3C0C337BF5128DC67D82F58E1CD8B3 /* FBSDKBridgeAPIProtocolWebV1.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D3B436DC1C6D71B816CA0D1BF0F17932 /* FBSDKAppEventsDeviceInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EF4191DBAC9F54ED977E9768A551EF7 /* FBSDKAppEventsDeviceInfo.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D699A1564F9413DF8CF3190F8F4F7198 /* FBSDKSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = B4363CBA765EEF807988F70DC38F50B6 /* FBSDKSettings.m */; }; + D76DFEC031C0FD6A46B33907DA0DA09D /* FBSDKBridgeAPICrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = FBA21E4FE17D9BDD2E6400D7CF67F052 /* FBSDKBridgeAPICrypto.m */; }; + D7E03C9970E1B533C18A55EA598BF667 /* FBSDKConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = F18D45C77E07DA8FAD24A1D9B48CDE6C /* FBSDKConstants.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D7FA8C55932E1929418A64329AD3BE50 /* FBSDKUserDataStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 883C9603A179C10412293301BB5DFB24 /* FBSDKUserDataStore.m */; }; + D95EAD0E7564942B4D09ECDB5D6D003B /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 419995ECFFCD9828A3937FCC43EA8F41 /* Bolts.framework */; }; + D9DD55B74CAB46E388DC2125BEF22636 /* FBSDKWebDialogView.m in Sources */ = {isa = PBXBuildFile; fileRef = 00A9890D1CE1182CA8ECA91DE6590015 /* FBSDKWebDialogView.m */; }; + DA72D1C86958B2332449CF4163FA6385 /* FBSDKDialogConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 9914F308A21DC78AC5BD571AA96AA840 /* FBSDKDialogConfiguration.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DBA45645E9845B95A8579973767C7731 /* FBSDKAudioResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 574C93BC6CB90F856C1BDA0DEE80C65D /* FBSDKAudioResourceLoader.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DBB44EAF07644C767204BB597891AD98 /* FBSDKButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A372166948941B4A0137DB96C2F0A0B5 /* FBSDKButton.m */; }; + DC86171201FF1D4E1BA38729D4EDA65A /* LoginButtonDelegateBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78E6158C700392C9A7F679BF6CE71E06 /* LoginButtonDelegateBridge.swift */; }; + DD187D1044A342FF463BB6121FA72E92 /* FBSDKLoginKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F148335C273159553C9E1B0B71C7C0 /* FBSDKLoginKit-dummy.m */; }; + DD5D640D983715347B7C8006800C1EDA /* BFURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B18E5A48B0792808BA5AE7996898538 /* BFURL.m */; }; + DDB27124341489889AF0D8C1B3D400FB /* FBSDKWebViewAppLinkResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B8FC063A6581DE33C8844453BAE637B5 /* FBSDKWebViewAppLinkResolver.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DE147E8A64C0D36F81F8704BD7A13D30 /* PublishPermission.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFA44EA3B0830A3C08AC12E5E9F27A75 /* PublishPermission.swift */; }; + E01DB6EE10BBB5C51F47FE009FB942BC /* LoginButtonDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7618EAF7D6887F8AE919A6BF610C87 /* LoginButtonDelegate.swift */; }; + E039DEE2AA3A18A25CB766DDE4F946B6 /* FBSDKIcon.h in Headers */ = {isa = PBXBuildFile; fileRef = BFB13358DE17BF488D862279C58A1AF0 /* FBSDKIcon.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E04053D2AEFA5F67E89C36EFCAE4925C /* FBSDKAccessTokenExpirer.m in Sources */ = {isa = PBXBuildFile; fileRef = 76CCFE3BEF22D7DA0CD362C5A41AA0A1 /* FBSDKAccessTokenExpirer.m */; }; + E050360AA250F10954984C8E0F494089 /* SDKApplicationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D703AF3B5AA51B1BFE9DD846387CBCCA /* SDKApplicationDelegate.swift */; }; + E0F6C6C9C81AB28E6BD7E82C0CFFEF1D /* FBSDKLoginKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 285CE606A8DDD9CE4CC82E79D455B7D3 /* FBSDKLoginKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E1FD8F5D7FAFECF4666694DA2C76BFE6 /* FBSDKProfile.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF0C501C630830EC4B5DF71601062E4 /* FBSDKProfile.m */; }; + E24134182180F5FDE2B4F0ED1EAEB38B /* FBSDKWebViewAppLinkResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = A745231B41B0C4572F1F537C7B9A5913 /* FBSDKWebViewAppLinkResolver.m */; }; + E2654B9DC9C0D09B12C557B1C9332476 /* FBSDKGraphRequestBody.h in Headers */ = {isa = PBXBuildFile; fileRef = 634DA8B25943814D074830288CD2D23C /* FBSDKGraphRequestBody.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E305473648C48CD7D1C7DDE5E0D3A43C /* FBSDKKeychainStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DE2E49C6F517EDC0F6CCEE8AFD0F82B /* FBSDKKeychainStore.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E3E66177503E4735C789D617ED18C8C8 /* FBSDKGraphRequestMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = FD02F70969FFAC6048E3A68C2C6E7B86 /* FBSDKGraphRequestMetadata.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E45F601C9D7B25B3719908938B5AD46C /* BFAppLinkNavigation.h in Headers */ = {isa = PBXBuildFile; fileRef = B49C1B51A4F8CD83A4E0F76A24AB93C5 /* BFAppLinkNavigation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E4BFCC1A7BF9E52B6E49A7E684494FD7 /* Pods-FirebaseFacebook-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F51259B40DCF1C61C67006463219DDD3 /* Pods-FirebaseFacebook-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E4F9B9D8B351AC48DC41F9AB0C1C9BDB /* FBSDKServerConfigurationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DEECF92B92ADBCCAC7D4527D7DAF9678 /* FBSDKServerConfigurationManager.m */; }; + E528309B2C456C3FF790AB4B2FBFEA27 /* FBSDKIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = 00F2B5F33793E1AB369B4B2EB52EFB2F /* FBSDKIcon.m */; }; + E5DC7038BD95295EB8C25618C6C749A9 /* BFAppLinkReturnToRefererView_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 262B177C6FF8B51B61CCCB67C8DCBBB7 /* BFAppLinkReturnToRefererView_Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E65AF2136C7AAED70AF39B5FA6B6A440 /* FBSDKGraphRequest+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = E103B0D4BBE43282A5FA5FBC625FED75 /* FBSDKGraphRequest+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E8EBC3A463A930C00A75D3BC5D4B3BF2 /* FBSDKDynamicFrameworkLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = DD8015CDD3D0926AED26D08343366DE9 /* FBSDKDynamicFrameworkLoader.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + E962657554EDF87E0A822C5C6FE97A75 /* FBSDKLoginTooltipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C1005FB8E45E21431F9B28311EF0ED2 /* FBSDKLoginTooltipView.m */; }; + E96C003D7CC2D08746007E06C2D42A6F /* AppEventsLogger.FlushBehavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAD529531F86B66B6E4858DB8D215938 /* AppEventsLogger.FlushBehavior.swift */; }; + EAFC24977D5C9226A217F7C6FE063637 /* FBSDKLoginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B57A6399449DA6F0BC848997660F7DA /* FBSDKLoginManager.m */; }; + EB07655316E9926656B4A3287D841483 /* Permission.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0CA7C0798A153B675A5388271CC7C04 /* Permission.swift */; }; + EB7484C67925EBD224485152217D8AD6 /* FBSDKErrorConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FE2CE1691EB8FCD562A927750B5F9EC /* FBSDKErrorConfiguration.m */; }; + EB9CD84E424D94E8D6B4E30F6EB04B6C /* BFAppLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 4122323D13A47B0392496A36038E8205 /* BFAppLink.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ED7A170A80930DB8A1F6A91CC5452773 /* FBSDKSystemAccountStoreAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C4BBDCFFBAED2B5125DCA0EF3DA0763 /* FBSDKSystemAccountStoreAdapter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EE2F13E4444A523248F4DCA8297D4545 /* FBSDKCoreKit+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = F960ABAAEB40A32FCFAFE6A7DF774083 /* FBSDKCoreKit+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F1EF9646B9704428CADCC8B1F7D107EF /* FBSDKLoginCompletion.h in Headers */ = {isa = PBXBuildFile; fileRef = FAFAEBD073E9A4F0489A95209FA6646D /* FBSDKLoginCompletion.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F423955E8DCFADFF18608CF1FFC99E33 /* FBSDKCodelessParameterComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B28FAABF7AEE7B5911433B36655064F /* FBSDKCodelessParameterComponent.m */; }; + F447C2A32CB83E665C0B7DCEDDF93273 /* FBSDKMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 90876590F1542E01A9620D2866328EC3 /* FBSDKMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F4679986CB5DF8A2CE3918A117C35701 /* BFAppLinkTarget.m in Sources */ = {isa = PBXBuildFile; fileRef = DC81A9D35C5C8E478DA12D7180F0B54D /* BFAppLinkTarget.m */; }; + F4B90D2065B37074BD63275ACF683602 /* FBSDKAccessTokenCacheV3_21.h in Headers */ = {isa = PBXBuildFile; fileRef = BDF1BC1277039F9F875A7A0FC77B0F69 /* FBSDKAccessTokenCacheV3_21.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F55524C2161A2D9055FE9C6831BA4AC5 /* LoginDefaultAudience.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB40D3AE54F8A84112F36182BCEF72A3 /* LoginDefaultAudience.swift */; }; + F62FCC67F5BF4ACE4D064DC18CF1A163 /* FBSDKLoginButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 03426966A2C6CC95A56D3FFF84DDE422 /* FBSDKLoginButton.m */; }; + F6936DECAA296230E6BB432ABC34BAEF /* FBSDKAppEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A37F122AA1ACF634EF5CDA9308A41FB /* FBSDKAppEvents.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F766B219A93C45938528D2A7ACCA7998 /* FBSDKTypeUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 35A090A460C804819113BE3689264673 /* FBSDKTypeUtility.m */; }; + F7774DD11A81C8F16212F206B60AB5CE /* FBSDKButton.h in Headers */ = {isa = PBXBuildFile; fileRef = D00D56DCEE5E634E0D19886002C9872B /* FBSDKButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F7874B79F5FAA398C658C3D785C7FA99 /* FBSDKViewImpressionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 667FC5CBA845F1EE55EC2DDEC19F106C /* FBSDKViewImpressionTracker.m */; }; + F89C12B6F6A9F5ADD788C607ED9938B9 /* FacebookCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01C1D1A8B513DA5E08BD8F766BA47401 /* FacebookCore.framework */; }; + F8D2EBCE90F274930072DACC13D0BEAD /* GraphResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55A7006BEB2D9185B72EFED41BFDF4AA /* GraphResponse.swift */; }; + F91D2AD45B9DB3A4825D75E8D1F31C1B /* FBSDKColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 64500E4F9EC168605BF274FF911799BC /* FBSDKColor.m */; }; + F96E6B76F65A3A7C63DD2EE1A8541773 /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 419995ECFFCD9828A3937FCC43EA8F41 /* Bolts.framework */; }; + FA158E6B5CD40C667221B0DDE446A268 /* Pods-FirebaseFacebookTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B1ADAADBF8F8EF6D30EE86D132E8FAF /* Pods-FirebaseFacebookTests-dummy.m */; }; + FA248AE32D8526414801C68E75058D4B /* FBSDKServerConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = E39BA86FD462FB47FFDF52F03D0DD00B /* FBSDKServerConfiguration.m */; }; + FA256DAD66E1B999500FD847EF372A78 /* AppEventParameterName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A1052ECA47925DB39161D66F7C7D025 /* AppEventParameterName.swift */; }; + FB9ACA2DDBA9CB71D810FB98F255DE59 /* GraphRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 167D6846DFBA0A58EA9AE2BB773DB052 /* GraphRequest.swift */; }; + FBD26062FFBD4819635AE02D3682E071 /* FBSDKBridgeAPICrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FC58548E44926F631FC2A8F807D710 /* FBSDKBridgeAPICrypto.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FD138CBCDCA9A89C117D607292867632 /* FBSDKTimeSpentData.m in Sources */ = {isa = PBXBuildFile; fileRef = DD7CA2F5D71DE02DFC1E2F90C06B759F /* FBSDKTimeSpentData.m */; }; + FD1EC3A6250EA6D04F6B617677313017 /* FBSDKAppLinkResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 42DCD47143D7A7F81E7B14F0677786D7 /* FBSDKAppLinkResolver.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FDA560AFDB11F83AA7212609B4D10E2B /* FBSDKServerConfigurationManager+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = D1CFE1943D0C9BDA88C2553BB45C4BF5 /* FBSDKServerConfigurationManager+Internal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FECA2BC50ED5921D870608E3FD09AEE8 /* FBSDKAccessTokenCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 48129F2DF8D6078BE5CAEE75EEBEC4FD /* FBSDKAccessTokenCache.m */; }; + FF46907219388FA210E2E26B205C0708 /* FBSDKMonotonicTime.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F4908118C442D517E1CD82F30A7673D /* FBSDKMonotonicTime.m */; }; + FFC96A36447AA7C7173DE0135B22EFEA /* FBSDKInternalUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = AC4F516BCF19DCCBC1C68949EEFCA454 /* FBSDKInternalUtility.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FFE9276D78998A371F660650D93EE2B4 /* FBSDKCodelessPathComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 9138D93B3014EAE5160367E06497DBF7 /* FBSDKCodelessPathComponent.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FFFF89DB9B543CF694E8753987EDAB54 /* FBSDKMath.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A838494884BBD278C9C8FD8A1FA9209 /* FBSDKMath.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 1707295455DE4AF37E9B157E5859EB8F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5B5AC3C06B783F8674FDB4C0F900B56A; + remoteInfo = FBSDKLoginKit; + }; + 1BCD854C11C544DB619E00BAC8AA02D2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 531B78FD8AD31B542B8001A970D876EC; + remoteInfo = Bolts; + }; + 402AA05CC5AB803EE626CB485DD54053 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = DDBCFDE490CDFDABF6F16A26F346932D; + remoteInfo = FacebookCore; + }; + 51A0A947228D7DD1CB7363F39FC42DC8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 593E9479C06FB200807D11AB29EB50BD; + remoteInfo = FBSDKCoreKit; + }; + 709123FA3378063036E76800A835D78D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 593E9479C06FB200807D11AB29EB50BD; + remoteInfo = FBSDKCoreKit; + }; + 79C653BF28A85A4416BD1419B8C5BFA3 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 531B78FD8AD31B542B8001A970D876EC; + remoteInfo = Bolts; + }; + 8C8608F2C87A6D91FCD86F90E5604514 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 531B78FD8AD31B542B8001A970D876EC; + remoteInfo = Bolts; + }; + A88DAB774826E14D761152DC0DF2A8BC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 531B78FD8AD31B542B8001A970D876EC; + remoteInfo = Bolts; + }; + C3FFEA789286A7C6269EA34FAD9634CA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 593E9479C06FB200807D11AB29EB50BD; + remoteInfo = FBSDKCoreKit; + }; + CD91E5166CE577D187ADF43B5E4F4161 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5B5AC3C06B783F8674FDB4C0F900B56A; + remoteInfo = FBSDKLoginKit; + }; + D53E3885669EAC4D646F64CE4367BFFC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 531B78FD8AD31B542B8001A970D876EC; + remoteInfo = Bolts; + }; + DCD110328AA05F7AA09D22D229A187A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7335E9C9689F3B8A16F063A884748533; + remoteInfo = FacebookLogin; + }; + E657720D70865D4E637912741776C773 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = DDBCFDE490CDFDABF6F16A26F346932D; + remoteInfo = FacebookCore; + }; + FA292E856D14F23EA8F2CFEE5343A139 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 593E9479C06FB200807D11AB29EB50BD; + remoteInfo = FBSDKCoreKit; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 00A9890D1CE1182CA8ECA91DE6590015 /* FBSDKWebDialogView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKWebDialogView.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialogView.m; sourceTree = ""; }; + 00F2B5F33793E1AB369B4B2EB52EFB2F /* FBSDKIcon.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKIcon.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKIcon.m; sourceTree = ""; }; + 0173031E1C3F43480A1A8FE25E7B18BE /* Pods-FirebaseFacebookUITests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-FirebaseFacebookUITests-resources.sh"; sourceTree = ""; }; + 01C1D1A8B513DA5E08BD8F766BA47401 /* FacebookCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FacebookCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 03426966A2C6CC95A56D3FFF84DDE422 /* FBSDKLoginButton.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKLoginButton.m; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.m; sourceTree = ""; }; + 036C02FD7710A186D011F91E217F0FC4 /* FBSDKGraphRequestConnection+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKGraphRequestConnection+Internal.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestConnection+Internal.h"; sourceTree = ""; }; + 0488933786947C2FFAC4EFEEF536F30B /* BFCancellationTokenSource.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFCancellationTokenSource.h; path = Bolts/Common/BFCancellationTokenSource.h; sourceTree = ""; }; + 05A428095E510B4C8641761BDC7CCA92 /* Bolts-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Bolts-dummy.m"; sourceTree = ""; }; + 06B036555D7FF3F3BFAC7F253BE14C33 /* FBSDKUtility.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKUtility.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.m; sourceTree = ""; }; + 07CC757BB8A135EDCF929495184B8A4D /* BFAppLinkNavigation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFAppLinkNavigation.m; path = Bolts/iOS/BFAppLinkNavigation.m; sourceTree = ""; }; + 07F0EBFF83E0E3D91DB1BC3A7BE02DD1 /* FBSDKAppLinkReturnToRefererController.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppLinkReturnToRefererController.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererController.h; sourceTree = ""; }; + 080DA838485EA5271F2A646D6854F625 /* FBSDKWebDialog.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKWebDialog.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialog.m; sourceTree = ""; }; + 080FDF9149E53349A34ABF2116B90340 /* FBSDKLoginKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FBSDKLoginKit-umbrella.h"; sourceTree = ""; }; + 08B14874B0E62408065B8C0C1B3DB947 /* Pods-FirebaseFacebookTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-FirebaseFacebookTests-acknowledgements.markdown"; sourceTree = ""; }; + 08BE087D58E8AB263FE0190B9BE6F8E6 /* FBSDKURLSessionTask.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKURLSessionTask.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKURLSessionTask.m; sourceTree = ""; }; + 0A021C9B0EF3E3BB9B4FB51B43899C2E /* FBSDKImageDownloader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKImageDownloader.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKImageDownloader.m; sourceTree = ""; }; + 0A6F81D0D88BA948A131EA706419D17B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0E937589E0646B44063C1F5C0C984B57 /* FBSDKTriStateBOOL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKTriStateBOOL.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTriStateBOOL.m; sourceTree = ""; }; + 108C8E190CCC474C7F8DE9CB44745612 /* FBSDKTestUsersManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKTestUsersManager.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.m; sourceTree = ""; }; + 10E12239F1746A09FA0557B85CE03B99 /* FBSDKProfile+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKProfile+Internal.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKProfile+Internal.h"; sourceTree = ""; }; + 13774A590DCE4E404826237859DF9962 /* BFMeasurementEvent.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFMeasurementEvent.m; path = Bolts/iOS/BFMeasurementEvent.m; sourceTree = ""; }; + 13F06BB2F400742BCC521EA52F38A869 /* FBSDKMeasurementEvent.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKMeasurementEvent.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKMeasurementEvent.m; sourceTree = ""; }; + 14957DC0DE2FF0DAAE5D65D2940858A3 /* Pods-FirebaseFacebook-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-FirebaseFacebook-frameworks.sh"; sourceTree = ""; }; + 15EB6728949AB9B127E1705D4DD0EBA8 /* BFTaskCompletionSource.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFTaskCompletionSource.h; path = Bolts/Common/BFTaskCompletionSource.h; sourceTree = ""; }; + 16494F59C307A386B8DC2E3F08606D22 /* FBSDKLoginManagerLogger.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKLoginManagerLogger.m; path = FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLogger.m; sourceTree = ""; }; + 167D6846DFBA0A58EA9AE2BB773DB052 /* GraphRequest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GraphRequest.swift; path = Sources/Core/GraphRequest/GraphRequest.swift; sourceTree = ""; }; + 176C6354CAE38FA683021B4116418E1C /* BFTaskCompletionSource.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFTaskCompletionSource.m; path = Bolts/Common/BFTaskCompletionSource.m; sourceTree = ""; }; + 18754BB8FE565D9A2E55B9C52D0E1A0E /* FBSDKContainerViewController.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKContainerViewController.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKContainerViewController.h; sourceTree = ""; }; + 18A84310D38F8B95AFC3F8E9A550C16D /* FBSDKAccessTokenCacheV3_17.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAccessTokenCacheV3_17.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_17.m; sourceTree = ""; }; + 18F8D6DE5BAB0900AFB9035F788D117A /* BFAppLink.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFAppLink.m; path = Bolts/iOS/BFAppLink.m; sourceTree = ""; }; + 1A1052ECA47925DB39161D66F7C7D025 /* AppEventParameterName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AppEventParameterName.swift; path = Sources/Core/AppEvents/AppEventParameterName.swift; sourceTree = ""; }; + 1A57EF173E4DAFB9C352F18D7D72A722 /* GraphRequestDataAttachment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GraphRequestDataAttachment.swift; path = Sources/Core/GraphRequest/GraphRequestDataAttachment.swift; sourceTree = ""; }; + 1A838494884BBD278C9C8FD8A1FA9209 /* FBSDKMath.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKMath.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMath.m; sourceTree = ""; }; + 1AE5B86C3C82964117C6526DE84BF3F0 /* ReadPermission.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReadPermission.swift; path = Sources/Core/Permissions/ReadPermission.swift; sourceTree = ""; }; + 1B1ADAADBF8F8EF6D30EE86D132E8FAF /* Pods-FirebaseFacebookTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-FirebaseFacebookTests-dummy.m"; sourceTree = ""; }; + 1B28FAABF7AEE7B5911433B36655064F /* FBSDKCodelessParameterComponent.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKCodelessParameterComponent.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessParameterComponent.m; sourceTree = ""; }; + 1CB5510D98FAD5030D71F6F8C6B64D20 /* AppEventsLogger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AppEventsLogger.swift; path = Sources/Core/AppEvents/AppEventsLogger.swift; sourceTree = ""; }; + 1CE10700538B298518F79CAF12D30043 /* FBSDKCoreKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FBSDKCoreKit-prefix.pch"; sourceTree = ""; }; + 1CE16F53157A7FECA312DE0CEBEAE7F7 /* _FBSDKTemporaryErrorRecoveryAttempter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = _FBSDKTemporaryErrorRecoveryAttempter.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/_FBSDKTemporaryErrorRecoveryAttempter.h; sourceTree = ""; }; + 1F555D4B07FA80E66EBDE7DC1EC2BB2C /* FBSDKAppLink.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppLink.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLink.m; sourceTree = ""; }; + 1F6AFB9EE426471F9878A9E87D758D17 /* FBSDKPaymentObserver.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKPaymentObserver.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.h; sourceTree = ""; }; + 1FE2CE1691EB8FCD562A927750B5F9EC /* FBSDKErrorConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKErrorConfiguration.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfiguration.m; sourceTree = ""; }; + 204430D013CE1451DF1FA2EB5F892E85 /* FBSDKLoginKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FBSDKLoginKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 20E1A868B08F99B5BCA4EB104A8A347A /* FBSDKSettings+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKSettings+Internal.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSettings+Internal.h"; sourceTree = ""; }; + 21BC737718AECE8F072C7751B6F365D2 /* FBSDKAppLinkNavigation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppLinkNavigation.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkNavigation.m; sourceTree = ""; }; + 235BE672B5D832598057684ADFB3A248 /* FBSDKLoginManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKLoginManager.h; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.h; sourceTree = ""; }; + 241DFB105BD5F1824A244549AFC77D31 /* GraphRequestProtocol.Bridge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GraphRequestProtocol.Bridge.swift; path = Sources/Core/GraphRequest/GraphRequestProtocol.Bridge.swift; sourceTree = ""; }; + 243DC533EA82A1573CA9D17F32C85D4B /* Pods-FirebaseFacebookUITests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-FirebaseFacebookUITests-acknowledgements.plist"; sourceTree = ""; }; + 24420724F01C19ACBEAB9F0E88E470A8 /* AccessToken.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AccessToken.swift; path = Sources/Core/Common/AccessToken.swift; sourceTree = ""; }; + 262B177C6FF8B51B61CCCB67C8DCBBB7 /* BFAppLinkReturnToRefererView_Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFAppLinkReturnToRefererView_Internal.h; path = Bolts/iOS/Internal/BFAppLinkReturnToRefererView_Internal.h; sourceTree = ""; }; + 2648ED509B47354ACD023A200C4C58E0 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 285CE606A8DDD9CE4CC82E79D455B7D3 /* FBSDKLoginKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKLoginKit.h; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit.h; sourceTree = ""; }; + 28730EA0F7F3CC41073C0A179FBE5813 /* FBSDKCoreKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FBSDKCoreKit-umbrella.h"; sourceTree = ""; }; + 290DB4CC76FBEA3DBC945D31E6101FE7 /* FBSDKTimeSpentData.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKTimeSpentData.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKTimeSpentData.h; sourceTree = ""; }; + 29F91F7115BD3894327D53747D147B6E /* GraphResponseProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GraphResponseProtocol.swift; path = Sources/Core/GraphRequest/GraphResponseProtocol.swift; sourceTree = ""; }; + 2A64A93180E959D3C1E984064A56A259 /* BFURL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFURL.h; path = Bolts/iOS/BFURL.h; sourceTree = ""; }; + 2B57A6399449DA6F0BC848997660F7DA /* FBSDKLoginManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKLoginManager.m; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.m; sourceTree = ""; }; + 2B6A4F1ADD9CC21860DBD7945DB4C59F /* FBSDKGateKeeperManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKGateKeeperManager.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKGateKeeperManager.h; sourceTree = ""; }; + 2BD39BDF978EB5365CB2B0B4F6565F21 /* Pods-FirebaseFacebookTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-FirebaseFacebookTests-umbrella.h"; sourceTree = ""; }; + 2BD4BA4EAC43C8598AD01413A7C2ACA4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 2BDC323EE51667D974FBF07B3AA3DAF4 /* FBSDKBridgeAPIProtocolType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKBridgeAPIProtocolType.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIProtocolType.h; sourceTree = ""; }; + 2D2451851704100F5EBBA0D3ECFE43DC /* FBSDKCoreKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = FBSDKCoreKit.modulemap; sourceTree = ""; }; + 2D35148D2C221D14A8F873DE1E702D33 /* LoginManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LoginManager.swift; path = Sources/Login/LoginManager.swift; sourceTree = ""; }; + 2E2B949A24697F944E81A9BFA0AF7543 /* Bolts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Bolts.framework; path = Bolts.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2E3CD1470512A8A5E34779D5EEDEEEE8 /* Pods-FirebaseFacebookTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-FirebaseFacebookTests-frameworks.sh"; sourceTree = ""; }; + 2F4908118C442D517E1CD82F30A7673D /* FBSDKMonotonicTime.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKMonotonicTime.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMonotonicTime.m; sourceTree = ""; }; + 3159E9A22BE259EF934DC7CFB03ABADC /* FBSDKDeviceLoginManagerResult+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKDeviceLoginManagerResult+Internal.h"; path = "FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginManagerResult+Internal.h"; sourceTree = ""; }; + 32137B6B317C2F710879E7B153E1E28F /* FBSDKSystemAccountStoreAdapter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKSystemAccountStoreAdapter.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSystemAccountStoreAdapter.m; sourceTree = ""; }; + 32CC168A5629CF356734F6E686B594C1 /* FBSDKCoreKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = FBSDKCoreKit.framework; path = FBSDKCoreKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 338AE6F93FA2DB6E7F409FB3192D857E /* Pods-FirebaseFacebookTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-FirebaseFacebookTests-resources.sh"; sourceTree = ""; }; + 3492E233CA691DB5918773AB8B7DA941 /* LoginResult.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LoginResult.swift; path = Sources/Login/LoginResult.swift; sourceTree = ""; }; + 34BD021657BFF30318B56235BD1B4809 /* FBSDKApplicationDelegate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKApplicationDelegate.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.h; sourceTree = ""; }; + 35A090A460C804819113BE3689264673 /* FBSDKTypeUtility.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKTypeUtility.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTypeUtility.m; sourceTree = ""; }; + 36A0C4639EF2EB2FC3EB2EBEAA8763B9 /* FBSDKURLSessionTask.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKURLSessionTask.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKURLSessionTask.h; sourceTree = ""; }; + 36C362E809BFDB0F79E2E39D9D576A4D /* FBSDKGraphRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKGraphRequest.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.h; sourceTree = ""; }; + 39E094A6919E8B9D2A7BBC0C11B573C8 /* Pods-FirebaseFacebookUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-FirebaseFacebookUITests.release.xcconfig"; sourceTree = ""; }; + 3A09BBEB7FA6FA1B0B8FA3624A5008AE /* BFWebViewAppLinkResolver.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFWebViewAppLinkResolver.m; path = Bolts/iOS/BFWebViewAppLinkResolver.m; sourceTree = ""; }; + 3A202ECEC2738B56C1FF5F6D18834421 /* FBSDKHybridAppEventsScriptMessageHandler.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKHybridAppEventsScriptMessageHandler.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKHybridAppEventsScriptMessageHandler.h; sourceTree = ""; }; + 3A6BFDA1C43824235592F8244419B702 /* FBSDKAppLinkNavigation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppLinkNavigation.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkNavigation.h; sourceTree = ""; }; + 3B4B00B057D64B3A8A5EFAAA83FB2E29 /* FBSDKViewHierarchy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKViewHierarchy.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKViewHierarchy.h; sourceTree = ""; }; + 3C1005FB8E45E21431F9B28311EF0ED2 /* FBSDKLoginTooltipView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKLoginTooltipView.m; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginTooltipView.m; sourceTree = ""; }; + 3EFE44A9F51381B04CD51D6CDB0C0C5D /* FBSDKGateKeeperManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKGateKeeperManager.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKGateKeeperManager.m; sourceTree = ""; }; + 402CB3E0A41CAC932574FB450FBF2584 /* FBSDKCoreKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "FBSDKCoreKit-dummy.m"; sourceTree = ""; }; + 4046826AE70D9501BD9C197763055674 /* FBSDKLoginTooltipView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKLoginTooltipView.h; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginTooltipView.h; sourceTree = ""; }; + 4122323D13A47B0392496A36038E8205 /* BFAppLink.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFAppLink.h; path = Bolts/iOS/BFAppLink.h; sourceTree = ""; }; + 419995ECFFCD9828A3937FCC43EA8F41 /* Bolts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Bolts.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 41A7F0608AB0737D45F20EAEFA04DF62 /* Bolts.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = Bolts.m; path = Bolts/Common/Bolts.m; sourceTree = ""; }; + 41E89AE5A2F82EAC24FB1A1EB204E02B /* BFAppLinkReturnToRefererController.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFAppLinkReturnToRefererController.m; path = Bolts/iOS/BFAppLinkReturnToRefererController.m; sourceTree = ""; }; + 42D35AF347118FAA295ED95428EDC8D6 /* FBSDKWebDialog.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKWebDialog.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialog.h; sourceTree = ""; }; + 42DCD47143D7A7F81E7B14F0677786D7 /* FBSDKAppLinkResolver.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppLinkResolver.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h; sourceTree = ""; }; + 43224DF54EC5DAD85AD52774ECE7EBE1 /* FBSDKLoginError.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKLoginError.m; path = FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginError.m; sourceTree = ""; }; + 437637CA4E9EB48CBCE3CE6763BB284B /* FBSDKAppLinkTarget.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppLinkTarget.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkTarget.m; sourceTree = ""; }; + 43D5DC1E7B96BCA4C3BE1F1F7461EAA6 /* FBSDKMath.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKMath.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMath.h; sourceTree = ""; }; + 44780BB1B95EC481FE50C963188AFF4C /* Bolts-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Bolts-umbrella.h"; sourceTree = ""; }; + 44E0DEC59529AAB006B6DA3151BBC56B /* FBSDKAccessTokenCacheV3_21.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAccessTokenCacheV3_21.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_21.m; sourceTree = ""; }; + 45EC9391454286EDEFC8DF04998C9B5F /* FBSDKProfilePictureView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKProfilePictureView.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.m; sourceTree = ""; }; + 478C12DE33F0BF979D74075C537E8768 /* Pods-FirebaseFacebookUITests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-FirebaseFacebookUITests.modulemap"; sourceTree = ""; }; + 48129F2DF8D6078BE5CAEE75EEBEC4FD /* FBSDKAccessTokenCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAccessTokenCache.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCache.m; sourceTree = ""; }; + 4857AB39D3FBEEC0C62E68E1BE05AC24 /* FBSDKLoginKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FBSDKLoginKit-prefix.pch"; sourceTree = ""; }; + 488890756EAF6D6CA6A5781BAC2DEF79 /* AppEvent.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AppEvent.swift; path = Sources/Core/AppEvents/AppEvent.swift; sourceTree = ""; }; + 4B0A0DF1A607853D4F45A638BFF49F79 /* FBSDKCoreKit.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKCoreKit.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit.h; sourceTree = ""; }; + 4B18E5A48B0792808BA5AE7996898538 /* BFURL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFURL.m; path = Bolts/iOS/BFURL.m; sourceTree = ""; }; + 4BE20169CF16E55E7FAE321AAADD19F8 /* FBSDKGraphRequestConnection.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKGraphRequestConnection.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.m; sourceTree = ""; }; + 4C4BBDCFFBAED2B5125DCA0EF3DA0763 /* FBSDKSystemAccountStoreAdapter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKSystemAccountStoreAdapter.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSystemAccountStoreAdapter.h; sourceTree = ""; }; + 4C5A6CD1DE4D9EB92493CFF2AE0BA65A /* BFWebViewAppLinkResolver.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFWebViewAppLinkResolver.h; path = Bolts/iOS/BFWebViewAppLinkResolver.h; sourceTree = ""; }; + 4C5DCA947D8FFFA5795F95F89E975537 /* SDKLoggingBehavior.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SDKLoggingBehavior.swift; path = Sources/Core/Common/SDKLoggingBehavior.swift; sourceTree = ""; }; + 4CBAE8CF44FF29CE91439BCA91FB4CA7 /* GraphRequestProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GraphRequestProtocol.swift; path = Sources/Core/GraphRequest/GraphRequestProtocol.swift; sourceTree = ""; }; + 4CEEB70E69C5DC328FCF02868C80588C /* FBSDKKeychainStore.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKKeychainStore.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStore.m; sourceTree = ""; }; + 4D7EF37E28F83B0CFAEBC6FBB6400E74 /* Bolts.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Bolts.h; path = Bolts/Common/Bolts.h; sourceTree = ""; }; + 4D856B32878CF155E6E4CB78AF143180 /* FBSDKLoginManagerLogger.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKLoginManagerLogger.h; path = FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLogger.h; sourceTree = ""; }; + 4E3846D343E80CEB87CF9BFDFC980538 /* FBSDKDeviceLoginCodeInfo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKDeviceLoginCodeInfo.h; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.h; sourceTree = ""; }; + 4F2DF17B1CB0DE2852A8D2DBAFD9499D /* FBSDKDynamicFrameworkLoader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKDynamicFrameworkLoader.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKDynamicFrameworkLoader.h; sourceTree = ""; }; + 500D2406916FB32BB5BFF17C434FAFFF /* _FBSDKTemporaryErrorRecoveryAttempter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = _FBSDKTemporaryErrorRecoveryAttempter.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/_FBSDKTemporaryErrorRecoveryAttempter.m; sourceTree = ""; }; + 506F678893E0B99FEA2B9C80CA7002BC /* GraphAPIVersion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GraphAPIVersion.swift; path = Sources/Core/GraphRequest/GraphAPIVersion.swift; sourceTree = ""; }; + 508684BFB52B9D5C59893D5F163EBB4A /* FBSDKButton+Subclass.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKButton+Subclass.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKButton+Subclass.h"; sourceTree = ""; }; + 50DAB0DE0F930A5186BC9D6F63E01D89 /* FBSDKKeychainStoreViaBundleID.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKKeychainStoreViaBundleID.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStoreViaBundleID.h; sourceTree = ""; }; + 51FE8E7ADFC1EC7C12668182E3927C7B /* Pods-FirebaseFacebook-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-FirebaseFacebook-resources.sh"; sourceTree = ""; }; + 54958EBB4CE557FCD1D9957CD44DE3E2 /* FBSDKAccessTokenCacheV3_17.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAccessTokenCacheV3_17.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_17.h; sourceTree = ""; }; + 55103A354CFB38CA8F79D4F02ED9F5F4 /* FBSDKCopying.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKCopying.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKCopying.h; sourceTree = ""; }; + 551D5A76159ABA66FF300C87A600B56C /* FBSDKColor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKColor.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKColor.h; sourceTree = ""; }; + 557AE8E03BF7C5A71FA81C74C2826058 /* BFCancellationTokenRegistration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFCancellationTokenRegistration.h; path = Bolts/Common/BFCancellationTokenRegistration.h; sourceTree = ""; }; + 55A7006BEB2D9185B72EFED41BFDF4AA /* GraphResponse.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GraphResponse.swift; path = Sources/Core/GraphRequest/GraphResponse.swift; sourceTree = ""; }; + 566635E66501C376615ED896BE84D6AF /* FBSDKGraphRequestDataAttachment.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKGraphRequestDataAttachment.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.h; sourceTree = ""; }; + 574C93BC6CB90F856C1BDA0DEE80C65D /* FBSDKAudioResourceLoader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAudioResourceLoader.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAudioResourceLoader.h; sourceTree = ""; }; + 57C2D45CB3D2809A8B17C80E4E422F48 /* FBSDKTriStateBOOL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKTriStateBOOL.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTriStateBOOL.h; sourceTree = ""; }; + 57F991D4E6E2B0B252E7C36113A2E345 /* FBSDKSettings.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKSettings.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.h; sourceTree = ""; }; + 5809D826AF490B7F1B20FC8E1ADD0C72 /* BFMeasurementEvent_Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFMeasurementEvent_Internal.h; path = Bolts/iOS/Internal/BFMeasurementEvent_Internal.h; sourceTree = ""; }; + 59B98067869D7376683D02CBB745AF16 /* FBSDKTooltipView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKTooltipView.h; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKTooltipView.h; sourceTree = ""; }; + 5A52CF09EDC435AB4C0E6C6B80F17DE6 /* FBSDKBase64.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKBase64.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Base64/FBSDKBase64.h; sourceTree = ""; }; + 5BC9A6EC951C13228E2A7E729B1EE38B /* FBSDKAccessToken.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAccessToken.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.m; sourceTree = ""; }; + 5D2DA4C8E75E84F6BE220E5A536A0013 /* BFAppLinkTarget.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFAppLinkTarget.h; path = Bolts/iOS/BFAppLinkTarget.h; sourceTree = ""; }; + 5D7A52CC5F230A23B4EBD2882DA4F43E /* BFGeneric.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFGeneric.h; path = Bolts/Common/BFGeneric.h; sourceTree = ""; }; + 5D7BB1BA6543EF77E98E8C1E2EE4E4DA /* FBSDKTestUsersManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKTestUsersManager.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKTestUsersManager.h; sourceTree = ""; }; + 5D898B48EB6B01758CA7B26C5217E1AA /* Pods_FirebaseFacebookTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_FirebaseFacebookTests.framework; path = "Pods-FirebaseFacebookTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5DE2E49C6F517EDC0F6CCEE8AFD0F82B /* FBSDKKeychainStore.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKKeychainStore.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStore.h; sourceTree = ""; }; + 5F24BEAE66928E93498FD1FC35558946 /* FBSDKServerConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKServerConfiguration.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration.h; sourceTree = ""; }; + 5F6FA8ED2133C53670D39F798BA10347 /* FBSDKLoginKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = FBSDKLoginKit.xcconfig; sourceTree = ""; }; + 5FB12D40B0E47271C94A72F7FE50484B /* FBSDKErrorRecoveryAttempter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKErrorRecoveryAttempter.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/FBSDKErrorRecoveryAttempter.h; sourceTree = ""; }; + 5FD5BC8E42321F4EF29A35368D4C7D08 /* FBSDKDeviceLoginCodeInfo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKDeviceLoginCodeInfo.m; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginCodeInfo.m; sourceTree = ""; }; + 6024E37C0692D6728C9ECFD2E501BEDB /* FBSDKLoginKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = FBSDKLoginKit.modulemap; sourceTree = ""; }; + 60486663C1B7C513217BCEA38C069234 /* FacebookLogin-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FacebookLogin-prefix.pch"; sourceTree = ""; }; + 624997EE99258B4AE2E35E76F1083B14 /* FBSDKHybridAppEventsScriptMessageHandler.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKHybridAppEventsScriptMessageHandler.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKHybridAppEventsScriptMessageHandler.m; sourceTree = ""; }; + 6336A21020CE6493E4B67A4521F275F8 /* FBSDKDeviceLoginManagerResult.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKDeviceLoginManagerResult.m; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManagerResult.m; sourceTree = ""; }; + 634DA8B25943814D074830288CD2D23C /* FBSDKGraphRequestBody.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKGraphRequestBody.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestBody.h; sourceTree = ""; }; + 634E36D0027CC5840ACAC848176495BB /* LoginButton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LoginButton.swift; path = Sources/Login/LoginButton.swift; sourceTree = ""; }; + 64500E4F9EC168605BF274FF911799BC /* FBSDKColor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKColor.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKColor.m; sourceTree = ""; }; + 64E5A59C8B19340228761E0685414458 /* Pods-FirebaseFacebookTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-FirebaseFacebookTests.release.xcconfig"; sourceTree = ""; }; + 65ABB842B40570F4AA0A0F6DADF3EFC8 /* AppEvent.Builtin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AppEvent.Builtin.swift; path = Sources/Core/AppEvents/AppEvent.Builtin.swift; sourceTree = ""; }; + 65E70D0017D39D26B459F22371EE2031 /* FBSDKLogger.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKLogger.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKLogger.m; sourceTree = ""; }; + 667FC5CBA845F1EE55EC2DDEC19F106C /* FBSDKViewImpressionTracker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKViewImpressionTracker.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKViewImpressionTracker.m; sourceTree = ""; }; + 66A66BED0939FB8D6118D647DD8E253B /* FBSDKLoginError.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKLoginError.h; path = FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginError.h; sourceTree = ""; }; + 6800F2B2A26092393CF160498E1AC179 /* FBSDKDeviceLoginCodeInfo+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKDeviceLoginCodeInfo+Internal.h"; path = "FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKDeviceLoginCodeInfo+Internal.h"; sourceTree = ""; }; + 68AB049331A1392A3ED84FFD3CDB3A86 /* FBSDKMonotonicTime.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKMonotonicTime.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMonotonicTime.h; sourceTree = ""; }; + 68FEE7F80D6DDE0FE7842DC410C77AA3 /* BFCancellationTokenRegistration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFCancellationTokenRegistration.m; path = Bolts/Common/BFCancellationTokenRegistration.m; sourceTree = ""; }; + 6A37F122AA1ACF634EF5CDA9308A41FB /* FBSDKAppEvents.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppEvents.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h; sourceTree = ""; }; + 6B3CD6B3A7D5D891FEC7B475932BBC1B /* FBSDKCodelessParameterComponent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKCodelessParameterComponent.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessParameterComponent.h; sourceTree = ""; }; + 6BEC4120B2A0EB84053691DF455E4F40 /* FacebookCore-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FacebookCore-prefix.pch"; sourceTree = ""; }; + 6C36EDD7EAB01DBE66E13CC551FC468A /* FBSDKLoginKit+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKLoginKit+Internal.h"; path = "FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginKit+Internal.h"; sourceTree = ""; }; + 6E372B90109D9ED8B6E7BE6380F567C1 /* FBSDKGraphRequestPiggybackManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKGraphRequestPiggybackManager.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManager.m; sourceTree = ""; }; + 6F1406A54D2780F66960BFD6C78D65CF /* FBSDKBridgeAPIResponse.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKBridgeAPIResponse.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIResponse.m; sourceTree = ""; }; + 70803D1269ADB5B88886491F0A107BC7 /* BFAppLink_Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFAppLink_Internal.h; path = Bolts/iOS/Internal/BFAppLink_Internal.h; sourceTree = ""; }; + 7177FFB0CC66C2F45EF1452219DE640E /* FBSDKBridgeAPIRequest.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKBridgeAPIRequest.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest.m; sourceTree = ""; }; + 7180A7CD963BD168F047FAABA580D433 /* FBSDKGraphRequestMetadata.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKGraphRequestMetadata.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestMetadata.m; sourceTree = ""; }; + 72A68A86707E2712D9979207A2B6C1B5 /* FBSDKBridgeAPIResponse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKBridgeAPIResponse.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIResponse.h; sourceTree = ""; }; + 72F148335C273159553C9E1B0B71C7C0 /* FBSDKLoginKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "FBSDKLoginKit-dummy.m"; sourceTree = ""; }; + 72F49635737C28FF652052238D3CF25D /* FBSDKLoginManager+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKLoginManager+Internal.h"; path = "FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManager+Internal.h"; sourceTree = ""; }; + 73A233A2F8588AAB75A32CFC1646D1DB /* FBSDKUIUtility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKUIUtility.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKUIUtility.h; sourceTree = ""; }; + 74ABDE7975AD089FF496EF473E3D7AA2 /* Pods-FirebaseFacebook.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-FirebaseFacebook.debug.xcconfig"; sourceTree = ""; }; + 75160081AE8C4E14A74F6F575C3BC1CE /* FBSDKAppLinkReturnToRefererController.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppLinkReturnToRefererController.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererController.m; sourceTree = ""; }; + 766E593CE56CD82B0DE52F1CFAF3B901 /* FBSDKBridgeAPIProtocolWebV1.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKBridgeAPIProtocolWebV1.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV1.m; sourceTree = ""; }; + 76A5A7BC7E26B2C73ADC769A0DDE7488 /* FBSDKCoreKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = FBSDKCoreKit.xcconfig; sourceTree = ""; }; + 76CCFE3BEF22D7DA0CD362C5A41AA0A1 /* FBSDKAccessTokenExpirer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAccessTokenExpirer.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenExpirer.m; sourceTree = ""; }; + 76FC789005E45BCB003369E558662C02 /* FBSDKUtility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKUtility.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKUtility.h; sourceTree = ""; }; + 77D9B77CFA4191AA056524313DC827B4 /* FacebookCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = FacebookCore.framework; path = FacebookCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 78E6158C700392C9A7F679BF6CE71E06 /* LoginButtonDelegateBridge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LoginButtonDelegateBridge.swift; path = Sources/Login/LoginButtonDelegateBridge.swift; sourceTree = ""; }; + 796BE7C946481798682826B6849016BA /* Pods-FirebaseFacebook.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-FirebaseFacebook.release.xcconfig"; sourceTree = ""; }; + 7AF0C501C630830EC4B5DF71601062E4 /* FBSDKProfile.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKProfile.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.m; sourceTree = ""; }; + 7CD89427BE2200BCFF02B38E66B480C1 /* FacebookSDKStrings.bundle */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "wrapper.plug-in"; path = FacebookSDKStrings.bundle; sourceTree = ""; }; + 7D7B504FF4C1F7EEDB8AABA9C07A60F7 /* FBSDKLoginManagerLoginResult+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKLoginManagerLoginResult+Internal.h"; path = "FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLoginResult+Internal.h"; sourceTree = ""; }; + 7EF4191DBAC9F54ED977E9768A551EF7 /* FBSDKAppEventsDeviceInfo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppEventsDeviceInfo.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsDeviceInfo.h; sourceTree = ""; }; + 7F5E990956288A27C71F6B314D89D47C /* FBSDKCodelessPathComponent.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKCodelessPathComponent.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessPathComponent.m; sourceTree = ""; }; + 7F7618EAF7D6887F8AE919A6BF610C87 /* LoginButtonDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LoginButtonDelegate.swift; path = Sources/Login/LoginButtonDelegate.swift; sourceTree = ""; }; + 7FF74577E9533ED83CEA3EFF57B45BD8 /* FBSDKLoginCompletion+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKLoginCompletion+Internal.h"; path = "FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion+Internal.h"; sourceTree = ""; }; + 80DBD8F230DB3428F2668396F7331B4F /* BFAppLinkReturnToRefererController.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFAppLinkReturnToRefererController.h; path = Bolts/iOS/BFAppLinkReturnToRefererController.h; sourceTree = ""; }; + 8150BAF9D1CD23158A7DB3C79B0109C8 /* FBSDKProfile.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKProfile.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKProfile.h; sourceTree = ""; }; + 818221DD2890735F106BF6171CD90410 /* FBSDKEventBinding.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKEventBinding.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBinding.h; sourceTree = ""; }; + 8206DFFBD6ACDD0175B4360BD7CC5082 /* FBSDKLoginUtility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKLoginUtility.h; path = FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginUtility.h; sourceTree = ""; }; + 82526418E9EA5F73EE0A80B274AA3BC0 /* FacebookLogin-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FacebookLogin-umbrella.h"; sourceTree = ""; }; + 825EDEC34EA2DD2DAA89EDD32C11172F /* FBSDKMeasurementEvent_Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKMeasurementEvent_Internal.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKMeasurementEvent_Internal.h; sourceTree = ""; }; + 82A6A78BE914BA436BFD6DF88C61C82B /* GraphRequestResult.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GraphRequestResult.swift; path = Sources/Core/GraphRequest/GraphRequestResult.swift; sourceTree = ""; }; + 85A089D6CFC6F31B8D83CC2666E4F65C /* BFTask.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFTask.m; path = Bolts/Common/BFTask.m; sourceTree = ""; }; + 85EE9D41E3C5BE6C35809A39CAA5260D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 86E693368BBE327350C8200163AE82FA /* FBSDKProfilePictureView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKProfilePictureView.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKProfilePictureView.h; sourceTree = ""; }; + 8727DC3E9D658A1257BB80C691F6AC6E /* FBSDKDeviceLoginManagerResult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKDeviceLoginManagerResult.h; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManagerResult.h; sourceTree = ""; }; + 883C9603A179C10412293301BB5DFB24 /* FBSDKUserDataStore.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKUserDataStore.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKUserDataStore.m; sourceTree = ""; }; + 88482F5F3C430A1354D5462FF27C77B9 /* Pods-FirebaseFacebookUITests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-FirebaseFacebookUITests-frameworks.sh"; sourceTree = ""; }; + 888EA34735AA4574DC7F4F977F73702D /* BFMeasurementEvent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFMeasurementEvent.h; path = Bolts/iOS/BFMeasurementEvent.h; sourceTree = ""; }; + 88B652EC4FB3C93824DE91B8A8A6D28C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 899486C2BB09BC75D1941CCA01558952 /* BFCancellationTokenSource.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFCancellationTokenSource.m; path = Bolts/Common/BFCancellationTokenSource.m; sourceTree = ""; }; + 89C5D51A0A9DD752ED4D43CADD15BFB1 /* Pods-FirebaseFacebookUITests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-FirebaseFacebookUITests-dummy.m"; sourceTree = ""; }; + 8AAE70DBB6B225D1520AEDEF4AF2A6E7 /* FBSDKEventBinding.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKEventBinding.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBinding.m; sourceTree = ""; }; + 8AD401534246B014683F7A038308FE9B /* FBSDKCoreKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FBSDKCoreKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8BADE1E77178E394700199FCD1A0F68A /* FBSDKEventBindingManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKEventBindingManager.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBindingManager.h; sourceTree = ""; }; + 8C5C4CD14931DEF7BFBBA735D760CDBC /* Pods-FirebaseFacebookTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-FirebaseFacebookTests-acknowledgements.plist"; sourceTree = ""; }; + 8C96AD04EF07191B9D21F613334AD704 /* UserProfile.PictureView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UserProfile.PictureView.swift; path = Sources/Core/UserProfile/UserProfile.PictureView.swift; sourceTree = ""; }; + 8C9D8AF925D1BA2D636D73BB3FB86B2E /* FBSDKAppEventsUtility.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppEventsUtility.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsUtility.m; sourceTree = ""; }; + 8D762D9DCA27F47BED5C50990CE7E953 /* FBSDKDeviceRequestsHelper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKDeviceRequestsHelper.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKDeviceRequestsHelper.h; sourceTree = ""; }; + 8F138D95F9F32235B6D185C288B0EF35 /* Pods-FirebaseFacebook-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-FirebaseFacebook-dummy.m"; sourceTree = ""; }; + 8FEEB51211E5338A3D5EE865CB925E0C /* FBSDKCodelessIndexer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKCodelessIndexer.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessIndexer.h; sourceTree = ""; }; + 90554790C14FD77A55F208E389F60D21 /* FBSDKTypeUtility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKTypeUtility.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKTypeUtility.h; sourceTree = ""; }; + 90876590F1542E01A9620D2866328EC3 /* FBSDKMacros.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKMacros.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKMacros.h; sourceTree = ""; }; + 90C6813EE85691FDE9E4E877A5387FBA /* FBSDKBridgeAPIProtocolWebV2.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKBridgeAPIProtocolWebV2.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV2.h; sourceTree = ""; }; + 90CBCB02EBF0A97CFAA6A138CD9DB025 /* FBSDKConstants.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKConstants.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.m; sourceTree = ""; }; + 9138D93B3014EAE5160367E06497DBF7 /* FBSDKCodelessPathComponent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKCodelessPathComponent.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessPathComponent.h; sourceTree = ""; }; + 91C6D8038755CCB150C24666E4E1B6C2 /* FBSDKCloseIcon.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKCloseIcon.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKCloseIcon.h; sourceTree = ""; }; + 93515A6DE062C65528B6151B44DB9892 /* FBSDKUserDataStore.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKUserDataStore.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKUserDataStore.h; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93ED28F7262E6362F3C4F7572CA4AFFB /* FBSDKAccessTokenCacheV3.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAccessTokenCacheV3.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3.m; sourceTree = ""; }; + 962DB8E603E7E2D0C1F2215E93550848 /* FBSDKGraphRequestPiggybackManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKGraphRequestPiggybackManager.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManager.h; sourceTree = ""; }; + 96592F50C3B97805DB5A36FE234F3AD1 /* FBSDKKeychainStoreViaBundleID.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKKeychainStoreViaBundleID.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKKeychainStoreViaBundleID.m; sourceTree = ""; }; + 96C5B960E36A0EEE53764285037E50E0 /* GraphRequestConnectionDelegateBridge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GraphRequestConnectionDelegateBridge.swift; path = Sources/Core/GraphRequest/GraphRequestConnectionDelegateBridge.swift; sourceTree = ""; }; + 974F91CAFC2986D8C530D5B9A8A31235 /* FBSDKError.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKError.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKError.h; sourceTree = ""; }; + 97BCFD43D7B4E914A1679DC55242A5F3 /* FBSDKContainerViewController.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKContainerViewController.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKContainerViewController.m; sourceTree = ""; }; + 985417EA9600A120B7E62C8D4AEDAA3D /* Pods-FirebaseFacebookTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-FirebaseFacebookTests.modulemap"; sourceTree = ""; }; + 9914F308A21DC78AC5BD571AA96AA840 /* FBSDKDialogConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKDialogConfiguration.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKDialogConfiguration.h; sourceTree = ""; }; + 9A3281A4424598C2D800FD1F0DB68DD6 /* FBSDKEventBindingManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKEventBindingManager.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKEventBindingManager.m; sourceTree = ""; }; + 9C518BFECA0DB0388E8906DF648169E1 /* FBSDKLoginUtility.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKLoginUtility.m; path = FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginUtility.m; sourceTree = ""; }; + 9C7910786FE57092E6E1A6F8F4DB27C9 /* FacebookLogin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = FacebookLogin.framework; path = FacebookLogin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9D63183A1B1C7FBF7B2BD7D091C591C7 /* FBSDKApplicationDelegate.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKApplicationDelegate.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.m; sourceTree = ""; }; + 9DE291DA920B96DAC8A4CFC6144F33E2 /* LoginButton.Tooltip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LoginButton.Tooltip.swift; path = Sources/Login/LoginButton.Tooltip.swift; sourceTree = ""; }; + 9DED741CAACFE9EC7386A4CEEBE378C7 /* FBSDKWebDialogView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKWebDialogView.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialogView.h; sourceTree = ""; }; + 9EEB1ADA1399BDF8189396CC0B0B3A06 /* FBSDKBoltsMeasurementEventListener.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKBoltsMeasurementEventListener.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppLink/FBSDKBoltsMeasurementEventListener.h; sourceTree = ""; }; + A04891767E0201B5351B2C4976989CE2 /* FBSDKAudioResourceLoader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAudioResourceLoader.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAudioResourceLoader.m; sourceTree = ""; }; + A07966A62A99E51FD2FB27557809647C /* Pods-FirebaseFacebook.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-FirebaseFacebook.modulemap"; sourceTree = ""; }; + A14E0460928F8BF4822273D3A7BB054F /* FBSDKURL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKURL.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKURL.m; sourceTree = ""; }; + A1D0A680121F763405A39A5A9C59CCAD /* FBSDKAccessToken.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAccessToken.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAccessToken.h; sourceTree = ""; }; + A2A54FF4B6015F32C352228C585B5744 /* FBSDKGraphRequestBody.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKGraphRequestBody.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestBody.m; sourceTree = ""; }; + A309F5CFAD1C525F46D765436B1F8962 /* FacebookCore-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FacebookCore-umbrella.h"; sourceTree = ""; }; + A372166948941B4A0137DB96C2F0A0B5 /* FBSDKButton.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKButton.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.m; sourceTree = ""; }; + A3859C116A6CE2C05D14F9ED86CEAB54 /* FBSDKLoginConstants.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKLoginConstants.m; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.m; sourceTree = ""; }; + A3A931E3C1D460AD4514752135484BF0 /* FBSDKViewImpressionTracker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKViewImpressionTracker.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKViewImpressionTracker.h; sourceTree = ""; }; + A4F06414F34836CABCFFCD690B32AC8E /* Pods-FirebaseFacebook-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-FirebaseFacebook-acknowledgements.plist"; sourceTree = ""; }; + A53E48D566E078C111A90ACB28CB9BE6 /* FBSDKAppLink.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppLink.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLink.h; sourceTree = ""; }; + A5854EE903373AB4CA04BC00FB4DAF75 /* FBSDKDeviceLoginManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKDeviceLoginManager.h; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.h; sourceTree = ""; }; + A5BDADD2E28AC3151EBF4513B514C01E /* FBSDKImageDownloader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKImageDownloader.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKImageDownloader.h; sourceTree = ""; }; + A745231B41B0C4572F1F537C7B9A5913 /* FBSDKWebViewAppLinkResolver.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKWebViewAppLinkResolver.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKWebViewAppLinkResolver.m; sourceTree = ""; }; + A7F6CFEEB0C3D9A3B4FFBDBC1FDCBAFF /* FBSDKMutableCopying.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKMutableCopying.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKMutableCopying.h; sourceTree = ""; }; + A7FF088CA9018D07B73FDF3A7E74E660 /* FBSDKAppEventsState.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppEventsState.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsState.m; sourceTree = ""; }; + A97D7E745468B5A9CAC25746EF54EA4F /* FBSDKURL_Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKURL_Internal.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKURL_Internal.h; sourceTree = ""; }; + A9E0A2C0AE9A8955970495F9F47AB6FA /* FacebookLogin-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "FacebookLogin-dummy.m"; sourceTree = ""; }; + AB1E03597ACC0F3DB46F8D1810A528D9 /* UserProfile.FetchResult.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UserProfile.FetchResult.swift; path = Sources/Core/UserProfile/UserProfile.FetchResult.swift; sourceTree = ""; }; + AC3F73CBCC3CD4E32CD5B2323A6C098F /* FBSDKGraphErrorRecoveryProcessor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKGraphErrorRecoveryProcessor.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.h; sourceTree = ""; }; + AC4F516BCF19DCCBC1C68949EEFCA454 /* FBSDKInternalUtility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKInternalUtility.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility.h; sourceTree = ""; }; + ACADDC7CD7ED899576C70149BC64F7B8 /* FBSDKSwizzler.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKSwizzler.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSwizzler.h; sourceTree = ""; }; + ACBADAA6DCD285B6E4579FE96811548C /* FBSDKAppEventsUtility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppEventsUtility.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsUtility.h; sourceTree = ""; }; + ACF69CA922181130868433E106634488 /* FBSDKGraphErrorRecoveryProcessor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKGraphErrorRecoveryProcessor.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphErrorRecoveryProcessor.m; sourceTree = ""; }; + AD72B034D91FFF4FC30C9177D412A80B /* FBSDKLoginConstants.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKLoginConstants.h; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.h; sourceTree = ""; }; + AE148327F572476FCADE4E845B3BC9F1 /* FBSDKBridgeAPIProtocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKBridgeAPIProtocol.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIProtocol.h; sourceTree = ""; }; + AFF88408E108181C1F206F5A3D8D74E3 /* FBSDKBridgeAPIProtocolNativeV1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKBridgeAPIProtocolNativeV1.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolNativeV1.h; sourceTree = ""; }; + B05479925008D2BF096F87D8F13B3B04 /* FBSDKAccessTokenCacheV4.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAccessTokenCacheV4.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV4.m; sourceTree = ""; }; + B0631E10EBC97CD9CAF2F5492651BC24 /* FBSDKSwizzler.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKSwizzler.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSwizzler.m; sourceTree = ""; }; + B1EA2B5AC5A737699DA9DBD7BDFA25EB /* FBSDKAppLinkResolver.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppLinkResolver.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.m; sourceTree = ""; }; + B2ACC55873264B544CC282544FAB92D8 /* Pods-FirebaseFacebook-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-FirebaseFacebook-acknowledgements.markdown"; sourceTree = ""; }; + B4363CBA765EEF807988F70DC38F50B6 /* FBSDKSettings.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKSettings.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKSettings.m; sourceTree = ""; }; + B485EA057B27512FE1A27D1A9231C81A /* FBSDKServerConfigurationManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKServerConfigurationManager.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.h; sourceTree = ""; }; + B49C1B51A4F8CD83A4E0F76A24AB93C5 /* BFAppLinkNavigation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFAppLinkNavigation.h; path = Bolts/iOS/BFAppLinkNavigation.h; sourceTree = ""; }; + B4A4373FC834526B70A77BA8BFED61E2 /* BFExecutor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFExecutor.h; path = Bolts/Common/BFExecutor.h; sourceTree = ""; }; + B51B6E7A2807B73D9ED72471ACC3AE95 /* FBSDKLoginManagerLoginResult.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKLoginManagerLoginResult.m; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManagerLoginResult.m; sourceTree = ""; }; + B5FE03B932C29FEC3A8BDA1CD1A7BC2A /* FBSDKErrorConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKErrorConfiguration.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfiguration.h; sourceTree = ""; }; + B7D253DEF14B8D6D8E6593BACBDD8B17 /* Pods-FirebaseFacebookUITests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-FirebaseFacebookUITests-umbrella.h"; sourceTree = ""; }; + B8FC063A6581DE33C8844453BAE637B5 /* FBSDKWebViewAppLinkResolver.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKWebViewAppLinkResolver.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKWebViewAppLinkResolver.h; sourceTree = ""; }; + BAD529531F86B66B6E4858DB8D215938 /* AppEventsLogger.FlushBehavior.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AppEventsLogger.FlushBehavior.swift; path = Sources/Core/AppEvents/AppEventsLogger.FlushBehavior.swift; sourceTree = ""; }; + BAFD8A55BAC904846AFDDF285139C95B /* FacebookCore.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = FacebookCore.modulemap; sourceTree = ""; }; + BB4E1694A0F3CA4C437482A99E1EB422 /* FBSDKBase64.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKBase64.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Base64/FBSDKBase64.m; sourceTree = ""; }; + BBC1E4C79B04C9FF79A57EE8D624CAFF /* FBSDKGraphRequestDataAttachment.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKGraphRequestDataAttachment.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestDataAttachment.m; sourceTree = ""; }; + BDF1BC1277039F9F875A7A0FC77B0F69 /* FBSDKAccessTokenCacheV3_21.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAccessTokenCacheV3_21.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3_21.h; sourceTree = ""; }; + BF68EFF662855493828C51A3FEF684DF /* Dictionary+KeyValueMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Dictionary+KeyValueMap.swift"; path = "Sources/Core/Internal/Extensions/Dictionary+KeyValueMap.swift"; sourceTree = ""; }; + BFA44EA3B0830A3C08AC12E5E9F27A75 /* PublishPermission.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishPermission.swift; path = Sources/Core/Permissions/PublishPermission.swift; sourceTree = ""; }; + BFB13358DE17BF488D862279C58A1AF0 /* FBSDKIcon.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKIcon.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKIcon.h; sourceTree = ""; }; + C136E040D485DC612A5079BC5F5875F4 /* BFAppLinkResolving.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFAppLinkResolving.h; path = Bolts/iOS/BFAppLinkResolving.h; sourceTree = ""; }; + C1F634BB4EAB39C6CAC69641F45B0230 /* FBSDKLoginCompletion.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKLoginCompletion.m; path = FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion.m; sourceTree = ""; }; + C25FAE41DB0C1B34DEB4944258323481 /* BFURL_Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFURL_Internal.h; path = Bolts/iOS/Internal/BFURL_Internal.h; sourceTree = ""; }; + C27CA44DB37F3B8DB139CE6E67A79F2B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C2B21CFD10C228275797A9BE045F1C62 /* FBSDKAccessTokenCacheV3.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAccessTokenCacheV3.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV3.h; sourceTree = ""; }; + C2EA2A801F7321CA9042EF0A0D1B6DE7 /* LoginBehavior.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LoginBehavior.swift; path = Sources/Login/LoginBehavior.swift; sourceTree = ""; }; + C3BDC625D9FAA6DD420C832C2CE18384 /* FBSDKErrorRecoveryConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKErrorRecoveryConfiguration.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorRecoveryConfiguration.h; sourceTree = ""; }; + C3CE4CCE2DA2AA4CD3590647E839C28B /* FBSDKErrorRecoveryConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKErrorRecoveryConfiguration.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorRecoveryConfiguration.m; sourceTree = ""; }; + C3EC3FFE1F66DCBF5A5EC2ACB4A80B1B /* UserProfile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UserProfile.swift; path = Sources/Core/UserProfile/UserProfile.swift; sourceTree = ""; }; + C50043022E8B17E601C6169AF438B2A0 /* BFCancellationToken.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFCancellationToken.m; path = Bolts/Common/BFCancellationToken.m; sourceTree = ""; }; + C5834D25320E9EF30710132BCA0F2675 /* FBSDKCrypto.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKCrypto.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Cryptography/FBSDKCrypto.m; sourceTree = ""; }; + C6B4CEC742828D8414EB2385220750F3 /* FBSDKAppLinkReturnToRefererView_Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppLinkReturnToRefererView_Internal.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLinkReturnToRefererView_Internal.h; sourceTree = ""; }; + C81482D3691E414A7290D7FA7B4E1D23 /* FBSDKApplicationDelegate+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKApplicationDelegate+Internal.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKApplicationDelegate+Internal.h"; sourceTree = ""; }; + C8AC5FB43AC65A6315CA1A116362CAF9 /* FBSDKAccessTokenExpirer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAccessTokenExpirer.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenExpirer.h; sourceTree = ""; }; + C8D75192BEAFF4A36A3689CF1BD7B48F /* Bolts-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Bolts-prefix.pch"; sourceTree = ""; }; + C8F9B880AB350C83C6F1F96732ECAAA6 /* BFAppLinkReturnToRefererView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFAppLinkReturnToRefererView.m; path = Bolts/iOS/BFAppLinkReturnToRefererView.m; sourceTree = ""; }; + C8FFFB3AAD4500FC7B5285D003B73ECA /* FBSDKLoginManagerLoginResult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKLoginManagerLoginResult.h; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManagerLoginResult.h; sourceTree = ""; }; + C96B6FE17CDB3AEEED9EF5CB531FFDE6 /* FBSDKAppLinkUtility.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppLinkUtility.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.m; sourceTree = ""; }; + C9D43EAE5481C8F331A6B65AA9FC88CF /* FBSDKAppLinkResolving.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppLinkResolving.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolving.h; sourceTree = ""; }; + CA490C701DE1DB47E50D89315A67B2A8 /* FBSDKTooltipView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKTooltipView.m; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKTooltipView.m; sourceTree = ""; }; + CB5D96E7448BAC84C4C1E20A2977DD3A /* FBSDKCodelessIndexer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKCodelessIndexer.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessIndexer.m; sourceTree = ""; }; + CBEAAF5625F4DC5F754D95D608FA5F54 /* _FBSDKLoginRecoveryAttempter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = _FBSDKLoginRecoveryAttempter.m; path = FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.m; sourceTree = ""; }; + CD3C0C337BF5128DC67D82F58E1CD8B3 /* FBSDKBridgeAPIProtocolWebV1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKBridgeAPIProtocolWebV1.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV1.h; sourceTree = ""; }; + CD4D68CD17DC3BBEDDC1D15F35351FC7 /* FacebookCore.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = FacebookCore.xcconfig; sourceTree = ""; }; + CDD371832057051B070A360AD037809B /* FBSDKInternalUtility.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKInternalUtility.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility.m; sourceTree = ""; }; + CDEE3D64FBA2AFED63F91D1C41E05D5C /* BFAppLinkReturnToRefererView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFAppLinkReturnToRefererView.h; path = Bolts/iOS/BFAppLinkReturnToRefererView.h; sourceTree = ""; }; + CE158197B91B244B864DAAD833D02AB8 /* FacebookLogin.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = FacebookLogin.modulemap; sourceTree = ""; }; + CE9763CC6817F022E29B52DBC4AB1D94 /* FBSDKAppLink_Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppLink_Internal.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLink_Internal.h; sourceTree = ""; }; + CEF393AABD76AE0929B837F2998993A0 /* FBSDKDialogConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKDialogConfiguration.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKDialogConfiguration.m; sourceTree = ""; }; + CFB9E6762417F3E09BC213BA3F5C1B64 /* FBSDKAppEvents+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKAppEvents+Internal.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEvents+Internal.h"; sourceTree = ""; }; + D00D56DCEE5E634E0D19886002C9872B /* FBSDKButton.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKButton.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKButton.h; sourceTree = ""; }; + D1CF000AADE920FD4875CF67539B26EB /* FBSDKBridgeAPIRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKBridgeAPIRequest.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest.h; sourceTree = ""; }; + D1CFE1943D0C9BDA88C2553BB45C4BF5 /* FBSDKServerConfigurationManager+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKServerConfigurationManager+Internal.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager+Internal.h"; sourceTree = ""; }; + D26B517EAD97A8CF5D1CFFDFC9E58D18 /* FBSDKBoltsMeasurementEventListener.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKBoltsMeasurementEventListener.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppLink/FBSDKBoltsMeasurementEventListener.m; sourceTree = ""; }; + D32ECDAA1E8E8F7C88E4FDDF83D11625 /* FBSDKBridgeAPIRequest+Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKBridgeAPIRequest+Private.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPIRequest+Private.h"; sourceTree = ""; }; + D39B798959A8843588079617C7BAD560 /* FBSDKAppLinkReturnToRefererView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppLinkReturnToRefererView.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererView.h; sourceTree = ""; }; + D3A876B1E35D3E0CF594219303084E5A /* FBSDKLoginButton.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKLoginButton.h; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h; sourceTree = ""; }; + D45E6164CC3352856CA53D40EA09E8AB /* FBSDKAppLinkUtility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppLinkUtility.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkUtility.h; sourceTree = ""; }; + D48E00A0C8F23920BDE678AAF743BA66 /* SDKSettings.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SDKSettings.swift; path = Sources/Core/Common/SDKSettings.swift; sourceTree = ""; }; + D49590CD4CE7520BD3349F78F31D24C9 /* FBSDKGraphRequestConnection.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKGraphRequestConnection.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequestConnection.h; sourceTree = ""; }; + D49DD372CBA3494261D474403471894E /* FBSDKDeviceLoginManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKDeviceLoginManager.m; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.m; sourceTree = ""; }; + D4F13E7B4359C11837D1BD13FCCD96F2 /* FBSDKCodelessMacros.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKCodelessMacros.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKCodelessMacros.h; sourceTree = ""; }; + D588C69EDC10372A11B58993B951BDC0 /* FBSDKAccessTokenCaching.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAccessTokenCaching.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCaching.h; sourceTree = ""; }; + D5F026FB8682B880E1E59A57F77A103E /* FBSDKLogo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKLogo.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKLogo.h; sourceTree = ""; }; + D6DE8A857EE2449C8542BB3D1B98B254 /* FBSDKCrypto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKCrypto.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Cryptography/FBSDKCrypto.h; sourceTree = ""; }; + D6E44C456B581AA10AD641783BD15CC7 /* Pods-FirebaseFacebookUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-FirebaseFacebookUITests.debug.xcconfig"; sourceTree = ""; }; + D703AF3B5AA51B1BFE9DD846387CBCCA /* SDKApplicationDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SDKApplicationDelegate.swift; path = Sources/Core/Common/SDKApplicationDelegate.swift; sourceTree = ""; }; + D7D3B94D90F1EB7352622ECC5659FC20 /* FBSDKURLOpening.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKURLOpening.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKURLOpening.h; sourceTree = ""; }; + D919921B742833D129A26696254B547E /* FBSDKAppEventsDeviceInfo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppEventsDeviceInfo.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsDeviceInfo.m; sourceTree = ""; }; + D935227B93F9930BE58BE332C93DD4E6 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D9DBD0D8C4E85414354E3DA5629C83EA /* FBSDKBridgeAPIProtocolNativeV1.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKBridgeAPIProtocolNativeV1.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolNativeV1.m; sourceTree = ""; }; + DACC648049AB54A203AEEC3B5505188D /* Bolts.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Bolts.xcconfig; sourceTree = ""; }; + DAD2BA1020E28B0D93984586FB4D84BF /* Optional+OnSome.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Optional+OnSome.swift"; path = "Sources/Core/Internal/Extensions/Optional+OnSome.swift"; sourceTree = ""; }; + DB40D3AE54F8A84112F36182BCEF72A3 /* LoginDefaultAudience.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LoginDefaultAudience.swift; path = Sources/Login/LoginDefaultAudience.swift; sourceTree = ""; }; + DC146E6DAFA6F2CFF226580020EF2365 /* Pods-FirebaseFacebookTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-FirebaseFacebookTests.debug.xcconfig"; sourceTree = ""; }; + DC81A9D35C5C8E478DA12D7180F0B54D /* BFAppLinkTarget.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFAppLinkTarget.m; path = Bolts/iOS/BFAppLinkTarget.m; sourceTree = ""; }; + DD29DE9F60DC273B9A5C29EF49BE8340 /* FBSDKAccessTokenCacheV4.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAccessTokenCacheV4.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCacheV4.h; sourceTree = ""; }; + DD7CA2F5D71DE02DFC1E2F90C06B759F /* FBSDKTimeSpentData.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKTimeSpentData.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKTimeSpentData.m; sourceTree = ""; }; + DD8015CDD3D0926AED26D08343366DE9 /* FBSDKDynamicFrameworkLoader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKDynamicFrameworkLoader.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m; sourceTree = ""; }; + DD82114FE772AE114C3F202312D6508E /* _FBSDKLoginRecoveryAttempter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = _FBSDKLoginRecoveryAttempter.h; path = FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.h; sourceTree = ""; }; + DE3241E14BFC8824D49D2210C5E7B46D /* GraphRequestConnection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GraphRequestConnection.swift; path = Sources/Core/GraphRequest/GraphRequestConnection.swift; sourceTree = ""; }; + DEECF92B92ADBCCAC7D4527D7DAF9678 /* FBSDKServerConfigurationManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKServerConfigurationManager.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.m; sourceTree = ""; }; + DF10086D121235A66D463AD9DCFC3F74 /* BFCancellationToken.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFCancellationToken.h; path = Bolts/Common/BFCancellationToken.h; sourceTree = ""; }; + DF14CF83B18F464FF3EED94BBAB30F60 /* FBSDKAppLinkTarget.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppLinkTarget.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkTarget.h; sourceTree = ""; }; + DF6DC1A56CD732E4053384702A21B21B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DFE7AE824015437D6F413F207B1CAADA /* FBSDKAppEvents.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppEvents.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.m; sourceTree = ""; }; + E039106125081C0B5EC75936CF35AB0B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + E103B0D4BBE43282A5FA5FBC625FED75 /* FBSDKGraphRequest+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKGraphRequest+Internal.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequest+Internal.h"; sourceTree = ""; }; + E110925B6A6474E49B6E74AAEF920190 /* Bolts.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Bolts.modulemap; sourceTree = ""; }; + E2E6EACD9FCDC562690B3C02B6BDE9A7 /* FBSDKPaymentObserver.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKPaymentObserver.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.m; sourceTree = ""; }; + E39BA86FD462FB47FFDF52F03D0DD00B /* FBSDKServerConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKServerConfiguration.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration.m; sourceTree = ""; }; + E525CABA83B57960C8373F7724B66BD4 /* FacebookLogin.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = FacebookLogin.xcconfig; sourceTree = ""; }; + E588E2C51BEF7AD7D9180235C5A0DAD3 /* FBSDKViewHierarchy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKViewHierarchy.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/Codeless/FBSDKViewHierarchy.m; sourceTree = ""; }; + E6F04EE6BF31E716FBA28D676C46A34E /* AppEventName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AppEventName.swift; path = Sources/Core/AppEvents/AppEventName.swift; sourceTree = ""; }; + E71F06DAC1ACFB29BAFE9B341A100D56 /* FBSDKMeasurementEvent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKMeasurementEvent.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKMeasurementEvent.h; sourceTree = ""; }; + EA2130A517470A0B098259342AE1A936 /* FBSDKMaleSilhouetteIcon.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKMaleSilhouetteIcon.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKMaleSilhouetteIcon.m; sourceTree = ""; }; + EE8212EEAC3DF74C1562315B2FF82D44 /* BFExecutor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BFExecutor.m; path = Bolts/Common/BFExecutor.m; sourceTree = ""; }; + EECAB8CCD1C7578176B5D1482ED766E8 /* FBSDKAppEventsStateManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppEventsStateManager.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsStateManager.m; sourceTree = ""; }; + F0575992DC4D9911DD9BEBD28758C8D3 /* FacebookCore-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "FacebookCore-dummy.m"; sourceTree = ""; }; + F05DB6AF3AAB3EE955C2F088604050CB /* FBSDKLogger.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKLogger.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKLogger.h; sourceTree = ""; }; + F0CA7C0798A153B675A5388271CC7C04 /* Permission.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Permission.swift; path = Sources/Core/Permissions/Permission.swift; sourceTree = ""; }; + F0CAD9103EAFEB61BA931197363A7B79 /* FBSDKError.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKError.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKError.m; sourceTree = ""; }; + F101D72B1017C65C091D4F86F9DBCD35 /* FBSDKServerConfiguration+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKServerConfiguration+Internal.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration+Internal.h"; sourceTree = ""; }; + F18D45C77E07DA8FAD24A1D9B48CDE6C /* FBSDKConstants.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKConstants.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKConstants.h; sourceTree = ""; }; + F348A070247702C9E77CF301D0730BF7 /* FBSDKURL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKURL.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKURL.h; sourceTree = ""; }; + F3FC58548E44926F631FC2A8F807D710 /* FBSDKBridgeAPICrypto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKBridgeAPICrypto.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPICrypto.h; sourceTree = ""; }; + F3FF8A84B8D7DA51E382661CC5E9C138 /* Pods-FirebaseFacebookUITests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-FirebaseFacebookUITests-acknowledgements.markdown"; sourceTree = ""; }; + F40E0DA716D3F4B73232D39EA2216605 /* BFTask.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BFTask.h; path = Bolts/Common/BFTask.h; sourceTree = ""; }; + F414A1B8045EFEF7A8648033B707EB52 /* FBSDKLoginKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = FBSDKLoginKit.framework; path = FBSDKLoginKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F4C3F281790DBB4E8AC29B4CCB33760B /* FBSDKErrorRecoveryAttempter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKErrorRecoveryAttempter.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ErrorRecovery/FBSDKErrorRecoveryAttempter.m; sourceTree = ""; }; + F4EE392243C84B0B176AC7D8438A3E0B /* FBSDKAppEventsStateManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppEventsStateManager.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsStateManager.h; sourceTree = ""; }; + F51259B40DCF1C61C67006463219DDD3 /* Pods-FirebaseFacebook-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-FirebaseFacebook-umbrella.h"; sourceTree = ""; }; + F53A5CFEE4C10BAB0BCD13FD80144B88 /* FBSDKMaleSilhouetteIcon.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKMaleSilhouetteIcon.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKMaleSilhouetteIcon.h; sourceTree = ""; }; + F7E0BE1C1FCCFECB2934EE101C7003F7 /* FBSDKGraphRequest.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKGraphRequest.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKGraphRequest.m; sourceTree = ""; }; + F80A6A12E4650285D36A1F08431123D3 /* FBSDKAccessTokenCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAccessTokenCache.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/TokenCaching/FBSDKAccessTokenCache.h; sourceTree = ""; }; + F922E548BDE81C7086DB32B2CB3E8982 /* FBSDKLogo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKLogo.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKLogo.m; sourceTree = ""; }; + F960ABAAEB40A32FCFAFE6A7DF774083 /* FBSDKCoreKit+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKCoreKit+Internal.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKCoreKit+Internal.h"; sourceTree = ""; }; + F9A15EB5D734DEEE5301586381E27C32 /* FBSDKCloseIcon.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKCloseIcon.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKCloseIcon.m; sourceTree = ""; }; + FA069940EAD8AAC20BB4EA486C658771 /* Pods_FirebaseFacebookUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_FirebaseFacebookUITests.framework; path = "Pods-FirebaseFacebookUITests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + FAB1F1FAD6B53ABBDD1D17B0EFA473CE /* FBSDKAppEventsState.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppEventsState.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEventsState.h; sourceTree = ""; }; + FAFAEBD073E9A4F0489A95209FA6646D /* FBSDKLoginCompletion.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKLoginCompletion.h; path = FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion.h; sourceTree = ""; }; + FB743AD6C0A7205C001AAD14611B4576 /* FBSDKBridgeAPIProtocolWebV2.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKBridgeAPIProtocolWebV2.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolWebV2.m; sourceTree = ""; }; + FB9713C9F085482D4687D8C7E838CBFF /* Pods_FirebaseFacebook.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_FirebaseFacebook.framework; path = "Pods-FirebaseFacebook.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + FBA21E4FE17D9BDD2E6400D7CF67F052 /* FBSDKBridgeAPICrypto.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKBridgeAPICrypto.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPICrypto.m; sourceTree = ""; }; + FCEA4B1E1425F3E0A0F8238073B6CA5E /* FBSDKAppLinkReturnToRefererView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppLinkReturnToRefererView.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkReturnToRefererView.m; sourceTree = ""; }; + FD02F70969FFAC6048E3A68C2C6E7B86 /* FBSDKGraphRequestMetadata.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKGraphRequestMetadata.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestMetadata.h; sourceTree = ""; }; + FD5DE46B1410494DAAC27BFAFFC61434 /* FBSDKDeviceRequestsHelper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKDeviceRequestsHelper.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKDeviceRequestsHelper.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 06B737175F0473989B9DD3EF41CF0E0E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 167AC0D800CE5EE45F0D046894BBE2C7 /* Bolts.framework in Frameworks */, + 8B533682B55D5ADC1BBABE5DA70EBDA1 /* FBSDKCoreKit.framework in Frameworks */, + 688894DCD0767FA211FA64A28FE410B3 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09425B6A9BFBF8C3953E46E298F92251 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5C40A8806407DB0FB1921F4CD61EEA56 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 46713D2279CF75A3639C8CFA9DAFF94C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4159AE2DAF3428CB42FA2A8C1F011E /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607538EF4EC3FDCFC2FCA0214DF859E8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3B8C6D726EA99B201A46B4AC7B956899 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A3267B9AFC4BD201D02E9D78DFB8DD7C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + F96E6B76F65A3A7C63DD2EE1A8541773 /* Bolts.framework in Frameworks */, + F89C12B6F6A9F5ADD788C607ED9938B9 /* FacebookCore.framework in Frameworks */, + 40FDBC63E4ACD92DD150ECEF8FCB8DB8 /* FBSDKCoreKit.framework in Frameworks */, + ACFFDCD15150DE7B22C2A6C146994239 /* FBSDKLoginKit.framework in Frameworks */, + 1F34FA75264BBEA78C59F44F0EBB6004 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + AC2F622ECE8471477ACB613503CF47C2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 521E593D8C79C1C9C2059A6FE4E1743D /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D1AF25F8E0C97EBD1D352412A10B3D43 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D95EAD0E7564942B4D09ECDB5D6D003B /* Bolts.framework in Frameworks */, + 1D05958A8CFA384911AD7BB3256329C0 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E6AA2DA27FA518824659C31885839844 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 69F3D835C2BC677CE7CB0AD718791D9B /* Bolts.framework in Frameworks */, + C87CF7F54DF37C9958504B656449E795 /* FBSDKCoreKit.framework in Frameworks */, + B5646360A99FAC35299A69CD075E4860 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 211B606AEAFAAB6699B921265FECEC50 /* Products */ = { + isa = PBXGroup; + children = ( + 2E2B949A24697F944E81A9BFA0AF7543 /* Bolts.framework */, + 77D9B77CFA4191AA056524313DC827B4 /* FacebookCore.framework */, + 9C7910786FE57092E6E1A6F8F4DB27C9 /* FacebookLogin.framework */, + 32CC168A5629CF356734F6E686B594C1 /* FBSDKCoreKit.framework */, + F414A1B8045EFEF7A8648033B707EB52 /* FBSDKLoginKit.framework */, + FB9713C9F085482D4687D8C7E838CBFF /* Pods_FirebaseFacebook.framework */, + 5D898B48EB6B01758CA7B26C5217E1AA /* Pods_FirebaseFacebookTests.framework */, + FA069940EAD8AAC20BB4EA486C658771 /* Pods_FirebaseFacebookUITests.framework */, + ); + name = Products; + sourceTree = ""; + }; + 2C3DA95FA661678BFAFF77CEF396CECA /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + E230F743C7AA19CF38995A00154AEEBF /* Pods-FirebaseFacebook */, + EFDB4E06CB06F6BCC1A34BF27A68043B /* Pods-FirebaseFacebookTests */, + A670AE31374391C854FBBA3DEED523F3 /* Pods-FirebaseFacebookUITests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 38A7BA6028B72827BBF2948BBEF8A4F3 /* Support Files */ = { + isa = PBXGroup; + children = ( + E110925B6A6474E49B6E74AAEF920190 /* Bolts.modulemap */, + DACC648049AB54A203AEEC3B5505188D /* Bolts.xcconfig */, + 05A428095E510B4C8641761BDC7CCA92 /* Bolts-dummy.m */, + C8D75192BEAFF4A36A3689CF1BD7B48F /* Bolts-prefix.pch */, + 44780BB1B95EC481FE50C963188AFF4C /* Bolts-umbrella.h */, + D935227B93F9930BE58BE332C93DD4E6 /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/Bolts"; + sourceTree = ""; + }; + 3D2765870DFAF98D3E2C7DA1D8DDC1B2 /* Tasks */ = { + isa = PBXGroup; + children = ( + DF10086D121235A66D463AD9DCFC3F74 /* BFCancellationToken.h */, + C50043022E8B17E601C6169AF438B2A0 /* BFCancellationToken.m */, + 557AE8E03BF7C5A71FA81C74C2826058 /* BFCancellationTokenRegistration.h */, + 68FEE7F80D6DDE0FE7842DC410C77AA3 /* BFCancellationTokenRegistration.m */, + 0488933786947C2FFAC4EFEEF536F30B /* BFCancellationTokenSource.h */, + 899486C2BB09BC75D1941CCA01558952 /* BFCancellationTokenSource.m */, + B4A4373FC834526B70A77BA8BFED61E2 /* BFExecutor.h */, + EE8212EEAC3DF74C1562315B2FF82D44 /* BFExecutor.m */, + 5D7A52CC5F230A23B4EBD2882DA4F43E /* BFGeneric.h */, + F40E0DA716D3F4B73232D39EA2216605 /* BFTask.h */, + 85A089D6CFC6F31B8D83CC2666E4F65C /* BFTask.m */, + 15EB6728949AB9B127E1705D4DD0EBA8 /* BFTaskCompletionSource.h */, + 176C6354CAE38FA683021B4116418E1C /* BFTaskCompletionSource.m */, + 4D7EF37E28F83B0CFAEBC6FBB6400E74 /* Bolts.h */, + 41A7F0608AB0737D45F20EAEFA04DF62 /* Bolts.m */, + ); + name = Tasks; + sourceTree = ""; + }; + 4983E3B29A9A5F2787B0E04507986258 /* Support Files */ = { + isa = PBXGroup; + children = ( + 2D2451851704100F5EBBA0D3ECFE43DC /* FBSDKCoreKit.modulemap */, + 76A5A7BC7E26B2C73ADC769A0DDE7488 /* FBSDKCoreKit.xcconfig */, + 402CB3E0A41CAC932574FB450FBF2584 /* FBSDKCoreKit-dummy.m */, + 1CE10700538B298518F79CAF12D30043 /* FBSDKCoreKit-prefix.pch */, + 28730EA0F7F3CC41073C0A179FBE5813 /* FBSDKCoreKit-umbrella.h */, + 85EE9D41E3C5BE6C35809A39CAA5260D /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/FBSDKCoreKit"; + sourceTree = ""; + }; + 4D4369BE6500B9AEEC3B9F704D988321 /* Bolts */ = { + isa = PBXGroup; + children = ( + 757C0D4C98BF34E65B13181BB1BD909B /* AppLinks */, + 38A7BA6028B72827BBF2948BBEF8A4F3 /* Support Files */, + 3D2765870DFAF98D3E2C7DA1D8DDC1B2 /* Tasks */, + ); + name = Bolts; + path = Bolts; + sourceTree = ""; + }; + 5194BCC7EE8F7EF6FA6A8D75319C3A3F /* Resources */ = { + isa = PBXGroup; + children = ( + 7CD89427BE2200BCFF02B38E66B480C1 /* FacebookSDKStrings.bundle */, + ); + name = Resources; + sourceTree = ""; + }; + 53B421565633485ECE57270D367FA109 /* FacebookLogin */ = { + isa = PBXGroup; + children = ( + C2EA2A801F7321CA9042EF0A0D1B6DE7 /* LoginBehavior.swift */, + 634E36D0027CC5840ACAC848176495BB /* LoginButton.swift */, + 9DE291DA920B96DAC8A4CFC6144F33E2 /* LoginButton.Tooltip.swift */, + 7F7618EAF7D6887F8AE919A6BF610C87 /* LoginButtonDelegate.swift */, + 78E6158C700392C9A7F679BF6CE71E06 /* LoginButtonDelegateBridge.swift */, + DB40D3AE54F8A84112F36182BCEF72A3 /* LoginDefaultAudience.swift */, + 2D35148D2C221D14A8F873DE1E702D33 /* LoginManager.swift */, + 3492E233CA691DB5918773AB8B7DA941 /* LoginResult.swift */, + AA223D0FE8AB8C08C706B85A469FBFCB /* Support Files */, + ); + name = FacebookLogin; + path = FacebookLogin; + sourceTree = ""; + }; + 5C01DB0CE45C398F2CC7D066BEC78F87 /* Support Files */ = { + isa = PBXGroup; + children = ( + BAFD8A55BAC904846AFDDF285139C95B /* FacebookCore.modulemap */, + CD4D68CD17DC3BBEDDC1D15F35351FC7 /* FacebookCore.xcconfig */, + F0575992DC4D9911DD9BEBD28758C8D3 /* FacebookCore-dummy.m */, + 6BEC4120B2A0EB84053691DF455E4F40 /* FacebookCore-prefix.pch */, + A309F5CFAD1C525F46D765436B1F8962 /* FacebookCore-umbrella.h */, + 88B652EC4FB3C93824DE91B8A8A6D28C /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/FacebookCore"; + sourceTree = ""; + }; + 5C9057AF8E05B9DBEB4339B683829803 /* Pods */ = { + isa = PBXGroup; + children = ( + 4D4369BE6500B9AEEC3B9F704D988321 /* Bolts */, + F9E87831637EB9BDE1E5DE8B960326A8 /* FacebookCore */, + 53B421565633485ECE57270D367FA109 /* FacebookLogin */, + F339A52A218C5B871B25C1150D5474C2 /* FBSDKCoreKit */, + 9DC611CB9605CC5C95AF7EB88FF3C7CA /* FBSDKLoginKit */, + ); + name = Pods; + sourceTree = ""; + }; + 757C0D4C98BF34E65B13181BB1BD909B /* AppLinks */ = { + isa = PBXGroup; + children = ( + 4122323D13A47B0392496A36038E8205 /* BFAppLink.h */, + 18F8D6DE5BAB0900AFB9035F788D117A /* BFAppLink.m */, + 70803D1269ADB5B88886491F0A107BC7 /* BFAppLink_Internal.h */, + B49C1B51A4F8CD83A4E0F76A24AB93C5 /* BFAppLinkNavigation.h */, + 07CC757BB8A135EDCF929495184B8A4D /* BFAppLinkNavigation.m */, + C136E040D485DC612A5079BC5F5875F4 /* BFAppLinkResolving.h */, + 80DBD8F230DB3428F2668396F7331B4F /* BFAppLinkReturnToRefererController.h */, + 41E89AE5A2F82EAC24FB1A1EB204E02B /* BFAppLinkReturnToRefererController.m */, + CDEE3D64FBA2AFED63F91D1C41E05D5C /* BFAppLinkReturnToRefererView.h */, + C8F9B880AB350C83C6F1F96732ECAAA6 /* BFAppLinkReturnToRefererView.m */, + 262B177C6FF8B51B61CCCB67C8DCBBB7 /* BFAppLinkReturnToRefererView_Internal.h */, + 5D2DA4C8E75E84F6BE220E5A536A0013 /* BFAppLinkTarget.h */, + DC81A9D35C5C8E478DA12D7180F0B54D /* BFAppLinkTarget.m */, + 888EA34735AA4574DC7F4F977F73702D /* BFMeasurementEvent.h */, + 13774A590DCE4E404826237859DF9962 /* BFMeasurementEvent.m */, + 5809D826AF490B7F1B20FC8E1ADD0C72 /* BFMeasurementEvent_Internal.h */, + 2A64A93180E959D3C1E984064A56A259 /* BFURL.h */, + 4B18E5A48B0792808BA5AE7996898538 /* BFURL.m */, + C25FAE41DB0C1B34DEB4944258323481 /* BFURL_Internal.h */, + 4C5A6CD1DE4D9EB92493CFF2AE0BA65A /* BFWebViewAppLinkResolver.h */, + 3A09BBEB7FA6FA1B0B8FA3624A5008AE /* BFWebViewAppLinkResolver.m */, + ); + name = AppLinks; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + A2E7CF255DF9C0B2B68E17AF83E38908 /* Frameworks */, + 5C9057AF8E05B9DBEB4339B683829803 /* Pods */, + 211B606AEAFAAB6699B921265FECEC50 /* Products */, + 2C3DA95FA661678BFAFF77CEF396CECA /* Targets Support Files */, + ); + sourceTree = ""; + }; + 9DC611CB9605CC5C95AF7EB88FF3C7CA /* FBSDKLoginKit */ = { + isa = PBXGroup; + children = ( + DD82114FE772AE114C3F202312D6508E /* _FBSDKLoginRecoveryAttempter.h */, + CBEAAF5625F4DC5F754D95D608FA5F54 /* _FBSDKLoginRecoveryAttempter.m */, + 4E3846D343E80CEB87CF9BFDFC980538 /* FBSDKDeviceLoginCodeInfo.h */, + 5FD5BC8E42321F4EF29A35368D4C7D08 /* FBSDKDeviceLoginCodeInfo.m */, + 6800F2B2A26092393CF160498E1AC179 /* FBSDKDeviceLoginCodeInfo+Internal.h */, + A5854EE903373AB4CA04BC00FB4DAF75 /* FBSDKDeviceLoginManager.h */, + D49DD372CBA3494261D474403471894E /* FBSDKDeviceLoginManager.m */, + 8727DC3E9D658A1257BB80C691F6AC6E /* FBSDKDeviceLoginManagerResult.h */, + 6336A21020CE6493E4B67A4521F275F8 /* FBSDKDeviceLoginManagerResult.m */, + 3159E9A22BE259EF934DC7CFB03ABADC /* FBSDKDeviceLoginManagerResult+Internal.h */, + D3A876B1E35D3E0CF594219303084E5A /* FBSDKLoginButton.h */, + 03426966A2C6CC95A56D3FFF84DDE422 /* FBSDKLoginButton.m */, + FAFAEBD073E9A4F0489A95209FA6646D /* FBSDKLoginCompletion.h */, + C1F634BB4EAB39C6CAC69641F45B0230 /* FBSDKLoginCompletion.m */, + 7FF74577E9533ED83CEA3EFF57B45BD8 /* FBSDKLoginCompletion+Internal.h */, + AD72B034D91FFF4FC30C9177D412A80B /* FBSDKLoginConstants.h */, + A3859C116A6CE2C05D14F9ED86CEAB54 /* FBSDKLoginConstants.m */, + 66A66BED0939FB8D6118D647DD8E253B /* FBSDKLoginError.h */, + 43224DF54EC5DAD85AD52774ECE7EBE1 /* FBSDKLoginError.m */, + 285CE606A8DDD9CE4CC82E79D455B7D3 /* FBSDKLoginKit.h */, + 6C36EDD7EAB01DBE66E13CC551FC468A /* FBSDKLoginKit+Internal.h */, + 235BE672B5D832598057684ADFB3A248 /* FBSDKLoginManager.h */, + 2B57A6399449DA6F0BC848997660F7DA /* FBSDKLoginManager.m */, + 72F49635737C28FF652052238D3CF25D /* FBSDKLoginManager+Internal.h */, + 4D856B32878CF155E6E4CB78AF143180 /* FBSDKLoginManagerLogger.h */, + 16494F59C307A386B8DC2E3F08606D22 /* FBSDKLoginManagerLogger.m */, + C8FFFB3AAD4500FC7B5285D003B73ECA /* FBSDKLoginManagerLoginResult.h */, + B51B6E7A2807B73D9ED72471ACC3AE95 /* FBSDKLoginManagerLoginResult.m */, + 7D7B504FF4C1F7EEDB8AABA9C07A60F7 /* FBSDKLoginManagerLoginResult+Internal.h */, + 4046826AE70D9501BD9C197763055674 /* FBSDKLoginTooltipView.h */, + 3C1005FB8E45E21431F9B28311EF0ED2 /* FBSDKLoginTooltipView.m */, + 8206DFFBD6ACDD0175B4360BD7CC5082 /* FBSDKLoginUtility.h */, + 9C518BFECA0DB0388E8906DF648169E1 /* FBSDKLoginUtility.m */, + 59B98067869D7376683D02CBB745AF16 /* FBSDKTooltipView.h */, + CA490C701DE1DB47E50D89315A67B2A8 /* FBSDKTooltipView.m */, + BD0593A8F58C669EBC0EA3AA15AFE00D /* Support Files */, + ); + name = FBSDKLoginKit; + path = FBSDKLoginKit; + sourceTree = ""; + }; + A2E7CF255DF9C0B2B68E17AF83E38908 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 419995ECFFCD9828A3937FCC43EA8F41 /* Bolts.framework */, + 01C1D1A8B513DA5E08BD8F766BA47401 /* FacebookCore.framework */, + 8AD401534246B014683F7A038308FE9B /* FBSDKCoreKit.framework */, + 204430D013CE1451DF1FA2EB5F892E85 /* FBSDKLoginKit.framework */, + D053B15973AF296E037A3C0896227F9B /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + A670AE31374391C854FBBA3DEED523F3 /* Pods-FirebaseFacebookUITests */ = { + isa = PBXGroup; + children = ( + 2648ED509B47354ACD023A200C4C58E0 /* Info.plist */, + 478C12DE33F0BF979D74075C537E8768 /* Pods-FirebaseFacebookUITests.modulemap */, + F3FF8A84B8D7DA51E382661CC5E9C138 /* Pods-FirebaseFacebookUITests-acknowledgements.markdown */, + 243DC533EA82A1573CA9D17F32C85D4B /* Pods-FirebaseFacebookUITests-acknowledgements.plist */, + 89C5D51A0A9DD752ED4D43CADD15BFB1 /* Pods-FirebaseFacebookUITests-dummy.m */, + 88482F5F3C430A1354D5462FF27C77B9 /* Pods-FirebaseFacebookUITests-frameworks.sh */, + 0173031E1C3F43480A1A8FE25E7B18BE /* Pods-FirebaseFacebookUITests-resources.sh */, + B7D253DEF14B8D6D8E6593BACBDD8B17 /* Pods-FirebaseFacebookUITests-umbrella.h */, + D6E44C456B581AA10AD641783BD15CC7 /* Pods-FirebaseFacebookUITests.debug.xcconfig */, + 39E094A6919E8B9D2A7BBC0C11B573C8 /* Pods-FirebaseFacebookUITests.release.xcconfig */, + ); + name = "Pods-FirebaseFacebookUITests"; + path = "Target Support Files/Pods-FirebaseFacebookUITests"; + sourceTree = ""; + }; + AA223D0FE8AB8C08C706B85A469FBFCB /* Support Files */ = { + isa = PBXGroup; + children = ( + CE158197B91B244B864DAAD833D02AB8 /* FacebookLogin.modulemap */, + E525CABA83B57960C8373F7724B66BD4 /* FacebookLogin.xcconfig */, + A9E0A2C0AE9A8955970495F9F47AB6FA /* FacebookLogin-dummy.m */, + 60486663C1B7C513217BCEA38C069234 /* FacebookLogin-prefix.pch */, + 82526418E9EA5F73EE0A80B274AA3BC0 /* FacebookLogin-umbrella.h */, + 2BD4BA4EAC43C8598AD01413A7C2ACA4 /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/FacebookLogin"; + sourceTree = ""; + }; + BD0593A8F58C669EBC0EA3AA15AFE00D /* Support Files */ = { + isa = PBXGroup; + children = ( + 6024E37C0692D6728C9ECFD2E501BEDB /* FBSDKLoginKit.modulemap */, + 5F6FA8ED2133C53670D39F798BA10347 /* FBSDKLoginKit.xcconfig */, + 72F148335C273159553C9E1B0B71C7C0 /* FBSDKLoginKit-dummy.m */, + 4857AB39D3FBEEC0C62E68E1BE05AC24 /* FBSDKLoginKit-prefix.pch */, + 080FDF9149E53349A34ABF2116B90340 /* FBSDKLoginKit-umbrella.h */, + DF6DC1A56CD732E4053384702A21B21B /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/FBSDKLoginKit"; + sourceTree = ""; + }; + D053B15973AF296E037A3C0896227F9B /* iOS */ = { + isa = PBXGroup; + children = ( + E039106125081C0B5EC75936CF35AB0B /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + E230F743C7AA19CF38995A00154AEEBF /* Pods-FirebaseFacebook */ = { + isa = PBXGroup; + children = ( + C27CA44DB37F3B8DB139CE6E67A79F2B /* Info.plist */, + A07966A62A99E51FD2FB27557809647C /* Pods-FirebaseFacebook.modulemap */, + B2ACC55873264B544CC282544FAB92D8 /* Pods-FirebaseFacebook-acknowledgements.markdown */, + A4F06414F34836CABCFFCD690B32AC8E /* Pods-FirebaseFacebook-acknowledgements.plist */, + 8F138D95F9F32235B6D185C288B0EF35 /* Pods-FirebaseFacebook-dummy.m */, + 14957DC0DE2FF0DAAE5D65D2940858A3 /* Pods-FirebaseFacebook-frameworks.sh */, + 51FE8E7ADFC1EC7C12668182E3927C7B /* Pods-FirebaseFacebook-resources.sh */, + F51259B40DCF1C61C67006463219DDD3 /* Pods-FirebaseFacebook-umbrella.h */, + 74ABDE7975AD089FF496EF473E3D7AA2 /* Pods-FirebaseFacebook.debug.xcconfig */, + 796BE7C946481798682826B6849016BA /* Pods-FirebaseFacebook.release.xcconfig */, + ); + name = "Pods-FirebaseFacebook"; + path = "Target Support Files/Pods-FirebaseFacebook"; + sourceTree = ""; + }; + EFDB4E06CB06F6BCC1A34BF27A68043B /* Pods-FirebaseFacebookTests */ = { + isa = PBXGroup; + children = ( + 0A6F81D0D88BA948A131EA706419D17B /* Info.plist */, + 985417EA9600A120B7E62C8D4AEDAA3D /* Pods-FirebaseFacebookTests.modulemap */, + 08B14874B0E62408065B8C0C1B3DB947 /* Pods-FirebaseFacebookTests-acknowledgements.markdown */, + 8C5C4CD14931DEF7BFBBA735D760CDBC /* Pods-FirebaseFacebookTests-acknowledgements.plist */, + 1B1ADAADBF8F8EF6D30EE86D132E8FAF /* Pods-FirebaseFacebookTests-dummy.m */, + 2E3CD1470512A8A5E34779D5EEDEEEE8 /* Pods-FirebaseFacebookTests-frameworks.sh */, + 338AE6F93FA2DB6E7F409FB3192D857E /* Pods-FirebaseFacebookTests-resources.sh */, + 2BD39BDF978EB5365CB2B0B4F6565F21 /* Pods-FirebaseFacebookTests-umbrella.h */, + DC146E6DAFA6F2CFF226580020EF2365 /* Pods-FirebaseFacebookTests.debug.xcconfig */, + 64E5A59C8B19340228761E0685414458 /* Pods-FirebaseFacebookTests.release.xcconfig */, + ); + name = "Pods-FirebaseFacebookTests"; + path = "Target Support Files/Pods-FirebaseFacebookTests"; + sourceTree = ""; + }; + F339A52A218C5B871B25C1150D5474C2 /* FBSDKCoreKit */ = { + isa = PBXGroup; + children = ( + 1CE16F53157A7FECA312DE0CEBEAE7F7 /* _FBSDKTemporaryErrorRecoveryAttempter.h */, + 500D2406916FB32BB5BFF17C434FAFFF /* _FBSDKTemporaryErrorRecoveryAttempter.m */, + A1D0A680121F763405A39A5A9C59CCAD /* FBSDKAccessToken.h */, + 5BC9A6EC951C13228E2A7E729B1EE38B /* FBSDKAccessToken.m */, + F80A6A12E4650285D36A1F08431123D3 /* FBSDKAccessTokenCache.h */, + 48129F2DF8D6078BE5CAEE75EEBEC4FD /* FBSDKAccessTokenCache.m */, + C2B21CFD10C228275797A9BE045F1C62 /* FBSDKAccessTokenCacheV3.h */, + 93ED28F7262E6362F3C4F7572CA4AFFB /* FBSDKAccessTokenCacheV3.m */, + 54958EBB4CE557FCD1D9957CD44DE3E2 /* FBSDKAccessTokenCacheV3_17.h */, + 18A84310D38F8B95AFC3F8E9A550C16D /* FBSDKAccessTokenCacheV3_17.m */, + BDF1BC1277039F9F875A7A0FC77B0F69 /* FBSDKAccessTokenCacheV3_21.h */, + 44E0DEC59529AAB006B6DA3151BBC56B /* FBSDKAccessTokenCacheV3_21.m */, + DD29DE9F60DC273B9A5C29EF49BE8340 /* FBSDKAccessTokenCacheV4.h */, + B05479925008D2BF096F87D8F13B3B04 /* FBSDKAccessTokenCacheV4.m */, + D588C69EDC10372A11B58993B951BDC0 /* FBSDKAccessTokenCaching.h */, + C8AC5FB43AC65A6315CA1A116362CAF9 /* FBSDKAccessTokenExpirer.h */, + 76CCFE3BEF22D7DA0CD362C5A41AA0A1 /* FBSDKAccessTokenExpirer.m */, + 6A37F122AA1ACF634EF5CDA9308A41FB /* FBSDKAppEvents.h */, + DFE7AE824015437D6F413F207B1CAADA /* FBSDKAppEvents.m */, + CFB9E6762417F3E09BC213BA3F5C1B64 /* FBSDKAppEvents+Internal.h */, + 7EF4191DBAC9F54ED977E9768A551EF7 /* FBSDKAppEventsDeviceInfo.h */, + D919921B742833D129A26696254B547E /* FBSDKAppEventsDeviceInfo.m */, + FAB1F1FAD6B53ABBDD1D17B0EFA473CE /* FBSDKAppEventsState.h */, + A7FF088CA9018D07B73FDF3A7E74E660 /* FBSDKAppEventsState.m */, + F4EE392243C84B0B176AC7D8438A3E0B /* FBSDKAppEventsStateManager.h */, + EECAB8CCD1C7578176B5D1482ED766E8 /* FBSDKAppEventsStateManager.m */, + ACBADAA6DCD285B6E4579FE96811548C /* FBSDKAppEventsUtility.h */, + 8C9D8AF925D1BA2D636D73BB3FB86B2E /* FBSDKAppEventsUtility.m */, + 34BD021657BFF30318B56235BD1B4809 /* FBSDKApplicationDelegate.h */, + 9D63183A1B1C7FBF7B2BD7D091C591C7 /* FBSDKApplicationDelegate.m */, + C81482D3691E414A7290D7FA7B4E1D23 /* FBSDKApplicationDelegate+Internal.h */, + A53E48D566E078C111A90ACB28CB9BE6 /* FBSDKAppLink.h */, + 1F555D4B07FA80E66EBDE7DC1EC2BB2C /* FBSDKAppLink.m */, + CE9763CC6817F022E29B52DBC4AB1D94 /* FBSDKAppLink_Internal.h */, + 3A6BFDA1C43824235592F8244419B702 /* FBSDKAppLinkNavigation.h */, + 21BC737718AECE8F072C7751B6F365D2 /* FBSDKAppLinkNavigation.m */, + 42DCD47143D7A7F81E7B14F0677786D7 /* FBSDKAppLinkResolver.h */, + B1EA2B5AC5A737699DA9DBD7BDFA25EB /* FBSDKAppLinkResolver.m */, + C9D43EAE5481C8F331A6B65AA9FC88CF /* FBSDKAppLinkResolving.h */, + 07F0EBFF83E0E3D91DB1BC3A7BE02DD1 /* FBSDKAppLinkReturnToRefererController.h */, + 75160081AE8C4E14A74F6F575C3BC1CE /* FBSDKAppLinkReturnToRefererController.m */, + D39B798959A8843588079617C7BAD560 /* FBSDKAppLinkReturnToRefererView.h */, + FCEA4B1E1425F3E0A0F8238073B6CA5E /* FBSDKAppLinkReturnToRefererView.m */, + C6B4CEC742828D8414EB2385220750F3 /* FBSDKAppLinkReturnToRefererView_Internal.h */, + DF14CF83B18F464FF3EED94BBAB30F60 /* FBSDKAppLinkTarget.h */, + 437637CA4E9EB48CBCE3CE6763BB284B /* FBSDKAppLinkTarget.m */, + D45E6164CC3352856CA53D40EA09E8AB /* FBSDKAppLinkUtility.h */, + C96B6FE17CDB3AEEED9EF5CB531FFDE6 /* FBSDKAppLinkUtility.m */, + 574C93BC6CB90F856C1BDA0DEE80C65D /* FBSDKAudioResourceLoader.h */, + A04891767E0201B5351B2C4976989CE2 /* FBSDKAudioResourceLoader.m */, + 5A52CF09EDC435AB4C0E6C6B80F17DE6 /* FBSDKBase64.h */, + BB4E1694A0F3CA4C437482A99E1EB422 /* FBSDKBase64.m */, + 9EEB1ADA1399BDF8189396CC0B0B3A06 /* FBSDKBoltsMeasurementEventListener.h */, + D26B517EAD97A8CF5D1CFFDFC9E58D18 /* FBSDKBoltsMeasurementEventListener.m */, + F3FC58548E44926F631FC2A8F807D710 /* FBSDKBridgeAPICrypto.h */, + FBA21E4FE17D9BDD2E6400D7CF67F052 /* FBSDKBridgeAPICrypto.m */, + AE148327F572476FCADE4E845B3BC9F1 /* FBSDKBridgeAPIProtocol.h */, + AFF88408E108181C1F206F5A3D8D74E3 /* FBSDKBridgeAPIProtocolNativeV1.h */, + D9DBD0D8C4E85414354E3DA5629C83EA /* FBSDKBridgeAPIProtocolNativeV1.m */, + 2BDC323EE51667D974FBF07B3AA3DAF4 /* FBSDKBridgeAPIProtocolType.h */, + CD3C0C337BF5128DC67D82F58E1CD8B3 /* FBSDKBridgeAPIProtocolWebV1.h */, + 766E593CE56CD82B0DE52F1CFAF3B901 /* FBSDKBridgeAPIProtocolWebV1.m */, + 90C6813EE85691FDE9E4E877A5387FBA /* FBSDKBridgeAPIProtocolWebV2.h */, + FB743AD6C0A7205C001AAD14611B4576 /* FBSDKBridgeAPIProtocolWebV2.m */, + D1CF000AADE920FD4875CF67539B26EB /* FBSDKBridgeAPIRequest.h */, + 7177FFB0CC66C2F45EF1452219DE640E /* FBSDKBridgeAPIRequest.m */, + D32ECDAA1E8E8F7C88E4FDDF83D11625 /* FBSDKBridgeAPIRequest+Private.h */, + 72A68A86707E2712D9979207A2B6C1B5 /* FBSDKBridgeAPIResponse.h */, + 6F1406A54D2780F66960BFD6C78D65CF /* FBSDKBridgeAPIResponse.m */, + D00D56DCEE5E634E0D19886002C9872B /* FBSDKButton.h */, + A372166948941B4A0137DB96C2F0A0B5 /* FBSDKButton.m */, + 508684BFB52B9D5C59893D5F163EBB4A /* FBSDKButton+Subclass.h */, + 91C6D8038755CCB150C24666E4E1B6C2 /* FBSDKCloseIcon.h */, + F9A15EB5D734DEEE5301586381E27C32 /* FBSDKCloseIcon.m */, + 8FEEB51211E5338A3D5EE865CB925E0C /* FBSDKCodelessIndexer.h */, + CB5D96E7448BAC84C4C1E20A2977DD3A /* FBSDKCodelessIndexer.m */, + D4F13E7B4359C11837D1BD13FCCD96F2 /* FBSDKCodelessMacros.h */, + 6B3CD6B3A7D5D891FEC7B475932BBC1B /* FBSDKCodelessParameterComponent.h */, + 1B28FAABF7AEE7B5911433B36655064F /* FBSDKCodelessParameterComponent.m */, + 9138D93B3014EAE5160367E06497DBF7 /* FBSDKCodelessPathComponent.h */, + 7F5E990956288A27C71F6B314D89D47C /* FBSDKCodelessPathComponent.m */, + 551D5A76159ABA66FF300C87A600B56C /* FBSDKColor.h */, + 64500E4F9EC168605BF274FF911799BC /* FBSDKColor.m */, + F18D45C77E07DA8FAD24A1D9B48CDE6C /* FBSDKConstants.h */, + 90CBCB02EBF0A97CFAA6A138CD9DB025 /* FBSDKConstants.m */, + 18754BB8FE565D9A2E55B9C52D0E1A0E /* FBSDKContainerViewController.h */, + 97BCFD43D7B4E914A1679DC55242A5F3 /* FBSDKContainerViewController.m */, + 55103A354CFB38CA8F79D4F02ED9F5F4 /* FBSDKCopying.h */, + 4B0A0DF1A607853D4F45A638BFF49F79 /* FBSDKCoreKit.h */, + F960ABAAEB40A32FCFAFE6A7DF774083 /* FBSDKCoreKit+Internal.h */, + D6DE8A857EE2449C8542BB3D1B98B254 /* FBSDKCrypto.h */, + C5834D25320E9EF30710132BCA0F2675 /* FBSDKCrypto.m */, + 8D762D9DCA27F47BED5C50990CE7E953 /* FBSDKDeviceRequestsHelper.h */, + FD5DE46B1410494DAAC27BFAFFC61434 /* FBSDKDeviceRequestsHelper.m */, + 9914F308A21DC78AC5BD571AA96AA840 /* FBSDKDialogConfiguration.h */, + CEF393AABD76AE0929B837F2998993A0 /* FBSDKDialogConfiguration.m */, + 4F2DF17B1CB0DE2852A8D2DBAFD9499D /* FBSDKDynamicFrameworkLoader.h */, + DD8015CDD3D0926AED26D08343366DE9 /* FBSDKDynamicFrameworkLoader.m */, + 974F91CAFC2986D8C530D5B9A8A31235 /* FBSDKError.h */, + F0CAD9103EAFEB61BA931197363A7B79 /* FBSDKError.m */, + B5FE03B932C29FEC3A8BDA1CD1A7BC2A /* FBSDKErrorConfiguration.h */, + 1FE2CE1691EB8FCD562A927750B5F9EC /* FBSDKErrorConfiguration.m */, + 5FB12D40B0E47271C94A72F7FE50484B /* FBSDKErrorRecoveryAttempter.h */, + F4C3F281790DBB4E8AC29B4CCB33760B /* FBSDKErrorRecoveryAttempter.m */, + C3BDC625D9FAA6DD420C832C2CE18384 /* FBSDKErrorRecoveryConfiguration.h */, + C3CE4CCE2DA2AA4CD3590647E839C28B /* FBSDKErrorRecoveryConfiguration.m */, + 818221DD2890735F106BF6171CD90410 /* FBSDKEventBinding.h */, + 8AAE70DBB6B225D1520AEDEF4AF2A6E7 /* FBSDKEventBinding.m */, + 8BADE1E77178E394700199FCD1A0F68A /* FBSDKEventBindingManager.h */, + 9A3281A4424598C2D800FD1F0DB68DD6 /* FBSDKEventBindingManager.m */, + 2B6A4F1ADD9CC21860DBD7945DB4C59F /* FBSDKGateKeeperManager.h */, + 3EFE44A9F51381B04CD51D6CDB0C0C5D /* FBSDKGateKeeperManager.m */, + AC3F73CBCC3CD4E32CD5B2323A6C098F /* FBSDKGraphErrorRecoveryProcessor.h */, + ACF69CA922181130868433E106634488 /* FBSDKGraphErrorRecoveryProcessor.m */, + 36C362E809BFDB0F79E2E39D9D576A4D /* FBSDKGraphRequest.h */, + F7E0BE1C1FCCFECB2934EE101C7003F7 /* FBSDKGraphRequest.m */, + E103B0D4BBE43282A5FA5FBC625FED75 /* FBSDKGraphRequest+Internal.h */, + 634DA8B25943814D074830288CD2D23C /* FBSDKGraphRequestBody.h */, + A2A54FF4B6015F32C352228C585B5744 /* FBSDKGraphRequestBody.m */, + D49590CD4CE7520BD3349F78F31D24C9 /* FBSDKGraphRequestConnection.h */, + 4BE20169CF16E55E7FAE321AAADD19F8 /* FBSDKGraphRequestConnection.m */, + 036C02FD7710A186D011F91E217F0FC4 /* FBSDKGraphRequestConnection+Internal.h */, + 566635E66501C376615ED896BE84D6AF /* FBSDKGraphRequestDataAttachment.h */, + BBC1E4C79B04C9FF79A57EE8D624CAFF /* FBSDKGraphRequestDataAttachment.m */, + FD02F70969FFAC6048E3A68C2C6E7B86 /* FBSDKGraphRequestMetadata.h */, + 7180A7CD963BD168F047FAABA580D433 /* FBSDKGraphRequestMetadata.m */, + 962DB8E603E7E2D0C1F2215E93550848 /* FBSDKGraphRequestPiggybackManager.h */, + 6E372B90109D9ED8B6E7BE6380F567C1 /* FBSDKGraphRequestPiggybackManager.m */, + 3A202ECEC2738B56C1FF5F6D18834421 /* FBSDKHybridAppEventsScriptMessageHandler.h */, + 624997EE99258B4AE2E35E76F1083B14 /* FBSDKHybridAppEventsScriptMessageHandler.m */, + BFB13358DE17BF488D862279C58A1AF0 /* FBSDKIcon.h */, + 00F2B5F33793E1AB369B4B2EB52EFB2F /* FBSDKIcon.m */, + A5BDADD2E28AC3151EBF4513B514C01E /* FBSDKImageDownloader.h */, + 0A021C9B0EF3E3BB9B4FB51B43899C2E /* FBSDKImageDownloader.m */, + AC4F516BCF19DCCBC1C68949EEFCA454 /* FBSDKInternalUtility.h */, + CDD371832057051B070A360AD037809B /* FBSDKInternalUtility.m */, + 5DE2E49C6F517EDC0F6CCEE8AFD0F82B /* FBSDKKeychainStore.h */, + 4CEEB70E69C5DC328FCF02868C80588C /* FBSDKKeychainStore.m */, + 50DAB0DE0F930A5186BC9D6F63E01D89 /* FBSDKKeychainStoreViaBundleID.h */, + 96592F50C3B97805DB5A36FE234F3AD1 /* FBSDKKeychainStoreViaBundleID.m */, + F05DB6AF3AAB3EE955C2F088604050CB /* FBSDKLogger.h */, + 65E70D0017D39D26B459F22371EE2031 /* FBSDKLogger.m */, + D5F026FB8682B880E1E59A57F77A103E /* FBSDKLogo.h */, + F922E548BDE81C7086DB32B2CB3E8982 /* FBSDKLogo.m */, + 90876590F1542E01A9620D2866328EC3 /* FBSDKMacros.h */, + F53A5CFEE4C10BAB0BCD13FD80144B88 /* FBSDKMaleSilhouetteIcon.h */, + EA2130A517470A0B098259342AE1A936 /* FBSDKMaleSilhouetteIcon.m */, + 43D5DC1E7B96BCA4C3BE1F1F7461EAA6 /* FBSDKMath.h */, + 1A838494884BBD278C9C8FD8A1FA9209 /* FBSDKMath.m */, + E71F06DAC1ACFB29BAFE9B341A100D56 /* FBSDKMeasurementEvent.h */, + 13F06BB2F400742BCC521EA52F38A869 /* FBSDKMeasurementEvent.m */, + 825EDEC34EA2DD2DAA89EDD32C11172F /* FBSDKMeasurementEvent_Internal.h */, + 68AB049331A1392A3ED84FFD3CDB3A86 /* FBSDKMonotonicTime.h */, + 2F4908118C442D517E1CD82F30A7673D /* FBSDKMonotonicTime.m */, + A7F6CFEEB0C3D9A3B4FFBDBC1FDCBAFF /* FBSDKMutableCopying.h */, + 1F6AFB9EE426471F9878A9E87D758D17 /* FBSDKPaymentObserver.h */, + E2E6EACD9FCDC562690B3C02B6BDE9A7 /* FBSDKPaymentObserver.m */, + 8150BAF9D1CD23158A7DB3C79B0109C8 /* FBSDKProfile.h */, + 7AF0C501C630830EC4B5DF71601062E4 /* FBSDKProfile.m */, + 10E12239F1746A09FA0557B85CE03B99 /* FBSDKProfile+Internal.h */, + 86E693368BBE327350C8200163AE82FA /* FBSDKProfilePictureView.h */, + 45EC9391454286EDEFC8DF04998C9B5F /* FBSDKProfilePictureView.m */, + 5F24BEAE66928E93498FD1FC35558946 /* FBSDKServerConfiguration.h */, + E39BA86FD462FB47FFDF52F03D0DD00B /* FBSDKServerConfiguration.m */, + F101D72B1017C65C091D4F86F9DBCD35 /* FBSDKServerConfiguration+Internal.h */, + B485EA057B27512FE1A27D1A9231C81A /* FBSDKServerConfigurationManager.h */, + DEECF92B92ADBCCAC7D4527D7DAF9678 /* FBSDKServerConfigurationManager.m */, + D1CFE1943D0C9BDA88C2553BB45C4BF5 /* FBSDKServerConfigurationManager+Internal.h */, + 57F991D4E6E2B0B252E7C36113A2E345 /* FBSDKSettings.h */, + B4363CBA765EEF807988F70DC38F50B6 /* FBSDKSettings.m */, + 20E1A868B08F99B5BCA4EB104A8A347A /* FBSDKSettings+Internal.h */, + ACADDC7CD7ED899576C70149BC64F7B8 /* FBSDKSwizzler.h */, + B0631E10EBC97CD9CAF2F5492651BC24 /* FBSDKSwizzler.m */, + 4C4BBDCFFBAED2B5125DCA0EF3DA0763 /* FBSDKSystemAccountStoreAdapter.h */, + 32137B6B317C2F710879E7B153E1E28F /* FBSDKSystemAccountStoreAdapter.m */, + 5D7BB1BA6543EF77E98E8C1E2EE4E4DA /* FBSDKTestUsersManager.h */, + 108C8E190CCC474C7F8DE9CB44745612 /* FBSDKTestUsersManager.m */, + 290DB4CC76FBEA3DBC945D31E6101FE7 /* FBSDKTimeSpentData.h */, + DD7CA2F5D71DE02DFC1E2F90C06B759F /* FBSDKTimeSpentData.m */, + 57C2D45CB3D2809A8B17C80E4E422F48 /* FBSDKTriStateBOOL.h */, + 0E937589E0646B44063C1F5C0C984B57 /* FBSDKTriStateBOOL.m */, + 90554790C14FD77A55F208E389F60D21 /* FBSDKTypeUtility.h */, + 35A090A460C804819113BE3689264673 /* FBSDKTypeUtility.m */, + 73A233A2F8588AAB75A32CFC1646D1DB /* FBSDKUIUtility.h */, + F348A070247702C9E77CF301D0730BF7 /* FBSDKURL.h */, + A14E0460928F8BF4822273D3A7BB054F /* FBSDKURL.m */, + A97D7E745468B5A9CAC25746EF54EA4F /* FBSDKURL_Internal.h */, + D7D3B94D90F1EB7352622ECC5659FC20 /* FBSDKURLOpening.h */, + 36A0C4639EF2EB2FC3EB2EBEAA8763B9 /* FBSDKURLSessionTask.h */, + 08BE087D58E8AB263FE0190B9BE6F8E6 /* FBSDKURLSessionTask.m */, + 93515A6DE062C65528B6151B44DB9892 /* FBSDKUserDataStore.h */, + 883C9603A179C10412293301BB5DFB24 /* FBSDKUserDataStore.m */, + 76FC789005E45BCB003369E558662C02 /* FBSDKUtility.h */, + 06B036555D7FF3F3BFAC7F253BE14C33 /* FBSDKUtility.m */, + 3B4B00B057D64B3A8A5EFAAA83FB2E29 /* FBSDKViewHierarchy.h */, + E588E2C51BEF7AD7D9180235C5A0DAD3 /* FBSDKViewHierarchy.m */, + A3A931E3C1D460AD4514752135484BF0 /* FBSDKViewImpressionTracker.h */, + 667FC5CBA845F1EE55EC2DDEC19F106C /* FBSDKViewImpressionTracker.m */, + 42D35AF347118FAA295ED95428EDC8D6 /* FBSDKWebDialog.h */, + 080DA838485EA5271F2A646D6854F625 /* FBSDKWebDialog.m */, + 9DED741CAACFE9EC7386A4CEEBE378C7 /* FBSDKWebDialogView.h */, + 00A9890D1CE1182CA8ECA91DE6590015 /* FBSDKWebDialogView.m */, + B8FC063A6581DE33C8844453BAE637B5 /* FBSDKWebViewAppLinkResolver.h */, + A745231B41B0C4572F1F537C7B9A5913 /* FBSDKWebViewAppLinkResolver.m */, + 5194BCC7EE8F7EF6FA6A8D75319C3A3F /* Resources */, + 4983E3B29A9A5F2787B0E04507986258 /* Support Files */, + ); + name = FBSDKCoreKit; + path = FBSDKCoreKit; + sourceTree = ""; + }; + F9E87831637EB9BDE1E5DE8B960326A8 /* FacebookCore */ = { + isa = PBXGroup; + children = ( + 24420724F01C19ACBEAB9F0E88E470A8 /* AccessToken.swift */, + 488890756EAF6D6CA6A5781BAC2DEF79 /* AppEvent.swift */, + 65ABB842B40570F4AA0A0F6DADF3EFC8 /* AppEvent.Builtin.swift */, + E6F04EE6BF31E716FBA28D676C46A34E /* AppEventName.swift */, + 1A1052ECA47925DB39161D66F7C7D025 /* AppEventParameterName.swift */, + 1CB5510D98FAD5030D71F6F8C6B64D20 /* AppEventsLogger.swift */, + BAD529531F86B66B6E4858DB8D215938 /* AppEventsLogger.FlushBehavior.swift */, + BF68EFF662855493828C51A3FEF684DF /* Dictionary+KeyValueMap.swift */, + 506F678893E0B99FEA2B9C80CA7002BC /* GraphAPIVersion.swift */, + 167D6846DFBA0A58EA9AE2BB773DB052 /* GraphRequest.swift */, + DE3241E14BFC8824D49D2210C5E7B46D /* GraphRequestConnection.swift */, + 96C5B960E36A0EEE53764285037E50E0 /* GraphRequestConnectionDelegateBridge.swift */, + 1A57EF173E4DAFB9C352F18D7D72A722 /* GraphRequestDataAttachment.swift */, + 4CBAE8CF44FF29CE91439BCA91FB4CA7 /* GraphRequestProtocol.swift */, + 241DFB105BD5F1824A244549AFC77D31 /* GraphRequestProtocol.Bridge.swift */, + 82A6A78BE914BA436BFD6DF88C61C82B /* GraphRequestResult.swift */, + 55A7006BEB2D9185B72EFED41BFDF4AA /* GraphResponse.swift */, + 29F91F7115BD3894327D53747D147B6E /* GraphResponseProtocol.swift */, + DAD2BA1020E28B0D93984586FB4D84BF /* Optional+OnSome.swift */, + F0CA7C0798A153B675A5388271CC7C04 /* Permission.swift */, + BFA44EA3B0830A3C08AC12E5E9F27A75 /* PublishPermission.swift */, + 1AE5B86C3C82964117C6526DE84BF3F0 /* ReadPermission.swift */, + D703AF3B5AA51B1BFE9DD846387CBCCA /* SDKApplicationDelegate.swift */, + 4C5DCA947D8FFFA5795F95F89E975537 /* SDKLoggingBehavior.swift */, + D48E00A0C8F23920BDE678AAF743BA66 /* SDKSettings.swift */, + C3EC3FFE1F66DCBF5A5EC2ACB4A80B1B /* UserProfile.swift */, + AB1E03597ACC0F3DB46F8D1810A528D9 /* UserProfile.FetchResult.swift */, + 8C96AD04EF07191B9D21F613334AD704 /* UserProfile.PictureView.swift */, + 5C01DB0CE45C398F2CC7D066BEC78F87 /* Support Files */, + ); + name = FacebookCore; + path = FacebookCore; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 08601EF6291D4568694D6AF52F646512 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + EB9CD84E424D94E8D6B4E30F6EB04B6C /* BFAppLink.h in Headers */, + 28523FC9D0B141D4DA15E04AD71C2EB2 /* BFAppLink_Internal.h in Headers */, + E45F601C9D7B25B3719908938B5AD46C /* BFAppLinkNavigation.h in Headers */, + 908C503123B7415DB5777ECBC81B6BEC /* BFAppLinkResolving.h in Headers */, + 38C883E92F87F2FBC5368E7509832C9C /* BFAppLinkReturnToRefererController.h in Headers */, + 86FBEB3BD444B5C55B842A40F9B893EE /* BFAppLinkReturnToRefererView.h in Headers */, + E5DC7038BD95295EB8C25618C6C749A9 /* BFAppLinkReturnToRefererView_Internal.h in Headers */, + 56044AA6F653CE2E27FEB0B0BFE801F5 /* BFAppLinkTarget.h in Headers */, + 0F9F47F45AFFEAE2E493A66DF0E022CA /* BFCancellationToken.h in Headers */, + 3F888AD30840AC0999B4E7227556FC59 /* BFCancellationTokenRegistration.h in Headers */, + 0BCA89EE19E79DBFA97ABC5316A39754 /* BFCancellationTokenSource.h in Headers */, + 78FE166D406504AAE46FB11C14F1BF27 /* BFExecutor.h in Headers */, + A4844515FB953F33B28FBDF62AA47717 /* BFGeneric.h in Headers */, + 610CC513736B2AB3A519B0BA7072C249 /* BFMeasurementEvent.h in Headers */, + A4627A0304C6FCFE8AF5A7D9C47CB6E6 /* BFMeasurementEvent_Internal.h in Headers */, + AE0F82EA1B209E49571FB4D7BE87960E /* BFTask.h in Headers */, + 9391322062A67966035A60FC5F5AB51C /* BFTaskCompletionSource.h in Headers */, + CC762FB99CB65B71C0172135C27E1DD1 /* BFURL.h in Headers */, + 1AD2A1F424C3F5E69574C297282C3CDF /* BFURL_Internal.h in Headers */, + 83138049E955D6ECAD9611F4AC734407 /* BFWebViewAppLinkResolver.h in Headers */, + 2E1103F21698CF31473709FE9DA7D88E /* Bolts-umbrella.h in Headers */, + 21FE3E686800DE7273A38C7D49441848 /* Bolts.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1FE9D81B8F1CE3C4F343AE2C76EB8978 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D28F5A88DB962EAA066F7D300A6B580D /* FacebookLogin-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4047FE7F92C36227484272AA1FD009CF /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 555103407C95EDB4A9BBF40E4F2583CB /* Pods-FirebaseFacebookUITests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 58ED161B574E347FDC0B70D453B3A120 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 99DA429F118B230FCB9379239608C931 /* _FBSDKLoginRecoveryAttempter.h in Headers */, + 29D00807B2A39FA7DEA69C7457B1D7E7 /* FBSDKDeviceLoginCodeInfo+Internal.h in Headers */, + 98F6D91FE7DA32F6713967FE14EEDF8C /* FBSDKDeviceLoginCodeInfo.h in Headers */, + 1C48281A8B1687738BFF007B6CD73263 /* FBSDKDeviceLoginManager.h in Headers */, + 8E7BD189BDEBFEB6202F533FB50ACC4C /* FBSDKDeviceLoginManagerResult+Internal.h in Headers */, + 41B4AF46CEC88ADB9E66609638A47EF9 /* FBSDKDeviceLoginManagerResult.h in Headers */, + 85D33B4C9C529E7303DE7E2D7A341BA0 /* FBSDKLoginButton.h in Headers */, + 95ABD183D52D54CD2460C4EFB326B716 /* FBSDKLoginCompletion+Internal.h in Headers */, + F1EF9646B9704428CADCC8B1F7D107EF /* FBSDKLoginCompletion.h in Headers */, + B5C056E7570B8312A1C9459BBFB42101 /* FBSDKLoginConstants.h in Headers */, + 1472B3C9BD8B244ABF98EB3BF04474E4 /* FBSDKLoginError.h in Headers */, + 77D4D2EADBC76131BE2D5AAE179C65CF /* FBSDKLoginKit+Internal.h in Headers */, + 74205DBD50EA723F44708B276288788E /* FBSDKLoginKit-umbrella.h in Headers */, + E0F6C6C9C81AB28E6BD7E82C0CFFEF1D /* FBSDKLoginKit.h in Headers */, + 1C8B62CB56C976319FB06860477CE746 /* FBSDKLoginManager+Internal.h in Headers */, + 9D5BF18FC7CCF4940DB8DC3977DCBDBD /* FBSDKLoginManager.h in Headers */, + C633DF373080F3F3C3F3EB1DBBEDCED6 /* FBSDKLoginManagerLogger.h in Headers */, + B8AC53A4C8F58BDFD9F42F507BE636A3 /* FBSDKLoginManagerLoginResult+Internal.h in Headers */, + 41A0834451988DBB43B0B73352D6AEDB /* FBSDKLoginManagerLoginResult.h in Headers */, + 92B24D6398699897F8F9F1DE4362F4C4 /* FBSDKLoginTooltipView.h in Headers */, + AEC5EC0403C6D47845356840B7EBBDC8 /* FBSDKLoginUtility.h in Headers */, + 50E2BA3D103DB649946E279A6DE051EF /* FBSDKTooltipView.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5E4C96FA0F57FD0161E8DC07B70A24BB /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + CADACE233EDFF7177706ED22AAA1FF87 /* FacebookCore-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 74B7E13EF193CD07EC8B53D5CBF55984 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CC846A4CA2567D16FBA6AEAA658BD94 /* Pods-FirebaseFacebookTests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 908596BF5CB8C94DD9FCF7732C1E3BB6 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E4BFCC1A7BF9E52B6E49A7E684494FD7 /* Pods-FirebaseFacebook-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9F4995F12E9812B75E76489BB1A55F48 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2214B4B2781DAA3D39475B83998B17F4 /* _FBSDKTemporaryErrorRecoveryAttempter.h in Headers */, + 2AAC8EAE5CF30398A2B1DB3712E018B4 /* FBSDKAccessToken.h in Headers */, + 1A749C04428B263A30C900609143D743 /* FBSDKAccessTokenCache.h in Headers */, + 606B0F636344D7E42EE4DE1BC380F192 /* FBSDKAccessTokenCacheV3.h in Headers */, + A7DC849091B662BE72C63CDCCB80EA23 /* FBSDKAccessTokenCacheV3_17.h in Headers */, + F4B90D2065B37074BD63275ACF683602 /* FBSDKAccessTokenCacheV3_21.h in Headers */, + AD74B40867BE59D8F40DEFE07E9F36BC /* FBSDKAccessTokenCacheV4.h in Headers */, + 9F4712CCFACFB4BAD8936012C804F4D2 /* FBSDKAccessTokenCaching.h in Headers */, + 1A0F3C7487E4B465BF962B0D09DCA790 /* FBSDKAccessTokenExpirer.h in Headers */, + 10A06B370DA4EBB17115637CDE53DA14 /* FBSDKAppEvents+Internal.h in Headers */, + F6936DECAA296230E6BB432ABC34BAEF /* FBSDKAppEvents.h in Headers */, + D3B436DC1C6D71B816CA0D1BF0F17932 /* FBSDKAppEventsDeviceInfo.h in Headers */, + 2B3B23C1076DA2C4362B02CD3378B9AA /* FBSDKAppEventsState.h in Headers */, + 5875C6B0BE44FBEAB2D43D8CC7EF4808 /* FBSDKAppEventsStateManager.h in Headers */, + 3D2682BBDF72F1671A7CFD834E3189ED /* FBSDKAppEventsUtility.h in Headers */, + 70A2A82E14C53471498C580726F8B354 /* FBSDKApplicationDelegate+Internal.h in Headers */, + 72E8FEE43AB898F198C96319AC911F27 /* FBSDKApplicationDelegate.h in Headers */, + 3A685C4D065E4B2386DE8C2A5B61D205 /* FBSDKAppLink.h in Headers */, + 119F2F86AD2B9D94682F4D7ECF3D810B /* FBSDKAppLink_Internal.h in Headers */, + 7FD87548A784D6A8B2A27288C99566FE /* FBSDKAppLinkNavigation.h in Headers */, + FD1EC3A6250EA6D04F6B617677313017 /* FBSDKAppLinkResolver.h in Headers */, + CC0C7FDF12D51F78E958F598334E90CF /* FBSDKAppLinkResolving.h in Headers */, + 5BECBE3547A4AE1B307FAFC7CC38C62C /* FBSDKAppLinkReturnToRefererController.h in Headers */, + 3FAF063A1BF13245A1683C291B5ED83F /* FBSDKAppLinkReturnToRefererView.h in Headers */, + 9D0EDFB5997462721C450160FEAC9B03 /* FBSDKAppLinkReturnToRefererView_Internal.h in Headers */, + 67BA16D061A95379D98AD89CFB20DF3D /* FBSDKAppLinkTarget.h in Headers */, + 15481600EA05E501EC30595488FB55B2 /* FBSDKAppLinkUtility.h in Headers */, + DBA45645E9845B95A8579973767C7731 /* FBSDKAudioResourceLoader.h in Headers */, + 986149DFBF2D006806E7DE055378548A /* FBSDKBase64.h in Headers */, + 5A878EC807ECFED8759DEF6782BA782F /* FBSDKBoltsMeasurementEventListener.h in Headers */, + FBD26062FFBD4819635AE02D3682E071 /* FBSDKBridgeAPICrypto.h in Headers */, + 3C53ED2C53B45D5374B194C56FFA509B /* FBSDKBridgeAPIProtocol.h in Headers */, + 60C13297717102598A4D186D42715BFF /* FBSDKBridgeAPIProtocolNativeV1.h in Headers */, + 86EBF0F5E8A6503AA928932F53B514B3 /* FBSDKBridgeAPIProtocolType.h in Headers */, + D312F5712754D5ABEA7082A30A9CFA75 /* FBSDKBridgeAPIProtocolWebV1.h in Headers */, + 74636C62F77A8EAE2A9211F83CA42E50 /* FBSDKBridgeAPIProtocolWebV2.h in Headers */, + 595196F9DFCE186EF4402E18CF28B8C0 /* FBSDKBridgeAPIRequest+Private.h in Headers */, + BB10F8720D6E2479E0662D963CBE05CA /* FBSDKBridgeAPIRequest.h in Headers */, + 2FD193E2DD70B059ED3CCC4B2D589DC2 /* FBSDKBridgeAPIResponse.h in Headers */, + 3D676BDE5A25185E31B2ED7DEE1329DC /* FBSDKButton+Subclass.h in Headers */, + F7774DD11A81C8F16212F206B60AB5CE /* FBSDKButton.h in Headers */, + 9894AB4A4CF55C33704D7F0C135E8B92 /* FBSDKCloseIcon.h in Headers */, + 47AEFF2BE4CECDF5E8392151889B84C8 /* FBSDKCodelessIndexer.h in Headers */, + 70951E19FF13C57BA43CFF4E9F456319 /* FBSDKCodelessMacros.h in Headers */, + BB7A7198F1D0A4A8E3985E7E07564DFB /* FBSDKCodelessParameterComponent.h in Headers */, + FFE9276D78998A371F660650D93EE2B4 /* FBSDKCodelessPathComponent.h in Headers */, + 46E5E72DBF6873F19C9AD4FBDA117D36 /* FBSDKColor.h in Headers */, + D7E03C9970E1B533C18A55EA598BF667 /* FBSDKConstants.h in Headers */, + 001FA18266FF30AE17428E2F2E12663A /* FBSDKContainerViewController.h in Headers */, + 0AB42CC2A0624726AB2447EEDC5A09C6 /* FBSDKCopying.h in Headers */, + EE2F13E4444A523248F4DCA8297D4545 /* FBSDKCoreKit+Internal.h in Headers */, + 829AA39ADD795A764897E2FF5AF93983 /* FBSDKCoreKit-umbrella.h in Headers */, + 4B9B578295370F9BC38E0479D45C02F1 /* FBSDKCoreKit.h in Headers */, + 7A747E602BD7942557689BF836D2A298 /* FBSDKCrypto.h in Headers */, + A0CD38F8FECE405B0AF36263813585DC /* FBSDKDeviceRequestsHelper.h in Headers */, + DA72D1C86958B2332449CF4163FA6385 /* FBSDKDialogConfiguration.h in Headers */, + 368D36D37F583E1008BDFF0D2072C01A /* FBSDKDynamicFrameworkLoader.h in Headers */, + 3485225D28592D4ADF4F09C9E02192C7 /* FBSDKError.h in Headers */, + 91964100925F5C066916BEBADA11A614 /* FBSDKErrorConfiguration.h in Headers */, + 507BE3FB73ED274BD8480684CDCBCB02 /* FBSDKErrorRecoveryAttempter.h in Headers */, + 4E8833EB4286647804331ADB1F0B1745 /* FBSDKErrorRecoveryConfiguration.h in Headers */, + 23483B74063FCC686705E1CA2728765A /* FBSDKEventBinding.h in Headers */, + 440917719AAF68F3D2CF405FF824FC5F /* FBSDKEventBindingManager.h in Headers */, + 0FF1702D7EE705FFEB409A2BE7AF7911 /* FBSDKGateKeeperManager.h in Headers */, + 749A083774940544E000702C88CAC232 /* FBSDKGraphErrorRecoveryProcessor.h in Headers */, + E65AF2136C7AAED70AF39B5FA6B6A440 /* FBSDKGraphRequest+Internal.h in Headers */, + BF68DDBA0E8A75559908E4A022DD501A /* FBSDKGraphRequest.h in Headers */, + E2654B9DC9C0D09B12C557B1C9332476 /* FBSDKGraphRequestBody.h in Headers */, + 73F5E314C20CFB83A38CA0F0B1CA7087 /* FBSDKGraphRequestConnection+Internal.h in Headers */, + 46659D766A25A449FD9CE62A197686A2 /* FBSDKGraphRequestConnection.h in Headers */, + 339E9A1B126244052143190B51BDB0F3 /* FBSDKGraphRequestDataAttachment.h in Headers */, + E3E66177503E4735C789D617ED18C8C8 /* FBSDKGraphRequestMetadata.h in Headers */, + C774C8E1117106FA68E4A75DD0A305B9 /* FBSDKGraphRequestPiggybackManager.h in Headers */, + B776A2FB233C19447327EB72FB0B8C03 /* FBSDKHybridAppEventsScriptMessageHandler.h in Headers */, + E039DEE2AA3A18A25CB766DDE4F946B6 /* FBSDKIcon.h in Headers */, + 1A83FA19D1CA1128D0FF873499B8ED08 /* FBSDKImageDownloader.h in Headers */, + FFC96A36447AA7C7173DE0135B22EFEA /* FBSDKInternalUtility.h in Headers */, + E305473648C48CD7D1C7DDE5E0D3A43C /* FBSDKKeychainStore.h in Headers */, + 197AB02F337E56CB50D8D637066CE888 /* FBSDKKeychainStoreViaBundleID.h in Headers */, + 0FA84044B78E7B6139881A82E3B93741 /* FBSDKLogger.h in Headers */, + BD25A92AEE68C38E69DC72DD635D40A6 /* FBSDKLogo.h in Headers */, + F447C2A32CB83E665C0B7DCEDDF93273 /* FBSDKMacros.h in Headers */, + 0549E593D36576719A2F2D7BC155D5DE /* FBSDKMaleSilhouetteIcon.h in Headers */, + 30894E78E845720881878E282174EB34 /* FBSDKMath.h in Headers */, + 27362A0ACFCF40CEB40D31D056707998 /* FBSDKMeasurementEvent.h in Headers */, + 2AB74FFA58EC38C3F29F8BE08D27BB20 /* FBSDKMeasurementEvent_Internal.h in Headers */, + 4297E89C5DB289321D0A78EBAE180CD2 /* FBSDKMonotonicTime.h in Headers */, + B17D8E2F0B7FC6A5E798661586A02DDC /* FBSDKMutableCopying.h in Headers */, + 0E34D6EF53793978D077CE1155869AAB /* FBSDKPaymentObserver.h in Headers */, + BABE6311442206D70620CCD3CFF6FCDB /* FBSDKProfile+Internal.h in Headers */, + B1A3C1270EC95A830264CCDD661676D3 /* FBSDKProfile.h in Headers */, + 06CBD7A9785F02FEBB7C800F888F81CC /* FBSDKProfilePictureView.h in Headers */, + 7D3982CFC665F718EBEC144ACE606B68 /* FBSDKServerConfiguration+Internal.h in Headers */, + 6D57DCD6F325540D8A8C92E6F2F4841A /* FBSDKServerConfiguration.h in Headers */, + FDA560AFDB11F83AA7212609B4D10E2B /* FBSDKServerConfigurationManager+Internal.h in Headers */, + 9ECC256735D6116A19F4244D3F42947A /* FBSDKServerConfigurationManager.h in Headers */, + A7907075A537DED782AA25C5538F3051 /* FBSDKSettings+Internal.h in Headers */, + BDE62EE2BCE10E1A58C0936759E3BA7D /* FBSDKSettings.h in Headers */, + 4E5A08D08073CC80938F6FA22C64D6B6 /* FBSDKSwizzler.h in Headers */, + ED7A170A80930DB8A1F6A91CC5452773 /* FBSDKSystemAccountStoreAdapter.h in Headers */, + C9BE322DF5352D209DDD8F519031FCA0 /* FBSDKTestUsersManager.h in Headers */, + 37A57A4E6F88A40BD5658E948EE276BB /* FBSDKTimeSpentData.h in Headers */, + 8F7AC532B428EFD06E1A4293EE8EF84C /* FBSDKTriStateBOOL.h in Headers */, + 102213F42828E87C600095EAF61B315E /* FBSDKTypeUtility.h in Headers */, + 82149818FE33B9E0F8CBE208223AA3DB /* FBSDKUIUtility.h in Headers */, + 7A4DDF4447A2997179BE98FED0AD9DB6 /* FBSDKURL.h in Headers */, + 9971E46C4A7FAE441C964D11ED028880 /* FBSDKURL_Internal.h in Headers */, + 3E03ED9D542EE888317E7E402B60A6FD /* FBSDKURLOpening.h in Headers */, + D1FFF438491170B616EE99D129E23BBC /* FBSDKURLSessionTask.h in Headers */, + 5B9F6E1F79B40D91080F1439B3B5F59C /* FBSDKUserDataStore.h in Headers */, + 02EB6EDA6C12AAE30D54C9D76FCE8C86 /* FBSDKUtility.h in Headers */, + 0E3F0AE381F8DB44401FB0F29E5CC204 /* FBSDKViewHierarchy.h in Headers */, + 35CEE33CA3BE07FEABFCFCEAD9F2A80C /* FBSDKViewImpressionTracker.h in Headers */, + 9C3E0026A95F0C386069B6C63CFB33C4 /* FBSDKWebDialog.h in Headers */, + 1FF58542753D574B907357EB487400AB /* FBSDKWebDialogView.h in Headers */, + DDB27124341489889AF0D8C1B3D400FB /* FBSDKWebViewAppLinkResolver.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 237EA571A0CFFA62843F2A568010486B /* Pods-FirebaseFacebook */ = { + isa = PBXNativeTarget; + buildConfigurationList = C7FB8241B29C123F68EA458CAC81519B /* Build configuration list for PBXNativeTarget "Pods-FirebaseFacebook" */; + buildPhases = ( + 68C73A45C187CAC6F94BA7F2C9403D6E /* Sources */, + 46713D2279CF75A3639C8CFA9DAFF94C /* Frameworks */, + 908596BF5CB8C94DD9FCF7732C1E3BB6 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + E25E5FA7B78BBBFF4B8258F2A8C3FB96 /* PBXTargetDependency */, + B3CF10B347F8E9BA6BDFAA79EF99F1E7 /* PBXTargetDependency */, + 3E3513D7ED3DB5000A01B3F061787493 /* PBXTargetDependency */, + 8CEEB80003B80475B09C1D403674B4D5 /* PBXTargetDependency */, + A01723C9F815A859265E7ADF2E4C90BF /* PBXTargetDependency */, + ); + name = "Pods-FirebaseFacebook"; + productName = "Pods-FirebaseFacebook"; + productReference = FB9713C9F085482D4687D8C7E838CBFF /* Pods_FirebaseFacebook.framework */; + productType = "com.apple.product-type.framework"; + }; + 422A68D66239C003937790016D41CDF0 /* Pods-FirebaseFacebookTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9D52E855CC97E60F0F78316BD0026172 /* Build configuration list for PBXNativeTarget "Pods-FirebaseFacebookTests" */; + buildPhases = ( + 8CEA6DFEA630A8A35E6E20F041A49CE6 /* Sources */, + 09425B6A9BFBF8C3953E46E298F92251 /* Frameworks */, + 74B7E13EF193CD07EC8B53D5CBF55984 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Pods-FirebaseFacebookTests"; + productName = "Pods-FirebaseFacebookTests"; + productReference = 5D898B48EB6B01758CA7B26C5217E1AA /* Pods_FirebaseFacebookTests.framework */; + productType = "com.apple.product-type.framework"; + }; + 531B78FD8AD31B542B8001A970D876EC /* Bolts */ = { + isa = PBXNativeTarget; + buildConfigurationList = 17EBC9F5759EB02EC962F3FAC032F916 /* Build configuration list for PBXNativeTarget "Bolts" */; + buildPhases = ( + 4776F4183558413B957794C57F48EA44 /* Sources */, + AC2F622ECE8471477ACB613503CF47C2 /* Frameworks */, + 08601EF6291D4568694D6AF52F646512 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Bolts; + productName = Bolts; + productReference = 2E2B949A24697F944E81A9BFA0AF7543 /* Bolts.framework */; + productType = "com.apple.product-type.framework"; + }; + 593E9479C06FB200807D11AB29EB50BD /* FBSDKCoreKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 79724D5ACB954F3F91AFBE6B4F3C13CC /* Build configuration list for PBXNativeTarget "FBSDKCoreKit" */; + buildPhases = ( + 7C5C641001C0FB670860F1ABA3F29DE5 /* Sources */, + D1AF25F8E0C97EBD1D352412A10B3D43 /* Frameworks */, + 9F4995F12E9812B75E76489BB1A55F48 /* Headers */, + BA661EC2532E94EC16C3024B8A822B6A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 5254E5C4FBCF8D0C43B37000F524A63A /* PBXTargetDependency */, + ); + name = FBSDKCoreKit; + productName = FBSDKCoreKit; + productReference = 32CC168A5629CF356734F6E686B594C1 /* FBSDKCoreKit.framework */; + productType = "com.apple.product-type.framework"; + }; + 5B5AC3C06B783F8674FDB4C0F900B56A /* FBSDKLoginKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 848BDB3AD956B6F8C193419E91AA121E /* Build configuration list for PBXNativeTarget "FBSDKLoginKit" */; + buildPhases = ( + F8B46E442D5B67202D7732A440B4C7CD /* Sources */, + E6AA2DA27FA518824659C31885839844 /* Frameworks */, + 58ED161B574E347FDC0B70D453B3A120 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + BF29B989DB082719D5EF2F9C386BC194 /* PBXTargetDependency */, + BD937A5784666B7002EC53D70A38B230 /* PBXTargetDependency */, + ); + name = FBSDKLoginKit; + productName = FBSDKLoginKit; + productReference = F414A1B8045EFEF7A8648033B707EB52 /* FBSDKLoginKit.framework */; + productType = "com.apple.product-type.framework"; + }; + 7335E9C9689F3B8A16F063A884748533 /* FacebookLogin */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D81E4D14126EBE350D8AC86DB74356C /* Build configuration list for PBXNativeTarget "FacebookLogin" */; + buildPhases = ( + DE747519C735EC944D7BB0E12871F9C9 /* Sources */, + A3267B9AFC4BD201D02E9D78DFB8DD7C /* Frameworks */, + 1FE9D81B8F1CE3C4F343AE2C76EB8978 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + BC513D655DDD160DC94787BCBB50BC0A /* PBXTargetDependency */, + 1D5E477078E2373969DF1E1DEF30A230 /* PBXTargetDependency */, + 5E93C8C6C5520A2C49BA5F22637A01B7 /* PBXTargetDependency */, + 858C73FD543C52D9322067174B059EF1 /* PBXTargetDependency */, + ); + name = FacebookLogin; + productName = FacebookLogin; + productReference = 9C7910786FE57092E6E1A6F8F4DB27C9 /* FacebookLogin.framework */; + productType = "com.apple.product-type.framework"; + }; + CB16478D32FC7351A0256E1B703066BE /* Pods-FirebaseFacebookUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1F58A27071C3C637B0E18786EE29B4CC /* Build configuration list for PBXNativeTarget "Pods-FirebaseFacebookUITests" */; + buildPhases = ( + 2CACFDAE8A8CEABC4656E20BB7BDA270 /* Sources */, + 607538EF4EC3FDCFC2FCA0214DF859E8 /* Frameworks */, + 4047FE7F92C36227484272AA1FD009CF /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Pods-FirebaseFacebookUITests"; + productName = "Pods-FirebaseFacebookUITests"; + productReference = FA069940EAD8AAC20BB4EA486C658771 /* Pods_FirebaseFacebookUITests.framework */; + productType = "com.apple.product-type.framework"; + }; + DDBCFDE490CDFDABF6F16A26F346932D /* FacebookCore */ = { + isa = PBXNativeTarget; + buildConfigurationList = CBEBB824215B9763F0875C8A32E6B6D4 /* Build configuration list for PBXNativeTarget "FacebookCore" */; + buildPhases = ( + 432AB57FD23943D20C369F8843DA6126 /* Sources */, + 06B737175F0473989B9DD3EF41CF0E0E /* Frameworks */, + 5E4C96FA0F57FD0161E8DC07B70A24BB /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + EA851DC627C1F1FCA44D6F0CE8F66F7C /* PBXTargetDependency */, + 29B94C6EE820DC0EA659485414F1DB61 /* PBXTargetDependency */, + ); + name = FacebookCore; + productName = FacebookCore; + productReference = 77D9B77CFA4191AA056524313DC827B4 /* FacebookCore.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = 211B606AEAFAAB6699B921265FECEC50 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 531B78FD8AD31B542B8001A970D876EC /* Bolts */, + DDBCFDE490CDFDABF6F16A26F346932D /* FacebookCore */, + 7335E9C9689F3B8A16F063A884748533 /* FacebookLogin */, + 593E9479C06FB200807D11AB29EB50BD /* FBSDKCoreKit */, + 5B5AC3C06B783F8674FDB4C0F900B56A /* FBSDKLoginKit */, + 237EA571A0CFFA62843F2A568010486B /* Pods-FirebaseFacebook */, + 422A68D66239C003937790016D41CDF0 /* Pods-FirebaseFacebookTests */, + CB16478D32FC7351A0256E1B703066BE /* Pods-FirebaseFacebookUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + BA661EC2532E94EC16C3024B8A822B6A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6AE5D7DC2777A0E2D846B9233BC544CC /* FacebookSDKStrings.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2CACFDAE8A8CEABC4656E20BB7BDA270 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 23DD5AA6DC327EDD702FF502D5DDC82C /* Pods-FirebaseFacebookUITests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 432AB57FD23943D20C369F8843DA6126 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9FD4EC67629E630FAF533FD7419709A6 /* AccessToken.swift in Sources */, + 30B9C3AB35A6262B24E9B31679427855 /* AppEvent.Builtin.swift in Sources */, + 76581E05FAEECC5B4A95E0C8678EF99C /* AppEvent.swift in Sources */, + 530B9D2A115F723B7766AFB6774179AA /* AppEventName.swift in Sources */, + FA256DAD66E1B999500FD847EF372A78 /* AppEventParameterName.swift in Sources */, + E96C003D7CC2D08746007E06C2D42A6F /* AppEventsLogger.FlushBehavior.swift in Sources */, + 83F528D855F095703DA4D6B83492A38D /* AppEventsLogger.swift in Sources */, + 0CAB0FF74BBC9B6CFE6291BDC0B34642 /* Dictionary+KeyValueMap.swift in Sources */, + C89CB7A06A3418D1D5302DA304D41851 /* FacebookCore-dummy.m in Sources */, + 35FAE588DF52D7D3F80247AED004F4FD /* GraphAPIVersion.swift in Sources */, + FB9ACA2DDBA9CB71D810FB98F255DE59 /* GraphRequest.swift in Sources */, + 7E8683D8F563BF98193C9B9EA9DD7424 /* GraphRequestConnection.swift in Sources */, + 805808D97BD380866B2ABCFFCAE2A53B /* GraphRequestConnectionDelegateBridge.swift in Sources */, + AFF5B9191C05F6B9189163B87519E1A7 /* GraphRequestDataAttachment.swift in Sources */, + AACE50EE21580B023B3FCD70AE066BFF /* GraphRequestProtocol.Bridge.swift in Sources */, + 00DA2710AF5B4DB2C7FB3B1D6EB25E86 /* GraphRequestProtocol.swift in Sources */, + 05F435224C22B3AFE58F69197B6626BF /* GraphRequestResult.swift in Sources */, + F8D2EBCE90F274930072DACC13D0BEAD /* GraphResponse.swift in Sources */, + 0FA3EA47F55A312602A35B66030C82F5 /* GraphResponseProtocol.swift in Sources */, + 88F85828F62E3958E7D6A2CA624E42C0 /* Optional+OnSome.swift in Sources */, + EB07655316E9926656B4A3287D841483 /* Permission.swift in Sources */, + DE147E8A64C0D36F81F8704BD7A13D30 /* PublishPermission.swift in Sources */, + 99C50433212EC25D746CA0E1157FD3A8 /* ReadPermission.swift in Sources */, + E050360AA250F10954984C8E0F494089 /* SDKApplicationDelegate.swift in Sources */, + 693B7CFB754828883E2E6EC222E47AC1 /* SDKLoggingBehavior.swift in Sources */, + 1512BC37F27F9A56634727F51FE8C63F /* SDKSettings.swift in Sources */, + 137143621B15454929037877AE0C96AE /* UserProfile.FetchResult.swift in Sources */, + 821BDF4AD8E30F826D3E163108E57134 /* UserProfile.PictureView.swift in Sources */, + B2601B2BCDC8606F2A85B4DF9AE8B810 /* UserProfile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4776F4183558413B957794C57F48EA44 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BB046EA973B2AA90ECA3F93929783D69 /* BFAppLink.m in Sources */, + BCDF640199FA64092CE4C5EA1C50FAF7 /* BFAppLinkNavigation.m in Sources */, + AD118EC64163B5283C513FE42D4D539F /* BFAppLinkReturnToRefererController.m in Sources */, + 8D7AC51294909811B6E82064F66C97FE /* BFAppLinkReturnToRefererView.m in Sources */, + F4679986CB5DF8A2CE3918A117C35701 /* BFAppLinkTarget.m in Sources */, + 74DAC0F0E92AA0D2927AA542CF1D4372 /* BFCancellationToken.m in Sources */, + 4890F5DA6CCE3D517DFCA4C365AE40E6 /* BFCancellationTokenRegistration.m in Sources */, + B5A239E340D70F27CA47EE93F666D492 /* BFCancellationTokenSource.m in Sources */, + 06F45295FB891AC9665386F5145766F5 /* BFExecutor.m in Sources */, + 9C4B6D703AE5D4CDAED221D59B142781 /* BFMeasurementEvent.m in Sources */, + 05E4C4328A15FF1DF3C4137922E7BD49 /* BFTask.m in Sources */, + 06C4A0BFFAC232710C57148C9BBC6774 /* BFTaskCompletionSource.m in Sources */, + DD5D640D983715347B7C8006800C1EDA /* BFURL.m in Sources */, + 61A126566067B65D52547783EBB4604E /* BFWebViewAppLinkResolver.m in Sources */, + 879D3BAFB02204D2E4ED929CC53CC633 /* Bolts-dummy.m in Sources */, + 4044A2E6F601BC9EC577F3ECF616AE42 /* Bolts.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 68C73A45C187CAC6F94BA7F2C9403D6E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1B2B21B50A4BDBC91CC93A4BF7B4EBC3 /* Pods-FirebaseFacebook-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7C5C641001C0FB670860F1ABA3F29DE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5A52C5A870731D782A68ADE01321A98E /* _FBSDKTemporaryErrorRecoveryAttempter.m in Sources */, + 8FDB76BD1A0C6AF6ED7C96E94015E393 /* FBSDKAccessToken.m in Sources */, + FECA2BC50ED5921D870608E3FD09AEE8 /* FBSDKAccessTokenCache.m in Sources */, + 6414D8F1AB33F0232E35BC1B54DE575F /* FBSDKAccessTokenCacheV3.m in Sources */, + 844DA060B7733B44BBD2EC39C44D276D /* FBSDKAccessTokenCacheV3_17.m in Sources */, + 49E2831BFAF57FF399DE6D2BC31B860A /* FBSDKAccessTokenCacheV3_21.m in Sources */, + 5494CAC8756642FA37C6EC558B1F1033 /* FBSDKAccessTokenCacheV4.m in Sources */, + E04053D2AEFA5F67E89C36EFCAE4925C /* FBSDKAccessTokenExpirer.m in Sources */, + 7883669940AA78CE08C3ADDADDC5B7B5 /* FBSDKAppEvents.m in Sources */, + 71E227DC49DE4E26C4CC886B4C29006D /* FBSDKAppEventsDeviceInfo.m in Sources */, + 67C8E03E731FEA74E8469D62A412EADA /* FBSDKAppEventsState.m in Sources */, + 11043344A2791674C29A62432815188F /* FBSDKAppEventsStateManager.m in Sources */, + 2866A69E78E9CEE47AF86B5EE8626FEE /* FBSDKAppEventsUtility.m in Sources */, + 75FE1395739BD816E859608EA0EDEDBC /* FBSDKApplicationDelegate.m in Sources */, + 82E5AEFE8B8C7BB05A8713586D629FE0 /* FBSDKAppLink.m in Sources */, + B457AE0ADB177768F54242C20A7E23AC /* FBSDKAppLinkNavigation.m in Sources */, + 4084828F57AD57FD0FE676DFC0F22A6D /* FBSDKAppLinkResolver.m in Sources */, + 163237BC39E90D5A59EA066AFE09FE5A /* FBSDKAppLinkReturnToRefererController.m in Sources */, + AA9E25B81DE0514C290DF3728B431E12 /* FBSDKAppLinkReturnToRefererView.m in Sources */, + D1B7351EDF42AA40B43AC63AA11AFB4B /* FBSDKAppLinkTarget.m in Sources */, + A4562956B252088DECB1F92534AF7319 /* FBSDKAppLinkUtility.m in Sources */, + 728E288129307DDB2593EC6DCCB2E8A2 /* FBSDKAudioResourceLoader.m in Sources */, + 6AF3F0D78EFADDCB704DC0ECA87D0E70 /* FBSDKBase64.m in Sources */, + 612296B871FDB01D118C34FA6547AE2D /* FBSDKBoltsMeasurementEventListener.m in Sources */, + D76DFEC031C0FD6A46B33907DA0DA09D /* FBSDKBridgeAPICrypto.m in Sources */, + 61AFD6E8A76361A07FD3A78A8F335BD6 /* FBSDKBridgeAPIProtocolNativeV1.m in Sources */, + 82FC1DD7CDE9DFD39474E658BA6DE998 /* FBSDKBridgeAPIProtocolWebV1.m in Sources */, + BFD727930570DFAC2E57B81E37A0A6FC /* FBSDKBridgeAPIProtocolWebV2.m in Sources */, + 32F1B01A60BE15B8E11EF3AEDF42B604 /* FBSDKBridgeAPIRequest.m in Sources */, + B01CB8A24B585D6BE36C546C69408276 /* FBSDKBridgeAPIResponse.m in Sources */, + DBB44EAF07644C767204BB597891AD98 /* FBSDKButton.m in Sources */, + 7EA8F690819D6E490059ECB07D85628E /* FBSDKCloseIcon.m in Sources */, + 5CD8E4B385FE47DC7473B071A6A87332 /* FBSDKCodelessIndexer.m in Sources */, + F423955E8DCFADFF18608CF1FFC99E33 /* FBSDKCodelessParameterComponent.m in Sources */, + 6C504F88B03185510578704238E7424C /* FBSDKCodelessPathComponent.m in Sources */, + F91D2AD45B9DB3A4825D75E8D1F31C1B /* FBSDKColor.m in Sources */, + 93F1A9F96D6F4239F9B4EAD183A76820 /* FBSDKConstants.m in Sources */, + 398627714631F88549A3E7EDFF226539 /* FBSDKContainerViewController.m in Sources */, + 1CC04C06BC8770E1A7B8185C532FFA47 /* FBSDKCoreKit-dummy.m in Sources */, + 63341DB0786EDD9567C2106D1BFF55EF /* FBSDKCrypto.m in Sources */, + 9AE09678D6DE901407F5259823BFEF20 /* FBSDKDeviceRequestsHelper.m in Sources */, + A73F6B3FD41D74402874DCAE60E326E4 /* FBSDKDialogConfiguration.m in Sources */, + E8EBC3A463A930C00A75D3BC5D4B3BF2 /* FBSDKDynamicFrameworkLoader.m in Sources */, + 5092564A3320954F35BD1201505F9F95 /* FBSDKError.m in Sources */, + EB7484C67925EBD224485152217D8AD6 /* FBSDKErrorConfiguration.m in Sources */, + 9E5FE40120C670A8779A573E2232BA8D /* FBSDKErrorRecoveryAttempter.m in Sources */, + 872236732A2C6EC517825700760D4980 /* FBSDKErrorRecoveryConfiguration.m in Sources */, + B9C8E0591F7ED6732FAF560F46CAB7D0 /* FBSDKEventBinding.m in Sources */, + 80752BFF147ED8ADD5C02384464E1269 /* FBSDKEventBindingManager.m in Sources */, + 4481F98ABFDD9CCC8D4EDAC1B22C41E2 /* FBSDKGateKeeperManager.m in Sources */, + 0F40D7B38E66E7E11EE776B88A3CC029 /* FBSDKGraphErrorRecoveryProcessor.m in Sources */, + C4EC34541AC3292BAFFA7C3C0B4DB876 /* FBSDKGraphRequest.m in Sources */, + 01B60EF69CEBA225852ACEB80A07CD2E /* FBSDKGraphRequestBody.m in Sources */, + 30B0E5D10129ECD49DFCD6CC8E69CEBC /* FBSDKGraphRequestConnection.m in Sources */, + 5F9187EDCF1DCF717383592976472150 /* FBSDKGraphRequestDataAttachment.m in Sources */, + A4AE3EAA7D54715636DC1C387B00E50D /* FBSDKGraphRequestMetadata.m in Sources */, + C8C6F31857BDEE6A14C2C0C7F3629D5C /* FBSDKGraphRequestPiggybackManager.m in Sources */, + BB45E86070B2668A96080D986ADAEFBF /* FBSDKHybridAppEventsScriptMessageHandler.m in Sources */, + E528309B2C456C3FF790AB4B2FBFEA27 /* FBSDKIcon.m in Sources */, + 8B1E53F21CC9665F8F631B8AB772B216 /* FBSDKImageDownloader.m in Sources */, + 449E51B17FBC1FDEB5B2774920EA3F65 /* FBSDKInternalUtility.m in Sources */, + 6E38F5D85DA1886DBB62884907DA69A0 /* FBSDKKeychainStore.m in Sources */, + A92758B2CBF990597679AB4534B0D9A1 /* FBSDKKeychainStoreViaBundleID.m in Sources */, + 524093B47B9725E9AD4884A62CD85209 /* FBSDKLogger.m in Sources */, + 30B6DAA18DE3F27B6E05AF19BD61397D /* FBSDKLogo.m in Sources */, + CF26ECAFBD60031B5843CEA4BBE97FDA /* FBSDKMaleSilhouetteIcon.m in Sources */, + FFFF89DB9B543CF694E8753987EDAB54 /* FBSDKMath.m in Sources */, + A3EE0B3315E24C17B7C6C4DA4375E2D6 /* FBSDKMeasurementEvent.m in Sources */, + FF46907219388FA210E2E26B205C0708 /* FBSDKMonotonicTime.m in Sources */, + 4A5047292B1E4CF4227D323DCD03ED25 /* FBSDKPaymentObserver.m in Sources */, + E1FD8F5D7FAFECF4666694DA2C76BFE6 /* FBSDKProfile.m in Sources */, + 29FBE53E37046EC4CF796DFC8A0C5C52 /* FBSDKProfilePictureView.m in Sources */, + FA248AE32D8526414801C68E75058D4B /* FBSDKServerConfiguration.m in Sources */, + E4F9B9D8B351AC48DC41F9AB0C1C9BDB /* FBSDKServerConfigurationManager.m in Sources */, + D699A1564F9413DF8CF3190F8F4F7198 /* FBSDKSettings.m in Sources */, + 77A9C305D35C38C9867D302DE79A1AD6 /* FBSDKSwizzler.m in Sources */, + 1FD951BF1785EC907F90486CB8A4010B /* FBSDKSystemAccountStoreAdapter.m in Sources */, + BC11060B4209F367393C2DDA51362FDF /* FBSDKTestUsersManager.m in Sources */, + FD138CBCDCA9A89C117D607292867632 /* FBSDKTimeSpentData.m in Sources */, + CC288963FDA6EC6B2B51FBFA10C6FBF2 /* FBSDKTriStateBOOL.m in Sources */, + F766B219A93C45938528D2A7ACCA7998 /* FBSDKTypeUtility.m in Sources */, + 668C7F7814CBC2327D840333E59213B8 /* FBSDKURL.m in Sources */, + B3318911BAEADEE7D22907344269AD33 /* FBSDKURLSessionTask.m in Sources */, + D7FA8C55932E1929418A64329AD3BE50 /* FBSDKUserDataStore.m in Sources */, + 966109F7772395BF01FE8ABC571BCA4F /* FBSDKUtility.m in Sources */, + A3BF9B49EB8EED72C6B7CC4BEF5FEF70 /* FBSDKViewHierarchy.m in Sources */, + F7874B79F5FAA398C658C3D785C7FA99 /* FBSDKViewImpressionTracker.m in Sources */, + 8DEF1D3995F528CD83D4EFC3E0FAA778 /* FBSDKWebDialog.m in Sources */, + D9DD55B74CAB46E388DC2125BEF22636 /* FBSDKWebDialogView.m in Sources */, + E24134182180F5FDE2B4F0ED1EAEB38B /* FBSDKWebViewAppLinkResolver.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8CEA6DFEA630A8A35E6E20F041A49CE6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FA158E6B5CD40C667221B0DDE446A268 /* Pods-FirebaseFacebookTests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DE747519C735EC944D7BB0E12871F9C9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0F9F32907125C076A9E9615333726EA0 /* FacebookLogin-dummy.m in Sources */, + 8958EBDBD07F22FA8DDBE48563D87B34 /* LoginBehavior.swift in Sources */, + B2DE6D4F458E3A98AE85BBA3C0FFC9FA /* LoginButton.swift in Sources */, + 55298863F1F53C1A8A561CF12D913B99 /* LoginButton.Tooltip.swift in Sources */, + E01DB6EE10BBB5C51F47FE009FB942BC /* LoginButtonDelegate.swift in Sources */, + DC86171201FF1D4E1BA38729D4EDA65A /* LoginButtonDelegateBridge.swift in Sources */, + F55524C2161A2D9055FE9C6831BA4AC5 /* LoginDefaultAudience.swift in Sources */, + B05BE2F9678AF095D31691806C4C660E /* LoginManager.swift in Sources */, + 703EBFCD66B6DE11F316AB33F2DA6787 /* LoginResult.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F8B46E442D5B67202D7732A440B4C7CD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1723071110BA5F9D33A890269F22D9D3 /* _FBSDKLoginRecoveryAttempter.m in Sources */, + 0B0A24AC12A89E10BD249DE376BD3135 /* FBSDKDeviceLoginCodeInfo.m in Sources */, + 2A4E26A63576F6A71D4839A3E478D228 /* FBSDKDeviceLoginManager.m in Sources */, + 93AE625232437525747BD760B4D221CE /* FBSDKDeviceLoginManagerResult.m in Sources */, + F62FCC67F5BF4ACE4D064DC18CF1A163 /* FBSDKLoginButton.m in Sources */, + 936F9B52CB6B4663B06F8C5D0EEEF58E /* FBSDKLoginCompletion.m in Sources */, + 1002B6A69EB9FB398DEB7E47EF37124B /* FBSDKLoginConstants.m in Sources */, + B063A9B62888A5ACE2E2B46283496602 /* FBSDKLoginError.m in Sources */, + DD187D1044A342FF463BB6121FA72E92 /* FBSDKLoginKit-dummy.m in Sources */, + EAFC24977D5C9226A217F7C6FE063637 /* FBSDKLoginManager.m in Sources */, + 4D86423305142A09FA939C8E4C62A734 /* FBSDKLoginManagerLogger.m in Sources */, + 2B84A2D3E7BA81389AE62EA6392C12EA /* FBSDKLoginManagerLoginResult.m in Sources */, + E962657554EDF87E0A822C5C6FE97A75 /* FBSDKLoginTooltipView.m in Sources */, + 78552DABA4BE14C8E4D0C05677D9B98A /* FBSDKLoginUtility.m in Sources */, + 8EA44DD9087CC66063D154DF35923078 /* FBSDKTooltipView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 1D5E477078E2373969DF1E1DEF30A230 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FBSDKCoreKit; + target = 593E9479C06FB200807D11AB29EB50BD /* FBSDKCoreKit */; + targetProxy = FA292E856D14F23EA8F2CFEE5343A139 /* PBXContainerItemProxy */; + }; + 29B94C6EE820DC0EA659485414F1DB61 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FBSDKCoreKit; + target = 593E9479C06FB200807D11AB29EB50BD /* FBSDKCoreKit */; + targetProxy = 709123FA3378063036E76800A835D78D /* PBXContainerItemProxy */; + }; + 3E3513D7ED3DB5000A01B3F061787493 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FBSDKLoginKit; + target = 5B5AC3C06B783F8674FDB4C0F900B56A /* FBSDKLoginKit */; + targetProxy = CD91E5166CE577D187ADF43B5E4F4161 /* PBXContainerItemProxy */; + }; + 5254E5C4FBCF8D0C43B37000F524A63A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Bolts; + target = 531B78FD8AD31B542B8001A970D876EC /* Bolts */; + targetProxy = A88DAB774826E14D761152DC0DF2A8BC /* PBXContainerItemProxy */; + }; + 5E93C8C6C5520A2C49BA5F22637A01B7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FBSDKLoginKit; + target = 5B5AC3C06B783F8674FDB4C0F900B56A /* FBSDKLoginKit */; + targetProxy = 1707295455DE4AF37E9B157E5859EB8F /* PBXContainerItemProxy */; + }; + 858C73FD543C52D9322067174B059EF1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FacebookCore; + target = DDBCFDE490CDFDABF6F16A26F346932D /* FacebookCore */; + targetProxy = 402AA05CC5AB803EE626CB485DD54053 /* PBXContainerItemProxy */; + }; + 8CEEB80003B80475B09C1D403674B4D5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FacebookCore; + target = DDBCFDE490CDFDABF6F16A26F346932D /* FacebookCore */; + targetProxy = E657720D70865D4E637912741776C773 /* PBXContainerItemProxy */; + }; + A01723C9F815A859265E7ADF2E4C90BF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FacebookLogin; + target = 7335E9C9689F3B8A16F063A884748533 /* FacebookLogin */; + targetProxy = DCD110328AA05F7AA09D22D229A187A7 /* PBXContainerItemProxy */; + }; + B3CF10B347F8E9BA6BDFAA79EF99F1E7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FBSDKCoreKit; + target = 593E9479C06FB200807D11AB29EB50BD /* FBSDKCoreKit */; + targetProxy = 51A0A947228D7DD1CB7363F39FC42DC8 /* PBXContainerItemProxy */; + }; + BC513D655DDD160DC94787BCBB50BC0A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Bolts; + target = 531B78FD8AD31B542B8001A970D876EC /* Bolts */; + targetProxy = D53E3885669EAC4D646F64CE4367BFFC /* PBXContainerItemProxy */; + }; + BD937A5784666B7002EC53D70A38B230 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FBSDKCoreKit; + target = 593E9479C06FB200807D11AB29EB50BD /* FBSDKCoreKit */; + targetProxy = C3FFEA789286A7C6269EA34FAD9634CA /* PBXContainerItemProxy */; + }; + BF29B989DB082719D5EF2F9C386BC194 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Bolts; + target = 531B78FD8AD31B542B8001A970D876EC /* Bolts */; + targetProxy = 79C653BF28A85A4416BD1419B8C5BFA3 /* PBXContainerItemProxy */; + }; + E25E5FA7B78BBBFF4B8258F2A8C3FB96 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Bolts; + target = 531B78FD8AD31B542B8001A970D876EC /* Bolts */; + targetProxy = 1BCD854C11C544DB619E00BAC8AA02D2 /* PBXContainerItemProxy */; + }; + EA851DC627C1F1FCA44D6F0CE8F66F7C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Bolts; + target = 531B78FD8AD31B542B8001A970D876EC /* Bolts */; + targetProxy = 8C8608F2C87A6D91FCD86F90E5604514 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 2B6FA96FAA611A62279C49F6E01C059F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + 3691EFF605EB29787F8A46C5B6BE1D9E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + 3B0A11E1D30E9A061F683D3BBE31BE0C /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 39E094A6919E8B9D2A7BBC0C11B573C8 /* Pods-FirebaseFacebookUITests.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-FirebaseFacebookUITests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_FirebaseFacebookUITests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 4B4C7387EB05787DE415501BE9DDF7CF /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 64E5A59C8B19340228761E0685414458 /* Pods-FirebaseFacebookTests.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-FirebaseFacebookTests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_FirebaseFacebookTests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 55DCEA8283A2368D17C54AE588168B77 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DACC648049AB54A203AEEC3B5505188D /* Bolts.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Bolts/Bolts-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Bolts/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Bolts/Bolts.modulemap"; + PRODUCT_NAME = Bolts; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 666D05B291B371CB72DD80079CA35814 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 76A5A7BC7E26B2C73ADC769A0DDE7488 /* FBSDKCoreKit.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/FBSDKCoreKit/FBSDKCoreKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/FBSDKCoreKit/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/FBSDKCoreKit/FBSDKCoreKit.modulemap"; + PRODUCT_NAME = FBSDKCoreKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 8021F92CF1D4D37ED4948222B397B4B2 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5F6FA8ED2133C53670D39F798BA10347 /* FBSDKLoginKit.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/FBSDKLoginKit/FBSDKLoginKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/FBSDKLoginKit/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/FBSDKLoginKit/FBSDKLoginKit.modulemap"; + PRODUCT_NAME = FBSDKLoginKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 8BCDD49E98ECE7F362E0941DF9053E45 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E525CABA83B57960C8373F7724B66BD4 /* FacebookLogin.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/FacebookLogin/FacebookLogin-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/FacebookLogin/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/FacebookLogin/FacebookLogin.modulemap"; + PRODUCT_NAME = FacebookLogin; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 8EF82BFDB1FEA15559440E03C2B42DD9 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5F6FA8ED2133C53670D39F798BA10347 /* FBSDKLoginKit.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/FBSDKLoginKit/FBSDKLoginKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/FBSDKLoginKit/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/FBSDKLoginKit/FBSDKLoginKit.modulemap"; + PRODUCT_NAME = FBSDKLoginKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 8F41AAE8C0E12C3B91B9AB8A84F5201C /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D6E44C456B581AA10AD641783BD15CC7 /* Pods-FirebaseFacebookUITests.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-FirebaseFacebookUITests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_FirebaseFacebookUITests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 9F26897B5AD3B20186B6C5BB882EB7FB /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 76A5A7BC7E26B2C73ADC769A0DDE7488 /* FBSDKCoreKit.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/FBSDKCoreKit/FBSDKCoreKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/FBSDKCoreKit/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/FBSDKCoreKit/FBSDKCoreKit.modulemap"; + PRODUCT_NAME = FBSDKCoreKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + B19FA2D3C74F02F2C1CF8C0529A25B38 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 74ABDE7975AD089FF496EF473E3D7AA2 /* Pods-FirebaseFacebook.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-FirebaseFacebook/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_FirebaseFacebook; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + C008871163BF7B8B0DC5E68065D8191D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E525CABA83B57960C8373F7724B66BD4 /* FacebookLogin.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/FacebookLogin/FacebookLogin-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/FacebookLogin/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/FacebookLogin/FacebookLogin.modulemap"; + PRODUCT_NAME = FacebookLogin; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + CB16E9B7D33D19458FA2ED06961917A6 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 796BE7C946481798682826B6849016BA /* Pods-FirebaseFacebook.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-FirebaseFacebook/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_FirebaseFacebook; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + CEB6CA021A95D1ABFE2631E104060F5F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DACC648049AB54A203AEEC3B5505188D /* Bolts.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Bolts/Bolts-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Bolts/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Bolts/Bolts.modulemap"; + PRODUCT_NAME = Bolts; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + FAB81C81580D45CA69AF859CFE7EA4DF /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = CD4D68CD17DC3BBEDDC1D15F35351FC7 /* FacebookCore.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/FacebookCore/FacebookCore-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/FacebookCore/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/FacebookCore/FacebookCore.modulemap"; + PRODUCT_NAME = FacebookCore; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + FC9ED877C29211C058B1DA6B091A562F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DC146E6DAFA6F2CFF226580020EF2365 /* Pods-FirebaseFacebookTests.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-FirebaseFacebookTests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_FirebaseFacebookTests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + FCD7BE619347EBCF4E8FB16A0DFBCF67 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = CD4D68CD17DC3BBEDDC1D15F35351FC7 /* FacebookCore.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/FacebookCore/FacebookCore-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/FacebookCore/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/FacebookCore/FacebookCore.modulemap"; + PRODUCT_NAME = FacebookCore; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 17EBC9F5759EB02EC962F3FAC032F916 /* Build configuration list for PBXNativeTarget "Bolts" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 55DCEA8283A2368D17C54AE588168B77 /* Debug */, + CEB6CA021A95D1ABFE2631E104060F5F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1F58A27071C3C637B0E18786EE29B4CC /* Build configuration list for PBXNativeTarget "Pods-FirebaseFacebookUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8F41AAE8C0E12C3B91B9AB8A84F5201C /* Debug */, + 3B0A11E1D30E9A061F683D3BBE31BE0C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2B6FA96FAA611A62279C49F6E01C059F /* Debug */, + 3691EFF605EB29787F8A46C5B6BE1D9E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D81E4D14126EBE350D8AC86DB74356C /* Build configuration list for PBXNativeTarget "FacebookLogin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C008871163BF7B8B0DC5E68065D8191D /* Debug */, + 8BCDD49E98ECE7F362E0941DF9053E45 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 79724D5ACB954F3F91AFBE6B4F3C13CC /* Build configuration list for PBXNativeTarget "FBSDKCoreKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 666D05B291B371CB72DD80079CA35814 /* Debug */, + 9F26897B5AD3B20186B6C5BB882EB7FB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 848BDB3AD956B6F8C193419E91AA121E /* Build configuration list for PBXNativeTarget "FBSDKLoginKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8021F92CF1D4D37ED4948222B397B4B2 /* Debug */, + 8EF82BFDB1FEA15559440E03C2B42DD9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9D52E855CC97E60F0F78316BD0026172 /* Build configuration list for PBXNativeTarget "Pods-FirebaseFacebookTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FC9ED877C29211C058B1DA6B091A562F /* Debug */, + 4B4C7387EB05787DE415501BE9DDF7CF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C7FB8241B29C123F68EA458CAC81519B /* Build configuration list for PBXNativeTarget "Pods-FirebaseFacebook" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B19FA2D3C74F02F2C1CF8C0529A25B38 /* Debug */, + CB16E9B7D33D19458FA2ED06961917A6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + CBEBB824215B9763F0875C8A32E6B6D4 /* Build configuration list for PBXNativeTarget "FacebookCore" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FCD7BE619347EBCF4E8FB16A0DFBCF67 /* Debug */, + FAB81C81580D45CA69AF859CFE7EA4DF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/Bolts.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/Bolts.xcscheme new file mode 100644 index 0000000..9dfb418 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/Bolts.xcscheme @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/FBSDKCoreKit.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/FBSDKCoreKit.xcscheme new file mode 100644 index 0000000..0560e50 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/FBSDKCoreKit.xcscheme @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/FBSDKLoginKit.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/FBSDKLoginKit.xcscheme new file mode 100644 index 0000000..81bbe8b --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/FBSDKLoginKit.xcscheme @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/FacebookCore.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/FacebookCore.xcscheme new file mode 100644 index 0000000..e55b9af --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/FacebookCore.xcscheme @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/FacebookLogin.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/FacebookLogin.xcscheme new file mode 100644 index 0000000..dd69ed1 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/FacebookLogin.xcscheme @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/Pods-FirebaseFacebook.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/Pods-FirebaseFacebook.xcscheme new file mode 100644 index 0000000..45fa045 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/Pods-FirebaseFacebook.xcscheme @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/Pods-FirebaseFacebookTests.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/Pods-FirebaseFacebookTests.xcscheme new file mode 100644 index 0000000..9456c0e --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/Pods-FirebaseFacebookTests.xcscheme @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/Pods-FirebaseFacebookUITests.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/Pods-FirebaseFacebookUITests.xcscheme new file mode 100644 index 0000000..08e4806 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/Pods-FirebaseFacebookUITests.xcscheme @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/xcschememanagement.plist b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..5e1f021 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/andrewseeley.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,67 @@ + + + + + SchemeUserState + + Bolts.xcscheme + + isShown + + orderHint + 0 + + FBSDKCoreKit.xcscheme + + isShown + + orderHint + 3 + + FBSDKLoginKit.xcscheme + + isShown + + orderHint + 4 + + FacebookCore.xcscheme + + isShown + + orderHint + 1 + + FacebookLogin.xcscheme + + isShown + + orderHint + 2 + + Pods-FirebaseFacebook.xcscheme + + isShown + + orderHint + 5 + + Pods-FirebaseFacebookTests.xcscheme + + isShown + + orderHint + 6 + + Pods-FirebaseFacebookUITests.xcscheme + + isShown + + orderHint + 7 + + + SuppressBuildableAutocreation + + + diff --git a/Pods/Target Support Files/Bolts/Bolts-dummy.m b/Pods/Target Support Files/Bolts/Bolts-dummy.m new file mode 100644 index 0000000..aeabf61 --- /dev/null +++ b/Pods/Target Support Files/Bolts/Bolts-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Bolts : NSObject +@end +@implementation PodsDummy_Bolts +@end diff --git a/Pods/Target Support Files/Bolts/Bolts-prefix.pch b/Pods/Target Support Files/Bolts/Bolts-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/Bolts/Bolts-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Pods/Target Support Files/Bolts/Bolts-umbrella.h b/Pods/Target Support Files/Bolts/Bolts-umbrella.h new file mode 100644 index 0000000..8a92beb --- /dev/null +++ b/Pods/Target Support Files/Bolts/Bolts-umbrella.h @@ -0,0 +1,33 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "BFAppLink.h" +#import "BFAppLinkNavigation.h" +#import "BFAppLinkResolving.h" +#import "BFAppLinkReturnToRefererController.h" +#import "BFAppLinkReturnToRefererView.h" +#import "BFAppLinkTarget.h" +#import "BFMeasurementEvent.h" +#import "BFURL.h" +#import "BFWebViewAppLinkResolver.h" +#import "BFCancellationToken.h" +#import "BFCancellationTokenRegistration.h" +#import "BFCancellationTokenSource.h" +#import "BFExecutor.h" +#import "BFGeneric.h" +#import "BFTask.h" +#import "BFTaskCompletionSource.h" +#import "Bolts.h" + +FOUNDATION_EXPORT double BoltsVersionNumber; +FOUNDATION_EXPORT const unsigned char BoltsVersionString[]; + diff --git a/Pods/Target Support Files/Bolts/Bolts.modulemap b/Pods/Target Support Files/Bolts/Bolts.modulemap new file mode 100644 index 0000000..712e2c8 --- /dev/null +++ b/Pods/Target Support Files/Bolts/Bolts.modulemap @@ -0,0 +1,6 @@ +framework module Bolts { + umbrella header "Bolts-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Bolts/Bolts.xcconfig b/Pods/Target Support Files/Bolts/Bolts.xcconfig new file mode 100644 index 0000000..cbb589b --- /dev/null +++ b/Pods/Target Support Files/Bolts/Bolts.xcconfig @@ -0,0 +1,9 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Bolts +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/Bolts +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/Bolts/Info.plist b/Pods/Target Support Files/Bolts/Info.plist new file mode 100644 index 0000000..62cf7b2 --- /dev/null +++ b/Pods/Target Support Files/Bolts/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.9.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-dummy.m b/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-dummy.m new file mode 100644 index 0000000..eb4f9df --- /dev/null +++ b/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_FBSDKCoreKit : NSObject +@end +@implementation PodsDummy_FBSDKCoreKit +@end diff --git a/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-prefix.pch b/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h b/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h new file mode 100644 index 0000000..47b0bfe --- /dev/null +++ b/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h @@ -0,0 +1,45 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "FBSDKAccessToken.h" +#import "FBSDKAppEvents.h" +#import "FBSDKApplicationDelegate.h" +#import "FBSDKAppLink.h" +#import "FBSDKAppLinkNavigation.h" +#import "FBSDKAppLinkResolver.h" +#import "FBSDKAppLinkResolving.h" +#import "FBSDKAppLinkReturnToRefererController.h" +#import "FBSDKAppLinkReturnToRefererView.h" +#import "FBSDKAppLinkTarget.h" +#import "FBSDKAppLinkUtility.h" +#import "FBSDKButton.h" +#import "FBSDKConstants.h" +#import "FBSDKCopying.h" +#import "FBSDKCoreKit.h" +#import "FBSDKGraphErrorRecoveryProcessor.h" +#import "FBSDKGraphRequest.h" +#import "FBSDKGraphRequestConnection.h" +#import "FBSDKGraphRequestDataAttachment.h" +#import "FBSDKMacros.h" +#import "FBSDKMeasurementEvent.h" +#import "FBSDKMutableCopying.h" +#import "FBSDKProfile.h" +#import "FBSDKProfilePictureView.h" +#import "FBSDKSettings.h" +#import "FBSDKTestUsersManager.h" +#import "FBSDKURL.h" +#import "FBSDKUtility.h" +#import "FBSDKWebViewAppLinkResolver.h" + +FOUNDATION_EXPORT double FBSDKCoreKitVersionNumber; +FOUNDATION_EXPORT const unsigned char FBSDKCoreKitVersionString[]; + diff --git a/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit.modulemap b/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit.modulemap new file mode 100644 index 0000000..f9847ad --- /dev/null +++ b/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit.modulemap @@ -0,0 +1,6 @@ +framework module FBSDKCoreKit { + umbrella header "FBSDKCoreKit-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit.xcconfig b/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit.xcconfig new file mode 100644 index 0000000..ff7d3a9 --- /dev/null +++ b/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit.xcconfig @@ -0,0 +1,11 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBSDKCoreKit +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/FBSDKCoreKit/Info.plist b/Pods/Target Support Files/FBSDKCoreKit/Info.plist new file mode 100644 index 0000000..829a19b --- /dev/null +++ b/Pods/Target Support Files/FBSDKCoreKit/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 4.40.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-dummy.m b/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-dummy.m new file mode 100644 index 0000000..ff16b39 --- /dev/null +++ b/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_FBSDKLoginKit : NSObject +@end +@implementation PodsDummy_FBSDKLoginKit +@end diff --git a/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-prefix.pch b/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-umbrella.h b/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-umbrella.h new file mode 100644 index 0000000..b68b38c --- /dev/null +++ b/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-umbrella.h @@ -0,0 +1,26 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "FBSDKDeviceLoginCodeInfo.h" +#import "FBSDKDeviceLoginManager.h" +#import "FBSDKDeviceLoginManagerResult.h" +#import "FBSDKLoginButton.h" +#import "FBSDKLoginConstants.h" +#import "FBSDKLoginKit.h" +#import "FBSDKLoginManager.h" +#import "FBSDKLoginManagerLoginResult.h" +#import "FBSDKLoginTooltipView.h" +#import "FBSDKTooltipView.h" + +FOUNDATION_EXPORT double FBSDKLoginKitVersionNumber; +FOUNDATION_EXPORT const unsigned char FBSDKLoginKitVersionString[]; + diff --git a/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit.modulemap b/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit.modulemap new file mode 100644 index 0000000..ce4ca1e --- /dev/null +++ b/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit.modulemap @@ -0,0 +1,6 @@ +framework module FBSDKLoginKit { + umbrella header "FBSDKLoginKit-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit.xcconfig b/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit.xcconfig new file mode 100644 index 0000000..d19ec17 --- /dev/null +++ b/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit.xcconfig @@ -0,0 +1,12 @@ +CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -weak_framework "Accounts" -weak_framework "AudioToolbox" -weak_framework "CoreGraphics" -weak_framework "CoreLocation" -weak_framework "Foundation" -weak_framework "QuartzCore" -weak_framework "Security" -weak_framework "Social" -weak_framework "UIKit" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBSDKLoginKit +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/FBSDKLoginKit/Info.plist b/Pods/Target Support Files/FBSDKLoginKit/Info.plist new file mode 100644 index 0000000..829a19b --- /dev/null +++ b/Pods/Target Support Files/FBSDKLoginKit/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 4.40.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/FacebookCore/FacebookCore-dummy.m b/Pods/Target Support Files/FacebookCore/FacebookCore-dummy.m new file mode 100644 index 0000000..7de9501 --- /dev/null +++ b/Pods/Target Support Files/FacebookCore/FacebookCore-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_FacebookCore : NSObject +@end +@implementation PodsDummy_FacebookCore +@end diff --git a/Pods/Target Support Files/FacebookCore/FacebookCore-prefix.pch b/Pods/Target Support Files/FacebookCore/FacebookCore-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/FacebookCore/FacebookCore-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Pods/Target Support Files/FacebookCore/FacebookCore-umbrella.h b/Pods/Target Support Files/FacebookCore/FacebookCore-umbrella.h new file mode 100644 index 0000000..2829128 --- /dev/null +++ b/Pods/Target Support Files/FacebookCore/FacebookCore-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double FacebookCoreVersionNumber; +FOUNDATION_EXPORT const unsigned char FacebookCoreVersionString[]; + diff --git a/Pods/Target Support Files/FacebookCore/FacebookCore.modulemap b/Pods/Target Support Files/FacebookCore/FacebookCore.modulemap new file mode 100644 index 0000000..7467294 --- /dev/null +++ b/Pods/Target Support Files/FacebookCore/FacebookCore.modulemap @@ -0,0 +1,6 @@ +framework module FacebookCore { + umbrella header "FacebookCore-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/FacebookCore/FacebookCore.xcconfig b/Pods/Target Support Files/FacebookCore/FacebookCore.xcconfig new file mode 100644 index 0000000..94c0c53 --- /dev/null +++ b/Pods/Target Support Files/FacebookCore/FacebookCore.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore +ENABLE_TESTABILITY = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/FacebookCore +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/FacebookCore/Info.plist b/Pods/Target Support Files/FacebookCore/Info.plist new file mode 100644 index 0000000..324eeb2 --- /dev/null +++ b/Pods/Target Support Files/FacebookCore/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.5.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/FacebookLogin/FacebookLogin-dummy.m b/Pods/Target Support Files/FacebookLogin/FacebookLogin-dummy.m new file mode 100644 index 0000000..0f2e1d0 --- /dev/null +++ b/Pods/Target Support Files/FacebookLogin/FacebookLogin-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_FacebookLogin : NSObject +@end +@implementation PodsDummy_FacebookLogin +@end diff --git a/Pods/Target Support Files/FacebookLogin/FacebookLogin-prefix.pch b/Pods/Target Support Files/FacebookLogin/FacebookLogin-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/FacebookLogin/FacebookLogin-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Pods/Target Support Files/FacebookLogin/FacebookLogin-umbrella.h b/Pods/Target Support Files/FacebookLogin/FacebookLogin-umbrella.h new file mode 100644 index 0000000..1b56ecd --- /dev/null +++ b/Pods/Target Support Files/FacebookLogin/FacebookLogin-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double FacebookLoginVersionNumber; +FOUNDATION_EXPORT const unsigned char FacebookLoginVersionString[]; + diff --git a/Pods/Target Support Files/FacebookLogin/FacebookLogin.modulemap b/Pods/Target Support Files/FacebookLogin/FacebookLogin.modulemap new file mode 100644 index 0000000..80281ab --- /dev/null +++ b/Pods/Target Support Files/FacebookLogin/FacebookLogin.modulemap @@ -0,0 +1,6 @@ +framework module FacebookLogin { + umbrella header "FacebookLogin-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/FacebookLogin/FacebookLogin.xcconfig b/Pods/Target Support Files/FacebookLogin/FacebookLogin.xcconfig new file mode 100644 index 0000000..681fa3b --- /dev/null +++ b/Pods/Target Support Files/FacebookLogin/FacebookLogin.xcconfig @@ -0,0 +1,11 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/FacebookLogin +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/FacebookLogin/Info.plist b/Pods/Target Support Files/FacebookLogin/Info.plist new file mode 100644 index 0000000..324eeb2 --- /dev/null +++ b/Pods/Target Support Files/FacebookLogin/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.5.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-FirebaseFacebook/Info.plist b/Pods/Target Support Files/Pods-FirebaseFacebook/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebook/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-acknowledgements.markdown b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-acknowledgements.markdown new file mode 100644 index 0000000..515b1eb --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-acknowledgements.markdown @@ -0,0 +1,124 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## Bolts + +BSD License + +For Bolts software + +Copyright (c) 2013-present, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +## FBSDKCoreKit + +Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + +You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +copy, modify, and distribute this software in source code or binary form for use +in connection with the web services and APIs provided by Facebook. + +As with any software that integrates with the Facebook platform, your use of +this software is subject to the Facebook Developer Principles and Policies +[http://developers.facebook.com/policy/]. This copyright notice shall be +included in all copies or substantial portions of the software. + +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. + + +## FBSDKLoginKit + +Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + +You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +copy, modify, and distribute this software in source code or binary form for use +in connection with the web services and APIs provided by Facebook. + +As with any software that integrates with the Facebook platform, your use of +this software is subject to the Facebook Developer Principles and Policies +[http://developers.facebook.com/policy/]. This copyright notice shall be +included in all copies or substantial portions of the software. + +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. + + +## FacebookCore + +Copyright (c) 2016-present, Facebook, Inc. All rights reserved. + +For Facebook Swift SDK software + +You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +copy, modify, and distribute this software in source code or binary form for use +in connection with the web services and APIs provided by Facebook. + +As with any software that integrates with the Facebook platform, your use of +this software is subject to the Facebook Developer Principles and Policies +[http://developers.facebook.com/policy/]. This copyright notice shall be +included in all copies or substantial portions of the software. + +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. + + +## FacebookLogin + +Copyright (c) 2016-present, Facebook, Inc. All rights reserved. + +For Facebook Swift SDK software + +You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +copy, modify, and distribute this software in source code or binary form for use +in connection with the web services and APIs provided by Facebook. + +As with any software that integrates with the Facebook platform, your use of +this software is subject to the Facebook Developer Principles and Policies +[http://developers.facebook.com/policy/]. This copyright notice shall be +included in all copies or substantial portions of the software. + +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. + +Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-acknowledgements.plist b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-acknowledgements.plist new file mode 100644 index 0000000..1d6385b --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-acknowledgements.plist @@ -0,0 +1,180 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + BSD License + +For Bolts software + +Copyright (c) 2013-present, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + License + BSD + Title + Bolts + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + +You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +copy, modify, and distribute this software in source code or binary form for use +in connection with the web services and APIs provided by Facebook. + +As with any software that integrates with the Facebook platform, your use of +this software is subject to the Facebook Developer Principles and Policies +[http://developers.facebook.com/policy/]. This copyright notice shall be +included in all copies or substantial portions of the software. + +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. + + License + Facebook Platform License + Title + FBSDKCoreKit + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + +You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +copy, modify, and distribute this software in source code or binary form for use +in connection with the web services and APIs provided by Facebook. + +As with any software that integrates with the Facebook platform, your use of +this software is subject to the Facebook Developer Principles and Policies +[http://developers.facebook.com/policy/]. This copyright notice shall be +included in all copies or substantial portions of the software. + +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. + + License + Facebook Platform License + Title + FBSDKLoginKit + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2016-present, Facebook, Inc. All rights reserved. + +For Facebook Swift SDK software + +You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +copy, modify, and distribute this software in source code or binary form for use +in connection with the web services and APIs provided by Facebook. + +As with any software that integrates with the Facebook platform, your use of +this software is subject to the Facebook Developer Principles and Policies +[http://developers.facebook.com/policy/]. This copyright notice shall be +included in all copies or substantial portions of the software. + +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. + + License + Facebook Platform License + Title + FacebookCore + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2016-present, Facebook, Inc. All rights reserved. + +For Facebook Swift SDK software + +You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +copy, modify, and distribute this software in source code or binary form for use +in connection with the web services and APIs provided by Facebook. + +As with any software that integrates with the Facebook platform, your use of +this software is subject to the Facebook Developer Principles and Policies +[http://developers.facebook.com/policy/]. This copyright notice shall be +included in all copies or substantial portions of the software. + +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. + + License + Facebook Platform License + Title + FacebookLogin + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-dummy.m b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-dummy.m new file mode 100644 index 0000000..7ab154b --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_FirebaseFacebook : NSObject +@end +@implementation PodsDummy_Pods_FirebaseFacebook +@end diff --git a/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-frameworks.sh b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-frameworks.sh new file mode 100755 index 0000000..b82324a --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-frameworks.sh @@ -0,0 +1,152 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=1 +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/Bolts/Bolts.framework" + install_framework "${BUILT_PRODUCTS_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework" + install_framework "${BUILT_PRODUCTS_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework" + install_framework "${BUILT_PRODUCTS_DIR}/FacebookCore/FacebookCore.framework" + install_framework "${BUILT_PRODUCTS_DIR}/FacebookLogin/FacebookLogin.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/Bolts/Bolts.framework" + install_framework "${BUILT_PRODUCTS_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework" + install_framework "${BUILT_PRODUCTS_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework" + install_framework "${BUILT_PRODUCTS_DIR}/FacebookCore/FacebookCore.framework" + install_framework "${BUILT_PRODUCTS_DIR}/FacebookLogin/FacebookLogin.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-resources.sh b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-resources.sh new file mode 100755 index 0000000..a7df440 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-resources.sh @@ -0,0 +1,106 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-umbrella.h b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-umbrella.h new file mode 100644 index 0000000..9359bb2 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_FirebaseFacebookVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_FirebaseFacebookVersionString[]; + diff --git a/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.debug.xcconfig b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.debug.xcconfig new file mode 100644 index 0000000..285aaff --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.debug.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Bolts/Bolts.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore/FacebookCore.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin/FacebookLogin.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Bolts" -framework "FBSDKCoreKit" -framework "FBSDKLoginKit" -framework "FacebookCore" -framework "FacebookLogin" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.modulemap b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.modulemap new file mode 100644 index 0000000..4e00766 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.modulemap @@ -0,0 +1,6 @@ +framework module Pods_FirebaseFacebook { + umbrella header "Pods-FirebaseFacebook-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.release.xcconfig b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.release.xcconfig new file mode 100644 index 0000000..285aaff --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebook/Pods-FirebaseFacebook.release.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Bolts/Bolts.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore/FacebookCore.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin/FacebookLogin.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Bolts" -framework "FBSDKCoreKit" -framework "FBSDKLoginKit" -framework "FacebookCore" -framework "FacebookLogin" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookTests/Info.plist b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-acknowledgements.markdown b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-acknowledgements.markdown new file mode 100644 index 0000000..102af75 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-acknowledgements.markdown @@ -0,0 +1,3 @@ +# Acknowledgements +This application makes use of the following third party libraries: +Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-acknowledgements.plist b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-acknowledgements.plist new file mode 100644 index 0000000..7acbad1 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-acknowledgements.plist @@ -0,0 +1,29 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-dummy.m b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-dummy.m new file mode 100644 index 0000000..5098308 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_FirebaseFacebookTests : NSObject +@end +@implementation PodsDummy_Pods_FirebaseFacebookTests +@end diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-frameworks.sh b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-frameworks.sh new file mode 100755 index 0000000..881cbae --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-frameworks.sh @@ -0,0 +1,137 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=1 +} + +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-resources.sh b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-resources.sh new file mode 100755 index 0000000..a7df440 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-resources.sh @@ -0,0 +1,106 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-umbrella.h b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-umbrella.h new file mode 100644 index 0000000..54147db --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_FirebaseFacebookTestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_FirebaseFacebookTestsVersionString[]; + diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.debug.xcconfig b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.debug.xcconfig new file mode 100644 index 0000000..0322292 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.debug.xcconfig @@ -0,0 +1,8 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Bolts/Bolts.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore/FacebookCore.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin/FacebookLogin.framework/Headers" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.modulemap b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.modulemap new file mode 100644 index 0000000..dd982ec --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_FirebaseFacebookTests { + umbrella header "Pods-FirebaseFacebookTests-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.release.xcconfig b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.release.xcconfig new file mode 100644 index 0000000..0322292 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookTests/Pods-FirebaseFacebookTests.release.xcconfig @@ -0,0 +1,8 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Bolts/Bolts.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore/FacebookCore.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin/FacebookLogin.framework/Headers" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Info.plist b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-acknowledgements.markdown b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-acknowledgements.markdown new file mode 100644 index 0000000..102af75 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-acknowledgements.markdown @@ -0,0 +1,3 @@ +# Acknowledgements +This application makes use of the following third party libraries: +Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-acknowledgements.plist b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-acknowledgements.plist new file mode 100644 index 0000000..7acbad1 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-acknowledgements.plist @@ -0,0 +1,29 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-dummy.m b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-dummy.m new file mode 100644 index 0000000..896cef8 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_FirebaseFacebookUITests : NSObject +@end +@implementation PodsDummy_Pods_FirebaseFacebookUITests +@end diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-frameworks.sh b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-frameworks.sh new file mode 100755 index 0000000..881cbae --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-frameworks.sh @@ -0,0 +1,137 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=1 +} + +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-resources.sh b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-resources.sh new file mode 100755 index 0000000..a7df440 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-resources.sh @@ -0,0 +1,106 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-umbrella.h b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-umbrella.h new file mode 100644 index 0000000..25d023b --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_FirebaseFacebookUITestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_FirebaseFacebookUITestsVersionString[]; + diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.debug.xcconfig b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.debug.xcconfig new file mode 100644 index 0000000..0322292 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.debug.xcconfig @@ -0,0 +1,8 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Bolts/Bolts.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore/FacebookCore.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin/FacebookLogin.framework/Headers" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.modulemap b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.modulemap new file mode 100644 index 0000000..1477f04 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_FirebaseFacebookUITests { + umbrella header "Pods-FirebaseFacebookUITests-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.release.xcconfig b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.release.xcconfig new file mode 100644 index 0000000..0322292 --- /dev/null +++ b/Pods/Target Support Files/Pods-FirebaseFacebookUITests/Pods-FirebaseFacebookUITests.release.xcconfig @@ -0,0 +1,8 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Bolts" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit" "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore" "${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Bolts/Bolts.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FacebookCore/FacebookCore.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FacebookLogin/FacebookLogin.framework/Headers" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods