0
votes

I'm currently [attempting] to use Realm in one of my applications; however, I'm unable to view the default.realm file in Realm Browser or Realm Studio, which I'm finding very inconvenient. Whenever I attempt to open the file I'm asked for an encryption key. I am not encrypting my realm files as far as I know.

All cocoapods are up to date as are Realm Browser and Realm Studio. I've created the file from new multiple times.

Any help would be greatly appreciated.

Further Information:

Podfile:

pod 'StitchSDK'

pod 'RealmSwift', '=10.0.0-beta.3' (this is directly from the MongoDB Realm tutorial)

Xcode version: 11.6, Realm Studio: 3.11.0

I am attempting to open the auto-generated default.realm file stored at realm.configuration.fileURL (/Users/.../Library/Developer/CoreSimulator/Devices/9C9C5338-B831-45FC-BDDE-2311C4B6DE0D/data/Containers/Data/Application/F8149B26-D04F-4B1E-A923-BE0F5D229595/Documents/default.realm) and have deleted and regenerated this and its associated files to create it 'from new.'

When opening the file in Realm Studio (I've deleted Realm Browser since reading the comments) I receive the message: "Opening Realm files of format version 11 is not supported by this version of Realm". I am following a iOS SDK Tutorial for Realm in the MongoDB Docs to implement Realm in my app and it works: I'm just unable to view the file.

I do not have Filevault enabled and am developing for iOS. I'm not sure where to check for the sandboxing so it should be whatever the default is.

Thank you again!!

1
Realm Browser is an old product and should not be used at this point. Realm Studio is the right choice. The question is a bit vague as it's not clear what files you're trying to open or where they are located. Is this macOS or iOS? On macOS is sandboxing turned off? Do you have Filevault turned on? What verison of the SDK are you using? What version of Realm Studio? How are are you creating the file 'from new'? Please update your question with more info an we'll take a look.Jay

1 Answers

0
votes

Whoa... pod 'StitchSDK' is not the correct podfile for working with MongoDB Realm. Stitch is a soon-to-be discontinued/depreciated product and is not needed as it's functionality is rolled into MongoDB Realm.

(Note this answer assumes you're sync'ing your data)

The confusion here is that Realm is in the 'middle' of a transition. The 'classic' product called Realm is currently 5.x and is what's referenced on the Realm.io website and is covered in the Getting Started Guide for 5.x

This version stores it's data locally first and synchronized with the Realm Object Server, and you can view that data using Realm Studio 10/11.x

The new product (unreleased and still in Beta at this time) is called MongoDB Realm and while they are similar, MongoDB Realm stores it's data locally first and in MongoDB Atlas (server)

Realm Studio "does not work" with MongoDB Realm. Your error is probably due to being sandboxed but that's another issue. Just don't use it at this time as it may corrupt your data. MongoDB Realm objects are a bit different than Realm objects so you may have weird issues.

To work with MongoDB Realm, you need to log into the MongoDB Realm website console, and either select Realm

enter image description here

to configure, work with your app specs, or to check the error log

or, select Atlas->Collections

enter image description here

to see your actual data.