You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove deprecated workspace and scheme files from the v8ios Xcode project
- Deleted contents.xcworkspacedata, IDEWorkspaceChecks.plist, and WorkspaceSettings.xcsettings as they are no longer needed.
- Removed multiple scheme files: AppWithModules.xcscheme, NativeScript.xcscheme, TKLiveSync.xcscheme, and TestRunner.xcscheme to clean up the project structure.
Select the `TestRunner` target and an emulator and hit Run (the play button).
@@ -73,7 +73,7 @@ pod 'IQKeyboardManager'
73
73
Now `ns clean` and prepare again with `ns prepare ios`.
74
74
This will make sure when the iOS project is generated that you end up with a .xcworkspace file so attaching the v8 runtime source works properly.
75
75
76
-
You can now open the `platforms/ios/{project-name}.xcworkspace` file in Xcode and then drag the `v8ios.xcodeproj` from the root of this repo under the `<appname>` in the Xcode sidebar.
76
+
You can now open the `platforms/ios/{project-name}.xcworkspace` file in Xcode and then drag the `NativeScriptRuntime.xcodeproj` from the root of this repo under the `<appname>` in the Xcode sidebar.
77
77
78
78
<imgwidth="941"alt="Screenshot 2020-09-09 at 18 46 18"src="https://user-images.githubusercontent.com/879060/92628228-c294c000-f2cc-11ea-8822-58df689d3cd3.png">
79
79
@@ -85,7 +85,7 @@ Hitting Run in Xcode should start the app in the simulator, and we can now add b
85
85
86
86
## Only required when running on a physical device
87
87
88
-
Add the `Nativescript.framework` and `TKLiveSync.framework` from the v8ios workspace:
88
+
Add the `Nativescript.framework` and `TKLiveSync.framework` from the NativeScriptRuntime workspace:
89
89
90
90
<imgwidth="402"alt="Screen Shot 2021-04-12 at 11 49 10 AM"src="https://user-images.githubusercontent.com/2379994/114423589-51c8c580-9b85-11eb-9d30-eb1cbf73454a.png">
91
91
@@ -97,7 +97,7 @@ If you encounter vague errors like this when building your app with the runtime
97
97
/path/to/ios/NativeScript/inspector/src/base/atomicops.h:311:11: No matching function for call to 'Relaxed_Load'
98
98
```
99
99
100
-
This is most likely related to `Build Active Architecture Only` setting in Xcode for various targets (your app and the included v8ios runtime). You should check to make sure your app `Build Settings` and the v8ios targets `NativeScript` and `TKLiveSync` Build Settings are set to YES for both Debug and Release. See this reference:
100
+
This is most likely related to `Build Active Architecture Only` setting in Xcode for various targets (your app and the included NativeScript runtime). You should check to make sure your app `Build Settings` and the NativeScript runtime targets `NativeScript` and `TKLiveSync` Build Settings are set to YES for both Debug and Release. See this reference:
The `--jitless` mode in which V8 is running is explained in the following [document](https://docs.google.com/document/d/1YYU17VqFMBeSJ8whCqXknOGXtXDVDLulchsTkmi0YdI/edit#heading=h.mz26kq2dsu6k)
117
117
118
-
# Updating/Building V8 engine source
118
+
# V8 Artifacts
119
119
120
-
In order to build the V8 engine for iOS and produce the static libraries used in the NativeScript iOS runtime follow these steps:
120
+
Local V8 source build and patch scripts have been removed from this repo.
121
121
122
-
**Prerequisites:**
122
+
To provision V8 artifacts, use:
123
123
124
+
```bash
125
+
./download_v8.sh
124
126
```
125
-
git clone https://github.com/NativeScript/ios.git
126
-
cd ios
127
-
```
128
-
129
-
You will need Google [depot_tools](https://www.chromium.org/developers/how-tos/install-depot-tools)
130
-
131
-
* If you have not cloned the repo yet, clone the following and export a path setting so they can be referenced properly:
error: config/ios/ios_sdk.gni: patch does not apply
185
-
```
186
-
187
-
You can look at each patch failure, for example `BUILD.gn: patch does not apply`, you can apply the patch manually instead. This can be done by opening the `./v8.patch` file and applying each patch manually to the corresponding file.
188
-
189
-
4. Build v8 source:
190
-
191
-
```
192
-
npm run build-v8-source
193
-
```
194
-
195
-
*Troubleshooting build errors*
196
-
197
-
* Example failure 1:
198
-
199
-
```
200
-
@Mac ios % npm run build-v8-source
201
-
202
-
> @nativescript/ios@8.1.0 build-v8-source
203
-
> ./build_v8_source.sh
204
-
205
-
~/Documents/ios/v8 ~/Documents/ios
206
-
Building for out.gn/x64-release (simulator)
207
-
Done. Made 212 targets from 92 files in 4004ms
208
-
ninja: Entering directory `out.gn/x64-release'
209
-
ninja: error: unknown target 'v8_libsampler'
210
-
```
211
-
212
-
In this case, the v8_libsampler module no longer needs to be built specifically as a target, therefore the MODULES inside the `build_v8_source.sh` can be modified to remove the target of `v8_libsampler` and the build can be invoked again.
213
-
214
-
* Example failure 2:
215
-
216
-
```
217
-
ERROR at //build/config/ios/ios_sdk.gni:181:33: Script returned non-zero exit code.
Automatic code signing identity selection was enabled but could not
221
-
find exactly one codesigning identity matching "Apple Development".
222
-
223
-
Check that the keychain is accessible and that there is exactly one
224
-
valid codesigning identity matching the pattern. Here is the parsed
225
-
output of `xcrun security find-identity -v -p codesigning`:
226
-
227
-
1) 1ABE0***********************************: "Apple Development: Your Name (U4********)"
228
-
2) CB529***********************************: "Apple Distribution: Your Org (29********)"
229
-
3) BACD5***********************************: "Apple Development: Your Name (VV********)"
230
-
4) 0D42D***********************************: "Apple Development: Your Team (D3********)"
231
-
5) 055BA***********************************: "Apple Development: Your Name (GF********)"
232
-
6) A5306***********************************: "Apple Development: Your Name (9V***********)"
233
-
6 valid identities found
234
-
```
235
-
236
-
If this occurs you can manually modify `v8/build/config/ios/ios_sdk.gni`. A property named `ios_code_signing_identity`. You can set that explicitly to one of your code signing identities. You can use the command it suggests to list out your identities in full: `xcrun security find-identity -v -p codesigning` - Copy the id and paste it as the value of `ios_code_signing_identity`.
237
-
238
-
You will want to make `ios_code_signing_identity_description` an empty string so the final change should look something like this:
239
-
240
-
```
241
-
# Explicitly select the identity to use for codesigning. If defined, must
242
-
# be set to a non-empty string that will be passed to codesigning. Can be
243
-
# left unspecified if ios_code_signing_identity_description is used instead.
244
-
ios_code_signing_identity = "...your-id..."
245
-
246
-
# Pattern used to select the identity to use for codesigning. If defined,
247
-
# must be a substring of the description of exactly one of the identities by
248
-
# `security find-identity -v -p codesigning`.
249
-
ios_code_signing_identity_description = ""
250
-
```
251
-
252
-
5. If building of the v8 source succeeds, Verify the build output.
253
127
254
-
The compiled fat static libraries will be placed inside the `v8/dist` folder.
128
+
This downloads and extracts prebuilt V8 binaries into `Frameworks/`.
0 commit comments