Skip to content

[question]: Apns Bad Device Token  #1394

@weiqingtangx

Description

@weiqingtangx

Hi there,

Currently, I was integrating OneSignal into my iOS App. The integration code is pretty easy, but it sounds like I always receive the "Apns Bad Device Token" in the below image. I installed my app from TestFlight, the first time the push was working, and then I deleted my app and reinstalled it again. I see the errors "Apns Bad Device Token" on the blew image.

 pod 'OneSignal/OneSignal', '5.1.3'

- (void)registOneSignalNotifcation:(NSDictionary *)launchOptions {
      [OneSignal.Debug setLogLevel:ONE_S_LL_VERBOSE];
      [OneSignal initialize:ONESIGANL_APPID withLaunchOptions:launchOptions];
      [OneSignal.Notifications requestPermission:^(BOOL accepted) {
        NSLog(@"User accepted notifications: %d", accepted);
      } fallbackToSettings:true];
    
    [OneSignal.Notifications addClickListener:self];
}

 //after login 
 [OneSignal login:userName];

//the error from curl request
{"id":"77cacd79-4952-40d2-b756-a265ca886d2d","external_id":null,"errors":{"invalid_aliases":{"external_id":["xxxx"]}}}%   

I guess the problem is I logined twice?

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions