Search code examples
iosxamarinios13

An error occurred on the xpc connection to setup the background session


I have problem when try to call request to API. It say:

"An error occurred on the xpc connection to setup the background session: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.nsurlsessiond" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.nsurlsessiond}"

But this error only appear in iOS 13, and run normally in iOS 12 also in iOS 11. Anyone know the solution?


Solution

  • I think this is bug on ios emulator, because when i play on device everything is work.

    Update: For Emulator, you need to add provisioning profile. If you already add it but still not work, select the wildcard option not the automatic option.