Push notification on iMessage Extension App - ios10

I'm creating an iMessage Sticker Extension App on iOS 10. I'd like to push remote notification when the system have a new sticker.
Can we do that?

If your extension is embedded into an iOS app, you could use the iOS app as the receiver of the push notification. That will work for sure.

Related

Cannot receive Custom notification in iOS using Firebase

I'm developing an iOS app that uses Firebase push notifications. It worked well with Testing Firebase Notifications and receiving notification on iOS device.
But Custom notification is not receiving on the device. How to debug what is a problem ? Is it a problem from Firebase console or iOS development issue.
Using an iPhone with ios 11.
For some reason, FCM isn't working on iOS 11. Read about it here
https://github.com/firebase/quickstart-ios/issues/327
In your podfile change your FirebaseMessaging to pod 'FirebaseMessaging', '2.0.0'

Camera access for iMessage extension on real device

Guys from Apple who talked in 2 sessions dedicated to iMessage app and Stickers showed few demos all using iOS Simulator, but as we know it doesn't emulate camera features. When trying to install iMessage extension on real device it just opens iMessage app with latest received message without being able to tap on "Message App Store" button. I'm interested in testing my extension on real device because it's using device camera, but couldn't make it work.
Thanks.
It was a bug. After updating device to iOS 10 beta 4 and Xcode to version 8 beta 4, the extension is installed and running on device.

Show a notification from watchOS 2 app

It is possible to show a notification from Apple watchOS 2 native app? Although watchOS 2 applications can run directly on the Apple watch device, it still hasn't reference to the UIApplication.SharedApplication, so I can't all the UIApplication.presentLocalNotificationNow() directly from the WatchKit app an it seems that also the WKExtensionDelegate cannot be used to show instant notifications.
The WKExtensionDelegate can respond to local notifications via the didReceiveLocalNotification(_:) method. Your iPhone app will have to schedule the notification. If it is an even that only the watch knows about, you can send a message to the phone app using the WCSession set of APIs.

How to test push notification on the Apple watch?

I'm able to test push notification using Apple Watch simulator and the "PushNotificationPayload.apns" file by selecting Notification:
How to test push notification on the actual Apple Watch?
--> I've tried to use exact steps for simulator. But the Apple Watch will just launch the app, bypassing the notification view.
The APNS file is available only for testing in the simulator. It doesn't work on a real device. You'll have to test push notifications the same way you would for an iOS app: actually sending a push notification to the device.
There is a simple process to test the push notification on Apple Watch. It is same as in iPhone. Also Inside your iPhone -> Apple Watch-> Notifications -> Mirror iPHONE alerts From-> turn on your notification.
There are following things which you need to take care while testing the Push notification on Watch:-
1) IPhone should not be active and Watch should be active.
2) IPhone and watch both should not be active.
3) IPhone and watch both should not be deactive.

How to send msg between iPhone app and WatchKit app?

I am newer one for Apple Watch development.
Can you please provide me about how to communicate from iPhone app to Watch app and from Watch app to iPhone app ?
As I can see, there is a notification controller which is related Apple Push notification. I would like to connect to Watch app directly via Bluetooth or something. For example, As soon as iPhone app sends a MGS to Watch app, the watch app shows this MSG without any delay.
Thank you.
In order to communicate with the iPhone app from your Watch extension you can use openParentApplication(_:reply:) since Beta 2.
For the other way around I have been putting a file into the shared app group folder and monitor it from the Watch extension. If the iPhone app modifies the file the Watch extension will be notified and can act on it.