appwoodpecker / woodpecker-ios

woodpecker iOS
Other
210 stars 18 forks source link

SPM support #27

Closed Kaspik closed 3 years ago

Kaspik commented 3 years ago

Hey!

We are currently trying to switch everything from CocoaPods to SPM - Woodpecker seems to not have SPM support. Are you thinking about adding it?

Thanks!

github-xiaogang commented 3 years ago

Hi !

I'll check it later, this app was using objective-c, so it may takes some time to support SPM. Currently you could add the framework to your project, it should works for swift project. (Don't forget to remove it when build for AppStore)

Kaspik commented 3 years ago

The reason I'm saying this is that we are using M1 devices already, so we need the framework to be universal framework (for arm64 and arm64 simulators too). Is the framework itself already updated?

github-xiaogang commented 3 years ago

Okay, I got it. It has not support M1 arch yet, I will update it as soon as I could (I don't have M1 device, will ask friends to test it 😂 )

Kaspik commented 3 years ago

Thanks, if you create PR / branch with update, I can test it too! :)

Kaspik commented 3 years ago

Happy Friday @github-xiaogang - any update here? Something I can test for ya? :)

github-xiaogang commented 3 years ago

@Kaspik sorry for the late reply. I had read some docs, and it should be quite easy to support SPM and M1 arch, Please wait about 2 days, I'll tell you when it's done.

Kaspik commented 3 years ago

Awesome, thanks!

github-xiaogang commented 3 years ago

@Kaspik SPM should be okay now. please add https://github.com/appwoodpecker/woodpecker-ios.git

Kaspik commented 3 years ago

Thanks, will try in about hour! 🎉

Kaspik commented 3 years ago

Works!

The only problem now is that SPM doesn't have conditional linking - so for Cocoapods, you can actually do pod 'WoodPeckeriOS', :configurations => ['Debug'] and it will link only in Debug config, but in SPM, there is no such a thing and it would mean that adding Woodpecker via SPM results in framework being added in production for release.

We will need to come up with some solution for this... 😭