iOS OTA install not registering custom URL scheme - iphone

For one of our clients, we have developed an OTA app store for distribution.
To enable testing if the apps are installed, in each of the apps I wrote, I added two custom URL schemes: one that's just the app id, and one with the app id and the version (both with . replaced by -); so for example com-mycompany-app and com-mycompany-app-1-2-0 for com.mycompany.app, version 1.2.0.
Then, in our "app store" I just use [[UIApplication sharedApplication] canOpenUrl:] to determine if an App is installed or the latest version, and if so, replace the "Install" button with an "Open" button.
When installing the app through XCode, it works great. However, when I install the same app OTA, through my "app store", the canOpenUrl: call always returns NO. To see if it was a caching thing, I have tried restarting the "app store" app after OTA install has finished, but I get the same results.
Is this an issue with my manifest plist file? In the Info.plist that belongs to the target, the custom URL Scheme stuff is obviously there, but it's not in the manifest's. However, I would imagine it only uses the manifest to launch initial install...shouldn't the Info.plist be used during actual install to register these sorts of things? Is there something else I'm missing?
Thanks!
Edit: I'm using a custom build script to actually create the .ipa and .plist files that are being used for OTA distribution. I tried using iPhone Configuration Utility to install the IPA directly, and my app store was able to recognize those URLs as being openable. The only possible things I can think of are either that the plist I'm using to download & install needs to have some sort of reference to these custom URL schemes, or it's actually a legitimate bug in Apple's OTA framework.

I got this working, in case anyone is watching this or stumbles upon a similar issue.
The only thing I changed -- and there's no documentation saying the old way wouldn't or shouldn't work -- was to use periods in my URL scheme, instead of hyphens. So com-company-app:// became com.company.app:// (same as the bundle ID), and likewise with the version-appended one.
I don't know if my old URL schemes were violating official URL spec, or if you're supposed to use reverse-DNS, but everything is working, now.

Related

Catalyst app info.plist not being recognized

I am trying to submit my first catalyst app to the Mac App Store. I have setup the App Store information in iTunes Connect, and I have confirmed that the info.plist in app has the following key in it:
<key>LSApplicationCategory</key>
<string>public.app-category.business</string>
However when I go to upload to the app store I get the message that I need to add the LSApplicationCategory
ERROR ITMS-90242: "The product archive is invalid. The Info.plist must contain a LSApplicationCategoryType key, whose value is the UTI for a valid category. For more details, see "Submitting your Mac apps to the App Store"."
I have confirmed that both public.app-category.business is correct, and I have also tried using the value "Business". I get the same error message. Is there something else I need to look at?
The key which you are adding to .plist file is wrong. Add below key-value pair. Full list here.
<key>LSApplicationCategoryType</key>
<string>public.app-category.business</string>
slicerdicer's recommendation worked for me. To add some additional detail, you can also set the App Category by going to Project / Targets / General. It's the very first option.
I had sucsessfuly upload two apps using catalyst then the third failed with that error. I found this and seemed to work.
To the info.plist add App Catagory with what ever catagory your app fits. I used Productivity.
I was converting an iOS app to a Mac app, and I was updating the file info.plist, and it was not actually updating the overarching project.
I ended up having to go to the overarching project, under the left side TARGETS tab, I selected my app, went to the Info tab, and added the App Category there.

Does iTunes pass referral parameters on iPhone once app is installed?

Is there any provision in iOS wherein the referral parameters used to start the iTunes application are passed on to the application on its first run?
For example in Android, if I use a link such as http://market.an......com.company.pany&referrer=heythere to download an app on Android and actually install the app, the Market app passes the "referrer" parameter and its value to the app on its first run, which the app can use to any extent.
Is there a similar provision in iOS?
We also struggled with this when we built our last mobile app, Kindred Photobooks. The best way we found is to basically bundle that information in the link and use fingerprinting to make that data available after install, which is working really well.
You can try to build fingerprinting in in house. Basically the steps would be the following:
1. When a link gets created, appending parameters to the link, or create a link reference in some backend database if you want shortened links
2. When a user clicks on that link, collect a fingerprint of their device from everything you can read in the browser (for example: IP, OS, screen size, etc) and redirect that user to the app store.
3. When the app opens, create a similar fingerprint from the same parameters collected in app, and match it up in your database to the outstanding fingerprint.
4. If there is a match, you can return those link parameters to the app through install.
Alternatively, if you don't want to build all that infrastructure and handle the many edge cases, we bundled it up into a free service called Branch. Check it out at http://branch.io
No, there is no such thing on iOS. But you can and should file a feature request at bugreport.apple.com, if you really need this feature.
As of iOS6, if someone installs your applications via a smart banner, you can pass a url to your app on startup. You do this by using the app-argument parameter:
A URL that provides context to your native app. If you include this, and the user has your app installed, she can jump from your website to the corresponding position in your iOS app. Typically, it is beneficial to retain navigational context because:
It should work on install:
When the app finishes downloading [after clicking install on an app banner], the View button changes to an Open button, and tapping the banner will open the app while preserving the user’s context from your website.
More here: http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html
I think this will work (but the jury is still out: Does app-argument on Apple Smart Banner get passed to app on install? ), but testing this is tough: How to test Smart App Banner Urls on in Dev environment
No, AppStore doesn't pass any parameters to application - it just unzips ipa to application folder (container).

How to build an app for Cydia store?

I have built an app for Apple's App Store, now I want to submit the app to the Cydia store. How can I do this? Should I just post the app.zip file built for the App Store to the Cydia store?
There are a few differences compiling your app for Cydia vs the App Store. Big Boss does a good job explaining the difference in his post:
How to Compile for Cydia Submission
You should check out iOSOpenDev. It incorporates a lot of Cydia tweaks, Theos, Activator and all kinds of other things into Xcode. It allows you to create a new (Cydia) tweak of your choice and you can even launch that tweak on your device from Xcode.
To submit an "App Store" app, you would need to make sure you adjust the user directories. Since you will install the app into /Applications, there will be no sandbox; no Documents directory dedicated to just your application.
You will also need to sign your app with ldid. This "fake" code-signs your application so it can run in iOS. To submit the app to Cydia, you would need to find a repo you are comfortable with hosting the app, like BigBoss.
Be careful though, submitting an App Store app to Cydia could potentially get your app thrown out of the App Store and your developer account revoked.
In terms of building an actual full application, I believe the development process is the same but the compiling and preperation of the binary is different. The provided link is a good resource
If you intend to make a tweak which hooks into existing Apple classes and methods then you need something like theos by DHowett, a good basic tutorial is here
u need to create a repo. or send them to MMi's collection
to make a repo read Saurik's Guide: Here
Or read the easier guide that MYI made for us at: Here
to submit a package to the MMI repo,
try the Developer Portal:
http://modmyi.com/mmi/
Some info regarding paid packages:
http://modmyi.com/cydia/cydiastorefaq/
Basically, all the content in your theme must be your own original work.
All the graphics / sounds must be created and owned by you.
If you have further questions, drop a note to the admins:
http://modmyi.com/sendmessage.php
Well first of al if your app.zip is the .app file found in the payload folder of a .ipa file, then disregard this next step. Anyway, open up app.zip, go to payload, and then take out app.app. Make the app.app app.zip. Now go to http://www.myrepospace.com/iDeb and upload your app.zip. Then when it's done, download your new .deb file.
Despite of the title you seem to ask about submission rather than (or in addition to) building. I'd consider this the one best reference:
http://cydia.saurik.com/faq/repositories.html
It is from Cydia itself and includes sschunara's links and other BigBoss references plus more.

iPhone distribution Over the Air

In order to distribute my iPhone for test purposes on a couple of device Over the Air, I have created an AdHic distribution profile and followed the explanation I found in this blog (sorry it's in French but the screenshot are quite detailled):
http://www.media-business.biz/content/iphone-cr%C3%A9ez-votre-propre-appstore
I install the position profile on the device from my web site but when it comes to the application I have an error message saying it's impossible to download the app.
Is this a known problem ?
Thanks a lot for your help.
Regards,
Luc
ps: just adding a last minute question... is there a place I could see some error logs ?? :(
Here's another explanation in English. This distribution method only works with devices running iOS 4.x
Make sure that:
The IPA file name matches exactly the name of the server (case sensitive).
The bundle version number is identical in the IPA file and your plist file, and that you update it every time you make a new IPA (or the phone will think it's already installed and not update)
You are using an itms-services:// link to point to the plist file, and the plist file has the correct URL to your IPA file.
When you go into Organizer and press the "Share" button, you select exactly the distribution profile you intend to use (sometimes I think it can select the wrong one with automatic).
I had this exact same issue, and it was because I hadn't installed an AdHoc mobileprovision file and was building against my Dev mobileprovision. Check that first.
I finally found testflightapp.com, that is really great !
I also think testflightapp.com is the most convinient way to do this, as long as the beta testers you'll contact accept to sign up there. The great additional value is that if you install their SDK in your app, you'll be able to monitor the activity of your beta-testers (for instance you can define waypoints with definite names).
However, if:
You already konw the UDIDs of your beta testers
You just want them to be able to click on a link from your server to start installing the app,
You don't need "in app" follow-up and just request feedback from your testers,
Then I strongly recommend this tutorial:

How to automatically update an iPhone app from within the app itself?

This link shows a video where an app upgrade is "forced" from within the app itself:
http://buzzworks.de/blog/update-ios-beta-apps-from-within-the-app
The App Store is not called in and it's said to work only for AdHoc
apps.
Anyone knows how is this possible?
edit: please give a look to the video before answering. AdHoc apps are signed by the developer and they do not come from the App Store. This sort of forced update is useful when doing beta testing and in enterprise applications.
I've found that it's all explained here:
http://developer.apple.com/iphone/library/featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html
The developer should create an .ipa with the app and a manifest in plist format with the URL to the .ipa and a few other things.
The app can optionally implement its own way to find if an update is available and open
the URL to the manifest.
I didn't it's really possible because the app has to somehow sign itself. The best I can think of right now is that the app is not signed?
You can always force people to go to the app store when a new version is out. Simply make the app connect to a webservice first. Other solutions are not accepted by Apple, or will quite simply not work because of other issues (signing is one of many).
You could also design your app in such a way that forced updates are never a requirement. You can load your user interfaces from the web (Apple has presented some valuable information about that during the previous WWDC), your data can come from the web, and if there is any other correction to do just ensure your app is backwards compatible.
That's how the app store works. And it never requires a 'forced update' ... Well, almost never ;-)