作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我对 xcode 环境非常陌生,我已经通过 link 中所示的完全相同的步骤集成了 Facebook SDK。 .生成App id,更改Info.plist文件,初始化pod文件,将pod'FBSDKCoreKit'和pod'FBSDKLoginKit'添加到pod文件中,pod安装。
但是在构建项目时设置所有内容后,出现了 6 个问题,所有问题都与 Pods>FBSDKCoreKit>FBSDKPaymentObserver.m>-logTransactionEvent:
Podfile 代码:-
# 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代码:
/**
* 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 版本为 4.35.0。
我做错了什么吗?
最佳答案
我和你有同样的错误,我尝试注释这些错误代码行并构建成功,我想如果你不需要支付 FBSDK 你可以尝试一下,希望它对你有帮助。
关于ios - 在 FBSDKCoreKit 中的“SKProd”类型的对象上找不到属性 'subscriptionPeriod',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51743965/
我对 xcode 环境非常陌生,我已经通过 link 中所示的完全相同的步骤集成了 Facebook SDK。 .生成App id,更改Info.plist文件,初始化pod文件,将pod'FBSDK
我是一名优秀的程序员,十分优秀!