Skip to content

Commit b0242f3

Browse files
committed
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.
1 parent 7d24b3e commit b0242f3

25 files changed

Lines changed: 106217 additions & 3868 deletions

NativeScript/ffi/GeneratedSignatureDispatch.inc

Lines changed: 106184 additions & 0 deletions
Large diffs are not rendered by default.

napi-ios.xcodeproj/project.pbxproj renamed to NativeScriptRuntime.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@
592592
};
593593
};
594594
};
595-
buildConfigurationList = 22D44B512E23EBDA00E2B467 /* Build configuration list for PBXProject "napi-ios" */;
595+
buildConfigurationList = 22D44B512E23EBDA00E2B467 /* Build configuration list for PBXProject "NativeScriptRuntime" */;
596596
developmentRegion = en;
597597
hasScannedForEncodings = 0;
598598
knownRegions = (
@@ -972,10 +972,10 @@
972972
PRODUCT_BUNDLE_IDENTIFIER = org.nativescript.TKLiveSync;
973973
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
974974
REGISTER_APP_GROUPS = YES;
975-
SDKROOT = iphoneos;
975+
SDKROOT = "";
976976
SKIP_INSTALL = YES;
977977
STRING_CATALOG_GENERATE_SYMBOLS = YES;
978-
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
978+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
979979
SUPPORTS_MACCATALYST = YES;
980980
SWIFT_EMIT_LOC_STRINGS = YES;
981981
TARGETED_DEVICE_FAMILY = "1,2";
@@ -1073,10 +1073,10 @@
10731073
MTL_FAST_MATH = YES;
10741074
PRODUCT_BUNDLE_IDENTIFIER = org.nativescript.TKLiveSync;
10751075
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
1076-
SDKROOT = iphoneos;
1076+
SDKROOT = "";
10771077
SKIP_INSTALL = YES;
10781078
STRING_CATALOG_GENERATE_SYMBOLS = YES;
1079-
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
1079+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
10801080
SUPPORTS_MACCATALYST = YES;
10811081
SWIFT_EMIT_LOC_STRINGS = YES;
10821082
TARGETED_DEVICE_FAMILY = "1,2";
@@ -1668,7 +1668,7 @@
16681668
defaultConfigurationIsVisible = 0;
16691669
defaultConfigurationName = Release;
16701670
};
1671-
22D44B512E23EBDA00E2B467 /* Build configuration list for PBXProject "napi-ios" */ = {
1671+
22D44B512E23EBDA00E2B467 /* Build configuration list for PBXProject "NativeScriptRuntime" */ = {
16721672
isa = XCConfigurationList;
16731673
buildConfigurations = (
16741674
22D44B522E23EBDA00E2B467 /* Debug */,

napi-ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata renamed to NativeScriptRuntime.xcodeproj/project.xcworkspace/contents.xcworkspacedata

File renamed without changes.

README.md

Lines changed: 10 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ sudo gem install xcodeproj
4141
sudo gem install cocoapods
4242

4343
# Open the runtime in Xcode
44-
open v8ios.xcodeproj
44+
open NativeScriptRuntime.xcodeproj
4545
```
4646

4747
Select the `TestRunner` target and an emulator and hit Run (the play button).
@@ -73,7 +73,7 @@ pod 'IQKeyboardManager'
7373
Now `ns clean` and prepare again with `ns prepare ios`.
7474
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.
7575

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.
7777

7878
<img width="941" alt="Screenshot 2020-09-09 at 18 46 18" src="https://user-images.githubusercontent.com/879060/92628228-c294c000-f2cc-11ea-8822-58df689d3cd3.png">
7979

@@ -85,7 +85,7 @@ Hitting Run in Xcode should start the app in the simulator, and we can now add b
8585

8686
## Only required when running on a physical device
8787

88-
Add the `Nativescript.framework` and `TKLiveSync.framework` from the v8ios workspace:
88+
Add the `Nativescript.framework` and `TKLiveSync.framework` from the NativeScriptRuntime workspace:
8989

9090
<img width="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">
9191

@@ -97,7 +97,7 @@ If you encounter vague errors like this when building your app with the runtime
9797
/path/to/ios/NativeScript/inspector/src/base/atomicops.h:311:11: No matching function for call to 'Relaxed_Load'
9898
```
9999

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:
101101
https://github.com/QuickBlox/quickblox-ios-sdk/issues/993#issuecomment-379656716
102102

103103

@@ -115,143 +115,17 @@ iOS deployment target:
115115

116116
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)
117117

118-
# Updating/Building V8 engine source
118+
# V8 Artifacts
119119

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.
121121

122-
**Prerequisites:**
122+
To provision V8 artifacts, use:
123123

124+
```bash
125+
./download_v8.sh
124126
```
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:
132-
133-
```
134-
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
135-
136-
// copy/paste this command in current terminal window:
137-
export PATH=`pwd`/depot_tools:"$PATH"
138-
```
139-
140-
1. Fetch the latest v8 source (or specific version):
141-
142-
> If you have an existing v8 source fetched, delete the folder, and fetch it fresh each time updates are needed.
143-
144-
```
145-
// IMPORTANT: Make sure you are inside the clone of this repo...
146-
cd ios
147-
148-
// Fetch v8 source:
149-
fetch v8
150-
```
151-
152-
This will create a `v8` repo folder automatically checking out the `master` branch.
153-
154-
Always check https://omahaproxy.appspot.com/ for the specific version you intend to build.
155-
156-
2. Ensure you checkout the version you intend to build:
157-
158-
```
159-
cd v8
160-
161-
// for example:
162-
git checkout 9.2.230.18
163-
164-
gclient sync
165-
```
166-
167-
This will checkout a specific tag and fetch additional dependencies for building the intended version.
168-
169-
3. Apply patches from v8 updates to the iOS runtime:
170-
171-
```
172-
npm run apply-patches
173-
```
174-
175-
NOTE: Oftentimes the patches may not apply immediately and can run into issues like this:
176-
177-
```
178-
error: patch failed: BUILD.gn:538
179-
error: BUILD.gn: patch does not apply
180-
error: patch failed: src/inspector/inspector_protocol_config.json:21
181-
error: src/inspector/inspector_protocol_config.json: patch does not apply
182-
~/Documents/ios/v8/build ~/Documents/ios/v8 ~/Documents/ios
183-
error: patch failed: config/ios/ios_sdk.gni:32
184-
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.
218-
ios_code_signing_identity = exec_script("find_signing_identity.py",
219-
220-
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.
253127

254-
The compiled fat static libraries will be placed inside the `v8/dist` folder.
128+
This downloads and extracts prebuilt V8 binaries into `Frameworks/`.
255129

256130
# Building a Distribution Package
257131

apply_patches.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

build_all_vision.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ rm -rf ./dist
55
./update_version.sh
66
./build_metadata_generator.sh
77
./build_nativescript.sh --no-catalyst --no-iphone --no-sim
8-
./build_tklivesync.sh --no-catalyst --no-iphone --no-sim
8+
./build_tklivesync.sh --no-catalyst --no-iphone --no-sim --vision
99
./prepare_dSYMs.sh
10-
./build_npm_vision.sh
10+
./build_npm_vision.sh

build_testrunner.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ NATIVESCRIPT_CODE_SIGN_IDENTITY=${NATIVESCRIPT_CODE_SIGN_IDENTITY:-}
66
NATIVESCRIPT_PROVISIONING_PROFILE_SPECIFIER=${NATIVESCRIPT_PROVISIONING_PROFILE_SPECIFIER:-}
77

88
echo "Cleanup"
9-
xcodebuild -project v8ios.xcodeproj -target "TestRunner" -configuration Release clean
9+
xcodebuild -project NativeScriptRuntime.xcodeproj -target "TestRunner" -configuration Release clean
1010

1111
echo "Building for ARM64 device"
12-
xcodebuild -project v8ios.xcodeproj -target "TestRunner" -configuration Release -arch arm64 -sdk iphoneos -quiet DEVELOPMENT_TEAM="$NATIVESCRIPT_DEVELOPMENT_TEAM" CODE_SIGN_IDENTITY="$NATIVESCRIPT_CODE_SIGN_IDENTITY" CODE_SIGN_STYLE="Manual" NATIVESCRIPT_PROVISIONING_PROFILE_SPECIFIER="$NATIVESCRIPT_PROVISIONING_PROFILE_SPECIFIER"
12+
xcodebuild -project NativeScriptRuntime.xcodeproj -target "TestRunner" -configuration Release -arch arm64 -sdk iphoneos -quiet DEVELOPMENT_TEAM="$NATIVESCRIPT_DEVELOPMENT_TEAM" CODE_SIGN_IDENTITY="$NATIVESCRIPT_CODE_SIGN_IDENTITY" CODE_SIGN_STYLE="Manual" NATIVESCRIPT_PROVISIONING_PROFILE_SPECIFIER="$NATIVESCRIPT_PROVISIONING_PROFILE_SPECIFIER"
1313

1414
(
1515
set -e;

build_tklivesync.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source "$(dirname "$0")/build_utils.sh"
55
BUILD_CATALYST=$(to_bool ${BUILD_CATALYST:=true})
66
BUILD_IPHONE=$(to_bool ${BUILD_IPHONE:=true})
77
BUILD_SIMULATOR=$(to_bool ${BUILD_SIMULATOR:=true})
8-
BUILD_VISION=$(to_bool ${BUILD_VISION:=true})
8+
BUILD_VISION=$(to_bool ${BUILD_VISION:=false})
99
VERBOSE=$(to_bool ${VERBOSE:=false})
1010
BUILD_MACOS=$(to_bool ${BUILD_MACOS:=false})
1111

@@ -34,7 +34,7 @@ mkdir -p $DIST/intermediates
3434
if $BUILD_SIMULATOR; then
3535
# generates library for simulator targets (usually includes arm64, x86_64)
3636
checkpoint "Building TKLiveSync for iphone simulators (multi-arch)"
37-
xcodebuild archive -project v8ios.xcodeproj \
37+
xcodebuild archive -project NativeScriptRuntime.xcodeproj \
3838
-scheme TKLiveSync \
3939
-configuration Release \
4040
-destination "generic/platform=iOS Simulator" \
@@ -47,7 +47,7 @@ fi
4747
if $BUILD_IPHONE; then
4848
#generates library for device target
4949
checkpoint "Building TKLiveSync for ARM64 device"
50-
xcodebuild archive -project v8ios.xcodeproj \
50+
xcodebuild archive -project NativeScriptRuntime.xcodeproj \
5151
-scheme TKLiveSync \
5252
-configuration Release \
5353
-destination "generic/platform=iOS" \
@@ -60,7 +60,7 @@ fi
6060
if $BUILD_CATALYST; then
6161
#generates library for Mac Catalyst target
6262
checkpoint "Building TKLiveSync for Mac Catalyst"
63-
xcodebuild archive -project v8ios.xcodeproj \
63+
xcodebuild archive -project NativeScriptRuntime.xcodeproj \
6464
-scheme TKLiveSync \
6565
-configuration Release \
6666
-destination "generic/platform=macOS,variant=Mac Catalyst" \
@@ -73,7 +73,7 @@ fi
7373
if $BUILD_MACOS; then
7474
#generates library for Mac OS target
7575
checkpoint "Building TKLiveSync for Mac OS"
76-
xcodebuild archive -project v8ios.xcodeproj \
76+
xcodebuild archive -project NativeScriptRuntime.xcodeproj \
7777
-scheme TKLiveSync \
7878
-configuration Release \
7979
-destination "generic/platform=macOS" \
@@ -86,7 +86,7 @@ fi
8686
if $BUILD_VISION; then
8787
#generates library for visionOS targets
8888
checkpoint "Building TKLiveSync for visionOS Simulators"
89-
xcodebuild archive -project v8ios.xcodeproj \
89+
xcodebuild archive -project NativeScriptRuntime.xcodeproj \
9090
-scheme "TKLiveSync" \
9191
-configuration Release \
9292
-destination "generic/platform=visionOS Simulator" \
@@ -96,7 +96,7 @@ xcodebuild archive -project v8ios.xcodeproj \
9696
-archivePath $DIST/intermediates/TKLiveSync.xrsimulator.xcarchive
9797

9898
checkpoint "Building TKLiveSync for visionOS Device"
99-
xcodebuild archive -project v8ios.xcodeproj \
99+
xcodebuild archive -project NativeScriptRuntime.xcodeproj \
100100
-scheme "TKLiveSync" \
101101
-configuration Release \
102102
-destination "generic/platform=visionOS" \
@@ -166,4 +166,4 @@ rm -rf "$DIST/intermediates"
166166
# rm -rf "$DIST/TKLiveSync.x86_64-iphonesimulator.xcarchive"
167167
# rm -rf "$DIST/TKLiveSync.arm64-iphonesimulator.xcarchive"
168168
# rm -rf "$DIST/TKLiveSync.iphonesimulator.xcarchive"
169-
# rm -rf "$DIST/TKLiveSync.iphoneos.xcarchive"
169+
# rm -rf "$DIST/TKLiveSync.iphoneos.xcarchive"

0 commit comments

Comments
 (0)