Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift Package Manager support #70

Merged
merged 9 commits into from
Jul 19, 2019
Merged

Swift Package Manager support #70

merged 9 commits into from
Jul 19, 2019

Conversation

onevcat
Copy link
Member

@onevcat onevcat commented Jun 27, 2019

This pull request contains support for the newly added Swift Package Manager (SPM) support of Xcode 11.

From Xcode 11, it supports to build a library against UIKit with SPM. That means we can use it to provide an easier way to integrate our SDK into user's project. I modified some of the project files/settings to let this project compatible with SPM. There is also a new sample app target LineSDKSample(SPM) to verify the behavior when building with SPM.

Some concerns and things not contained yet:

  1. Since the SPM now does not support building resource yet, I removed all resource related things out. For example, the LoginButton and all localization files, and the new sharing UI planned to be added in next version. It is proposed in this file, maybe we can see it next year.
  2. Only the LineSDK target now supports SPM. Our ObjC wrapper LineSDKObjC is not yet. I wonder whether it worths or be possible to do so. Since the ObjC wrapper is also a Swift project and it should be just a subset of using Swift features, it is possible to also provide SPM support for it. However, users of this wrapper is using our SDK through Objective-C, I don't know whether users can get any benefit from SPM when using Objective-C as their language.
  3. The SPM support from Xcode 11 would add some new sections to the project file, especially to the LineSDKSample project (due to a new target using SPM is added). It is now not a back compatible change, so it breaks the project structure in Xcode 10. Users cannot check and run the sample project if using Xcode 10 after this gets merged. So I believe at least we should wait for Xcode 11 officially release before we can merge it.
  4. We should also add swiftLanguageVersions and testTarget in the Package.swift to make it better.

@rmundo @eJamesLin Can you check and try it in your environments to verify the correctness of these implementation? Thanks!

@onevcat onevcat requested review from eJamesLin and rmundo June 27, 2019 09:04
@eJamesLin
Copy link
Contributor

👍
Successfully verified integration using both SPM and CocoaPods.

Kind of pity that user could not open the sample project by Xcode10 once merged.

@onevcat
Copy link
Member Author

onevcat commented Jul 1, 2019

I guess we will not merge it until Xcode 11 officially released. But fortunately it just affect the sample project. Carthage users can still build the LineSDK.framework target without problem even using Xcode 10.

@onevcat
Copy link
Member Author

onevcat commented Jul 18, 2019

@eJamesLin I removed the sample app using SPM, so it now can be opened without problem in Xcode 10 too. I guess it would be a good time to merge it since it is a better starting point for the binary framework feature.

# Conflicts:
#	LineSDK/LineSDK/Utils/Constant.swift
#	LineSDK/LineSDK/Utils/Helpers.swift
@onevcat onevcat merged commit cea81a9 into v5.3 Jul 19, 2019
@onevcat onevcat deleted the feature/spm-support branch July 19, 2019 07:38
@onevcat onevcat restored the feature/spm-support branch July 19, 2019 07:38
@onevcat onevcat deleted the feature/spm-support branch September 3, 2019 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants