Strange crash when asking for location permission in iOS 13

Viewed 548

Device:

iPhone 8, iOS 13.1.3

Crash log from crashlytics:

#0. Crashed: com.apple.main-thread
0  XXXXXXXXXX                     0x104d1a63c _hidden#14520_ + 71 (__hidden#14570_:71)
1  XXXXXXXXXX                     0x104d195a4 _hidden#14511_ (__hidden#14570_)
2  XXXXXXXXXX                     0x104d19b80 _hidden#14512_ (__hidden#1229_)
3  XXXXXXXXXX                     0x104de4594 _hidden#21237_ + 70 (__hidden#27902_:70)
4  XXXXXXXXXX                     0x104de3e54 _hidden#27841_ + 4345593428
5  XXXXXXXXXX                     0x104d7ae20 _hidden#21212_ (__hidden#1229_)
6  XXXXXXXXXX                     0x104ca897c _hidden#5864_ + 122 (__hidden#5883_:122)
7  XXXXXXXXXX                     0x104ca8608 _hidden#5854_ (__hidden#1229_)
8  CoreLocation                   0x1a6066f1c CLClientStopVehicleHeadingUpdates + 72644
9  CoreLocation                   0x1a6066d20 CLClientStopVehicleHeadingUpdates + 72136
10 CoreLocation                   0x1a60503b8 CLClientInvalidate + 1400
11 CoreFoundation                 0x1a2eba614 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
12 CoreFoundation                 0x1a2eb9db4 __CFRunLoopDoBlocks + 264
13 CoreFoundation                 0x1a2eb54ec __CFRunLoopRun + 2312
14 CoreFoundation                 0x1a2eb48bc CFRunLoopRunSpecific + 464
15 GraphicsServices               0x1acd20328 GSEventRunModal + 104
16 UIKitCore                      0x1a6f4a6d4 UIApplicationMain + 1936
17 XXXXXXXXXX                     0x104c70a38 main + 20 (__hidden#1227_:20)
18 libdyld.dylib                  0x1a2d3f460 start + 4

When I ask for location permission with

locationManager.requestWhenInUseAuthorization()

my app crashes. System dialog for asking location permissions is not shown, only screen is faded and after 3 second app crashes. On 99% devices it is working without problems only on one device it is crashing.

Thanks for any help.

1 Answers

Well the problem was that new iOS 13 screen recording is NOT recording location permission dialog. So in reality, location permission dialog was shown, user tapped "only once" and than app crashes... OMG, took 2 weeks to realize this

Related