2017-12-21 27 views

답변

1

시뮬레이터를 통해 실행하는 경우이 나를 위해 작동합니다

let path = "<pathToProjectDirectory>/<projectName>.entitlements" 

    guard let data = FileManager.default.contents(atPath: path) else { return } 

    do { 
     let dict = try PropertyListSerialization.propertyList(from: data, options: .mutableContainersAndLeaves, format: nil) as! [String : Any] 
     print("container-environment: \(dict["com.apple.developer.icloud-container-environment"] ?? "no key")") 
    } 
    catch { 
     // error 
    }