question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RNGestureHandlerManager.h:9:52: error: expected a type - eventDispatcher:(nonnull RCTEventDispatcher *)eventDispatcher;

See original GitHub issue

Description

Cannot build iOS app after upgrading from RN version 0.63.2 to 0.65.0-rc.3. I am getting this error:

In file included from /Users/…/ReactNativeProjects/…/node_modules/react-native-gesture-handler/ios/RNGestureHandlerManager.m:1: /Users/…/ReactNativeProjects/…/node_modules/react-native-gesture-handler/ios/RNGestureHandlerManager.h:9:52: error: expected a type eventDispatcher:(nonnull RCTEventDispatcher *)eventDispatcher;

Problem is in RNGestureHandlerManager.h, on the line below:

- (nonnull instancetype)initWithUIManager:(nonnull RCTUIManager *)uiManager
                          eventDispatcher:(nonnull RCTEventDispatcher *)eventDispatcher;
gh1

Edit: When I upgrade to RNGestureHandler version 1.10.3 I get the errors below: Screen Shot 2021-08-11 at 22 00 54

Steps To Reproduce

  1. Upgrade to the latest version of RN and try to build the app.

Expected behavior

The app should build successfully.

Actual behavior

Build fails.

Snack or minimal code example

Package versions

react-native-gesture-handler@1.4.1 react-native@0.65.0-rc.3 XCode: 12.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

42reactions
UberMCcommented, Sep 18, 2021

To Solve:

yarn upgrade react-native-gesture-handler
cd ios
pod install

Most likely you installed react-native-gesture-handler with react-navigation so it’s using an older version unsupported by RN update.

41reactions
LBojaniccommented, Aug 21, 2021

#import <React/RCTEventDispatcher.h> solved for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - error: expected a type - eventDispatcher:(nonnull ...
When I tried to re-build the app, this created the same Undefined symbol errors as if I had updated the RNGestureHandler version to...
Read more >
RNGestureHandlerManager.h:9:52: error: expected a type
Description. Cannot build iOS app after upgrading from RN version 0.63.2 to 0.65.0-rc.3. I am getting this error:.
Read more >
[Resolve]-error: expected a type - eventDispatcher:(nonnull ...
Coding example for the question error: expected a type - eventDispatcher:(nonnull RCTEventDispatcher *)eventDispatcher; AND 'Undefined symbol' errors during ...
Read more >
react native pod install시 RNGestureHandlerManager.h:9:52
RNGestureHandlerManager.h:9:52: error: expected a type - eventDispatcher:(nonnull RCTEventDispatcher *)eventDispatcher; · Issue.
Read more >
error: expected a type - eventDispatcher:(nonnu...anycodings
error : expected a type - eventDispatcher:(nonnull RCTEventDispatcher *)eventDispatcher; AND 'Undefined symbol' errors during iOS build ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found