1

我在 ios 应用程序中将 Restkit 用于 web 服务客户端。我使用 cocoapods 在我的示例项目中安装了 restkit。但它给出了语义问题,并在我构建时解析错误。

我使用此链接使用 cocoapods 安装 Restkit

https://github.com/RestKit/RestKit/wiki/Installing-restkit-v0.20.x-via-cocoapods

错误是这样的

/RKHTTPUtilities.m:69:40: error: unexpected '@' in program
        statusCodesToNamesDictionary = @{



/ObjectMapping/RKHTTPUtilities.m: error: unexpected '@' in program
    return [RKStatusCodesToNamesDictionary() objectForKey:@(statusCode)];
                                                          ^
4

1 回答 1

1

看起来您正在使用不支持object literals的旧版本 Xcode 进行编译。你可以通过更新 Xcode 或在你的 podfile 中使用旧版本的 restkit 来解决这个问题,比如pod "restkit", "~>0.10.3".

于 2013-01-02T14:01:54.540 回答