Is there a way to get all the url schemes of all the apps on a device? There has to be a central repository of them somewhere, maybe a plist?
Adding my solution in case someone is still looking. After spending some time researching the answer, I finished off on a mix between #danielbeard's and #Avis' solution.
Because I know what application I am looking for:
Download the .ipa from iTunes using my computer
Copy the application to my desktop
Rename it to *.zip
Extract the *.zip
Open the 'Payload' folder
Right click on the application and select 'Show Package Contents'
I then double-click the 'Info.plist' file (which Xcode should then open)
Then check 'URL types' > 'Item 0' > 'URL Schemes'
Using that information I then add it to an array of apps to check (doing what #danielbeard suggested).
Hope this helps someone in the future.
if it's programatically, i don't know.
here is answer to related to your question(not exactly)
Find out an app's URL programmatically
But manually, on your device-
yes...
there is a way to get url schemes of all apps on your device by this procedure. Install ifunbox on your system. Connect your device, open user applications and open the app that you are trying to find url scheme. you will find app home folder, in that folder you will find info.plist of that app. open info.plist and check url scheme address in the last column.
it worked for me. you will find url scheme of some apps which are registered for url schemes.
here are some some links for url scheme addresses of some apps.(might save your time).
1.http://handleopenurl.com/
2.http://wiki.akosma.com/IPhone_URL_Schemes
Yes, you can use private api. First
#interface PrivateApi_LSApplicationWorkspace
- (NSArray*)privateURLSchemes;
- (NSArray*)publicURLSchemes;
#end
then use it:
PrivateApi_LSApplicationWorkspace* _workspace;
_workspace = [NSClassFromString(#"LSApplicationWorkspace") new];
- (NSArray*)privateURLSchemes
{
return [_workspace privateURLSchemes];
}
- (NSArray*)publicURLSchemes
{
return [_workspace publicURLSchemes];
}
check https://github.com/wujianguo/iOSAppsInfo.
I'm going to go out on a whim here and assume you are trying to do the following:
You have a PDF in your app.
You want to check (programmatically) to see if any other app can open PDF files.
If so, open PDF using that app.
If you want to do this, you don't have to do step 2 manually. As a matter of fact, you can't. However, you can use the UIDocumentInteractionController class to present a menu of compatible apps.
This is the only way you can "check" for other apps installed on the phone. At least on iOS 7 and under.
It's not supported officially by Apple API without jailbreaking
A workaround might be how Bump knows which apps are launched and support URL Schemes:
http://danielamitay.com/blog/2011/2/16/how-to-detect-installed-ios-apps
Related
Apple maps can open routing apps when it can't provide a route:
I want to open a few of those apps from my app. I am aware that I have to whitelist each app that I want to open. This is not the problem.
How can I find out the url schemes of those Apps that are installed on my iPhone?
One idea is to make a backup via iTunes and at the info.plist of the app.
In this plist, the url schemes should be defined with the cfbundleurlschemes key.
I think I found such an app in a backup, but I don't know how to extract the file to get the info.plist file. adding .zip and extracting doesn't work.
Other ways to get the URL scheme are also welcome, especially ways to get example parameters of the URL scheme of an app. So looking at Apple Maps how it opens a specific routing app would be nice.
Yes I know how to open Google Maps. I want to know how to open those where I can't find a documentation.
So how can I find out URL schemes of routing apps on my iPhone?
There is an answer that suggests to extract the .ipa file, but there aren't .ipa files with iOSA 11 any more.
This article was incredibly helpful:
https://www.amerhukic.com/finding-the-custom-url-scheme-of-an-ios-app
Basically:
Download the app to your phone
Install the program iMazing on your mac
Connect your phone to your mac
Download the ipa file from your phone to your mac
Then
Make the ipa file a zip (rename) and extract
Show the package content from the .app file in the Payload folder
Search and open the Info.plist file
Search for CFBundleURLSchemes. Here are your url schemes.
The way I do it. Download the app "Iconical". It's an app used to create other icons to access an app. Once installed, tap "Select App" then hit refresh and you get a list of urls of all the apps with a url Scheme set up.
If the app I want is not in the list. Than I open the iPhone console, go to the AppStore, find the app and open it from there. Then look for its bundle identifier in the iPhone console and use the last part as url scheme.
Ex.: com.cie.appName. This always worked for me. Hope this helps.
UIApplication.shared.open("appName://", options: [:], completionHandler: nil)
Get yourself a copy of the "enterprise" version of iTunes that lets you download .ipa files direct from the App Store. (Mentioned, for example, here.) Now you can open the .ipa and examine its components.
You can find URL scheme of any app in device Console if you connect your device to your computer and open the app. SpringBoard logs a lot of actions to the console, showing URL scheme every time.
e.g.
URL scheme for Firefox: org.mozilla.ios.Firefox
default 15:34:38.460964 +0100 SpringBoard [org.mozilla.ios.Firefox] Setting badge to (null) [ old badge: (null) ]
I'm specifically looking to see if SugarWod has implemented a Custom Url, and if so, what it is. They have no developer documentation available and their support has yet to respond back.
If that's unknown, is there a list of sites that currently implement a Custom Url, so that another iOS app can open it?
Or is there a way to see find the Custom Url of an app, if it exists, from your device, iTunes, etc?
Thanks a lot.
It supports a custom URL which starts with sugarwod://
You can easily find this out for any app you have the IPA file of.
1. Rename the extension of the app from .ipa to .zip
2. Extract the zip file
3. Go to the Payload folder of the app
4. Right click on the single file there and choose "show package contents"
5. Open the Info.plist in Xcode and look for the URL types
If there are supported URL's, they can be found there.
Is there a way to use URL schemes to open another app (not a common one like maps), without having access to the source code of that app? I'm working for a company that has several apps, and they've tasked me to build another app that will concatenate all of their other apps. If I really need to, I can email my boss and ask about setting up the codes.
If it helps, I'm using XCode 7.3.1, in Swift 2.
By the way, I checked for similar questions, but couldn't find any. If you do find one, send a comment with the link and I'll delete this question if the answers the the other question help.
Thanks in advance!
Download the application onto your device (sync to iTunes to get the IPA) or to iTunes. Right click and choose show in explorer or finder.
Now you have the IPA. Change the extension to .zip and unzip it. Open the payload folder.
Go into the application's folder (Right-Click Show Package Contents on OSX).
Open "Info.plist" and look for: URL Types key. One of the sub-keys in there will open the application.
Update:
Download the app on any iOS device.
Plug it into the computer.
Download Apple Configurator 2 from the Mac Appstore.
Next open apple configurator and right click on your iOS device and press "Add".. then find the app you want to download. Once you find it, double click it and it will tell you that the app is already installed. DO NOT click any of the options on the popup.
Open a terminal and type:
cd ~/Library/Group Containers/K36BKF7T3D.group.com.apple.configurator/Library/Caches/Assets/TemporaryItems/MobileApps/
Then type: open . to open the directory.. You should now see the .ipa file..
I have an app that downloads files that need to be edited and submitted back to the server through the app. These files could be anything, but are most likely to be .docs. I want to be able to open and edit these files in another app on the device, such as a .doc editor.
I've been able to get this functionality to work in similar Android and Chrome apps, but I'm very new to iOS so I'm not sure what my options are.
Is there a way to give permission for another app to edit a file that is in my app's sandbox? If not, is there a way to get the file back for submittal (like finding it through a file explorer launched through my app - similar to an 'Open..." file explorer dialog used in Windows/Mac OS/Chrome)? Am I going to have to create a way for the editor app to share the edited file back to my app?
Thanks in advance for your help!
To manage the file and the paths take a look at the documentation for NSFileManager:
https://developer.apple.com/LIBRARY/mac/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/Reference/Reference.html
I usually write using NSFileHandle for reading and writing:
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSFileHandle_Class/Reference/Reference.html
Hope this helps.
iOS8 will provide methods to allow apps to co-operate with "extensions".
See "Creating Extensions for iOS and OS X, Part 1 & 2` in the WWDC14 videos.
Also see the Apple "App Extension Programming Guide".
I ended up sending the file to a 3rd party app for editing and then sending the file back from the 3rd app to my app.
I would like to know if it is possible to let another iOS app open a file my app has created and then the other app edits and saves it just in the original location where my app had saved it at creation time. Or, instead, are files opened with the NSUrl in UIApplicationLaunchOptionsURLKey just read-only so they just can be saved in the other app sandbox?
You can't edit other apps sandbox, it's private to your own app (except for the Documents folder, that a user can access from iTunes).
You also don't have access to the file system of the phone.
Welcome to iOS :)
The best way to achieve this is a custom URL scheme. The other option would be iCloud, but I think the URL scheme is the way to go here.
Edit I see the link doesn't work correctly, not sure why, just scroll the page down to the Communicating with Other Apps paragraph.