-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable new architecture and pointer events (#58)
* Enable new architecture * Demo pointer events * Remove react dependency from root * Update package-lock * Add @types/node to mobile-app
- Loading branch information
Showing
10 changed files
with
9,562 additions
and
9,569 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
}, | ||
"peerDependencies": { | ||
"@tanstack/react-query": "^5", | ||
"react": "^18", | ||
"react": "~18.2", | ||
"zod": "^3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const { withAppDelegate } = require("@expo/config-plugins"); | ||
|
||
const withPointerEvents = (config) => { | ||
return withAppDelegate(config, (config) => { | ||
const appDelegate = config.modResults; | ||
|
||
// Add import | ||
if (!appDelegate.contents.includes("#import <React/RCTConstants.h>")) { | ||
appDelegate.contents = `#import <React/RCTConstants.h>\n${appDelegate.contents}`; | ||
} | ||
|
||
// Add RCTSetDispatchW3CPointerEvents | ||
const didFinishLaunchingMethod = appDelegate.contents.match( | ||
/(?:^|\n).*didFinishLaunchingWithOptions.*\n?\s*{/, | ||
); | ||
|
||
if (didFinishLaunchingMethod) { | ||
const insertAt = | ||
didFinishLaunchingMethod.index + didFinishLaunchingMethod[0].length; | ||
const newContents = | ||
appDelegate.contents.slice(0, insertAt) + | ||
"\n RCTSetDispatchW3CPointerEvents(YES);" + | ||
appDelegate.contents.slice(insertAt); | ||
|
||
appDelegate.contents = newContents; | ||
} | ||
|
||
return config; | ||
}); | ||
}; | ||
|
||
module.exports = withPointerEvents; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters