Start a new topic
Answered

Unable to upload video file using FileStore in SDK 3.3.5

Hi,


I'm trying to upload a video using FileStore, but I keep getting the following fatal error:

 

fatal error: 'try!' expression unexpectedly raised an error: Error Domain=io.realm Code=2 "Unable to open a realm at path '/var/mobile/Containers/Data/Application/123BBD4A-5A04-4407-AB9A-7364A6327502/Documents/kid_SJOMxXgIx/kinvey.realm.management': make_dir() failed: No such file or directory." UserInfo={Error Code=2, NSFilePath=/var/mobile/Containers/Data/Application/123BBD4A-5A04-4407-AB9A-7364A6327502/Documents/kid_SJOMxXgIx/kinvey.realm.management, Underlying=make_dir() failed: No such file or directory, NSLocalizedDescription=Unable to open a realm at path '/var/mobile/Containers/Data/Application/123BBD4A-5A04-4407-AB9A-7364A6327502/Documents/kid_SJOMxXgIx/kinvey.realm.management': make_dir() failed: No such file or directory.}: file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-800.0.63/src/swift/stdlib/public/core/ErrorType.swift, line 178

 

Here is a snippet of my code is below.  Note that the exception occurs at the line where I'm getting an instance of FileStore.


      

        let file = File()
        file.publicAccessible = true
        
        let fileStore = FileStore.getInstance()  // <------ THIS THORWS THE FATAL ERROR!!!
        
        //Uploads a file using a file string path
        let request = fileStore.upload(file, path: videoPath) { file, error in
            
            if file != nil {
                //success

            } else {
                //fail

            }
        } 

 

Anyone run into this same issue?

My environment:


- Xcode 8.2.1

- Kinvey SDK 3.3.5 (manual install, not via CocoaPods)  


Best Answer
Chris,

I am pleased to inform you that a new release of the iOS SDK v3.3.6 has been posted and is available for download at the following location.

http://devcenter.kinvey.com/ios/downloads


Can you try with the latest SDK and let me know if it fixes your issue?


Thanks,

Pranav

Kinvey Support

 


Hi Pranav,


I just updated to the latest SDK and it worked!  I'm now able to upload videos via the FileStore!


Thank you and the Engineer team for their awesome and QUICK work!


Regards,

Chris

Answer
Chris,

I am pleased to inform you that a new release of the iOS SDK v3.3.6 has been posted and is available for download at the following location.

http://devcenter.kinvey.com/ios/downloads


Can you try with the latest SDK and let me know if it fixes your issue?


Thanks,

Pranav

Kinvey Support

 

Chris,


No. There is no such permission. I am still working on it and will get back to you asap.


Thanks,

Pranav

Kinvey

Is there any particular permissions or capabilities I need to set in order to use FileStore to upload/download images and videos?

Hi Pranav,


I'm using a real device.


* iPone 5S

* iOS version 9.2.1

Chris,

Are you testing it with the simulator or the actual device?

Thanks,
Pranav
Kinvey

 

Login or Signup to post a comment