iOS开发应用启动崩溃 [英] iOS development app startup crash

查看:97
本文介绍了iOS开发应用启动崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用iOS应用,没什么大不了的,只是一个简单的预算跟踪器。工作流程如下:将一些新内容编码到app =>将我的iPhone连接到我的Mac =>使用Xcode构建应用程序到我的iPhone 6和我妻子的iPhone 6 plus(这两个不同的设备!)。此时一切正常。

I am currently working an iOS app, nothing serious, just a simple budget tracker. The workflow is the following: coding some new stuff into app => connect my iPhone to my mac => building app with Xcode to my iPhone 6 and my wife's iPhone 6 plus (so two different device!). At this point everything works fine.

但过了一段时间(有时只是几天,有时几周),应用程序突然停止同时在两台设备上工作,没有任何预示:我们不更新iOS并且不在环境中做任何改变,应用程序就是这样开始的: https://s3.amazonaws.com/sized-video-assets-public- v1 / wp-content / appadvice-v2-media / 2015/07 / crash_9b28fddfc26f9f0380f1b0d0b2324018-quarter.gif (但在我的情况下,应用程序无法到达第一个视图,在启动后立即崩溃)。

But after a while (sometimes just a few days, sometimes weeks), the app suddenly stop working on both devices at the same time, without any foreshadow: We don't update iOS and don't do any changing in the environment, the app just start to do like this: https://s3.amazonaws.com/sized-video-assets-public-v1/wp-content/appadvice-v2-media/2015/07/crash_9b28fddfc26f9f0380f1b0d0b2324018-quarter.gif (but in my case, the app can't reach the first view, crashing immediately after start).

最奇怪的是,崩溃问题在不同设备上的启动时间完全相同,但无问题间隔从不相同:有时崩溃开始后一天,有时两周后,等等。
我重建应用程序后使用Xcode的设备,整个事情重新开始,应用程序运行良好一段时间。

The most weird thing is, the crashing issue starts exactly the same time on both different device, but the "no-problem interval" is never the same: sometimes the crash starts after one day, sometimes after two weeks, etc. After I rebuild the app to devices with Xcode, the whole thing starts over, and the app works fine for a while.

我已经尝试过这些东西来调试这个问题:

I already tried these things to debug this problem:


  • 修复由Swift经常更改语法引起的所有警告,因此我的应用程序始终没有警告=>仍存在同样的问题

  • 检查设备上的诊断调试日志,没有崩溃时间的日志

  • 检查启动时的内存使用情况,登录屏幕上的大约25MB(第一个视图)以及最大内存使用量在应用程序中约为38-40MB。

  • 使用Xcode调试应用程序,但正如我上面提到的,没有错误/警告,并且在成功构建之后,应用程序再次正常工作。

  • Fixing all the warnings cased by the Swift's frequent syntax change, so my app always free of warnings => same problem still there
  • Checking the diagnostic debug logs on devices, no logs for the time of crashing
  • Checking memory usage on startup, its about 25MB on login screen (first view), and the max memory usage is about 38-40MB in the app.
  • Debugging app with Xcode, but as I mentioned above, there is no errors/warnings, and after the successful build, the app works fine again.

这里发生了什么?

推荐答案

如果应用程序是使用XCode安装的,并且您没有付费程序开发者帐户,则应用程序的预期寿命约为48小时

If application is installed with XCode and you don't have a Paid Program Developer Account, the life expectancy of the app is like 48h approximately

(没有正式有效期为
,对于付费程序,使用正确的证书需要几个月。目前似乎是大约60天。

(There is no official time of validity for that) , for a paid program, it's a few month with the correct certificate. Currently it seems to be approx 60 days.

如果你没有签署你的应用程序,它的预期寿命很短。苹果公司允许您部署免费帐户这是一个很新的事情,但它仅用于测试目的(模拟器除外),如果您想在设备上测试更多天,则必须为开发者计划付费。

If you didn't sign your app, it has low life expectancy. It's quite new that Apple allow you to deploy for a free account, but it just for testing purpose (other than simulator), if you want more days to test on device, you have to pay for the developer program.

希望这会帮助你...

Hope This will help you...

如果您有任何其他疑问,请与我们联系。

Do let me know if you have any other query.

这篇关于iOS开发应用启动崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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