realm / my-first-realm-app Goto Github PK
View Code? Open in Web Editor NEWToDo demo app using Realm and Realm Object Server to synchronize tasks.
Home Page: https://realm.io
License: Apache License 2.0
ToDo demo app using Realm and Realm Object Server to synchronize tasks.
Home Page: https://realm.io
License: Apache License 2.0
The iOS tutorial calls for adding some new files to a clone of this project (eg. here) and doing this generates a template copyright header at the top of the new file. But the auto copyright is going to "Maximilian Alexander" which I believe is incorrect for new files, and may confuse people. I suggest removing this name from the Xcode project metadata entirely or changing it to "Realm"
Ability to login using SyncCredentials.usernamePassword
Thread 1: Fatal error: The provided credentials are invalid or the user does not exist.
Describe your current debugging efforts.
I replace the call to
let creds = SyncCredentials.nickname(username, isAdmin: true)
with
let creds = SyncCredentials.usernamePassword(username: username, password: username, register: true)
Realm version(s): ? 3.5.0
Realm Cloud
Android Studio / XCode version: ? Xcode 9.3
Which device OS version and device: ? iOS 11 Simulator
objectPermission
tutorialUser ran into some issues and posted their results here:
https://forums.realm.io/t/partialsync-demo-with-carthage/984/4?u=mgeerling
Content would go in a code tab here:
https://docs.realm.io/cloud/ios-todo-app/ios-todo-app-advanced#step-2:-updateinstall-the-realm-sdk-with-cocoapods
Having the same Realm schema on iOS & Android will allow cross binding tests.
Be able to see todo list items synced from the cloud instance
No items at all
Constants.swift
with the correct value in the MY_INSTANCE_ADDRESS
let.Untill this point it seems to work correctly, but if I open Realm Studio, and the ToDo realm in particular, it displays:
This Realm has no classes defined
And after that if I remove the app from my simulator's springboard en re-run it.
After logging in, with the same user, my previously created todo item is gone.
I would expect it to be there, since it should be stored in the cloud, but it's not.
In Realm Studio I do see the newly registered user.
The 02-full-sync iOS example project
Realm version: 4.4.1
XCode version: 11.2
Which device OS version and device: iPhone 8 simulator (13.2)
I would expect the application to be named "Todo"
I appears as "Welcome"
Build and install the application
Realm version(s): ?
Android Studio version: 3.0.1
Which device OS version and device: Android 8.1.0 on Nexus 5X
Within the constants file:
// **** ROS On-Premises Users
// **** Replace the AUTH_URL string with the fully qualified address of your ROS server, e.g.:
// **** "http://127.0.0.1:9080" and "realm://127.0.0.1:9080"
Should really read:
// **** ROS On-Premises Users
// **** Replace the MY_INSTANCE_ADDRESS string with the fully qualified address of your ROS server, e.g.:
// **** "http://127.0.0.1:9080"
Launch the app
Build Failed:
error: cannot find symbol class PermissionManager
Following the docs here, cloned the repo:
git clone https://github.com/realm/my-first-realm-app
opened in Android studio:
<root>/my-first-realm-app/android/todo-full-sync
in Project build.gradle:
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath "io.realm:realm-gradle-plugin:6.0.0"
}
in app build.gradle:
apply plugin: 'realm-android'
ProjectsActivity.java:
Realm version(s): 6.0.0
Android Studio version: 3.5.1
Which device OS version and device: Android emulator Pixel 3 API 29
Login with a nickname
Uninstall / Reinstall the app
Login with the same nickname
/**
Returns the class-wide permissions for the named class.
- parameter cls: The name of an Object subclass to get the permissions for.
- returns: The class-wide permissions for the named class.
- requires: className must name a class in this Realm's schema.
- requires: This must only be called on a partially-synced Realm.
*/
public func permissions(forClassNamed className: String) -> List<Permission> {
let classPermission = object(ofType: ClassPermission.self, forPrimaryKey: className)!
return classPermission.permissions
}
Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value
Also, 3 permissions are added and a new partial path with the same user
Realm version(s): 3.3.0 & 3.3.2
XCode version: Xcode 9.3
Which device OS version and device: iPhone 8 (11.3)
This issue discusses the design of the ObjectLevelPermission tutorial, once it's available for the bindings.
we could use this type of permission configuration https://github.com/realm/realm-sync/pull/1868/files#diff-0e3567aa4be9697779a43bc487abdcf9R441 which should allow creating a normal class where users can modify their objects, but not necessarily see objects of other users.
It the context of the ToDo
app this could be translated into restricting access into the Project
class, so only the owner can see it & modify it. I think it's a nice transition from the PartialSync
demo where everyone can still query for others Project
and edit them
WDYT @dhmspector @bigfish24 ?
Following directions for getting started: https://docs.realm.io/sync/getting-started-1/android-quick-start/step-1-my-first-realm-app
Updated Constants.java correctly, build and runs fine.
Then, attempt to login with a nickname
Expected to login successfully
SyncUser.logInAsync throws an error to the client
Stacktrace showed it was returning an empty header, so I checked the Constants file and realized it was trying to access the cloud via http instead of https which couldn't be right, so I made the change and that fixed it.
Changed this line in Constants.java from...
public static final String AUTH_URL = "http://" + INSTANCE_ADDRESS + "/auth";
to...
public static final String AUTH_URL = "https://" + INSTANCE_ADDRESS + "/auth";
Realm version(s): Cloud / Realm Platform / Realm Sync
Android Studio / XCode version: 3.2.1
Which device OS version and device: Mac 10.13/6
Suggestion - it occured to me that cancelling out of the login panel on Welcome screen results in a blank screen on the Android version with no way to get the panel back up.
It was the same on the iOS version; there's really no other activity possible in that mode, so I removed the cancel button so the user always has the login panel up if they're not logged in.
I had to change my constants file to look like the following for it to work with on-prem ROS:
struct Constants {
// ****
// **** Replace the "MY_INSTANCE_ADDRESS" here with the hostname of your
// **** Realm Cloud instance or the URL of your on-premises Realm Object Server
// ****
static let AUTH_URL = URL(string: "http://127.0.0.1:9080")!
static var REALM_URL: URL {
let realmsUrlString = Constants.AUTH_URL.absoluteString.replacingOccurrences(of: "http://", with: "realm://")
return URL(string: "\(realmsUrlString)/ToDo")!
}
}```
objectPermission
is still registering an async query & wait for the UPDATE
state as a signal that the permission schema has been synchronised from the server. This could be avoided by using an asyncOpen
that starts with a schema-less Realm then waitForChange (similar to what Cocoa is doing).
This should be fixed once realm/realm-java#5812 is implemented
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.