https://github.com/rikas/iosdevices
iOS "machine ids" translation to ruby
https://github.com/rikas/iosdevices
devices ios machine-id ruby ruby-library
Last synced: 11 months ago
JSON representation
iOS "machine ids" translation to ruby
- Host: GitHub
- URL: https://github.com/rikas/iosdevices
- Owner: rikas
- License: mit
- Created: 2014-11-06T11:54:15.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2025-02-09T09:35:57.000Z (about 1 year ago)
- Last Synced: 2025-03-30T15:09:50.041Z (11 months ago)
- Topics: devices, ios, machine-id, ruby, ruby-library
- Language: Ruby
- Homepage:
- Size: 60.5 KB
- Stars: 16
- Watchers: 3
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# iOS Devices
This is a little Gem used to translate Apple iOS device types (like "iPhone6,1") to proper device
names that you can use.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'ios-devices'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install ios-devices
## Usage
Just use the `Ios::Devices.search` method with the Apple string and you should get a
`Ios::Devices::Model` object. This object has an `extra` attribute for things like internet
connection, revision model, etc.
```ruby
device = Ios::Devices.search('iPhone6,1')
=> #
device.name
=> "iPhone 5s"
device = Ios::Devices.search('iPad2,2')
=> #
device.name
=> "iPad 2"
device.extra
=> "GSM"
```
## Contributing
1. Fork it (https://github.com/rikas/iosdevices/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request