Commit Graph

46 Commits

Author SHA1 Message Date
Zandor Smith 4b7f5f3be0 Minimum deployment target iOS 9.0 and apply Xcode 12 recommended settings. (#249)
* Change minimum iOS deployment target to 9.0.

Support for 8.0 was dropped in Xcode 12.

* Apply recommended settings in Xcode 12.

* Update iOS minimum deployment target to 9.0 in SwiftPM and Cocoapods files as well.
2020-08-31 11:29:31 +02:00
tompowered 90fa62e157 Enable BUILD_LIBRARY_FOR_DISTRIBUTION so DeviceKit runs on Xcode 12 (#248) 2020-08-11 14:03:54 +02:00
Zandor Smith f693029407 Add support for new 2019 September devices. (#200)
* Start on adding the new iPhone 11, iPhone 11 Pro, iPhone 11 Pro Max and iPad 7.

* Start on adding Apple Watch Series 5 support.

* Fixed missing enums for Apple Watch Series 5.

* Add identifiers for iPhone 11, Pro and Pro Max.

* Add Apple Watch Series 5 identifiers.

Taken from Simulator.

* Fix image url for iPhone 4s and iPad 6 and fix formatting of gyb file.

* Fix tests.

* Add Watch5,1 and Watch5,2 identifiers for 40 and 44 mm respectively.

* Temporarily remove support for iPad (7th generation).

No identifiers are know yet and it isn't going to release for a week. We want to push the update.

* Update changelog and add changelog to Xcode project.

* Fix device links.

* iPhone 11 Pro and 11 Pro Max don't have 3D Touch.
2019-09-23 08:48:55 +02:00
piellarda bd18c1b119 Add missing TARGETED_DEVICE_FAMILY for watchOS (#194)
Thank you @piellarda for your pull request 👍
2019-07-16 10:30:06 +02:00
Zandor Smith 802e4052c6 Breaking changes for 2.0 (#168)
* Add boolean and array functions to check if the device has a sensor housing.

* Move variables together.

* Rename allDevicesWithASensorHousing to allDevicesWithSensorHousing.

* Create allDevicesWithRoundedDisplayCorners and hasRoundedDisplayCorners variables.

* Create branch for 2.0 changes.

* Rename iPhone Xs to XS and Xr to XR (fixes https://github.com/dennisweissmann/DeviceKit/issues/149)

* Fixed generation of allDevicesWithSensorHousing and hasSensorHousing through the gyb file.

* Check if device is current.

* Fixed formatting.

* Check for current device in isZoomed.

* Add documentation to the isCurrent variable.

* Add static current variable and make the initialiser private.

* Revert commit used to create the patch branch in my fork.

* Fixed readme so that it also contains the rename of XS and XR.

* Check for isCurrent on the isPhone and isPad variables when DeviceKit hasn't been updated for a new device yet. (Fixes https://github.com/dennisweissmann/DeviceKit/issues/165)

* Change device description to use small caps on iPhone XS (Max) and iPhone XR.

* Changed all if !isCurrent statements to guards.

* Remove .instance and the initialiser and completely move over to .current.

* Fixed names of iPad 3, 4, 5 and 6.

* Fix https://github.com/dennisweissmann/DeviceKit/pull/166 not being added through the gyb file.

* Fix documentation inside code to use Device.current instead of the constructor.

* Fixed readme to use Device.current instead of the constructor.

* Add new iPad Air (3th generation) and iPad Mini (5th generation).

* Revert https://github.com/Zandor300/DeviceKit/commit/3eec7cde1dc54da1a7bb91eea32c75749fe6d0bb

* Update to Swift 5.

* Update tests for breaking changes.

* Fix merge.

* Fixed code alignment.

* Fixed trailing whitespace violations.

* Disable the function_body_length rule on mapToDevice(String).

Since this function is generated with a switch for all devices, this needs to be this long.

* Use Xcode 10.2 to build and test the project.

This is required because Swift 5 isn't supported in Xcode 10.1.

* Set .swift-version to 5.0

* Fixed description tests.

* Add iPad (6th gen), iPad Air (3rd gen) and iPad Mini (5th gen) to the description test.

* Fixed one test that still used Device().

* Created new test to prevent https://github.com/devicekit/DeviceKit/issues/165 from happening again.

* Disable the function_body_length swiftlint rule on the testDescription().

* Added a bunch of tech specs and image links where missing.

* Fixed spacing and another couple urls.

* Add Swift 5 information to the readme.

* Add a default case to the switch to cover future additions to WKInterfaceDeviceBatteryState. (Thanks robbiet480)
2019-04-10 16:48:31 +02:00
kingiol b2f1a326cf Also update the gyb file 2019-03-26 19:44:08 +01:00
Dennis Weissmann 53a1b35a58 set swift version everywhere to 4.2 2018-12-12 11:48:15 +01:00
Eric Marchand 7b54ba7564 Let Xcode generate framework header Fix #146 2018-12-12 02:42:03 -08:00
Dennis Weissmann 04f82d904a collect test coverage data, parallelize tests, randomize test order 2018-10-13 20:00:18 +02:00
Robbie Trencheny e1ae862f9c Support watchOS 2.0 and above by only exposing battery data on watchOS 4 and above 2018-10-11 21:21:29 +02:00
Robbie Trencheny 47303b6d06 More watchOS fixes 2018-10-11 21:21:29 +02:00
Robbie Trencheny 0a3dcdfd12 Initial watchOS support 2018-10-11 21:21:29 +02:00
Dennis Weissmann c4693822ea backwards compatability with Swift < 4.2 2018-09-18 19:12:18 +02:00
Dennis Weissmann d188797053 rename models consistently, remove header file, increase Swift version (in .swift-version file), add tests 2018-09-17 09:34:56 +02:00
Dennis Weissmann 8627f45ecf add support to detect whether or not a device has touchID or faceID 2018-09-09 15:05:43 +02:00
Dennis Weissmann 661c321144 fixes for Xcode 10, Swift 4.2 2018-08-11 10:36:29 +02:00
Dennis Weissmann fa95799848 reset UIDevice.current.isBatteryMonitoringEnabled to the value it had before we set it to true
add documentation
2018-04-04 21:52:14 +02:00
Dennis Weissmann 15c66e624b release 1.5.0 2018-01-29 11:34:03 +01:00
Tim Walsh 9abf07cf75 llvm instrumentation
Removed codeCoverageEnabled to correct LLVM Instrumentation issue when pushing to iTunes Connect
2017-09-21 18:17:40 +02:00
Dennis Weissmann 39cbaf8ad2 use the old build system to fix Carthage install issues 2017-09-21 09:05:33 +02:00
Dennis Weissmann c8683e9e82 Generate all the things ™️ 2017-07-15 17:04:09 +02:00
Dennis Weissmann 1cfec02aef use the Device.swift.gyb file as an input for the "Generate Device" build phase and declare the Device.generated.swift as the output file (as suggested in radar://problems/33202338) 2017-07-15 17:04:09 +02:00
Dennis Weissmann 906de7e758 preparation for generating code 2017-07-15 17:04:09 +02:00
Dennis Weissmann bc4af344e8 Xcode 9 support 2017-07-09 10:01:15 +02:00
Dennis Weissmann 49abe10075 start using codecov.io for code coverage reporting
improve test coverage
2017-07-08 13:59:28 +02:00
Dennis Weissmann 0fef40ee4c adds Gemfile.lock to git 2017-06-11 14:56:17 +02:00
Dennis Weissmann 90a41f3ce0 Add Danger Support (#73)
adds a danger file with a basic set of rules + running swiftlint
2017-05-31 11:49:10 +02:00
Dennis Weissmann f768614505 remove linting and formatting from run script phase 2017-03-30 22:03:29 +02:00
Dennis Weissmann 2b3f88c89f sets framework to be extension-API-only-safe 2017-03-19 18:48:40 +01:00
Dennis Weissmann ed4d4890ef automates pod creation on travis CI when a new tag gets pushed 2017-03-19 18:48:40 +01:00
Ashleigh Chape aa9ba0706c Add tvOS to target devices in build settings 2017-03-19 18:16:38 +01:00
Dennis Weissmann 762124d397 new swiftlint rules
use swiftformat to format source code
new (well, Swift 3) operator syntax (static funcs instead of global ones)
bump version to 1.0.1
new implementation of `isZoomed` (which hopefully works now), this closes #59
2017-01-15 11:12:34 +01:00
Dennis Weissmann c441090ed9 update Xcode project settings to recommended settings
remove 2 warnings on unused identifiers
2016-12-04 10:36:51 +01:00
Dennis Weissmann f5b5c8978d mend 2016-09-10 23:24:02 +02:00
Dennis Weissmann ce4725cfae bump version to 1.0.0 (thank you everyone!!!) 2016-09-10 23:04:24 +02:00
Dennis Weissmann 03b4c6ace5 Merge branch 'master' into swift-3 2016-08-27 21:37:43 +02:00
Gordon Johnston 06c51ab311 Migrate iOS/tvOS targets to Swift 2.3 (no source changes) 2016-08-24 08:51:28 +01:00
Dennis Weissmann 2b459bdc24 unify targets into one framework target 2016-08-12 22:00:47 +02:00
Dennis Weissmann fd2983075c updates syntax for latest snapshot (swift-DEVELOPMENT-SNAPSHOT-2016-07-29-a.xctoolchain)
aded *.DS_Store to .gitignore
2016-07-31 16:27:17 +02:00
Trey Richards 06fd6bed38 Updated swift 3 syntax. 2016-07-18 16:05:11 -07:00
Dennis Weissmann a9c5c5a9f0 re-added Device.swift and Info.plist to the project file 2016-02-02 22:20:04 +01:00
Dennis Weissmann 79563e8304 added support for the Swift Packager Manager
use swiftlint
simpler project structure
bumped version to 0.3.0
2016-02-02 20:51:07 +01:00
Dennis Weissmann 828f01f99c changed comment format of previous commit 2016-02-02 18:15:30 +01:00
Dennis Weissmann b248b39813 Changed the deployment target to 8.0 2016-01-02 21:59:09 +01:00
Dennis Weissmann 99cee4c2ff Added functionality to get the simulator model (thanks @Caseyc585)
added functions that make it easier to determine whether or not the current device is in a specific group or family of devices
changed the battery level type from Double to Int since UIDevice itself only returns a double with 2 digit precision (i.e. 0.34 for 34%)
modified tests for the new functionality
2015-12-22 14:29:45 +01:00
Dennis Weissmann 5393c8d16c Rename project to DeviceKit
Since Device is already taken as a CocoaPod I decided to rename it to
DeviceKit
2015-11-18 23:12:18 +01:00