Baqend is not working with emulator or real device using ionic - ionic-framework

I'm developing an app using Baqend and ionic. When I run ionic serve the app runs fine in the browser and it is able to call Baqend. However, when I run ionic cordova emulate ios suddenly Baqend is not working in the Xcode emulator and it does not produce any errors in the console even with adding the --consolelog parameter.
I also tried:
Opening the project inside of Xcode and running it from there but same result.
Running the ionic/Baqend starter (https://github.com/baqend/ionic1-starter) and same result.
How can I debug this issue?
Update: I just tested it with Android using ionic cordova emulate android and it worked fine. So it seems that the issue only exist with ios.

The issue was solved by adding <allow-navigation href="https://*.app.baqend.com/*" /> in config.xml file.

Related

ionic app run perfectly on browser but not working on devApp and android apk

This question is related to ionic 3 and I want to know how to run an ionic app using a real device.
I have developed an hybrid application and I was not able to connect my app with server. It works fine in my laptop browser. But it does not work in devApp and android apk.
I have tried many solutions but was not able to get the perfect solution. I have made a proxy server to access the api by ionic devApp but it doesn't even show a single error.
I think this problem is related about CORS.
Use the additional parameter of --devapp when running your ionic serve.
ionic serve --devapp
Should work now.
For me allowing port 8100 in my firewall was needed. Then everythig works.
CORS is not a problem when you build your app on a real device.
To run your app on android device :
ionic cordova platform add android
ionic cordova build android
ionic cordova run android (Connect your device before executing this)
Try Reinstalling cordova-plugin-whitelist plugin.
I'd the same problem. But I just uninstalled and installed again the ionic DevApp and it solved it.
Try using the command ionic serve -c this for view the app into Ionic devApp
I am not sure if this helps now - In your DevAPp you have settings where you can manually enter IP address and port. This will be the private IP (192.x.x.x) and 8100 that is displayed when you start the ionic serve --devapp from the terminal.

ionic v2 error ionic view

I'm developing an ionic v2 app but even working on ionic lab it gets a complete white screen on the ionic view. If I do the same withe the ionic v1 it works.
ionic start sample --v2
cd sample
ionic lab
ionic upload
It shows white but
ionic start sample
cd sample
ionic lab
ionic upload
It works perfectly. No changes on the code at all
Thanks
ionic 2 needs at least 4.4 android to work, lost a lot of time on this and there is nothing on the ionic website informing about that. Writing down here to help anyone in the future.
Ionic v2 supports android 4.4 and up. The older browser on pre-4.4 devices do not have the features needed for ionic2 and angular 2 to work. Though this can be fixed with crosswalk.
The supported platforms are list here:
http://ionicframework.com/docs/overview/#browser-support
You can go back to 4.1 with crosswalk it states.
ionic 2 needs at least 4.4 android to work,.. for more info debug app in chrome.
from ionic 2 Ionic officially stops to use ionic lab.
You can run and test your app in browser using command "ionic serve".
Ionic2 app was initially created with --v2 flag but now they removed it . So nothing happens with --v2
Better way to solve the code 1st time by running directly into android devices by
Ionic cordova run android or
Ionic run android
Then connect your device with your system and open chrome and enter chrome://inspect to the url
Now you can console log the the error and can find the way of solutions.
Now try to run by ionic view
Remove the platform and then add it again.
please try eionic start sample --type=ionic-angular

ionic 2: keeps stopping on android emulator

This is my first time writing an ionic 2 app. I have cloned from github a tutorial app and successfully built it on my local pc.
$ npm install
$ ionic platform add android
$ ionic build android
This command works $ ionic serve --livereload (I can run my app in the browser, set breakpoint and debug in visual studio code. Everything works perfectly)
But when I attempt to deploy the app on my android emulator
(target:Android 7.0, cpu/abi: Intel Atom (x86_64), Ram 2048, VN Heap:64), this app craches.
This is the command to deploy app to emulator:
$ ionic run android
And this is the crach:
I have looked at many threads over the internet. Some suggest to reinstall every thing. (But ionic server works perfectly...). Here are my system specifications:
npm:
ionic 2:
Please any help would be greatly appreciated
I also had the same problem with ionic when running on emulator.
I solved it by making sure that the value for FadeSplashScreenDuration and SplashScreenDelay are set as Integers, instead of doubles in the config.xml file under your ionic project folder.
It might be not the solution you were looking for but lately I had the same problem and couldn't found the solution.
My target on emulator had android 7.0 version (API 24).
It started to working when i created new device with android 6 (API 24).

My Ionic app works fine on browser but does not open in my phone

my ionic project works fine with ionic serve --lab ,but while copied the.apk file in build folder to my phone and install the app but blank screen appears ,
Please can anyone suggest what might be my problem
my app is using google maps,key is provieded for both app and browser in index.html
Have you tried running it in the emulator ? Since its much easier to see the error logs . Try ionic emulate android -l or ios -l (whichever OS you are building for) and then once the execution starts run the command consolelogs it will log all the activity and you will have a better understanding about why its not working.
+1 for using Chrome Remote Debugging feature. It give you the same output as you would receive from running you app in the browser.
Additionally, I have found that sometimes if your app is already compiled, the ionic CLI doesnt always copy your current files into the APK, and uses the older cached files instead. If you are banging your head against the wall, run the following commands to make sure you have your latest code in your APK.
ionic platform remove android
ionic platform add android
ionic run android
I suggest you use the Chrome Remote Debugging feature. I encountered the same, and looked for answers to my symptom for hours. Once I connected to the chrome remote debugger, I got the console.log back, and noticed there was a problem in my routing setup.
It was a problem with ionic CLI. I've updated it to the latest and reinstalled all dependencies.

Error on ionic build command

i am facing this error when i want to run ionic build android command.
i tried everything and obviously i have no idea what to do here .
i have SDK and JDK , Gradle and other things .
if i run the ionic serve command it works with no problem and the app shown in the browser but i can't build the app with build command .
i installed the cordova and ionic using this tutorial http://learn.ionicframework.com/videos/windows-android/ and i think i dont miss anything around here .
when i run android command , it shown up the android sdk manager with the API installed , when i run gradle it works . but this one does not work
here is the picture of the error :
This happens to me with ios builds and re-installing the platform will always worked for me. try that
ionic platform remove android
ionic platform add android
read here on almost the same thing (but with ios)
HTH