XCode/PhoneGap - Apple Mach-O链接器错误

Fly*_*mon 3 xcode objective-c cordova

我刚完成编程我的应用程序.我试图存档应用程序以提交,但它不起作用,显示以下错误.只有当我想存档应用程序,在测试设备或模拟器上运行完美(没有错误)时,才会出现此问题.

Ld /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app/MyApp normal armv7
    cd /Users/Admin/Desktop/MyApp3
    setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos -L/Users/Admin/Desktop/MyApp3 -F/Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos -filelist /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Release-iphoneos/MyApp.build/Objects-normal/armv7/MyApp.LinkFileList -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/libCordova.a -ObjC -fobjc-link-runtime -miphoneos-version-min=6.1 -lxml2 -lxml2.2 -larchive.2 -framework CoreLocation -framework ImageIO -framework OpenAL -framework AssetsLibrary /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/libCordova.a -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework MobileCoreServices -weak_framework CoreMedia -framework CoreLocation -lCordova -o /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app/MyApp

ld: file not found: /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/libCordova.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)


(null): File not found: /Users/Admin/Library/Developer/Xcode/DerivedData/Myapp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/Myapp/InstallationBuildProductsLocation/Applications/libCordova.a

(null): Linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

过去几天我已经用Google搜索了**.我尝试了我发现的一切.我将Build Active Architecture Only设置为"YES",删除了搜索路径(它们已经为空),更改了iOS版本,设置了Validate Build Product和其他内容.

我使用终端和./create创建我的项目.

我甚至做了一个新的干净项目并在那里发布了我的源代码.每次都会出现问题(即使我尝试归档新项目而不更改源代码中的任何内容)

使用:XCode 4.6.3 PhoneGap 2.9.0

我很绝望,希望得到帮助.谢谢.

Fly*_*mon 8

我找到了解决方案/解决方案.(无法发布,因为如果10Rep.限制,则必须等待8小时)

  • 在Tar​​get的Build Settings中,找到"Other Linker Flags"
  • 更改$(TARGET_BUILD_DIR)/libCordova.a
  • 至$(BUILT_PRODUCTS_DIR)/libCordova.a

或者只是去Cordova网站下载Cordova 3.0.0 (虽然旧的已知"splashscreen - white flash"又回来了)

随着Cordova 3.0这个问题得到解决 :)存档工作正常.