In the project development, often need to use some system information, such as mobile phone model (5s,6,6p), operating system version (8.0 or 9.3), the current network type (3/4G, WiFi) and other information. With this information, it is possible to quickly locate a bug when a bug occurs and help the developer Debug.
Here is a list of some of the frequently used system information, expressed in a single case. Easy to use.
The currently available iphone information is as follows:
- Devicemodel "Phone Model"
- Systemversion "Operating system version"
- Networktype "Network Type"
- Carriertype "Carrier type"
- Islocationauthorized "whether to allow use of positioning"
- Freememory "Memory Condition"
- CPUUsage "CPU Usage"
- Isjailbreaking "Jailbreak"
- AppVersion "app version number"
- Appbuild "Appbuild No."
- Userphonename "User phone name"
- APPLEIFV "Apple Identifierforvendor"
The way to use it is simple:
// All system Information
NSDictionary *dict = [[RLSystemInfo sharedInstance] allSystemInformation];
// userPhoneName
NSString *userPhoneName = [[RLSystemInfo sharedInstance] userPhoneName];
For certain project-specific information, such as whether your project is in a formal environment, some configuration options, etc., it is also recommended to put together for easy invocation.
Put the code here https://github.com/rainer-liao/RLSystemInfo/
Download the unzip directly and see the demo.
iOS System Information collection