xCode 4“找不到文件”使用 core-plot 库创建 .ipa 时
我的应用程序已准备好发布,但无法创建所需的 .ipa。
我在一个非常小的例子中重现了我的问题。
1)创建一个新项目(我使用了导航栏应用程序)。 2) 存档构建 3)分享。 .ipa 在指定位置创建。
4) 下载/安装 core-plot ( http://code.google.com/p/core-plot/downloads/detail?name=CorePlotInstaller_0.2.2.zip&can=2&q= )
5) 使用方法 2添加库
5a) 将 CorePlotSDK 目录复制到 ~/Library/SDKs/
5b) 添加到项目的 .PCH 文件:#import
5c) 打开项目 ->编辑项目设置和所有配置:
5c1) 添加到其他 SDK:$HOME/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk
5c2) 添加到其他链接器标志:-ObjC -all_load -lCorePlot
5d) 添加 QuartzCore 框架到项目。
6)清洁工程 7) 存档构建 8) 分享(.ipa) => “操作无法完成。没有这样的文件或目录”
I have my app ready to ship, and I can not create the .ipa I need to do so.
I have reproduced my problem in a very small example.
1) Create a new project (I used a Nav Bar application).
2) Build for Archive
3) Share. .ipa creates at specified location.
4) download / install core-plot ( http://code.google.com/p/core-plot/downloads/detail?name=CorePlotInstaller_0.2.2.zip&can=2&q= )
5) Use method 2 for adding library
5a) Copy the CorePlotSDK directory to ~/Library/SDKs/
5b) Add to your project's .PCH file: #import
5c) Open Project -> Edit Project Settings and for All Configurations:
5c1)Add to Additional SDKS: $HOME/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk
5c2) Add to Other Linker Flags: -ObjC -all_load -lCorePlot
5d) Add the QuartzCore framework to the project.
6) Clean project
7) Build for Archive
8) Share (.ipa) => "The operation couldn’t be completed. No such file or directory"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
由于您有第 3 方 SDK,因此需要将“$(SDKROOT)/ResourceRules.plist”添加到目标构建设置中的“代码签名资源规则路径”键。
Since you have a 3:rd party SDK you need to add "$(SDKROOT)/ResourceRules.plist" to the “Code Signing Resource Rules Path” key in the targets build settings.
对于所有可能遇到此问题的人,以下是我在成功将 CorePlot 0.9 添加到我的项目后如何创建 .ipa 文件的逐步说明:
1) 在项目导航器中单击您的 CorePlot-CocoaTouch.xcodeproj(您已添加新项目和目标到您的主项目,您需要禁用它安装)
2)在“项目”设置中,单击“构建设置”选项卡,滚动到“部署”部分并找到“安装目录。”删除该字段中的所有内容(不要在主项目中执行任何操作,仅在 CorePlot 项目中执行)。
3) 在安装目录部分正下方的“跳过安装”部分中,将“否”设置为“是”(确保所有构建类型都设置为“是”)。
4) 现在对所有“目标”(CorePlot-CocoaTouch、文档和通用库)执行相同的操作。
5) 单击“CorePlot-CocoaTouch”目标,然后单击“Build Phases”选项卡。您将看到一个名为“复制标题”的部分。将“Public”和“Private”部分中的所有标题移至“Project”部分(只需突出显示/拖/放所有 .h 文件到“Project”部分)
6) 确保您已设置为针对 iOS 设备构建,然后在屏幕顶部的 XCode 选项中,选择 Product >档案。
7) 打开窗口>管理器并选择“存档”选项卡。一旦完成构建,您将在那里看到您的应用程序。选择存档,然后单击“共享”按钮。您将看到一个选择“iOS AppStore Package (.ipa)”的选项。单击“下一步”,将文件命名为“YourAppName.ipa”,然后选择文件在计算机上的保存位置。
当您使用 CorePlot 框架时,这应该负责创建 ipa。
For all those who might be having problems with this, here is a step by step of how I created an .ipa file after successfully adding CorePlot 0.9 to my project:
1) Click on your CorePlot-CocoaTouch.xcodeproj in the Project Navigator (you have added a new project and targets to your main project, and you need to disable it from installing)
2) While in the "PROJECT" settings, click on the "Build Settings" tab, scroll to the "Deployment" section and find "Instalation Directory." Delete whatever you have in that field (do not do any of this in your main project, only in your CorePlot project).
3) In the "Skip Install" section right below the Installation Directory section, set the "No" to "Yes" (make sure all build types are set to "Yes").
4) Now do all the same to all of the "TARGETS" (CorePlot-CocoaTouch, Documentation, and Universal Library).
5) Click on the "CorePlot-CocoaTouch" target, then click on the "Build Phases" tab. You will see a section called "Copy Headers." Move all the headers in "Public" and "Private" sections to the "Project" section (just highlight/drag/drop all the .h files into the Project section)
6) Make sure you are set to build for iOS Device, then in the XCode options at the top of your screen, select Product > Archive.
7) Open Window > Organizer and select the "Archives" tab. You will see your app there once it has finished building. Select the archive, then click on the "Share" button. You will see an option selected "iOS AppStore Package (.ipa)." Click "Next," name your file "YourAppName.ipa" and choose where the file will be saved on your computer.
That should take care of creating an ipa when you are using the CorePlot framework.
我也有同样的问题。确保我的证书和配置文件对于内部部署是正确的,并确保目标名称中没有任何不需要的空格或字符后,对我有用的是将我的方案从“运行”页面上的“调试”更改为“发布” 。产品->方案->编辑方案->点击运行->将构建配置更改为发布。
I had the same problem. After making sure my certificate and provisioning profile were correct for In-House deployment and making sure I didn't have any unwanted spaces or characters in the target names, what worked for me was to change my scheme from Debug to Release on the Run page. Product -> Scheme -> Edit Scheme -> Click Run -> Change Build Configuration to Release.