I'm writing a basic application using xcode 5.1. One of the features I'm interested in trying to do is to launch another app or move to other part of iphone, INSIDE the app already running.
Eg. I have an app with 3 menu options, 1 and 2 do certain tasks as part of this parent app, menu option 3 launches another app that's installed on the phone. I'm not sure if this is possible?
No you can not do that. Besides the documented URL handlers, there's no way to communicate with/launch another app.
This is part of the sandbox principle of apple:
https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/TheiOSEnvironment/TheiOSEnvironment.html
What you can do is launch another app by using custom URL-Schemes
http://mobile.tutsplus.com/tutorials/iphone/ios-sdk-working-with-url-schemes/
Related
Is it possible to launch another iPhone application or appstore from within another app?, For example in my application if I want the user to open another of my application from current app. (close/minimize the current app, open the Phone app). We searched and found its possible with SharedApplication. But it requires to update all our apps. We posted without customUrl or schemes. We are using Objective-C.
I've seen a lot of apps use the UIApplicationShortcutIconTypeShare application shortcut to share their app right from the home screen. It launches a UIActivityViewController right from the home screen without opening the app. How do you do that?
The OS adds the sharing menu item automatically to all apps downloaded from the App Store. Note that it doesn't add it to apps installed via Xcode or any third party distribution systems such as Buddybuild.
(Edit: the TestFlight version of your app will have "Send Beta Feedback" menu item instead of "Share...")
To address your question directly though, no, it is not possible (as of iOS 10 - may be possible in the future, who knows) for an app to present a view controller directly on the home screen. If it was possible, that would be a big security issue, because an app should not be able to access anything outside its own main window.
I would like to know if it is possible to launch an app on iOS that is currently in the back group using three taps for example ? Think of it as a short cut on a desktop app.
Thanks
No!
That is not possible. There is no way to open one specific app on some combination of touches.
You can however open other apps from your app using url schemes, but something like that is not supported across the entire OS and of course not supported on the springboard. (see the apple docs)
Is it possible to change an app logo (on the home screen) without updating the app?
This is from the view of an iOS developer. I got the idea from seeing how the New Yorker newspaper can change their app image without updating the app. Can I do this for a normal app? Is this solely for newstand apps?
Sadly, this is only available to Newsstand apps.
You're correct in that this is solely a newsstand feature for the reason being that content within those applications will change regularly (without requiring a change in the architecture of the application) and provides another way to notify or entice the user to open it again.
If 2 other app register same url scheme, how iOS handle this?
The iOS Documentation reads:
Note: If more than one third-party app registers to handle the same URL scheme, there is currently no process for determining which app will be given that scheme.
The OSs behaviour is undefined if there are two apps registered for an URL scheme, therefore you should try to define a handler that is specific for your app to avoid this situation (e.g. awesomeMapsApp:// instead of maps://).
Actually it can be really problematic. For example, til' March 2016, an app called Grabb handles PayPal schemes so that if your app tries to open PayPal (with all the security nonce etc. within the call) it launches Grabb instead, and you can do nothing about it. Even with the openURL alertView added in iOS 9, it can still be a big security issue.
Here is what I have tested:
iOS 5: the first installed app will be chosen. If you delete first installed app, then the others will not launch unless you install again.
iOS 6: the lastest installed app will be chosen. If you delete the lastest installed app, then the previous installed app will be chosen.
It will present an UIActionSheet view allowing the user to choose which app to launch (good example are apps that handle .doc files). That's where the icon you specify is used - on the action sheet buttons when it's shown to the user