0
我正在製作應用程序,我想整合Facebook,但是這個錯誤無法繼續,附加了我的問題。集成Facebook SDK
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
// Override point for customization after application launch.
return true
}
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation:annotation) } THIS IS THE PROBLEM -- > ////Use of unresolved identifier "sourceApplication"///
}
}
您是否導入了Facebook框架? – Adolfo
@Adolfo這不是問題。問題是這個用戶複製並粘貼'FBSDKApplicationDelegate'調用到iOS 8委託中,而不理解'openURL'和URL方案的工作方式。看到我的答案。 – JAL