0

I have the google_maps_flutter 2.1.0 and flutter 2.10.3 running. While opening the map, the app crashes and shows the following error log. Could anyone point out where exactly the issue lies. Permissions for the location access has also been given properly. It was working a while back when the flutter version was 2.8.0.

-[__NSCFString objectForKey:]: unrecognized selector sent to instance 0x2808f4380
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString objectForKey:]: unrecognized selector sent to instance 0x2808f4380'
*** First throw call stack:
(0x181955d3c 0x198ccf6a8 0x181a25768 0x1818eff6c 0x1818ef1dc 0x100571b80 0x1816221a8 0x1815c3474 0x100571b18 0x1005724e8 0x1004631b8 0x100461514 0x100460778 0x10045f43c 0x10045e410 0x10044af9c 0x100413bac 0x100412f30 0x100412d78 0x100412b58 0x100acfb10 0x100acf948 0x103f0eb6c 0x10440275c 0x103f3bc98 0x1042c9b54 0x1041f1160 0x1041f4ec4 0x18196a06c 0x1818f43d8 0x1818ef06c 0x1818cef44 0x1818e1e1c 0x1a1c609a0 0x184115b90 0x183eab16c 0x100401de4 0x101918250)
libc++abi: terminating with uncaught exception of type NSException
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001bba5d9e8 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x1bba5d9e8 <+8>:  b.lo   0x1bba5da04               ; <+36>
    0x1bba5d9ec <+12>: stp    x29, x30, [sp, #-0x10]!
    0x1bba5d9f0 <+16>: mov    x29, sp
    0x1bba5d9f4 <+20>: bl     0x1bba59670               ; cerror_nocancel
 
  • Seems not an API issue. With regards to the error, could you please check out [this](https://stackoverflow.com/questions/15787876/iphone-app-crash-nscfstring-objectforkey-unrecognized-selector-sent-to-inst)? – rafon Mar 25 '22 at 08:56

3 Answers3

1

I got this issue fixed by adding following line in AppDelegate.swift

GMSServices.setMetalRendererEnabled(true)

This has to be called before any GMSServices call, for me just at the beggining of application() function, before GeneratedPluginRegistrant.register(with: self)

0

i solve this issue here you can see it https://github.com/flutter/flutter/issues/102204#issuecomment-1103795753

Osama Mohamad
  • 13
  • 1
  • 4
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 28 '22 at 13:50
0

Encounter this issue, fixed it by adding NSAppTransportSecurity key in the info.plist file.

Toby William
  • 101
  • 1
  • 5