简体   繁体   中英

Twitter integration in iOS app

In my ios app I'm trying to integrate twitter with fabric and i followed all the docs provided by fabric https://docs.fabric.io/ios I have a problem when i build my app then some error

1.TwitterCore.framework/Headers/TwitterCore.h:20:9: 'Cocoa/Cocoa.h' file not found

2.TwitterKit.framework/Headers/TwitterKit.h:12:9: Could not build module 'TwitterCore'

3.AppDelegate.m:14:9: Could not build module 'TwitterKit'

so i am unable to build app.

I had the exact same issue, the Cocoa/Cocoa.h header is for OS X, since we are doing iOS, I removed this header. Open your TwitterCore.h

This snippet

#if IS_UIKIT_AVAILABLE
#import <UIKit/UIKit.h>
#else
#import <Cocoa/Cocoa.h>
#endif

Becomes

#if IS_UIKIT_AVAILABLE
#import <UIKit/UIKit.h>
#endif

And now my project builds just fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM