0

I am embedding a website inside my app and getting the user's location using:

Geolocation.getCurrentPosition()

This worked fine on previous versions of iOS, but on iOS11+ the app always crashes. The app also only crashes if my server is HTTPS. Any ideas?

Here are the crash logs:

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib         0x00000001840b82e8 0x184096000 + 140008
1   libsystem_pthread.dylib        0x00000001841cd2f8 0x1841ca000 + 13048
2   libsystem_c.dylib              0x0000000184027060 0x183fc4000 + 405600
3   libsystem_c.dylib              0x0000000184026fc8 0x183fc4000 + 405448
4   libc++abi.dylib                0x00000001837c3068 0x1837c1000 + 8296
5   libc++abi.dylib                0x00000001837c3210 0x1837c1000 + 8720
6   libobjc.A.dylib                0x00000001837ec810 0x1837e4000 + 34832
7   MyApp                               0x0000000101e24e74 0x100cc8000 + 18206324
8   libc++abi.dylib                0x00000001837db54c 0x1837c1000 + 107852
9   libc++abi.dylib                0x00000001837db158 0x1837c1000 + 106840
10  libobjc.A.dylib                0x00000001837ec6e8 0x1837e4000 + 34536
11  CoreFoundation                 0x0000000184468cc4 0x184460000 + 36036
12  GraphicsServices               0x0000000186312f84 0x186308000 + 44932
13  UIKit                          0x000000018dbbf804 0x18db4c000 + 473092
14  MyApp                               0x0000000100d22468 0x100cc8000 + 369768
15  libdyld.dylib                  0x0000000183f8856c 0x183f87000 + 5484
Dan
  • 1
  • what exactly is this `Geolocation` class? And what does `getCurrentPosition` do? One thing you can check is whether you have all the location relation Info.plist entries (see: https://stackoverflow.com/questions/44424092/location-services-not-working-in-ios-11) – donnywals Jan 21 '18 at 11:25
  • This gets the user's current location in the browser: https://developer.mozilla.org/en-11US/docs/Web/API/Geolocation/getCurrentPosition. I already have the correct info in info.plist it works on all iOS versions under 11 – Dan Jan 22 '18 at 13:44
  • That's strange, why would you use a browser API in a native app? It's probably better if you use CoreLocation IMO... – donnywals Jan 22 '18 at 14:00
  • The user is browsing our mobile fullsite inside our mobile app so we do not have access to CoreLocation – Dan Jan 22 '18 at 19:12

0 Answers0