v7.0.0
What’s Changed
- Add support for Capacitor 3.0! 🎊
- 🔥 Upgrade to JHipster 7 (#482) Thanks @mshima!
- Add support for npm 7 (more awesomeness from @mshima)
- Migrated from TSLint to ESLint (ionic-team/starters@fbf471a) Thanks @mhartington!
- Refactored README to have a better table of contents
Get Started with Ionic for JHipster
Install Ionic for JHipster:
npm i -g generator-jhipster-ionic yoIn a directory alongside your JHipster app, create your Ionic app with yo jhipster-ionic.
- jhipster-app
- <run it here>To add PWA support to your Ionic app, run:
ng add @angular/pwaTo import your JHipster app's JDL, run yo jhipster-ionic:import-jdl <path-to-jhipster-app>/entities.jdl.
iOS
Generate a native iOS project with the following commands:
ionic build
ionic capacitor add ios
Add your custom scheme to ios/App/App/Info.plist:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>com.getcapacitor.capacitor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>capacitor</string>
<string>dev.localhost.ionic</string>
<string>com.okta.dev-737523</string>
</array>
</dict>
</array>Then, run your project using the Capacitor CLI:
npx cap run ios
Modify CORS Settings in JHipster
In order to communicate with your JHipster app, you'll need to modify its CORS settings (in src/main/resources/config/application-dev.yml) to allow capacitor://localhost as an origin.
Android
Generate a native project with the following commands:
ionic build
ionic capacitor add android
Change the custom scheme in android/app/src/main/res/values/strings.xml to use dev.localhost.ionic or your reverse domain name:
<string name="custom_url_scheme">com.okta.dev-737523</string>The SafariViewController Cordova Plugin is installed as part of this project. Capacitor uses AndroidX dependencies, but the SafariViewController plugin uses an older non-AndroidX dependency. Use jetifier to patch usages of old support libraries with the following commands:
npm install jetifier
npx jetify
npx cap sync android
Then, run your project using the Capacitor CLI:
npx cap run android
Modify CORS Settings in JHipster
In order to communicate with your JHipster app, you'll need to modify its CORS settings (in src/main/resources/config/application-dev.yml) to allow http://localhost as an origin.
Learn More
See this project's documentation for more information.