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
Copy file name to clipboardExpand all lines: README.md
+21-7Lines changed: 21 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Getting Started
2
2
3
-
To start diving into the v8 iOS runtime make sure you have XCode and [Homebrew](https://brew.sh/) installed, and then run the following
3
+
To start diving into the v8 iOS runtime make sure you have Xcode and [Homebrew](https://brew.sh/) installed, and then run the following
4
4
```bash
5
5
# Install CMake
6
6
brew install cmake
@@ -19,7 +19,7 @@ git submodule update --init
19
19
# Ensure that you have the required llvm binaries for building the metadata generator
20
20
./download_llvm.sh
21
21
22
-
# Open the runtime in XCode
22
+
# Open the runtime in Xcode
23
23
open v8ios.xcodeproj
24
24
```
25
25
@@ -39,20 +39,34 @@ If all tests pass, everything is good! At this point you can make changes to the
39
39
40
40
# Attaching the runtime to a NativeScript app
41
41
42
-
In the existing app, we need to prepare the XCode project using `ns prepare ios`. This should create a folder named `platforms/ios` and in there a `<appname>.xcworkspace` (if there is no `.xcworkspace` use the `.xcodeproj` instead). Open it in XCode and then drag the `v8ios.xcodeproj` from the `ns-v8ios-runtime` folder under the `<appname>` in the XCode sidebar.
42
+
In the existing app, we need to prepare the Xcode project using `ns prepare ios`. This will create a folder named `platforms/ios` and in there a `<appname>.xcworkspace` (or .xcodeproject but note the following...).
43
+
44
+
**IMPORTANT**: You can only attach the runtime to a `.xcworkspace` project (not a `.xcodeproj` project). If your app's platforms/ios folder does not contain a .xcworkspace file yet, you can do the following:
45
+
46
+
Add a new file `App_Resources/iOS/Podfile` with the following contents:
47
+
48
+
```
49
+
pod 'IQKeyboardManager'
50
+
```
51
+
52
+
Now `ns clean` and prepare again with `ns prepare ios`.
53
+
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.
54
+
55
+
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.
43
56
44
57
<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">
45
58
46
-
Remove the `NativeScript.xcframework` from the General tab, as we will no longer be using the framework from node_modules and instead will use the source directly:
59
+
Remove the `NativeScript.xcframework`and `TNSLiveSync.xcframework`from the General tab, as we will no longer be using the framework from node_modules and instead will use the source directly:
47
60
48
61
<imgwidth="693"alt="Screenshot 2020-09-09 at 18 47 23"src="https://user-images.githubusercontent.com/879060/92628311-e6f09c80-f2cc-11ea-8977-201517badc3b.png">
49
62
50
-
Add the `Nativescript.framework` from the v8ios workspace (only required when running on a physical device):
63
+
Hitting Run in Xcode should start the app in the simulator, and we can now add breakpoints to the runtime and step through it with the debugger. To apply changes to the javascript, make sure you run `ns prepare ios` to re-bundle it into the `platforms/ios` folder.
51
64
52
-
<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">
65
+
## Only required when running on a physical device
53
66
67
+
Add the `Nativescript.framework` from the v8ios workspace:
54
68
55
-
Hitting Run in XCode should start the app in the simulator, and we can now add breakpoints to the runtime and step through it with the debugger. To apply changes to the javascript, make sure you run `ns prepare ios` to re-bundle it into the `platforms/ios` folder.
69
+
<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">
0 commit comments