Skip to content

Commit

Permalink
fix: Modernize RCTBridgeModule import, for Swift-modules compatibility
Browse files Browse the repository at this point in the history
This fixes several compilation errors with "Duplicate interface
definition for class […]" when a project uses Expo 44+, which has
Swift modules.

I don't expect this to be a breaking change. Reportedly, it's safe
to use

  #import <React/*.h>

with React Native 40+; see comment linked below. This project
already uses an import of that form. See the line

  #import <React/RCTUtils.h>

in the same file changed in this commit.

Details:
  expo/expo#15622 (comment)
  • Loading branch information
chrisbobbe committed Jul 8, 2022
1 parent 567b523 commit 7112494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/LRDRCTSimpleToast/LRDRCTSimpleToast.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016年 luoruidong. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "RCTBridgeModule.h"
#import <React/RCTBridgeModule.h>
#import "UIView+Toast.h"
#import <React/RCTUtils.h>

Expand Down

0 comments on commit 7112494

Please sign in to comment.