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?

  • 1
    Are you seeing any logs specifying 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). Mar 20, 2019 at 15:12
  • 1
    Additionally, please confirm your appId and access token used for configuration match the MobilePush app values in the web account - a mismatch is the only thing I can think of which would result in a 401 from the server. Mar 20, 2019 at 15:13
  • Hey sorry looks like I lied, when I switched back to the 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... Mar 21, 2019 at 1:47


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.