Skip to content

Error: Uncaught (in promise): Error: -[__NSCFString bytes]: unrecognized selector sent to instance 0x2805a2580 #127

Closed
@fabiocsm

Description

@fabiocsm

I'm working updating an NS6 app to NS8, I've changed the firebase-messaging plugin by the firebase-messaging-core version 2.3.4, but now I can't get any token from the iOS app. I'm getting an error when calling MessagingCore.getInstance().getCurrentToken(). I believe it's related to the APNSToken to string conversion.
Unfortunately I don't know Objective-C/Swift to send an PR with the fix.

APNSTokenToString

ERROR Error: Uncaught (in promise): Error: -[__NSCFString bytes]: unrecognized selector sent to instance 0x2805a2580 Error: -[__NSCFString bytes]: unrecognized selector sent to instance 0x2805a2580 at MessagingCore.getAPNSToken (file: node_modules/@nativescript/firebase-messaging-core/index.ios.js:117:0) at file: node_modules/@nativescript/firebase-messaging-core/index.ios.js:113:0 at new ZoneAwarePromise (file: node_modules/zone.js/fesm2015/zone.js:1429:0) at MessagingCore.getCurrentToken (file: node_modules/@nativescript/firebase-messaging-core/index.ios.js:104:0) at file: src/app/services/notification.service.ts:119:44 at Generator.next (<anonymous>) at asyncGeneratorStep (file: node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:3:0) at _next (file: node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:25:0) at _ZoneDelegate.invoke (file: node_modules/zone.js/fesm2015/zone.js:372:0) at Object.onInvoke (file: node_modules/@angular/core/fesm2015/core.mjs:26294:0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions