在我的iphone应用程序中,我正在尝试从Twitter获取推文。
我从以下链接获得了一个编码示例:
https://github.com/mattgemmell/MGTwitterEngine
但是当我实施这个例子时,我收到了以下警告:
Ld build/Debug-iphonesimulator/XAuthTwitterEngineDemo.app/XAuthTwitterEngineDemo normal i386
cd "/Volumes/MacShare/ANKIT BACKUP/aral-XAuthTwitterEngine-8713a93/aral-XAuthTwitterEngine-8713a93/XAuthTwitterEngineDemo"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk "-L/Volumes/MacShare/ANKIT BACKUP/aral-XAuthTwitterEngine-8713a93/aral-XAuthTwitterEngine-8713a93/XAuthTwitterEngineDemo/build/Debug-iphonesimulator" "-L/Volumes/MacShare/ANKIT BACKUP/aral-XAuthTwitterEngine-8713a93/aral-XAuthTwitterEngine-8713a93/XAuthTwitterEngineDemo/Libraries & Headers/OAuthConsumer" "-L/Volumes/MacShare/ANKIT BACKUP/aral-XAuthTwitterEngine-8713a93/aral-XAuthTwitterEngine-8713a93/XAuthTwitterEngineDemo" "-F/Volumes/MacShare/ANKIT BACKUP/aral-XAuthTwitterEngine-8713a93/aral-XAuthTwitterEngine-8713a93/XAuthTwitterEngineDemo/build/Debug-iphonesimulator" -filelist "/Volumes/MacShare/ANKIT BACKUP/aral-XAuthTwitterEngine-8713a93/aral-XAuthTwitterEngine-8713a93/XAuthTwitterEngineDemo/build/XAuthTwitterEngineDemo.build/Debug-iphonesimulator/XAuthTwitterEngineDemo.build/Objects-normal/i386/XAuthTwitterEngineDemo.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -lOAuth -lsqlite3 -lxml2 -o "/Volumes/MacShare/ANKIT BACKUP/aral-XAuthTwitterEngine-8713a93/aral-XAuthTwitterEngine-8713a93/XAuthTwitterEngineDemo/build/Debug-iphonesimulator/XAuthTwitterEngineDemo.app/XAuthTwitterEngineDemo"
ld: in /Volumes/MacShare/ANKIT BACKUP/aral-XAuthTwitterEngine-8713a93/aral-XAuthTwitterEngine-8713a93/XAuthTwitterEngineDemo/libxml2.dylib, file too small
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
可以做些什么?
答案 0 :(得分:0)
您可以从此url获取推文,然后返回xml
,您可以从中解析推文。
答案 1 :(得分:0)
您遇到的问题是MGTwitterEngine项目是针对Cocoa的,因此它链接的框架和库是仅限MacOS的二进制文件。具体来说,它们是:libxml2和AppKit。
为了将其移植到iOS,您应该创建一个新的iOS项目,导入所有源代码,并链接到UIKit(这应该已经没问题)和iOS版本的libxml2(你可以找到它) “添加现有框架”)....