Find App installed or not - iphone

How to find the app is installed in device.

If you look for an application that registers a URL scheme that it can open, then you can check for the presence of that app using the UIApplication -canOpenURL: method, as documented here: Apple Docs ; otherwise it is not possible normally from the SDK.

Related

Can i hook into significant location change service so that i can track a Phone latest location?

i would love to build a auto-start with OS app which runs in IOS background(like a daemon) and when the phone changed its location the app send some information(userid,GPS,time......)to a web server immediately, in addition to,i want my app has no icon and users can not easily find it is on running or easily delete it. so i just wondering if these is some location-change notification i can hook into so that i can perform my code? anyone give me a good idea? i dont want put my app on appstore instead of i packaged it in deb,so i can use any private api or other non-official methods....
You can use CoreLocation native framework.we can access the current location of the user/device dynamically. follow the link for instructions coreLocation tutorials
According to Apple's Documents and guidelines, I don't think an app can exist without icon. The SDK doesn't have this feature as well. And no private API will be accepted into App Store. However, you can post your project on unofficial AppStores for jailbroken phones.

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.

An iOS App how to find all other application on the iPhone?

Bump, Chomp & Appsfire all can list other application on the iPhone, how to do it?
By using Google I found this link quite helpful, it says basically there are two ways to find if certain apps are installed without jailbreaking your device:
checking if a specific URL scheme is supported by the device => canOpenUrl:
comparing the devices currently running processes to known app executable names => sysctl()
Short answer, you can't.
Longer answer you can't without violating the dev agreement and risking app rejection.
There are two methods of doing this (on a non-jailbroken phone):
Check to see if custom URL schemes that are known to be used by certain apps are registered as described in http://www.iphonedevsdk.com/forum/iphone-sdk-development/37103-finding-out-what-apps-installed.html (this allows you to check for certain known apps, not get a list of all installed apps.
The way appsfire does with a desktop 'companion' app, that grabs this info from your iTunes and sends it to their server. (See this article as to why the appsfire developer pulled his app because apple wouldn't approve an update anymore).
Sorry I couldn't be of more help but that's apple!

Using the iPhone SDK, can I programmatically get a list of the applications/games on a users iPhone/iPod touch?

I would like to be able to pull the list of apps and games the user has and present it to them, or launch one of them. I'm guessing that Apple doesn't provide this capability in the iphone sdk. Still, I'd like to know how to do it and still be eligible for the app store.
You are correct Apple does not provide this in the iPhone SDK, therefore you cannot do this and get your app into the app store.
If the application has a published URL spec (i.e. Google Maps, Mail, ...) then you can launch the applicaiton via the URL launching spec.
But if the given game / application doesn't support the URL launching spec, then you have no way to launch it from your application. I also believe you cannot determine if an app is installed via the URL spec, only launch the application.
Check out the "URL types" reference for Info.PLIST.

Call using Skype.app via openURL:

Does anybody know if it is possible open Skype.app to call phone via
- (BOOL)openURL:(NSURL *)url
UIApplication message?
If it possible, what url a need pass to this message?
Thanks
Just for reference, this seems to have changed when multitasking support was added: starting at least with Skype 2.1.0, this URI works fine: skype:+33123456789?call
By looking at Skype's Info.plist file (you can open it from the ipa file iTunes has downloaded), you can tell it has no URL registered, so you won't be able to call it from your application.
You should look for a key called CFBundleURLTypes (you can look at Twiterrific's for an app that has one defined).
Update: Apparently, starting with Skype 2.1, there is a URL registered. See other answers on this question.
Just to provide some direction here we provide URI support on iOS and we have created an example for you, see: https://dev.skype.com/skype-uri/skype-uri-tutorial-ios