- update
This commit is contained in:
1 parent
1bf4b9ef1d
commit
4e66c377fd
664 files changed
+14818
-10172
No files matched your search
@@ -0,0 +1 @@
|
||||
2.3
|
||||
@@ -7,6 +7,7 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3F3C53CB2D851F471BE8A604 /* Pods_PNObject_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89BBA9195EECA9F4625BB1DC /* Pods_PNObject_Example.framework */; };
|
||||
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
|
||||
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
|
||||
6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
|
||||
@@ -20,8 +21,7 @@
|
||||
6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
|
||||
6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
|
||||
6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; };
|
||||
DA43246C4FB8B8B587FC2343 /* Pods_PNObject_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CB6B6AE8DC4C8FBEC56DD55 /* Pods_PNObject_Tests.framework */; };
|
||||
E1806AD43C05C089D52D136E /* Pods_PNObject_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D73089A9DA261B19C7C342EA /* Pods_PNObject_Example.framework */; };
|
||||
60D833DF200A0D946F2E8C4D /* Pods_PNObject_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CAD2FCF55030EAE61415B480 /* Pods_PNObject_Tests.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -35,9 +35,8 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
02B34A3054AF72076F57C9F2 /* Pods-PNObject_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PNObject_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example.release.xcconfig"; sourceTree = "<group>"; };
|
||||
0D4ADFA41B2B242C25CEC692 /* Pods-PNObject_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PNObject_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
5CB6B6AE8DC4C8FBEC56DD55 /* Pods_PNObject_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PNObject_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2DBDB9BA06776F1FFBD6EDC3 /* Pods-PNObject_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PNObject_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
4082E2E9CCB7F56C1A30AF72 /* Pods-PNObject_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PNObject_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example.release.xcconfig"; sourceTree = "<group>"; };
|
||||
6003F58A195388D20070C39A /* PNObject_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PNObject_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
@@ -57,12 +56,14 @@
|
||||
6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; };
|
||||
606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
|
||||
6ADA851464A35438E6A21617 /* Pods-PNObject_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PNObject_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
6805F44B1DF6DCC600C79B18 /* PNObject_Example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PNObject_Example.entitlements; sourceTree = "<group>"; };
|
||||
75FCB4EFD17838CCA4C93E4A /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
|
||||
89BBA9195EECA9F4625BB1DC /* Pods_PNObject_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PNObject_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8C017F9292D546DE8DBC84F8 /* PNObject.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = PNObject.podspec; path = ../PNObject.podspec; sourceTree = "<group>"; };
|
||||
9984F97E974B595ED43BA3E3 /* Pods-PNObject_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PNObject_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
9898F9E5E65D3B402429FD73 /* Pods-PNObject_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PNObject_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
9F4B24EF58CA8BC69BFC569B /* Pods-PNObject_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PNObject_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
BA17B1571B43FAFAA8B45B6D /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
|
||||
D73089A9DA261B19C7C342EA /* Pods_PNObject_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PNObject_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
CAD2FCF55030EAE61415B480 /* Pods_PNObject_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PNObject_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DE7587A588720F0590F50755 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -74,7 +75,7 @@
|
||||
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
|
||||
6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
|
||||
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
|
||||
E1806AD43C05C089D52D136E /* Pods_PNObject_Example.framework in Frameworks */,
|
||||
3F3C53CB2D851F471BE8A604 /* Pods_PNObject_Example.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -85,22 +86,34 @@
|
||||
6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */,
|
||||
6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */,
|
||||
6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */,
|
||||
DA43246C4FB8B8B587FC2343 /* Pods_PNObject_Tests.framework in Frameworks */,
|
||||
60D833DF200A0D946F2E8C4D /* Pods_PNObject_Tests.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
2DE160677BF4961C3D433201 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9898F9E5E65D3B402429FD73 /* Pods-PNObject_Example.debug.xcconfig */,
|
||||
4082E2E9CCB7F56C1A30AF72 /* Pods-PNObject_Example.release.xcconfig */,
|
||||
9F4B24EF58CA8BC69BFC569B /* Pods-PNObject_Tests.debug.xcconfig */,
|
||||
2DBDB9BA06776F1FFBD6EDC3 /* Pods-PNObject_Tests.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6003F581195388D10070C39A = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6805F44B1DF6DCC600C79B18 /* PNObject_Example.entitlements */,
|
||||
60FF7A9C1954A5C5007DD14C /* Podspec Metadata */,
|
||||
6003F593195388D20070C39A /* Example for PNObject */,
|
||||
6003F5B5195388D20070C39A /* Tests */,
|
||||
6003F58C195388D20070C39A /* Frameworks */,
|
||||
6003F58B195388D20070C39A /* Products */,
|
||||
700947C2A719D2A125954296 /* Pods */,
|
||||
2DE160677BF4961C3D433201 /* Pods */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -121,8 +134,8 @@
|
||||
6003F591195388D20070C39A /* UIKit.framework */,
|
||||
6003F5AF195388D20070C39A /* XCTest.framework */,
|
||||
DE7587A588720F0590F50755 /* Pods.framework */,
|
||||
D73089A9DA261B19C7C342EA /* Pods_PNObject_Example.framework */,
|
||||
5CB6B6AE8DC4C8FBEC56DD55 /* Pods_PNObject_Tests.framework */,
|
||||
89BBA9195EECA9F4625BB1DC /* Pods_PNObject_Example.framework */,
|
||||
CAD2FCF55030EAE61415B480 /* Pods_PNObject_Tests.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@@ -181,17 +194,6 @@
|
||||
name = "Podspec Metadata";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
700947C2A719D2A125954296 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6ADA851464A35438E6A21617 /* Pods-PNObject_Example.debug.xcconfig */,
|
||||
02B34A3054AF72076F57C9F2 /* Pods-PNObject_Example.release.xcconfig */,
|
||||
0D4ADFA41B2B242C25CEC692 /* Pods-PNObject_Tests.debug.xcconfig */,
|
||||
9984F97E974B595ED43BA3E3 /* Pods-PNObject_Tests.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -199,13 +201,12 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "PNObject_Example" */;
|
||||
buildPhases = (
|
||||
647B517E2FE18AF68E8B23C3 /* 📦 Check Pods Manifest.lock */,
|
||||
387C1DBC7D3E0673105ED546 /* [CP] Check Pods Manifest.lock */,
|
||||
6003F586195388D20070C39A /* Sources */,
|
||||
6003F587195388D20070C39A /* Frameworks */,
|
||||
6003F588195388D20070C39A /* Resources */,
|
||||
43252B3B955A9E6FDF55EF8C /* 📦 Embed Pods Frameworks */,
|
||||
12D318BA313DC2FC036858CF /* 📦 Copy Pods Resources */,
|
||||
5B0DE642CBEC93B376D9DE7D /* Embed Pods Frameworks */,
|
||||
3695565DCFF7D29C95488878 /* [CP] Embed Pods Frameworks */,
|
||||
B84699CAD21D4AE39D658EC6 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -220,13 +221,12 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "PNObject_Tests" */;
|
||||
buildPhases = (
|
||||
13BC374C48C25E4BE960A7C4 /* 📦 Check Pods Manifest.lock */,
|
||||
F5E57EFDD9ADE887CAAAC837 /* [CP] Check Pods Manifest.lock */,
|
||||
6003F5AA195388D20070C39A /* Sources */,
|
||||
6003F5AB195388D20070C39A /* Frameworks */,
|
||||
6003F5AC195388D20070C39A /* Resources */,
|
||||
66B08B1481C5994108A958AF /* 📦 Embed Pods Frameworks */,
|
||||
5B13AE8F18948BE84DDA2DC9 /* 📦 Copy Pods Resources */,
|
||||
1B536F1CF4938475D823C8DD /* Embed Pods Frameworks */,
|
||||
31A4834C1FAEFDFFFAEC6297 /* [CP] Embed Pods Frameworks */,
|
||||
C2D74CFB72423672ACF097D4 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -245,7 +245,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = PNObject;
|
||||
LastUpgradeCheck = 0720;
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = "Giuseppe Nucifora";
|
||||
TargetAttributes = {
|
||||
6003F589195388D20070C39A = {
|
||||
@@ -301,14 +301,59 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
12D318BA313DC2FC036858CF /* 📦 Copy Pods Resources */ = {
|
||||
31A4834C1FAEFDFFFAEC6297 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Copy Pods Resources";
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
3695565DCFF7D29C95488878 /* [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-PNObject_Example/Pods-PNObject_Example-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
387C1DBC7D3E0673105ED546 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../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";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
B84699CAD21D4AE39D658EC6 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -316,74 +361,14 @@
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
13BC374C48C25E4BE960A7C4 /* 📦 Check Pods Manifest.lock */ = {
|
||||
C2D74CFB72423672ACF097D4 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
1B536F1CF4938475D823C8DD /* Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
43252B3B955A9E6FDF55EF8C /* 📦 Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 12;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
5B0DE642CBEC93B376D9DE7D /* Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Example/Pods-PNObject_Example-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
5B13AE8F18948BE84DDA2DC9 /* 📦 Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Copy Pods Resources";
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -391,34 +376,19 @@
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
647B517E2FE18AF68E8B23C3 /* 📦 Check Pods Manifest.lock */ = {
|
||||
F5E57EFDD9ADE887CAAAC837 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Check Pods Manifest.lock";
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
66B08B1481C5994108A958AF /* 📦 Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests-frameworks.sh\"\n";
|
||||
shellScript = "diff \"${PODS_ROOT}/../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";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
@@ -485,14 +455,19 @@
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
@@ -506,7 +481,7 @@
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
@@ -525,13 +500,18 @@
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
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;
|
||||
@@ -547,10 +527,11 @@
|
||||
};
|
||||
6003F5C0195388D20070C39A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 6ADA851464A35438E6A21617 /* Pods-PNObject_Example.debug.xcconfig */;
|
||||
baseConfigurationReference = 9898F9E5E65D3B402429FD73 /* Pods-PNObject_Example.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = PNObject_Example.entitlements;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "PNObject/PNObject-Prefix.pch";
|
||||
INFOPLIST_FILE = "PNObject/PNObject-Info.plist";
|
||||
@@ -564,10 +545,11 @@
|
||||
};
|
||||
6003F5C1195388D20070C39A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 02B34A3054AF72076F57C9F2 /* Pods-PNObject_Example.release.xcconfig */;
|
||||
baseConfigurationReference = 4082E2E9CCB7F56C1A30AF72 /* Pods-PNObject_Example.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_ENTITLEMENTS = PNObject_Example.entitlements;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "PNObject/PNObject-Prefix.pch";
|
||||
INFOPLIST_FILE = "PNObject/PNObject-Info.plist";
|
||||
@@ -581,8 +563,9 @@
|
||||
};
|
||||
6003F5C3195388D20070C39A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 0D4ADFA41B2B242C25CEC692 /* Pods-PNObject_Tests.debug.xcconfig */;
|
||||
baseConfigurationReference = 9F4B24EF58CA8BC69BFC569B /* Pods-PNObject_Tests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
@@ -605,8 +588,9 @@
|
||||
};
|
||||
6003F5C4195388D20070C39A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9984F97E974B595ED43BA3E3 /* Pods-PNObject_Tests.release.xcconfig */;
|
||||
baseConfigurationReference = 2DBDB9BA06776F1FFBD6EDC3 /* Pods-PNObject_Tests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0730"
|
||||
LastUpgradeVersion = "0820"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "0D16AB9035733B66D1E42542FCF79AEB110EE3F1",
|
||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
|
||||
|
||||
},
|
||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
|
||||
"0D16AB9035733B66D1E42542FCF79AEB110EE3F1" : 0,
|
||||
"AEB0552E99BCD7202184FC09F243A3865259D36E" : 0
|
||||
},
|
||||
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "F9984EE9-FBF8-4451-8C8E-EB0CA1AB5EC0",
|
||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
|
||||
"0D16AB9035733B66D1E42542FCF79AEB110EE3F1" : "PNObject\/",
|
||||
"AEB0552E99BCD7202184FC09F243A3865259D36E" : "..\/..\/..\/Purplenetwork\/GIT\/iOS\/packman-ios"
|
||||
},
|
||||
"DVTSourceControlWorkspaceBlueprintNameKey" : "PNObject",
|
||||
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
|
||||
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Example\/PNObject.xcworkspace",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
|
||||
{
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "git.giuseppenucifora.com:giuseppenucifora\/PNObject.git",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "0D16AB9035733B66D1E42542FCF79AEB110EE3F1"
|
||||
},
|
||||
{
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "git.giuseppenucifora.com:purplenetwork\/packman-ios.git",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "AEB0552E99BCD7202184FC09F243A3865259D36E"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -45,6 +45,8 @@
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
PNObjectViewController *viewController = [[PNObjectViewController alloc] init];
|
||||
|
||||
switch ([[UIDevice currentDevice] deviceFamily]) {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
</dict>
|
||||
</plist>
|
||||
+33
-32
@@ -14,33 +14,33 @@ PODS:
|
||||
- AFNetworking/Serialization (3.1.0)
|
||||
- AFNetworking/UIKit (3.1.0):
|
||||
- AFNetworking/NSURLSession
|
||||
- Bolts (1.7.0):
|
||||
- Bolts/AppLinks (= 1.7.0)
|
||||
- Bolts/Tasks (= 1.7.0)
|
||||
- Bolts/AppLinks (1.7.0):
|
||||
- Bolts (1.8.4):
|
||||
- Bolts/AppLinks (= 1.8.4)
|
||||
- Bolts/Tasks (= 1.8.4)
|
||||
- Bolts/AppLinks (1.8.4):
|
||||
- Bolts/Tasks
|
||||
- Bolts/Tasks (1.7.0)
|
||||
- Bolts/Tasks (1.8.4)
|
||||
- CocoaSecurity (1.2.4)
|
||||
- CodFis-Helper (0.1.3)
|
||||
- DJLocalization (1.2.0):
|
||||
- JRSwizzle
|
||||
- DJLocalization (1.2.2):
|
||||
- DJLocalization/Core (= 1.2.2)
|
||||
- DJLocalization/Core (1.2.2)
|
||||
- Expecta (1.0.5)
|
||||
- Expecta+Snapshots (3.0.0):
|
||||
- Expecta (~> 1.0)
|
||||
- FBSnapshotTestCase/Core (~> 2.0)
|
||||
- Specta (~> 1.0)
|
||||
- FBSDKCoreKit (4.11.0):
|
||||
- FBSDKCoreKit (4.18.0):
|
||||
- Bolts (~> 1.7)
|
||||
- FBSDKLoginKit (4.11.0):
|
||||
- FBSDKLoginKit (4.18.0):
|
||||
- FBSDKCoreKit
|
||||
- FBSDKShareKit (4.11.0):
|
||||
- FBSDKShareKit (4.18.0):
|
||||
- FBSDKCoreKit
|
||||
- FBSnapshotTestCase (2.1.0):
|
||||
- FBSnapshotTestCase/SwiftSupport (= 2.1.0)
|
||||
- FBSnapshotTestCase/Core (2.1.0)
|
||||
- FBSnapshotTestCase/SwiftSupport (2.1.0):
|
||||
- FBSnapshotTestCase (2.1.4):
|
||||
- FBSnapshotTestCase/SwiftSupport (= 2.1.4)
|
||||
- FBSnapshotTestCase/Core (2.1.4)
|
||||
- FBSnapshotTestCase/SwiftSupport (2.1.4):
|
||||
- FBSnapshotTestCase/Core
|
||||
- JRSwizzle (1.0)
|
||||
- NACrypto (1.0.6)
|
||||
- NSDate_Utils (0.1.3)
|
||||
- NSString-Helper (1.0.5)
|
||||
@@ -48,7 +48,7 @@ PODS:
|
||||
- CocoaSecurity (~> 1.2.2)
|
||||
- nv-ios-http-status (0.0.1)
|
||||
- PEAR-FileManager-iOS (1.3.1)
|
||||
- PNObject (0.8.0):
|
||||
- PNObject (0.9.0):
|
||||
- AFNetworking
|
||||
- CodFis-Helper
|
||||
- DJLocalization
|
||||
@@ -64,11 +64,11 @@ PODS:
|
||||
- RZDataBinding
|
||||
- StrongestPasswordValidator
|
||||
- UIDevice-Utils
|
||||
- PureLayout (3.0.1)
|
||||
- RZDataBinding (2.0.3)
|
||||
- PureLayout (3.0.2)
|
||||
- RZDataBinding (2.1.0)
|
||||
- Specta (1.0.5)
|
||||
- StrongestPasswordValidator (0.1.2)
|
||||
- UIDevice-Utils (0.1.5)
|
||||
- UIDevice-Utils (0.1.6)
|
||||
|
||||
DEPENDENCIES:
|
||||
- AFNetworking
|
||||
@@ -91,32 +91,33 @@ DEPENDENCIES:
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
PNObject:
|
||||
:path: ../
|
||||
:path: "../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
|
||||
Bolts: a0058fa3b331c5a1e4402d534f2dae36dbff31e4
|
||||
Bolts: 8a7995239dbe724f9cba2248b766d48b7ebdd322
|
||||
CocoaSecurity: d288a6f87e0f363823d2cb83e753814a6944f71a
|
||||
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
||||
DJLocalization: 55ab1d1ee4ac2eb3ec4e3a8a93145fd9d10ae6eb
|
||||
DJLocalization: 0c84029af375647d4104a42ae36be87194c46c47
|
||||
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
||||
Expecta+Snapshots: c343f410c7a6392f3e22e78f94c44b6c0749a516
|
||||
FBSDKCoreKit: 686ac982723a14ec9ddb85e2f81235d7706c891b
|
||||
FBSDKLoginKit: bade9fc78277764149ccc5bfaadbf13c83175c6a
|
||||
FBSDKShareKit: 2d1746144cfc8a9dbbd24997c34ee0471be51b6a
|
||||
FBSnapshotTestCase: 366ecd378511d7716c79991cd8067d1eed23578d
|
||||
JRSwizzle: dd5ead5d913a0f29e7f558200165849f006bb1e3
|
||||
FBSDKCoreKit: 15fef8804a4629f98c6f4e55e81a76c9d725d85e
|
||||
FBSDKLoginKit: 6773073e970b2b15fb12e451ce7f11da0532b880
|
||||
FBSDKShareKit: 0b8d6cc3f103c75297eb3c62caec284a2ccf1b9e
|
||||
FBSnapshotTestCase: '094f9f314decbabe373b87cc339bea235a63e07a'
|
||||
NACrypto: ce3900f1775f1b0cc27ce7c4953b94c598a74149
|
||||
NSDate_Utils: 68669d2c81f310ee13026c791f4f0ed227b94c65
|
||||
NSString-Helper: 459e1b6a62b3bf7db10f01b0d102548608e945c4
|
||||
NSUserDefaults-AESEncryptor: da02cfef056f1e18ebe2748767915f08b274c9c5
|
||||
nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f
|
||||
PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3
|
||||
PNObject: f907e7f4623a24495a2f8aa743dbe58a48f90069
|
||||
PureLayout: f35f5384c9c4e4479df041dbe33ad7577b71ddfb
|
||||
RZDataBinding: 00d468ebe667f02c2bd5416f87b4b5d826188c4d
|
||||
PNObject: f8d8116d0f72252552bddcbc3703d6d1e4719354
|
||||
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
|
||||
RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109
|
||||
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
|
||||
StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7
|
||||
UIDevice-Utils: a87bbaed53a74d503deb3e25511c9a4d865b92ea
|
||||
UIDevice-Utils: 11c10b18d3c6489b45a97436e5ae6064a3622820
|
||||
|
||||
COCOAPODS: 0.39.0
|
||||
PODFILE CHECKSUM: 7c7096ec3fa75c9e7a1d2b538e5719592b9f5e60
|
||||
|
||||
COCOAPODS: 1.2.0.beta.1
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Returns whether all instances of `BFTask` should automatically @try/@catch exceptions in continuation blocks. Default: `YES`.
|
||||
|
||||
@return Boolean value indicating whether exceptions are being caught.
|
||||
*/
|
||||
extern BOOL BFTaskCatchesExceptions(void)
|
||||
__attribute__((deprecated("This is temporary API and will be removed in a future release.")));
|
||||
|
||||
/**
|
||||
Set whether all instances of `BFTask` should automatically @try/@catch exceptions in continuation blocks. Default: `YES`.
|
||||
|
||||
@param catchExceptions Boolean value indicating whether exceptions shoudl be caught.
|
||||
*/
|
||||
extern void BFTaskSetCatchesExceptions(BOOL catchExceptions)
|
||||
__attribute__((deprecated("This is a temporary API and will be removed in a future release.")));
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 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+Exceptions.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
static BOOL taskCatchExceptions = YES;
|
||||
|
||||
BOOL BFTaskCatchesExceptions(void) {
|
||||
return taskCatchExceptions;
|
||||
}
|
||||
|
||||
void BFTaskSetCatchesExceptions(BOOL catchExceptions) {
|
||||
taskCatchExceptions = catchExceptions;
|
||||
}
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Generated
+17
-5
@@ -26,8 +26,11 @@ extern NSInteger const kBFMultipleErrorsError;
|
||||
|
||||
/*!
|
||||
An exception that is thrown if there was multiple exceptions on <BFTask taskForCompletionOfAllTasks:>.
|
||||
|
||||
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
|
||||
*/
|
||||
extern NSString *const BFTaskMultipleExceptionsException;
|
||||
extern NSString *const BFTaskMultipleExceptionsException
|
||||
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
|
||||
|
||||
/*!
|
||||
An error userInfo key used if there were multiple errors on <BFTask taskForCompletionOfAllTasks:>.
|
||||
@@ -38,8 +41,11 @@ extern NSString *const BFTaskMultipleErrorsUserInfoKey;
|
||||
/*!
|
||||
An error userInfo key used if there were multiple exceptions on <BFTask taskForCompletionOfAllTasks:>.
|
||||
Value type is `NSArray<NSException *> *`.
|
||||
|
||||
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
|
||||
*/
|
||||
extern NSString *const BFTaskMultipleExceptionsUserInfoKey;
|
||||
extern NSString *const BFTaskMultipleExceptionsUserInfoKey
|
||||
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
|
||||
|
||||
@class BFExecutor;
|
||||
@class BFTask;
|
||||
@@ -54,7 +60,7 @@ extern NSString *const BFTaskMultipleExceptionsUserInfoKey;
|
||||
/*!
|
||||
A block that can act as a continuation for a task.
|
||||
*/
|
||||
typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *task);
|
||||
typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *t);
|
||||
|
||||
/*!
|
||||
Creates a task that is already completed with the given result.
|
||||
@@ -71,8 +77,11 @@ typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *task);
|
||||
/*!
|
||||
Creates a task that is already completed with the given exception.
|
||||
@param exception The exception for the task.
|
||||
|
||||
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
|
||||
*/
|
||||
+ (instancetype)taskWithException:(NSException *)exception;
|
||||
+ (instancetype)taskWithException:(NSException *)exception
|
||||
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
|
||||
|
||||
/*!
|
||||
Creates a task that is already cancelled.
|
||||
@@ -143,8 +152,11 @@ typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *task);
|
||||
|
||||
/*!
|
||||
The exception of a failed task.
|
||||
|
||||
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
|
||||
*/
|
||||
@property (nullable, nonatomic, strong, readonly) NSException *exception;
|
||||
@property (nullable, nonatomic, strong, readonly) NSException *exception
|
||||
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
|
||||
|
||||
/*!
|
||||
Whether this task has been cancelled.
|
||||
|
||||
Generated
+54
-26
@@ -13,6 +13,7 @@
|
||||
#import <libkern/OSAtomic.h>
|
||||
|
||||
#import "Bolts.h"
|
||||
#import "BFTask+Exceptions.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -126,30 +127,35 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
|
||||
|
||||
BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource];
|
||||
for (BFTask *task in tasks) {
|
||||
[task continueWithBlock:^id(BFTask *task) {
|
||||
if (task.exception) {
|
||||
[task continueWithBlock:^id(BFTask *t) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
if (t.exception) {
|
||||
@synchronized (lock) {
|
||||
[exceptions addObject:task.exception];
|
||||
[exceptions addObject:t.exception];
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
} else if (task.error) {
|
||||
} else if (t.error) {
|
||||
@synchronized (lock) {
|
||||
[errors addObject:task.error];
|
||||
[errors addObject:t.error];
|
||||
}
|
||||
} else if (task.cancelled) {
|
||||
} else if (t.cancelled) {
|
||||
OSAtomicIncrement32Barrier(&cancelled);
|
||||
}
|
||||
|
||||
if (OSAtomicDecrement32Barrier(&total) == 0) {
|
||||
if (exceptions.count > 0) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
if (exceptions.count == 1) {
|
||||
tcs.exception = [exceptions firstObject];
|
||||
} else {
|
||||
NSException *exception =
|
||||
[NSException exceptionWithName:BFTaskMultipleExceptionsException
|
||||
reason:@"There were multiple exceptions."
|
||||
userInfo:@{ BFTaskMultipleExceptionsUserInfoKey: exceptions }];
|
||||
NSException *exception = [NSException exceptionWithName:BFTaskMultipleExceptionsException
|
||||
reason:@"There were multiple exceptions."
|
||||
userInfo:@{ BFTaskMultipleExceptionsUserInfoKey: exceptions }];
|
||||
tcs.exception = exception;
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
} else if (errors.count > 0) {
|
||||
if (errors.count == 1) {
|
||||
tcs.error = [errors firstObject];
|
||||
@@ -193,20 +199,23 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
|
||||
|
||||
BFTaskCompletionSource *source = [BFTaskCompletionSource taskCompletionSource];
|
||||
for (BFTask *task in tasks) {
|
||||
[task continueWithBlock:^id(BFTask *task) {
|
||||
if (task.exception != nil) {
|
||||
[task continueWithBlock:^id(BFTask *t) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
if (t.exception != nil) {
|
||||
@synchronized(lock) {
|
||||
[exceptions addObject:task.exception];
|
||||
[exceptions addObject:t.exception];
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
} else if (task.error != nil) {
|
||||
} else if (t.error != nil) {
|
||||
@synchronized(lock) {
|
||||
[errors addObject:task.error];
|
||||
[errors addObject:t.error];
|
||||
}
|
||||
} else if (task.cancelled) {
|
||||
} else if (t.cancelled) {
|
||||
OSAtomicIncrement32Barrier(&cancelled);
|
||||
} else {
|
||||
if(OSAtomicCompareAndSwap32Barrier(0, 1, &completed)) {
|
||||
[source setResult:task.result];
|
||||
[source setResult:t.result];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,14 +224,16 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
|
||||
if (cancelled > 0) {
|
||||
[source cancel];
|
||||
} else if (exceptions.count > 0) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
if (exceptions.count == 1) {
|
||||
source.exception = exceptions.firstObject;
|
||||
} else {
|
||||
NSException *exception =
|
||||
[NSException exceptionWithName:BFTaskMultipleExceptionsException
|
||||
reason:@"There were multiple exceptions."
|
||||
userInfo:@{ @"exceptions": exceptions }];
|
||||
NSException *exception = [NSException exceptionWithName:BFTaskMultipleExceptionsException
|
||||
reason:@"There were multiple exceptions."
|
||||
userInfo:@{ BFTaskMultipleExceptionsUserInfoKey: exceptions }];
|
||||
source.exception = exception;
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
} else if (errors.count > 0) {
|
||||
if (errors.count == 1) {
|
||||
@@ -394,20 +405,33 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
|
||||
}
|
||||
|
||||
id result = nil;
|
||||
@try {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
if (BFTaskCatchesExceptions()) {
|
||||
@try {
|
||||
result = block(self);
|
||||
} @catch (NSException *exception) {
|
||||
NSLog(@"[Bolts] Warning: `BFTask` caught an exception in the continuation block."
|
||||
@" This behavior is discouraged and will be removed in a future release."
|
||||
@" Caught Exception: %@", exception);
|
||||
tcs.exception = exception;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
result = block(self);
|
||||
} @catch (NSException *exception) {
|
||||
tcs.exception = exception;
|
||||
return;
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
if ([result isKindOfClass:[BFTask class]]) {
|
||||
|
||||
id (^setupWithTask) (BFTask *) = ^id(BFTask *task) {
|
||||
if (cancellationToken.cancellationRequested || task.cancelled) {
|
||||
[tcs cancel];
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
} else if (task.exception) {
|
||||
tcs.exception = task.exception;
|
||||
#pragma clang diagnostic pop
|
||||
} else if (task.error) {
|
||||
tcs.error = task.error;
|
||||
} else {
|
||||
@@ -499,7 +523,11 @@ NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
|
||||
}
|
||||
[self.condition lock];
|
||||
}
|
||||
[self.condition wait];
|
||||
// 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];
|
||||
}
|
||||
|
||||
|
||||
+8
-2
@@ -49,8 +49,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
Completes the task by setting an exception.
|
||||
Attempting to set this for a completed task will raise an exception.
|
||||
@param exception The exception for the task.
|
||||
|
||||
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
|
||||
*/
|
||||
- (void)setException:(NSException *)exception;
|
||||
- (void)setException:(NSException *)exception
|
||||
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
|
||||
|
||||
/*!
|
||||
Completes the task by marking it as cancelled.
|
||||
@@ -75,8 +78,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
Sets the exception of the task if it wasn't already completed.
|
||||
@param exception The exception for the task.
|
||||
@returns whether the new value was set.
|
||||
|
||||
@deprecated `BFTask` exception handling is deprecated and will be removed in a future release.
|
||||
*/
|
||||
- (BOOL)trySetException:(NSException *)exception;
|
||||
- (BOOL)trySetException:(NSException *)exception
|
||||
__attribute__((deprecated("`BFTask` exception handling is deprecated and will be removed in a future release.")));
|
||||
|
||||
/*!
|
||||
Sets the cancellation state of the task if it wasn't already completed.
|
||||
|
||||
Generated
+1
@@ -13,6 +13,7 @@
|
||||
#import <Bolts/BFCancellationTokenSource.h>
|
||||
#import <Bolts/BFExecutor.h>
|
||||
#import <Bolts/BFTask.h>
|
||||
#import <Bolts/BFTask+Exceptions.h>
|
||||
#import <Bolts/BFTaskCompletionSource.h>
|
||||
|
||||
#if __has_include(<Bolts/BFAppLink.h>) && TARGET_OS_IPHONE && !TARGET_OS_WATCH && !TARGET_OS_TV
|
||||
|
||||
Generated
+1
-1
@@ -12,6 +12,6 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NSString *const BoltsFrameworkVersionString = @"1.7.0";
|
||||
NSString *const BoltsFrameworkVersionString = @"1.8.4";
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+20
@@ -57,6 +57,12 @@ typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) {
|
||||
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;
|
||||
|
||||
@@ -69,6 +75,20 @@ typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) {
|
||||
/*! 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;
|
||||
|
||||
|
||||
+42
-1
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "BFAppLinkNavigation.h"
|
||||
|
||||
#import <Bolts/Bolts.h>
|
||||
|
||||
@@ -20,6 +20,9 @@ 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<BFAppLinkResolving> defaultResolver;
|
||||
|
||||
@@ -43,6 +46,10 @@ static id<BFAppLinkResolving> defaultResolver;
|
||||
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]];
|
||||
@@ -229,6 +236,40 @@ static id<BFAppLinkResolving> defaultResolver;
|
||||
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<BFAppLinkResolving>)defaultResolver {
|
||||
if (defaultResolver) {
|
||||
return defaultResolver;
|
||||
|
||||
Generated
+4
-4
@@ -55,11 +55,11 @@
|
||||
NSString *refererAppName = refererAppLink[BFAppLinkRefererAppName];
|
||||
|
||||
if (refererURLString && refererAppName) {
|
||||
BFAppLinkTarget *target = [BFAppLinkTarget appLinkTargetWithURL:[NSURL URLWithString:refererURLString]
|
||||
appStoreId:nil
|
||||
appName:refererAppName];
|
||||
BFAppLinkTarget *appLinkTarget = [BFAppLinkTarget appLinkTargetWithURL:[NSURL URLWithString:refererURLString]
|
||||
appStoreId:nil
|
||||
appName:refererAppName];
|
||||
_appLinkReferer = [BFAppLink appLinkWithSourceURL:[NSURL URLWithString:refererURLString]
|
||||
targets:@[ target ]
|
||||
targets:@[ appLinkTarget ]
|
||||
webURL:nil
|
||||
isBackToReferrer:YES];
|
||||
}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -10,7 +10,4 @@
|
||||
|
||||
@interface DJLocalizableString : NSString
|
||||
|
||||
- (NSUInteger)length;
|
||||
- (unichar)characterAtIndex:(NSUInteger)index;
|
||||
|
||||
@end
|
||||
@@ -11,13 +11,12 @@
|
||||
@interface DJLocalizationSystem (Private)
|
||||
|
||||
/*!
|
||||
* Special version that tries to load a storyboard string from all the tables
|
||||
* except Localizable and InfoPlist. Defaults to comment if not found.
|
||||
* Special version that tries to load a storyboard string from all the tables
|
||||
* except Localizable and InfoPlist. Defaults to comment if not found.
|
||||
*
|
||||
* @param key The localization key
|
||||
* @param comment The localization value
|
||||
*
|
||||
* @return The localized string
|
||||
* @param key The localization key
|
||||
* @param comment The localization value
|
||||
* @return The localized string
|
||||
*/
|
||||
- (NSString *)localizedStoryboardStringForKey:(NSString *)key value:(NSString *)comment;
|
||||
|
||||
|
||||
@@ -8,14 +8,19 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#define DJLocalizedString(key, comment) \
|
||||
[DJLocalizationSystem.shared localizedStringForKey:(key) value: @"" table: nil]
|
||||
#define DJLocalizedStringFromTable(key, tbl, comment) \
|
||||
[DJLocalizationSystem.shared localizedStringForKey:(key) value: @"" table:(tbl)]
|
||||
|
||||
// replace Apple's macros with our own
|
||||
#undef NSLocalizedString
|
||||
#define NSLocalizedString(key, comment) \
|
||||
[DJLocalizationSystem.shared localizedStringForKey:(key) value: @"" table: nil]
|
||||
DJLocalizedString(key, comment)
|
||||
|
||||
#undef NSLocalizedStringFromTable
|
||||
#define NSLocalizedStringFromTable(key, tbl, comment) \
|
||||
[DJLocalizationSystem.shared localizedStringForKey:(key) value:@"" table:(tbl)]
|
||||
DJLocalizedStringFromTable(key, tbl, comment)
|
||||
|
||||
@interface DJLocalizationSystem : NSObject
|
||||
|
||||
@@ -24,7 +29,7 @@
|
||||
*
|
||||
* @return A localization system instance
|
||||
*/
|
||||
+ (instancetype)shared;
|
||||
@property (class, nonnull, readonly) DJLocalizationSystem *shared;
|
||||
|
||||
/*!
|
||||
* Get the localized string for a given key/value
|
||||
@@ -34,7 +39,7 @@
|
||||
* @param tableName The localization table name
|
||||
* @return The localized string
|
||||
*/
|
||||
- (NSString *)localizedStringForKey:(NSString *)key value:(NSString *)comment table:(NSString *)tableName;
|
||||
- (nonnull NSString *)localizedStringForKey:(nullable NSString *)key value:(nullable NSString *)comment table:(nullable NSString *)tableName;
|
||||
|
||||
/*!
|
||||
* Get the localized string for a given key/value in the specified bundle
|
||||
@@ -44,7 +49,7 @@
|
||||
* @param bundle The bundle to search in
|
||||
* @return The localized string
|
||||
*/
|
||||
- (NSString *)localizedStringForKey:(NSString *)key value:(NSString *)comment table:(NSString *)tableName bundle:(NSBundle *)bundle;
|
||||
- (nonnull NSString *)localizedStringForKey:(nullable NSString *)key value:(nullable NSString *)comment table:(nullable NSString *)tableName bundle:(nonnull NSBundle *)bundle;
|
||||
|
||||
/*!
|
||||
* Reset the localization to the system's default language
|
||||
@@ -54,11 +59,11 @@
|
||||
/*!
|
||||
* The bundle for the currently active language
|
||||
*/
|
||||
@property (nonatomic, readonly) NSBundle *bundle;
|
||||
@property (nonatomic, readonly, nonnull) NSBundle *bundle;
|
||||
|
||||
/*!
|
||||
* The currently active language
|
||||
*/
|
||||
@property (nonatomic, strong) NSString *language;
|
||||
@property (nonatomic, strong, nonnull) NSString *language;
|
||||
|
||||
@end
|
||||
@@ -16,6 +16,6 @@
|
||||
* @param name The storyboard's name
|
||||
* @return The desired storyboard
|
||||
*/
|
||||
+ (instancetype)dj_storyboardWithName:(NSString *)name;
|
||||
+ (nonnull instancetype)dj_storyboardWithName:(nonnull NSString *)name;
|
||||
|
||||
@end
|
||||
Generated
+12
-1
@@ -25,6 +25,11 @@ it, simply add the following line to your Podfile:
|
||||
|
||||
pod "DJLocalization"
|
||||
|
||||
For Swift, use:
|
||||
|
||||
pod "DJLocalization/Swift"
|
||||
|
||||
|
||||
### Manually
|
||||
|
||||
_**Important note if your project doesn't use ARC**: you must add the `-fobjc-arc` compiler flag to all 'DJLocalization' files in Target Settings > Build Phases > Compile Sources._
|
||||
@@ -37,11 +42,17 @@ _**Important note if your project doesn't use ARC**: you must add the `-fobjc-ar
|
||||
|
||||
Then simply add the following import to your prefix header, or any file where you use the NSLocalizedString macro (or variants).
|
||||
|
||||
#import <DJLocalization/DJLocalization.h>
|
||||
@import DJLocalization;
|
||||
|
||||
#####*Important:*
|
||||
You must import the header wherever you use the NSLocalizedString macro, as this header replaces the default NSLocalizedString macro with a custom one. If you don't, runtime switching of languages won't work.
|
||||
|
||||
### Localization
|
||||
|
||||
Use your normal localization workflow and everything should work correctly. For code strings use `NSLocalizedString`, for storyboards use Base Internationalization.
|
||||
|
||||
As mentioned before, `NSLocalizedString` will only work correctly if you first include the correct headers. If you want a bit more safety, the library provides some extra macros `DJLocalizedString` that provide the same functionality as the overridden `NSLocalizedString` macros. This way you'll get a compilation error if you forget to include the headers.
|
||||
|
||||
### Switching languages
|
||||
|
||||
At runtime, you can switch the language at any time by setting the language property:
|
||||
|
||||
@@ -22,18 +22,20 @@
|
||||
#import <FBSDKCoreKit/FBSDKGraphRequestConnection.h>
|
||||
#import <FBSDKCoreKit/FBSDKMacros.h>
|
||||
|
||||
/*!
|
||||
@abstract Notification indicating that the `currentAccessToken` has changed.
|
||||
@discussion the userInfo dictionary of the notification will contain keys
|
||||
/**
|
||||
Notification indicating that the `currentAccessToken` has changed.
|
||||
|
||||
the userInfo dictionary of the notification will contain keys
|
||||
`FBSDKAccessTokenChangeOldKey` and
|
||||
`FBSDKAccessTokenChangeNewKey`.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKAccessTokenDidChangeNotification;
|
||||
|
||||
/*!
|
||||
@abstract A key in the notification's userInfo that will be set
|
||||
/**
|
||||
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.
|
||||
@discussion Token refreshes can occur automatically with the SDK
|
||||
|
||||
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.
|
||||
@@ -45,74 +47,76 @@ FBSDK_EXTERN NSString *const FBSDKAccessTokenDidChangeNotification;
|
||||
FBSDK_EXTERN NSString *const FBSDKAccessTokenDidChangeUserID;
|
||||
|
||||
/*
|
||||
@abstract key in notification's userInfo object for getting the old token.
|
||||
@discussion If there was no old token, the key will not be present.
|
||||
key in notification's userInfo object for getting the old token.
|
||||
|
||||
If there was no old token, the key will not be present.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKAccessTokenChangeOldKey;
|
||||
|
||||
/*
|
||||
@abstract key in notification's userInfo object for getting the new token.
|
||||
@discussion If there is no new token, the key will not be present.
|
||||
key in notification's userInfo object for getting the new token.
|
||||
|
||||
If there is no new token, the key will not be present.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKAccessTokenChangeNewKey;
|
||||
|
||||
|
||||
/*!
|
||||
@class FBSDKAccessToken
|
||||
@abstract Represents an immutable access token for using Facebook services.
|
||||
/**
|
||||
Represents an immutable access token for using Facebook services.
|
||||
*/
|
||||
@interface FBSDKAccessToken : NSObject<FBSDKCopying, NSSecureCoding>
|
||||
|
||||
/*!
|
||||
@abstract Returns the app ID.
|
||||
/**
|
||||
Returns the app ID.
|
||||
*/
|
||||
@property (readonly, copy, nonatomic) NSString *appID;
|
||||
|
||||
/*!
|
||||
@abstract Returns the known declined permissions.
|
||||
/**
|
||||
Returns the known declined permissions.
|
||||
*/
|
||||
@property (readonly, copy, nonatomic) NSSet *declinedPermissions;
|
||||
|
||||
/*!
|
||||
@abstract Returns the expiration date.
|
||||
/**
|
||||
Returns the expiration date.
|
||||
*/
|
||||
@property (readonly, copy, nonatomic) NSDate *expirationDate;
|
||||
|
||||
/*!
|
||||
@abstract Returns the known granted permissions.
|
||||
/**
|
||||
Returns the known granted permissions.
|
||||
*/
|
||||
@property (readonly, copy, nonatomic) NSSet *permissions;
|
||||
|
||||
/*!
|
||||
@abstract Returns the date the token was last refreshed.
|
||||
/**
|
||||
Returns the date the token was last refreshed.
|
||||
*/
|
||||
@property (readonly, copy, nonatomic) NSDate *refreshDate;
|
||||
|
||||
/*!
|
||||
@abstract Returns the opaque token string.
|
||||
/**
|
||||
Returns the opaque token string.
|
||||
*/
|
||||
@property (readonly, copy, nonatomic) NSString *tokenString;
|
||||
|
||||
/*!
|
||||
@abstract Returns the user ID.
|
||||
/**
|
||||
Returns the user ID.
|
||||
*/
|
||||
@property (readonly, copy, nonatomic) NSString *userID;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
/*!
|
||||
@abstract Initializes a new instance.
|
||||
@param tokenString the opaque token string.
|
||||
@param permissions the granted permissions. Note this is converted to NSSet and is only
|
||||
/**
|
||||
Initializes a new instance.
|
||||
- Parameter tokenString: the opaque token string.
|
||||
- Parameter 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
|
||||
- Parameter 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).
|
||||
@discussion This initializer should only be used for advanced apps that
|
||||
- Parameter appID: the app ID.
|
||||
- Parameter userID: the user ID.
|
||||
- Parameter expirationDate: the optional expiration date (defaults to distantFuture).
|
||||
- Parameter 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`.
|
||||
*/
|
||||
@@ -125,38 +129,41 @@ FBSDK_EXTERN NSString *const FBSDKAccessTokenChangeNewKey;
|
||||
refreshDate:(NSDate *)refreshDate
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/*!
|
||||
@abstract Convenience getter to determine if a permission has been granted
|
||||
@param permission The permission to check.
|
||||
/**
|
||||
Convenience getter to determine if a permission has been granted
|
||||
- Parameter permission: The permission to check.
|
||||
*/
|
||||
- (BOOL)hasGranted:(NSString *)permission;
|
||||
|
||||
/*!
|
||||
@abstract 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
|
||||
/**
|
||||
Compares the receiver to another FBSDKAccessToken
|
||||
- Parameter token: The other token
|
||||
- Returns: YES if the receiver's values are equal to the other token's values; otherwise NO
|
||||
*/
|
||||
- (BOOL)isEqualToAccessToken:(FBSDKAccessToken *)token;
|
||||
|
||||
/*!
|
||||
@abstract Returns the "global" access token that represents the currently logged in user.
|
||||
@discussion The `currentAccessToken` is a convenient representation of the token of the
|
||||
/**
|
||||
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;
|
||||
|
||||
/*!
|
||||
@abstract Sets the "global" access token that represents the currently logged in user.
|
||||
@param token The access token to set.
|
||||
@discussion This will broadcast a notification and save the token to the app keychain.
|
||||
/**
|
||||
Sets the "global" access token that represents the currently logged in user.
|
||||
- Parameter token: The access token to set.
|
||||
|
||||
This will broadcast a notification and save the token to the app keychain.
|
||||
*/
|
||||
+ (void)setCurrentAccessToken:(FBSDKAccessToken *)token;
|
||||
|
||||
/*!
|
||||
@abstract Refresh the current access token's permission state and extend the token's expiration date,
|
||||
/**
|
||||
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.
|
||||
@discussion On a successful refresh, the currentAccessToken will be updated so you typically only need to
|
||||
- Parameter 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.
|
||||
|
||||
@@ -88,7 +88,7 @@ static FBSDKAccessToken *g_currentAccessToken;
|
||||
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 immediatelly
|
||||
// When token is abandoned cookies must to be cleaned up immediately
|
||||
if (token == nil) {
|
||||
[FBSDKInternalUtility deleteFacebookCookies];
|
||||
}
|
||||
|
||||
+142
-129
@@ -18,114 +18,116 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKGraphRequestConnection.h>
|
||||
|
||||
#import "FBSDKMacros.h"
|
||||
|
||||
@class FBSDKAccessToken;
|
||||
@class FBSDKGraphRequest;
|
||||
|
||||
/*! @abstract NSNotificationCenter name indicating a result of a failed log flush attempt. The posted object will be an NSError instance. */
|
||||
/** NSNotificationCenter name indicating a result of a failed log flush attempt. The posted object will be an NSError instance. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventsLoggingResultNotification;
|
||||
|
||||
/*! @abstract optional plist key ("FacebookLoggingOverrideAppID") for setting `loggingOverrideAppID` */
|
||||
/** optional plist key ("FacebookLoggingOverrideAppID") for setting `loggingOverrideAppID` */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventsOverrideAppIDBundleKey;
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@typedef NS_ENUM (NSUInteger, FBSDKAppEventsFlushBehavior)
|
||||
NS_ENUM (NSUInteger, FBSDKAppEventsFlushBehavior)
|
||||
|
||||
@abstract Specifies when `FBSDKAppEvents` sends log events to the server.
|
||||
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. */
|
||||
/** 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
|
||||
/** 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,
|
||||
|
||||
};
|
||||
|
||||
/*!
|
||||
/**
|
||||
@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. */
|
||||
/** Log this event when the user has achieved a level in the app. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameAchievedLevel;
|
||||
|
||||
/*! Log this event when the user has entered their payment info. */
|
||||
/** Log this event when the user has entered their payment info. */
|
||||
FBSDK_EXTERN 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. */
|
||||
/** Log this event when the user has added an item to their cart. The valueToSum passed to logEvent should be the item's price. */
|
||||
FBSDK_EXTERN 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. */
|
||||
/** Log this event when the user has added an item to their wishlist. The valueToSum passed to logEvent should be the item's price. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameAddedToWishlist;
|
||||
|
||||
/*! Log this event when a user has completed registration with the app. */
|
||||
/** Log this event when a user has completed registration with the app. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameCompletedRegistration;
|
||||
|
||||
/*! Log this event when the user has completed a tutorial in the app. */
|
||||
/** Log this event when the user has completed a tutorial in the app. */
|
||||
FBSDK_EXTERN 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. */
|
||||
/** Log this event when the user has entered the checkout process. The valueToSum passed to logEvent should be the total price in the cart. */
|
||||
FBSDK_EXTERN 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. */
|
||||
/** Log this event when the user has rated an item in the app. The valueToSum passed to logEvent should be the numeric rating. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameRated;
|
||||
|
||||
/*! Log this event when a user has performed a search within the app. */
|
||||
/** Log this event when a user has performed a search within the app. */
|
||||
FBSDK_EXTERN 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. */
|
||||
/** Log this event when the user has spent app credits. The valueToSum passed to logEvent should be the number of credits spent. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameSpentCredits;
|
||||
|
||||
/*! Log this event when the user has unlocked an achievement in the app. */
|
||||
/** Log this event when the user has unlocked an achievement in the app. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameUnlockedAchievement;
|
||||
|
||||
/*! Log this event when a user has viewed a form of content in the app. */
|
||||
/** Log this event when a user has viewed a form of content in the app. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameViewedContent;
|
||||
|
||||
/*!
|
||||
/**
|
||||
@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 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. */
|
||||
/** 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. */
|
||||
FBSDK_EXTERN 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. */
|
||||
/** 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. */
|
||||
FBSDK_EXTERN 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 <http://en.wikipedia.org/wiki/ISO_4217>. */
|
||||
/** 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 <http://en.wikipedia.org/wiki/ISO_4217>. */
|
||||
FBSDK_EXTERN 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. */
|
||||
/** 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. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameDescription;
|
||||
|
||||
/*! Parameter key used to specify the level achieved in a `FBAppEventNameAchieved` event. */
|
||||
/** Parameter key used to specify the level achieved in a `FBAppEventNameAchieved` event. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameLevel;
|
||||
|
||||
/*! Parameter key used to specify the maximum rating available for the `FBAppEventNameRate` event. E.g., "5" or "10". */
|
||||
/** Parameter key used to specify the maximum rating available for the `FBAppEventNameRate` event. E.g., "5" or "10". */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameMaxRatingValue;
|
||||
|
||||
/*! Parameter key used to specify how many items are being processed for an `FBAppEventNameInitiatedCheckout` or `FBAppEventNamePurchased` event. */
|
||||
/** Parameter key used to specify how many items are being processed for an `FBAppEventNameInitiatedCheckout` or `FBAppEventNamePurchased` event. */
|
||||
FBSDK_EXTERN 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. */
|
||||
/** 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. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNamePaymentInfoAvailable;
|
||||
|
||||
/*! Parameter key used to specify method user has used to register for the app, e.g., "Facebook", "email", "Twitter", etc */
|
||||
/** Parameter key used to specify method user has used to register for the app, e.g., "Facebook", "email", "Twitter", etc */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameRegistrationMethod;
|
||||
|
||||
/*! Parameter key used to specify the string provided by the user for a search operation. */
|
||||
/** Parameter key used to specify the string provided by the user for a search operation. */
|
||||
FBSDK_EXTERN 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. */
|
||||
/** 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. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameSuccess;
|
||||
|
||||
/*
|
||||
@@ -133,22 +135,21 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameSuccess;
|
||||
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 */
|
||||
/** Yes-valued parameter value to be used with parameter keys that need a Yes/No value */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueYes;
|
||||
|
||||
/*! No-valued parameter value to be used with parameter keys that need a Yes/No value */
|
||||
/** No-valued parameter value to be used with parameter keys that need a Yes/No value */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
|
||||
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@class FBSDKAppEvents
|
||||
|
||||
@abstract
|
||||
Client-side event logging for specialized application analytics available through Facebook App Insights
|
||||
Client-side event logging for specialized application analytics available through Facebook App Insights
|
||||
and for use with Facebook Ads conversion tracking and optimization.
|
||||
|
||||
@discussion
|
||||
|
||||
|
||||
The `FBSDKAppEvents` static class has a few related roles:
|
||||
|
||||
+ Logging predefined and application-defined events to Facebook App Insights with a
|
||||
@@ -196,42 +197,39 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
|
||||
* Basic event logging
|
||||
*/
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Log an event with just an eventName.
|
||||
Log an event with just an eventName.
|
||||
|
||||
@param eventName The name of the event to record. Limitations on number of events and name length
|
||||
- Parameter 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;
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Log an event with an eventName and a numeric value to be aggregated with other events of this name.
|
||||
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
|
||||
- Parameter 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
|
||||
- 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.
|
||||
*/
|
||||
+ (void)logEvent:(NSString *)eventName
|
||||
valueToSum:(double)valueToSum;
|
||||
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Log an event with an eventName and a set of key/value pairs in the parameters dictionary.
|
||||
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
|
||||
- Parameter 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
|
||||
- Parameter 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.
|
||||
@@ -239,19 +237,18 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
|
||||
+ (void)logEvent:(NSString *)eventName
|
||||
parameters:(NSDictionary *)parameters;
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Log an event with an eventName, a numeric value to be aggregated with other events of this name,
|
||||
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
|
||||
- Parameter 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
|
||||
- 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.
|
||||
|
||||
@param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
|
||||
- Parameter 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.
|
||||
@@ -262,26 +259,25 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
|
||||
parameters:(NSDictionary *)parameters;
|
||||
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Log an event with an eventName, a numeric value to be aggregated with other events of this name,
|
||||
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 <FBSession>. 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
|
||||
- Parameter 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
|
||||
- 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. 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
|
||||
- Parameter 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.
|
||||
- Parameter accessToken: The optional access token to log the event as.
|
||||
*/
|
||||
+ (void)logEvent:(NSString *)eventName
|
||||
valueToSum:(NSNumber *)valueToSum
|
||||
@@ -292,42 +288,42 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
|
||||
* Purchase logging
|
||||
*/
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Log a purchase of the specified amount, in the specified currency.
|
||||
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
|
||||
- Parameter 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
|
||||
- Parameter currency: Currency, is denoted as, e.g. "USD", "EUR", "GBP". See ISO-4217 for
|
||||
specific values. One reference for these is <http://en.wikipedia.org/wiki/ISO_4217>.
|
||||
|
||||
@discussion This event immediately triggers a flush of the `FBSDKAppEvents` event queue, unless the `flushBehavior` is set
|
||||
|
||||
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;
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Log a purchase of the specified amount, in the specified currency, also providing a set of
|
||||
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
|
||||
- Parameter 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
|
||||
- Parameter currency: Currency, is denoted as, e.g. "USD", "EUR", "GBP". See ISO-4217 for
|
||||
specific values. One reference for these is <http://en.wikipedia.org/wiki/ISO_4217>.
|
||||
|
||||
@param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
|
||||
- Parameter 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.
|
||||
|
||||
@discussion This event immediately triggers a flush of the `FBSDKAppEvents` event queue, unless the `flushBehavior` is set
|
||||
|
||||
This event immediately triggers a flush of the `FBSDKAppEvents` event queue, unless the `flushBehavior` is set
|
||||
to `FBSDKAppEventsFlushBehaviorExplicitOnly`.
|
||||
|
||||
*/
|
||||
@@ -335,26 +331,26 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
|
||||
currency:(NSString *)currency
|
||||
parameters:(NSDictionary *)parameters;
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Log a purchase of the specified amount, in the specified currency, also providing a set of
|
||||
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 <FBSession> to log to.
|
||||
|
||||
@param purchaseAmount Purchase amount to be logged, as expressed in the specified currency.This value
|
||||
- Parameter 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
|
||||
- Parameter currency: Currency, is denoted as, e.g. "USD", "EUR", "GBP". See ISO-4217 for
|
||||
specific values. One reference for these is <http://en.wikipedia.org/wiki/ISO_4217>.
|
||||
|
||||
@param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
|
||||
- Parameter 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.
|
||||
- Parameter accessToken: The optional access token to log the event as.
|
||||
|
||||
@discussion This event immediately triggers a flush of the `FBSDKAppEvents` event queue, unless the `flushBehavior` is set
|
||||
|
||||
This event immediately triggers a flush of the `FBSDKAppEvents` event queue, unless the `flushBehavior` is set
|
||||
to `FBSDKAppEventsFlushBehaviorExplicitOnly`.
|
||||
|
||||
*/
|
||||
@@ -368,33 +364,31 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
|
||||
* Push Notifications Logging
|
||||
*/
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Log an app event that tracks that the application was open via Push Notification.
|
||||
/**
|
||||
Log an app event that tracks that the application was open via Push Notification.
|
||||
|
||||
@param payload Notification payload received via `UIApplicationDelegate`.
|
||||
- Parameter payload: Notification payload received via `UIApplicationDelegate`.
|
||||
*/
|
||||
+ (void)logPushNotificationOpen:(NSDictionary *)payload;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Log an app event that tracks that a custom action was taken from a push notification.
|
||||
/**
|
||||
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.
|
||||
- Parameter payload: Notification payload received via `UIApplicationDelegate`.
|
||||
- Parameter action: Name of the action that was taken.
|
||||
*/
|
||||
+ (void)logPushNotificationOpen:(NSDictionary *)payload action:(NSString *)action;
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Notifies the events system that the app has launched and, when appropriate, logs an "activated app" event. Should typically be placed in the
|
||||
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:` 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.
|
||||
|
||||
@discussion
|
||||
|
||||
|
||||
`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
|
||||
@@ -407,14 +401,14 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
|
||||
* Push Notifications Registration
|
||||
*/
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Sets a device token to register the current application installation for push notifications.
|
||||
/**
|
||||
Sets a device token to register the current application installation for push notifications.
|
||||
|
||||
|
||||
|
||||
@discussion
|
||||
Sets a device token from `NSData` representation that you get from `UIApplicationDelegate.-application:didRegisterForRemoteNotificationsWithDeviceToken:`.
|
||||
|
||||
@param deviceToken Device token data.
|
||||
- Parameter deviceToken: Device token data.
|
||||
*/
|
||||
+ (void)setPushNotificationsDeviceToken:(NSData *)deviceToken;
|
||||
|
||||
@@ -422,27 +416,25 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
|
||||
* Control over event batching/flushing
|
||||
*/
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Get the current event flushing behavior specifying when events are sent back to Facebook servers.
|
||||
Get the current event flushing behavior specifying when events are sent back to Facebook servers.
|
||||
*/
|
||||
+ (FBSDKAppEventsFlushBehavior)flushBehavior;
|
||||
|
||||
/*!
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Set the current event flushing behavior specifying when events are sent back to Facebook servers.
|
||||
Set the current event flushing behavior specifying when events are sent back to Facebook servers.
|
||||
|
||||
@param flushBehavior The desired `FBSDKAppEventsFlushBehavior` to be used.
|
||||
- Parameter flushBehavior: The desired `FBSDKAppEventsFlushBehavior` to be used.
|
||||
*/
|
||||
+ (void)setFlushBehavior:(FBSDKAppEventsFlushBehavior)flushBehavior;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Set the 'override' App ID for App Event logging.
|
||||
/**
|
||||
Set the 'override' App ID for App Event logging.
|
||||
|
||||
|
||||
|
||||
@discussion
|
||||
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`
|
||||
@@ -451,37 +443,36 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
|
||||
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.
|
||||
- Parameter appID: The Facebook App ID to be used for App Event logging.
|
||||
*/
|
||||
+ (void)setLoggingOverrideAppID:(NSString *)appID;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Get the 'override' App ID for App Event logging.
|
||||
/**
|
||||
Get the 'override' App ID for App Event logging.
|
||||
|
||||
@see setLoggingOverrideAppID:
|
||||
|
||||
- See:setLoggingOverrideAppID:
|
||||
|
||||
*/
|
||||
+ (NSString *)loggingOverrideAppID;
|
||||
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Explicitly kick off flushing of events to Facebook. This is an asynchronous method, but it does initiate an immediate
|
||||
/**
|
||||
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;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Creates a request representing the Graph API call to retrieve a Custom Audience "third party ID" for the app's Facebook user.
|
||||
/**
|
||||
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.
|
||||
- Parameter 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.
|
||||
|
||||
@discussion
|
||||
|
||||
|
||||
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
|
||||
@@ -496,4 +487,26 @@ FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
|
||||
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;
|
||||
|
||||
/*
|
||||
Returns the set custom user ID.
|
||||
*/
|
||||
+ (NSString *)userID;
|
||||
|
||||
/*
|
||||
Sends a request to update the properties for the current user, set by `setUserID:`
|
||||
|
||||
You must call `FBSDKAppEvents setUserID:` before making this call.
|
||||
- Parameter properties: the custom user properties
|
||||
- Parameter handler: the optional completion handler
|
||||
*/
|
||||
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
|
||||
|
||||
@end
|
||||
@@ -91,6 +91,8 @@ 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";
|
||||
@@ -120,6 +122,8 @@ NSString *const FBSDKAppEventNameFBSDKLoginButtonImpression = @"fb_login_b
|
||||
NSString *const FBSDKAppEventNameFBSDKSendButtonImpression = @"fb_send_button_impression";
|
||||
NSString *const FBSDKAppEventNameFBSDKShareButtonImpression = @"fb_share_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";
|
||||
@@ -142,11 +146,15 @@ NSString *const FBSDKAppEventNameFBSDKEventShareDialogShow = @"fb_dia
|
||||
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";
|
||||
|
||||
// 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 FBSDKAppEventParameterShareTrayActivityName = @"fb_share_tray_activity";
|
||||
NSString *const FBSDKAppEventParameterShareTrayResult = @"fb_share_tray_result";
|
||||
NSString *const FBSDKAppEventParameterLogTime = @"_logTime";
|
||||
NSString *const FBSDKAppEventParameterEventName = @"_eventName";
|
||||
NSString *const FBSDKAppEventParameterImplicitlyLogged = @"_implicitlyLogged";
|
||||
@@ -191,6 +199,7 @@ static NSString *const FBSDKAppEventsPushPayloadCampaignKey = @"campaign";
|
||||
#define NUM_LOG_EVENTS_TO_TRY_TO_FLUSH_AFTER 100
|
||||
#define FLUSH_PERIOD_IN_SECONDS 15
|
||||
#define APP_SUPPORTS_ATTRIBUTION_ID_RECHECK_PERIOD 60 * 60 * 24
|
||||
#define USER_ID_USER_DEFAULTS_KEY @"com.facebook.sdk.appevents.userid"
|
||||
|
||||
static NSString *g_overrideAppID = nil;
|
||||
|
||||
@@ -211,6 +220,7 @@ static NSString *g_overrideAppID = nil;
|
||||
NSTimer *_attributionIDRecheckTimer;
|
||||
FBSDKServerConfiguration *_serverConfiguration;
|
||||
FBSDKAppEventsState *_appEventsState;
|
||||
NSString *_userID;
|
||||
}
|
||||
|
||||
#pragma mark - Object Lifecycle
|
||||
@@ -256,6 +266,9 @@ static NSString *g_overrideAppID = nil;
|
||||
selector:@selector(applicationDidBecomeActive)
|
||||
name:UIApplicationDidBecomeActiveNotification
|
||||
object:NULL];
|
||||
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
_userID = [defaults stringForKey:USER_ID_USER_DEFAULTS_KEY];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -443,6 +456,68 @@ static NSString *g_overrideAppID = nil;
|
||||
[[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];
|
||||
}
|
||||
|
||||
+ (NSString *)userID
|
||||
{
|
||||
return [[self class] singleton]->_userID;
|
||||
}
|
||||
|
||||
+ (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 = [FBSDKError requiredArgumentErrorWithName:@"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 = [FBSDKError unknownErrorWithMessage:@"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", [FBSDKSettings appID]]
|
||||
parameters:params
|
||||
tokenString:[FBSDKAccessToken currentAccessToken].tokenString
|
||||
HTTPMethod:@"POST"
|
||||
flags:FBSDKGraphRequestFlagDisableErrorRecovery |
|
||||
FBSDKGraphRequestFlagDoNotInvalidateTokenOnError |
|
||||
FBSDKGraphRequestFlagSkipClientToken
|
||||
];
|
||||
[request startWithCompletionHandler:handler];
|
||||
}
|
||||
|
||||
#pragma mark - Internal Methods
|
||||
|
||||
+ (void)logImplicitEvent:(NSString *)eventName
|
||||
@@ -593,6 +668,7 @@ static NSString *g_overrideAppID = nil;
|
||||
if (isImplicitlyLogged) {
|
||||
eventDictionary[FBSDKAppEventParameterImplicitlyLogged] = @"1";
|
||||
}
|
||||
[FBSDKInternalUtility dictionary:eventDictionary setObject:_userID forKey:@"_app_user_id"];
|
||||
|
||||
NSString *currentViewControllerName;
|
||||
if ([NSThread isMainThread]) {
|
||||
|
||||
+16
-16
@@ -29,18 +29,18 @@
|
||||
// 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.
|
||||
*/
|
||||
@protocol BFAppLinkResolving <NSObject>
|
||||
|
||||
/*!
|
||||
/**
|
||||
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.
|
||||
- Parameter 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;
|
||||
|
||||
@@ -48,34 +48,34 @@
|
||||
|
||||
#endif
|
||||
|
||||
/*!
|
||||
@class FBSDKAppLinkResolver
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Provides an implementation of the BFAppLinkResolving protocol that uses the Facebook App Link
|
||||
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.
|
||||
|
||||
@discussion
|
||||
|
||||
|
||||
Usage of this type requires a client token. See `[FBSDKSettings setClientToken:]` and linking
|
||||
Bolts.framework
|
||||
*/
|
||||
@interface FBSDKAppLinkResolver : NSObject<BFAppLinkResolving>
|
||||
|
||||
/*!
|
||||
@abstract Asynchronously resolves App Link data for multiple URLs.
|
||||
/**
|
||||
Asynchronously resolves App Link data for multiple URLs.
|
||||
|
||||
@param urls An array of NSURLs to resolve into App Links.
|
||||
@returns A BFTask that will return dictionary mapping input NSURLs to their
|
||||
- Parameter urls: An array of NSURLs to resolve into App Links.
|
||||
- Returns: A BFTask that will return dictionary mapping input NSURLs to their
|
||||
corresponding BFAppLink.
|
||||
|
||||
@discussion
|
||||
|
||||
|
||||
You should set the client token before making this call. See `[FBSDKSettings setClientToken:]`
|
||||
*/
|
||||
- (BFTask *)appLinksFromURLsInBackground:(NSArray *)urls;
|
||||
|
||||
/*!
|
||||
@abstract Allocates and initializes a new instance of FBSDKAppLinkResolver.
|
||||
/**
|
||||
Allocates and initializes a new instance of FBSDKAppLinkResolver.
|
||||
*/
|
||||
+ (instancetype)resolver;
|
||||
|
||||
|
||||
+25
-36
@@ -18,40 +18,41 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
@abstract Describes the callback for fetchDeferredAppLink.
|
||||
@param url the url representing the deferred App Link
|
||||
@param error the error during the request, if any
|
||||
/**
|
||||
Describes the callback for fetchDeferredAppLink.
|
||||
- Parameter url: the url representing the deferred App Link
|
||||
- Parameter error: the error during the request, if any
|
||||
|
||||
@discussion The url may also have a fb_click_time_utc query parameter that
|
||||
|
||||
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);
|
||||
|
||||
|
||||
/*!
|
||||
@abstract Describes the callback for fetchOrganicDeferredAppLink.
|
||||
@param url the url representing the deferred App Link
|
||||
/**
|
||||
Describes the callback for fetchOrganicDeferredAppLink.
|
||||
- Parameter url: the url representing the deferred App Link
|
||||
*/
|
||||
typedef void (^FBSDKDeferredAppInviteHandler)(NSURL *url);
|
||||
|
||||
|
||||
/*!
|
||||
@abstract Class containing App Links related utility methods.
|
||||
/**
|
||||
Class containing App Links related utility methods.
|
||||
*/
|
||||
@interface FBSDKAppLinkUtility : NSObject
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Call this method from the main thread to fetch deferred applink data if you use Mobile App
|
||||
/**
|
||||
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
|
||||
- Parameter handler: the handler to be invoked if there is deferred App Link data
|
||||
|
||||
@discussion The handler may contain an NSError instance to capture any errors. In the
|
||||
|
||||
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
|
||||
@@ -60,38 +61,26 @@ typedef void (^FBSDKDeferredAppInviteHandler)(NSURL *url);
|
||||
*/
|
||||
+ (void)fetchDeferredAppLink:(FBSDKDeferredAppLinkHandler)handler;
|
||||
|
||||
/*!
|
||||
@abstract Call this method from the main thread to fetch deferred deeplink for App Invites
|
||||
Handler is called with deeplink url, if found, nil otherwise.
|
||||
/**
|
||||
|
||||
@param handler Handler to be called when we fetch deeplink url.
|
||||
|
||||
@return YES if async fetch process was started, NO if it failed to start. Note it returns NO
|
||||
for versions < iOS 9.
|
||||
|
||||
@discussion Call this method from the main thread to fetch deferred deeplink if you use App Invites.
|
||||
This may require a network round trip. If successful, this will call the handler provided, with
|
||||
deferred deeplink that was clicked by the user. If there is a error/timeout, handler will be called
|
||||
with nil.
|
||||
This method only works on iOS 9+ and returns NO otherwise.
|
||||
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
|
||||
didFinishLaunchingWithOptions:).
|
||||
- Warning:This method is no longer available and will always return NO.
|
||||
*/
|
||||
+ (BOOL)fetchDeferredAppInvite:(FBSDKDeferredAppInviteHandler)handler;
|
||||
+ (BOOL)fetchDeferredAppInvite:(FBSDKDeferredAppInviteHandler)handler
|
||||
__attribute__((deprecated("This method is no longer available.")));;
|
||||
|
||||
/*
|
||||
@abstract Call this method to fetch promotion code from the url, if it's present. This function
|
||||
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.
|
||||
- Parameter url: App Link url that was passed to the app.
|
||||
|
||||
@return Promotion code string.
|
||||
- Returns: Promotion code string.
|
||||
|
||||
@discussion Call this method to fetch App Invite Promotion Code from applink if present.
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#import "FBSDKAppEventsUtility.h"
|
||||
#import "FBSDKGraphRequest.h"
|
||||
#import "FBSDKInternalUtility.h"
|
||||
#import "FBSDKOrganicDeeplinkHelper.h"
|
||||
#import "FBSDKSettings.h"
|
||||
#import "FBSDKUtility.h"
|
||||
|
||||
@@ -83,12 +82,7 @@ static NSString *const FBSDKDeferredAppLinkEvent = @"DEFERRED_APP_LINK";
|
||||
|
||||
+ (BOOL)fetchDeferredAppInvite:(FBSDKDeferredAppInviteHandler)handler
|
||||
{
|
||||
NSAssert([NSThread isMainThread], @"FBSDKAppLink fetchOrganicDeferredAppLink: must be invoked from main thread.");
|
||||
|
||||
NSAssert(handler, @"FBSDKAppLink fetchOrganicDeferredAppLink: must be invoked with valid handler.");
|
||||
|
||||
FBSDKOrganicDeeplinkHelper *deeplinkHelper = [[FBSDKOrganicDeeplinkHelper alloc] init];
|
||||
return [deeplinkHelper fetchOrganicDeeplink:handler];
|
||||
return NO;
|
||||
}
|
||||
|
||||
+ (NSString*)appInvitePromotionCodeFromURL:(NSURL*)url;
|
||||
|
||||
+38
-22
@@ -18,56 +18,72 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
/*!
|
||||
@class FBSDKApplicationDelegate
|
||||
/**
|
||||
|
||||
@abstract
|
||||
The FBSDKApplicationDelegate is designed to post process the results from Facebook Login
|
||||
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).
|
||||
|
||||
@discussion
|
||||
|
||||
|
||||
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
|
||||
|
||||
/*!
|
||||
@abstract Gets the singleton instance.
|
||||
/**
|
||||
Gets the singleton instance.
|
||||
*/
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Call this method from the [UIApplicationDelegate application:openURL:sourceApplication:annotation:] method
|
||||
/**
|
||||
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:].
|
||||
- Parameter application: The application as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:].
|
||||
|
||||
@param url The URL as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:].
|
||||
- Parameter url: The URL as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:].
|
||||
|
||||
@param sourceApplication The sourceApplication as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:].
|
||||
- Parameter sourceApplication: The sourceApplication as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:].
|
||||
|
||||
@param annotation The annotation as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:].
|
||||
- Parameter 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.
|
||||
*/
|
||||
- Returns: 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;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Call this method from the [UIApplicationDelegate application:didFinishLaunchingWithOptions:] method
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_9_3
|
||||
/**
|
||||
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.
|
||||
|
||||
- Parameter application: The application as passed to [UIApplicationDelegate application:openURL:options:].
|
||||
|
||||
- Parameter url: The URL as passed to [UIApplicationDelegate application:openURL:options:].
|
||||
|
||||
- Parameter options: The options dictionary as passed to [UIApplicationDelegate application:openURL:options:].
|
||||
|
||||
- Returns: YES if the url was intended for the Facebook SDK, NO if not.
|
||||
*/
|
||||
- (BOOL)application:(UIApplication *)application
|
||||
openURL:(NSURL *)url
|
||||
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)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.
|
||||
|
||||
@param application The application as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:].
|
||||
- Parameter application: The application as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:].
|
||||
|
||||
@param launchOptions The launchOptions as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:].
|
||||
- Parameter launchOptions: The launchOptions as passed to [UIApplicationDelegate application:didFinishLaunchingWithOptions:].
|
||||
|
||||
@return YES if the url was intended for the Facebook SDK, NO if not.
|
||||
- Returns: YES if the url was intended for the Facebook SDK, NO if not.
|
||||
*/
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
|
||||
|
||||
|
||||
+58
-53
@@ -39,7 +39,6 @@
|
||||
#import "FBSDKBridgeAPIResponse.h"
|
||||
#import "FBSDKContainerViewController.h"
|
||||
#import "FBSDKProfile+Internal.h"
|
||||
#import "FBSDKOrganicDeeplinkHelper.h"
|
||||
#endif
|
||||
|
||||
NSString *const FBSDKApplicationDidBecomeActiveNotification = @"com.facebook.sdk.FBSDKApplicationDidBecomeActiveNotification";
|
||||
@@ -52,10 +51,10 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
||||
FBSDKBridgeAPIRequest *_pendingRequest;
|
||||
FBSDKBridgeAPICallbackBlock _pendingRequestCompletionBlock;
|
||||
id<FBSDKURLOpening> _pendingURLOpen;
|
||||
FBSDKDeferredAppInviteHandler _organicDeeplinkHandler;
|
||||
#endif
|
||||
BOOL _expectingBackground;
|
||||
UIViewController *_safariViewController;
|
||||
BOOL _isDismissingSafariViewController;
|
||||
}
|
||||
|
||||
#pragma mark - Class Methods
|
||||
@@ -124,6 +123,18 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
||||
|
||||
#pragma mark - UIApplicationDelegate
|
||||
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_9_3
|
||||
- (BOOL)application:(UIApplication *)application
|
||||
openURL:(NSURL *)url
|
||||
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
|
||||
{
|
||||
return [self application:application
|
||||
openURL:url
|
||||
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
|
||||
annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];
|
||||
}
|
||||
#endif
|
||||
|
||||
- (BOOL)application:(UIApplication *)application
|
||||
openURL:(NSURL *)url
|
||||
sourceApplication:(NSString *)sourceApplication
|
||||
@@ -137,47 +148,30 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
||||
[FBSDKTimeSpentData setSourceApplication:sourceApplication openURL:url];
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
if (_organicDeeplinkHandler) {
|
||||
NSDictionary *params = [FBSDKUtility dictionaryWithQueryString:url.query];
|
||||
if([params[@"fbsdk_deeplink"] isEqualToString: @"1"]) {
|
||||
|
||||
NSURL *sanitizedUrl = nil;
|
||||
|
||||
if(![params[@"fbsdk_deeplink_exception"] isEqualToString:@"1"]) {
|
||||
|
||||
NSMutableDictionary *sanitizedParams = [NSMutableDictionary dictionaryWithDictionary:params];
|
||||
[sanitizedParams removeObjectForKey:@"fbsdk_deeplink"];
|
||||
sanitizedUrl = [FBSDKInternalUtility URLWithScheme:url.scheme
|
||||
host:url.host
|
||||
path:url.path
|
||||
queryParameters:sanitizedParams
|
||||
error:nil];
|
||||
}
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// Callback handler for organic deeplinking.
|
||||
_organicDeeplinkHandler(sanitizedUrl);
|
||||
_organicDeeplinkHandler = nil;
|
||||
});
|
||||
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
// if they completed a SFVC flow, dimiss it.
|
||||
[_safariViewController.presentingViewController dismissViewControllerAnimated:YES completion: nil];
|
||||
_safariViewController = nil;
|
||||
|
||||
if (_pendingURLOpen) {
|
||||
id<FBSDKURLOpening> pendingURLOpen = _pendingURLOpen;
|
||||
id<FBSDKURLOpening> pendingURLOpen = _pendingURLOpen;
|
||||
|
||||
void (^completePendingOpenURLBlock)(void) = ^{
|
||||
_pendingURLOpen = nil;
|
||||
|
||||
if ([pendingURLOpen application:application
|
||||
openURL:url
|
||||
sourceApplication:sourceApplication
|
||||
annotation:annotation]) {
|
||||
return YES;
|
||||
}
|
||||
[pendingURLOpen application:application
|
||||
openURL:url
|
||||
sourceApplication:sourceApplication
|
||||
annotation:annotation];
|
||||
_isDismissingSafariViewController = NO;
|
||||
};
|
||||
// if they completed a SFVC flow, dismiss it.
|
||||
if (_safariViewController) {
|
||||
_isDismissingSafariViewController = YES;
|
||||
[_safariViewController.presentingViewController dismissViewControllerAnimated:YES
|
||||
completion:completePendingOpenURLBlock];
|
||||
_safariViewController = nil;
|
||||
} else {
|
||||
completePendingOpenURLBlock();
|
||||
}
|
||||
if ([pendingURLOpen canOpenURL:url
|
||||
forApplication:application
|
||||
sourceApplication:sourceApplication
|
||||
annotation:annotation]) {
|
||||
return YES;
|
||||
}
|
||||
if ([self _handleBridgeAPIResponseURL:url sourceApplication:sourceApplication]) {
|
||||
return YES;
|
||||
@@ -192,6 +186,8 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
||||
{
|
||||
FBSDKAccessToken *cachedToken = [[FBSDKSettings accessTokenCache] fetchAccessToken];
|
||||
[FBSDKAccessToken setCurrentAccessToken:cachedToken];
|
||||
// fetch app settings
|
||||
[FBSDKServerConfigurationManager loadServerConfigurationWithCompletionBlock:NULL];
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
FBSDKProfile *cachedProfile = [FBSDKProfile fetchCachedProfile];
|
||||
@@ -227,7 +223,7 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
||||
// _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.
|
||||
if (!_expectingBackground && !_safariViewController) {
|
||||
if (!_expectingBackground && !_safariViewController && !_isDismissingSafariViewController) {
|
||||
_active = YES;
|
||||
#if !TARGET_OS_TV
|
||||
[_pendingURLOpen applicationDidBecomeActive:[notification object]];
|
||||
@@ -249,18 +245,23 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
||||
_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
|
||||
BOOL opened = [[UIApplication sharedApplication] openURL:url];
|
||||
NSOperatingSystemVersion iOS10Version = { .majorVersion = 10, .minorVersion = 0, .patchVersion = 0 };
|
||||
if ([FBSDKInternalUtility isOSRunTimeVersionAtLeast:iOS10Version]) {
|
||||
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:handler];
|
||||
} 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 ([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);
|
||||
}
|
||||
}
|
||||
if (handler) {
|
||||
handler(opened);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -288,7 +289,7 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
||||
_pendingRequestCompletionBlock = nil;
|
||||
NSError *openedURLError;
|
||||
if ([request.scheme hasPrefix:@"http"]) {
|
||||
openedURLError = [FBSDKError errorWithCode:FBSDKBrowswerUnavailableErrorCode
|
||||
openedURLError = [FBSDKError errorWithCode:FBSDKBrowserUnavailableErrorCode
|
||||
message:@"the app switch failed because the browser is unavailable"];
|
||||
} else {
|
||||
openedURLError = [FBSDKError errorWithCode:FBSDKAppVersionUnsupportedErrorCode
|
||||
@@ -338,12 +339,16 @@ static NSString *const FBSDKAppLinkInboundEvent = @"fb_al_inbound";
|
||||
[parent.transitionCoordinator animateAlongsideTransition:NULL completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
|
||||
// Note SFVC init must occur inside block to avoid blank screen.
|
||||
_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];
|
||||
}];
|
||||
} 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];
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
/*!
|
||||
@abstract A base class for common SDK buttons.
|
||||
/**
|
||||
A base class for common SDK buttons.
|
||||
*/
|
||||
@interface FBSDKButton : UIButton
|
||||
|
||||
|
||||
@@ -20,102 +20,113 @@
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKMacros.h>
|
||||
|
||||
/*!
|
||||
@abstract The error domain for all errors from FBSDKCoreKit.
|
||||
@discussion Error codes from the SDK in the range 0-99 are reserved for this domain.
|
||||
/**
|
||||
The error domain for all errors from FBSDKCoreKit.
|
||||
|
||||
Error codes from the SDK in the range 0-99 are reserved for this domain.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKErrorDomain;
|
||||
|
||||
/*!
|
||||
@typedef NS_ENUM(NSInteger, FBSDKErrorCode)
|
||||
@abstract Error codes for FBSDKErrorDomain.
|
||||
/**
|
||||
NS_ENUM(NSInteger, FBSDKErrorCode)
|
||||
Error codes for FBSDKErrorDomain.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, FBSDKErrorCode)
|
||||
{
|
||||
/*!
|
||||
@abstract Reserved.
|
||||
/**
|
||||
Reserved.
|
||||
*/
|
||||
FBSDKReservedErrorCode = 0,
|
||||
|
||||
/*!
|
||||
@abstract The error code for errors from invalid encryption on incoming encryption URLs.
|
||||
/**
|
||||
The error code for errors from invalid encryption on incoming encryption URLs.
|
||||
*/
|
||||
FBSDKEncryptionErrorCode,
|
||||
|
||||
/*!
|
||||
@abstract The error code for errors from invalid arguments to SDK methods.
|
||||
/**
|
||||
The error code for errors from invalid arguments to SDK methods.
|
||||
*/
|
||||
FBSDKInvalidArgumentErrorCode,
|
||||
|
||||
/*!
|
||||
@abstract The error code for unknown errors.
|
||||
/**
|
||||
The error code for unknown errors.
|
||||
*/
|
||||
FBSDKUnknownErrorCode,
|
||||
|
||||
/*!
|
||||
@abstract A request failed due to a network error. Use NSUnderlyingErrorKey to retrieve
|
||||
/**
|
||||
A request failed due to a network error. Use NSUnderlyingErrorKey to retrieve
|
||||
the error object from the NSURLConnection for more information.
|
||||
*/
|
||||
FBSDKNetworkErrorCode,
|
||||
|
||||
/*!
|
||||
@abstract The error code for errors encounted during an App Events flush.
|
||||
/**
|
||||
The error code for errors encountered during an App Events flush.
|
||||
*/
|
||||
FBSDKAppEventsFlushErrorCode,
|
||||
|
||||
/*!
|
||||
@abstract An endpoint that returns a binary response was used with FBSDKGraphRequestConnection.
|
||||
@discussion Endpoints that return image/jpg, etc. should be accessed using NSURLRequest
|
||||
/**
|
||||
An endpoint that returns a binary response was used with FBSDKGraphRequestConnection.
|
||||
|
||||
Endpoints that return image/jpg, etc. should be accessed using NSURLRequest
|
||||
*/
|
||||
FBSDKGraphRequestNonTextMimeTypeReturnedErrorCode,
|
||||
|
||||
/*!
|
||||
@abstract The operation failed because the server returned an unexpected response.
|
||||
@discussion You can get this error if you are not using the most recent SDK, or you are accessing a version of the
|
||||
/**
|
||||
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.
|
||||
*/
|
||||
FBSDKGraphRequestProtocolMismatchErrorCode,
|
||||
|
||||
/*!
|
||||
@abstract The Graph API returned an error.
|
||||
@discussion See below for useful userInfo keys (beginning with FBSDKGraphRequestError*)
|
||||
/**
|
||||
The Graph API returned an error.
|
||||
|
||||
See below for useful userInfo keys (beginning with FBSDKGraphRequestError*)
|
||||
*/
|
||||
FBSDKGraphRequestGraphAPIErrorCode,
|
||||
|
||||
/*!
|
||||
@abstract The specified dialog configuration is not available.
|
||||
@discussion This error may signify that the configuration for the dialogs has not yet been downloaded from the server
|
||||
/**
|
||||
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.
|
||||
*/
|
||||
FBSDKDialogUnavailableErrorCode,
|
||||
|
||||
/*!
|
||||
@abstract Indicates an operation failed because a required access token was not found.
|
||||
/**
|
||||
Indicates an operation failed because a required access token was not found.
|
||||
*/
|
||||
FBSDKAccessTokenRequiredErrorCode,
|
||||
|
||||
/*!
|
||||
@abstract Indicates an app switch (typically for a dialog) failed because the destination app is out of date.
|
||||
/**
|
||||
Indicates an app switch (typically for a dialog) failed because the destination app is out of date.
|
||||
*/
|
||||
FBSDKAppVersionUnsupportedErrorCode,
|
||||
|
||||
/*!
|
||||
@abstract Indicates an app switch to the browser (typically for a dialog) failed.
|
||||
/**
|
||||
Indicates an app switch to the browser (typically for a dialog) failed.
|
||||
*/
|
||||
FBSDKBrowswerUnavailableErrorCode,
|
||||
FBSDKBrowserUnavailableErrorCode,
|
||||
|
||||
/**
|
||||
|
||||
- Warning:use FBSDKBrowserUnavailableErrorCode instead
|
||||
*/
|
||||
FBSDKBrowswerUnavailableErrorCode __attribute__ ((deprecated("use FBSDKBrowserUnavailableErrorCode instead"))) = FBSDKBrowserUnavailableErrorCode,
|
||||
};
|
||||
|
||||
/*!
|
||||
@typedef NS_ENUM(NSUInteger, FBSDKGraphRequestErrorCategory)
|
||||
@abstract Describes the category of Facebook error. See `FBSDKGraphRequestErrorCategoryKey`.
|
||||
/**
|
||||
NS_ENUM(NSUInteger, FBSDKGraphRequestErrorCategory)
|
||||
Describes the category of Facebook error. See `FBSDKGraphRequestErrorCategoryKey`.
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, FBSDKGraphRequestErrorCategory)
|
||||
{
|
||||
/*! The default error category that is not known to be recoverable. Check `FBSDKLocalizedErrorDescriptionKey` for a user facing message. */
|
||||
/** The default error category that is not known to be recoverable. Check `FBSDKLocalizedErrorDescriptionKey` for a user facing message. */
|
||||
FBSDKGraphRequestErrorCategoryOther = 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. */
|
||||
/** 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. */
|
||||
FBSDKGraphRequestErrorCategoryTransient = 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. */
|
||||
/** 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. */
|
||||
FBSDKGraphRequestErrorCategoryRecoverable = 2
|
||||
};
|
||||
|
||||
@@ -123,36 +134,38 @@ typedef NS_ENUM(NSUInteger, FBSDKGraphRequestErrorCategory)
|
||||
@methodgroup error userInfo keys
|
||||
*/
|
||||
|
||||
/*!
|
||||
@abstract The userInfo key for the invalid collection for errors with FBSDKInvalidArgumentErrorCode.
|
||||
@discussion If the invalid argument is a collection, the collection can be found with this key and the individual
|
||||
/**
|
||||
The userInfo key for the invalid collection for errors with FBSDKInvalidArgumentErrorCode.
|
||||
|
||||
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.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKErrorArgumentCollectionKey;
|
||||
|
||||
/*!
|
||||
@abstract The userInfo key for the invalid argument name for errors with FBSDKInvalidArgumentErrorCode.
|
||||
/**
|
||||
The userInfo key for the invalid argument name for errors with FBSDKInvalidArgumentErrorCode.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKErrorArgumentNameKey;
|
||||
|
||||
/*!
|
||||
@abstract The userInfo key for the invalid argument value for errors with FBSDKInvalidArgumentErrorCode.
|
||||
/**
|
||||
The userInfo key for the invalid argument value for errors with FBSDKInvalidArgumentErrorCode.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKErrorArgumentValueKey;
|
||||
|
||||
/*!
|
||||
@abstract The userInfo key for the message for developers in NSErrors that originate from the SDK.
|
||||
@discussion The developer message will not be localized and is not intended to be presented within the app.
|
||||
/**
|
||||
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.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKErrorDeveloperMessageKey;
|
||||
|
||||
/*!
|
||||
@abstract The userInfo key describing a localized description that can be presented to the user.
|
||||
/**
|
||||
The userInfo key describing a localized description that can be presented to the user.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKErrorLocalizedDescriptionKey;
|
||||
|
||||
/*!
|
||||
@abstract The userInfo key describing a localized title that can be presented to the user, used with `FBSDKLocalizedErrorDescriptionKey`.
|
||||
/**
|
||||
The userInfo key describing a localized title that can be presented to the user, used with `FBSDKLocalizedErrorDescriptionKey`.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKErrorLocalizedTitleKey;
|
||||
|
||||
@@ -160,45 +173,47 @@ FBSDK_EXTERN NSString *const FBSDKErrorLocalizedTitleKey;
|
||||
@methodgroup FBSDKGraphRequest error userInfo keys
|
||||
*/
|
||||
|
||||
/*!
|
||||
@abstract The userInfo key describing the error category, for error recovery purposes.
|
||||
@discussion See `FBSDKGraphErrorRecoveryProcessor` and `[FBSDKGraphRequest disableErrorRecovery]`.
|
||||
/**
|
||||
The userInfo key describing the error category, for error recovery purposes.
|
||||
|
||||
See `FBSDKGraphErrorRecoveryProcessor` and `[FBSDKGraphRequest disableErrorRecovery]`.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKGraphRequestErrorCategoryKey;
|
||||
|
||||
/*
|
||||
@abstract The userInfo key for the Graph API error code.
|
||||
The userInfo key for the Graph API error code.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKGraphRequestErrorGraphErrorCode;
|
||||
|
||||
/*
|
||||
@abstract The userInfo key for the Graph API error subcode.
|
||||
The userInfo key for the Graph API error subcode.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKGraphRequestErrorGraphErrorSubcode;
|
||||
|
||||
/*
|
||||
@abstract The userInfo key for the HTTP status code.
|
||||
The userInfo key for the HTTP status code.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKGraphRequestErrorHTTPStatusCodeKey;
|
||||
|
||||
/*
|
||||
@abstract The userInfo key for the raw JSON response.
|
||||
The userInfo key for the raw JSON response.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKGraphRequestErrorParsedJSONResponseKey;
|
||||
|
||||
/*!
|
||||
@abstract a formal protocol very similar to the informal protocol NSErrorRecoveryAttempting
|
||||
/**
|
||||
a formal protocol very similar to the informal protocol NSErrorRecoveryAttempting
|
||||
*/
|
||||
@protocol FBSDKErrorRecoveryAttempting<NSObject>
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
@discussion
|
||||
/**
|
||||
attempt the recovery
|
||||
- Parameter error: the error
|
||||
- Parameter recoveryOptionIndex: the selected option index
|
||||
- Parameter delegate: the delegate
|
||||
- Parameter didRecoverSelector: the callback selector, see discussion.
|
||||
- Parameter 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;
|
||||
|
||||
@@ -18,15 +18,16 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
@abstract Extension protocol for NSCopying that adds the copy method, which is implemented on NSObject.
|
||||
@discussion NSObject<NSCopying> implicitly conforms to this protocol.
|
||||
/**
|
||||
Extension protocol for NSCopying that adds the copy method, which is implemented on NSObject.
|
||||
|
||||
NSObject<NSCopying> implicitly conforms to this protocol.
|
||||
*/
|
||||
@protocol FBSDKCopying <NSCopying, NSObject>
|
||||
|
||||
/*!
|
||||
@abstract Implemented by NSObject as a convenience to copyWithZone:.
|
||||
@return A copy of the receiver.
|
||||
/**
|
||||
Implemented by NSObject as a convenience to copyWithZone:.
|
||||
- Returns: A copy of the receiver.
|
||||
*/
|
||||
- (id)copy;
|
||||
|
||||
|
||||
@@ -44,5 +44,5 @@
|
||||
#import <FBSDKCoreKit/FBSDKDeviceViewControllerBase.h>
|
||||
#endif
|
||||
|
||||
#define FBSDK_VERSION_STRING @"4.11.0"
|
||||
#define FBSDK_TARGET_PLATFORM_VERSION @"v2.6"
|
||||
#define FBSDK_VERSION_STRING @"4.18.0"
|
||||
#define FBSDK_TARGET_PLATFORM_VERSION @"v2.8"
|
||||
+28
-26
@@ -23,25 +23,26 @@
|
||||
@class FBSDKGraphErrorRecoveryProcessor;
|
||||
@class FBSDKGraphRequest;
|
||||
|
||||
/*!
|
||||
@abstract Defines a delegate for `FBSDKGraphErrorRecoveryProcessor`.
|
||||
/**
|
||||
Defines a delegate for `FBSDKGraphErrorRecoveryProcessor`.
|
||||
*/
|
||||
@protocol FBSDKGraphErrorRecoveryProcessorDelegate<NSObject>
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Indicates the error recovery has been attempted.
|
||||
- Parameter processor: the processor instance.
|
||||
- Parameter didRecover: YES if the recovery was successful.
|
||||
- Parameter error: the error that that was attempted to be recovered from.
|
||||
*/
|
||||
- (void)processorDidAttemptRecovery:(FBSDKGraphErrorRecoveryProcessor *)processor didRecover:(BOOL)didRecover error:(NSError *)error;
|
||||
|
||||
@optional
|
||||
/*!
|
||||
@abstract Indicates the processor is about to process the error.
|
||||
@param processor the processor instance.
|
||||
@param error the error is about to be processed.
|
||||
@discussion return NO if the processor should not process the error. For example,
|
||||
/**
|
||||
Indicates the processor is about to process the error.
|
||||
- Parameter processor: the processor instance.
|
||||
- Parameter 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[FBSDKGraphRequestErrorCategoryKey] equal to FBSDKGraphRequestErrorCategoryOther
|
||||
*/
|
||||
@@ -49,9 +50,10 @@
|
||||
|
||||
@end
|
||||
|
||||
/*!
|
||||
@abstract Defines a type that can process Facebook NSErrors with best practices.
|
||||
@discussion Facebook NSErrors can contain FBSDKErrorRecoveryAttempting instances to recover from errors, or
|
||||
/**
|
||||
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 FBSDKGraphRequestErrorCategoryKey, assume the recovery succeeded and
|
||||
@@ -74,23 +76,23 @@
|
||||
*/
|
||||
@interface FBSDKGraphErrorRecoveryProcessor : NSObject
|
||||
|
||||
/*!
|
||||
@abstract Gets the delegate. Note this is a strong reference, and is nil'ed out after recovery is complete.
|
||||
/**
|
||||
Gets the delegate. Note this is a strong reference, and is nil'ed out after recovery is complete.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) id<FBSDKGraphErrorRecoveryProcessorDelegate>delegate;
|
||||
|
||||
/*!
|
||||
@abstract Attempts to process the error, return YES if the error can be processed.
|
||||
@param error the error to process.
|
||||
@param request the relateed request that may be reissued.
|
||||
@param delegate the delegate that will be retained until recovery is complete.
|
||||
/**
|
||||
Attempts to process the error, return YES if the error can be processed.
|
||||
- Parameter error: the error to process.
|
||||
- Parameter request: the related request that may be reissued.
|
||||
- Parameter delegate: the delegate that will be retained until recovery is complete.
|
||||
*/
|
||||
- (BOOL)processError:(NSError *)error request:(FBSDKGraphRequest *)request delegate:(id<FBSDKGraphErrorRecoveryProcessorDelegate>) delegate;
|
||||
|
||||
/*!
|
||||
@abstract The callback for FBSDKErrorRecoveryAttempting
|
||||
@param didRecover if the recovery succeeded
|
||||
@param contextInfo unused
|
||||
/**
|
||||
The callback for FBSDKErrorRecoveryAttempting
|
||||
- Parameter didRecover: if the recovery succeeded
|
||||
- Parameter contextInfo: unused
|
||||
*/
|
||||
- (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo;
|
||||
|
||||
|
||||
+82
-23
@@ -38,7 +38,9 @@
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
_alertView.delegate = nil;
|
||||
if (_alertView) {
|
||||
_alertView.delegate = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)processError:(NSError *)error request:(FBSDKGraphRequest *)request delegate:(id<FBSDKGraphErrorRecoveryProcessorDelegate>) delegate
|
||||
@@ -69,18 +71,7 @@
|
||||
NSString *recoverySuggestion = error.userInfo[NSLocalizedRecoverySuggestionErrorKey];
|
||||
_error = error;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
_alertView = [[UIAlertView alloc] initWithTitle:nil
|
||||
message:recoverySuggestion
|
||||
delegate:self
|
||||
cancelButtonTitle:nil
|
||||
otherButtonTitles:nil];
|
||||
#pragma clang diagnostic pop
|
||||
for (NSString *option in recoveryOptionsTitles) {
|
||||
[_alertView addButtonWithTitle:option];
|
||||
}
|
||||
[_alertView show];
|
||||
[self displayAlertWithRecoverySuggestion:recoverySuggestion recoveryOptionsTitles:recoveryOptionsTitles];
|
||||
});
|
||||
return YES;
|
||||
}
|
||||
@@ -120,14 +111,7 @@
|
||||
NSLocalizedStringWithDefaultValue(@"ErrorRecovery.Alert.OK", @"FacebookSDK", [FBSDKInternalUtility bundleForStrings],
|
||||
@"OK",
|
||||
@"The title of the label to dismiss the alert when presenting user facing error messages");
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
[[[UIAlertView alloc] initWithTitle:title
|
||||
message:message
|
||||
delegate:nil
|
||||
cancelButtonTitle:localizedOK
|
||||
otherButtonTitles:nil] show];
|
||||
#pragma clang diagnostic pop
|
||||
[self displayAlertWithTitle:title message:message cancelButtonTitle:localizedOK];
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -136,6 +120,79 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
#pragma mark - UIAlertView and UIAlertController support
|
||||
|
||||
- (void)displayAlertWithRecoverySuggestion:(NSString *)recoverySuggestion recoveryOptionsTitles:(NSArray<NSString *> *)recoveryOptionsTitles
|
||||
{
|
||||
if ([UIAlertController class]) {
|
||||
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) {
|
||||
[_recoveryAttempter attemptRecoveryFromError:_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];
|
||||
} else {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
_alertView = [[UIAlertView alloc] initWithTitle:nil
|
||||
message:recoverySuggestion
|
||||
delegate:self
|
||||
cancelButtonTitle:nil
|
||||
otherButtonTitles:nil];
|
||||
#pragma clang diagnostic pop
|
||||
for (NSString *option in recoveryOptionsTitles) {
|
||||
[_alertView addButtonWithTitle:option];
|
||||
}
|
||||
[_alertView show];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)displayAlertWithTitle:(NSString *)title message:(NSString *)message cancelButtonTitle:(NSString *)localizedOK
|
||||
{
|
||||
if ([UIAlertController class]) {
|
||||
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil
|
||||
message:message
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
UIAlertAction *OKAction = [UIAlertAction actionWithTitle:localizedOK
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:^(UIAlertAction * _Nonnull action) {
|
||||
[_recoveryAttempter attemptRecoveryFromError:_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];
|
||||
} else {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
[[[UIAlertView alloc] initWithTitle:title
|
||||
message:message
|
||||
delegate:nil
|
||||
cancelButtonTitle:localizedOK
|
||||
otherButtonTitles:nil] show];
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UIAlertViewDelegate
|
||||
|
||||
#pragma clang diagnostic push
|
||||
@@ -143,8 +200,10 @@
|
||||
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
|
||||
{
|
||||
[_recoveryAttempter attemptRecoveryFromError:_error optionIndex:buttonIndex delegate:self didRecoverSelector:@selector(didPresentErrorWithRecovery:contextInfo:) contextInfo:nil];
|
||||
_alertView.delegate = nil;
|
||||
_alertView = nil;
|
||||
if (_alertView) {
|
||||
_alertView.delegate = nil;
|
||||
_alertView = nil;
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
|
||||
@@ -22,10 +22,11 @@
|
||||
|
||||
@class FBSDKAccessToken;
|
||||
|
||||
/*!
|
||||
@abstract Represents a request to the Facebook Graph API.
|
||||
/**
|
||||
Represents a request to the Facebook Graph API.
|
||||
|
||||
@discussion `FBSDKGraphRequest` encapsulates the components of a request (the
|
||||
|
||||
`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.
|
||||
|
||||
@@ -37,35 +38,36 @@
|
||||
|
||||
By default, FBSDKGraphRequest will attempt to recover any errors returned from
|
||||
Facebook. You can disable this via `disableErrorRecovery:`.
|
||||
@see FBSDKGraphErrorRecoveryProcessor
|
||||
|
||||
- See:FBSDKGraphErrorRecoveryProcessor
|
||||
*/
|
||||
@interface FBSDKGraphRequest : NSObject
|
||||
|
||||
/*!
|
||||
@abstract Initializes a new instance that use use `[FBSDKAccessToken currentAccessToken]`.
|
||||
@param graphPath the graph path (e.g., @"me").
|
||||
@param parameters the optional parameters dictionary.
|
||||
/**
|
||||
Initializes a new instance that use use `[FBSDKAccessToken currentAccessToken]`.
|
||||
- Parameter graphPath: the graph path (e.g., @"me").
|
||||
- Parameter parameters: the optional parameters dictionary.
|
||||
*/
|
||||
- (instancetype)initWithGraphPath:(NSString *)graphPath
|
||||
parameters:(NSDictionary *)parameters;
|
||||
|
||||
/*!
|
||||
@abstract 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".
|
||||
/**
|
||||
Initializes a new instance that use use `[FBSDKAccessToken currentAccessToken]`.
|
||||
- Parameter graphPath: the graph path (e.g., @"me").
|
||||
- Parameter parameters: the optional parameters dictionary.
|
||||
- Parameter HTTPMethod: the optional HTTP method. nil defaults to @"GET".
|
||||
*/
|
||||
- (instancetype)initWithGraphPath:(NSString *)graphPath
|
||||
parameters:(NSDictionary *)parameters
|
||||
HTTPMethod:(NSString *)HTTPMethod;
|
||||
|
||||
/*!
|
||||
@abstract 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 FBSDK_TARGET_PLATFORM_VERSION.
|
||||
@param HTTPMethod the optional HTTP method (e.g., @"POST"). nil defaults to @"GET".
|
||||
/**
|
||||
Initializes a new instance.
|
||||
- Parameter graphPath: the graph path (e.g., @"me").
|
||||
- Parameter parameters: the optional parameters dictionary.
|
||||
- Parameter tokenString: the token string to use. Specifying nil will cause no token to be used.
|
||||
- Parameter version: the optional Graph API version (e.g., @"v2.0"). nil defaults to `[FBSDKSettings graphAPIVersion]`.
|
||||
- Parameter HTTPMethod: the optional HTTP method (e.g., @"POST"). nil defaults to @"GET".
|
||||
*/
|
||||
- (instancetype)initWithGraphPath:(NSString *)graphPath
|
||||
parameters:(NSDictionary *)parameters
|
||||
@@ -74,35 +76,36 @@
|
||||
HTTPMethod:(NSString *)HTTPMethod
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/*!
|
||||
@abstract The request parameters.
|
||||
/**
|
||||
The request parameters.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSMutableDictionary *parameters;
|
||||
|
||||
/*!
|
||||
@abstract The access token string used by the request.
|
||||
/**
|
||||
The access token string used by the request.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *tokenString;
|
||||
|
||||
/*!
|
||||
@abstract The Graph API endpoint to use for the request, for example "me".
|
||||
/**
|
||||
The Graph API endpoint to use for the request, for example "me".
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *graphPath;
|
||||
|
||||
/*!
|
||||
@abstract The HTTPMethod to use for the request, for example "GET" or "POST".
|
||||
/**
|
||||
The HTTPMethod to use for the request, for example "GET" or "POST".
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *HTTPMethod;
|
||||
|
||||
/*!
|
||||
@abstract The Graph API version to use (e.g., "v2.0")
|
||||
/**
|
||||
The Graph API version to use (e.g., "v2.0")
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *version;
|
||||
|
||||
/*!
|
||||
@abstract If set, disables the automatic error recovery mechanism.
|
||||
@param disable whether to disable the automatic error recovery mechanism
|
||||
@discussion By default, non-batched FBSDKGraphRequest instances will automatically try to recover
|
||||
/**
|
||||
If set, disables the automatic error recovery mechanism.
|
||||
- Parameter 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.
|
||||
@@ -111,9 +114,9 @@ NS_DESIGNATED_INITIALIZER;
|
||||
*/
|
||||
- (void)setGraphErrorRecoveryDisabled:(BOOL)disable;
|
||||
|
||||
/*!
|
||||
@abstract Starts a connection to the Graph API.
|
||||
@param handler The handler block to call when the request completes.
|
||||
/**
|
||||
Starts a connection to the Graph API.
|
||||
- Parameter handler: The handler block to call when the request completes.
|
||||
*/
|
||||
- (FBSDKGraphRequestConnection *)startWithCompletionHandler:(FBSDKGraphRequestHandler)handler;
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ static NSString *const kGetHTTPMethod = @"GET";
|
||||
if ((self = [self initWithGraphPath:graphPath
|
||||
parameters:parameters
|
||||
tokenString:tokenString
|
||||
version:FBSDK_TARGET_PLATFORM_VERSION
|
||||
version:[FBSDKSettings graphAPIVersion]
|
||||
HTTPMethod:HTTPMethod])) {
|
||||
self.flags |= flags;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ static NSString *const kGetHTTPMethod = @"GET";
|
||||
HTTPMethod:(NSString *)HTTPMethod {
|
||||
if ((self = [super init])) {
|
||||
_tokenString = [tokenString copy];
|
||||
_version = version ? [version copy] : FBSDK_TARGET_PLATFORM_VERSION;
|
||||
_version = version ? [version copy] : [FBSDKSettings graphAPIVersion];
|
||||
_graphPath = [graphPath copy];
|
||||
_HTTPMethod = HTTPMethod ? [HTTPMethod copy] : kGetHTTPMethod;
|
||||
_parameters = [[NSMutableDictionary alloc] initWithDictionary:parameters];
|
||||
|
||||
+96
-98
@@ -23,108 +23,107 @@
|
||||
@class FBSDKGraphRequest;
|
||||
@class FBSDKGraphRequestConnection;
|
||||
|
||||
/*!
|
||||
@typedef FBSDKGraphRequestHandler
|
||||
/**
|
||||
FBSDKGraphRequestHandler
|
||||
|
||||
@abstract
|
||||
A block that is passed to addRequest to register for a callback with the results of that
|
||||
A block that is passed to addRequest to register for a callback with the results of that
|
||||
request once the connection completes.
|
||||
|
||||
@discussion
|
||||
|
||||
|
||||
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.
|
||||
- Parameter connection: The `FBSDKGraphRequestConnection` that sent the request.
|
||||
|
||||
@param result The result of the request. This is a translation of
|
||||
- Parameter 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.
|
||||
- Parameter error: The `NSError` representing any error that occurred.
|
||||
|
||||
*/
|
||||
typedef void (^FBSDKGraphRequestHandler)(FBSDKGraphRequestConnection *connection,
|
||||
id result,
|
||||
NSError *error);
|
||||
|
||||
/*!
|
||||
/**
|
||||
@protocol
|
||||
|
||||
@abstract
|
||||
The `FBSDKGraphRequestConnectionDelegate` protocol defines the methods used to receive network
|
||||
The `FBSDKGraphRequestConnectionDelegate` protocol defines the methods used to receive network
|
||||
activity progress information from a <FBSDKGraphRequestConnection>.
|
||||
*/
|
||||
@protocol FBSDKGraphRequestConnectionDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
/*!
|
||||
/**
|
||||
@method
|
||||
|
||||
@abstract
|
||||
Tells the delegate the request connection will begin loading
|
||||
Tells the delegate the request connection will begin loading
|
||||
|
||||
|
||||
|
||||
@discussion
|
||||
If the <FBSDKGraphRequestConnection> 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
|
||||
- Parameter connection: The request connection that is starting a network request
|
||||
*/
|
||||
- (void)requestConnectionWillBeginLoading:(FBSDKGraphRequestConnection *)connection;
|
||||
|
||||
/*!
|
||||
/**
|
||||
@method
|
||||
|
||||
@abstract
|
||||
Tells the delegate the request connection finished loading
|
||||
Tells the delegate the request connection finished loading
|
||||
|
||||
@discussion
|
||||
If the request connection completes without a network error occuring then this method is called.
|
||||
|
||||
|
||||
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 <FBSDKGraphRequest> 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 <FBSDKGraphRequest>.
|
||||
|
||||
This method is invoked after the completion handler for each <FBSDKGraphRequest>.
|
||||
|
||||
@param connection The request connection that successfully completed a network request
|
||||
- Parameter connection: The request connection that successfully completed a network request
|
||||
*/
|
||||
- (void)requestConnectionDidFinishLoading:(FBSDKGraphRequestConnection *)connection;
|
||||
|
||||
/*!
|
||||
/**
|
||||
@method
|
||||
|
||||
@abstract
|
||||
Tells the delegate the request connection failed with an error
|
||||
Tells the delegate the request connection failed with an error
|
||||
|
||||
|
||||
|
||||
@discussion
|
||||
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
|
||||
- Parameter connection: The request connection that successfully completed a network request
|
||||
- Parameter error: The `NSError` representing the network error that occurred, if any. May be nil
|
||||
in some circumstances. Consult the `NSError` for the <FBSDKGraphRequest> for reliable
|
||||
failure information.
|
||||
*/
|
||||
- (void)requestConnection:(FBSDKGraphRequestConnection *)connection
|
||||
didFailWithError:(NSError *)error;
|
||||
|
||||
/*!
|
||||
/**
|
||||
@method
|
||||
|
||||
@abstract
|
||||
Tells the delegate how much data has been sent and is planned to send to the remote host
|
||||
Tells the delegate how much data has been sent and is planned to send to the remote host
|
||||
|
||||
|
||||
|
||||
@discussion
|
||||
The byte count arguments refer to the aggregated <FBSDKGraphRequest> objects, not a particular <FBSDKGraphRequest>.
|
||||
|
||||
Like `NSURLConnection`, 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
|
||||
- Parameter connection: The request connection transmitting data to a remote host
|
||||
- Parameter bytesWritten: The number of bytes sent in the last transmission
|
||||
- Parameter totalBytesWritten: The total number of bytes sent to the remote host
|
||||
- Parameter totalBytesExpectedToWrite: The total number of bytes expected to send to the remote host
|
||||
*/
|
||||
- (void)requestConnection:(FBSDKGraphRequestConnection *)connection
|
||||
didSendBodyData:(NSInteger)bytesWritten
|
||||
@@ -133,13 +132,12 @@ totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite;
|
||||
|
||||
@end
|
||||
|
||||
/*!
|
||||
@class FBSDKGraphRequestConnection
|
||||
/**
|
||||
|
||||
The `FBSDKGraphRequestConnection` represents a single connection to Facebook to service a request.
|
||||
|
||||
|
||||
@abstract
|
||||
The `FBSDKGraphRequestConnection` represents a single connection to Facebook to service a request.
|
||||
|
||||
@discussion
|
||||
The request settings are encapsulated in a reusable <FBSDKGraphRequest> object. The
|
||||
`FBSDKGraphRequestConnection` object encapsulates the concerns of a single communication
|
||||
e.g. starting a connection, canceling a connection, or batching requests.
|
||||
@@ -147,22 +145,21 @@ totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite;
|
||||
*/
|
||||
@interface FBSDKGraphRequestConnection : NSObject
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
The delegate object that receives updates.
|
||||
/**
|
||||
The delegate object that receives updates.
|
||||
*/
|
||||
@property (nonatomic, assign) id<FBSDKGraphRequestConnectionDelegate> delegate;
|
||||
@property (nonatomic, weak) id<FBSDKGraphRequestConnectionDelegate> delegate;
|
||||
|
||||
/*!
|
||||
@abstract Gets or sets the timeout interval to wait for a response before giving up.
|
||||
/**
|
||||
Gets or sets the timeout interval to wait for a response before giving up.
|
||||
*/
|
||||
@property (nonatomic) NSTimeInterval timeout;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
The raw response that was returned from the server. (readonly)
|
||||
/**
|
||||
The raw response that was returned from the server. (readonly)
|
||||
|
||||
|
||||
|
||||
@discussion
|
||||
This property can be used to inspect HTTP headers that were returned from
|
||||
the server.
|
||||
|
||||
@@ -171,57 +168,56 @@ totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite;
|
||||
*/
|
||||
@property (nonatomic, retain, readonly) NSHTTPURLResponse *URLResponse;
|
||||
|
||||
/*!
|
||||
/**
|
||||
@methodgroup Class methods
|
||||
*/
|
||||
|
||||
/*!
|
||||
/**
|
||||
@method
|
||||
|
||||
@abstract
|
||||
This method sets the default timeout on all FBSDKGraphRequestConnection instances. Defaults to 60 seconds.
|
||||
This method sets the default timeout on all FBSDKGraphRequestConnection instances. Defaults to 60 seconds.
|
||||
|
||||
@param defaultConnectionTimeout The timeout interval.
|
||||
- Parameter defaultConnectionTimeout: The timeout interval.
|
||||
*/
|
||||
+ (void)setDefaultConnectionTimeout:(NSTimeInterval)defaultConnectionTimeout;
|
||||
|
||||
/*!
|
||||
/**
|
||||
@methodgroup Adding requests
|
||||
*/
|
||||
|
||||
/*!
|
||||
/**
|
||||
@method
|
||||
|
||||
@abstract
|
||||
This method adds an <FBSDKGraphRequest> object to this connection.
|
||||
This method adds an <FBSDKGraphRequest> object to this connection.
|
||||
|
||||
- Parameter request: A request to be included in the round-trip when start is called.
|
||||
- Parameter handler: A handler to call back when the round-trip completes or times out.
|
||||
|
||||
|
||||
@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.
|
||||
|
||||
@discussion
|
||||
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
|
||||
|
||||
@abstract
|
||||
This method adds an <FBSDKGraphRequest> object to this connection.
|
||||
This method adds an <FBSDKGraphRequest> object to this connection.
|
||||
|
||||
@param request A request to be included in the round-trip when start is called.
|
||||
- Parameter 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.
|
||||
- Parameter 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
|
||||
- Parameter name: An optional name for this request. This can be used to feed
|
||||
the results of one request to the input of another <FBSDKGraphRequest> in the same
|
||||
`FBSDKGraphRequestConnection` as described in
|
||||
[Graph API Batch Requests]( https://developers.facebook.com/docs/reference/api/batch/ ).
|
||||
|
||||
@discussion
|
||||
|
||||
|
||||
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.
|
||||
@@ -230,21 +226,21 @@ totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite;
|
||||
completionHandler:(FBSDKGraphRequestHandler)handler
|
||||
batchEntryName:(NSString *)name;
|
||||
|
||||
/*!
|
||||
/**
|
||||
@method
|
||||
|
||||
@abstract
|
||||
This method adds an <FBSDKGraphRequest> object to this connection.
|
||||
This method adds an <FBSDKGraphRequest> object to this connection.
|
||||
|
||||
@param request A request to be included in the round-trip when start is called.
|
||||
- Parameter 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.
|
||||
- Parameter 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
|
||||
- Parameter 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".
|
||||
|
||||
@discussion
|
||||
|
||||
|
||||
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.
|
||||
@@ -253,18 +249,18 @@ totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite;
|
||||
completionHandler:(FBSDKGraphRequestHandler)handler
|
||||
batchParameters:(NSDictionary *)batchParameters;
|
||||
|
||||
/*!
|
||||
/**
|
||||
@methodgroup Instance methods
|
||||
*/
|
||||
|
||||
/*!
|
||||
/**
|
||||
@method
|
||||
|
||||
@abstract
|
||||
Signals that a connection should be logically terminated as the
|
||||
Signals that a connection should be logically terminated as the
|
||||
application is no longer interested in a response.
|
||||
|
||||
@discussion
|
||||
|
||||
|
||||
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
|
||||
@@ -273,52 +269,54 @@ totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite;
|
||||
*/
|
||||
- (void)cancel;
|
||||
|
||||
/*!
|
||||
/**
|
||||
@method
|
||||
|
||||
@abstract
|
||||
This method starts a connection with the server and is capable of handling all of the
|
||||
This method starts a connection with the server and is capable of handling all of the
|
||||
requests that were added to the connection.
|
||||
|
||||
@discussion By default, a connection is scheduled on the current thread in the default mode when it is created.
|
||||
|
||||
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;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
@discussion By default, a connection is scheduled on the current thread in the default mode when it is created.
|
||||
/**
|
||||
Determines the operation queue that is used to call methods on the connection's delegate.
|
||||
- Parameter 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.
|
||||
|
||||
This is very similar to `[NSURLConnection setDelegateQueue:]`.
|
||||
*/
|
||||
- (void)setDelegateQueue:(NSOperationQueue *)queue;
|
||||
|
||||
/*!
|
||||
/**
|
||||
@method
|
||||
|
||||
@abstract
|
||||
Overrides the default version for a batch request
|
||||
Overrides the default version for a batch request
|
||||
|
||||
|
||||
|
||||
@discussion
|
||||
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
|
||||
- Parameter version: This is a string in the form @"v2.0" which will be used for the version part of an API path
|
||||
*/
|
||||
- (void)overrideVersionPartWith:(NSString *)version;
|
||||
|
||||
@end
|
||||
|
||||
/*!
|
||||
@abstract The key in the result dictionary for requests to old versions of the Graph API
|
||||
/**
|
||||
The key in the result dictionary for requests to old versions of the Graph API
|
||||
whose response is not a JSON object.
|
||||
|
||||
@discussion When a request returns a non-JSON response (such as a "true" literal), that response
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
+55
-49
@@ -31,7 +31,7 @@
|
||||
#import "FBSDKInternalUtility.h"
|
||||
#import "FBSDKLogger.h"
|
||||
#import "FBSDKSettings+Internal.h"
|
||||
#import "FBSDKURLConnection.h"
|
||||
#import "FBSDKURLSessionTask.h"
|
||||
|
||||
NSString *const FBSDKNonJSONResponseProperty = @"FACEBOOK_NON_JSON_RESULT";
|
||||
|
||||
@@ -76,17 +76,18 @@ typedef NS_ENUM(NSUInteger, FBSDKGraphRequestConnectionState)
|
||||
// Private properties and methods
|
||||
|
||||
@interface FBSDKGraphRequestConnection () <
|
||||
FBSDKURLConnectionDelegate
|
||||
NSURLSessionDataDelegate
|
||||
#if !TARGET_OS_TV
|
||||
, FBSDKGraphErrorRecoveryProcessorDelegate
|
||||
#endif
|
||||
>
|
||||
|
||||
@property (nonatomic, retain) FBSDKURLConnection *connection;
|
||||
@property (nonatomic, strong) NSURLSession *session;
|
||||
@property (nonatomic, strong) FBSDKURLSessionTask *task;
|
||||
@property (nonatomic, retain) NSMutableArray *requests;
|
||||
@property (nonatomic) FBSDKGraphRequestConnectionState state;
|
||||
@property (nonatomic, retain) FBSDKLogger *logger;
|
||||
@property (nonatomic) unsigned long requestStartTime;
|
||||
@property (nonatomic, assign) FBSDKGraphRequestConnectionState state;
|
||||
@property (nonatomic, strong) FBSDKLogger *logger;
|
||||
@property (nonatomic, assign) unsigned long requestStartTime;
|
||||
|
||||
@end
|
||||
|
||||
@@ -117,8 +118,7 @@ FBSDKURLConnectionDelegate
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
_connection.delegate = nil;
|
||||
[_connection cancel];
|
||||
[_session invalidateAndCancel];
|
||||
}
|
||||
|
||||
#pragma mark - Public
|
||||
@@ -163,8 +163,8 @@ FBSDKURLConnectionDelegate
|
||||
- (void)cancel
|
||||
{
|
||||
self.state = kStateCancelled;
|
||||
[self.connection cancel];
|
||||
self.connection = nil;
|
||||
[self.task cancel];
|
||||
[self cleanUpSession];
|
||||
}
|
||||
|
||||
- (void)overrideVersionPartWith:(NSString *)version
|
||||
@@ -196,24 +196,22 @@ FBSDKURLConnectionDelegate
|
||||
[self logRequest:request bodyLength:0 bodyLogger:nil attachmentLogger:nil];
|
||||
_requestStartTime = [FBSDKInternalUtility currentTimeInMilliseconds];
|
||||
|
||||
FBSDKURLConnectionHandler handler =
|
||||
^(FBSDKURLConnection *connection,
|
||||
NSError *error,
|
||||
NSURLResponse *response,
|
||||
NSData *responseData) {
|
||||
[self completeFBSDKURLConnectionWithResponse:response
|
||||
data:responseData
|
||||
networkError:error];
|
||||
FBSDKURLSessionTaskHandler handler = ^(NSError *error,
|
||||
NSURLResponse *response,
|
||||
NSData *responseData) {
|
||||
[self completeFBSDKURLSessionWithResponse:response
|
||||
data:responseData
|
||||
networkError:error];
|
||||
};
|
||||
|
||||
FBSDKURLConnection *connection = [[FBSDKURLConnection alloc] initWithRequest:request
|
||||
completionHandler:handler];
|
||||
if (_delegateQueue) {
|
||||
[connection setDelegateQueue:_delegateQueue];
|
||||
if (!self.session) {
|
||||
self.session = [self defaultSession];
|
||||
}
|
||||
connection.delegate = self;
|
||||
self.connection = connection;
|
||||
[connection start];
|
||||
|
||||
self.task = [[FBSDKURLSessionTask alloc] initWithRequest:request
|
||||
fromSession:self.session
|
||||
completionHandler:handler];
|
||||
[self.task start];
|
||||
|
||||
id<FBSDKGraphRequestConnectionDelegate> delegate = self.delegate;
|
||||
if ([delegate respondsToSelector:@selector(requestConnectionWillBeginLoading:)]) {
|
||||
@@ -503,9 +501,9 @@ FBSDKURLConnectionDelegate
|
||||
|
||||
#pragma mark - Private methods (response parsing)
|
||||
|
||||
- (void)completeFBSDKURLConnectionWithResponse:(NSURLResponse *)response
|
||||
data:(NSData *)data
|
||||
networkError:(NSError *)error
|
||||
- (void)completeFBSDKURLSessionWithResponse:(NSURLResponse *)response
|
||||
data:(NSData *)data
|
||||
networkError:(NSError *)error
|
||||
{
|
||||
if (self.state != kStateCancelled) {
|
||||
NSAssert(self.state == kStateStarted,
|
||||
@@ -526,7 +524,7 @@ FBSDKURLConnectionDelegate
|
||||
if (!error && [response.MIMEType hasPrefix:@"image"]) {
|
||||
error = [FBSDKError errorWithCode:FBSDKGraphRequestNonTextMimeTypeReturnedErrorCode
|
||||
message:@"Response is a non-text MIME type; endpoints that return images and other "
|
||||
@"binary data should be fetched using NSURLRequest and NSURLConnection"];
|
||||
@"binary data should be fetched using NSURLRequest and NSURLSession"];
|
||||
} else {
|
||||
results = [self parseJSONResponse:data
|
||||
error:&error
|
||||
@@ -560,7 +558,7 @@ FBSDKURLConnectionDelegate
|
||||
|
||||
[self completeWithResults:results networkError:error];
|
||||
|
||||
self.connection = nil;
|
||||
[self cleanUpSession];
|
||||
}
|
||||
|
||||
//
|
||||
@@ -611,7 +609,7 @@ FBSDKURLConnectionDelegate
|
||||
[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.
|
||||
@@ -640,7 +638,7 @@ FBSDKURLConnectionDelegate
|
||||
NSDictionary *result = @{
|
||||
@"code":@(statusCode),
|
||||
@"body":response
|
||||
};
|
||||
};
|
||||
|
||||
for (NSUInteger resultIndex = 0, resultCount = self.requests.count; resultIndex < resultCount; ++resultIndex) {
|
||||
[results addObject:result];
|
||||
@@ -662,7 +660,7 @@ FBSDKURLConnectionDelegate
|
||||
id parsed = nil;
|
||||
if (!(*error)) {
|
||||
parsed = [FBSDKInternalUtility objectForJSONString:utf8 error:error];
|
||||
// if we fail parse we attemp a reparse of a modified input to support results in the form "foo=bar", "true", etc.
|
||||
// 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
|
||||
@@ -715,7 +713,7 @@ FBSDKURLConnectionDelegate
|
||||
}
|
||||
#endif
|
||||
|
||||
[self processResultBody:body error:resultError metadata:metadata canNotifyDelegate:(networkError ? NO : YES)];
|
||||
[self processResultBody:body error:resultError metadata:metadata canNotifyDelegate:networkError == nil];
|
||||
}];
|
||||
|
||||
if (networkError) {
|
||||
@@ -788,7 +786,7 @@ FBSDKURLConnectionDelegate
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// this is already on the queue since we are currently in the NSURLConnection callback.
|
||||
// this is already on the queue since we are currently in the NSURLSession callback.
|
||||
finishAndInvokeCompletionHandler();
|
||||
}
|
||||
|
||||
@@ -954,27 +952,35 @@ FBSDKURLConnectionDelegate
|
||||
return agent;
|
||||
}
|
||||
|
||||
- (void)setConnection:(FBSDKURLConnection *)connection
|
||||
- (NSURLSession *)defaultSession
|
||||
{
|
||||
if (_connection != connection) {
|
||||
_connection.delegate = nil;
|
||||
_connection = connection;
|
||||
}
|
||||
NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
|
||||
return [NSURLSession sessionWithConfiguration:config
|
||||
delegate:self
|
||||
delegateQueue:_delegateQueue];
|
||||
}
|
||||
|
||||
#pragma mark - FBSDKURLConnectionDelegate
|
||||
- (void)cleanUpSession
|
||||
{
|
||||
[self.session invalidateAndCancel];
|
||||
self.session = nil;
|
||||
}
|
||||
|
||||
- (void)facebookURLConnection:(FBSDKURLConnection *)connection
|
||||
didSendBodyData:(NSInteger)bytesWritten
|
||||
totalBytesWritten:(NSInteger)totalBytesWritten
|
||||
totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite {
|
||||
id<FBSDKGraphRequestConnectionDelegate> delegate = [self delegate];
|
||||
#pragma mark - NSURLSessionDataDelegate
|
||||
|
||||
- (void)URLSession:(NSURLSession *)session
|
||||
task:(NSURLSessionTask *)task
|
||||
didSendBodyData:(int64_t)bytesSent
|
||||
totalBytesSent:(int64_t)totalBytesSent
|
||||
totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend
|
||||
{
|
||||
id<FBSDKGraphRequestConnectionDelegate> delegate = self.delegate;
|
||||
|
||||
if ([delegate respondsToSelector:@selector(requestConnection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:)]) {
|
||||
[delegate requestConnection:self
|
||||
didSendBodyData:bytesWritten
|
||||
totalBytesWritten:totalBytesWritten
|
||||
totalBytesExpectedToWrite:totalBytesExpectedToWrite];
|
||||
didSendBodyData:(NSUInteger)bytesSent
|
||||
totalBytesWritten:(NSUInteger)totalBytesSent
|
||||
totalBytesExpectedToWrite:(NSUInteger)totalBytesExpectedToSend];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+13
-13
@@ -18,34 +18,34 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
@abstract A container class for data attachments so that additional metadata can be provided about the attachment.
|
||||
/**
|
||||
A container class for data attachments so that additional metadata can be provided about the attachment.
|
||||
*/
|
||||
@interface FBSDKGraphRequestDataAttachment : NSObject
|
||||
|
||||
/*!
|
||||
@abstract 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
|
||||
/**
|
||||
Initializes the receiver with the attachment data and metadata.
|
||||
- Parameter data: The attachment data (retained, not copied)
|
||||
- Parameter filename: The filename for the attachment
|
||||
- Parameter contentType: The content type for the attachment
|
||||
*/
|
||||
- (instancetype)initWithData:(NSData *)data
|
||||
filename:(NSString *)filename
|
||||
contentType:(NSString *)contentType
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/*!
|
||||
@abstract The content type for the attachment.
|
||||
/**
|
||||
The content type for the attachment.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *contentType;
|
||||
|
||||
/*!
|
||||
@abstract The attachment data.
|
||||
/**
|
||||
The attachment data.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSData *data;
|
||||
|
||||
/*!
|
||||
@abstract The filename for the attachment.
|
||||
/**
|
||||
The filename for the attachment.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *filename;
|
||||
|
||||
|
||||
@@ -20,15 +20,16 @@
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKCopying.h>
|
||||
|
||||
/*!
|
||||
@abstract Extension protocol for NSMutableCopying that adds the mutableCopy method, which is implemented on NSObject.
|
||||
@discussion NSObject<NSCopying, NSMutableCopying> implicitly conforms to this protocol.
|
||||
/**
|
||||
Extension protocol for NSMutableCopying that adds the mutableCopy method, which is implemented on NSObject.
|
||||
|
||||
NSObject<NSCopying, NSMutableCopying> implicitly conforms to this protocol.
|
||||
*/
|
||||
@protocol FBSDKMutableCopying <FBSDKCopying, NSMutableCopying>
|
||||
|
||||
/*!
|
||||
@abstract Implemented by NSObject as a convenience to mutableCopyWithZone:.
|
||||
@return A mutable copy of the receiver.
|
||||
/**
|
||||
Implemented by NSObject as a convenience to mutableCopyWithZone:.
|
||||
- Returns: A mutable copy of the receiver.
|
||||
*/
|
||||
- (id)mutableCopy;
|
||||
|
||||
|
||||
+76
-66
@@ -19,27 +19,31 @@
|
||||
#import "FBSDKMacros.h"
|
||||
#import "FBSDKProfilePictureView.h"
|
||||
|
||||
/*!
|
||||
@abstract Notification indicating that the `currentProfile` has changed.
|
||||
@discussion the userInfo dictionary of the notification will contain keys
|
||||
/**
|
||||
Notification indicating that the `currentProfile` has changed.
|
||||
|
||||
the userInfo dictionary of the notification will contain keys
|
||||
`FBSDKProfileChangeOldKey` and
|
||||
`FBSDKProfileChangeNewKey`.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKProfileDidChangeNotification;
|
||||
|
||||
/* @abstract key in notification's userInfo object for getting the old profile.
|
||||
@discussion If there was no old profile, the key will not be present.
|
||||
/* key in notification's userInfo object for getting the old profile.
|
||||
|
||||
If there was no old profile, the key will not be present.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKProfileChangeOldKey;
|
||||
|
||||
/* @abstract key in notification's userInfo object for getting the new profile.
|
||||
@discussion If there is no new profile, the key will not be present.
|
||||
/* key in notification's userInfo object for getting the new profile.
|
||||
|
||||
If there is no new profile, the key will not be present.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKProfileChangeNewKey;
|
||||
|
||||
/*!
|
||||
@abstract Represents an immutable Facebook profile
|
||||
@discussion This class provides a global "currentProfile" instance to more easily
|
||||
/**
|
||||
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.
|
||||
|
||||
@@ -50,15 +54,15 @@ FBSDK_EXTERN NSString *const FBSDKProfileChangeNewKey;
|
||||
*/
|
||||
@interface FBSDKProfile : NSObject<NSCopying, NSSecureCoding>
|
||||
|
||||
/*!
|
||||
@abstract 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].
|
||||
/**
|
||||
initializes a new instance.
|
||||
- Parameter userID: the user ID
|
||||
- Parameter firstName: the user's first name
|
||||
- Parameter middleName: the user's middle name
|
||||
- Parameter lastName: the user's last name
|
||||
- Parameter name: the user's complete name
|
||||
- Parameter linkURL: the link for this profile
|
||||
- Parameter refreshDate: the optional date this profile was fetched. Defaults to [NSDate date].
|
||||
*/
|
||||
- (instancetype)initWithUserID:(NSString *)userID
|
||||
firstName:(NSString *)firstName
|
||||
@@ -67,55 +71,58 @@ FBSDK_EXTERN NSString *const FBSDKProfileChangeNewKey;
|
||||
name:(NSString *)name
|
||||
linkURL:(NSURL *)linkURL
|
||||
refreshDate:(NSDate *)refreshDate NS_DESIGNATED_INITIALIZER;
|
||||
/*!
|
||||
@abstract The user id
|
||||
/**
|
||||
The user id
|
||||
*/
|
||||
@property (nonatomic, readonly) NSString *userID;
|
||||
/*!
|
||||
@abstract The user's first name
|
||||
@property (nonatomic, copy, readonly) NSString *userID;
|
||||
/**
|
||||
The user's first name
|
||||
*/
|
||||
@property (nonatomic, readonly) NSString *firstName;
|
||||
/*!
|
||||
@abstract The user's middle name
|
||||
@property (nonatomic, copy, readonly) NSString *firstName;
|
||||
/**
|
||||
The user's middle name
|
||||
*/
|
||||
@property (nonatomic, readonly) NSString *middleName;
|
||||
/*!
|
||||
@abstract The user's last name
|
||||
@property (nonatomic, copy, readonly) NSString *middleName;
|
||||
/**
|
||||
The user's last name
|
||||
*/
|
||||
@property (nonatomic, readonly) NSString *lastName;
|
||||
/*!
|
||||
@abstract The user's complete name
|
||||
@property (nonatomic, copy, readonly) NSString *lastName;
|
||||
/**
|
||||
The user's complete name
|
||||
*/
|
||||
@property (nonatomic, readonly) NSString *name;
|
||||
/*!
|
||||
@abstract A URL to the user's profile.
|
||||
@discussion Consider using Bolts and `FBSDKAppLinkResolver` to resolve this
|
||||
@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;
|
||||
|
||||
/*!
|
||||
@abstract The last time the profile data was fetched.
|
||||
/**
|
||||
The last time the profile data was fetched.
|
||||
*/
|
||||
@property (nonatomic, readonly) NSDate *refreshDate;
|
||||
|
||||
/*!
|
||||
@abstract Gets the current FBSDKProfile instance.
|
||||
/**
|
||||
Gets the current FBSDKProfile instance.
|
||||
*/
|
||||
+ (FBSDKProfile *)currentProfile;
|
||||
|
||||
/*!
|
||||
@abstract Sets the current instance and posts the appropriate notification if the profile parameter is different
|
||||
/**
|
||||
Sets the current instance and posts the appropriate notification if the profile parameter is different
|
||||
than the receiver.
|
||||
@param profile the profile to set
|
||||
@discussion This persists the profile to NSUserDefaults.
|
||||
- Parameter profile: the profile to set
|
||||
|
||||
This persists the profile to NSUserDefaults.
|
||||
*/
|
||||
+ (void)setCurrentProfile:(FBSDKProfile *)profile;
|
||||
|
||||
/*!
|
||||
@abstract Indicates if `currentProfile` will automatically observe `FBSDKAccessTokenDidChangeNotification` notifications
|
||||
@param enable YES is observing
|
||||
@discussion If observing, this class will issue a graph request for public profile data when the current token's userID
|
||||
/**
|
||||
Indicates if `currentProfile` will automatically observe `FBSDKAccessTokenDidChangeNotification` notifications
|
||||
- Parameter 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
|
||||
@@ -123,34 +130,37 @@ FBSDK_EXTERN NSString *const FBSDKProfileChangeNewKey;
|
||||
*/
|
||||
+ (void)enableUpdatesOnAccessTokenChange:(BOOL)enable;
|
||||
|
||||
/*!
|
||||
@abstract Loads the current profile and passes it to the completion block.
|
||||
@param completion The block to be executed once the profile is loaded
|
||||
@discussion If the profile is already loaded, this method will call the completion block synchronously, otherwise it
|
||||
/**
|
||||
Loads the current profile and passes it to the completion block.
|
||||
- Parameter 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;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
A convenience method for returning a complete `NSURL` for retrieving the user's profile image.
|
||||
- Parameter mode: The picture mode
|
||||
- Parameter size: The height and width. This will be rounded to integer precision.
|
||||
*/
|
||||
- (NSURL *)imageURLForPictureMode:(FBSDKProfilePictureMode)mode size:(CGSize)size;
|
||||
|
||||
/*!
|
||||
@abstract A convenience method for returning a Graph API path for retrieving the user's profile image.
|
||||
@deprecated use `imageURLForPictureMode:size:` instead
|
||||
@discussion 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.
|
||||
/**
|
||||
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.
|
||||
- Parameter mode: The picture mode
|
||||
- Parameter size: The height and width. This will be rounded to integer precision.
|
||||
*/
|
||||
- (NSString *)imagePathForPictureMode:(FBSDKProfilePictureMode)mode size:(CGSize)size
|
||||
__attribute__ ((deprecated("use imageURLForPictureMode:size: instead")));
|
||||
|
||||
/*!
|
||||
@abstract Returns YES if the profile is equivalent to the receiver.
|
||||
@param profile the profile to compare to.
|
||||
/**
|
||||
Returns YES if the profile is equivalent to the receiver.
|
||||
- Parameter profile: the profile to compare to.
|
||||
*/
|
||||
- (BOOL)isEqualToProfile:(FBSDKProfile *)profile;
|
||||
@end
|
||||
+17
-16
@@ -18,40 +18,41 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
/*!
|
||||
@typedef FBSDKProfilePictureMode enum
|
||||
@abstract Defines the aspect ratio mode for the source image of the profile picture.
|
||||
/**
|
||||
FBSDKProfilePictureMode enum
|
||||
Defines the aspect ratio mode for the source image of the profile picture.
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, FBSDKProfilePictureMode)
|
||||
{
|
||||
/*!
|
||||
@abstract A square cropped version of the image will be included in the view.
|
||||
/**
|
||||
A square cropped version of the image will be included in the view.
|
||||
*/
|
||||
FBSDKProfilePictureModeSquare,
|
||||
/*!
|
||||
@abstract The original picture's aspect ratio will be used for the source image in the view.
|
||||
/**
|
||||
The original picture's aspect ratio will be used for the source image in the view.
|
||||
*/
|
||||
FBSDKProfilePictureModeNormal,
|
||||
};
|
||||
|
||||
/*!
|
||||
@abstract A view to display a profile picture.
|
||||
/**
|
||||
A view to display a profile picture.
|
||||
*/
|
||||
@interface FBSDKProfilePictureView : UIView
|
||||
|
||||
/*!
|
||||
@abstract The mode for the receiver to determine the aspect ratio of the source image.
|
||||
/**
|
||||
The mode for the receiver to determine the aspect ratio of the source image.
|
||||
*/
|
||||
@property (nonatomic, assign) FBSDKProfilePictureMode pictureMode;
|
||||
|
||||
/*!
|
||||
@abstract The profile ID to show the picture for.
|
||||
/**
|
||||
The profile ID to show the picture for.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *profileID;
|
||||
|
||||
/*!
|
||||
@abstract Explicitly marks the receiver as needing to update the image.
|
||||
@discussion This method is called whenever any properties that affect the source image are modified, but this can also
|
||||
/**
|
||||
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;
|
||||
|
||||
+8
-2
@@ -361,8 +361,14 @@
|
||||
return;
|
||||
}
|
||||
UIImage *image = [[UIImage alloc] initWithData:data scale:state.scale];
|
||||
_imageView.image = image;
|
||||
_hasProfileImage = YES;
|
||||
if (image) {
|
||||
_imageView.image = image;
|
||||
_hasProfileImage = YES;
|
||||
} else {
|
||||
_hasProfileImage = NO;
|
||||
_placeholderImageIsValid = NO;
|
||||
[self setNeedsImageUpdate];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
+104
-81
@@ -24,186 +24,209 @@
|
||||
* Constants defining logging behavior. Use with <[FBSDKSettings setLoggingBehavior]>.
|
||||
*/
|
||||
|
||||
/*! Include access token in logging. */
|
||||
/** Include access token in logging. */
|
||||
FBSDK_EXTERN NSString *const FBSDKLoggingBehaviorAccessTokens;
|
||||
|
||||
/*! Log performance characteristics */
|
||||
/** Log performance characteristics */
|
||||
FBSDK_EXTERN NSString *const FBSDKLoggingBehaviorPerformanceCharacteristics;
|
||||
|
||||
/*! Log FBSDKAppEvents interactions */
|
||||
/** Log FBSDKAppEvents interactions */
|
||||
FBSDK_EXTERN NSString *const FBSDKLoggingBehaviorAppEvents;
|
||||
|
||||
/*! Log Informational occurrences */
|
||||
/** Log Informational occurrences */
|
||||
FBSDK_EXTERN NSString *const FBSDKLoggingBehaviorInformational;
|
||||
|
||||
/*! Log cache errors. */
|
||||
/** Log cache errors. */
|
||||
FBSDK_EXTERN NSString *const FBSDKLoggingBehaviorCacheErrors;
|
||||
|
||||
/*! Log errors from SDK UI controls */
|
||||
/** Log errors from SDK UI controls */
|
||||
FBSDK_EXTERN NSString *const FBSDKLoggingBehaviorUIControlErrors;
|
||||
|
||||
/*! Log debug warnings from API response, i.e. when friends fields requested, but user_friends permission isn't granted. */
|
||||
/** Log debug warnings from API response, i.e. when friends fields requested, but user_friends permission isn't granted. */
|
||||
FBSDK_EXTERN NSString *const FBSDKLoggingBehaviorGraphAPIDebugWarning;
|
||||
|
||||
/*! Log warnings from API response, i.e. when requested feature will be deprecated in next version of API.
|
||||
/** 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.
|
||||
*/
|
||||
FBSDK_EXTERN NSString *const FBSDKLoggingBehaviorGraphAPIDebugInfo;
|
||||
|
||||
/*! Log errors from SDK network requests */
|
||||
/** Log errors from SDK network requests */
|
||||
FBSDK_EXTERN NSString *const FBSDKLoggingBehaviorNetworkRequests;
|
||||
|
||||
/*! Log errors likely to be preventable by the developer. This is in the default set of enabled logging behaviors. */
|
||||
/** Log errors likely to be preventable by the developer. This is in the default set of enabled logging behaviors. */
|
||||
FBSDK_EXTERN NSString *const FBSDKLoggingBehaviorDeveloperErrors;
|
||||
|
||||
@interface FBSDKSettings : NSObject
|
||||
|
||||
/*!
|
||||
@abstract Get the Facebook App ID used by the SDK.
|
||||
@discussion If not explicitly set, the default will be read from the application's plist (FacebookAppID).
|
||||
/**
|
||||
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;
|
||||
|
||||
/*!
|
||||
@abstract Set the Facebook App ID to be used by the SDK.
|
||||
@param appID The Facebook App ID to be used by the SDK.
|
||||
/**
|
||||
Set the Facebook App ID to be used by the SDK.
|
||||
- Parameter appID: The Facebook App ID to be used by the SDK.
|
||||
*/
|
||||
+ (void)setAppID:(NSString *)appID;
|
||||
|
||||
/*!
|
||||
@abstract Get the default url scheme suffix used for sessions.
|
||||
@discussion If not explicitly set, the default will be read from the application's plist (FacebookUrlSchemeSuffix).
|
||||
/**
|
||||
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;
|
||||
|
||||
/*!
|
||||
@abstract Set the app url scheme suffix used by the SDK.
|
||||
@param appURLSchemeSuffix The url scheme suffix to be used by the SDK.
|
||||
/**
|
||||
Set the app url scheme suffix used by the SDK.
|
||||
- Parameter appURLSchemeSuffix: The url scheme suffix to be used by the SDK.
|
||||
*/
|
||||
+ (void)setAppURLSchemeSuffix:(NSString *)appURLSchemeSuffix;
|
||||
|
||||
/*!
|
||||
@abstract Retrieve the Client Token that has been set via [FBSDKSettings setClientToken].
|
||||
@discussion If not explicitly set, the default will be read from the application's plist (FacebookClientToken).
|
||||
/**
|
||||
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;
|
||||
|
||||
/*!
|
||||
@abstract Sets the Client Token for the Facebook App.
|
||||
@discussion 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
|
||||
/**
|
||||
Sets the Client Token for the Facebook App.
|
||||
|
||||
This is needed for certain API calls when made anonymously, without a user-based access token.
|
||||
- Parameter 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 <https://developers.facebook.com/apps/[your-app-id]>
|
||||
*/
|
||||
+ (void)setClientToken:(NSString *)clientToken;
|
||||
|
||||
/*!
|
||||
@abstract A convenient way to toggle error recovery for all FBSDKGraphRequest instances created after this is set.
|
||||
@param disableGraphErrorRecovery YES or NO.
|
||||
/**
|
||||
A convenient way to toggle error recovery for all FBSDKGraphRequest instances created after this is set.
|
||||
- Parameter disableGraphErrorRecovery: YES or NO.
|
||||
*/
|
||||
+ (void)setGraphErrorRecoveryDisabled:(BOOL)disableGraphErrorRecovery;
|
||||
|
||||
/*!
|
||||
@abstract Get the Facebook Display Name used by the SDK.
|
||||
@discussion If not explicitly set, the default will be read from the application's plist (FacebookDisplayName).
|
||||
/**
|
||||
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;
|
||||
|
||||
/*!
|
||||
@abstract Set the default Facebook Display Name to be used by the SDK.
|
||||
@discussion This should match the Display Name that has been set for the app with the corresponding Facebook App ID,
|
||||
/**
|
||||
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.
|
||||
- Parameter displayName: The Facebook Display Name to be used by the SDK.
|
||||
*/
|
||||
+ (void)setDisplayName:(NSString *)displayName;
|
||||
|
||||
/*!
|
||||
@abstract Get the Facebook domain part.
|
||||
@discussion If not explicitly set, the default will be read from the application's plist (FacebookDomainPart).
|
||||
/**
|
||||
Get the Facebook domain part.
|
||||
|
||||
If not explicitly set, the default will be read from the application's plist (FacebookDomainPart).
|
||||
*/
|
||||
+ (NSString *)facebookDomainPart;
|
||||
|
||||
/*!
|
||||
@abstract Set the subpart of the Facebook domain.
|
||||
@discussion This can be used to change the Facebook domain (e.g. @"beta") so that requests will be sent to
|
||||
/**
|
||||
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.
|
||||
- Parameter facebookDomainPart: The domain part to be inserted into facebook.com.
|
||||
*/
|
||||
+ (void)setFacebookDomainPart:(NSString *)facebookDomainPart;
|
||||
|
||||
/*!
|
||||
@abstract The quality of JPEG images sent to Facebook from the SDK.
|
||||
@discussion 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) */
|
||||
/**
|
||||
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;
|
||||
|
||||
/*!
|
||||
@abstract 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) */
|
||||
/**
|
||||
Set the quality of JPEG images sent to Facebook from the SDK.
|
||||
- Parameter 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;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
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.
|
||||
/**
|
||||
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;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
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.
|
||||
/**
|
||||
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.
|
||||
- Parameter limitEventAndDataUsage: The desired value.
|
||||
*/
|
||||
+ (void)setLimitEventAndDataUsage:(BOOL)limitEventAndDataUsage;
|
||||
|
||||
/*!
|
||||
@abstract Retrieve the current iOS SDK version.
|
||||
/**
|
||||
Retrieve the current iOS SDK version.
|
||||
*/
|
||||
+ (NSString *)sdkVersion;
|
||||
|
||||
/*!
|
||||
@abstract Retrieve the current Facebook SDK logging behavior.
|
||||
/**
|
||||
Retrieve the current Facebook SDK logging behavior.
|
||||
*/
|
||||
+ (NSSet *)loggingBehavior;
|
||||
|
||||
/*!
|
||||
@abstract Set the current Facebook SDK logging behavior. This should consist of strings defined as
|
||||
/**
|
||||
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
|
||||
- Parameter 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.
|
||||
|
||||
@discussion 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:
|
||||
|
||||
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;
|
||||
|
||||
/*!
|
||||
@abstract Enable a particular Facebook SDK logging behavior.
|
||||
/**
|
||||
Enable a particular Facebook SDK logging behavior.
|
||||
|
||||
@param loggingBehavior The LoggingBehavior to enable. This should be a string defined as a constant with FBSDKLoggingBehavior*.
|
||||
- Parameter loggingBehavior: The LoggingBehavior to enable. This should be a string defined as a constant with FBSDKLoggingBehavior*.
|
||||
*/
|
||||
+ (void)enableLoggingBehavior:(NSString *)loggingBehavior;
|
||||
|
||||
/*!
|
||||
@abstract Disable a particular Facebook SDK logging behavior.
|
||||
/**
|
||||
Disable a particular Facebook SDK logging behavior.
|
||||
|
||||
@param loggingBehavior The LoggingBehavior to disable. This should be a string defined as a constant with FBSDKLoggingBehavior*.
|
||||
- Parameter loggingBehavior: The LoggingBehavior to disable. This should be a string defined as a constant with FBSDKLoggingBehavior*.
|
||||
*/
|
||||
+ (void)disableLoggingBehavior:(NSString *)loggingBehavior;
|
||||
|
||||
/*!
|
||||
@abstract Set the user defaults key used by legacy token caches.
|
||||
/**
|
||||
Set the user defaults key used by legacy token caches.
|
||||
|
||||
@param tokenInformationKeyName the key used by legacy token caches.
|
||||
- Parameter tokenInformationKeyName: the key used by legacy token caches.
|
||||
|
||||
@discussion Use this only if you customized FBSessionTokenCachingStrategy in v3.x of
|
||||
|
||||
Use this only if you customized FBSessionTokenCachingStrategy in v3.x of
|
||||
the Facebook SDK for iOS.
|
||||
*/
|
||||
+ (void)setLegacyUserDefaultTokenInformationKeyName:(NSString *)tokenInformationKeyName;
|
||||
|
||||
/*!
|
||||
@abstract Get the user defaults key used by legacy token caches.
|
||||
/**
|
||||
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
|
||||
@@ -50,6 +50,7 @@ static NSString *g_legacyUserDefaultTokenInformationKeyName = @"FBAccessTokenInf
|
||||
static NSString *const FBSDKSettingsLimitEventAndDataUsage = @"com.facebook.sdk:FBSDKSettingsLimitEventAndDataUsage";
|
||||
static BOOL g_disableErrorRecovery;
|
||||
static NSString *g_userAgentSuffix;
|
||||
static NSString *g_defaultGraphAPIVersion;
|
||||
|
||||
@implementation FBSDKSettings
|
||||
|
||||
@@ -198,6 +199,19 @@ FBSDKSETTINGS_PLIST_CONFIGURATION_SETTING_IMPL(NSNumber, FacebookJpegCompression
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)setGraphAPIVersion:(NSString *)version
|
||||
{
|
||||
if (![g_defaultGraphAPIVersion isEqualToString:version])
|
||||
{
|
||||
g_defaultGraphAPIVersion = version;
|
||||
}
|
||||
}
|
||||
|
||||
+ (NSString *)graphAPIVersion
|
||||
{
|
||||
return g_defaultGraphAPIVersion ?: FBSDK_TARGET_PLATFORM_VERSION;
|
||||
}
|
||||
|
||||
#pragma mark - Internal - Graph API Debug
|
||||
|
||||
+ (void)updateGraphAPIDebugBehavior
|
||||
|
||||
+32
-33
@@ -20,26 +20,24 @@
|
||||
|
||||
@class FBSDKAccessToken;
|
||||
|
||||
/*!
|
||||
@typedef
|
||||
/**
|
||||
|
||||
@abstract Callback block for returning an array of FBSDKAccessToken instances (and possibly `NSNull` instances); or an error.
|
||||
Callback block for returning an array of FBSDKAccessToken instances (and possibly `NSNull` instances); or an error.
|
||||
*/
|
||||
typedef void (^FBSDKTestUsersManagerRetrieveTestAccountTokensHandler)(NSArray *tokens, NSError *error) ;
|
||||
|
||||
/*!
|
||||
@typedef
|
||||
/**
|
||||
|
||||
@abstract Callback block for removing a test user.
|
||||
Callback block for removing a test user.
|
||||
*/
|
||||
typedef void (^FBSDKTestUsersManagerRemoveTestAccountHandler)(NSError *error) ;
|
||||
|
||||
|
||||
/*!
|
||||
@class FBSDKTestUsersManager
|
||||
@abstract Provides methods for managing test accounts for testing Facebook integration.
|
||||
/**
|
||||
Provides methods for managing test accounts for testing Facebook integration.
|
||||
|
||||
@discussion Facebook allows developers to create test accounts for testing their applications'
|
||||
|
||||
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.
|
||||
@@ -50,25 +48,26 @@ typedef void (^FBSDKTestUsersManagerRemoveTestAccountHandler)(NSError *error) ;
|
||||
*/
|
||||
@interface FBSDKTestUsersManager : NSObject
|
||||
|
||||
/*!
|
||||
@abstract construct or return the shared instance
|
||||
@param appID the Facebook app id
|
||||
@param appSecret the Facebook app secret
|
||||
/**
|
||||
construct or return the shared instance
|
||||
- Parameter appID: the Facebook app id
|
||||
- Parameter appSecret: the Facebook app secret
|
||||
*/
|
||||
+ (instancetype)sharedInstanceForAppID:(NSString *)appID appSecret:(NSString *)appSecret;
|
||||
|
||||
/*!
|
||||
@abstract 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"]]
|
||||
/**
|
||||
retrieve FBSDKAccessToken instances for test accounts with the specific permissions.
|
||||
- Parameter 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
|
||||
- Parameter 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`.
|
||||
- Parameter 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.
|
||||
|
||||
@discussion If you are requesting test accounts with differing number of permissions, try to order
|
||||
|
||||
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.
|
||||
*/
|
||||
@@ -76,26 +75,26 @@ typedef void (^FBSDKTestUsersManagerRemoveTestAccountHandler)(NSError *error) ;
|
||||
createIfNotFound:(BOOL)createIfNotFound
|
||||
completionHandler:(FBSDKTestUsersManagerRetrieveTestAccountTokensHandler)handler;
|
||||
|
||||
/*!
|
||||
@abstract 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
|
||||
/**
|
||||
add a test account with the specified permissions
|
||||
- Parameter permissions: the set of permissions, e.g., [NSSet setWithObjects:@"email", @"user_friends"]
|
||||
- Parameter handler: the callback handler
|
||||
*/
|
||||
- (void)addTestAccountWithPermissions:(NSSet *)permissions
|
||||
completionHandler:(FBSDKTestUsersManagerRetrieveTestAccountTokensHandler)handler;
|
||||
|
||||
/*!
|
||||
@abstract remove a test account for the given user id
|
||||
@param userId the user id
|
||||
@param handler the callback handler
|
||||
/**
|
||||
remove a test account for the given user id
|
||||
- Parameter userId: the user id
|
||||
- Parameter handler: the callback handler
|
||||
*/
|
||||
- (void)removeTestAccount:(NSString *)userId completionHandler:(FBSDKTestUsersManagerRemoveTestAccountHandler)handler;
|
||||
|
||||
/*!
|
||||
@abstract 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
|
||||
/**
|
||||
Make two test users friends with each other.
|
||||
- Parameter first: the token of the first user
|
||||
- Parameter second: the token of the second user
|
||||
- Parameter callback: the callback handler
|
||||
*/
|
||||
- (void)makeFriendsWithFirst:(FBSDKAccessToken *)first second:(FBSDKAccessToken *)second callback:(void (^)(NSError *))callback;
|
||||
|
||||
|
||||
+19
-19
@@ -18,37 +18,37 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
@abstract Class to contain common utility methods.
|
||||
/**
|
||||
Class to contain common utility methods.
|
||||
*/
|
||||
@interface FBSDKUtility : NSObject
|
||||
|
||||
/*!
|
||||
@abstract Parses a query string into a dictionary.
|
||||
@param queryString The query string value.
|
||||
@return A dictionary with the key/value pairs.
|
||||
/**
|
||||
Parses a query string into a dictionary.
|
||||
- Parameter queryString: The query string value.
|
||||
- Returns: A dictionary with the key/value pairs.
|
||||
*/
|
||||
+ (NSDictionary *)dictionaryWithQueryString:(NSString *)queryString;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
@result Query string representation of the parameters.
|
||||
/**
|
||||
Constructs a query string from a dictionary.
|
||||
- Parameter dictionary: The dictionary with key/value pairs for the query string.
|
||||
- Parameter errorRef: If an error occurs, upon return contains an NSError object that describes the problem.
|
||||
- Returns: Query string representation of the parameters.
|
||||
*/
|
||||
+ (NSString *)queryStringWithDictionary:(NSDictionary *)dictionary error:(NSError *__autoreleasing *)errorRef;
|
||||
|
||||
/*!
|
||||
@abstract Decodes a value from an URL.
|
||||
@param value The value to decode.
|
||||
@result The decoded value.
|
||||
/**
|
||||
Decodes a value from an URL.
|
||||
- Parameter value: The value to decode.
|
||||
- Returns: The decoded value.
|
||||
*/
|
||||
+ (NSString *)URLDecode:(NSString *)value;
|
||||
|
||||
/*!
|
||||
@abstract Encodes a value for an URL.
|
||||
@param value The value to encode.
|
||||
@result The encoded value.
|
||||
/**
|
||||
Encodes a value for an URL.
|
||||
- Parameter value: The value to encode.
|
||||
- Returns: The encoded value.
|
||||
*/
|
||||
+ (NSString *)URLEncode:(NSString *)value;
|
||||
|
||||
|
||||
Generated
+33
-18
@@ -27,36 +27,42 @@
|
||||
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNamePurchased;
|
||||
|
||||
/*! Use to log that the share dialog was launched */
|
||||
/** Use to log that the share dialog was launched */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameShareSheetLaunch;
|
||||
|
||||
/*! Use to log that the share dialog was dismissed */
|
||||
/** Use to log that the share dialog was dismissed */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameShareSheetDismiss;
|
||||
|
||||
/*! Use to log that the permissions UI was launched */
|
||||
/** Use to log that the permissions UI was launched */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNamePermissionsUILaunch;
|
||||
|
||||
/*! Use to log that the permissions UI was dismissed */
|
||||
/** Use to log that the permissions UI was dismissed */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNamePermissionsUIDismiss;
|
||||
|
||||
/*! Use to log that the login view was used */
|
||||
/** Use to log that the login view was used */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameLoginViewUsage;
|
||||
|
||||
/*! Use to log that the share tray launched. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameShareTrayDidLaunch;
|
||||
|
||||
/*! Use to log that the person selected a sharing target. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameShareTrayDidSelectActivity;
|
||||
|
||||
// Internally known event parameters
|
||||
|
||||
/*! String parameter specifying the outcome of a dialog invocation */
|
||||
/** String parameter specifying the outcome of a dialog invocation */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterDialogOutcome;
|
||||
|
||||
/*! Parameter key used to specify which application launches this application. */
|
||||
/** Parameter key used to specify which application launches this application. */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterLaunchSource;
|
||||
|
||||
/*! Use to log the result of a call to FBDialogs presentShareDialogWithParams: */
|
||||
/** Use to log the result of a call to FBDialogs presentShareDialogWithParams: */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBDialogsPresentShareDialog;
|
||||
|
||||
/*! Use to log the result of a call to FBDialogs presentShareDialogWithOpenGraphActionParams: */
|
||||
/** Use to log the result of a call to FBDialogs presentShareDialogWithOpenGraphActionParams: */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBDialogsPresentShareDialogOG;
|
||||
|
||||
/*! Use to log the result of a call to FBDialogs presentLikeDialogWithLikeParams: */
|
||||
/** Use to log the result of a call to FBDialogs presentLikeDialogWithLikeParams: */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBDialogsPresentLikeDialogOG;
|
||||
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBDialogsPresentShareDialogPhoto;
|
||||
@@ -64,28 +70,31 @@ FBSDK_EXTERN NSString *const FBSDKAppEventNameFBDialogsPresentMessageDialog;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBDialogsPresentMessageDialogPhoto;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBDialogsPresentMessageDialogOG;
|
||||
|
||||
/*! Use to log the start of an auth request that cannot be fulfilled by the token cache */
|
||||
/** Use to log the start of an auth request that cannot be fulfilled by the token cache */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSessionAuthStart;
|
||||
|
||||
/*! Use to log the end of an auth request that was not fulfilled by the token cache */
|
||||
/** Use to log the end of an auth request that was not fulfilled by the token cache */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSessionAuthEnd;
|
||||
|
||||
/*! Use to log the start of a specific auth method as part of an auth request */
|
||||
/** Use to log the start of a specific auth method as part of an auth request */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSessionAuthMethodStart;
|
||||
|
||||
/*! Use to log the end of the last tried auth method as part of an auth request */
|
||||
/** Use to log the end of the last tried auth method as part of an auth request */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSessionAuthMethodEnd;
|
||||
|
||||
/*! Use to log the timestamp for the transition to the Facebook native login dialog */
|
||||
/** Use to log the timestamp for the transition to the Facebook native login dialog */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBDialogsNativeLoginDialogStart;
|
||||
|
||||
/*! Use to log the timestamp for the transition back to the app after the Facebook native login dialog */
|
||||
/** Use to log the timestamp for the transition back to the app after the Facebook native login dialog */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBDialogsNativeLoginDialogEnd;
|
||||
|
||||
/*! Use to log the e2e timestamp metrics for web login */
|
||||
/** Use to log the e2e timestamp metrics for web login */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBDialogsWebLoginCompleted;
|
||||
|
||||
/*! Use to log the results of a share dialog */
|
||||
/** Use to log the result of the App Switch OS AlertView. Only available on OS >= iOS10 */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSessionFASLoginDialogResult;
|
||||
|
||||
/** Use to log the results of a share dialog */
|
||||
FBSDK_EXTERN NSString *const FBSDLAppEventNameFBSDKEventShareDialogResult;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKEventMessengerShareDialogResult;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKEventAppInviteShareDialogResult;
|
||||
@@ -97,6 +106,10 @@ FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKEventAppInviteShareDialogShow
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterDialogMode;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterDialogShareContentType;
|
||||
|
||||
/*! Use to log parameters for share tray use */
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterShareTrayActivityName;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventParameterShareTrayResult;
|
||||
|
||||
// Internally known event parameter values
|
||||
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventsDialogOutcomeValue_Completed;
|
||||
@@ -129,6 +142,8 @@ FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLoginButtonImpression;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKSendButtonImpression;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKShareButtonImpression;
|
||||
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKSmartLoginService;
|
||||
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLikeButtonDidTap;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKLoginButtonDidTap;
|
||||
FBSDK_EXTERN NSString *const FBSDKAppEventNameFBSDKSendButtonDidTap;
|
||||
|
||||
Generated
+6
-1
@@ -209,7 +209,7 @@ static const long INACTIVE_SECONDS_QUANTA[] =
|
||||
|
||||
_timeSinceLastSuspend = now - _lastSuspendTime;
|
||||
_secondsSpentInCurrentSession = [[results objectForKey:FBSDKTimeSpentPersistKeySessionSecondsSpent] intValue];
|
||||
_sessionID = results[FBSDKTimeSpentPersistKeySessionID];
|
||||
_sessionID = results[FBSDKTimeSpentPersistKeySessionID] ? : [[NSUUID UUID] UUIDString];
|
||||
_numInterruptionsInCurrentSession = [[results objectForKey:FBSDKTimeSpentPersistKeySessionNumInterruptions] intValue];
|
||||
_shouldLogActivateEvent = (_timeSinceLastSuspend > [FBSDKServerConfigurationManager cachedServerConfiguration].sessionTimoutInterval);
|
||||
|
||||
@@ -243,6 +243,11 @@ static const long INACTIVE_SECONDS_QUANTA[] =
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
-151
@@ -1,151 +0,0 @@
|
||||
// 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 "FBSDKOrganicDeeplinkHelper.h"
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <SafariServices/SafariServices.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "FBSDKApplicationDelegate+Internal.h"
|
||||
#import "FBSDKDynamicFrameworkLoader.h"
|
||||
#import "FBSDKInternalUtility.h"
|
||||
#import "FBSDKSettings.h"
|
||||
|
||||
|
||||
@interface FBSDKOrganicDeeplinkHelper () <
|
||||
SFSafariViewControllerDelegate
|
||||
>
|
||||
@end
|
||||
|
||||
@implementation FBSDKOrganicDeeplinkHelper {
|
||||
UIWindow *_safariWindow;
|
||||
UIViewController *_safariViewController;
|
||||
FBSDKDeferredAppInviteHandler _handler;
|
||||
}
|
||||
|
||||
- (bool)fetchOrganicDeeplink:(FBSDKDeferredAppInviteHandler) handler
|
||||
{
|
||||
_handler = handler;
|
||||
|
||||
// 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) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
_safariWindow = [[UIWindow alloc] initWithFrame:[[[[UIApplication sharedApplication] delegate] window] bounds]];
|
||||
|
||||
_safariWindow.windowLevel = UIWindowLevelNormal - 1;
|
||||
|
||||
_safariWindow.rootViewController = [[UIViewController alloc] init];;
|
||||
[_safariWindow setHidden:NO];
|
||||
_safariViewController = [[SFSafariViewControllerClass alloc] initWithURL: [self constructDeeplinkRetrievalUrl]];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[FBSDKApplicationDelegate sharedInstance].organicDeeplinkHandler = handler;
|
||||
[self presentSafariViewController];
|
||||
|
||||
// Dispatch a fallback handler call, if we get no response within 10 seconds.
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
if([FBSDKApplicationDelegate sharedInstance].organicDeeplinkHandler)
|
||||
{
|
||||
[self cleanUpSafariViewController];
|
||||
[FBSDKApplicationDelegate sharedInstance].organicDeeplinkHandler = nil;
|
||||
_handler(nil);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)presentSafariViewController
|
||||
{
|
||||
_safariViewController.view.userInteractionEnabled = NO;
|
||||
_safariViewController.view.alpha = 0;
|
||||
[_safariWindow.rootViewController addChildViewController:_safariViewController];
|
||||
[_safariWindow.rootViewController.view addSubview:_safariViewController.view];
|
||||
[_safariViewController performSelector:@selector(setDelegate:) withObject:self];
|
||||
[_safariViewController didMoveToParentViewController:_safariWindow.rootViewController];
|
||||
_safariViewController.view.frame = CGRectZero;
|
||||
return;
|
||||
}
|
||||
|
||||
- (void)cleanUpSafariViewController
|
||||
{
|
||||
if(_safariViewController)
|
||||
{
|
||||
[_safariViewController performSelector:@selector(setDelegate:) withObject:nil];
|
||||
[_safariViewController willMoveToParentViewController:nil];
|
||||
[_safariViewController.view removeFromSuperview];
|
||||
[_safariViewController removeFromParentViewController];
|
||||
_safariViewController = nil;
|
||||
_safariWindow.rootViewController = nil;
|
||||
_safariWindow = nil;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
- (NSURL*)constructDeeplinkRetrievalUrl
|
||||
{
|
||||
NSString *appID = [FBSDKSettings appID];
|
||||
UIDevice* device = [UIDevice currentDevice];
|
||||
NSString* deviceName = @"default";
|
||||
|
||||
switch (device.userInterfaceIdiom) {
|
||||
case UIUserInterfaceIdiomPad:
|
||||
deviceName = @"ipad";
|
||||
break;
|
||||
|
||||
case UIUserInterfaceIdiomPhone:
|
||||
deviceName = @"iphone";
|
||||
break;
|
||||
|
||||
case UIUserInterfaceIdiomTV:
|
||||
deviceName = @"tvos";
|
||||
break;
|
||||
|
||||
#if __IPHONE_9_3
|
||||
case UIUserInterfaceIdiomCarPlay:
|
||||
#endif
|
||||
case UIUserInterfaceIdiomUnspecified:
|
||||
deviceName = @"unspecified";
|
||||
break;
|
||||
}
|
||||
|
||||
NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init];
|
||||
parameters[@"application_id"] = appID;
|
||||
parameters[@"device"] = deviceName;
|
||||
return [FBSDKInternalUtility facebookURLWithHostPrefix:@"m"
|
||||
path:@"/deferreddeeplink/retrieve/"
|
||||
queryParameters:parameters
|
||||
defaultVersion: @""
|
||||
error:nil];
|
||||
}
|
||||
|
||||
#pragma mark - SFSafariViewControllerDelegate
|
||||
- (void)safariViewController:(SFSafariViewController *)controller didCompleteInitialLoad:(BOOL)didLoadSuccessfully
|
||||
{
|
||||
// Mark request as complete, Safari would redirect to url with correct deeplink or default uri.
|
||||
[self cleanUpSafariViewController];
|
||||
}
|
||||
|
||||
@end
|
||||
+16
-16
@@ -20,31 +20,31 @@
|
||||
|
||||
@interface FBSDKBase64 : NSObject
|
||||
|
||||
/*!
|
||||
@abstract Decodes a base-64 encoded string.
|
||||
@param string The base-64 encoded string.
|
||||
@return NSData containing the decoded bytes.
|
||||
/**
|
||||
Decodes a base-64 encoded string.
|
||||
- Parameter string: The base-64 encoded string.
|
||||
- Returns: NSData containing the decoded bytes.
|
||||
*/
|
||||
+ (NSData *)decodeAsData:(NSString *)string;
|
||||
|
||||
/*!
|
||||
@abstract Decodes a base-64 encoded string into a string.
|
||||
@param string The base-64 encoded string.
|
||||
@return NSString with the decoded UTF-8 value.
|
||||
/**
|
||||
Decodes a base-64 encoded string into a string.
|
||||
- Parameter string: The base-64 encoded string.
|
||||
- Returns: NSString with the decoded UTF-8 value.
|
||||
*/
|
||||
+ (NSString *)decodeAsString:(NSString *)string;
|
||||
|
||||
/*!
|
||||
@abstract Encodes data into a string.
|
||||
@param data The data to be encoded.
|
||||
@return The base-64 encoded string.
|
||||
/**
|
||||
Encodes data into a string.
|
||||
- Parameter data: The data to be encoded.
|
||||
- Returns: The base-64 encoded string.
|
||||
*/
|
||||
+ (NSString *)encodeData:(NSData *)data;
|
||||
|
||||
/*!
|
||||
@abstract Encodes string into a base-64 representation.
|
||||
@param string The string to be encoded.
|
||||
@return The base-64 encoded string.
|
||||
/**
|
||||
Encodes string into a base-64 representation.
|
||||
- Parameter string: The string to be encoded.
|
||||
- Returns: The base-64 encoded string.
|
||||
*/
|
||||
+ (NSString *)encodeString:(NSString *)string;
|
||||
|
||||
|
||||
+9
@@ -20,11 +20,20 @@
|
||||
|
||||
// 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;
|
||||
|
||||
@end
|
||||
+20
-16
@@ -20,9 +20,10 @@
|
||||
|
||||
@interface FBSDKCrypto : NSObject
|
||||
|
||||
/*!
|
||||
@abstract Generate numOfBytes random data.
|
||||
@discussion This calls the system-provided function SecRandomCopyBytes, based on /dev/random.
|
||||
/**
|
||||
Generate numOfBytes random data.
|
||||
|
||||
This calls the system-provided function SecRandomCopyBytes, based on /dev/random.
|
||||
*/
|
||||
+ (NSData *)randomBytes:(NSUInteger)numOfBytes;
|
||||
|
||||
@@ -32,31 +33,34 @@
|
||||
*/
|
||||
+ (NSString *)randomString:(NSUInteger)numOfBytes;
|
||||
|
||||
/*!
|
||||
@abstract Generate a fresh master key using SecRandomCopyBytes, the result is encoded in base64/.
|
||||
/**
|
||||
Generate a fresh master key using SecRandomCopyBytes, the result is encoded in base64/.
|
||||
*/
|
||||
+ (NSString *)makeMasterKey;
|
||||
|
||||
/*!
|
||||
@abstract Initialize with a base64-encoded master key.
|
||||
@discussion This key and the current derivation function will be used to generate the encryption key and the mac key.
|
||||
/**
|
||||
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;
|
||||
|
||||
/*!
|
||||
@abstract Initialize with base64-encoded encryption key and mac key.
|
||||
/**
|
||||
Initialize with base64-encoded encryption key and mac key.
|
||||
*/
|
||||
- (instancetype)initWithEncryptionKey:(NSString *)encryptionKey macKey:(NSString *)macKey;
|
||||
|
||||
/*!
|
||||
@abstract Encrypt plainText and return the base64 encoded result.
|
||||
@discussion MAC computation involves additionalDataToSign.
|
||||
/**
|
||||
Encrypt plainText and return the base64 encoded result.
|
||||
|
||||
MAC computation involves additionalDataToSign.
|
||||
*/
|
||||
- (NSString *)encrypt:(NSData *)plainText additionalDataToSign:(NSData *)additionalDataToSign;
|
||||
|
||||
/*!
|
||||
@abstract Decrypt base64EncodedCipherText.
|
||||
@discussion MAC computation involves additionalSignedData.
|
||||
/**
|
||||
Decrypt base64EncodedCipherText.
|
||||
|
||||
MAC computation involves additionalSignedData.
|
||||
*/
|
||||
- (NSData *)decrypt:(NSString *)base64EncodedCipherText additionalSignedData:(NSData *)additionalSignedData;
|
||||
|
||||
|
||||
Generated
-1
@@ -47,7 +47,6 @@ typedef void(^FBSDKBridgeAPICallbackBlock)(FBSDKBridgeAPIResponse *response);
|
||||
|
||||
- (void)openURL:(NSURL *)url sender:(id<FBSDKURLOpening>)sender handler:(void(^)(BOOL))handler;
|
||||
|
||||
@property (nonatomic, copy) FBSDKDeferredAppInviteHandler organicDeeplinkHandler;
|
||||
#endif
|
||||
|
||||
@property (nonatomic, readonly, getter=isActive) BOOL active;
|
||||
|
||||
+3
@@ -41,6 +41,7 @@
|
||||
#else
|
||||
#import "Device/FBSDKDeviceButton+Internal.h"
|
||||
#import "Device/FBSDKDeviceDialogView.h"
|
||||
#import "Device/FBSDKSmartDeviceDialogView.h"
|
||||
#import "Device/FBSDKDeviceViewControllerBase+Internal.h"
|
||||
#import "Device/FBSDKModalFormPresentationController.h"
|
||||
#endif
|
||||
@@ -54,7 +55,9 @@
|
||||
#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"
|
||||
|
||||
+58
@@ -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 <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#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
|
||||
- Parameter loginCode: The login code associated with the action for the device request.
|
||||
- Returns: True if the service broadcast was successfully started.
|
||||
*/
|
||||
+ (BOOL)startAdvertisementService:(NSString *)loginCode withDelegate:(id<NSNetServiceDelegate>)delegate;
|
||||
|
||||
/**
|
||||
Check if a service delegate is registered with particular advertisement service
|
||||
- Parameter delegate: The delegate to check if registered.
|
||||
- Parameter service: The advertisement service to check for.
|
||||
- Returns: True if the service is the one the delegate registered with.
|
||||
*/
|
||||
+ (BOOL)isDelegate:(id<NSNetServiceDelegate>)delegate forAdvertisementService:(NSNetService *)service;
|
||||
|
||||
/**
|
||||
Stop the mDNS advertisement service for a device request
|
||||
- Parameter delegate: The delegate registered with the service.
|
||||
*/
|
||||
+ (void)cleanUpAdvertisementService:(id<NSNetServiceDelegate>)delegate;
|
||||
|
||||
@end
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
// 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 <sys/utsname.h>
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#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: [NSString stringWithCString:systemInfo.machine
|
||||
encoding:NSUTF8StringEncoding],
|
||||
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<NSNetServiceDelegate>)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<NSNetServiceDelegate>)delegate forAdvertisementService:(NSNetService *)service
|
||||
{
|
||||
NSNetService *mdnsAdvertisementService = [g_mdnsAdvertisementServices objectForKey:delegate];
|
||||
return (mdnsAdvertisementService == service);
|
||||
}
|
||||
|
||||
+ (void)cleanUpAdvertisementService:(id<NSNetServiceDelegate>)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
|
||||
Generated
+68
-76
@@ -16,19 +16,15 @@
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#import <sqlite3.h>
|
||||
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKMacros.h>
|
||||
|
||||
/*!
|
||||
@class FBSDKDynamicFrameworkLoader
|
||||
/**
|
||||
|
||||
@abstract
|
||||
This class provides a way to load constants and methods from Apple Frameworks in a dynamic
|
||||
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.
|
||||
|
||||
@@ -38,107 +34,94 @@
|
||||
|
||||
#pragma mark - Security Constants
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecRandomDefault value from the Security Framework
|
||||
/**
|
||||
Load the kSecRandomDefault value from the Security Framework
|
||||
|
||||
@return The kSecRandomDefault value or nil.
|
||||
- Returns: The kSecRandomDefault value or nil.
|
||||
*/
|
||||
+ (SecRandomRef)loadkSecRandomDefault;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecAttrAccessible value from the Security Framework
|
||||
/**
|
||||
Load the kSecAttrAccessible value from the Security Framework
|
||||
|
||||
@return The kSecAttrAccessible value or nil.
|
||||
- Returns: The kSecAttrAccessible value or nil.
|
||||
*/
|
||||
+ (CFTypeRef)loadkSecAttrAccessible;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly value from the Security Framework
|
||||
/**
|
||||
Load the kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly value from the Security Framework
|
||||
|
||||
@return The kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly value or nil.
|
||||
- Returns: The kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly value or nil.
|
||||
*/
|
||||
+ (CFTypeRef)loadkSecAttrAccessibleAfterFirstUnlockThisDeviceOnly;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecAttrAccount value from the Security Framework
|
||||
/**
|
||||
Load the kSecAttrAccount value from the Security Framework
|
||||
|
||||
@return The kSecAttrAccount value or nil.
|
||||
- Returns: The kSecAttrAccount value or nil.
|
||||
*/
|
||||
+ (CFTypeRef)loadkSecAttrAccount;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecAttrService value from the Security Framework
|
||||
/**
|
||||
Load the kSecAttrService value from the Security Framework
|
||||
|
||||
@return The kSecAttrService value or nil.
|
||||
- Returns: The kSecAttrService value or nil.
|
||||
*/
|
||||
+ (CFTypeRef)loadkSecAttrService;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecAttrGeneric value from the Security Framework
|
||||
/**
|
||||
Load the kSecAttrGeneric value from the Security Framework
|
||||
|
||||
@return The kSecAttrGeneric value or nil.
|
||||
- Returns: The kSecAttrGeneric value or nil.
|
||||
*/
|
||||
+ (CFTypeRef)loadkSecAttrGeneric;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecValueData value from the Security Framework
|
||||
/**
|
||||
Load the kSecValueData value from the Security Framework
|
||||
|
||||
@return The kSecValueData value or nil.
|
||||
- Returns: The kSecValueData value or nil.
|
||||
*/
|
||||
+ (CFTypeRef)loadkSecValueData;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecClassGenericPassword value from the Security Framework
|
||||
/**
|
||||
Load the kSecClassGenericPassword value from the Security Framework
|
||||
|
||||
@return The kSecClassGenericPassword value or nil.
|
||||
- Returns: The kSecClassGenericPassword value or nil.
|
||||
*/
|
||||
+ (CFTypeRef)loadkSecClassGenericPassword;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecAttrAccessGroup value from the Security Framework
|
||||
/**
|
||||
Load the kSecAttrAccessGroup value from the Security Framework
|
||||
|
||||
@return The kSecAttrAccessGroup value or nil.
|
||||
- Returns: The kSecAttrAccessGroup value or nil.
|
||||
*/
|
||||
+ (CFTypeRef)loadkSecAttrAccessGroup;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecMatchLimitOne value from the Security Framework
|
||||
/**
|
||||
Load the kSecMatchLimitOne value from the Security Framework
|
||||
|
||||
@return The kSecMatchLimitOne value or nil.
|
||||
- Returns: The kSecMatchLimitOne value or nil.
|
||||
*/
|
||||
+ (CFTypeRef)loadkSecMatchLimitOne;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecMatchLimit value from the Security Framework
|
||||
/**
|
||||
Load the kSecMatchLimit value from the Security Framework
|
||||
|
||||
@return The kSecMatchLimit value or nil.
|
||||
- Returns: The kSecMatchLimit value or nil.
|
||||
*/
|
||||
+ (CFTypeRef)loadkSecMatchLimit;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecReturnData value from the Security Framework
|
||||
/**
|
||||
Load the kSecReturnData value from the Security Framework
|
||||
|
||||
@return The kSecReturnData value or nil.
|
||||
- Returns: The kSecReturnData value or nil.
|
||||
*/
|
||||
+ (CFTypeRef)loadkSecReturnData;
|
||||
|
||||
/*!
|
||||
@abstract
|
||||
Load the kSecClass value from the Security Framework
|
||||
/**
|
||||
Load the kSecClass value from the Security Framework
|
||||
|
||||
@return The kSecClass value or nil.
|
||||
- Returns: The kSecClass value or nil.
|
||||
*/
|
||||
+ (CFTypeRef)loadkSecClass;
|
||||
|
||||
@@ -155,32 +138,20 @@ FBSDK_EXTERN OSStatus fbsdkdfl_SecItemAdd(CFDictionaryRef attributes, CFTypeRef
|
||||
FBSDK_EXTERN OSStatus fbsdkdfl_SecItemCopyMatching(CFDictionaryRef query, CFTypeRef *result);
|
||||
FBSDK_EXTERN OSStatus fbsdkdfl_SecItemDelete(CFDictionaryRef query);
|
||||
|
||||
#pragma mark - sqlite3 APIs
|
||||
|
||||
// These are local wrappers around the corresponding sqlite3 method from /usr/include/sqlite3.h
|
||||
FBSDK_EXTERN SQLITE_API const char *fbsdkdfl_sqlite3_errmsg(sqlite3 *db);
|
||||
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_prepare_v2(sqlite3 *db, const char *zSql, int nByte, sqlite3_stmt **ppStmt, const char **pzTail);
|
||||
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_reset(sqlite3_stmt *pStmt);
|
||||
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_finalize(sqlite3_stmt *pStmt);
|
||||
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs);
|
||||
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_exec(sqlite3 *db, const char *sql, int (*callback)(void *, int, char **, char **), void *arg, char **errmsg);
|
||||
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_close(sqlite3 *db);
|
||||
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_bind_double(sqlite3_stmt *stmt, int index, double value);
|
||||
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_bind_int(sqlite3_stmt *stmt, int index, int value);
|
||||
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_bind_text(sqlite3_stmt *stmt, int index, const char *value, int n, void(*callback)(void *));
|
||||
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_step(sqlite3_stmt *stmt);
|
||||
FBSDK_EXTERN SQLITE_API double fbsdkdfl_sqlite3_column_double(sqlite3_stmt *stmt, int iCol);
|
||||
FBSDK_EXTERN SQLITE_API int fbsdkdfl_sqlite3_column_int(sqlite3_stmt *stmt, int iCol);
|
||||
FBSDK_EXTERN SQLITE_API const unsigned char *fbsdkdfl_sqlite3_column_text(sqlite3_stmt *stmt, int iCol);
|
||||
|
||||
#pragma mark - Social Constants
|
||||
|
||||
FBSDK_EXTERN NSString *fbsdkdfl_SLServiceTypeFacebook(void);
|
||||
FBSDK_EXTERN NSString *fbsdkdfl_SLServiceTypeTwitter(void);
|
||||
|
||||
#pragma mark - Social Classes
|
||||
|
||||
FBSDK_EXTERN Class fbsdkdfl_SLComposeViewControllerClass(void);
|
||||
|
||||
#pragma mark - MessageUI Classes
|
||||
|
||||
FBSDK_EXTERN Class fbsdkdfl_MFMailComposeViewControllerClass(void);
|
||||
FBSDK_EXTERN Class fbsdkdfl_MFMessageComposeViewControllerClass(void);
|
||||
|
||||
#pragma mark - QuartzCore Classes
|
||||
|
||||
FBSDK_EXTERN Class fbsdkdfl_CATransactionClass(void);
|
||||
@@ -234,3 +205,24 @@ FBSDK_EXTERN Class fbsdkdfl_ALAssetsLibraryClass(void);
|
||||
#pragma mark - CoreTelephony Classes
|
||||
|
||||
FBSDK_EXTERN Class fbsdkdfl_CTTelephonyNetworkInfoClass(void);
|
||||
|
||||
#pragma mark - CoreImage
|
||||
|
||||
FBSDK_EXTERN Class fbsdkdfl_CIImageClass(void);
|
||||
FBSDK_EXTERN Class fbsdkdfl_CIFilterClass(void);
|
||||
FBSDK_EXTERN NSString *fbsdkdfl_kCIInputImageKey(void);
|
||||
FBSDK_EXTERN NSString *fbsdkdfl_kCIInputRadiusKey(void);
|
||||
FBSDK_EXTERN NSString *fbsdkdfl_kCIOutputImageKey(void);
|
||||
|
||||
#pragma mark - Photos.framework
|
||||
|
||||
FBSDK_EXTERN Class fbsdkdfl_PHPhotoLibrary(void);
|
||||
FBSDK_EXTERN Class fbsdkdfl_PHAssetChangeRequest(void);
|
||||
|
||||
#pragma mark - MobileCoreServices
|
||||
|
||||
FBSDK_EXTERN CFStringRef fbsdkdfl_UTTypeCopyPreferredTagWithClass(CFStringRef inUTI,
|
||||
CFStringRef inTagClass);
|
||||
FBSDK_EXTERN CFStringRef fbsdkdfl_kUTTagClassMIMEType(void);
|
||||
FBSDK_EXTERN CFStringRef fbsdkdfl_kUTTypeJPEG(void);
|
||||
FBSDK_EXTERN CFStringRef fbsdkdfl_kUTTypePNG(void);
|
||||
+41
@@ -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 <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
/*
|
||||
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
|
||||
- Parameter url: the url to download
|
||||
- Parameter ttl: the amount of time (in seconds) that using a cached version is acceptable.
|
||||
- Parameter 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
|
||||
+93
@@ -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];
|
||||
[_urlCache storeCachedResponse:responseToCache forRequest:request];
|
||||
completionWrapper(responseToCache);
|
||||
} else if (completion != NULL) {
|
||||
completion(nil);
|
||||
}
|
||||
}];
|
||||
[task resume];
|
||||
} else {
|
||||
completionWrapper(cachedResponse);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
+151
-147
@@ -35,101 +35,103 @@ typedef NS_ENUM(int32_t, FBSDKUIKitVersion)
|
||||
|
||||
@interface FBSDKInternalUtility : NSObject
|
||||
|
||||
/*!
|
||||
@abstract Constructs the scheme for apps that come to the current app through the bridge.
|
||||
/**
|
||||
Constructs the scheme for apps that come to the current app through the bridge.
|
||||
*/
|
||||
+ (NSString *)appURLScheme;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Constructs an URL for the current app.
|
||||
- Parameter host: The host for the URL.
|
||||
- Parameter path: The path for the URL.
|
||||
- Parameter queryParameters: The query parameters for the URL. This will be converted into a query string.
|
||||
- Parameter errorRef: If an error occurs, upon return contains an NSError object that describes the problem.
|
||||
- Returns: The app URL.
|
||||
*/
|
||||
+ (NSURL *)appURLWithHost:(NSString *)host
|
||||
path:(NSString *)path
|
||||
queryParameters:(NSDictionary *)queryParameters
|
||||
error:(NSError *__autoreleasing *)errorRef;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Parses an FB url's query params (and potentially fragment) into a dictionary.
|
||||
- Parameter url: The FB url.
|
||||
- Returns: A dictionary with the key/value pairs.
|
||||
*/
|
||||
+ (NSDictionary *)dictionaryFromFBURL:(NSURL *)url;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Adds an object to an array if it is not nil.
|
||||
- Parameter array: The array to add the object to.
|
||||
- Parameter object: The object to add to the array.
|
||||
*/
|
||||
+ (void)array:(NSMutableArray *)array addObject:(id)object;
|
||||
|
||||
/*!
|
||||
@abstract Returns bundle for returning localized strings
|
||||
@discussion We assume a convention of a bundle named FBSDKStrings.bundle, otherwise we
|
||||
/**
|
||||
Returns bundle for returning localized strings
|
||||
|
||||
We assume a convention of a bundle named FBSDKStrings.bundle, otherwise we
|
||||
return the main bundle.
|
||||
*/
|
||||
+ (NSBundle *)bundleForStrings;
|
||||
|
||||
/*!
|
||||
@abstract Converts simple value types to the string equivelant 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).
|
||||
/**
|
||||
Converts simple value types to the string equivalent for serializing to a request query or body.
|
||||
- Parameter value: The value to be converted.
|
||||
- Returns: The value that may have been converted if able (otherwise the input param).
|
||||
*/
|
||||
+ (id)convertRequestValue:(id)value;
|
||||
|
||||
/*!
|
||||
@abstract Gets the milliseconds since the Unix Epoch.
|
||||
@discussion Changes in the system clock will affect this value.
|
||||
@return The number of milliseconds since the Unix Epoch.
|
||||
/**
|
||||
Gets the milliseconds since the Unix Epoch.
|
||||
|
||||
Changes in the system clock will affect this value.
|
||||
- Returns: The number of milliseconds since the Unix Epoch.
|
||||
*/
|
||||
+ (unsigned long)currentTimeInMilliseconds;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Sets an object for a key in a dictionary if it is not nil.
|
||||
- Parameter dictionary: The dictionary to set the value for.
|
||||
- Parameter object: The value to set after serializing to JSON.
|
||||
- Parameter key: The key to set the value for.
|
||||
- Parameter errorRef: If an error occurs, upon return contains an NSError object that describes the problem.
|
||||
- Returns: NO if an error occurred while serializing the object, otherwise YES.
|
||||
*/
|
||||
+ (BOOL)dictionary:(NSMutableDictionary *)dictionary
|
||||
setJSONStringForObject:(id)object
|
||||
forKey:(id<NSCopying>)key
|
||||
error:(NSError *__autoreleasing *)errorRef;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Sets an object for a key in a dictionary if it is not nil.
|
||||
- Parameter dictionary: The dictionary to set the value for.
|
||||
- Parameter object: The value to set.
|
||||
- Parameter key: The key to set the value for.
|
||||
*/
|
||||
+ (void)dictionary:(NSMutableDictionary *)dictionary setObject:(id)object forKey:(id<NSCopying>)key;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Constructs a Facebook URL.
|
||||
- Parameter hostPrefix: The prefix for the host, such as 'm', 'graph', etc.
|
||||
- Parameter path: The path for the URL. This may or may not include a version.
|
||||
- Parameter queryParameters: The query parameters for the URL. This will be converted into a query string.
|
||||
- Parameter errorRef: If an error occurs, upon return contains an NSError object that describes the problem.
|
||||
- Returns: The Facebook URL.
|
||||
*/
|
||||
+ (NSURL *)facebookURLWithHostPrefix:(NSString *)hostPrefix
|
||||
path:(NSString *)path
|
||||
queryParameters:(NSDictionary *)queryParameters
|
||||
error:(NSError *__autoreleasing *)errorRef;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Constructs a Facebook URL.
|
||||
- Parameter hostPrefix: The prefix for the host, such as 'm', 'graph', etc.
|
||||
- Parameter path: The path for the URL. This may or may not include a version.
|
||||
- Parameter queryParameters: The query parameters for the URL. This will be converted into a query string.
|
||||
- Parameter defaultVersion: A version to add to the URL if none is found in the path.
|
||||
- Parameter errorRef: If an error occurs, upon return contains an NSError object that describes the problem.
|
||||
- Returns: The Facebook URL.
|
||||
*/
|
||||
+ (NSURL *)facebookURLWithHostPrefix:(NSString *)hostPrefix
|
||||
path:(NSString *)path
|
||||
@@ -137,113 +139,115 @@ setJSONStringForObject:(id)object
|
||||
defaultVersion:(NSString *)defaultVersion
|
||||
error:(NSError *__autoreleasing *)errorRef;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Tests whether the supplied URL is a valid URL for opening in the browser.
|
||||
- Parameter URL: The URL to test.
|
||||
- Returns: YES if the URL refers to an http or https resource, otherwise NO.
|
||||
*/
|
||||
+ (BOOL)isBrowserURL:(NSURL *)URL;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Tests whether the supplied bundle identifier references a Facebook app.
|
||||
- Parameter bundleIdentifier: The bundle identifier to test.
|
||||
- Returns: YES if the bundle identifier refers to a Facebook app, otherwise NO.
|
||||
*/
|
||||
+ (BOOL)isFacebookBundleIdentifier:(NSString *)bundleIdentifier;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Tests whether the operating system is at least the specified version.
|
||||
- Parameter version: The version to test against.
|
||||
- Returns: YES if the operating system is greater than or equal to the specified version, otherwise NO.
|
||||
*/
|
||||
+ (BOOL)isOSRunTimeVersionAtLeast:(NSOperatingSystemVersion)version;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Tests whether the supplied bundle identifier references the Safari app.
|
||||
- Parameter bundleIdentifier: The bundle identifier to test.
|
||||
- Returns: YES if the bundle identifier refers to the Safari app, otherwise NO.
|
||||
*/
|
||||
+ (BOOL)isSafariBundleIdentifier:(NSString *)bundleIdentifier;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Tests whether the UIKit version that the current app was linked to is at least the specified version.
|
||||
- Parameter version: The version to test against.
|
||||
- Returns: YES if the linked UIKit version is greater than or equal to the specified version, otherwise NO.
|
||||
*/
|
||||
+ (BOOL)isUIKitLinkTimeVersionAtLeast:(FBSDKUIKitVersion)version;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Tests whether the UIKit version in the runtime is at least the specified version.
|
||||
- Parameter version: The version to test against.
|
||||
- Returns: YES if the runtime UIKit version is greater than or equal to the specified version, otherwise NO.
|
||||
*/
|
||||
+ (BOOL)isUIKitRunTimeVersionAtLeast:(FBSDKUIKitVersion)version;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Converts an object into a JSON string.
|
||||
- Parameter object: The object to convert to JSON.
|
||||
- Parameter errorRef: If an error occurs, upon return contains an NSError object that describes the problem.
|
||||
- Parameter invalidObjectHandler: Handles objects that are invalid, returning a replacement value or nil to ignore.
|
||||
- Returns: 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;
|
||||
|
||||
/*!
|
||||
@abstract Checks equality between 2 objects.
|
||||
@discussion Checks for pointer equality, nils, isEqual:.
|
||||
@param object The first object to compare.
|
||||
@param other The second object to compare.
|
||||
@result YES if the objects are equal, otherwise NO.
|
||||
/**
|
||||
Checks equality between 2 objects.
|
||||
|
||||
Checks for pointer equality, nils, isEqual:.
|
||||
- Parameter object: The first object to compare.
|
||||
- Parameter other: The second object to compare.
|
||||
- Returns: YES if the objects are equal, otherwise NO.
|
||||
*/
|
||||
+ (BOOL)object:(id)object isEqualToObject:(id)other;
|
||||
|
||||
/*!
|
||||
@abstract 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
|
||||
/**
|
||||
Converts a JSON string into an object
|
||||
- Parameter string: The JSON string to convert.
|
||||
- Parameter errorRef: If an error occurs, upon return contains an NSError object that describes the problem.
|
||||
- Returns: 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;
|
||||
|
||||
/*!
|
||||
@abstract The version of the operating system on which the process is executing.
|
||||
/**
|
||||
The version of the operating system on which the process is executing.
|
||||
*/
|
||||
+ (NSOperatingSystemVersion)operatingSystemVersion;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
@result Query string representation of the parameters.
|
||||
/**
|
||||
Constructs a query string from a dictionary.
|
||||
- Parameter dictionary: The dictionary with key/value pairs for the query string.
|
||||
- Parameter errorRef: If an error occurs, upon return contains an NSError object that describes the problem.
|
||||
- Parameter invalidObjectHandler: Handles objects that are invalid, returning a replacement value or nil to ignore.
|
||||
- Returns: Query string representation of the parameters.
|
||||
*/
|
||||
+ (NSString *)queryStringWithDictionary:(NSDictionary *)dictionary
|
||||
error:(NSError *__autoreleasing *)errorRef
|
||||
invalidObjectHandler:(id(^)(id object, BOOL *stop))invalidObjectHandler;
|
||||
|
||||
/*!
|
||||
@abstract Tests whether the orientation should be manually adjusted for views outside of the root view controller.
|
||||
@discussion With the legacy layout the developer must worry about device orientation when working with views outside of
|
||||
/**
|
||||
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.
|
||||
- Returns: YES if if the orientation must be manually adjusted, otherwise NO.
|
||||
*/
|
||||
+ (BOOL)shouldManuallyAdjustOrientation;
|
||||
|
||||
/*!
|
||||
@abstract 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.
|
||||
/**
|
||||
Constructs an NSURL.
|
||||
- Parameter scheme: The scheme for the URL.
|
||||
- Parameter host: The host for the URL.
|
||||
- Parameter path: The path for the URL.
|
||||
- Parameter queryParameters: The query parameters for the URL. This will be converted into a query string.
|
||||
- Parameter errorRef: If an error occurs, upon return contains an NSError object that describes the problem.
|
||||
- Returns: The URL.
|
||||
*/
|
||||
+ (NSURL *)URLWithScheme:(NSString *)scheme
|
||||
host:(NSString *)host
|
||||
@@ -251,35 +255,35 @@ setJSONStringForObject:(id)object
|
||||
queryParameters:(NSDictionary *)queryParameters
|
||||
error:(NSError *__autoreleasing *)errorRef;
|
||||
|
||||
/*!
|
||||
* @abstract Deletes all the cookies in the NSHTTPCookieStorage for Facebook web dialogs
|
||||
/**
|
||||
* Deletes all the cookies in the NSHTTPCookieStorage for Facebook web dialogs
|
||||
*/
|
||||
+ (void)deleteFacebookCookies;
|
||||
|
||||
/*!
|
||||
@abstract 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 decliend permissions to.
|
||||
/**
|
||||
Extracts permissions from a response fetched from me/permissions
|
||||
- Parameter responseObject: the response
|
||||
- Parameter grantedPermissions: the set to add granted permissions to
|
||||
- Parameter declinedPermissions: the set to add declined permissions to.
|
||||
*/
|
||||
+ (void)extractPermissionsFromResponse:(NSDictionary *)responseObject
|
||||
grantedPermissions:(NSMutableSet *)grantedPermissions
|
||||
declinedPermissions:(NSMutableSet *)declinedPermissions;
|
||||
|
||||
/*!
|
||||
@abstract Registers a transient object so that it will not be deallocated until unregistered
|
||||
@param object The transient object
|
||||
/**
|
||||
Registers a transient object so that it will not be deallocated until unregistered
|
||||
- Parameter object: The transient object
|
||||
*/
|
||||
+ (void)registerTransientObject:(id)object;
|
||||
|
||||
/*!
|
||||
@abstract Unregisters a transient object that was previously registered with registerTransientObject:
|
||||
@param object The transient object
|
||||
/**
|
||||
Unregisters a transient object that was previously registered with registerTransientObject:
|
||||
- Parameter object: The transient object
|
||||
*/
|
||||
+ (void)unregisterTransientObject:(__weak id)object;
|
||||
|
||||
/*!
|
||||
@abstract validates that the app ID is non-nil, throws an NSException if nil.
|
||||
/**
|
||||
validates that the app ID is non-nil, throws an NSException if nil.
|
||||
*/
|
||||
+ (void)validateAppID;
|
||||
|
||||
@@ -289,48 +293,48 @@ setJSONStringForObject:(id)object
|
||||
*/
|
||||
+ (NSString *)validateRequiredClientAccessToken;
|
||||
|
||||
/*!
|
||||
@abstract validates that the right URL schemes are registered, throws an NSException if not.
|
||||
/**
|
||||
validates that the right URL schemes are registered, throws an NSException if not.
|
||||
*/
|
||||
+ (void)validateURLSchemes;
|
||||
|
||||
/*!
|
||||
@abstract validates that Facebook reserved URL schemes are not registered, throws an NSException if they are.
|
||||
/**
|
||||
validates that Facebook reserved URL schemes are not registered, throws an NSException if they are.
|
||||
*/
|
||||
+ (void)validateFacebookReservedURLSchemes;
|
||||
|
||||
/*!
|
||||
@abstract Attempts to find the first UIViewController in the view's responder chain. Returns nil if not found.
|
||||
/**
|
||||
Attempts to find the first UIViewController in the view's responder chain. Returns nil if not found.
|
||||
*/
|
||||
+ (UIViewController *)viewControllerforView:(UIView*)view;
|
||||
+ (UIViewController *)viewControllerForView:(UIView *)view;
|
||||
|
||||
/*!
|
||||
@abstract returns true if the url scheme is registered in the CFBundleURLTypes
|
||||
/**
|
||||
returns true if the url scheme is registered in the CFBundleURLTypes
|
||||
*/
|
||||
+ (BOOL)isRegisteredURLScheme:(NSString *)urlScheme;
|
||||
|
||||
/*!
|
||||
@abstract returns currently displayed top view controller.
|
||||
/**
|
||||
returns currently displayed top view controller.
|
||||
*/
|
||||
+ (UIViewController *)topMostViewController;
|
||||
|
||||
/*!
|
||||
@abstract Converts NSData to a hexadecimal UTF8 String.
|
||||
/**
|
||||
Converts NSData to a hexadecimal UTF8 String.
|
||||
*/
|
||||
+ (NSString *)hexadecimalStringFromData:(NSData *)data;
|
||||
|
||||
/*
|
||||
@abstract Checks if the permission is a publish permission.
|
||||
Checks if the permission is a publish permission.
|
||||
*/
|
||||
+ (BOOL)isPublishPermission:(NSString *)permission;
|
||||
|
||||
/*
|
||||
@abstract Checks if the set of permissions are all read permissions.
|
||||
Checks if the set of permissions are all read permissions.
|
||||
*/
|
||||
+ (BOOL)areAllPermissionsReadPermissions:(NSSet *)permissions;
|
||||
|
||||
/*
|
||||
@abstract Checks if the set of permissions are all publish permissions.
|
||||
Checks if the set of permissions are all publish permissions.
|
||||
*/
|
||||
+ (BOOL)areAllPermissionsPublishPermissions:(NSSet *)permissions;
|
||||
|
||||
|
||||
+9
-4
@@ -92,8 +92,9 @@ typedef NS_ENUM(NSUInteger, FBSDKInternalUtilityVersionShift)
|
||||
static NSBundle *bundle;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
NSString *stringsBundlePath = [[NSBundle mainBundle] pathForResource:@"FacebookSDKStrings"
|
||||
ofType:@"bundle"];
|
||||
NSString *stringsBundlePath = [[NSBundle bundleForClass:[FBSDKApplicationDelegate class]]
|
||||
pathForResource:@"FacebookSDKStrings"
|
||||
ofType:@"bundle"];
|
||||
bundle = [NSBundle bundleWithPath:stringsBundlePath] ?: [NSBundle mainBundle];
|
||||
});
|
||||
return bundle;
|
||||
@@ -187,7 +188,7 @@ setJSONStringForObject:(id)object
|
||||
}
|
||||
host = [NSString stringWithFormat:@"%@%@", hostPrefix ?: @"", host ?: @""];
|
||||
|
||||
NSString *version = defaultVersion ?: FBSDK_TARGET_PLATFORM_VERSION;
|
||||
NSString *version = defaultVersion ?: [FBSDKSettings graphAPIVersion];
|
||||
if ([version length]) {
|
||||
version = [@"/" stringByAppendingString:version];
|
||||
}
|
||||
@@ -198,6 +199,10 @@ setJSONStringForObject:(id)object
|
||||
[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:@"/"]) {
|
||||
@@ -468,7 +473,7 @@ static NSMapTable *_transientObjects;
|
||||
}
|
||||
}
|
||||
|
||||
+ (UIViewController *)viewControllerforView:(UIView*)view
|
||||
+ (UIViewController *)viewControllerForView:(UIView *)view
|
||||
{
|
||||
UIResponder *responder = view.nextResponder;
|
||||
while (responder) {
|
||||
|
||||
+2
-4
@@ -18,11 +18,9 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
@class FBSDKLogger
|
||||
/**
|
||||
|
||||
@abstract
|
||||
Simple logging utility for conditionally logging strings and then emitting them
|
||||
Simple logging utility for conditionally logging strings and then emitting them
|
||||
via NSLog().
|
||||
|
||||
@unsorted
|
||||
|
||||
+4
-4
@@ -27,8 +27,8 @@ 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 prefered over FBSDKMonotonicTimeGetCurrentSeconds in case millisecond
|
||||
* precision is requred.
|
||||
* 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);
|
||||
@@ -36,8 +36,8 @@ FBSDKMonotonicTimeMilliseconds FBSDKMonotonicTimeGetCurrentMilliseconds(void);
|
||||
/**
|
||||
* return current monotonic time in Seconds
|
||||
* Nanosecond precision, double value.
|
||||
* Should be prefered over FBSDKMonotonicTimeGetCurrentMilliseconds in case
|
||||
* nanosecond precision is requred.
|
||||
* 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);
|
||||
|
||||
Generated
+14
-15
@@ -24,20 +24,19 @@ typedef void (^FBSDKGraphRequestAccessToAccountsHandler)(NSString *oauthToken, N
|
||||
/*
|
||||
@class
|
||||
|
||||
@abstract Adapter around system account store APIs. Note this is only intended for internal
|
||||
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
|
||||
|
||||
/*
|
||||
@abstract
|
||||
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.
|
||||
Requests access to the device's Facebook account for the given parameters.
|
||||
- Parameter permissions: the permissions
|
||||
- Parameter defaultAudience: the default audience
|
||||
- Parameter isReauthorize: a flag describing if this is a reauth request
|
||||
- Parameter appID: the app id
|
||||
- Parameter 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
|
||||
@@ -46,36 +45,36 @@ typedef void (^FBSDKGraphRequestAccessToAccountsHandler)(NSString *oauthToken, N
|
||||
handler:(FBSDKGraphRequestAccessToAccountsHandler)handler;
|
||||
|
||||
/*
|
||||
@abstract Sends a message to the device account store to renew the Facebook account credentials
|
||||
Sends a message to the device account store to renew the Facebook account credentials
|
||||
|
||||
@param handler the handler that is invoked on completion
|
||||
- Parameter handler: the handler that is invoked on completion
|
||||
*/
|
||||
- (void)renewSystemAuthorization:(void(^)(ACAccountCredentialRenewResult result, NSError *error))handler;
|
||||
|
||||
/*
|
||||
@abstracts gets the oauth token stored in the account store credential, if available. If not empty,
|
||||
s gets the oauth token stored in the account store credential, if available. If not empty,
|
||||
this implies user has granted access.
|
||||
*/
|
||||
- (NSString *)accessTokenString;
|
||||
|
||||
/*
|
||||
@abstract Gets the singleton instance.
|
||||
Gets the singleton instance.
|
||||
*/
|
||||
+ (FBSDKSystemAccountStoreAdapter *)sharedInstance;
|
||||
|
||||
/*
|
||||
@abstract Sets the singleton instance, typically only for unit tests
|
||||
Sets the singleton instance, typically only for unit tests
|
||||
*/
|
||||
+ (void)setSharedInstance:(FBSDKSystemAccountStoreAdapter *)instance;
|
||||
|
||||
/*
|
||||
@abstract Gets or sets the flag indicating if the next requestAccess call should block
|
||||
Gets or sets the flag indicating if the next requestAccess call should block
|
||||
on a renew call.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL forceBlockingRenew;
|
||||
|
||||
/*
|
||||
@abstract A convenience getter to the Facebook account type in the account store, if available.
|
||||
A convenience getter to the Facebook account type in the account store, if available.
|
||||
*/
|
||||
@property (strong, nonatomic, readonly) ACAccountType *accountType;
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ static int const FBSDKTokenRefreshRetrySeconds = 60 * 60; // hour
|
||||
if ([FBSDKSettings appID].length > 0) {
|
||||
BOOL safeForPiggyback = YES;
|
||||
for (FBSDKGraphRequestMetadata *metadata in connection.requests) {
|
||||
if (![metadata.request.version isEqualToString:FBSDK_TARGET_PLATFORM_VERSION] ||
|
||||
if (![metadata.request.version isEqualToString:[FBSDKSettings graphAPIVersion]] ||
|
||||
[metadata.request hasAttachments]) {
|
||||
safeForPiggyback = NO;
|
||||
break;
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ typedef void (^FBSDKURLConnectionHandler)(FBSDKURLConnection *connection,
|
||||
completionHandler:(FBSDKURLConnectionHandler)handler
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
@property (nonatomic, assign) id<FBSDKURLConnectionDelegate> delegate;
|
||||
@property (nonatomic, weak) id<FBSDKURLConnectionDelegate> delegate;
|
||||
|
||||
- (void)cancel;
|
||||
- (void)start;
|
||||
|
||||
+13
-3
@@ -18,8 +18,18 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKAppLinkUtility.h>
|
||||
typedef void (^FBSDKURLSessionTaskHandler)(NSError *error,
|
||||
NSURLResponse *response,
|
||||
NSData *responseData);
|
||||
|
||||
@interface FBSDKURLSessionTask : NSObject
|
||||
|
||||
- (FBSDKURLSessionTask *)initWithRequest:(NSURLRequest *)request
|
||||
fromSession:(NSURLSession *)session
|
||||
completionHandler:(FBSDKURLSessionTaskHandler)handler
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
- (void)cancel;
|
||||
- (void)start;
|
||||
|
||||
@interface FBSDKOrganicDeeplinkHelper: NSObject
|
||||
- (bool)fetchOrganicDeeplink:(FBSDKDeferredAppInviteHandler)handler;
|
||||
@end
|
||||
Generated
+159
@@ -0,0 +1,159 @@
|
||||
// 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 "FBSDKMacros.h"
|
||||
#import "FBSDKSettings.h"
|
||||
|
||||
@interface FBSDKURLSessionTask ()
|
||||
|
||||
@property (nonatomic, strong) NSURLSessionTask *task;
|
||||
@property (nonatomic, copy) FBSDKURLSessionTaskHandler handler;
|
||||
@property (nonatomic, assign) unsigned long requestStartTime;
|
||||
@property (nonatomic, assign, readonly) NSUInteger loggerSerialNumber;
|
||||
|
||||
@end
|
||||
|
||||
@implementation FBSDKURLSessionTask
|
||||
|
||||
- (FBSDKURLSessionTask *)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;
|
||||
}
|
||||
|
||||
- (FBSDKURLSessionTask *)init
|
||||
{
|
||||
FBSDK_NOT_DESIGNATED_INITIALIZER(initWithRequest:fromSession:completionHandler:);
|
||||
return [self initWithRequest:nil
|
||||
fromSession:nil
|
||||
completionHandler:NULL];
|
||||
}
|
||||
|
||||
#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: %lu 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
|
||||
+18
@@ -34,6 +34,15 @@ extern NSString *const FBSDKDialogConfigurationNameLike;
|
||||
extern NSString *const FBSDKDialogConfigurationNameMessage;
|
||||
extern NSString *const FBSDKDialogConfigurationNameShare;
|
||||
|
||||
extern const NSInteger FBSDKServerConfigurationVersion;
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationSmartLoginOptions)
|
||||
{
|
||||
FBSDKServerConfigurationSmartLoginOptionsUnknown = 0,
|
||||
FBSDKServerConfigurationSmartLoginOptionsEnabled = 1 << 0,
|
||||
FBSDKServerConfigurationSmartLoginOptionsRequireConfirmation = 1 << 1,
|
||||
};
|
||||
|
||||
@interface FBSDKServerConfiguration : NSObject <FBSDKCopying, NSSecureCoding>
|
||||
|
||||
- (instancetype)initWithAppID:(NSString *)appID
|
||||
@@ -52,6 +61,10 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
errorConfiguration:(FBSDKErrorConfiguration *)errorConfiguration
|
||||
sessionTimeoutInterval:(NSTimeInterval) sessionTimeoutInterval
|
||||
defaults:(BOOL)defaults
|
||||
loggingToken:(NSString *)loggingToken
|
||||
smartLoginOptions:(FBSDKServerConfigurationSmartLoginOptions)smartLoginOptions
|
||||
smartLoginBookmarkIconURL:(NSURL *)smartLoginBookmarkIconURL
|
||||
smartLoginMenuIconURL:(NSURL *)smartLoginMenuIconURL
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
@property (nonatomic, assign, readonly, getter=isAdvertisingIDEnabled) BOOL advertisingIDEnabled;
|
||||
@@ -68,6 +81,11 @@ NS_DESIGNATED_INITIALIZER;
|
||||
@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, readonly) NSInteger version;
|
||||
|
||||
- (FBSDKDialogConfiguration *)dialogConfigurationForDialogName:(NSString *)dialogName;
|
||||
- (BOOL)useNativeDialogForDialogName:(NSString *)dialogName;
|
||||
|
||||
+53
-17
@@ -37,6 +37,11 @@
|
||||
#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_VERSION_KEY @"version"
|
||||
|
||||
#pragma mark - Dialog Names
|
||||
|
||||
@@ -56,10 +61,15 @@ 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
|
||||
@@ -85,6 +95,10 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
errorConfiguration:(FBSDKErrorConfiguration *)errorConfiguration
|
||||
sessionTimeoutInterval:(NSTimeInterval) sessionTimeoutInterval
|
||||
defaults:(BOOL)defaults
|
||||
loggingToken:(NSString *)loggingToken
|
||||
smartLoginOptions:(FBSDKServerConfigurationSmartLoginOptions)smartLoginOptions
|
||||
smartLoginBookmarkIconURL:(NSURL *)smartLoginBookmarkIconURL
|
||||
smartLoginMenuIconURL:(NSURL *)smartLoginMenuIconURL
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_appID = [appID copy];
|
||||
@@ -103,6 +117,11 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
_errorConfiguration = [errorConfiguration copy];
|
||||
_sessionTimoutInterval = sessionTimeoutInterval;
|
||||
_defaults = defaults;
|
||||
_loggingToken = loggingToken;
|
||||
_smartLoginOptions = smartLoginOptions;
|
||||
_smartLoginMenuIconURL = [smartLoginMenuIconURL copy];
|
||||
_smartLoginBookmarkIconURL = [smartLoginBookmarkIconURL copy];
|
||||
_version = FBSDKServerConfigurationVersion;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -156,10 +175,11 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
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 implicitPurchaseLoggingEnabbled =
|
||||
BOOL implicitPurchaseLoggingEnabled =
|
||||
[decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_IMPLICIT_PURCHASE_LOGGING_ENABLED_KEY];
|
||||
BOOL systemAuthenticationEnabled =
|
||||
[decoder decodeBoolForKey:FBSDK_SERVER_CONFIGURATION_SYSTEM_AUTHENTICATION_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:
|
||||
@@ -177,22 +197,33 @@ implicitPurchaseLoggingEnabled:(BOOL)implicitPurchaseLoggingEnabled
|
||||
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];
|
||||
return [self initWithAppID:appID
|
||||
appName:appName
|
||||
loginTooltipEnabled:loginTooltipEnabled
|
||||
loginTooltipText:loginTooltipText
|
||||
defaultShareMode:defaultShareMode
|
||||
advertisingIDEnabled:advertisingIDEnabled
|
||||
implicitLoggingEnabled:implicitLoggingEnabled
|
||||
implicitPurchaseLoggingEnabled:implicitPurchaseLoggingEnabbled
|
||||
systemAuthenticationEnabled:systemAuthenticationEnabled
|
||||
nativeAuthFlowEnabled:nativeAuthFlowEnabled
|
||||
dialogConfigurations:dialogConfigurations
|
||||
dialogFlows:dialogFlows
|
||||
timestamp:timestamp
|
||||
errorConfiguration:errorConfiguration
|
||||
sessionTimeoutInterval:sessionTimeoutInterval
|
||||
defaults:NO];
|
||||
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];
|
||||
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
|
||||
systemAuthenticationEnabled:systemAuthenticationEnabled
|
||||
nativeAuthFlowEnabled:nativeAuthFlowEnabled
|
||||
dialogConfigurations:dialogConfigurations
|
||||
dialogFlows:dialogFlows
|
||||
timestamp:timestamp
|
||||
errorConfiguration:errorConfiguration
|
||||
sessionTimeoutInterval:sessionTimeoutInterval
|
||||
defaults:NO
|
||||
loggingToken:loggingToken
|
||||
smartLoginOptions:smartLoginOptions
|
||||
smartLoginBookmarkIconURL:smartLoginBookmarkIconURL
|
||||
smartLoginMenuIconURL:smartLoginMenuIconURL
|
||||
];
|
||||
configuration->_version = version;
|
||||
return configuration;
|
||||
}
|
||||
|
||||
- (void)encodeWithCoder:(NSCoder *)encoder
|
||||
@@ -213,6 +244,11 @@ implicitPurchaseLoggingEnabled:implicitPurchaseLoggingEnabbled
|
||||
[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 encodeInteger:_version forKey:FBSDK_SERVER_CONFIGURATION_VERSION_KEY];
|
||||
}
|
||||
|
||||
#pragma mark - NSCopying
|
||||
|
||||
+6
-4
@@ -25,15 +25,17 @@ typedef void(^FBSDKServerConfigurationManagerLoadBlock)(FBSDKServerConfiguration
|
||||
@interface FBSDKServerConfigurationManager : NSObject
|
||||
|
||||
/**
|
||||
@abstract Returns the locally cached configuration.
|
||||
@discussion The result will be valid for the appID from FBSDKSettings, but may be expired. A network request will be
|
||||
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;
|
||||
|
||||
/**
|
||||
@abstract Executes the completionBlock with a valid and current configuration when it is available.
|
||||
@discussion This method will use a cached configuration if it is valid and not expired.
|
||||
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;
|
||||
|
||||
|
||||
+45
-3
@@ -20,6 +20,7 @@
|
||||
|
||||
#import "FBSDKGraphRequest+Internal.h"
|
||||
#import "FBSDKGraphRequest.h"
|
||||
#import "FBSDKImageDownloader.h"
|
||||
#import "FBSDKInternalUtility.h"
|
||||
#import "FBSDKLogger.h"
|
||||
#import "FBSDKServerConfiguration+Internal.h"
|
||||
@@ -45,6 +46,10 @@
|
||||
#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"
|
||||
|
||||
@implementation FBSDKServerConfigurationManager
|
||||
|
||||
@@ -124,7 +129,7 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
||||
}
|
||||
}
|
||||
|
||||
if ((_serverConfiguration && [self _serverConfigurationTimestampIsValid:_serverConfiguration.timestamp]) ||
|
||||
if ((_serverConfiguration && [self _serverConfigurationTimestampIsValid:_serverConfiguration.timestamp] && _serverConfiguration.version >= FBSDKServerConfigurationVersion) ||
|
||||
(_serverConfigurationErrorTimestamp && [self _serverConfigurationTimestampIsValid:_serverConfigurationErrorTimestamp])) {
|
||||
// we have a valid server configuration, use that
|
||||
loadBlock = [self _wrapperBlockForLoadBlock:completionBlock];
|
||||
@@ -181,6 +186,10 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
||||
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]];
|
||||
FBSDKServerConfiguration *serverConfiguration = [[FBSDKServerConfiguration alloc] initWithAppID:appID
|
||||
appName:appName
|
||||
loginTooltipEnabled:loginTooltipEnabled
|
||||
@@ -196,7 +205,29 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
||||
timestamp:[NSDate date]
|
||||
errorConfiguration:errorConfiguration
|
||||
sessionTimeoutInterval:sessionTimeoutInterval
|
||||
defaults:NO];
|
||||
defaults:NO
|
||||
loggingToken:loggingToken
|
||||
smartLoginOptions:smartLoginOptions
|
||||
smartLoginBookmarkIconURL:smartLoginBookmarkIconURL
|
||||
smartLoginMenuIconURL:smartLoginMenuIconURL
|
||||
];
|
||||
#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];
|
||||
}
|
||||
|
||||
@@ -220,6 +251,12 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
||||
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_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
|
||||
@@ -268,7 +305,12 @@ typedef NS_OPTIONS(NSUInteger, FBSDKServerConfigurationManagerAppEventsFeatures)
|
||||
timestamp:nil
|
||||
errorConfiguration:nil
|
||||
sessionTimeoutInterval:DEFAULT_SESSION_TIMEOUT_INTERVAL
|
||||
defaults:YES];
|
||||
defaults:YES
|
||||
loggingToken:nil
|
||||
smartLoginOptions:FBSDKServerConfigurationSmartLoginOptionsUnknown
|
||||
smartLoginBookmarkIconURL:nil
|
||||
smartLoginMenuIconURL:nil
|
||||
];
|
||||
}
|
||||
return _defaultServerConfiguration;
|
||||
}
|
||||
|
||||
Generated
+12
@@ -89,6 +89,12 @@
|
||||
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;
|
||||
@@ -115,6 +121,7 @@
|
||||
}
|
||||
|
||||
return (status == errSecSuccess);
|
||||
#endif
|
||||
}
|
||||
|
||||
- (NSData *)dataForKey:(NSString *)key
|
||||
@@ -123,6 +130,10 @@
|
||||
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]];
|
||||
@@ -141,6 +152,7 @@
|
||||
CFRelease(data);
|
||||
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *)queryForKey:(NSString *)key
|
||||
|
||||
+8
-9
@@ -22,8 +22,8 @@
|
||||
|
||||
#import "../FBSDKMath.h"
|
||||
|
||||
/*!
|
||||
@abstract Insets a CGSize with the insets in a UIEdgeInsets.
|
||||
/**
|
||||
Insets a CGSize with the insets in a UIEdgeInsets.
|
||||
*/
|
||||
FBSDK_STATIC_INLINE CGSize FBSDKEdgeInsetsInsetSize(CGSize size, UIEdgeInsets insets)
|
||||
{
|
||||
@@ -32,21 +32,20 @@ FBSDK_STATIC_INLINE CGSize FBSDKEdgeInsetsInsetSize(CGSize size, UIEdgeInsets in
|
||||
return UIEdgeInsetsInsetRect(rect, insets).size;
|
||||
}
|
||||
|
||||
/*!
|
||||
@abstract Outsets a CGSize with the insets in a UIEdgeInsets.
|
||||
/**
|
||||
Outsets a CGSize with the insets in a UIEdgeInsets.
|
||||
*/
|
||||
FBSDK_STATIC_INLINE CGSize FBSDKEdgeInsetsOutsetSize(CGSize size, UIEdgeInsets insets)
|
||||
{
|
||||
CGRect rect = CGRectZero;
|
||||
rect.size = size;
|
||||
return CGSizeMake(insets.left + size.width + insets.right,
|
||||
insets.top + size.height + insets.bottom);
|
||||
}
|
||||
|
||||
/*!
|
||||
@abstract Limits a CGFloat value, using the scale to limit to pixels (instead of points).
|
||||
/**
|
||||
Limits a CGFloat value, using the scale to limit to pixels (instead of points).
|
||||
|
||||
@discussion The limitFunction is frequention floorf, ceilf or roundf. If the scale is 2.0,
|
||||
|
||||
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);
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
delegate:(id<FBSDKWebDialogDelegate>)delegate;
|
||||
|
||||
@property (nonatomic, assign) BOOL deferVisibility;
|
||||
@property (nonatomic, assign) id<FBSDKWebDialogDelegate> delegate;
|
||||
@property (nonatomic, weak) id<FBSDKWebDialogDelegate> delegate;
|
||||
@property (nonatomic, copy) NSString *name;
|
||||
@property (nonatomic, copy) NSDictionary *parameters;
|
||||
|
||||
|
||||
Generated
+1
-1
@@ -22,7 +22,7 @@
|
||||
|
||||
@interface FBSDKWebDialogView : UIView
|
||||
|
||||
@property (nonatomic, assign) id<FBSDKWebDialogViewDelegate> delegate;
|
||||
@property (nonatomic, weak) id<FBSDKWebDialogViewDelegate> delegate;
|
||||
|
||||
- (void)loadURL:(NSURL *)URL;
|
||||
- (void)stopLoading;
|
||||
|
||||
Generated
+118
-112
@@ -20,6 +20,7 @@
|
||||
|
||||
#import <dlfcn.h>
|
||||
|
||||
#import <MobileCoreServices/MobileCoreServices.h>
|
||||
#import <Security/Security.h>
|
||||
#import <StoreKit/StoreKit.h>
|
||||
|
||||
@@ -27,7 +28,6 @@
|
||||
#import "FBSDKSettings.h"
|
||||
|
||||
static NSString *const g_frameworkPathTemplate = @"/System/Library/Frameworks/%@.framework/%@";
|
||||
static NSString *const g_sqlitePath = @"/usr/lib/libsqlite3.dylib";
|
||||
|
||||
#pragma mark - Library and Symbol Loading
|
||||
|
||||
@@ -234,117 +234,6 @@ OSStatus fbsdkdfl_SecItemDelete(CFDictionaryRef query)
|
||||
return f(query);
|
||||
}
|
||||
|
||||
#pragma mark - sqlite3 APIs
|
||||
|
||||
// sqlite3 is a dynamic library (not a framework) so its path is constructed differently
|
||||
// than the way employed by the framework macros.
|
||||
static void fbsdkdfl_load_sqlite3_once(void *context)
|
||||
{
|
||||
*(void **)context = fbsdkdfl_load_library_once([g_sqlitePath fileSystemRepresentation]);
|
||||
}
|
||||
_fbsdkdfl_handle_get_impl_(sqlite3)
|
||||
|
||||
#define _fbsdkdfl_sqlite3_get_f(SYMBOL) _fbsdkdfl_symbol_get_f(sqlite3, SYMBOL)
|
||||
|
||||
typedef SQLITE_API const char *(*sqlite3_errmsg_type)(sqlite3 *);
|
||||
typedef SQLITE_API int (*sqlite3_prepare_v2_type)(sqlite3 *, const char *, int, sqlite3_stmt **, const char **);
|
||||
typedef SQLITE_API int (*sqlite3_reset_type)(sqlite3_stmt *);
|
||||
typedef SQLITE_API int (*sqlite3_finalize_type)(sqlite3_stmt *);
|
||||
typedef SQLITE_API int (*sqlite3_open_v2_type)(const char *, sqlite3 **, int, const char *);
|
||||
typedef SQLITE_API int (*sqlite3_exec_type)(sqlite3 *, const char *, int (*)(void *, int, char **, char **), void *, char **);
|
||||
typedef SQLITE_API int (*sqlite3_close_type)(sqlite3 *);
|
||||
typedef SQLITE_API int (*sqlite3_bind_double_type)(sqlite3_stmt *, int, double);
|
||||
typedef SQLITE_API int (*sqlite3_bind_int_type)(sqlite3_stmt *, int, int);
|
||||
typedef SQLITE_API int (*sqlite3_bind_text_type)(sqlite3_stmt *, int, const char *, int, void(*)(void *));
|
||||
typedef SQLITE_API int (*sqlite3_step_type)(sqlite3_stmt *);
|
||||
typedef SQLITE_API double (*sqlite3_column_double_type)(sqlite3_stmt *, int);
|
||||
typedef SQLITE_API int (*sqlite3_column_int_type)(sqlite3_stmt *, int);
|
||||
typedef SQLITE_API const unsigned char *(*sqlite3_column_text_type)(sqlite3_stmt *, int);
|
||||
|
||||
SQLITE_API const char *fbsdkdfl_sqlite3_errmsg(sqlite3 *db)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_errmsg);
|
||||
return f(db);
|
||||
}
|
||||
|
||||
SQLITE_API int fbsdkdfl_sqlite3_prepare_v2(sqlite3 *db, const char *zSql, int nByte, sqlite3_stmt **ppStmt, const char **pzTail)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_prepare_v2);
|
||||
return f(db, zSql, nByte, ppStmt, pzTail);
|
||||
}
|
||||
|
||||
SQLITE_API int fbsdkdfl_sqlite3_reset(sqlite3_stmt *pStmt)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_reset);
|
||||
return f(pStmt);
|
||||
}
|
||||
|
||||
SQLITE_API int fbsdkdfl_sqlite3_finalize(sqlite3_stmt *pStmt)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_finalize);
|
||||
return f(pStmt);
|
||||
}
|
||||
|
||||
SQLITE_API int fbsdkdfl_sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_open_v2);
|
||||
return f(filename, ppDb, flags, zVfs);
|
||||
}
|
||||
|
||||
SQLITE_API int fbsdkdfl_sqlite3_exec(sqlite3 *db, const char *sql, int (*callback)(void *, int, char **, char **), void *arg, char **errmsg)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_exec);
|
||||
return f(db, sql, callback, arg, errmsg);
|
||||
}
|
||||
|
||||
SQLITE_API int fbsdkdfl_sqlite3_close(sqlite3 *db)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_close);
|
||||
return f(db);
|
||||
}
|
||||
|
||||
SQLITE_API int fbsdkdfl_sqlite3_bind_double(sqlite3_stmt *stmt, int index , double value)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_bind_double);
|
||||
return f(stmt, index, value);
|
||||
}
|
||||
|
||||
SQLITE_API int fbsdkdfl_sqlite3_bind_int(sqlite3_stmt *stmt, int index, int value)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_bind_int);
|
||||
return f(stmt, index, value);
|
||||
}
|
||||
|
||||
SQLITE_API int fbsdkdfl_sqlite3_bind_text(sqlite3_stmt *stmt, int index, const char *value, int n, void(*callback)(void *))
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_bind_text);
|
||||
return f(stmt, index, value, n, callback);
|
||||
}
|
||||
|
||||
SQLITE_API int fbsdkdfl_sqlite3_step(sqlite3_stmt *stmt)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_step);
|
||||
return f(stmt);
|
||||
}
|
||||
|
||||
SQLITE_API double fbsdkdfl_sqlite3_column_double(sqlite3_stmt *stmt, int iCol)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_column_double);
|
||||
return f(stmt, iCol);
|
||||
}
|
||||
|
||||
SQLITE_API int fbsdkdfl_sqlite3_column_int(sqlite3_stmt *stmt, int iCol)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_column_int);
|
||||
return f(stmt, iCol);
|
||||
}
|
||||
|
||||
SQLITE_API const unsigned char *fbsdkdfl_sqlite3_column_text(sqlite3_stmt *stmt, int iCol)
|
||||
{
|
||||
_fbsdkdfl_sqlite3_get_f(sqlite3_column_text);
|
||||
return f(stmt, iCol);
|
||||
}
|
||||
|
||||
#pragma mark - Social Constants
|
||||
|
||||
_fbsdkdfl_load_framework_once_impl_(Social)
|
||||
@@ -357,6 +246,11 @@ 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)
|
||||
@@ -367,6 +261,25 @@ Class fbsdkdfl_SLComposeViewControllerClass(void)
|
||||
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)
|
||||
@@ -553,3 +466,96 @@ 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);
|
||||
}
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* The format string for device login instructions */
|
||||
"DeviceLogin.LogInPrompt" = "Besoek %@ op jou slimfoon of rekenaar en voer hierdie kode in:";
|
||||
|
||||
/* 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.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" = "Nuut! Jy is in beheer - kies waater 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";
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* 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" = "يرجى تسجيل الدخول إلى هذا التطبيق مرة أخرى لإعادة الاتصال بحساب فيسبوك.";
|
||||
|
||||
/* 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.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" = "مشاركة";
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* 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.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" = "ভাগ করুন";
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* The format string for device login instructions */
|
||||
"DeviceLogin.LogInPrompt" = "Přejděte ze smartphonu nebo počítače na %@ a zadejte tento kód:";
|
||||
|
||||
/* 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.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" = "Novinka! 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";
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* The format string for device login instructions */
|
||||
"DeviceLogin.LogInPrompt" = "Gå til %@ på din smartphone eller computer, og indtast denne kode:";
|
||||
|
||||
/* 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.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" = "Nyhed! 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";
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* The format string for device login instructions */
|
||||
"DeviceLogin.LogInPrompt" = "Gehe über dein Smartphone oder deinen Computer zu %@ und gib diesen Code ein:";
|
||||
|
||||
/* 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.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" = "Neu! 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";
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* The format string for device login instructions */
|
||||
"DeviceLogin.LogInPrompt" = "Επισκεφτείτε τον ιστότοπο %@ από το smartphone ή τον υπολογιστή σας και πληκτρολογήστε αυτόν τον κωδικό:";
|
||||
|
||||
/* 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.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" = "Κοινοποίηση";
|
||||
Generated
BIN
Binary file not shown.
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* The format string for device login instructions */
|
||||
"DeviceLogin.LogInPrompt" = "Visit %@ on your smartphone or computer and enter this code:";
|
||||
|
||||
/* 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.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" = "New! You're in control – choose what info 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";
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* The format string for device login instructions */
|
||||
"DeviceLogin.LogInPrompt" = "Visita %@ en tu smartphone o computadora e ingresa este código:";
|
||||
|
||||
/* 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.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" = "¡Nuevo! Tú tienes el control: 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";
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* The format string for device login instructions */
|
||||
"DeviceLogin.LogInPrompt" = "Visita %@ en tu smartphone u ordenador e introduce este código:";
|
||||
|
||||
/* 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.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" = "Novedad: Tú eres quien controla y 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";
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* The format string for device login instructions */
|
||||
"DeviceLogin.LogInPrompt" = "Siirry osoitteeseen %@ älypuhelimella tai tietokoneella ja anna seuraava koodi:";
|
||||
|
||||
/* 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.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" = "Uutta! Sinä päätät – valitse, mitä haluat jakaa sovellusten kanssa.";
|
||||
|
||||
/* 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";
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* The format string for device login instructions */
|
||||
"DeviceLogin.LogInPrompt" = "Puntahan ang %@ sa iyong smartphone o computer at ilagay ang code na ito:";
|
||||
|
||||
/* 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.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" = "Bago! 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";
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* The format string for device login instructions */
|
||||
"DeviceLogin.LogInPrompt" = "Rendez-vous sur %@ sur votre smartphone ou votre ordinateur et entrez ce code :";
|
||||
|
||||
/* 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.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" = "Nouveau ! 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";
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
/* 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" = "તમારા ફેસબુક ખાતાને ફરીથી કનેક્ટ કરવા માટે કૃપા કરીને આ એપ્લિકેશનમાં ફરી લૉગ ઇન કરો.";
|
||||
|
||||
/* 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.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" = "શેર કરો";
|
||||
Loaded 100 of 664 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user