-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support send push notification by topic #74
Conversation
@ben181231, thanks for your PR! By analyzing the history of the files in this pull request, we identified @cheungpat and @rickmak to be potential reviewers. |
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. | ||
func application(application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: NSError) { | ||
print("Failed to register remote notification: \(error.localizedDescription)") | ||
self.registerDevice() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t understand when and why the user should call the registerDevice functions. Need much more doc in this file so that the developer knows what to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to inline the registerDevice
functions in the app delegate functions. That way the developer knows what to do in app delegate without referencing other functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay.
registerDevice()
is registering a device to skygear with null
device token. The device ID will be reused once the SDK can get the device token.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not sure what you mean, waiting for your update to this PR
@@ -22,7 +22,9 @@ | |||
|
|||
@interface SKYRegisterDeviceOperation : SKYOperation | |||
|
|||
- (instancetype)initWithDeviceToken:(NSData *)deviceToken; | |||
- (instancetype)initWithDeviceToken:(NSData *)deviceToken | |||
__attribute__((deprecated("Use -(void)initWithDeviceToken:topic: instead"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting, i didn’t know about this
no need for the return type of the method here, and btw the return type of the method is incorrect.
Ditto for below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... I will remove the return type of the method here.
This is trying to mark this method to as deprecated.
47fcb60
to
4adb4cb
Compare
Updated. |
4adb4cb
to
22698d1
Compare
connect SkygearIO/skygear-server#239