I am updating old mobilePushSDK with new one.version 8.0.5.

 -(BOOL) configureMarketingCloudSDK {
    [SCServiceLogger sharedLogger].level = SCSLoggerLevelDebug;
    PushConfigBuilder * builder = [[PushConfigBuilder alloc]initWithAppId:appID];
    builder =  [builder setAccessToken:accessToken];
    builder =  [builder setMarketingCloudServerUrl:[NSURL URLWithString:appEndpoint]];
    builder =   [builder setMid:mid];
    builder =  [builder setDelayRegistrationUntilContactKeyIsSet:YES];
    builder =   [builder setInboxEnabled:YES];
    builder =  [builder setLocationEnabled:YES];
    builder =   [builder setAnalyticsEnabled:YES];
    PushConfig *pushConfig = [builder build];
    void (^completionHandler)(OperationResult) = ^(OperationResult result) {
           switch(result) {
               case OperationResultError:
               case OperationResultSuccess:
               case OperationResultTimeout:
    SFMCSdkConfigBuilder *configBuilder = [[SFMCSdkConfigBuilder alloc] init];
       configBuilder = [configBuilder setPushWithConfig:pushConfig onCompletion:completionHandler];
       [SFMCSdk initializeSdk:[configBuilder build]];
        [SFMCSdk.mp setDebugLoggingEnabled:YES];
        [SFMCSdk.mp setURLHandlingDelegate:self];
        [SFMCSdk.mp setEventDelegate:self];
return YES;

set the device token in didRegisterRemoteNotification method.

[SFMCSdk.mp setDeviceToken:deviceToken];

Please help me to initialise the SFMCSDK to get the push notification properly.

In the completion handler it is always giving "OperationResultTimeout" as an output.

Also, When I am trying to get device token it is nil, because SFMCSDK not initialise correctly.

Desire Output:- When Initialise the SDK then it should be jump in success result, but due to any mistake it is showing "OperationResultTimeout".

Please help!


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.