Git Product home page Git Product logo

deviice's Introduction

CI Status Version License Platform

Logo

Version 2

The library has been completely rewritten from scratch. This version still offers the Deviice structure, but it has been marked as deprecated and will be removed in future versions. Now, the whole magic is done via the Device class.

Usage

There is documentation for all the classes, methods and properties in the code. To give a general idea, this is how things work.

let device = Device.init()  // This instantiate a `Device` object based on the current device.

print(device.model.marketingName)   // This prints "iPhone 12 Pro" in case it is running on an iPhone 12 Pro

There is also the possibility to get the actual device being simulated on a Mac.

let device = Device.init()

print(device.model.marketingName)           // This will print "Simulator"
print(device.actualModel.marketingName)     // This will print "iPhone 12 Pro" in case you're simulating an iPhone 12 Pro

With the first release, there's no chance to get the type of connectivity of a specific device. This will be probably added later.

Requirements

This library works on iOS 12 or higher.

Installation

Deviice is available through Swift Package Manager and CocoaPods.

Swift Package Manager

You can add this library via Swift Package Manager, using this url https://github.com/andrealufino/Deviice.

CocoaPods

To install it, simply add the following line to your Podfile:

pod "Deviice"

Author

Andrea Mario Lufino, andrealufino.com. Thanks to all the contributors.

License

Deviice is available under the MIT license. See the LICENSE file for more info.

deviice's People

Contributors

andrealufino avatar gregoriol avatar xc0der avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deviice's Issues

What is going on with the release versions?

Capture d’écran 2020-11-18 à 13 53 00

It seems to be a very strange way to version the releases, and it seems to confuse Cocoapods as the outdated command says Deviice 1.3 -> 1.3 (latest version 1.21.0) while 1.3 has just been released and the previous one?

Adding new devices has become really complicated

Hi @andrealufino,

I'm keen to contribute when new devices are released, but today adding just 3 iPads was a really complicated task: there are changes to be made in 5 files and it's really hard to navigate, I've been mostly looking at "switch must be exhaustive" errors... to make it.

Couldn't this be made easier? Maybe one file containing all the specs could be enough and the rest like Mapper/Groups could be calculated from the attributes?

Swift 3 compatibility

Hey, I'd love to see this lib available in Swift 3 so I can implement it in my project.

Thanks 😄

iPhone SE Identifier raw value is incorrect

The raw value for an iPhone SE is incorrect. The format for the identifiers is "iPhoneX,X" whereas the iPhone SE's raw value is "iPhone 8, 4" which is causing the library to crash when trying to create an SE model
Screenshot 2022-04-21 at 14 56 28
.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.