I am trying to determine how to extract or get programmatically the Custom URL Scheme from a application .ipa
file.
Is this possible?
Yes, this is possible. First, unzip the .ipa file. (you can rename it with .zip to do this). Then, inside the .ipa file, you will find there is a Info.plist file. You can parse that file, look for "CFBundleURLSchemes" and you will see first the app id followed by the Custom URL if one is defined for the app.
So I went to iTunes on my mac and looked in my App Library for the "APP IN QUESTION".
I then: • Right-Clicked on the "APP IN QUESTION" app and selected “Show in Finder”
• then duplicated the "APP IN QUESTION" .ipa file
• Then I renamed the .ipa file to end in .zip instead (saying, yes make it a .zip if necessary)
• Then I unzipped it to a folder
• I opened the Payload Folder
• I right-clicked the “"APP IN QUESTION".app” and selected “Show Package Contents”
• I opened up the “Info.plist” file in a text editor like the free TextWrangler.app
• I searched for “URL” and found the following:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>app-in-question</string>
<string>sslapp-in-question</string>
</array>
</dict>
</array>
I was then able to successfully go to Safari and type in: app-in-question:// and sslapp-in-question:// and was prompted if I wanted to launch the App in Question.
Yes, you can just unzip the ipa (this just a zip file), open the < application >.app and look for the info.plist. It should contain any custom app URL schemes, if the app supports it.
来源:https://stackoverflow.com/questions/6845693/how-can-i-extract-the-custom-url-scheme-from-a-ipa-file