0

I want to have a access to this file in app group in both application(ios and watchos) I am using the following code to have an access. In watchos where i create the container its working fine but the same code in iOS giving me Errors

let fileManager1 = FileManager.default
let container = fileManager1.containerURL(forSecurityApplicationGroupIdentifier: "group.com.XX.YY")
let fileName = "XYZ.wav"

let saveUrl = container?.appendingPathComponent(fileName)

I find the error cause they have differently container Path.

My question is : how can i have acces to a file in appgroup in both application.?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Osman
  • 1,496
  • 18
  • 22
  • 1
    Appgroup for watchkit only works in watchOS1. From watchOS2 and above you must use WatchConnectivity to share data btw watch and main app. Implement WCSession in appdelegate of both main and watch app. – GeneCode Oct 28 '16 at 09:56
  • 1
    PS. Apple no longer accepts watchos1 submission so you must use WatchConnectivity. – GeneCode Oct 28 '16 at 10:50

0 Answers0