Skip to content

feat: Support for Mac Catalyst #1231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9bfc924
feat: Support UIKit for Mac
mbektchiev Jun 26, 2019
769a1fb
refact: Embed `.xcframeworks` as a zip archive
mbektchiev Jul 1, 2019
d2e531e
fix(TKLiveSync): Fix dylib's install name
mbektchiev Jul 1, 2019
2408116
fix(project-template): CodeSign frameworks in final executable
mbektchiev Jul 1, 2019
ba5e18c
Fix unit tests
mbektchiev Jul 3, 2019
f39fb6b
chore(project-template): Decrement objectVersion
mbektchiev Jul 4, 2019
de5d1a1
fix(uikitformac): IsObjcObject tagged pointers can have their highest…
mbektchiev Jul 4, 2019
5e5be21
fix(runtime): Do not hide unavailable global symbols
mbektchiev Jul 5, 2019
9f37a27
chore: Update README with LLVM 8.0 requirement
mbektchiev Jul 12, 2019
5fc7b9b
chore: Update system requirements for UIKitForMac
mbektchiev Jul 17, 2019
9bd6b21
Revert "fix(runtime): Do not hide unavailable global symbols"
mbektchiev Aug 2, 2019
23d61b1
chore: Update build scripts for Xcode 11 beta 5
mbektchiev Aug 2, 2019
cb03965
fix: Unit tests in Catalyst
mbektchiev Aug 13, 2019
b3f8253
fix(project-template): JS application path for Catalyst
mbektchiev Aug 19, 2019
1198c2a
fix(runtime): Correct mask and enable malloc_size check in IsObjcObject
mbektchiev Aug 19, 2019
6d06bbe
fix(metadata-generator): Catalyst crashes
mbektchiev Aug 19, 2019
c5cbe9a
Merge remote-tracking branch 'origin/master' into feat/uikit-for-mac
mbektchiev Aug 19, 2019
9bbab93
fix(catalyst): Disable malloc_size check for Catalyst
mbektchiev Aug 22, 2019
3b31ec0
Merge remote-tracking branch 'origin/release' into feat/uikit-for-mac
mbektchiev Sep 20, 2019
27a5e4b
chore: Update package versions to 6.1.2-catalyst
mbektchiev Sep 20, 2019
56ef9c2
Merge remote-tracking branch 'origin/master' into feat/uikit-for-mac
mbektchiev Oct 25, 2019
4705f35
Merge remote-tracking branch 'origin/master' into feat/uikit-for-mac
mbektchiev Nov 20, 2019
972db49
fix(runtime): Correctly get base class constructor
mbektchiev Nov 22, 2019
1104158
chore(tests): Fix failing version tests
mbektchiev Nov 26, 2019
f254d28
Merge remote-tracking branch 'origin/master' into feat/uikit-for-mac
mbektchiev Nov 26, 2019
29e776a
fix(runtime): Crash when accessing specific global classes
mbektchiev Nov 26, 2019
c77751b
fix(metadata-generator): Store demangled name only for iOS
mbektchiev Nov 26, 2019
468de10
chore(build): Retry WebKit build when on Catalyst
mbektchiev Dec 2, 2019
3dea78e
chore(npm): Revert to regular package version
mbektchiev Dec 2, 2019
19c9cb8
Merge remote-tracking branch 'origin/master' into feat/uikit-for-mac
mbektchiev Dec 2, 2019
f7c7c8a
Merge remote-tracking branch 'origin/master' into feat/uikit-for-mac
mbektchiev Dec 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Thumbs.db
/.metadata/

# Build
/cmake-build*
cmake-build*/
!/**/TKLiveSync/**/cmake-build
/build.log
/dist/
/junit-result.xml
Expand Down
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ if(RULE_LAUNCH_COMPILE AND CMAKE_GENERATOR STREQUAL "Xcode")
set(CMAKE_XCODE_ATTRIBUTE_CXX "${CMAKE_BINARY_DIR}/launch-cxx")
set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_BINARY_DIR}/launch-c")
set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${CMAKE_BINARY_DIR}/launch-cxx")
endif()

set(CMAKE_XCODE_ATTRIBUTE_SDKROOT "iphoneos")
set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "iphoneos iphonesimulator")
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
set(CMAKE_XCODE_ATTRIBUTE_SDKROOT "iphoneos")
set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "iphoneos iphonesimulator")
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")

set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "8.0")
set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "8.0")
set(CMAKE_XCODE_ATTRIBUTE_SUPPORTS_UIKITFORMAC "YES")
set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "$(SRCROOT)/src/Entitlements.plist")
endif()

# TODO: Versions, license, etc

Expand Down
8 changes: 8 additions & 0 deletions Gameraww.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ git clone --recursive [email protected]:NativeScript/ios-runtime.git

## Requirements

- OS X 10.11+
- [Xcode 10+](https://developer.apple.com/xcode/)
- CMake 3.12 or later. Tested with versions up to 3.14.4 (https://github.com/Kitware/CMake/releases/download/v3.14.4/cmake-3.14.4-Darwin-x86_64.dmg) - after installing CMake.app add a symlink to cmake in `usr/local/bin` using the following command `ln -s /Applications/CMake.app/Contents/bin/cmake /usr/local/bin`
- [LLVM 8.0](http://releases.llvm.org/download.html#8.0.0) - used to build the [metadata generator](https://github.com/NativeScript/ios-metadata-generator) submodule. Be sure to have the folder containing `llvm-config` in `PATH` or make a symlink to in `/usr/local/bin/`.
- [Automake](https://www.gnu.org/software/automake/) - available in [Homebrew](http://brew.sh) as `automake`.
- [GNU Libtool](http://www.gnu.org/software/libtool/) - available in [Homebrew](http://brew.sh) as `libtool`.
- [Perl (installed on macOS by default but deprecated since macOS X 10.15)](https://www.perl.org/get.html#osx)
- Checkout all git submodules using `git submodule update --init`.
## Requirements
- OS X 10.15+
- [Xcode 11+](https://developer.apple.com/xcode/)
- [CMake 3.14.4](https://github.com/Kitware/CMake/releases/download/v3.14.4/cmake-3.14.4-Darwin-x86_64.dmg) or later. After installing CMake.app add a symlink to cmake in `usr/local/bin` using the following command `ln -s /Applications/CMake.app/Contents/bin/cmake /usr/local/bin`
- [LLVM 8.0](http://releases.llvm.org/download.html#8.0.0) - used to build the [metadata generator](https://github.com/NativeScript/ios-metadata-generator) submodule. Be sure to have the folder containing `llvm-config` in `PATH` or make a symlink to in `/usr/local/bin/`.
- [Automake](https://www.gnu.org/software/automake/) - available in [Homebrew](http://brew.sh) as `automake`.
- [GNU Libtool](http://www.gnu.org/software/libtool/) - available in [Homebrew](http://brew.sh) as `libtool`.
- [Perl (installed on macOS by default but deprecated since macOS X 10.15)](https://www.perl.org/get.html#osx)
- Checkout all git submodules using `git submodule update --init`.

## Architecture Diagram

Expand Down
50 changes: 42 additions & 8 deletions build/project-template/__PROJECT_NAME__.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 51;
objects = {

/* Begin PBXBuildFile section */
39940D9122C4EF600050DDE1 /* NativeScript.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 39940D8C22C4EAAA0050DDE1 /* NativeScript.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
39940E1C22C5DFFF0050DDE1 /* TKLiveSync.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 39940E1B22C5DFFF0050DDE1 /* TKLiveSync.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
858B842D18CA22B800AB12DE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 858B833A18CA111C00AB12DE /* InfoPlist.strings */; };
CD45EE7C18DC2D5800FB50C0 /* app in Resources */ = {isa = PBXBuildFile; fileRef = CD45EE7A18DC2D5800FB50C0 /* app */; };
CD62955D1BB2678900AE3A93 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CD62955C1BB2678900AE3A93 /* main.m */; };
Expand All @@ -19,6 +21,8 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
39940D9122C4EF600050DDE1 /* NativeScript.xcframework in Embed Frameworks */,
39940E1C22C5DFFF0050DDE1 /* TKLiveSync.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -36,6 +40,9 @@
42C751E4232B769100186695 /* nsld.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = nsld.sh; path = internal/nsld.sh; sourceTree = SOURCE_ROOT; };
42C751E5232B769100186695 /* nativescript-post-build */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "nativescript-post-build"; path = "internal/nativescript-post-build"; sourceTree = SOURCE_ROOT; };
42C751E6232B769100186695 /* nativescript-pre-build */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "nativescript-pre-build"; path = "internal/nativescript-pre-build"; sourceTree = SOURCE_ROOT; };
39940D8122C4E84C0050DDE1 /* __PROJECT_NAME__.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = __PROJECT_NAME__.entitlements; sourceTree = "<group>"; };
39940D8C22C4EAAA0050DDE1 /* NativeScript.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = NativeScript.xcframework; path = internal/NativeScript.xcframework; sourceTree = "<group>"; };
39940E1B22C5DFFF0050DDE1 /* TKLiveSync.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TKLiveSync.xcframework; path = internal/TKLiveSync.xcframework; sourceTree = "<group>"; };
858B832E18CA111C00AB12DE /* __PROJECT_NAME__.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = __PROJECT_NAME__.app; sourceTree = BUILT_PRODUCTS_DIR; };
858B833918CA111C00AB12DE /* __PROJECT_NAME__-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "__PROJECT_NAME__-Info.plist"; sourceTree = "<group>"; };
858B833B18CA111C00AB12DE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -72,6 +79,17 @@
name = "Build Scripts";
sourceTree = "<group>";
};
39940D8E22C4EBCC0050DDE1 /* Sources */ = {
isa = PBXGroup;
children = (
391174B321F1CBD300BA2583 /* TNSDebugging.h */,
391174B421F1CBD300BA2583 /* TNSExceptionHandler.h */,
CD62955C1BB2678900AE3A93 /* main.m */,
858B833F18CA111C00AB12DE /* __PROJECT_NAME__-Prefix.pch */,
);
name = Sources;
sourceTree = "<group>";
};
858B832518CA111C00AB12DE = {
isa = PBXGroup;
children = (
Expand All @@ -94,13 +112,17 @@
858B833018CA111C00AB12DE /* Frameworks */ = {
isa = PBXGroup;
children = (
39940E1B22C5DFFF0050DDE1 /* TKLiveSync.xcframework */,
39940D8C22C4EAAA0050DDE1 /* NativeScript.xcframework */,
);
name = Frameworks;
sourceTree = "<group>";
};
858B833718CA111C00AB12DE /* __PROJECT_NAME__ */ = {
isa = PBXGroup;
children = (
39940D8E22C4EBCC0050DDE1 /* Sources */,
39940D8122C4E84C0050DDE1 /* __PROJECT_NAME__.entitlements */,
CD45EE7A18DC2D5800FB50C0 /* app */,
858B833818CA111C00AB12DE /* Supporting Files */,
);
Expand All @@ -113,16 +135,12 @@
42C751E1232B767700186695 /* Build Scripts */,
391174B821F1D99900BA2583 /* plugins-debug.xcconfig */,
391174B721F1D99900BA2583 /* plugins-release.xcconfig */,
391174B321F1CBD300BA2583 /* TNSDebugging.h */,
391174B421F1CBD300BA2583 /* TNSExceptionHandler.h */,
CDF4743E1BA4855C0087EA85 /* build.xcconfig */,
CDD59A261BB43B5D00EC2671 /* build-debug.xcconfig */,
CDD59A271BB43B5D00EC2671 /* build-release.xcconfig */,
391174B521F1D7BF00BA2583 /* nativescript-build.xcconfig */,
858B833918CA111C00AB12DE /* __PROJECT_NAME__-Info.plist */,
858B833A18CA111C00AB12DE /* InfoPlist.strings */,
CD62955C1BB2678900AE3A93 /* main.m */,
858B833F18CA111C00AB12DE /* __PROJECT_NAME__-Prefix.pch */,
930F05DB22671AE300D269DC /* Swift-ObjC-Bridging-Header.h */,
);
name = "Supporting Files";
Expand Down Expand Up @@ -227,7 +245,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"$SRCROOT/internal/nativescript-post-build\"";
shellScript = "\"$SRCROOT/internal/nativescript-post-build\"\n";
showEnvVarsInLog = 0;
};
CD62955B1BB2651D00AE3A93 /* NativeScript PreLink */ = {
Expand Down Expand Up @@ -289,6 +307,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DERIVE_UIKITFORMAC_PRODUCT_BUNDLE_IDENTIFIER = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
Expand All @@ -303,6 +322,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
STRIP_SWIFT_SYMBOLS = NO;
SUPPORTS_UIKITFORMAC = YES;
SWIFT_OBJC_BRIDGING_HEADER = "$SRCROOT/internal/Swift-ObjC-Bridging-Header.h";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -328,6 +348,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
DERIVE_UIKITFORMAC_PRODUCT_BUNDLE_IDENTIFIER = YES;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -339,6 +360,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
SDKROOT = iphoneos;
STRIP_SWIFT_SYMBOLS = NO;
SUPPORTS_UIKITFORMAC = YES;
SWIFT_OBJC_BRIDGING_HEADER = "$SRCROOT/internal/Swift-ObjC-Bridging-Header.h";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -351,7 +373,9 @@
baseConfigurationReference = CDD59A261BB43B5D00EC2671 /* build-debug.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
CODE_SIGN_ENTITLEMENTS = __PROJECT_NAME__/__PROJECT_NAME__.entitlements;
ENABLE_BITCODE = NO;
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "__PROJECT_NAME__/__PROJECT_NAME__-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
Expand All @@ -364,8 +388,12 @@
"\"$(SRCROOT)/internal\"",
);
INFOPLIST_FILE = "$(SRCROOT)/__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_NAME = __PROJECT_NAME__;
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
};
name = Debug;
Expand All @@ -375,7 +403,9 @@
baseConfigurationReference = CDD59A271BB43B5D00EC2671 /* build-release.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
CODE_SIGN_ENTITLEMENTS = __PROJECT_NAME__/__PROJECT_NAME__.entitlements;
ENABLE_BITCODE = NO;
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "__PROJECT_NAME__/__PROJECT_NAME__-Prefix.pch";
HEADER_SEARCH_PATHS = (
Expand All @@ -384,8 +414,12 @@
"$(SRCROOT)/internal",
);
INFOPLIST_FILE = "$(SRCROOT)/__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_NAME = __PROJECT_NAME__;
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>
76 changes: 38 additions & 38 deletions build/project-template/internal/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,55 @@
#include <NativeScript/NativeScript.h>

#if DEBUG
#include "TKLiveSync/TKLiveSync.h"
#include "TNSDebugging.h"
#include "TKLiveSync/include/TKLiveSync.h"
#endif

int main(int argc, char *argv[]) {
@autoreleasepool {
TNSRuntime *runtime = [TNSRuntimeInstrumentation
profile:@"main"
withBlock:^{
__block NSString *applicationPath = [NSBundle mainBundle].bundlePath;
int main(int argc, char* argv[]) {
@autoreleasepool {
TNSRuntime* runtime = [TNSRuntimeInstrumentation
profile:@"main"
withBlock:^{
__block NSString* applicationPath = [NSString stringWithUTF8String:[NSBundle mainBundle].resourceURL.fileSystemRepresentation];

#if DEBUG
[TNSRuntimeInstrumentation
profile:@"Debug: Lifesync & Syslog"
withBlock:^{
TNSInitializeLiveSync();
if (getenv("TNSApplicationPath")) {
applicationPath = @(getenv("TNSApplicationPath"));
}
[TNSRuntimeInstrumentation
initWithApplicationPath:applicationPath];
[TNSRuntimeInspector setLogsToSystemConsole:YES];
return (id)nil;
}];
[TNSRuntimeInstrumentation
profile:@"Debug: Lifesync & Syslog"
withBlock:^{
TNSInitializeLiveSync();
if (getenv("TNSApplicationPath")) {
applicationPath = @(getenv("TNSApplicationPath"));
}
[TNSRuntimeInstrumentation
initWithApplicationPath:applicationPath];
[TNSRuntimeInspector setLogsToSystemConsole:YES];
return (id)nil;
}];
#endif

extern char startOfMetadataSection __asm(
"section$start$__DATA$__TNSMetadata");
[TNSRuntime initializeMetadata:&startOfMetadataSection];
TNSRuntime *runtime =
[[TNSRuntime alloc] initWithApplicationPath:applicationPath];
[runtime scheduleInRunLoop:[NSRunLoop currentRunLoop]
forMode:NSRunLoopCommonModes];
extern char startOfMetadataSection __asm(
"section$start$__DATA$__TNSMetadata");
[TNSRuntime initializeMetadata:&startOfMetadataSection];
TNSRuntime* runtime =
[[TNSRuntime alloc] initWithApplicationPath:applicationPath];
[runtime scheduleInRunLoop:[NSRunLoop currentRunLoop]
forMode:NSRunLoopCommonModes];

#if DEBUG
[TNSRuntimeInstrumentation
profile:@"Debug: Wait for JavaScript debugger"
withBlock:^{
TNSEnableRemoteInspector(argc, argv, runtime);
return (id)nil;
}];
[TNSRuntimeInstrumentation
profile:@"Debug: Wait for JavaScript debugger"
withBlock:^{
TNSEnableRemoteInspector(argc, argv, runtime);
return (id)nil;
}];
#endif

TNSInstallExceptionHandler();
return runtime;
}];
TNSInstallExceptionHandler();
return runtime;
}];

[runtime executeModule:@"./"];
[runtime executeModule:@"./"];

return 0;
}
return 0;
}
}
3 changes: 1 addition & 2 deletions build/project-template/internal/nativescript-build.xcconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// * NativeScript build related flags
// * Add [sdk=*] after each one to avoid conflict with CocoaPods flags
OTHER_LDFLAGS[sdk=*] = $(inherited) -ObjC -sectcreate __DATA __TNSMetadata "$(CONFIGURATION_BUILD_DIR)/metadata-$(CURRENT_ARCH).bin" -framework NativeScript -F"$(SRCROOT)/internal" -licucore -lz -lc++ -framework Foundation -framework UIKit -framework CoreGraphics -framework MobileCoreServices -framework Security
OTHER_LDFLAGS[config=Debug] = $(inherited) "$(SRCROOT)/internal/TKLiveSync/TKLiveSync"
OTHER_LDFLAGS[sdk=*] = $(inherited) -ObjC -sectcreate __DATA __TNSMetadata "$(CONFIGURATION_BUILD_DIR)/metadata-$(CURRENT_ARCH).bin" -framework NativeScript -framework TKLiveSync -F"$(SRCROOT)/internal" -licucore -lz -lc++ -framework Foundation -framework UIKit -framework CoreGraphics -framework MobileCoreServices -framework Security

// We need to add CONFIGURATION_BUILD_DIR here so that we can explicitly quote-escape any paths in it, because the implicitly added path by Xcode is not always escaped
FRAMEWORK_SEARCH_PATHS[sdk=*] = $(inherited) "$(SRCROOT)/internal/" "$(CONFIGURATION_BUILD_DIR)"
Expand Down
9 changes: 0 additions & 9 deletions build/project-template/internal/nativescript-post-build
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
#!/usr/bin/env bash
set -e

function add_embedded_framework() {
local FRAMEWORK_NAME=$(basename "$1")
rsync --archive "$1" "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}" \
--exclude "/$FRAMEWORK_NAME/Headers" \
--exclude "/$FRAMEWORK_NAME/Modules"
}

add_embedded_framework "${SRCROOT}/internal/NativeScript.framework"

pushd "$SRCROOT/internal"
./strip-dynamic-framework-architectures.sh
popd
Loading