-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: migrate to new rn architecture #213
Open
edeckers
wants to merge
20
commits into
develop
Choose a base branch
from
elydeckers/feature/migrate-to-new-architecture
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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 comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
edeckers
force-pushed
the
elydeckers/feature/migrate-to-new-architecture
branch
from
April 30, 2022 08:25
9528c47
to
aeff337
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
edeckers
force-pushed
the
elydeckers/feature/migrate-to-new-architecture
branch
from
April 30, 2022 13:12
aeff337
to
6a56a0c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
edeckers
force-pushed
the
elydeckers/feature/migrate-to-new-architecture
branch
from
July 28, 2022 10:59
93cdc62
to
088dcf3
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
edeckers
force-pushed
the
elydeckers/feature/migrate-to-new-architecture
branch
from
July 28, 2022 14:49
088dcf3
to
92a801b
Compare
TypeScript Test Report 1 files 1 suites 2s ⏱️ Results for commit 92a801b. |
Android Unit Test Report 1 files 1 suites 9s ⏱️ Results for commit 92a801b. |
Android Instrumented Test Report1 files 1 suites 1h 17m 56s ⏱️ Results for commit 92a801b. |
iOS Test Report 1 files 1 suites 11s ⏱️ Results for commit 92a801b. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Progress
Android.mk
with relative pathNotes
Some notes on my migration adventures for future reference and to hopefully benefit people struggling with the same issues.
TurboModuleRegistry.getEnforcing
Solved
TurboModuleRegistry.getEnforcing
Spec problem by loading the package like so:Context:
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'BlobCourier' could not be found. Verify that a module by this name is registered in the native binary.
react-native-blob-courier/example/android/app/src/main/java/io/deckers/blob_courier_example/newarchitecture/MainApplicationReactNativeHost.java
Line 55 in 23f151d
Notice that having
packages.add
inMainApplication::mReactNativeHost
is not sufficient, because when working with TurboModules the app usesMainApplication::mNewArchitectureNativeHost
.And to my surprise, I did not need to add this line in order to get this minimal TurboModule app to work:
https://github.com/edeckers/RNNewArchitectureLibraries/tree/elydeckers/feature/add-android-app
I'm guessing this has something to do with autolinking not being configured correctly, might be worth investigating later on.
Enable TurboModule on iOS
https://medium.com/achieving-100ms/part-1-automatic-batching-w-react-native-fabric-react-18-438ad1282896
Memory file not found iOS
Currently running into Lexical or Preprocessor Issue
'memory' file not found
onRCTCxxBridgeDelegate.h
even though I did setCLANG_CXX_LANGUAGE_STANDARD = "c++17"
on theBloubCourierExample
project and I renamedAppDelegate.m
toAppDelegate.mm
which enables mixing Objective-C and C++.Same error, maybe related somehow:
facebook/react-native#31303
This seems to do the trick:
File must be compiled as Obj-C++
Currently I'm stuck on
Things I tried to fix it to no avail:
source_files
inpodspec
and include in{private,public}_source_headers
BlobCourier-Bridging-Header.h
C++ Header
inPod-BlobCourierExample
Exclude generated header from podspec
The
must be compiled as Obj-C++
problem was caused by the inclusion of the generated headers in thepodspec
, which both causes conflicts because its a Swift library and because it the generated header should not be part of the library but of the app that depends on the library.When I removed the generated header from the
podspec
, removed thepod
inclusion ofreact-native-blob-courier
from the app'sPodfile
and added a link dependency to the libary to the app'spackage.json
instead everything worked. The header file is still generated but is part of the app's build instead of the library's build, as it should.Information