I recently switched HTTP calls from the Cordova plugin to CapacitorHttp, and having sporadic issues with IOS (only).
Using the latest Ionic 7.2.2 and Capacitor 5.2.2. Running against a back-end web service in the cloud using “https”.
Everything works fine for Android, and in the Web App – but iOS is failing every other call. Here is what I see in my logs for iOS:
Successful call to API, but just before call is made:
… [NSURLSession sharedSession] may not be invalidated
Unsuccessful call to API, after it has failed:
… (NSURLErrorDomain error -1000.)",“message”:“The operation couldn’t be completed”
The above cycle repeats consistently with the pattern as … works, fails, works, fails, etc…
For the life of me I cannot find anything online that indicates what these errors are and how they pertain to my usage of CapacitorHttp. There must be some specific configuration needed for iOS – any ideas? Who else has this working and care to share what your code looks like? I am following the tutorial/examples…