I was wondering if there was a way to tell if an iPad is black or white via code? A simple Google search hasn't turned up anything.
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Xcode: Is there a way to change line spacing (UI L
- Swift - hide pickerView after value selected
- Popover segue to static cell UITableView causes co
- How do you detect key up / key down events from a
The serial number on the iPhone gives you all this info, you just need to map the code for colour to the colour itself.
Typical format of the iPhone SN is as follows: AABCCDDDEEF
http://www.pressbyte.com/640/decode-iphone-hardware-information-serial-number/
This link may be helpful for getting the S/N.
The color of an Apple device can be found by parsing its serial number. You can use I/O Kit to get the serial number. Please refer to:
Differentiate between black and white iPhones?
Using IOKit to return Mac's Serial number returns 4 extra characters
But you need to be cautious because it is possible for Apple to reject your app (I haven't tried to use libIOKit.a in my app yet):
If I access the iPhone serial number inside an app, is it allowed in the App Store?