Skip to content
This repository was archived by the owner on Feb 7, 2019. It is now read-only.
This repository was archived by the owner on Feb 7, 2019. It is now read-only.

Unable to Register on IOS #196

Description

@tomylee001001

Which platform(s) does your issue occur on?

  • iOS
  • Xcode version 9.2
    -Both simulator and iphone

Please, provide the following version numbers that your issue occurs with:

  • CLI: 4.4.2
  • Cross-platform modules: tns-ios : 3.2.0
  • Plugin(s): "dependencies": {
    "@angular/animations": "~5.0.0",
    "@angular/common": "~5.0.0",
    "@angular/compiler": "~5.0.0",
    "@angular/core": "~5.0.0",
    "@angular/forms": "~5.0.0",
    "@angular/http": "~5.0.0",
    "@angular/platform-browser": "~5.0.0",
    "@angular/platform-browser-dynamic": "~5.0.0",
    "@angular/router": "~5.0.0",
    "allow-publish": "^1.0.4",
    "email-validator": "^1.1.1",
    "nativescript-angular": "~5.0.0",
    "nativescript-cardview": "^2.0.3",
    "nativescript-checkbox": "^3.0.3",
    "nativescript-geolocation": "^4.2.2",
    "nativescript-google-maps-sdk": "^2.4.3",
    "nativescript-handle-file": "^1.0.0",
    "nativescript-loading-indicator": "^2.4.0",
    "nativescript-permissions": "^1.2.3",
    "nativescript-push-notifications": "^1.0.0",
    "nativescript-socket.io": "^0.9.0",
    "nativescript-theme-core": "1.0.4",
    "nativescript-videoplayer": "^3.1.0",
    "reflect-metadata": "0.1.10",
    "rxjs": "~5.5.2",
    "tns-core-modules": "^3.4.0",
    "tns-platform-declarations": "^3.4.0",
    "zone.js": "~0.8.2"
    }
    "devDependencies": {
    "@angular/compiler-cli": "5.1.3",
    "@ngtools/webpack": "~1.9.3",
    "babel-traverse": "6.4.5",
    "babel-types": "6.4.5",
    "babylon": "6.4.5",
    "copy-webpack-plugin": "~4.0.1",
    "extract-text-webpack-plugin": "~3.0.0",
    "lazy": "1.0.11",
    "nativescript-css-loader": "~0.26.0",
    "nativescript-dev-typescript": "0.6.0",
    "nativescript-dev-webpack": "^0.8.0",
    "nativescript-worker-loader": "~0.8.1",
    "raw-loader": "~0.5.1",
    "resolve-url-loader": "~2.1.0",
    "typescript": "2.5.2",
    "webpack": "~3.6.0",
    "webpack-bundle-analyzer": "^2.8.2",
    "webpack-sources": "~1.0.1"
    }

Please, tell us how to recreate the issue in as much detail as possible.

i am try to send push notification to my project.in android it works but i cannot register in the ios.
i am trying from Mac OSX 10.13.3 and xcode 9.2.
i did everything from the documentation but when i try to register push notificaion it fails without any error message. also after i build my app with "tns build ios" and open *.xcodeproj file in the platform/ios, i enable the push notification in the Capabilities. but after i run my app either in my iphone or simulator with "tns run ios" then re-open *.xcodeproj file and capabilities i see an error like the attachmenti send.

Is there any code involved?

const iosSettings = {
senderID: "[sender id]",
badge: true,
sound: true,
alert: true,
interactiveSettings: {
actions: [{
identifier: 'READ_IDENTIFIER',
title: 'Read',
activationMode: "foreground",
destructive: false,
authenticationRequired: true
}, {
identifier: 'CANCEL_IDENTIFIER',
title: 'Cancel',
activationMode: "foreground",
destructive: true,
authenticationRequired: true
}],
categories: [{
identifier: 'READ_CATEGORY',
actionsForDefaultContext: ['READ_IDENTIFIER', 'CANCEL_IDENTIFIER'],
actionsForMinimalContext: ['READ_IDENTIFIER', 'CANCEL_IDENTIFIER']
}]
},
notificationCallbackIOS: (message: any) => {
alert(JSON.stringify(message));
}
};

        PushNotifications.register(iosSettings, (token: String) => {
            console.log("Device registered. Access token: " + token);

            // Register the interactive settings
            if (iosSettings.interactiveSettings) {
                PushNotifications.registerUserNotificationSettings(() => {
                    console.log('Successfully registered for interactive push.');
                }, (err) => {
                    console.log('Error registering for interactive push: ' + JSON.stringify(err));
                });
            }
        }, (errorMessage: any) => {
            console.log("Device NOT registered! " + JSON.stringify(errorMessage));
        });

screen shot 2018-02-03 at 12 46 42

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions