How can I extract the Custom URL Scheme from a .ipa file? - iphone

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.

Related

Entilements not matching provisioning

Lately I've been having issues deploying my applications in-house
(enterprise developer program) with reports that some entitlement
values were not the ones specified in the provisioning profile.
I started looking into the issue, and found that, of course, the
values weren't a match:
Contents of the .mobileprovision file:
(as extracted by running security cms -D -i <mobileprovision file>)
<key>application-identifier</key>
<string>M7X5D8MA6U.some.masked.Identifier</string>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array>
<string>KNHHJPPHR7.*</string>
</array>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>KNHHJPPHR7.*</string>
<key>get-task-allow</key>
<false/>
<key>keychain-access-groups</key>
<array>
<string>M7X5D8MA6U.*</string>
</array>
And the entitlements are (as extracted running: codesign -d --entitlements - <app bundle>)
<key>application-identifier</key>
<string>5R678HMG35.some.masked.Identifier</string>
<key>get-task-allow</key>
<false/>
<key>keychain-access-groups</key>
<array>
<string>5R678HMG35.some.masked.Identifier</string>
</array>
I'm not specifying any entitlements file in my project, and the
mobileprovision file was downloaded fresh from the Portal.
Should I create an Entitlements.plist with those values just to make
the installer happy or is there a less hackish way of solving this?
And more importantly, why is this happening only with some builds of
my app? (Some other builds are fine)
Any other tips on how to solve and/or avoid this problem?
I have already tried the usual suspects: deleting all profiles, recreating profiles, re-downloading the certificate, etc...
Thanks!
What I noted was that I wasn't using a development provisioning profile for that specific app, I was using the team profile generated by Xcode. I took a shot at creating the development profile, and then it fixed itself.
Make sure, if you're not using iCloud, that your Provisioning Profile on the Apple Developer Page doesn't have iCloud enabled.
If so, disable iCloud and download the new generated profile and try again.
Had a pretty similar problem a few weeks back.
This can happen if, while doing a Release build, Xcode decides to use a wildcard provisioning profile.
Even though you go on to choose the correct provisioning profile in Xcode Organizer, when you hit the Distribute… button Xcode invokes xcrun PackageApplication which embeds the provisioning profile in your app and then resigns it. It also very carefully copies the original incorrect entitlements, like App ID Prefix, APN entitlement, gleaned from the wrong provisioning profile, into your new IPA. This will likely fail to install.
I'm not sure why it does this, maybe because not all entitlements come from provisioning profiles.

Setting up "Application uses WiFi" property in info plist

I was trying to set "Application uses WiFi" property in my application info plist but to my surprise, I was not able to find this property in the info plist.
The XCODE version I am using is 3.2.6 and IOS is 4.3.
What can be wrong here?
You can open your info.plist file as source code and then add this
<key>UIRequiresPersistentWiFi</key>
<true/>
Before the </dict> tag

Application on server

I want to put my android application on server and i used .apk file for that.
But our admin wants a plist file as of in iphone.
I dono what is plist in android and how to generate it.
Please help.
.plist files are the Mac version of preference files. Similar to .ini files on Windows. They contain the preferences for a particular program. For example the bookmarks.plist would contain your bookmarks.
Android applications usually(but not stricted to) store their preferences in the xml file with name, defined by developers. Tell your admins that the file is not necessary for an android application.

Format of applications submitted through Application Loader?

When I am using Application Loader to upload the app binary to the Apple do I submit a .zip file of my whole application or the .ipa file. I am confused about this process.
For iOS applications you just need to submit a zipped .app, the same .app generated by Xcode is enough, no need to put it into an IPA before archiving it.
For Mac OS X applications (Mac App Store), you need to submit the PKG generated by Xcode's Organizer Share/Save To Disk… command.
Alternatively, you can use the Build And Archive command and submit via the Xcode Organizer window… as another user points out.
If you have Xcode 3.2.5 then you can verify and upload your application through Organizer.
1.) Xcode -> Run -> Build and Archive
2.) Xcode -> Organizer -> Your Application (under Archives) -> Verify / Submit
Your app must already be setup and in waiting for upload mode in iTunes Connect.
I was able to create the archive in XCode 4, export as .ipa and upload that using Application Loader.
You have to submit a .zip file containing your Release build (the .app file inside the build/Release-iphoneos/ folder).
There are several options.
One that worked for me is to use the Finder to find and select the .app bundle, then use the Finder menu item to Compress this .app bundle. You can then select the resulting compressed file in the Application loader when your app is marked "Waiting for upload" in iTunes Connect.

iPhone / iPad enterprise distribution problem

I've just set up our iPhone / iPad Universal app to support Enterprise Distribution. I've hosted the provisioning profile, the plist file, and the application itself (the IPA file) on our private servers.
Users can go to Safari on their device and download the provisioning profile and it installs itself just fine. They can also view the plist file (we used this to test connectivity, etc).
However, no matter what we try the application file itself will not download. We navigate to our 'get' URL which sends back the manifest (plist) file, which in turn redirects to the application (IPA) file itself. Safari displays a 'Safari cannot download this file' error and we get a 'broken pipe' exception thrown on the server side.
I'm kinda stuck, so any help would be greatly appreciated!
Thanks in advance,
Ben
You shouldn't need anything but the plist and the IPA file, since nowadays the provisioning profile comes bundled in the IPA.
Did you create the plist yourself. or did you have XCode generate it for you with through the "Build and Archive" path in XCode?