简体   繁体   English

如何从Cordova的config.xml配置XCode和客户端选项

[英]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: 当前,我需要在构建中执行“操作”:

  1. 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 
  2. In XCode, I need to set the Deployment Target to 8. 在XCode中,我需要将Deployment Target设置为8。

  3. 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。

  4. In XCode, I need to click the App Icons Source button, which prompts to migrate to an asset catalog. 在XCode中,我需要单击“ App Icons Source按钮,该按钮提示您迁移到资产目录。

  5. In XCode, I often have to set the Product/Destination be to a real device instead of an emulator. 在XCode中,我经常不得不将Product / Destination设置为真实设备而不是仿真器。

  6. 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.

相关问题 Apache cordova / phonegap如何从config.xml启用功能 - Apache cordova / phonegap how to enable capabilities from config.xml 如何为Cordova 3.5联系人插件设置config.xml - How to set config.xml for cordova 3.5 contacts plugin 如果我已经在index.html中安装了CSP,为什么还要配置Cordova config.xml? - Why configure Cordova config.xml if I already have a CSP in index.html iOS Cordova Xcode项目设置与config.xml进行横向定向? - iOS Cordova Xcode Project Settings vs config.xml for Landscape Orientation? 使用config.xml打开Xcode中的功能 - Turn on capabilities in Xcode using config.xml 科尔多瓦:如何设置特定于平台的config.xml文件,科尔多瓦构建后该文件不会被覆盖? - Cordova: How to set Platform-specific config.xml file which is not overwritten after cordova build? 是否可以在config.xml中的Cordova 3.5中定义启动屏幕? - Is it possible to define splash screens in Cordova 3.5 in config.xml? Cordova没有构建 - Platform Config.xml不正确 - Cordova does not build - Platform Config.xml incorrect Cordova 3.2 ios添加插件“哪个config.xml? 它在哪里?” - Cordova 3.2 ios add plugin “Which config.xml? Where is it?” 通过 Cordova config.xml 向 iOS .plist 文件添加条目 - Add entry to iOS .plist file via Cordova config.xml
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM