Run the command below to create your first Ionic4 app. Ionic start FirstApp tabs -type=angular. This command tells ionic to create an app named “HelloWorld” using the “tabs” layout as the starting layout (you can choose among blank, tabs and slidemenu). The command above also tells ionic to use angular as our framework of choice. Run your app on a specific iOS. Similarly, you can use Ionic CLI’s command to launch an Ionic app on a particular device with a specific iOS version.
Though there are a lot of links on the internet to guide you through, some of the challenges that first time ionic developer like me face are un-documented.
Below are a few challenges that I faced and how I resolved them. These could be very trivial and obvious to experienced developers. I still thought its worth sharing.
Thanks to all fellow developers for having provided solutions on the internet.
The app development is on Adobe Brackets. https://everbrains336.weebly.com/mac-app-development-tutorial.html.
Refer here for a complete step-by-step walkthrough for running ionic on both platforms. The following sections only highlight resolutions to problems that you may encounter.
Running ionic on an iOS device:
Follow these steps from day 1. “How to use npm global without sudo on OS”. A good step-by-step walkthrough of how to install node packages without “sudo”.
I started the “sudo” way and bumped onto the following error, when adding the iOS platform to my ionic project.
$>ionic platform add iOS
Error: EPERM: operation not permitted, utime ‘/Users/<MAC-USER>/.cordova/lib/npm_cache/cordova-ios/3.9.2/package/.npmignore’
Even after re-installing as per the steps twice, I got the same error mentioned above. The NPM Cache clean ($> npm cache clean) did not help. I had to physically delete the cordova package from the iOS platform cache folder.
After that, I cleaned up all the node package installs and followed the steps from John Papa’s post. I was then able to build and run the code on an iOS simulator (use CTRL + C to exit simulator).
$>ionic run ios –device
Finally, got it my running app on an Apple iPad (iOS 9.2.1). https://everbrains336.weebly.com/how-to-find-hidden-apps-macos.html.
Running ionic on an Android device:
This also many people claim to be straight forward. But this also has a few nuances that you need to take care. After you install the Android SDK, there are few dependencies that needs to be resolved.
After installing the Android SDK, and adding the Android platform to your project, when you try to build, you may get the following error
$>Error: Please install Android target: “android-22”.
To resolve this, open the Android SDK (at terminal prompt type $>android) and install the Android API 5.1.1 (API 22).
Subsequent build may throw the following error
$>Could not find com.android.support:support-v4:23.0.1.
I was able to run past this by installing the Android Support Repository from the Android SDK, per this link . This step is not documented in any getting started guide.
Run Ionic App On Mac Os
How to remove app on mac os x. Put your Android Device in DEBUG Mode
With the above tweaks, I got it running on an NEXUS 5, Android 6.0.1.
Run Ionic App On Iphone Without Mac
Hope this helps!
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |