加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

swift2 – Playground Xcode:无法获得沙箱扩展

发布时间:2020-12-14 05:23:48 所属栏目:百科 来源:网络整理
导读:我在 IOS9 xcode项目中的.playground文件中出现此错误消息: 2015-10-28 16:28:45.159 Playground[83944:17501939] Failed to obtain sandbox extension for path=/var/folders/h7/cbc1x51x2rs7sjzfk0ndtxkr0000gp/T/com.apple.dt.Xcode.pg/containers/ 我所
我在 IOS9 xcode项目中的.playground文件中出现此错误消息:
2015-10-28 16:28:45.159 Playground[83944:17501939] Failed to obtain sandbox extension for path=/var/folders/h7/cbc1x51x2rs7sjzfk0ndtxkr0000gp/T/com.apple.dt.Xcode.pg/containers/

我所做的是:

>开始了Xcode 7 / Swift 2项目
>使用“pod install Alamofire”
>使用以下代码创建.playground文件:

进口Alamofire

Alamofire.request(.GET,"http://httpbin.org/get",parameters: ["foo": "bar"]).responseJSON { response in

        print(response.request)  // original URL request
        print(response.response) // URL response
        print(response.data)     // server data
        print(response.result)   // result of response serialization

        let str = response.data!

        if let JSON = response.result.value {
            print("JSON: (JSON)")
        }
}

如何在.playground文件中测试此库而不会出错?

根据业主的说法,从版本3开始,游乐场支持似乎已被删除:

We removed the playground in the latest versions of Alamofire. Caused more problems than it was worth.

资料来源:https://github.com/Alamofire/Alamofire/issues/368#issuecomment-158789746

不幸的是,要启用游乐场支持,您必须降级Alamofire.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读