Вопрос

As I understand for the moment, the location and time sensitive passes in Passbook only support time and/or location based notifications. So at the correct time and location, the user will get a notification for the pass.

I was wondering if these properties also can be used to change the pass. For example, if you are in some specific store, the coupon provides a 50% reduction instead of a 20% reduction. If it is not possible to do this locally on the iOS device, is it possible to send a request to the server based on location and/or date to achieve the same thing?

Это было полезно?

Решение

Sorry to be the bearer of bad news, but it's not possible to accomplish this.

Firstly, the data within the pass is fixed at any point in time. As you've said, it can be fixed to a list of locations and/or a date.

Secondly, the pass cannot communicate with a server except to request an update in response to a push notification. This means you will never know where a pass is.

The only option way to achieve something like this would be to generate passes using an app that is location aware, but I don't think this is what you're after.

Другие советы

You can send a push update to a Pass at a specific time. This way you can (for example) convert a 10%-off coupon to 20%-off on Fridays (and then switch it back after Friday).

After a user has initially 'Added' your Pass promotion into their Passbook you can update it at any time without requiring the user to 're-approve' your update.

Your server does not know when a Passbook user has triggered a location alert - otherwise you could track their movements via Passbook. Apple does not want their customer's security to be compromised in this way.

However, you could issue a coupon that is normally 20%-off (for most stores, or online) but that the location alert for a specific store said 'Get 50% Off at this store'. When the customer comes in to have their Pass scanned & activated, your server will then know the customer's location and can apply the 50% reduction.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top