I'm attempting to follow these instructions: https://developers.google.com/drive/quickstart-ios.

Now the first time I tried this, I got the error mentioned on this question, but was able to solve it. The sample app now runs, however it crashes before uploading anything to Google Drive. It stops on the loading screen and gives the following error.

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unexpected response data (uploading to the wrong URL?)'

What does it mean by "uploading to the wrong URL?" Am I setting something up wrong or is their code not working correctly?

有帮助吗?

解决方案

I had trouble with this as well today - the error message we're seeing is misleading.

One of the problems I had with my own code was not initializing the authorizer and assigning it to the GTLServiceDrive instance, however if you've followed that sample code exactly then it's done for you (in viewDidLoad).

More likely you haven't enabled "Drive API" in the services tab of the Google APIs console. I had "Drive SDK" switched on instead by mistake (probably just drawn to the only Drive icon...)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top