RealmSwiftPermission' is not managed by the Realm
In my Realm Cloud, I have Realm Locations
where I store locations
for my map. Every user should have access to this Realm and get through query nearest annotations.
But I faced with a problem: Only administrators have permission for this, not regular users ( How it intended to be).
For solving this problem I add following code to my ViewController:
try! self.realm.write {
let everyonePermission = self.realm.permissions.findOrCreate(forRoleNamed: "everyone")
everyonePermission.canRead = true
everyonePermission.canQuery = true
}
I planned to add this role to every user but I faced with another issue:
Terminating app due to uncaught exception 'RLMException', reason: 'Object type 'RealmSwiftPermission' is not managed by the Realm. If using a custom
objectClasses
/objectTypes
array in your configuration, addRealmSwiftPermission
to the list ofobjectClasses
/objectTypes
.'
*** First throw call stack:
(0x1845fad8c 0x1837b45ec 0x10122830c 0x101264100 0x101cb2308 0x100cf42bc 0x101cb13a8 0x100cf3ffc 0x100cf35dc 0x1027b11dc 0x1027b119c 0x1027b5d2c 0x1845a3070 0x1845a0bc8 0x1844c0da8 0x1864a5020 0x18e4dd758 0x100cf9720 0x183f51fc0)
libc++abi.dylib: terminating with uncaught exception of type NSException
What should I do to resolve this? Probably there is another way to give permission for every user to access to that Realm?
ios swift realm
add a comment |
In my Realm Cloud, I have Realm Locations
where I store locations
for my map. Every user should have access to this Realm and get through query nearest annotations.
But I faced with a problem: Only administrators have permission for this, not regular users ( How it intended to be).
For solving this problem I add following code to my ViewController:
try! self.realm.write {
let everyonePermission = self.realm.permissions.findOrCreate(forRoleNamed: "everyone")
everyonePermission.canRead = true
everyonePermission.canQuery = true
}
I planned to add this role to every user but I faced with another issue:
Terminating app due to uncaught exception 'RLMException', reason: 'Object type 'RealmSwiftPermission' is not managed by the Realm. If using a custom
objectClasses
/objectTypes
array in your configuration, addRealmSwiftPermission
to the list ofobjectClasses
/objectTypes
.'
*** First throw call stack:
(0x1845fad8c 0x1837b45ec 0x10122830c 0x101264100 0x101cb2308 0x100cf42bc 0x101cb13a8 0x100cf3ffc 0x100cf35dc 0x1027b11dc 0x1027b119c 0x1027b5d2c 0x1845a3070 0x1845a0bc8 0x1844c0da8 0x1864a5020 0x18e4dd758 0x100cf9720 0x183f51fc0)
libc++abi.dylib: terminating with uncaught exception of type NSException
What should I do to resolve this? Probably there is another way to give permission for every user to access to that Realm?
ios swift realm
add a comment |
In my Realm Cloud, I have Realm Locations
where I store locations
for my map. Every user should have access to this Realm and get through query nearest annotations.
But I faced with a problem: Only administrators have permission for this, not regular users ( How it intended to be).
For solving this problem I add following code to my ViewController:
try! self.realm.write {
let everyonePermission = self.realm.permissions.findOrCreate(forRoleNamed: "everyone")
everyonePermission.canRead = true
everyonePermission.canQuery = true
}
I planned to add this role to every user but I faced with another issue:
Terminating app due to uncaught exception 'RLMException', reason: 'Object type 'RealmSwiftPermission' is not managed by the Realm. If using a custom
objectClasses
/objectTypes
array in your configuration, addRealmSwiftPermission
to the list ofobjectClasses
/objectTypes
.'
*** First throw call stack:
(0x1845fad8c 0x1837b45ec 0x10122830c 0x101264100 0x101cb2308 0x100cf42bc 0x101cb13a8 0x100cf3ffc 0x100cf35dc 0x1027b11dc 0x1027b119c 0x1027b5d2c 0x1845a3070 0x1845a0bc8 0x1844c0da8 0x1864a5020 0x18e4dd758 0x100cf9720 0x183f51fc0)
libc++abi.dylib: terminating with uncaught exception of type NSException
What should I do to resolve this? Probably there is another way to give permission for every user to access to that Realm?
ios swift realm
In my Realm Cloud, I have Realm Locations
where I store locations
for my map. Every user should have access to this Realm and get through query nearest annotations.
But I faced with a problem: Only administrators have permission for this, not regular users ( How it intended to be).
For solving this problem I add following code to my ViewController:
try! self.realm.write {
let everyonePermission = self.realm.permissions.findOrCreate(forRoleNamed: "everyone")
everyonePermission.canRead = true
everyonePermission.canQuery = true
}
I planned to add this role to every user but I faced with another issue:
Terminating app due to uncaught exception 'RLMException', reason: 'Object type 'RealmSwiftPermission' is not managed by the Realm. If using a custom
objectClasses
/objectTypes
array in your configuration, addRealmSwiftPermission
to the list ofobjectClasses
/objectTypes
.'
*** First throw call stack:
(0x1845fad8c 0x1837b45ec 0x10122830c 0x101264100 0x101cb2308 0x100cf42bc 0x101cb13a8 0x100cf3ffc 0x100cf35dc 0x1027b11dc 0x1027b119c 0x1027b5d2c 0x1845a3070 0x1845a0bc8 0x1844c0da8 0x1864a5020 0x18e4dd758 0x100cf9720 0x183f51fc0)
libc++abi.dylib: terminating with uncaught exception of type NSException
What should I do to resolve this? Probably there is another way to give permission for every user to access to that Realm?
ios swift realm
ios swift realm
edited Nov 25 '18 at 19:04
GoRoS
3,08212655
3,08212655
asked Nov 25 '18 at 15:12
Алишер ИглымовАлишер Иглымов
61
61
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53468863%2frealmswiftpermission-is-not-managed-by-the-realm%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53468863%2frealmswiftpermission-is-not-managed-by-the-realm%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown