iPad应用程序启动超时
我正在开发一个 iPad 应用程序,它使用带有同步功能的预加载数据库,当然,当应用程序启动时,它会检查文档目录中是否存在其数据库,如果数据库不存在,则应用程序会从资源文件中复制其数据库到文档目录。
当我开始使用较小的数据库(< 300 MB)测试应用程序时,应用程序正确启动,但是当我使用真实数据库(5 GB)测试应用程序时,应用程序由于超时而停止,
任何人都知道如何增加应用程序的启动超时?是否有另一种方法可以进行数据库复制而无需处理此问题?
提前致谢
问候
I'm developing an IPad application that use a prefeatched database with a synchronisation feature of course, when the app start, it checks for the existence of its database on Document directory, if database doesn't exists the application copy its database from ressource file to document directory.
when I start testing the application with a smaller database (< 300 MB) the application start correctly, but when I test it with the real database (5 GB) the application is stopped due to timeout
can anyone have an idea of how to increase the launch timeout for the application? is there another approch to do database copy without having to deal with this problem?
Thank's in advance
Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您应该尽快向用户呈现 UI,然后开始在后台线程上复制数据库。
You should present the UI to the user as soon as possible and then start copying the database on background thread.
5 GB 是一个相当大的数据库。如果您打算通过 App Store 分发此应用程序,那么您应该注意 App Store 应用程序的下载限制为 2 GB。
5 GB is quite a sizable database. If you intend to distribute this app over the App Store, then you should be aware that the download limit for App Store apps is 2 GB.
您无法更改启动超时,因为这是系统功能。相反,您需要在按照 fichek 建议进行加载时进行更改。
You cannot change the launch timeout because that is a system function. Instead, you need to change when you do the load as fichek suggested.