[英]How to configure XCode and Client Options from Cordova's config.xml
In compiling IOS applications, I have found no guide for the actual building of the XCode project files correctly, nor how to correctly control it from Cordova' config.xml code. 在编译IOS应用程序时,我没有找到正确构建XCode项目文件的指南,也没有找到如何从Cordova的config.xml代码正确控制它的指南。
Currently, I need to do "things" on a build: 当前,我需要在构建中执行“操作”:
Fix the "#ifndef DISABLE_PUSH_NOTIFICATIONS" fence in AppDelegate.m. 修复AppDelegate.m中的“ #ifndef DISABLE_PUSH_NOTIFICATIONS”围栏。 I kludge this with this command line hack:
我通过以下命令行技巧对此进行了混淆:
sed -i "" -e "s/ifndef DISABLE_PUSH_NOTIFICATIONS/if 0/" build/cordova/platforms/ios/gThrive/Classes/AppDelegate.m
In XCode, I need to set the Deployment Target
to 8. 在XCode中,我需要将
Deployment Target
设置为8。
In XCode, I need to set the iPhone Device Oriention
checkboxes, because Corodova's orientation flag only sets the IPad. 在XCode中,我需要设置“
iPhone Device Oriention
方向”复选框,因为Corodova的方向标志仅设置了IPad。
In XCode, I need to click the App Icons Source
button, which prompts to migrate to an asset catalog. 在XCode中,我需要单击“
App Icons Source
按钮,该按钮提示您迁移到资产目录。
In XCode, I often have to set the Product/Destination be to a real device instead of an emulator. 在XCode中,我经常不得不将Product / Destination设置为真实设备而不是仿真器。
I still Product/Clean, Product/Build, Archive:Verify[Validate & Submit to App Store, often selecting a provision developer id]. 我仍然是产品/清洁,产品/构建,存档:验证[验证并提交到App Store,通常会选择供应商开发人员ID]。
There must be a way to set these from the command line or from within Corodova's config.xml file. 必须有一种方法可以从命令行或Corodova的config.xml文件中进行设置。 I want the whole setup to just run.
我希望整个安装程序运行。
Any ideas on any/all of these steps? 关于任何/所有这些步骤有什么想法吗?
You could do this with shenzhen/ipa tool. 您可以使用深圳/ ipa工具执行此操作。 Some Voodoo magic with xcode config file and you are done.
一些带有xcode配置文件的Voodoo魔术,您就完成了。 You can use --xcconfig or --xcargs to overwrite default values.
您可以使用--xcconfig或--xcargs覆盖默认值。
I've managed to get a command line dev build from Cordova 5.1.1 running on an iPhone without needing to go into XCode at all, or running xcodebuild or xcrun myself. 我设法从iPhone上运行的Cordova 5.1.1中获得了一个命令行开发版本,而根本不需要进入XCode,也不需要自己运行xcodebuild或xcrun。 As far as I can see the only difference between this and a release (distribution) build would be the need to set version and build numbers.
据我所知,此版本与发行(发行版)版本之间的唯一区别是需要设置版本和版本号。
I don't know if the OP is still having problems, but if so I'll be glad to help. 我不知道OP是否仍然有问题,但是如果是这样,我很乐意提供帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.