3

I used the answer to this question How to detect if any external libraries are calling [UIDevice currentDevice] uniqueIdentifier]?

to get an log where uniqueIdentifier was being called. However I can't pull much useful information from the log. How can I determine what class or library is calling uniqueIdentifier.

* thread #7: tid = 0x2603, 0x01850690 UIKit`-[UIDevice uniqueIdentifier], stop reason = breakpoint 6.1
frame #0: 0x01850690 UIKit`-[UIDevice uniqueIdentifier]
frame #1: 0x02743663 libobjc.A.dylib`-[NSObject performSelector:] + 62
frame #2: 0x001038ff SmackTalk`CLSHostDataInit + 843
frame #3: 0x028b4014 libdispatch.dylib`_dispatch_client_callout + 14
frame #4: 0x028a52e8 libdispatch.dylib`_dispatch_root_queue_drain + 335
frame #5: 0x028a5450 libdispatch.dylib`_dispatch_worker_thread2 + 39
frame #6: 0x9a597e72 libsystem_c.dylib`_pthread_wqthread + 441
Community
  • 1
  • 1
ZappyCode
  • 75
  • 1
  • 8

2 Answers2

4

Does CLS refer to any framework you might have added? Seems like the best clue out of the log you posted.

You could try trial and error. Start with the most likely suspects like an analytics or advertising framework, unlink it and comment out dependent code and see if that breakpoint still gets hit.

Depending on how many libraries you're talking, it might also make sense to lookup the project pages for those libraries and check for how current their code is and how up-to-date your version of their code is. Best case would be that they've since updated their library and pulled out the UDID code and all you'd have to do is update to the latest version.

Kyle Clegg
  • 38,547
  • 26
  • 130
  • 141
0

From the trace, it looks like the caller may be trying to mask the call by using -[NSObject performSelector:], and doing so inside a dispatch block. However, since you know that some library is making this call, you should be able to narrow down which one. For example, you can try this command on all your linked libraries:

$ strings libFoo.a | grep uniqueIdentifier

This should help figure out which library is likely calling the offending method.

Community
  • 1
  • 1
Quinn Taylor
  • 44,553
  • 16
  • 113
  • 131