Skip to content

Commit 11f1678

Browse files
authored
Add internal fixes to the publish method for Apple platforms (#327)
* PubNub SDK v10.3.4 release
1 parent 5779f48 commit 11f1678

File tree

9 files changed

+25
-11
lines changed

9 files changed

+25
-11
lines changed

.pubnub.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: kotlin
2-
version: 10.3.3
2+
version: 10.3.4
33
schema: 1
44
scm: github.com/pubnub/kotlin
55
files:
6-
- build/libs/pubnub-kotlin-10.3.3-all.jar
6+
- build/libs/pubnub-kotlin-10.3.4-all.jar
77
sdks:
88
-
99
type: library
@@ -23,8 +23,8 @@ sdks:
2323
-
2424
distribution-type: library
2525
distribution-repository: maven
26-
package-name: pubnub-kotlin-10.3.3
27-
location: https://repo.maven.apache.org/maven2/com/pubnub/pubnub-kotlin/10.3.3/pubnub-kotlin-10.3.3.jar
26+
package-name: pubnub-kotlin-10.3.4
27+
location: https://repo.maven.apache.org/maven2/com/pubnub/pubnub-kotlin/10.3.4/pubnub-kotlin-10.3.4.jar
2828
supported-platforms:
2929
supported-operating-systems:
3030
Android:
@@ -121,6 +121,11 @@ sdks:
121121
license-url: https://www.apache.org/licenses/LICENSE-2.0.txt
122122
is-required: Required
123123
changelog:
124+
- date: 2025-01-13
125+
version: v10.3.4
126+
changes:
127+
- type: bug
128+
text: "Internal fixes."
124129
- date: 2025-01-07
125130
version: v10.3.3
126131
changes:

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v10.3.4
2+
January 13 2025
3+
4+
#### Fixed
5+
- Internal fixes.
6+
17
## v10.3.3
28
January 07 2025
39

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You will need the publish and subscribe keys to authenticate your app. Get your
2020
<dependency>
2121
<groupId>com.pubnub</groupId>
2222
<artifactId>pubnub-kotlin</artifactId>
23-
<version>10.3.3</version>
23+
<version>10.3.4</version>
2424
</dependency>
2525
```
2626

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RELEASE_SIGNING_ENABLED=true
1818
SONATYPE_HOST=DEFAULT
1919
SONATYPE_AUTOMATIC_RELEASE=false
2020
GROUP=com.pubnub
21-
VERSION_NAME=10.3.3
21+
VERSION_NAME=10.3.4
2222
POM_PACKAGING=jar
2323

2424
POM_NAME=PubNub SDK

gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dokka = "1.9.20"
1313
kotlinx_datetime = "0.6.1"
1414
kotlinx_coroutines = "1.9.0"
1515
pubnub_js = "8.4.1"
16-
pubnub_swift = "8.2.3"
16+
pubnub_swift = "8.2.4"
1717

1818
[libraries]
1919
retrofit2 = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit2" }

pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/PubNubImpl.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class PubNubImpl(private val pubNubObjC: KMPPubNub) : PubNub {
189189
pubNubObjC.removeAllListeners()
190190
}
191191

192-
// TODO: replicate and usePost parameters are not present in Swift SDK
192+
// TODO: replicate is not present in Swift SDK
193193
override fun publish(
194194
channel: String,
195195
message: Any,
@@ -206,19 +206,20 @@ class PubNubImpl(private val pubNubObjC: KMPPubNub) : PubNub {
206206
message = message,
207207
meta = meta,
208208
shouldStore = shouldStore,
209+
usePost = usePost,
209210
ttl = ttl,
210211
customMessageType = customMessageType
211212
)
212213
}
213214

214-
// TODO: usePost parameter is not present in Swift SDK
215215
override fun fire(channel: String, message: Any, meta: Any?, usePost: Boolean): Publish {
216216
return PublishImpl(
217217
pubnub = pubNubObjC,
218218
channel = channel,
219219
message = message,
220220
meta = meta,
221221
shouldStore = false,
222+
usePost = usePost,
222223
ttl = 0,
223224
customMessageType = null
224225
)

pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/pubsub/Publish.ios.kt

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class PublishImpl(
2323
private val message: Any,
2424
private val meta: Any?,
2525
private val shouldStore: Boolean?,
26+
private val usePost: Boolean,
2627
private val ttl: Int?,
2728
private val customMessageType: String?
2829
) : Publish {
@@ -32,6 +33,7 @@ class PublishImpl(
3233
message = message,
3334
meta = meta,
3435
shouldStore = shouldStore?.let { NSNumber(bool = it) },
36+
usePost = NSNumber(bool = usePost),
3537
ttl = ttl?.let { NSNumber(it) },
3638
customMessageType = customMessageType,
3739
onSuccess = callback.onSuccessHandler { PNPublishResult(it.toLong()) },

pubnub-kotlin/pubnub-kotlin-api/src/jsMain/kotlin/com/pubnub/api/PubNubImpl.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ private fun MembershipInclude.toMembershipIncludeOptions(): PubNubJs.MembershipI
14431443
}
14441444

14451445
private fun MemberInclude.toMemberIncludeOptions(): PubNubJs.IncludeOptions {
1446-
return createJsObject<PubNubJs.IncludeOptions> {
1446+
return createJsObject<PubNubJs.IncludeOptions> {
14471447
this.totalCount = this@toMemberIncludeOptions.includeTotalCount
14481448
this.customFields = this@toMemberIncludeOptions.includeCustom
14491449
this.UUIDFields = this@toMemberIncludeOptions.includeUser

pubnub-kotlin/pubnub-kotlin-impl/src/test/kotlin/com/pubnub/api/legacy/PubNubImplTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class PubNubImplTest : BaseTest() {
5656
fun getVersionAndTimeStamp() {
5757
val version = PubNubImpl.SDK_VERSION
5858
val timeStamp = PubNubImpl.timestamp()
59-
assertEquals("10.3.3", version)
59+
assertEquals("10.3.4", version)
6060
assertTrue(timeStamp > 0)
6161
}
6262

0 commit comments

Comments
 (0)