I have an app that uses
LSApplicationWorkspace's +defaultWorkspace and -allApplications, but I can't use these on the App Store.
What alternatives do I have?
What alternatives do I have?
If you are using LSApplicationWorkspace to detect what applications are installed? None.
Apple treats the list of installed applications as private, and have made deliberate changes to other APIs in the past to keep that information private. (For instance, iOS 9 applied limits to canOpenURL: to prevent it from being used to detect installed applications.)
If you need to detect other specific applications, and those applications implement custom URL schemes, you can still use canOpenURL: to check for those. However, you will need to declare these URL schemes ahead of time in your Info.plist, and you cannot detect applications which do not handle unique URL schemes.
Related
I want let users view the Weight section of Apple's Health app to allow them to see detailed data, etc. I manage to open the Health app via the URL scheme x-apple-health://, but I would like to send them directly to the right place, e.g. x-apple-health://HealthData/measurements/Weight. I have had no success after trying different paths that made some sense.
Anyone has a reference on this?
Apple has not documented the x-apple-health:// scheme for use by apps. Attempting to use it is like using SPI - even if you find something that works now, it is likely to break in a future version of iOS. You should file a Radar with Apple to request an API for this purpose.
I'm a semi-technical UX designer looking for a technical solution on a topic where none of our developers are fully informed, so bear with me.
Our organization has multiple iOS apps, each of which does somewhat different things. I'd like to create a link between two of these apps such that an interaction in one app will open the other app and take it to a specific state.
If these were web applications, we could easily do this via a simple link. Is such a thing possible in the iOS world? And if so, without getting deep into the weeds on the technical details, can you point me in the general direction of the technical approach we would want to take so I can have our developers start researching further?
You probably want to forward your developers onto Apple's documentation on "Inter-app communication":
And most likely you'll want to use an app url scheme:
A URL scheme lets you communicate with other apps through a protocol that you define. To communicate with an app that implements such a scheme, you must create an appropriately formatted URL and ask the system to open it. To implement support for a custom scheme, you must declare support for the scheme and handle incoming URLs that use the scheme.
I want to share a link from my app using other applications installed on my iPhone such as Gmail, Facebook, DropBox, WhatsApp etc. In android there is a straight way to do so, just fire an intent and it automatically shows the installed apps through which we can share whatever we want. Is there any such way in iPhone ?
Thanks!
On iOS , app is more separated from each other. The only way to pass data from one app to other is using the URL mechanism. As one example, an app register url scheme "open-me://",you invoked openURL with "open-me://my-link" then that app will launched. That app will define the detail of the URL so it could understand the content.Continue with the example we are using, the text you passed could be either "open-me://A?data=my-link" or "open-me://A?message=my-link". So there are no general solution for all apps.Typically third party app will provide a SDK to make these things easy.
If you don't mind using a kind of large third party library, ShareKit is a good choice. It supports quite some apps.
If you want to know more about this topic,for example sharing files between app. You could start from reading the class reference of UIDocumentInteractionController.This UI component will show a list of app installed on your device which support the URL scheme.
Is there any way to determine if a user has a specific app installed, or even to count how many apps they have installed?
The information would be used to target information passed to the user.
Not on a stock phone. Jailbroken maybe, but I have not played with the jailbroken side of things.
You could try to open an app via a URL scheme. Using Twitter as an example, one of its URL schemes is twitter://user?screen_name=somename
You can check if you can open that URL:
NSURL *tURL = [NSURL URLWithString:#"twitter://user?screen_name=somename"];
if ( [[UIApplication sharedApplication] canOpenURL:tURL] )
// if here, you can open twitter app
You can extrapolate from here if you want.
Yes if the apps in question are known to you as a developer of that feature and do implement custom URL schemas (which you also need to know). There is a service that tries to collect that information: handleopenurl.com
Short answer: No.
Long answer: there are ways to detect if certain apps that provide the capability are present. For example, the Facebook app (see this question). However, it is not possible to detect apps that do not support that kind of detection, and it is not possible to get a total count of apps (unless, of course, they only had detectable apps, but the likelihood of that is incredibly slim).
Yes and No. On iOS, there are a few methods which can be used, but they won't get you the entire list, only some of the apps. Daniel Amitay has a nice framework for this. You can find it here (iHasApp)
I have used it and it gets most of the apps, but as I said, not all. Daniel explains in his blog post what techniques you can use.
It is possible to launch your own app via custom URL scheme as described at http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html for example. Is there a list of the apps that use this mechanism somewhere already? A list of custom URLs available to date? If you have or know an app that uses this mechanism, adding it here will also help.
See http://wiki.akosma.com/IPhone_URL_Schemes
http://www.onemillionappschemes.com, an open source Custom URL scheme site where you can contribute URLS (by scanning your iTunes library) and where you can pick up everything that has been found so far