File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Start from there up to the `[TurboModule] Test the Turbomodule` section. Then, f
9
9
* [[ Setup] Update podspec] ( #update-podspec )
10
10
* [[ Swift] Add Swift files] ( #swift )
11
11
* [[ iOS] Update Calculator file] ( #update-calculator )
12
+ * [[ Test] Test the swift TurboModule] ( #test-swift )
12
13
13
14
## Steps
14
15
113
114
resolve(result);
114
115
}
115
116
```
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.
You can’t perform that action at this time.
0 commit comments