Giter Site home page Giter Site logo

Comments (32)

imhoffd avatar imhoffd commented on May 18, 2024 3

@Maistho So, it's a little confusing right now. I will say that we are committed to supporting both Ionic 1 and 2. Ionic 1 will continue to use the client without the Angular 2 integration (thus, this repo is only for Ionic 2). The vanilla client will be available in ionic-cloud. The vanilla client will continue to be updated and be used in Ionic 1 (directly) & 2 (under the hood). ionic-platform-web-client will stick around for a little while because of legacy Ionic CLI versions using bower to install it by that name, so we'll keep the master branch where it is.

The work that was done on the config system will be a breaking change for Ionic 1 apps, so I took this opportunity to change the package name as well. We will be providing a migration guide with the official release (hopefully this week) and we recommend updating as soon as it is released.

from ionic-cloud-angular.

ericb avatar ericb commented on May 18, 2024 2

@tamerbak This is not an official release, so there are no official docs yet. The readme can get you initially started if you want to test things out.

from ionic-cloud-angular.

rajayogan avatar rajayogan commented on May 18, 2024 2

@tamerbak Visit here to get details on push notifications using ionic-cloud-angular bro.. :)

http://tphangout.com/ionic-2-push-notifications/

Good luck.. 👍

from ionic-cloud-angular.

rajayogan avatar rajayogan commented on May 18, 2024 2

@dwieeb okay.. I will pull the latest release and update the post accordingly. Thanks for the headsup bro.. 👍

from ionic-cloud-angular.

imhoffd avatar imhoffd commented on May 18, 2024 1

@TrikinCurt yay! As for deploy.watch(), you can just call it and then you have to use the event emitter to listen to the deploy:update-ready event.

from ionic-cloud-angular.

Maistho avatar Maistho commented on May 18, 2024 1

@SteveKennedy for a brand new project you should use @ionic/cloud-angular for Ionic 2 and @ionic/cloud for Ionic 1.

from ionic-cloud-angular.

Maistho avatar Maistho commented on May 18, 2024

Does this mean that this (fixed and with a much better config system) version will not be recommended for Ionic 1 projects?

I feel like All Ionic 1 projects should start using the new version as well, even if it means that they will need to update their configs. Just make sure it's well documented.

edit: I'm not sure about how you would use the Angular2 version in Ionic 1 (guessing you can't), but the non-angular version should really be recommended for everyone, regardless of Ionic version.

from ionic-cloud-angular.

Maistho avatar Maistho commented on May 18, 2024

@dwieeb: Great! That's pretty much what I wanted to hear. 😄

from ionic-cloud-angular.

sagivf avatar sagivf commented on May 18, 2024

@dwieeb So far this is looking very good, got it to work right off the bat, which doesn't always happen...
I'll add more feedback as I go.

How safe is using this tough? As safe as using Ionic2(beta) in general?
I would give this more PR, I only stumbled upon it going over https://github.com/driftyco/ionic-platform-web-client issues.

from ionic-cloud-angular.

Manduro avatar Manduro commented on May 18, 2024

Deploy and push working like a charm here!

from ionic-cloud-angular.

imhoffd avatar imhoffd commented on May 18, 2024

@sagivf I'm glad you're eager to start using it! But, the usage of services, especially auth and user, may change yet. It'd be best to wait for the full release and the full documentation before using it in a production app. All of this is still in beta, just like Ionic 2.

@Manduro Great to hear! 🍻

from ionic-cloud-angular.

tamerbak avatar tamerbak commented on May 18, 2024

@dwieeb What about documentation ? Push doc does not talk about the new platform is is normal ?
URL : http://docs.ionic.io/v2.0.0-beta/docs/push-full-setup

from ionic-cloud-angular.

cklanac avatar cklanac commented on May 18, 2024

So far the library works great, I created a simple app with signup(), login(), logout() etc... But if you're looking for feedback/enhancements, I have one question/request.

Question. How can I react or subscribe to authentication changes? I looked at the auth:token-changed in auth.ts event, but I can't figure out how to react to it. Plus, I'm not sure it fires on logout().

Request. Can the isAuthenticated() method be Observable or Rx Subject so we can subscribe to changes? It would make it much easier to update sections that depend on authentication like so.

Hide logout button if user is NOT logged in.
<button menuClose ion-item [hidden]="!isLoggedIn" (click)="logout()"><ion-icon name="log-out"></ion-icon> Logout </button>

Subscribe to changes to login status
this.appUser.auth$.subscribe((isLoggedIn: boolean) => {this.isLoggedIn = isLoggedIn;}

Currently, I need to manually update my isLoggedIn BehaviorSubject on signup, login, logout. It would be great if I could just subscribe to the existing isAuthenticated status. Or maybe there's a better way to do it?

from ionic-cloud-angular.

cklanac avatar cklanac commented on May 18, 2024

Another question/request...
My project is open-source so I don't want to hardcode the app_id in the project. I'd like to exclude .io-config.json or ionic.config.json from git and import the the app_id into the project.

Question. How can I import or require .io-config.json or ionic.config.json? I've tried several variations like the following but I can't convince Typescript/ES6 to import a JSON file.

import * as config from '../ionic.config.json!';
import * as config from '../ionic.config.json!json';
import * as config from 'json!../ionic.config.json';

Request. The library should automatically load the app_id from .io-config.json or ionic.config.json

from ionic-cloud-angular.

imhoffd avatar imhoffd commented on May 18, 2024

@cklanac It does fire on logout. The data.token will be undefined. Don't subscribe to that event yet. I will be fleshing out events and there will be auth:login, auth:logout, etc. The ideal case is to subscribe to an observable stream, as you mentioned.

The core of the cloud client is essentially vanilla Typescript, so we'd need to wrap isAuthenticated() and methods like it in $q for angular 1 and observables for Angular 2. I haven't gotten around to this, but would very much like to.

We decided on having the app_id in the source code (not use a config file) after a lengthy discussion (https://github.com/driftyco/ionic-platform-web-client/issues/41). As far as I know there isn't a way for typescript to load a json file. Right now it would need to be up to your build system.

I don't think there's a standardize way of handling config in Angular 2, but when there is, we'd switch to it. Open to suggestions, of course.

from ionic-cloud-angular.

Maistho avatar Maistho commented on May 18, 2024

@clanac depending in what loader you are using, you might be able to use require to import the json. I've done that before

var config = require('my_config.json');

Another option could perhaps be to load the json using http, but that might happen to late during the startup for your needs.

from ionic-cloud-angular.

cklanac avatar cklanac commented on May 18, 2024

Thanks!
I'll follow the Investigate Observables issue #4

As far as configs and loading json, it looks like they have a promising solution for importing non-ts files in the next release (microsoft/TypeScript#6615). In the meantime, I'm going to use require (which @Maistho just mentioned 👍 ) and is discussed TypeStrong/tsify#88, and TypeStrong/tsify#98

Define require so TS doesn't complain

// require.d.ts
declare function require(path: string): any;

Reference the definition, require the config and update cloud settings

// app.ts
/// <reference path="../typings/require.d.ts"/>
const config  = require('../ionic.config.json');
const cloudSettings: CloudSettings = {
  'core': {
    'app_id':config.app_id 
  }
};

The https://github.com/driftyco/ionic-cloud/wiki/Migration-Guide says you're dropping .io-config.json. Is ionic.config.json is sticking around?

from ionic-cloud-angular.

ericb avatar ericb commented on May 18, 2024

@cklanac Yup, ionic.config.json is sticking around. The .io-config.json file was specific to our cloud configuration, and is being removed in favor of just having the config passed directly to our client. 🍻

from ionic-cloud-angular.

imhoffd avatar imhoffd commented on May 18, 2024

@rajayogan I'm gonna say right away that your post contains a lot of legacy code and practices that I'm confident won't work with the latest 0.0.14 release and will be out of date when our new documentation is released.

from ionic-cloud-angular.

TrikinCurt avatar TrikinCurt commented on May 18, 2024

Ok, I have deploy working, it was easy and works great. So, yay is my feedback :) I am trying to use the deploy.watch though, for the life of me I do not see how it works?

from ionic-cloud-angular.

ProWagerSystems avatar ProWagerSystems commented on May 18, 2024

Any idea how to correct the issues below, or should I just ignore them?

E:\nodejs\mystery>npm install --save @ionic/cloud
mystery@ E:\nodejs\mystery
+-- UNMET PEER DEPENDENCY @angular/core@^2.0.0-rc.1
+-- [email protected]
+-- UNMET PEER DEPENDENCY [email protected]
+-- UNMET PEER DEPENDENCY [email protected]
`-- UNMET DEPENDENCY zone.js@^0.6.11

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN @ionic/[email protected] requires a peer of @angular/core@^2.0.0-rc.1 but none was installed.
npm WARN @ionic/[email protected] requires a peer of rxjs@^5.0.0-beta.6 but none was installed.
npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm WARN [email protected] requires a peer of zone.js@^0.6.10 but none was installed.
npm WARN mystery@ No repository field.
npm WARN mystery@ No license field.

from ionic-cloud-angular.

sagivf avatar sagivf commented on May 18, 2024

Since NPM3 peer dependencies aren't automaticlly installed to yes, you need to npm install @angular/core@^2.0.0-rc.1 [email protected] [email protected] zone.js@^0.6.11 --save

from ionic-cloud-angular.

imhoffd avatar imhoffd commented on May 18, 2024

@MyWek @sagivf Those warnings shouldn't occur in an Ionic project, though, as all the peer dependencies should be already installed. I will fix our version requirements in package.json in the next version to allow a more flexible and correct range. For now, you can ignore these warnings and everything should work just fine.

from ionic-cloud-angular.

ProWagerSystems avatar ProWagerSystems commented on May 18, 2024

Hi, Thanks for that. By any chance is there Deploy sample code for Ionic V2 Beta with Javascript? I'm trying to use the sample code on the migration guide, but am having trouble (3 frustrating hours to be exact) getting it to work: https://github.com/driftyco/ionic-cloud/wiki/Migration-Guide. I'm sort of wishing I didn't choose to use V2 Beta in my project at this point, it is very hard to find sample code. Everything is for older versions or typescript... Thanks for your help!

from ionic-cloud-angular.

imhoffd avatar imhoffd commented on May 18, 2024

@MyWek The Migration Guide isn't for migrating Ionic 1 to Ionic 2. It's for people who have ionic-platform-web-client in their v1 projects and are looking to upgrade to the new @ionic/cloud. Sample code from the migration guide won't work in v2. If you're having trouble, I recommend waiting a short while for our new docs, which will feature full examples and API documentation. However, the examples will still be in Typescript. The Ionic framework is only providing examples in Typescript for v2, and so is the Ionic Cloud. If you're familiar with Angular 2, you can easily do the translation to ES6.

from ionic-cloud-angular.

justinschuldt avatar justinschuldt commented on May 18, 2024

I've been using deploy in an Ionic 2 TypeScript project for ~2 weeks and it's been working great so far. Just wanted to drop in and say so far so good!

from ionic-cloud-angular.

grabtasker avatar grabtasker commented on May 18, 2024

I used this ionic-cloud-angular for function "push notification" in ionic2 (using sample code ionic-conference-app), but found no push message to the device. Everything seems correct as I revised once again, does this integration work well at this time?

from ionic-cloud-angular.

imhoffd avatar imhoffd commented on May 18, 2024

@justinschuldt Thanks! Glad to hear. We're making some finishing touches next week and then we should be good to go pretty soon.

@grabtasker We'll have official documentation out soon that should make this a bit easier to integrate into your app.

from ionic-cloud-angular.

SteveKennedy avatar SteveKennedy commented on May 18, 2024

I'm starting a brand new Ionic 2 project, with Angular 2 and Typescript. Should I use the ionic-platform-web-client, ionic-platform-web-client-angular, @ionic/cloud-angular, @ionic/cloud, or @ionic/platform-client in order to use the Ionic cloud/platform?

from ionic-cloud-angular.

SteveKennedy avatar SteveKennedy commented on May 18, 2024

@Maistho. Thank you. Does @ionic/cloud-angular support Analytics? That's like the most important piece to me.

from ionic-cloud-angular.

imhoffd avatar imhoffd commented on May 18, 2024

@SteveKennedy Answered you on twitter, but I will answer again so others can see. Analytics will be coming after our initial release. We just need to rethink how we're doing it in the cloud client.

from ionic-cloud-angular.

mariohmol avatar mariohmol commented on May 18, 2024

Cant make a @ionic/cloud-angular work .. anyone has a project example?

from ionic-cloud-angular.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.