This library has been deprecated by the ionic-platform-web-client.
Head over to our docs to learn more about setting up a project with the Ionic Platform.
Common required service tools and addons
License: Apache License 2.0
This library has been deprecated by the ionic-platform-web-client.
Head over to our docs to learn more about setting up a project with the Ionic Platform.
ionic-core-service
will bootstrap cordova.js
inside it's run method with $ionicApp.bootstrap()
, which means that until this has run, the callback passed to $ionicPlatform.ready(...)
will not find the window.cordova
object via ionic.Platform.isWebView()
and the will be $ionicPlatform.ready()
callbacks will be triggered only in response to the window.on("load",...)
event, bypassing cordova's "deviceready"
entirely (https://github.com/driftyco/ionic/blob/master/js/utils/platform.js#L402)
A workaround is currently possible by wrapping code that needs window.cordova
with document.addEventListener("deviceready", ...) inside the
$ionicPlatform.ready(...)`
It seems that the 0.1.9 tag isn't consistent with the ionic-core.js although they were updated the same day.
In $ionicCoreSettings for the tag 0.1.9, theres a hardoded app_id and public key, and since this app_id, api_key is checked before ionicApp, everyones events will get forwarded to this app_id rather than their own..
May need to do another bower patch to fix this issue since bower pulls from the GIT tags.
Hi,
All ionic services currently depend on Angular and yet dont define it as dependency in bower. Is there any reason for that ?
Having this issue after a deploy is pushed to a device.
After the deploy has installed, there is a constant refresh of the index.html page,
even after the app has been killed and restarted.
The issue is very similar to the example in the link below.
Has anyone else seen this and maybe have come up with a solution?
This is how the code has been implemented:
//check if app is running in the browser
//if it is not, check for updates
if (ionic.Platform.device().available) {
$ionicDeploy.setChannel(CONSTANTS.CUR_ENV);
console.log('You are currently pulling from: ' + $ionicDeploy.channel_tag);
console.log('Ionic Deploy: Checking for updates');
$ionicDeploy.check().then(function (hasUpdate) {
console.log('Ionic Deploy: Update available: ' + hasUpdate);
$scope.hasUpdate = hasUpdate;
// Update app code with new release from Ionic Deploy
$ionicDeploy.update().then(function (res) {
console.log('Ionic Deploy: Update Success! ', res);
}, function (err) {
console.log('Ionic Deploy: Update error! ', err);
}, function (prog) {
console.log('Ionic Deploy: Progress... ', prog);
});
}, function (err) {
console.error('Ionic Deploy: Unable to check for updates', err);
});
} else {
console.log('*** running in the browser, not checking for update');
}
}
});
Another more detailed example can be found here: Deploy Loop Issue
Hi guys
I'm trying to run an ionic v1 app and got this message:
Error: [$ injector: modulerr] Failed to instantiate module ionic.service.core due to:
Error: [$ injector: nomod] Module 'ionic.service.core' is not available!
When I try to install with the command
bower install ionic-service-core
I have this error message:
fatal: repository 'https://github.com/driftyco/ionic-platform-web-client.git/' not found
Does anyone know how to install this module differently?
Thankful
Right now we throw an exception if the user_id field is omitted:
We would be a better citizen by just logging an error to the console instead of throwing an exception.
Hi,
I try to connect my app to ionic.io by adding the ionic-service-core
module via ionic add ionic-service-core\#master
and adding this to my app's code:
.config([ '$ionicAppProvider', function($ionicAppProvider) {
$ionicAppProvider.identify({
app_id : 'MY_ADD_ID',
api_key : 'MY_API_KEY'
});
} ])
Unfortunately, this fails because in this line, the response data already seems to be parsed and so the JSON.parse()
call fails.
Output of ionic info
:
OS: Mac OS X Yosemite
Node Version: v0.10.33
Cordova CLI: 4.3.0
Ionic CLI Version: 1.3.20
Xcode version: Xcode 6.3 Build version 6D570
ios-sim version: 3.0.0
ios-deploy version: Not installed
Thanks,
Jan.
I have an Ionic app which consumes a large number of XML ReST requests using Basic Authorization.
If you override Angular's default HTTP service to use an alternate default 'Accept' header, $ionicUser.identify() fails with the following response:
{
"config": {
"data": {
"_id": "XXXX",
"device": {
"screen_height": 1334,
"screen_width": 750
},
"is_on_device": true,
"user_id": "XXXX"
},
"headers": {
"Accept": "application/xml",
"Authorization": "Basic YYYY",
"Content-Type": "application/json;charset=utf-8"
},
"method": "POST",
"transformRequest": [
null
],
"transformResponse": [
null
],
"url": "https://apps.ionic.io/api/v1/app/XXXX/users/identify"
},
"data": {
"detail": "Could not satisfy the request's Accept header"
},
"status": 406,
"statusText": "NOT ACCEPTABLE"
}
$ionicUser (and potentially other apps.ionic.io tools) should probably explicitly ask for the Accepts: header it expects when making API calls.
As a workaround, I have changed my code to not override the default Accept: header and instead set it per-request, for now.
Hi,
I was thinking that all the offering you are working on has no real hard dependencies on angular.
It would be beneficial to abstract away in a common module each service and then have an adaptor for angular. Then the community can contribute different adaptors to leverage those services in other frameworks.
And for you, it means you can offer your services to a larger crowd.
Any though ?
This line breaks my app:
https://github.com/driftyco/ionic-service-core/blob/master/ionic-core.js#L135
Error: http://errors.angularjs.org/1.3.15/$injector/strictdi?p0=function(%24httpProvider)
Uncaught Error: [$injector:modulerr] Failed to instantiate module main due to:
Error: [$injector:modulerr] Failed to instantiate module main.common due to:
Error: [$injector:modulerr] Failed to instantiate module ionic.service.core due to:
Error: [$injector:strictdi] function($httpProvider) is not using explicit annotation and cannot be invoked in strict mode
http://errors.angularjs.org/1.3.15/$injector/strictdi?p0=function(%24httpProvider)
at file:///android_asset/www/scripts/bundle.js:7162:12
at Function.annotate (file:///android_asset/www/scripts/bundle.js:10573:17)
at invoke (file:///android_asset/www/scripts/bundle.js:11280:36)
at Object.instantiate (file:///android_asset/www/scripts/bundle.js:11310:27)
at provider (file:///android_asset/www/scripts/bundle.js:11145:36)
at Object.provider (file:///android_asset/www/scripts/bundle.js:11137:16)
at runInvokeQueue (file:///android_asset/www/scripts/bundle.js:11208:35)
at file:///android_asset/www/scripts/bundle.js:11216:11
at forEach (file:///android_asset/www/scripts/bundle.js:7422:20)
at loadModules (file:///android_asset/www/scripts/bundle.js:11198:5)
http://errors.angularjs.org/1.3.15/$injector/modulerr?p0=ionic.service.core…s%20(file%3A%2F%2F%2Fandroid_asset%2Fwww%2Fscripts%2Fbundle.js%3A11198%3A5)
at file:///android_asset/www/scripts/bundle.js:7162:12
at file:///android_asset/www/scripts/bundle.js:11237:15
at forEach (file:///android_asset/www/scripts/bundle.js:7422:20)
at loadModules (file:///android_asset/www/scripts/bundle.js:11198:5)
at file:///android_asset/www/scripts/bundle.js:11215:40
at forEach (file:///android_asset/www/scripts/bundle.js:7422:20)
at loadModules (file:///android_asset/www/scripts/bundle.js:11198:5)
at file:///android_asset/www/scripts/bundle.js:11215:40
at forEach (file:///android_asset/www/scripts/bundle.js:7422:20)
at loadModules (file:///android_asset/www/scripts/bundle.js:11198:5)
http://errors.angularjs.org/1.3.15/$injector/modulerr?p0=main.common&p1=Err…s%20(file%3A%2F%2F%2Fandroid_asset%2Fwww%2Fscripts%2Fbundle.js%3A11198%3A5)
at file:///android_asset/www/scripts/bundle.js:7162:12
at file:///android_asset/www/scripts/bundle.js:11237:15
at forEach (file:///android_asset/www/scripts/bundle.js:7422:20)
at loadModules (file:///android_asset/www/scripts/bundle.js:11198:5)
at file:///android_asset/www/scripts/bundle.js:11215:40
at forEach (file:///android_asset/www/scripts/bundle.js:7422:20)
at loadModules (file:///android_asset/www/scripts/bundle.js:11198:5)
at createInjector (file:///android_asset/www/scripts/bundle.js:11124:11)
at doBootstrap (file:///android_asset/www/scripts/bundle.js:8551:20)
at bootstrap (file:///android_asset/www/scripts/bundle.js:8572:12)
http://errors.angularjs.org/1.3.15/$injector/modulerr?p0=main&p1=Error%3A%2…p%20(file%3A%2F%2F%2Fandroid_asset%2Fwww%2Fscripts%2Fbundle.js%3A8572%3A12)
Hi, all,
I'm working on ionic push, and added ionic-service-core. but I get this warning all the time.
Maybe I set the appID and API key at wrong place?
I did something like this:
.config([ '$ionicAppProvider', function($ionicAppProvider) {
$ionicAppProvider.identify({
app_id : 'XXXXXX',
api_key : 'XXXXXXXXXXXXXX'
});
} ]);
also I did in .io-config.json
{"app_id":"XXXXXX","api_key":"XXXXXXXXXXXXXX"}
Any ideas???
mismatch Version declared in the json (0.1.4) is different than the resolved one (0.1.5)
The problem occurs on my Android 4.4 device. In the browser it is working fine. The response of the request can be viewed in the chrome dev tools network tab, but the callback is not firing.
FirebaseAuth.$authWithPassword(user).then(function(authData) {
console.log(authData);
}).catch(function(error) {
console.log(error);
});
I am using
"ionic": "ionic-team/ionic-bower#1.0.1",
"ionic-service-core": "0.1.10",
"firebase": "2.2.9",
"angularfire": "1.1.2"
From @tigrus on July 21, 2015 10:55
Type: bug
Platform: desktop browser
Doing:
$ionicUser.identify({
'user_id':$ionicUser.generateUUID();
})
Getting 403 error:
{"detail":"CSRF Failed: CSRF token missing or incorrect."}
After setting CSRF from cookies to header X-CSRFToken getting 405 error:
{"detail":"Method \"POST\" not allowed."}
```</span>
<span is-issue-template></span>
_Copied from original issue: driftyco/ionic#4117_
All properties set by default by Ionic on the User object should be both documented and prefixed. So for example, the system ID (used by Analytics) is set to _id. But there are multiple properties like device, is_on_device, and image, that should probably be renamed to something like _device, or perhaps
ionicMeta.device
The idea being to ensure my app doesn't accidentally conflict with something Ionic sets by default.
And of course - all these keys should be documented as to their purpose.
Similar reasoning to my issue on ionic-service-deploy
. We can easily avoid the need for ionic
to be loaded before this runs and make this service more standalone by changing the calls to ionic.Platform
methods on lines 304 & 317.
PR to follow.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.