简体   繁体   English

将代码库从Titan更改为Swift后,从应用程序商店更新应用程序时,应用程序崩溃

[英]App crashing when updating app from app store after codebase changed from titanium to Swift

My application was previously written in Titanium. 我的应用程序以前是用Titanium编写的。 Now, I have released a new version where the code is written in Swift. 现在,我发布了一个新版本,其中的代码是用Swift编写的。 Now after the user updates his app to this version and starts the app, it crashes. 现在,在用户将其应用程序更新到此版本并启动该应用程序后,它便崩溃了。 Then it again starts running fine when the user deletes and installs the app back. 然后,当用户删除并重新安装该应用程序后,它再次开始正常运行。 What can be the best way to detect this change in the app? 检测应用程序中此更改的最佳方法是什么? I have thought of a solution. 我想到了一个解决方案。 I can check if some key in NSUserDefaults is set or not and delete and refresh and start again. 我可以检查是否设置了NSUserDefaults中的某些键,然后删除并刷新并重新启动。

Maybe because titanium save something in the iOS memory-cache for inizialitze it. 可能是因为Titan将某些内容保存在iOS内存缓存中以进行初始化。 And then when users delete the application delete this cache too, maybe a good whay for fix this is clean the cache when inizialize your new application for first time. 然后,当用户删除应用程序时,也要删除该缓存,也许这是一个很好的解决方法,它是在第一次初始化新应用程序时清理了缓存。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM