Skip to content

Commit 76923b1

Browse files
author
Riccardo Cipolleschi
committed
[Test] Test the swift TurboModule
1 parent ed61fd8 commit 76923b1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Start from there up to the `[TurboModule] Test the Turbomodule` section. Then, f
99
* [[Setup] Update podspec](#update-podspec)
1010
* [[Swift] Add Swift files](#swift)
1111
* [[iOS] Update Calculator file](#update-calculator)
12+
* [[Test] Test the swift TurboModule](#test-swift)
1213

1314
## Steps
1415

@@ -113,3 +114,19 @@ end
113114
resolve(result);
114115
}
115116
```
117+
118+
### <a name="test-swift" /> [[Test] Test the swift TurboModule]()
119+
120+
1. Navigate to the `NewArchitecture` root folder:
121+
2. `yarn add ../calculator`
122+
3. `cd ios`
123+
4. `RCT_NEW_ARCH_ENABLED=1 bundle exec pod install`
124+
5. `cd ..`
125+
6. `yarn ios`
126+
7. Click on Calculate and observe that the app is still working.
127+
128+
If you want to verify that the Swift code is invoked:
129+
- Add a `print(">>> Calling from Swift")` statement in the `calculator/ios/Calculator.swift`.
130+
- Open the `ios/NewArchitexture.xcworkspace` in Xcode.
131+
- Run the app from Xcode.
132+
- Observe the `>>> Calling from Swift` in the Xcode console.

0 commit comments

Comments
 (0)