Hello, my app is working totally fine in emulators, but when I build it using Phonegap and submit to the Google Play store, it only displays the following text:
I searched my project and I noticed that the IP address above is only hard-coded into my app two times, both in config.xml
Line 6: <content original-src="index.html" src="http://192.168.1.69:8100" />
… and Line 80: <allow-navigation href="http://192.168.1.69:8100" />
Additionally, running the command ionic cordova plugin list gives the following output (here I’m mainly trying to communicate the fact that I have cordova-plugin-whitelist installed):
Yes, I think right before this current build, I used --livereload to emulate and test my app.
Okay, I just ran ionic cordova run android and line 8 was changed to <allow-navigation href="http://ionic.local/*" />
Is this the problem? If I submit now, will the error disappear? Sadly, I don’t have an android device on which to test so I can only submit my app to beta and have my friends test it.
Remember, this issue only presented itself when I submitted to the Play store and tested it. (or, more accurately, ran the .apk on an actual device after using Phonegap Build) So, I can build without --livereload and it works fine, it just isn’t working on an actual device.
It would make sense that having the most recent build set for --livereload would cause an error on an actual Android device.
You are a braver man than I - I would not be trying to develop an app for an operating system I did not have access to. GET A CHEAP ANDROID.
Not to put you too far off your current track but why not use Ionic Pro instead of PhoneGap Build? They will build your apk / ipa’s and support over-the-air updates - even in your situation you don’t need to depend on a local PC where you need to be on the same physical network etc - and don’t need to have additional ‘allow’ statements in your config.xml.
Seriously it would make your life crazily simpler.
The more I think about it the more I think that definitely would be the right solution for your situation.
Incur a little bit of pain for a lot of gain.
Using Phonegap Build you essentially have to give it complete bundled code which is annoying. Ionic Pro will do that step -> just set up a git repo then it’s as simple as…
git push ionic master
You can then see it build as if you were doing it yourself.
PS
Don’t forget to update the scripts section in your package.json for the ‘build’ like to…
I tried to link my app to ionic pro about a month ago when everything was revamped, but ran into some strange errors and decided to just stick with Phonegap Build because I was already using it. Here’s the error I get in the midst of switching from the legacy Ionic service I used earlier in the summer to Ionic Pro:
C:\myApp>git push ionic master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
If you have an account for ionic pro already just try this.
Create a new app on ionic pro itself.
It should give you a couple lines to run locally to create a brand new app. Do what it tells you to do, then try the git push to ionic and see if that works.
What we’re hoping to learn is can it work at all with a brand new app eliminating everything else.
Okay, I remember what happened. Installing openSSH on Windows was really confusing. That’s why I decided to stick with Phonegap Build.
I’m not sure what role openSSH has in all of this, and I don’t know if I need to download and install or how to do so with respect to Ionic.
C:\myApp>ionic link --pro-id fb80ad3e
> ionic ssh setup
[ERROR] Command not found: ssh
[WARN] OpenSSH not found on your computer.
[INFO] Looks like you haven't configured your SSH settings yet.
? How would you like to connect to Ionic Pro? Automatically setup new a SSH key pair for Ionic Pro
[INFO] The automatic SSH setup will do the following:
1) Generate a new SSH key pair with OpenSSH (will not overwrite any existing keys).
2) Upload the generated SSH public key to our server, registering it on your account.
3) Modify your SSH config (..\Users\David Biggs\.ssh\config) to use the generated SSH private key for our
server(s).
? May we proceed? Yes
> ionic ssh generate "C:\Users\David Biggs\.ssh\ionic\856057_rsa"
[ERROR] Command not found: ssh
[WARN] OpenSSH not found on your computer.
[INFO] You will be prompted to provide a passphrase, which is used to protect your private key should you lose it. (If
someone has your private key, they can impersonate you!) Passphrases are recommended, but not required.
'ssh-keygen' is not recognized as an internal or external command,
operable program or batch file.
[ERROR] Command not found: ssh-keygen
Alright, I did as you said but I still get the following error:
David Biggs@DESKTOP-NKTO318 MINGW64 /c/myApp (master)
$ git push ionic master
/c/Users/David Biggs/.ssh/config line 3: garbage at end of line; "Biggs\\.ssh\\ionic\\856057_rsa".
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Still no dice with a test app. Seems like an SSH issue…
David Biggs@DESKTOP-NKTO318 MINGW64 /c/Test (master)
$ git push ionic master
/c/Users/David Biggs/.ssh/config line 3: garbage at end of line; "Biggs\\.ssh\\ionic\\856057_rsa".
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Okay, I found out that the problem had to do with my “publickey” not being set up. I ran the command ionic login and it looks like it uploaded fine. Now I’m getting strange errors when running it in Ionic View, though… haha