Open KaizenTamashi opened 4 years ago
@TamashiKaizen I'm facing the same issue, instructions are not clear enough.
same issue. I don't have appdelegate.swift in my ios project
Same issue. Web login is working but since react native project using objective c, I can't able to adopt new SceneDelegate changes. It's not working in iOS 13
this is my updated code in AppDelegate.m
You need to import
#import <FBSDKCoreKit/FBSDKCoreKit.h>
Then update openURL method
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
if ([[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
options:options]) {
return YES;
}
return [RCTLinkingManager application:application openURL:url options:options];
}
see the example app here https://github.com/facebook/react-native-fbsdk/blob/master/example/ios/RNFBSDKExample/AppDelegate.m
I had some code in my AppDelegate and due to it, It was not working
Not working code:
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
if ([RNBranch application:app openURL:url options:options]) {
// do other deep link routing for the Facebook SDK, Pinterest SDK, etc
if ([[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]) {
return YES;
}
if ([RCTLinkingManager application:app openURL:url options:options]){
return YES;
}
}
return YES;
}
Working code:
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
if ([[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]) {
return YES;
}
if ([RNBranch application:app openURL:url options:options]) {
// do other deep link routing for the Facebook SDK, Pinterest SDK, etc
if ([RCTLinkingManager application:app openURL:url options:options]){
return YES;
}
}
return YES;
}
Need Help/Question
Hi, i'm trying to connect the app delegate following the Step 3: Connect the App Delegate
I couldn't find the
AppDelegate.swift
file.Am I supposed to override the
AppDelegate.m
file with the following code?