iOS: APNS Sandbox
How to mark a device as a development device
When running a debug build of your iOS app it's important to note that the device will need to be marked as a development device on our platform so that we know to use the APNS sandbox gateway or push notifications will fail. This can be done through the SDK:
#ifdef DEBUG
[[Marigold new] setDevelopmentDeviceWithResponse:^(NSError * _Nullable) {
if (error) {
NSLog(@"Failed to set as Development device: %@", error);
return;
}
NSLog(@"Set as Development device");
}];
#endif
#if DEBUG
Marigold().setDevelopmentDeviceWithResponse { error in
if let error = error {
print("Failed to set as Development device: \(error)")
return
}
print("Set as Development device")
}
#endif
Updated 17 days ago