Reputation: 2009
I am very new to xcode environment, I have integrate the Facebook SDK by exactly same steps shown in link. Generate App id, made changes to Info.plist file, init pod file, adding pod 'FBSDKCoreKit' and pod 'FBSDKLoginKit' into the pod file , pod install.
But after setting all things when i build the project, got 6 issue , all are related to the Pods>FBSDKCoreKit>FBSDKPaymentObserver.m>-logTransactionEvent:
Podfile Code:-
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'E_Commerce' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for E_Commerce
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
#target 'E_Commerce-tvOSTests' do
# inherit! :search_paths
# # Pods for testing
#end
target 'E_CommerceTests' do
inherit! :search_paths
# Pods for testing
end
end
target 'E_Commerce-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for E_Commerce-tvOS
target 'E_Commerce-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
AppDelegate.m code:
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file/Users/shailendrakumar/Desktop/Ajeet Data/Projects/E_Commerce/ios/E_Commerce/AppDelegate.m in the root directory of this source tree.
*/
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import "RNGoogleSignin.h"
#import "FBSDKCoreKit.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//for facebook
[[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"E_Commerce"
initialProperties:nil
launchOptions: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;
}
// For gmail
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return
[RNGoogleSignin application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation
];
}
//for facebook
- (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]
];
return handled;
}
@end
FBSDKCoreKit version is 4.35.0.
Am i doing anything wrong?
Upvotes: 1
Views: 1726
Reputation: 31
i have same error with you and i tried comment these error code lines and build success, i think if you don't need payment of FBSDK you can try it, hope it help you.
Upvotes: 1