I have a watch app. In App Groups for the project I've enabled App Groups
(under capabilities). My app group string is "group.net.ericd.WatchRecord".

In my extension InterfaceController I have this code

var saveURL: NSURL?

override func awake(withContext context: Any?)  {
    super.awake(withContext: context)
    let fileManager = FileManager.default
    let container =
fileManager.containerURL(forSecurityApplicationGroupIdentifier:
"group.net.ericd.WatchRecord")
    let fileName = "audioFile.wav"
    saveURL = container?.appendingPathComponent(fileName) as NSURL?
    print(saveURL) // nil?
}

saveURL is nil. I am running this in the simulator at the moment. Do I need
to run this on hardware? Am I doing something wrong? Since I need  saveURL
to exist for my recordAudio function, this is a problem :)

Thanks,
Eric
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to