Access the Apps available in iphone - iphone

Hi i would like to access the apps which are available in iphone means downloaded apps and inbuild apps.But here issue is if i access any app which is available in iphone using [[UIapplication sharedapplication]openurl:[NSURl url urlwithstring:#"http://www.skype.com"]] like this i can able to access that iphone app succesfully but if i want to come back to my app i did not find any way only i have to hit homebutton. So is there anyway to come back to my app at any point of time. if anyone know please let me know. Thanking you.

So is there anyway to come back to my app at any point of time.
Not unless the other app supports returning back to the calling app (by responding to a special specifier in the URL, for example).
Note that there is also -[UIApplication canOpenURL:] which will tell you if a particular URL scheme is supported. This is useful to check whether a particular app is installed without attempting to launch it.

That is default behavior of the iOS application. Once your application is in background there is no way to come back to your application programatically.
User has to manually open your application.

You can navigate to some other apps on the phone using the URL method, however you cannot return to your app.
Once you navigate to the other app, it takes over and your app is no longer running. Therefore, the other app would need to navigate back to you. That obviously is not possible, unless you had access to the code of the other app.

Related

LaunchScreen storyboard is it mandatory for App Store app

I coded my app with several ViewControllers including an initial WelcomeVC. My app works well and I have no delay when launching it. I have seen that LaunchScreen.storyboard is used for first screen when app is launched but I don't need it in my app. I want to use it and submit it this way to the App Store without LaunchScreen. Do you know if this is possible?
Nevertheless I tried to add a simple LaunchScreen but I see no utility as on my Iphone when the App starts it goes so quick that I don't see the LaunchScreen.
Can I post an app without LaunchScreen?
Can I post an app without LaunchScreen?
No. Well, you can post it, but it will be rejected.
The launch screen does more than just provide an interim screen during launch. It also acts as a signal so that the device knows your app can adapt to it. Therefore Apple now requires (or soon will require) that an app submitted to the app store have a launch screen.

Is there a way to detect the running app, while my app is in the background in ios?

I need to detect the running application when my ios app is in the background. Basically I need to know if the user launched the Safari app?
Is there any way to do this? as I know when an app is in background, it may suspended or it could do only a minimal of things. Any help is very much appreciated.
you can only detect if your app is going to the background, no info is available regarding others apps.
One caveat is that within your app, you can test for another app being available:
- (BOOL)canOpenURL:(NSURL *)url
This can tell you whether the current device has a specific application installed IF that application is setup to handle url schemes for launching from another app.
Apple's Docs
No, there is no such way. Anything you're trying to know outside the scope of your app is forbidden by Apple.

Does iTunes pass referral parameters on iPhone once app is installed?

Is there any provision in iOS wherein the referral parameters used to start the iTunes application are passed on to the application on its first run?
For example in Android, if I use a link such as http://market.an......com.company.pany&referrer=heythere to download an app on Android and actually install the app, the Market app passes the "referrer" parameter and its value to the app on its first run, which the app can use to any extent.
Is there a similar provision in iOS?
We also struggled with this when we built our last mobile app, Kindred Photobooks. The best way we found is to basically bundle that information in the link and use fingerprinting to make that data available after install, which is working really well.
You can try to build fingerprinting in in house. Basically the steps would be the following:
1. When a link gets created, appending parameters to the link, or create a link reference in some backend database if you want shortened links
2. When a user clicks on that link, collect a fingerprint of their device from everything you can read in the browser (for example: IP, OS, screen size, etc) and redirect that user to the app store.
3. When the app opens, create a similar fingerprint from the same parameters collected in app, and match it up in your database to the outstanding fingerprint.
4. If there is a match, you can return those link parameters to the app through install.
Alternatively, if you don't want to build all that infrastructure and handle the many edge cases, we bundled it up into a free service called Branch. Check it out at http://branch.io
No, there is no such thing on iOS. But you can and should file a feature request at bugreport.apple.com, if you really need this feature.
As of iOS6, if someone installs your applications via a smart banner, you can pass a url to your app on startup. You do this by using the app-argument parameter:
A URL that provides context to your native app. If you include this, and the user has your app installed, she can jump from your website to the corresponding position in your iOS app. Typically, it is beneficial to retain navigational context because:
It should work on install:
When the app finishes downloading [after clicking install on an app banner], the View button changes to an Open button, and tapping the banner will open the app while preserving the user’s context from your website.
More here: http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html
I think this will work (but the jury is still out: Does app-argument on Apple Smart Banner get passed to app on install? ), but testing this is tough: How to test Smart App Banner Urls on in Dev environment
No, AppStore doesn't pass any parameters to application - it just unzips ipa to application folder (container).

more than one app has same URL Identifier for Custom URL Application?

i have used custom URL scheme in my Application to open it from another Application(which may be my Own).suppose more than one Application in App store may have The URL Identifier i used.if user has two Application with same URL Scheme, what will open? will Custom URL Application be approved by apple?
Custom URL apps are accepted by Apple. However if multiple apps on the device have registered same URL scheme then the behavior is undefined. From iOS Application Programming Guide, "If multiple third-party applications register to handle the same URL scheme, it is undefined as to which of the applications is picked to handle URLs of that type."
Short answer: First app to register URL will sometimes open but it will fail to open often. Other times second app to register will open but fail often. Basically it fails a lot and really is "undefined". Use http://handleopenurl.com/ to avoid.
Long Answer:
I created two apps, FirstApp and SecondApp, and registered the same URL testURL for both.
I loaded FirstApp and the URL worked as expected, opening the app.
I then loaded SecondApp and the dreaded undefined behavior started occurring. Currently, under iOS 7, if two apps have the same custom URL registered it pops up a modal asking
Open this page in "Name of First App"?
When you tap the Open option it fails, and nothing happens. If you tap or enter the link again the first app installed with that URL, in our case FirstApp, will launch.
So in effect, the second app to register never gets opened, and the first app fails every two URL calls. No ideal behavior.
What makes it even worse is I deleted both apps and then switched the order I installed them and the results are not consistent. Sometimes it is one app, then on reloading both apps it is the other. The behavior really is "undefined".
Best practice is to use http://handleopenurl.com/ to see what URLs have been registered and chose one that will not conflict with other apps. You can't "steal" another URL because you can't be sure your app will open and not the other app.
this may be your answer that you are finding
http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
By reading this article It may be possible that apple can reject your application, still you can read the guide line provided by apple.
Thanks

How do I link to another app in the App Store in an iPhone app?

I used this technique, but it appears to not work anymore in 3.0. In the simulator at least, my app opens Safari, and then there is a visible redirect, but then I get a message that there has been too many redirects. Any fix?
Have you tried this on the device? There is no App Store application on the Simulator, so any attempts to redirect to it will fail.
Within my application, the itunes.apple.com links for the App Store work just fine under 3.0 on the actual devices.
I can't test this right now, but have you tried changing the 'http:' protocol in the link to 'itms:' instead?