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

前端之家收集整理的这篇文章主要介绍了swift2 – Playground Xcode:无法获得沙箱扩展前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在 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文件中测试此库而不会出错?

@H_403_15@
@H_403_15@
根据业主的说法,从版本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.

@H_403_15@ 原文链接:https://www.f2er.com/swift/319049.html

猜你在找的Swift相关文章