Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 28 additions & 85 deletions build/project-template/__PROJECT_NAME__.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
517DDD8F1B611B7A001C8A19 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 517DDD8E1B611B7A001C8A19 /* MobileCoreServices.framework */; };
858B83F318CA22B800AB12DE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 858B833D18CA111C00AB12DE /* main.m */; };
858B842918CA22B800AB12DE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 858B833118CA111C00AB12DE /* Foundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
858B842A18CA22B800AB12DE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 858B833518CA111C00AB12DE /* UIKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
858B842D18CA22B800AB12DE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 858B833A18CA111C00AB12DE /* InfoPlist.strings */; };
CD1343101AF8E03800D3B65B /* libNativeScript.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD13430F1AF8E03800D3B65B /* libNativeScript.a */; };
CD45EE7C18DC2D5800FB50C0 /* app in Resources */ = {isa = PBXBuildFile; fileRef = CD45EE7A18DC2D5800FB50C0 /* app */; };
F9161D911993C00300F9E5FD /* libc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F9161D901993C00300F9E5FD /* libc++.dylib */; };
F9161D931993C00B00F9E5FD /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F9161D921993C00B00F9E5FD /* libz.dylib */; };
F9161D951993C01600F9E5FD /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F9161D941993C01600F9E5FD /* libicucore.dylib */; };
F9B8C6A41ACEDEEB00547416 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9B8C6A21ACEDEEB00547416 /* LaunchScreen.xib */; };
CD62955D1BB2678900AE3A93 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CD62955C1BB2678900AE3A93 /* main.m */; settings = {ASSET_TAGS = (); }; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -34,21 +26,14 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
517DDD8E1B611B7A001C8A19 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
858B832E18CA111C00AB12DE /* __PROJECT_NAME__.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = __PROJECT_NAME__.app; sourceTree = BUILT_PRODUCTS_DIR; };
858B833118CA111C00AB12DE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
858B833518CA111C00AB12DE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
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>"; };
858B833D18CA111C00AB12DE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
858B833F18CA111C00AB12DE /* __PROJECT_NAME__-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "__PROJECT_NAME__-Prefix.pch"; sourceTree = "<group>"; };
858B843318CA22B800AB12DE /* __PROJECT_NAME__.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = __PROJECT_NAME__.app; sourceTree = BUILT_PRODUCTS_DIR; };
CD13430F1AF8E03800D3B65B /* libNativeScript.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libNativeScript.a; path = "../../dist/package 2/framework/NativeScript/lib/libNativeScript.a"; sourceTree = "<group>"; };
CD45EE7A18DC2D5800FB50C0 /* app */ = {isa = PBXFileReference; lastKnownFileType = folder; path = app; sourceTree = "<group>"; };
CD62955C1BB2678900AE3A93 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = internal/main.m; sourceTree = SOURCE_ROOT; };
CDF4743E1BA4855C0087EA85 /* build.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = build.xcconfig; sourceTree = "<group>"; };
F9161D901993C00300F9E5FD /* libc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.dylib"; path = "usr/lib/libc++.dylib"; sourceTree = SDKROOT; };
F9161D921993C00B00F9E5FD /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
F9161D941993C01600F9E5FD /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; };
F9B8C6A31ACEDEEB00547416 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -57,13 +42,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F9161D951993C01600F9E5FD /* libicucore.dylib in Frameworks */,
F9161D931993C00B00F9E5FD /* libz.dylib in Frameworks */,
F9161D911993C00300F9E5FD /* libc++.dylib in Frameworks */,
858B842918CA22B800AB12DE /* Foundation.framework in Frameworks */,
858B842A18CA22B800AB12DE /* UIKit.framework in Frameworks */,
517DDD8F1B611B7A001C8A19 /* MobileCoreServices.framework in Frameworks */,
CD1343101AF8E03800D3B65B /* libNativeScript.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -92,13 +70,6 @@
858B833018CA111C00AB12DE /* Frameworks */ = {
isa = PBXGroup;
children = (
517DDD8E1B611B7A001C8A19 /* MobileCoreServices.framework */,
CD13430F1AF8E03800D3B65B /* libNativeScript.a */,
F9161D941993C01600F9E5FD /* libicucore.dylib */,
F9161D921993C00B00F9E5FD /* libz.dylib */,
F9161D901993C00300F9E5FD /* libc++.dylib */,
858B833118CA111C00AB12DE /* Foundation.framework */,
858B833518CA111C00AB12DE /* UIKit.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand All @@ -119,7 +90,7 @@
CDF4743E1BA4855C0087EA85 /* build.xcconfig */,
858B833918CA111C00AB12DE /* __PROJECT_NAME__-Info.plist */,
858B833A18CA111C00AB12DE /* InfoPlist.strings */,
858B833D18CA111C00AB12DE /* main.m */,
CD62955C1BB2678900AE3A93 /* main.m */,
858B833F18CA111C00AB12DE /* __PROJECT_NAME__-Prefix.pch */,
);
name = "Supporting Files";
Expand All @@ -139,12 +110,13 @@
isa = PBXNativeTarget;
buildConfigurationList = 858B843018CA22B800AB12DE /* Build configuration list for PBXNativeTarget "__PROJECT_NAME__" */;
buildPhases = (
C97FD7AC1ADE5369004DB2A4 /* Generate Metadata */,
C97FD7AC1ADE5369004DB2A4 /* NativeScript PreBuild */,
858B83F218CA22B800AB12DE /* Sources */,
CD62955B1BB2651D00AE3A93 /* NativeScript PreLink */,
858B83F418CA22B800AB12DE /* Frameworks */,
858B842C18CA22B800AB12DE /* Resources */,
85F5BDFC1A9363BE006B9701 /* Embed Frameworks */,
CD3EAD351B05FF060042DBFC /* Strip Dynamic Framework Architectures */,
CD3EAD351B05FF060042DBFC /* NativeScript PostBuild */,
);
buildRules = (
);
Expand Down Expand Up @@ -195,34 +167,49 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
C97FD7AC1ADE5369004DB2A4 /* Generate Metadata */ = {
C97FD7AC1ADE5369004DB2A4 /* NativeScript PreBuild */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Generate Metadata";
name = "NativeScript PreBuild";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cd \"$SRCROOT/metadataGenerator/bin\"\n./metadata-generation-build-step";
shellScript = "\"$SRCROOT/internal/nativescript-pre-build\"";
showEnvVarsInLog = 0;
};
CD3EAD351B05FF060042DBFC /* Strip Dynamic Framework Architectures */ = {
CD3EAD351B05FF060042DBFC /* NativeScript PostBuild */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Strip Dynamic Framework Architectures";
name = "NativeScript PostBuild";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Remove this step when Xcode starts to do this automatically\n\nbash \"$SRCROOT/$PROJECT_NAME/strip-dynamic-framework-architectures.sh\"";
shellScript = "\"$SRCROOT/internal/nativescript-post-build\"";
showEnvVarsInLog = 0;
};
CD62955B1BB2651D00AE3A93 /* NativeScript PreLink */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "NativeScript PreLink";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"$SRCROOT/internal/nativescript-pre-link\"";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand All @@ -232,7 +219,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
858B83F318CA22B800AB12DE /* main.m in Sources */,
CD62955D1BB2678900AE3A93 /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -290,7 +277,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "-ObjC";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "armv7 arm64";
Expand Down Expand Up @@ -326,7 +312,6 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
OTHER_LDFLAGS = "-ObjC";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand All @@ -341,35 +326,14 @@
CLANG_ENABLE_MODULES = NO;
CLANG_MODULES_AUTOLINK = NO;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(PROJECT_DIR)\"",
"\"$(PROJECT_DIR)/../../lib/iOS\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "__PROJECT_NAME__/__PROJECT_NAME__-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"DEBUG=1",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode6.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(PROJECT_DIR)/NativeScript/include",
);
INFOPLIST_FILE = "$(SRCROOT)/__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/NativeScript/lib",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-sectcreate",
__DATA,
__TNSMetadata,
"$(CONFIGURATION_BUILD_DIR)/metadata-$(CURRENT_ARCH).bin",
);
PRODUCT_NAME = __PROJECT_NAME__;
VALID_ARCHS = "armv7 arm64";
WRAPPER_EXTENSION = app;
Expand All @@ -383,31 +347,10 @@
CLANG_ENABLE_MODULES = NO;
CLANG_MODULES_AUTOLINK = NO;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(PROJECT_DIR)\"",
"\"$(PROJECT_DIR)/../../lib/iOS\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "__PROJECT_NAME__/__PROJECT_NAME__-Prefix.pch";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode6.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(PROJECT_DIR)/NativeScript/include",
);
INFOPLIST_FILE = "$(SRCROOT)/__PROJECT_NAME__/__PROJECT_NAME__-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/NativeScript/lib",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-sectcreate",
__DATA,
__TNSMetadata,
"$(CONFIGURATION_BUILD_DIR)/metadata-$(CURRENT_ARCH).bin",
);
PRODUCT_NAME = __PROJECT_NAME__;
VALID_ARCHS = "armv7 arm64";
WRAPPER_EXTENSION = app;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

#import <Availability.h>

#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif

#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
Expand Down
11 changes: 2 additions & 9 deletions build/project-template/__PROJECT_NAME__/build.xcconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
#include "../internal/nativescript-build.xcconfig"

// * To list all installed iOS identities, run:
// * $ security find-identity | sed -n 's/.*\("[^"]*"\).*/\1/p' | grep 'iPhone'
// * Generic 'iPhone Developer' (no quotes) will match the right Identity
// * with the right Provisioning Profile plus Certificate, based on the app bundle id
CODE_SIGN_IDENTITY = iPhone Developer

// * Uncomment this setting to generate TypeScript declarations for the iOS SDK and all linked libraries.
// * They will be generated on each build, so you can find them after running "tns build ios" in "YOUR_APP/platforms/ios".
// TNS_TYPESCRIPT_DECLARATIONS_PATH = $SOURCE_ROOT/typescript-declarations

// * Uncomment this setting to generate human readable metadata for the iOS SDK and all linked libraries.
// * You can learn more about NativeScript metadata in the docs: http://docs.nativescript.org/runtimes/ios/Overview#metadata
// * It will be generated on each build, so you can find it after running "tns build ios" in "YOUR_APP/platforms/ios".
// TNS_DEBUG_METADATA_PATH = $SOURCE_ROOT/debug-metadata
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
//
// main.m
// __PROJECT_NAME__
//
// Any changes in this file will be removed after you update your platform!
//

#include <Foundation/Foundation.h>
#include <JavaScriptCore/JavaScriptCore.h>
#include <NativeScript.h>
#include "NativeScript.h"

#ifndef NDEBUG
#include "TNSDebugging.h"
Expand All @@ -20,9 +18,8 @@ int main(int argc, char *argv[]) {
NSString *applicationPath = [[NSBundle mainBundle] bundlePath];

#ifndef NDEBUG
NSString *libraryPath =
[NSSearchPathForDirectoriesInDomains(
NSLibraryDirectory, NSUserDomainMask, YES) firstObject];
NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(
NSLibraryDirectory, NSUserDomainMask, YES) firstObject];
NSString *liveSyncPath =
[NSString pathWithComponents:
@[ libraryPath, @"Application Support", @"LiveSync" ]];
Expand All @@ -36,6 +33,7 @@ int main(int argc, char *argv[]) {
applicationPath = liveSyncPath;
}
#endif

[TNSRuntime initializeMetadata:&startOfMetadataSection];
runtime = [[TNSRuntime alloc] initWithApplicationPath:applicationPath];
[runtime scheduleInRunLoop:[NSRunLoop currentRunLoop]
Expand Down
13 changes: 13 additions & 0 deletions build/project-template/internal/nativescript-build.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// * NativeScript build related flags
HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/internal/NativeScript/include
OTHER_LDFLAGS = $(inherited) -ObjC -sectcreate __DATA __TNSMetadata $(CONFIGURATION_BUILD_DIR)/metadata-$(CURRENT_ARCH).bin -lNativeScript -L$(SRCROOT)/internal/NativeScript/lib -licucore -lz -lc++ -framework Foundation -framework UIKit -framework CoreGraphics -framework MobileCoreServices
FRAMEWORK_SEARCH_PATHS = $(inherited) $(SRCROOT)/../../lib/iOS

// * Uncomment this setting to generate TypeScript declarations for the iOS SDK and all linked libraries.
// * They will be generated on each build, so you can find them after running "tns build ios" in "YOUR_APP/platforms/ios".
// TNS_TYPESCRIPT_DECLARATIONS_PATH = $SRCROOT/typescript-declarations

// * Uncomment this setting to generate human readable metadata for the iOS SDK and all linked libraries.
// * You can learn more about NativeScript metadata in the docs: http://docs.nativescript.org/runtimes/ios/Overview#metadata
// * It will be generated on each build, so you can find it after running "tns build ios" in "YOUR_APP/platforms/ios".
// TNS_DEBUG_METADATA_PATH = $SRCROOT/debug-metadata
5 changes: 5 additions & 0 deletions build/project-template/internal/nativescript-post-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

pushd "$SRCROOT/internal"
./strip-dynamic-framework-architectures.sh
popd
5 changes: 5 additions & 0 deletions build/project-template/internal/nativescript-pre-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

pushd "$SRCROOT/internal/metadata-generator/bin"
./metadata-generation-build-step
popd
1 change: 1 addition & 0 deletions build/project-template/internal/nativescript-pre-link
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#!/usr/bin/env bash
Loading