Changed App Name, now builds cache older files


#1

After changing app name inside config.xml from “MyApp” to new app name, anytime I run ionic cordova build ios --verbose or emulate ios the build is from older versions of my app. The files in my repo do not change but the files loaded into simulator or live device is not reflecting these files.

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.15.2
ionic (Ionic CLI) : 3.15.2

global packages:

cordova (Cordova CLI) : 7.1.0 

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.2.3 ios 4.5.4
Ionic Framework    : ionic-angular 3.7.1

System:

ios-deploy : 1.9.2 
ios-sim    : 6.1.2 
Node       : v6.10.3
npm        : 5.5.1 
OS         : macOS Sierra
Xcode      : Xcode 9.1 Build version 9B55 

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : legacy

I have dist and dev provisioning profiles in XCode for push notifications. I have also added/removed ios platforms multiple times and did not solve my issue.

UPDATE: I can get the correct build by

  1. ionic cordova platform rm ios
  2. ionic cordova platform add ios
  3. ionic cordova emulate ios

THEN open the xcworkspace file and auto sign my provisioning files and set to manual and the build goes back to the OLD output build


#2

What does that mean?

Your Ionic CLI is out of date, update.

You are building locally?
No Ionic Deploy installed?


#3

My files inside the editor show completely different than those reflected inside the device or emulator. From a very old build version of my app.

I am building for testing not to deploy to ionic pro or legacy. Eventually archiving for ios Testflight.

I will try and update my cli now.


#4

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0

global packages:

cordova (Cordova CLI) : 7.1.0 

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.2.3 ios 4.5.4
Ionic Framework    : ionic-angular 3.7.1

System:

ios-deploy : 1.9.2 
ios-sim    : 6.1.2 
Node       : v6.10.3
npm        : 5.5.1 
OS         : macOS Sierra
Xcode      : Xcode 9.1 Build version 9B55 

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : legacy

Same problem after ionic build ios then opening inside xCode xworkspace file. Still loading old js files.


#5

Post the output of the complete command you are running please.


#6

The whole ionic cordova build ios output? It is bigger than the max allowed to reply


#7

I get a BUILD SUCCEEDED but the files are not updating to the current files in the repo. The app seems to be compiled to a build much older. This only happened after changing the App name in the config


#8

What does that mean?


#9

Meaning I have my current files showing in the IDE from my latest changes but the build output does not show those current files.

I.e. this build showing in the emulator has no detail pages from a very old build. My current files include all new details pages etc.


#10

Do you get the correct state via ionic serve?


#11

Simples-MacBook-Pro:Rewardzzz-App simpledev$ ionic serve
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port
35729 --dev-logger-port 53703 --nobrowser - Ctrl+C to cancel
[09:22:42] watch started …
[09:22:42] build dev started …
[09:22:42] Proxy added:/api => http://rewardzzz.simplecan.com/api
[09:22:42] clean started …
[09:22:42] clean finished in 9 ms
[09:22:42] copy started …
[09:22:42] transpile started …
[09:22:46] transpile finished in 4.13 s
[09:22:46] preprocess started …
[09:22:46] deeplinks started …
[09:22:46] deeplinks finished in 149 ms
[09:22:46] preprocess finished in 150 ms
[09:22:46] webpack started …
[09:22:46] copy finished in 4.50 s
[09:22:58] webpack finished in 11.97 s
[09:22:58] sass started …
[09:23:00] sass finished in 2.33 s
[09:23:00] postprocess started …
[09:23:00] postprocess finished in 15 ms
[09:23:00] lint started …
[09:23:00] build dev finished in 18.65 s
[09:23:00] watch ready in 18.74 s
[09:23:00] dev server running: http://localhost:8100/

[OK] Development server running!
Local: http://localhost:8100
External: http://10.1.10.58:8100
DevApp: Rewardzzz@8100 on Simples-MacBook-Pro.local

[09:23:04] tslint: src/providers/auth/auth.ts, line: 41
Property ‘storage’ is declared but never used.

  L41:      constructor(private http: Http, private storage: Storage,  
  L42:          public events: Events, private tokenService: TokenService, 

[09:23:04] tslint: src/providers/auth/auth.ts, line: 421
’handleError’ is declared but never used.

 L421:  private handleError(err){
 L422:    let errorMessage: string; 

[09:23:04] tslint: src/providers/auth/auth.ts, line: 427
’error’ is declared but never used.

 L426:  let body = err.json() || ''; 
 L427:  let error = body.error || JSON.stringify(body); 
 L428:  errorMessage =  `${err.status} - ${err.statusText} || ''} ${err}`;   

[09:23:04] tslint: src/providers/auth/auth.ts, line: 2
All imports are unused.

   L1:  import { TokenService } from './../token-service/token-service';
   L2:  import { AbstractControl } from '@angular/forms';
   L3:  import { User } from './../../models/user.model';

[09:23:04] tslint: src/providers/auth/auth.ts, line: 4
’SERVER_URL’ is declared but never used.

   L3:  import { User } from './../../models/user.model';
   L4:  import { SERVER_URL, USER_AUTH, USER_REGISTER_URL, PROXY_SERVER_URL, CREATE_WALLET } from './../constants';
   L5:  import { Injectable } from '@angular/core';

[09:23:04] tslint: src/providers/auth/auth.ts, line: 4
’PROXY_SERVER_URL’ is declared but never used.

   L3:  import { User } from './../../models/user.model';
   L4:  import { SERVER_URL, USER_AUTH, USER_REGISTER_URL, PROXY_SERVER_URL, CREATE_WALLET } from './../constants';
   L5:  import { Injectable } from '@angular/core';

[09:23:04] tslint: src/providers/auth/auth.ts, line: 4
’CREATE_WALLET’ is declared but never used.

   L3:  import { User } from './../../models/user.model';
   L4:  import { SERVER_URL, USER_AUTH, USER_REGISTER_URL, PROXY_SERVER_URL, CREATE_WALLET } from './../constants';
   L5:  import { Injectable } from '@angular/core';

[09:23:04] tslint: src/providers/auth/auth.ts, line: 6
’Headers’ is declared but never used.

   L5:  import { Injectable } from '@angular/core';
   L6:  import { Http, Response, Headers } from '@angular/http';
   L7:  // import { Observable } from 'rxjs/Observable'; 

[09:23:04] tslint: src/providers/auth/auth.ts, line: 11
’AlertController’ is declared but never used.

  L10:  import { Storage } from '@ionic/storage';
  L11:  import { Events, AlertController, Platform, NavController } from 'ionic-angular';
  L12:  import { BehaviorSubject } from "rxjs/BehaviorSubject";

[09:23:04] tslint: src/providers/auth/auth.ts, line: 11
’NavController’ is declared but never used.

  L10:  import { Storage } from '@ionic/storage';
  L11:  import { Events, AlertController, Platform, NavController } from 'ionic-angular';
  L12:  import { BehaviorSubject } from "rxjs/BehaviorSubject";

[09:23:04] tslint: src/providers/data/data.ts, line: 4
All imports are unused.

   L3:  import { Observable } from 'rxjs/Observable';
   L4:  import { AuthService } from './../auth/auth';
   L5:  import { Platform } from 'ionic-angular';

[09:23:04] tslint: src/pages/login/login.ts, line: 104
’toast’ is declared but never used.

 L104:                        let toast = this.toast.create({
 L105:                          message: `User registration successful: ${this.currentUser.email}`,

[09:23:04] tslint: src/pages/profile/profile.ts, line: 5
’NavParams’ is declared but never used.

   L4:  import { Component } from '@angular/core';
   L5:  import { IonicPage, NavController, NavParams, ModalController, App, AlertController, LoadingController } fro
   L6:  import {Validators, FormBuilder, FormGroup } from '@angular/forms';

[09:23:04] tslint: src/pages/profile/profile.ts, line: 7
All imports are unused.

   L6:  import {Validators, FormBuilder, FormGroup } from '@angular/forms';
   L7:  import {Pipe, PipeTransform} from '@angular/core';
   L8:  import { LoginPage } from "../login/login";

[09:23:04] tslint: src/pages/transactions/transactions.ts, line: 3
’LoadingController’ is declared but never used.

   L2:  import { Component } from '@angular/core';
   L3:  import { NavController, NavParams, LoadingController } from 'ionic-angular';
   L4:  import { DataProvider } from "../../providers/data/data";

[09:23:04] tslint: src/pages/social-feed/social-feed.ts, line: 21
Property ‘fb’ is declared but never used.

  L20:  constructor(public navCtrl: NavController, public auth: AuthService, public app: App, 
  L21:    private fb: Facebook, private dataService: DataProvider) {

[09:23:04] tslint: src/pages/social-feed/social-feed.ts, line: 4
All imports are unused.

   L3:  import { User } from './../../models/user.model';
   L4:  import { LoginPage } from './../login/login';
   L5:  import { Observable } from 'rxjs/Observable';

[09:23:04] tslint: src/app/app.component.ts, line: 25
Property ‘fb’ is declared but never used.

  L24:  constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen,
  L25:    private auth: AuthService,   private fb: Facebook, private events: Events,
  L26:    private loader: LoadingController, private push: Push, private alertCtrl: AlertController) {

[09:23:04] tslint: src/app/app.component.ts, line: 26
Property ‘loader’ is declared but never used.

  L25:      private auth: AuthService,   private fb: Facebook, private events: Events,
  L26:      private loader: LoadingController, private push: Push, private alertCtrl: AlertController) {

[09:23:04] tslint: src/app/app.component.ts, line: 2
’FacebookLoginResponse’ is declared but never used.

   L1:  import { Observable } from 'rxjs/Observable';
   L2:  import { Facebook, FacebookLoginResponse } from '@ionic-native/facebook';
   L3:  import { TabsPage } from './../pages/tabs/tabs';

[09:23:04] tslint: src/app/app.component.ts, line: 6
’OnInit’ is declared but never used.

   L5:  import { LoginPage } from './../pages/login/login';
   L6:  import { Component, ViewChild, OnInit } from '@angular/core';
   L7:  import { Platform, Events, LoadingController, AlertController } from 'ionic-angular';

[09:23:04] tslint: src/components/top-menu-tab/top-menu-tabs.ts, line: 24
Property ‘app’ is declared but never used.

  L24:    constructor(navCtrl: NavController, navParams: NavParams, private app: App) {
  L25:        var self = this;

[09:23:04] tslint: src/components/top-menu-tab/top-menu-tabs.ts, line: 1
’IonicPage’ is declared but never used.

   L1:  import { NavController, NavParams, IonicPage, App } from 'ionic-angular';
   L2:  import { TransferRewardsPage } from './../../pages/transfer-rewards/transfer-rewards';

[09:23:04] tslint: src/components/components.module.ts, line: 1
All imports are unused.

   L1:  import { IonicModule } from 'ionic-angular';
   L2:  import { NgModule } from '@angular/core';

[09:23:04] tslint: src/pages/hotel-detail/hotel-detail.ts, line: 80
’browser’ is declared but never used.

  L79:    let options ='location=no,toolbar=yes,hidden=no';
  L80:    const browser = this.iab.create(this.merchantItem.listing.yelp_url, options); 
  L81:  }else {

[09:23:04] tslint: src/pages/hotel-detail/hotel-detail.ts, line: 89
’browser’ is declared but never used.

  L88:    let options ='location=no,toolbar=yes,hidden=no';
  L89:    const browser = this.iab.create(this.merchantItem.listing.website, options);
  L90:  }else {

[09:23:04] tslint: src/pages/refer-friend/refer-friend.ts, line: 1
All imports are unused.

   L1:  import { Observable } from 'rxjs/Observable';
   L2:  import { Component } from '@angular/core';

[09:23:04] tslint: src/pages/refer-friend/refer-friend.ts, line: 5
’Contact’ is declared but never used.

   L4:  //Contacts 
   L5:  import { Contacts, Contact, ContactField, ContactName } from '@ionic-native/contacts';
   L6:  import { DomSanitizer } from '@angular/platform-browser';

[09:23:04] tslint: src/pages/refer-friend/refer-friend.ts, line: 5
’ContactField’ is declared but never used.

   L4:  //Contacts 
   L5:  import { Contacts, Contact, ContactField, ContactName } from '@ionic-native/contacts';
   L6:  import { DomSanitizer } from '@angular/platform-browser';

[09:23:04] tslint: src/pages/refer-friend/refer-friend.ts, line: 5
’ContactName’ is declared but never used.

   L4:  //Contacts 
   L5:  import { Contacts, Contact, ContactField, ContactName } from '@ionic-native/contacts';
   L6:  import { DomSanitizer } from '@angular/platform-browser';

[09:23:04] tslint: src/pages/transaction-detail/transaction-detail.ts, line: 5
All imports are unused.

   L4:  // import { DatePipe } from '@angular/common';
   L5:  import { DateFormatPipe } from "angular2-moment";

[09:23:04] tslint: src/pages/transfer-rewards-detail/transfer-rewards-detail.ts, line: 2
’FormControl’ is declared but never used.

   L1:  import { DataProvider } from './../../providers/data/data';
   L2:  import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
   L3:  import { AuthService } from './../../providers/auth/auth';

[09:23:04] lint finished in 3.57 s

It loads with error “cordova_not_available” because I’m using certain plugins the browser doesnt support.


#12

Yes, but is the rest correct?

You should also take care of all these tslint errors.