Hi there,
I have an app calling https json web service that runs perfectly while in foreground, but as soon as the app hit the store some clients started to complain, saying their apps stopped calling the web service when changed from background to foreground. I cannot replicate this on the simulator, and in the time the phone needs to be in background before the problem arises is usually between 10 - 45 minutes, but sometimes I can catch this situation in under 30 seconds.
I'm using URLSession, with URLSessionConfiguration.ephemeral, and when the app stops calling https I usually have these errors:
2018-03-07 14:19:39.729144+0000 ***[970:276549] dnssd_clientstub read_all(6) DEFUNCT
2018-03-07 14:19:39.729220+0000 ***[970:276549] [] nw_resolver_create_dns_service_locked DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563)
or
2018-03-07 11:18:27.055764+0000 ***[845:212540] [] tcp_timers tcp[158] retransmit SYN 3
2018-03-07 11:18:27.089724+0000 ***[845:212540] [] tcp_timers tcp[158] retransmit SYN 4
2018-03-07 11:18:27.124971+0000 ***[845:212540] [] tcp_timers tcp[158] retransmit SYN 5
2018-03-07 11:18:27.189602+0000 ***[845:212540] [] tcp_timers tcp[158] retransmit SYN 6
2018-03-07 11:18:27.315243+0000 ***[845:212540] [] tcp_timers tcp[158] retransmit SYN 7
2018-03-07 11:18:27.562810+0000 ***[845:212540] [] tcp_timers tcp[158] retransmit SYN 8
2018-03-07 11:18:28.045921+0000 ***[845:212540] [] tcp_timers tcp[158] retransmit SYN 9
2018-03-07 11:18:29.011447+0000 ***[845:212541] [] tcp_timers tcp[158] retransmit SYN 10
### app did enter background ###
2018-03-07 11:18:33.380964+0000 ***[845:212540] TIC TCP Conn Failed [155:0x1c03747c0]: 1:50 Err(50)
2018-03-07 11:18:33.680429+0000 ***[845:212540] Task <50BAB428-A595-4EEF-ABCA-70D089E5B8FE>.<1> HTTP load failed (error code: -1009 [1:50])
### app will enter foreground ###
2018-03-07 11:18:33.682984+0000 WHS Live 3[845:212552] Task <50BAB428-A595-4EEF-ABCA-70D089E5B8FE>.<1> finished with error - code: -1009
or
2018-03-05 15:36:14.627231+0000 WXXX[2012:881112] dnssd_clientstub read_all(6) DEFUNCT
2018-03-05 15:36:14.627333+0000 ***[2012:881112] [] nw_resolver_create_dns_service_locked DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563)
2018-03-05 15:36:14.631977+0000 ***[2012:881112] TIC TCP Conn Failed [44:0x1c4362100]: 10:-72000 Err(-65563)
2018-03-05 15:36:14.646173+0000 ***[2012:881497] Task <6E77DC57-DF21-4074-A722-D34530071C48>.<1> HTTP load failed (error code: -1003 [10:-72000])
2018-03-05 15:36:14.649336+0000 ***[2012:880659] Task <6E77DC57-DF21-4074-A722-D34530071C48>.<1> finished with error - code: -1003
Any idea is this might be a similar issue?
Thank you in advance.
Regards,
JC