0
votes

I've recently been trying to write a game similar to Dots using Angular2 and Ionic2 frameworks, however early on I've run into a problem. I wanted to use the Deploy feature to get rid of cables and seamlessly update the app on my mobile devices, however I realised I have no idea how to import the deploy service into my project. I'll add I'm using TypeScript.

I've been looking all over the Internet, however it appears only I've been faced with such a problem. Does Deploy work with Ionic2 at all? Please forgive me if the question is naive or my mistake is foolish. I'll be grateful for any help.

My code for the main page:

import {Page} from 'ionic-angular';


@Page({
  templateUrl: 'build/pages/main/main.html'
})
export class MainPage{

  score: number;
  moves: number;

  doUpdate(){
      //IonicDeploy goes here
  }

}
2

2 Answers

0
votes

Does Deploy work with Ionic2 at all?

Sadly, it is currently not fully supported as evident through some posts in the forums and in the official documentation, to quote:

Support for Ionic 2

We have prioritized adding support for Ionic 2, but as it stands you will get errors when trying to add the platform web client into an Ionic 2 project.

In the meantime, I would advise to try another Beta Service called CodePush from Microsoft, here are some excellent slides on implementing it for Ionic2 which I stumbled across trying figure out the same thing.

0
votes

i'm using ionic 2 and successfull to deploy my app, you can do follow that:

ionic io init

enter your email and pass, you can register here: ionic.io

ionic add ionic-platform-web-client
ionic plugin add ionic-plugin-deploy
ionic upload

now please search and install app: ionic view, it available on android and ios -> enter your email -> select your app -> sync app

to share with other you can use this command: ionic share <email>

my system information:

CLI v2.0.0-beta.30
Cordova CLI: 6.2.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.8
Ionic CLI Version: 2.0.0-beta.30
Ionic App Lib Version: 2.0.0-beta.16
OS: Distributor ID:     Ubuntu Description:     Ubuntu 16.04 LTS
Node Version: v6.2.1