I'm trying to take users of My App to the AppStore for several different functions - like Upgrade to Full Version, Rate/Review or simply View another App I've developed. However, all of these are causing my App to Terminate when iTunes is launched on the device. I'm using some simple code and have tried many combinations of URLs, all of which successfully get to where they are going. Here are the behaviors:
我正在尝试将我的应用程序的用户带到AppStore以获得几个不同的功能 - 例如升级到完整版,评价/评论或者只是查看我开发的另一个应用程序。但是,所有这些都导致我的应用程序在设备上启动iTunes时终止。我正在使用一些简单的代码并尝试了许多URL组合,所有这些组合都能成功地到达目的地。以下是行为:
- User clicks Rate App
- 用户点击评价应用
-
Code directs them to the web via:
代码通过以下方式将他们引导至网络:
[[UIApplication sharedApplication] openURL: [NSURL URLWithString:[[MyApp defaultApp] itunesLink]]];
-
My App goes to the background, and my delegate's applicationDidEnterBackground is called successfully
我的应用程序转到后台,我的委托的applicationDidEnterBackground被成功调用
- As iTunes is coming up, my App is terminated. Happens whether I run via X-Code or on the device directly.
- 随着iTunes的到来,我的应用程序终止了。发生我是通过X-Code还是直接在设备上运行。
- When I quit out of the store and look at the running processes on the device, my App is still shown there. I know it has been terminated from X-Code console, and when I try to restart it it starts fresh.
- 当我退出商店并查看设备上正在运行的进程时,我的应用程序仍然显示在那里。我知道它已经从X-Code控制台终止了,当我尝试重新启动时它开始新鲜。
I've tried the itunesLink as either itms://itunes.apple.com/app/ or with http - all of which get to the correct end point. If I use www.google.com it works fine and my App is NOT terminated, just sent to the background and the website is displayed OK.
我已经尝试过itunesLink作为itms://itunes.apple.com/app/或者使用http - 所有这些都达到了正确的终点。如果我使用www.google.com它工作正常,我的应用程序没有终止,只是发送到后台,网站显示确定。
Other points are that when I run via the simulator, the openURL call returns failure and doesn't open any URL.
其他一点是,当我通过模拟器运行时,openURL调用返回失败并且不打开任何URL。
Any insights as to why my App would be terminating? It's acting like an iOS security feature or something which is shutting my App down, but I thought what I was doing was pretty standard stuff.
有关为什么我的应用程序将终止的任何见解?它的行为类似于iOS安全功能或关闭我的应用程序,但我认为我所做的是相当标准的东西。
If anyone has seen anything similar, I'd really appreciate advice on the situation.
如果有人看到类似的东西,我真的很感激有关情况的建议。
1 个解决方案
#1
1
Your app could be terminated for a number of reasons. The best thing is to look at the device console using Xcode's Organizer:
您的应用可能会因多种原因而被终止。最好的方法是使用Xcode的管理器查看设备控制台:
Your app may simply be terminated as a result of low memory notifications. As soon as it moves to the background and the app store launches (iTunes and the app store both use plenty of memory) it can be killed to free up memory. In this case you will set messages from "jetsam" like this:
由于内存不足通知,您的应用可能会被终止。一旦它移动到后台并且应用程序商店启动(iTunes和应用程序商店都使用大量内存),它就可以被杀死以释放内存。在这种情况下,您将从“jetsam”设置消息,如下所示:
<Notice>: jetsam: kernel termination snapshot being created
<Warning>: Application 'UIKitApplication:com.yourapp[0x6337]' exited abnormally with signal 9: Killed: 9
You should use the Activity Monitor in Instruments to see how much memory your application is using. iOS will terminate the most memory-intensive applications first, so you should try to reduce your app's memory footprint.
您应该使用Instruments中的Activity Monitor来查看应用程序使用的内存量。 iOS将首先终止大多数内存密集型应用程序,因此您应该尝试减少应用程序的内存占用量。
#1
1
Your app could be terminated for a number of reasons. The best thing is to look at the device console using Xcode's Organizer:
您的应用可能会因多种原因而被终止。最好的方法是使用Xcode的管理器查看设备控制台:
Your app may simply be terminated as a result of low memory notifications. As soon as it moves to the background and the app store launches (iTunes and the app store both use plenty of memory) it can be killed to free up memory. In this case you will set messages from "jetsam" like this:
由于内存不足通知,您的应用可能会被终止。一旦它移动到后台并且应用程序商店启动(iTunes和应用程序商店都使用大量内存),它就可以被杀死以释放内存。在这种情况下,您将从“jetsam”设置消息,如下所示:
<Notice>: jetsam: kernel termination snapshot being created
<Warning>: Application 'UIKitApplication:com.yourapp[0x6337]' exited abnormally with signal 9: Killed: 9
You should use the Activity Monitor in Instruments to see how much memory your application is using. iOS will terminate the most memory-intensive applications first, so you should try to reduce your app's memory footprint.
您应该使用Instruments中的Activity Monitor来查看应用程序使用的内存量。 iOS将首先终止大多数内存密集型应用程序,因此您应该尝试减少应用程序的内存占用量。