Xamarin iOS app crashes when trying to insert into the SQLite database after reading data from an API endpoint, it reports this error:
Remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.
I have checked the size of the data coming from the API and its only 544kb. I am able to display the data to the screen with only updating the database but I need them to insert into the database so that I can allow the user to search the items from the SQLite database. If I uninstall the app and run it again, it works fine until I put it in the background and bring it back, then it crashes.
//Deserializing the data from the API and storing them into a list
IEnumerable<Member> members = JsonConvert.DeserializeObject<IEnumerable<Member>>(json);
//this line below crashes the app
await Db.InsertAllAsync(members);
//the update works very well
await store.UpdateItemsAsync(members);
membersStore = store;
the app reports this error on iOS both on simulator and an iPhone
2019-04-11 10:29:05.797858-0300 CHA.iOS[8019:113508] [Client] Remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2019-04-11 10:29:05.798118-0300 CHA.iOS[8019:113434] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2019-04-11 10:29:05.798321-0300 CHA.iOS[8019:113515] [Client] Sending selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSD ebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} Unhandled Exception: