I'm trying to transfer a file from iOS app to watchkit. I checked WCSessionDelegate calls are working well. But, interestingly, file url does not exist.
Per the code below, I get fileURL from the argument, and the argument value is wrong somehow. When I search for the directory from Mac Finder, the directory doesn't exist. Do you have any idea?
func session(session: WCSession, didReceiveFile file: WCSessionFile) {
print(file.fileURL)
let baseUrl = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier("group.com.ABC.WatchAac")
....
}
copy error=========Error Domain=NSCocoaErrorDomain Code=4 "“audio9.caf” couldn’t be moved to “35B1C*******9-B6BF-A6A97154724C” because either the former doesn't exist, or the folder containing the ln't exist." UserInfo=0x79079700 {NSSourceFilePathErrorKey=/Users/AAA/Library/Developer/CoreSimulator/Devices/62C8**********4-82A1C0626A31/data/Containers/Data/PluginKitPlugin/25063************-8BD68ECEB831/Documents/Inbox/com.apple.watchconnectivity/Files/35B1*******9-B6BF-A6A97154724C/audio9.caf, NSUserStringVariant=(
Move
), NSFilePath=/Users/AAA/Library/Developer/CoreSimulator/Devices/62C8******-82A1C0626A31/data/Containers/Data/PluginKitPlugin/25063********6C-8BD68ECEB831/Documents/Inbox/com.apple.watchconnectivity/Files/35B************-A6A97154724C/audio9.caf, NSDestinationFilePath=/Users/AAA/Library/Developer/CoreSimulator/Devices/62C*******-82A1C0626A31/data/Containers/Shared/AppGroup/87CC*********-972F-8DD9689568E3/file:///Users/AAA/Library/Developer/CoreSimulator/Devices/62C88********-82A1C0626A31/data/Containers/Data/PluginKitPlugin/250*********-A46C-8BD68ECEB831/Documents/Inbox/com.apple.watchconnectivity/Files/35B1*********-A6A97154724C/audio9.caf, NSUnderlyingError=0x79079620 "The operation couldn’t be completed. No such file or directory"}