diff --git a/samples/calculator/build.gradle b/samples/calculator/build.gradle index cf8f754d082..b4eaec3b6c1 100644 --- a/samples/calculator/build.gradle +++ b/samples/calculator/build.gradle @@ -18,7 +18,7 @@ dependencies { apply plugin: 'konan' -konan.targets = ['iphone'] +konan.targets = ['iphone', 'iphone_sim'] konanArtifacts { framework('KotlinArithmeticParser') diff --git a/samples/calculator/calculator.xcodeproj/project.pbxproj b/samples/calculator/calculator.xcodeproj/project.pbxproj index d175f4c5461..14f12bff64d 100644 --- a/samples/calculator/calculator.xcodeproj/project.pbxproj +++ b/samples/calculator/calculator.xcodeproj/project.pbxproj @@ -38,7 +38,7 @@ 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/iphone/KotlinArithmeticParser.framework; sourceTree = ""; }; + 2C3F385A1FD1760A00151601 /* KotlinArithmeticParser.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = KotlinArithmeticParser.framework; path = build/konan/bin/xcode/KotlinArithmeticParser.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -165,7 +165,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "$SRCROOT/../gradlew -p $SRCROOT compileKonanKotlinArithmeticParser"; + 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: $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\""; }; /* End PBXShellScriptBuildPhase section */ @@ -317,7 +317,7 @@ ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/build/konan/bin/iphone", + "$(PROJECT_DIR)/build/konan/bin/xcode", ); INFOPLIST_FILE = calculator/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.3; @@ -338,7 +338,7 @@ ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/build/konan/bin/iphone", + "$(PROJECT_DIR)/build/konan/bin/xcode", ); INFOPLIST_FILE = calculator/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.3; diff --git a/samples/uikit/build.gradle b/samples/uikit/build.gradle index 1b09dc55c2a..9e25a1085f2 100644 --- a/samples/uikit/build.gradle +++ b/samples/uikit/build.gradle @@ -1,6 +1,6 @@ apply plugin: 'konan' -konan.targets = ['iphone'] +konan.targets = ['iphone', 'iphone_sim'] konanArtifacts { program('app') diff --git a/samples/uikit/konan.xcodeproj/project.pbxproj b/samples/uikit/konan.xcodeproj/project.pbxproj index 740edd56718..802861c732d 100644 --- a/samples/uikit/konan.xcodeproj/project.pbxproj +++ b/samples/uikit/konan.xcodeproj/project.pbxproj @@ -169,7 +169,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cp \"$SRCROOT/build/konan/bin/iphone/app.kexe\" \"$TARGET_BUILD_DIR/$EXECUTABLE_PATH\""; + shellScript = "cp \"$SRCROOT/build/konan/bin/xcode/app.kexe\" \"$TARGET_BUILD_DIR/$EXECUTABLE_PATH\""; }; 2C901F991F59928A004412FA /* Build Binary From Kotlin Sources */ = { isa = PBXShellScriptBuildPhase; @@ -183,7 +183,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "$SRCROOT/../gradlew -p $SRCROOT compileKonanApp"; + 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\""; }; 2C901F9C1F5D7074004412FA /* Remove Original Binary */ = { isa = PBXShellScriptBuildPhase;