Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

Commit 0976195

Browse files
author
Riccardo Cipolleschi
committed
[Polishing] Add commit hashes
1 parent a2682b1 commit 0976195

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
This run starts from the [feat/turbomodule-swift](https://github.com/react-native-community/RNNewArchitectureLibraries/tree/feat/turbomodule-swift) branch.
44
Start from there up to the `[TurboModule] Test the swift Turbomodule` section. Then, follow the steps below to move your logic to a Swift implementation file.
55

6+
This guide will teach how to implement a function call in the Native platform that produces a result in Javascript as an asynchronous event, instead of using a promise or a synchronous call. It also show how to set up properly the delegate pattern between Swift and Objective-C++, in case the Swift implementation needs some state.
7+
68
## Table of contents
79

810
* [[Codegen] Update Codegen Specs](#codegen)
@@ -12,7 +14,7 @@ Start from there up to the `[TurboModule] Test the swift Turbomodule` section. T
1214

1315
## Steps
1416

15-
### <a name="codegen" />* [[Codegen] Update Codegen Specs](#codegen)
17+
### <a name="codegen" />[[Codegen] Update Codegen Specs](https://github.com/react-native-community/RNNewArchitectureLibraries/commit/5893a1ebd85c5dcc48783aa626b2ab8209ab5149)
1618

1719
1. Open the `calculator/src/NativeCalculator.js` file and add the following lines
1820
```diff
@@ -32,6 +34,10 @@ export interface Spec extends TurboModule {
3234

3335
### <a name="swift-logic" />[[Swift] Implement the Swift logic]()
3436

37+
**Note:** This will be fixed in the stable release of 0.71
38+
39+
### <a name="swift-logic" />[[Swift] Implement the Swift logic](https://github.com/react-native-community/RNNewArchitectureLibraries/commit/b73b48b7fbae5a78629466a46ed0208e6ac26308)
40+
3541
1. Open the `calculator/ios/Calculator.swift` file
3642
2. Add the following `CalculatorDelegate` protocol in it. This protocol will be implemented by the Objective-C++ class to provide the send event method to the Swift implementation
3743
```swift
@@ -86,7 +92,7 @@ extension Calculator {
8692
}
8793
```
8894

89-
### <a name="objc-logic" />[[Obj-C++] Implement the Objective-C++ logic]()
95+
### <a name="objc-logic" />[[Obj-C++] Implement the Objective-C++ logic](https://github.com/react-native-community/RNNewArchitectureLibraries/commit/2543c47a4e1957d9628341b3e877ae60b322d977)
9096

9197
1. Open the header file `calculator/ios/RNCalculator.h` and make it extend `RCTEventEmitter`
9298
```diff
@@ -160,7 +166,7 @@ extension Calculator {
160166
}
161167
```
162168

163-
### <a name="test" />[[Test] Test the new feature in your app]()
169+
### <a name="test" />[[Test] Test the new feature in your app](https://github.com/react-native-community/RNNewArchitectureLibraries/commit/a2682b156a29d254cec8c6adee0cd7e079c4501b)
164170

165171
1. from the `NewArchitecture` root app, run:
166172
```sh

0 commit comments

Comments
 (0)