带有Static Lib的iOS应用程序仅在启动Archive Build加载Ad Hoc时崩溃。无法在Debugger中重现 [英] iOS App with Static Lib crashes ONLY on launch of Archive Build loaded Ad Hoc. Can't reproduce in Debugger

查看:91
本文介绍了带有Static Lib的iOS应用程序仅在启动Archive Build加载Ad Hoc时崩溃。无法在Debugger中重现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我意识到这是一个延伸,我无法提供太多信息来帮助我,但我正在寻求任何帮助。我的应用程序已经持续发展3年,从未见过这样的事情。我最近向Apple发布了一个小点发布版本,现在两次因为所有设备上的发布时崩溃被拒绝了吗?

I realize this is a stretch and I can't give much info to help but I am reaching for anything. My App has been under continuous development for 3 years and never seen anything like this. I recently submitted a small point release to Apple for Release, and twice now it has been rejected for Crashing on Launch on ALL their devices?

Crash报告指向一些代码在静态库中,但关键行没有得到符号化。尝试Atos没有运气。

The Crash reports point to some code in static library but the key lines are not getting symbolicated. Tried Atos no luck.

关键点在于我有7个设备我已经在我能想到的每种模式下测试了应用程序,特别是没有任何连接: Wifi-OFF,AirplaneMode-ON,位置服务 - 关闭。我永远不能模拟他们声称会看到的内容,这是每次发布时应用程序崩溃?!

The key point is that I have 7 devices I have tested the app on in every mode I can think of, in particular no connection to anything: Wifi-OFF, AirplaneMode-ON, Location services-OFF. I can NEVER simulate what they claim to be seeing, which is App crashes on launch every time?!

我在AAPL开发论坛中发现了一个听起来类似的报告,但是他从来没有得到任何解释。他提交了一个带有大量登录信息的应用程序,并要求他们发送日志。他们得到了那个版本并且......在几个小时内批准了它。

I found one report in the AAPL Dev Forums that sounded similar, but he never got any explanation as to what was up. After he submitted an app with loads of logging in it out of desperation and asked them to send the logs. They got that version and... approved it in hours.

任何人都有任何想法。我需要将此版本发布。

Anyone have ANY ideas. I NEED to get this release out.

注意:已解决

原来这不是一个弱链接问题。我们只使用Brad建议的广告版本的Ad Hoc分布运行应用程序时看到了崩溃......所以这很有用。

This turned out to NOT be a weak link issue. We only saw the crash when running the App using Ad Hoc distribution of the Archive version as Brad suggested... so that was helpful.

然而,分辨率结果是我在这里列出的一些编译器标志:
https://stackoverflow.com/a/10302012/ 754494

However the resolution turned out to be some compiler flags which I listed here: https://stackoverflow.com/a/10302012/754494

推荐答案

我会重新发布并扩展我的评论从上面开始,这个问题可以得到一个可接受的答案。

I'll repost and expand upon my comment from above so that this question can have an accepted answer.

我最近在构建我的GPUImage框架时遇到了类似的问题。在归档时,构建过程似乎与通过Xcode在设备上构建和直接安装应用程序时略有不同。

I recently came across a case similar to this when building my GPUImage framework. It appears that the build process is slightly different when archiving than when building and directly installing an application on the device via Xcode.

这可以通过构建和归档应用程序,然后选择分发它以进行临时或企业分发来公开。拿起.ipa并将其放入iTunes并手动将其加载到您的某个测试设备上。以这种方式准备的应用程序的行为可能与通过Xcode构建和安装的应用程序的行为不同,并且应该更接近提交审核的构建将如何行动。

This can be exposed by building and archiving the application, then choosing to distribute it for ad hoc or enterprise distribution. Take the .ipa and place it in iTunes and manually load it on one of your test devices that way. The behavior of an application prepared in this manner may differ from one built and installed through Xcode, and should be closer to how a build submitted for review will act.

在我的情况,问题是由于缺乏适当的弱连接。在比iOS 4.3更新的SDK上,如果您希望有条件地使用较新的SDK中存在但在较旧的SDK中缺少的类和函数,则不再需要弱链接整个框架。如果您的目标是4.0及更高版本,则链接器现在应该执行类级和功能级弱链接。

In my case, the problem was due to a lack of proper weak linking. On SDKs newer than iOS 4.3, you should no longer need to weak link whole frameworks if you wish to conditionally use classes and functions that are present in newer SDKs but missing in older ones. If you target 4.0 and higher, the linker should now perform class- and function-level weak linking.

然而,对于使用我的静态库的人来说,这是失败的,静态库会对iOS 5.0中新纹理缓存功能的运行情况进行运行时检查,但它只在这些中失败了存档的构建。我在针对4.x设备的所有测试中都没有看到它,因为这是通过Xcode安装完成的。最后,为了让使用此框架的应用程序在通过iTunes存档和安装时能够正常运行,我需要让用户明确地弱化整个Core Video框架。

However, this was failing for people using my static library, which does runtime checks for the presence of the new texture cache functions in iOS 5.0, but it only failed in these archived builds. I never saw it in all my testing against 4.x devices, because that was done by installing via Xcode. In the end, I needed to have users explicitly weak link the entire Core Video framework in order to get applications using this framework to run properly when archived and installed via iTunes.

请注意,这不是由于Release与Debug构建配置的原因,因为我尝试在通过Xcode部署到设备时在我的构建方案中切换它们,并且它没有区别。建立和链接存档应用程序的方式不同。

Note that this wasn't due to the Release vs. Debug build configurations, because I tried switching between these in my build schemes when deploying to the device through Xcode and it made no difference there. Something else is different in the way that archived applications are built and linked.

这篇关于带有Static Lib的iOS应用程序仅在启动Archive Build加载Ad Hoc时崩溃。无法在Debugger中重现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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