Unity和iOS SDK 4.3

Many of you have reported troubles submitting your applications built with iOS SDK 4.3 to the iOS AppStore. At the time, the problem looked very complex and because all the troubles were happening after application gets post-processed for AppStore on Apple’s side, there were only a few ineffective ways to trace it down. We mailed all registered Unity iOS developers with a basic recipe of how to get their applications onto the AppStore:

许多人报告将使用iOS SDK 4.3构建的应用程序提交到iOS AppStore遇到麻烦。 当时,该问题看起来非常复杂,并且由于所有麻烦都是在苹果方面对AppStore进行后处理之后发生的,因此只有很少的有效方法来进行跟踪。 我们向所有注册的Unity iOS开发人员邮寄了有关如何将其应用程序存储到AppStore的基本方法:

Dear Unity iOS Developers, Unfortunately, many (and probably all) Unity iOS applications built with iOS SDK 4.3 are crashing during the App Store Review process while still running successfully on developer’s devices. We have contacted Apple regarding this issue and received confirmation that this is of highest priority to them. Our iOS team is working on a solution as well, but due to complex nature of the problem it will take longer than expected to properly resolve. A currently known workaround is to keep using iOS SDK 4.2.

尊敬的Unity iOS开发人员: 不幸的是,使用iOS SDK 4.3构建的许多(可能是全部)Unity iOS应用程序在App Store审核过程中崩溃,但仍在开发人员的设备上成功运行。 我们已就此问题与Apple联系,并确认这是他们的最高优先事项。 我们的iOS团队也在研究解决方案,但是由于问题的复杂性,解决此问题所需的时间将超出预期。 当前已知的解决方法是继续使用iOS SDK 4.2。

Many users reported that applications built with Xcode 3.2.5 + iOS SDK 4.2 successfully pass the Apple App Store review process currently. OS SDK 4.2 is not publicly available on the iOS Developer site anymore, but it still can be downloaded via direct link. We want to assure you that building final applications with iOS SDK 4.2 provides all the features the Unity iOS run-time supports and is proven to work fine with devices running older generation iOS (3.x-4.2.x) as well as the newer devices running iOS 4.3.x (like iPad 2).

许多用户报告说,使用Xcode 3.2.5 + iOS SDK 4.2构建的应用程序当前已成功通过Apple App Store审查过程。 OS SDK 4.2不再在iOS Developer网站上公开可用,但仍可以通过直接链接下载。 我们想向您保证,使用iOS SDK 4.2构建最终应用程序将提供Unity iOS运行时支持的所有功能,并被证明可以与运行较早版本的iOS(3.x-4.2.x)以及较新版本的设备兼容运行iOS 4.3.x的设备(例如iPad 2)。

Please feel free to contact us if you have issues releasing your application to the App Store.

如果您在将应用程序发布到App Store时遇到问题,请随时与我们联系。

Regards,The Unity Team

问候, 团结团队

Since then, we have spent many hours listening to your stories in forums, analyzing your builds, and trying out some ideas. We finally nailed the issue: iOS SDK 4.3 introduced a tiny problem with the native code linker improperly calculating how much code should be protected by the AppStore code protection system. The problem exposes itself only when AppStore protection is applied to the application.

从那时起,我们花了很多时间在论坛上听您的故事,分析您的构建并尝试一些想法。 我们终于解决了这个问题:iOS SDK 4.3引入了一个小问题,即本机代码链接器无法正确计算应由AppStore代码保护系统保护的代码量。 仅当将AppStore保护应用于该应用程序时,问题才暴露出来。

Recently, a few forum users reported about successful submissions to the AppStore using iOS SDK 4.3. This led us to the solution (we would like to say big thanks to forum users “susantio” and “ratrodstudio”!). Our investigation of their projects revealed common use of the special linker flag “-all_load” (which is required by some 3rd party ObjC plugins). Using this flag forces iOS SDK 4.3 native linker to properly calculate protected code size and so it solves the problem.

最近,一些论坛用户报告了使用iOS SDK 4.3成功提交到AppStore的信息。 这导致我们找到了解决方案(我们要非常感谢论坛用户“ susantio”和“ ratrodstudio”!)。 我们对他们的项目的调查显示,特殊链接器标志“ -all_load”的普遍使用(某些第三方ObjC插件要求使用)。 使用此标志会强制iOS SDK 4.3本机链接程序正确计算受保护的代码大小,因此可以解决此问题。

Unity 3.4, which is just around the corner, will include this flag by default. If you can’t wait, you can try it sooner by applying few changes to your Xcode project by hand.

指日可待的Unity 3.4默认将包含此标志。 如果您迫不及待,可以通过手动对Xcode项目进行少量更改来早日尝试。

Instructions how to add this flag to your release build when using Xcode 3.2.6 (SDK 4.3):

有关使用Xcode 3.2.6 (SDK 4.3)时如何将此标志添加到发布版本中的说明:

1. Open your project in Xcode. 2. In the Xcode menu select Project->Edit Active Target. 3. In the Configuration drop down select “Release”. 4. In the Search field type “linker”. 5. Find the field named “Other Linker Flags” and double click on it.

1.在Xcode中打开您的项目。 2.在Xcode菜单中,选择Project-> Edit Active Target。 3.在配置下拉列表中,选择“发布”。 4.在搜索字段中,输入“链接器”。 5.找到名为“其他链接器标志”的字段,然后双击它。

Xcode3_config

6. Click “+” and add “-all_load”.

6.单击“ +”并添加“ -all_load”。

Xcode3_linkerflags

7. Clean all targets.

7.清洁所有目标。

Instructions how to add this flag to your release build when using Xcode 4/4.0.2 (SDK 4.3):

有关使用Xcode 4 / 4.0.2 (SDK 4.3)时如何将此标志添加到发布版本中的说明:

1. Open your project in Xcode. 2. In the Project Navigator click on your project. 3. On the next pane select “Unity-iPhone” under TARGETS. 4. On the next pane select “Build Settings”. 5. In the Search field type “linker”. 6. Find the field named “Other Linker Flags” and double click on “Release” configuration near it.

1.在Xcode中打开您的项目。 2.在项目浏览器中,单击您的项目。 3.在下一个窗格中,在“目标”下选择“ Unity-iPhone”。 4.在下一个窗格中,选择“构建设置”。 5.在搜索字段中,输入“链接器”。 6.找到名为“其他链接器标志”的字段,然后双击它旁边的“发布”配置。

Xcode4_config

7. Click “+” and add “-all_load”.

7.单击“ +”并添加“ -all_load”。

Xcode4_linkerflags

8. Clean all targets. 9. Make a distribution build by clicking “Product”->”Build For”->”Build For Archiving” (Note: don’t use Product->Build, because it will make “debug” build by default and won’t include “-all_load” flag).

8.清洁所有目标。 9.通过单击“产品”->“构建为”->“构建存档”进行发行版本构建( 注意:不要使用Product-> Build,因为它将默认进行“调试”构建,并且不会包括“ -all_load”标志)。

We have received multiple confirmations from forum users that this helped them get into AppStore using iOS SDK 4.3. Also we are sharing all our findings with Apple, and we hope that this will help to get some fix included into SDK update.

我们已经收到论坛用户的多次确认,这有助于他们使用iOS SDK 4.3进入AppStore。 另外,我们正在与Apple分享我们的所有发现,我们希望这将有助于在SDK更新中包含一些修复程序。

As always please feel free to contact us if you have issues releasing your application to the AppStore or any platform.

与往常一样,如果您在将应用程序发布到AppStore或任何平台时遇到问题,请随时与我们联系。

翻译自: https://blogs.unity3d.com/2011/06/15/unity-and-ios-sdk-4-3/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值