0

Our app collects idfa through this API.

It's a simple computed property:

var idfa: String {
    return ASIdentifierManager.shared().advertisingIdentifier.uuidString
}

But seems like it has a very low chance of crashing, based on our production record, it crashes 1 out of a million runs.

The stack trace is:

- 0   libswiftFoundation.dylib            0x0000000184c34728 0x184c1b000 + 104232
- XXXApp 0x000000010bd42d70 AdsDataCollector.idfa.getter + 156118384 (AdsDataCollector.swift:0)

What could be the reason?

Bon
  • 3,073
  • 5
  • 21
  • 40
  • What kind of crash? – meaning-matters Mar 10 '23 at 12:26
  • Did you asked on Apple developer forum ? – Ptit Xav Mar 10 '23 at 12:29
  • Does this radar match your issue? If so this might be a known bug. http://www.openradar.me/46397907 – Shawn Mar 10 '23 at 16:50
  • @meaning-matters hmm, do you mean the stack trace is a bit short? – Bon Mar 11 '23 at 12:31
  • @PtitXav that's a good idea, let me give it a try – Bon Mar 11 '23 at 12:32
  • @Shawn the radar links to the github issue: https://github.com/apple/swift-corelibs-foundation/issues/4404 . My stack trace doesn't show "UUID._unconditionallyBridgeFromObjectiveC(_:)", but the comment "From what I understand, there is some case where advertisingIdentifer can be nil and this make Swift crash." might be the case for me. – Bon Mar 11 '23 at 12:50

0 Answers0