Closed kikuchy closed 4 years ago
Hi,
Thanks for the commit. I appreciate your work of improving this project!
But I am not sure what do you mean about the "Add2App of Flutter in some cases". Especially, do you mean this when you say "Add2App"?
In the currently provided podspec, s.dependency 'LineSDKSwift', '~> 5.3'
is looser than your change to ~> 5.5
. So if you have dependency conflicts when using ~> 5.3
of LINE SDK, it should also happen when using ~> 5.5
. May I have an example or sample repo to reproduce the conflicts?
(LineSDKSwift changes some API at ver 5.4.0)
LINE SDK Swift follows the semantic versions. So a minor version update should not break any current implementation.
And the resolved versions in the example folders should not affect the usage and install of LINE SDK in your project. So I do not understand what can be changed or resolved by it?
Thank you!
Sorry for my poor explanation.
Especially, do you mean this when you say "Add2App"?
Yes, that's right. Add2App is the old name of "Add-to-app" feature, sorry.
May I have an example or sample repo to reproduce the conflicts?
Ok, I'll prepare that. And could I explain more?
About LineSDKSwift, from 5.4.0, LoginManager.Parameter
was added.
https://github.com/line/line-sdk-ios-swift/blob/5.4.0/LineSDK/LineSDK/Login/LoginManagerParameters.swift#L27
But it doesn't exist before 5.4.0 (ex. 5.3.1).
In our case, at the iOS app using Add-to-app, that using LineSDKSwift ~> 5.0
via Cocoapods calls LoginManager.login
with an instance of LoginManager.Parameter
.
And we try to add the flutter app using flutter_line_sdk
(using LineSDKSwift 5.3.1), cocoapods causes an error below.
[!] CocoaPods could not find compatible versions for pod "LineSDKSwift":
In snapshot (Podfile.lock):
LineSDKSwift (= 5.5.2, ~> 5.0, ~> 5.3)
In Podfile:
LineSDKSwift (~> 5.0)
flutter_line_sdk (from `flutter/.ios/Flutter/.symlinks/flutter_line_sdk/ios`) was resolved to 1.2.10, which depends on
LineSDKSwift (~> 5.3.0)
Thanks for your explanation. I understand your situation.
Yes, the LoginManager.Parameter
was added from 5.5. Since the target app (the iOS app you want to add flutter to) is using the new LoginManager.Parameter
type, it should be the app itself to depend on a new version of LINE SDK to use that feature.
So, can you try to upgrade the Podfile of the target app from ~> 5.0
to ~> 5.5
and try pod update LineSDKSwift
again to resolve to the latest version?
flutter_line_sdk (from `flutter/.ios/Flutter/.symlinks/flutter_line_sdk/ios`) was resolved to 1.2.10, > which depends on LineSDKSwift (~> 5.3.0)
It is a bit strange that CocoPods thinks flutter_line_sdk
is depending on LineSDKSwift (~> 5.3.0)
. It should be LineSDKSwift (~> 5.3)
and can be resolved to the latest compatible version 5.5.2 here. I will investigate deeper to see what happens. It would be a great help if you can provide an example project and we can solve it soon together!
Thank you.
Thank you for the information!
I made an example. https://github.com/kikuchy/add2appexample
can you try to upgrade the Podfile of the target app from ~> 5.0 to ~> 5.5 and try pod update LineSDKSwift again to resolve to the latest version?
And I tried it at this example.
To reproduce it,
$ cd flutter_part
$ flutter pub install
$ cd ..
$ pod install
And it shows an error below.
Updating local specs repositories
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "LineSDKSwift":
In Podfile:
LineSDKSwift (~> 5.5)
flutter_line_sdk (from `flutter_part/.ios/Flutter/.symlinks/flutter_line_sdk/ios`) was resolved to 1.2.10, which depends on
LineSDKSwift (~> 5.3.0)
Specs satisfying the `LineSDKSwift (~> 5.5), LineSDKSwift (~> 5.3.0)` dependency were found, but they required a higher minimum deployment target.
It's great!
By the way, may I know your flutter versions? Say, can you paste the result of flutter doctor
as well?
I'm still using v1.12.13+hotfix.9
.
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.4 19E287,
locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[✓] Android Studio (version 3.6)
[!] IntelliJ IDEA Ultimate Edition (version 2020.1.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] IntelliJ IDEA Community Edition (version 2019.2.3)
[!] VS Code (version 1.44.2)
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (3 available)
! Doctor found issues in 2 categories.
Ummm,
I tried your example, and it resolved the following Podfile.lock file for me:
➜ add2appexample-master cat Podfile.lock
PODS:
- Flutter (1.0.0)
- flutter_line_sdk (1.2.10):
- Flutter
- LineSDKSwift (~> 5.3)
- flutter_part (0.0.1):
- Flutter
- FlutterPluginRegistrant (0.0.1):
- Flutter
- flutter_line_sdk
- LineSDKSwift (5.5.2):
- LineSDKSwift/Core (= 5.5.2)
- LineSDKSwift/Core (5.5.2)
DEPENDENCIES:
- Flutter (from `flutter_part/.ios/Flutter/engine`)
- flutter_line_sdk (from `flutter_part/.ios/Flutter/.symlinks/flutter_line_sdk/ios`)
- flutter_part (from `flutter_part/.ios/Flutter`)
- FlutterPluginRegistrant (from `flutter_part/.ios/Flutter/FlutterPluginRegistrant`)
- LineSDKSwift (~> 5.5)
SPEC REPOS:
trunk:
- LineSDKSwift
EXTERNAL SOURCES:
Flutter:
:path: flutter_part/.ios/Flutter/engine
flutter_line_sdk:
:path: flutter_part/.ios/Flutter/.symlinks/flutter_line_sdk/ios
flutter_part:
:path: flutter_part/.ios/Flutter
FlutterPluginRegistrant:
:path: flutter_part/.ios/Flutter/FlutterPluginRegistrant
SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_line_sdk: d33d7fe40d317ee9d6e7a1ce61392d833e664140
flutter_part: bfdd776a1f9eaf5c543578f9f851c899ac3efb1e
FlutterPluginRegistrant: 75a9e08d16eb95bbf48a5c69c5e23b9b30f4a09d
LineSDKSwift: 061ee1ba11072007a31026cf1c59b1fc4a3898d6
PODFILE CHECKSUM: 0be7202d03be34e569bf2275885e55de27694c47
COCOAPODS: 1.9.1
Not sure why it fails in your environment, but I guess it might be related to some existing pod lock file for cache.
Is it possible for you to try to remove the Podfile.lock
first, install again? Maybe something like this:
# Modify Podfile to use `~> 5.5` for LineSDKSwift
rm Podfile.lock
pod repo update
pod install
In which, the flutter_line_sdk
correctly depends on ~> 5.3
, means any version after 5.3.0 but before 6.0. And the final resolved result is also correct as 5.5.2
.
Best regards.
It is strange that you have this log
flutter_line_sdk (from `flutter/.ios/Flutter/.symlinks/flutter_line_sdk/ios`) was resolved to 1.2.10, which depends on
LineSDKSwift (~> 5.3.0)
I believe that we never write a ~> 5.3.0
dependency requirement. Have you modified the podspec file somewhere in your project?
Have you modified the podspec file somewhere in your project?
I'm very sorry, I had modified it when the first time I met the problem (I think conflictions of dependency cause it, and I modified the pubspec file in the cache, and I forgot it). After I fixed the cache and remove Podfile.lock, I can install pods successfully. (And also I can fix the original problem.)
I'll close this PR. I'm very sorry for taking your time.
Never mind. You are welcome!
Thanks for the feedback. :)
The current version of LineSDKSwift is not latest version. It causes dependency conflicts on Add2App of Flutter in some cases. (LineSDKSwift changes some API at ver 5.4.0) So I update it.