uidevice

Keep display on when the proximity sensor is covered

夙愿已清 提交于 2019-12-03 16:32:21
问题 I want to intercept the proximity sensor without turning off the display. I know by the documentation that I have two Bool variables: proximityMonitoringEnabled proximityState and this code [UIDevice currentDevice].proximityMonitoringEnabled = YES; When the proximity sensor detects something it turns off the display, same way it does when you're holding the phone to your ear when on a phone call. How do I keep the display on when the proximity sensor is covered? 回答1: After reading different

UUID for app on iOS5 [duplicate]

牧云@^-^@ 提交于 2019-12-03 07:33:01
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: UIDevice uniqueIdentifier Deprecated - What To Do Now? As I expect you are aware of, the uniqueIdentifier in UIDevice is deprecated in iOS5. What I am looking for a basically the same functionality for iOS5. What I understand from the documentation is that apple wishes that we (developers) create our own UUID (using CFUUIDCreate I guess) and store it in the NSUserDefaults . This, however, makes me shiver a bit

How to detect if any external libraries are calling [UIDevice currentDevice] uniqueIdentifier]?

随声附和 提交于 2019-12-03 07:28:58
So, since Apple is now rejecting apps that access UDID , on our company's current project, we need to eliminate all APIs that make a call to this property: [[UIDevice currentDevice] uniqueIdentifier] We have eliminated all the calls in our own code, but need to be sure that the many external libraries we are using are not making calls to this property. What is the most reliable method for determining if a library is calling on this property? Thank you in advance! Aside from using otx (which seems to have gotten flaky) one option is to set a symbolic breakpoint on that method and then run the

Keep display on when the proximity sensor is covered

久未见 提交于 2019-12-03 05:39:10
I want to intercept the proximity sensor without turning off the display. I know by the documentation that I have two Bool variables: proximityMonitoringEnabled proximityState and this code [UIDevice currentDevice].proximityMonitoringEnabled = YES; When the proximity sensor detects something it turns off the display, same way it does when you're holding the phone to your ear when on a phone call. How do I keep the display on when the proximity sensor is covered? After reading different forums on the topic, its currently not possible for us in the public api to prevent the iPhone screen from

UUID for app on iOS5 [duplicate]

冷暖自知 提交于 2019-12-02 22:31:18
Possible Duplicate: UIDevice uniqueIdentifier Deprecated - What To Do Now? As I expect you are aware of, the uniqueIdentifier in UIDevice is deprecated in iOS5. What I am looking for a basically the same functionality for iOS5. What I understand from the documentation is that apple wishes that we (developers) create our own UUID (using CFUUIDCreate I guess) and store it in the NSUserDefaults . This, however, makes me shiver a bit and does not at all feel save. Feels a bit pointless to have a UUID in this case. The reason I need an UUID is because I send of a bunch information including UUID to

UIDevice currentDevice identifierForVendor - can this change on an iPad

ぃ、小莉子 提交于 2019-12-02 10:00:19
问题 My app uses UIDevice currentDevice identifierForVendor to help me identify the device. Recently I have encountered a situation that I can't understand. A UIDevice currentDevice identifierForVendor of an iPad of one of my clients seems to have changed. Is this ever possible? 回答1: UIDevice Class Reference say : The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them. The value can also change when installing test builds

UIDevice currentDevice identifierForVendor - can this change on an iPad

不打扰是莪最后的温柔 提交于 2019-12-02 05:18:36
My app uses UIDevice currentDevice identifierForVendor to help me identify the device. Recently I have encountered a situation that I can't understand. A UIDevice currentDevice identifierForVendor of an iPad of one of my clients seems to have changed. Is this ever possible? NSDeveloper UIDevice Class Reference say : The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them. The value can also change when installing test builds using Xcode or when installing an app on a device using ad-hoc distribution. Therefore, if your

How to obtain extensive battery info in iOS?

北慕城南 提交于 2019-12-01 06:53:18
I'm wondering is it possible to receive information about battery like: capacity (mA), voltage (V), cycle count within iOS? I know UIDevice class, but battery level is not what I'm looking for. I might be wrong about this but using public APIs this is not possible. According to the UIDevice documentation, it appears the most you can do is get the battery charge level, its state, and enable battery monitoring. Update 15th Feb 2019: Looks like iOS UIDevice API's now allow developers to get access to battery charge level for the device. Whooo! It currently exposes 4 different API's. By the looks

How to obtain extensive battery info in iOS?

主宰稳场 提交于 2019-12-01 04:54:12
问题 I'm wondering is it possible to receive information about battery like: capacity (mA), voltage (V), cycle count within iOS? I know UIDevice class, but battery level is not what I'm looking for. 回答1: I might be wrong about this but using public APIs this is not possible. According to the UIDevice documentation, it appears the most you can do is get the battery charge level, its state, and enable battery monitoring. Update 15th Feb 2019: Looks like iOS UIDevice API's now allow developers to get

How do I detect which iOS device my user is using?

北城以北 提交于 2019-12-01 03:59:02
I'm searching for a way to detect the device my app is running on. I am not interested in software version. I searched many questions but none of them (surprisingly) satisfy my needs for following reasons: Solution 1: NSString *deviceType = [UIDevice currentDevice].model; This does not work because it gives me just "iPad". I want to know whether it is iPad, iPad 2, new iPad, iPhone 3GS, iPhone4 etc. Solution 2: Not testing for device type, checking for individual capabilities This does not apply because I want this data to collect user statistics, not to perform any device specific operation.