未能产生归类于iOS的所有头和实现 [英] Failing to generate all the header and implementation classed for iOS
问题描述
我在在iOS用户端教程<使用端点/ A>,当我尝试利用它目前与失败的井字游戏-V1-rpc.discovery文件生成所有适用于iOS的头和实现类错误:无法获取API说明(见下文)
I'm on step 5 of the Using Endpoints in an iOS Client tutorial and when I try to generate all the header and implementation classes for iOS by utilizing the tictactoe-v1-rpc.discovery file it's currently failing with "ERROR: Failed to fetch the api description" (see below)
在我进入终端:
ConfusedDeer-MBP:/ ConfusedDeer $
/Users/ConfusedDeer/Library/Developer/X$c$c/DerivedData/ServiceGenerator-eoemzskhioxhvgbxjfcwxowhamno/Build/Products/Debug/ServiceGenerator
\\〜/桌面/井字游戏-V1-rpc.discovery --outputDir
/用户/ ConfusedDeer /桌面/ API
ConfusedDeer-mbp:/ ConfusedDeer$ /Users/ConfusedDeer/Library/Developer/Xcode/DerivedData/ServiceGenerator-eoemzskhioxhvgbxjfcwxowhamno/Build/Products/Debug/ServiceGenerator \ ~/Desktop/tictactoe-v1-rpc.discovery --outputDir /Users/ConfusedDeer/Desktop/API
=============================================== ================================
===============================================================================
生成设置:
输出目录:
〜/桌面/ API
发现RPC网址: https://www.googleapis.com/rpc?prettyPrint =假
标记:
-
使用服务名称目录:NO
Use service name directory: NO
删除未知文件:NO
添加'生成'目录:NO
Add 'Generated' directory: NO
允许,将把rootURL覆盖:YES
Allow rootURL overrides: YES
加载API文件(S):
Loading API File(s):
- 读取/〜/桌面/井字游戏-V1-rpc.discovery
错误:无法获取API描述/
〜/桌面/井字游戏-V1-rpc.discovery,错误:错误
域名= NSURLErrorDomain code = -1100的请求的URL没有发现
此服务器。的UserInfo = 0x7fec72c2cf30
{NSUnderlyingError = 0x7fec72c2c680的请求的URL没有发现
此服务器。
NSErrorFailingURLStringKey =文件:///%20~/Desktop/tictactoe-v1-rpc.discovery,
NSErrorFailingURLKey =文件:///%20~/Desktop/tictactoe-v1-rpc.discovery,
NSLocalizedDescription =所请求的URL未在此找到
服务器}
ERROR: Failed to fetch the api description / ~/Desktop/tictactoe-v1-rpc.discovery, error: Error Domain=NSURLErrorDomain Code=-1100 "The requested URL was not found on this server." UserInfo=0x7fec72c2cf30 {NSUnderlyingError=0x7fec72c2c680 "The requested URL was not found on this server.", NSErrorFailingURLStringKey=file:///%20~/Desktop/tictactoe-v1-rpc.discovery, NSErrorFailingURLKey=file:///%20~/Desktop/tictactoe-v1-rpc.discovery, NSLocalizedDescription=The requested URL was not found on this server.}
生成:
写作:
- 从什么已经是在磁盘上没有变化。
ConfusedDeer-MBP:/ ConfusedDeer $
ConfusedDeer-mbp:/ ConfusedDeer$
推荐答案
进一步的故障排除后,我终于能够生成我的iOS客户端库!
After further troubleshooting I was finally able to generate my iOS client libraries!
我来完成,这是命令:
/Users/ConfusedDeer/Library/Developer/X$c$c/DerivedData/ServiceGenerator-eoemzskhioxhvgbxjfcwxowhamno/Build/Products/Debug/ServiceGenerator /Users/ConfusedDeer/Desktop/tictactoe-v1-rpc.discovery --outputDir /用户/ ConfusedDeer /桌面/ API
/Users/ConfusedDeer/Library/Developer/Xcode/DerivedData/ServiceGenerator-eoemzskhioxhvgbxjfcwxowhamno/Build/Products/Debug/ServiceGenerator /Users/ConfusedDeer/Desktop/tictactoe-v1-rpc.discovery --outputDir /Users/ConfusedDeer/Desktop/API
有与我所用的原始命令的两个问题。我终于能够通过将定位问题:
There were two issues with the original command I was using. I was finally able to locate the issue by placing:
文件:///%20~/Desktop/tictactoe-v1-rpc.discovery
file:///%20~/Desktop/tictactoe-v1-rpc.discovery
在浏览器的URL,发现有一个%20,这是一个空间。有一次,我删除了所有的空格和符号(〜),并放置在URL以下
In the browser URL and noticed there was a %20, which is a space. Once I removed all the spaces and the tilde (~) and placed the following in the URL
文件:///Users/ConfusedDeer/Desktop/tictactoe-v1-rpc.discovery
file:///Users/ConfusedDeer/Desktop/tictactoe-v1-rpc.discovery
一旦rpc.discovery文件出现在浏览器中,我意识到,谷歌条命令行工具将能够找到它。
另一个问题是输出目录必须是相对的(废话!)从我在终端上执行的命令。
once the rpc.discovery file appeared in the browser I realized that the google commmand line tool would be able to locate it. Another issue was the output directory had to be relative (duh!) from where I executed the command in the terminal..
在我跑:
/Users/ConfusedDeer/Library/Developer/X$c$c/DerivedData/ServiceGenerator-eoemzskhioxhvgbxjfcwxowhamno/Build/Products/Debug/ServiceGenerator /Users/ConfusedDeer/Desktop/tictactoe-v1-rpc.discovery --outputDir /用户/ ConfusedDeer /桌面/ API
/Users/ConfusedDeer/Library/Developer/Xcode/DerivedData/ServiceGenerator-eoemzskhioxhvgbxjfcwxowhamno/Build/Products/Debug/ServiceGenerator /Users/ConfusedDeer/Desktop/tictactoe-v1-rpc.discovery --outputDir /Users/ConfusedDeer/Desktop/API
在生成如下:
=============================================== ================================
生成设置:
=============================================================================== Generation Settings:
输出目录:〜/桌面/ API
Output Directory: ~/Desktop/API
发现RPC网址: https://www.googleapis.com/rpc?prettyPrint =假
标记:
- 使用服务名称目录:NO
- 删除未知文件:NO
- 添加'生成'目录:NO
- 允许,将把rootURL覆盖:YES
加载API文件(S): - 抓取〜/桌面/井字游戏-V1-rpc.discovery
+ - 加载:井字游戏:V1
正在生成: - 井字游戏(V1)
写作: - GTLQueryTictactoe.h(1744字节) - 新
- GTLQueryTictactoe.m(1907字节) - 新
- GTLServiceTictactoe.h(1507字节) - 新
- GTLServiceTictactoe.m(1472字节) - 新
- GTLTictactoe.h(583字节) - 新
- GTLTictactoe_Sources.m(702字节) - 新
- GTLTictactoeBoard.h(725字节) - 新
- GTLTictactoeBoard.m(638字节) - 新
- GTLTictactoeConstants.h(663字节) - 新
- GTLTictactoeConstants.m(529字节) - 新
- GTLTictactoeScore.h(974字节) - 新
- GTLTictactoeScore.m(879字节) - 新
- GTLTictactoeScoreCollection.h(976字节) - 新
- GTLTictactoeScoreCollection.m(918字节) - 新
- GTLTictactoeUser.h(878字节) - 新
- GTLTictactoeUser.m(682字节) - NE
成功!
这篇关于未能产生归类于iOS的所有头和实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!