使用 phonegap v 2.9 为 Xcode 4.6 版本构建存档失败 [英] Building an archive for Xcode 4.6 release with phonegap v 2.9 fails

查看:22
本文介绍了使用 phonegap v 2.9 为 Xcode 4.6 版本构建存档失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是一个反复出现的现象.

This appears to be a recurring phenomena.

我看到了一些之前的问题,解决方案是删除armv6,然后存档就可以工作了.当然,armv6 没有了.

I saw a number of prior questions, where the solution was to delete armv6, and then the archive would work. Of course, armv6 is gone.

所以,现在,使用当前的 Xcode 4.6.3 phonegap 2.9 构建.是的,该应用在 iphone、ipad 和模拟器上运行良好.

So, now, building with both current, Xcode 4.6.3 phonegap 2.9. And yes, the app works fine on iphones, ipads, and in the simulator.

我在创建存档步骤结束时收到此消息:

I get this message at the end of the create archive step:

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/peeq/Library/Developer/Xcode/DerivedData/peeq-gylybvwifdxjmtajtbvdsdpjcvkl/Build/Intermediates/ArchiveIntermediates/peeq/BuildProductsPath/Release-iphoneos -F/Users/peeq/Library/Developer/Xcode/DerivedData/peeq-gylybvwifdxjmtajtbvdsdpjcvkl/Build/Intermediates/ArchiveIntermediates/peeq/BuildProductsPath/Release-iphoneos -filelist /Users/peeq/Library/Developer/Xcode/DerivedData/peeq-gylybvwifdxjmtajtbvdsdpjcvkl/Build/Intermediates/ArchiveIntermediates/peeq/IntermediateBuildFilesPath/peeq.build/Release-iphoneos/peeq.build/Objects-normal/armv7s/peeq.LinkFileList -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load /Users/peeq/Library/Developer/Xcode/DerivedData/peeq-gylybvwifdxjmtajtbvdsdpjcvkl/Build/Intermediates/ArchiveIntermediates/peeq/InstallationBuildProductsLocation/Applications/libCordova.a -ObjC -fobjc-link-runtime -miphoneos-version-min=5.0 -framework CoreLocation -framework ImageIO -framework OpenAL -framework AssetsLibrary /Users/peeq/Library/Developer/Xcode/DerivedData/peeq-gylybvwifdxjmtajtbvdsdpjcvkl/Build/Intermediates/ArchiveIntermediates/peeq/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 -o /Users/peeq/Library/Developer/Xcode/DerivedData/peeq-gylybvwifdxjmtajtbvdsdpjcvkl/Build/Intermediates/ArchiveIntermediates/peeq/IntermediateBuildFilesPath/peeq.build/Release-iphoneos/peeq.build/Objects-normal/armv7s/peeq

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

然后走过去查看那里的文件系统:

And went over and looked around the file system there:

cd /Users/peeq/Library/Developer/Xcode/DerivedData/peeq-gylybvwifdxjmtajtbvdsdpjcvkl/Build
./Intermediates/ArchiveIntermediates/peeq/BuildProductsPath/Release-iphoneos/libCordova.a
./Intermediates/ArchiveIntermediates/peeq/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/Objects-normal/armv7/libCordova.a
./Intermediates/ArchiveIntermediates/peeq/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/Objects-normal/armv7s/libCordova.a
./Intermediates/ArchiveIntermediates/peeq/IntermediateBuildFilesPath/UninstalledProducts/libCordova.a

它已经构建好了,只是没有放在链接器想要找到的地方.

And it's been built, just not put where the linker wanted to find it.

所以,毫无疑问,某些构建设置要么告诉链接器查看那里,要么告诉构建将它放在链接器想要找到的地方.

So, no doubt some build setting either tells the linker to look there, or tells the build to put it where the linker wants to find it.

除非是别的东西.

我的问题是如何获取要构建的应用程序存档正确,所以它可以去商店.

My question is how to get the app archive to build correctly, so it can go off to the store.

一位在 Apple 工作的好人告诉我去哪里看,到时候这个问题就解决了.

A fine person who works at Apple told me where to look, at which point, this was solved.

在 Build Settings 的深处,有一个字段需要设置,称为 Other Linker Flags

Deep within the Build Settings, there is a field to be set, called Other Linker Flags

它开始时没有显示任何值,但如果你点击它,它会弹出调试和发布.

It starts out showing no value, but if you click on it, it pops up with Debug and Release.

在很长的 Release 字符串中,找到一个 -force_load libCordova.a
并删除字符串的那部分.

In the very long string that is Release, one finds a -force_load libCordova.a
and deletes that part of the string.

来自:

-weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load ${TARGET_BUILD_DIR}/libCordova.a -ObjC

致:

-weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem  -ObjC

它可能是某种方式的错误,phonegap 将其默认设置到位,我会也联系他们,看看它是否可以默认修复它.

Its probably a bug in some fashion that phonegap defaults this in place, I shall also contact them and see if it can default repair it.

他指出我的笔记:

我注意到你的链接命令包含这两个:

I notice that your link command contains both this:

-force_load /Users/peeq/Library/Developer/Xcode/DerivedData/peeq-gylybvwifdxjmtajtbvdsdpjcvkl/Build/Intermediates/ArchiveIntermediates/peeq/InstallationBuildProductsLocation/Applications/libCordova.a

还有这个:

/Users/peeq/Library/Developer/Xcode/DerivedData/peeq-gylybvwifdxjmtajtbvdsdpjcvkl/Build/Intermediates/ArchiveIntermediates/peeq/BuildProductsPath/Release-iphoneos/libCordova.a

传递给 -force_load 的路径是链接器抱怨的虚假路径.我认为您需要删除-force_load"链接器标志.您是否在其他链接器标志"设置中设置了这样的标志?

The path being passed to -force_load is the bogus path that the linker is complaining about. I think that you need to remove the "-force_load" linker flag. Do you have such a flag set in the "Other Linker Flags" setting?

推荐答案

已找到修复.

  1. 在 Target 的 Build Settings 中,找到 Other Linker Flags
  2. 更改$(TARGET_BUILD_DIR)/libCordova.a
  3. $(BUILT_PRODUCTS_DIR)/libCordova.a

这篇关于使用 phonegap v 2.9 为 Xcode 4.6 版本构建存档失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆