Skip to content

Commit 8fd0a4e

Browse files
authored
Add support for other Apple platforms (tvOS, macOS) (#309)
1 parent 926e4ac commit 8fd0a4e

File tree

67 files changed

+14
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+14
-4
lines changed

build-logic/gradle-plugins/src/main/kotlin/com/pubnub/gradle/PubNubKotlinMultiplatformPlugin.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ class PubNubKotlinMultiplatformPlugin : Plugin<Project> {
2424
apply<KotlinCocoapodsPlugin>()
2525
extensions.configure<KotlinMultiplatformExtension> {
2626
(this as? ExtensionAware)?.extensions?.configure<CocoapodsExtension> {
27-
ios.deploymentTarget = "14"
27+
ios.deploymentTarget = "14.0"
28+
osx.deploymentTarget = "11.0"
29+
tvos.deploymentTarget = "14.0"
2830

2931
// Maps custom Xcode configuration to NativeBuildType
3032
xcodeConfigurationToNativeBuildType["CUSTOM_DEBUG"] = NativeBuildType.DEBUG
@@ -90,6 +92,10 @@ class PubNubBaseKotlinMultiplatformPlugin : Plugin<Project> {
9092
if (enableIosTargetOther) {
9193
iosArm64()
9294
iosX64()
95+
macosArm64()
96+
macosX64()
97+
tvosArm64()
98+
tvosSimulatorArm64()
9399
}
94100
if (enableIosSimulatorArm64) {
95101
iosSimulatorArm64()
@@ -110,7 +116,7 @@ class PubNubBaseKotlinMultiplatformPlugin : Plugin<Project> {
110116
}
111117

112118
if (enableAnyIosTarget) {
113-
getByName("iosMain") {
119+
getByName("appleMain") {
114120
it.dependsOn(nonJvm)
115121
}
116122
}

pubnub-kotlin/pubnub-kotlin-api/pubnub_kotlin_api.podspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Pod::Spec.new do |spec|
88
spec.summary = ''
99
spec.vendored_frameworks = 'build/cocoapods/framework/pubnub_kotlin_api.framework'
1010
spec.libraries = 'c++'
11-
spec.ios.deployment_target = '14'
11+
spec.ios.deployment_target = '14.0'
12+
spec.osx.deployment_target = '11.0'
13+
spec.tvos.deployment_target = '14.0'
1214
spec.dependency 'PubNubSwift', '8.0.1'
1315

1416
if !Dir.exist?('build/cocoapods/framework/pubnub_kotlin_api.framework') || Dir.empty?('build/cocoapods/framework/pubnub_kotlin_api.framework')

pubnub-kotlin/pubnub-kotlin-core-api/pubnub_kotlin_core_api.podspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Pod::Spec.new do |spec|
88
spec.summary = ''
99
spec.vendored_frameworks = 'build/cocoapods/framework/pubnub_kotlin_core_api.framework'
1010
spec.libraries = 'c++'
11-
spec.ios.deployment_target = '14'
11+
spec.ios.deployment_target = '14.0'
12+
spec.osx.deployment_target = '11.0'
13+
spec.tvos.deployment_target = '14.0'
1214
spec.dependency 'PubNubSwift', '8.0.1'
1315

1416
if !Dir.exist?('build/cocoapods/framework/pubnub_kotlin_core_api.framework') || Dir.empty?('build/cocoapods/framework/pubnub_kotlin_core_api.framework')

0 commit comments

Comments
 (0)