Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading PubNub Swift SDK #188

Merged
merged 156 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 148 commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
cda1998
Added missing listener's functionality
jguz-pubnub May 22, 2024
c40382c
PubNubObjC.swift
jguz-pubnub May 15, 2024
cdcad3f
Adding separate callbacks for publish
jguz-pubnub May 15, 2024
f729eee
Adding more parameters
jguz-pubnub May 15, 2024
a52aa48
Optionals for shouldStore and ttl
jguz-pubnub May 15, 2024
99e962a
Signal wrapper
jguz-pubnub May 16, 2024
7b01739
Revert to public
jguz-pubnub May 16, 2024
b43ade6
Subscribed channel & channel groups
jguz-pubnub May 16, 2024
ca6fc30
Add channels to push notifications
jguz-pubnub May 16, 2024
944be0a
ListPushChannelRegistrations
jguz-pubnub May 17, 2024
c149fa9
RemoveChannelsFromPush
jguz-pubnub May 17, 2024
df3bf19
OnSuccess
jguz-pubnub May 17, 2024
98887b5
RemoveAllPushChannelRegistrations
jguz-pubnub May 17, 2024
4c48cb6
FetchMessages
jguz-pubnub May 21, 2024
dd99428
FetchMessages (2)
jguz-pubnub May 21, 2024
f41d650
KMM directory
jguz-pubnub May 22, 2024
22605a8
Add/remove EventListener
jguz-pubnub May 22, 2024
21c2122
Add/remove EventListener 2
jguz-pubnub May 23, 2024
c271618
Add/remove EventListener (AppContext)
jguz-pubnub May 24, 2024
6b46263
Subscribe
jguz-pubnub May 27, 2024
d40c3b8
Unsubscribe
jguz-pubnub May 27, 2024
0022feb
PubNubObjC Extensions
jguz-pubnub May 27, 2024
73caa16
DeleteMessages, FetchMessages
jguz-pubnub May 28, 2024
e7d381d
Time
jguz-pubnub May 28, 2024
b19cd3c
WhereNow + HereNow
jguz-pubnub May 28, 2024
7891370
GetPresenceState
jguz-pubnub May 28, 2024
f55c1b1
Add/remove Message Action
jguz-pubnub May 29, 2024
3f44ba2
GetMessageActions
jguz-pubnub May 29, 2024
95f010a
Channel group management
jguz-pubnub May 29, 2024
097d54b
SetToken
jguz-pubnub May 29, 2024
a5decc9
GetAllChannelMetadata
jguz-pubnub May 29, 2024
e912425
Add ObjC version of AnyJSON to message (#175)
wkal-pubnub Jun 3, 2024
ccb3d7a
Getting rid of force unwrapping
jguz-pubnub Jun 3, 2024
622bded
Using AnyJSONObjC
jguz-pubnub Jun 3, 2024
7816d54
Status Listener
jguz-pubnub Jun 4, 2024
0d5b89e
UUIDMetadata
jguz-pubnub Jun 5, 2024
66c79b8
Fix for UUID (getUUIDMetadata)
jguz-pubnub Jun 5, 2024
419c700
sortProperties -> objectSortProperties
jguz-pubnub Jun 6, 2024
3cf61d3
Constructor change in AnyJSONObjC (#176)
wkal-pubnub Jun 7, 2024
557365a
SetChannelMetadata + SetUUIDMetadata
jguz-pubnub Jun 7, 2024
12289f7
Change signature for getAllChannelMetadata/uuidMetadata
jguz-pubnub Jun 7, 2024
a85073c
Next AppContext methods
jguz-pubnub Jun 12, 2024
e70f48a
Minor fixes
jguz-pubnub Jun 13, 2024
f0a7648
PubNubUUIDMetadataObjC constructor
jguz-pubnub Jun 13, 2024
969cd85
Files API (without download/upload) + setPresenceState
jguz-pubnub Jun 14, 2024
0c2ed8c
Fix for listFiles method
jguz-pubnub Jun 14, 2024
08ab8aa
disconnect
jguz-pubnub Jun 14, 2024
2718c2b
PushType for addChannelsToPushNotifications
jguz-pubnub Jun 14, 2024
77630e0
File upload + file download
jguz-pubnub Jun 17, 2024
99d9a21
Added public modifier to uploadable constructors
jguz-pubnub Jun 17, 2024
2e9fd11
Changed some names
jguz-pubnub Jun 17, 2024
42d9f05
Added missing listener's functionality
jguz-pubnub May 22, 2024
0298220
Next changes
jguz-pubnub Jun 10, 2024
aafa865
Adding removeAllListeners/removeAllStatusListeners
jguz-pubnub Jun 14, 2024
af2b351
SwiftLint
jguz-pubnub Jun 14, 2024
0574aa2
Merge branch 'feat/listeners' into feat/kmp
jguz-pubnub Jun 19, 2024
41bc561
Removed empty files
jguz-pubnub Jun 19, 2024
fd2b55a
Merge branch 'feat/listeners' into feat/kmp
jguz-pubnub Jun 19, 2024
91a69fb
Changed method signature for removing event listener
jguz-pubnub Jun 19, 2024
8f908ff
Merge branch 'feat/listeners' into feat/kmp
jguz-pubnub Jun 19, 2024
555ebde
Storing strong references in SubscriptionListenersContainer
jguz-pubnub Jun 19, 2024
dc67ea6
Merge branch 'feat/listeners' into feat/kmp
jguz-pubnub Jun 19, 2024
59d38db
Changed signature for removing status listener
jguz-pubnub Jun 19, 2024
052604d
Merge branch 'feat/listeners' into feat/kmp
jguz-pubnub Jun 19, 2024
3b98730
Getting rid of SubscribeReceiver
jguz-pubnub Jun 20, 2024
5647ee4
Merge branch 'feat/listeners' into feat/kmp
jguz-pubnub Jun 20, 2024
60d66d8
Entities and subscriptions
jguz-pubnub Jun 21, 2024
cd10984
var for entity name
jguz-pubnub Jun 21, 2024
5f5e085
var for entity name (objc public)
jguz-pubnub Jun 21, 2024
15be443
Fixes for entities
jguz-pubnub Jun 21, 2024
b9b3cc4
PubNubSubscriptionObjC
jguz-pubnub Jun 21, 2024
59a98a3
Added public modifiers
jguz-pubnub Jun 21, 2024
4a9eebd
Reduce number of classes
jguz-pubnub Jun 21, 2024
d5d48ec
SwiftLint
jguz-pubnub Jun 21, 2024
68cc5d3
Minor improvements
jguz-pubnub Jun 24, 2024
5234b54
removeAllListeners
jguz-pubnub Jun 24, 2024
e754840
Added extensions for PubNubObjC.swift
jguz-pubnub Jun 25, 2024
1a60f8b
SwiftLint
jguz-pubnub Jun 25, 2024
9c1b9a1
SwiftLint
jguz-pubnub Jun 25, 2024
7b0b35f
Added missing topic and environment variables
jguz-pubnub Jul 8, 2024
e31647f
Next fixes for push methods, added Dictionary extension for JSONCodab…
jguz-pubnub Jul 8, 2024
d814f49
Fixes for custom fields (AppContext)
jguz-pubnub Jul 8, 2024
f5bc9ae
Fixes for custom fields (AppContext)
jguz-pubnub Jul 8, 2024
355fa8d
SwiftLint + fix for PubNubMembershipMetadataObjC (custom field)
jguz-pubnub Jul 8, 2024
ff67066
Restoring constructors for PubNubUUIDMetadataObjC and PubNubChannelMe…
jguz-pubnub Jul 8, 2024
b896cb5
SwiftLint
jguz-pubnub Jul 8, 2024
cde54b0
Fix for AppContext methods
jguz-pubnub Jul 8, 2024
19847a0
Refactor PubNubObjC creation and config access (#181)
wkal-pubnub Jul 17, 2024
67f9f02
PubNubErrorObjC.swift
jguz-pubnub Jul 17, 2024
647bb1c
Test PubNubErrorObjC
jguz-pubnub Jul 17, 2024
682bf11
Fix for PubNubErrorObjC.swift
jguz-pubnub Jul 17, 2024
d3d254a
Fix for converting PubNubHashedPageObjC
jguz-pubnub Jul 17, 2024
b8814da
Fix for PubNubHashedPageObjC
jguz-pubnub Jul 17, 2024
9201ae0
Added missing status fields (AppContext)
jguz-pubnub Jul 17, 2024
28ea32f
Test for AppContext DTO (channel field)
jguz-pubnub Jul 17, 2024
7c946ee
Additional constructor for PubNubSubscriptionSetObjC
jguz-pubnub Jul 18, 2024
375d62a
Minor fix for meta parameter (Publish)
jguz-pubnub Jul 18, 2024
42c7706
SwiftLint
jguz-pubnub Jul 18, 2024
755daec
Fix init with null on AnyJSONObjC (#184)
wkal-pubnub Jul 23, 2024
00c721f
Wrapping errors in PubNubErrorObjC
jguz-pubnub Jul 30, 2024
8bee53f
Added missing channel.type and uuid.type parameters
jguz-pubnub Jul 31, 2024
d8c9408
Added includeChannelType and includeUUIDType in PubNubObjC
jguz-pubnub Jul 31, 2024
f1dd87e
Correct mapping for JSONCodableScalar
jguz-pubnub Jul 31, 2024
ba21e3e
Added missing listener's functionality
jguz-pubnub May 22, 2024
7af55db
Next changes
jguz-pubnub Jun 10, 2024
6f82ad1
Adding removeAllListeners/removeAllStatusListeners
jguz-pubnub Jun 14, 2024
26f2626
SwiftLint
jguz-pubnub Jun 14, 2024
b412601
Removed empty files
jguz-pubnub Jun 19, 2024
d2f951b
Changed method signature for removing event listener
jguz-pubnub Jun 19, 2024
9de7129
Storing strong references in SubscriptionListenersContainer
jguz-pubnub Jun 19, 2024
d8ebf7c
Changed signature for removing status listener
jguz-pubnub Jun 19, 2024
371b62d
Getting rid of SubscribeReceiver
jguz-pubnub Jun 20, 2024
e1dcceb
Handling new connection status (subscriptionChanged)
jguz-pubnub Jul 9, 2024
6e4e07a
Updating tests
jguz-pubnub Jul 17, 2024
c9443e4
Ensuring that listeners are stored as weak references
jguz-pubnub Aug 13, 2024
91bd857
SwiftLint
jguz-pubnub Aug 13, 2024
8a1c153
DetailTableViewController.swift
jguz-pubnub Aug 13, 2024
dacd7ad
Replacing module name with PubNubSDK
jguz-pubnub Aug 13, 2024
d4f2b0f
Minor fixes for Subscriptions
jguz-pubnub Aug 14, 2024
7403207
Merge branch 'feat/listeners' into feat/kmp2
jguz-pubnub Aug 14, 2024
13a6d98
Upgrading PubNub Swift SDK:
jguz-pubnub May 22, 2024
e2f0a46
Replacing module name with PubNubSDK
jguz-pubnub Aug 13, 2024
19b7e20
Changes from feat/listeners
jguz-pubnub Aug 20, 2024
7f5d8f2
Fixes for JSONCodable in PubNubObjc+Publish.swift
jguz-pubnub Aug 26, 2024
d1e5990
ReceivePresenceEvents
jguz-pubnub Sep 6, 2024
34a21e6
ReceivePresenceEvents
jguz-pubnub Sep 6, 2024
56e3444
PubNubSubscriptionObjC (receivePresenceEvents)
jguz-pubnub Sep 9, 2024
cb2fea8
Disclaimer for KMP sources
jguz-pubnub Sep 9, 2024
ec6421a
SwiftLint
jguz-pubnub Sep 9, 2024
54e611f
Small reordering in KMP
jguz-pubnub Sep 9, 2024
ba87838
Adding an important note for KMP sources at the top of each file
jguz-pubnub Sep 9, 2024
6fbed9e
Add support for handling PatchValue in Kotlin
jguz-pubnub Sep 9, 2024
79f49f8
Minor fixes
jguz-pubnub Sep 9, 2024
3ed1032
AnyJSONObjC, make value field as public
jguz-pubnub Sep 9, 2024
3f96e9f
KMP prefix
jguz-pubnub Sep 10, 2024
defc6f0
subscriptionChanged
jguz-pubnub Sep 10, 2024
3d10af7
Thread safe SubscriptionListenersContainer
jguz-pubnub Sep 10, 2024
fe04589
Fix according to last review (listeners -> subscriptions)
jguz-pubnub Sep 10, 2024
73803fb
SwiftLint (Codacy)
jguz-pubnub Sep 10, 2024
cc43afc
Minor improvement in DependencyContainer, removed unused variable in …
jguz-pubnub Sep 16, 2024
f48dba4
Merge branch 'master' into feat/kmp2
jguz-pubnub Sep 16, 2024
1d0c659
Some minor changes
jguz-pubnub Sep 16, 2024
42a4156
Fixes according to review (WIP)
jguz-pubnub Sep 17, 2024
cc89029
* Disabling visionOS in PubNubSwift.podspec due to missing simulator …
jguz-pubnub Sep 17, 2024
725893b
SwiftLint
jguz-pubnub Sep 17, 2024
da65d86
Improved the way of creating StatusListener (KMP)
jguz-pubnub Sep 17, 2024
3b79457
Fixes according to review (safe forEach)
jguz-pubnub Sep 17, 2024
b3a3bb6
Fixes according to review (missing type/status fields)
jguz-pubnub Sep 17, 2024
32d0e57
Fix according to review (separate vars for affected channels/groups)
jguz-pubnub Sep 17, 2024
9f10eba
Removed spaces in some file names
jguz-pubnub Sep 17, 2024
2175a86
Getting rid of removing listeners methods taking UUID
jguz-pubnub Sep 17, 2024
fdc64fd
8.0 migration guide, SwiftLint
jguz-pubnub Sep 18, 2024
210c4e4
AutomaticRetry
jguz-pubnub Sep 18, 2024
7db0d62
Fixes for AutomaticRetry
jguz-pubnub Sep 18, 2024
59ce8fe
Fix according to review
jguz-pubnub Sep 18, 2024
ad09281
PubNub SDK 8.0.0 release.
pubnub-release-bot Sep 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Examples/Examples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
359F779F22B7FEF700B6B46F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 359F779E22B7FEF700B6B46F /* Assets.xcassets */; };
359F77A222B7FEF700B6B46F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 359F77A022B7FEF700B6B46F /* LaunchScreen.storyboard */; };
35F0258F22BAC6C9007BD7D3 /* ConfigDetailTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35F0258E22BAC6C9007BD7D3 /* ConfigDetailTableViewController.swift */; };
3D26A6152C6BB68A007B4539 /* PubNubSDK in Frameworks */ = {isa = PBXBuildFile; productRef = 3D26A6142C6BB68A007B4539 /* PubNubSDK */; };
3D34160D2BB5CE20008558A0 /* DetailTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D34160C2BB5CE20008558A0 /* DetailTableViewController.swift */; };
792CF27228C4FBB300C83408 /* PubNub in Frameworks */ = {isa = PBXBuildFile; productRef = 792CF27128C4FBB300C83408 /* PubNub */; };
792CF27428C4FBB300C83408 /* PubNubMembership in Frameworks */ = {isa = PBXBuildFile; productRef = 792CF27328C4FBB300C83408 /* PubNubMembership */; };
792CF27628C4FBB300C83408 /* PubNubSpace in Frameworks */ = {isa = PBXBuildFile; productRef = 792CF27528C4FBB300C83408 /* PubNubSpace */; };
792CF27828C4FBB300C83408 /* PubNubUser in Frameworks */ = {isa = PBXBuildFile; productRef = 792CF27728C4FBB300C83408 /* PubNubUser */; };
Expand Down Expand Up @@ -70,9 +70,9 @@
buildActionMask = 2147483647;
files = (
792CF27428C4FBB300C83408 /* PubNubMembership in Frameworks */,
3D26A6152C6BB68A007B4539 /* PubNubSDK in Frameworks */,
792CF27828C4FBB300C83408 /* PubNubUser in Frameworks */,
792CF27628C4FBB300C83408 /* PubNubSpace in Frameworks */,
792CF27228C4FBB300C83408 /* PubNub in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -176,10 +176,10 @@
);
name = "iOS Example";
packageProductDependencies = (
792CF27128C4FBB300C83408 /* PubNub */,
792CF27328C4FBB300C83408 /* PubNubMembership */,
792CF27528C4FBB300C83408 /* PubNubSpace */,
792CF27728C4FBB300C83408 /* PubNubUser */,
3D26A6142C6BB68A007B4539 /* PubNubSDK */,
);
productName = swiftSdkiOS;
productReference = 359F779422B7FEF600B6B46F /* iOS Example.app */;
Expand Down Expand Up @@ -464,9 +464,9 @@
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
792CF27128C4FBB300C83408 /* PubNub */ = {
3D26A6142C6BB68A007B4539 /* PubNubSDK */ = {
isa = XCSwiftPackageProductDependency;
productName = PubNub;
productName = PubNubSDK;
};
792CF27328C4FBB300C83408 /* PubNubMembership */ = {
isa = XCSwiftPackageProductDependency;
Expand Down
3 changes: 1 addition & 2 deletions Examples/Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
//

import UIKit

import PubNub
import PubNubSDK

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
Expand Down
3 changes: 1 addition & 2 deletions Examples/Sources/ConfigDetailTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
//

import UIKit

import PubNub
import PubNubSDK

class ConfigDetailTableViewController: UITableViewController {

Expand Down
8 changes: 3 additions & 5 deletions Examples/Sources/DetailTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import Foundation
import UIKit

import PubNub
import PubNubSDK
import PubNubMembership
import PubNubSpace
import PubNubUser
Expand Down Expand Up @@ -249,12 +249,10 @@ class DetailTableViewController: UITableViewController {
print("The signal is \(signal.payload) and was sent by \(signal.publisher ?? "")")
case let .connectionStatusChanged(connectionChange):
switch connectionChange {
case .connecting:
print("Status connecting...")
case .connected:
print("Status connected!")
case .reconnecting:
print("Status reconnecting...")
case .subscriptionChanged:
print("Subscription changed")
case .disconnected:
print("Status disconnected")
case .disconnectedUnexpectedly:
Expand Down
3 changes: 1 addition & 2 deletions Examples/Sources/File/FileAPIViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
//

import UIKit

import PubNub
import PubNubSDK

enum AlertMessageDirection: String {
case upload = "Uploading"
Expand Down
3 changes: 1 addition & 2 deletions Examples/Sources/File/LocalFileExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
//

import Foundation

import PubNub
import PubNubSDK

enum FileError: Error {
case fileNameError
Expand Down
21 changes: 11 additions & 10 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.9
//
// Package.swift
//
Expand All @@ -12,18 +12,19 @@
import PackageDescription

let package = Package(
name: "PubNub",
name: "PubNubSDK",
platforms: [
.iOS(.v12),
.macOS(.v10_15),
.tvOS(.v12),
.watchOS(.v4)
.watchOS(.v4),
.visionOS(.v1)
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "PubNub",
targets: ["PubNub"]
name: "PubNubSDK",
targets: ["PubNubSDK"]
),
.library(
name: "PubNubUser",
Expand All @@ -45,28 +46,28 @@ let package = Package(
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "PubNub",
name: "PubNubSDK",
path: "Sources/PubNub",
resources: [.copy("PrivacyInfo.xcprivacy")]
),
.target(
name: "PubNubUser",
dependencies: ["PubNub"],
dependencies: ["PubNubSDK"],
path: "PubNubUser/Sources"
),
.target(
name: "PubNubSpace",
dependencies: ["PubNub"],
dependencies: ["PubNubSDK"],
path: "PubNubSpace/Sources"
),
.target(
name: "PubNubMembership",
dependencies: ["PubNub", "PubNubUser", "PubNubSpace"],
dependencies: ["PubNubSDK", "PubNubUser", "PubNubSpace"],
path: "PubNubMembership/Sources"
),
.testTarget(
name: "PubNubTests",
dependencies: ["PubNub"]
dependencies: ["PubNubSDK"]
)
],
swiftLanguageVersions: [.v5]
Expand Down
Loading
Loading