** sdk有哪些功能
蜡笔没有小新
2024-06-28 08:09:51
最佳回答
1去**开发者网页,my app -> add new app2 选择**:ios3创建新app id4输入bundle id,必须与xcode中ios项目的bundle id一致5注意此时app还不能使用,必须在status & review中允许才行end使用xcode创建项目创建一个新项目 **demo,选swift,然后关闭xcode在xcode项目文件的目录下,创建一个podfile,加入:pod 'fbsdkcorekit'pod 'fbsdkloginkit'pod 'fbsdksharekit'命令行运行: pod install打开 **demo.xcworkspace创建一个头文件:fb_objectivec_bridging.h,加入:#import <fbsdkcorekit/fbsdkcorekit.h>#import <fbsdkloginkit/fbsdkloginkit.h>#import <fbsdksharekit/fbsdksharekit.h>将此.h加入xcode中设置.pl**t文件,加入**appid 和 **d**playname(注意图中的**id应为**appid)appdelegate.swift中的代码:func application(application: uiapplication, didfin**hlaunchingwithoptions launchoptions: [nsobject: anyobject]?) -> bool { // override point for customization after application launch. return fbsdkapplicationdelegate.sharedinstance().application(application, didfin**hlaunchingwithoptions: launchoptions) } func application(application: uiapplication, openurl url: nsurl, sourceapplication: string?, annotation: anyobject?) -> bool { return fbsdkapplicationdelegate.sharedinstance().application( application, openurl: url, sourceapplication: sourceapplication, annotation: annotation) } func applicationdidbecomeactive(application: uiapplication) { // restart any tasks that were paused (or not yet started) while the application was inactive. if the application was previously in the background, optionally refresh the user interface. fbsdkappevents.activateapp() } 20210311