Is it possible to send changeMessage notification at wallet creation? - ios

I have a website with Symfony for create IOS wallet and i want to know if is it possible to send a changeMessage notification to my users when they install wallet on their phones like : Welcome on your wallet !
Is it possible ?
For informations, my changeMessage notification work when i update my user wallet, i create notification parameter to send a notification message with 255 characters Max and my changeMessage call this parameter when pass is update.
Thanks in advance

Yes, it is possible but it takes a bit of work.
When a user first installs your pass, iOS will call the web service to register. Once registered it will immediately make a call to get the latest version of the pass.
If the pass returned is different to the pass originally installed then the change message will trigger.
Since this will happen just once at the time the pass is installed, you should achieve the same experience you describe in your question.

Related

Automatically Download Apple Wallet Pass After Redemption

Is it possible to download a second wallet pass automatically after redeeming a wallet pass. We have seen that this is possible but could not find any solution for this. As i know our api can only return one kind of pass to our servers with wether you update or renewing the pass. We have attached a video where you can see that they download a second pass automatically without adding the card. As far we know the Apple Api only returns a get when want to download a new pass with a push notification
In this video you can see that
the wallet is downloading a next pass (5:39)
WalletPass Video
Would really appreciate help in this
Regards,
Oktay
The product in the video is our product. All changes are made by updating a pass already in the wallet. As long as the passTypeIdentifier and serialNumber remain the same, you can change any other content in a pass.
We have a redeem API endpoint that marks the first pass as being used, and sends an update to remove the barcode. 15 seconds later, a second update is automatically sent with the new pass details. The new details replace the old details of the original pass. The user only ever has one pass in their wallet. It is not possible to push a second pass (with a different passTypeIdentifier and serialNumber).

Apple Mobile Wallet - how to send updated new pass coupon

Reference links & spacial THANKS to #Passkit:
1: how-to-make-a-push-notification-for-a-pass
2: how-to-use-changemessage-key-in-pass-json
im missing one part please i need guidance.
i'll send push notification using APNS service. im not able to figure-out, how i'll send my new pass.pkpass file or bundle to my costumer ? if answer is my web-service then how i'll know this request is for new or updated card request. Right now my web-service only updating database when any card removed or install.
im using passkit library and PHP to generate pass coupons dynamically. My API is in coldfusion.
This is a three step process.
When a user installs a pass on their iOS device and there is a webserviceUrl value specified, the device will register itself, providing a push token.
When the device receives the push notification, it will reach out to your API asking for a list of passes that have changed (using a timestamp). You return the serial numbers of all the passes that have been updated (for your pass type identifier).
iOS will then request the new pass for each of the serial numbers. If will diff the passes and display the relevant changeMessage values.
This is explained in more details in the developer guide: https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/PassKit_PG/Updating.html#//apple_ref/doc/uid/TP40012195-CH5-SW1

Firebase Cloud Messaging - Send message to all users

I'm new using the Firebase Cloud Message. I built an IOS app to receive push notifications. The app works fine. I send messages from the Firebase console and they're displayed correctly.
Now I`m trying to build an web api to allow my customer to send the push messages (without accessing the firebase console). Studying the documentation here I realized that I've always to have a "to", meaning a group, topic or device id.
My question is: can I send a message to all devices (like I can do in the console)? I yes, how so?
Thanks in advance!
You can make use of topics. Given that all of your users are subscribed to a specific one. Just like what I mentioned here (removed some parts, just check them out if you want):
If you are looking for a payload parameter to specify that you intend the message for all your users, unfortunately, it doesn't exist.
Commonly, when sending notifications to multiple users, you can make use of the registration_ids parameter instead of to. However, it only has a maximum of 1000 registration tokens allowed. If you intend to use this, you can make batch requests of 1000 registration tokens each, iterating over all the registration tokens you've stored in your app server.
However, do keep in mind that Diagnostics for messages sent to Topics are not supported.
I found this:
!('TopicA' in topics)
With this expression, any app instances that are not subscribed to
TopicA, including app instances that are not subscribed to any topic,
receive the message.
So you could probably use
condition="!('nonExistingTopic' in topics)"

Is it possible to send mails periodically from iOS app

I'm developing an app that creates a simple document with basic information created by the app. It won't contain any personal information, but it will contain data created and requested by the user. I want the user to be able to send this to themselves via email. I would also like to add the option for the user to have this file (which updates daily) to be able to send to them automatically every week/month, so they won't have to think about it. The user can set the intervals themselves.
Is this possible? The user will set up this option themselves from a menu, so it's not like they won't know it's happening. Every automatic mail will also contain information on how to turn the option back off again.
Is this possible and is it allowed by Apple?
Thanks for your reply
It is not possible from within the app. A user has to explicitly send the email through the MFMailComposeViewController.
If you want this functionality, you should build a backend for your app.
To clarify, if you want to use the users configured accounts; i.e. the account they use with Mail, then no you cannot do this automatically. The other answers rely on the fact a user enters their POP/IMAP settings, which personally I would never do.
You could use an email service as mandril or mailgun, to send emails "from your app".
Take a look at this: https://github.com/rackerlabs/objc-mailgun
There's a library called MailCore that's incredibly powerful. You can use it to send mail in the background of your app without needing to present the built in mail composer view
https://github.com/MailCore/mailcore2

Possible to send automated email?

The iOS SDK class MFMailComposeViewController can be used to let the user compose an email message.
What I'd like to do, is for the iOS app to send an email in the background, with no user interaction. Is this at all possible/allowed in the iOS SDK?
Nope. There isn't any API available to do this. You'd need to roll your own SMTP client and have the user enter credentials into your application. On top of that Apple may not approve this.
Unfortunately, I don't think Apple would ever allow this because (for example) then you could just get everyone's email address by auto-sending mail to yourself. :(
I actually wanted to implement something like this for the express purpose of alerting me when a critical error happens on an app in the app market.
Best solution would be to create an API (just ping a php file or something), and have it send the relative alert message to your email).

Resources