本文介绍了无法为Cordova iOS应用程序生成发布版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 方法1(使用xcodebuild)a) xcodebuild -project MyApp.xcodeproj -alltargets -sdk iphoneos7.0 PROVISIONING_PROFILE="PROFILE_UUID.mobileprovision" -configuration Release * BUILD FAILED ** 以下构建命令失败:** BUILD FAILED **The following build commands failed: CompileC build / MyApp.build / Release-iphoneos / MyApp.build / normal / armv7 / AppDelegate.o MyApp / Classes / AppDelegate.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compilerCompileC build/MyApp.build/Release-iphoneos/MyApp.build/Objects-normal/armv7/AppDelegate.o MyApp/Classes/AppDelegate.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler CompileC build / MyApp.build/Release-iphoneos/MyApp.build/Objects-normal/armv7/MainViewController.o MyApp / Classes / MainViewController.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compilerCompileC build/MyApp.build/Release-iphoneos/MyApp.build/Objects-normal/armv7/MainViewController.o MyApp/Classes/MainViewController.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler CompileC build / MyApp.build / Release-iphoneos / MyApp.build / Objects-normal / armv7s / AppDelegate.o MyApp / Classes / AppDelegate.m normal armv7s objective-c com.apple .compilers.llvm.clang.1_0.compiler (3次失败) 方法2(使用corodova build and xcrun to sign the app)CompileC build/MyApp.build/Release-iphoneos/MyApp.build/Objects-normal/armv7s/AppDelegate.o MyApp/Classes/AppDelegate.m normal armv7s objective-c com.apple.compilers.llvm.clang.1_0.compiler(3 failures) Method 2 (Use corodova build and xcrun to sign the app)a) cordova build ios -releaseCompiling app on platform "ios" via command "/Users/Macuser/Desktop/MyApp/platforms/ios/cordova/build" --release Platform "ios" compiled successfully.b) xcrun -sdk iphoneos PackageApplication -v "build/Release-iphoneos/MyApp.app" -o "build/Release-iphoneos/MyApp.ipa" --sign "iPhone Distribution: NAME (ID)" --embed "PROFILE_UUID.mobileprovision" 错误:无法从/tmp/iyibGn3aUv/Payload/MyApp.app推荐答案问题是你没有合适的方案。当生成phonegap项目时,它不包含任何方案,因此链接到phonegap文件是不正确的。The problem is that you do not have proper schemes. When phonegap project is generated it does not contain any schemes and thus linking to the phonegap files is incorrect.转到控制台中的phonegap生成的项目,Go to the phonegap generated project in console and put 'xcodebuild -list'in the output you will get that there is no schemes in the project.在xcode中通过phonegap项目生成的xcodebuild -list '在输出中你会得到没有方案。 - 这将产生计划。Open generated by phonegap project in the xcode - this will generate schemes.现在你可以使用xcodebuild(记住填写正确的方案名称)来创建:Now you can build this using xcodebuild(Remember to fill up the proper scheme name): xcodebuild -scheme YOURSCHEMENAME - 项目MyApp.xcodeproj -alltargets -sdk iphoneos7.0 PROVISIONING_PROFILE =PROFILE_UUID.mobileprovision - 配置版本xcodebuild -scheme YOURSCHEMENAME -project MyApp.xcodeproj -alltargets -sdk iphoneos7.0 PROVISIONING_PROFILE="PROFILE_UUID.mobileprovision" -configuration Release对于连续集成是坏的解决方案,因为你必须启动xcode GUI来生成方案,但我没有找到任何其他解决方案这个问题。如果有人知道如何使用命令行生成方案,他会很高兴写下来。For continous integration this is bad solution because you have to launch the xcode GUI to generate the schemes but I did not found any other solution for this problem. If someone know how to generate scheme using command line it would be nice of him to write it down. 这篇关于无法为Cordova iOS应用程序生成发布版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-06 05:45