hyperoslo / Lightbox

:milky_way: A convenient and easy to use image viewer for your iOS app
https://www.hyper.no
Other
1.63k stars 329 forks source link

SPM Support and Resources #250

Closed yspreen closed 4 years ago

yspreen commented 4 years ago

https://github.com/hyperoslo/Lightbox/blob/master/Resources/Lightbox.bundle/lightbox_play%402x.png

Did you check that this file is still working with SPM @Tobisaninfo ? Paging bc of #248

See https://github.com/MessageKit/MessageKit/pull/1341#issuecomment-621670678

Tobisaninfo commented 4 years ago

In Xcode, in the file tab under the Swift Package Dependencies, it seems that the asset is available

Bildschirmfoto 2020-06-15 um 21 21 11

But I'm not sure how to test this in code. May you can provide some example that I can test in my app.

yspreen commented 4 years ago

Yes, because that list just mirrors the repo contents. But similarly to the Readme file and other additional content, it's not actually bundled into the app. Can you try adding a video to your lightboxes to see if the play button is there?

Tobisaninfo commented 4 years ago

Oh yes, you are right, I tried to get this working by copy the resource into the sources and try to figure out if there exists any hint in the apple documentation, but I failed. I guess we have to wait until apple adds some capabilities to the SwiftPM.

yspreen commented 4 years ago

It might be best to add this info to the readme, or just remove Package.swift for now...

yspreen commented 4 years ago

There's a lot of resources on this, because it's the main reason why most big libraries don't have SPM support. Swift 5.3 is supposed to solve this, but there is no ETA.

Tobisaninfo commented 4 years ago

I think the best is adding this to the readme, removing the SwiftPM for know means, that you cannot use SwiftPM or Carthage, the only ways would be CocoaPods or building a version manual.

yspreen commented 4 years ago

I'm using carthage and it works great for me, independent of SPM

Tobisaninfo commented 4 years ago

Oh I see, you changed the Cartfile yesterday. I had on Sunday some trouble with it caused by hyperoslo/Imaginary and that was my motivation it add the SwiftPM to this project

yspreen commented 4 years ago

The carthage dependency issue is resolved now. imo SPM comes with too many caveats for now, so before Swift 5.3 is out I'd be in favor of removing it

3lvis commented 4 years ago

Should be working now, although only under iOS 13.

https://github.com/hyperoslo/Lightbox/commit/8dcf50b7220ea4dd4a23e5779f55b6a684925464

Tobisaninfo commented 4 years ago

Using the SFSymbols seems to be a good thing, even it is currently only working on iOS 13.

We will see, what Apple will present is week for Swift and SwiftPM...

3lvis commented 4 years ago

I believe iOS 13 might be working on most devices. Another alternative is under iOS 13 to use an ASCII symbol.

3lvis commented 4 years ago

Closing for now since we have a workaround until Xcode 12 helps with this.