diff --git a/examples/chat/gradle.properties b/examples/chat/gradle.properties index 8390fbc487..c2334c435e 100644 --- a/examples/chat/gradle.properties +++ b/examples/chat/gradle.properties @@ -1,6 +1,5 @@ kotlin.code.style=official xcodeproj=./iosApp -kotlin.native.cocoapods.generate.wrapper=true android.useAndroidX=true org.gradle.jvmargs=-Xmx3g org.jetbrains.compose.experimental.jscanvas.enabled=true @@ -12,4 +11,4 @@ kotlin.mpp.androidSourceSetLayoutVersion=2 kotlin.native.binary.memoryModel=experimental kotlin.version=1.9.0 agp.version=7.1.3 -compose.version=1.5.0-beta02 +compose.version=1.5.0-rc01 diff --git a/examples/chat/iosApp/Podfile b/examples/chat/iosApp/Podfile deleted file mode 100644 index aff9c517b2..0000000000 --- a/examples/chat/iosApp/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'iosApp' do - use_frameworks! - platform :ios, '14.1' - pod 'shared', :path => '../shared' -end \ No newline at end of file diff --git a/examples/chat/iosApp/iosApp.xcodeproj/project.pbxproj b/examples/chat/iosApp/iosApp.xcodeproj/project.pbxproj index 86a284586f..f764beb0c3 100644 --- a/examples/chat/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/examples/chat/iosApp/iosApp.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ @@ -13,7 +13,6 @@ 1848823F43E447F9A8B4AC7C /* YetAnotherSwiftUIScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18488451271FAAD8FA34A2FB /* YetAnotherSwiftUIScreen.swift */; }; 184882D8AF2A7A3642004010 /* ComposeInsideSwiftUIScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18488CAB0978B80826E5BBB4 /* ComposeInsideSwiftUIScreen.swift */; }; 2152FB042600AC8F00CF470E /* iosApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iosApp.swift */; }; - C1FC908188C4E8695729CB06 /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DE96E47030356CE6AD9794A /* Pods_iosApp.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -22,12 +21,9 @@ 1848892FA748717E4087E7D7 /* GradientTemplate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientTemplate.swift; sourceTree = ""; }; 18488CAB0978B80826E5BBB4 /* ComposeInsideSwiftUIScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComposeInsideSwiftUIScreen.swift; sourceTree = ""; }; 18488D89B8500CD7696A04EB /* KotlinToSwiftHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KotlinToSwiftHelper.swift; sourceTree = ""; }; - 1EB65E27D2C0F884D0A1A133 /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; }; 2152FB032600AC8F00CF470E /* iosApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosApp.swift; sourceTree = ""; }; - 3D7A606AB0AD7636269BD9D0 /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; }; 7555FF7B242A565900829871 /* Chat.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Chat.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8DE96E47030356CE6AD9794A /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; AB3632DC29227652001CCB65 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = ""; }; /* End PBXFileReference section */ @@ -36,7 +32,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C1FC908188C4E8695729CB06 /* Pods_iosApp.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -49,8 +44,6 @@ AB1DB47929225F7C00F7AF9C /* Configuration */, 7555FF7D242A565900829871 /* iosApp */, 7555FF7C242A565900829871 /* Products */, - E1DAFBE8E1CFC0878361EF0E /* Pods */, - B62309C7396AD7BF607A63B2 /* Frameworks */, ); sourceTree = ""; }; @@ -84,23 +77,6 @@ path = Configuration; sourceTree = ""; }; - B62309C7396AD7BF607A63B2 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 8DE96E47030356CE6AD9794A /* Pods_iosApp.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - E1DAFBE8E1CFC0878361EF0E /* Pods */ = { - isa = PBXGroup; - children = ( - 1EB65E27D2C0F884D0A1A133 /* Pods-iosApp.debug.xcconfig */, - 3D7A606AB0AD7636269BD9D0 /* Pods-iosApp.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -108,11 +84,10 @@ isa = PBXNativeTarget; buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */; buildPhases = ( - E8D673591E7196AEA2EA10E2 /* [CP] Check Pods Manifest.lock */, + 05EA384A2A8A60F800FD98BE /* Compile Kotlin */, 7555FF77242A565900829871 /* Sources */, 7555FF79242A565900829871 /* Resources */, 9964867F0862B4D9FB6ABFC7 /* Frameworks */, - BF14C3248E150D55CBFB145F /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -167,24 +142,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - BF14C3248E150D55CBFB145F /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - E8D673591E7196AEA2EA10E2 /* [CP] Check Pods Manifest.lock */ = { + 05EA384A2A8A60F800FD98BE /* Compile Kotlin */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -192,19 +150,15 @@ inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "Compile Kotlin"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "cd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -345,7 +299,6 @@ }; 7555FFA6242A565B00829871 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1EB65E27D2C0F884D0A1A133 /* Pods-iosApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -353,12 +306,18 @@ DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -369,7 +328,6 @@ }; 7555FFA7242A565B00829871 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3D7A606AB0AD7636269BD9D0 /* Pods-iosApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -377,12 +335,18 @@ DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/examples/chat/shared/build.gradle.kts b/examples/chat/shared/build.gradle.kts index f1bab781b9..c2298f7b60 100644 --- a/examples/chat/shared/build.gradle.kts +++ b/examples/chat/shared/build.gradle.kts @@ -2,7 +2,6 @@ plugins { kotlin("multiplatform") - kotlin("native.cocoapods") id("com.android.library") id("org.jetbrains.compose") } @@ -14,8 +13,18 @@ kotlin { jvm("desktop") - ios() - iosSimulatorArm64() + listOf( + iosX64(), + iosArm64(), + iosSimulatorArm64() + ).forEach { iosTarget -> + iosTarget.binaries { + framework { + baseName = "shared" + isStatic = true + } + } + } js(IR) { browser() @@ -36,17 +45,6 @@ kotlin { } } - cocoapods { - summary = "Shared code for the sample" - homepage = "https://github.com/JetBrains/compose-jb" - ios.deploymentTarget = "14.1" - podfile = project.file("../iosApp/Podfile") - framework { - baseName = "shared" - isStatic = true - } - } - sourceSets { val commonMain by getting { dependencies { @@ -64,7 +62,15 @@ kotlin { api("androidx.core:core-ktx:1.9.0") } } - val iosMain by getting + val iosMain by creating { + dependsOn(commonMain) + } + val iosX64Main by getting { + dependsOn(iosMain) + } + val iosArm64Main by getting { + dependsOn(iosMain) + } val iosSimulatorArm64Main by getting { dependsOn(iosMain) } diff --git a/examples/codeviewer/gradle.properties b/examples/codeviewer/gradle.properties index 8390fbc487..c2334c435e 100644 --- a/examples/codeviewer/gradle.properties +++ b/examples/codeviewer/gradle.properties @@ -1,6 +1,5 @@ kotlin.code.style=official xcodeproj=./iosApp -kotlin.native.cocoapods.generate.wrapper=true android.useAndroidX=true org.gradle.jvmargs=-Xmx3g org.jetbrains.compose.experimental.jscanvas.enabled=true @@ -12,4 +11,4 @@ kotlin.mpp.androidSourceSetLayoutVersion=2 kotlin.native.binary.memoryModel=experimental kotlin.version=1.9.0 agp.version=7.1.3 -compose.version=1.5.0-beta02 +compose.version=1.5.0-rc01 diff --git a/examples/codeviewer/iosApp/Podfile b/examples/codeviewer/iosApp/Podfile deleted file mode 100644 index aff9c517b2..0000000000 --- a/examples/codeviewer/iosApp/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'iosApp' do - use_frameworks! - platform :ios, '14.1' - pod 'shared', :path => '../shared' -end \ No newline at end of file diff --git a/examples/codeviewer/iosApp/iosApp.xcodeproj/project.pbxproj b/examples/codeviewer/iosApp/iosApp.xcodeproj/project.pbxproj index 0e871f738e..59abea4a27 100644 --- a/examples/codeviewer/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/examples/codeviewer/iosApp/iosApp.xcodeproj/project.pbxproj @@ -11,20 +11,16 @@ 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; }; 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; }; 7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; }; - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = ""; }; - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; }; - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7555FF7B242A565900829871 /* Codeviewer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Codeviewer.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; AB3632DC29227652001CCB65 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = ""; }; - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -32,7 +28,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -47,29 +42,19 @@ path = "Preview Content"; sourceTree = ""; }; - 42799AB246E5F90AF97AA0EF /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 7555FF72242A565900829871 = { isa = PBXGroup; children = ( AB1DB47929225F7C00F7AF9C /* Configuration */, 7555FF7D242A565900829871 /* iosApp */, 7555FF7C242A565900829871 /* Products */, - FEFF387C0A8D172AA4D59CAE /* Pods */, - 42799AB246E5F90AF97AA0EF /* Frameworks */, ); sourceTree = ""; }; 7555FF7C242A565900829871 /* Products */ = { isa = PBXGroup; children = ( - 7555FF7B242A565900829871 /* iosApp.app */, + 7555FF7B242A565900829871 /* Codeviewer.app */, ); name = Products; sourceTree = ""; @@ -94,15 +79,6 @@ path = Configuration; sourceTree = ""; }; - FEFF387C0A8D172AA4D59CAE /* Pods */ = { - isa = PBXGroup; - children = ( - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */, - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -110,11 +86,10 @@ isa = PBXNativeTarget; buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */; buildPhases = ( - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */, + 05E104072A8AA90A00D11C3D /* Compile Kotlin */, 7555FF77242A565900829871 /* Sources */, 7555FF79242A565900829871 /* Resources */, F85CB1118929364A9C6EFABC /* Frameworks */, - 971F29506F07FFBDBFAC9671 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -122,7 +97,7 @@ ); name = iosApp; productName = iosApp; - productReference = 7555FF7B242A565900829871 /* iosApp.app */; + productReference = 7555FF7B242A565900829871 /* Codeviewer.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -171,24 +146,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 971F29506F07FFBDBFAC9671 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */ = { + 05E104072A8AA90A00D11C3D /* Compile Kotlin */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -196,19 +154,15 @@ inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "Compile Kotlin"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "cd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -345,7 +299,6 @@ }; 7555FFA6242A565B00829871 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -353,12 +306,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -369,7 +328,6 @@ }; 7555FFA7242A565B00829871 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -377,12 +335,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/examples/codeviewer/shared/build.gradle.kts b/examples/codeviewer/shared/build.gradle.kts index 526c6f61b2..6ba9730db2 100644 --- a/examples/codeviewer/shared/build.gradle.kts +++ b/examples/codeviewer/shared/build.gradle.kts @@ -2,7 +2,6 @@ plugins { kotlin("multiplatform") - kotlin("native.cocoapods") id("com.android.library") id("org.jetbrains.compose") } @@ -14,15 +13,12 @@ kotlin { jvm("desktop") - ios() - iosSimulatorArm64() - - cocoapods { - summary = "Shared code for the sample" - homepage = "https://github.com/JetBrains/compose-jb" - ios.deploymentTarget = "14.1" - podfile = project.file("../iosApp/Podfile") - framework { + listOf( + iosX64(), + iosArm64(), + iosSimulatorArm64() + ).forEach { iosTarget -> + iosTarget.binaries.framework { baseName = "shared" isStatic = true } @@ -47,7 +43,15 @@ kotlin { api("androidx.core:core-ktx:1.9.0") } } - val iosMain by getting + val iosMain by creating { + dependsOn(commonMain) + } + val iosX64Main by getting { + dependsOn(iosMain) + } + val iosArm64Main by getting { + dependsOn(iosMain) + } val iosSimulatorArm64Main by getting { dependsOn(iosMain) } diff --git a/examples/falling-balls/gradle.properties b/examples/falling-balls/gradle.properties index 8390fbc487..c2334c435e 100644 --- a/examples/falling-balls/gradle.properties +++ b/examples/falling-balls/gradle.properties @@ -1,6 +1,5 @@ kotlin.code.style=official xcodeproj=./iosApp -kotlin.native.cocoapods.generate.wrapper=true android.useAndroidX=true org.gradle.jvmargs=-Xmx3g org.jetbrains.compose.experimental.jscanvas.enabled=true @@ -12,4 +11,4 @@ kotlin.mpp.androidSourceSetLayoutVersion=2 kotlin.native.binary.memoryModel=experimental kotlin.version=1.9.0 agp.version=7.1.3 -compose.version=1.5.0-beta02 +compose.version=1.5.0-rc01 diff --git a/examples/falling-balls/iosApp/Podfile b/examples/falling-balls/iosApp/Podfile deleted file mode 100644 index aff9c517b2..0000000000 --- a/examples/falling-balls/iosApp/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'iosApp' do - use_frameworks! - platform :ios, '14.1' - pod 'shared', :path => '../shared' -end \ No newline at end of file diff --git a/examples/falling-balls/iosApp/iosApp.xcodeproj/project.pbxproj b/examples/falling-balls/iosApp/iosApp.xcodeproj/project.pbxproj index 837a295061..bf37d47794 100644 --- a/examples/falling-balls/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/examples/falling-balls/iosApp/iosApp.xcodeproj/project.pbxproj @@ -11,20 +11,16 @@ 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; }; 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; }; 7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; }; - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = ""; }; - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; }; - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7555FF7B242A565900829871 /* FallingBalls.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FallingBalls.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; AB3632DC29227652001CCB65 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = ""; }; - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -32,7 +28,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -47,29 +42,19 @@ path = "Preview Content"; sourceTree = ""; }; - 42799AB246E5F90AF97AA0EF /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 7555FF72242A565900829871 = { isa = PBXGroup; children = ( AB1DB47929225F7C00F7AF9C /* Configuration */, 7555FF7D242A565900829871 /* iosApp */, 7555FF7C242A565900829871 /* Products */, - FEFF387C0A8D172AA4D59CAE /* Pods */, - 42799AB246E5F90AF97AA0EF /* Frameworks */, ); sourceTree = ""; }; 7555FF7C242A565900829871 /* Products */ = { isa = PBXGroup; children = ( - 7555FF7B242A565900829871 /* iosApp.app */, + 7555FF7B242A565900829871 /* FallingBalls.app */, ); name = Products; sourceTree = ""; @@ -94,15 +79,6 @@ path = Configuration; sourceTree = ""; }; - FEFF387C0A8D172AA4D59CAE /* Pods */ = { - isa = PBXGroup; - children = ( - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */, - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -110,7 +86,7 @@ isa = PBXNativeTarget; buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */; buildPhases = ( - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */, + 05E104082A8AADF800D11C3D /* Compile Kotlin */, 7555FF77242A565900829871 /* Sources */, 7555FF79242A565900829871 /* Resources */, F85CB1118929364A9C6EFABC /* Frameworks */, @@ -121,7 +97,7 @@ ); name = iosApp; productName = iosApp; - productReference = 7555FF7B242A565900829871 /* iosApp.app */; + productReference = 7555FF7B242A565900829871 /* FallingBalls.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -170,7 +146,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */ = { + 05E104082A8AADF800D11C3D /* Compile Kotlin */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -178,19 +154,15 @@ inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "Compile Kotlin"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "cd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -327,7 +299,6 @@ }; 7555FFA6242A565B00829871 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -335,12 +306,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -351,7 +328,6 @@ }; 7555FFA7242A565B00829871 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -359,12 +335,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/examples/falling-balls/shared/build.gradle.kts b/examples/falling-balls/shared/build.gradle.kts index 8716294172..0a3b1a45c3 100644 --- a/examples/falling-balls/shared/build.gradle.kts +++ b/examples/falling-balls/shared/build.gradle.kts @@ -2,7 +2,6 @@ plugins { kotlin("multiplatform") - kotlin("native.cocoapods") id("com.android.library") id("org.jetbrains.compose") } @@ -13,10 +12,7 @@ kotlin { android() jvm("desktop") - - ios() - iosSimulatorArm64() - + js(IR) { browser() } @@ -36,12 +32,12 @@ kotlin { } } - cocoapods { - summary = "Shared code for the sample" - homepage = "https://github.com/JetBrains/compose-jb" - ios.deploymentTarget = "14.1" - podfile = project.file("../iosApp/Podfile") - framework { + listOf( + iosX64(), + iosArm64(), + iosSimulatorArm64() + ).forEach { iosTarget -> + iosTarget.binaries.framework { baseName = "shared" isStatic = true } @@ -65,7 +61,15 @@ kotlin { api("androidx.core:core-ktx:1.9.0") } } - val iosMain by getting + val iosMain by creating { + dependsOn(commonMain) + } + val iosX64Main by getting { + dependsOn(iosMain) + } + val iosArm64Main by getting { + dependsOn(iosMain) + } val iosSimulatorArm64Main by getting { dependsOn(iosMain) } diff --git a/examples/imageviewer/gradle.properties b/examples/imageviewer/gradle.properties index cf36d1b33a..3c07f3f281 100644 --- a/examples/imageviewer/gradle.properties +++ b/examples/imageviewer/gradle.properties @@ -1,6 +1,5 @@ kotlin.code.style=official xcodeproj=iosApp -kotlin.native.cocoapods.generate.wrapper=true android.useAndroidX=true org.gradle.jvmargs=-Xmx3g org.jetbrains.compose.experimental.jscanvas.enabled=true diff --git a/examples/imageviewer/iosApp/Podfile b/examples/imageviewer/iosApp/Podfile deleted file mode 100644 index aff9c517b2..0000000000 --- a/examples/imageviewer/iosApp/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'iosApp' do - use_frameworks! - platform :ios, '14.1' - pod 'shared', :path => '../shared' -end \ No newline at end of file diff --git a/examples/imageviewer/iosApp/iosApp.xcodeproj/project.pbxproj b/examples/imageviewer/iosApp/iosApp.xcodeproj/project.pbxproj index b3dfc6e79c..81c7d54677 100644 --- a/examples/imageviewer/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/examples/imageviewer/iosApp/iosApp.xcodeproj/project.pbxproj @@ -11,20 +11,16 @@ 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; }; 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; }; 7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; }; - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = ""; }; - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; }; - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7555FF7B242A565900829871 /* My Memories.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "My Memories.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; AB3632DC29227652001CCB65 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = ""; }; - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -32,7 +28,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -47,14 +42,6 @@ path = "Preview Content"; sourceTree = ""; }; - 42799AB246E5F90AF97AA0EF /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 7555FF72242A565900829871 = { isa = PBXGroup; children = ( @@ -62,14 +49,13 @@ 7555FF7D242A565900829871 /* iosApp */, 7555FF7C242A565900829871 /* Products */, FEFF387C0A8D172AA4D59CAE /* Pods */, - 42799AB246E5F90AF97AA0EF /* Frameworks */, ); sourceTree = ""; }; 7555FF7C242A565900829871 /* Products */ = { isa = PBXGroup; children = ( - 7555FF7B242A565900829871 /* iosApp.app */, + 7555FF7B242A565900829871 /* My Memories.app */, ); name = Products; sourceTree = ""; @@ -97,8 +83,6 @@ FEFF387C0A8D172AA4D59CAE /* Pods */ = { isa = PBXGroup; children = ( - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */, - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -110,11 +94,10 @@ isa = PBXNativeTarget; buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */; buildPhases = ( - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */, + 0548D1B72A8FD1EA002E7F63 /* Compile Kotlin */, 7555FF77242A565900829871 /* Sources */, 7555FF79242A565900829871 /* Resources */, F85CB1118929364A9C6EFABC /* Frameworks */, - 94B9A73840D06546D27A50B8 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -122,7 +105,7 @@ ); name = iosApp; productName = iosApp; - productReference = 7555FF7B242A565900829871 /* iosApp.app */; + productReference = 7555FF7B242A565900829871 /* My Memories.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -171,24 +154,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 94B9A73840D06546D27A50B8 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */ = { + 0548D1B72A8FD1EA002E7F63 /* Compile Kotlin */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -196,19 +162,15 @@ inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "Compile Kotlin"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "cd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -345,7 +307,6 @@ }; 7555FFA6242A565B00829871 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -353,12 +314,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -369,7 +336,6 @@ }; 7555FFA7242A565B00829871 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -377,12 +343,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/examples/imageviewer/shared/build.gradle.kts b/examples/imageviewer/shared/build.gradle.kts index 5b52a765af..f9720a4659 100755 --- a/examples/imageviewer/shared/build.gradle.kts +++ b/examples/imageviewer/shared/build.gradle.kts @@ -2,7 +2,6 @@ plugins { kotlin("multiplatform") - kotlin("native.cocoapods") id("com.android.library") id("org.jetbrains.compose") kotlin("plugin.serialization") @@ -14,15 +13,13 @@ version = "1.0-SNAPSHOT" kotlin { androidTarget() jvm("desktop") - ios() - iosSimulatorArm64() - cocoapods { - summary = "Shared code for the sample" - homepage = "https://github.com/JetBrains/compose-jb" - ios.deploymentTarget = "14.1" - podfile = project.file("../iosApp/Podfile") - framework { + listOf( + iosX64(), + iosArm64(), + iosSimulatorArm64() + ).forEach { iosTarget -> + iosTarget.binaries.framework { baseName = "shared" isStatic = true } @@ -58,13 +55,19 @@ kotlin { implementation("com.google.maps.android:maps-compose:2.11.2") } } - val iosMain by getting { + val iosMain by creating { + dependsOn(commonMain) + } + val iosX64Main by getting { + dependsOn(iosMain) + } + val iosArm64Main by getting { + dependsOn(iosMain) } val iosSimulatorArm64Main by getting { dependsOn(iosMain) } - val desktopMain by getting { dependencies { implementation(compose.desktop.common) diff --git a/examples/minesweeper/gradle.properties b/examples/minesweeper/gradle.properties index 8390fbc487..c2334c435e 100644 --- a/examples/minesweeper/gradle.properties +++ b/examples/minesweeper/gradle.properties @@ -1,6 +1,5 @@ kotlin.code.style=official xcodeproj=./iosApp -kotlin.native.cocoapods.generate.wrapper=true android.useAndroidX=true org.gradle.jvmargs=-Xmx3g org.jetbrains.compose.experimental.jscanvas.enabled=true @@ -12,4 +11,4 @@ kotlin.mpp.androidSourceSetLayoutVersion=2 kotlin.native.binary.memoryModel=experimental kotlin.version=1.9.0 agp.version=7.1.3 -compose.version=1.5.0-beta02 +compose.version=1.5.0-rc01 diff --git a/examples/minesweeper/iosApp/Podfile b/examples/minesweeper/iosApp/Podfile deleted file mode 100644 index aff9c517b2..0000000000 --- a/examples/minesweeper/iosApp/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'iosApp' do - use_frameworks! - platform :ios, '14.1' - pod 'shared', :path => '../shared' -end \ No newline at end of file diff --git a/examples/minesweeper/iosApp/iosApp.xcodeproj/project.pbxproj b/examples/minesweeper/iosApp/iosApp.xcodeproj/project.pbxproj index 2a441d0189..39a69e8216 100644 --- a/examples/minesweeper/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/examples/minesweeper/iosApp/iosApp.xcodeproj/project.pbxproj @@ -11,20 +11,16 @@ 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; }; 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; }; 7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; }; - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = ""; }; - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; }; - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7555FF7B242A565900829871 /* Minesweeper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Minesweeper.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; AB3632DC29227652001CCB65 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = ""; }; - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -32,7 +28,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -47,29 +42,19 @@ path = "Preview Content"; sourceTree = ""; }; - 42799AB246E5F90AF97AA0EF /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 7555FF72242A565900829871 = { isa = PBXGroup; children = ( AB1DB47929225F7C00F7AF9C /* Configuration */, 7555FF7D242A565900829871 /* iosApp */, 7555FF7C242A565900829871 /* Products */, - FEFF387C0A8D172AA4D59CAE /* Pods */, - 42799AB246E5F90AF97AA0EF /* Frameworks */, ); sourceTree = ""; }; 7555FF7C242A565900829871 /* Products */ = { isa = PBXGroup; children = ( - 7555FF7B242A565900829871 /* iosApp.app */, + 7555FF7B242A565900829871 /* Minesweeper.app */, ); name = Products; sourceTree = ""; @@ -94,15 +79,6 @@ path = Configuration; sourceTree = ""; }; - FEFF387C0A8D172AA4D59CAE /* Pods */ = { - isa = PBXGroup; - children = ( - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */, - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -110,11 +86,10 @@ isa = PBXNativeTarget; buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */; buildPhases = ( - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */, + 0548D1B82A8FD49F002E7F63 /* Compile Kotlin */, 7555FF77242A565900829871 /* Sources */, 7555FF79242A565900829871 /* Resources */, F85CB1118929364A9C6EFABC /* Frameworks */, - A9E803822715990B8A260D69 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -122,7 +97,7 @@ ); name = iosApp; productName = iosApp; - productReference = 7555FF7B242A565900829871 /* iosApp.app */; + productReference = 7555FF7B242A565900829871 /* Minesweeper.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -171,7 +146,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */ = { + 0548D1B82A8FD49F002E7F63 /* Compile Kotlin */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -179,36 +154,15 @@ inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "Compile Kotlin"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - A9E803822715990B8A260D69 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "cd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -345,7 +299,6 @@ }; 7555FFA6242A565B00829871 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -353,12 +306,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -369,7 +328,6 @@ }; 7555FFA7242A565B00829871 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -377,12 +335,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/examples/minesweeper/shared/build.gradle.kts b/examples/minesweeper/shared/build.gradle.kts index 430c4f31f7..de40ff007f 100644 --- a/examples/minesweeper/shared/build.gradle.kts +++ b/examples/minesweeper/shared/build.gradle.kts @@ -2,7 +2,6 @@ plugins { kotlin("multiplatform") - kotlin("native.cocoapods") id("com.android.library") id("org.jetbrains.compose") } @@ -14,9 +13,6 @@ kotlin { jvm("desktop") - ios() - iosSimulatorArm64() - js(IR) { browser() } @@ -36,12 +32,12 @@ kotlin { } } - cocoapods { - summary = "Shared code for the sample" - homepage = "https://github.com/JetBrains/compose-jb" - ios.deploymentTarget = "14.1" - podfile = project.file("../iosApp/Podfile") - framework { + listOf( + iosX64(), + iosArm64(), + iosSimulatorArm64() + ).forEach { iosTarget -> + iosTarget.binaries.framework { baseName = "shared" isStatic = true } @@ -71,7 +67,15 @@ kotlin { api("androidx.core:core-ktx:1.9.0") } } - val iosMain by getting + val iosMain by creating { + dependsOn(commonMain) + } + val iosX64Main by getting { + dependsOn(iosMain) + } + val iosArm64Main by getting { + dependsOn(iosMain) + } val iosSimulatorArm64Main by getting { dependsOn(iosMain) } diff --git a/examples/todoapp-lite/gradle.properties b/examples/todoapp-lite/gradle.properties index 8390fbc487..c2334c435e 100755 --- a/examples/todoapp-lite/gradle.properties +++ b/examples/todoapp-lite/gradle.properties @@ -1,6 +1,5 @@ kotlin.code.style=official xcodeproj=./iosApp -kotlin.native.cocoapods.generate.wrapper=true android.useAndroidX=true org.gradle.jvmargs=-Xmx3g org.jetbrains.compose.experimental.jscanvas.enabled=true @@ -12,4 +11,4 @@ kotlin.mpp.androidSourceSetLayoutVersion=2 kotlin.native.binary.memoryModel=experimental kotlin.version=1.9.0 agp.version=7.1.3 -compose.version=1.5.0-beta02 +compose.version=1.5.0-rc01 diff --git a/examples/todoapp-lite/iosApp/Podfile b/examples/todoapp-lite/iosApp/Podfile deleted file mode 100644 index aff9c517b2..0000000000 --- a/examples/todoapp-lite/iosApp/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'iosApp' do - use_frameworks! - platform :ios, '14.1' - pod 'shared', :path => '../shared' -end \ No newline at end of file diff --git a/examples/todoapp-lite/iosApp/iosApp.xcodeproj/project.pbxproj b/examples/todoapp-lite/iosApp/iosApp.xcodeproj/project.pbxproj index 837a295061..83325240f4 100644 --- a/examples/todoapp-lite/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/examples/todoapp-lite/iosApp/iosApp.xcodeproj/project.pbxproj @@ -11,20 +11,16 @@ 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; }; 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; }; 7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; }; - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = ""; }; - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; }; - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7555FF7B242A565900829871 /* TodoAppLite.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TodoAppLite.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; AB3632DC29227652001CCB65 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = ""; }; - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -32,7 +28,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -47,29 +42,19 @@ path = "Preview Content"; sourceTree = ""; }; - 42799AB246E5F90AF97AA0EF /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 7555FF72242A565900829871 = { isa = PBXGroup; children = ( AB1DB47929225F7C00F7AF9C /* Configuration */, 7555FF7D242A565900829871 /* iosApp */, 7555FF7C242A565900829871 /* Products */, - FEFF387C0A8D172AA4D59CAE /* Pods */, - 42799AB246E5F90AF97AA0EF /* Frameworks */, ); sourceTree = ""; }; 7555FF7C242A565900829871 /* Products */ = { isa = PBXGroup; children = ( - 7555FF7B242A565900829871 /* iosApp.app */, + 7555FF7B242A565900829871 /* TodoAppLite.app */, ); name = Products; sourceTree = ""; @@ -94,15 +79,6 @@ path = Configuration; sourceTree = ""; }; - FEFF387C0A8D172AA4D59CAE /* Pods */ = { - isa = PBXGroup; - children = ( - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */, - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -110,7 +86,7 @@ isa = PBXNativeTarget; buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */; buildPhases = ( - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */, + 0548D1B92A8FD622002E7F63 /* Compile Kotlin */, 7555FF77242A565900829871 /* Sources */, 7555FF79242A565900829871 /* Resources */, F85CB1118929364A9C6EFABC /* Frameworks */, @@ -121,7 +97,7 @@ ); name = iosApp; productName = iosApp; - productReference = 7555FF7B242A565900829871 /* iosApp.app */; + productReference = 7555FF7B242A565900829871 /* TodoAppLite.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -170,7 +146,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */ = { + 0548D1B92A8FD622002E7F63 /* Compile Kotlin */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -178,19 +154,15 @@ inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "Compile Kotlin"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "cd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -327,7 +299,6 @@ }; 7555FFA6242A565B00829871 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -335,12 +306,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -351,7 +328,6 @@ }; 7555FFA7242A565B00829871 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -359,12 +335,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/examples/todoapp-lite/shared/build.gradle.kts b/examples/todoapp-lite/shared/build.gradle.kts index c2e8dde553..98d3f639b6 100755 --- a/examples/todoapp-lite/shared/build.gradle.kts +++ b/examples/todoapp-lite/shared/build.gradle.kts @@ -2,7 +2,6 @@ plugins { kotlin("multiplatform") - kotlin("native.cocoapods") id("com.android.library") id("org.jetbrains.compose") } @@ -14,15 +13,12 @@ kotlin { jvm("desktop") - ios() - iosSimulatorArm64() - - cocoapods { - summary = "Shared code for the sample" - homepage = "https://github.com/JetBrains/compose-jb" - ios.deploymentTarget = "14.1" - podfile = project.file("../iosApp/Podfile") - framework { + listOf( + iosX64(), + iosArm64(), + iosSimulatorArm64() + ).forEach { iosTarget -> + iosTarget.binaries.framework { baseName = "shared" isStatic = true } @@ -45,7 +41,15 @@ kotlin { api("androidx.core:core-ktx:1.9.0") } } - val iosMain by getting + val iosMain by creating { + dependsOn(commonMain) + } + val iosX64Main by getting { + dependsOn(iosMain) + } + val iosArm64Main by getting { + dependsOn(iosMain) + } val iosSimulatorArm64Main by getting { dependsOn(iosMain) } diff --git a/examples/visual-effects/gradle.properties b/examples/visual-effects/gradle.properties index 5b9eda536a..1baf49c20c 100644 --- a/examples/visual-effects/gradle.properties +++ b/examples/visual-effects/gradle.properties @@ -1,6 +1,5 @@ kotlin.code.style=official xcodeproj=./iosApp -kotlin.native.cocoapods.generate.wrapper=true android.useAndroidX=true org.gradle.jvmargs=-Xmx3g org.jetbrains.compose.experimental.jscanvas.enabled=true @@ -12,4 +11,4 @@ kotlin.native.useEmbeddableCompilerJar=true kotlin.native.binary.memoryModel=experimental kotlin.version=1.9.0 agp.version=7.1.3 -compose.version=1.5.0-beta02 +compose.version=1.5.0-rc01 diff --git a/examples/visual-effects/iosApp/Podfile b/examples/visual-effects/iosApp/Podfile deleted file mode 100644 index aff9c517b2..0000000000 --- a/examples/visual-effects/iosApp/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'iosApp' do - use_frameworks! - platform :ios, '14.1' - pod 'shared', :path => '../shared' -end \ No newline at end of file diff --git a/examples/visual-effects/iosApp/iosApp.xcodeproj/project.pbxproj b/examples/visual-effects/iosApp/iosApp.xcodeproj/project.pbxproj index 0cea2ac59d..d2282704e8 100644 --- a/examples/visual-effects/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/examples/visual-effects/iosApp/iosApp.xcodeproj/project.pbxproj @@ -11,20 +11,16 @@ 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; }; 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; }; 7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; }; - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = ""; }; - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; }; - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7555FF7B242A565900829871 /* VisualEffects.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VisualEffects.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; AB3632DC29227652001CCB65 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = ""; }; - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -32,7 +28,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -47,29 +42,19 @@ path = "Preview Content"; sourceTree = ""; }; - 42799AB246E5F90AF97AA0EF /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 7555FF72242A565900829871 = { isa = PBXGroup; children = ( AB1DB47929225F7C00F7AF9C /* Configuration */, 7555FF7D242A565900829871 /* iosApp */, 7555FF7C242A565900829871 /* Products */, - FEFF387C0A8D172AA4D59CAE /* Pods */, - 42799AB246E5F90AF97AA0EF /* Frameworks */, ); sourceTree = ""; }; 7555FF7C242A565900829871 /* Products */ = { isa = PBXGroup; children = ( - 7555FF7B242A565900829871 /* iosApp.app */, + 7555FF7B242A565900829871 /* VisualEffects.app */, ); name = Products; sourceTree = ""; @@ -94,15 +79,6 @@ path = Configuration; sourceTree = ""; }; - FEFF387C0A8D172AA4D59CAE /* Pods */ = { - isa = PBXGroup; - children = ( - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */, - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -110,11 +86,10 @@ isa = PBXNativeTarget; buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */; buildPhases = ( - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */, + 0548D1BA2A8FD715002E7F63 /* Compile Kotlin */, 7555FF77242A565900829871 /* Sources */, 7555FF79242A565900829871 /* Resources */, F85CB1118929364A9C6EFABC /* Frameworks */, - 7694444BC13DD49B4B2626ED /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -122,7 +97,7 @@ ); name = iosApp; productName = iosApp; - productReference = 7555FF7B242A565900829871 /* iosApp.app */; + productReference = 7555FF7B242A565900829871 /* VisualEffects.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -171,24 +146,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 7694444BC13DD49B4B2626ED /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */ = { + 0548D1BA2A8FD715002E7F63 /* Compile Kotlin */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -196,19 +154,15 @@ inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "Compile Kotlin"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "cd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -345,7 +299,6 @@ }; 7555FFA6242A565B00829871 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -353,12 +306,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -369,7 +328,6 @@ }; 7555FFA7242A565B00829871 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -377,12 +335,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/examples/visual-effects/shared/build.gradle.kts b/examples/visual-effects/shared/build.gradle.kts index 04eec1a4e9..3346b1484e 100644 --- a/examples/visual-effects/shared/build.gradle.kts +++ b/examples/visual-effects/shared/build.gradle.kts @@ -1,6 +1,5 @@ plugins { kotlin("multiplatform") - kotlin("native.cocoapods") id("com.android.library") id("org.jetbrains.compose") } @@ -12,15 +11,12 @@ kotlin { jvm("desktop") - ios() - iosSimulatorArm64() - - cocoapods { - summary = "Shared code for the sample" - homepage = "https://github.com/JetBrains/compose-jb" - ios.deploymentTarget = "14.1" - podfile = project.file("../iosApp/Podfile") - framework { + listOf( + iosX64(), + iosArm64(), + iosSimulatorArm64() + ).forEach { iosTarget -> + iosTarget.binaries.framework { baseName = "shared" isStatic = true } @@ -44,7 +40,15 @@ kotlin { api("androidx.core:core-ktx:1.9.0") } } - val iosMain by getting + val iosMain by creating { + dependsOn(commonMain) + } + val iosX64Main by getting { + dependsOn(iosMain) + } + val iosArm64Main by getting { + dependsOn(iosMain) + } val iosSimulatorArm64Main by getting { dependsOn(iosMain) } diff --git a/examples/widgets-gallery/gradle.properties b/examples/widgets-gallery/gradle.properties index 8390fbc487..c2334c435e 100644 --- a/examples/widgets-gallery/gradle.properties +++ b/examples/widgets-gallery/gradle.properties @@ -1,6 +1,5 @@ kotlin.code.style=official xcodeproj=./iosApp -kotlin.native.cocoapods.generate.wrapper=true android.useAndroidX=true org.gradle.jvmargs=-Xmx3g org.jetbrains.compose.experimental.jscanvas.enabled=true @@ -12,4 +11,4 @@ kotlin.mpp.androidSourceSetLayoutVersion=2 kotlin.native.binary.memoryModel=experimental kotlin.version=1.9.0 agp.version=7.1.3 -compose.version=1.5.0-beta02 +compose.version=1.5.0-rc01 diff --git a/examples/widgets-gallery/iosApp/Podfile b/examples/widgets-gallery/iosApp/Podfile deleted file mode 100644 index aff9c517b2..0000000000 --- a/examples/widgets-gallery/iosApp/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'iosApp' do - use_frameworks! - platform :ios, '14.1' - pod 'shared', :path => '../shared' -end \ No newline at end of file diff --git a/examples/widgets-gallery/iosApp/iosApp.xcodeproj/project.pbxproj b/examples/widgets-gallery/iosApp/iosApp.xcodeproj/project.pbxproj index df0c5b4898..f384c7a0b1 100644 --- a/examples/widgets-gallery/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/examples/widgets-gallery/iosApp/iosApp.xcodeproj/project.pbxproj @@ -11,20 +11,16 @@ 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; }; 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; }; 7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; }; - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = ""; }; - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; }; - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7555FF7B242A565900829871 /* WidgetsGallery.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WidgetsGallery.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; AB3632DC29227652001CCB65 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = ""; }; - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -32,7 +28,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -47,14 +42,6 @@ path = "Preview Content"; sourceTree = ""; }; - 42799AB246E5F90AF97AA0EF /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 7555FF72242A565900829871 = { isa = PBXGroup; children = ( @@ -62,14 +49,13 @@ 7555FF7D242A565900829871 /* iosApp */, 7555FF7C242A565900829871 /* Products */, FEFF387C0A8D172AA4D59CAE /* Pods */, - 42799AB246E5F90AF97AA0EF /* Frameworks */, ); sourceTree = ""; }; 7555FF7C242A565900829871 /* Products */ = { isa = PBXGroup; children = ( - 7555FF7B242A565900829871 /* iosApp.app */, + 7555FF7B242A565900829871 /* WidgetsGallery.app */, ); name = Products; sourceTree = ""; @@ -97,8 +83,6 @@ FEFF387C0A8D172AA4D59CAE /* Pods */ = { isa = PBXGroup; children = ( - 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */, - FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -110,11 +94,10 @@ isa = PBXNativeTarget; buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */; buildPhases = ( - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */, + 0548D1BB2A8FD7E6002E7F63 /* Compile Kotlin */, 7555FF77242A565900829871 /* Sources */, 7555FF79242A565900829871 /* Resources */, F85CB1118929364A9C6EFABC /* Frameworks */, - 57B00ABD2F9FD565E2B9F147 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -122,7 +105,7 @@ ); name = iosApp; productName = iosApp; - productReference = 7555FF7B242A565900829871 /* iosApp.app */; + productReference = 7555FF7B242A565900829871 /* WidgetsGallery.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -171,24 +154,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 57B00ABD2F9FD565E2B9F147 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */ = { + 0548D1BB2A8FD7E6002E7F63 /* Compile Kotlin */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -196,19 +162,15 @@ inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "Compile Kotlin"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "cd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -345,7 +307,6 @@ }; 7555FFA6242A565B00829871 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -353,12 +314,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -369,7 +336,6 @@ }; 7555FFA7242A565B00829871 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FF8CA3F5360CEAB49D74065F /* Pods-iosApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -377,12 +343,18 @@ DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; DEVELOPMENT_TEAM = "${TEAM_ID}"; ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n"; INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + "shared\n", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/examples/widgets-gallery/shared/build.gradle.kts b/examples/widgets-gallery/shared/build.gradle.kts index 85ddf1493c..cc7e950462 100644 --- a/examples/widgets-gallery/shared/build.gradle.kts +++ b/examples/widgets-gallery/shared/build.gradle.kts @@ -2,7 +2,6 @@ plugins { kotlin("multiplatform") - kotlin("native.cocoapods") id("com.android.library") id("org.jetbrains.compose") } @@ -14,15 +13,12 @@ kotlin { jvm("desktop") - ios() - iosSimulatorArm64() - - cocoapods { - summary = "Shared code for the sample" - homepage = "https://github.com/JetBrains/compose-jb" - ios.deploymentTarget = "14.1" - podfile = project.file("../iosApp/Podfile") - framework { + listOf( + iosX64(), + iosArm64(), + iosSimulatorArm64() + ).forEach { iosTarget -> + iosTarget.binaries.framework { baseName = "shared" isStatic = true } @@ -46,7 +42,15 @@ kotlin { api("androidx.core:core-ktx:1.9.0") } } - val iosMain by getting + val iosMain by creating { + dependsOn(commonMain) + } + val iosX64Main by getting { + dependsOn(iosMain) + } + val iosArm64Main by getting { + dependsOn(iosMain) + } val iosSimulatorArm64Main by getting { dependsOn(iosMain) }