xcode 如何更改我的 iPhone 应用程序二进制文件名
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3035081/
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
How do I change my iPhone App binary filename
提问by Kamchatka
I get the following error when I try to upload the application on iTunes Connect:
当我尝试在 iTunes Connect 上上传应用程序时出现以下错误:
"Binary file names cannot contain a space. Please rename your binary file and try again."
“二进制文件名不能包含空格。请重命名您的二进制文件,然后重试。”
If I try to Validate the Application in XCode, I get: "My Application.ipa: filename may not contain whitespace"
如果我尝试在 XCode 中验证应用程序,我会得到:“我的 Application.ipa:文件名可能不包含空格”
So I guess I have to find a way to rename this .ipa file. I don't want to change my product name which has to stay "My Application". How can I do that?
所以我想我必须找到一种方法来重命名这个 .ipa 文件。我不想更改必须保留“我的应用程序”的产品名称。我怎样才能做到这一点?
Thanks!
谢谢!
回答by Johannes Fahrenkrug
This works very well (taken from here: http://developer.appcelerator.com/question/82971/filename-may-not-contain-whitespace-in-xcode-325-is-back):
这非常有效(取自此处:http: //developer.appcelerator.com/question/82971/filename-may-not-contain-whitespace-in-xcode-325-is-back):
1) In Xcode Organizer right click on the build date of the app and select "Reveal Archived App in Finder"
1) 在 Xcode Organizer 中右键单击应用程序的构建日期并选择“Reveal Archived App in Finder”
2) Open ArchiveInfo.plist in a text editor (i used Coda)
2) 在文本编辑器中打开 ArchiveInfo.plist (我使用 Coda)
3) For me at line 12 it was creating the application with a space:
3)对我来说,在第 12 行,它正在创建一个带有空格的应用程序:
<key>XCApplicationName</key>
<string>Example Name</string>
Change that to ExampleName and save the file.
将其更改为 ExampleName 并保存文件。
4) Once you get back to Xcode Organizer, you should be able to go through fine.
4) 一旦你回到 Xcode Organizer,你应该能够顺利通过。
回答by Steve Madsen
Since Xcode or the Application Loader is the only way to submit apps now, renaming the file before using the web interface isn't an option.
由于 Xcode 或 Application Loader 是现在提交应用程序的唯一方法,因此在使用 Web 界面之前重命名文件不是一种选择。
However, there is a workaround. From Xcode Organizer, choose Save to Disk, pick a file name without a space, and then use Application Loader (not the Xcode Organizer) to send the archive to Apple.
但是,有一个解决方法。在 Xcode Organizer 中,选择 Save to Disk,选择一个不带空格的文件名,然后使用 Application Loader(而不是 Xcode Organizer)将档案发送到 Apple。
回答by freespace
I ran into this and another issue when I wanted to submit an app with whitespace and a +
in the name.
当我想提交一个+
名称中包含空格和 a 的应用程序时,我遇到了这个问题和另一个问题。
Application Loader did not work well for me - cryptic errors that required deleting the IPA and rebuilding.
Application Loader 对我来说效果不佳 - 需要删除 IPA 并重建的神秘错误。
My final solution was to set the PRODUCT_NAME
to something sane, e.g. instead of My App+
it was MyAppPro
. Then I set CFBundleDisplayName
in Info.plist
to the name I wanted, e.g. My App+
.
我最终的解决办法是设置PRODUCT_NAME
到理智的东西,例如代替My App+
它MyAppPro
。然后,我设置CFBundleDisplayName
的Info.plist
,以我想要的名称,例如My App+
。
This is in my opinion a better solution than renaming the IPA every time and using Application Loader.
在我看来,这是比每次重命名 IPA 和使用 Application Loader 更好的解决方案。
回答by Kamchatka
I just had to rename the zip file before uploading it in the web interface. This is really silly...
我只需要在将 zip 文件上传到 Web 界面之前重命名它。这真的很傻...
回答by Snowcrash
Use Xcode 4.
使用 Xcode 4。
The problem is solved in this version.
问题在这个版本中得到解决。
回答by leviathan
There's no need to change anything in XCode. Just rename the resulting .zip File from "My Application.zip" to "My_Application.zip". This does not affect your application name its just a way to bypass the Application Loader filename checks (which do not allow whitespaces in the uploaded zip filename).
无需更改 XCode 中的任何内容。只需将生成的 .zip 文件从“My Application.zip”重命名为“ My_Application.zip”。这不会影响您的应用程序名称,它只是一种绕过 Application Loader 文件名检查的方法(不允许上传的 zip 文件名中有空格)。
My_Application.zip should be fine
My_Application.zip 应该没问题
回答by David
I was able to use the Organizer, select Share, Save to disk. The went to the file and told Finder to open it with Application Loader v1.4. This is with XCode 3.2.5. I've previously used Application Loader to upload apps to the Mac app store.
我能够使用管理器,选择共享,保存到磁盘。转到文件并告诉 Finder 使用 Application Loader v1.4 打开它。这是与 XCode 3.2.5。我以前使用 Application Loader 将应用程序上传到 Mac 应用程序商店。