Ionic Development Experience

· 2 min read · 365 Words · -Views -Comments

Recently tried to develop an Android TV App, which involved using Ionic/Capacitor. Here I’ll organize the issues encountered during learning/development.

It’s been a while since I did App development, so I was inevitably unfamiliar with new technologies and indeed encountered some pitfalls.

Theoretical Knowledge

Ionic vs Cordova

  • Ionic and Cordova solve problems at different levels - Ionic is more high-level
  • Cordova addresses cross-platform issues, such as system-level communication, accessing system APIs, Bluetooth, storage, etc. Ionic builds on Cordova by adding basic UI components, improving development efficiency

Migration from Cordova to Capacitor

  • The inactivity of the Cordova community limited Ionic, since Ionic depends on Cordova. So the official team decided to implement their own solution - Capacitor. According to the official documentation, they currently recommend using Capacitor.

  • Of course, those using Cordova can follow the official migration documentation

  • For new projects, Capacitor is recommended

Development Pitfalls Encountered

Android-Gradle

If Android Studio doesn’t recognize the project as an Android Module when opening it, it’s likely a Gradle build issue. Check if the version is appropriate based on console errors, confirm the version is OK, and then rebuild.

Xcode/Android Studio

Since we need to package APK/iOS apps, basic operations/debugging with the corresponding platform tools are required

  • The build tools correspond to Xcode/Android. If the target system version doesn’t exist locally, you need to install/download the corresponding SDK to ensure simulator debugging works

Android TV

Android TV doesn’t have a built-in browser by default

Android Studio Proxy

Download addresses for SDKs and other resources are all overseas, so pay attention to proxy issues, otherwise downloads may fail

Final Thoughts

  • After some effort, I finally completed the App development. It worked fine in the simulator, but failed on the actual device because my home TV’s Android version was too old (5.1)
  • Although it failed, going through this process served as a good opportunity to update my App development skills
  • It’s clear that Ionic is developing quite well - the community remains active, and the development experience is quite nice. The underlying dependency has moved from Cordova to Capacitor, which means they’re no longer constrained by external factors. This is good news for regular developers, as there’s active maintenance and updates
Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover