Does an iOS app continue to run in the background after an App Store update? - iphone

For example: would a VOIP app, which has an open socket which is notified of incoming traffic before the App Store update, have a chance to re-establish that socket after an App Store update? Or does the App have to wait for the user to open the App first? I can't find any answer to this in any Apple documentation.

I believe that the app is shut down (terminated) before updating, and I don't believe that the system automatically restarts them after updating (geofencing and related tasks should still work, though).
Think about it: when you get an update for Bob's Awesome Application on your desktop, you have to shutdown the app before installing the update.
After the update is installed, Bob's Awesome Application doesn't restart itself - that would just be weird - and quite annoying.

Related

Required Background Mode for location not re opening app after reboot

We are trying to develop an application similar to an existing app currently in the app store.
This app is sending location data in the background to a web service, and the app will continue to run following a reboot of the device. I will also note, that following the app being installed and registered, the location services indictor remains constantly on the status bar. I am assuming this is necessary to allow the app to continue to run following a the device being restarted.
We have tried using the "UIBackgroundModes/required background modes for location", and have been unsuccessful in having the app continue to run following a reboot of the device.
Can someone please point us in the right direction as to how to have the app continue to send location data following a device reboot.
Thank you very much!
No app will run following a device reboot. It is not possible to build a file daemon under Apple's SDKs. You'd have to jailbreak the phone and run unauthorized stuff to do so, then you wouldn't be accepted into Apple's app store.
Yes your app will be restarted if your are monitoring significant location changes or monitoring a region and that region is entered/exited.
In iOS 7 Apple made an important change that will disable these mechanisms if a user force quits your app. They will remain disabled until the user starts your app again.

Delete an application from iOS device using Push Notification

Is there a way could i delete my application from some users iPhone by sending a push notification?. The reason can be a security concern.
This can't be done for any iOS device, but it can be done for devices enrolled in Mobile Device Management (MDM). Apple has documented all of the available operations, including removing applications remotely.
An MDM server can manage third-party apps from the App Store, as well as enterprise in-house applications. The server can remove managed apps and their associated
data on demand or specify whether the apps are removed when the MDM profile is removed.
No. You can't execute any code in response to a push notification, unless your app is already running in the foreground. And you definitely can't programmatically delete your app in any situation.
Your best bet would be to have your app phone home when it starts, and not function unless it's supposed to.
You cant delete your application programmaticaly. But you can block some functionalities using client server communication. For example, Write in your code to send a request if security risks identified, and based on response you can control the program flow.

Can iPhone apps start on start-up?

I've answered two different questions now, both explaining how VOIP apps don't start on start-up, yet people seem to think they do.
I'm not 100% sure myself, someone linked me to a part of the apple docs, which doesn't really mention anything about auto-starting of apps.
I was originally going on prior knowledge and this answer, but after another person saying that they do, I'm really not sure.
As far as I'm aware, apps only react to push notifications, and can't be launched into the background when a device is turned on.
Can we please clarify whether it is possible to auto-start an app or not?
Take a look at the UIBackgroundModes section in this document - it seems to state that adding the voip key will autostart an app on boot.
Edit: a sample app seems to confirm this behavior.
I confirm that setting VOIP mode works. However, I've found that the app won't restart after power up unless it was running when the device was powered off. Furthermore, the app won't actually restart on the recently powered up device until the device is unlocked after power up.
OK, I don't know if this classifies as an answer but I feel obligated to say. I am developing an app that both tracks significant location changes and provides VoIP features. The app has voip key in Required background modes. I tried some cases which I would like to share the results:
App is in Debug mode - Turned off while app was running (active or background) - iOS 7.1.1 (11D201) and iPhone 4 (product name: iPhone3,2):
When booted, app is running in background, as well as other apps that were running before. I do not think this is related to VoIP in any way.
App is in Debug mode - Turned off while app was terminated - iOS 7.1.1 (11D201) and iPhone 4 (product name: iPhone3,2):
When booted, the app is not running, there are no logs in configuration utility, server says the user is not registered I cannot call it from other devices; and yet the other apps that are not related to voip or location tracking but were open before turning off are at least loaded in memory. Meaning, the voip key did not work.
I have continued the test with the same app but this time downloaded it from app store. The results are the same. Changed the device and os to iPhone 3G (product name: iPhone2,1) and iOS 6.1.6 (10B500). Nothing changed both in debug and release modes.
I have told my boss that Apple provides this behavior and it can be done. Then I had second thoughts and tried, now I am desperately trying to find another way. Going to send my regards to Apple about this.
You can not launch an application without user interaction. The user has to click on the app icon, on push notifications, on a custom link. May be there are other ways I am not aware of, but even if they exist, they require user interaction to intentionally launch the app.
Edit
It turns out, as Tim mentioned, there might be an exception for VOIP apps.
I have been developing VoIP apps and I can confirm that VoIP app will autostart when iPhone reboots as long as user doesn't kill it before reboot. When iOS autostart voip app only application:didFinishLaunchingWithOptions: will be run, i.e. applicationDidBecomeActive: won't be run.
I used to doubt whether iOS will automatically restart the voip app when it crashes. After investigating I find iOS does automatically restart the voip app but if it keeps crashing iOS will then try servals time before it finally gives up.
If you check iPhone console output from xcode, you can see logs like these after the first crash
..
Service exited due to signal: Abort trap: xxx
Unable to get short BSD proc info for xxxx: No such process
Application 'UIKitApplication:xxxxx]' crashed.
...
Significant location change or region monitoring also causes an app to launch on boot as long as its turned on and left on. No UIBackgroundModes key is necessary for this.

How to notify a user when new updates / version is released on the App Store? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
When my iPhone application start, I want to notify the user if there is a new updates / version released on App store.
Does anybody have any ideas or has anybody else achieved anything similar?
Thanks
Use Nick Lockwood's iVersion library. It's whole purpose is to notify the user when new updates are available.
iVersion is a library for dynamically checking for updates to Mac/iPhone App Store apps from within the application and notifying users about the new release. It can also notify users about new features in the app the first time they launch after an upgrade.
Purpose:
The Mac and iOS App Store update mechanism is somewhat cumbersome and disconnected from the apps themselves. Users often fail to notice when new versions of an app are released, and if they do notice, the App Store's "download all" option means that users often won't see the release notes for the new versions of each of their apps.
Whilst it is not permitted to update an App Store app from within the app itself, there is no reason why an app should not inform the user that the new release is ready, and direct them to the App Store to download the update.
And if your app is not on the App Store, either because it's an in-house/enterprise iOS app, or a Mac app delivered to customers outside of the store, you can't use the App Store update mechanism anyway.
iVersion is a simple, zero-config class to allow iPhone and Mac App Store apps to automatically check for updates and inform the user about new features.
iVersion automatically detects when the new version of an app is released on the App Store and informs the user with a helpful alert that links them directly to the app download page.
Or if your app is not on the store, iVersion lets you specify a remote plist file to check for new releases, and a download URL where users can get the latest release.
iVersion has an additional function, which is to tell users about important new features when they first run an app after downloading a new version.
These excerpts were taken from the Github page here, where you can download it. There is also a comprehensive tutorial on installing and configuring iVersion, so I recommend that you check it out.
Hope this helps!
To give a comprehensive answer. There are basically two ways you can go here. Depends on where you want to put the responsibility.
App checks for new versions on server
Using this approach, you would add a method to your app that is being called on every launch to compare the current version of the app (wherever you want to save that) with the version stored on the server. To achieve this, the server must implement a small web service that returns the latest version as a string or something else very simple. No rocket science there.
Server pushes new version information to app
This way you implement more code on the server-side to do a Push Notification to your app which informs the app about the new version. Advantage here is: Less client-side code and less effort to check, because the version check does not happen every time the app is started but instead only once the new version is actually released.
you can do a call to your server when the app starts.
and that way check for a news item in your database, for example.
When the server gives you something. show it in an alert.
On the other hand, when there is an update in the appstore, doesn't the iphone give a warning?
APNS - Apple Push Notification System
Try it and google for ready server solutions.
Update: Okay, lets get it longer -
APNS is the best way to inform user about something new. It works with every state of the app - even when app closed - and it helps to avoid unnecessary requests to server.
But you will need server to send pushes - if you can write it by yourself - it's nice, but the are some services to create backend for your app (no links - no ads, just google it).
To find out how to start with APNS on the client side and how to create all needed certificates and keys read this one
Just check the latest version by communicating with your server and compare with the current version of app when the app starts up, if there is a newer version, notify the user.
Apologies in advance for the plug - but I think a service I built extending the concept from my experience building many apps solves this problem. Look at CleverStork - an Update Manager for Apps
There is something known as Silent notifications from iOS 7 and above, you can use that for
this

auto upgrading iOS apps

Is there some way to implement an auto-upgrade for an iPad app.
I would like to be able to have my app check for updates, and then upgrade itself.
As far as I am concerned the app can retrieve the update from the app-store, but:
I would like the interface to be app internal: User should just have to press an OK button for the upgrade to start (all this time staying within the app)
Is this possible at all?
It is possible to have display a notification to inform an update is available on you app and you can redirect the user to the AppStore, but an update can only be download from the AppStore.
This will reinstall the new version of your app. So you can't stay in the app to update (You need to go to the appStore and qui the app during the update).
Internally, you can only update some content for you app (not add new native code) but not with a real AppStore update.
Apple does not allow apps to download, install, or execute code that is not included in the original app submitted to Apple. The App store upgrade cannot be automatically started.
the best you can do is determine if the app store has a newer update, then prompt the user to install it by linking directly to the app page in the app store. They will still have to click the correct buttons to start the process.
Even if it were possible, it's not allowed by Apple. Your app will be rejected.
Unless you only update contents of your app, e.g. cooking receipts.