Register Template causes crash issue when launching app

Hi all, I am experiencing crash issue when my app is trying to register the device for notification function. It runs well on a iphone 6 device with ios 11, but this line of code crashes on a newer iphone model with latest ios 15.

self.hub registerTemplateWithDeviceToken:sharedManager.pushTokenData name:@"myTemplate" jsonBodyTemplate:template expiryTemplate:nil tags:tagSet completion:^(NSError *error) 

Have anyone of you encountered similar issue before? Or is it possible that there is some configuration settings I may left out in XCode?

Thanks a lot in advance.

Replies

I’m not familiar with the -registerTemplateWithDeviceToken:name:jsonBodyTemplate:expiryTemplate:tags:completion: method you referenced. I searched the iOS SDK and couldn’t find anything close to that. Is this an Apple API? If so, in what framework? Or perhaps it’s from some third-party library?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • hi, below is the definition of this method - (void) registerTemplateWithDeviceToken:(NSData*)deviceToken name:(NSString*)name jsonBodyTemplate:(NSString*)bodyTemplate expiryTemplate:(NSString*)expiryTemplate tags:(NSSet*)tags completion:(void (^)(NSError* error))completion;

Add a Comment

So that’s your method? Or a method from some non-Apple library?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"