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

Not working with react-native 0.60 #414

Open
JerakRus opened this issue Jul 15, 2019 · 16 comments
Open

Not working with react-native 0.60 #414

JerakRus opened this issue Jul 15, 2019 · 16 comments

Comments

@JerakRus
Copy link

Building ios filed with error :
'No visible @interface for 'RCTEventDispatcher' declares the selector 'sendInputEventWithName:body:'"

Has anyone found a solution?

@siderakis
Copy link

@JerakRus
Copy link
Author

Yes. Should we expect changes in this library, and if not, how can it be used with RN 0.60?

@Crash--
Copy link
Collaborator

Crash-- commented Jul 16, 2019

Expect nope, but if someone send a PR I can merge it and release a new version ;)

@siderakis
Copy link

This seems to fix the issue.

- (void)sendTouchEvent:(NSString*)type touch:(UITouch*)touch source:(MKTouchable*)source
{
    CGPoint location = [touch locationInView:source];
    NSDictionary *body = @{
                           @"target": source.reactTag,
                           @"type": type,
                           @"x": [NSNumber numberWithFloat:location.x],
                           @"y": [NSNumber numberWithFloat:location.y],
                           };
    
    RCTComponentEvent *event = [[RCTComponentEvent alloc] initWithName:@"topChange"
                                                               viewTag:source.reactTag body:body];
    
                                
    [self.bridge.eventDispatcher sendEvent:event];
}

@Crash--
Copy link
Collaborator

Crash-- commented Jul 17, 2019

@siderakis Great thank you! Can you make a PR?

@ls-kelsey-regan
Copy link
Contributor

The real fix for this is to actually replace the offending line with:

[self.bridge enqueueJSCall:@"RCTEventEmitter" method:@"receiveEvent" args:@[dict[@"target"], RCTNormalizeInputEventName(@"topChange"), dict] completion:NULL];

@ls-kelsey-regan
Copy link
Contributor

I've submitted a PR for this: #416

esutton added a commit to esutton/react-native-material-kit that referenced this issue Aug 7, 2019
@innocces
Copy link

innocces commented Aug 8, 2019

The version of publish is not working with react-native 0.60! Has the latest version been released to fix this problem?

@Crash--
Copy link
Collaborator

Crash-- commented Aug 8, 2019

The version of publish is not working with react-native 0.60! Has the latest version been released to fix this problem?

Nope. Use this package from the master branch directly.

@innocces
Copy link

innocces commented Aug 8, 2019

The version of publish is not working with react-native 0.60! Has the latest version been released to fix this problem?

Nope. Use this package from the master branch directly.

How soon is the new version expected to be released?

@marcoj
Copy link

marcoj commented Aug 21, 2019

The version of publish is not working with react-native 0.60! Has the latest version been released to fix this problem?

Nope. Use this package from the master branch directly.

How soon is the new version expected to be released?

this is much needed...

@Crash--
Copy link
Collaborator

Crash-- commented Aug 21, 2019

Just use the master branch instead of the npm version and it will work

@marcoj
Copy link

marcoj commented Aug 21, 2019

Just use the master branch instead of the npm version and it will work

but if I do that (by adding "react-native-material-kit": "https://github.com/xinthink/react-native-material-kit" to package.json) I get this error:

the package `/Users/<user.name>/Projects/<project.name>/node_modules/react-native-material-kit/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`/Users/<user.name>/Projects/<project.name>/node_modules/react-native-material-kit/lib/index.js`. Indeed, none of these files exist:
* `/Users/<user.name/Projects/<project.name>/node_modules/react-native-material-kit/lib/index.js(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
  * `/Users/<user.name/Projects/<project.name>/node_modules/react-native-material-kit/lib/index.js/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`

@siderakis
Copy link

The issue is that package.json is pointing to lib/index.js which isn't checked in, and has to be compiled.

cd node_modules/react-native-material-kit
yarn install
yarn build

will create lib/index.js

@andreifilip123
Copy link

@siderakis could you submit a PR with your fork to merge it into master so we can use this repo instead of yours ? 😁

@lgh06
Copy link

lgh06 commented Dec 31, 2019

Our project relies on MKButton.button & MKButton.Builder()
however seems this project was rewritten using TypeScript recently, and some builders / components are gone from this commit .
😢
Finally I found https://github.com/muhammadarsal/react-native-material-kit/tree/improvements works for me.
it is based on react-native-material-kit 0.5.1 and fixed errors in RN 0.60 / 0.61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants