我正在参考来自phonegap的官方FBConnect插件: https://github.com/phonegap-build/FacebookConnect
使用iphone而不是x64(我假设为32位)时,一切正常。
但是当在64位架构上启动应用程序时,这个插件似乎会带来麻烦。这就是我所拥有的:
ld: warning: directory not found for option '-L/Users/YohannM/Documents/phonegap-facebook-plugin-master/src/ios/frameworks'
ld: warning: ignoring file /Users/YohannM/Library/Developer/Xcode/DerivedData/MeetMyFriends-bpzkrmogtgawjxbckzcgadbbsksi/Build/Products/Debug-iphonesimulator/libCordova.a, file was built for archive which is not the architecture being linked (x86_64): /Users/YohannM/Library/Developer/Xcode/DerivedData/MeetMyFriends-bpzkrmogtgawjxbckzcgadbbsksi/Build/Products/Debug-iphonesimulator/libCordova.a
Undefined symbols for architecture x86_64:
"_CDVLocalNotification", referenced from:
-[AppDelegate application:didReceiveLocalNotification:] in AppDelegate.o
"_CDVPluginHandleOpenURLNotification", referenced from:
-[AppDelegate application:handleOpenURL:] in AppDelegate.o
"_OBJC_CLASS_$_CDVCommandDelegateImpl", referenced from:
_OBJC_CLASS_$_MainCommandDelegate in MainViewController.o
"_OBJC_CLASS_$_CDVCommandQueue", referenced from:
_OBJC_CLASS_$_MainCommandQueue in MainViewController.o
"_OBJC_CLASS_$_CDVPlugin", referenced from:
_OBJC_CLASS_$_FacebookConnectPlugin in FacebookConnectPlugin.o
_OBJC_CLASS_$_CDVDevice in CDVDevice.o
_OBJC_CLASS_$_CDVLocation in CDVLocation.o
"_OBJC_CLASS_$_CDVPluginResult", referenced from:
objc-class-ref in FacebookConnectPlugin.o
objc-class-ref in CDVDevice.o
objc-class-ref in CDVLocation.o
"_OBJC_CLASS_$_CDVViewController", referenced from:
_OBJC_CLASS_$_MainViewController in MainViewController.o
objc-class-ref in CDVDevice.o
"_OBJC_METACLASS_$_CDVCommandDelegateImpl", referenced from:
_OBJC_METACLASS_$_MainCommandDelegate in MainViewController.o
"_OBJC_METACLASS_$_CDVCommandQueue", referenced from:
_OBJC_METACLASS_$_MainCommandQueue in MainViewController.o
"_OBJC_METACLASS_$_CDVPlugin", referenced from:
_OBJC_METACLASS_$_FacebookConnectPlugin in FacebookConnectPlugin.o
_OBJC_METACLASS_$_CDVDevice in CDVDevice.o
_OBJC_METACLASS_$_CDVLocation in CDVLocation.o
"_OBJC_METACLASS_$_CDVViewController", referenced from:
_OBJC_METACLASS_$_MainViewController in MainViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
当然,我已经按照说明一步一步地(我认为)它之前工作正常(我必须更新XCode。 谁能帮我这个 ?我应该怎么做才能让我的iphone 64位工作?
由于
答案 0 :(得分:0)
我实际上在另一个帖子上找到了解决方案,那里有一个非常完整的解决方案,但是对我来说效果最好的那个并不在这个帖子中。这非常简单:
他们刚刚发布了解决此问题的新版本3.4.1。
因此,我更新单个文件以指向TAG 3.4.1:
/usr/local/lib/node_modules/cordova/platforms.js
第24行
从:
version: '3.4.0'
为:
version: '3.4.1'
然后删除项目中的iOS文件夹并运行:
cordova platform add ios
这将根据3.4.1下载包含所有补丁的新模板。
谢谢你@Fabrizio Giordano指出