Ekhoo / Device

Light weight tool for detecting the current device and screen size written in swift.
MIT License
1.7k stars 202 forks source link

Add SwiftPM manifest and OS source guards #102

Closed felixbuenemann closed 2 years ago

felixbuenemann commented 4 years ago

This allows usage of Device with Swift Package Manager.

Some build conditions are added to allow a single product and target for iOS and macOS.

felixbuenemann commented 4 years ago

Ooops, just noticed there are a bunch of other PRs that do the same, like #93 and #100.

I noticed that #93 uses canImport which should be better thatn the os(iOS) check.

The code in Source/iOS/Device.swift is clearly targetting only iOS, so I think the os(iOS) check is best.

micromanc3r commented 3 years ago

Readme could be updated as well

felixbuenemann commented 3 years ago

Readme could be updated as well

Sure, what do you suggest?