Hello, I have an existing Ionic 2 app and have decided that it’s time to migrate it to Ionic 4. I have looked around and found various guides for migrating to 4, however most of them are either from Ionic 1 or Ionic 3. My question is would a Ionic 3 to 4 guide work well for me, or should I take a different approach to migrating?
Migrating an existing Ionic 2 app to Ionic 4.0
[ionic4] Dismiss Loading spinner among pages
@rodrigojrmartinez Did you find an answer? I’m also looking for something similar…
No provider for Storage! IONIC 4
I tried and now it return me this error
app module.ts
import { LoginPageModule } from './login/login.module';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { IonicStorageModule, Storage } from '@ionic/storage';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { HttpClientModule } from '@angular/common/http';
import { ConfigurationPageModule } from './configuration/configuration.module';
@NgModule({
declarations: [AppComponent,
],
entryComponents: [
],
imports: [
BrowserModule,
HttpClientModule,
IonicModule.forRoot(),
IonicStorageModule.forRoot(),
FontAwesomeModule,
AppRoutingModule,
ConfigurationPageModule,
LoginPageModule
],
providers: [
Storage,
StatusBar,
SplashScreen,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
],
bootstrap: [AppComponent]
})
export class AppModule { }
No provider for Storage! IONIC 4
Sorry I was telling you bullshit, damned
No provider for Storage! IONIC 4
So like I said, forget what I said before, that’s dumb, sorry, need a coffee. I had a look, I do the same as you do
package.json:
"@ionic/storage": "2.2.0",
app.module.ts
import {IonicStorageModule} from '@ionic/storage';
...
imports: [
...
IonicStorageModule.forRoot(),
...
Do you use somewhere else the Storage
in your app? And if yes, how?
Linker command failed with exit code 1 ios build problem
my was getting problem and stuck in splash screen after that I open the console in xcode and getting an error that I have to upgrade my facebook
then I open facebook developer and I got a message to update my sdk by updating my podfile by these lines
pod 'FacebookSDK'
pod 'FacebookSDK/LoginKit'
pod 'FacebookSDK/ShareKit'
pod 'FacebookSDK/PlacesKit'
pod 'FBSDKMessengerShareKit'
then run `pod update’
after that, i opened the xocde to build and got this error and build failed
duplicate symbol _OBJC_IVAR_$_FBSDKLikeButton._likeActionController in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKLikeButton.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKLikeButton.o)
duplicate symbol _OBJC_CLASS_$_FBSDKLikeButton in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKLikeButton.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKLikeButton.o)
duplicate symbol _OBJC_METACLASS_$_FBSDKLikeButton in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKLikeButton.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKLikeButton.o)
duplicate symbol _OBJC_IVAR_$_FBSDKLikeButton._objectType in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKLikeButton.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKLikeButton.o)
duplicate symbol _OBJC_IVAR_$_FBSDKLikeButton._isExplicitlyDisabled in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKLikeButton.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKLikeButton.o)
duplicate symbol _OBJC_IVAR_$_FBSDKLikeButton._soundEnabled in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKLikeButton.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKLikeButton.o)
duplicate symbol _OBJC_IVAR_$_FBSDKLikeButton._objectID in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKLikeButton.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKLikeButton.o)
duplicate symbol _OBJC_IVAR_$_FBSDKAppInviteContent._promotionText in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKAppInviteContent.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKAppInviteContent.o)
duplicate symbol _OBJC_CLASS_$_FBSDKAppInviteContent in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKAppInviteContent.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKAppInviteContent.o)
duplicate symbol _OBJC_METACLASS_$_FBSDKAppInviteContent in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKAppInviteContent.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKAppInviteContent.o)
duplicate symbol _OBJC_IVAR_$_FBSDKAppInviteContent._destination in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKAppInviteContent.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKAppInviteContent.o)
duplicate symbol _OBJC_IVAR_$_FBSDKAppInviteContent._promotionCode in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKAppInviteContent.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKAppInviteContent.o)
duplicate symbol _OBJC_IVAR_$_FBSDKAppInviteContent._appLinkURL in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKAppInviteContent.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKAppInviteContent.o)
duplicate symbol _OBJC_IVAR_$_FBSDKAppInviteContent._appInvitePreviewImageURL in:
/Users/anspireagency/Library/Developer/Xcode/DerivedData/Doctory-dumowpyuqkndphbakkgvmohbptmh/Build/Products/Debug-iphonesimulator/FBSDKShareKit/libFBSDKShareKit.a(FBSDKAppInviteContent.o)
Doctory/Plugins/cordova-plugin-facebook4/FBSDKShareKit.framework/FBSDKShareKit(FBSDKAppInviteContent.o)
ld: 1192 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Ion-toast change background-color problem
Hello! I have created a component and inside it, I am using ion-toast. So I added cssClass to change the background-color of the toast. I have searched every topic regarding it, but nothing works. The docs are not helpful at all. What should I do in order to make it work? Basically I need two different classes based in post result. If I get an error, I want background-color: red and if I get a success, I want the .toast-message to have background-color: green. Any clues? Thank you.
Ion-select in v4 beta
Having the same problem with the v4 RC. Is there any chance @AaronSterling ort someone else could give an example of how it should be done?
No provider for Storage! IONIC 4
Also, as I said something stupid, I would be happy to clone your project and give a try if you want
No provider for Storage! IONIC 4
Yes I create a simple login page which saves url and credential on storage
that’s the code:
import { Storage } from '@ionic/storage';
await this.storage.get("Connection").then(res => {
if (res != undefined) {
this.IP = res
ServiceRootUrl = "http://" + res";
}
else {
this.IP = "10.0.2.2"
ServiceRootUrl = "http://" +this.IP"
this.storage.set("Connection", ServiceRootUrl);
}
})
It work but then when i change page then i throws me that error.
this is the only page where I use storage
Migrating an existing Ionic 2 app to Ionic 4.0
The jump from Ionic 2 to 3 wasn’t very big, therefore a 3 to 4 upgrade guide should work for 2 to 4 as well.
Linker command failed with exit code 1 ios build problem
There is the solution:
Remember that you can make a little search in this forum before create a new post.
Ionic native/core@5.0.0 error compile
I update my component ionic native/core into 5.0.0 version because I need this version to work other plugin but when I compile with --prod give me a following error:
[16:42:09] typescript error
Error encountered resolving symbol values statically. Only initialized variables and constants can be
referenced because the value of this variable is needed by the template compiler (position 100:22 in the
original .ts file), resolving symbol Plugin in
C:/_programacion/node_modules/@ionic-native/core/decorators/interfaces.d.ts, resolving
symbol Plugin in C:/_programacion/node_modules/@ionic-native/core/index.d.ts, resolving
symbol StatusBar in C:/_programacion/node_modules/@ionic-native/status-bar/index.d.ts,
resolving symbol StatusBar in
C:/_programacion/node_modules/@ionic-native/status-bar/index.d.ts
[16:42:09] ionic-app-script task: “build”
[16:42:09] Error: The Angular AoT build failed. See the issues above
Error: The Angular AoT build failed. See the issues above
at C:_programacion\node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:237:55
at step (C:_programacion\node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:32:23)
at Object.next (C:_programacion\node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:13:53)
at fulfilled (C:_programacion\node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:4:58)
[ERROR] An error occurred while running subprocess ionic-app-scripts.
No provider for Storage! IONIC 4
that’s maybe the error, I don’t think you can combine await
with then
which are basically the same
so
const res = await this.storage.get("Connection");
if (res != undefined) {
this.IP = res
ServiceRootUrl = "http://" + res";
}
else {
this.IP = "10.0.2.2"
ServiceRootUrl = "http://" +this.IP"
await this.storage.set("Connection", ServiceRootUrl);
}
or
this.storage.get("Connection").then(async (res)=> {
if (res != undefined) {
this.IP = res
ServiceRootUrl = "http://" + res";
}
else {
this.IP = "10.0.2.2"
ServiceRootUrl = "http://" +this.IP"
await this.storage.set("Connection", ServiceRootUrl);
}
})
Ionic 4 native plugin problem
When I compile using native/core version 5.0.0 give me an error when I compile
any ideas?
No provider for Storage! IONIC 4
also did you inject the storage in the constructor of the component/service/page where you use it?
constructor(private storage: Storage) {
}
Linker command failed with exit code 1 ios build problem
I searched before posing my issue … I’m opening the correct file .xcworkspace
Font size difference caused by Android font size settings
thanks man, saved me some trouble!
Ionic Native HTTP Client delete function not works, it doesn't send the parameters
I had the same issue.
For anyone who has the same problem just set this
import { HTTP } from '@ionic-native/http';
constructor( private httpCordova: HTTP){}
this.httpCordova.setDataSerializer('json');
before HTTP call’s
No provider for Storage! IONIC 4
Yes I do It. I’m creating a test app where I can let you show the problem