Application on iPhone Startup - iphone

How can i make my application start on the iPhone startup?

If you plan on distributing your app via the App Store, this is not possible.
As Randolfo mentions, many things are possible via jailbroken installations.

You asked this question on 10th August 2010.
Now it's 13 November 2012. I'm adding this answer for future people who have the same question.
Now in iOS 6. There is a built in feature called guided access. You can achieve this feature using guided access. Still now you can't do this through code.
Please check these links:
enable-guided-access-ios
tip-how-to-turn-on-guided-access-in-ios-6-put-ipad-into-guest-user-mode

You can only do it with a jailbroken phone.

Only some very specific background applications can be started right from the iphone startup.
This includes VOiP applications for instance:
"Including the voip value in the UIBackgroundModes key lets the system know that it should allow the application to run in the background as needed to manage its network sockets. An application with this key is also relaunched in the background immediately after system boot to ensure that the VoIP services are always available."
As taken from:
http://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH5-SW15

Related

Auto-updated iOS application for enterprise distribution

Is it possible to make an iOS application for enterprise distribution that updates itself transparently? Saying 'updates' I mean completely updating its logic.
A possible usage of this approach is a self-service kiosk (iPad) that is maintained remotelly.
It's not possible to update application binaries directly, but I see some possibilities:
Application that have a single UIWebView and the logic is implemented in HTML5. But we can't use most of hardware specific features that can be used in native applications.
Some multi-platform framework (possibly HTML5-based) that allows to use native application features and that is compiled or interpreted dynamically.
Jailbreak?
What are really working approaches of these?
Consider getting a mobile device management service. Those are pricey.
OR:
First, enable over-the-air distribution. It will take $300/year enterprise agreement with Apple. Set up a website with the app's IPA archive and descriptive PLIST.
Then code a call-home HTTP request on app startup. You may pull/parse the same PLIST that describes the latest version; it has a bundle version in it. Compare that to the version of the currently running bundle.
When a new version is detected, the app shuts down, opens the browser on the download page. In a softer manner, just notifies the user that an upgrade is available.
I've never tried linking directly to the app's download package, but give it a try. In a perfect world, Safari would open up and ask "Do you want do download MyApp?" right away. In a not so perfect world, the user would have to click a link and then agree to download.
I think what you are looking for these days is the "Apple Deployment Program".
You volume purchase iPads which get sent to people, but that you can manage remotely - which also means management including remote updates of applications.
The only thing I'm not sure of is if you can launch an app remotely, so that you could update and re-launch an application.
Here's a guide to enrolling devices for remote management:
https://www.apple.com/business/docs/DEP_Guide.pdf
An old but good summary of the program:
http://www.speirs.org/blog/2014/2/27/understanding-apples-new-deployment-programs
Also watch the WWDC video on Managing Apple Devices for the Enterprise:
https://developer.apple.com/videos/wwdc/2015/?id=301

Updating iOS apps automatically with an MDM + Enterprise license

We have an iPad app running in a kiosk mode deployed across multiple physical locations. We'd like to have a solution where any updates to the app are pushed automatically to the device so that the client does not have to touch each iPad they have.
Our client has an existing MDM software that notifies the user if there's an update, but since it's intended to be a kiosk we don't want the general public to actually do the update by themselves.
Does anyone know if this is possible at all?
Thanks,
Teja.
Edit: As of iOS 7, you can now force an app update through MDM software.
(Previously for iOS 6 and below):
Sorry, but with even with the enterprise program and an MDM server, you cannot force an update on an iOS device.
Your best bet would be to configure the updates so that they run automatically just by clicking once and accepting the update. That way it is safe for anyone to accept.
Sources: Own knowledge and this site.
I know that as of iOS 7, this is no longer the case. If your app is managed via your MDM solution, you can force an update.

iPhone - app which can not be killed

I am trying to understand, is there any way to develop iPhone app with following conditions:
1) This application should always run in the background
2) This application should not be killable
3) With out JailBreak?
All I am trying to do is want to track my iPhone.
Please help me.
Thanks
It's not clear exactly what you want to do, but one of the cases where Apple allows apps to run in the background is so that they can respond to changes in the GPS location. It's not unkillable per se, but apps do relaunch automatically (I think) if they're killed due to low memory, etc.
See here for the Apple docs.
No, this is not possible unless you are Apple.
No. I'm pretty sure attempting this is going to get your app rejected (if its even possible!). The iOS system has its own ways of managing running applications and will kill apps if certain conditions are met (e.g. unresponsive for a while).
Check out the App State & Multitasking doc.
Your requirements are:
1) This application should always run in the background
2) This application should not be killable
3) With out JailBreak?
Answer:
I think there is no Non-Apple app which has all the three features. I think even one of these feature is nearly not possible.
Also if you say that Photos and Phone and others like Newsstand cannot be deleted, then you need to consider that those are apps of Apple and they have some more capabilities than what they give in Public API's to the developers.
They have some greater access to the iOS and many of its private API's which make them non-deletable.
Hope this helps you.
If you don't plan to release it to AppStore, but rather will sign with enterprise distribution certificate and will use it in your enterprise then you can look at VOIP application for iOS. It runs in the background, system restarts it automatically. I think that's the closest you can get on non jailbroken device.

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.

application specific lock in iphone

is it possible to make an app in iphone which locks other application. for example i want to put a lock on sms application, contacts etc. if anyone knows please reply
The thing which you are asking is not possible.
Apple supports SANDBOX environment , through that any application can not access other application data.
So you cannot stop executing other applications. Unless the device is jailbroken. then cydia supports such kind of applications.
And If you are having enterprise account to manage the enterprise devices , then this thing will be possible.