Comments (7)
register()
takes no arguments. What error are you getting?
from legacy-ionic-cloud.
The options argument is required
And it occured in the line of $ionicPush.register
.
from legacy-ionic-cloud.
This is my full code
$ionicAuth.signup(detailedLogin).then(function(newUser) {
var options = {'remember' : true};
$ionicAuth.login('basic', detailedLogin, options).then(function() {
$ionicPush.register().then(function(token) {
console.log("My Device tokensss:",token.token);
return $ionicPush.saveToken(token);
});
from legacy-ionic-cloud.
Unhandled rejection Error: The options argument is required.
at new PushNotification (file:///android_asset/www/plugins/phonegap-plugin-push/www/push.js:27:15)
at Object.module.exports.init (file:///android_asset/www/plugins/phonegap-plugin-push/www/push.js:260:16)
at file:///android_asset/www/lib/ionic.cloud.min.js:1:31247
at t.once (file:///android_asset/www/lib/ionic.cloud.min.js:1:24550)
at t.register (file:///android_asset/www/lib/ionic.cloud.min.js:1:31177)
at file:///android_asset/www/js/services/common/auth.js:290:40
at r (http://cdn.jsdelivr.net/bluebird/3.4.1/bluebird.min.js:31:7722)
at i._settlePromiseFromHandler (http://cdn.jsdelivr.net/bluebird/3.4.1/bluebird.min.js:30:13044)
at i._settlePromise (http://cdn.jsdelivr.net/bluebird/3.4.1/bluebird.min.js:30:13847)
at i._settlePromise0 (http://cdn.jsdelivr.net/bluebird/3.4.1/bluebird.min.js:30:14548)
at i._settlePromises (http://cdn.jsdelivr.net/bluebird/3.4.1/bluebird.min.js:30:15878)
at r._drainQueue (http://cdn.jsdelivr.net/bluebird/3.4.1/bluebird.min.js:29:3148)
at r._drainQueues (http://cdn.jsdelivr.net/bluebird/3.4.1/bluebird.min.js:29:3209)
at drainQueues (http://cdn.jsdelivr.net/bluebird/3.4.1/bluebird.min.js:29:1238)
at MutationObserver. (http://cdn.jsdelivr.net/bluebird/3.4.1/bluebird.min.js:30:29699)
from legacy-ionic-cloud.
It always said that GCM project number is not found.
I have set it up here:
.config(function($ionicCloudProvider) {
$ionicCloudProvider.init({
"core": {
"app_id": "YOUR-APP-ID",
"sender_id": "GCM Number"
}
});
})
I also have tried "gcm_key": "GCM Number"
But none of them fix that.
I even have tried to re-run ionic config set gcm_key <your-gcm-project-number>
from legacy-ionic-cloud.
The documentation is not fully describing how to set it, untill I followed the commit message and found this:
'core': {
'app_id': '1234abc'
},
'push': {
'sender_id': 'sender_id_123'
}
from legacy-ionic-cloud.
@Alkasih You're using an undocumented beta version, as the Migration Guide says at the top. This won't be the first thing you encounter that's different between the cloud client and ionic-platform-web-client.
Our new documentation is coming soon.
For now, I've updated the config example to include that config format.
from legacy-ionic-cloud.
Related Issues (20)
- ionic v1 - facebook authentication class is invalid HOT 1
- iOS build stuck in "Building" status HOT 3
- Push notification changes HOT 1
- Ionic push notification doesnโt work when app is closed HOT 1
- build for prod fails
- Security Profile docs need updating
- "ionic io init" do not work HOT 1
- IOS - Failure while building the project environment HOT 3
- CallNumber plugin throwing error: "plugin_not_installed" after uploading build to cloud.
- Ionic V3 . No messages associated to a Notification HOT 1
- Ionic deploy - cordova.js not found after update HOT 1
- Ionic Auth - password reset through passwordResetUrl sends two mails HOT 4
- IOS *-Info.Plist. LSApplicationQueriesSchemes. HOT 1
- Setting PHOTOLIBRARY_USAGE_DESCRIPTION parameter with ionic cloud build HOT 2
- deploy.check() never resolved
- Update Docs to match Ionic Pro Dashboard
- Vulnerability due to outdated superagent dependency HOT 1
- Error: Cannot find module 'xml2js'
- Ionic Cloud - android build failed
- No migration guide
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from legacy-ionic-cloud.