Closed dev-intellisoft closed 5 years ago
My AppDelegate.m
is like that
/**
@implementation AppDelegate
(BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions {
RCTBridge bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; RCTRootView rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"ReactLogin" initialProperties:nil];
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; UIViewController *rootViewController = [UIViewController new]; rootViewController.view = rootView; self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible]; return YES; }
(NSURL )sourceURLForBridge:(RCTBridge )bridge {
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
}
(BOOL)application:(UIApplication )application openURL:(NSURL )url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [[FBSDKApplicationDelegate sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation]; }
(BOOL)application:(UIApplication )application openURL:(NSURL )url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:options[UIApplicationOpenURLOptionsAnnotationKey]
];
// Add any custom logic here.
return handled;
}
@end
My package.json is like this
{ "name": "ReactLogin", "version": "0.0.1", "private": true, "scripts": { "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "react": "16.8.6", "react-native": "0.60.4", "react-native-fbsdk": "^0.10.1" }, "devDependencies": { "@babel/core": "^7.5.5", "@babel/runtime": "^7.5.5", "@react-native-community/eslint-config": "^0.0.5", "babel-jest": "^24.8.0", "eslint": "^6.1.0", "jest": "^24.8.0", "metro-react-native-babel-preset": "^0.55.0", "react-test-renderer": "16.8.6" }, "jest": { "preset": "react-native" } }
You have to download the latest facebook sdk because this SDK is not working and will run into errors
this solution solved my problem
You have a type as well, it's
LogInWithPermissions
Note the capital I
for In
@rohanrana which file did you download. I tried the source folder but the contents does reveal framework files
You have a type as well, it's
LogInWithPermissions
Note the capital
I
forIn
Yeah I wrote "logInWithPermission" and the error persists. I just mistype on I wrote here.
@smooJitter just see the image you have to download this zip file
@smooJitter just see the image you have to download this zip file
Hi @smooJitter I Just follow you for this solution, but there is still error
@babaiyu I just make it work it`s pretty simple. dont need do add nothings
1 - after you run the command "react-native init [your project]"
2 - add on your package.json { ... "react": "16.8.6", "react-native": "0.60.4", "react-native-fbsdk": "git+https://github.com/facebook/react-native-fbsdk.git", ... }
3 - on you Podfile pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
4 - after yarn or npm your project go to ios folder pod install
and that is it!
Hello everybody I am going to close this issue I think a gave a lot precious tips can solve problems.
🐛 Bug Report
To Reproduce
Expected Behavior
Code Example
Environment