如何在XCode 4.3上进行IPA? [英] How to make an IPA on XCode 4.3?

查看:80
本文介绍了如何在XCode 4.3上进行IPA?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有XCode 4.3的Mac OS X Lion安装程序.我不是注册的Apple开发人员.

I have a Mac OS X Lion setup with XCode 4.3. I am not a registered Apple developer.

我通过plist文件告诉:/Applications/Xcode.App/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist/Applications/Xcode.App/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/SDKSettings.plist,XCode不需要进行代码签名.

I told, via the plist files: /Applications/Xcode.App/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist and /Applications/Xcode.App/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/SDKSettings.plist, XCode not to require codesigning.

然后我编译了我的项目,只是一个基本的iPhone应用程序项目,它在模拟器中运行良好.我可以对其进行构建和存档,然后使用自行创建的证书对其进行签名,然后该存档就会出现在管理器中.

I then compiled my project, just a basic iPhone app project, it ran well in simulator. I could build and archive it, then sign it using a self-created certificate and the archive appeared in the Organizer.

暂时没有什么奇怪的,但是出现了问题:组织者中没有共享"按钮.如果我想在iPhone下使用IPA文件,则绝对需要从我的项目中制作IPA文件,因为它不接受xcarchive文件.我只得到"Validate"和"Distribute"按钮,这两个按钮都必须是注册的Apple开发人员.但是,没有可以免费构建IPA的共享"按钮.

Nothing strange for the moment, but there comes the problem: I have no "Share" button in the organizer. I absolutely need to make an IPA file out of my project if I want it to work under an iPhone as it won't accept xcarchive files. I only get the "Validate" and "Distribute" buttons which both require to be a registered Apple developer. But, no "Share" button which enables building an IPA... for free.

我已经完成了XCode设置,但似乎没有任何帮助.甚至文档说XCode 4.3中都提供了共享"按钮,所以我的问题是:为什么我没有制作IPA的可能性?是否有任何解决方法可通过任何命令行或其他方式获取此共享"按钮或从xcarchive中提取IPA?

I have gone through XCode settings but nothing seemed to help me there. Even the documentation says a Share button is available in XCode 4.3, so my question is: Why don't I get the possibility to make an IPA? IS there any workaround to get this Share button or make an IPA out of the xcarchive via any command line or whatever?

推荐答案

以下是在XCode 4.3中制作IPA的方法:

Here's how you can make an IPA in XCode 4.3:

要禁用代码签名:

  1. 转到/Applications.
  2. 右键单击XCode,然后选择显示软件包内容".
  3. Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/SDKSettings.plist复制到您的桌面. (请确保实际复制和粘贴.请勿拖放)
  4. 打开它,然后在DefaultProperties下将CODE_SIGNING_REQUIRED设置为NO.
  5. 将其复制回并替换原始文件.
  6. 重新启动XCode.
  7. 打开您的项目.
  8. 在Project Navigator中选择您的项目,然后打开项目的Build Settings部分(而不是任何特定目标)
  9. Code Signing下找到Code Signing Identity,对于DebugRelease模式,都将Any iOS SKD设置为Don't Code Sign.
  10. 现在,您应该可以无任何错误地构建项目了.
  1. Go to /Applications.
  2. Right click on XCode and select 'Show Package Contents'.
  3. Copy Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/SDKSettings.plist to your desktop. (Make sure to actually copy and paste. No drag and drop)
  4. Open it and under DefaultProperties set CODE_SIGNING_REQUIRED to NO.
  5. Copy it back and replace the original file.
  6. Restart XCode.
  7. Open your project.
  8. In Project Navigator select your project and open Build Settings section of your porject (and not any particular target)
  9. Under Code Signing find Code Signing Identity and for both Debug and Release modes set Any iOS SKD to Don't Code Sign.
  10. Now you should be able to build your project without any errors.

要创建IPA:

  1. 在项目导航器"中,选择产品"
  2. 右键单击[NameOfYourProject].app并选择在Finder中显示".
  3. 创建一个文件夹并将其命名为Payload
  4. [NameOfYourProject].app移至Payload.
  5. 压缩Payload并将其重命名为[NameOfYourProject].ipa
  1. In 'Project Navigator' select Products
  2. Right click on [NameOfYourProject].app and select 'Show in Finder'.
  3. Create a folder and name it Payload
  4. Move [NameOfYourProject].app to Payload.
  5. Compress Payload and rename it to [NameOfYourProject].ipa

这篇关于如何在XCode 4.3上进行IPA?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆