Error when downloading Apple Pass in Chrome for iOS - ios

Issue with downloading Apple Pass on an iPhone device using Chrome and Firefox. It works fine on Safari. On Chrome for iOS it says:
Sorry, your Pass cannot be installed to Passbook at this time.
For Firefox it says:
Failed to Add Pass An error occurred while adding the pass to Wallet. Please try again later.
I tried just downloading the Apple Pass from a desktop browser and it downloads and I can install it fine on an iPhone/simulator which I'm assuming is not a problem with the pass itself but maybe rather something I'm missing in the response.
Here is the code I'm using to return the Apple Pass.
private void ReturnResponse(byte[] applePass)
{
Response.Clear();
Response.AddHeader("content-disposition", string.Formate("attachment; filename={0}", "sample.pkpass"));
Response.ContentType = "application/vnd.apple.pkpass"
Response.BinaryWrite(applePass);
Response.End();
}
Expected result:
Apple Pass opens and allows the user to add it to their Apple Wallet.

I realise this is question is over a year and a half old, but this is still an issue as of March 2021. After a lot of trial and error we managed to get it working on Chrome & Firefox. Our specific issue was that the request has to be a GET, and we had a form before the Pass was downloaded that submitted as a POST. Once we change the form to submit a GET the issue was resolved.
We tried to keep the POST and return a 201, which feels correct, but the issue persisted.

Changing our request method from a POST to a GET when serving the pkpass made it possible to download the pass using Google Chrome for Mobile on an iOS device.

This is untested, but I have found this link which I feel might be related:
https://github.com/eymengunay/php-passbook/issues/73
It says that the anchor you using to link to the pass should contain the this attribute:
target="_system"
I have not tested this resolution myself.

I just bought 20 access passes from a website. The site had the option to "add to apple wallet". It worked fine for 19 of them and then on the very last one I got this same error.
I did not do anything different when trying to add the 20th one.
Wondering if there is a limitation with the number of passes you can add?... but why would it be limited to a random number like 19?

Related

angular link selection doesn't work on IOS safari

I'm doing a responsive app using meteor and angular, and i have a share link functionality. On desktop it is an input field on read only and the user can copy the link. On mobile I want to do display an link with tag. But on iOS safari doesn't react correctly when I long touch the link. Usually there is a menu of option that are displayed, but here just nothing happen.
my simple code : {{url}}
Thanks in advance to anybody that has an idea about this issue.
Update: I just tried wiht <a ng-href="{{url}}">{{url}}</a> on Firefox android and it work perfectly. The issue is really an iOs case
You should use ng-href={{url}} instead.
My guess is that iOS reads first the {{url}} as it is, and when angular updates it to whatever value is stored in the url variable, it does not pick up the new value.
And because the string {{url}} is not valid url, it does not know how to work with that, so it does nothing.
(I am not iOS developer, but still, you should use ng-href for this)
For long touch/press especially for mobile: Check this angular directive link

xcode apigee logInUserWithFacebook extra parameter?

I'm using Apigee for my iphone/ipad app.
Like many apps today, mine requires a login via Facebook and Apigee has a function specifically for this in the iOs framework, here's how it's called:
[ApigeeDataClient logInUserWithFacebook:[FBSession activeSession].accessTokenData.accessToken];
As far as my code goes, everything works well up until the above line. I'm receiving the following error.
Response: {"error":"invalid_request","error_description":"missing access token"}
However check out how the function is making the call (from the logs):
Synch outgoing call: 'https://api.usergrid.com/sgfishing/deepseafishing/auth/facebook?ql=fb_access_token=CAADrhKxrQp4BANfZCMuZBdOwUL9nc0H4VzZC1EXVLjABRbcrucTlUgwlKczFinl51GIWyBM5nlZBX1RF84azFAEOfChqN7vgSmvqgwybV8iPU2xjncZB9T5YTdY0pesJkHsSlvOafMhQ6MfIa6qdZCbTYBZCFB2oIPgEnro4runJKcqCy68wZCFQwyIzACVThAC3IEjZADs36hToQxhYZBzAWVhbKlcqJQsroZD'
I would like to bring your attention to this ...facebook?<b>ql=</b>fb_access_token=CAADrh....
I'm not sure why ql= is there, I've checked the definition of logInUserWithFacebook and ql= is nowhere to be found.
Any help would be greatly appreciated.
This is a bug in our iOS SDK. It has been fixed in version 2.0.9 of our SDK (released yesterday).
?ql= is typically used for query language statements see if there is any such code around in your program
This just a tip...may help

iOS 6 SLComposeViewController - creating a facebook post with text and URL - no image

Quite simply unable to make a post with just the text and NSURL object. I can do it with just the post, or with the post, NSURL and image, but ideally I'd just like to provide the link with the post.
It simply states "Cannot post to Facebook" as "The post cannot be sent because the connection to Facebook failed."
Is there anything I can do? I'm not using the Facebook SDK at the moment, but perhaps I might have to?
Many thanks
We just started running in to this issue with code that was working correctly yesterday. Googling shows a lot of people having this issue sharing from other Apple apps today via native integration. I actually think this is an issue on Facebook's end.
I tried sharing a URL from Mobile Safari and it too fails with the same error. Can you confirm that Mobile Safari also fails to share?
Well for now I'm able to leave the image part nil (still include the method, just leave the argument nil) and it will show the text and link only.

custom URL Scheme in iOS 6 not working?

My app uses a custom URL scheme so i send a link to my users in an email which when clicked, launches my app installed on their devices. This was working seamlessly till iOS 6 came into picture.
Now when the users click on the link or even type the address manually in the safari they get an error saying "Safari cannot open the page because it is a local file."
Wondering if anyone else encountered the same or if someone has any pointers in this regard !!
Any help much appreciated...
Update: it works if I only give my app's custom url without any parameters.. e.g. if I do "reader-app://" it launches my app but if i do "reader-app://doc=xyz" it doesn't !
try: reader-app://?doc=xyz (add a question mark after //) this way you'll specify a query string. It works for me, but it presents an alertdialog asking the user if she wants to open the url with my application
Try to remove the - sign from reader-app://.
My URL was not working until I removed underscore sings from URL.
Ex:
my_app:// is not working.
myapp:// is working.
That is just a guess.

Facebook iOS Mobile Web JS SDK Error

We already have Facebook working on our main desktop app without an issue. When I added the same setup code to our mobile site I received an error from the JavaScript SDK:
Received message of type object from https://s-static.ak.facebook.com, expected a string
Then, I changed the setup code to an exact replica from here: https://developers.facebook.com/docs/guides/mobile/web/ and received the exact same message.
This error only shows when the user-agent is iOS or Android in Chrome Developer Tools or in the iOS Simulator. When it's running from the desktop, we aren't seeing this error.
Any idea what's going on here?
Thanks :)
With all due respect, I believe that bokonic's answer is missing the point. The immediate reason of the message you're receiving is most likely javascript postMessage method. It is used to communicate your website with an object returned by window.open or an iframe's embedded website.
window.parent.postMessage(message, targetOrigin);
You might want to have a look at this article to see how it works.
According to MDN reference first argument of the postMessage method can be of any type. Still, Prior to Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3), the message parameter must be a string.
I tested the method on Chrome 28.0.1500.72 (latest version when writing this answer) and it works fine when passing an object but still throws the warning message to the console. I believe that facebook feels uncomfortable with passing some rich data as a string so they pass it as an object and simply doesn't care about the warning. Or, since there is a workaround (e.g. JSON.stringify), they have a bug they don't know about.
I had the same error. This isn't necessarily the reason you're getting it, but I ended up looking at the packets being received by my iphone simulator, and here's the error from s-statick.ak:
[truncated] <span>Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one o
For me, the error is that on my device(s), I'm accessing the site through an ip address (192.168.xx etc) and on local development I have hosts routing localhost to a url that is in my facebook app config... so the IP isn't configured for the app.
Facebook won't let me use an IP address, so it seems like the only option is a test deploy or a DNS server. Hope this helps you out.

Resources