nrikiji / cordova-line-login-plugin

A cordova plugin for easy implementation of LINE login using LineSDK.
Apache License 2.0
21 stars 23 forks source link

Cordova run device procedure is crashed by line login plugin #62

Closed pipoa closed 3 years ago

pipoa commented 3 years ago

As title, is there any standard installation document for cordova-line-login-plugin? There are too many installation problems.....

The way to repreduce errors:

  1. create a blank cordova project $ ionic start myApp tabs $ cd myApp/ $ ionic integrations enable cordova

  2. add line-login plugin ionic cordova plugin add cordova-line-login-plugin

  3. add UseSwiftLanguageVersion to config.xml

  4. add ios platform

$ ionic cordova platform add ios

Installed platforms:
  ios 5.1.1
  1. list cordova plugins $ ionic cordova plugin ls

    cordova-line-login-plugin 1.2.10 "Line Login"
    cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
    cordova-plugin-device 2.0.2 "Device"
    cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
    cordova-plugin-ionic-webview 4.2.1 "cordova-plugin-ionic-webview"
    cordova-plugin-splashscreen 5.0.2 "Splashscreen"
    cordova-plugin-statusbar 2.4.2 "StatusBar"
    cordova-plugin-whitelist 1.3.3 "Whitelist"

    no "cordova-plugin-carthage-support" installed?

  2. buid ios anyway

$ ionic cordova build ios no signing key, open MyApp.xcworkspace fix signing problem and rebuild again $ ionic cordova build ios

fatal error: module map file
      '/Users/avex/Library/Developer/Xcode/DerivedData/MyApp-gcuoljcfxlqaxndkadkejyyxrabp/Build/Products/Debug-iphonesimulator/LineSDKSwift/LineSDK.modulemap'
      not found
1 error generated.

ERROR OCCURRED

  1. install carthage support ionic cordova plugin add cordova-plugin-carthage-support

  2. rebuild ios $ ionic cordova build ios

PASSED

  1. run device with verbose(debugging message) $ ionic cordova run ios --no-native-run --verbose
    Prepared iOS project successfully
    Executing script found in plugin cordova-plugin-add-swift-support for hook "after_prepare": plugins/cordova-plugin-add-swift-support/src/add-swift-support.js
    Executing script found in plugin cordova-plugin-carthage-support for hook "after_prepare": plugins/cordova-plugin-carthage-support/scripts/modify_pbxproj.js

    here..... cordova-plugin-carthage-support post run-script crashed cordova run procedure without any error message app package is built, but nothing in real iphone device

nrikiji commented 3 years ago

Sorry for the error. Thanks for the report. I will investigate. I would like to know the following

  1. Do you have cocoapods installed? (What's your version?)
  2. Will building from xcode be successful?

I stopped using carthage and started using cocoapods, so I'm not using cordova-plugin-carthage-support.

pipoa commented 3 years ago

Sorry for the error. Thanks for the report. I will investigate. I would like to know the following

  1. Do you have cocoapods installed? (What's your version?)
  2. Will building from xcode be successful?

I stopped using carthage and started using cocoapods, so I'm not using cordova-plugin-carthage-support.

  1. yes pod --version 1.9.3

  2. You can see step 5~6. , without carthage, there is a LineSDKSwift/LineSDK.modulemap error with carthage, project can be build / deploy to device by xcode without problems

nrikiji commented 3 years ago

Sorry it's hard to understand. I would like to know the result of pressing the build button on xcode instead of the ionic command.

スクリーンショット 2020-10-07 21 53 56
nrikiji commented 3 years ago

I'm sorry for repeating myself. I was able to confirm that the command line build would cause an error. I have PUBLISHED the fixed version 1.2.11.

You can see step 5~6. , without carthage, there is a LineSDKSwift/LineSDK.modulemap error with carthage, project can be build / deploy to device by xcode without problems

You should now be able to build from the command line without using carthage. Maybe you need "cd platform ios && pod install"?

I'd like to close this issue once it's resolved.

pipoa commented 3 years ago

I'd like to close this issue once it's resolved.

still failed, command line:

#import "LineSDK-Bridging-Header.h"
        ^
1 error generated.
<unknown>:0: error: failed to emit precompiled header '/Users/avex/projects/ws_gassist/ipifa/platforms/ios/build/sharedpch/Bridging-Header-swift_9ESQ09KB95AS-clang_3KMP2AFIR4FAO.pch' for bridging header '/Users/avex/projects/ws_gassist/ipifa/platforms/ios/愛批發/Bridging-Header.h'

** ARCHIVE FAILED **

Xcode build with fail, point to the same error

#import <Cordova/CDV.h>
#import "LineSDK-Bridging-Header.h"    <---- 'LineSDK-Bridging-Header.h' file not found

I tried to find that file but nothing found: $ find . -iname LineSDK-Bridging-Header.h nothing found for the search of LineSDK-Bridging-Header.h

nrikiji commented 3 years ago

Could you please clean up the platform and plugins?

$ ionic cordova plugin rm cordova-line-login-plugin
$ ionic cordova platform rm ios

Then reinstall it again.

nrikiji commented 3 years ago

I may have missed something yet, so let me know if it doesn't work. I'd also like to know what version of xcode you are using.

pipoa commented 3 years ago

After reinstall, everything runs well. 🎉🎉🎉
build ok run device ok login ok - "User cancelled or interrupted the login process" problem gone. (used to be happened in versions > 1.2.8)

Thanks for build/maintain this wonderful plugin, thank you.👍👍👍

Finally, I successfully upgrade from cordova-line-login-plugin@1.2.2 + cordova-plugin-carthage-support@0.1.1 --- to ---> cordova-line-login-plugin@1.2.11

nrikiji commented 3 years ago

ok thanks.