Search code examples
ionic-frameworkionic3ionic-native

Ionic : create web app and native apps with same code?


I'am about to start learning ionic to create a project for web and mobile.

What i want is : writing code once, and having a classic website and an iOS and Android native apps.

The design is different between website and apps, so it can't just be responsive, it kinda must have different html for different platforms. Is this possible with this version of ionic or should i create two different projects for web and apps ? Thank you!


Solution

  • First of all, Ionic does not create native apps for iOS and Android, they are hybrid apps. That being said yes, there is a way to achieve what you want but it probably isn't the best way. Ionic build does produce a plain web project inside a www/ folder which you can deploy as a website.

    That however is probably not the best option if you want a great website, as web and mobile app design is quite different. Ionic already creates hybrid applications, i would not use it as a tripartite technology and rather create a separate project for a web application.