ios - 将谷歌云端点 iOS 客户端指向开发服务器

标签 ios google-app-engine google-cloud-endpoints

在我的本地开发服务器上部署谷歌云端点后,并使用此处概述的步骤生成 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/

相关文章:

ios - 如何禁用 iPhone 'app not active' 闪烁的横幅

python - 为不同种类的其他实体重新使用一个实体的 ID - 理智的想法?

google-app-engine - App Engine 端点 API - 带有自定义域的 404

python - 如何混合使用 Appengine 的 OpenID 和 facebook OAuth 在 AppEngine 上进行身份验证?

python - GAE : Can't use imported class with Endpoints API method

google-app-engine - 使用多类 API 重复 `operationId`

python - 在 gRPC 转码中允许重复字段

ios - 在 swift 4 中从相机中获取图像路径后获取图像路径

ios - 第二个 Api 调用正在减慢应用程序 ios

iphone - 我应该使用 self.tableView 还是单独使用 tableView?