前提・実現したいこと
ここに質問の内容を詳しく書いてください。
(例)PHP(CakePHP)で●●なシステムを作っています。
■■な機能を実装中に以下のエラーメッセージが発生しました。
発生している問題・エラーメッセージ
Use of unresolved identifier 'Twitter'
該当のソースコード
swift
1import UIKit 2import TwitterKit 3import Firebase 4 5@UIApplicationMain 6class AppDelegate: UIResponder, UIApplicationDelegate { 7 8 var window: UIWindow? 9 10 11 func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { 12 13 if Twitter.sharedInstance().application(app, open: url, options: options) { 14 return true 15 } 16 return true 17 } 18 19 20 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 21 22 FirebaseApp.configure() 23 24 Twitter.sharedInstance().start(withConsumerKey:"", cosumerSecret:"") 25 26 27 // Override point for customization after application launch. 28 return true 29 } 30 31 func applicationWillResignActive(_ application: UIApplication) { 32 // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 33 // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 34 } 35 36 func applicationDidEnterBackground(_ application: UIApplication) { 37 // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 38 // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 39 } 40 41 func applicationWillEnterForeground(_ application: UIApplication) { 42 // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 43 } 44 45 func applicationDidBecomeActive(_ application: UIApplication) { 46 // 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. 47 } 48 49 func applicationWillTerminate(_ application: UIApplication) { 50 // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 51 } 52 53 54} 55 56
試したこと
udemyのビデオの手順通りに作業した(つもり)だが、ビデオに表示されているコードと何度見比べてもエラーが2ヶ所表示されてしまう。
補足情報(FW/ツールのバージョンなど)
Xcode ver9.2
回答1件
あなたの回答
tips
プレビュー