ionic 3 on ionic run removes my custom fonts - ionic-framework

I upgraded lately to ionic 3, in my new project i use custom font when i use ionic serve it copy the fonts from src/assets/fonts to www/assets and it works well.
But when i run it on android using ionic cordova run android the font files inside www/assets disappears and it run on my device with no fonts.
my ionic info:
#ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
local packages:
#ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.6.0
System:
Android SDK Tools : 25.2.5
Node : v6.10.3
npm : 3.10.10
OS : Windows 10

It is something weird with the latest version of ionic cli 3.9.2 or webpack (not sure). Fonts with WOFF extensions only are copied
I tried using WOFF format instead of TTF and it works.

You should be placing the asset into your WWW folder before the build.
if you add a fonts folder to your www it should place it in your platforms when you add the platforms and emulate, if not you will need to add the font to your platforms folder for it to emulate and be in your builds
yourapp/platforms/android(or ios)/assets/www/font

try running ionic cordova build android before running ionic cordova run android.

Related

Changes are not getting reflected in Ionic 3 app even after successful build

I met a problem for 3 days with my application ionic 3.
In fact, after builder in prod and release mode, it is always the old version that is always taken into account. the changes do not reflect.
So when mode debug, the changes are well taken.
I tried several solutions may nothing.
Ionic v3
Also i have tried many solutions but no changes
ionic cordova platforms rm android
ionic cordova platforms add android
ionic cordova build android --prod --release --aot
------------no change-------------
I have downgrade the app-scripts version always same
i have delete the www folder and run ionic serve --lab after i run build commande still no change
I need help.
Thanks you in advance
Ionic:
Ionic CLI : 5.2.3
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.1.8
Cordova:
Cordova CLI : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : android 7.1.4, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic 3.1.2, cordova-plugin-ionic-webview 1.2.1, (and 18 other plugins)
Utility:
cordova-res : 0.6.0
native-run : 0.2.8
System:
Android SDK Tools : 26.1.1 (C:\Sdk)
NodeJS : v10.15.1 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10
Build pass successfully
remove android platform using
ionic cordova platform rm android remove manually node-modules and
package-lock.json (imp*)
Unistall old Application
npm cache clean --force
finally run npm install
ionic cordova platform add android
ionic cordova build android
As #MD Khali said to remove the platform and add platform again, but if it happens after that you just need to click save 3-4 time. Because I have the same problem in my ionic 3 projects.
Finally I found the solution.
The problem was related to the ionic plugin (appflow).
I had two choices
1. Generate the apk from the appflow platform with the configured branch.
Remove the ionic plugin applflow
I took the choice 1.
Documentation of appflow https://ionicframework.com/appflow

Ionic 3 :If this is a project you'd like to integrate with Ionic, create an ionic.config.json file

I'm working with Ionic3: (version 4 is Beta yet)
Ionic:
ionic (Ionic CLI) : 4.5.0
System:
NodeJS : v8.13.0
npm : 6.4.1
OS : Linux 4.13
And I try to run a confirmed project from github (320 stars), so the npm i goes OK, but When I try to run the App I've got a strange Error:
ionic cordova run android
[ERROR] Sorry! ionic cordova run can only be run in an Ionic project directory.
If this is a project you'd like to integrate with Ionic, create an
ionic.config.json file.
So What Should I do ? if I have to create a file as recommended what I will put into it ?

Ionic3 error on build ios Promise rejected with non-error: 'Error code 65

I am trying to create an ipa file but I have this unreadable error
when I run this command line on my Mac
ionic cordova build ios --prod --release
CordovaError: Promise rejected with non-error: 'Error code 65 for
command: xcodebuild with args:
-exportArchive,-archivePath,MyApp.xcarchive,-exportOptionsPlist,/Users/FSE/myApp04/platforms/ios/exportOptions.plist,-exportPath,/Users/FSE/myApp04/platforms/ios/build/device'
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
Ionic:
ionic (Ionic CLI) : 4.3.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0, (and 4 other plugins)
System:
ios-deploy : 1.9.4
NodeJS : v11.0.0 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS
Xcode : Xcode 10.1 Build version 10B61
I've solved it like this
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
The accepted answer is correct. You can also put in build.json file:
{
"ios": {
"release": {
...,
"buildFlag": [
"-UseModernBuildSystem=0"
]
}
}
}
either
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
or just open
xcode -> File -> Workspace Settings
and change build system to "Legacy Build System"
In my experience the "buildFlag" is not enough, I mean I had:
"ionic cordova run ios -- --buildFlag=\"-UseModernBuildSystem=0\""
... but I was still getting the Error code 65.
To solve the issue you must open the project you find inside "yourproject/platforms/ios" in xcode and check that the signing certificate is ok. To do so just click on the project (first icon on the top-left panel) and check the "Signing" section.
For newer version of xcode, you have to have Legacy Build System. If you already have the Legacy Build System, then uncheck the automatic signing and recheck it. Don't know why but it worked for me.

Ionic googleplus plugin: Refused to display in a frame because it set 'X-Frame-Options' to 'sameorigin'

I am facing this issue when running in browser mode. How can I solve this? Would be possible to open this dialog in a new tab instead of an iFrame?
https://github.com/EddyVerbruggen/cordova-plugin-googleplus
Many thanks for the help!
Using Ionic with following settings:
cordova-plugin-googleplus 5.3.2 "Google SignIn"
Ionic:
ionic (Ionic CLI) : 4.0.5 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0, browser 5.0.4, ios 4.5.5
System:
NodeJS : v8.11.3 (/usr/local/bin/node)
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 10.0 Build version 10A255
Try removing the cordova-plugin-inappbrowser plugin.
Coexist with inAppBrowser plugin (fixed)
Some plugins can only be tested/working inside a device.
I remember that the google+ sign need to use the google play services and the apk signature those things aren't available running in local browser with chrome.
It's likely you test the android push notifications with the chrome it won't work.
For these type of things better if you call the ionic with the live reload to test in the device and reload when you make changes
ionic cordova run android -l -c

Getting "Sorry! The configured backend (pro) does not know about ionic upload" When trying to upload the Ionic App

I'm trying to upload the App I built to my Ionic Pro account.
I've linked my account and added the SSH keys but after running ionic upload I'm getting this error
[ERROR] Sorry! The configured backend (pro) does not know about ionic upload.
This is My Ionic Info
cli packages: (/home/jos/Desktop/helloapp/node_modules)
#ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
Gulp CLI : not installed globally
local packages:
Cordova Platforms : android 6.2.3 browser 4.1.0
Ionic Framework : ionic1 1.3.1
System:
Android SDK Tools : 26.0.2
Node : v6.11.0
npm : 3.10.10
OS : Linux 3.13
ionic upload doesn't work with backend pro, you have to create an app
on https://dashboard.ionicjs.com/apps and there will be a setup guide :)