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

Make osx example utilise the common example app #3055

Merged
merged 85 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
50efeeb
prepare example-app package.json for osx support
latekvo Aug 21, 2024
4f533bf
fix invalid paths in app.tsx
latekvo Aug 21, 2024
c1daaab
rewire macos example path to the common example
latekvo Aug 21, 2024
308b71c
add aliases necessary to use the common example
latekvo Aug 21, 2024
c44ce74
add macos support to root package.json, update podfile
latekvo Aug 21, 2024
edf80e6
sync package versions, add missing packages
latekvo Aug 21, 2024
8b47092
update podfiles, add missing macos files
latekvo Aug 21, 2024
6adeffa
remove no-longer-existing react postinstall function
latekvo Aug 21, 2024
ce3fcb7
update pod versions to resolve RTC-Folly conflicts
latekvo Aug 21, 2024
0c60673
enable hermes to unlock some neccessary native functionalities
latekvo Aug 21, 2024
be5b0ea
update reanimated to a version supporting turbomodules on macos
latekvo Aug 21, 2024
8b884c7
disable shadow styles which are unsupported on macos
latekvo Aug 21, 2024
d4a0d2d
add necessary styles which are not default on macos
latekvo Aug 21, 2024
541eafa
fix styles to correctly display example
latekvo Aug 23, 2024
0d6c0b6
add macos examples to check if anything stopped working in the proces…
latekvo Aug 23, 2024
7399ccc
remove the need for react-native when building for macos
latekvo Aug 23, 2024
98b35de
rename macos example folder
latekvo Aug 23, 2024
2fbd75a
move former macos examples to common example app
latekvo Aug 23, 2024
f11f51a
cleanup package.json
latekvo Aug 23, 2024
5365b95
add config overwrite to podfile, remove legacy code from podfile
latekvo Aug 26, 2024
cce7491
move macos module resolving to metro instead of babel
latekvo Aug 26, 2024
1e9fac6
change babel config to the one used by common example
latekvo Aug 26, 2024
29dc2ca
remove macos from core package dependencies
latekvo Aug 26, 2024
02a96fa
fix project config to require manual intervention in one less place
latekvo Aug 26, 2024
05a864d
modify metro config to use expo and reseamble the common example one
latekvo Aug 26, 2024
fa5ce90
add macos file resolver to common app metro config
latekvo Aug 27, 2024
40c06e1
add partial expo-autolinking to macos podfile
latekvo Aug 27, 2024
03d32a9
sync react-native and expo versions to common example app
latekvo Aug 27, 2024
14f085b
add expo compatibility remarks
latekvo Aug 27, 2024
ddf5f3c
fix app config to be compatible with expo
latekvo Aug 27, 2024
4472865
fix expo_patch_react_imports infinite loop by removing use_modular_he…
latekvo Aug 27, 2024
34aa6bd
use expo/orbit podfile config to resolve some macos building issues
latekvo Aug 27, 2024
f382cbb
update gem versions which helped resolve some issues
latekvo Aug 28, 2024
a788ead
significantly simplify podfile
latekvo Aug 28, 2024
0d8d35f
bump ruby version to 3.3.4
latekvo Aug 28, 2024
36a9915
update pods to fix fmt not found error
latekvo Aug 28, 2024
6036fe4
add REACT_NATIVE_PATH build setting to post_install routine
latekvo Aug 28, 2024
d02f647
Revert "move macos module resolving to metro instead of babel" - the …
latekvo Sep 6, 2024
4953201
cherry-pick build path change
latekvo Sep 6, 2024
b38f4a2
cleanup package.json
latekvo Sep 6, 2024
b7bde38
cleanup babel config, remove react native path correction from babel …
latekvo Sep 6, 2024
575e959
merge main
latekvo Sep 6, 2024
4cab8cf
resolve merge conflict
latekvo Sep 6, 2024
a63db68
move fling example to the common example app
latekvo Sep 6, 2024
06134b5
fix warnings in the new fling example
latekvo Sep 6, 2024
14b87fe
bump node version in macos test workflow
latekvo Sep 6, 2024
b8efd67
add react native config, fix typo in app.tsx
latekvo Sep 6, 2024
7d73b6c
fix duplicate fling entries
latekvo Sep 13, 2024
22a3a89
fix crashes on startup
latekvo Sep 13, 2024
6f76d95
revert unintentional fling removal
latekvo Sep 13, 2024
7717de6
cleanup babel config - remove all unnecessary aliases
latekvo Sep 13, 2024
a16f70e
add react native to package.json to fix ci test crashes
latekvo Sep 13, 2024
a6d6833
update workflow macos version to latest
latekvo Sep 13, 2024
dbb75eb
remove pod install artifact
latekvo Sep 17, 2024
fa980e5
update gitignore to exclude local files
latekvo Sep 17, 2024
4f25f52
Merge branch 'main' into @latekvo/support-osx-in-primary-example
latekvo Sep 17, 2024
4c12996
remove unnecessary fastxml package
latekvo Sep 18, 2024
dbb2d85
[0.74] bump version to 0.74, fix macos entrypoint for 0.74, fix babel…
latekvo Sep 18, 2024
261f00f
revert to 0.73
latekvo Sep 18, 2024
adf11a8
Merge branch 'main' into @latekvo/support-osx-in-primary-example
latekvo Sep 18, 2024
a5f0995
lock rn-macos version to 0.73
latekvo Sep 18, 2024
92a325b
Merge branch 'main' into @latekvo/support-osx-in-primary-example
latekvo Sep 20, 2024
2d62e3a
add missing packages to MacOSExample
latekvo Sep 20, 2024
896f9be
fix node modules path resolving in metro config
latekvo Sep 20, 2024
747bb71
remove macos from common example - fix android and ios builds failing…
latekvo Sep 20, 2024
62f776c
add module resolver package to macos package.json
latekvo Sep 23, 2024
dc2de73
fix typo in metro
latekvo Sep 23, 2024
b812230
bump gemfile cocoapods version to match the one used to generate podfile
latekvo Sep 23, 2024
2ded012
bump rn-macos to 0.74.6
latekvo Sep 24, 2024
e3c098d
fix header squash and overlaps in open position
latekvo Sep 24, 2024
6a6f885
fix alignment on mobile devices
latekvo Sep 24, 2024
38f861d
fix width scaling in collapsed state
latekvo Sep 24, 2024
10530ea
remove simpleRotate
latekvo Sep 25, 2024
45c696e
Merge remote-tracking branch 'origin/main' into @latekvo/support-osx-…
latekvo Sep 25, 2024
35fa6f0
fix header alignment for a wider range of window widths
latekvo Sep 25, 2024
61455cf
disable chevrons on macos
latekvo Sep 26, 2024
65715c8
Merge remote-tracking branch 'origin/main' into @latekvo/support-osx-…
latekvo Sep 27, 2024
80901f0
Resolve merge conflicts, merge
latekvo Sep 27, 2024
6f8f4bc
fix camera crashing on macos, add missing package
latekvo Sep 27, 2024
8040296
Update macos-build.yml
latekvo Sep 27, 2024
46a46ac
remove comments, fix config files, stop using hermes by default
latekvo Sep 30, 2024
cb1041d
Merge branch '@latekvo/support-osx-in-primary-example' of https://git…
latekvo Sep 30, 2024
42a6a59
enable hermes on macos
latekvo Oct 1, 2024
187dc15
simplify header code
latekvo Oct 1, 2024
062445f
Merge remote-tracking branch 'origin/main' into @latekvo/support-osx-…
latekvo Oct 1, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
build:
if: github.repository == 'software-mansion/react-native-gesture-handler'
runs-on: macos-12
runs-on: macos-15
strategy:
matrix:
working-directory: [MacOSExample]
Expand All @@ -23,10 +23,10 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v2
- name: Use Node.js 16
- name: Use Node.js 22
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 22
cache: 'yarn'
- name: Install node dependencies
working-directory: ${{ matrix.working-directory }}
Expand Down
2 changes: 1 addition & 1 deletion MacOSExample/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

gem 'cocoapods', '~> 1.12'
gem 'cocoapods', '~> 1.15.2'
55 changes: 28 additions & 27 deletions MacOSExample/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.6)
CFPropertyList (3.0.7)
base64
nkf
rexml
activesupport (7.1.3)
activesupport (7.2.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
base64 (0.2.0)
bigdecimal (3.1.6)
bigdecimal (3.1.8)
claide (1.1.0)
cocoapods (1.14.2)
cocoapods (1.15.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.14.2)
cocoapods-core (= 1.15.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
Expand All @@ -40,7 +43,7 @@ GEM
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.14.2)
cocoapods-core (1.15.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand All @@ -60,50 +63,48 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.2.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
drb (2.2.0)
ruby2_keywords
drb (2.2.1)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.16.3)
ffi (1.17.0)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.14.1)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
json (2.7.1)
minitest (5.21.2)
json (2.7.2)
logger (1.6.1)
minitest (5.25.1)
molinillo (0.8.0)
mutex_m (0.2.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
nkf (0.2.0)
public_suffix (4.0.7)
rexml (3.2.8)
strscan (>= 3.0.9)
rexml (3.3.7)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
strscan (3.1.0)
securerandom (0.3.1)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.24.0)
xcodeproj (1.25.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
rexml (>= 3.3.2, < 4.0)

PLATFORMS
ruby

DEPENDENCIES
cocoapods (~> 1.12)
cocoapods (~> 1.15.2)

RUBY VERSION
ruby 3.0.0p0
Expand Down
13 changes: 7 additions & 6 deletions MacOSExample/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
'@babel/plugin-transform-modules-commonjs',
'react-native-reanimated/plugin',
['@babel/plugin-transform-private-methods', { loose: true }],
latekvo marked this conversation as resolved.
Show resolved Hide resolved
[
'module-resolver',
{
Expand All @@ -11,13 +11,14 @@ module.exports = {
react: './node_modules/react',
'react-native': './node_modules/react-native-macos',
'react-native-reanimated': './node_modules/react-native-reanimated',
'@babel': './node_modules/@babel',
'@egjs/hammerjs': './node_modules/@egjs/hammerjs',
fbjs: './node_modules/fbjs',
'hoist-non-react-statics': './node_modules/hoist-non-react-statics',
invariant: './node_modules/invariant',
'react-native-gesture-handler/ReanimatedSwipeable':
'../src/components/ReanimatedSwipeable',
'react-native-gesture-handler/Swipeable':
'../src/components/Swipeable',
'react-native-gesture-handler': '../src/index',
},
},
],
'react-native-reanimated/plugin',
],
};
2 changes: 1 addition & 1 deletion MacOSExample/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { AppRegistry } from 'react-native';
import App from './src/App';
import App from '../example/App';
import { name as appName } from './app.json';

AppRegistry.registerComponent(appName, () => App);
2 changes: 2 additions & 0 deletions MacOSExample/macos/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# CocoaPods
Pods/

*.local
7 changes: 6 additions & 1 deletion MacOSExample/macos/MacOSExample-macOS/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification
return [super applicationDidFinishLaunching:notification];
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
- (NSURL *)bundleURL
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
Expand All @@ -23,6 +23,11 @@ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
#endif
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [self bundleURL];
}

/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
///
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
Expand Down
Loading
Loading