在我的本地开发服务器上部署谷歌云端点后,并使用此处概述的步骤生成 iOS 客户端库:
https://cloud.google.com/appengine/docs/java/endpoints/consume_ios
我试图将 iOS 客户端指向我的开发服务器。我尝试将 GTLMyApi.h
中的 self.rpcURL
更改为我的本地开发 URL,如下所示:
self.rpcURL = [NSURL URLWithString:@"http://x.x.x.x:8080/_ah_api/rpc?prettyPrint=false"];
从原始值:
self.rpcURL = [NSURL URLWithString:@"https://myapi.appspot.com/_ah/api/rpc?prettyPrint=false"]
但这会引发异常:
Insecure fetch request has a scheme (http) not found in fetcher allowInsecureSchemes...
最佳答案
您应该能够允许 HTTP:
service.fetcherService.allowedInsecureSchemes = @[ @"http" ];
在您的情况下,它可能是 self 而不是服务。
关于ios - 将谷歌云端点 iOS 客户端指向开发服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27489831/