Ionic Framework

Ionic: A Hot fix to use Line Login Cordova Plugin in Capacitor’s iOS platform

เรื่องที่เกี่ยวข้อง - , ,
Ionic Capacitor

During migration of my customer’s project, based on Ionic 4. We struggled with 2 problems:

  1. Binary Invalid after uploaded iOS archived to iTune connect
  2. 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
ionic build

2. Add Capacitor iOS project

run following command

npx cap add ios

3. Add Line Login plugin

according to Ionic Native’s document and original readme on repos, run following command:

npm install cordova-line-login-plugin
npm install @ionic-native/line-login
ionic cap sync

4. Integrate LINE SDK into your iOS project

  1. Setup LineSDK by use Carthage (Do it step by step, don’t use CocoaPod, it will be rejected from iTune Connect)
  2. try to test your Line Login application
  3. it works for us 🙂

Hope it helps.

Loading Facebook Comments ...