Launch iPhone Application with Identifier - iphone

I'm trying to Launch an application within my App.
For example: If I press a Button in my testApp1, it should Open up testApp2.
Is there any Way to do this with the App Identifier??
I heard something about a undocumented method called launchApplicationWithIdentifier: suspend: but that doesn't work for me, or i'm using it wrong.
I tried this:
[UIApplication launchApplicationWithIdentifier:#"com.test.testApp2" suspend:NO]
But it didn't work.

Better use [[UIApplication sharedApplication] openUrl:]. You'll need set a custom URL scheme in your second app for that. Check this tutorial or simply do a search with "iphone custom URL schemes". There's a lot of good tutorials.

I am not sure but i guess launchApplication is used for mac app thats why its showing warning. i will suggest you to create a custom URL and add it to plist file and then later you may launch your app using that url.

Related

Open iTunes reviews tab inside the app

I know there are so many posts talking about this issue. I was trying to do this but didn't get a good result. I can open iTunes inside the app using SKStoreProductViewController, but I can't open the reviews tab directly, and I can do that with the function openURL but I have to leave my app and go to the app store.
Basically my question is if someone know about an app doing that, I would like to know if that's possible, probably you don't have a solution but I just want to know if you saw that before, so I can take a look and try to understand how to do it, probably with a tricky solution (like using UIWebView or something like that, I didnt get a good result with that).
UPDATE:
Im asking for a solution to open iTunes and reviews tab directly WITHOUT LEAVING MY APP.
or
The name of any game doing that, to understand what's doing.
Thanks
This is not possible for IOS 10.2 or lower.
Now iOS 10.3 introduces SKStoreReviewController component to rate the app directly from your app.
https://developer.apple.com/reference/storekit/skstorereviewcontroller
I make this way in my app:
NSString *iTunesLink = [NSString stringWithFormat:#"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%#&mt=8", ITUNES_CONNECT_APP_ID];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];

Access the Apps available in 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.

Check if iphone has Square app installed - open or install

In my code, I need to determine if an app has been installed on the iphone device or not (the app I need to check is Square). If the app isn't installed, I would to open the app directly to Square, and if it is installed, I would like to open Square. Is there a way to do this? I checked out this discussion: iphone - Check if an app is installed , but wasn't able to work it out. Since I was not a developer of Square, where do I get the information about the URL scheme?
Thanks.
It doesn't necessarily HAVE a scheme. The developers would have had to do that, and to have a reason to support incoming URLs. I don't know whether they've done that, or if they've documented it, or anything.
Assuming there's no documentation, then you can stab at it and see what you get. If you've got a guess at the scheme ("square:", perhaps?) you can test it with the canOpenUrl method of UIApplication:
UIApplication *app = [UIApplication sharedApplication];
if ([app canOpenURL:[NSURL URLWithString:#"square:"]]) {
NSLog(#"found it!");
}
If "square:" is a URL scheme that any app on the device has declared, this code will tell you so in the console.

Using twitter:// tweetie:// custom scheme on iPhone to open twitter application to a specific user profile

I thought I was familiar with the applications custom schemes used with iOS to trigger applications from my app but I'm unable to use the ones that seems to be provided by the official twitter app (aka tweetie).
I'm trying to open the twitter application directly to a predefined user profile.
From the documentation found here http://handleopenurl.com/scheme/twitter this should be feasible, but this code doesn't work :/ :
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"twitter://user?id=41553213"]];
I also tried with tweetie:// but the same happens : the application launches, but does not "jump" to the given user profile.
Actually, if I try any of the other examples, I don't get anything working :(
twitter://messages
twitter://mentions
none of them are working :(
Any idea why none of those invocations are working ?
Thanks.
N.B:I'm using the last version of the twitter application under iOS 3.1.3 (iphone 3G)
very strange, after removing the application, downloading it again from the appstore, it appears it works ? :O Maybe I wasn't exactly on the very last one ?! At first I thought it was because I had multiple accounts set up, but no, even with that it works now. Strange, but cool.

How do I cause a telephone call to be made in the background in iOS 4.0?

I would like to be able to make a call from within my application, but have it start in the background using the new features in iOS 4.0. I tried using the following code:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:#"tel://09650159343"]]]
but this causes a call to be made in the foreground, terminating my application. Is is possible to make a call and have it start in the background?
I'm sorry to tell you that this will never ever work, at least not on a non-jailbroken device.
Even on a jailbroke device this won't work the way you approach the problem. opening an url will always opens the associated application to handle it.
before iOS4 this terminated the application, but now with fast app switching this should make the app in the background if you ask me. But it doesn't, this was forgotten on apple's to do list for iOS4?