SwiftでTwitterKitをpod installしたところ、このエラーが表示されました。
https://dev.twitter.com/twitterkit/ios/installation
の手順に従い、Objective-CのBridge-headerファイルを作成し、
#import <TwitterKit/TwitterKit.h>
の記述をheaderファイルに記載したところ、このエラーが表示されました。
podfileには、
use_frameworks! pod 'TwitterCore' pod 'TwitterKit'
を記載し、
%pod install
%pod update
を行っています。
Cleanと、Build Cleanも行いました。
このやり方自体に違和感があるので、そもそもBridge-headerがいるかもわからないです。Bridge headerなしの場合は、別のエラーが表示されます。
普通にTwitter投稿がやりたいだけなのですが、以前はここまで複雑じゃありませんでした。
何か方法をおわかりの方は、ご教授頂けると幸いです。
補足
すみません、説明不足だったのですが、Bridge-headerなしでも、TwitterKitを入れてビルドするだけなら出来るのですが、別のエラーがでたため、ドキュメントを読んでBridge-headerを入れました。
今回やりたいことは、Twitter投稿です。
そこで、ドキュメントにそって、AppDelegate.swiftに、以下のコードを貼っています。
AppDelegate.swift
1func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 2 Twitter.sharedInstance().start(withConsumerKey:"{customor-key}", consumerSecret:"customor-secret") 3 4 return true 5 }
ViewController.swift
1func tweet() { 2 if SLComposeViewController.isAvailableForServiceType(SLServiceTypeTwitter) { 3 let composer = SLComposeViewController(forServiceType: SLServiceTypeTwitter) 4 composer.setInitialText("Hello Twitter!") 5 composer.addImage(UIImage(named: "hello")) 6 composer.addURL(URL(string: "https://dev.twitter.com")) 7 self.presentViewController(socialController, animated: true, completion: nil) 8 } 9}
これらの機能でTwitter投稿が出来るらしいですが、AppDelegate.swiftにて、
Use of unresolved identifier 'Twitter'というエラーが表示されます。こちら、解決方法が分からずに困っています。同じようなエラーに引っかかった方、おられないでしょうか?

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。