The only problem is hot reloading doesn’t always work. But after a little fiddling around I figured out a work around to get Glitch to sometimes hot reload everything when necessary: Simply go in and add a comment to the server.js file to trick glitch into hot reloading everything =>
Submitted a really interesting application to Plaid Inc. tonight… through their API! Pretty interesting huh? Originally I submitted an application via the startup social network AngelList, but happened to discover their “Apply by API” option while checking out their careers page. Wish me luck!
My Application & Server Response from the Plaid API:
Okay, so it looks like you’re having some trouble trying to run your Apache Cordova app on your iPhone. No worries! This blog post should get you pointed in the right direction.
First, if you happen to be receiving this CordovaError regarding xcode-select try installing this one dependency before attempting to run the app again on your device:
$ npm install -g ios-deploy
This is what the Official Cordova documentation suggests doing. However, this actually didn’t work for me for whatever reason. Luckily, I was able to install ios-deploy using brew instead, so maybe you should try that:
$ brew install ios-deploy
Now even though you should have all of the required dependencies installed (assuming your ran a traditional hello, world with swift and Xcode before installing Cordova), you may still find that you are running into the same error. The next step towards my eventual solution was running the following command to fix xcode-select:
We’re getting closer. But I happened to next encounter an error message that read something like…
error: Signing for “HelloCordova” requires a development team. Select a development team in the Signing & Capabilities editor. (in target ‘HelloCordova’ from project ‘HelloCordova’)
The last step you need to take is to log in to developer.apple.com to figure out your developmentTeam identifier so you can set the developmentTeam flag when you go to run the app. This should fix the above error message. The developmentTeam identifier is located next to your name when you log in to developer.apple.com up in the top right hand corner of the website.
Last, run the app while remembering to set the necessary flags:
$ cordova run ios --device --developmentTeam="XX34TU9917" --automaticProvisioning=true
P.S. I made up the XX34TU9917 developmentTeam, so make sure you use your actual developmentTeam identifier found at developer.apple.com.
Hello there dear internet friend! It looks like you are having some trouble getting Apache Cordova to work. If you happen to be on a Mac, this blog post is for you! Likewise, a similar fix should work on Windows as well.
This isn’t my first time running into this quite annoying problem. Assuming you have Android Studio installed, the issue is either that Android Studio hasn’t set a global path to Java, or Android Studio is using a newer version of Java than the older version 8 that Cordova is still using.
Now if you happen to be really good with the UNIX operating system you can go track down Java and set the path yourself, or you can simply go with the easier solution that I’ve been using on all of my machines.
First, go ahead and install the brew package manager with the following terminal command:
Next, install cask and the OpenJDK version of Java:
$ brew tap caskroom/cask
$ brew tap AdoptOpenJDK/openjdk
$ brew cask install adoptopenjdk8
Now, we still aren’t quite done. If you try to run cordova at this point you will likely encounter a similar error related to grade:
Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=/Users/topher/Library/Android/sdk (DEPRECATED) Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper. Please include gradle in your path, or install Android Studio
To fix this, all you have left to do is install gradle with brew:
$ brew install gradle
And that’s it! Now you can run your Cordova app on your device:
Okay, so you’ve stumbled upon this terribly annoying error message: UISceneSession is only available in iOS 13.0 or newer, now what? The best answer is to simply update the software on the iPhone that you are trying to run your app.
The worse answer is to actually go in to the code by hand and add @available attributes to the parts of the boilerplate code generated by Xcode that aren’t compatible with the older version of iOS running on your test device. But in my opinion this is trying to swim against the current. Just go ahead and update the software on your phone and all will be well.
Although if I remember correctly, this is always going to be sort of a damned-if-you-update, damned-if-you-don’t-update sort of situation. You may end up finding yourself running into the opposite situation: You update the version of iOS on your iPhone, then the older version of Xcode becomes out of sync with your device. Unfortunately this is just the way of native mobile development— a never ending series of software updates.
If you find yourself struggling to get the Apache Cordova screen orientation lock plugin to work, the problem is most likely that you are calling the .lock() method before the ‘deviceready’ event has fired. To fix this problem, simply create a call back function containing your .lock() method call, then pass this callback function as an argument to the deviceready event listener like so =>
First, make sure to install the screen orientation plugin for apache cordova