简体   繁体   English

如何将自定义条目添加到 iOS watchKit 扩展 info.plist 中?

[英]How can I add custom entries into iOS watchKit extension info.plist?

I use info.plist to define variables into my app and its today extension.我使用info.plist将变量定义到我的应用程序及其今天的扩展中。

But I can't add those variables to the WatchKit info.plist without getting an error while building :但是我无法将这些变量添加到WatchKit info.plist而不在构建时出错:

在此处输入图片说明

Am I missing something?我错过了什么吗?

(xCode 7.0 beta 6) (xCode 7.0 测试版 6)

Ok, I've just found my error.好的,我刚刚发现了我的错误。 There are 2 Info.plist for the watchKit app. watchKit应用程序有 2 个Info.plist

1) The first is in the device code (directory : Dealabs WatchKit Extension ) 1)第一个是在设备代码中(目录: Dealabs WatchKit Extension

2) The second is in the watch code (directory : Dealabs WatchKit App ) 2)第二个在手表代码中(目录: Dealabs WatchKit App

I was adding my custom vars into the watch code Info.plist ... moving all my vars to the first solved the problem.我正在将我的自定义变量添加到监视代码Info.plist 中……将我所有的变量移动到第一个解决了问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iOS中如何在info.plist中添加属性 - How to add properties in info.plist in iOS 如何将 NSAppTransportSecurity 添加到我的 info.plist 文件中? - How can I add NSAppTransportSecurity to my info.plist file? 如何将NSExtension和UNNotificationExtensionCategory键添加到Info.plist? - How can I add the NSExtension & UNNotificationExtensionCategory keys to Info.plist? 我可以将 iOS Info.plist 转换为 ruby​​ Hash 吗? - Can I convert an iOS Info.plist into a ruby Hash? iOS:如何在Info.plist的“打开方式”操作表中更改应用程序名称? - iOS: How can I change the app name in the Open-With action sheet in Info.plist? 适用于Apache Cordova(VS2015)的工具:将自定义条目添加到* info.plist for iOS - Tools for Apache Cordova (VS2015): Adding custom entries to *info.plist for iOS 如何将元素添加到 info.plist 数组? - How do I add elements to an info.plist array? 如何在Info.plist中读取自定义键的值并在Xcode的构建设置中使用它? - How can I read a custom key's value in Info.plist and use it in Xcode's build settings? 如何使用简单的字符串更改自定义 Info.plist 键 - how can I change custom Info.plist key with simple string 如何在构建时将按目标UIAppFonts添加到共享的Info.plist文件中 - How can I add per-target UIAppFonts to a shared Info.plist file at build time
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM