App crashes when receiving a VoIP call before unlocking after reboot - crash

My app is using Linphone and PushKit to handle VoIP calls. It works well when the app is in the foreground, background, or suspended (killing app).
If we restart the phone and the app receives a VoIP call before the phone is unlocked (i.e. PIN is entered for the first time) then the app crashes - this is shown to the user when they unlock the phone. The crash only occurs in iOS 16 (and not with iOS 14).
Reboot -> make a VoIP call to the phone -> unlock -> crash. (iOS 16)
We've tested with other VoIP apps (e.g. Skype, Messenger); they do not crash but they do not notify the user that a call is received. There is just a notice that a call was missed when the phone is unlocked. We would like the same behaviour (i.e. do not crash, show a missed call).
What do we need to do to properly handle this use case?
Crash report:

Related

application didReceiveRemoteNotification not called in particular occasion

I am writing an app which will receive remote notifications sent from Firebase.
It works perfectly fine when I first install the app on an iPhone, the notification can be received no matter the app is in background or foreground.
However, when I killed the app and restarted it, then press home button again to send it to background, the app can no longer receive notifications in background state, and can only receive on foreground.
Please help. Thanks in advance!

My iOS App Terminated due to Memory Pressure when I am using Photos.app

I am running my application on iOS 7.0.1 & iPod Touch 5th generation device. When I follow below steps my app quits with below error on Xcode 5 without any error in console
App quit Unexpectedly Terminated due to Memory Pressure
Steps:
1) Run my application using Xcode 5. Login & then go to Home
2) Click on Home button so that my app enters in background (I can see my app is in background)
3) Start inbuilt Photos app from iOS. Click 1 or 2 pictures
4) After taking 1-2 pictures , App quit Unexpectedly Terminated due to Memory Pressure
I am not doing anything in my app. When I checked the CPU usage its 0% & Memeory used = 15.2 MB
Also there is no other app running in the background except my app.
Can anybody help with this ? Thanks
I am not getting why this is happening. If I don't use Photos.app then app works smoothly.
There's nothing you can, or should, do about this. You application is no longer in the foreground, and the foreground app (photos) is asking for more memory. To supply this, iOS will terminate any apps running in the background. It doesn't matter how much memory your app is using, iOS will terminate background apps as long as the foreground app requires more memory.
Once your app enters the background you can expect it to be terminated at any time. To improve the user experience, you can look at Enabling State Preservation and Restoration in Your App. This in theory allows your app to start where it left off when the user comes back to it.

ios launch appstore from within my app causes my app to terminate

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:
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
As iTunes is coming up, my App is terminated. Happens whether I run via X-Code or on the device directly.
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.
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.
Other points are that when I run via the simulator, the openURL call returns failure and doesn't open any 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.
If anyone has seen anything similar, I'd really appreciate advice on the situation.
Your app could be terminated for a number of reasons. The best thing is to look at the device console using Xcode's Organizer:
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:
<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.

Function 'didFinishLaunchingWithOptions' getting invoked inappropriately

I am using cordova 2.1.0 for my IOS app development.
I connected my IOS device to a MAC processor and installed/initialized my app running in xcode or dragged it from itunes folder. Now i physically disconnected my device from the processor and through wifi enabled in the device, sent notifications/messages through APNS to the device. I was able to successfully receive notifications in the device. Now after some time, i reconnected the device to the processor, which lead to a problem of the app launching again and calling 'didFinishLaunchingWithOptions' method again, which is not desirable as the launch/initialization should happen only once. This behaviour is random ie. every time when i disconnect/reconnect, it is not happening, only sometimes. Why is this happening. What could be the reason for this random behaviour.
Any help will be appreciated.Thanks
didFinishLaunchingWithOptions: is called every time the app is launched. When you run your app from Xcode, and disconnect the device, it kills the app. So, when you launch the app with the device disconnected, it starts the app again, which calls didFinishLaunchingWithOptions: when the app finishes launching. The same thing happens if you run the app from Xcode, and run it again the same way.
EDIT :
Not sure if it's clear, but didFinishLaunchingWithOptions: is not called if you quit the app (press the home button) and call it back without killing it.

how to show UIalertview while application is running but iphone is locked?

i want to show a alert when my app is running but phone is locked..we can say in power save mode. is there a way to show alertview without Push-Notification service when phone is idle and app is running.
If the application is locked, then your app is blocked. The only possibility (which I've never tried) might be to push a notification to the phone.