Ionic: A Hot fix to use Line Login Cordova Plugin in Capacitor’s iOS platform
During migration of my customer’s project, based on Ionic 4. We struggled with 2 problems:
- Binary Invalid after uploaded iOS archived to iTune connect
- Line Login SDK (Cordova-based) is unable to work on Capacitor’s iOS project
In this post, I am going to explain solution to solve the 2nd problem.
Thank you, Mr.Theerasak who started the conversation and allow me to post this hot fix solution.
1. Integrate Capacitor to Ionic project
You can integrate capacitor to your existing Ionic project with following command in your Ionic directory:
ionic integrations enable capacitor
Then create capacitor configuration with following command:
npx cap init [appName] [appId]
Provide appName and your appId (it should be same as your existing ones in Ionic project), for example:
npx cap init MyApp th.in.nextflow.myapp ionic build
2. Add Capacitor iOS project
run following command
npx cap add ios
3. Add Line Login plugin
npm install cordova-line-login-plugin npm install @ionic-native/line-login ionic cap sync
4. Integrate LINE SDK into your iOS project
- Setup LineSDK by use Carthage (Do it step by step, don’t use CocoaPod, it will be rejected from iTune Connect)
- try to test your Line Login application
- it works for us 🙂
Hope it helps.