Background: I'm learning Apple Wallet by creating a barebones sample app and am trying to automatically update a pass. In order to do so, I understand I need to run a web server that sends push notifications to the device when it's time for the pass to update. I'm using Apple's sample code and running their Ruby webserver via localhost. It correctly generates a .pkpass file, which I can add to Apple Wallet in the simulator by visiting the localhost site or by dragging in the .pkpass file.
Problem: This process doesn't work on my physical iPhone. When I go to the localhost on my iPhone, it shows a 200 response code but comes with the popup "Safari cannot download this file." Even if I try just emailing the generated .pkpass file to myself, it won't open in Wallet.
For anyone who may be wondering, I got it to work by changing the web host to https. Then I ran into another problem getting automatic updates to work, solved here: How to allow HTTP webServiceURL in apple wallet's pass.json file
Related
I'm currently working on implementing universals links into my App, they work perfectly on my simulators whether using command line xcrun simctl openurl booted or by tapping on links from messages
BUT I cannot run them on real devices (3 differents iPhones tested with 3 differents iOS 14.X versions)
App configuration > Signing and Capabilities > Associated Domains are correctly setup as applinks:<domain_name>.
I've already tried to :
uninstall/reinstall the App
clean my build repository
reboot my device
wait 5 minutes after installing the App
use another HTTP protocol for the route https://<domain>/.well-known/apple-app-site-association
tap the link from many apps (messages, discord, notes...)
expose my site with ngrok / localtunnel / apache server (in prod)
turn on/off "Associated Domains development" in Developer settings
I've verified on AASA validators sites like branch.io or appsflyer.com and everything is OK, once I reinstall the App to my iPhone, the aasa file is requested and it returns a 200 OK http response with the correct Content-Type : application/json
I ran out of idea to solve this issue. I really want to make it works before deploying the app on the Appstore even if it is working fine on simulators.
Thanks for your future help
Unfortunately, Universal links are not reliable for everyone, this seems to be an issue where the AASA files are not getting downloaded in the device.
Known Bug
There is a known universal bug for Apple where devices for iOS version 11.x+ , the AASA files do not get fetched and thus causing the Universal Links to fail.
Validate the issue
Normally, the Apple OS looks into retrying to fetch the AASA file at some time interval but the workaround might help for a test condition.
Inside the app, check if the AASA files were downloaded successfully or not. To do this:
Copy the link into your notes app.
Long-press the link till a dropdown appears. If the dropdown shows 'Open link', then Universal Links are not working for that device. If the link shows 'Open in app name', the configuration is working fine.
Backup plan
Also you can implement a fall back deeplink call on your sercerside with the help of user-agent and other stuff
In your apple-app-site-association file check if you are using "appID":".bundleid". If so, try replacing it with "appID":".bundleid" or vice-versa.
I use the cordova plugin "ionic-plugin-deeplinks" (to my knowledge also works with a plain cordova app).
On Android, links when clicked let users choice between chrome and my application.
=> I suppose that app links works
=> As I'm able to access window.IonicDeeplink and redirect the user to the right page
I'm not able to have the same behavior on iOS, when I click a link I always get the app open in Safari.
How can I find clue on issues ?
More context:
apple-app-site-association is got with a HTTP 200 (over https only), it's located in /.well-known/apple-app-site-association:
I checked TeamID and BundleID 5 times (at least);
with the branch.io validator i get all validations green:
Your domain is valid (valid DNS).
Your file is served over HTTPS.
Your server does not return error status codes greater than 400.
Your file's 'content-type' header was found :)
Your JSON is validated.
with the apple validator, I got : "Action required
Could not extract required information for Universal Links. Learn how to implement the recommended Universal Links.
Error no apps with domain entitlements
The entitlement data used to verify deep link dual authentication is from the current released version of your app. This data may take 48 hours to update." (but some devs said that working app add the same error) what to do with that result?
when monitoring server's log while installing the app with Xcode I see a request get a HTTP 200 on apple-app-site-association
while installing the app with Xcode I got no logs referring to swcd in Xcode (I read here that I should if I had error while installing the app). Is a successful installation silent?
I followed that guide to setup entitlements, but some things feel odd with it:
Unlike the snapshot in the guide, I didn't found any *.entitlements file in my project. Should I have one with cordova? (my xCode seems to remember my setting though). Is it possible to check that installed app get entitlements?
I did set my domain in Xcode like this: applinks:mydomain.com and the switch is ON. But I never uploaded any thing from my local dev environment to apple services. Should I have? If yes, how ?
My current interrogations are highlighted but any explanations on any lack of understanding will be more than welcome!!!
Until then I started a verification for testFlight looking for more info.
while installing the app with Xcode I got no logs referring to swcd in xCode
I implemented Universal Links manually, but situation was similar. Particularly I mentioned empty swcd process log while installing the app, and it turned out that most likely iOS didn't even try to download apple-app-site-association file, like if responsible process wasn't run. In my case device restart helped and deep-linking began to work.
Thus I think restarting device is one another step in troubleshooting when you are sure about all your setup.
For anyone trying to debug this in development:
In XCode, ensure you're editing the Debug version of Signing & Capabilities.
To bypass the Apple Universal Links CDN, configure your Debug domains like applinks:?mode=developer -- adding that query string in development is important.
On your iOS Device, go to Settings->Developer->Universal Links and ensure the Associated Domains Development toggle is switched on.
On your iOS Device in Settings->Developer->Universal Links->Diagnostics, enter your Universal Links URL and ensure you get a green checkmark.
After following all of these steps, Universal Links work locally.
I am working on an app where I deploy the .ipa file and manifest.plist on my server and from there I try to install the app to my iphone.
The app is initially installed but I need to check if a latest version is available on the server. I have done this part and now wish to install the latest .ipa from the server directly to my phone without redirecting user to the html page of the server
Found some links on stack overflow, especially this:
Download and install an ipa from url on iOS
I have done this:
let endPointURL = NSURL(string: "itms-services://?action=download-manifest&url=myUrlString")
UIApplication.sharedApplication().openURL(endPointURL!)
I get unsupported URL exception. Can anyone tell me how I can achieve this? Is there any other way to directly start installing the upgrade without navigating to the actual html page?
It's just for testing purpose. Only registered devices are allowed to do this.
Only single way is there to download your app and its app store. You can give app store link and it will redirect user to appstore.
And if you want to test just use test flight it's easiest way.
Your linked question also tells that. Just for testing purpose it's possible now.
I found this same issue before.
A workaround for this is to new up a webview (you can hide it if you wish) and then give the request to the webview to perform. When the request loads you will then be shown the popup asking if you wish to download the app.
Updated on 2015-11-1:
One solution I am trying is to start App Store using Applium, so that I can record/monitor iOS UI elements. just like what we did Selenium.
Let's treat App Store as a standard iOS app, is it possible to:
uninstall App Store from my iphone.
get the ipa file of App Store
unzip the ipa file and get the app bundle
run Appium with App Store's app file
Is it possible to get App Store 's ipa file?
======
I want to know the position of my apps when I search on the App Store. When I use the iTunes Search API. I notice the result returned from the iTunes search API for a specific search term are different from the result on the iOS App Store app.
I found This Question is also about this, the owner of that has find out the reason about this condition.
But there is no answer to solve this problem.
Actually I've been trying to build the search request, but it cames that the iOS Appstore is using the HTTPs request, so I don't know what to do with this.
Hope someone can help, I'll be very appreciate.
There is at this time no way to specify that you want the results you would get from an iOS device.
The most obvious solution that comes to mind is to build a search request that appears as I it came from ios in your app code.
I'm sure its possible to determine that by basically proxying an actual iPhone using say your router on your home network to log the traffic from an iphone.
Once you have that you can then basically reverse engineer the call in your app code.
As you can refer from Apple's guidance: Search API, there are too many ways of parameter combination.(Parameters includes:term, country, media, entity, attribute, callback, limit, lang, version, explicit, etc.) So it's almost impossible to find out the way of combination that App Store is adapting so as to get the same search results as users get directly from App Store.
You might want to see if you can get this to work:
In Mac OS X:
Launch iTunes
Under Library menu, click on [Apps] menu.
The iTunes will display all installed app
Right-click on one of those apps
Then click “Show in Finder” option
An alternative to this is simply open the directory of .ipa files stored by using this path: User/Music/iTunes/Mobile Applications
This probably only works with apps you downloaded, but it is worth trying.
It's possible to listen in on https connections by installing a trusted ssl certificate on the device and running traffic through a proxy - basically performing a man-in-the-middle attack on yourself. I've previously used Charles Proxy to do this - here's the guide how to set this up. That way you should be able to see exactly what request the App Store app is sending and what response it is getting. And thus it should also be possible to spoof this request and parse the results elsewhere.
I am new to this site, so bear with me. I just wanted to ask a quick question regarding the iOS Developer Enterprise Program. I am enrolled, and I have made a few apps that are ready for in-house distribution. I have uploaded the .plist and .ipa file to my website in a separate directory. However, whenever anybody tries to download it, they just get the error message "Could not connect to website.com". Then, when I open up Xcode and launch the console when my iPhone is connected and I try to download it, Xcode displays this: "Could not load download manifest with underlying error: (null)". The null part really throws me off. Everyone has iOS 7.1 (or mostly everyone), and the website does have an SSL certificate, so I can't figure out why it is showing that error. Any help with this would be great.
Thanks!
Was ready to give up and change SSL provider, but managed to get the reason for me. Hope this will help for someone:
Problem occurred because my server was responding 403 Forbidden for manifest download request by Safari (because this request does not send cookies required for being authorised).
You need to make sure that the website that hosts the .plist and the .ipa files uses https. This is a requirement in iOS 7.1 and above.