How do I recompile an Ionic 1.x app? - javascript

I built an Ionic app a couple years ago with Ionix 1.x and JavaScript. It's been running fine for quite a while, but now it needs to be recompiled to allow for use on iOS 11. My build is now completely broken with the ionic#latest updates.
My question is how do I get the correct version of Ionic installed on my dev machine so that this app can compile? Should I be able to use the latest ionic-cli command with an older version of the Ionic dependencies? I'm not ready to port my application to Ionic 2+ and Angular 2+ and TypeScript.

ionic#latest cli is fine for building an ionic1 project but you will find some compatibility issues with older platforms and plugins. Suggest you start by updating the platform:
cordova platform update ios
For some of the latest iOS 11 issues and in particular, iPhone X screen issues, you may want to try:
cordova platform update ios#4.5.0
For any plugins that are causing problems, you will need to remove them individually and re-add them:
cordova plugin rm cordova-plugin-xxxx --save
cordova plugin add cordova-plugin-xxxx --save

Related

How do you deploy React (non-Native) app to Android?

I've created a React app that looks great on mobile, but rather than a user just visiting my website URL I also want them to be able to install it as an apk through the playstore.
Is there any trivial way to port it to Android, that would allow me to continue to develop just one version of the app? I looked into porting it to react-native, but much of it would need to be recoded. I also considered just opening the app URL in a browser popup, but I'm wondering if there's a better way.
Thanks -
Edit: Based on Michael's comment, I'm trying out turning my app into PWA compliant, then using Capacitor to deploy on Android & iOS. I'll see how this goes and write my own answer if this works out (and no one else answers =o)
Forgot about this question. As the OP in 2021, I resolved this by using Capacitor - A Javascript library that converts your app to Android and iOS builds.
Install Capacitor: npm install #capacitor/core #capacitor/cli
Initialize it: npx cap init
Add Android and (optionally) iOS support: npx cap add android npx cap add ios
Create an Android app: npx cap sync
Open Android Studio with your new app (to build a .APK): npx cap open android
Optional: Open Xcode to build an iOS app: npx cap open ios
Source: https://capacitorjs.com/docs/getting-started

Is it possible to have multiple installation of framework7 on the same box?

I'm working on a project with cordova 6.2.0 and framework7 1.6.5.
Now I've to start a new project based on cordova 7.1.0 and framework7 2.0.7.
I know that with version-manager-cordova-software [1] it's possible to run different cordova versions in the same development box, does exist something similar for framework7?
I'm searching for a working setup for both linux and osx.
[1] https://www.npmjs.com/package/version-manager-cordova-software
I solved by myself: framework7 is always contained inside the cordova project, so it is possible to have different version on the same box.
The globally installed package is framework7-cli (https://www.npmjs.com/package/framework7-cli), actually at version 0.2.0, and it seems to work with both f7 v.1 and v.2.

Phonegap file transfer plugin causing the Android build to fail

I'm working on a mobile application for using Phonegap/Cordova, I'm using the file transfer plugin to upload photos from the photo library.
The iOS build was a success, while the Android build is giving me an error.
I'm not sure what's causing the build to fail and how to prevent that failure.
Here's the build log:
http://freetexthost.com/orbg5lm0en
cordova-plugin-file-transfer has a dependency for cordova-plugin-file 5.0.0, which is not compatible with your cordova-android version, it requires cordova-android 6.3.0 or newer. So you have two options:
Update your cordova-android 6.3.0 or newer (I would recommend 6.4.0)
Downgrade cordova-plugin-file-transfer to 1.6.3 as the dependency for cordova-plugin-file will be to an older version of the plugin that should work with your current platform
To update cordova-android you have to remove and re add it (beware that if you made some manual change on the project you will lose it)
cordova platform rm android
cordova platform add android#6.4.0
To downgrade the plugin you also have to remove it first
cordova plugin rm cordova-plugin-file-transfer
cordova plugin add cordova-plugin-file-transfer#1.6.3

Ionic ,Node js build ios error

I am trying to create a basic mobile app using steps provided on
this link
Everything worked fine till step 3. But on step 3
$ ionic build ios
is giving error as under
✗ (node:9776) fs: re-evaluating native module sources is not
supported. If you are using the graceful-fs module, please update it
to a more recent version.
Error: xcodebuild was not found. Please install version 6.0.0 or
greater from App Store
I am already using the latest version of node.js ie; 6.2.0. Am I missing anything?
Simply put, you can't compile iOS apps locally using a Windows Machine. You'll either need to compile those apps using a Mac, or a cloud-compiler service, like PhoneGap Build or Ionic Platform.

ionic doesn't install app

I'm trying to simulate my app on ios simulator with ionic. But when I run:
ionic build ios
ionic emulate ios
My app doesn't appear on the simulator. What should I do?
You need to install IOS-Sim tool.
The ios-sim tool is a command-line utility that launches an iOS application on the iOS Simulator.
Apply this command on terminal window:
$ sudo npm install ios-sim -g
Make sure that you have added the iOS platform to the project and verify that you have the iOS-Sim tool. If this is the problem you should a message that you are missing any of those two in the terminal.
if you are using visual studio, you need to configure the remote ios agent.
follow this documentation https://msdn.microsoft.com/library/dn757054.aspx#ios to configure and test you application
Sometimes, an ionic app can take a really long time to load on the simulator. First try waiting.
Second, if it still doesn't load, know that the simulator is a lot pickier about what it will run and not run than the browser. Check if you app works in the browser. Try a different browser (such as Firefox). If it does not, debug from there. If it does work in the browser, run your code through a linter to find that one semi-colon that your browser didn't care about.
Try start do it on xcode(in each my ionic/cordova project i have to use some native solutions to build application for iOS i use xcode for android i use android studio)
I know that different platform need some hours of adapt but this knowledge is very important
Try remove and add platform again.
ionic platform rm ios
and
ionic platform add ios
simply use following commands to build and run your ionic app respectively.
ionic cordova build ios
ionic cordova run ios

Categories