AWS Mobile HUD AWS SNS pushManagerDidRegister but endpoint not created

Viewed 289

I am using AWS Mobile HUD with AWS SNS and am running into problems.

What works / was done already

  • sucessfully created p12 universal certificate
  • resources on AWS SNS created sucessfully by Mobile HUD
  • topic created sucessfully by Mobile HUD
  • integrated code into project
  • integrated plist

the following code should register the app (device) with AWS SNS:

pushManager = AWSPushManager(forKey: ServiceKey)
pushManager?.delegate = self
pushManager?.registerForPushNotifications()

and - greatly enough func pushManagerDidRegister(_ pushManager: AWSPushManager) is called, indicating success. My func pushManagerDidRegister(_ pushManager: AWSPushManager) looks as fo

func pushManagerDidRegister(_ pushManager: AWSPushManager) {
    print("Successfully enabled Push Notifications on platform: \(pushManager.platformARN)")
    // Subscribe the first topic among the configured topics (all-device topic)
    if let defaultSubscribeTopic = pushManager.topicARNs?.first {
        let topic = pushManager.topic(forTopicARN: defaultSubscribeTopic)
        topic.subscribe()
    }
}

log output:

Successfully enabled Push Notifications on platform: Optional("arn:aws:sns:eu-central-1:00000000:app/APNS/appname_MOBILEHUD_12345678")

but: on AWS SNS resource no endpoint is created in this application / platformARN

Interesting facts (maybe the reason)

  • Build config is DEBUG
  • Logged platformARN is RELEASE and not DEBUG

edit: After playing around with different swift compiler flags I managed to set the environment correclty. Now i get logging that the registration was successfull on the Sandbox Environment. But: still no endpoint created on AWS SNS.

any ideas on how i could proceed? I tried for 2 days now including recertification, rebuilding AWS, endless logging ;)

2 Answers
Related