- objective-c - iOS 5 : Can you override UIAppearance customisations in specific classes?
- iphone - 如何将 CGFontRef 转换为 UIFont?
- ios - 以编程方式关闭标记的信息窗口 google maps iOS
- ios - Xcode 5 - 尝试验证存档时出现 "No application records were found"
所以,since Apple is now rejecting apps that access UDID , 在我们公司当前的项目中,我们需要消除所有调用此属性的 API:
[[UIDevice currentDevice] uniqueIdentifier]
我们已经消除了我们自己代码中的所有调用,但需要确保我们使用的许多外部库没有调用此属性。
确定库是否正在调用此属性的最可靠方法是什么?
提前致谢!
最佳答案
除了使用 otx
(它似乎变得不稳定)之外,一种选择是在该方法上设置一个符号断点,然后运行该应用程序一段时间,看看是否命中它。
为该方法配置符号断点如下所示:
如果您碰到那个断点,您可以通过打开调试器控制台并键入 bt
来找出调用它的人。在这种情况下,调用来 self 的 application:didFinishLaunchingWithOptions:
但无论调用者是谁,它都有效:
(lldb) bt
* thread #1: tid = 0x1c03, 0x001f4690 UIKit`-[UIDevice uniqueIdentifier], stop reason = breakpoint 1.1
frame #0: 0x001f4690 UIKit`-[UIDevice uniqueIdentifier]
frame #1: 0x0000212e MyApp`-[AppDelegate application:didFinishLaunchingWithOptions:](self=0x0747fcb0, _cmd=0x005aec21, application=0x08366300, launchOptions=0x00000000) + 702 at AppDelegate.m:37
frame #2: 0x00015157 UIKit`-[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 266
frame #3: 0x00015747 UIKit`-[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1248
frame #4: 0x0001694b UIKit`-[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 805
frame #5: 0x00027cb5 UIKit`-[UIApplication handleEvent:withNewEvent:] + 1022
frame #6: 0x00028beb UIKit`-[UIApplication sendEvent:] + 85
frame #7: 0x0001a698 UIKit`_UIApplicationHandleEvent + 9874
frame #8: 0x01f01df9 GraphicsServices`_PurpleEventCallback + 339
frame #9: 0x01f01ad0 GraphicsServices`PurpleEventCallback + 46
frame #10: 0x01f1bbf5 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
frame #11: 0x01f1b962 CoreFoundation`__CFRunLoopDoSource1 + 146
frame #12: 0x01f4cbb6 CoreFoundation`__CFRunLoopRun + 2118
frame #13: 0x01f4bf44 CoreFoundation`CFRunLoopRunSpecific + 276
frame #14: 0x01f4be1b CoreFoundation`CFRunLoopRunInMode + 123
frame #15: 0x0001617a UIKit`-[UIApplication _run] + 774
frame #16: 0x00017ffc UIKit`UIApplicationMain + 1211
frame #17: 0x00001d42 MyApp`main(argc=1, argv=0xbffff3f8) + 130 at main.m:16
关于ios - 如何检测是否有任何外部库正在调用 [UIDevice currentDevice] uniqueIdentifier]?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15623660/
我正在为 IOS 制作一个视频播放器,想要检查设备何时旋转,当我的代码将使视频播放器全屏显示时,但我收到以下错误 - 'Instance member 'currentDevice'不能在“viewC
[UIDevice currentDevice]可以带什么,比如uniqueIdentifier?谢谢! 最佳答案 因为这有点过时了,所以我只是给出一个最新的答案。 因为 Apple 认为从 iOS
[[UIDevice currentDevice] model]; 返回的所有可能值是什么?它不是 documented . 最佳答案 可能的值是iPod touch、iPhone、iPhone Si
我的应用程序使用UIDevice currentDevice identifierForVendor来帮助我识别设备。最近,我遇到了一种我无法理解的情况。我的一位客户的iPad的UIDevice cu
我正在尝试使用属性 UIDevice.currentDevice().orientation,所以我有如下内容 UIDevice.currentDevice().beginGeneratingDevi
我试图让我的应用程序(围绕 OpenFrameworks 构建)中的相机自动对焦。看完this SO post我通读了 AV Foundation Programming Guide关于如何设置对焦模
当我为设备方向更改添加通知时,如下所示: NSNotificationCenter.defaultCenter().addObserver(self, selector: Select
我有一个 swift 项目,我想在其中检索设备的名称并显示在 UITableViewCell 中。 但是当我想调用 UIDevice.currentDevice() 时 override func t
[[UIDevice currentDevice] systemName]; 的可能值是什么?在docs来自 Apple,它没有给出任何可能产生的结果的例子,但我能从中得到的只是 iPhone OS,
我有一种产品有两种不同的应用。并且这两个应用程序都为同一设备提供了不同的标识符(您会假设苹果会将其关联到您的开发者帐户,以便您可以在您的应用程序中重复使用这些信息),但我想知道他们能给我什么两个应用程
所以,since Apple is now rejecting apps that access UDID , 在我们公司当前的项目中,我们需要消除所有调用此属性的 API: [[UIDevice c
我们注意到,在 MonoTouch 中使用 UIDevice.CurrentDevice.Name 时,UTF8 字符无法正确显示。 如果您使用某些特殊字符(例如按住 iPad 键盘上的撇号键),它会
我正在使用 x-code 6.3 工具来分析我的应用程序,但我不明白为什么这一行会导致内存泄漏: + (NSString*)IDFV { NSUUID* device_id = [[UIDev
这个问题在这里已经有了答案: The advertisingIdentifier and identifierForVendor return "00000000-0000-0000-0000-00
在我看来这在 iOS9 中不再有效。这是根据我的 SO 研究强制改变方向的实际方法。它现在卡住了我的 SpriteKit 游戏。 只有我一个人吗?如果不是,有人知道替代方案吗? 编辑:Portrait
我正在学习在单元测试中使用 OCMocks,并且我了解基础知识。但是,我不确定如何模拟对类方法的调用。 我想要: [[UIDevice currentDevice] userInterfaceIdio
如题。调用 [[UIDevice currentDevice] BeginGeneratingDeviceOrientationNotifications] 无效。 DidRotateToInterf
这是一个最重要的观察,因为我似乎找到了解决方法...... 当下面的代码位于已推送到 UINavigationController 堆栈的 Controller 中时,它无法工作。在这种情况下,[UI
我在调用 MonoTouch.UIKit.UIDevice.CurrentDevice.SystemVersion 时发生崩溃。它发生在模拟器上。我无法轻松重现它...我已将调试器跟踪放在下面。 使用
我在我的所有应用程序中都使用了[[UIDevice currentDevice] uniqueIdentifier],Apple 不再允许使用uniqueIdentifier。我需要一些东西来替换 u
我是一名优秀的程序员,十分优秀!