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

[Feat] Add support for SPM #84

Closed
wants to merge 3 commits into from
Closed

Conversation

mackoj
Copy link

@mackoj mackoj commented Mar 5, 2020

This add support for Swift Package Manager it support both static and dynamic library.

Caveat

  • this work only for project on iOS 13+ for the moment
  • I did remove support for crash reporting

Todo

Today test are completely broken I have to make test compile and pass before submitting this.

In the future

Add support for these platforms :

  • AppExtension
  • watchOS
  • tvOS
  • macOS
  • linux

There are 3 warnings lib to fix and 79 test errors to fix

Capture d’écran 2020-03-05 à 13 36 06

@mackoj
Copy link
Author

mackoj commented Mar 5, 2020

@nsagnett What do you thin about this ?

@mackoj
Copy link
Author

mackoj commented Mar 5, 2020

FWIW it is working for US even without the test passing so I will open a PR and let you fix your testing suite @nsagnett.

@mackoj mackoj marked this pull request as ready for review March 5, 2020 12:48
@FZehana
Copy link
Contributor

FZehana commented Mar 8, 2020

Great job :)

@nsagnett
Copy link
Contributor

Many thanks @mackoj for your MR ! We will check it asap

@choli
Copy link

choli commented Apr 24, 2020

Any news on this?

@mackoj
Copy link
Author

mackoj commented Apr 24, 2020

Apple have release in beta Swift 5.3 that allow to have ressources in packages 📦. I will make an update to add the ressources in the Package.swift file soonish.

@choli If you want this to be made you should ask them directly and give them the link to this PR.

@mackoj
Copy link
Author

mackoj commented Aug 27, 2020

Hi @nsagnett do you plan to add support for SPM ?

Swift Package Manager exists since Swift 3.0(13 September 2016) and Swift 5.3 will add a lot of feature regarding SPM maybe it's time to revisit the support of SPM.

https://github.com/apple/swift-evolution/blob/master/proposals/0271-package-manager-resources.md
https://github.com/apple/swift-evolution/blob/master/proposals/0278-package-manager-localized-resources.md
https://github.com/apple/swift-evolution/blob/master/proposals/0272-swiftpm-binary-dependencies.md
https://github.com/apple/swift-evolution/blob/master/proposals/0273-swiftpm-conditional-target-dependencies.md

You can do complex ObjC support like RevenutCat did a great job for working with their ObjC code RevenueCat/Package.swift.

As you can see in here https://swiftpackageindex.com there is a lot of package that are compatible with SPM. Since it's the first party option for package management you should really consider this.

Thanks

@BenDz
Copy link
Member

BenDz commented Sep 3, 2020

Hi @mackoj and thank you for the PR!
Please excuse us for the delay in answering and reviewing it, we will try to do it in the coming weeks.

Thanks again

@choli
Copy link

choli commented Nov 16, 2020

Hi there, any updates on this?

@mackoj
Copy link
Author

mackoj commented Nov 16, 2020

@choli FWIW my branch is up to date with the 2.19.0 version of the SDK.

@choli
Copy link

choli commented Nov 26, 2020

Thanks @mackoj Is it also ready for extensions and watchOS? If not it doesn't really help us :(

@mackoj
Copy link
Author

mackoj commented Nov 26, 2020

I didn't test for this but If not it is not compatible it might be pretty easy to patch.

@mackoj
Copy link
Author

mackoj commented Nov 29, 2020

Maybe an easier approach could be build a xcframework then add it to SPM

@choli
Copy link

choli commented Dec 30, 2020

As this is open source I would prefer it not being an xcframework but rather as you proposed in your PR, looks good on first sight, but would love to have official support for it. Do @nsagnett or @BenDz have updates maybe on whether this will be merged and supported anytime soon? Thanks already

@BenDz
Copy link
Member

BenDz commented Feb 3, 2021

Hi there. Sorry for the delay, we are pretty busy lately.
Unfortunately, we can't drop support for crash reporting and iOS < 13, which lead us to not merging this PR.

However, we are currently in the process of in depth reviewing of our SDKs, and be assured that SPM support is a requirement for it.

In the meantime, if you need SPM support and the caveats @mackoj listed are not blocking for you, you are welcome to use this branch.

Thanks for your contribution and discussions about this topic.

@kenji21
Copy link

kenji21 commented Apr 20, 2021

Well, not moving forward... for 2% of devices...

Source : https://developer.apple.com/support/app-store/

86% of all devices introduced in the last four years use iOS 14.
86%iOS 14
 86% iOS 14
 12% iOS 13

@BenDz
Copy link
Member

BenDz commented Apr 20, 2021

@kenji21 as an analytics solution, we aim at providing the most complete and exhaustive view of an app audience.
Thanks to our numbers, our customers are able to take decision such as "stop supporting iOS < 13" because they know which part of their audience is affected.

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.

None yet

6 participants