I've implemented the iOS Push SDK in my app, and am initialising it, as according to the instructions here.
However, the phone doesn't show up in the contacts list, and does not receive push notifications sent from Marketing Cloud.
The SDK status seems to be okay:
{
"MarketingCloud Connection Details" : {
"Active AccessToken(Masked)" : "d*******************qcrd",
"Active AppId" : "***"
},
"Analytics Details" : {
"useLegacyPiIdentifier" : false,
"PiIdentifier" : "",
"PIAnalyticsEnabled" : false,
"ETAnalyticsEnabled" : false
},
"Push Details" : {
"Developer has Push Enabled" : "Yes",
"Device Token" : "****",
"User has Push Enabled" : "Yes"
},
"MarketingCloud SDK Features" : {
"Enabled by Configuration" : "ETAnalytics, PIAnalytics, Location, Inbox"
},
"Privacy Settings" : {
"Privacy Mode" : "SFMCPrivacyModeNotBlocked"
},
"Device Specific Details" : {
"OS Version" : "12.1.4",
"Hardware Description" : "iPhone7,1",
"Device Reported Timezone" : "28800",
"Device Locale" : "en_SG",
"DeviceId" : "****",
"Daylight Savings Time Active" : false,
"Platform Name" : "iOS"
}
}
The function didRegisterForRemoteNotificationsWithDeviceToken
is called correctly, where I set the give the SDK the device token:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[[MarketingCloudSDK sharedInstance] sfmc_setDeviceToken:deviceToken];
}
I also noticed this error in the console logs:
error 14:43:33.290095 +0800 DemoPush network request failed with status: 401 MarketingCloudSDKControlChannel.m line: 337
So it looks like it's not connecting to Marketing Cloud correctly. 401 seems to imply that it's unauthorised.
I have tried with both the MarketingCloudSDKConfiguration.json
and using sfmc_configureWithDictionary
however there's no difference. I'm out of ideas. Anyone seen this before?
registration response
(in MarketingCloudSDKFoundation) which may point us to more information? The registration of a device/contact occurs through our registration process (different than the route failing).MarketingCloudSDKConfiguration.json
file, it started working again. I'm not quite sure why that is. I copied and pasted the values from dictionary into the JSON file and they were exactly the same...