Twitter integration in iOS app

眉间皱痕 提交于 2020-01-17 03:17:08

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/34556349/twitter-integration-in-ios-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!