• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
App Groups saveURL problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: ICNS file behaviour on Retina Macs
  • Next by Date: Received file from watch - how to play?
  • Previous by thread: Re: ICNS file behaviour on Retina Macs
  • Next by thread: Received file from watch - how to play?
  • Index(es):
    • Date
    • Thread