App Groups saveURL problem
App Groups saveURL problem
- Subject: App Groups saveURL problem
- From: "Eric E. Dolecki" <email@hidden>
- Date: Tue, 07 Feb 2017 15:09:36 +0000
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@hidden)
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:
This email sent to email@hidden