Meteor 1.2 app cannot connect to server on iOS 10

If I try my Meteor 1.2 app in the iOS 10 simulator, it sometimes works, but in most cases throws errors on the Xcode console, like these:

2016-09-20 14:37:03.457355 jobguzz[39170:2414558] [] nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
        [x86_64] libnetcore-856.1.8
    0   libsystem_network.dylib             0x000000011550380e __nw_create_backtrace_string + 123
    1   libnetwork.dylib                    0x0000000118d51194 nw_socket_add_input_handler + 3002
    2   libnetwork.dylib                    0x0000000118d2edb8 nw_endpoint_flow_attach_protocols + 3768
    3   libnetwork.dylib                    0x0000000118d2ddd5 nw_endpoint_flow_setup_socket + 563
    4   libnetwork.dylib                    0x0000000118d2cb34 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2612
    5   libnetwork.dylib                    0x0000000118d47d11 nw_endpoint_handler_path_change + 1261
    6   libnetwork.dylib                    0x0000000118d47740 nw_endpoint_handler_start + 570
    7   libnetwork.dylib                    0x0000000118d5f003 nw_endpoint_resolver_start_next_child + 2240
    8   libdispatch.dylib                   0x000000

I’ve read through this thread:

and assume this might have to be related to the web sockets block mentioned there. But even if I apply the Content-Security-Policy meta tag as described here:

it won’t work. In this case, the app won’t even leave the launch screen. It just gets stuck.

Any ideas how an older 1.2 app can be adapted to iOS 10? Updating to Meteor 1.4 isn’t an option for now, as I know that some of my Cordova plugins are not compatible with the most recent Cordova versions.

Hi there, also have a meteor 1.2 app and it’s working fine on iOS10. As for you, updating to 1.4 is still not an option for me since I have to research new cordova-plugins. Maybe I’ll be able to help you if you share some more info.

1 Like

Hi @joaopiopedreira. Thanks for your reply. I was able to solve this specific problems by adding the Content-Security-Policy meta tag via a head.html file instead of modifying the boilerplate-generator as suggested in the link. The boilerplate approach did not work, because the Meteor 1.2 build system overwrites these changes with a “baked-in” version of the boilerplate. But I still have this problem: