From 27ca482dabd7dc475389207389c539ccd7b0841b Mon Sep 17 00:00:00 2001 From: Vyacheslav Karpukhin Date: Wed, 14 Mar 2018 14:22:07 +0100 Subject: [PATCH] Better Xcode projects for calculator and uikit samples (#1404) --- .../calculator.xcodeproj/project.pbxproj | 189 ++++++++++++++++-- samples/uikit/konan.xcodeproj/project.pbxproj | 60 +++--- samples/uikit/konan/AppDelegate.h | 17 -- samples/uikit/konan/AppDelegate.m | 51 ----- samples/uikit/konan/ViewController.h | 20 -- samples/uikit/konan/ViewController.m | 31 --- samples/uikit/konan/main.m | 16 -- 7 files changed, 203 insertions(+), 181 deletions(-) delete mode 100644 samples/uikit/konan/AppDelegate.h delete mode 100644 samples/uikit/konan/AppDelegate.m delete mode 100644 samples/uikit/konan/ViewController.h delete mode 100644 samples/uikit/konan/ViewController.m delete mode 100644 samples/uikit/konan/main.m diff --git a/samples/calculator/calculator.xcodeproj/project.pbxproj b/samples/calculator/calculator.xcodeproj/project.pbxproj index fc44bcffd97..28408dc7288 100644 --- a/samples/calculator/calculator.xcodeproj/project.pbxproj +++ b/samples/calculator/calculator.xcodeproj/project.pbxproj @@ -12,18 +12,18 @@ 2C3F384A1FD1738300151601 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C3F38481FD1738300151601 /* Main.storyboard */; }; 2C3F384C1FD1738300151601 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C3F384B1FD1738300151601 /* Assets.xcassets */; }; 2C3F384F1FD1738300151601 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C3F384D1FD1738300151601 /* LaunchScreen.storyboard */; }; - 2C3F385B1FD1760A00151601 /* KotlinArithmeticParser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2C3F385A1FD1760A00151601 /* KotlinArithmeticParser.framework */; }; - 2C3F385C1FD1760A00151601 /* KotlinArithmeticParser.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 2C3F385A1FD1760A00151601 /* KotlinArithmeticParser.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 7FE128BF205854BA0064CE74 /* KotlinArithmeticParser.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7FF94AD92058464C00590D0D /* KotlinArithmeticParser.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 7FF94AE32058483900590D0D /* KotlinArithmeticParser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7FF94AD92058464C00590D0D /* KotlinArithmeticParser.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ - 2C3F385D1FD1760A00151601 /* Embed Frameworks */ = { + 7FE128BE2058549E0064CE74 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( - 2C3F385C1FD1760A00151601 /* KotlinArithmeticParser.framework in Embed Frameworks */, + 7FE128BF205854BA0064CE74 /* KotlinArithmeticParser.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -38,7 +38,8 @@ 2C3F384B1FD1738300151601 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 2C3F384E1FD1738300151601 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 2C3F38501FD1738300151601 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2C3F385A1FD1760A00151601 /* KotlinArithmeticParser.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = KotlinArithmeticParser.framework; path = build/konan/bin/xcode/KotlinArithmeticParser.framework; sourceTree = ""; }; + 7FF94AD92058464C00590D0D /* KotlinArithmeticParser.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = KotlinArithmeticParser.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7FF94AEA2058485300590D0D /* Parser.kt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Parser.kt; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -46,7 +47,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2C3F385B1FD1760A00151601 /* KotlinArithmeticParser.framework in Frameworks */, + 7FF94AE32058483900590D0D /* KotlinArithmeticParser.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -56,9 +57,10 @@ 2C3F38381FD1738300151601 = { isa = PBXGroup; children = ( - 2C3F385A1FD1760A00151601 /* KotlinArithmeticParser.framework */, 2C3F38431FD1738300151601 /* calculator */, + 7FF94ADA2058464C00590D0D /* KotlinArithmeticParser */, 2C3F38421FD1738300151601 /* Products */, + 7FF94AE22058483900590D0D /* Frameworks */, ); sourceTree = ""; }; @@ -66,6 +68,7 @@ isa = PBXGroup; children = ( 2C3F38411FD1738300151601 /* KotlinCalculator.app */, + 7FF94AD92058464C00590D0D /* KotlinArithmeticParser.framework */, ); name = Products; sourceTree = ""; @@ -83,6 +86,70 @@ path = calculator; sourceTree = ""; }; + 7FF94ADA2058464C00590D0D /* KotlinArithmeticParser */ = { + isa = PBXGroup; + children = ( + 7FF94AE42058485300590D0D /* src */, + ); + name = KotlinArithmeticParser; + sourceTree = ""; + }; + 7FF94AE22058483900590D0D /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + 7FF94AE42058485300590D0D /* src */ = { + isa = PBXGroup; + children = ( + 7FF94AE52058485300590D0D /* main */, + ); + name = src; + path = parser/src; + sourceTree = SOURCE_ROOT; + }; + 7FF94AE52058485300590D0D /* main */ = { + isa = PBXGroup; + children = ( + 7FF94AE62058485300590D0D /* kotlin */, + ); + path = main; + sourceTree = ""; + }; + 7FF94AE62058485300590D0D /* kotlin */ = { + isa = PBXGroup; + children = ( + 7FF94AE72058485300590D0D /* org */, + ); + path = kotlin; + sourceTree = ""; + }; + 7FF94AE72058485300590D0D /* org */ = { + isa = PBXGroup; + children = ( + 7FF94AE82058485300590D0D /* konan */, + ); + path = org; + sourceTree = ""; + }; + 7FF94AE82058485300590D0D /* konan */ = { + isa = PBXGroup; + children = ( + 7FF94AE92058485300590D0D /* arithmeticparser */, + ); + path = konan; + sourceTree = ""; + }; + 7FF94AE92058485300590D0D /* arithmeticparser */ = { + isa = PBXGroup; + children = ( + 7FF94AEA2058485300590D0D /* Parser.kt */, + ); + path = arithmeticparser; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -90,11 +157,10 @@ isa = PBXNativeTarget; buildConfigurationList = 2C3F38531FD1738300151601 /* Build configuration list for PBXNativeTarget "KotlinCalculator" */; buildPhases = ( - 2C3F38561FD1754800151601 /* Compile Kotlin Framework */, 2C3F383D1FD1738300151601 /* Sources */, 2C3F383E1FD1738300151601 /* Frameworks */, 2C3F383F1FD1738300151601 /* Resources */, - 2C3F385D1FD1760A00151601 /* Embed Frameworks */, + 7FE128BE2058549E0064CE74 /* Embed Frameworks */, ); buildRules = ( ); @@ -105,6 +171,21 @@ productReference = 2C3F38411FD1738300151601 /* KotlinCalculator.app */; productType = "com.apple.product-type.application"; }; + 7FF94AD82058464C00590D0D /* KotlinArithmeticParser */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7FF94ADE2058464C00590D0D /* Build configuration list for PBXNativeTarget "KotlinArithmeticParser" */; + buildPhases = ( + 7FF94AE12058466D00590D0D /* Compile Kotlin/Native */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = KotlinArithmeticParser; + productName = KotlinArithmeticParser; + productReference = 7FF94AD92058464C00590D0D /* KotlinArithmeticParser.framework */; + productType = "com.apple.product-type.framework"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -119,6 +200,10 @@ CreatedOnToolsVersion = 9.0; ProvisioningStyle = Automatic; }; + 7FF94AD82058464C00590D0D = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + }; }; }; buildConfigurationList = 2C3F383C1FD1738300151601 /* Build configuration list for PBXProject "calculator" */; @@ -135,6 +220,7 @@ projectRoot = ""; targets = ( 2C3F38401FD1738300151601 /* KotlinCalculator */, + 7FF94AD82058464C00590D0D /* KotlinArithmeticParser */, ); }; /* End PBXProject section */ @@ -153,19 +239,19 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2C3F38561FD1754800151601 /* Compile Kotlin Framework */ = { + 7FF94AE12058466D00590D0D /* Compile Kotlin/Native */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Compile Kotlin Framework"; + name = "Compile Kotlin/Native"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\n iphoneos)\n TARGET=iphone\n TASK=compileKonanKotlinArithmeticParserIphone\n ;;\n iphonesimulator)\n TARGET=iphone_sim\n TASK=compileKonanKotlinArithmeticParserIphone_sim\n ;;\n *)\n echo \"Unknown platform: $PLATFORM_NAME\"\n exit 1\n ;;\nesac\n\nmkdir -p \"$SRCROOT/build/konan/bin/\"\nrm -f \"$SRCROOT/build/konan/bin/xcode\"\nln -s \"$TARGET\" \"$SRCROOT/build/konan/bin/xcode\"\n\nif [ \"$CONFIGURATION\" == \"Debug\" ]; then\n ENABLE_DEBUG=true\nelse\n ENABLE_DEBUG=false\nfi\n\n\"$SRCROOT/../gradlew\" -p \"$SRCROOT\" \"$TASK\" -PenableDebug=$ENABLE_DEBUG"; + shellScript = "\"$SRCROOT/../gradlew\" -p \"$SRCROOT\" \"$KONAN_TASK\" -Pkonan.useEnvironmentVariables=true"; }; /* End PBXShellScriptBuildPhase section */ @@ -315,10 +401,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/build/konan/bin/xcode", - ); + FRAMEWORK_SEARCH_PATHS = $BUILT_PRODUCTS_DIR; INFOPLIST_FILE = calculator/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -337,10 +420,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/build/konan/bin/xcode", - ); + FRAMEWORK_SEARCH_PATHS = $BUILT_PRODUCTS_DIR; INFOPLIST_FILE = calculator/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -352,6 +432,66 @@ }; name = Release; }; + 7FF94ADF2058464C00590D0D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + KONAN_ENABLE_OPTIMIZATIONS = NO; + KONAN_TASK = ""; + "KONAN_TASK[sdk=iphoneos*]" = compileKonanKotlinArithmeticParserIos_arm64; + "KONAN_TASK[sdk=iphonesimulator*]" = compileKonanKotlinArithmeticParserIos_x64; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = JetBrains.KotlinArithmeticParser; + PRODUCT_MODULE_NAME = "_$(PRODUCT_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = arm64; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 7FF94AE02058464C00590D0D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + KONAN_ENABLE_OPTIMIZATIONS = YES; + KONAN_TASK = ""; + "KONAN_TASK[sdk=iphoneos*]" = compileKonanKotlinArithmeticParserIos_arm64; + "KONAN_TASK[sdk=iphonesimulator*]" = compileKonanKotlinArithmeticParserIos_x64; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = JetBrains.KotlinArithmeticParser; + PRODUCT_MODULE_NAME = "_$(PRODUCT_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = arm64; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -373,6 +513,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 7FF94ADE2058464C00590D0D /* Build configuration list for PBXNativeTarget "KotlinArithmeticParser" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7FF94ADF2058464C00590D0D /* Debug */, + 7FF94AE02058464C00590D0D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 2C3F38391FD1738300151601 /* Project object */; diff --git a/samples/uikit/konan.xcodeproj/project.pbxproj b/samples/uikit/konan.xcodeproj/project.pbxproj index 802861c732d..8eb99c0e0dd 100644 --- a/samples/uikit/konan.xcodeproj/project.pbxproj +++ b/samples/uikit/konan.xcodeproj/project.pbxproj @@ -7,9 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 2CB5403E1F56C2C4006EE521 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CB5403D1F56C2C4006EE521 /* main.m */; }; - 2CB540411F56C2C4006EE521 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CB540401F56C2C4006EE521 /* AppDelegate.m */; }; - 2CB540441F56C2C4006EE521 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CB540431F56C2C4006EE521 /* ViewController.m */; }; 2CB540471F56C2C4006EE521 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2CB540451F56C2C4006EE521 /* Main.storyboard */; }; 2CB540491F56C2C4006EE521 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CB540481F56C2C4006EE521 /* Assets.xcassets */; }; 2CB5404C1F56C2C4006EE521 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2CB5404A1F56C2C4006EE521 /* LaunchScreen.storyboard */; }; @@ -17,15 +14,11 @@ /* Begin PBXFileReference section */ 2CB540391F56C2C4006EE521 /* konan.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = konan.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 2CB5403D1F56C2C4006EE521 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 2CB5403F1F56C2C4006EE521 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 2CB540401F56C2C4006EE521 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 2CB540421F56C2C4006EE521 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 2CB540431F56C2C4006EE521 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 2CB540461F56C2C4006EE521 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 2CB540481F56C2C4006EE521 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 2CB5404B1F56C2C4006EE521 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 2CB5404D1F56C2C4006EE521 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7FE128BC205852380064CE74 /* main.kt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.kt; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -59,27 +52,15 @@ 2CB5403B1F56C2C4006EE521 /* konan */ = { isa = PBXGroup; children = ( - 2CB5403F1F56C2C4006EE521 /* AppDelegate.h */, - 2CB540401F56C2C4006EE521 /* AppDelegate.m */, - 2CB540421F56C2C4006EE521 /* ViewController.h */, - 2CB540431F56C2C4006EE521 /* ViewController.m */, 2CB540451F56C2C4006EE521 /* Main.storyboard */, 2CB540481F56C2C4006EE521 /* Assets.xcassets */, 2CB5404A1F56C2C4006EE521 /* LaunchScreen.storyboard */, 2CB5404D1F56C2C4006EE521 /* Info.plist */, - 2CB5403C1F56C2C4006EE521 /* Supporting Files */, + 7FE128B9205852380064CE74 /* src */, ); path = konan; sourceTree = ""; }; - 2CB5403C1F56C2C4006EE521 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 2CB5403D1F56C2C4006EE521 /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; 2CB540531F56CC4D006EE521 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -87,6 +68,30 @@ name = Frameworks; sourceTree = ""; }; + 7FE128B9205852380064CE74 /* src */ = { + isa = PBXGroup; + children = ( + 7FE128BA205852380064CE74 /* main */, + ); + path = src; + sourceTree = SOURCE_ROOT; + }; + 7FE128BA205852380064CE74 /* main */ = { + isa = PBXGroup; + children = ( + 7FE128BB205852380064CE74 /* kotlin */, + ); + path = main; + sourceTree = ""; + }; + 7FE128BB205852380064CE74 /* kotlin */ = { + isa = PBXGroup; + children = ( + 7FE128BC205852380064CE74 /* main.kt */, + ); + path = kotlin; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -169,7 +174,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cp \"$SRCROOT/build/konan/bin/xcode/app.kexe\" \"$TARGET_BUILD_DIR/$EXECUTABLE_PATH\""; + shellScript = "cp \"$TARGET_BUILD_DIR/app.kexe\" \"$TARGET_BUILD_DIR/$EXECUTABLE_PATH\""; }; 2C901F991F59928A004412FA /* Build Binary From Kotlin Sources */ = { isa = PBXShellScriptBuildPhase; @@ -183,7 +188,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\n iphoneos)\n TARGET=iphone\n TASK=compileKonanAppIphone\n ;;\n iphonesimulator)\n TARGET=iphone_sim\n TASK=compileKonanAppIphone_sim\n ;;\n *)\n echo \"Unknown platform: $PLATFORN_NAME\"\n exit 1\n ;;\nesac\n\nmkdir -p \"$SRCROOT/build/konan/bin/\"\nrm -f \"$SRCROOT/build/konan/bin/xcode\"\nln -s \"$TARGET\" \"$SRCROOT/build/konan/bin/xcode\"\n\n\"$SRCROOT/../gradlew\" -p \"$SRCROOT\" \"$TASK\""; + shellScript = "\"$SRCROOT/../gradlew\" -p \"$SRCROOT\" \"$KONAN_TASK\" -Pkonan.useEnvironmentVariables=true"; }; 2C901F9C1F5D7074004412FA /* Remove Original Binary */ = { isa = PBXShellScriptBuildPhase; @@ -206,9 +211,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2CB540441F56C2C4006EE521 /* ViewController.m in Sources */, - 2CB540411F56C2C4006EE521 /* AppDelegate.m in Sources */, - 2CB5403E1F56C2C4006EE521 /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -331,6 +333,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = konan/Info.plist; + KONAN_ENABLE_OPTIMIZATIONS = NO; + "KONAN_TASK[sdk=iphoneos*]" = compileKonanappIos_arm64; + "KONAN_TASK[sdk=iphonesimulator*]" = compileKonanappIos_x64; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.jetbrains.konan; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -342,6 +347,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = konan/Info.plist; + KONAN_ENABLE_OPTIMIZATIONS = YES; + "KONAN_TASK[sdk=iphoneos*]" = compileKonanappIos_arm64; + "KONAN_TASK[sdk=iphonesimulator*]" = compileKonanappIos_x64; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.jetbrains.konan; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/samples/uikit/konan/AppDelegate.h b/samples/uikit/konan/AppDelegate.h deleted file mode 100644 index 9534c7528b4..00000000000 --- a/samples/uikit/konan/AppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// AppDelegate.h -// konan -// -// Created by jetbrains on 30/08/2017. -// Copyright © 2017 JetBrains. All rights reserved. -// - -#import - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - - -@end - diff --git a/samples/uikit/konan/AppDelegate.m b/samples/uikit/konan/AppDelegate.m deleted file mode 100644 index 90adf3e3460..00000000000 --- a/samples/uikit/konan/AppDelegate.m +++ /dev/null @@ -1,51 +0,0 @@ -// -// AppDelegate.m -// konan -// -// Created by jetbrains on 30/08/2017. -// Copyright © 2017 JetBrains. All rights reserved. -// - -#import "AppDelegate.h" - -@interface AppDelegate () - -@end - -@implementation AppDelegate - - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - // Override point for customization after application launch. - return YES; -} - - -- (void)applicationWillResignActive:(UIApplication *)application { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. -} - - -- (void)applicationDidEnterBackground:(UIApplication *)application { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. -} - - -- (void)applicationWillEnterForeground:(UIApplication *)application { - // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. -} - - -- (void)applicationDidBecomeActive:(UIApplication *)application { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. -} - - -- (void)applicationWillTerminate:(UIApplication *)application { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. -} - - -@end diff --git a/samples/uikit/konan/ViewController.h b/samples/uikit/konan/ViewController.h deleted file mode 100644 index 4f0e813414a..00000000000 --- a/samples/uikit/konan/ViewController.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// ViewController.h -// konan -// -// Created by jetbrains on 30/08/2017. -// Copyright © 2017 JetBrains. All rights reserved. -// - -#import - -@interface ViewController : UIViewController - -@property (weak, nonatomic) IBOutlet UILabel *label; -@property (weak, nonatomic) IBOutlet UITextField *textField; -@property (weak, nonatomic) IBOutlet UIButton *button; - -- (IBAction)buttonPressed; - -@end - diff --git a/samples/uikit/konan/ViewController.m b/samples/uikit/konan/ViewController.m deleted file mode 100644 index bf8423c4860..00000000000 --- a/samples/uikit/konan/ViewController.m +++ /dev/null @@ -1,31 +0,0 @@ -// -// ViewController.m -// konan -// -// Created by jetbrains on 30/08/2017. -// Copyright © 2017 JetBrains. All rights reserved. -// - -#import "ViewController.h" - -@interface ViewController () - -@end - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. -} - - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - - -- (IBAction)buttonPressed { -} -@end diff --git a/samples/uikit/konan/main.m b/samples/uikit/konan/main.m deleted file mode 100644 index 01392dae7c0..00000000000 --- a/samples/uikit/konan/main.m +++ /dev/null @@ -1,16 +0,0 @@ -// -// main.m -// konan -// -// Created by jetbrains on 30/08/2017. -// Copyright © 2017 JetBrains. All rights reserved. -// - -#import -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -}