gpt4 book ai didi

swift2 - Playground Xcode : Failed to obtain sandbox extension

转载 作者:行者123 更新时间:2023-12-04 12:46:51 27 4
gpt4 key购买 nike

我在 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

    不幸的是,要启用 Playground 支持,您必须降级 Alamofire。

    关于swift2 - Playground Xcode : Failed to obtain sandbox extension,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33395347/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com