I'm developing an application that in my head needs push notifications. It's a simple app that make something like "orders management". It works like:
So I think that I need remote notifications to build this app. But I'm not able to create certificates because my type of Apple Membership is bound with my university (Politecnico di Milano) and I haven't permissions to create ids, certificates and so on.
How can I work around my problem? A solution can be to use a separate thread to cyclically look for changes in my web service and then use a local notification?
The first step to simulate a push notification in a simulator is creating and storing an . apn file. The file contains the JSON notification payload that the app would otherwise receive from the server.
To send a test push, go to Mobile Apps > Integrations > Test Push. Use the Apple Sandbox Certificates for Xcode and the Apple Production Certificates when testing from TestFlight.
As of Xcode 11.4, users are finally able to test Push Notifications via the iOS Simulator. We can send push notifications to the simulator in two different ways: Use a command provided by Xcode Command Line Tools in Terminal. Drag and drop an APNs file onto the target simulator.
Apple announced support for web push notifications for Safari on iOS starting in 2023. At the company's annual developer event WWDC in June 2022, Apple announced that this feature was coming to iOS.
The Simulator can not receive notification, however you can try to use https://github.com/acoomans/SimulatorRemoteNotifications which can simulate the fact that your app receive a notification. It basically create a tunel that you can use to send notification in your App. You will not be able to get it to work from your device or when the app is in the background.
there are no other ways to create a Push notification. You need to create some certificates to communicate with Apple Push Notification Server.
You can simulate something similar in app by using local notification, but it will be a sort of alarm at a specific time, useful if you want to "demo" something.
The other way as you said is poll the server at a specific interval to check if you have some pending information.
If you don't mind to spend 99$you can open your account and probably (if it is for your thesis) ask for a refund to Politecnico ( I did the same while I working for my thesis to cover some expenses).
Andrea (PoliMi Alumni)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With