Comments (6)
I see, so the SceneDelegate setup is only necessary if I already have a SceneDelegate for other purposes.
Thanks @iduuck
from react-native-fbsdk-next.
@thebergamo I made a "needs more info" label and applied it, I use a label like that in all the repos I collaborate on so when I have a time box available and I do an issue sweep I don't waste time clicking on something that's just waiting for someone else anyway - the seconds add up :-)
from react-native-fbsdk-next.
"follow the steps" - do those include pod install? The Xcode project is not wired up until pod install has been executed
https://developers.facebook.com/docs/ios/use-cocoapods - is the page for cocoapods (which react-native uses for iOS)
Then when you opened it in Xcode are you sure you opened the .xcworkspace, instead of the .xcproject?
from react-native-fbsdk-next.
that's great! Thanks @mikehardy I was thinking about it as well!
from react-native-fbsdk-next.
"follow the steps" - do those include pod install?
Yep.
Then when you opened it in Xcode are you sure you opened the .xcworkspace, instead of the .xcproject?
Yep.
https://developers.facebook.com/docs/ios/use-cocoapods - is the page for cocoapods (which react-native uses for iOS)
The project's README links to the wrong page then!
I have created a repo with a minimum reproducible example (following the cocoapods instructions):
I hope this helps 😊
from react-native-fbsdk-next.
You don't need to force a SceneDelegate to be there at all. It is enough, if you are relying on the AppDelegate
which is generated by react-native on bootstrapping.
Steps to fix this issue:
- Use the
FBSDKCoreKit
import instead ofFacebookCore
Steps to fix the demo project:
- Follow steps above.
- Import the
RCTLinkingManager
in yourAppDelegate
- Add a Bridging Header to your project (https://stackoverflow.com/a/54586937/2462992)
Here is the diff (i obfuscated the team id):
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index e68fa5e..d301507 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -483,7 +483,7 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
FBLazyVector: 49cbe4b43e445b06bf29199b6ad2057649e4c8f5
- FBReactNativeSpec: 7cfe263944c611c9295c21a86bbba5d49e711c83
+ FBReactNativeSpec: dcc3fc24a6b6b38c698caf0e1f2b2f6dbf345a99
FBSDKCoreKit: fada1a6a0076724678993ff05a633848765ff18c
FBSDKLoginKit: d5ffe6d808897019ccf16feb6f0a7ab260bc5cd6
FBSDKShareKit: 6a85acb92eaf43a0b6dfa2ba6106eb74c7f10d30
diff --git a/ios/fbsdkbugrepo.xcodeproj/project.pbxproj b/ios/fbsdkbugrepo.xcodeproj/project.pbxproj
index c13f844..e344471 100644
--- a/ios/fbsdkbugrepo.xcodeproj/project.pbxproj
+++ b/ios/fbsdkbugrepo.xcodeproj/project.pbxproj
@@ -8,11 +8,11 @@
/* Begin PBXBuildFile section */
00E356F31AD99517003FC87E /* fbsdkbugrepoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* fbsdkbugrepoTests.m */; };
+ 01258C8126287B0400DF0FC8 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01258C8026287B0400DF0FC8 /* File.swift */; };
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
2A6F6E84B33D6CEBD786577E /* libPods-fbsdkbugrepo-fbsdkbugrepoTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E52165A5C3C9732A72130C50 /* libPods-fbsdkbugrepo-fbsdkbugrepoTests.a */; };
- 2AF02A90262029A900BA8794 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2AF02A8F262029A900BA8794 /* SceneDelegate.m */; };
6E3011BC5E7E8E558D42F93A /* libPods-fbsdkbugrepo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 715838605DA65C4012C7B7CE /* libPods-fbsdkbugrepo.a */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
@@ -31,6 +31,8 @@
00E356EE1AD99517003FC87E /* fbsdkbugrepoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = fbsdkbugrepoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* fbsdkbugrepoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = fbsdkbugrepoTests.m; sourceTree = "<group>"; };
+ 01258C7F26287B0300DF0FC8 /* fbsdkbugrepo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "fbsdkbugrepo-Bridging-Header.h"; sourceTree = "<group>"; };
+ 01258C8026287B0400DF0FC8 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* fbsdkbugrepo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = fbsdkbugrepo.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = fbsdkbugrepo/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = fbsdkbugrepo/AppDelegate.m; sourceTree = "<group>"; };
@@ -39,7 +41,6 @@
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = fbsdkbugrepo/main.m; sourceTree = "<group>"; };
1FC1EC9617DA384228A2FF02 /* Pods-fbsdkbugrepo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fbsdkbugrepo.debug.xcconfig"; path = "Target Support Files/Pods-fbsdkbugrepo/Pods-fbsdkbugrepo.debug.xcconfig"; sourceTree = "<group>"; };
2A2C344643072F85FFD86B3E /* Pods-fbsdkbugrepo-fbsdkbugrepoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fbsdkbugrepo-fbsdkbugrepoTests.release.xcconfig"; path = "Target Support Files/Pods-fbsdkbugrepo-fbsdkbugrepoTests/Pods-fbsdkbugrepo-fbsdkbugrepoTests.release.xcconfig"; sourceTree = "<group>"; };
- 2AF02A8F262029A900BA8794 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SceneDelegate.m; path = fbsdkbugrepo/SceneDelegate.m; sourceTree = "<group>"; };
53B6CCF7D79323727926DF83 /* Pods-fbsdkbugrepo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fbsdkbugrepo.release.xcconfig"; path = "Target Support Files/Pods-fbsdkbugrepo/Pods-fbsdkbugrepo.release.xcconfig"; sourceTree = "<group>"; };
715838605DA65C4012C7B7CE /* libPods-fbsdkbugrepo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-fbsdkbugrepo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = fbsdkbugrepo/LaunchScreen.storyboard; sourceTree = "<group>"; };
@@ -94,7 +95,8 @@
13B07FB61A68108700A75B9A /* Info.plist */,
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
13B07FB71A68108700A75B9A /* main.m */,
- 2AF02A8F262029A900BA8794 /* SceneDelegate.m */,
+ 01258C8026287B0400DF0FC8 /* File.swift */,
+ 01258C7F26287B0300DF0FC8 /* fbsdkbugrepo-Bridging-Header.h */,
);
name = fbsdkbugrepo;
sourceTree = "<group>";
@@ -107,7 +109,6 @@
CECDF729C982A13C89D2631F /* Pods-fbsdkbugrepo-fbsdkbugrepoTests.debug.xcconfig */,
2A2C344643072F85FFD86B3E /* Pods-fbsdkbugrepo-fbsdkbugrepoTests.release.xcconfig */,
);
- name = Pods;
path = Pods;
sourceTree = "<group>";
};
@@ -211,7 +212,7 @@
TestTargetID = 13B07F861A680F5B00A75B9A;
};
13B07F861A680F5B00A75B9A = {
- LastSwiftMigration = 1120;
+ LastSwiftMigration = 1240;
};
};
};
@@ -415,7 +416,7 @@
buildActionMask = 2147483647;
files = (
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
- 2AF02A90262029A900BA8794 /* SceneDelegate.m in Sources */,
+ 01258C8126287B0400DF0FC8 /* File.swift in Sources */,
13B07FC11A68108700A75B9A /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -435,6 +436,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = CECDF729C982A13C89D2631F /* Pods-fbsdkbugrepo-fbsdkbugrepoTests.debug.xcconfig */;
buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@@ -462,6 +464,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 2A2C344643072F85FFD86B3E /* Pods-fbsdkbugrepo-fbsdkbugrepoTests.release.xcconfig */;
buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
COPY_PHASE_STRIP = NO;
INFOPLIST_FILE = fbsdkbugrepoTests/Info.plist;
@@ -489,6 +492,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
+ DEVELOPMENT_TEAM = XXX;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = fbsdkbugrepo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@@ -502,6 +506,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = fbsdkbugrepo;
+ SWIFT_OBJC_BRIDGING_HEADER = "fbsdkbugrepo-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
@@ -515,6 +520,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
+ DEVELOPMENT_TEAM = XXX;
INFOPLIST_FILE = fbsdkbugrepo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -527,6 +533,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = fbsdkbugrepo;
+ SWIFT_OBJC_BRIDGING_HEADER = "fbsdkbugrepo-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
diff --git a/ios/fbsdkbugrepo/AppDelegate.m b/ios/fbsdkbugrepo/AppDelegate.m
index 6f43324..ddf73ec 100644
--- a/ios/fbsdkbugrepo/AppDelegate.m
+++ b/ios/fbsdkbugrepo/AppDelegate.m
@@ -3,6 +3,7 @@
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
+#import <React/RCTLinkingManager.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#ifdef FB_SONARKIT_ENABLED
from react-native-fbsdk-next.
Related Issues (20)
- [Expo] How to initialize SDK only on specific build? HOT 1
- share link url can't show preview link HOT 1
- `Could not resolve com.facebook.android:facebook-android-sdk:16.+.` due to Bad Gateway for https://oss.sonatype.org HOT 2
- IOS build failed with FBSDKCoreKit/FBSDKCoreKit.modulemap not found HOT 1
- Build error: Showing Recent Messages Error [ERR_REQUIRE_ESM]: require() of ES Module... HOT 2
- support version 17 of facebook sdk with privacy manifests HOT 14
- Will this lib be updated to meet Apple's new third party sdk privacy manifest requirement? HOT 2
- Can't change to another account on login HOT 3
- iOS limited login HOT 14
- Email not retrieving from facebook login HOT 3
- Need help for the facebook sharing HOT 1
- Facebook SDK not initialized error when using react-native-fbsdk-next with Expo HOT 7
- FbLoginManager.loginwithPermissions was called with 1 arguments butt expects 3 arguments HOT 2
- LoginManager.logOut() doesn't remove app from Facebook "Business Integrations" HOT 1
- App switches automatically to limited login when updated to v13 HOT 4
- Access Token is invalid HOT 6
- React native app - Upgrade fbsdk to version 9.0.0 HOT 1
- Mobile product ads aka Advantage+ Catalog Ads not receiving params HOT 2
- Upgrading to v13.0.0 , build failed for android HOT 6
- iOS limited login does not return all possible fields HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-fbsdk-next.