Commit Graph
34 Commits
Author SHA1 Message Date
Zandor Smith dbddb0296e Fix bugs in v4.2.0 release (#268)
* Fix the aspect ratio of iPad Air (4th generation).

* Specify that iPhone 12 Pro (Max) also are sporting a LiDAR sensor.

* Update changelog and bump version to v4.2.1.

* Add links to pull request and issues.

* Fix LiDAR test.
2020-10-22 20:00:43 +02:00
Zandor Smith 8dfc0937d0 Add support for October 2020 devices (#262)
* Add support for all iPhone 12 models and iPad Air (4th generation)

Device identifiers missing for iPhones.
Support link and image missing for iPhones and iPad.

* Bump version to 4.2.0.

* Update changelog.

* Add device identifiers for all iPhone 12.

* Fix Unit tests.

* Update v4.2.0 release date in CHANGELOG.md.
2020-10-21 17:34:17 +02:00
Abdullah 33dacf2a77 Update Tests.swift (#244)
added iPhoneSE2 screenRatio and iPhoneSE ppi to tests
2020-06-18 09:50:30 +02:00
Zandor Smith 952c2cd234 Add support for the 2020 iPad Pro (#235)
* Add support for the 2020 iPad Pro.

* Add variables for checking if device has a LiDAR sensor.

* Add test for LiDAR values.

* Added correct device identifiers and documentation for new iPad Pro 2020.

* Fix testIsPro test.

* Updated changelog for 3.1.0.

* Added LiDAR function to changelog.
2020-03-29 20:51:53 +02:00
Zandor Smith 7dec8f896d Apply a bunch of refactoring changes for 3.0.0 (#212)
* Apply a bunch of refactoring  changes.

* Improve MARKs.

* Add safeDescription variable. (Implements #216)

For getting a safe version of the description variable. (Eg; iPhone XR).

* Fix typo in comment (Fixes #221)

* Update changelog.

* Fixed formatting.

* Fixed links.

* Add safeDescription test for iOS.

* Fixed duplicate test.
2020-01-19 09:13:02 +01:00
Zandor Smith f19f9f868e Rename the Apple TV HD enum to appleTVHD. (#211)
* Rename the Apple TV HD enum to appleTVHD.

Breaking change!

* Update changelog.

* Update tests with appleTVHD rename.
2019-10-16 20:28:30 +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
Zandor Smith 1d00d8449b Comply with renaming of Apple TV (4th generation) to Apple TV HD. (#196)
* Comply with renaming of Apple TV (4th generation) to Apple TV HD.

* Fix Apple TV HD name in tests.
2019-08-16 11:30:57 +02:00
Zandor Smith 1b473ef46c New iPod touch (7th generation) and correct name of others (#189)
* Add iPod Touch (7th generation) support.

* Rename iPod touch 5 and 6 to their proper name.

iPod touch (5th generation) and iPod touch (6th generation).

* Fixed capitalization in description.

* Set camera setting on iPods.

* Fixed description unit test.
2019-06-03 21:40:58 +02:00
Zandor Smith f83399fb38 Add variables to check which cameras a device has (#188)
* Add variables to check which cameras a device has.

Fixes https://github.com/devicekit/DeviceKit/issues/186

* Make functions that should've been static, static.

* Added tests for camera variables.

* Fix errors and warnings danger had spit out.
2019-05-31 23:12:54 +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
Dennis Weissmann 314616c7a7 add support for iPad Pro 11" and 12.9" 3rd gen 2018-11-01 10:28:14 +01:00
Dennis Weissmann 67d283cae7 revert recently introduced breaking change
as per https://semver.org/#what-do-i-do-if-i-accidentally-release-a-backwards-incompatible-change-as-a-minor-version I'll release a new (breaking) version, sorry for that :(
2018-11-01 09:52:20 +01:00
Dennis Weissmann 3be7b9b6ce simplify tests
more swiftlint rules
extend test device matrix in travis CI
2018-10-21 13:55:34 +02:00
Dennis Weissmann 2a02f361c0 adjust dates and tests 2018-10-11 21:29:19 +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
Eric Marchand 804d126166 Add volume capacity Fix #48 2018-04-13 17:30:39 +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
Martin Imobersteg 3d846eb06e Added check for Guided Access session 2018-01-29 10:09:22 +01:00
Dennis Weissmann 7ee50ddae0 new device identifiers for iPhone 8, Plus and X
support for Apple TV 4K
support for HomePod

iOS devices have two new properties: allPlusSizedDevices and allProDevices
2017-09-23 13:10:09 +02:00
Tim Walsh 1e17a2cb8a #89: Added iPhone 8, 8+, X (#90)
Added iPhone 8, 8+, X
2017-09-16 21:48:31 +02:00
Juan Carlos Ospina Gonzalez 9e7aff84f5 Simulator devices now return their equivalent devices' ppi (and not nil) 2017-07-26 23:27:31 +02:00
Juan Carlos Ospina Gonzalez c641f12918 [SwiftLint] Address trailing_whitespace violations 2017-07-26 23:27:31 +02:00
Juan Carlos Ospina Gonzalez 3b058f7afb Cleaned up spacing on Test file 2017-07-26 23:27:31 +02:00
Juan Carlos Ospina Gonzalez 6e44a31517 Added ppi feature
Added known ppi values for applicable devices.

Unit test added and verified with the devices public information in WikiPedia.

Applicable devices are all devices that include a screen, so basically all the iPhones and Ipads.

Unaplicable devices are devices whose screen is not part of the device itself, such as the AppleTV and the Simulators.
2017-07-26 23:27:31 +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 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 03b4c6ace5 Merge branch 'master' into swift-3 2016-08-27 21:37:43 +02:00
Kraig Wastlund abf486f5c6 Make mapIdentifier method public 2016-08-22 11:51:04 -06:00
Dennis Weissmann 2b459bdc24 unify targets into one framework target 2016-08-12 22:00:47 +02:00
Trey Richards 06fd6bed38 Updated swift 3 syntax. 2016-07-18 16:05:11 -07: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