dapriett / nativescript-google-maps-sdk

Cross Platform Google Maps SDK for Nativescript
MIT License
244 stars 164 forks source link

iOS White Screen where map should be #137

Open Swartzkov opened 7 years ago

Swartzkov commented 7 years ago

Using this plugin and have had no problems so far with Android - map shows up and is fully operational.

However, iOS is a different case. Where the map should be there is only a white space, with no Google logo or anything. There don't appear to be any relevant errors, just no map. I know it's not a key issue, as the key is operational for Android, and I've used the same key for the iOS implementation, and double checked that iOS SDK is enabled.

Here's a dump of what I see in the terminal after a tns run ios command:

Successfully synced application com.metastudios.revel on device 5CB75AFD-CF6C-43EC-B263-A842EF18F2A5.

Executing before-watch hook from /Applications/XAMPP/xamppfiles/htdocs/vhosts/revel.go/hooks/before-watch/nativescript-dev-typescript.js
Found peer TypeScript 2.1.6
objc[12255]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x122ffb998) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x122e1d880). One of the two will be used. Which one is undefined.
[Firebase/Analytics][I-ACS023007] Firebase Analytics v.3700000 started
[Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
CONSOLE LOG file:///app/app.js:13:16: firebase.init done
[Firebase/Analytics][I-ACS023012] Firebase Analytics enabled
[] nw_host_stats_add_src recv too small, received 24, expected 28
Mar 22 15:33:28 --- last message repeated 10 times ---
[] ____nwlog_simulate_crash_inner_block_invoke dlopen CrashReporterSupport failed
[] __nwlog_err_simulate_crash simulate crash failed "nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"
[] nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
            [x86_64] libnetcore-856.30.16
        0   libsystem_network.dylib             0x000000010f2d6666 __nw_create_backtrace_string + 123
        1   libnetwork.dylib                    0x00000001105a2006 nw_socket_add_input_handler + 3164
        2   libnetwork.dylib                    0x000000011057f555 nw_endpoint_flow_attach_protocols + 3768
        3   libnetwork.dylib                    0x000000011057e572 nw_endpoint_flow_setup_socket + 563
        4   libnetwork.dylib                    0x000000011057d298 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2612
        5   libnetwork.dylib                    0x0000000110598ae1 nw_endpoint_handler_path_change + 1261
        6   libnetwork.dylib                    0x0000000110598510 nw_endpoint_handler_start + 570
        7   libnetwork.dylib                    0x00000001105b01f9 nw_endpoint_resolver_start_next_child + 2240
        8   libdispatch.dylib                   0x0000
[] nw_host_stats_add_src recv too small, received 24, expected 28
Mar 22 15:33:28 --- last message repeated 2 times ---
[] __nwlog_err_simulate_crash simulate crash already simulated "nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"
[] nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
            [x86_64] libnetcore-856.30.16
        0   libsystem_network.dylib             0x000000010f2d6666 __nw_create_backtrace_string + 123
        1   libnetwork.dylib                    0x00000001105a2006 nw_socket_add_input_handler + 3164
        2   libnetwork.dylib                    0x000000011057f555 nw_endpoint_flow_attach_protocols + 3768
        3   libnetwork.dylib                    0x000000011057e572 nw_endpoint_flow_setup_socket + 563
        4   libnetwork.dylib                    0x000000011057d298 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2612
        5   libnetwork.dylib                    0x0000000110598ae1 nw_endpoint_handler_path_change + 1261
        6   libnetwork.dylib                    0x0000000110598510 nw_endpoint_handler_start + 570
        7   libnetwork.dylib                    0x00000001105b01f9 nw_endpoint_resolver_start_next_child + 2240
        8   libdispatch.dylib                   0x0000
3:33:29 PM - Compilation complete. Watching for file changes.

Mar 22 15:33:35 --- last message repeated 3 times ---
[] nw_host_stats_add_src recv too small, received 24, expected 28
[] __nwlog_err_simulate_crash simulate crash already simulated "nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"
[] nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
            [x86_64] libnetcore-856.30.16
        0   libsystem_network.dylib             0x000000010f2d6666 __nw_create_backtrace_string + 123
        1   libnetwork.dylib                    0x00000001105a2006 nw_socket_add_input_handler + 3164
        2   libnetwork.dylib                    0x000000011057f555 nw_endpoint_flow_attach_protocols + 3768
        3   libnetwork.dylib                    0x000000011057e572 nw_endpoint_flow_setup_socket + 563
        4   libnetwork.dylib                    0x000000011057d298 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2612
        5   libnetwork.dylib                    0x0000000110598ae1 nw_endpoint_handler_path_change + 1261
        6   libnetwork.dylib                    0x0000000110598510 nw_endpoint_handler_start + 570
        7   libnetwork.dylib                    0x00000001105b01f9 nw_endpoint_resolver_start_next_child + 2240
        8   libdispatch.dylib                   0x0000
Mar 22 15:33:35 --- last message repeated 1 time ---
[] nw_host_stats_add_src recv too small, received 24, expected 28
[] __nwlog_err_simulate_crash simulate crash already simulated "nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"
[] nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
            [x86_64] libnetcore-856.30.16
        0   libsystem_network.dylib             0x000000010f2d6666 __nw_create_backtrace_string + 123
        1   libnetwork.dylib                    0x00000001105a2006 nw_socket_add_input_handler + 3164
        2   libnetwork.dylib                    0x000000011057f555 nw_endpoint_flow_attach_protocols + 3768
        3   libnetwork.dylib                    0x000000011057e572 nw_endpoint_flow_setup_socket + 563
        4   libnetwork.dylib                    0x000000011057d298 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2612
        5   libnetwork.dylib                    0x0000000110598ae1 nw_endpoint_handler_path_change + 1261
        6   libnetwork.dylib                    0x0000000110598510 nw_endpoint_handler_start + 570
        7   libnetwork.dylib                    0x00000001105b01f9 nw_endpoint_resolver_start_next_child + 2240
        8   libdispatch.dylib                   0x0000
CONSOLE LOG file:///app/views/map-view-model.js:85:20: Setting a marker...
Google Maps SDK for iOS version: 2.2.30010.0
CONSOLE LOG file:///app/views/map-view-model.js:102:24: Location Services are enabled. Continue.
CONSOLE LOG file:///app/views/map-view-model.js:80:24: Error: New location is older than requested maximum age!

The error at the bottom is related to the geolocation where I try and grab the user's location. Unsure why that's complaining in the emulator, but it doesn't seem to matter much... still no map if I remove the geolocation bits entirely.

Any ideas? The app loads up at a simple page with a button that takes the user over to a page containing the map.

Swartzkov commented 7 years ago

I should note that I see the same result if I create a new typescript project using 'tns create testproject --template typescript'. After creating, I install this plugin, implement the required bits on app.ts page to include the key for iOS, then include the map itself with some hard coded values for lat/lng etc on the main-page.xml, making sure to include the namespacing.

SandipFichadiya commented 7 years ago

Hello, I am facing the same issue,did you find any solution ? If yes, then please let me know Thanks

mn-martin commented 7 years ago

Same issue here.

mn-martin commented 7 years ago

I fixed this putting the MapView inside a GridLayout. Since the GridLayout defaults to rows="*" and columns="*" this will make the MapView take up all available space.

SteveOliverC commented 6 years ago

thank you mm-martin -- your fix worked for me.

nikeshjain commented 6 years ago

Hello, I am facing the same issue right now i have map should be there is only a white space can any one please help to get out of this Thanks