Giter VIP home page Giter VIP logo

Comments (5)

GChicha avatar GChicha commented on July 24, 2024 2

I've mange to use it with react-native.
I'm using the default config

new Realm({schema: [...]})

It is necessary to follow the getting started section for realm-java before.

// android/build.gradle
  buildscript {
    dependencies {
        classpath "io.realm:realm-gradle-plugin:6.0.2"
    }
  }
// android/app/build.gradle at start of the file
apply plugin: 'realm-android'
// android/app/src/debug/java/com/example/ReactNativeFlipper.java
import java.util.Arrays;
import java.util.List;

import com.kgurgul.flipper.RealmDatabaseDriver;
import com.kgurgul.flipper.RealmDatabaseProvider;
import io.realm.Realm;
import io.realm.RealmConfiguration;

public class ReactNativeFlipper {
  public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
      // others plugins ....
      // I had to remove the existent database plugin
      // client.addPlugin(new DatabasesFlipperPlugin(context));
      client.addPlugin(new DatabasesFlipperPlugin(new RealmDatabaseDriver(context, new RealmDatabaseProvider() {
        @Override
        public List<RealmConfiguration> getRealmConfigurations() {
          Realm.init(context);
          return Arrays.asList(Realm.getDefaultConfiguration());
        }
      })));
  }
}

from flipper-realm.

kamgurgul avatar kamgurgul commented on July 24, 2024

Sorry I cannot help with that because I'm not familiar with React Native and their implementation of Realm :)

from flipper-realm.

lucasluca avatar lucasluca commented on July 24, 2024

Thanks for the reply @kamgurgul GChicha but im having this issue trying to run the app
image

from flipper-realm.

lucasluca avatar lucasluca commented on July 24, 2024

i renamed ndk folder and bundlet it but on the flipper client this is how appears
image

from flipper-realm.

lucasluca avatar lucasluca commented on July 24, 2024

image

from flipper-realm.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.