Ionic app does not seem to make use of cordova


#1

Hi all, I made a fairly simple app using the ionic “super” starter. I changed it to retrieve some data from my business website using the API and to be able to “share” the articles/images using the cordova social sharing plugin.

When I play with the app locally using the Ionic Dev-App, everything works great.

When I actually build the app and then look at it on my device, the notification bar is gone and the social sharing doesn’t work. The HTTP get requests to the API are working but the splash screen appears to be broken, as well as the status/notification bar (can’t see my battery or wireless network status etc) and the sharing doesn’t work.

I thought perhaps it was a glitch in trying to serve the web-app from my server so I built the android native APK and launched it on the google play store. After downloading it, the same problem persists. No top bar on the phone, and the sharing isn’t working. Not just that but it doesn’t seem to be remembering whether or not the user has skipped the intro or logged in, etc.

Maybe it’s a problem with the “super” starter but I don’t imagine that’s the case. There’s got to be something wrong in the way the app is being built for the devices, or something.

Any insight as to what I’ve done wrong here?


#2

It really seems to be related ith your app since mine is working like a charm! :wink:
(Super starter too)


#3

I wish that helped.

I think what I’m going to do is start from scratch, make a new app with the super starter, then copy/paste the code from my own pages into the new one. That should let me know if it’s my actual code that’s screwed up (I don’t think so but maybe) or if I somehow broke the framework itself with all of my builds and platform changes and stuff (feels more likely to me).


#4

Or start from scratch but implement the features you need.


#5

That’s what I mean, yeah. Start a new project, add the plugins that I need, and go from there. I haven’t added many plugins, just one for the wordpress API and another for social sharing.

I just find it so strange that everything works perfectly in the dev-app but when I build the app and launch it for real on a device, it’s all messed up. Doesn’t work on android or iOS using the add to homescreen feature, nor does it work in the native APK I launched on the google play store. Even the sass styling changes don’t quite work right. Font should be white in some spots but isn’t. Again, it all works fine in dev-app.

Real head scratcher lol


#6

What does ionic info output?

What does your package.json look like?

How are you building the app?

(Figured we may as well try and get as much info as possible :man_shrugging:)


#7

Ionic info:
cli packages: (C:\Users\etc…):

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.9
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.9.2

System:

Node : v8.11.1
npm  : 5.6.0
OS   : Windows 10

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

Package.json

{
“name”: “------”,
“version”: “1.0.0”,
“author”: “---------”,
“homepage”: “----------/”,
“private”: true,
“scripts”: {
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“lint”: “ionic-app-scripts lint”,
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“dependencies”: {
@angular/animations”: “5.2.10”,
@angular/common”: “5.2.10”,
@angular/compiler”: “5.2.10”,
@angular/compiler-cli”: “5.2.10”,
@angular/core”: “5.2.10”,
@angular/forms”: “5.2.10”,
@angular/http”: “5.2.10”,
@angular/platform-browser”: “5.2.10”,
@angular/platform-browser-dynamic”: “5.2.10”,
@capacitor/android”: “^1.0.0-alpha.37”,
@capacitor/cli”: “^1.0.0-alpha.37”,
@capacitor/core”: “^1.0.0-alpha.37”,
@ionic-native/camera”: “4.3.3”,
@ionic-native/core”: “^4.7.0”,
@ionic-native/photo-viewer”: “^4.7.0”,
@ionic-native/social-sharing”: “^4.7.0”,
@ionic-native/splash-screen”: “4.7.0”,
@ionic-native/status-bar”: “4.7.0”,
@ionic/storage”: “2.1.3”,
@ngx-translate/core”: “8.0.0”,
@ngx-translate/http-loader”: “^2.0.0”,
“android”: “0.0.8”,
“angular-local-storage”: “^0.7.1”,
“com-sarriaroman-photoviewer”: “^1.1.16”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-ionic-keyboard”: “^2.0.5”,
“cordova-plugin-ionic-webview”: “^1.1.19”,
“cordova-plugin-splashscreen”: “5.0.2”,
“cordova-plugin-statusbar”: “^2.4.2”,
“cordova-plugin-whitelist”: “^1.3.3”,
“cordova-plugin-x-socialsharing”: “^5.4.0”,
“es6-promise-plugin”: “^4.2.2”,
“ionic-angular”: “3.9.2”,
“ionicons”: “3.0.0”,
“platform”: “^1.3.5”,
“rxjs”: “5.5.10”,
“sw-toolbox”: “3.6.0”,
“wp-api-angular”: “^3.0.0-beta8”,
“zone.js”: “0.8.26”,
“cordova-ios”: “^4.5.4”,
“cordova-browser”: “^5.0.3”,
“cordova-android”: “^7.0.0”
},
“devDependencies”: {
@ionic/app-scripts”: “3.1.9”,
“typescript”: “~2.6.2”
},
“description”: “-------------------”,
“cordova”: {
“plugins”: {
“cordova-plugin-whitelist”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-webview”: {},
“cordova-plugin-ionic-keyboard”: {},
“cordova-plugin-x-socialsharing”: {},
“com-sarriaroman-photoviewer”: {},
“cordova-plugin-statusbar”: {}
},
“platforms”: [
“ios”,
“browser”,
“android”
]
}
}


#8

Hello,

maybe you should show some code. For example everthing related to the not working sass, implementation, using, importing etc…

Best regards, anna-liebt