0

Since iOS 11 we can set:

let sessionConfiguration = URLSessionConfiguration.default
sessionConfiguration.multipathServiceType = .interactive

Then when WiFi connection is too slow, the app will automatically switch to cellular network, so HTTP requests will work fine. I need that because I use WeyeFeye device, so user's device is always connected to a WeyeFeye WiFi that doesn't work (we need it only to gain files from WeyeFeye).

So when I set this .interactive URLSessionConfiguration my application can do regular REST requests to our backend. But google map doesn't work, because it uses URLSessionConfiguration.default session configuration.

Is there any way to pass a session configuration to Google Maps.

Update:

I have the same issue with Firebase framework

Paul T.
  • 4,938
  • 7
  • 45
  • 93

1 Answers1

0

I don't see anything obvious. If you can't find one, either, you should file a bug against the SDK and ask for them to expose a configuration object that you can use to provide a custom session configuration as a baseline.

In the meantime, unless you can find some way to control what session is used, I think the only other way to solve this is with swizzling.

Basically, you would replace the getter method in the NSURLSessionConfiguration class with a custom implementation that always returns the value you want it to return. After that, all sessions created in your app will use that mode.

dgatwood
  • 10,129
  • 1
  • 28
  • 49