xcode 安装失败:无效参数 -iOS 扩展
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27031746/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installation Failed: Invalid Argument -iOS Extension
提问by Dsw
Hi guys,
嗨,大家好,
I am about to build watch app target from existing project. I encountered a strange error upon finishing build that unables me to run the watch app properly. Here is the attached screenshot.
我即将从现有项目构建手表应用程序目标。我在完成构建时遇到了一个奇怪的错误,无法正常运行手表应用程序。这是附加的屏幕截图。
Environment
环境
- OSX 10.10
- XCode 6.2 Beta
- Simulator iPhone 6 iOS 8.2
- OSX 10.10
- XCode 6.2 测试版
- 模拟器 iPhone 6 iOS 8.2
When I try creating new watch app project and try the Lister demo app they work just fine. So I am suspecting there is something wrong with my existing project but not sure what since the error message is not really explanatory. I appreciate any leads or helps given, thank you for your time.
当我尝试创建新的手表应用程序项目并尝试 Lister 演示应用程序时,它们工作得很好。所以我怀疑我现有的项目有问题,但不确定是什么,因为错误消息并没有真正的解释。感谢您提供的任何线索或帮助,感谢您的时间。
EDIT: After few investigation turns out extensionsdo not work as well.
编辑:经过几次调查后发现扩展也不起作用。
采纳答案by Dsw
After 2 days of research I have found the answer which I believe is an xcode bug.
经过 2 天的研究,我找到了我认为是 xcode 错误的答案。
Basically this is caused by having different build name on your XCode build settings. Making them uniform should solve the problem. As shown here https://devforums.apple.com/message/1047770#1047770
基本上这是由于在您的 XCode 构建设置上有不同的构建名称造成的。使它们统一应该可以解决问题。如图所示https://devforums.apple.com/message/1047770#1047770
I hope this helps anyone stumbled upon this question.
我希望这可以帮助任何偶然发现这个问题的人。
回答by CFIFok
I had the same issue. This sequence helped for me:
我遇到过同样的问题。这个序列对我有帮助:
Xcode doesn't like it when you have a referenced directory called 'Resources' within your resource bundle (see timrex)
当您的资源包中有一个名为“Resources”的引用目录时,Xcode 不喜欢它(请参阅timrex)
1) Remove 'Resources' directory from your project's tree;
1)从项目树中删除“Resources”目录;
2) Reset content and settingsin iPhone simulator;
2)在 iPhone 模拟器中重置内容和设置;
3) Press Shift+Cmd+Alt+Kand click 'Clean'or Shift+Cmd+Kin xCode window;
3) 按Shift+Cmd+Alt+K并在 xCode 窗口中单击“清除”或Shift+Cmd+K;
回答by Pravin S.
Check if the Bundle Identifier isn't empty in the Info.plist
检查 Info.plist 中的 Bundle Identifier 是否不为空
回答by André Moruj?o
I got my error fixed by setting the project's "Product Bundle Identifier". It was empty since my project was being generated by Gyp and I hadn't set that particular setting on the project.
我通过设置项目的“产品包标识符”修复了我的错误。它是空的,因为我的项目是由 Gyp 生成的,而且我没有在项目上设置该特定设置。
回答by lukas_o
I ran into the same issueand got it resolved by cleaning the phone's memory since it was too low to install the app.
我遇到了同样的问题,并通过清理手机内存解决了这个问题,因为它太低而无法安装应用程序。
回答by Abdul Shamim
This issue can be resolved simply by emptying the trash.
只需清空垃圾箱即可解决此问题。
回答by akiraspeirs
I got it working after I tried everything mentioned here, then deleting the app from the device and restarting XCode. Those two steps were mentioned here: https://stackoverflow.com/a/28232381/1586277
在尝试了这里提到的所有内容后,我让它工作了,然后从设备中删除了该应用程序并重新启动了 XCode。这里提到了这两个步骤:https: //stackoverflow.com/a/28232381/1586277
I have no idea what combination of steps fixed it though.
我不知道是什么步骤组合修复了它。
回答by Richard
I fixed this by first building for an actual device - once I'd done that at least once, the simulator ran fine.
我通过首先为实际设备构建来解决此问题 - 一旦我至少完成一次,模拟器就可以正常运行。
回答by makboney
I got this issue while running on simulator. I rebooted the system and the issue gone.
我在模拟器上运行时遇到了这个问题。我重新启动了系统,问题消失了。
回答by Hyndrix
I just had the same issue. My fix was to delete the temporary project files in the derived data folder:
我只是有同样的问题。我的解决方法是删除派生数据文件夹中的临时项目文件:
rm -R /Users/username/Library/Developer/Xcode/DerivedData/projectname