Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ricaragao rn 057 gt #349

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ npm i --save react-native-meteor

## Compatibility notes

Upgraded packages to working in RN >= 0.57

Since RN 0.26.0 you have to use ws or wss protocol to connect to your meteor server. http is not working on Android.

It is recommended to always use the latest version of react-native-meteor compatible with your RN version:
Expand Down
17 changes: 17 additions & 0 deletions example/RNApp/android/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>android______</name>
<comment>Project android______ created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connection.project.dir=
eclipse.preferences.version=1
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-meteor",
"version": "1.4.0",
"version": "1.4.2",
"description": "Full Meteor Client for React Native",
"main": "src/Meteor.js",
"scripts": {
Expand Down Expand Up @@ -57,6 +57,6 @@
},
"peerDependencies": {
"react": "*",
"react-native": ">= 0.49.0"
"react-native": ">= 0.57.0"
}
}
7 changes: 4 additions & 3 deletions src/Meteor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NetInfo, Platform, View } from 'react-native';

import { Platform, View } from 'react-native';
import NetInfo from "@react-native-community/netinfo";
import reactMixin from 'react-mixin';
import Trackr from 'trackr';
import EJSON from 'ejson';
Expand Down Expand Up @@ -75,7 +75,7 @@ module.exports = {
reconnect() {
Data.ddp && Data.ddp.connect();
},
connect(endpoint, options) {
connect(endpoint, options, callback) {
if (!endpoint) endpoint = Data._endpoint;
if (!options) options = Data._options;

Expand Down Expand Up @@ -107,6 +107,7 @@ module.exports = {
console.info('Connected to DDP server.');
this._loadInitialUser().then(() => {
this._subscriptionsRestart();
typeof callback == 'function' && callback();
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/user/User.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncStorage } from 'react-native';
import AsyncStorage from '@react-native-community/async-storage';

import Data from '../Data';
import { hashPassword } from '../../lib/utils';
Expand Down