diff --git a/.github/workflows/commands-handler.yml b/.github/workflows/commands-handler.yml index 48f71d24a..4af75dfe3 100644 --- a/.github/workflows/commands-handler.yml +++ b/.github/workflows/commands-handler.yml @@ -35,6 +35,10 @@ jobs: ref: v1 token: ${{ secrets.GH_TOKEN }} path: .github/.release/actions + - name: Setup Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: 20 - name: Process changelog entries if: steps.user-check.outputs.expected-user == 'true' uses: ./.github/.release/actions/actions/commands diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bda602060..0de07ba14 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,6 @@ on: pull_request: branches: [master] types: [closed] - env: LANG: en_US.UTF-8 LANGUAGE: en_US.UTF-8 @@ -14,9 +13,9 @@ env: jobs: check-release: name: Check release required + if: github.event.pull_request.merged && endsWith(github.repository, '-private') != true runs-on: group: Default - if: github.event.pull_request.merged && endsWith(github.repository, '-private') != true outputs: release: ${{ steps.check.outputs.ready }} steps: diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 770bdb2e6..b3c4a9778 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,15 +10,15 @@ defaults: run: shell: bash env: - TESTS_PAM_PUBLISH_KEY: ${{ secrets.SDK_PAM_PUB_KEY }} TESTS_PAM_SUBSCRIBE_KEY: ${{ secrets.SDK_PAM_SUB_KEY }} - TESTS_PUBLISH_KEY: ${{ secrets.SDK_PUB_KEY }} + TESTS_PAM_PUBLISH_KEY: ${{ secrets.SDK_PAM_PUB_KEY }} TESTS_SUBSCRIBE_KEY: ${{ secrets.SDK_SUB_KEY }} + TESTS_PUBLISH_KEY: ${{ secrets.SDK_PUB_KEY }} LANG: en_US.UTF-8 LANGUAGE: en_US.UTF-8 LC_ALL: en_US.UTF-8 LC_CTYPE: en_US.UTF-8 - + jobs: tests: name: Integration and Unit tests @@ -82,12 +82,13 @@ jobs: with: ruby-version: 3.2.2 bundler-cache: true - - name: Setup CocoaPods - run: gem install cocoapods - name: Setup Node.js 20.x uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version: 20 + - run: npm version + - name: Setup CocoaPods + run: gem install cocoapods - name: Cache installed Pods uses: actions/cache@v4 with: diff --git a/.github/workflows/run-validations.yml b/.github/workflows/run-validations.yml index 3a8adc16f..99b2461f9 100644 --- a/.github/workflows/run-validations.yml +++ b/.github/workflows/run-validations.yml @@ -25,6 +25,10 @@ jobs: ref: v1 token: ${{ secrets.GH_TOKEN }} path: .github/.release/actions + - name: Setup Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: 20 - name: "Run '.pubnub.yml' file validation" uses: ./.github/.release/actions/actions/validators/pubnub-yml with: diff --git a/.pubnub.yml b/.pubnub.yml index 17965d315..713c8be0b 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,9 +1,18 @@ --- name: objective-c scm: github.com/pubnub/objective-c -version: "5.5.0" +version: "5.6.0" schema: 1 changelog: + - date: 2024-06-27 + version: v5.6.0 + changes: + - type: feature + text: "Decoder to map server response directly to the data models." + - type: feature + text: "Configurable request objects require less convenience methods to interact with PubNub REST API." + - type: feature + text: "Network layer rewritten as module." - date: 2024-06-12 version: v5.5.0 changes: @@ -1349,7 +1358,7 @@ sdks: - distribution-type: source distribution-repository: GitHub release package-name: PubNub.framework - location: https://github.com/pubnub/objective-c/archive/refs/tags/v5.5.0.zip + location: https://github.com/pubnub/objective-c/archive/refs/tags/v5.6.0.zip supported-platforms: supported-operating-systems: macOS: @@ -1410,7 +1419,7 @@ sdks: - distribution-type: library distribution-repository: GitHub release package-name: PubNub.ios.xcframework.tar.gz - location: https://github.com/pubnub/objective-c/releases/download/v5.5.0/PubNub.ios.xcframework.tar.gz + location: https://github.com/pubnub/objective-c/releases/download/v5.6.0/PubNub.ios.xcframework.tar.gz supported-platforms: supported-operating-systems: iOS: @@ -1429,7 +1438,7 @@ sdks: - distribution-type: library distribution-repository: GitHub release package-name: PubNub.macos.framework.tar.gz - location: https://github.com/pubnub/objective-c/releases/download/v5.5.0/PubNub.macos.framework.tar.gz + location: https://github.com/pubnub/objective-c/releases/download/v5.6.0/PubNub.macos.framework.tar.gz supported-platforms: supported-operating-systems: macOS: @@ -1445,7 +1454,7 @@ sdks: - distribution-type: library distribution-repository: GitHub release package-name: PubNub.tvos.xcframework.tar.gz - location: https://github.com/pubnub/objective-c/releases/download/v5.5.0/PubNub.tvos.xcframework.tar.gz + location: https://github.com/pubnub/objective-c/releases/download/v5.6.0/PubNub.tvos.xcframework.tar.gz supported-platforms: supported-operating-systems: tvOS: diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b392ac64..9e006701b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v5.6.0 +June 27 2024 + +#### Added +- Decoder to map server response directly to the data models. +- Configurable request objects require less convenience methods to interact with PubNub REST API. +- Network layer rewritten as module. + ## v5.5.0 June 12 2024 diff --git a/Example/PubNub/PNAppDelegate.m b/Example/PubNub/PNAppDelegate.m index 4666e0d7d..2052ff1e2 100644 --- a/Example/PubNub/PNAppDelegate.m +++ b/Example/PubNub/PNAppDelegate.m @@ -92,6 +92,7 @@ - (void)pubNubInit { self.client.logger.maximumNumberOfLogFiles = 10; [self.client.logger setLogLevel:PNVerboseLogLevel]; + // Bind didReceiveMessage, didReceiveStatus, and didReceivePresenceEvent 'listeners' to this delegate // just be sure the target has implemented the PNObjectEventListener extension [self.client addListener:self]; diff --git a/Example/PubNub/PubNub Example-Info.plist b/Example/PubNub/PubNub Example-Info.plist index 6f80ef5f5..d39e1f14b 100644 --- a/Example/PubNub/PubNub Example-Info.plist +++ b/Example/PubNub/PubNub Example-Info.plist @@ -30,6 +30,13 @@ NSExceptionDomains + ps.pndsn.com + + NSExceptionAllowsInsecureHTTPLoads + + NSIncludesSubdomains + + pubsub.pubnub.com NSExceptionAllowsInsecureHTTPLoads diff --git a/Framework/PubNub Framework.xcodeproj/project.pbxproj b/Framework/PubNub Framework.xcodeproj/project.pbxproj index 1b9af63fd..9662268bc 100644 --- a/Framework/PubNub Framework.xcodeproj/project.pbxproj +++ b/Framework/PubNub Framework.xcodeproj/project.pbxproj @@ -81,60 +81,39 @@ 791582101BD709C60084FC70 /* PNDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0B51BD03DE4001FC34D /* PNDictionary.m */; }; 791582111BD709C60084FC70 /* PNSubscribeStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A61BD03DE4001FC34D /* PNSubscribeStatus.m */; }; 791582121BD709C60084FC70 /* PNConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB07B1BD03DE4001FC34D /* PNConfiguration.m */; }; - 791582131BD709C60084FC70 /* PNHistoryParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DB1BD03DE4001FC34D /* PNHistoryParser.m */; }; 791582141BD709C60084FC70 /* PNGZIP.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0B71BD03DE4001FC34D /* PNGZIP.m */; }; - 791582151BD709C60084FC70 /* PNPushNotificationsStateModificationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E71BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.m */; }; 791582161BD709C60084FC70 /* PNJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0BA1BD03DE4001FC34D /* PNJSON.m */; }; 791582171BD709C60084FC70 /* PNPresenceWhereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0971BD03DE4001FC34D /* PNPresenceWhereNowResult.m */; }; 791582181BD709C60084FC70 /* PubNub+APNS.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0571BD03DE4001FC34D /* PubNub+APNS.m */; }; - 791582191BD709C60084FC70 /* PNChannelGroupAuditionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D11BD03DE4001FC34D /* PNChannelGroupAuditionParser.m */; }; - 7915821A1BD709C60084FC70 /* PNChannelGroupsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0881BD03DE4001FC34D /* PNChannelGroupsResult.m */; }; 7915821B1BD709C60084FC70 /* PubNub+Time.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB06A1BD03DE4001FC34D /* PubNub+Time.m */; }; 7915821C1BD709C60084FC70 /* PNErrorStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08D1BD03DE4001FC34D /* PNErrorStatus.m */; }; 7915821D1BD709C60084FC70 /* PubNub+State.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0651BD03DE4001FC34D /* PubNub+State.m */; }; - 7915821E1BD709C60084FC70 /* PNPushNotificationsAuditParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E51BD03DE4001FC34D /* PNPushNotificationsAuditParser.m */; }; 7915821F1BD709C60084FC70 /* PNStateListener.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0721BD03DE4001FC34D /* PNStateListener.m */; }; 791582201BD709C60084FC70 /* PNHeartbeat.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0701BD03DE4001FC34D /* PNHeartbeat.m */; }; 791582211BD709C60084FC70 /* PNAcknowledgmentStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB07E1BD03DE4001FC34D /* PNAcknowledgmentStatus.m */; }; 791582221BD709C60084FC70 /* PubNub+ChannelGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0591BD03DE4001FC34D /* PubNub+ChannelGroup.m */; }; - 791582231BD709C60084FC70 /* PNRequestParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F51BD03DE4001FC34D /* PNRequestParameters.m */; }; 791582241BD709C60084FC70 /* PNHistoryResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08F1BD03DE4001FC34D /* PNHistoryResult.m */; }; - 791582251BD709C60084FC70 /* PNErrorParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D71BD03DE4001FC34D /* PNErrorParser.m */; }; 791582261BD709C60084FC70 /* PNChannelClientStateResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0821BD03DE4001FC34D /* PNChannelClientStateResult.m */; }; - 791582271BD709C60084FC70 /* PNPresenceWhereNowParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E31BD03DE4001FC34D /* PNPresenceWhereNowParser.m */; }; 791582281BD709C60084FC70 /* PNChannel.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0AF1BD03DE4001FC34D /* PNChannel.m */; }; - 791582291BD709C60084FC70 /* PNSubscriberResults.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A41BD03DE4001FC34D /* PNSubscriberResults.m */; }; - 7915822A1BD709C60084FC70 /* PNChannelGroupModificationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D31BD03DE4001FC34D /* PNChannelGroupModificationParser.m */; }; 7915822C1BD709C60084FC70 /* PNClientInformation.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0781BD03DE4001FC34D /* PNClientInformation.m */; }; 7915822D1BD709C60084FC70 /* PNChannelGroupChannelsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0841BD03DE4001FC34D /* PNChannelGroupChannelsResult.m */; }; - 7915822E1BD709C60084FC70 /* PNLeaveParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DD1BD03DE4001FC34D /* PNLeaveParser.m */; }; 7915822F1BD709C60084FC70 /* PNClientState.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB06E1BD03DE4001FC34D /* PNClientState.m */; }; - 791582301BD709C60084FC70 /* PNSubscribeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0EB1BD03DE4001FC34D /* PNSubscribeParser.m */; }; - 791582311BD709C60084FC70 /* PNMessagePublishParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DF1BD03DE4001FC34D /* PNMessagePublishParser.m */; }; 791582321BD709C60084FC70 /* PNURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0BE1BD03DE4001FC34D /* PNURLRequest.m */; }; - 791582331BD709C60084FC70 /* PNTimeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0ED1BD03DE4001FC34D /* PNTimeParser.m */; }; 791582341BD709C60084FC70 /* PNTimeResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A81BD03DE4001FC34D /* PNTimeResult.m */; }; 791582361BD709C60084FC70 /* PNServiceData.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB09F1BD03DE4001FC34D /* PNServiceData.m */; }; - 791582371BD709C60084FC70 /* PNClientStateUpdateStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08A1BD03DE4001FC34D /* PNClientStateUpdateStatus.m */; }; 791582381BD709C60084FC70 /* PNAES.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0761BD03DE4001FC34D /* PNAES.m */; }; - 791582391BD709C60084FC70 /* PNNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0EF1BD03DE4001FC34D /* PNNetwork.m */; }; 7915823B1BD709C60084FC70 /* PNPublishStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0991BD03DE4001FC34D /* PNPublishStatus.m */; }; 7915823C1BD709C60084FC70 /* PubNub+Presence.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0601BD03DE4001FC34D /* PubNub+Presence.m */; }; 7915823D1BD709C60084FC70 /* PNSubscriber.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0741BD03DE4001FC34D /* PNSubscriber.m */; }; - 7915823E1BD709C60084FC70 /* PNURLBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F71BD03DE4001FC34D /* PNURLBuilder.m */; }; 7915823F1BD709C60084FC70 /* PNChannelGroupClientStateResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0861BD03DE4001FC34D /* PNChannelGroupClientStateResult.m */; }; 791582411BD709C60084FC70 /* PNPresenceChannelGroupHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0911BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.m */; }; - 791582421BD709C60084FC70 /* PNHeartbeatParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D91BD03DE4001FC34D /* PNHeartbeatParser.m */; }; 791582431BD709C60084FC70 /* PNStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A21BD03DE4001FC34D /* PNStatus.m */; }; 791582441BD709C60084FC70 /* PNArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0AD1BD03DE4001FC34D /* PNArray.m */; }; - 791582451BD709C60084FC70 /* PNNetworkResponseSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F11BD03DE4001FC34D /* PNNetworkResponseSerializer.m */; }; 791582461BD709C60084FC70 /* PubNub+Subscribe.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0671BD03DE4001FC34D /* PubNub+Subscribe.m */; }; 791582471BD709C60084FC70 /* PNAPNSEnabledChannelsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0801BD03DE4001FC34D /* PNAPNSEnabledChannelsResult.m */; }; 791582481BD709C60084FC70 /* PNOperationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB09C1BD03DE4001FC34D /* PNOperationResult.m */; }; 791582491BD709C60084FC70 /* PNPresenceChannelHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0931BD03DE4001FC34D /* PNPresenceChannelHereNowResult.m */; }; - 7915824A1BD709C60084FC70 /* PNClientStateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D51BD03DE4001FC34D /* PNClientStateParser.m */; }; 7915824B1BD709C60084FC70 /* PubNub+Publish.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0631BD03DE4001FC34D /* PubNub+Publish.m */; }; - 7915824C1BD709C60084FC70 /* PNPresenceHereNowParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E11BD03DE4001FC34D /* PNPresenceHereNowParser.m */; }; 7915824F1BD709C60084FC70 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79CBB19E1BD03EE4001FC34D /* UIKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 791582501BD709C60084FC70 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 79CBB1A01BD03EEA001FC34D /* libz.tbd */; }; 791582521BD709C60084FC70 /* PNPresenceChannelGroupHereNowResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0901BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -147,12 +126,9 @@ 791582591BD709C60084FC70 /* PNChannelClientStateResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0811BD03DE4001FC34D /* PNChannelClientStateResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7915825A1BD709C60084FC70 /* PNClientStateUpdateStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0891BD03DE4001FC34D /* PNClientStateUpdateStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7915825B1BD709C60084FC70 /* PNAcknowledgmentStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB07D1BD03DE4001FC34D /* PNAcknowledgmentStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7915825C1BD709C60084FC70 /* PNChannelGroupsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0871BD03DE4001FC34D /* PNChannelGroupsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7915825D1BD709C60084FC70 /* PubNub+ChannelGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0581BD03DE4001FC34D /* PubNub+ChannelGroup.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7915825E1BD709C60084FC70 /* PNEventsListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0CC1BD03DE4001FC34D /* PNEventsListener.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7915825F1BD709C60084FC70 /* PNSubscriberResults.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A31BD03DE4001FC34D /* PNSubscriberResults.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791582601BD709C60084FC70 /* PNClientInformation.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0771BD03DE4001FC34D /* PNClientInformation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 791582611BD709C60084FC70 /* PNPushNotificationsAuditParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E41BD03DE4001FC34D /* PNPushNotificationsAuditParser.h */; }; 791582621BD709C60084FC70 /* PubNub+Subscribe.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0661BD03DE4001FC34D /* PubNub+Subscribe.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791582631BD709C60084FC70 /* PNSubscribeStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A51BD03DE4001FC34D /* PNSubscribeStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791582641BD709C60084FC70 /* PubNub+Presence.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB05F1BD03DE4001FC34D /* PubNub+Presence.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -164,7 +140,6 @@ 7915826A1BD709C60084FC70 /* PNServiceData.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB09E1BD03DE4001FC34D /* PNServiceData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7915826B1BD709C60084FC70 /* PubNub+APNS.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0561BD03DE4001FC34D /* PubNub+APNS.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7915826C1BD709C60084FC70 /* PubNub+State.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0641BD03DE4001FC34D /* PubNub+State.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7915826D1BD709C60084FC70 /* PNErrorCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C81BD03DE4001FC34D /* PNErrorCodes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7915826E1BD709C60084FC70 /* PubNub+Time.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0691BD03DE4001FC34D /* PubNub+Time.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7915826F1BD709C60084FC70 /* PubNub+Core.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB05A1BD03DE4001FC34D /* PubNub+Core.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791582701BD709C60084FC70 /* PNTimeResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A71BD03DE4001FC34D /* PNTimeResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -174,47 +149,30 @@ 791582741BD709C60084FC70 /* PNOperationResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB09B1BD03DE4001FC34D /* PNOperationResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791582751BD709C60084FC70 /* PubNub.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0411BD03D3F001FC34D /* PubNub.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791582761BD709C60084FC70 /* PNAES.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0751BD03DE4001FC34D /* PNAES.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 791582771BD709C60084FC70 /* PNPushNotificationsStateModificationParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E61BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.h */; }; 791582781BD709C60084FC70 /* PNHeartbeat.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB06F1BD03DE4001FC34D /* PNHeartbeat.h */; }; - 791582791BD709C60084FC70 /* PNErrorParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D61BD03DE4001FC34D /* PNErrorParser.h */; }; 7915827A1BD709C60084FC70 /* PNPrivateStructures.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C91BD03DE4001FC34D /* PNPrivateStructures.h */; }; 7915827B1BD709C60084FC70 /* PNJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B91BD03DE4001FC34D /* PNJSON.h */; }; - 7915827C1BD709C60084FC70 /* PNTimeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EC1BD03DE4001FC34D /* PNTimeParser.h */; }; 7915827D1BD709C60084FC70 /* PNGZIP.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B61BD03DE4001FC34D /* PNGZIP.h */; }; - 7915827E1BD709C60084FC70 /* PNURLBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F61BD03DE4001FC34D /* PNURLBuilder.h */; }; 7915827F1BD709C60084FC70 /* PNHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B81BD03DE4001FC34D /* PNHelpers.h */; }; 791582811BD709C60084FC70 /* PNReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F21BD03DE4001FC34D /* PNReachability.h */; }; - 791582821BD709C60084FC70 /* PNSubscribeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EA1BD03DE4001FC34D /* PNSubscribeParser.h */; }; 791582831BD709C60084FC70 /* PNURLRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0BD1BD03DE4001FC34D /* PNURLRequest.h */; }; 791582841BD709C60084FC70 /* PNStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A01BD03DE4001FC34D /* PNStatus+Private.h */; }; 791582851BD709C60084FC70 /* PNLogMacro.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C61BD03DE4001FC34D /* PNLogMacro.h */; }; - 791582861BD709C60084FC70 /* PNHeartbeatParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D81BD03DE4001FC34D /* PNHeartbeatParser.h */; }; 791582871BD709C60084FC70 /* PNServiceData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB09D1BD03DE4001FC34D /* PNServiceData+Private.h */; }; - 791582881BD709C60084FC70 /* PNNetworkResponseSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F01BD03DE4001FC34D /* PNNetworkResponseSerializer.h */; }; 791582891BD709C60084FC70 /* PNClientState.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB06D1BD03DE4001FC34D /* PNClientState.h */; }; 7915828B1BD709C60084FC70 /* PNString.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0BB1BD03DE4001FC34D /* PNString.h */; }; 7915828C1BD709C60084FC70 /* PNParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0CD1BD03DE4001FC34D /* PNParser.h */; }; - 7915828D1BD709C60084FC70 /* PNLeaveParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DC1BD03DE4001FC34D /* PNLeaveParser.h */; }; 7915828E1BD709C60084FC70 /* PNData.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B21BD03DE4001FC34D /* PNData.h */; }; 7915828F1BD709C60084FC70 /* PNArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0AC1BD03DE4001FC34D /* PNArray.h */; }; - 791582901BD709C60084FC70 /* PNRequestParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F41BD03DE4001FC34D /* PNRequestParameters.h */; }; - 791582911BD709C60084FC70 /* PNHistoryParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DA1BD03DE4001FC34D /* PNHistoryParser.h */; }; - 791582921BD709C60084FC70 /* PNMessagePublishParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DE1BD03DE4001FC34D /* PNMessagePublishParser.h */; }; 791582931BD709C60084FC70 /* PNChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0AE1BD03DE4001FC34D /* PNChannel.h */; }; 791582941BD709C60084FC70 /* PNSubscriber.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0731BD03DE4001FC34D /* PNSubscriber.h */; }; 791582951BD709C60084FC70 /* PubNub+PresencePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0611BD03DE4001FC34D /* PubNub+PresencePrivate.h */; }; - 791582961BD709C60084FC70 /* PNPresenceWhereNowParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E21BD03DE4001FC34D /* PNPresenceWhereNowParser.h */; }; 791582971BD709C60084FC70 /* PNDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B41BD03DE4001FC34D /* PNDictionary.h */; }; - 791582991BD709C60084FC70 /* PNNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EE1BD03DE4001FC34D /* PNNetwork.h */; }; - 7915829B1BD709C60084FC70 /* PNClientStateParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D41BD03DE4001FC34D /* PNClientStateParser.h */; }; 7915829C1BD709C60084FC70 /* PNConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C71BD03DE4001FC34D /* PNConstants.h */; }; 7915829D1BD709C60084FC70 /* PNStateListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0711BD03DE4001FC34D /* PNStateListener.h */; }; 7915829E1BD709C60084FC70 /* PNOperationResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB09A1BD03DE4001FC34D /* PNOperationResult+Private.h */; }; 7915829F1BD709C60084FC70 /* PubNub+CorePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB05C1BD03DE4001FC34D /* PubNub+CorePrivate.h */; }; - 791582A01BD709C60084FC70 /* PNChannelGroupAuditionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D01BD03DE4001FC34D /* PNChannelGroupAuditionParser.h */; }; 791582A11BD709C60084FC70 /* PubNub+SubscribePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0681BD03DE4001FC34D /* PubNub+SubscribePrivate.h */; }; - 791582A21BD709C60084FC70 /* PNChannelGroupModificationParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D21BD03DE4001FC34D /* PNChannelGroupModificationParser.h */; }; - 791582A41BD709C60084FC70 /* PNPresenceHereNowParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E01BD03DE4001FC34D /* PNPresenceHereNowParser.h */; }; 791582A61BD709C60084FC70 /* PNErrorStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB08B1BD03DE4001FC34D /* PNErrorStatus+Private.h */; }; 791582B21BD709D10084FC70 /* PubNub+History.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB05E1BD03DE4001FC34D /* PubNub+History.m */; }; 791582B31BD709D10084FC70 /* PNPresenceGlobalHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0951BD03DE4001FC34D /* PNPresenceGlobalHereNowResult.m */; }; @@ -225,60 +183,39 @@ 791582B91BD709D10084FC70 /* PNDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0B51BD03DE4001FC34D /* PNDictionary.m */; }; 791582BA1BD709D10084FC70 /* PNSubscribeStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A61BD03DE4001FC34D /* PNSubscribeStatus.m */; }; 791582BB1BD709D10084FC70 /* PNConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB07B1BD03DE4001FC34D /* PNConfiguration.m */; }; - 791582BC1BD709D10084FC70 /* PNHistoryParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DB1BD03DE4001FC34D /* PNHistoryParser.m */; }; 791582BD1BD709D10084FC70 /* PNGZIP.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0B71BD03DE4001FC34D /* PNGZIP.m */; }; - 791582BE1BD709D10084FC70 /* PNPushNotificationsStateModificationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E71BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.m */; }; 791582BF1BD709D10084FC70 /* PNJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0BA1BD03DE4001FC34D /* PNJSON.m */; }; 791582C01BD709D10084FC70 /* PNPresenceWhereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0971BD03DE4001FC34D /* PNPresenceWhereNowResult.m */; }; 791582C11BD709D10084FC70 /* PubNub+APNS.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0571BD03DE4001FC34D /* PubNub+APNS.m */; }; - 791582C21BD709D10084FC70 /* PNChannelGroupAuditionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D11BD03DE4001FC34D /* PNChannelGroupAuditionParser.m */; }; - 791582C31BD709D10084FC70 /* PNChannelGroupsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0881BD03DE4001FC34D /* PNChannelGroupsResult.m */; }; 791582C41BD709D10084FC70 /* PubNub+Time.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB06A1BD03DE4001FC34D /* PubNub+Time.m */; }; 791582C51BD709D10084FC70 /* PNErrorStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08D1BD03DE4001FC34D /* PNErrorStatus.m */; }; 791582C61BD709D10084FC70 /* PubNub+State.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0651BD03DE4001FC34D /* PubNub+State.m */; }; - 791582C71BD709D10084FC70 /* PNPushNotificationsAuditParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E51BD03DE4001FC34D /* PNPushNotificationsAuditParser.m */; }; 791582C81BD709D10084FC70 /* PNStateListener.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0721BD03DE4001FC34D /* PNStateListener.m */; }; 791582C91BD709D10084FC70 /* PNHeartbeat.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0701BD03DE4001FC34D /* PNHeartbeat.m */; }; 791582CA1BD709D10084FC70 /* PNAcknowledgmentStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB07E1BD03DE4001FC34D /* PNAcknowledgmentStatus.m */; }; 791582CB1BD709D10084FC70 /* PubNub+ChannelGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0591BD03DE4001FC34D /* PubNub+ChannelGroup.m */; }; - 791582CC1BD709D10084FC70 /* PNRequestParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F51BD03DE4001FC34D /* PNRequestParameters.m */; }; 791582CD1BD709D10084FC70 /* PNHistoryResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08F1BD03DE4001FC34D /* PNHistoryResult.m */; }; - 791582CE1BD709D10084FC70 /* PNErrorParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D71BD03DE4001FC34D /* PNErrorParser.m */; }; 791582CF1BD709D10084FC70 /* PNChannelClientStateResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0821BD03DE4001FC34D /* PNChannelClientStateResult.m */; }; - 791582D01BD709D10084FC70 /* PNPresenceWhereNowParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E31BD03DE4001FC34D /* PNPresenceWhereNowParser.m */; }; 791582D11BD709D10084FC70 /* PNChannel.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0AF1BD03DE4001FC34D /* PNChannel.m */; }; - 791582D21BD709D10084FC70 /* PNSubscriberResults.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A41BD03DE4001FC34D /* PNSubscriberResults.m */; }; - 791582D31BD709D10084FC70 /* PNChannelGroupModificationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D31BD03DE4001FC34D /* PNChannelGroupModificationParser.m */; }; 791582D51BD709D10084FC70 /* PNClientInformation.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0781BD03DE4001FC34D /* PNClientInformation.m */; }; 791582D61BD709D10084FC70 /* PNChannelGroupChannelsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0841BD03DE4001FC34D /* PNChannelGroupChannelsResult.m */; }; - 791582D71BD709D10084FC70 /* PNLeaveParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DD1BD03DE4001FC34D /* PNLeaveParser.m */; }; 791582D81BD709D10084FC70 /* PNClientState.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB06E1BD03DE4001FC34D /* PNClientState.m */; }; - 791582D91BD709D10084FC70 /* PNSubscribeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0EB1BD03DE4001FC34D /* PNSubscribeParser.m */; }; - 791582DA1BD709D10084FC70 /* PNMessagePublishParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DF1BD03DE4001FC34D /* PNMessagePublishParser.m */; }; 791582DB1BD709D10084FC70 /* PNURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0BE1BD03DE4001FC34D /* PNURLRequest.m */; }; - 791582DC1BD709D10084FC70 /* PNTimeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0ED1BD03DE4001FC34D /* PNTimeParser.m */; }; 791582DD1BD709D10084FC70 /* PNTimeResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A81BD03DE4001FC34D /* PNTimeResult.m */; }; 791582DF1BD709D10084FC70 /* PNServiceData.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB09F1BD03DE4001FC34D /* PNServiceData.m */; }; - 791582E01BD709D10084FC70 /* PNClientStateUpdateStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08A1BD03DE4001FC34D /* PNClientStateUpdateStatus.m */; }; 791582E11BD709D10084FC70 /* PNAES.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0761BD03DE4001FC34D /* PNAES.m */; }; - 791582E21BD709D10084FC70 /* PNNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0EF1BD03DE4001FC34D /* PNNetwork.m */; }; 791582E41BD709D10084FC70 /* PNPublishStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0991BD03DE4001FC34D /* PNPublishStatus.m */; }; 791582E51BD709D10084FC70 /* PubNub+Presence.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0601BD03DE4001FC34D /* PubNub+Presence.m */; }; 791582E61BD709D10084FC70 /* PNSubscriber.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0741BD03DE4001FC34D /* PNSubscriber.m */; }; - 791582E71BD709D10084FC70 /* PNURLBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F71BD03DE4001FC34D /* PNURLBuilder.m */; }; 791582E81BD709D10084FC70 /* PNChannelGroupClientStateResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0861BD03DE4001FC34D /* PNChannelGroupClientStateResult.m */; }; 791582EA1BD709D10084FC70 /* PNPresenceChannelGroupHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0911BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.m */; }; - 791582EB1BD709D10084FC70 /* PNHeartbeatParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D91BD03DE4001FC34D /* PNHeartbeatParser.m */; }; 791582EC1BD709D10084FC70 /* PNStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A21BD03DE4001FC34D /* PNStatus.m */; }; 791582ED1BD709D10084FC70 /* PNArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0AD1BD03DE4001FC34D /* PNArray.m */; }; - 791582EE1BD709D10084FC70 /* PNNetworkResponseSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F11BD03DE4001FC34D /* PNNetworkResponseSerializer.m */; }; 791582EF1BD709D10084FC70 /* PubNub+Subscribe.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0671BD03DE4001FC34D /* PubNub+Subscribe.m */; }; 791582F01BD709D10084FC70 /* PNAPNSEnabledChannelsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0801BD03DE4001FC34D /* PNAPNSEnabledChannelsResult.m */; }; 791582F11BD709D10084FC70 /* PNOperationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB09C1BD03DE4001FC34D /* PNOperationResult.m */; }; 791582F21BD709D10084FC70 /* PNPresenceChannelHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0931BD03DE4001FC34D /* PNPresenceChannelHereNowResult.m */; }; - 791582F31BD709D10084FC70 /* PNClientStateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D51BD03DE4001FC34D /* PNClientStateParser.m */; }; 791582F41BD709D10084FC70 /* PubNub+Publish.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0631BD03DE4001FC34D /* PubNub+Publish.m */; }; - 791582F51BD709D10084FC70 /* PNPresenceHereNowParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E11BD03DE4001FC34D /* PNPresenceHereNowParser.m */; }; 791582F81BD709D10084FC70 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79CBB19E1BD03EE4001FC34D /* UIKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 791582F91BD709D10084FC70 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 79CBB1A01BD03EEA001FC34D /* libz.tbd */; }; 791582FB1BD709D10084FC70 /* PNPresenceChannelGroupHereNowResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0901BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -291,12 +228,9 @@ 791583021BD709D10084FC70 /* PNChannelClientStateResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0811BD03DE4001FC34D /* PNChannelClientStateResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791583031BD709D10084FC70 /* PNClientStateUpdateStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0891BD03DE4001FC34D /* PNClientStateUpdateStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791583041BD709D10084FC70 /* PNAcknowledgmentStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB07D1BD03DE4001FC34D /* PNAcknowledgmentStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 791583051BD709D10084FC70 /* PNChannelGroupsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0871BD03DE4001FC34D /* PNChannelGroupsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791583061BD709D10084FC70 /* PubNub+ChannelGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0581BD03DE4001FC34D /* PubNub+ChannelGroup.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791583071BD709D10084FC70 /* PNEventsListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0CC1BD03DE4001FC34D /* PNEventsListener.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 791583081BD709D10084FC70 /* PNSubscriberResults.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A31BD03DE4001FC34D /* PNSubscriberResults.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791583091BD709D10084FC70 /* PNClientInformation.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0771BD03DE4001FC34D /* PNClientInformation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7915830A1BD709D10084FC70 /* PNPushNotificationsAuditParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E41BD03DE4001FC34D /* PNPushNotificationsAuditParser.h */; }; 7915830B1BD709D10084FC70 /* PubNub+Subscribe.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0661BD03DE4001FC34D /* PubNub+Subscribe.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7915830C1BD709D10084FC70 /* PNSubscribeStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A51BD03DE4001FC34D /* PNSubscribeStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7915830D1BD709D10084FC70 /* PubNub+Presence.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB05F1BD03DE4001FC34D /* PubNub+Presence.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -308,7 +242,6 @@ 791583131BD709D10084FC70 /* PNServiceData.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB09E1BD03DE4001FC34D /* PNServiceData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791583141BD709D10084FC70 /* PubNub+APNS.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0561BD03DE4001FC34D /* PubNub+APNS.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791583151BD709D10084FC70 /* PubNub+State.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0641BD03DE4001FC34D /* PubNub+State.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 791583161BD709D10084FC70 /* PNErrorCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C81BD03DE4001FC34D /* PNErrorCodes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791583171BD709D10084FC70 /* PubNub+Time.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0691BD03DE4001FC34D /* PubNub+Time.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791583181BD709D10084FC70 /* PubNub+Core.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB05A1BD03DE4001FC34D /* PubNub+Core.h */; settings = {ATTRIBUTES = (Public, ); }; }; 791583191BD709D10084FC70 /* PNTimeResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A71BD03DE4001FC34D /* PNTimeResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -318,47 +251,30 @@ 7915831D1BD709D10084FC70 /* PNOperationResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB09B1BD03DE4001FC34D /* PNOperationResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7915831E1BD709D10084FC70 /* PubNub.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0411BD03D3F001FC34D /* PubNub.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7915831F1BD709D10084FC70 /* PNAES.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0751BD03DE4001FC34D /* PNAES.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 791583201BD709D10084FC70 /* PNPushNotificationsStateModificationParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E61BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.h */; }; 791583211BD709D10084FC70 /* PNHeartbeat.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB06F1BD03DE4001FC34D /* PNHeartbeat.h */; }; - 791583221BD709D10084FC70 /* PNErrorParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D61BD03DE4001FC34D /* PNErrorParser.h */; }; 791583231BD709D10084FC70 /* PNPrivateStructures.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C91BD03DE4001FC34D /* PNPrivateStructures.h */; }; 791583241BD709D10084FC70 /* PNJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B91BD03DE4001FC34D /* PNJSON.h */; }; - 791583251BD709D10084FC70 /* PNTimeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EC1BD03DE4001FC34D /* PNTimeParser.h */; }; 791583261BD709D10084FC70 /* PNGZIP.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B61BD03DE4001FC34D /* PNGZIP.h */; }; - 791583271BD709D10084FC70 /* PNURLBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F61BD03DE4001FC34D /* PNURLBuilder.h */; }; 791583281BD709D10084FC70 /* PNHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B81BD03DE4001FC34D /* PNHelpers.h */; }; 7915832A1BD709D10084FC70 /* PNReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F21BD03DE4001FC34D /* PNReachability.h */; }; - 7915832B1BD709D10084FC70 /* PNSubscribeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EA1BD03DE4001FC34D /* PNSubscribeParser.h */; }; 7915832C1BD709D10084FC70 /* PNURLRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0BD1BD03DE4001FC34D /* PNURLRequest.h */; }; 7915832D1BD709D10084FC70 /* PNStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A01BD03DE4001FC34D /* PNStatus+Private.h */; }; 7915832E1BD709D10084FC70 /* PNLogMacro.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C61BD03DE4001FC34D /* PNLogMacro.h */; }; - 7915832F1BD709D10084FC70 /* PNHeartbeatParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D81BD03DE4001FC34D /* PNHeartbeatParser.h */; }; 791583301BD709D10084FC70 /* PNServiceData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB09D1BD03DE4001FC34D /* PNServiceData+Private.h */; }; - 791583311BD709D10084FC70 /* PNNetworkResponseSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F01BD03DE4001FC34D /* PNNetworkResponseSerializer.h */; }; 791583321BD709D10084FC70 /* PNClientState.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB06D1BD03DE4001FC34D /* PNClientState.h */; }; 791583341BD709D10084FC70 /* PNString.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0BB1BD03DE4001FC34D /* PNString.h */; }; 791583351BD709D10084FC70 /* PNParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0CD1BD03DE4001FC34D /* PNParser.h */; }; - 791583361BD709D10084FC70 /* PNLeaveParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DC1BD03DE4001FC34D /* PNLeaveParser.h */; }; 791583371BD709D10084FC70 /* PNData.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B21BD03DE4001FC34D /* PNData.h */; }; 791583381BD709D10084FC70 /* PNArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0AC1BD03DE4001FC34D /* PNArray.h */; }; - 791583391BD709D10084FC70 /* PNRequestParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F41BD03DE4001FC34D /* PNRequestParameters.h */; }; - 7915833A1BD709D10084FC70 /* PNHistoryParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DA1BD03DE4001FC34D /* PNHistoryParser.h */; }; - 7915833B1BD709D10084FC70 /* PNMessagePublishParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DE1BD03DE4001FC34D /* PNMessagePublishParser.h */; }; 7915833C1BD709D10084FC70 /* PNChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0AE1BD03DE4001FC34D /* PNChannel.h */; }; 7915833D1BD709D10084FC70 /* PNSubscriber.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0731BD03DE4001FC34D /* PNSubscriber.h */; }; 7915833E1BD709D10084FC70 /* PubNub+PresencePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0611BD03DE4001FC34D /* PubNub+PresencePrivate.h */; }; - 7915833F1BD709D10084FC70 /* PNPresenceWhereNowParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E21BD03DE4001FC34D /* PNPresenceWhereNowParser.h */; }; 791583401BD709D10084FC70 /* PNDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B41BD03DE4001FC34D /* PNDictionary.h */; }; - 791583421BD709D10084FC70 /* PNNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EE1BD03DE4001FC34D /* PNNetwork.h */; }; - 791583441BD709D10084FC70 /* PNClientStateParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D41BD03DE4001FC34D /* PNClientStateParser.h */; }; 791583451BD709D10084FC70 /* PNConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C71BD03DE4001FC34D /* PNConstants.h */; }; 791583461BD709D10084FC70 /* PNStateListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0711BD03DE4001FC34D /* PNStateListener.h */; }; 791583471BD709D10084FC70 /* PNOperationResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB09A1BD03DE4001FC34D /* PNOperationResult+Private.h */; }; 791583481BD709D10084FC70 /* PubNub+CorePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB05C1BD03DE4001FC34D /* PubNub+CorePrivate.h */; }; - 791583491BD709D10084FC70 /* PNChannelGroupAuditionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D01BD03DE4001FC34D /* PNChannelGroupAuditionParser.h */; }; 7915834A1BD709D10084FC70 /* PubNub+SubscribePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0681BD03DE4001FC34D /* PubNub+SubscribePrivate.h */; }; - 7915834B1BD709D10084FC70 /* PNChannelGroupModificationParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D21BD03DE4001FC34D /* PNChannelGroupModificationParser.h */; }; - 7915834D1BD709D10084FC70 /* PNPresenceHereNowParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E01BD03DE4001FC34D /* PNPresenceHereNowParser.h */; }; 7915834F1BD709D10084FC70 /* PNErrorStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB08B1BD03DE4001FC34D /* PNErrorStatus+Private.h */; }; 7925DB871D3FFCAC00857C0D /* PNLLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 7925DB821D3FFCAC00857C0D /* PNLLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7925DB881D3FFCAC00857C0D /* PNLLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 7925DB821D3FFCAC00857C0D /* PNLLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -456,21 +372,6 @@ 797ABBBB24C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 797ABBB324C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.m */; }; 797ABBBC24C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 797ABBB324C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.m */; }; 797ABBBD24C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 797ABBB324C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.m */; }; - 797ABBCC24C6E8650008CA1E /* PNDeleteFileParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 797ABBCA24C6E8650008CA1E /* PNDeleteFileParser.h */; }; - 797ABBCD24C6E8650008CA1E /* PNDeleteFileParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 797ABBCA24C6E8650008CA1E /* PNDeleteFileParser.h */; }; - 797ABBCE24C6E8650008CA1E /* PNDeleteFileParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 797ABBCA24C6E8650008CA1E /* PNDeleteFileParser.h */; }; - 797ABBCF24C6E8650008CA1E /* PNDeleteFileParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 797ABBCA24C6E8650008CA1E /* PNDeleteFileParser.h */; }; - 797ABBD024C6E8650008CA1E /* PNDeleteFileParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 797ABBCA24C6E8650008CA1E /* PNDeleteFileParser.h */; }; - 797ABBD124C6E8650008CA1E /* PNDeleteFileParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 797ABBCB24C6E8650008CA1E /* PNDeleteFileParser.m */; }; - 797ABBD224C6E8650008CA1E /* PNDeleteFileParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 797ABBCB24C6E8650008CA1E /* PNDeleteFileParser.m */; }; - 797ABBD324C6E8650008CA1E /* PNDeleteFileParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 797ABBCB24C6E8650008CA1E /* PNDeleteFileParser.m */; }; - 797ABBD424C6E8650008CA1E /* PNDeleteFileParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 797ABBCB24C6E8650008CA1E /* PNDeleteFileParser.m */; }; - 797ABBD524C6E8650008CA1E /* PNDeleteFileParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 797ABBCB24C6E8650008CA1E /* PNDeleteFileParser.m */; }; - 797ABBD724C9ADB80008CA1E /* PNSendFileStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 797ABBD624C9ADB80008CA1E /* PNSendFileStatus+Private.h */; }; - 797ABBD824C9ADB80008CA1E /* PNSendFileStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 797ABBD624C9ADB80008CA1E /* PNSendFileStatus+Private.h */; }; - 797ABBD924C9ADB80008CA1E /* PNSendFileStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 797ABBD624C9ADB80008CA1E /* PNSendFileStatus+Private.h */; }; - 797ABBDA24C9ADB80008CA1E /* PNSendFileStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 797ABBD624C9ADB80008CA1E /* PNSendFileStatus+Private.h */; }; - 797ABBDB24C9ADB80008CA1E /* PNSendFileStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 797ABBD624C9ADB80008CA1E /* PNSendFileStatus+Private.h */; }; 797D605A22D2E41100E64C94 /* PNSignalAPICallBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 797D605822D2E41000E64C94 /* PNSignalAPICallBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; 797D605B22D2E41100E64C94 /* PNSignalAPICallBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 797D605822D2E41000E64C94 /* PNSignalAPICallBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; 797D605C22D2E41100E64C94 /* PNSignalAPICallBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 797D605822D2E41000E64C94 /* PNSignalAPICallBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -515,7 +416,6 @@ 7988423E1C18F12E003E8948 /* PNChannelClientStateResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0811BD03DE4001FC34D /* PNChannelClientStateResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7988423F1C18F132003E8948 /* PNChannelGroupChannelsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0831BD03DE4001FC34D /* PNChannelGroupChannelsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 798842401C18F13C003E8948 /* PNChannelGroupClientStateResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0851BD03DE4001FC34D /* PNChannelGroupClientStateResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 798842411C18F140003E8948 /* PNChannelGroupsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0871BD03DE4001FC34D /* PNChannelGroupsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 798842421C18F146003E8948 /* PNClientStateUpdateStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0891BD03DE4001FC34D /* PNClientStateUpdateStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 798842431C18F14E003E8948 /* PNErrorStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB08B1BD03DE4001FC34D /* PNErrorStatus+Private.h */; }; 798842441C18F151003E8948 /* PNErrorStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB08C1BD03DE4001FC34D /* PNErrorStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -550,8 +450,6 @@ 798842621C18F1E3003E8948 /* PNChannelClientStateResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0821BD03DE4001FC34D /* PNChannelClientStateResult.m */; }; 798842631C18F1E3003E8948 /* PNChannelGroupChannelsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0841BD03DE4001FC34D /* PNChannelGroupChannelsResult.m */; }; 798842641C18F1E3003E8948 /* PNChannelGroupClientStateResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0861BD03DE4001FC34D /* PNChannelGroupClientStateResult.m */; }; - 798842651C18F1E3003E8948 /* PNChannelGroupsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0881BD03DE4001FC34D /* PNChannelGroupsResult.m */; }; - 798842661C18F1E3003E8948 /* PNClientStateUpdateStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08A1BD03DE4001FC34D /* PNClientStateUpdateStatus.m */; }; 798842671C18F1E3003E8948 /* PNErrorStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08D1BD03DE4001FC34D /* PNErrorStatus.m */; }; 798842681C18F1E3003E8948 /* PNHistoryResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08F1BD03DE4001FC34D /* PNHistoryResult.m */; }; 798842691C18F1E3003E8948 /* PNPresenceChannelGroupHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0911BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.m */; }; @@ -562,16 +460,13 @@ 7988426E1C18F1E3003E8948 /* PNOperationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB09C1BD03DE4001FC34D /* PNOperationResult.m */; }; 7988426F1C18F1E3003E8948 /* PNServiceData.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB09F1BD03DE4001FC34D /* PNServiceData.m */; }; 798842701C18F1E3003E8948 /* PNStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A21BD03DE4001FC34D /* PNStatus.m */; }; - 798842711C18F1E3003E8948 /* PNSubscriberResults.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A41BD03DE4001FC34D /* PNSubscriberResults.m */; }; 798842721C18F1E3003E8948 /* PNSubscribeStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A61BD03DE4001FC34D /* PNSubscribeStatus.m */; }; 798842731C18F1E3003E8948 /* PNTimeResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A81BD03DE4001FC34D /* PNTimeResult.m */; }; 798842741C18F1FB003E8948 /* PNStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A01BD03DE4001FC34D /* PNStatus+Private.h */; }; 798842751C18F1FE003E8948 /* PNStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A11BD03DE4001FC34D /* PNStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 798842761C18F205003E8948 /* PNSubscriberResults.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A31BD03DE4001FC34D /* PNSubscriberResults.h */; settings = {ATTRIBUTES = (Public, ); }; }; 798842771C18F208003E8948 /* PNSubscribeStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A51BD03DE4001FC34D /* PNSubscribeStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 798842781C18F20C003E8948 /* PNTimeResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A71BD03DE4001FC34D /* PNTimeResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 798842791C18F255003E8948 /* PNConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C71BD03DE4001FC34D /* PNConstants.h */; }; - 7988427A1C18F25E003E8948 /* PNErrorCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C81BD03DE4001FC34D /* PNErrorCodes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7988427B1C18F263003E8948 /* PNPrivateStructures.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C91BD03DE4001FC34D /* PNPrivateStructures.h */; }; 7988427C1C18F267003E8948 /* PNStructures.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0CA1BD03DE4001FC34D /* PNStructures.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7988427D1C18F26E003E8948 /* PNEventsListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0CC1BD03DE4001FC34D /* PNEventsListener.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -596,44 +491,8 @@ 798842921C18F292003E8948 /* PNString.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0BC1BD03DE4001FC34D /* PNString.m */; }; 798842931C18F292003E8948 /* PNURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0BE1BD03DE4001FC34D /* PNURLRequest.m */; }; 7988429A1C18F2AD003E8948 /* PNLogMacro.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C61BD03DE4001FC34D /* PNLogMacro.h */; }; - 7988429B1C18F2BC003E8948 /* PNNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EE1BD03DE4001FC34D /* PNNetwork.h */; }; - 7988429C1C18F2BC003E8948 /* PNNetworkResponseSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F01BD03DE4001FC34D /* PNNetworkResponseSerializer.h */; }; 7988429D1C18F2BD003E8948 /* PNReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F21BD03DE4001FC34D /* PNReachability.h */; }; - 7988429E1C18F2BD003E8948 /* PNRequestParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F41BD03DE4001FC34D /* PNRequestParameters.h */; }; - 7988429F1C18F2BD003E8948 /* PNURLBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F61BD03DE4001FC34D /* PNURLBuilder.h */; }; - 798842A01C18F2C2003E8948 /* PNNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0EF1BD03DE4001FC34D /* PNNetwork.m */; }; - 798842A11C18F2C2003E8948 /* PNNetworkResponseSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F11BD03DE4001FC34D /* PNNetworkResponseSerializer.m */; }; 798842A21C18F2C2003E8948 /* PNReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F31BD03DE4001FC34D /* PNReachability.m */; }; - 798842A31C18F2C2003E8948 /* PNRequestParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F51BD03DE4001FC34D /* PNRequestParameters.m */; }; - 798842A41C18F2C2003E8948 /* PNURLBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F71BD03DE4001FC34D /* PNURLBuilder.m */; }; - 798842A51C18F2D3003E8948 /* PNChannelGroupAuditionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D01BD03DE4001FC34D /* PNChannelGroupAuditionParser.h */; }; - 798842A61C18F2D3003E8948 /* PNChannelGroupModificationParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D21BD03DE4001FC34D /* PNChannelGroupModificationParser.h */; }; - 798842A71C18F2D3003E8948 /* PNClientStateParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D41BD03DE4001FC34D /* PNClientStateParser.h */; }; - 798842A81C18F2D3003E8948 /* PNErrorParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D61BD03DE4001FC34D /* PNErrorParser.h */; }; - 798842A91C18F2D4003E8948 /* PNHeartbeatParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D81BD03DE4001FC34D /* PNHeartbeatParser.h */; }; - 798842AA1C18F2D4003E8948 /* PNHistoryParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DA1BD03DE4001FC34D /* PNHistoryParser.h */; }; - 798842AB1C18F2D4003E8948 /* PNLeaveParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DC1BD03DE4001FC34D /* PNLeaveParser.h */; }; - 798842AC1C18F2D4003E8948 /* PNMessagePublishParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DE1BD03DE4001FC34D /* PNMessagePublishParser.h */; }; - 798842AD1C18F2D5003E8948 /* PNPresenceHereNowParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E01BD03DE4001FC34D /* PNPresenceHereNowParser.h */; }; - 798842AE1C18F2D5003E8948 /* PNPresenceWhereNowParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E21BD03DE4001FC34D /* PNPresenceWhereNowParser.h */; }; - 798842AF1C18F2D5003E8948 /* PNPushNotificationsAuditParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E41BD03DE4001FC34D /* PNPushNotificationsAuditParser.h */; }; - 798842B01C18F2D5003E8948 /* PNPushNotificationsStateModificationParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E61BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.h */; }; - 798842B21C18F2D6003E8948 /* PNSubscribeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EA1BD03DE4001FC34D /* PNSubscribeParser.h */; }; - 798842B31C18F2D6003E8948 /* PNTimeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EC1BD03DE4001FC34D /* PNTimeParser.h */; }; - 798842B41C18F2EA003E8948 /* PNChannelGroupAuditionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D11BD03DE4001FC34D /* PNChannelGroupAuditionParser.m */; }; - 798842B51C18F2EA003E8948 /* PNChannelGroupModificationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D31BD03DE4001FC34D /* PNChannelGroupModificationParser.m */; }; - 798842B61C18F2EA003E8948 /* PNClientStateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D51BD03DE4001FC34D /* PNClientStateParser.m */; }; - 798842B71C18F2EA003E8948 /* PNErrorParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D71BD03DE4001FC34D /* PNErrorParser.m */; }; - 798842B81C18F2EA003E8948 /* PNHeartbeatParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D91BD03DE4001FC34D /* PNHeartbeatParser.m */; }; - 798842B91C18F2EA003E8948 /* PNHistoryParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DB1BD03DE4001FC34D /* PNHistoryParser.m */; }; - 798842BA1C18F2EA003E8948 /* PNLeaveParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DD1BD03DE4001FC34D /* PNLeaveParser.m */; }; - 798842BB1C18F2EA003E8948 /* PNMessagePublishParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DF1BD03DE4001FC34D /* PNMessagePublishParser.m */; }; - 798842BC1C18F2EA003E8948 /* PNPresenceHereNowParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E11BD03DE4001FC34D /* PNPresenceHereNowParser.m */; }; - 798842BD1C18F2EB003E8948 /* PNPresenceWhereNowParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E31BD03DE4001FC34D /* PNPresenceWhereNowParser.m */; }; - 798842BE1C18F2EB003E8948 /* PNPushNotificationsAuditParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E51BD03DE4001FC34D /* PNPushNotificationsAuditParser.m */; }; - 798842BF1C18F2EB003E8948 /* PNPushNotificationsStateModificationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E71BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.m */; }; - 798842C11C18F2EB003E8948 /* PNSubscribeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0EB1BD03DE4001FC34D /* PNSubscribeParser.m */; }; - 798842C21C18F2EB003E8948 /* PNTimeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0ED1BD03DE4001FC34D /* PNTimeParser.m */; }; 798842EC1C18FC54003E8948 /* PubNub-iOS-Info.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7915839D1BD7119E0084FC70 /* PubNub-iOS-Info.plist */; }; 799D60EA24C1B33900171C29 /* PNSendFileStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 799D60E824C1B33900171C29 /* PNSendFileStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 799D60EB24C1B33900171C29 /* PNSendFileStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 799D60E824C1B33900171C29 /* PNSendFileStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -935,16 +794,6 @@ 79A3E421221569BA00F2ADB9 /* PNMessageCountResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A3E417221569BA00F2ADB9 /* PNMessageCountResult.m */; }; 79A3E422221569BA00F2ADB9 /* PNMessageCountResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A3E417221569BA00F2ADB9 /* PNMessageCountResult.m */; }; 79A3E424221569BA00F2ADB9 /* PNMessageCountResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A3E417221569BA00F2ADB9 /* PNMessageCountResult.m */; }; - 79A3E428221569DA00F2ADB9 /* PNMessageCountParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79A3E426221569DA00F2ADB9 /* PNMessageCountParser.h */; }; - 79A3E429221569DA00F2ADB9 /* PNMessageCountParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79A3E426221569DA00F2ADB9 /* PNMessageCountParser.h */; }; - 79A3E42A221569DA00F2ADB9 /* PNMessageCountParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79A3E426221569DA00F2ADB9 /* PNMessageCountParser.h */; }; - 79A3E42B221569DA00F2ADB9 /* PNMessageCountParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79A3E426221569DA00F2ADB9 /* PNMessageCountParser.h */; }; - 79A3E42D221569DA00F2ADB9 /* PNMessageCountParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79A3E426221569DA00F2ADB9 /* PNMessageCountParser.h */; }; - 79A3E42F221569DA00F2ADB9 /* PNMessageCountParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A3E427221569DA00F2ADB9 /* PNMessageCountParser.m */; }; - 79A3E430221569DA00F2ADB9 /* PNMessageCountParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A3E427221569DA00F2ADB9 /* PNMessageCountParser.m */; }; - 79A3E431221569DA00F2ADB9 /* PNMessageCountParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A3E427221569DA00F2ADB9 /* PNMessageCountParser.m */; }; - 79A3E432221569DA00F2ADB9 /* PNMessageCountParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A3E427221569DA00F2ADB9 /* PNMessageCountParser.m */; }; - 79A3E434221569DA00F2ADB9 /* PNMessageCountParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A3E427221569DA00F2ADB9 /* PNMessageCountParser.m */; }; 79A8BC1E1C58F93900015BDE /* PubNub+History.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB05E1BD03DE4001FC34D /* PubNub+History.m */; }; 79A8BC1F1C58F93900015BDE /* PNPresenceGlobalHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0951BD03DE4001FC34D /* PNPresenceGlobalHereNowResult.m */; }; 79A8BC201C58F93900015BDE /* PNString.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0BC1BD03DE4001FC34D /* PNString.m */; }; @@ -954,62 +803,40 @@ 79A8BC251C58F93900015BDE /* PNDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0B51BD03DE4001FC34D /* PNDictionary.m */; }; 79A8BC261C58F93900015BDE /* PNSubscribeStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A61BD03DE4001FC34D /* PNSubscribeStatus.m */; }; 79A8BC271C58F93900015BDE /* PNConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB07B1BD03DE4001FC34D /* PNConfiguration.m */; }; - 79A8BC281C58F93900015BDE /* PNHistoryParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DB1BD03DE4001FC34D /* PNHistoryParser.m */; }; 79A8BC291C58F93900015BDE /* PNGZIP.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0B71BD03DE4001FC34D /* PNGZIP.m */; }; - 79A8BC2A1C58F93900015BDE /* PNPushNotificationsStateModificationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E71BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.m */; }; 79A8BC2B1C58F93900015BDE /* PNJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0BA1BD03DE4001FC34D /* PNJSON.m */; }; 79A8BC2C1C58F93900015BDE /* PNPresenceWhereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0971BD03DE4001FC34D /* PNPresenceWhereNowResult.m */; }; 79A8BC2D1C58F93900015BDE /* PubNub+APNS.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0571BD03DE4001FC34D /* PubNub+APNS.m */; }; - 79A8BC2E1C58F93900015BDE /* PNChannelGroupAuditionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D11BD03DE4001FC34D /* PNChannelGroupAuditionParser.m */; }; - 79A8BC2F1C58F93900015BDE /* PNChannelGroupsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0881BD03DE4001FC34D /* PNChannelGroupsResult.m */; }; 79A8BC301C58F93900015BDE /* PubNub+Time.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB06A1BD03DE4001FC34D /* PubNub+Time.m */; }; 79A8BC311C58F93900015BDE /* PNErrorStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08D1BD03DE4001FC34D /* PNErrorStatus.m */; }; 79A8BC321C58F93900015BDE /* PubNub+State.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0651BD03DE4001FC34D /* PubNub+State.m */; }; - 79A8BC331C58F93900015BDE /* PNPushNotificationsAuditParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E51BD03DE4001FC34D /* PNPushNotificationsAuditParser.m */; }; 79A8BC341C58F93900015BDE /* PNStateListener.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0721BD03DE4001FC34D /* PNStateListener.m */; }; 79A8BC351C58F93900015BDE /* PNHeartbeat.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0701BD03DE4001FC34D /* PNHeartbeat.m */; }; 79A8BC361C58F93900015BDE /* PNAcknowledgmentStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB07E1BD03DE4001FC34D /* PNAcknowledgmentStatus.m */; }; 79A8BC371C58F93900015BDE /* PubNub+ChannelGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0591BD03DE4001FC34D /* PubNub+ChannelGroup.m */; }; - 79A8BC381C58F93900015BDE /* PNRequestParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F51BD03DE4001FC34D /* PNRequestParameters.m */; }; 79A8BC391C58F93900015BDE /* PNHistoryResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08F1BD03DE4001FC34D /* PNHistoryResult.m */; }; - 79A8BC3A1C58F93900015BDE /* PNErrorParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D71BD03DE4001FC34D /* PNErrorParser.m */; }; 79A8BC3B1C58F93900015BDE /* PNChannelClientStateResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0821BD03DE4001FC34D /* PNChannelClientStateResult.m */; }; - 79A8BC3C1C58F93900015BDE /* PNPresenceWhereNowParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E31BD03DE4001FC34D /* PNPresenceWhereNowParser.m */; }; 79A8BC3D1C58F93900015BDE /* PNChannel.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0AF1BD03DE4001FC34D /* PNChannel.m */; }; - 79A8BC3E1C58F93900015BDE /* PNSubscriberResults.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A41BD03DE4001FC34D /* PNSubscriberResults.m */; }; - 79A8BC3F1C58F93900015BDE /* PNChannelGroupModificationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D31BD03DE4001FC34D /* PNChannelGroupModificationParser.m */; }; 79A8BC411C58F93900015BDE /* PNClientInformation.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0781BD03DE4001FC34D /* PNClientInformation.m */; }; 79A8BC421C58F93900015BDE /* PNChannelGroupChannelsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0841BD03DE4001FC34D /* PNChannelGroupChannelsResult.m */; }; - 79A8BC431C58F93900015BDE /* PNLeaveParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DD1BD03DE4001FC34D /* PNLeaveParser.m */; }; 79A8BC441C58F93900015BDE /* PNClientState.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB06E1BD03DE4001FC34D /* PNClientState.m */; }; - 79A8BC451C58F93900015BDE /* PNSubscribeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0EB1BD03DE4001FC34D /* PNSubscribeParser.m */; }; - 79A8BC461C58F93900015BDE /* PNMessagePublishParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DF1BD03DE4001FC34D /* PNMessagePublishParser.m */; }; 79A8BC471C58F93900015BDE /* PNURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0BE1BD03DE4001FC34D /* PNURLRequest.m */; }; - 79A8BC481C58F93900015BDE /* PNTimeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0ED1BD03DE4001FC34D /* PNTimeParser.m */; }; - 79A8BC491C58F93900015BDE /* PNKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 79E2D0ED1C56434700BAA244 /* PNKeychain.m */; }; 79A8BC4A1C58F93900015BDE /* PNTimeResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A81BD03DE4001FC34D /* PNTimeResult.m */; }; 79A8BC4C1C58F93900015BDE /* PNServiceData.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB09F1BD03DE4001FC34D /* PNServiceData.m */; }; - 79A8BC4D1C58F93900015BDE /* PNClientStateUpdateStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08A1BD03DE4001FC34D /* PNClientStateUpdateStatus.m */; }; 79A8BC4E1C58F93900015BDE /* PNAES.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0761BD03DE4001FC34D /* PNAES.m */; }; - 79A8BC4F1C58F93900015BDE /* PNNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0EF1BD03DE4001FC34D /* PNNetwork.m */; }; 79A8BC511C58F93900015BDE /* PNPublishStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0991BD03DE4001FC34D /* PNPublishStatus.m */; }; 79A8BC521C58F93900015BDE /* PNNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = 793887031BEAD49100DCC662 /* PNNumber.m */; }; 79A8BC531C58F93900015BDE /* PubNub+Presence.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0601BD03DE4001FC34D /* PubNub+Presence.m */; }; 79A8BC541C58F93900015BDE /* PNSubscriber.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0741BD03DE4001FC34D /* PNSubscriber.m */; }; - 79A8BC551C58F93900015BDE /* PNURLBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F71BD03DE4001FC34D /* PNURLBuilder.m */; }; 79A8BC561C58F93900015BDE /* PNChannelGroupClientStateResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0861BD03DE4001FC34D /* PNChannelGroupClientStateResult.m */; }; 79A8BC571C58F93900015BDE /* PNPresenceChannelGroupHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0911BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.m */; }; - 79A8BC581C58F93900015BDE /* PNHeartbeatParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D91BD03DE4001FC34D /* PNHeartbeatParser.m */; }; 79A8BC591C58F93900015BDE /* PNStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A21BD03DE4001FC34D /* PNStatus.m */; }; 79A8BC5A1C58F93900015BDE /* PNArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0AD1BD03DE4001FC34D /* PNArray.m */; }; - 79A8BC5B1C58F93900015BDE /* PNNetworkResponseSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F11BD03DE4001FC34D /* PNNetworkResponseSerializer.m */; }; 79A8BC5C1C58F93900015BDE /* PubNub+Subscribe.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0671BD03DE4001FC34D /* PubNub+Subscribe.m */; }; 79A8BC5D1C58F93900015BDE /* PNAPNSEnabledChannelsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0801BD03DE4001FC34D /* PNAPNSEnabledChannelsResult.m */; }; 79A8BC5E1C58F93900015BDE /* PNOperationResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB09C1BD03DE4001FC34D /* PNOperationResult.m */; }; 79A8BC5F1C58F93900015BDE /* PNPresenceChannelHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0931BD03DE4001FC34D /* PNPresenceChannelHereNowResult.m */; }; - 79A8BC601C58F93900015BDE /* PNClientStateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D51BD03DE4001FC34D /* PNClientStateParser.m */; }; 79A8BC611C58F93900015BDE /* PubNub+Publish.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0631BD03DE4001FC34D /* PubNub+Publish.m */; }; - 79A8BC621C58F93900015BDE /* PNPresenceHereNowParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E11BD03DE4001FC34D /* PNPresenceHereNowParser.m */; }; 79A8BC651C58F93900015BDE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79CBB19E1BD03EE4001FC34D /* UIKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 79A8BC661C58F93900015BDE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 79CBB1A01BD03EEA001FC34D /* libz.tbd */; }; 79A8BC681C58F93900015BDE /* PNPresenceChannelGroupHereNowResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0901BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1022,12 +849,9 @@ 79A8BC6F1C58F93900015BDE /* PNChannelClientStateResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0811BD03DE4001FC34D /* PNChannelClientStateResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC701C58F93900015BDE /* PNClientStateUpdateStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0891BD03DE4001FC34D /* PNClientStateUpdateStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC711C58F93900015BDE /* PNAcknowledgmentStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB07D1BD03DE4001FC34D /* PNAcknowledgmentStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79A8BC721C58F93900015BDE /* PNChannelGroupsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0871BD03DE4001FC34D /* PNChannelGroupsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC731C58F93900015BDE /* PubNub+ChannelGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0581BD03DE4001FC34D /* PubNub+ChannelGroup.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC741C58F93900015BDE /* PNEventsListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0CC1BD03DE4001FC34D /* PNEventsListener.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79A8BC751C58F93900015BDE /* PNSubscriberResults.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A31BD03DE4001FC34D /* PNSubscriberResults.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC761C58F93900015BDE /* PNClientInformation.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0771BD03DE4001FC34D /* PNClientInformation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79A8BC771C58F93900015BDE /* PNPushNotificationsAuditParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E41BD03DE4001FC34D /* PNPushNotificationsAuditParser.h */; }; 79A8BC781C58F93900015BDE /* PubNub+Subscribe.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0661BD03DE4001FC34D /* PubNub+Subscribe.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC791C58F93900015BDE /* PNSubscribeStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A51BD03DE4001FC34D /* PNSubscribeStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC7A1C58F93900015BDE /* PubNub+Presence.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB05F1BD03DE4001FC34D /* PubNub+Presence.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1039,7 +863,6 @@ 79A8BC801C58F93900015BDE /* PNServiceData.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB09E1BD03DE4001FC34D /* PNServiceData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC811C58F93900015BDE /* PubNub+APNS.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0561BD03DE4001FC34D /* PubNub+APNS.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC821C58F93900015BDE /* PubNub+State.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0641BD03DE4001FC34D /* PubNub+State.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79A8BC831C58F93900015BDE /* PNErrorCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C81BD03DE4001FC34D /* PNErrorCodes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC841C58F93900015BDE /* PubNub+Time.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0691BD03DE4001FC34D /* PubNub+Time.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC851C58F93900015BDE /* PubNub+Core.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB05A1BD03DE4001FC34D /* PubNub+Core.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC861C58F93900015BDE /* PNTimeResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A71BD03DE4001FC34D /* PNTimeResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1049,70 +872,37 @@ 79A8BC8A1C58F93900015BDE /* PNOperationResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB09B1BD03DE4001FC34D /* PNOperationResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC8B1C58F93900015BDE /* PubNub.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0411BD03D3F001FC34D /* PubNub.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79A8BC8C1C58F93900015BDE /* PNAES.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0751BD03DE4001FC34D /* PNAES.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79A8BC8D1C58F93900015BDE /* PNPushNotificationsStateModificationParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E61BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.h */; }; 79A8BC8E1C58F93900015BDE /* PNHeartbeat.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB06F1BD03DE4001FC34D /* PNHeartbeat.h */; }; - 79A8BC8F1C58F93900015BDE /* PNErrorParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D61BD03DE4001FC34D /* PNErrorParser.h */; }; 79A8BC901C58F93900015BDE /* PNPrivateStructures.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C91BD03DE4001FC34D /* PNPrivateStructures.h */; }; 79A8BC911C58F93900015BDE /* PNJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B91BD03DE4001FC34D /* PNJSON.h */; }; - 79A8BC921C58F93900015BDE /* PNTimeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EC1BD03DE4001FC34D /* PNTimeParser.h */; }; 79A8BC931C58F93900015BDE /* PNGZIP.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B61BD03DE4001FC34D /* PNGZIP.h */; }; - 79A8BC941C58F93900015BDE /* PNKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 79E2D0EC1C56434700BAA244 /* PNKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79A8BC951C58F93900015BDE /* PNURLBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F61BD03DE4001FC34D /* PNURLBuilder.h */; }; 79A8BC961C58F93900015BDE /* PNHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B81BD03DE4001FC34D /* PNHelpers.h */; }; 79A8BC981C58F93900015BDE /* PNReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F21BD03DE4001FC34D /* PNReachability.h */; }; - 79A8BC991C58F93900015BDE /* PNSubscribeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EA1BD03DE4001FC34D /* PNSubscribeParser.h */; }; 79A8BC9A1C58F93900015BDE /* PNURLRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0BD1BD03DE4001FC34D /* PNURLRequest.h */; }; 79A8BC9B1C58F93900015BDE /* PNStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A01BD03DE4001FC34D /* PNStatus+Private.h */; }; 79A8BC9C1C58F93900015BDE /* PNLogMacro.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C61BD03DE4001FC34D /* PNLogMacro.h */; }; - 79A8BC9D1C58F93900015BDE /* PNHeartbeatParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D81BD03DE4001FC34D /* PNHeartbeatParser.h */; }; 79A8BC9E1C58F93900015BDE /* PNServiceData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB09D1BD03DE4001FC34D /* PNServiceData+Private.h */; }; - 79A8BC9F1C58F93900015BDE /* PNNetworkResponseSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F01BD03DE4001FC34D /* PNNetworkResponseSerializer.h */; }; 79A8BCA01C58F93900015BDE /* PNClientState.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB06D1BD03DE4001FC34D /* PNClientState.h */; }; 79A8BCA21C58F93900015BDE /* PNString.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0BB1BD03DE4001FC34D /* PNString.h */; }; 79A8BCA31C58F93900015BDE /* PNParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0CD1BD03DE4001FC34D /* PNParser.h */; }; - 79A8BCA41C58F93900015BDE /* PNLeaveParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DC1BD03DE4001FC34D /* PNLeaveParser.h */; }; 79A8BCA51C58F93900015BDE /* PNData.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B21BD03DE4001FC34D /* PNData.h */; }; 79A8BCA61C58F93900015BDE /* PNArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0AC1BD03DE4001FC34D /* PNArray.h */; }; - 79A8BCA71C58F93900015BDE /* PNRequestParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F41BD03DE4001FC34D /* PNRequestParameters.h */; }; - 79A8BCA81C58F93900015BDE /* PNHistoryParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DA1BD03DE4001FC34D /* PNHistoryParser.h */; }; - 79A8BCA91C58F93900015BDE /* PNMessagePublishParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DE1BD03DE4001FC34D /* PNMessagePublishParser.h */; }; 79A8BCAA1C58F93900015BDE /* PNChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0AE1BD03DE4001FC34D /* PNChannel.h */; }; 79A8BCAB1C58F93900015BDE /* PNSubscriber.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0731BD03DE4001FC34D /* PNSubscriber.h */; }; 79A8BCAC1C58F93900015BDE /* PubNub+PresencePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0611BD03DE4001FC34D /* PubNub+PresencePrivate.h */; }; - 79A8BCAD1C58F93900015BDE /* PNPresenceWhereNowParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E21BD03DE4001FC34D /* PNPresenceWhereNowParser.h */; }; 79A8BCAE1C58F93900015BDE /* PNNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 793887021BEAD49100DCC662 /* PNNumber.h */; }; 79A8BCAF1C58F93900015BDE /* PNDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0B41BD03DE4001FC34D /* PNDictionary.h */; }; - 79A8BCB11C58F93900015BDE /* PNNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EE1BD03DE4001FC34D /* PNNetwork.h */; }; - 79A8BCB31C58F93900015BDE /* PNClientStateParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D41BD03DE4001FC34D /* PNClientStateParser.h */; }; 79A8BCB41C58F93900015BDE /* PNConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C71BD03DE4001FC34D /* PNConstants.h */; }; 79A8BCB51C58F93900015BDE /* PNStateListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0711BD03DE4001FC34D /* PNStateListener.h */; }; 79A8BCB61C58F93900015BDE /* PNOperationResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB09A1BD03DE4001FC34D /* PNOperationResult+Private.h */; }; 79A8BCB71C58F93900015BDE /* PubNub+CorePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB05C1BD03DE4001FC34D /* PubNub+CorePrivate.h */; }; - 79A8BCB81C58F93900015BDE /* PNChannelGroupAuditionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D01BD03DE4001FC34D /* PNChannelGroupAuditionParser.h */; }; 79A8BCB91C58F93900015BDE /* PubNub+SubscribePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0681BD03DE4001FC34D /* PubNub+SubscribePrivate.h */; }; - 79A8BCBA1C58F93900015BDE /* PNChannelGroupModificationParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D21BD03DE4001FC34D /* PNChannelGroupModificationParser.h */; }; - 79A8BCBB1C58F93900015BDE /* PNPresenceHereNowParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E01BD03DE4001FC34D /* PNPresenceHereNowParser.h */; }; 79A8BCBD1C58F93900015BDE /* PNErrorStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB08B1BD03DE4001FC34D /* PNErrorStatus+Private.h */; }; 79AA8EC926EAB81500ADA747 /* PNConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AA8EC826EAB81500ADA747 /* PNConfiguration+Private.h */; }; 79AA8ECA26EAB81500ADA747 /* PNConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AA8EC826EAB81500ADA747 /* PNConfiguration+Private.h */; }; 79AA8ECB26EAB81500ADA747 /* PNConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AA8EC826EAB81500ADA747 /* PNConfiguration+Private.h */; }; 79AA8ECC26EAB81500ADA747 /* PNConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AA8EC826EAB81500ADA747 /* PNConfiguration+Private.h */; }; 79AA8ECD26EAB81500ADA747 /* PNConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AA8EC826EAB81500ADA747 /* PNConfiguration+Private.h */; }; - 79AA8ECF26EB3A1200ADA747 /* PubNub+PAMPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AA8ECE26EB3A1200ADA747 /* PubNub+PAMPrivate.h */; }; - 79AA8ED026EB3A1200ADA747 /* PubNub+PAMPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AA8ECE26EB3A1200ADA747 /* PubNub+PAMPrivate.h */; }; - 79AA8ED126EB3A1200ADA747 /* PubNub+PAMPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AA8ECE26EB3A1200ADA747 /* PubNub+PAMPrivate.h */; }; - 79AA8ED226EB3A1200ADA747 /* PubNub+PAMPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AA8ECE26EB3A1200ADA747 /* PubNub+PAMPrivate.h */; }; - 79AA8ED326EB3A1200ADA747 /* PubNub+PAMPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 79AA8ECE26EB3A1200ADA747 /* PubNub+PAMPrivate.h */; }; - 79ABD8911F01636B007634E0 /* PNTelemetry.h in Headers */ = {isa = PBXBuildFile; fileRef = 79ABD88F1F01636B007634E0 /* PNTelemetry.h */; }; - 79ABD8921F01636B007634E0 /* PNTelemetry.h in Headers */ = {isa = PBXBuildFile; fileRef = 79ABD88F1F01636B007634E0 /* PNTelemetry.h */; }; - 79ABD8931F01636B007634E0 /* PNTelemetry.h in Headers */ = {isa = PBXBuildFile; fileRef = 79ABD88F1F01636B007634E0 /* PNTelemetry.h */; }; - 79ABD8941F01636B007634E0 /* PNTelemetry.h in Headers */ = {isa = PBXBuildFile; fileRef = 79ABD88F1F01636B007634E0 /* PNTelemetry.h */; }; - 79ABD8961F01636B007634E0 /* PNTelemetry.h in Headers */ = {isa = PBXBuildFile; fileRef = 79ABD88F1F01636B007634E0 /* PNTelemetry.h */; }; - 79ABD8981F01636B007634E0 /* PNTelemetry.m in Sources */ = {isa = PBXBuildFile; fileRef = 79ABD8901F01636B007634E0 /* PNTelemetry.m */; }; - 79ABD8991F01636B007634E0 /* PNTelemetry.m in Sources */ = {isa = PBXBuildFile; fileRef = 79ABD8901F01636B007634E0 /* PNTelemetry.m */; }; - 79ABD89A1F01636B007634E0 /* PNTelemetry.m in Sources */ = {isa = PBXBuildFile; fileRef = 79ABD8901F01636B007634E0 /* PNTelemetry.m */; }; - 79ABD89B1F01636B007634E0 /* PNTelemetry.m in Sources */ = {isa = PBXBuildFile; fileRef = 79ABD8901F01636B007634E0 /* PNTelemetry.m */; }; - 79ABD89D1F01636B007634E0 /* PNTelemetry.m in Sources */ = {isa = PBXBuildFile; fileRef = 79ABD8901F01636B007634E0 /* PNTelemetry.m */; }; 79CBB0421BD03D3F001FC34D /* PubNub.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0411BD03D3F001FC34D /* PubNub.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79CBB0F81BD03DE4001FC34D /* PubNub+APNS.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0561BD03DE4001FC34D /* PubNub+APNS.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79CBB0F91BD03DE4001FC34D /* PubNub+APNS.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0571BD03DE4001FC34D /* PubNub+APNS.m */; }; @@ -1159,10 +949,7 @@ 79CBB1231BD03DE4001FC34D /* PNChannelGroupChannelsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0841BD03DE4001FC34D /* PNChannelGroupChannelsResult.m */; }; 79CBB1241BD03DE4001FC34D /* PNChannelGroupClientStateResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0851BD03DE4001FC34D /* PNChannelGroupClientStateResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79CBB1251BD03DE4001FC34D /* PNChannelGroupClientStateResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0861BD03DE4001FC34D /* PNChannelGroupClientStateResult.m */; }; - 79CBB1261BD03DE4001FC34D /* PNChannelGroupsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0871BD03DE4001FC34D /* PNChannelGroupsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79CBB1271BD03DE4001FC34D /* PNChannelGroupsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0881BD03DE4001FC34D /* PNChannelGroupsResult.m */; }; 79CBB1281BD03DE4001FC34D /* PNClientStateUpdateStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0891BD03DE4001FC34D /* PNClientStateUpdateStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79CBB1291BD03DE4001FC34D /* PNClientStateUpdateStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08A1BD03DE4001FC34D /* PNClientStateUpdateStatus.m */; }; 79CBB12A1BD03DE4001FC34D /* PNErrorStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB08B1BD03DE4001FC34D /* PNErrorStatus+Private.h */; }; 79CBB12B1BD03DE4001FC34D /* PNErrorStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB08C1BD03DE4001FC34D /* PNErrorStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79CBB12C1BD03DE4001FC34D /* PNErrorStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB08D1BD03DE4001FC34D /* PNErrorStatus.m */; }; @@ -1186,8 +973,6 @@ 79CBB13F1BD03DE4001FC34D /* PNStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A01BD03DE4001FC34D /* PNStatus+Private.h */; }; 79CBB1401BD03DE4001FC34D /* PNStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A11BD03DE4001FC34D /* PNStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79CBB1411BD03DE4001FC34D /* PNStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A21BD03DE4001FC34D /* PNStatus.m */; }; - 79CBB1421BD03DE4001FC34D /* PNSubscriberResults.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A31BD03DE4001FC34D /* PNSubscriberResults.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79CBB1431BD03DE4001FC34D /* PNSubscriberResults.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A41BD03DE4001FC34D /* PNSubscriberResults.m */; }; 79CBB1441BD03DE4001FC34D /* PNSubscribeStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A51BD03DE4001FC34D /* PNSubscribeStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79CBB1451BD03DE4001FC34D /* PNSubscribeStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0A61BD03DE4001FC34D /* PNSubscribeStatus.m */; }; 79CBB1461BD03DE4001FC34D /* PNTimeResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0A71BD03DE4001FC34D /* PNTimeResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1211,84 +996,18 @@ 79CBB15A1BD03DE4001FC34D /* PNURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0BE1BD03DE4001FC34D /* PNURLRequest.m */; }; 79CBB1611BD03DE4001FC34D /* PNLogMacro.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C61BD03DE4001FC34D /* PNLogMacro.h */; }; 79CBB1621BD03DE4001FC34D /* PNConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C71BD03DE4001FC34D /* PNConstants.h */; }; - 79CBB1631BD03DE4001FC34D /* PNErrorCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C81BD03DE4001FC34D /* PNErrorCodes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79CBB1641BD03DE4001FC34D /* PNPrivateStructures.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0C91BD03DE4001FC34D /* PNPrivateStructures.h */; }; 79CBB1651BD03DE4001FC34D /* PNStructures.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0CA1BD03DE4001FC34D /* PNStructures.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79CBB1661BD03DE4001FC34D /* PNEventsListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0CC1BD03DE4001FC34D /* PNEventsListener.h */; settings = {ATTRIBUTES = (Public, ); }; }; 79CBB1671BD03DE4001FC34D /* PNParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0CD1BD03DE4001FC34D /* PNParser.h */; }; - 79CBB1681BD03DE4001FC34D /* PNChannelGroupAuditionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D01BD03DE4001FC34D /* PNChannelGroupAuditionParser.h */; }; - 79CBB1691BD03DE4001FC34D /* PNChannelGroupAuditionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D11BD03DE4001FC34D /* PNChannelGroupAuditionParser.m */; }; - 79CBB16A1BD03DE4001FC34D /* PNChannelGroupModificationParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D21BD03DE4001FC34D /* PNChannelGroupModificationParser.h */; }; - 79CBB16B1BD03DE4001FC34D /* PNChannelGroupModificationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D31BD03DE4001FC34D /* PNChannelGroupModificationParser.m */; }; - 79CBB16C1BD03DE4001FC34D /* PNClientStateParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D41BD03DE4001FC34D /* PNClientStateParser.h */; }; - 79CBB16D1BD03DE4001FC34D /* PNClientStateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D51BD03DE4001FC34D /* PNClientStateParser.m */; }; - 79CBB16E1BD03DE4001FC34D /* PNErrorParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D61BD03DE4001FC34D /* PNErrorParser.h */; }; - 79CBB16F1BD03DE4001FC34D /* PNErrorParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D71BD03DE4001FC34D /* PNErrorParser.m */; }; - 79CBB1701BD03DE4001FC34D /* PNHeartbeatParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0D81BD03DE4001FC34D /* PNHeartbeatParser.h */; }; - 79CBB1711BD03DE4001FC34D /* PNHeartbeatParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0D91BD03DE4001FC34D /* PNHeartbeatParser.m */; }; - 79CBB1721BD03DE4001FC34D /* PNHistoryParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DA1BD03DE4001FC34D /* PNHistoryParser.h */; }; - 79CBB1731BD03DE4001FC34D /* PNHistoryParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DB1BD03DE4001FC34D /* PNHistoryParser.m */; }; - 79CBB1741BD03DE4001FC34D /* PNLeaveParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DC1BD03DE4001FC34D /* PNLeaveParser.h */; }; - 79CBB1751BD03DE4001FC34D /* PNLeaveParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DD1BD03DE4001FC34D /* PNLeaveParser.m */; }; - 79CBB1761BD03DE4001FC34D /* PNMessagePublishParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0DE1BD03DE4001FC34D /* PNMessagePublishParser.h */; }; - 79CBB1771BD03DE4001FC34D /* PNMessagePublishParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0DF1BD03DE4001FC34D /* PNMessagePublishParser.m */; }; - 79CBB1781BD03DE4001FC34D /* PNPresenceHereNowParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E01BD03DE4001FC34D /* PNPresenceHereNowParser.h */; }; - 79CBB1791BD03DE4001FC34D /* PNPresenceHereNowParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E11BD03DE4001FC34D /* PNPresenceHereNowParser.m */; }; - 79CBB17A1BD03DE4001FC34D /* PNPresenceWhereNowParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E21BD03DE4001FC34D /* PNPresenceWhereNowParser.h */; }; - 79CBB17B1BD03DE4001FC34D /* PNPresenceWhereNowParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E31BD03DE4001FC34D /* PNPresenceWhereNowParser.m */; }; - 79CBB17C1BD03DE4001FC34D /* PNPushNotificationsAuditParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E41BD03DE4001FC34D /* PNPushNotificationsAuditParser.h */; }; - 79CBB17D1BD03DE4001FC34D /* PNPushNotificationsAuditParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E51BD03DE4001FC34D /* PNPushNotificationsAuditParser.m */; }; - 79CBB17F1BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0E71BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.m */; }; - 79CBB1821BD03DE4001FC34D /* PNSubscribeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EA1BD03DE4001FC34D /* PNSubscribeParser.h */; }; - 79CBB1831BD03DE4001FC34D /* PNSubscribeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0EB1BD03DE4001FC34D /* PNSubscribeParser.m */; }; - 79CBB1841BD03DE4001FC34D /* PNTimeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EC1BD03DE4001FC34D /* PNTimeParser.h */; }; - 79CBB1851BD03DE4001FC34D /* PNTimeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0ED1BD03DE4001FC34D /* PNTimeParser.m */; }; - 79CBB1861BD03DE4001FC34D /* PNNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0EE1BD03DE4001FC34D /* PNNetwork.h */; }; - 79CBB1871BD03DE4001FC34D /* PNNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0EF1BD03DE4001FC34D /* PNNetwork.m */; }; - 79CBB1881BD03DE4001FC34D /* PNNetworkResponseSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F01BD03DE4001FC34D /* PNNetworkResponseSerializer.h */; }; - 79CBB1891BD03DE4001FC34D /* PNNetworkResponseSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F11BD03DE4001FC34D /* PNNetworkResponseSerializer.m */; }; 79CBB18A1BD03DE4001FC34D /* PNReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F21BD03DE4001FC34D /* PNReachability.h */; }; 79CBB18B1BD03DE4001FC34D /* PNReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F31BD03DE4001FC34D /* PNReachability.m */; }; - 79CBB18C1BD03DE4001FC34D /* PNRequestParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F41BD03DE4001FC34D /* PNRequestParameters.h */; }; - 79CBB18D1BD03DE4001FC34D /* PNRequestParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F51BD03DE4001FC34D /* PNRequestParameters.m */; }; - 79CBB18E1BD03DE4001FC34D /* PNURLBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0F61BD03DE4001FC34D /* PNURLBuilder.h */; }; - 79CBB18F1BD03DE4001FC34D /* PNURLBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CBB0F71BD03DE4001FC34D /* PNURLBuilder.m */; }; 79CBB1A11BD03EEA001FC34D /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 79CBB1A01BD03EEA001FC34D /* libz.tbd */; }; - 79CD275524D6A1CB000698DD /* PNDataStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD275324D6A1CB000698DD /* PNDataStorage.h */; }; - 79CD275624D6A1CB000698DD /* PNDataStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD275324D6A1CB000698DD /* PNDataStorage.h */; }; - 79CD275724D6A1CB000698DD /* PNDataStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD275324D6A1CB000698DD /* PNDataStorage.h */; }; - 79CD275824D6A1CB000698DD /* PNDataStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD275324D6A1CB000698DD /* PNDataStorage.h */; }; - 79CD275924D6A1CB000698DD /* PNDataStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD275324D6A1CB000698DD /* PNDataStorage.h */; }; - 79CD275A24D6A1CB000698DD /* PNDataStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD275424D6A1CB000698DD /* PNDataStorage.m */; }; - 79CD275B24D6A1CB000698DD /* PNDataStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD275424D6A1CB000698DD /* PNDataStorage.m */; }; - 79CD275C24D6A1CB000698DD /* PNDataStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD275424D6A1CB000698DD /* PNDataStorage.m */; }; - 79CD275D24D6A1CB000698DD /* PNDataStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD275424D6A1CB000698DD /* PNDataStorage.m */; }; - 79CD275E24D6A1CB000698DD /* PNDataStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD275424D6A1CB000698DD /* PNDataStorage.m */; }; 79CD276024D6A371000698DD /* PNKeyValueStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD275F24D6A371000698DD /* PNKeyValueStorage.h */; }; 79CD276124D6A371000698DD /* PNKeyValueStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD275F24D6A371000698DD /* PNKeyValueStorage.h */; }; 79CD276224D6A371000698DD /* PNKeyValueStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD275F24D6A371000698DD /* PNKeyValueStorage.h */; }; 79CD276324D6A371000698DD /* PNKeyValueStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD275F24D6A371000698DD /* PNKeyValueStorage.h */; }; 79CD276424D6A371000698DD /* PNKeyValueStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD275F24D6A371000698DD /* PNKeyValueStorage.h */; }; - 79CD276724D75342000698DD /* PNKeychainStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD276524D75342000698DD /* PNKeychainStorage.h */; }; - 79CD276824D75342000698DD /* PNKeychainStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD276524D75342000698DD /* PNKeychainStorage.h */; }; - 79CD276924D75342000698DD /* PNKeychainStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD276524D75342000698DD /* PNKeychainStorage.h */; }; - 79CD276A24D75342000698DD /* PNKeychainStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD276524D75342000698DD /* PNKeychainStorage.h */; }; - 79CD276B24D75342000698DD /* PNKeychainStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD276524D75342000698DD /* PNKeychainStorage.h */; }; - 79CD276C24D75342000698DD /* PNKeychainStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD276624D75342000698DD /* PNKeychainStorage.m */; }; - 79CD276D24D75342000698DD /* PNKeychainStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD276624D75342000698DD /* PNKeychainStorage.m */; }; - 79CD276E24D75342000698DD /* PNKeychainStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD276624D75342000698DD /* PNKeychainStorage.m */; }; - 79CD276F24D75342000698DD /* PNKeychainStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD276624D75342000698DD /* PNKeychainStorage.m */; }; - 79CD277024D75342000698DD /* PNKeychainStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD276624D75342000698DD /* PNKeychainStorage.m */; }; - 79CD277324D75AE9000698DD /* PNInMemoryStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD277124D75AE9000698DD /* PNInMemoryStorage.h */; }; - 79CD277424D75AE9000698DD /* PNInMemoryStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD277124D75AE9000698DD /* PNInMemoryStorage.h */; }; - 79CD277524D75AE9000698DD /* PNInMemoryStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD277124D75AE9000698DD /* PNInMemoryStorage.h */; }; - 79CD277624D75AE9000698DD /* PNInMemoryStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD277124D75AE9000698DD /* PNInMemoryStorage.h */; }; - 79CD277724D75AE9000698DD /* PNInMemoryStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CD277124D75AE9000698DD /* PNInMemoryStorage.h */; }; - 79CD277824D75AE9000698DD /* PNInMemoryStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD277224D75AE9000698DD /* PNInMemoryStorage.m */; }; - 79CD277924D75AE9000698DD /* PNInMemoryStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD277224D75AE9000698DD /* PNInMemoryStorage.m */; }; - 79CD277A24D75AE9000698DD /* PNInMemoryStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD277224D75AE9000698DD /* PNInMemoryStorage.m */; }; - 79CD277B24D75AE9000698DD /* PNInMemoryStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD277224D75AE9000698DD /* PNInMemoryStorage.m */; }; - 79CD277C24D75AE9000698DD /* PNInMemoryStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CD277224D75AE9000698DD /* PNInMemoryStorage.m */; }; 79CFA2AD26DE0AEB00D206D4 /* PNCBORDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CFA2AB26DE0AEB00D206D4 /* PNCBORDecoder.h */; }; 79CFA2AE26DE0AEB00D206D4 /* PNCBORDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CFA2AB26DE0AEB00D206D4 /* PNCBORDecoder.h */; }; 79CFA2AF26DE0AEB00D206D4 /* PNCBORDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CFA2AB26DE0AEB00D206D4 /* PNCBORDecoder.h */; }; @@ -1329,21 +1048,7 @@ 79E20D1E1C8AEC51001BC9CC /* PNEnvelopeInformation.m in Sources */ = {isa = PBXBuildFile; fileRef = 79E20D141C8AEC3A001BC9CC /* PNEnvelopeInformation.m */; }; 79E20D1F1C8AEC52001BC9CC /* PNEnvelopeInformation.m in Sources */ = {isa = PBXBuildFile; fileRef = 79E20D141C8AEC3A001BC9CC /* PNEnvelopeInformation.m */; }; 79E20D211C8AEC53001BC9CC /* PNEnvelopeInformation.m in Sources */ = {isa = PBXBuildFile; fileRef = 79E20D141C8AEC3A001BC9CC /* PNEnvelopeInformation.m */; }; - 79E20D241C8AEC5B001BC9CC /* PNSubscribeStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79E20D231C8AEC5B001BC9CC /* PNSubscribeStatus+Private.h */; }; - 79E20D251C8AEFF1001BC9CC /* PNSubscribeStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79E20D231C8AEC5B001BC9CC /* PNSubscribeStatus+Private.h */; }; - 79E20D261C8AEFF2001BC9CC /* PNSubscribeStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79E20D231C8AEC5B001BC9CC /* PNSubscribeStatus+Private.h */; }; - 79E20D271C8AEFF2001BC9CC /* PNSubscribeStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79E20D231C8AEC5B001BC9CC /* PNSubscribeStatus+Private.h */; }; - 79E20D291C8AEFF4001BC9CC /* PNSubscribeStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 79E20D231C8AEC5B001BC9CC /* PNSubscribeStatus+Private.h */; }; 79E20D2B1C8B0A70001BC9CC /* PNPresenceChannelGroupHereNowResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0901BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79E20D2C1C8B0AD5001BC9CC /* PNPushNotificationsStateModificationParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 79CBB0E61BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.h */; }; - 79E2D0EE1C56434700BAA244 /* PNKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 79E2D0EC1C56434700BAA244 /* PNKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79E2D0EF1C56434700BAA244 /* PNKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 79E2D0EC1C56434700BAA244 /* PNKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79E2D0F01C56434700BAA244 /* PNKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 79E2D0EC1C56434700BAA244 /* PNKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79E2D0F21C56434700BAA244 /* PNKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 79E2D0EC1C56434700BAA244 /* PNKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 79E2D0F41C56434700BAA244 /* PNKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 79E2D0ED1C56434700BAA244 /* PNKeychain.m */; }; - 79E2D0F51C56434700BAA244 /* PNKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 79E2D0ED1C56434700BAA244 /* PNKeychain.m */; }; - 79E2D0F61C56434700BAA244 /* PNKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 79E2D0ED1C56434700BAA244 /* PNKeychain.m */; }; - 79E2D0F81C56434700BAA244 /* PNKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 79E2D0ED1C56434700BAA244 /* PNKeychain.m */; }; 79F857FA219640A200BFD0B1 /* PNClientStateGetResult.m in Sources */ = {isa = PBXBuildFile; fileRef = DD71B20066E72A597492173C /* PNClientStateGetResult.m */; }; 79F857FB219640A200BFD0B1 /* PNClientStateGetResult.m in Sources */ = {isa = PBXBuildFile; fileRef = DD71B20066E72A597492173C /* PNClientStateGetResult.m */; }; 79F857FC219640A300BFD0B1 /* PNClientStateGetResult.m in Sources */ = {isa = PBXBuildFile; fileRef = DD71B20066E72A597492173C /* PNClientStateGetResult.m */; }; @@ -1447,13 +1152,6 @@ A5046E6324784CA90008C81E /* PNFetchAllUUIDMetadataRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A875622FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.m */; }; A5046E6424784CA90008C81E /* PNObjectsPaginatedRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A877022FD8272002D0A72 /* PNObjectsPaginatedRequest.m */; }; A5046E6524784CA90008C81E /* PNBaseObjectsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A876622FD8272002D0A72 /* PNBaseObjectsRequest.m */; }; - A5046E6624784CA90008C81E /* PNChannelMetadataChangeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865B8230173030014E17C /* PNChannelMetadataChangeParser.m */; }; - A5046E6724784CA90008C81E /* PNUUIDMetadataChangeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A873522FD825A002D0A72 /* PNUUIDMetadataChangeParser.m */; }; - A5046E6824784CA90008C81E /* PNObjectsRemoveParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865C8230173AA0014E17C /* PNObjectsRemoveParser.m */; }; - A5046E6924784CA90008C81E /* PNMembershipsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865D8230175EC0014E17C /* PNMembershipsParser.m */; }; - A5046E6A24784CA90008C81E /* PNFetchChannelsMetadataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865A8230172950014E17C /* PNFetchChannelsMetadataParser.m */; }; - A5046E6B24784CA90008C81E /* PNFetchUUIDMetadataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5686598230170690014E17C /* PNFetchUUIDMetadataParser.m */; }; - A5046E6C24784CA90008C81E /* PNChannelMembersParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865E8230176760014E17C /* PNChannelMembersParser.m */; }; A5046E6D24784CAA0008C81E /* PNRemoveMembershipsAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A451F5246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.m */; }; A5046E6E24784CAA0008C81E /* PNManageMembershipsAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A5897571230014090093BD9A /* PNManageMembershipsAPICallBuilder.m */; }; A5046E6F24784CAA0008C81E /* PNFetchMembershipsAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A5897581230014160093BD9A /* PNFetchMembershipsAPICallBuilder.m */; }; @@ -1494,13 +1192,6 @@ A5046E9224784CAA0008C81E /* PNFetchAllUUIDMetadataRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A875622FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.m */; }; A5046E9324784CAA0008C81E /* PNObjectsPaginatedRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A877022FD8272002D0A72 /* PNObjectsPaginatedRequest.m */; }; A5046E9424784CAA0008C81E /* PNBaseObjectsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A876622FD8272002D0A72 /* PNBaseObjectsRequest.m */; }; - A5046E9524784CAA0008C81E /* PNChannelMetadataChangeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865B8230173030014E17C /* PNChannelMetadataChangeParser.m */; }; - A5046E9624784CAA0008C81E /* PNUUIDMetadataChangeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A873522FD825A002D0A72 /* PNUUIDMetadataChangeParser.m */; }; - A5046E9724784CAA0008C81E /* PNObjectsRemoveParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865C8230173AA0014E17C /* PNObjectsRemoveParser.m */; }; - A5046E9824784CAA0008C81E /* PNMembershipsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865D8230175EC0014E17C /* PNMembershipsParser.m */; }; - A5046E9924784CAA0008C81E /* PNFetchChannelsMetadataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865A8230172950014E17C /* PNFetchChannelsMetadataParser.m */; }; - A5046E9A24784CAA0008C81E /* PNFetchUUIDMetadataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5686598230170690014E17C /* PNFetchUUIDMetadataParser.m */; }; - A5046E9B24784CAA0008C81E /* PNChannelMembersParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865E8230176760014E17C /* PNChannelMembersParser.m */; }; A5046E9C24784CAA0008C81E /* PNRemoveMembershipsAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A451F5246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.m */; }; A5046E9D24784CAA0008C81E /* PNManageMembershipsAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A5897571230014090093BD9A /* PNManageMembershipsAPICallBuilder.m */; }; A5046E9E24784CAA0008C81E /* PNFetchMembershipsAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A5897581230014160093BD9A /* PNFetchMembershipsAPICallBuilder.m */; }; @@ -1541,13 +1232,6 @@ A5046EC124784CAA0008C81E /* PNFetchAllUUIDMetadataRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A875622FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.m */; }; A5046EC224784CAA0008C81E /* PNObjectsPaginatedRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A877022FD8272002D0A72 /* PNObjectsPaginatedRequest.m */; }; A5046EC324784CAA0008C81E /* PNBaseObjectsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A876622FD8272002D0A72 /* PNBaseObjectsRequest.m */; }; - A5046EC424784CAA0008C81E /* PNChannelMetadataChangeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865B8230173030014E17C /* PNChannelMetadataChangeParser.m */; }; - A5046EC524784CAA0008C81E /* PNUUIDMetadataChangeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A873522FD825A002D0A72 /* PNUUIDMetadataChangeParser.m */; }; - A5046EC624784CAA0008C81E /* PNObjectsRemoveParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865C8230173AA0014E17C /* PNObjectsRemoveParser.m */; }; - A5046EC724784CAA0008C81E /* PNMembershipsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865D8230175EC0014E17C /* PNMembershipsParser.m */; }; - A5046EC824784CAA0008C81E /* PNFetchChannelsMetadataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865A8230172950014E17C /* PNFetchChannelsMetadataParser.m */; }; - A5046EC924784CAA0008C81E /* PNFetchUUIDMetadataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5686598230170690014E17C /* PNFetchUUIDMetadataParser.m */; }; - A5046ECA24784CAA0008C81E /* PNChannelMembersParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865E8230176760014E17C /* PNChannelMembersParser.m */; }; A5046ECB24784CAB0008C81E /* PNRemoveMembershipsAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A451F5246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.m */; }; A5046ECC24784CAB0008C81E /* PNManageMembershipsAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A5897571230014090093BD9A /* PNManageMembershipsAPICallBuilder.m */; }; A5046ECD24784CAB0008C81E /* PNFetchMembershipsAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A5897581230014160093BD9A /* PNFetchMembershipsAPICallBuilder.m */; }; @@ -1588,13 +1272,6 @@ A5046EF024784CAB0008C81E /* PNFetchAllUUIDMetadataRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A875622FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.m */; }; A5046EF124784CAB0008C81E /* PNObjectsPaginatedRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A877022FD8272002D0A72 /* PNObjectsPaginatedRequest.m */; }; A5046EF224784CAB0008C81E /* PNBaseObjectsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A876622FD8272002D0A72 /* PNBaseObjectsRequest.m */; }; - A5046EF324784CAB0008C81E /* PNChannelMetadataChangeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865B8230173030014E17C /* PNChannelMetadataChangeParser.m */; }; - A5046EF424784CAB0008C81E /* PNUUIDMetadataChangeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A873522FD825A002D0A72 /* PNUUIDMetadataChangeParser.m */; }; - A5046EF524784CAB0008C81E /* PNObjectsRemoveParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865C8230173AA0014E17C /* PNObjectsRemoveParser.m */; }; - A5046EF624784CAB0008C81E /* PNMembershipsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865D8230175EC0014E17C /* PNMembershipsParser.m */; }; - A5046EF724784CAB0008C81E /* PNFetchChannelsMetadataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865A8230172950014E17C /* PNFetchChannelsMetadataParser.m */; }; - A5046EF824784CAB0008C81E /* PNFetchUUIDMetadataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5686598230170690014E17C /* PNFetchUUIDMetadataParser.m */; }; - A5046EF924784CAB0008C81E /* PNChannelMembersParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865E8230176760014E17C /* PNChannelMembersParser.m */; }; A5046EFA24784CAB0008C81E /* PNRemoveMembershipsAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A451F5246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.m */; }; A5046EFB24784CAB0008C81E /* PNManageMembershipsAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A5897571230014090093BD9A /* PNManageMembershipsAPICallBuilder.m */; }; A5046EFC24784CAB0008C81E /* PNFetchMembershipsAPICallBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = A5897581230014160093BD9A /* PNFetchMembershipsAPICallBuilder.m */; }; @@ -1635,13 +1312,6 @@ A5046F1F24784CAB0008C81E /* PNFetchAllUUIDMetadataRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A875622FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.m */; }; A5046F2024784CAB0008C81E /* PNObjectsPaginatedRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A877022FD8272002D0A72 /* PNObjectsPaginatedRequest.m */; }; A5046F2124784CAB0008C81E /* PNBaseObjectsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A876622FD8272002D0A72 /* PNBaseObjectsRequest.m */; }; - A5046F2224784CAB0008C81E /* PNChannelMetadataChangeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865B8230173030014E17C /* PNChannelMetadataChangeParser.m */; }; - A5046F2324784CAB0008C81E /* PNUUIDMetadataChangeParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A873522FD825A002D0A72 /* PNUUIDMetadataChangeParser.m */; }; - A5046F2424784CAB0008C81E /* PNObjectsRemoveParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865C8230173AA0014E17C /* PNObjectsRemoveParser.m */; }; - A5046F2524784CAB0008C81E /* PNMembershipsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865D8230175EC0014E17C /* PNMembershipsParser.m */; }; - A5046F2624784CAB0008C81E /* PNFetchChannelsMetadataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865A8230172950014E17C /* PNFetchChannelsMetadataParser.m */; }; - A5046F2724784CAB0008C81E /* PNFetchUUIDMetadataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5686598230170690014E17C /* PNFetchUUIDMetadataParser.m */; }; - A5046F2824784CAB0008C81E /* PNChannelMembersParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865E8230176760014E17C /* PNChannelMembersParser.m */; }; A504E0F124A8F314006DCF5B /* PNSendFileRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E0F024A8F314006DCF5B /* PNSendFileRequest+Private.h */; }; A504E0F224A8F314006DCF5B /* PNSendFileRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E0F024A8F314006DCF5B /* PNSendFileRequest+Private.h */; }; A504E0F324A8F314006DCF5B /* PNSendFileRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E0F024A8F314006DCF5B /* PNSendFileRequest+Private.h */; }; @@ -1667,16 +1337,6 @@ A504E10B24AA8F44006DCF5B /* PNListFilesResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E10324AA8F44006DCF5B /* PNListFilesResult.m */; }; A504E10C24AA8F44006DCF5B /* PNListFilesResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E10324AA8F44006DCF5B /* PNListFilesResult.m */; }; A504E10D24AA8F44006DCF5B /* PNListFilesResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E10324AA8F44006DCF5B /* PNListFilesResult.m */; }; - A504E11C24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E11A24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h */; }; - A504E11D24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E11A24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h */; }; - A504E11E24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E11A24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h */; }; - A504E11F24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E11A24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h */; }; - A504E12024AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E11A24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h */; }; - A504E12124AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E11B24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m */; }; - A504E12224AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E11B24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m */; }; - A504E12324AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E11B24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m */; }; - A504E12424AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E11B24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m */; }; - A504E12524AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E11B24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m */; }; A504E12824AA90B8006DCF5B /* PNDownloadFileResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E12624AA90B8006DCF5B /* PNDownloadFileResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; A504E12924AA90B8006DCF5B /* PNDownloadFileResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E12624AA90B8006DCF5B /* PNDownloadFileResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; A504E12A24AA90B8006DCF5B /* PNDownloadFileResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E12624AA90B8006DCF5B /* PNDownloadFileResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1687,16 +1347,6 @@ A504E12F24AA90B8006DCF5B /* PNDownloadFileResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E12724AA90B8006DCF5B /* PNDownloadFileResult.m */; }; A504E13024AA90B8006DCF5B /* PNDownloadFileResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E12724AA90B8006DCF5B /* PNDownloadFileResult.m */; }; A504E13124AA90B8006DCF5B /* PNDownloadFileResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E12724AA90B8006DCF5B /* PNDownloadFileResult.m */; }; - A504E13524AA9361006DCF5B /* PNListFilesParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E13324AA9361006DCF5B /* PNListFilesParser.h */; }; - A504E13624AA9361006DCF5B /* PNListFilesParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E13324AA9361006DCF5B /* PNListFilesParser.h */; }; - A504E13724AA9361006DCF5B /* PNListFilesParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E13324AA9361006DCF5B /* PNListFilesParser.h */; }; - A504E13824AA9361006DCF5B /* PNListFilesParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E13324AA9361006DCF5B /* PNListFilesParser.h */; }; - A504E13924AA9361006DCF5B /* PNListFilesParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E13324AA9361006DCF5B /* PNListFilesParser.h */; }; - A504E13A24AA9361006DCF5B /* PNListFilesParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E13424AA9361006DCF5B /* PNListFilesParser.m */; }; - A504E13B24AA9361006DCF5B /* PNListFilesParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E13424AA9361006DCF5B /* PNListFilesParser.m */; }; - A504E13C24AA9361006DCF5B /* PNListFilesParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E13424AA9361006DCF5B /* PNListFilesParser.m */; }; - A504E13D24AA9361006DCF5B /* PNListFilesParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E13424AA9361006DCF5B /* PNListFilesParser.m */; }; - A504E13E24AA9361006DCF5B /* PNListFilesParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E13424AA9361006DCF5B /* PNListFilesParser.m */; }; A504E14124AA94C8006DCF5B /* PNFile.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E13F24AA94C8006DCF5B /* PNFile.h */; settings = {ATTRIBUTES = (Public, ); }; }; A504E14224AA94C8006DCF5B /* PNFile.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E13F24AA94C8006DCF5B /* PNFile.h */; settings = {ATTRIBUTES = (Public, ); }; }; A504E14324AA94C8006DCF5B /* PNFile.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E13F24AA94C8006DCF5B /* PNFile.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1802,16 +1452,6 @@ A504E1C724AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E1BF24AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h */; }; A504E1C824AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E1BF24AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h */; }; A504E1C924AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E1BF24AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h */; }; - A504E1CC24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E1CA24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h */; }; - A504E1CD24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E1CA24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h */; }; - A504E1CE24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E1CA24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h */; }; - A504E1CF24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E1CA24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h */; }; - A504E1D024AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E1CA24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h */; }; - A504E1D124AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E1CB24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m */; }; - A504E1D224AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E1CB24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m */; }; - A504E1D324AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E1CB24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m */; }; - A504E1D424AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E1CB24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m */; }; - A504E1D524AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A504E1CB24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m */; }; A504E1D824B04751006DCF5B /* PNFilesManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E1D624B04751006DCF5B /* PNFilesManager.h */; }; A504E1D924B04751006DCF5B /* PNFilesManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E1D624B04751006DCF5B /* PNFilesManager.h */; }; A504E1DA24B04751006DCF5B /* PNFilesManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A504E1D624B04751006DCF5B /* PNFilesManager.h */; }; @@ -1837,11 +1477,156 @@ A51B49E22BDA7807008C3370 /* PNRequestRetryConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5E3B9FF2B2F669200D3AA18 /* PNRequestRetryConfiguration+Private.h */; }; A51B49E32BDA7808008C3370 /* PNRequestRetryConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5E3B9FF2B2F669200D3AA18 /* PNRequestRetryConfiguration+Private.h */; }; A51B49E42BDA7809008C3370 /* PNRequestRetryConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5E3B9FF2B2F669200D3AA18 /* PNRequestRetryConfiguration+Private.h */; }; + A51B4A0C2BF0ADD6008C3370 /* PNJSONSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A0B2BF0ADD6008C3370 /* PNJSONSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A0D2BF0ADD6008C3370 /* PNJSONSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A0B2BF0ADD6008C3370 /* PNJSONSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A0E2BF0ADD6008C3370 /* PNJSONSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A0B2BF0ADD6008C3370 /* PNJSONSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A0F2BF0ADD6008C3370 /* PNJSONSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A0B2BF0ADD6008C3370 /* PNJSONSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A102BF0ADD6008C3370 /* PNJSONSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A0B2BF0ADD6008C3370 /* PNJSONSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A132BF0AE36008C3370 /* PNCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A122BF0AE36008C3370 /* PNCodable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A142BF0AE36008C3370 /* PNCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A122BF0AE36008C3370 /* PNCodable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A152BF0AE36008C3370 /* PNCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A122BF0AE36008C3370 /* PNCodable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A162BF0AE36008C3370 /* PNCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A122BF0AE36008C3370 /* PNCodable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A172BF0AE36008C3370 /* PNCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A122BF0AE36008C3370 /* PNCodable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A192BF0AE57008C3370 /* PNDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A182BF0AE57008C3370 /* PNDecoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A1A2BF0AE57008C3370 /* PNDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A182BF0AE57008C3370 /* PNDecoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A1B2BF0AE57008C3370 /* PNDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A182BF0AE57008C3370 /* PNDecoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A1C2BF0AE57008C3370 /* PNDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A182BF0AE57008C3370 /* PNDecoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A1D2BF0AE57008C3370 /* PNDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A182BF0AE57008C3370 /* PNDecoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A1F2BF0AE79008C3370 /* PNEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A1E2BF0AE79008C3370 /* PNEncoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A202BF0AE79008C3370 /* PNEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A1E2BF0AE79008C3370 /* PNEncoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A212BF0AE79008C3370 /* PNEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A1E2BF0AE79008C3370 /* PNEncoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A222BF0AE79008C3370 /* PNEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A1E2BF0AE79008C3370 /* PNEncoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A232BF0AE79008C3370 /* PNEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A1E2BF0AE79008C3370 /* PNEncoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A252BF0AE92008C3370 /* PNObjectSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A242BF0AE92008C3370 /* PNObjectSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A262BF0AE92008C3370 /* PNObjectSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A242BF0AE92008C3370 /* PNObjectSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A272BF0AE92008C3370 /* PNObjectSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A242BF0AE92008C3370 /* PNObjectSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A282BF0AE92008C3370 /* PNObjectSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A242BF0AE92008C3370 /* PNObjectSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A292BF0AE92008C3370 /* PNObjectSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A242BF0AE92008C3370 /* PNObjectSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A2F2BF0AFB8008C3370 /* PNJSONSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A2E2BF0AFB8008C3370 /* PNJSONSerialization.m */; }; + A51B4A302BF0AFB8008C3370 /* PNJSONSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A2D2BF0AFB8008C3370 /* PNJSONSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A312BF0AFB8008C3370 /* PNJSONSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A2D2BF0AFB8008C3370 /* PNJSONSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A322BF0AFB8008C3370 /* PNJSONSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A2E2BF0AFB8008C3370 /* PNJSONSerialization.m */; }; + A51B4A332BF0AFB8008C3370 /* PNJSONSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A2D2BF0AFB8008C3370 /* PNJSONSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A342BF0AFB8008C3370 /* PNJSONSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A2E2BF0AFB8008C3370 /* PNJSONSerialization.m */; }; + A51B4A352BF0AFB8008C3370 /* PNJSONSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A2D2BF0AFB8008C3370 /* PNJSONSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A362BF0AFB8008C3370 /* PNJSONSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A2E2BF0AFB8008C3370 /* PNJSONSerialization.m */; }; + A51B4A372BF0AFB8008C3370 /* PNJSONSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A2D2BF0AFB8008C3370 /* PNJSONSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A382BF0AFB8008C3370 /* PNJSONSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A2E2BF0AFB8008C3370 /* PNJSONSerialization.m */; }; + A51B4A3B2BF0B097008C3370 /* PNJSONDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A3A2BF0B097008C3370 /* PNJSONDecoder.m */; }; + A51B4A3C2BF0B097008C3370 /* PNJSONDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A392BF0B097008C3370 /* PNJSONDecoder.h */; }; + A51B4A3D2BF0B097008C3370 /* PNJSONDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A392BF0B097008C3370 /* PNJSONDecoder.h */; }; + A51B4A3E2BF0B097008C3370 /* PNJSONDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A3A2BF0B097008C3370 /* PNJSONDecoder.m */; }; + A51B4A3F2BF0B097008C3370 /* PNJSONDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A392BF0B097008C3370 /* PNJSONDecoder.h */; }; + A51B4A402BF0B097008C3370 /* PNJSONDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A3A2BF0B097008C3370 /* PNJSONDecoder.m */; }; + A51B4A412BF0B097008C3370 /* PNJSONDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A392BF0B097008C3370 /* PNJSONDecoder.h */; }; + A51B4A422BF0B097008C3370 /* PNJSONDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A3A2BF0B097008C3370 /* PNJSONDecoder.m */; }; + A51B4A432BF0B097008C3370 /* PNJSONDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A392BF0B097008C3370 /* PNJSONDecoder.h */; }; + A51B4A442BF0B097008C3370 /* PNJSONDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A3A2BF0B097008C3370 /* PNJSONDecoder.m */; }; + A51B4A472BF0B0B0008C3370 /* PNJSONEncoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A462BF0B0B0008C3370 /* PNJSONEncoder.m */; }; + A51B4A482BF0B0B0008C3370 /* PNJSONEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A452BF0B0B0008C3370 /* PNJSONEncoder.h */; }; + A51B4A492BF0B0B0008C3370 /* PNJSONEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A452BF0B0B0008C3370 /* PNJSONEncoder.h */; }; + A51B4A4A2BF0B0B0008C3370 /* PNJSONEncoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A462BF0B0B0008C3370 /* PNJSONEncoder.m */; }; + A51B4A4B2BF0B0B0008C3370 /* PNJSONEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A452BF0B0B0008C3370 /* PNJSONEncoder.h */; }; + A51B4A4C2BF0B0B0008C3370 /* PNJSONEncoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A462BF0B0B0008C3370 /* PNJSONEncoder.m */; }; + A51B4A4D2BF0B0B0008C3370 /* PNJSONEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A452BF0B0B0008C3370 /* PNJSONEncoder.h */; }; + A51B4A4E2BF0B0B0008C3370 /* PNJSONEncoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A462BF0B0B0008C3370 /* PNJSONEncoder.m */; }; + A51B4A4F2BF0B0B0008C3370 /* PNJSONEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A452BF0B0B0008C3370 /* PNJSONEncoder.h */; }; + A51B4A502BF0B0B0008C3370 /* PNJSONEncoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A462BF0B0B0008C3370 /* PNJSONEncoder.m */; }; + A51B4A532BF0B0CB008C3370 /* PNJSONCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A522BF0B0CB008C3370 /* PNJSONCoder.m */; }; + A51B4A542BF0B0CB008C3370 /* PNJSONCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A512BF0B0CB008C3370 /* PNJSONCoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A552BF0B0CB008C3370 /* PNJSONCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A512BF0B0CB008C3370 /* PNJSONCoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A562BF0B0CB008C3370 /* PNJSONCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A522BF0B0CB008C3370 /* PNJSONCoder.m */; }; + A51B4A572BF0B0CB008C3370 /* PNJSONCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A512BF0B0CB008C3370 /* PNJSONCoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A582BF0B0CB008C3370 /* PNJSONCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A522BF0B0CB008C3370 /* PNJSONCoder.m */; }; + A51B4A592BF0B0CB008C3370 /* PNJSONCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A512BF0B0CB008C3370 /* PNJSONCoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A5A2BF0B0CB008C3370 /* PNJSONCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A522BF0B0CB008C3370 /* PNJSONCoder.m */; }; + A51B4A5B2BF0B0CB008C3370 /* PNJSONCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A512BF0B0CB008C3370 /* PNJSONCoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A5C2BF0B0CB008C3370 /* PNJSONCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A522BF0B0CB008C3370 /* PNJSONCoder.m */; }; + A51B4A612BF0B117008C3370 /* PNJSONCodableObjects.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A602BF0B117008C3370 /* PNJSONCodableObjects.m */; }; + A51B4A622BF0B117008C3370 /* PNJSONCodableObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A5F2BF0B117008C3370 /* PNJSONCodableObjects.h */; }; + A51B4A632BF0B117008C3370 /* PNJSONCodableObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A5F2BF0B117008C3370 /* PNJSONCodableObjects.h */; }; + A51B4A642BF0B117008C3370 /* PNJSONCodableObjects.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A602BF0B117008C3370 /* PNJSONCodableObjects.m */; }; + A51B4A652BF0B117008C3370 /* PNJSONCodableObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A5F2BF0B117008C3370 /* PNJSONCodableObjects.h */; }; + A51B4A662BF0B117008C3370 /* PNJSONCodableObjects.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A602BF0B117008C3370 /* PNJSONCodableObjects.m */; }; + A51B4A672BF0B117008C3370 /* PNJSONCodableObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A5F2BF0B117008C3370 /* PNJSONCodableObjects.h */; }; + A51B4A682BF0B117008C3370 /* PNJSONCodableObjects.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A602BF0B117008C3370 /* PNJSONCodableObjects.m */; }; + A51B4A692BF0B117008C3370 /* PNJSONCodableObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A5F2BF0B117008C3370 /* PNJSONCodableObjects.h */; }; + A51B4A6A2BF0B117008C3370 /* PNJSONCodableObjects.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A602BF0B117008C3370 /* PNJSONCodableObjects.m */; }; + A51B4A6D2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A6C2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m */; }; + A51B4A6E2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A6B2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h */; }; + A51B4A6F2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A6B2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h */; }; + A51B4A702BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A6C2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m */; }; + A51B4A712BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A6B2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h */; }; + A51B4A722BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A6C2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m */; }; + A51B4A732BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A6B2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h */; }; + A51B4A742BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A6C2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m */; }; + A51B4A752BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A6B2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h */; }; + A51B4A762BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A6C2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m */; }; + A51B4A792BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A782BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m */; }; + A51B4A7A2BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A772BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h */; }; + A51B4A7B2BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A772BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h */; }; + A51B4A7C2BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A782BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m */; }; + A51B4A7D2BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A772BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h */; }; + A51B4A7E2BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A782BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m */; }; + A51B4A7F2BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A772BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h */; }; + A51B4A802BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A782BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m */; }; + A51B4A812BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A772BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h */; }; + A51B4A822BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A782BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m */; }; + A51B4A852BF0B197008C3370 /* PNFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A842BF0B197008C3370 /* PNFunctions.m */; }; + A51B4A862BF0B197008C3370 /* PNFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A832BF0B197008C3370 /* PNFunctions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A872BF0B197008C3370 /* PNFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A832BF0B197008C3370 /* PNFunctions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A882BF0B197008C3370 /* PNFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A842BF0B197008C3370 /* PNFunctions.m */; }; + A51B4A892BF0B197008C3370 /* PNFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A832BF0B197008C3370 /* PNFunctions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A8A2BF0B197008C3370 /* PNFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A842BF0B197008C3370 /* PNFunctions.m */; }; + A51B4A8B2BF0B197008C3370 /* PNFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A832BF0B197008C3370 /* PNFunctions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A8C2BF0B197008C3370 /* PNFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A842BF0B197008C3370 /* PNFunctions.m */; }; + A51B4A8D2BF0B198008C3370 /* PNFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A832BF0B197008C3370 /* PNFunctions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A8E2BF0B198008C3370 /* PNFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A842BF0B197008C3370 /* PNFunctions.m */; }; + A51B4A912BF0B1E3008C3370 /* PNLock.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A902BF0B1E3008C3370 /* PNLock.m */; }; + A51B4A922BF0B1E3008C3370 /* PNLock.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A8F2BF0B1E3008C3370 /* PNLock.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A932BF0B1E3008C3370 /* PNLock.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A8F2BF0B1E3008C3370 /* PNLock.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A942BF0B1E3008C3370 /* PNLock.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A902BF0B1E3008C3370 /* PNLock.m */; }; + A51B4A952BF0B1E3008C3370 /* PNLock.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A8F2BF0B1E3008C3370 /* PNLock.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A962BF0B1E3008C3370 /* PNLock.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A902BF0B1E3008C3370 /* PNLock.m */; }; + A51B4A972BF0B1E3008C3370 /* PNLock.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A8F2BF0B1E3008C3370 /* PNLock.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A982BF0B1E3008C3370 /* PNLock.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A902BF0B1E3008C3370 /* PNLock.m */; }; + A51B4A992BF0B1E3008C3370 /* PNLock.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A8F2BF0B1E3008C3370 /* PNLock.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A9A2BF0B1E3008C3370 /* PNLock.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A902BF0B1E3008C3370 /* PNLock.m */; }; + A51B4A9D2BF0B428008C3370 /* PNError.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A9C2BF0B428008C3370 /* PNError.m */; }; + A51B4A9E2BF0B428008C3370 /* PNError.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A9B2BF0B428008C3370 /* PNError.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4A9F2BF0B428008C3370 /* PNError.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A9B2BF0B428008C3370 /* PNError.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4AA02BF0B428008C3370 /* PNError.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A9C2BF0B428008C3370 /* PNError.m */; }; + A51B4AA12BF0B428008C3370 /* PNError.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A9B2BF0B428008C3370 /* PNError.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4AA22BF0B428008C3370 /* PNError.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A9C2BF0B428008C3370 /* PNError.m */; }; + A51B4AA32BF0B428008C3370 /* PNError.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A9B2BF0B428008C3370 /* PNError.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4AA42BF0B428008C3370 /* PNError.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A9C2BF0B428008C3370 /* PNError.m */; }; + A51B4AA52BF0B428008C3370 /* PNError.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4A9B2BF0B428008C3370 /* PNError.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4AA62BF0B428008C3370 /* PNError.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4A9C2BF0B428008C3370 /* PNError.m */; }; + A51B4AAA2BF37F03008C3370 /* PNChannelGroupFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4AA92BF37F03008C3370 /* PNChannelGroupFetchRequest.m */; }; + A51B4AAB2BF37F03008C3370 /* PNChannelGroupFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4AA82BF37F03008C3370 /* PNChannelGroupFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4AAC2BF37F03008C3370 /* PNChannelGroupFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4AA82BF37F03008C3370 /* PNChannelGroupFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4AAD2BF37F03008C3370 /* PNChannelGroupFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4AA92BF37F03008C3370 /* PNChannelGroupFetchRequest.m */; }; + A51B4AAE2BF37F03008C3370 /* PNChannelGroupFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4AA82BF37F03008C3370 /* PNChannelGroupFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4AAF2BF37F03008C3370 /* PNChannelGroupFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4AA92BF37F03008C3370 /* PNChannelGroupFetchRequest.m */; }; + A51B4AB02BF37F03008C3370 /* PNChannelGroupFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4AA82BF37F03008C3370 /* PNChannelGroupFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4AB12BF37F03008C3370 /* PNChannelGroupFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4AA92BF37F03008C3370 /* PNChannelGroupFetchRequest.m */; }; + A51B4AB22BF37F03008C3370 /* PNChannelGroupFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A51B4AA82BF37F03008C3370 /* PNChannelGroupFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A51B4AB32BF37F03008C3370 /* PNChannelGroupFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A51B4AA92BF37F03008C3370 /* PNChannelGroupFetchRequest.m */; }; A523692924A2270200656C19 /* PNAES+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A523692824A2270200656C19 /* PNAES+Private.h */; }; A523692A24A2270200656C19 /* PNAES+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A523692824A2270200656C19 /* PNAES+Private.h */; }; A523692B24A2270200656C19 /* PNAES+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A523692824A2270200656C19 /* PNAES+Private.h */; }; A523692C24A2270200656C19 /* PNAES+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A523692824A2270200656C19 /* PNAES+Private.h */; }; A523692D24A2270200656C19 /* PNAES+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A523692824A2270200656C19 /* PNAES+Private.h */; }; + A523EEE12BFE910A009F45AA /* PNURLSessionTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A523EEDF2BFE910A009F45AA /* PNURLSessionTransport.h */; }; + A523EEE22BFE910A009F45AA /* PNURLSessionTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = A523EEE02BFE910A009F45AA /* PNURLSessionTransport.m */; }; + A523EEE32BFE910A009F45AA /* PNURLSessionTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = A523EEE02BFE910A009F45AA /* PNURLSessionTransport.m */; }; + A523EEE42BFE910A009F45AA /* PNURLSessionTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A523EEDF2BFE910A009F45AA /* PNURLSessionTransport.h */; }; + A523EEE52BFE910A009F45AA /* PNURLSessionTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = A523EEE02BFE910A009F45AA /* PNURLSessionTransport.m */; }; + A523EEE62BFE910A009F45AA /* PNURLSessionTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A523EEDF2BFE910A009F45AA /* PNURLSessionTransport.h */; }; + A523EEE72BFE910A009F45AA /* PNURLSessionTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A523EEDF2BFE910A009F45AA /* PNURLSessionTransport.h */; }; + A523EEE82BFE910A009F45AA /* PNURLSessionTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = A523EEE02BFE910A009F45AA /* PNURLSessionTransport.m */; }; + A523EEE92BFE910A009F45AA /* PNURLSessionTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = A523EEE02BFE910A009F45AA /* PNURLSessionTransport.m */; }; + A523EEEA2BFE910A009F45AA /* PNURLSessionTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A523EEDF2BFE910A009F45AA /* PNURLSessionTransport.h */; }; A52DC1E62307E10B001F20B0 /* NSDateFormatter+PNCacheable.h in Headers */ = {isa = PBXBuildFile; fileRef = A52DC1E42307E10B001F20B0 /* NSDateFormatter+PNCacheable.h */; }; A52DC1E72307E10B001F20B0 /* NSDateFormatter+PNCacheable.h in Headers */ = {isa = PBXBuildFile; fileRef = A52DC1E42307E10B001F20B0 /* NSDateFormatter+PNCacheable.h */; }; A52DC1E82307E10B001F20B0 /* NSDateFormatter+PNCacheable.h in Headers */ = {isa = PBXBuildFile; fileRef = A52DC1E42307E10B001F20B0 /* NSDateFormatter+PNCacheable.h */; }; @@ -1852,6 +1637,681 @@ A52DC1EF2307E10B001F20B0 /* NSDateFormatter+PNCacheable.m in Sources */ = {isa = PBXBuildFile; fileRef = A52DC1E52307E10B001F20B0 /* NSDateFormatter+PNCacheable.m */; }; A52DC1F02307E10B001F20B0 /* NSDateFormatter+PNCacheable.m in Sources */ = {isa = PBXBuildFile; fileRef = A52DC1E52307E10B001F20B0 /* NSDateFormatter+PNCacheable.m */; }; A52DC1F22307E10B001F20B0 /* NSDateFormatter+PNCacheable.m in Sources */ = {isa = PBXBuildFile; fileRef = A52DC1E52307E10B001F20B0 /* NSDateFormatter+PNCacheable.m */; }; + A53248A82C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248A72C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h */; }; + A53248A92C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248A72C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h */; }; + A53248AA2C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248A72C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h */; }; + A53248AB2C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248A72C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h */; }; + A53248AC2C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248A72C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h */; }; + A53248AE2C24D987003510FF /* PNJSONDecoder+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248AD2C24D987003510FF /* PNJSONDecoder+Private.h */; }; + A53248AF2C24D987003510FF /* PNJSONDecoder+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248AD2C24D987003510FF /* PNJSONDecoder+Private.h */; }; + A53248B02C24D987003510FF /* PNJSONDecoder+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248AD2C24D987003510FF /* PNJSONDecoder+Private.h */; }; + A53248B12C24D987003510FF /* PNJSONDecoder+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248AD2C24D987003510FF /* PNJSONDecoder+Private.h */; }; + A53248B22C24D987003510FF /* PNJSONDecoder+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248AD2C24D987003510FF /* PNJSONDecoder+Private.h */; }; + A53248B42C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248B32C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h */; }; + A53248B52C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248B32C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h */; }; + A53248B62C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248B32C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h */; }; + A53248B72C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248B32C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h */; }; + A53248B82C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248B32C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h */; }; + A53248BA2C24E3D4003510FF /* PNSubscribeFileEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248B92C24E3D4003510FF /* PNSubscribeFileEventData+Private.h */; }; + A53248BB2C24E3D4003510FF /* PNSubscribeFileEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248B92C24E3D4003510FF /* PNSubscribeFileEventData+Private.h */; }; + A53248BC2C24E3D4003510FF /* PNSubscribeFileEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248B92C24E3D4003510FF /* PNSubscribeFileEventData+Private.h */; }; + A53248BD2C24E3D4003510FF /* PNSubscribeFileEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248B92C24E3D4003510FF /* PNSubscribeFileEventData+Private.h */; }; + A53248BE2C24E3D4003510FF /* PNSubscribeFileEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248B92C24E3D4003510FF /* PNSubscribeFileEventData+Private.h */; }; + A53248C02C25B7BB003510FF /* PNSubscribeStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248BF2C25B7BB003510FF /* PNSubscribeStatus+Private.h */; }; + A53248C12C25B7BB003510FF /* PNSubscribeStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248BF2C25B7BB003510FF /* PNSubscribeStatus+Private.h */; }; + A53248C22C25B7BB003510FF /* PNSubscribeStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248BF2C25B7BB003510FF /* PNSubscribeStatus+Private.h */; }; + A53248C32C25B7BB003510FF /* PNSubscribeStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248BF2C25B7BB003510FF /* PNSubscribeStatus+Private.h */; }; + A53248C42C25B7BB003510FF /* PNSubscribeStatus+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248BF2C25B7BB003510FF /* PNSubscribeStatus+Private.h */; }; + A53248C62C28A3B5003510FF /* PNHistoryMessagesDeleteRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248C52C28A3B4003510FF /* PNHistoryMessagesDeleteRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A53248C72C28A3B5003510FF /* PNHistoryMessagesDeleteRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248C52C28A3B4003510FF /* PNHistoryMessagesDeleteRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A53248C82C28A3B5003510FF /* PNHistoryMessagesDeleteRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248C52C28A3B4003510FF /* PNHistoryMessagesDeleteRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A53248C92C28A3B5003510FF /* PNHistoryMessagesDeleteRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248C52C28A3B4003510FF /* PNHistoryMessagesDeleteRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A53248CA2C28A3B5003510FF /* PNHistoryMessagesDeleteRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248C52C28A3B4003510FF /* PNHistoryMessagesDeleteRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A53248CC2C28A426003510FF /* PNHistoryMessagesCountRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248CB2C28A426003510FF /* PNHistoryMessagesCountRequest.m */; }; + A53248CD2C28A426003510FF /* PNHistoryMessagesCountRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248CB2C28A426003510FF /* PNHistoryMessagesCountRequest.m */; }; + A53248CE2C28A426003510FF /* PNHistoryMessagesCountRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248CB2C28A426003510FF /* PNHistoryMessagesCountRequest.m */; }; + A53248CF2C28A426003510FF /* PNHistoryMessagesCountRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248CB2C28A426003510FF /* PNHistoryMessagesCountRequest.m */; }; + A53248D02C28A426003510FF /* PNHistoryMessagesCountRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248CB2C28A426003510FF /* PNHistoryMessagesCountRequest.m */; }; + A53248D22C28D211003510FF /* PNHistoryMessageCountData.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248D12C28D211003510FF /* PNHistoryMessageCountData.m */; }; + A53248D32C28D211003510FF /* PNHistoryMessageCountData.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248D12C28D211003510FF /* PNHistoryMessageCountData.m */; }; + A53248D42C28D211003510FF /* PNHistoryMessageCountData.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248D12C28D211003510FF /* PNHistoryMessageCountData.m */; }; + A53248D52C28D211003510FF /* PNHistoryMessageCountData.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248D12C28D211003510FF /* PNHistoryMessageCountData.m */; }; + A53248D62C28D211003510FF /* PNHistoryMessageCountData.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248D12C28D211003510FF /* PNHistoryMessageCountData.m */; }; + A53248D82C28D3BC003510FF /* PNMembershipsFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248D72C28D3BB003510FF /* PNMembershipsFetchData.m */; }; + A53248D92C28D3BC003510FF /* PNMembershipsFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248D72C28D3BB003510FF /* PNMembershipsFetchData.m */; }; + A53248DA2C28D3BC003510FF /* PNMembershipsFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248D72C28D3BB003510FF /* PNMembershipsFetchData.m */; }; + A53248DB2C28D3BC003510FF /* PNMembershipsFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248D72C28D3BB003510FF /* PNMembershipsFetchData.m */; }; + A53248DC2C28D3BC003510FF /* PNMembershipsFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248D72C28D3BB003510FF /* PNMembershipsFetchData.m */; }; + A53248E02C28E3AB003510FF /* PNXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248DD2C28E3AB003510FF /* PNXMLParser.h */; }; + A53248E12C28E3AB003510FF /* PNXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248DD2C28E3AB003510FF /* PNXMLParser.h */; }; + A53248E22C28E3AB003510FF /* PNXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248DD2C28E3AB003510FF /* PNXMLParser.h */; }; + A53248E32C28E3AB003510FF /* PNXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248DD2C28E3AB003510FF /* PNXMLParser.h */; }; + A53248E42C28E3AB003510FF /* PNXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248DD2C28E3AB003510FF /* PNXMLParser.h */; }; + A53248E52C28E3AB003510FF /* PNXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248DE2C28E3AB003510FF /* PNXMLParser.m */; }; + A53248E62C28E3AB003510FF /* PNXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248DE2C28E3AB003510FF /* PNXMLParser.m */; }; + A53248E72C28E3AB003510FF /* PNXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248DE2C28E3AB003510FF /* PNXMLParser.m */; }; + A53248E82C28E3AB003510FF /* PNXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248DE2C28E3AB003510FF /* PNXMLParser.m */; }; + A53248E92C28E3AB003510FF /* PNXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248DE2C28E3AB003510FF /* PNXMLParser.m */; }; + A53248F72C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248F62C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h */; }; + A53248F82C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248F62C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h */; }; + A53248F92C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248F62C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h */; }; + A53248FA2C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248F62C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h */; }; + A53248FB2C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248F62C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h */; }; + A53248FE2C2AC5C1003510FF /* PNChannelGroupsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248FC2C2AC5C1003510FF /* PNChannelGroupsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A53248FF2C2AC5C1003510FF /* PNChannelGroupsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248FD2C2AC5C1003510FF /* PNChannelGroupsResult.m */; }; + A53249002C2AC5C1003510FF /* PNChannelGroupsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248FD2C2AC5C1003510FF /* PNChannelGroupsResult.m */; }; + A53249012C2AC5C1003510FF /* PNChannelGroupsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248FC2C2AC5C1003510FF /* PNChannelGroupsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A53249022C2AC5C1003510FF /* PNChannelGroupsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248FC2C2AC5C1003510FF /* PNChannelGroupsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A53249032C2AC5C1003510FF /* PNChannelGroupsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248FD2C2AC5C1003510FF /* PNChannelGroupsResult.m */; }; + A53249042C2AC5C1003510FF /* PNChannelGroupsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248FD2C2AC5C1003510FF /* PNChannelGroupsResult.m */; }; + A53249052C2AC5C1003510FF /* PNChannelGroupsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248FC2C2AC5C1003510FF /* PNChannelGroupsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A53249062C2AC5C1003510FF /* PNChannelGroupsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A53248FC2C2AC5C1003510FF /* PNChannelGroupsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A53249072C2AC5C1003510FF /* PNChannelGroupsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A53248FD2C2AC5C1003510FF /* PNChannelGroupsResult.m */; }; + A53249092C2C7262003510FF /* PNHistoryFetchRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53249082C2C7262003510FF /* PNHistoryFetchRequest+Private.h */; }; + A532490A2C2C7262003510FF /* PNHistoryFetchRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53249082C2C7262003510FF /* PNHistoryFetchRequest+Private.h */; }; + A532490B2C2C7262003510FF /* PNHistoryFetchRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53249082C2C7262003510FF /* PNHistoryFetchRequest+Private.h */; }; + A532490C2C2C7262003510FF /* PNHistoryFetchRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53249082C2C7262003510FF /* PNHistoryFetchRequest+Private.h */; }; + A532490D2C2C7262003510FF /* PNHistoryFetchRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A53249082C2C7262003510FF /* PNHistoryFetchRequest+Private.h */; }; + A5567E312C1EB4ED003C974F /* PNTimeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E2F2C1EB4ED003C974F /* PNTimeRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E322C1EB4ED003C974F /* PNTimeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E302C1EB4ED003C974F /* PNTimeRequest.m */; }; + A5567E332C1EB4ED003C974F /* PNTimeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E2F2C1EB4ED003C974F /* PNTimeRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E342C1EB4ED003C974F /* PNTimeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E302C1EB4ED003C974F /* PNTimeRequest.m */; }; + A5567E352C1EB4ED003C974F /* PNTimeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E302C1EB4ED003C974F /* PNTimeRequest.m */; }; + A5567E362C1EB4ED003C974F /* PNTimeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E2F2C1EB4ED003C974F /* PNTimeRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E372C1EB4ED003C974F /* PNTimeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E2F2C1EB4ED003C974F /* PNTimeRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E382C1EB4ED003C974F /* PNTimeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E302C1EB4ED003C974F /* PNTimeRequest.m */; }; + A5567E392C1EB4ED003C974F /* PNTimeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E2F2C1EB4ED003C974F /* PNTimeRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E3A2C1EB4ED003C974F /* PNTimeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E302C1EB4ED003C974F /* PNTimeRequest.m */; }; + A5567E3F2C1ECC59003C974F /* PNPresenceStateFetchResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E3D2C1ECC59003C974F /* PNPresenceStateFetchResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E402C1ECC59003C974F /* PNPresenceStateFetchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E3E2C1ECC59003C974F /* PNPresenceStateFetchResult.m */; }; + A5567E412C1ECC59003C974F /* PNPresenceStateFetchResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E3D2C1ECC59003C974F /* PNPresenceStateFetchResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E422C1ECC59003C974F /* PNPresenceStateFetchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E3E2C1ECC59003C974F /* PNPresenceStateFetchResult.m */; }; + A5567E432C1ECC59003C974F /* PNPresenceStateFetchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E3E2C1ECC59003C974F /* PNPresenceStateFetchResult.m */; }; + A5567E442C1ECC59003C974F /* PNPresenceStateFetchResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E3D2C1ECC59003C974F /* PNPresenceStateFetchResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E452C1ECC59003C974F /* PNPresenceStateFetchResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E3D2C1ECC59003C974F /* PNPresenceStateFetchResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E462C1ECC59003C974F /* PNPresenceStateFetchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E3E2C1ECC59003C974F /* PNPresenceStateFetchResult.m */; }; + A5567E472C1ECC59003C974F /* PNPresenceStateFetchResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E3D2C1ECC59003C974F /* PNPresenceStateFetchResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E482C1ECC59003C974F /* PNPresenceStateFetchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E3E2C1ECC59003C974F /* PNPresenceStateFetchResult.m */; }; + A5567E4A2C1EDB02003C974F /* PNPushNotificationFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E492C1EDB02003C974F /* PNPushNotificationFetchRequest.m */; }; + A5567E4B2C1EDB02003C974F /* PNPushNotificationFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E492C1EDB02003C974F /* PNPushNotificationFetchRequest.m */; }; + A5567E4C2C1EDB02003C974F /* PNPushNotificationFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E492C1EDB02003C974F /* PNPushNotificationFetchRequest.m */; }; + A5567E4D2C1EDB02003C974F /* PNPushNotificationFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E492C1EDB02003C974F /* PNPushNotificationFetchRequest.m */; }; + A5567E4E2C1EDB02003C974F /* PNPushNotificationFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E492C1EDB02003C974F /* PNPushNotificationFetchRequest.m */; }; + A5567E522C1F0484003C974F /* PNSignalRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E502C1F0484003C974F /* PNSignalRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E532C1F0484003C974F /* PNSignalRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E512C1F0484003C974F /* PNSignalRequest.m */; }; + A5567E542C1F0484003C974F /* PNSignalRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E502C1F0484003C974F /* PNSignalRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E552C1F0484003C974F /* PNSignalRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E512C1F0484003C974F /* PNSignalRequest.m */; }; + A5567E562C1F0484003C974F /* PNSignalRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E512C1F0484003C974F /* PNSignalRequest.m */; }; + A5567E572C1F0484003C974F /* PNSignalRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E502C1F0484003C974F /* PNSignalRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E582C1F0484003C974F /* PNSignalRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E502C1F0484003C974F /* PNSignalRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E592C1F0484003C974F /* PNSignalRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E512C1F0484003C974F /* PNSignalRequest.m */; }; + A5567E5A2C1F0484003C974F /* PNSignalRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E502C1F0484003C974F /* PNSignalRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E5B2C1F0484003C974F /* PNSignalRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E512C1F0484003C974F /* PNSignalRequest.m */; }; + A5567E5E2C1F8C53003C974F /* PNOperationDataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E5D2C1F8C53003C974F /* PNOperationDataParser.m */; }; + A5567E5F2C1F8C53003C974F /* PNOperationDataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E5C2C1F8C53003C974F /* PNOperationDataParser.h */; }; + A5567E602C1F8C53003C974F /* PNOperationDataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E5D2C1F8C53003C974F /* PNOperationDataParser.m */; }; + A5567E612C1F8C53003C974F /* PNOperationDataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E5C2C1F8C53003C974F /* PNOperationDataParser.h */; }; + A5567E622C1F8C53003C974F /* PNOperationDataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E5C2C1F8C53003C974F /* PNOperationDataParser.h */; }; + A5567E632C1F8C53003C974F /* PNOperationDataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E5D2C1F8C53003C974F /* PNOperationDataParser.m */; }; + A5567E642C1F8C53003C974F /* PNOperationDataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E5C2C1F8C53003C974F /* PNOperationDataParser.h */; }; + A5567E652C1F8C53003C974F /* PNOperationDataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E5D2C1F8C53003C974F /* PNOperationDataParser.m */; }; + A5567E662C1F8C53003C974F /* PNOperationDataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E5C2C1F8C53003C974F /* PNOperationDataParser.h */; }; + A5567E672C1F8C53003C974F /* PNOperationDataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E5D2C1F8C53003C974F /* PNOperationDataParser.m */; }; + A5567E6A2C1FBE44003C974F /* PubNub+Deprecated.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E692C1FBE44003C974F /* PubNub+Deprecated.m */; }; + A5567E6B2C1FBE44003C974F /* PubNub+Deprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E682C1FBE44003C974F /* PubNub+Deprecated.h */; }; + A5567E6C2C1FBE44003C974F /* PubNub+Deprecated.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E692C1FBE44003C974F /* PubNub+Deprecated.m */; }; + A5567E6D2C1FBE44003C974F /* PubNub+Deprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E682C1FBE44003C974F /* PubNub+Deprecated.h */; }; + A5567E6E2C1FBE44003C974F /* PubNub+Deprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E682C1FBE44003C974F /* PubNub+Deprecated.h */; }; + A5567E6F2C1FBE44003C974F /* PubNub+Deprecated.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E692C1FBE44003C974F /* PubNub+Deprecated.m */; }; + A5567E702C1FBE44003C974F /* PubNub+Deprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E682C1FBE44003C974F /* PubNub+Deprecated.h */; }; + A5567E712C1FBE44003C974F /* PubNub+Deprecated.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E692C1FBE44003C974F /* PubNub+Deprecated.m */; }; + A5567E722C1FBE44003C974F /* PubNub+Deprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E682C1FBE44003C974F /* PubNub+Deprecated.h */; }; + A5567E732C1FBE44003C974F /* PubNub+Deprecated.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E692C1FBE44003C974F /* PubNub+Deprecated.m */; }; + A5567E772C1FCADC003C974F /* PNPushNotificationFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E762C1FCADC003C974F /* PNPushNotificationFetchData.m */; }; + A5567E782C1FCADC003C974F /* PNPushNotificationFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E752C1FCADC003C974F /* PNPushNotificationFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E792C1FCADC003C974F /* PNPushNotificationFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E762C1FCADC003C974F /* PNPushNotificationFetchData.m */; }; + A5567E7A2C1FCADC003C974F /* PNPushNotificationFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E752C1FCADC003C974F /* PNPushNotificationFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E7B2C1FCADC003C974F /* PNPushNotificationFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E752C1FCADC003C974F /* PNPushNotificationFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E7C2C1FCADC003C974F /* PNPushNotificationFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E762C1FCADC003C974F /* PNPushNotificationFetchData.m */; }; + A5567E7D2C1FCADC003C974F /* PNPushNotificationFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E752C1FCADC003C974F /* PNPushNotificationFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E7E2C1FCADC003C974F /* PNPushNotificationFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E762C1FCADC003C974F /* PNPushNotificationFetchData.m */; }; + A5567E7F2C1FCADC003C974F /* PNPushNotificationFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E752C1FCADC003C974F /* PNPushNotificationFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E802C1FCADC003C974F /* PNPushNotificationFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E762C1FCADC003C974F /* PNPushNotificationFetchData.m */; }; + A5567E832C1FCF0F003C974F /* PNChannelGroupFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E812C1FCF0F003C974F /* PNChannelGroupFetchData.m */; }; + A5567E842C1FCF0F003C974F /* PNChannelGroupFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E812C1FCF0F003C974F /* PNChannelGroupFetchData.m */; }; + A5567E852C1FCF0F003C974F /* PNChannelGroupFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E812C1FCF0F003C974F /* PNChannelGroupFetchData.m */; }; + A5567E862C1FCF0F003C974F /* PNChannelGroupFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E812C1FCF0F003C974F /* PNChannelGroupFetchData.m */; }; + A5567E872C1FCF0F003C974F /* PNChannelGroupFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E812C1FCF0F003C974F /* PNChannelGroupFetchData.m */; }; + A5567E882C1FCF0F003C974F /* PNChannelGroupFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E822C1FCF0F003C974F /* PNChannelGroupFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E892C1FCF0F003C974F /* PNChannelGroupFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E822C1FCF0F003C974F /* PNChannelGroupFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E8A2C1FCF0F003C974F /* PNChannelGroupFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E822C1FCF0F003C974F /* PNChannelGroupFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E8B2C1FCF0F003C974F /* PNChannelGroupFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E822C1FCF0F003C974F /* PNChannelGroupFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E8C2C1FCF0F003C974F /* PNChannelGroupFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E822C1FCF0F003C974F /* PNChannelGroupFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E8F2C1FDEF7003C974F /* PNMessageActionsFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E8E2C1FDEF7003C974F /* PNMessageActionsFetchData.m */; }; + A5567E902C1FDEF7003C974F /* PNMessageActionsFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E8D2C1FDEF7003C974F /* PNMessageActionsFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E912C1FDEF7003C974F /* PNMessageActionsFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E8E2C1FDEF7003C974F /* PNMessageActionsFetchData.m */; }; + A5567E922C1FDEF7003C974F /* PNMessageActionsFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E8D2C1FDEF7003C974F /* PNMessageActionsFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E932C1FDEF7003C974F /* PNMessageActionsFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E8D2C1FDEF7003C974F /* PNMessageActionsFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E942C1FDEF7003C974F /* PNMessageActionsFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E8E2C1FDEF7003C974F /* PNMessageActionsFetchData.m */; }; + A5567E952C1FDEF7003C974F /* PNMessageActionsFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E8D2C1FDEF7003C974F /* PNMessageActionsFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E962C1FDEF7003C974F /* PNMessageActionsFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E8E2C1FDEF7003C974F /* PNMessageActionsFetchData.m */; }; + A5567E972C1FDEF7003C974F /* PNMessageActionsFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E8D2C1FDEF7003C974F /* PNMessageActionsFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E982C1FDEF7003C974F /* PNMessageActionsFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E8E2C1FDEF7003C974F /* PNMessageActionsFetchData.m */; }; + A5567E9B2C20243C003C974F /* PNMessageActionFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E9A2C20243C003C974F /* PNMessageActionFetchData.m */; }; + A5567E9C2C20243C003C974F /* PNMessageActionFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E992C20243C003C974F /* PNMessageActionFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E9D2C20243C003C974F /* PNMessageActionFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E9A2C20243C003C974F /* PNMessageActionFetchData.m */; }; + A5567E9E2C20243C003C974F /* PNMessageActionFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E992C20243C003C974F /* PNMessageActionFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567E9F2C20243C003C974F /* PNMessageActionFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E992C20243C003C974F /* PNMessageActionFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EA02C20243C003C974F /* PNMessageActionFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E9A2C20243C003C974F /* PNMessageActionFetchData.m */; }; + A5567EA12C20243C003C974F /* PNMessageActionFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E992C20243C003C974F /* PNMessageActionFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EA22C20243C003C974F /* PNMessageActionFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E9A2C20243C003C974F /* PNMessageActionFetchData.m */; }; + A5567EA32C20243C003C974F /* PNMessageActionFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567E992C20243C003C974F /* PNMessageActionFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EA42C20243C003C974F /* PNMessageActionFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567E9A2C20243C003C974F /* PNMessageActionFetchData.m */; }; + A5567EA82C20371C003C974F /* PNPresenceHereNowFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EA72C20371C003C974F /* PNPresenceHereNowFetchData.m */; }; + A5567EA92C20371C003C974F /* PNPresenceHereNowFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EA62C20371C003C974F /* PNPresenceHereNowFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EAA2C20371C003C974F /* PNPresenceHereNowFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EA72C20371C003C974F /* PNPresenceHereNowFetchData.m */; }; + A5567EAB2C20371C003C974F /* PNPresenceHereNowFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EA62C20371C003C974F /* PNPresenceHereNowFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EAC2C20371C003C974F /* PNPresenceHereNowFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EA62C20371C003C974F /* PNPresenceHereNowFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EAD2C20371C003C974F /* PNPresenceHereNowFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EA72C20371C003C974F /* PNPresenceHereNowFetchData.m */; }; + A5567EAE2C20371C003C974F /* PNPresenceHereNowFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EA62C20371C003C974F /* PNPresenceHereNowFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EAF2C20371C003C974F /* PNPresenceHereNowFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EA72C20371C003C974F /* PNPresenceHereNowFetchData.m */; }; + A5567EB02C20371C003C974F /* PNPresenceHereNowFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EA62C20371C003C974F /* PNPresenceHereNowFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EB12C20371C003C974F /* PNPresenceHereNowFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EA72C20371C003C974F /* PNPresenceHereNowFetchData.m */; }; + A5567EB62C2077AE003C974F /* PNSubscribeData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EB52C2077AE003C974F /* PNSubscribeData.m */; }; + A5567EB72C2077AE003C974F /* PNSubscribeData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EB42C2077AE003C974F /* PNSubscribeData.h */; }; + A5567EB82C2077AE003C974F /* PNSubscribeData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EB52C2077AE003C974F /* PNSubscribeData.m */; }; + A5567EB92C2077AE003C974F /* PNSubscribeData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EB42C2077AE003C974F /* PNSubscribeData.h */; }; + A5567EBA2C2077AE003C974F /* PNSubscribeData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EB42C2077AE003C974F /* PNSubscribeData.h */; }; + A5567EBB2C2077AE003C974F /* PNSubscribeData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EB52C2077AE003C974F /* PNSubscribeData.m */; }; + A5567EBC2C2077AE003C974F /* PNSubscribeData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EB42C2077AE003C974F /* PNSubscribeData.h */; }; + A5567EBD2C2077AE003C974F /* PNSubscribeData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EB52C2077AE003C974F /* PNSubscribeData.m */; }; + A5567EBE2C2077AE003C974F /* PNSubscribeData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EB42C2077AE003C974F /* PNSubscribeData.h */; }; + A5567EBF2C2077AE003C974F /* PNSubscribeData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EB52C2077AE003C974F /* PNSubscribeData.m */; }; + A5567EC22C207800003C974F /* PNSubscribeCursorData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EC12C207800003C974F /* PNSubscribeCursorData.m */; }; + A5567EC32C207800003C974F /* PNSubscribeCursorData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EC02C207800003C974F /* PNSubscribeCursorData.h */; }; + A5567EC42C207800003C974F /* PNSubscribeCursorData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EC12C207800003C974F /* PNSubscribeCursorData.m */; }; + A5567EC52C207800003C974F /* PNSubscribeCursorData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EC02C207800003C974F /* PNSubscribeCursorData.h */; }; + A5567EC62C207800003C974F /* PNSubscribeCursorData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EC02C207800003C974F /* PNSubscribeCursorData.h */; }; + A5567EC72C207800003C974F /* PNSubscribeCursorData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EC12C207800003C974F /* PNSubscribeCursorData.m */; }; + A5567EC82C207800003C974F /* PNSubscribeCursorData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EC02C207800003C974F /* PNSubscribeCursorData.h */; }; + A5567EC92C207800003C974F /* PNSubscribeCursorData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EC12C207800003C974F /* PNSubscribeCursorData.m */; }; + A5567ECA2C207800003C974F /* PNSubscribeCursorData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EC02C207800003C974F /* PNSubscribeCursorData.h */; }; + A5567ECB2C207800003C974F /* PNSubscribeCursorData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EC12C207800003C974F /* PNSubscribeCursorData.m */; }; + A5567ECE2C208652003C974F /* PNSubscribeEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567ECD2C208652003C974F /* PNSubscribeEventData.m */; }; + A5567ECF2C208652003C974F /* PNSubscribeEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567ECC2C208652003C974F /* PNSubscribeEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567ED02C208652003C974F /* PNSubscribeEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567ECD2C208652003C974F /* PNSubscribeEventData.m */; }; + A5567ED12C208652003C974F /* PNSubscribeEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567ECC2C208652003C974F /* PNSubscribeEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567ED22C208652003C974F /* PNSubscribeEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567ECC2C208652003C974F /* PNSubscribeEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567ED32C208652003C974F /* PNSubscribeEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567ECD2C208652003C974F /* PNSubscribeEventData.m */; }; + A5567ED42C208652003C974F /* PNSubscribeEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567ECC2C208652003C974F /* PNSubscribeEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567ED52C208652003C974F /* PNSubscribeEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567ECD2C208652003C974F /* PNSubscribeEventData.m */; }; + A5567ED62C208652003C974F /* PNSubscribeEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567ECC2C208652003C974F /* PNSubscribeEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567ED72C208652003C974F /* PNSubscribeEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567ECD2C208652003C974F /* PNSubscribeEventData.m */; }; + A5567EDA2C209FF7003C974F /* PNPresenceWhereNowFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567ED92C209FF7003C974F /* PNPresenceWhereNowFetchData.m */; }; + A5567EDB2C209FF7003C974F /* PNPresenceWhereNowFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567ED82C209FF7003C974F /* PNPresenceWhereNowFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EDC2C209FF7003C974F /* PNPresenceWhereNowFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567ED92C209FF7003C974F /* PNPresenceWhereNowFetchData.m */; }; + A5567EDD2C209FF7003C974F /* PNPresenceWhereNowFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567ED82C209FF7003C974F /* PNPresenceWhereNowFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EDE2C209FF7003C974F /* PNPresenceWhereNowFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567ED82C209FF7003C974F /* PNPresenceWhereNowFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EDF2C209FF7003C974F /* PNPresenceWhereNowFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567ED92C209FF7003C974F /* PNPresenceWhereNowFetchData.m */; }; + A5567EE02C209FF7003C974F /* PNPresenceWhereNowFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567ED82C209FF7003C974F /* PNPresenceWhereNowFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EE12C209FF7003C974F /* PNPresenceWhereNowFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567ED92C209FF7003C974F /* PNPresenceWhereNowFetchData.m */; }; + A5567EE22C209FF7003C974F /* PNPresenceWhereNowFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567ED82C209FF7003C974F /* PNPresenceWhereNowFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EE32C209FF7003C974F /* PNPresenceWhereNowFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567ED92C209FF7003C974F /* PNPresenceWhereNowFetchData.m */; }; + A5567EE62C20A51A003C974F /* PNPresenceHeartbeatRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EE52C20A51A003C974F /* PNPresenceHeartbeatRequest.m */; }; + A5567EE72C20A51A003C974F /* PNPresenceHeartbeatRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EE42C20A51A003C974F /* PNPresenceHeartbeatRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EE82C20A51A003C974F /* PNPresenceHeartbeatRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EE52C20A51A003C974F /* PNPresenceHeartbeatRequest.m */; }; + A5567EE92C20A51A003C974F /* PNPresenceHeartbeatRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EE42C20A51A003C974F /* PNPresenceHeartbeatRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EEA2C20A51A003C974F /* PNPresenceHeartbeatRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EE42C20A51A003C974F /* PNPresenceHeartbeatRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EEB2C20A51A003C974F /* PNPresenceHeartbeatRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EE52C20A51A003C974F /* PNPresenceHeartbeatRequest.m */; }; + A5567EEC2C20A51A003C974F /* PNPresenceHeartbeatRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EE42C20A51A003C974F /* PNPresenceHeartbeatRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EED2C20A51A003C974F /* PNPresenceHeartbeatRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EE52C20A51A003C974F /* PNPresenceHeartbeatRequest.m */; }; + A5567EEE2C20A51A003C974F /* PNPresenceHeartbeatRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EE42C20A51A003C974F /* PNPresenceHeartbeatRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567EEF2C20A51A003C974F /* PNPresenceHeartbeatRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567EE52C20A51A003C974F /* PNPresenceHeartbeatRequest.m */; }; + A5567EF12C20D3DE003C974F /* PNPresenceHereNowFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EF02C20D3DE003C974F /* PNPresenceHereNowFetchData+Private.h */; }; + A5567EF22C20D3DE003C974F /* PNPresenceHereNowFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EF02C20D3DE003C974F /* PNPresenceHereNowFetchData+Private.h */; }; + A5567EF32C20D3DF003C974F /* PNPresenceHereNowFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EF02C20D3DE003C974F /* PNPresenceHereNowFetchData+Private.h */; }; + A5567EF42C20D3DF003C974F /* PNPresenceHereNowFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EF02C20D3DE003C974F /* PNPresenceHereNowFetchData+Private.h */; }; + A5567EF52C20D3DF003C974F /* PNPresenceHereNowFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EF02C20D3DE003C974F /* PNPresenceHereNowFetchData+Private.h */; }; + A5567EF72C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EF62C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h */; }; + A5567EF82C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EF62C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h */; }; + A5567EF92C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EF62C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h */; }; + A5567EFA2C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EF62C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h */; }; + A5567EFB2C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EF62C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h */; }; + A5567EFD2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EFC2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h */; }; + A5567EFE2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EFC2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h */; }; + A5567EFF2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EFC2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h */; }; + A5567F002C210714003C974F /* PNPresenceChannelHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EFC2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h */; }; + A5567F012C210714003C974F /* PNPresenceChannelHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567EFC2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h */; }; + A5567F0A2C219757003C974F /* PNBaseAppContextObject.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F092C219757003C974F /* PNBaseAppContextObject.m */; }; + A5567F0B2C219757003C974F /* PNBaseAppContextObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F082C219757003C974F /* PNBaseAppContextObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F0C2C219757003C974F /* PNBaseAppContextObject.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F092C219757003C974F /* PNBaseAppContextObject.m */; }; + A5567F0D2C219757003C974F /* PNBaseAppContextObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F082C219757003C974F /* PNBaseAppContextObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F0E2C219757003C974F /* PNBaseAppContextObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F082C219757003C974F /* PNBaseAppContextObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F0F2C219757003C974F /* PNBaseAppContextObject.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F092C219757003C974F /* PNBaseAppContextObject.m */; }; + A5567F102C219757003C974F /* PNBaseAppContextObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F082C219757003C974F /* PNBaseAppContextObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F112C219757003C974F /* PNBaseAppContextObject.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F092C219757003C974F /* PNBaseAppContextObject.m */; }; + A5567F122C219757003C974F /* PNBaseAppContextObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F082C219757003C974F /* PNBaseAppContextObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F132C219757003C974F /* PNBaseAppContextObject.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F092C219757003C974F /* PNBaseAppContextObject.m */; }; + A5567F152C219B9A003C974F /* PNBaseAppContextObject+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F142C219B9A003C974F /* PNBaseAppContextObject+Private.h */; }; + A5567F162C219B9A003C974F /* PNBaseAppContextObject+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F142C219B9A003C974F /* PNBaseAppContextObject+Private.h */; }; + A5567F172C219B9A003C974F /* PNBaseAppContextObject+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F142C219B9A003C974F /* PNBaseAppContextObject+Private.h */; }; + A5567F182C219B9A003C974F /* PNBaseAppContextObject+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F142C219B9A003C974F /* PNBaseAppContextObject+Private.h */; }; + A5567F192C219B9A003C974F /* PNBaseAppContextObject+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F142C219B9A003C974F /* PNBaseAppContextObject+Private.h */; }; + A5567F1D2C21D53D003C974F /* PNChannelMembersManageData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F1C2C21D53D003C974F /* PNChannelMembersManageData.m */; }; + A5567F1E2C21D53D003C974F /* PNChannelMembersManageData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F1B2C21D53D003C974F /* PNChannelMembersManageData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F1F2C21D53D003C974F /* PNChannelMembersManageData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F1C2C21D53D003C974F /* PNChannelMembersManageData.m */; }; + A5567F202C21D53D003C974F /* PNChannelMembersManageData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F1B2C21D53D003C974F /* PNChannelMembersManageData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F212C21D53D003C974F /* PNChannelMembersManageData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F1B2C21D53D003C974F /* PNChannelMembersManageData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F222C21D53D003C974F /* PNChannelMembersManageData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F1C2C21D53D003C974F /* PNChannelMembersManageData.m */; }; + A5567F232C21D53D003C974F /* PNChannelMembersManageData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F1B2C21D53D003C974F /* PNChannelMembersManageData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F242C21D53D003C974F /* PNChannelMembersManageData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F1C2C21D53D003C974F /* PNChannelMembersManageData.m */; }; + A5567F252C21D53D003C974F /* PNChannelMembersManageData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F1B2C21D53D003C974F /* PNChannelMembersManageData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F262C21D53D003C974F /* PNChannelMembersManageData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F1C2C21D53D003C974F /* PNChannelMembersManageData.m */; }; + A5567F292C21DB10003C974F /* PNMembershipsManageData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F282C21DB10003C974F /* PNMembershipsManageData.m */; }; + A5567F2A2C21DB10003C974F /* PNMembershipsManageData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F272C21DB10003C974F /* PNMembershipsManageData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F2B2C21DB10003C974F /* PNMembershipsManageData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F282C21DB10003C974F /* PNMembershipsManageData.m */; }; + A5567F2C2C21DB10003C974F /* PNMembershipsManageData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F272C21DB10003C974F /* PNMembershipsManageData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F2D2C21DB10003C974F /* PNMembershipsManageData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F272C21DB10003C974F /* PNMembershipsManageData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F2E2C21DB10003C974F /* PNMembershipsManageData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F282C21DB10003C974F /* PNMembershipsManageData.m */; }; + A5567F2F2C21DB10003C974F /* PNMembershipsManageData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F272C21DB10003C974F /* PNMembershipsManageData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F302C21DB10003C974F /* PNMembershipsManageData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F282C21DB10003C974F /* PNMembershipsManageData.m */; }; + A5567F312C21DB10003C974F /* PNMembershipsManageData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F272C21DB10003C974F /* PNMembershipsManageData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F322C21DB10003C974F /* PNMembershipsManageData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F282C21DB10003C974F /* PNMembershipsManageData.m */; }; + A5567F352C21E4DF003C974F /* PNUUIDMetadataSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F342C21E4DF003C974F /* PNUUIDMetadataSetData.m */; }; + A5567F362C21E4DF003C974F /* PNUUIDMetadataSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F332C21E4DF003C974F /* PNUUIDMetadataSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F372C21E4DF003C974F /* PNUUIDMetadataSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F342C21E4DF003C974F /* PNUUIDMetadataSetData.m */; }; + A5567F382C21E4DF003C974F /* PNUUIDMetadataSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F332C21E4DF003C974F /* PNUUIDMetadataSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F392C21E4DF003C974F /* PNUUIDMetadataSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F332C21E4DF003C974F /* PNUUIDMetadataSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F3A2C21E4DF003C974F /* PNUUIDMetadataSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F342C21E4DF003C974F /* PNUUIDMetadataSetData.m */; }; + A5567F3B2C21E4DF003C974F /* PNUUIDMetadataSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F332C21E4DF003C974F /* PNUUIDMetadataSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F3C2C21E4DF003C974F /* PNUUIDMetadataSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F342C21E4DF003C974F /* PNUUIDMetadataSetData.m */; }; + A5567F3D2C21E4DF003C974F /* PNUUIDMetadataSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F332C21E4DF003C974F /* PNUUIDMetadataSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F3E2C21E4DF003C974F /* PNUUIDMetadataSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F342C21E4DF003C974F /* PNUUIDMetadataSetData.m */; }; + A5567F412C21E723003C974F /* PNChannelMembersFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F402C21E723003C974F /* PNChannelMembersFetchData.m */; }; + A5567F422C21E723003C974F /* PNChannelMembersFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F3F2C21E723003C974F /* PNChannelMembersFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F432C21E723003C974F /* PNChannelMembersFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F402C21E723003C974F /* PNChannelMembersFetchData.m */; }; + A5567F442C21E723003C974F /* PNChannelMembersFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F3F2C21E723003C974F /* PNChannelMembersFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F452C21E723003C974F /* PNChannelMembersFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F3F2C21E723003C974F /* PNChannelMembersFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F462C21E723003C974F /* PNChannelMembersFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F402C21E723003C974F /* PNChannelMembersFetchData.m */; }; + A5567F472C21E723003C974F /* PNChannelMembersFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F3F2C21E723003C974F /* PNChannelMembersFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F482C21E723003C974F /* PNChannelMembersFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F402C21E723003C974F /* PNChannelMembersFetchData.m */; }; + A5567F492C21E723003C974F /* PNChannelMembersFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F3F2C21E723003C974F /* PNChannelMembersFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F4A2C21E723003C974F /* PNChannelMembersFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F402C21E723003C974F /* PNChannelMembersFetchData.m */; }; + A5567F4E2C21E965003C974F /* PNMembershipsFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F4B2C21E965003C974F /* PNMembershipsFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F502C21E965003C974F /* PNMembershipsFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F4B2C21E965003C974F /* PNMembershipsFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F512C21E965003C974F /* PNMembershipsFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F4B2C21E965003C974F /* PNMembershipsFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F532C21E965003C974F /* PNMembershipsFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F4B2C21E965003C974F /* PNMembershipsFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F552C21E965003C974F /* PNMembershipsFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F4B2C21E965003C974F /* PNMembershipsFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F592C21EBDF003C974F /* PNPagedAppContextData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F582C21EBDF003C974F /* PNPagedAppContextData.m */; }; + A5567F5A2C21EBDF003C974F /* PNPagedAppContextData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F572C21EBDF003C974F /* PNPagedAppContextData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F5B2C21EBDF003C974F /* PNPagedAppContextData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F582C21EBDF003C974F /* PNPagedAppContextData.m */; }; + A5567F5C2C21EBDF003C974F /* PNPagedAppContextData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F572C21EBDF003C974F /* PNPagedAppContextData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F5D2C21EBDF003C974F /* PNPagedAppContextData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F572C21EBDF003C974F /* PNPagedAppContextData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F5E2C21EBDF003C974F /* PNPagedAppContextData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F582C21EBDF003C974F /* PNPagedAppContextData.m */; }; + A5567F5F2C21EBDF003C974F /* PNPagedAppContextData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F572C21EBDF003C974F /* PNPagedAppContextData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F602C21EBDF003C974F /* PNPagedAppContextData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F582C21EBDF003C974F /* PNPagedAppContextData.m */; }; + A5567F612C21EBDF003C974F /* PNPagedAppContextData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F572C21EBDF003C974F /* PNPagedAppContextData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F622C21EBDF003C974F /* PNPagedAppContextData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F582C21EBDF003C974F /* PNPagedAppContextData.m */; }; + A5567F642C21ECBE003C974F /* PNPagedAppContextData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F632C21ECBE003C974F /* PNPagedAppContextData+Private.h */; }; + A5567F652C21ECBE003C974F /* PNPagedAppContextData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F632C21ECBE003C974F /* PNPagedAppContextData+Private.h */; }; + A5567F662C21ECBE003C974F /* PNPagedAppContextData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F632C21ECBE003C974F /* PNPagedAppContextData+Private.h */; }; + A5567F672C21ECBE003C974F /* PNPagedAppContextData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F632C21ECBE003C974F /* PNPagedAppContextData+Private.h */; }; + A5567F682C21ECBE003C974F /* PNPagedAppContextData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F632C21ECBE003C974F /* PNPagedAppContextData+Private.h */; }; + A5567F6B2C21F0EA003C974F /* PNUUIDMetadataFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F6A2C21F0EA003C974F /* PNUUIDMetadataFetchData.m */; }; + A5567F6C2C21F0EA003C974F /* PNUUIDMetadataFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F692C21F0EA003C974F /* PNUUIDMetadataFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F6D2C21F0EA003C974F /* PNUUIDMetadataFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F6A2C21F0EA003C974F /* PNUUIDMetadataFetchData.m */; }; + A5567F6E2C21F0EA003C974F /* PNUUIDMetadataFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F692C21F0EA003C974F /* PNUUIDMetadataFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F6F2C21F0EA003C974F /* PNUUIDMetadataFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F692C21F0EA003C974F /* PNUUIDMetadataFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F702C21F0EA003C974F /* PNUUIDMetadataFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F6A2C21F0EA003C974F /* PNUUIDMetadataFetchData.m */; }; + A5567F712C21F0EA003C974F /* PNUUIDMetadataFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F692C21F0EA003C974F /* PNUUIDMetadataFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F722C21F0EA003C974F /* PNUUIDMetadataFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F6A2C21F0EA003C974F /* PNUUIDMetadataFetchData.m */; }; + A5567F732C21F0EA003C974F /* PNUUIDMetadataFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F692C21F0EA003C974F /* PNUUIDMetadataFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F742C21F0EA003C974F /* PNUUIDMetadataFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F6A2C21F0EA003C974F /* PNUUIDMetadataFetchData.m */; }; + A5567F772C21F203003C974F /* PNUUIDMetadataFetchAllData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F762C21F203003C974F /* PNUUIDMetadataFetchAllData.m */; }; + A5567F782C21F203003C974F /* PNUUIDMetadataFetchAllData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F752C21F203003C974F /* PNUUIDMetadataFetchAllData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F792C21F203003C974F /* PNUUIDMetadataFetchAllData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F762C21F203003C974F /* PNUUIDMetadataFetchAllData.m */; }; + A5567F7A2C21F203003C974F /* PNUUIDMetadataFetchAllData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F752C21F203003C974F /* PNUUIDMetadataFetchAllData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F7B2C21F203003C974F /* PNUUIDMetadataFetchAllData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F752C21F203003C974F /* PNUUIDMetadataFetchAllData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F7C2C21F203003C974F /* PNUUIDMetadataFetchAllData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F762C21F203003C974F /* PNUUIDMetadataFetchAllData.m */; }; + A5567F7D2C21F203003C974F /* PNUUIDMetadataFetchAllData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F752C21F203003C974F /* PNUUIDMetadataFetchAllData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F7E2C21F203003C974F /* PNUUIDMetadataFetchAllData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F762C21F203003C974F /* PNUUIDMetadataFetchAllData.m */; }; + A5567F7F2C21F203003C974F /* PNUUIDMetadataFetchAllData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F752C21F203003C974F /* PNUUIDMetadataFetchAllData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F802C21F203003C974F /* PNUUIDMetadataFetchAllData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F762C21F203003C974F /* PNUUIDMetadataFetchAllData.m */; }; + A5567F832C21F31E003C974F /* PNChannelMetadataFetchAllData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F822C21F31E003C974F /* PNChannelMetadataFetchAllData.m */; }; + A5567F842C21F31E003C974F /* PNChannelMetadataFetchAllData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F812C21F31E003C974F /* PNChannelMetadataFetchAllData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F852C21F31E003C974F /* PNChannelMetadataFetchAllData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F822C21F31E003C974F /* PNChannelMetadataFetchAllData.m */; }; + A5567F862C21F31E003C974F /* PNChannelMetadataFetchAllData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F812C21F31E003C974F /* PNChannelMetadataFetchAllData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F872C21F31E003C974F /* PNChannelMetadataFetchAllData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F812C21F31E003C974F /* PNChannelMetadataFetchAllData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F882C21F31E003C974F /* PNChannelMetadataFetchAllData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F822C21F31E003C974F /* PNChannelMetadataFetchAllData.m */; }; + A5567F892C21F31E003C974F /* PNChannelMetadataFetchAllData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F812C21F31E003C974F /* PNChannelMetadataFetchAllData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F8A2C21F31E003C974F /* PNChannelMetadataFetchAllData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F822C21F31E003C974F /* PNChannelMetadataFetchAllData.m */; }; + A5567F8B2C21F31E003C974F /* PNChannelMetadataFetchAllData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F812C21F31E003C974F /* PNChannelMetadataFetchAllData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F8C2C21F31E003C974F /* PNChannelMetadataFetchAllData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F822C21F31E003C974F /* PNChannelMetadataFetchAllData.m */; }; + A5567F972C220E32003C974F /* PNFetchMembershipsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F952C220E32003C974F /* PNFetchMembershipsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F982C220E32003C974F /* PNFetchMembershipsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F952C220E32003C974F /* PNFetchMembershipsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F992C220E32003C974F /* PNFetchMembershipsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F952C220E32003C974F /* PNFetchMembershipsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F9A2C220E32003C974F /* PNFetchMembershipsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F952C220E32003C974F /* PNFetchMembershipsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F9B2C220E32003C974F /* PNFetchMembershipsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567F952C220E32003C974F /* PNFetchMembershipsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567F9C2C220E32003C974F /* PNFetchMembershipsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F962C220E32003C974F /* PNFetchMembershipsResult.m */; }; + A5567F9D2C220E32003C974F /* PNFetchMembershipsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F962C220E32003C974F /* PNFetchMembershipsResult.m */; }; + A5567F9E2C220E32003C974F /* PNFetchMembershipsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F962C220E32003C974F /* PNFetchMembershipsResult.m */; }; + A5567F9F2C220E32003C974F /* PNFetchMembershipsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F962C220E32003C974F /* PNFetchMembershipsResult.m */; }; + A5567FA02C220E32003C974F /* PNFetchMembershipsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567F962C220E32003C974F /* PNFetchMembershipsResult.m */; }; + A5567FA62C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FA52C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h */; }; + A5567FA72C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FA52C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h */; }; + A5567FA82C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FA52C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h */; }; + A5567FA92C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FA52C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h */; }; + A5567FAA2C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FA52C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h */; }; + A5567FB02C22107D003C974F /* PNClientStateUpdateStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FAF2C22107D003C974F /* PNClientStateUpdateStatus.m */; }; + A5567FB12C22107D003C974F /* PNClientStateUpdateStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FAF2C22107D003C974F /* PNClientStateUpdateStatus.m */; }; + A5567FB22C22107D003C974F /* PNClientStateUpdateStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FAF2C22107D003C974F /* PNClientStateUpdateStatus.m */; }; + A5567FB32C22107D003C974F /* PNClientStateUpdateStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FAF2C22107D003C974F /* PNClientStateUpdateStatus.m */; }; + A5567FB42C22107D003C974F /* PNClientStateUpdateStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FAF2C22107D003C974F /* PNClientStateUpdateStatus.m */; }; + A5567FB72C221136003C974F /* PNChannelMetadataFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FB62C221136003C974F /* PNChannelMetadataFetchData.m */; }; + A5567FB82C221136003C974F /* PNChannelMetadataFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FB52C221136003C974F /* PNChannelMetadataFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FB92C221136003C974F /* PNChannelMetadataFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FB62C221136003C974F /* PNChannelMetadataFetchData.m */; }; + A5567FBA2C221136003C974F /* PNChannelMetadataFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FB52C221136003C974F /* PNChannelMetadataFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FBB2C221136003C974F /* PNChannelMetadataFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FB52C221136003C974F /* PNChannelMetadataFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FBC2C221136003C974F /* PNChannelMetadataFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FB62C221136003C974F /* PNChannelMetadataFetchData.m */; }; + A5567FBD2C221136003C974F /* PNChannelMetadataFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FB52C221136003C974F /* PNChannelMetadataFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FBE2C221136003C974F /* PNChannelMetadataFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FB62C221136003C974F /* PNChannelMetadataFetchData.m */; }; + A5567FBF2C221136003C974F /* PNChannelMetadataFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FB52C221136003C974F /* PNChannelMetadataFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FC02C221136003C974F /* PNChannelMetadataFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FB62C221136003C974F /* PNChannelMetadataFetchData.m */; }; + A5567FC32C221230003C974F /* PNChannelMetadataSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FC22C221230003C974F /* PNChannelMetadataSetData.m */; }; + A5567FC42C221231003C974F /* PNChannelMetadataSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FC12C221230003C974F /* PNChannelMetadataSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FC52C221231003C974F /* PNChannelMetadataSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FC22C221230003C974F /* PNChannelMetadataSetData.m */; }; + A5567FC62C221231003C974F /* PNChannelMetadataSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FC12C221230003C974F /* PNChannelMetadataSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FC72C221231003C974F /* PNChannelMetadataSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FC12C221230003C974F /* PNChannelMetadataSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FC82C221231003C974F /* PNChannelMetadataSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FC22C221230003C974F /* PNChannelMetadataSetData.m */; }; + A5567FC92C221231003C974F /* PNChannelMetadataSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FC12C221230003C974F /* PNChannelMetadataSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FCA2C221231003C974F /* PNChannelMetadataSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FC22C221230003C974F /* PNChannelMetadataSetData.m */; }; + A5567FCB2C221231003C974F /* PNChannelMetadataSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FC12C221230003C974F /* PNChannelMetadataSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FCC2C221231003C974F /* PNChannelMetadataSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FC22C221230003C974F /* PNChannelMetadataSetData.m */; }; + A5567FCF2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FCD2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m */; }; + A5567FD02C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FCD2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m */; }; + A5567FD12C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FCD2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m */; }; + A5567FD22C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FCD2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m */; }; + A5567FD32C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FCD2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m */; }; + A5567FD42C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FCE2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FD52C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FCE2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FD62C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FCE2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FD72C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FCE2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FD82C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FCE2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FDB2C221A20003C974F /* PNFetchAllUUIDMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FD92C221A20003C974F /* PNFetchAllUUIDMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FDC2C221A20003C974F /* PNFetchAllUUIDMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FD92C221A20003C974F /* PNFetchAllUUIDMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FDD2C221A20003C974F /* PNFetchAllUUIDMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FD92C221A20003C974F /* PNFetchAllUUIDMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FDE2C221A20003C974F /* PNFetchAllUUIDMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FD92C221A20003C974F /* PNFetchAllUUIDMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FDF2C221A20003C974F /* PNFetchAllUUIDMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FD92C221A20003C974F /* PNFetchAllUUIDMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FE02C221A20003C974F /* PNFetchAllUUIDMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FDA2C221A20003C974F /* PNFetchAllUUIDMetadataResult.m */; }; + A5567FE12C221A20003C974F /* PNFetchAllUUIDMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FDA2C221A20003C974F /* PNFetchAllUUIDMetadataResult.m */; }; + A5567FE22C221A20003C974F /* PNFetchAllUUIDMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FDA2C221A20003C974F /* PNFetchAllUUIDMetadataResult.m */; }; + A5567FE32C221A20003C974F /* PNFetchAllUUIDMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FDA2C221A20003C974F /* PNFetchAllUUIDMetadataResult.m */; }; + A5567FE42C221A20003C974F /* PNFetchAllUUIDMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FDA2C221A20003C974F /* PNFetchAllUUIDMetadataResult.m */; }; + A5567FE82C222F1B003C974F /* PNHistoryMessageCountData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FE52C222F1B003C974F /* PNHistoryMessageCountData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FEA2C222F1B003C974F /* PNHistoryMessageCountData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FE52C222F1B003C974F /* PNHistoryMessageCountData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FEB2C222F1B003C974F /* PNHistoryMessageCountData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FE52C222F1B003C974F /* PNHistoryMessageCountData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FED2C222F1B003C974F /* PNHistoryMessageCountData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FE52C222F1B003C974F /* PNHistoryMessageCountData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FEF2C222F1B003C974F /* PNHistoryMessageCountData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FE52C222F1B003C974F /* PNHistoryMessageCountData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FF22C2242B1003C974F /* PNHistoryFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FF12C2242B1003C974F /* PNHistoryFetchData+Private.h */; }; + A5567FF32C2242B1003C974F /* PNHistoryFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FF12C2242B1003C974F /* PNHistoryFetchData+Private.h */; }; + A5567FF42C2242B1003C974F /* PNHistoryFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FF12C2242B1003C974F /* PNHistoryFetchData+Private.h */; }; + A5567FF52C2242B1003C974F /* PNHistoryFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FF12C2242B1003C974F /* PNHistoryFetchData+Private.h */; }; + A5567FF62C2242B1003C974F /* PNHistoryFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FF12C2242B1003C974F /* PNHistoryFetchData+Private.h */; }; + A5567FF92C225146003C974F /* PNPresenceUserStateFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FF82C225146003C974F /* PNPresenceUserStateFetchData.m */; }; + A5567FFA2C225146003C974F /* PNPresenceUserStateFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FF72C225146003C974F /* PNPresenceUserStateFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FFB2C225146003C974F /* PNPresenceUserStateFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FF82C225146003C974F /* PNPresenceUserStateFetchData.m */; }; + A5567FFC2C225146003C974F /* PNPresenceUserStateFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FF72C225146003C974F /* PNPresenceUserStateFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FFD2C225146003C974F /* PNPresenceUserStateFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FF72C225146003C974F /* PNPresenceUserStateFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5567FFE2C225146003C974F /* PNPresenceUserStateFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FF82C225146003C974F /* PNPresenceUserStateFetchData.m */; }; + A5567FFF2C225146003C974F /* PNPresenceUserStateFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FF72C225146003C974F /* PNPresenceUserStateFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680002C225146003C974F /* PNPresenceUserStateFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FF82C225146003C974F /* PNPresenceUserStateFetchData.m */; }; + A55680012C225146003C974F /* PNPresenceUserStateFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5567FF72C225146003C974F /* PNPresenceUserStateFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680022C225146003C974F /* PNPresenceUserStateFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5567FF82C225146003C974F /* PNPresenceUserStateFetchData.m */; }; + A55680042C225579003C974F /* PNPresenceUserStateFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680032C225579003C974F /* PNPresenceUserStateFetchData+Private.h */; }; + A55680052C225579003C974F /* PNPresenceUserStateFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680032C225579003C974F /* PNPresenceUserStateFetchData+Private.h */; }; + A55680062C225579003C974F /* PNPresenceUserStateFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680032C225579003C974F /* PNPresenceUserStateFetchData+Private.h */; }; + A55680072C225579003C974F /* PNPresenceUserStateFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680032C225579003C974F /* PNPresenceUserStateFetchData+Private.h */; }; + A55680082C225579003C974F /* PNPresenceUserStateFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680032C225579003C974F /* PNPresenceUserStateFetchData+Private.h */; }; + A556800A2C22603F003C974F /* PNClientStateGetResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680092C22603F003C974F /* PNClientStateGetResult+Private.h */; }; + A556800B2C22603F003C974F /* PNClientStateGetResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680092C22603F003C974F /* PNClientStateGetResult+Private.h */; }; + A556800C2C22603F003C974F /* PNClientStateGetResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680092C22603F003C974F /* PNClientStateGetResult+Private.h */; }; + A556800D2C22603F003C974F /* PNClientStateGetResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680092C22603F003C974F /* PNClientStateGetResult+Private.h */; }; + A556800E2C22603F003C974F /* PNClientStateGetResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680092C22603F003C974F /* PNClientStateGetResult+Private.h */; }; + A55680102C226378003C974F /* PNChannelGroupClientStateResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556800F2C226378003C974F /* PNChannelGroupClientStateResult+Private.h */; }; + A55680112C226378003C974F /* PNChannelGroupClientStateResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556800F2C226378003C974F /* PNChannelGroupClientStateResult+Private.h */; }; + A55680122C226378003C974F /* PNChannelGroupClientStateResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556800F2C226378003C974F /* PNChannelGroupClientStateResult+Private.h */; }; + A55680132C226378003C974F /* PNChannelGroupClientStateResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556800F2C226378003C974F /* PNChannelGroupClientStateResult+Private.h */; }; + A55680142C226378003C974F /* PNChannelGroupClientStateResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556800F2C226378003C974F /* PNChannelGroupClientStateResult+Private.h */; }; + A55680162C226632003C974F /* PNChannelClientStateResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680152C226632003C974F /* PNChannelClientStateResult+Private.h */; }; + A55680172C226632003C974F /* PNChannelClientStateResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680152C226632003C974F /* PNChannelClientStateResult+Private.h */; }; + A55680182C226632003C974F /* PNChannelClientStateResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680152C226632003C974F /* PNChannelClientStateResult+Private.h */; }; + A55680192C226632003C974F /* PNChannelClientStateResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680152C226632003C974F /* PNChannelClientStateResult+Private.h */; }; + A556801A2C226632003C974F /* PNChannelClientStateResult+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680152C226632003C974F /* PNChannelClientStateResult+Private.h */; }; + A556801D2C226866003C974F /* PNPresenceUserStateSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A556801C2C226866003C974F /* PNPresenceUserStateSetData.m */; }; + A556801E2C226866003C974F /* PNPresenceUserStateSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556801B2C226866003C974F /* PNPresenceUserStateSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A556801F2C226866003C974F /* PNPresenceUserStateSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A556801C2C226866003C974F /* PNPresenceUserStateSetData.m */; }; + A55680202C226866003C974F /* PNPresenceUserStateSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556801B2C226866003C974F /* PNPresenceUserStateSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680212C226866003C974F /* PNPresenceUserStateSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556801B2C226866003C974F /* PNPresenceUserStateSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680222C226866003C974F /* PNPresenceUserStateSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A556801C2C226866003C974F /* PNPresenceUserStateSetData.m */; }; + A55680232C226866003C974F /* PNPresenceUserStateSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556801B2C226866003C974F /* PNPresenceUserStateSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680242C226866003C974F /* PNPresenceUserStateSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A556801C2C226866003C974F /* PNPresenceUserStateSetData.m */; }; + A55680252C226866003C974F /* PNPresenceUserStateSetData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556801B2C226866003C974F /* PNPresenceUserStateSetData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680262C226866003C974F /* PNPresenceUserStateSetData.m in Sources */ = {isa = PBXBuildFile; fileRef = A556801C2C226866003C974F /* PNPresenceUserStateSetData.m */; }; + A55680292C2294EE003C974F /* PNGenerateFileUploadURLStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680272C2294ED003C974F /* PNGenerateFileUploadURLStatus.h */; }; + A556802A2C2294EE003C974F /* PNGenerateFileUploadURLStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680272C2294ED003C974F /* PNGenerateFileUploadURLStatus.h */; }; + A556802B2C2294EE003C974F /* PNGenerateFileUploadURLStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680272C2294ED003C974F /* PNGenerateFileUploadURLStatus.h */; }; + A556802C2C2294EE003C974F /* PNGenerateFileUploadURLStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680272C2294ED003C974F /* PNGenerateFileUploadURLStatus.h */; }; + A556802D2C2294EE003C974F /* PNGenerateFileUploadURLStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680272C2294ED003C974F /* PNGenerateFileUploadURLStatus.h */; }; + A556802E2C2294EE003C974F /* PNGenerateFileUploadURLStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680282C2294ED003C974F /* PNGenerateFileUploadURLStatus.m */; }; + A556802F2C2294EE003C974F /* PNGenerateFileUploadURLStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680282C2294ED003C974F /* PNGenerateFileUploadURLStatus.m */; }; + A55680302C2294EE003C974F /* PNGenerateFileUploadURLStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680282C2294ED003C974F /* PNGenerateFileUploadURLStatus.m */; }; + A55680312C2294EE003C974F /* PNGenerateFileUploadURLStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680282C2294ED003C974F /* PNGenerateFileUploadURLStatus.m */; }; + A55680322C2294EE003C974F /* PNGenerateFileUploadURLStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680282C2294ED003C974F /* PNGenerateFileUploadURLStatus.m */; }; + A55680352C229587003C974F /* PNFileGenerateUploadURLData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680342C229587003C974F /* PNFileGenerateUploadURLData.m */; }; + A55680362C229587003C974F /* PNFileGenerateUploadURLData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680332C229587003C974F /* PNFileGenerateUploadURLData.h */; }; + A55680372C229587003C974F /* PNFileGenerateUploadURLData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680342C229587003C974F /* PNFileGenerateUploadURLData.m */; }; + A55680382C229587003C974F /* PNFileGenerateUploadURLData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680332C229587003C974F /* PNFileGenerateUploadURLData.h */; }; + A55680392C229587003C974F /* PNFileGenerateUploadURLData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680332C229587003C974F /* PNFileGenerateUploadURLData.h */; }; + A556803A2C229587003C974F /* PNFileGenerateUploadURLData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680342C229587003C974F /* PNFileGenerateUploadURLData.m */; }; + A556803B2C229587003C974F /* PNFileGenerateUploadURLData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680332C229587003C974F /* PNFileGenerateUploadURLData.h */; }; + A556803C2C229587003C974F /* PNFileGenerateUploadURLData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680342C229587003C974F /* PNFileGenerateUploadURLData.m */; }; + A556803D2C229587003C974F /* PNFileGenerateUploadURLData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680332C229587003C974F /* PNFileGenerateUploadURLData.h */; }; + A556803E2C229587003C974F /* PNFileGenerateUploadURLData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680342C229587003C974F /* PNFileGenerateUploadURLData.m */; }; + A55680412C229D8D003C974F /* PNFileSendData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680402C229D8D003C974F /* PNFileSendData.m */; }; + A55680422C229D8D003C974F /* PNFileSendData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556803F2C229D8D003C974F /* PNFileSendData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680432C229D8D003C974F /* PNFileSendData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680402C229D8D003C974F /* PNFileSendData.m */; }; + A55680442C229D8D003C974F /* PNFileSendData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556803F2C229D8D003C974F /* PNFileSendData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680452C229D8D003C974F /* PNFileSendData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556803F2C229D8D003C974F /* PNFileSendData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680462C229D8D003C974F /* PNFileSendData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680402C229D8D003C974F /* PNFileSendData.m */; }; + A55680472C229D8D003C974F /* PNFileSendData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556803F2C229D8D003C974F /* PNFileSendData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680482C229D8D003C974F /* PNFileSendData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680402C229D8D003C974F /* PNFileSendData.m */; }; + A55680492C229D8D003C974F /* PNFileSendData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556803F2C229D8D003C974F /* PNFileSendData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A556804A2C229D8D003C974F /* PNFileSendData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680402C229D8D003C974F /* PNFileSendData.m */; }; + A556804C2C22BA84003C974F /* PNFileSendData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556804B2C22BA84003C974F /* PNFileSendData+Private.h */; }; + A556804D2C22BA84003C974F /* PNFileSendData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556804B2C22BA84003C974F /* PNFileSendData+Private.h */; }; + A556804E2C22BA84003C974F /* PNFileSendData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556804B2C22BA84003C974F /* PNFileSendData+Private.h */; }; + A556804F2C22BA84003C974F /* PNFileSendData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556804B2C22BA84003C974F /* PNFileSendData+Private.h */; }; + A55680502C22BA84003C974F /* PNFileSendData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556804B2C22BA84003C974F /* PNFileSendData+Private.h */; }; + A55680532C22BE6D003C974F /* PNFileUploadRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680522C22BE6D003C974F /* PNFileUploadRequest.m */; }; + A55680542C22BE6D003C974F /* PNFileUploadRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680512C22BE6D003C974F /* PNFileUploadRequest.h */; }; + A55680552C22BE6D003C974F /* PNFileUploadRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680522C22BE6D003C974F /* PNFileUploadRequest.m */; }; + A55680562C22BE6D003C974F /* PNFileUploadRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680512C22BE6D003C974F /* PNFileUploadRequest.h */; }; + A55680572C22BE6D003C974F /* PNFileUploadRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680512C22BE6D003C974F /* PNFileUploadRequest.h */; }; + A55680582C22BE6D003C974F /* PNFileUploadRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680522C22BE6D003C974F /* PNFileUploadRequest.m */; }; + A55680592C22BE6D003C974F /* PNFileUploadRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680512C22BE6D003C974F /* PNFileUploadRequest.h */; }; + A556805A2C22BE6D003C974F /* PNFileUploadRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680522C22BE6D003C974F /* PNFileUploadRequest.m */; }; + A556805B2C22BE6D003C974F /* PNFileUploadRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680512C22BE6D003C974F /* PNFileUploadRequest.h */; }; + A556805C2C22BE6D003C974F /* PNFileUploadRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680522C22BE6D003C974F /* PNFileUploadRequest.m */; }; + A55680652C2311D0003C974F /* PNGenerateFileDownloadURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680642C2311CF003C974F /* PNGenerateFileDownloadURLRequest.m */; }; + A55680662C2311D0003C974F /* PNGenerateFileDownloadURLRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680632C2311CF003C974F /* PNGenerateFileDownloadURLRequest.h */; }; + A55680672C2311D0003C974F /* PNGenerateFileDownloadURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680642C2311CF003C974F /* PNGenerateFileDownloadURLRequest.m */; }; + A55680682C2311D0003C974F /* PNGenerateFileDownloadURLRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680632C2311CF003C974F /* PNGenerateFileDownloadURLRequest.h */; }; + A55680692C2311D0003C974F /* PNGenerateFileDownloadURLRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680632C2311CF003C974F /* PNGenerateFileDownloadURLRequest.h */; }; + A556806A2C2311D0003C974F /* PNGenerateFileDownloadURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680642C2311CF003C974F /* PNGenerateFileDownloadURLRequest.m */; }; + A556806B2C2311D0003C974F /* PNGenerateFileDownloadURLRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680632C2311CF003C974F /* PNGenerateFileDownloadURLRequest.h */; }; + A556806C2C2311D0003C974F /* PNGenerateFileDownloadURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680642C2311CF003C974F /* PNGenerateFileDownloadURLRequest.m */; }; + A556806D2C2311D0003C974F /* PNGenerateFileDownloadURLRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680632C2311CF003C974F /* PNGenerateFileDownloadURLRequest.h */; }; + A556806E2C2311D0003C974F /* PNGenerateFileDownloadURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680642C2311CF003C974F /* PNGenerateFileDownloadURLRequest.m */; }; + A55680712C2344A9003C974F /* PNFileListFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680702C2344A9003C974F /* PNFileListFetchData.m */; }; + A55680722C2344A9003C974F /* PNFileListFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556806F2C2344A9003C974F /* PNFileListFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680732C2344A9003C974F /* PNFileListFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556806F2C2344A9003C974F /* PNFileListFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680742C2344A9003C974F /* PNFileListFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680702C2344A9003C974F /* PNFileListFetchData.m */; }; + A55680752C2344A9003C974F /* PNFileListFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680702C2344A9003C974F /* PNFileListFetchData.m */; }; + A55680762C2344A9003C974F /* PNFileListFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556806F2C2344A9003C974F /* PNFileListFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680772C2344A9003C974F /* PNFileListFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680702C2344A9003C974F /* PNFileListFetchData.m */; }; + A55680782C2344A9003C974F /* PNFileListFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556806F2C2344A9003C974F /* PNFileListFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680792C2344A9003C974F /* PNFileListFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A556806F2C2344A9003C974F /* PNFileListFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A556807A2C2344A9003C974F /* PNFileListFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680702C2344A9003C974F /* PNFileListFetchData.m */; }; + A556807C2C234B4E003C974F /* PNFileListFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556807B2C234B4D003C974F /* PNFileListFetchData+Private.h */; }; + A556807D2C234B4E003C974F /* PNFileListFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556807B2C234B4D003C974F /* PNFileListFetchData+Private.h */; }; + A556807E2C234B4E003C974F /* PNFileListFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556807B2C234B4D003C974F /* PNFileListFetchData+Private.h */; }; + A556807F2C234B4E003C974F /* PNFileListFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556807B2C234B4D003C974F /* PNFileListFetchData+Private.h */; }; + A55680802C234B4E003C974F /* PNFileListFetchData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556807B2C234B4D003C974F /* PNFileListFetchData+Private.h */; }; + A55680832C23527D003C974F /* PNFileDownloadData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680822C23527D003C974F /* PNFileDownloadData.m */; }; + A55680842C23527D003C974F /* PNFileDownloadData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680812C23527D003C974F /* PNFileDownloadData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680852C23527D003C974F /* PNFileDownloadData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680812C23527D003C974F /* PNFileDownloadData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680862C23527D003C974F /* PNFileDownloadData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680822C23527D003C974F /* PNFileDownloadData.m */; }; + A55680872C23527D003C974F /* PNFileDownloadData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680822C23527D003C974F /* PNFileDownloadData.m */; }; + A55680882C23527D003C974F /* PNFileDownloadData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680812C23527D003C974F /* PNFileDownloadData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680892C23527D003C974F /* PNFileDownloadData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680822C23527D003C974F /* PNFileDownloadData.m */; }; + A556808A2C23527D003C974F /* PNFileDownloadData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680812C23527D003C974F /* PNFileDownloadData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A556808B2C23527D003C974F /* PNFileDownloadData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680812C23527D003C974F /* PNFileDownloadData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A556808C2C23527D003C974F /* PNFileDownloadData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680822C23527D003C974F /* PNFileDownloadData.m */; }; + A556808E2C235360003C974F /* PNFileDownloadData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556808D2C235360003C974F /* PNFileDownloadData+Private.h */; }; + A556808F2C235360003C974F /* PNFileDownloadData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556808D2C235360003C974F /* PNFileDownloadData+Private.h */; }; + A55680902C235360003C974F /* PNFileDownloadData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556808D2C235360003C974F /* PNFileDownloadData+Private.h */; }; + A55680912C235360003C974F /* PNFileDownloadData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556808D2C235360003C974F /* PNFileDownloadData+Private.h */; }; + A55680922C235360003C974F /* PNFileDownloadData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A556808D2C235360003C974F /* PNFileDownloadData+Private.h */; }; + A55680942C237BC1003C974F /* PNSubscribeEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680932C237BC1003C974F /* PNSubscribeEventData+Private.h */; }; + A55680952C237BC1003C974F /* PNSubscribeEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680932C237BC1003C974F /* PNSubscribeEventData+Private.h */; }; + A55680962C237BC1003C974F /* PNSubscribeEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680932C237BC1003C974F /* PNSubscribeEventData+Private.h */; }; + A55680972C237BC1003C974F /* PNSubscribeEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680932C237BC1003C974F /* PNSubscribeEventData+Private.h */; }; + A55680982C237BC1003C974F /* PNSubscribeEventData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680932C237BC1003C974F /* PNSubscribeEventData+Private.h */; }; + A556809B2C2385BC003C974F /* PNSubscribeMessageEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A556809A2C2385BC003C974F /* PNSubscribeMessageEventData.m */; }; + A556809C2C2385BC003C974F /* PNSubscribeMessageEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680992C2385BC003C974F /* PNSubscribeMessageEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A556809D2C2385BC003C974F /* PNSubscribeMessageEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680992C2385BC003C974F /* PNSubscribeMessageEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A556809E2C2385BC003C974F /* PNSubscribeMessageEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A556809A2C2385BC003C974F /* PNSubscribeMessageEventData.m */; }; + A556809F2C2385BC003C974F /* PNSubscribeMessageEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A556809A2C2385BC003C974F /* PNSubscribeMessageEventData.m */; }; + A55680A02C2385BC003C974F /* PNSubscribeMessageEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680992C2385BC003C974F /* PNSubscribeMessageEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680A12C2385BC003C974F /* PNSubscribeMessageEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A556809A2C2385BC003C974F /* PNSubscribeMessageEventData.m */; }; + A55680A22C2385BC003C974F /* PNSubscribeMessageEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680992C2385BC003C974F /* PNSubscribeMessageEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680A32C2385BC003C974F /* PNSubscribeMessageEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680992C2385BC003C974F /* PNSubscribeMessageEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680A42C2385BC003C974F /* PNSubscribeMessageEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A556809A2C2385BC003C974F /* PNSubscribeMessageEventData.m */; }; + A55680A72C23880C003C974F /* PNSubscribeMessageActionEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680A62C23880C003C974F /* PNSubscribeMessageActionEventData.m */; }; + A55680A82C23880C003C974F /* PNSubscribeMessageActionEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680A52C23880C003C974F /* PNSubscribeMessageActionEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680A92C23880C003C974F /* PNSubscribeMessageActionEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680A52C23880C003C974F /* PNSubscribeMessageActionEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680AA2C23880C003C974F /* PNSubscribeMessageActionEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680A62C23880C003C974F /* PNSubscribeMessageActionEventData.m */; }; + A55680AB2C23880C003C974F /* PNSubscribeMessageActionEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680A62C23880C003C974F /* PNSubscribeMessageActionEventData.m */; }; + A55680AC2C23880C003C974F /* PNSubscribeMessageActionEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680A52C23880C003C974F /* PNSubscribeMessageActionEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680AD2C23880C003C974F /* PNSubscribeMessageActionEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680A62C23880C003C974F /* PNSubscribeMessageActionEventData.m */; }; + A55680AE2C23880C003C974F /* PNSubscribeMessageActionEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680A52C23880C003C974F /* PNSubscribeMessageActionEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680AF2C23880C003C974F /* PNSubscribeMessageActionEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680A52C23880C003C974F /* PNSubscribeMessageActionEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680B02C23880C003C974F /* PNSubscribeMessageActionEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680A62C23880C003C974F /* PNSubscribeMessageActionEventData.m */; }; + A55680B32C238EEB003C974F /* PNSubscribeObjectEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680B22C238EEB003C974F /* PNSubscribeObjectEventData.m */; }; + A55680B42C238EEB003C974F /* PNSubscribeObjectEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680B12C238EEB003C974F /* PNSubscribeObjectEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680B52C238EEB003C974F /* PNSubscribeObjectEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680B12C238EEB003C974F /* PNSubscribeObjectEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680B62C238EEB003C974F /* PNSubscribeObjectEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680B22C238EEB003C974F /* PNSubscribeObjectEventData.m */; }; + A55680B72C238EEB003C974F /* PNSubscribeObjectEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680B22C238EEB003C974F /* PNSubscribeObjectEventData.m */; }; + A55680B82C238EEB003C974F /* PNSubscribeObjectEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680B12C238EEB003C974F /* PNSubscribeObjectEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680B92C238EEB003C974F /* PNSubscribeObjectEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680B22C238EEB003C974F /* PNSubscribeObjectEventData.m */; }; + A55680BA2C238EEB003C974F /* PNSubscribeObjectEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680B12C238EEB003C974F /* PNSubscribeObjectEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680BB2C238EEB003C974F /* PNSubscribeObjectEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680B12C238EEB003C974F /* PNSubscribeObjectEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680BC2C238EEB003C974F /* PNSubscribeObjectEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680B22C238EEB003C974F /* PNSubscribeObjectEventData.m */; }; + A55680BF2C23A8CD003C974F /* PNSubscribeSignalEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680BE2C23A8CD003C974F /* PNSubscribeSignalEventData.m */; }; + A55680C02C23A8CD003C974F /* PNSubscribeSignalEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680BD2C23A8CD003C974F /* PNSubscribeSignalEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680C12C23A8CD003C974F /* PNSubscribeSignalEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680BD2C23A8CD003C974F /* PNSubscribeSignalEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680C22C23A8CD003C974F /* PNSubscribeSignalEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680BE2C23A8CD003C974F /* PNSubscribeSignalEventData.m */; }; + A55680C32C23A8CD003C974F /* PNSubscribeSignalEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680BE2C23A8CD003C974F /* PNSubscribeSignalEventData.m */; }; + A55680C42C23A8CD003C974F /* PNSubscribeSignalEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680BD2C23A8CD003C974F /* PNSubscribeSignalEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680C52C23A8CD003C974F /* PNSubscribeSignalEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680BE2C23A8CD003C974F /* PNSubscribeSignalEventData.m */; }; + A55680C62C23A8CD003C974F /* PNSubscribeSignalEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680BD2C23A8CD003C974F /* PNSubscribeSignalEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680C72C23A8CD003C974F /* PNSubscribeSignalEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680BD2C23A8CD003C974F /* PNSubscribeSignalEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680C82C23A8CD003C974F /* PNSubscribeSignalEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680BE2C23A8CD003C974F /* PNSubscribeSignalEventData.m */; }; + A55680CB2C2400B3003C974F /* PNSubscribePresenceEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680CA2C2400B3003C974F /* PNSubscribePresenceEventData.m */; }; + A55680CC2C2400B3003C974F /* PNSubscribePresenceEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680C92C2400B3003C974F /* PNSubscribePresenceEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680CD2C2400B3003C974F /* PNSubscribePresenceEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680C92C2400B3003C974F /* PNSubscribePresenceEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680CE2C2400B3003C974F /* PNSubscribePresenceEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680CA2C2400B3003C974F /* PNSubscribePresenceEventData.m */; }; + A55680CF2C2400B3003C974F /* PNSubscribePresenceEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680CA2C2400B3003C974F /* PNSubscribePresenceEventData.m */; }; + A55680D02C2400B3003C974F /* PNSubscribePresenceEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680C92C2400B3003C974F /* PNSubscribePresenceEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680D12C2400B3003C974F /* PNSubscribePresenceEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680CA2C2400B3003C974F /* PNSubscribePresenceEventData.m */; }; + A55680D22C2400B3003C974F /* PNSubscribePresenceEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680C92C2400B3003C974F /* PNSubscribePresenceEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680D32C2400B3003C974F /* PNSubscribePresenceEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680C92C2400B3003C974F /* PNSubscribePresenceEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680D42C2400B3003C974F /* PNSubscribePresenceEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680CA2C2400B3003C974F /* PNSubscribePresenceEventData.m */; }; + A55680D72C2428E8003C974F /* PNSubscribeFileEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680D62C2428E8003C974F /* PNSubscribeFileEventData.m */; }; + A55680D82C2428E8003C974F /* PNSubscribeFileEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680D52C2428E8003C974F /* PNSubscribeFileEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680D92C2428E8003C974F /* PNSubscribeFileEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680D52C2428E8003C974F /* PNSubscribeFileEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680DA2C2428E8003C974F /* PNSubscribeFileEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680D62C2428E8003C974F /* PNSubscribeFileEventData.m */; }; + A55680DB2C2428E8003C974F /* PNSubscribeFileEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680D62C2428E8003C974F /* PNSubscribeFileEventData.m */; }; + A55680DC2C2428E8003C974F /* PNSubscribeFileEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680D52C2428E8003C974F /* PNSubscribeFileEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680DD2C2428E8003C974F /* PNSubscribeFileEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680D62C2428E8003C974F /* PNSubscribeFileEventData.m */; }; + A55680DE2C2428E8003C974F /* PNSubscribeFileEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680D52C2428E8003C974F /* PNSubscribeFileEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680DF2C2428E8003C974F /* PNSubscribeFileEventData.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680D52C2428E8003C974F /* PNSubscribeFileEventData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680E02C2428E8003C974F /* PNSubscribeFileEventData.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680D62C2428E8003C974F /* PNSubscribeFileEventData.m */; }; + A55680E32C242BFF003C974F /* PNMessageResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680E22C242BFF003C974F /* PNMessageResult.m */; }; + A55680E42C242BFF003C974F /* PNMessageResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680E12C242BFF003C974F /* PNMessageResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680E52C242BFF003C974F /* PNMessageResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680E12C242BFF003C974F /* PNMessageResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680E62C242BFF003C974F /* PNMessageResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680E22C242BFF003C974F /* PNMessageResult.m */; }; + A55680E72C242BFF003C974F /* PNMessageResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680E22C242BFF003C974F /* PNMessageResult.m */; }; + A55680E82C242BFF003C974F /* PNMessageResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680E12C242BFF003C974F /* PNMessageResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680E92C242BFF003C974F /* PNMessageResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680E22C242BFF003C974F /* PNMessageResult.m */; }; + A55680EA2C242BFF003C974F /* PNMessageResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680E12C242BFF003C974F /* PNMessageResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680EB2C242BFF003C974F /* PNMessageResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680E12C242BFF003C974F /* PNMessageResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680EC2C242BFF003C974F /* PNMessageResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680E22C242BFF003C974F /* PNMessageResult.m */; }; + A55680EF2C242D11003C974F /* PNSignalResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680EE2C242D11003C974F /* PNSignalResult.m */; }; + A55680F02C242D11003C974F /* PNSignalResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680ED2C242D11003C974F /* PNSignalResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680F12C242D11003C974F /* PNSignalResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680ED2C242D11003C974F /* PNSignalResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680F22C242D11003C974F /* PNSignalResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680EE2C242D11003C974F /* PNSignalResult.m */; }; + A55680F32C242D11003C974F /* PNSignalResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680EE2C242D11003C974F /* PNSignalResult.m */; }; + A55680F42C242D11003C974F /* PNSignalResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680ED2C242D11003C974F /* PNSignalResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680F52C242D11003C974F /* PNSignalResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680EE2C242D11003C974F /* PNSignalResult.m */; }; + A55680F62C242D11003C974F /* PNSignalResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680ED2C242D11003C974F /* PNSignalResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680F72C242D11003C974F /* PNSignalResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680ED2C242D11003C974F /* PNSignalResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680F82C242D11003C974F /* PNSignalResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680EE2C242D11003C974F /* PNSignalResult.m */; }; + A55680FB2C242D7C003C974F /* PNMessageActionResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680FA2C242D7C003C974F /* PNMessageActionResult.m */; }; + A55680FC2C242D7C003C974F /* PNMessageActionResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680F92C242D7C003C974F /* PNMessageActionResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680FD2C242D7C003C974F /* PNMessageActionResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680F92C242D7C003C974F /* PNMessageActionResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55680FE2C242D7C003C974F /* PNMessageActionResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680FA2C242D7C003C974F /* PNMessageActionResult.m */; }; + A55680FF2C242D7C003C974F /* PNMessageActionResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680FA2C242D7C003C974F /* PNMessageActionResult.m */; }; + A55681002C242D7C003C974F /* PNMessageActionResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680F92C242D7C003C974F /* PNMessageActionResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681012C242D7C003C974F /* PNMessageActionResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680FA2C242D7C003C974F /* PNMessageActionResult.m */; }; + A55681022C242D7C003C974F /* PNMessageActionResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680F92C242D7C003C974F /* PNMessageActionResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681032C242D7C003C974F /* PNMessageActionResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55680F92C242D7C003C974F /* PNMessageActionResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681042C242D7C003C974F /* PNMessageActionResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55680FA2C242D7C003C974F /* PNMessageActionResult.m */; }; + A55681072C242E09003C974F /* PNObjectEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55681062C242E09003C974F /* PNObjectEventResult.m */; }; + A55681082C242E09003C974F /* PNObjectEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681052C242E09003C974F /* PNObjectEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681092C242E09003C974F /* PNObjectEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681052C242E09003C974F /* PNObjectEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A556810A2C242E09003C974F /* PNObjectEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55681062C242E09003C974F /* PNObjectEventResult.m */; }; + A556810B2C242E09003C974F /* PNObjectEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55681062C242E09003C974F /* PNObjectEventResult.m */; }; + A556810C2C242E09003C974F /* PNObjectEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681052C242E09003C974F /* PNObjectEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A556810D2C242E09003C974F /* PNObjectEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55681062C242E09003C974F /* PNObjectEventResult.m */; }; + A556810E2C242E09003C974F /* PNObjectEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681052C242E09003C974F /* PNObjectEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A556810F2C242E09003C974F /* PNObjectEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681052C242E09003C974F /* PNObjectEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681102C242E09003C974F /* PNObjectEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55681062C242E09003C974F /* PNObjectEventResult.m */; }; + A55681132C242E96003C974F /* PNFileEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55681122C242E96003C974F /* PNFileEventResult.m */; }; + A55681142C242E96003C974F /* PNFileEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681112C242E96003C974F /* PNFileEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681152C242E96003C974F /* PNFileEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681112C242E96003C974F /* PNFileEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681162C242E96003C974F /* PNFileEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55681122C242E96003C974F /* PNFileEventResult.m */; }; + A55681172C242E96003C974F /* PNFileEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55681122C242E96003C974F /* PNFileEventResult.m */; }; + A55681182C242E96003C974F /* PNFileEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681112C242E96003C974F /* PNFileEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681192C242E96003C974F /* PNFileEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55681122C242E96003C974F /* PNFileEventResult.m */; }; + A556811A2C242E96003C974F /* PNFileEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681112C242E96003C974F /* PNFileEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A556811B2C242E96003C974F /* PNFileEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681112C242E96003C974F /* PNFileEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A556811C2C242E96003C974F /* PNFileEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55681122C242E96003C974F /* PNFileEventResult.m */; }; + A556811F2C242EE6003C974F /* PNPresenceEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A556811E2C242EE6003C974F /* PNPresenceEventResult.m */; }; + A55681202C242EE6003C974F /* PNPresenceEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A556811D2C242EE6003C974F /* PNPresenceEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681212C242EE6003C974F /* PNPresenceEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A556811D2C242EE6003C974F /* PNPresenceEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681222C242EE6003C974F /* PNPresenceEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A556811E2C242EE6003C974F /* PNPresenceEventResult.m */; }; + A55681232C242EE6003C974F /* PNPresenceEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A556811E2C242EE6003C974F /* PNPresenceEventResult.m */; }; + A55681242C242EE6003C974F /* PNPresenceEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A556811D2C242EE6003C974F /* PNPresenceEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681252C242EE6003C974F /* PNPresenceEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A556811E2C242EE6003C974F /* PNPresenceEventResult.m */; }; + A55681262C242EE6003C974F /* PNPresenceEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A556811D2C242EE6003C974F /* PNPresenceEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681272C242EE6003C974F /* PNPresenceEventResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A556811D2C242EE6003C974F /* PNPresenceEventResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55681282C242EE6003C974F /* PNPresenceEventResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A556811E2C242EE6003C974F /* PNPresenceEventResult.m */; }; + A556812A2C2435A5003C974F /* PNSubscribeRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681292C2435A5003C974F /* PNSubscribeRequest+Private.h */; }; + A556812B2C2435A5003C974F /* PNSubscribeRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681292C2435A5003C974F /* PNSubscribeRequest+Private.h */; }; + A556812C2C2435A5003C974F /* PNSubscribeRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681292C2435A5003C974F /* PNSubscribeRequest+Private.h */; }; + A556812D2C2435A5003C974F /* PNSubscribeRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681292C2435A5003C974F /* PNSubscribeRequest+Private.h */; }; + A556812E2C2435A5003C974F /* PNSubscribeRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55681292C2435A5003C974F /* PNSubscribeRequest+Private.h */; }; A55A85D122FD8078002D0A72 /* PubNub+Objects.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A85CF22FD8077002D0A72 /* PubNub+Objects.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A85D222FD8078002D0A72 /* PubNub+Objects.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A85CF22FD8077002D0A72 /* PubNub+Objects.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A85D322FD8078002D0A72 /* PubNub+Objects.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A85CF22FD8077002D0A72 /* PubNub+Objects.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1902,21 +2362,11 @@ A55A869E22FD80B9002D0A72 /* PNRemoveChannelMetadataAPICallBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A85F922FD80B9002D0A72 /* PNRemoveChannelMetadataAPICallBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A869F22FD80B9002D0A72 /* PNRemoveChannelMetadataAPICallBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A85F922FD80B9002D0A72 /* PNRemoveChannelMetadataAPICallBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A86A122FD80B9002D0A72 /* PNRemoveChannelMetadataAPICallBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A85F922FD80B9002D0A72 /* PNRemoveChannelMetadataAPICallBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A55A86B122FD817E002D0A72 /* PNChannelMetadata+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A522FD817E002D0A72 /* PNChannelMetadata+Private.h */; }; - A55A86B222FD817E002D0A72 /* PNChannelMetadata+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A522FD817E002D0A72 /* PNChannelMetadata+Private.h */; }; - A55A86B322FD817E002D0A72 /* PNChannelMetadata+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A522FD817E002D0A72 /* PNChannelMetadata+Private.h */; }; - A55A86B422FD817E002D0A72 /* PNChannelMetadata+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A522FD817E002D0A72 /* PNChannelMetadata+Private.h */; }; - A55A86B622FD817E002D0A72 /* PNChannelMetadata+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A522FD817E002D0A72 /* PNChannelMetadata+Private.h */; }; A55A86B822FD817E002D0A72 /* PNChannelMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A622FD817E002D0A72 /* PNChannelMetadata.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A86B922FD817E002D0A72 /* PNChannelMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A622FD817E002D0A72 /* PNChannelMetadata.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A86BA22FD817E002D0A72 /* PNChannelMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A622FD817E002D0A72 /* PNChannelMetadata.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A86BB22FD817E002D0A72 /* PNChannelMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A622FD817E002D0A72 /* PNChannelMetadata.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A86BD22FD817E002D0A72 /* PNChannelMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A622FD817E002D0A72 /* PNChannelMetadata.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A55A86BF22FD817E002D0A72 /* PNUUIDMetadata+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A722FD817E002D0A72 /* PNUUIDMetadata+Private.h */; }; - A55A86C022FD817E002D0A72 /* PNUUIDMetadata+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A722FD817E002D0A72 /* PNUUIDMetadata+Private.h */; }; - A55A86C122FD817E002D0A72 /* PNUUIDMetadata+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A722FD817E002D0A72 /* PNUUIDMetadata+Private.h */; }; - A55A86C222FD817E002D0A72 /* PNUUIDMetadata+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A722FD817E002D0A72 /* PNUUIDMetadata+Private.h */; }; - A55A86C422FD817E002D0A72 /* PNUUIDMetadata+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A722FD817E002D0A72 /* PNUUIDMetadata+Private.h */; }; A55A86C622FD817E002D0A72 /* PNUUIDMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A822FD817E002D0A72 /* PNUUIDMetadata.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A86C722FD817E002D0A72 /* PNUUIDMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A822FD817E002D0A72 /* PNUUIDMetadata.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A86C822FD817E002D0A72 /* PNUUIDMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86A822FD817E002D0A72 /* PNUUIDMetadata.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1932,11 +2382,11 @@ A55A86E922FD81E3002D0A72 /* PNFetchUUIDMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D522FD81E2002D0A72 /* PNFetchUUIDMetadataResult.m */; }; A55A86EA22FD81E3002D0A72 /* PNFetchUUIDMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D522FD81E2002D0A72 /* PNFetchUUIDMetadataResult.m */; }; A55A86EC22FD81E3002D0A72 /* PNFetchUUIDMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D522FD81E2002D0A72 /* PNFetchUUIDMetadataResult.m */; }; - A55A86F522FD81E3002D0A72 /* PNFetchChannelsMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D722FD81E2002D0A72 /* PNFetchChannelsMetadataResult.m */; }; - A55A86F622FD81E3002D0A72 /* PNFetchChannelsMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D722FD81E2002D0A72 /* PNFetchChannelsMetadataResult.m */; }; - A55A86F722FD81E3002D0A72 /* PNFetchChannelsMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D722FD81E2002D0A72 /* PNFetchChannelsMetadataResult.m */; }; - A55A86F822FD81E3002D0A72 /* PNFetchChannelsMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D722FD81E2002D0A72 /* PNFetchChannelsMetadataResult.m */; }; - A55A86FA22FD81E3002D0A72 /* PNFetchChannelsMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D722FD81E2002D0A72 /* PNFetchChannelsMetadataResult.m */; }; + A55A86F522FD81E3002D0A72 /* PNFetchChannelMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D722FD81E2002D0A72 /* PNFetchChannelMetadataResult.m */; }; + A55A86F622FD81E3002D0A72 /* PNFetchChannelMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D722FD81E2002D0A72 /* PNFetchChannelMetadataResult.m */; }; + A55A86F722FD81E3002D0A72 /* PNFetchChannelMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D722FD81E2002D0A72 /* PNFetchChannelMetadataResult.m */; }; + A55A86F822FD81E3002D0A72 /* PNFetchChannelMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D722FD81E2002D0A72 /* PNFetchChannelMetadataResult.m */; }; + A55A86FA22FD81E3002D0A72 /* PNFetchChannelMetadataResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86D722FD81E2002D0A72 /* PNFetchChannelMetadataResult.m */; }; A55A870322FD81E3002D0A72 /* PNSetUUIDMetadataStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86D922FD81E2002D0A72 /* PNSetUUIDMetadataStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A870422FD81E3002D0A72 /* PNSetUUIDMetadataStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86D922FD81E2002D0A72 /* PNSetUUIDMetadataStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A870522FD81E3002D0A72 /* PNSetUUIDMetadataStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86D922FD81E2002D0A72 /* PNSetUUIDMetadataStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1952,26 +2402,16 @@ A55A872122FD81E3002D0A72 /* PNSetChannelMetadataStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DD22FD81E2002D0A72 /* PNSetChannelMetadataStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A872222FD81E3002D0A72 /* PNSetChannelMetadataStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DD22FD81E2002D0A72 /* PNSetChannelMetadataStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A872422FD81E3002D0A72 /* PNSetChannelMetadataStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DD22FD81E2002D0A72 /* PNSetChannelMetadataStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A55A872622FD81E3002D0A72 /* PNFetchChannelsMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DE22FD81E2002D0A72 /* PNFetchChannelsMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A55A872722FD81E3002D0A72 /* PNFetchChannelsMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DE22FD81E2002D0A72 /* PNFetchChannelsMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A55A872822FD81E3002D0A72 /* PNFetchChannelsMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DE22FD81E2002D0A72 /* PNFetchChannelsMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A55A872922FD81E3002D0A72 /* PNFetchChannelsMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DE22FD81E2002D0A72 /* PNFetchChannelsMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A55A872B22FD81E3002D0A72 /* PNFetchChannelsMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DE22FD81E2002D0A72 /* PNFetchChannelsMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55A872622FD81E3002D0A72 /* PNFetchChannelMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DE22FD81E2002D0A72 /* PNFetchChannelMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55A872722FD81E3002D0A72 /* PNFetchChannelMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DE22FD81E2002D0A72 /* PNFetchChannelMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55A872822FD81E3002D0A72 /* PNFetchChannelMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DE22FD81E2002D0A72 /* PNFetchChannelMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55A872922FD81E3002D0A72 /* PNFetchChannelMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DE22FD81E2002D0A72 /* PNFetchChannelMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A55A872B22FD81E3002D0A72 /* PNFetchChannelMetadataResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A86DE22FD81E2002D0A72 /* PNFetchChannelMetadataResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A872D22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86DF22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m */; }; A55A872E22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86DF22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m */; }; A55A872F22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86DF22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m */; }; A55A873022FD81E3002D0A72 /* PNSetChannelMetadataStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86DF22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m */; }; A55A873222FD81E3002D0A72 /* PNSetChannelMetadataStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A86DF22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m */; }; - A55A873E22FD825A002D0A72 /* PNUUIDMetadataChangeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A873622FD825A002D0A72 /* PNUUIDMetadataChangeParser.h */; }; - A55A873F22FD825A002D0A72 /* PNUUIDMetadataChangeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A873622FD825A002D0A72 /* PNUUIDMetadataChangeParser.h */; }; - A55A874022FD825A002D0A72 /* PNUUIDMetadataChangeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A873622FD825A002D0A72 /* PNUUIDMetadataChangeParser.h */; }; - A55A874122FD825A002D0A72 /* PNUUIDMetadataChangeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A873622FD825A002D0A72 /* PNUUIDMetadataChangeParser.h */; }; - A55A874322FD825A002D0A72 /* PNUUIDMetadataChangeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A873622FD825A002D0A72 /* PNUUIDMetadataChangeParser.h */; }; - A55A877322FD8272002D0A72 /* PNRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A874622FD8272002D0A72 /* PNRequest.m */; }; - A55A877422FD8272002D0A72 /* PNRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A874622FD8272002D0A72 /* PNRequest.m */; }; - A55A877522FD8272002D0A72 /* PNRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A874622FD8272002D0A72 /* PNRequest.m */; }; - A55A877622FD8272002D0A72 /* PNRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A874622FD8272002D0A72 /* PNRequest.m */; }; - A55A877822FD8272002D0A72 /* PNRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A55A874622FD8272002D0A72 /* PNRequest.m */; }; A55A877A22FD8272002D0A72 /* PNObjectsPaginatedRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A874822FD8272002D0A72 /* PNObjectsPaginatedRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A877B22FD8272002D0A72 /* PNObjectsPaginatedRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A874822FD8272002D0A72 /* PNObjectsPaginatedRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A877C22FD8272002D0A72 /* PNObjectsPaginatedRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A874822FD8272002D0A72 /* PNObjectsPaginatedRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -2042,16 +2482,6 @@ A55A887822FD8272002D0A72 /* PNManageChannelMembersRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A876F22FD8272002D0A72 /* PNManageChannelMembersRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A887922FD8272002D0A72 /* PNManageChannelMembersRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A876F22FD8272002D0A72 /* PNManageChannelMembersRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55A887B22FD8272002D0A72 /* PNManageChannelMembersRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A876F22FD8272002D0A72 /* PNManageChannelMembersRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A55A888422FD8272002D0A72 /* PNRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A877122FD8272002D0A72 /* PNRequest+Private.h */; }; - A55A888522FD8272002D0A72 /* PNRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A877122FD8272002D0A72 /* PNRequest+Private.h */; }; - A55A888622FD8272002D0A72 /* PNRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A877122FD8272002D0A72 /* PNRequest+Private.h */; }; - A55A888722FD8272002D0A72 /* PNRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A877122FD8272002D0A72 /* PNRequest+Private.h */; }; - A55A888922FD8272002D0A72 /* PNRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A877122FD8272002D0A72 /* PNRequest+Private.h */; }; - A55A888B22FD8272002D0A72 /* PNRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A877222FD8272002D0A72 /* PNRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A55A888C22FD8272002D0A72 /* PNRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A877222FD8272002D0A72 /* PNRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A55A888D22FD8272002D0A72 /* PNRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A877222FD8272002D0A72 /* PNRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A55A888E22FD8272002D0A72 /* PNRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A877222FD8272002D0A72 /* PNRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A55A889022FD8272002D0A72 /* PNRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A55A877222FD8272002D0A72 /* PNRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55BCCA22319243F0019DB68 /* PNAddMessageActionStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55BCCA02319243F0019DB68 /* PNAddMessageActionStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55BCCA32319243F0019DB68 /* PNAddMessageActionStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55BCCA02319243F0019DB68 /* PNAddMessageActionStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; A55BCCA42319243F0019DB68 /* PNAddMessageActionStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A55BCCA02319243F0019DB68 /* PNAddMessageActionStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -2102,26 +2532,6 @@ A55BCD1F231D26110019DB68 /* PNMessageAction.m in Sources */ = {isa = PBXBuildFile; fileRef = A55BCD15231D26110019DB68 /* PNMessageAction.m */; }; A55BCD20231D26110019DB68 /* PNMessageAction.m in Sources */ = {isa = PBXBuildFile; fileRef = A55BCD15231D26110019DB68 /* PNMessageAction.m */; }; A55BCD22231D26110019DB68 /* PNMessageAction.m in Sources */ = {isa = PBXBuildFile; fileRef = A55BCD15231D26110019DB68 /* PNMessageAction.m */; }; - A55BCD25231D27F00019DB68 /* PNMessageAction+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55BCD24231D27F00019DB68 /* PNMessageAction+Private.h */; }; - A55BCD26231D27F00019DB68 /* PNMessageAction+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55BCD24231D27F00019DB68 /* PNMessageAction+Private.h */; }; - A55BCD27231D27F00019DB68 /* PNMessageAction+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55BCD24231D27F00019DB68 /* PNMessageAction+Private.h */; }; - A55BCD28231D27F00019DB68 /* PNMessageAction+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55BCD24231D27F00019DB68 /* PNMessageAction+Private.h */; }; - A55BCD2A231D27F00019DB68 /* PNMessageAction+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55BCD24231D27F00019DB68 /* PNMessageAction+Private.h */; }; - A55CA69D2397389100B24E02 /* PNKeychain+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55CA69C2397389100B24E02 /* PNKeychain+Private.h */; }; - A55CA69E2397389100B24E02 /* PNKeychain+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55CA69C2397389100B24E02 /* PNKeychain+Private.h */; }; - A55CA69F2397389100B24E02 /* PNKeychain+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55CA69C2397389100B24E02 /* PNKeychain+Private.h */; }; - A55CA6A02397389100B24E02 /* PNKeychain+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55CA69C2397389100B24E02 /* PNKeychain+Private.h */; }; - A55CA6A22397389100B24E02 /* PNKeychain+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55CA69C2397389100B24E02 /* PNKeychain+Private.h */; }; - A55DAEF024B1FE7600766EE9 /* PNXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A55DAEEE24B1FE7600766EE9 /* PNXMLParser.h */; }; - A55DAEF124B1FE7600766EE9 /* PNXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A55DAEEE24B1FE7600766EE9 /* PNXMLParser.h */; }; - A55DAEF224B1FE7600766EE9 /* PNXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A55DAEEE24B1FE7600766EE9 /* PNXMLParser.h */; }; - A55DAEF324B1FE7600766EE9 /* PNXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A55DAEEE24B1FE7600766EE9 /* PNXMLParser.h */; }; - A55DAEF424B1FE7600766EE9 /* PNXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A55DAEEE24B1FE7600766EE9 /* PNXMLParser.h */; }; - A55DAEF524B1FE7600766EE9 /* PNXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A55DAEEF24B1FE7600766EE9 /* PNXMLParser.m */; }; - A55DAEF624B1FE7600766EE9 /* PNXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A55DAEEF24B1FE7600766EE9 /* PNXMLParser.m */; }; - A55DAEF724B1FE7600766EE9 /* PNXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A55DAEEF24B1FE7600766EE9 /* PNXMLParser.m */; }; - A55DAEF824B1FE7600766EE9 /* PNXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A55DAEEF24B1FE7600766EE9 /* PNXMLParser.m */; }; - A55DAEF924B1FE7600766EE9 /* PNXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A55DAEEF24B1FE7600766EE9 /* PNXMLParser.m */; }; A55DAEFC24B1FE9E00766EE9 /* PNXML.h in Headers */ = {isa = PBXBuildFile; fileRef = A55DAEFA24B1FE9E00766EE9 /* PNXML.h */; }; A55DAEFD24B1FE9E00766EE9 /* PNXML.h in Headers */ = {isa = PBXBuildFile; fileRef = A55DAEFA24B1FE9E00766EE9 /* PNXML.h */; }; A55DAEFE24B1FE9E00766EE9 /* PNXML.h in Headers */ = {isa = PBXBuildFile; fileRef = A55DAEFA24B1FE9E00766EE9 /* PNXML.h */; }; @@ -2137,21 +2547,6 @@ A55DAF0924B1FEC800766EE9 /* PNXML+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55DAF0624B1FEC800766EE9 /* PNXML+Private.h */; }; A55DAF0A24B1FEC800766EE9 /* PNXML+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55DAF0624B1FEC800766EE9 /* PNXML+Private.h */; }; A55DAF0B24B1FEC800766EE9 /* PNXML+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A55DAF0624B1FEC800766EE9 /* PNXML+Private.h */; }; - A56865602300622C0014E17C /* PNChannelMember+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A568655F2300622C0014E17C /* PNChannelMember+Private.h */; }; - A56865612300622C0014E17C /* PNChannelMember+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A568655F2300622C0014E17C /* PNChannelMember+Private.h */; }; - A56865622300622C0014E17C /* PNChannelMember+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A568655F2300622C0014E17C /* PNChannelMember+Private.h */; }; - A56865632300622C0014E17C /* PNChannelMember+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A568655F2300622C0014E17C /* PNChannelMember+Private.h */; }; - A56865652300622C0014E17C /* PNChannelMember+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A568655F2300622C0014E17C /* PNChannelMember+Private.h */; }; - A56865692300709F0014E17C /* PNFetchMembershipsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865672300709F0014E17C /* PNFetchMembershipsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A568656A2300709F0014E17C /* PNFetchMembershipsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865672300709F0014E17C /* PNFetchMembershipsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A568656B2300709F0014E17C /* PNFetchMembershipsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865672300709F0014E17C /* PNFetchMembershipsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A568656C2300709F0014E17C /* PNFetchMembershipsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865672300709F0014E17C /* PNFetchMembershipsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A568656E2300709F0014E17C /* PNFetchMembershipsResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865672300709F0014E17C /* PNFetchMembershipsResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A56865702300709F0014E17C /* PNFetchMembershipsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865682300709F0014E17C /* PNFetchMembershipsResult.m */; }; - A56865712300709F0014E17C /* PNFetchMembershipsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865682300709F0014E17C /* PNFetchMembershipsResult.m */; }; - A56865722300709F0014E17C /* PNFetchMembershipsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865682300709F0014E17C /* PNFetchMembershipsResult.m */; }; - A56865732300709F0014E17C /* PNFetchMembershipsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865682300709F0014E17C /* PNFetchMembershipsResult.m */; }; - A56865752300709F0014E17C /* PNFetchMembershipsResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865682300709F0014E17C /* PNFetchMembershipsResult.m */; }; A5686579230072810014E17C /* PNManageChannelMembersStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A5686577230072810014E17C /* PNManageChannelMembersStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; A568657A230072810014E17C /* PNManageChannelMembersStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A5686577230072810014E17C /* PNManageChannelMembersStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; A568657B230072810014E17C /* PNManageChannelMembersStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A5686577230072810014E17C /* PNManageChannelMembersStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -2172,36 +2567,6 @@ A56865922300729E0014E17C /* PNFetchChannelMembersResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865882300729E0014E17C /* PNFetchChannelMembersResult.m */; }; A56865932300729E0014E17C /* PNFetchChannelMembersResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865882300729E0014E17C /* PNFetchChannelMembersResult.m */; }; A56865952300729E0014E17C /* PNFetchChannelMembersResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A56865882300729E0014E17C /* PNFetchChannelMembersResult.m */; }; - A5686599230170690014E17C /* PNFetchUUIDMetadataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5686597230170690014E17C /* PNFetchUUIDMetadataParser.h */; }; - A568659A230170690014E17C /* PNFetchUUIDMetadataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5686597230170690014E17C /* PNFetchUUIDMetadataParser.h */; }; - A568659B230170690014E17C /* PNFetchUUIDMetadataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5686597230170690014E17C /* PNFetchUUIDMetadataParser.h */; }; - A568659C230170690014E17C /* PNFetchUUIDMetadataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5686597230170690014E17C /* PNFetchUUIDMetadataParser.h */; }; - A568659E230170690014E17C /* PNFetchUUIDMetadataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5686597230170690014E17C /* PNFetchUUIDMetadataParser.h */; }; - A56865A9230172950014E17C /* PNFetchChannelsMetadataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865A7230172950014E17C /* PNFetchChannelsMetadataParser.h */; }; - A56865AA230172950014E17C /* PNFetchChannelsMetadataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865A7230172950014E17C /* PNFetchChannelsMetadataParser.h */; }; - A56865AB230172950014E17C /* PNFetchChannelsMetadataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865A7230172950014E17C /* PNFetchChannelsMetadataParser.h */; }; - A56865AC230172950014E17C /* PNFetchChannelsMetadataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865A7230172950014E17C /* PNFetchChannelsMetadataParser.h */; }; - A56865AE230172950014E17C /* PNFetchChannelsMetadataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865A7230172950014E17C /* PNFetchChannelsMetadataParser.h */; }; - A56865B9230173030014E17C /* PNChannelMetadataChangeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865B7230173030014E17C /* PNChannelMetadataChangeParser.h */; }; - A56865BA230173030014E17C /* PNChannelMetadataChangeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865B7230173030014E17C /* PNChannelMetadataChangeParser.h */; }; - A56865BB230173030014E17C /* PNChannelMetadataChangeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865B7230173030014E17C /* PNChannelMetadataChangeParser.h */; }; - A56865BC230173030014E17C /* PNChannelMetadataChangeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865B7230173030014E17C /* PNChannelMetadataChangeParser.h */; }; - A56865BE230173030014E17C /* PNChannelMetadataChangeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865B7230173030014E17C /* PNChannelMetadataChangeParser.h */; }; - A56865C9230173AA0014E17C /* PNObjectsRemoveParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865C7230173AA0014E17C /* PNObjectsRemoveParser.h */; }; - A56865CA230173AA0014E17C /* PNObjectsRemoveParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865C7230173AA0014E17C /* PNObjectsRemoveParser.h */; }; - A56865CB230173AA0014E17C /* PNObjectsRemoveParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865C7230173AA0014E17C /* PNObjectsRemoveParser.h */; }; - A56865CC230173AA0014E17C /* PNObjectsRemoveParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865C7230173AA0014E17C /* PNObjectsRemoveParser.h */; }; - A56865CE230173AA0014E17C /* PNObjectsRemoveParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865C7230173AA0014E17C /* PNObjectsRemoveParser.h */; }; - A56865D9230175EC0014E17C /* PNMembershipsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865D7230175EC0014E17C /* PNMembershipsParser.h */; }; - A56865DA230175EC0014E17C /* PNMembershipsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865D7230175EC0014E17C /* PNMembershipsParser.h */; }; - A56865DB230175EC0014E17C /* PNMembershipsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865D7230175EC0014E17C /* PNMembershipsParser.h */; }; - A56865DC230175EC0014E17C /* PNMembershipsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865D7230175EC0014E17C /* PNMembershipsParser.h */; }; - A56865DE230175EC0014E17C /* PNMembershipsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865D7230175EC0014E17C /* PNMembershipsParser.h */; }; - A56865E9230176760014E17C /* PNChannelMembersParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865E7230176760014E17C /* PNChannelMembersParser.h */; }; - A56865EA230176760014E17C /* PNChannelMembersParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865E7230176760014E17C /* PNChannelMembersParser.h */; }; - A56865EB230176760014E17C /* PNChannelMembersParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865E7230176760014E17C /* PNChannelMembersParser.h */; }; - A56865EC230176760014E17C /* PNChannelMembersParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865E7230176760014E17C /* PNChannelMembersParser.h */; }; - A56865EE230176760014E17C /* PNChannelMembersParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A56865E7230176760014E17C /* PNChannelMembersParser.h */; }; A56BBFBB2AB63F8F00260D83 /* PNCryptoProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = A56BBFBA2AB63F8F00260D83 /* PNCryptoProvider.h */; settings = {ATTRIBUTES = (Public, ); }; }; A56BBFBC2AB63F8F00260D83 /* PNCryptoProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = A56BBFBA2AB63F8F00260D83 /* PNCryptoProvider.h */; settings = {ATTRIBUTES = (Public, ); }; }; A56BBFBD2AB63F8F00260D83 /* PNCryptoProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = A56BBFBA2AB63F8F00260D83 /* PNCryptoProvider.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -2227,51 +2592,11 @@ A56FAEFB233161570072ADD6 /* PubNub+MessageActions.m in Sources */ = {isa = PBXBuildFile; fileRef = A56FAEF1233161570072ADD6 /* PubNub+MessageActions.m */; }; A56FAEFC233161570072ADD6 /* PubNub+MessageActions.m in Sources */ = {isa = PBXBuildFile; fileRef = A56FAEF1233161570072ADD6 /* PubNub+MessageActions.m */; }; A56FAEFE233161570072ADD6 /* PubNub+MessageActions.m in Sources */ = {isa = PBXBuildFile; fileRef = A56FAEF1233161570072ADD6 /* PubNub+MessageActions.m */; }; - A57A300D238D59B500DE8C68 /* PNAddPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3003238D59B500DE8C68 /* PNAddPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A300E238D59B500DE8C68 /* PNAddPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3003238D59B500DE8C68 /* PNAddPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A300F238D59B500DE8C68 /* PNAddPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3003238D59B500DE8C68 /* PNAddPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A3010238D59B500DE8C68 /* PNAddPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3003238D59B500DE8C68 /* PNAddPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A3012238D59B500DE8C68 /* PNAddPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3003238D59B500DE8C68 /* PNAddPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A3014238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3004238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m */; }; - A57A3015238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3004238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m */; }; - A57A3016238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3004238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m */; }; - A57A3017238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3004238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m */; }; - A57A3019238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3004238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m */; }; - A57A301B238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3005238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A301C238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3005238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A301D238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3005238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A301E238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3005238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A3020238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3005238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A3022238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3006238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A3023238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3006238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A3024238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3006238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A3025238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3006238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A3027238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3006238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; A57A3029238D59B500DE8C68 /* PNBasePushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3007238D59B500DE8C68 /* PNBasePushNotificationsRequest.m */; }; A57A302A238D59B500DE8C68 /* PNBasePushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3007238D59B500DE8C68 /* PNBasePushNotificationsRequest.m */; }; A57A302B238D59B500DE8C68 /* PNBasePushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3007238D59B500DE8C68 /* PNBasePushNotificationsRequest.m */; }; A57A302C238D59B500DE8C68 /* PNBasePushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3007238D59B500DE8C68 /* PNBasePushNotificationsRequest.m */; }; A57A302E238D59B500DE8C68 /* PNBasePushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3007238D59B500DE8C68 /* PNBasePushNotificationsRequest.m */; }; - A57A3030238D59B500DE8C68 /* PNAddPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3008238D59B500DE8C68 /* PNAddPushNotificationsRequest.m */; }; - A57A3031238D59B500DE8C68 /* PNAddPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3008238D59B500DE8C68 /* PNAddPushNotificationsRequest.m */; }; - A57A3032238D59B500DE8C68 /* PNAddPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3008238D59B500DE8C68 /* PNAddPushNotificationsRequest.m */; }; - A57A3033238D59B500DE8C68 /* PNAddPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3008238D59B500DE8C68 /* PNAddPushNotificationsRequest.m */; }; - A57A3035238D59B500DE8C68 /* PNAddPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A3008238D59B500DE8C68 /* PNAddPushNotificationsRequest.m */; }; - A57A3037238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3009238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A3038238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3009238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A3039238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3009238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A303A238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3009238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A303C238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A3009238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A57A303E238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A300A238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m */; }; - A57A303F238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A300A238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m */; }; - A57A3040238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A300A238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m */; }; - A57A3041238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A300A238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m */; }; - A57A3043238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A300A238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m */; }; - A57A3045238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A300B238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m */; }; - A57A3046238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A300B238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m */; }; - A57A3047238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A300B238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m */; }; - A57A3048238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A300B238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m */; }; - A57A304A238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A57A300B238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m */; }; A57A304C238D59B500DE8C68 /* PNBasePushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A300C238D59B500DE8C68 /* PNBasePushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; A57A304D238D59B500DE8C68 /* PNBasePushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A300C238D59B500DE8C68 /* PNBasePushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; A57A304E238D59B500DE8C68 /* PNBasePushNotificationsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A57A300C238D59B500DE8C68 /* PNBasePushNotificationsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -2422,11 +2747,6 @@ A58975D423005BE60093BD9A /* PNChannelMember.h in Headers */ = {isa = PBXBuildFile; fileRef = A58975D023005BE60093BD9A /* PNChannelMember.h */; settings = {ATTRIBUTES = (Public, ); }; }; A58975D523005BE60093BD9A /* PNChannelMember.h in Headers */ = {isa = PBXBuildFile; fileRef = A58975D023005BE60093BD9A /* PNChannelMember.h */; settings = {ATTRIBUTES = (Public, ); }; }; A58975D723005BE60093BD9A /* PNChannelMember.h in Headers */ = {isa = PBXBuildFile; fileRef = A58975D023005BE60093BD9A /* PNChannelMember.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A58975E123005CFB0093BD9A /* PNMembership+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A58975E023005CFB0093BD9A /* PNMembership+Private.h */; }; - A58975E223005CFB0093BD9A /* PNMembership+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A58975E023005CFB0093BD9A /* PNMembership+Private.h */; }; - A58975E323005CFB0093BD9A /* PNMembership+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A58975E023005CFB0093BD9A /* PNMembership+Private.h */; }; - A58975E423005CFB0093BD9A /* PNMembership+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A58975E023005CFB0093BD9A /* PNMembership+Private.h */; }; - A58975E623005CFB0093BD9A /* PNMembership+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A58975E023005CFB0093BD9A /* PNMembership+Private.h */; }; A5A4517A246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A45178246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; A5A4517B246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A45178246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; A5A4517C246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A45178246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -2457,36 +2777,6 @@ A5A45207246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A451F3246F268B008ECC74 /* PNRemoveMembershipsAPICallBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; A5A45208246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A451F3246F268B008ECC74 /* PNRemoveMembershipsAPICallBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; A5A45209246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A451F3246F268B008ECC74 /* PNRemoveMembershipsAPICallBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A5A7AFC6234932F30060113B /* PNFetchMessagesActionsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC0234932F30060113B /* PNFetchMessagesActionsParser.m */; }; - A5A7AFC7234932F30060113B /* PNFetchMessagesActionsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC0234932F30060113B /* PNFetchMessagesActionsParser.m */; }; - A5A7AFC8234932F30060113B /* PNFetchMessagesActionsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC0234932F30060113B /* PNFetchMessagesActionsParser.m */; }; - A5A7AFC9234932F30060113B /* PNFetchMessagesActionsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC0234932F30060113B /* PNFetchMessagesActionsParser.m */; }; - A5A7AFCB234932F30060113B /* PNFetchMessagesActionsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC0234932F30060113B /* PNFetchMessagesActionsParser.m */; }; - A5A7AFCD234932F30060113B /* PNFetchMessagesActionsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC1234932F30060113B /* PNFetchMessagesActionsParser.h */; }; - A5A7AFCE234932F30060113B /* PNFetchMessagesActionsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC1234932F30060113B /* PNFetchMessagesActionsParser.h */; }; - A5A7AFCF234932F30060113B /* PNFetchMessagesActionsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC1234932F30060113B /* PNFetchMessagesActionsParser.h */; }; - A5A7AFD0234932F30060113B /* PNFetchMessagesActionsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC1234932F30060113B /* PNFetchMessagesActionsParser.h */; }; - A5A7AFD2234932F30060113B /* PNFetchMessagesActionsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC1234932F30060113B /* PNFetchMessagesActionsParser.h */; }; - A5A7AFD4234932F30060113B /* PNAddMessageActionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC2234932F30060113B /* PNAddMessageActionParser.h */; }; - A5A7AFD5234932F30060113B /* PNAddMessageActionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC2234932F30060113B /* PNAddMessageActionParser.h */; }; - A5A7AFD6234932F30060113B /* PNAddMessageActionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC2234932F30060113B /* PNAddMessageActionParser.h */; }; - A5A7AFD7234932F30060113B /* PNAddMessageActionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC2234932F30060113B /* PNAddMessageActionParser.h */; }; - A5A7AFD9234932F30060113B /* PNAddMessageActionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC2234932F30060113B /* PNAddMessageActionParser.h */; }; - A5A7AFDB234932F30060113B /* PNAddMessageActionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC3234932F30060113B /* PNAddMessageActionParser.m */; }; - A5A7AFDC234932F30060113B /* PNAddMessageActionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC3234932F30060113B /* PNAddMessageActionParser.m */; }; - A5A7AFDD234932F30060113B /* PNAddMessageActionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC3234932F30060113B /* PNAddMessageActionParser.m */; }; - A5A7AFDE234932F30060113B /* PNAddMessageActionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC3234932F30060113B /* PNAddMessageActionParser.m */; }; - A5A7AFE0234932F30060113B /* PNAddMessageActionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC3234932F30060113B /* PNAddMessageActionParser.m */; }; - A5A7AFE2234932F30060113B /* PNRemoveMessageActionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC4234932F30060113B /* PNRemoveMessageActionParser.h */; }; - A5A7AFE3234932F30060113B /* PNRemoveMessageActionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC4234932F30060113B /* PNRemoveMessageActionParser.h */; }; - A5A7AFE4234932F30060113B /* PNRemoveMessageActionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC4234932F30060113B /* PNRemoveMessageActionParser.h */; }; - A5A7AFE5234932F30060113B /* PNRemoveMessageActionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC4234932F30060113B /* PNRemoveMessageActionParser.h */; }; - A5A7AFE7234932F30060113B /* PNRemoveMessageActionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFC4234932F30060113B /* PNRemoveMessageActionParser.h */; }; - A5A7AFE9234932F30060113B /* PNRemoveMessageActionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC5234932F30060113B /* PNRemoveMessageActionParser.m */; }; - A5A7AFEA234932F30060113B /* PNRemoveMessageActionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC5234932F30060113B /* PNRemoveMessageActionParser.m */; }; - A5A7AFEB234932F30060113B /* PNRemoveMessageActionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC5234932F30060113B /* PNRemoveMessageActionParser.m */; }; - A5A7AFEC234932F30060113B /* PNRemoveMessageActionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC5234932F30060113B /* PNRemoveMessageActionParser.m */; }; - A5A7AFEE234932F30060113B /* PNRemoveMessageActionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A7AFC5234932F30060113B /* PNRemoveMessageActionParser.m */; }; A5A7AFF92349330F0060113B /* PNFetchMessageActionsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFF02349330E0060113B /* PNFetchMessageActionsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; A5A7AFFA2349330F0060113B /* PNFetchMessageActionsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFF02349330E0060113B /* PNFetchMessageActionsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; A5A7AFFB2349330F0060113B /* PNFetchMessageActionsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A7AFF02349330E0060113B /* PNFetchMessageActionsRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -2542,6 +2832,296 @@ A5ADD62D2AC0CE8100310A08 /* NSInputStream+PNCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = A5ADD6252AC0CE8100310A08 /* NSInputStream+PNCrypto.m */; }; A5ADD62E2AC0CE8100310A08 /* NSInputStream+PNCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = A5ADD6252AC0CE8100310A08 /* NSInputStream+PNCrypto.m */; }; A5ADD62F2AC0CE8100310A08 /* NSInputStream+PNCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = A5ADD6252AC0CE8100310A08 /* NSInputStream+PNCrypto.m */; }; + A5CB33AA2C035D7D008527AA /* PNTransportRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33A82C035D7D008527AA /* PNTransportRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CB33AB2C035D7D008527AA /* PNTransportRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33A92C035D7D008527AA /* PNTransportRequest.m */; }; + A5CB33AC2C035D7D008527AA /* PNTransportRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33A92C035D7D008527AA /* PNTransportRequest.m */; }; + A5CB33AD2C035D7D008527AA /* PNTransportRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33A82C035D7D008527AA /* PNTransportRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CB33AE2C035D7D008527AA /* PNTransportRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33A82C035D7D008527AA /* PNTransportRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CB33AF2C035D7D008527AA /* PNTransportRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33A92C035D7D008527AA /* PNTransportRequest.m */; }; + A5CB33B02C035D7D008527AA /* PNTransportRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33A82C035D7D008527AA /* PNTransportRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CB33B12C035D7D008527AA /* PNTransportRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33A92C035D7D008527AA /* PNTransportRequest.m */; }; + A5CB33B22C035D7D008527AA /* PNTransportRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33A82C035D7D008527AA /* PNTransportRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CB33B32C035D7D008527AA /* PNTransportRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33A92C035D7D008527AA /* PNTransportRequest.m */; }; + A5CB33C12C0371E6008527AA /* PNTransportRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33C02C0371E6008527AA /* PNTransportRequest+Private.h */; }; + A5CB33C22C0371E6008527AA /* PNTransportRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33C02C0371E6008527AA /* PNTransportRequest+Private.h */; }; + A5CB33C32C0371E6008527AA /* PNTransportRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33C02C0371E6008527AA /* PNTransportRequest+Private.h */; }; + A5CB33C42C0371E6008527AA /* PNTransportRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33C02C0371E6008527AA /* PNTransportRequest+Private.h */; }; + A5CB33C52C0371E6008527AA /* PNTransportRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33C02C0371E6008527AA /* PNTransportRequest+Private.h */; }; + A5CB33C82C046A1A008527AA /* PNTransportConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33C62C046A1A008527AA /* PNTransportConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CB33C92C046A1A008527AA /* PNTransportConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33C72C046A1A008527AA /* PNTransportConfiguration.m */; }; + A5CB33CA2C046A1A008527AA /* PNTransportConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33C72C046A1A008527AA /* PNTransportConfiguration.m */; }; + A5CB33CB2C046A1A008527AA /* PNTransportConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33C62C046A1A008527AA /* PNTransportConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CB33CC2C046A1A008527AA /* PNTransportConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33C62C046A1A008527AA /* PNTransportConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CB33CD2C046A1A008527AA /* PNTransportConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33C72C046A1A008527AA /* PNTransportConfiguration.m */; }; + A5CB33CE2C046A1A008527AA /* PNTransportConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33C62C046A1A008527AA /* PNTransportConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CB33CF2C046A1A008527AA /* PNTransportConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33C72C046A1A008527AA /* PNTransportConfiguration.m */; }; + A5CB33D02C046A1A008527AA /* PNTransportConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33C62C046A1A008527AA /* PNTransportConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CB33D12C046A1A008527AA /* PNTransportConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33C72C046A1A008527AA /* PNTransportConfiguration.m */; }; + A5CB33D52C0C70B2008527AA /* PNTransportMiddleware.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33D32C0C70B2008527AA /* PNTransportMiddleware.h */; }; + A5CB33D62C0C70B2008527AA /* PNTransportMiddleware.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33D42C0C70B2008527AA /* PNTransportMiddleware.m */; }; + A5CB33D72C0C70B2008527AA /* PNTransportMiddleware.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33D42C0C70B2008527AA /* PNTransportMiddleware.m */; }; + A5CB33D82C0C70B2008527AA /* PNTransportMiddleware.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33D32C0C70B2008527AA /* PNTransportMiddleware.h */; }; + A5CB33D92C0C70B2008527AA /* PNTransportMiddleware.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33D32C0C70B2008527AA /* PNTransportMiddleware.h */; }; + A5CB33DA2C0C70B2008527AA /* PNTransportMiddleware.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33D42C0C70B2008527AA /* PNTransportMiddleware.m */; }; + A5CB33DB2C0C70B2008527AA /* PNTransportMiddleware.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33D32C0C70B2008527AA /* PNTransportMiddleware.h */; }; + A5CB33DC2C0C70B2008527AA /* PNTransportMiddleware.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33D42C0C70B2008527AA /* PNTransportMiddleware.m */; }; + A5CB33DD2C0C70B2008527AA /* PNTransportMiddleware.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33D32C0C70B2008527AA /* PNTransportMiddleware.h */; }; + A5CB33DE2C0C70B2008527AA /* PNTransportMiddleware.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33D42C0C70B2008527AA /* PNTransportMiddleware.m */; }; + A5CB33E12C0C7237008527AA /* PNTransportMiddlewareConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33DF2C0C7237008527AA /* PNTransportMiddlewareConfiguration.h */; }; + A5CB33E22C0C7237008527AA /* PNTransportMiddlewareConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33E02C0C7237008527AA /* PNTransportMiddlewareConfiguration.m */; }; + A5CB33E32C0C7237008527AA /* PNTransportMiddlewareConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33E02C0C7237008527AA /* PNTransportMiddlewareConfiguration.m */; }; + A5CB33E42C0C7237008527AA /* PNTransportMiddlewareConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33DF2C0C7237008527AA /* PNTransportMiddlewareConfiguration.h */; }; + A5CB33E52C0C7237008527AA /* PNTransportMiddlewareConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33DF2C0C7237008527AA /* PNTransportMiddlewareConfiguration.h */; }; + A5CB33E62C0C7237008527AA /* PNTransportMiddlewareConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33E02C0C7237008527AA /* PNTransportMiddlewareConfiguration.m */; }; + A5CB33E72C0C7237008527AA /* PNTransportMiddlewareConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33DF2C0C7237008527AA /* PNTransportMiddlewareConfiguration.h */; }; + A5CB33E82C0C7237008527AA /* PNTransportMiddlewareConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33E02C0C7237008527AA /* PNTransportMiddlewareConfiguration.m */; }; + A5CB33E92C0C7237008527AA /* PNTransportMiddlewareConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33DF2C0C7237008527AA /* PNTransportMiddlewareConfiguration.h */; }; + A5CB33EA2C0C7237008527AA /* PNTransportMiddlewareConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CB33E02C0C7237008527AA /* PNTransportMiddlewareConfiguration.m */; }; + A5CB33EC2C0C7E94008527AA /* PNTransportConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33EB2C0C7E94008527AA /* PNTransportConfiguration+Private.h */; }; + A5CB33ED2C0C7E94008527AA /* PNTransportConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33EB2C0C7E94008527AA /* PNTransportConfiguration+Private.h */; }; + A5CB33EE2C0C7E94008527AA /* PNTransportConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33EB2C0C7E94008527AA /* PNTransportConfiguration+Private.h */; }; + A5CB33EF2C0C7E94008527AA /* PNTransportConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33EB2C0C7E94008527AA /* PNTransportConfiguration+Private.h */; }; + A5CB33F02C0C7E94008527AA /* PNTransportConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CB33EB2C0C7E94008527AA /* PNTransportConfiguration+Private.h */; }; + A5CCEC4F2C0E006000DB02A4 /* PNURLSessionTransportResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC4D2C0E006000DB02A4 /* PNURLSessionTransportResponse.h */; }; + A5CCEC502C0E006000DB02A4 /* PNURLSessionTransportResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CCEC4E2C0E006000DB02A4 /* PNURLSessionTransportResponse.m */; }; + A5CCEC512C0E006000DB02A4 /* PNURLSessionTransportResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC4D2C0E006000DB02A4 /* PNURLSessionTransportResponse.h */; }; + A5CCEC522C0E006000DB02A4 /* PNURLSessionTransportResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CCEC4E2C0E006000DB02A4 /* PNURLSessionTransportResponse.m */; }; + A5CCEC532C0E006000DB02A4 /* PNURLSessionTransportResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CCEC4E2C0E006000DB02A4 /* PNURLSessionTransportResponse.m */; }; + A5CCEC542C0E006000DB02A4 /* PNURLSessionTransportResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC4D2C0E006000DB02A4 /* PNURLSessionTransportResponse.h */; }; + A5CCEC552C0E006000DB02A4 /* PNURLSessionTransportResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CCEC4E2C0E006000DB02A4 /* PNURLSessionTransportResponse.m */; }; + A5CCEC562C0E006000DB02A4 /* PNURLSessionTransportResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC4D2C0E006000DB02A4 /* PNURLSessionTransportResponse.h */; }; + A5CCEC572C0E006000DB02A4 /* PNURLSessionTransportResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC4D2C0E006000DB02A4 /* PNURLSessionTransportResponse.h */; }; + A5CCEC582C0E006000DB02A4 /* PNURLSessionTransportResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CCEC4E2C0E006000DB02A4 /* PNURLSessionTransportResponse.m */; }; + A5CCEC5E2C0E816A00DB02A4 /* PNRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC592C0E816A00DB02A4 /* PNRequest.h */; }; + A5CCEC5F2C0E816A00DB02A4 /* PNRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC592C0E816A00DB02A4 /* PNRequest.h */; }; + A5CCEC602C0E816A00DB02A4 /* PNRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC592C0E816A00DB02A4 /* PNRequest.h */; }; + A5CCEC612C0E816A00DB02A4 /* PNRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC592C0E816A00DB02A4 /* PNRequest.h */; }; + A5CCEC622C0E816A00DB02A4 /* PNRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC592C0E816A00DB02A4 /* PNRequest.h */; }; + A5CCEC632C0E816A00DB02A4 /* PNTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC5A2C0E816A00DB02A4 /* PNTransport.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CCEC642C0E816A00DB02A4 /* PNTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC5A2C0E816A00DB02A4 /* PNTransport.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CCEC652C0E816A00DB02A4 /* PNTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC5A2C0E816A00DB02A4 /* PNTransport.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CCEC662C0E816A00DB02A4 /* PNTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC5A2C0E816A00DB02A4 /* PNTransport.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CCEC672C0E816A00DB02A4 /* PNTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC5A2C0E816A00DB02A4 /* PNTransport.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CCEC682C0E816A00DB02A4 /* PNTransportResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC5B2C0E816A00DB02A4 /* PNTransportResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CCEC692C0E816A00DB02A4 /* PNTransportResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC5B2C0E816A00DB02A4 /* PNTransportResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CCEC6A2C0E816A00DB02A4 /* PNTransportResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC5B2C0E816A00DB02A4 /* PNTransportResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CCEC6B2C0E816A00DB02A4 /* PNTransportResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC5B2C0E816A00DB02A4 /* PNTransportResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CCEC6C2C0E816A00DB02A4 /* PNTransportResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CCEC5B2C0E816A00DB02A4 /* PNTransportResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE40E2C0F246400274165 /* PNBaseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE40D2C0F246400274165 /* PNBaseRequest.m */; }; + A5CFE40F2C0F246400274165 /* PNBaseRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE40C2C0F246400274165 /* PNBaseRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4102C0F246400274165 /* PNBaseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE40D2C0F246400274165 /* PNBaseRequest.m */; }; + A5CFE4112C0F246400274165 /* PNBaseRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE40C2C0F246400274165 /* PNBaseRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4122C0F246400274165 /* PNBaseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE40D2C0F246400274165 /* PNBaseRequest.m */; }; + A5CFE4132C0F246400274165 /* PNBaseRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE40C2C0F246400274165 /* PNBaseRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4142C0F246400274165 /* PNBaseRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE40C2C0F246400274165 /* PNBaseRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4152C0F246400274165 /* PNBaseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE40D2C0F246400274165 /* PNBaseRequest.m */; }; + A5CFE4162C0F246400274165 /* PNBaseRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE40C2C0F246400274165 /* PNBaseRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4172C0F246400274165 /* PNBaseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE40D2C0F246400274165 /* PNBaseRequest.m */; }; + A5CFE4192C1076A700274165 /* PNBaseRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4182C1076A700274165 /* PNBaseRequest+Private.h */; }; + A5CFE41A2C1076A700274165 /* PNBaseRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4182C1076A700274165 /* PNBaseRequest+Private.h */; }; + A5CFE41B2C1076A700274165 /* PNBaseRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4182C1076A700274165 /* PNBaseRequest+Private.h */; }; + A5CFE41C2C1076A700274165 /* PNBaseRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4182C1076A700274165 /* PNBaseRequest+Private.h */; }; + A5CFE41D2C1076A700274165 /* PNBaseRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4182C1076A700274165 /* PNBaseRequest+Private.h */; }; + A5CFE43F2C11E8D500274165 /* PNChannelGroupManageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE43E2C11E8D500274165 /* PNChannelGroupManageRequest.m */; }; + A5CFE4402C11E8D500274165 /* PNChannelGroupManageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE43D2C11E8D500274165 /* PNChannelGroupManageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4412C11E8D500274165 /* PNChannelGroupManageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE43E2C11E8D500274165 /* PNChannelGroupManageRequest.m */; }; + A5CFE4422C11E8D500274165 /* PNChannelGroupManageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE43D2C11E8D500274165 /* PNChannelGroupManageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4432C11E8D500274165 /* PNChannelGroupManageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE43D2C11E8D500274165 /* PNChannelGroupManageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4442C11E8D500274165 /* PNChannelGroupManageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE43E2C11E8D500274165 /* PNChannelGroupManageRequest.m */; }; + A5CFE4452C11E8D500274165 /* PNChannelGroupManageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE43E2C11E8D500274165 /* PNChannelGroupManageRequest.m */; }; + A5CFE4462C11E8D500274165 /* PNChannelGroupManageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE43D2C11E8D500274165 /* PNChannelGroupManageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4472C11E8D500274165 /* PNChannelGroupManageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE43D2C11E8D500274165 /* PNChannelGroupManageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4482C11E8D500274165 /* PNChannelGroupManageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE43E2C11E8D500274165 /* PNChannelGroupManageRequest.m */; }; + A5CFE45D2C123F2E00274165 /* PNBaseOperationData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE45C2C123F2E00274165 /* PNBaseOperationData.m */; }; + A5CFE45E2C123F2E00274165 /* PNBaseOperationData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE45B2C123F2E00274165 /* PNBaseOperationData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE45F2C123F2E00274165 /* PNBaseOperationData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE45C2C123F2E00274165 /* PNBaseOperationData.m */; }; + A5CFE4602C123F2E00274165 /* PNBaseOperationData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE45B2C123F2E00274165 /* PNBaseOperationData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4612C123F2E00274165 /* PNBaseOperationData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE45B2C123F2E00274165 /* PNBaseOperationData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4622C123F2E00274165 /* PNBaseOperationData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE45C2C123F2E00274165 /* PNBaseOperationData.m */; }; + A5CFE4632C123F2E00274165 /* PNBaseOperationData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE45C2C123F2E00274165 /* PNBaseOperationData.m */; }; + A5CFE4642C123F2E00274165 /* PNBaseOperationData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE45B2C123F2E00274165 /* PNBaseOperationData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4652C123F2E00274165 /* PNBaseOperationData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE45B2C123F2E00274165 /* PNBaseOperationData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4662C123F2E00274165 /* PNBaseOperationData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE45C2C123F2E00274165 /* PNBaseOperationData.m */; }; + A5CFE4702C14A90900274165 /* NSError+PNTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE46F2C14A90900274165 /* NSError+PNTransport.m */; }; + A5CFE4712C14A90900274165 /* NSError+PNTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE46E2C14A90900274165 /* NSError+PNTransport.h */; }; + A5CFE4722C14A90900274165 /* NSError+PNTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE46F2C14A90900274165 /* NSError+PNTransport.m */; }; + A5CFE4732C14A90900274165 /* NSError+PNTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE46E2C14A90900274165 /* NSError+PNTransport.h */; }; + A5CFE4742C14A90900274165 /* NSError+PNTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE46E2C14A90900274165 /* NSError+PNTransport.h */; }; + A5CFE4752C14A90900274165 /* NSError+PNTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE46F2C14A90900274165 /* NSError+PNTransport.m */; }; + A5CFE4762C14A90900274165 /* NSError+PNTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE46F2C14A90900274165 /* NSError+PNTransport.m */; }; + A5CFE4772C14A90900274165 /* NSError+PNTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE46E2C14A90900274165 /* NSError+PNTransport.h */; }; + A5CFE4782C14A90900274165 /* NSError+PNTransport.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE46E2C14A90900274165 /* NSError+PNTransport.h */; }; + A5CFE4792C14A90900274165 /* NSError+PNTransport.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE46F2C14A90900274165 /* NSError+PNTransport.m */; }; + A5CFE4BA2C1647B000274165 /* PNPublishData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4B92C1647B000274165 /* PNPublishData.m */; }; + A5CFE4BB2C1647B000274165 /* PNPublishData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4B82C1647B000274165 /* PNPublishData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4BC2C1647B000274165 /* PNPublishData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4B92C1647B000274165 /* PNPublishData.m */; }; + A5CFE4BD2C1647B000274165 /* PNPublishData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4B82C1647B000274165 /* PNPublishData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4BE2C1647B000274165 /* PNPublishData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4B82C1647B000274165 /* PNPublishData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4BF2C1647B000274165 /* PNPublishData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4B92C1647B000274165 /* PNPublishData.m */; }; + A5CFE4C02C1647B000274165 /* PNPublishData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4B92C1647B000274165 /* PNPublishData.m */; }; + A5CFE4C12C1647B000274165 /* PNPublishData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4B82C1647B000274165 /* PNPublishData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4C22C1647B000274165 /* PNPublishData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4B82C1647B000274165 /* PNPublishData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4C32C1647B000274165 /* PNPublishData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4B92C1647B000274165 /* PNPublishData.m */; }; + A5CFE4D82C16500F00274165 /* PNSignalData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4D72C16500F00274165 /* PNSignalData.m */; }; + A5CFE4D92C16500F00274165 /* PNSignalData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4D62C16500F00274165 /* PNSignalData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4DA2C16500F00274165 /* PNSignalData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4D72C16500F00274165 /* PNSignalData.m */; }; + A5CFE4DB2C16500F00274165 /* PNSignalData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4D62C16500F00274165 /* PNSignalData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4DC2C16500F00274165 /* PNSignalData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4D62C16500F00274165 /* PNSignalData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4DD2C16500F00274165 /* PNSignalData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4D72C16500F00274165 /* PNSignalData.m */; }; + A5CFE4DE2C16500F00274165 /* PNSignalData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4D72C16500F00274165 /* PNSignalData.m */; }; + A5CFE4DF2C16500F00274165 /* PNSignalData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4D62C16500F00274165 /* PNSignalData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4E02C16500F00274165 /* PNSignalData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4D62C16500F00274165 /* PNSignalData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4E12C16500F00274165 /* PNSignalData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4D72C16500F00274165 /* PNSignalData.m */; }; + A5CFE4F12C16528700274165 /* PNTimeData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4F02C16528700274165 /* PNTimeData.m */; }; + A5CFE4F22C16528700274165 /* PNTimeData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4EF2C16528700274165 /* PNTimeData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4F32C16528700274165 /* PNTimeData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4F02C16528700274165 /* PNTimeData.m */; }; + A5CFE4F42C16528700274165 /* PNTimeData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4EF2C16528700274165 /* PNTimeData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4F52C16528700274165 /* PNTimeData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4EF2C16528700274165 /* PNTimeData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4F62C16528700274165 /* PNTimeData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4F02C16528700274165 /* PNTimeData.m */; }; + A5CFE4F72C16528700274165 /* PNTimeData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4F02C16528700274165 /* PNTimeData.m */; }; + A5CFE4F82C16528700274165 /* PNTimeData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4EF2C16528700274165 /* PNTimeData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4F92C16528700274165 /* PNTimeData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE4EF2C16528700274165 /* PNTimeData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE4FA2C16528700274165 /* PNTimeData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE4F02C16528700274165 /* PNTimeData.m */; }; + A5CFE5052C1658E700274165 /* PNHistoryFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5042C1658E700274165 /* PNHistoryFetchData.m */; }; + A5CFE5062C1658E700274165 /* PNHistoryFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5032C1658E700274165 /* PNHistoryFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5072C1658E700274165 /* PNHistoryFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5042C1658E700274165 /* PNHistoryFetchData.m */; }; + A5CFE5082C1658E700274165 /* PNHistoryFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5032C1658E700274165 /* PNHistoryFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5092C1658E700274165 /* PNHistoryFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5032C1658E700274165 /* PNHistoryFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE50A2C1658E700274165 /* PNHistoryFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5042C1658E700274165 /* PNHistoryFetchData.m */; }; + A5CFE50B2C1658E700274165 /* PNHistoryFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5042C1658E700274165 /* PNHistoryFetchData.m */; }; + A5CFE50C2C1658E700274165 /* PNHistoryFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5032C1658E700274165 /* PNHistoryFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE50D2C1658E700274165 /* PNHistoryFetchData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5032C1658E700274165 /* PNHistoryFetchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE50E2C1658E700274165 /* PNHistoryFetchData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5042C1658E700274165 /* PNHistoryFetchData.m */; }; + A5CFE5112C1892AD00274165 /* PNPushNotificationManageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5102C1892AD00274165 /* PNPushNotificationManageRequest.m */; }; + A5CFE5122C1892AD00274165 /* PNPushNotificationManageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE50F2C1892AD00274165 /* PNPushNotificationManageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5132C1892AD00274165 /* PNPushNotificationManageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5102C1892AD00274165 /* PNPushNotificationManageRequest.m */; }; + A5CFE5142C1892AD00274165 /* PNPushNotificationManageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE50F2C1892AD00274165 /* PNPushNotificationManageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5152C1892AD00274165 /* PNPushNotificationManageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE50F2C1892AD00274165 /* PNPushNotificationManageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5162C1892AD00274165 /* PNPushNotificationManageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5102C1892AD00274165 /* PNPushNotificationManageRequest.m */; }; + A5CFE5172C1892AD00274165 /* PNPushNotificationManageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5102C1892AD00274165 /* PNPushNotificationManageRequest.m */; }; + A5CFE5182C1892AD00274165 /* PNPushNotificationManageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE50F2C1892AD00274165 /* PNPushNotificationManageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5192C1892AD00274165 /* PNPushNotificationManageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE50F2C1892AD00274165 /* PNPushNotificationManageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE51A2C1892AD00274165 /* PNPushNotificationManageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5102C1892AD00274165 /* PNPushNotificationManageRequest.m */; }; + A5CFE51C2C18969900274165 /* PNBasePushNotificationsRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE51B2C18969900274165 /* PNBasePushNotificationsRequest+Private.h */; }; + A5CFE51D2C18969900274165 /* PNBasePushNotificationsRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE51B2C18969900274165 /* PNBasePushNotificationsRequest+Private.h */; }; + A5CFE51E2C18969900274165 /* PNBasePushNotificationsRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE51B2C18969900274165 /* PNBasePushNotificationsRequest+Private.h */; }; + A5CFE51F2C18969900274165 /* PNBasePushNotificationsRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE51B2C18969900274165 /* PNBasePushNotificationsRequest+Private.h */; }; + A5CFE5202C18969900274165 /* PNBasePushNotificationsRequest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE51B2C18969900274165 /* PNBasePushNotificationsRequest+Private.h */; }; + A5CFE5282C18C9D400274165 /* PNPushNotificationFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5272C18C9D400274165 /* PNPushNotificationFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5292C18C9D400274165 /* PNPushNotificationFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5272C18C9D400274165 /* PNPushNotificationFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE52A2C18C9D400274165 /* PNPushNotificationFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5272C18C9D400274165 /* PNPushNotificationFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE52B2C18C9D400274165 /* PNPushNotificationFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5272C18C9D400274165 /* PNPushNotificationFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE52C2C18C9D400274165 /* PNPushNotificationFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5272C18C9D400274165 /* PNPushNotificationFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5302C18D33500274165 /* PNHereNowRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE52F2C18D33500274165 /* PNHereNowRequest.m */; }; + A5CFE5312C18D33500274165 /* PNHereNowRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE52E2C18D33500274165 /* PNHereNowRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5322C18D33500274165 /* PNHereNowRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE52F2C18D33500274165 /* PNHereNowRequest.m */; }; + A5CFE5332C18D33500274165 /* PNHereNowRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE52E2C18D33500274165 /* PNHereNowRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5342C18D33500274165 /* PNHereNowRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE52E2C18D33500274165 /* PNHereNowRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5352C18D33500274165 /* PNHereNowRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE52F2C18D33500274165 /* PNHereNowRequest.m */; }; + A5CFE5362C18D33500274165 /* PNHereNowRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE52F2C18D33500274165 /* PNHereNowRequest.m */; }; + A5CFE5372C18D33500274165 /* PNHereNowRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE52E2C18D33500274165 /* PNHereNowRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5382C18D33500274165 /* PNHereNowRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE52E2C18D33500274165 /* PNHereNowRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5392C18D33500274165 /* PNHereNowRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE52F2C18D33500274165 /* PNHereNowRequest.m */; }; + A5CFE53C2C18D38600274165 /* PNWhereNowRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE53B2C18D38600274165 /* PNWhereNowRequest.m */; }; + A5CFE53D2C18D38600274165 /* PNWhereNowRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE53A2C18D38600274165 /* PNWhereNowRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE53E2C18D38600274165 /* PNWhereNowRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE53B2C18D38600274165 /* PNWhereNowRequest.m */; }; + A5CFE53F2C18D38600274165 /* PNWhereNowRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE53A2C18D38600274165 /* PNWhereNowRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5402C18D38600274165 /* PNWhereNowRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE53A2C18D38600274165 /* PNWhereNowRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5412C18D38600274165 /* PNWhereNowRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE53B2C18D38600274165 /* PNWhereNowRequest.m */; }; + A5CFE5422C18D38600274165 /* PNWhereNowRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE53B2C18D38600274165 /* PNWhereNowRequest.m */; }; + A5CFE5432C18D38600274165 /* PNWhereNowRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE53A2C18D38600274165 /* PNWhereNowRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5442C18D38600274165 /* PNWhereNowRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE53A2C18D38600274165 /* PNWhereNowRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5452C18D38600274165 /* PNWhereNowRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE53B2C18D38600274165 /* PNWhereNowRequest.m */; }; + A5CFE5482C18D3A700274165 /* PNPresenceStateSetRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5472C18D3A700274165 /* PNPresenceStateSetRequest.m */; }; + A5CFE5492C18D3A700274165 /* PNPresenceStateSetRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5462C18D3A700274165 /* PNPresenceStateSetRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE54A2C18D3A700274165 /* PNPresenceStateSetRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5472C18D3A700274165 /* PNPresenceStateSetRequest.m */; }; + A5CFE54B2C18D3A700274165 /* PNPresenceStateSetRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5462C18D3A700274165 /* PNPresenceStateSetRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE54C2C18D3A700274165 /* PNPresenceStateSetRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5462C18D3A700274165 /* PNPresenceStateSetRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE54D2C18D3A700274165 /* PNPresenceStateSetRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5472C18D3A700274165 /* PNPresenceStateSetRequest.m */; }; + A5CFE54E2C18D3A700274165 /* PNPresenceStateSetRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5472C18D3A700274165 /* PNPresenceStateSetRequest.m */; }; + A5CFE54F2C18D3A700274165 /* PNPresenceStateSetRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5462C18D3A700274165 /* PNPresenceStateSetRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5502C18D3A700274165 /* PNPresenceStateSetRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5462C18D3A700274165 /* PNPresenceStateSetRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5512C18D3A700274165 /* PNPresenceStateSetRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5472C18D3A700274165 /* PNPresenceStateSetRequest.m */; }; + A5CFE5542C18D3B600274165 /* PNPresenceStateFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5532C18D3B600274165 /* PNPresenceStateFetchRequest.m */; }; + A5CFE5552C18D3B600274165 /* PNPresenceStateFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5522C18D3B600274165 /* PNPresenceStateFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5562C18D3B600274165 /* PNPresenceStateFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5532C18D3B600274165 /* PNPresenceStateFetchRequest.m */; }; + A5CFE5572C18D3B600274165 /* PNPresenceStateFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5522C18D3B600274165 /* PNPresenceStateFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5582C18D3B600274165 /* PNPresenceStateFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5522C18D3B600274165 /* PNPresenceStateFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5592C18D3B600274165 /* PNPresenceStateFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5532C18D3B600274165 /* PNPresenceStateFetchRequest.m */; }; + A5CFE55A2C18D3B600274165 /* PNPresenceStateFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5532C18D3B600274165 /* PNPresenceStateFetchRequest.m */; }; + A5CFE55B2C18D3B600274165 /* PNPresenceStateFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5522C18D3B600274165 /* PNPresenceStateFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE55C2C18D3B600274165 /* PNPresenceStateFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5522C18D3B600274165 /* PNPresenceStateFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE55D2C18D3B600274165 /* PNPresenceStateFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5532C18D3B600274165 /* PNPresenceStateFetchRequest.m */; }; + A5CFE5602C18E9C600274165 /* PNPresenceHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE55F2C18E9C600274165 /* PNPresenceHereNowResult.m */; }; + A5CFE5612C18E9C600274165 /* PNPresenceHereNowResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE55E2C18E9C600274165 /* PNPresenceHereNowResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5622C18E9C600274165 /* PNPresenceHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE55F2C18E9C600274165 /* PNPresenceHereNowResult.m */; }; + A5CFE5632C18E9C600274165 /* PNPresenceHereNowResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE55E2C18E9C600274165 /* PNPresenceHereNowResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5642C18E9C600274165 /* PNPresenceHereNowResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE55E2C18E9C600274165 /* PNPresenceHereNowResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5652C18E9C600274165 /* PNPresenceHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE55F2C18E9C600274165 /* PNPresenceHereNowResult.m */; }; + A5CFE5662C18E9C600274165 /* PNPresenceHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE55F2C18E9C600274165 /* PNPresenceHereNowResult.m */; }; + A5CFE5672C18E9C600274165 /* PNPresenceHereNowResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE55E2C18E9C600274165 /* PNPresenceHereNowResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5682C18E9C600274165 /* PNPresenceHereNowResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE55E2C18E9C600274165 /* PNPresenceHereNowResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5692C18E9C600274165 /* PNPresenceHereNowResult.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE55F2C18E9C600274165 /* PNPresenceHereNowResult.m */; }; + A5CFE56D2C19066C00274165 /* PNHistoryFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE56C2C19066C00274165 /* PNHistoryFetchRequest.m */; }; + A5CFE56E2C19066C00274165 /* PNHistoryFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE56B2C19066C00274165 /* PNHistoryFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE56F2C19066C00274165 /* PNHistoryFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE56C2C19066C00274165 /* PNHistoryFetchRequest.m */; }; + A5CFE5702C19066C00274165 /* PNHistoryFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE56B2C19066C00274165 /* PNHistoryFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5712C19066C00274165 /* PNHistoryFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE56B2C19066C00274165 /* PNHistoryFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5722C19066C00274165 /* PNHistoryFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE56C2C19066C00274165 /* PNHistoryFetchRequest.m */; }; + A5CFE5732C19066C00274165 /* PNHistoryFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE56C2C19066C00274165 /* PNHistoryFetchRequest.m */; }; + A5CFE5742C19066C00274165 /* PNHistoryFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE56B2C19066C00274165 /* PNHistoryFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5752C19066C00274165 /* PNHistoryFetchRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE56B2C19066C00274165 /* PNHistoryFetchRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5762C19066C00274165 /* PNHistoryFetchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE56C2C19066C00274165 /* PNHistoryFetchRequest.m */; }; + A5CFE5792C191B8100274165 /* PNHistoryMessagesDeleteRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5782C191B8100274165 /* PNHistoryMessagesDeleteRequest.m */; }; + A5CFE57B2C191B8100274165 /* PNHistoryMessagesDeleteRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5782C191B8100274165 /* PNHistoryMessagesDeleteRequest.m */; }; + A5CFE57E2C191B8100274165 /* PNHistoryMessagesDeleteRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5782C191B8100274165 /* PNHistoryMessagesDeleteRequest.m */; }; + A5CFE57F2C191B8100274165 /* PNHistoryMessagesDeleteRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5782C191B8100274165 /* PNHistoryMessagesDeleteRequest.m */; }; + A5CFE5822C191B8100274165 /* PNHistoryMessagesDeleteRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5782C191B8100274165 /* PNHistoryMessagesDeleteRequest.m */; }; + A5CFE5862C19203700274165 /* PNHistoryMessagesCountRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5832C19203700274165 /* PNHistoryMessagesCountRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5882C19203700274165 /* PNHistoryMessagesCountRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5832C19203700274165 /* PNHistoryMessagesCountRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5892C19203700274165 /* PNHistoryMessagesCountRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5832C19203700274165 /* PNHistoryMessagesCountRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE58C2C19203700274165 /* PNHistoryMessagesCountRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5832C19203700274165 /* PNHistoryMessagesCountRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE58D2C19203700274165 /* PNHistoryMessagesCountRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5832C19203700274165 /* PNHistoryMessagesCountRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5922C192ECA00274165 /* PNSubscribeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5912C192ECA00274165 /* PNSubscribeRequest.m */; }; + A5CFE5932C192ECA00274165 /* PNSubscribeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5902C192ECA00274165 /* PNSubscribeRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5942C192ECA00274165 /* PNSubscribeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5912C192ECA00274165 /* PNSubscribeRequest.m */; }; + A5CFE5952C192ECA00274165 /* PNSubscribeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5902C192ECA00274165 /* PNSubscribeRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5962C192ECA00274165 /* PNSubscribeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5902C192ECA00274165 /* PNSubscribeRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5972C192ECA00274165 /* PNSubscribeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5912C192ECA00274165 /* PNSubscribeRequest.m */; }; + A5CFE5982C192ECA00274165 /* PNSubscribeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5912C192ECA00274165 /* PNSubscribeRequest.m */; }; + A5CFE5992C192ECA00274165 /* PNSubscribeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5902C192ECA00274165 /* PNSubscribeRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE59A2C192ECA00274165 /* PNSubscribeRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5902C192ECA00274165 /* PNSubscribeRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE59B2C192ECA00274165 /* PNSubscribeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5912C192ECA00274165 /* PNSubscribeRequest.m */; }; + A5CFE59E2C1933BD00274165 /* PNPresenceLeaveRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE59D2C1933BD00274165 /* PNPresenceLeaveRequest.m */; }; + A5CFE59F2C1933BD00274165 /* PNPresenceLeaveRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE59C2C1933BD00274165 /* PNPresenceLeaveRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5A02C1933BD00274165 /* PNPresenceLeaveRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE59D2C1933BD00274165 /* PNPresenceLeaveRequest.m */; }; + A5CFE5A12C1933BD00274165 /* PNPresenceLeaveRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE59C2C1933BD00274165 /* PNPresenceLeaveRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5A22C1933BD00274165 /* PNPresenceLeaveRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE59C2C1933BD00274165 /* PNPresenceLeaveRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5A32C1933BD00274165 /* PNPresenceLeaveRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE59D2C1933BD00274165 /* PNPresenceLeaveRequest.m */; }; + A5CFE5A42C1933BD00274165 /* PNPresenceLeaveRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE59D2C1933BD00274165 /* PNPresenceLeaveRequest.m */; }; + A5CFE5A52C1933BD00274165 /* PNPresenceLeaveRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE59C2C1933BD00274165 /* PNPresenceLeaveRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5A62C1933BD00274165 /* PNPresenceLeaveRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE59C2C1933BD00274165 /* PNPresenceLeaveRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5A72C1933BD00274165 /* PNPresenceLeaveRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE59D2C1933BD00274165 /* PNPresenceLeaveRequest.m */; }; + A5CFE5BD2C1AAAAC00274165 /* PNErrorData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5BC2C1AAAAC00274165 /* PNErrorData.m */; }; + A5CFE5BE2C1AAAAC00274165 /* PNErrorData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5BB2C1AAAAC00274165 /* PNErrorData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5BF2C1AAAAC00274165 /* PNErrorData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5BC2C1AAAAC00274165 /* PNErrorData.m */; }; + A5CFE5C02C1AAAAC00274165 /* PNErrorData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5BB2C1AAAAC00274165 /* PNErrorData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5C12C1AAAAC00274165 /* PNErrorData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5BB2C1AAAAC00274165 /* PNErrorData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5C22C1AAAAD00274165 /* PNErrorData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5BC2C1AAAAC00274165 /* PNErrorData.m */; }; + A5CFE5C32C1AAAAD00274165 /* PNErrorData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5BC2C1AAAAC00274165 /* PNErrorData.m */; }; + A5CFE5C42C1AAAAD00274165 /* PNErrorData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5BB2C1AAAAC00274165 /* PNErrorData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5C52C1AAAAD00274165 /* PNErrorData.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5BB2C1AAAAC00274165 /* PNErrorData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5CFE5C62C1AAAAD00274165 /* PNErrorData.m in Sources */ = {isa = PBXBuildFile; fileRef = A5CFE5BC2C1AAAAC00274165 /* PNErrorData.m */; }; + A5CFE5C82C1AE33500274165 /* PNBaseOperationData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5C72C1AE33500274165 /* PNBaseOperationData+Private.h */; }; + A5CFE5C92C1AE33500274165 /* PNBaseOperationData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5C72C1AE33500274165 /* PNBaseOperationData+Private.h */; }; + A5CFE5CA2C1AE33500274165 /* PNBaseOperationData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5C72C1AE33500274165 /* PNBaseOperationData+Private.h */; }; + A5CFE5CB2C1AE33500274165 /* PNBaseOperationData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5C72C1AE33500274165 /* PNBaseOperationData+Private.h */; }; + A5CFE5CC2C1AE33500274165 /* PNBaseOperationData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5C72C1AE33500274165 /* PNBaseOperationData+Private.h */; }; + A5CFE5CE2C1AFF9100274165 /* PNErrorData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5CD2C1AFF9100274165 /* PNErrorData+Private.h */; }; + A5CFE5CF2C1AFF9100274165 /* PNErrorData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5CD2C1AFF9100274165 /* PNErrorData+Private.h */; }; + A5CFE5D02C1AFF9100274165 /* PNErrorData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5CD2C1AFF9100274165 /* PNErrorData+Private.h */; }; + A5CFE5D12C1AFF9100274165 /* PNErrorData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5CD2C1AFF9100274165 /* PNErrorData+Private.h */; }; + A5CFE5D22C1AFF9100274165 /* PNErrorData+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A5CFE5CD2C1AFF9100274165 /* PNErrorData+Private.h */; }; A5DB70942AAE778F005B6559 /* PNSequenceInputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = A5DB70922AAE778F005B6559 /* PNSequenceInputStream.h */; }; A5DB70952AAE778F005B6559 /* PNSequenceInputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = A5DB70922AAE778F005B6559 /* PNSequenceInputStream.h */; }; A5DB70962AAE778F005B6559 /* PNSequenceInputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = A5DB70922AAE778F005B6559 /* PNSequenceInputStream.h */; }; @@ -2737,9 +3317,6 @@ 797ABBAC24C415B50008CA1E /* PNBasePublishRequest+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNBasePublishRequest+Private.h"; sourceTree = ""; }; 797ABBB224C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPublishFileMessageAPICallBuilder.h; sourceTree = ""; }; 797ABBB324C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPublishFileMessageAPICallBuilder.m; sourceTree = ""; }; - 797ABBCA24C6E8650008CA1E /* PNDeleteFileParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNDeleteFileParser.h; sourceTree = ""; }; - 797ABBCB24C6E8650008CA1E /* PNDeleteFileParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNDeleteFileParser.m; sourceTree = ""; }; - 797ABBD624C9ADB80008CA1E /* PNSendFileStatus+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNSendFileStatus+Private.h"; sourceTree = ""; }; 797D605822D2E41000E64C94 /* PNSignalAPICallBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNSignalAPICallBuilder.h; sourceTree = ""; }; 797D605922D2E41000E64C94 /* PNSignalAPICallBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNSignalAPICallBuilder.m; sourceTree = ""; }; 797D606822D2E43F00E64C94 /* PNSignalStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNSignalStatus.m; sourceTree = ""; }; @@ -2807,13 +3384,8 @@ 79A3E4072215699900F2ADB9 /* PNMessageCountAPICallBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNMessageCountAPICallBuilder.h; sourceTree = ""; }; 79A3E416221569BA00F2ADB9 /* PNMessageCountResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNMessageCountResult.h; sourceTree = ""; }; 79A3E417221569BA00F2ADB9 /* PNMessageCountResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNMessageCountResult.m; sourceTree = ""; }; - 79A3E426221569DA00F2ADB9 /* PNMessageCountParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNMessageCountParser.h; sourceTree = ""; }; - 79A3E427221569DA00F2ADB9 /* PNMessageCountParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNMessageCountParser.m; sourceTree = ""; }; 79A8BCC61C58F97A00015BDE /* PubNub-tvOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PubNub-tvOS-Info.plist"; sourceTree = ""; }; 79AA8EC826EAB81500ADA747 /* PNConfiguration+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNConfiguration+Private.h"; sourceTree = ""; }; - 79AA8ECE26EB3A1200ADA747 /* PubNub+PAMPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PubNub+PAMPrivate.h"; sourceTree = ""; }; - 79ABD88F1F01636B007634E0 /* PNTelemetry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNTelemetry.h; sourceTree = ""; }; - 79ABD8901F01636B007634E0 /* PNTelemetry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNTelemetry.m; sourceTree = ""; }; 79CBB0411BD03D3F001FC34D /* PubNub.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PubNub.h; sourceTree = ""; }; 79CBB0431BD03D3F001FC34D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 79CBB0561BD03DE4001FC34D /* PubNub+APNS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PubNub+APNS.h"; sourceTree = ""; }; @@ -2861,10 +3433,7 @@ 79CBB0841BD03DE4001FC34D /* PNChannelGroupChannelsResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNChannelGroupChannelsResult.m; sourceTree = ""; }; 79CBB0851BD03DE4001FC34D /* PNChannelGroupClientStateResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNChannelGroupClientStateResult.h; sourceTree = ""; }; 79CBB0861BD03DE4001FC34D /* PNChannelGroupClientStateResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNChannelGroupClientStateResult.m; sourceTree = ""; }; - 79CBB0871BD03DE4001FC34D /* PNChannelGroupsResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNChannelGroupsResult.h; sourceTree = ""; }; - 79CBB0881BD03DE4001FC34D /* PNChannelGroupsResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNChannelGroupsResult.m; sourceTree = ""; }; 79CBB0891BD03DE4001FC34D /* PNClientStateUpdateStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNClientStateUpdateStatus.h; sourceTree = ""; }; - 79CBB08A1BD03DE4001FC34D /* PNClientStateUpdateStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNClientStateUpdateStatus.m; sourceTree = ""; }; 79CBB08B1BD03DE4001FC34D /* PNErrorStatus+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PNErrorStatus+Private.h"; sourceTree = ""; }; 79CBB08C1BD03DE4001FC34D /* PNErrorStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNErrorStatus.h; sourceTree = ""; }; 79CBB08D1BD03DE4001FC34D /* PNErrorStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNErrorStatus.m; sourceTree = ""; }; @@ -2889,8 +3458,6 @@ 79CBB0A01BD03DE4001FC34D /* PNStatus+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PNStatus+Private.h"; sourceTree = ""; }; 79CBB0A11BD03DE4001FC34D /* PNStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNStatus.h; sourceTree = ""; }; 79CBB0A21BD03DE4001FC34D /* PNStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNStatus.m; sourceTree = ""; }; - 79CBB0A31BD03DE4001FC34D /* PNSubscriberResults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNSubscriberResults.h; sourceTree = ""; }; - 79CBB0A41BD03DE4001FC34D /* PNSubscriberResults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNSubscriberResults.m; sourceTree = ""; }; 79CBB0A51BD03DE4001FC34D /* PNSubscribeStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNSubscribeStatus.h; sourceTree = ""; }; 79CBB0A61BD03DE4001FC34D /* PNSubscribeStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNSubscribeStatus.m; sourceTree = ""; }; 79CBB0A71BD03DE4001FC34D /* PNTimeResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNTimeResult.h; sourceTree = ""; }; @@ -2914,60 +3481,17 @@ 79CBB0BE1BD03DE4001FC34D /* PNURLRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNURLRequest.m; sourceTree = ""; }; 79CBB0C61BD03DE4001FC34D /* PNLogMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNLogMacro.h; sourceTree = ""; }; 79CBB0C71BD03DE4001FC34D /* PNConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNConstants.h; sourceTree = ""; }; - 79CBB0C81BD03DE4001FC34D /* PNErrorCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNErrorCodes.h; sourceTree = ""; }; 79CBB0C91BD03DE4001FC34D /* PNPrivateStructures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNPrivateStructures.h; sourceTree = ""; }; 79CBB0CA1BD03DE4001FC34D /* PNStructures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNStructures.h; sourceTree = ""; }; 79CBB0CC1BD03DE4001FC34D /* PNEventsListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNEventsListener.h; sourceTree = ""; }; 79CBB0CD1BD03DE4001FC34D /* PNParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNParser.h; sourceTree = ""; }; - 79CBB0D01BD03DE4001FC34D /* PNChannelGroupAuditionParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNChannelGroupAuditionParser.h; sourceTree = ""; }; - 79CBB0D11BD03DE4001FC34D /* PNChannelGroupAuditionParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNChannelGroupAuditionParser.m; sourceTree = ""; }; - 79CBB0D21BD03DE4001FC34D /* PNChannelGroupModificationParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNChannelGroupModificationParser.h; sourceTree = ""; }; - 79CBB0D31BD03DE4001FC34D /* PNChannelGroupModificationParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNChannelGroupModificationParser.m; sourceTree = ""; }; - 79CBB0D41BD03DE4001FC34D /* PNClientStateParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNClientStateParser.h; sourceTree = ""; }; - 79CBB0D51BD03DE4001FC34D /* PNClientStateParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNClientStateParser.m; sourceTree = ""; }; - 79CBB0D61BD03DE4001FC34D /* PNErrorParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNErrorParser.h; sourceTree = ""; }; - 79CBB0D71BD03DE4001FC34D /* PNErrorParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNErrorParser.m; sourceTree = ""; }; - 79CBB0D81BD03DE4001FC34D /* PNHeartbeatParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNHeartbeatParser.h; sourceTree = ""; }; - 79CBB0D91BD03DE4001FC34D /* PNHeartbeatParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNHeartbeatParser.m; sourceTree = ""; }; - 79CBB0DA1BD03DE4001FC34D /* PNHistoryParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNHistoryParser.h; sourceTree = ""; }; - 79CBB0DB1BD03DE4001FC34D /* PNHistoryParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNHistoryParser.m; sourceTree = ""; }; - 79CBB0DC1BD03DE4001FC34D /* PNLeaveParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNLeaveParser.h; sourceTree = ""; }; - 79CBB0DD1BD03DE4001FC34D /* PNLeaveParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNLeaveParser.m; sourceTree = ""; }; - 79CBB0DE1BD03DE4001FC34D /* PNMessagePublishParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNMessagePublishParser.h; sourceTree = ""; }; - 79CBB0DF1BD03DE4001FC34D /* PNMessagePublishParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNMessagePublishParser.m; sourceTree = ""; }; - 79CBB0E01BD03DE4001FC34D /* PNPresenceHereNowParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNPresenceHereNowParser.h; sourceTree = ""; }; - 79CBB0E11BD03DE4001FC34D /* PNPresenceHereNowParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNPresenceHereNowParser.m; sourceTree = ""; }; - 79CBB0E21BD03DE4001FC34D /* PNPresenceWhereNowParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNPresenceWhereNowParser.h; sourceTree = ""; }; - 79CBB0E31BD03DE4001FC34D /* PNPresenceWhereNowParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNPresenceWhereNowParser.m; sourceTree = ""; }; - 79CBB0E41BD03DE4001FC34D /* PNPushNotificationsAuditParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNPushNotificationsAuditParser.h; sourceTree = ""; }; - 79CBB0E51BD03DE4001FC34D /* PNPushNotificationsAuditParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNPushNotificationsAuditParser.m; sourceTree = ""; }; - 79CBB0E61BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNPushNotificationsStateModificationParser.h; sourceTree = ""; }; - 79CBB0E71BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNPushNotificationsStateModificationParser.m; sourceTree = ""; }; - 79CBB0EA1BD03DE4001FC34D /* PNSubscribeParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNSubscribeParser.h; sourceTree = ""; }; - 79CBB0EB1BD03DE4001FC34D /* PNSubscribeParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNSubscribeParser.m; sourceTree = ""; }; - 79CBB0EC1BD03DE4001FC34D /* PNTimeParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNTimeParser.h; sourceTree = ""; }; - 79CBB0ED1BD03DE4001FC34D /* PNTimeParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNTimeParser.m; sourceTree = ""; }; - 79CBB0EE1BD03DE4001FC34D /* PNNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNNetwork.h; sourceTree = ""; }; - 79CBB0EF1BD03DE4001FC34D /* PNNetwork.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNNetwork.m; sourceTree = ""; }; - 79CBB0F01BD03DE4001FC34D /* PNNetworkResponseSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNNetworkResponseSerializer.h; sourceTree = ""; }; - 79CBB0F11BD03DE4001FC34D /* PNNetworkResponseSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNNetworkResponseSerializer.m; sourceTree = ""; }; 79CBB0F21BD03DE4001FC34D /* PNReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNReachability.h; sourceTree = ""; }; 79CBB0F31BD03DE4001FC34D /* PNReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNReachability.m; sourceTree = ""; }; - 79CBB0F41BD03DE4001FC34D /* PNRequestParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNRequestParameters.h; sourceTree = ""; }; - 79CBB0F51BD03DE4001FC34D /* PNRequestParameters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNRequestParameters.m; sourceTree = ""; }; - 79CBB0F61BD03DE4001FC34D /* PNURLBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNURLBuilder.h; sourceTree = ""; }; - 79CBB0F71BD03DE4001FC34D /* PNURLBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNURLBuilder.m; sourceTree = ""; }; 79CBB19E1BD03EE4001FC34D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 79CBB1A01BD03EEA001FC34D /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; 79CBB1DC1BD043BD001FC34D /* build_universal.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build_universal.sh; sourceTree = ""; }; 79CBB1DD1BD043BD001FC34D /* copy_products.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = copy_products.sh; sourceTree = ""; }; - 79CD275324D6A1CB000698DD /* PNDataStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNDataStorage.h; sourceTree = ""; }; - 79CD275424D6A1CB000698DD /* PNDataStorage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNDataStorage.m; sourceTree = ""; }; 79CD275F24D6A371000698DD /* PNKeyValueStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNKeyValueStorage.h; sourceTree = ""; }; - 79CD276524D75342000698DD /* PNKeychainStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNKeychainStorage.h; sourceTree = ""; }; - 79CD276624D75342000698DD /* PNKeychainStorage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNKeychainStorage.m; sourceTree = ""; }; - 79CD277124D75AE9000698DD /* PNInMemoryStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNInMemoryStorage.h; sourceTree = ""; }; - 79CD277224D75AE9000698DD /* PNInMemoryStorage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNInMemoryStorage.m; sourceTree = ""; }; 79CFA2AB26DE0AEB00D206D4 /* PNCBORDecoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNCBORDecoder.h; sourceTree = ""; }; 79CFA2AC26DE0AEB00D206D4 /* PNCBORDecoder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNCBORDecoder.m; sourceTree = ""; }; 79CFA2B726DE1C4900D206D4 /* PNPAMToken.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPAMToken.h; sourceTree = ""; }; @@ -2976,9 +3500,6 @@ 79DA780824BFC1CF00AC72F2 /* PNDownloadFileRequest+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNDownloadFileRequest+Private.h"; sourceTree = ""; }; 79E20D131C8AEC3A001BC9CC /* PNEnvelopeInformation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNEnvelopeInformation.h; sourceTree = ""; }; 79E20D141C8AEC3A001BC9CC /* PNEnvelopeInformation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNEnvelopeInformation.m; sourceTree = ""; }; - 79E20D231C8AEC5B001BC9CC /* PNSubscribeStatus+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PNSubscribeStatus+Private.h"; sourceTree = ""; }; - 79E2D0EC1C56434700BAA244 /* PNKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNKeychain.h; sourceTree = ""; }; - 79E2D0ED1C56434700BAA244 /* PNKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNKeychain.m; sourceTree = ""; }; 79F90F171FDEC1B9007132A3 /* PNPresenceHeartbeatAPICallBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNPresenceHeartbeatAPICallBuilder.m; sourceTree = ""; }; 79F90F181FDEC1B9007132A3 /* PNPresenceHeartbeatAPICallBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNPresenceHeartbeatAPICallBuilder.h; sourceTree = ""; }; A50319AA2AA48F1A00B25A44 /* PNCryptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNCryptor.h; sourceTree = ""; }; @@ -2999,12 +3520,8 @@ A504E0F724AA8AE9006DCF5B /* PNListFilesRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNListFilesRequest.m; sourceTree = ""; }; A504E10224AA8F44006DCF5B /* PNListFilesResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNListFilesResult.h; sourceTree = ""; }; A504E10324AA8F44006DCF5B /* PNListFilesResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNListFilesResult.m; sourceTree = ""; }; - A504E11A24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNGenerateFileUploadURLStatus.h; sourceTree = ""; }; - A504E11B24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNGenerateFileUploadURLStatus.m; sourceTree = ""; }; A504E12624AA90B8006DCF5B /* PNDownloadFileResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNDownloadFileResult.h; sourceTree = ""; }; A504E12724AA90B8006DCF5B /* PNDownloadFileResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNDownloadFileResult.m; sourceTree = ""; }; - A504E13324AA9361006DCF5B /* PNListFilesParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNListFilesParser.h; sourceTree = ""; }; - A504E13424AA9361006DCF5B /* PNListFilesParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNListFilesParser.m; sourceTree = ""; }; A504E13F24AA94C8006DCF5B /* PNFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFile.h; sourceTree = ""; }; A504E14024AA94C8006DCF5B /* PNFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFile.m; sourceTree = ""; }; A504E14B24AA9515006DCF5B /* PNFile+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNFile+Private.h"; sourceTree = ""; }; @@ -3026,15 +3543,177 @@ A504E1B324AD3219006DCF5B /* PNDeleteFileRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNDeleteFileRequest.m; sourceTree = ""; }; A504E1BE24AE78E3006DCF5B /* PNGenerateFileUploadURLRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNGenerateFileUploadURLRequest.m; sourceTree = ""; }; A504E1BF24AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNGenerateFileUploadURLRequest.h; sourceTree = ""; }; - A504E1CA24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNGenerateFileUploadURLParser.h; sourceTree = ""; }; - A504E1CB24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNGenerateFileUploadURLParser.m; sourceTree = ""; }; A504E1D624B04751006DCF5B /* PNFilesManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFilesManager.h; sourceTree = ""; }; A504E1D724B04751006DCF5B /* PNFilesManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFilesManager.m; sourceTree = ""; }; A5105B4E238F027D00CB693D /* PNDate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNDate.h; sourceTree = ""; }; A5105B4F238F027D00CB693D /* PNDate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNDate.m; sourceTree = ""; }; + A51B4A0B2BF0ADD6008C3370 /* PNJSONSerializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNJSONSerializer.h; sourceTree = ""; }; + A51B4A122BF0AE36008C3370 /* PNCodable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNCodable.h; sourceTree = ""; }; + A51B4A182BF0AE57008C3370 /* PNDecoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNDecoder.h; sourceTree = ""; }; + A51B4A1E2BF0AE79008C3370 /* PNEncoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNEncoder.h; sourceTree = ""; }; + A51B4A242BF0AE92008C3370 /* PNObjectSerializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNObjectSerializer.h; sourceTree = ""; }; + A51B4A2D2BF0AFB8008C3370 /* PNJSONSerialization.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNJSONSerialization.h; sourceTree = ""; }; + A51B4A2E2BF0AFB8008C3370 /* PNJSONSerialization.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNJSONSerialization.m; sourceTree = ""; }; + A51B4A392BF0B097008C3370 /* PNJSONDecoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNJSONDecoder.h; sourceTree = ""; }; + A51B4A3A2BF0B097008C3370 /* PNJSONDecoder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNJSONDecoder.m; sourceTree = ""; }; + A51B4A452BF0B0B0008C3370 /* PNJSONEncoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNJSONEncoder.h; sourceTree = ""; }; + A51B4A462BF0B0B0008C3370 /* PNJSONEncoder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNJSONEncoder.m; sourceTree = ""; }; + A51B4A512BF0B0CB008C3370 /* PNJSONCoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNJSONCoder.h; sourceTree = ""; }; + A51B4A522BF0B0CB008C3370 /* PNJSONCoder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNJSONCoder.m; sourceTree = ""; }; + A51B4A5F2BF0B117008C3370 /* PNJSONCodableObjects.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNJSONCodableObjects.h; sourceTree = ""; }; + A51B4A602BF0B117008C3370 /* PNJSONCodableObjects.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNJSONCodableObjects.m; sourceTree = ""; }; + A51B4A6B2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSNumberFormatter+PNJSONCodable.h"; sourceTree = ""; }; + A51B4A6C2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSNumberFormatter+PNJSONCodable.m"; sourceTree = ""; }; + A51B4A772BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDateFormatter+PNJSONCodable.h"; sourceTree = ""; }; + A51B4A782BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSDateFormatter+PNJSONCodable.m"; sourceTree = ""; }; + A51B4A832BF0B197008C3370 /* PNFunctions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFunctions.h; sourceTree = ""; }; + A51B4A842BF0B197008C3370 /* PNFunctions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFunctions.m; sourceTree = ""; }; + A51B4A8F2BF0B1E3008C3370 /* PNLock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNLock.h; sourceTree = ""; }; + A51B4A902BF0B1E3008C3370 /* PNLock.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNLock.m; sourceTree = ""; }; + A51B4A9B2BF0B428008C3370 /* PNError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNError.h; sourceTree = ""; }; + A51B4A9C2BF0B428008C3370 /* PNError.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNError.m; sourceTree = ""; }; + A51B4AA82BF37F03008C3370 /* PNChannelGroupFetchRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNChannelGroupFetchRequest.h; sourceTree = ""; }; + A51B4AA92BF37F03008C3370 /* PNChannelGroupFetchRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNChannelGroupFetchRequest.m; sourceTree = ""; }; A523692824A2270200656C19 /* PNAES+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNAES+Private.h"; sourceTree = ""; }; + A523EEDF2BFE910A009F45AA /* PNURLSessionTransport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNURLSessionTransport.h; sourceTree = ""; }; + A523EEE02BFE910A009F45AA /* PNURLSessionTransport.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNURLSessionTransport.m; sourceTree = ""; }; A52DC1E42307E10B001F20B0 /* NSDateFormatter+PNCacheable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDateFormatter+PNCacheable.h"; sourceTree = ""; }; A52DC1E52307E10B001F20B0 /* NSDateFormatter+PNCacheable.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSDateFormatter+PNCacheable.m"; sourceTree = ""; }; + A53248A72C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNPresenceLeaveRequest+Private.h"; sourceTree = ""; }; + A53248AD2C24D987003510FF /* PNJSONDecoder+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNJSONDecoder+Private.h"; sourceTree = ""; }; + A53248B32C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNSubscribeMessageEventData+Private.h"; sourceTree = ""; }; + A53248B92C24E3D4003510FF /* PNSubscribeFileEventData+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNSubscribeFileEventData+Private.h"; sourceTree = ""; }; + A53248BF2C25B7BB003510FF /* PNSubscribeStatus+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNSubscribeStatus+Private.h"; sourceTree = ""; }; + A53248C52C28A3B4003510FF /* PNHistoryMessagesDeleteRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNHistoryMessagesDeleteRequest.h; sourceTree = ""; }; + A53248CB2C28A426003510FF /* PNHistoryMessagesCountRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNHistoryMessagesCountRequest.m; sourceTree = ""; }; + A53248D12C28D211003510FF /* PNHistoryMessageCountData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNHistoryMessageCountData.m; sourceTree = ""; }; + A53248D72C28D3BB003510FF /* PNMembershipsFetchData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNMembershipsFetchData.m; sourceTree = ""; }; + A53248DD2C28E3AB003510FF /* PNXMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNXMLParser.h; sourceTree = ""; }; + A53248DE2C28E3AB003510FF /* PNXMLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNXMLParser.m; sourceTree = ""; }; + A53248F62C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "PNRemoveMessageActionRequest+Private.h"; path = "Message/PNRemoveMessageActionRequest+Private.h"; sourceTree = ""; }; + A53248FC2C2AC5C1003510FF /* PNChannelGroupsResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNChannelGroupsResult.h; sourceTree = ""; }; + A53248FD2C2AC5C1003510FF /* PNChannelGroupsResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNChannelGroupsResult.m; sourceTree = ""; }; + A53249082C2C7262003510FF /* PNHistoryFetchRequest+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNHistoryFetchRequest+Private.h"; sourceTree = ""; }; + A5567E2F2C1EB4ED003C974F /* PNTimeRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNTimeRequest.h; sourceTree = ""; }; + A5567E302C1EB4ED003C974F /* PNTimeRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNTimeRequest.m; sourceTree = ""; }; + A5567E3D2C1ECC59003C974F /* PNPresenceStateFetchResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPresenceStateFetchResult.h; sourceTree = ""; }; + A5567E3E2C1ECC59003C974F /* PNPresenceStateFetchResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPresenceStateFetchResult.m; sourceTree = ""; }; + A5567E492C1EDB02003C974F /* PNPushNotificationFetchRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNPushNotificationFetchRequest.m; sourceTree = ""; }; + A5567E502C1F0484003C974F /* PNSignalRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSignalRequest.h; sourceTree = ""; }; + A5567E512C1F0484003C974F /* PNSignalRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSignalRequest.m; sourceTree = ""; }; + A5567E5C2C1F8C53003C974F /* PNOperationDataParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNOperationDataParser.h; sourceTree = ""; }; + A5567E5D2C1F8C53003C974F /* PNOperationDataParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNOperationDataParser.m; sourceTree = ""; }; + A5567E682C1FBE44003C974F /* PubNub+Deprecated.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PubNub+Deprecated.h"; sourceTree = ""; }; + A5567E692C1FBE44003C974F /* PubNub+Deprecated.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "PubNub+Deprecated.m"; sourceTree = ""; }; + A5567E752C1FCADC003C974F /* PNPushNotificationFetchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPushNotificationFetchData.h; sourceTree = ""; }; + A5567E762C1FCADC003C974F /* PNPushNotificationFetchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPushNotificationFetchData.m; sourceTree = ""; }; + A5567E812C1FCF0F003C974F /* PNChannelGroupFetchData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNChannelGroupFetchData.m; sourceTree = ""; }; + A5567E822C1FCF0F003C974F /* PNChannelGroupFetchData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNChannelGroupFetchData.h; sourceTree = ""; }; + A5567E8D2C1FDEF7003C974F /* PNMessageActionsFetchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNMessageActionsFetchData.h; sourceTree = ""; }; + A5567E8E2C1FDEF7003C974F /* PNMessageActionsFetchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNMessageActionsFetchData.m; sourceTree = ""; }; + A5567E992C20243C003C974F /* PNMessageActionFetchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNMessageActionFetchData.h; sourceTree = ""; }; + A5567E9A2C20243C003C974F /* PNMessageActionFetchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNMessageActionFetchData.m; sourceTree = ""; }; + A5567EA62C20371C003C974F /* PNPresenceHereNowFetchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPresenceHereNowFetchData.h; sourceTree = ""; }; + A5567EA72C20371C003C974F /* PNPresenceHereNowFetchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPresenceHereNowFetchData.m; sourceTree = ""; }; + A5567EB42C2077AE003C974F /* PNSubscribeData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSubscribeData.h; sourceTree = ""; }; + A5567EB52C2077AE003C974F /* PNSubscribeData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSubscribeData.m; sourceTree = ""; }; + A5567EC02C207800003C974F /* PNSubscribeCursorData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSubscribeCursorData.h; sourceTree = ""; }; + A5567EC12C207800003C974F /* PNSubscribeCursorData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSubscribeCursorData.m; sourceTree = ""; }; + A5567ECC2C208652003C974F /* PNSubscribeEventData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSubscribeEventData.h; sourceTree = ""; }; + A5567ECD2C208652003C974F /* PNSubscribeEventData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSubscribeEventData.m; sourceTree = ""; }; + A5567ED82C209FF7003C974F /* PNPresenceWhereNowFetchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPresenceWhereNowFetchData.h; sourceTree = ""; }; + A5567ED92C209FF7003C974F /* PNPresenceWhereNowFetchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPresenceWhereNowFetchData.m; sourceTree = ""; }; + A5567EE42C20A51A003C974F /* PNPresenceHeartbeatRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPresenceHeartbeatRequest.h; sourceTree = ""; }; + A5567EE52C20A51A003C974F /* PNPresenceHeartbeatRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPresenceHeartbeatRequest.m; sourceTree = ""; }; + A5567EF02C20D3DE003C974F /* PNPresenceHereNowFetchData+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNPresenceHereNowFetchData+Private.h"; sourceTree = ""; }; + A5567EF62C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNPresenceGlobalHereNowResult+Private.h"; sourceTree = ""; }; + A5567EFC2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNPresenceChannelHereNowResult+Private.h"; sourceTree = ""; }; + A5567F082C219757003C974F /* PNBaseAppContextObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNBaseAppContextObject.h; sourceTree = ""; }; + A5567F092C219757003C974F /* PNBaseAppContextObject.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNBaseAppContextObject.m; sourceTree = ""; }; + A5567F142C219B9A003C974F /* PNBaseAppContextObject+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNBaseAppContextObject+Private.h"; sourceTree = ""; }; + A5567F1B2C21D53D003C974F /* PNChannelMembersManageData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNChannelMembersManageData.h; sourceTree = ""; }; + A5567F1C2C21D53D003C974F /* PNChannelMembersManageData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNChannelMembersManageData.m; sourceTree = ""; }; + A5567F272C21DB10003C974F /* PNMembershipsManageData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNMembershipsManageData.h; sourceTree = ""; }; + A5567F282C21DB10003C974F /* PNMembershipsManageData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNMembershipsManageData.m; sourceTree = ""; }; + A5567F332C21E4DF003C974F /* PNUUIDMetadataSetData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNUUIDMetadataSetData.h; sourceTree = ""; }; + A5567F342C21E4DF003C974F /* PNUUIDMetadataSetData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNUUIDMetadataSetData.m; sourceTree = ""; }; + A5567F3F2C21E723003C974F /* PNChannelMembersFetchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNChannelMembersFetchData.h; sourceTree = ""; }; + A5567F402C21E723003C974F /* PNChannelMembersFetchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNChannelMembersFetchData.m; sourceTree = ""; }; + A5567F4B2C21E965003C974F /* PNMembershipsFetchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNMembershipsFetchData.h; sourceTree = ""; }; + A5567F572C21EBDF003C974F /* PNPagedAppContextData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPagedAppContextData.h; sourceTree = ""; }; + A5567F582C21EBDF003C974F /* PNPagedAppContextData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPagedAppContextData.m; sourceTree = ""; }; + A5567F632C21ECBE003C974F /* PNPagedAppContextData+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNPagedAppContextData+Private.h"; sourceTree = ""; }; + A5567F692C21F0EA003C974F /* PNUUIDMetadataFetchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNUUIDMetadataFetchData.h; sourceTree = ""; }; + A5567F6A2C21F0EA003C974F /* PNUUIDMetadataFetchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNUUIDMetadataFetchData.m; sourceTree = ""; }; + A5567F752C21F203003C974F /* PNUUIDMetadataFetchAllData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNUUIDMetadataFetchAllData.h; sourceTree = ""; }; + A5567F762C21F203003C974F /* PNUUIDMetadataFetchAllData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNUUIDMetadataFetchAllData.m; sourceTree = ""; }; + A5567F812C21F31E003C974F /* PNChannelMetadataFetchAllData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNChannelMetadataFetchAllData.h; sourceTree = ""; }; + A5567F822C21F31E003C974F /* PNChannelMetadataFetchAllData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNChannelMetadataFetchAllData.m; sourceTree = ""; }; + A5567F952C220E32003C974F /* PNFetchMembershipsResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNFetchMembershipsResult.h; sourceTree = ""; }; + A5567F962C220E32003C974F /* PNFetchMembershipsResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNFetchMembershipsResult.m; sourceTree = ""; }; + A5567FA52C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PNPresenceChannelGroupHereNowResult+Private.h"; sourceTree = ""; }; + A5567FAF2C22107D003C974F /* PNClientStateUpdateStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNClientStateUpdateStatus.m; sourceTree = ""; }; + A5567FB52C221136003C974F /* PNChannelMetadataFetchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNChannelMetadataFetchData.h; sourceTree = ""; }; + A5567FB62C221136003C974F /* PNChannelMetadataFetchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNChannelMetadataFetchData.m; sourceTree = ""; }; + A5567FC12C221230003C974F /* PNChannelMetadataSetData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNChannelMetadataSetData.h; sourceTree = ""; }; + A5567FC22C221230003C974F /* PNChannelMetadataSetData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNChannelMetadataSetData.m; sourceTree = ""; }; + A5567FCD2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNFetchAllChannelsMetadataResult.m; sourceTree = ""; }; + A5567FCE2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNFetchAllChannelsMetadataResult.h; sourceTree = ""; }; + A5567FD92C221A20003C974F /* PNFetchAllUUIDMetadataResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNFetchAllUUIDMetadataResult.h; sourceTree = ""; }; + A5567FDA2C221A20003C974F /* PNFetchAllUUIDMetadataResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNFetchAllUUIDMetadataResult.m; sourceTree = ""; }; + A5567FE52C222F1B003C974F /* PNHistoryMessageCountData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNHistoryMessageCountData.h; sourceTree = ""; }; + A5567FF12C2242B1003C974F /* PNHistoryFetchData+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNHistoryFetchData+Private.h"; sourceTree = ""; }; + A5567FF72C225146003C974F /* PNPresenceUserStateFetchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPresenceUserStateFetchData.h; sourceTree = ""; }; + A5567FF82C225146003C974F /* PNPresenceUserStateFetchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPresenceUserStateFetchData.m; sourceTree = ""; }; + A55680032C225579003C974F /* PNPresenceUserStateFetchData+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNPresenceUserStateFetchData+Private.h"; sourceTree = ""; }; + A55680092C22603F003C974F /* PNClientStateGetResult+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNClientStateGetResult+Private.h"; sourceTree = ""; }; + A556800F2C226378003C974F /* PNChannelGroupClientStateResult+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNChannelGroupClientStateResult+Private.h"; sourceTree = ""; }; + A55680152C226632003C974F /* PNChannelClientStateResult+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNChannelClientStateResult+Private.h"; sourceTree = ""; }; + A556801B2C226866003C974F /* PNPresenceUserStateSetData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPresenceUserStateSetData.h; sourceTree = ""; }; + A556801C2C226866003C974F /* PNPresenceUserStateSetData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPresenceUserStateSetData.m; sourceTree = ""; }; + A55680272C2294ED003C974F /* PNGenerateFileUploadURLStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNGenerateFileUploadURLStatus.h; sourceTree = ""; }; + A55680282C2294ED003C974F /* PNGenerateFileUploadURLStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNGenerateFileUploadURLStatus.m; sourceTree = ""; }; + A55680332C229587003C974F /* PNFileGenerateUploadURLData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFileGenerateUploadURLData.h; sourceTree = ""; }; + A55680342C229587003C974F /* PNFileGenerateUploadURLData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFileGenerateUploadURLData.m; sourceTree = ""; }; + A556803F2C229D8D003C974F /* PNFileSendData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFileSendData.h; sourceTree = ""; }; + A55680402C229D8D003C974F /* PNFileSendData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFileSendData.m; sourceTree = ""; }; + A556804B2C22BA84003C974F /* PNFileSendData+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNFileSendData+Private.h"; sourceTree = ""; }; + A55680512C22BE6D003C974F /* PNFileUploadRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFileUploadRequest.h; sourceTree = ""; }; + A55680522C22BE6D003C974F /* PNFileUploadRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFileUploadRequest.m; sourceTree = ""; }; + A55680632C2311CF003C974F /* PNGenerateFileDownloadURLRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNGenerateFileDownloadURLRequest.h; sourceTree = ""; }; + A55680642C2311CF003C974F /* PNGenerateFileDownloadURLRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNGenerateFileDownloadURLRequest.m; sourceTree = ""; }; + A556806F2C2344A9003C974F /* PNFileListFetchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFileListFetchData.h; sourceTree = ""; }; + A55680702C2344A9003C974F /* PNFileListFetchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFileListFetchData.m; sourceTree = ""; }; + A556807B2C234B4D003C974F /* PNFileListFetchData+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNFileListFetchData+Private.h"; sourceTree = ""; }; + A55680812C23527D003C974F /* PNFileDownloadData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFileDownloadData.h; sourceTree = ""; }; + A55680822C23527D003C974F /* PNFileDownloadData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFileDownloadData.m; sourceTree = ""; }; + A556808D2C235360003C974F /* PNFileDownloadData+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNFileDownloadData+Private.h"; sourceTree = ""; }; + A55680932C237BC1003C974F /* PNSubscribeEventData+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNSubscribeEventData+Private.h"; sourceTree = ""; }; + A55680992C2385BC003C974F /* PNSubscribeMessageEventData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSubscribeMessageEventData.h; sourceTree = ""; }; + A556809A2C2385BC003C974F /* PNSubscribeMessageEventData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSubscribeMessageEventData.m; sourceTree = ""; }; + A55680A52C23880C003C974F /* PNSubscribeMessageActionEventData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSubscribeMessageActionEventData.h; sourceTree = ""; }; + A55680A62C23880C003C974F /* PNSubscribeMessageActionEventData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSubscribeMessageActionEventData.m; sourceTree = ""; }; + A55680B12C238EEB003C974F /* PNSubscribeObjectEventData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSubscribeObjectEventData.h; sourceTree = ""; }; + A55680B22C238EEB003C974F /* PNSubscribeObjectEventData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSubscribeObjectEventData.m; sourceTree = ""; }; + A55680BD2C23A8CD003C974F /* PNSubscribeSignalEventData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSubscribeSignalEventData.h; sourceTree = ""; }; + A55680BE2C23A8CD003C974F /* PNSubscribeSignalEventData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSubscribeSignalEventData.m; sourceTree = ""; }; + A55680C92C2400B3003C974F /* PNSubscribePresenceEventData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSubscribePresenceEventData.h; sourceTree = ""; }; + A55680CA2C2400B3003C974F /* PNSubscribePresenceEventData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSubscribePresenceEventData.m; sourceTree = ""; }; + A55680D52C2428E8003C974F /* PNSubscribeFileEventData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSubscribeFileEventData.h; sourceTree = ""; }; + A55680D62C2428E8003C974F /* PNSubscribeFileEventData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSubscribeFileEventData.m; sourceTree = ""; }; + A55680E12C242BFF003C974F /* PNMessageResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNMessageResult.h; sourceTree = ""; }; + A55680E22C242BFF003C974F /* PNMessageResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNMessageResult.m; sourceTree = ""; }; + A55680ED2C242D11003C974F /* PNSignalResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSignalResult.h; sourceTree = ""; }; + A55680EE2C242D11003C974F /* PNSignalResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSignalResult.m; sourceTree = ""; }; + A55680F92C242D7C003C974F /* PNMessageActionResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNMessageActionResult.h; sourceTree = ""; }; + A55680FA2C242D7C003C974F /* PNMessageActionResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNMessageActionResult.m; sourceTree = ""; }; + A55681052C242E09003C974F /* PNObjectEventResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNObjectEventResult.h; sourceTree = ""; }; + A55681062C242E09003C974F /* PNObjectEventResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNObjectEventResult.m; sourceTree = ""; }; + A55681112C242E96003C974F /* PNFileEventResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFileEventResult.h; sourceTree = ""; }; + A55681122C242E96003C974F /* PNFileEventResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFileEventResult.m; sourceTree = ""; }; + A556811D2C242EE6003C974F /* PNPresenceEventResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPresenceEventResult.h; sourceTree = ""; }; + A556811E2C242EE6003C974F /* PNPresenceEventResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPresenceEventResult.m; sourceTree = ""; }; + A55681292C2435A5003C974F /* PNSubscribeRequest+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNSubscribeRequest+Private.h"; sourceTree = ""; }; A55A85CF22FD8077002D0A72 /* PubNub+Objects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PubNub+Objects.h"; sourceTree = ""; }; A55A85D022FD8077002D0A72 /* PubNub+Objects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "PubNub+Objects.m"; sourceTree = ""; }; A55A85E322FD80B9002D0A72 /* PNFetchUUIDMetadataAPICallBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNFetchUUIDMetadataAPICallBuilder.m; sourceTree = ""; }; @@ -3054,22 +3733,17 @@ A55A85F822FD80B9002D0A72 /* PNFetchAllChannelsMetadataAPICallBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNFetchAllChannelsMetadataAPICallBuilder.m; sourceTree = ""; }; A55A85F922FD80B9002D0A72 /* PNRemoveChannelMetadataAPICallBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNRemoveChannelMetadataAPICallBuilder.h; sourceTree = ""; }; A55A86A422FD817E002D0A72 /* PNUUIDMetadata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNUUIDMetadata.m; sourceTree = ""; }; - A55A86A522FD817E002D0A72 /* PNChannelMetadata+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PNChannelMetadata+Private.h"; sourceTree = ""; }; A55A86A622FD817E002D0A72 /* PNChannelMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNChannelMetadata.h; sourceTree = ""; }; - A55A86A722FD817E002D0A72 /* PNUUIDMetadata+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PNUUIDMetadata+Private.h"; sourceTree = ""; }; A55A86A822FD817E002D0A72 /* PNUUIDMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNUUIDMetadata.h; sourceTree = ""; }; A55A86A922FD817E002D0A72 /* PNChannelMetadata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNChannelMetadata.m; sourceTree = ""; }; A55A86D422FD81E1002D0A72 /* PNFetchUUIDMetadataResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNFetchUUIDMetadataResult.h; sourceTree = ""; }; A55A86D522FD81E2002D0A72 /* PNFetchUUIDMetadataResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNFetchUUIDMetadataResult.m; sourceTree = ""; }; - A55A86D722FD81E2002D0A72 /* PNFetchChannelsMetadataResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNFetchChannelsMetadataResult.m; sourceTree = ""; }; + A55A86D722FD81E2002D0A72 /* PNFetchChannelMetadataResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNFetchChannelMetadataResult.m; sourceTree = ""; }; A55A86D922FD81E2002D0A72 /* PNSetUUIDMetadataStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNSetUUIDMetadataStatus.h; sourceTree = ""; }; A55A86DA22FD81E2002D0A72 /* PNSetUUIDMetadataStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNSetUUIDMetadataStatus.m; sourceTree = ""; }; A55A86DD22FD81E2002D0A72 /* PNSetChannelMetadataStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNSetChannelMetadataStatus.h; sourceTree = ""; }; - A55A86DE22FD81E2002D0A72 /* PNFetchChannelsMetadataResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNFetchChannelsMetadataResult.h; sourceTree = ""; }; + A55A86DE22FD81E2002D0A72 /* PNFetchChannelMetadataResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNFetchChannelMetadataResult.h; sourceTree = ""; }; A55A86DF22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNSetChannelMetadataStatus.m; sourceTree = ""; }; - A55A873522FD825A002D0A72 /* PNUUIDMetadataChangeParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNUUIDMetadataChangeParser.m; sourceTree = ""; }; - A55A873622FD825A002D0A72 /* PNUUIDMetadataChangeParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNUUIDMetadataChangeParser.h; sourceTree = ""; }; - A55A874622FD8272002D0A72 /* PNRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNRequest.m; sourceTree = ""; }; A55A874822FD8272002D0A72 /* PNObjectsPaginatedRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNObjectsPaginatedRequest.h; sourceTree = ""; }; A55A874A22FD8272002D0A72 /* PNFetchUUIDMetadataRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNFetchUUIDMetadataRequest.m; sourceTree = ""; }; A55A874B22FD8272002D0A72 /* PNSetUUIDMetadataRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNSetUUIDMetadataRequest.h; sourceTree = ""; }; @@ -3098,8 +3772,6 @@ A55A876E22FD8272002D0A72 /* PNFetchChannelMembersRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNFetchChannelMembersRequest.m; sourceTree = ""; }; A55A876F22FD8272002D0A72 /* PNManageChannelMembersRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNManageChannelMembersRequest.h; sourceTree = ""; }; A55A877022FD8272002D0A72 /* PNObjectsPaginatedRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNObjectsPaginatedRequest.m; sourceTree = ""; }; - A55A877122FD8272002D0A72 /* PNRequest+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PNRequest+Private.h"; sourceTree = ""; }; - A55A877222FD8272002D0A72 /* PNRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNRequest.h; sourceTree = ""; }; A55BCCA02319243F0019DB68 /* PNAddMessageActionStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNAddMessageActionStatus.h; sourceTree = ""; }; A55BCCA12319243F0019DB68 /* PNAddMessageActionStatus.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNAddMessageActionStatus.m; sourceTree = ""; }; A55BCCE4231D21840019DB68 /* PNAddMessageActionAPICallBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNAddMessageActionAPICallBuilder.h; sourceTree = ""; }; @@ -3110,47 +3782,20 @@ A55BCD05231D22400019DB68 /* PNFetchMessagesActionsAPICallBuilder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFetchMessagesActionsAPICallBuilder.m; sourceTree = ""; }; A55BCD14231D26110019DB68 /* PNMessageAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNMessageAction.h; sourceTree = ""; }; A55BCD15231D26110019DB68 /* PNMessageAction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNMessageAction.m; sourceTree = ""; }; - A55BCD24231D27F00019DB68 /* PNMessageAction+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNMessageAction+Private.h"; sourceTree = ""; }; - A55CA69C2397389100B24E02 /* PNKeychain+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNKeychain+Private.h"; sourceTree = ""; }; - A55DAEEE24B1FE7600766EE9 /* PNXMLParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNXMLParser.h; sourceTree = ""; }; - A55DAEEF24B1FE7600766EE9 /* PNXMLParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNXMLParser.m; sourceTree = ""; }; A55DAEFA24B1FE9E00766EE9 /* PNXML.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNXML.h; sourceTree = ""; }; A55DAEFB24B1FE9E00766EE9 /* PNXML.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNXML.m; sourceTree = ""; }; A55DAF0624B1FEC800766EE9 /* PNXML+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNXML+Private.h"; sourceTree = ""; }; - A568655F2300622C0014E17C /* PNChannelMember+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNChannelMember+Private.h"; sourceTree = ""; }; - A56865672300709F0014E17C /* PNFetchMembershipsResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFetchMembershipsResult.h; sourceTree = ""; }; - A56865682300709F0014E17C /* PNFetchMembershipsResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFetchMembershipsResult.m; sourceTree = ""; }; A5686577230072810014E17C /* PNManageChannelMembersStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNManageChannelMembersStatus.h; sourceTree = ""; }; A5686578230072810014E17C /* PNManageChannelMembersStatus.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNManageChannelMembersStatus.m; sourceTree = ""; }; A56865872300729E0014E17C /* PNFetchChannelMembersResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFetchChannelMembersResult.h; sourceTree = ""; }; A56865882300729E0014E17C /* PNFetchChannelMembersResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFetchChannelMembersResult.m; sourceTree = ""; }; - A5686597230170690014E17C /* PNFetchUUIDMetadataParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFetchUUIDMetadataParser.h; sourceTree = ""; }; - A5686598230170690014E17C /* PNFetchUUIDMetadataParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFetchUUIDMetadataParser.m; sourceTree = ""; }; - A56865A7230172950014E17C /* PNFetchChannelsMetadataParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNFetchChannelsMetadataParser.h; sourceTree = ""; }; - A56865A8230172950014E17C /* PNFetchChannelsMetadataParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNFetchChannelsMetadataParser.m; sourceTree = ""; }; - A56865B7230173030014E17C /* PNChannelMetadataChangeParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNChannelMetadataChangeParser.h; sourceTree = ""; }; - A56865B8230173030014E17C /* PNChannelMetadataChangeParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNChannelMetadataChangeParser.m; sourceTree = ""; }; - A56865C7230173AA0014E17C /* PNObjectsRemoveParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNObjectsRemoveParser.h; sourceTree = ""; }; - A56865C8230173AA0014E17C /* PNObjectsRemoveParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNObjectsRemoveParser.m; sourceTree = ""; }; - A56865D7230175EC0014E17C /* PNMembershipsParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNMembershipsParser.h; sourceTree = ""; }; - A56865D8230175EC0014E17C /* PNMembershipsParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNMembershipsParser.m; sourceTree = ""; }; - A56865E7230176760014E17C /* PNChannelMembersParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNChannelMembersParser.h; sourceTree = ""; }; - A56865E8230176760014E17C /* PNChannelMembersParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNChannelMembersParser.m; sourceTree = ""; }; A56BBFBA2AB63F8F00260D83 /* PNCryptoProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNCryptoProvider.h; sourceTree = ""; }; A56BBFC02AB900B600260D83 /* NSInputStream+PNURL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSInputStream+PNURL.h"; sourceTree = ""; }; A56BBFC12AB900B600260D83 /* NSInputStream+PNURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSInputStream+PNURL.m"; sourceTree = ""; }; A56FAEF0233161560072ADD6 /* PubNub+MessageActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PubNub+MessageActions.h"; sourceTree = ""; }; A56FAEF1233161570072ADD6 /* PubNub+MessageActions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "PubNub+MessageActions.m"; sourceTree = ""; }; A57A2FF22389FA8700DE8C68 /* build_xcframework.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build_xcframework.sh; sourceTree = ""; }; - A57A3003238D59B500DE8C68 /* PNAddPushNotificationsRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNAddPushNotificationsRequest.h; sourceTree = ""; }; - A57A3004238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNRemoveAllPushNotificationsRequest.m; sourceTree = ""; }; - A57A3005238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNAuditPushNotificationsRequest.h; sourceTree = ""; }; - A57A3006238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNRemovePushNotificationsRequest.h; sourceTree = ""; }; A57A3007238D59B500DE8C68 /* PNBasePushNotificationsRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNBasePushNotificationsRequest.m; sourceTree = ""; }; - A57A3008238D59B500DE8C68 /* PNAddPushNotificationsRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNAddPushNotificationsRequest.m; sourceTree = ""; }; - A57A3009238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNRemoveAllPushNotificationsRequest.h; sourceTree = ""; }; - A57A300A238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNRemovePushNotificationsRequest.m; sourceTree = ""; }; - A57A300B238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNAuditPushNotificationsRequest.m; sourceTree = ""; }; A57A300C238D59B500DE8C68 /* PNBasePushNotificationsRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNBasePushNotificationsRequest.h; sourceTree = ""; }; A57A3057238D65A200DE8C68 /* PNNotificationsPayload.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNNotificationsPayload.h; sourceTree = ""; }; A57A3058238D65A200DE8C68 /* PNNotificationsPayload.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNNotificationsPayload.m; sourceTree = ""; }; @@ -3187,7 +3832,6 @@ A58975C123005BD80093BD9A /* PNMembership.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNMembership.m; sourceTree = ""; }; A58975D023005BE60093BD9A /* PNChannelMember.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNChannelMember.h; sourceTree = ""; }; A58975D123005BE60093BD9A /* PNChannelMember.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNChannelMember.m; sourceTree = ""; }; - A58975E023005CFB0093BD9A /* PNMembership+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNMembership+Private.h"; sourceTree = ""; }; A5A45178246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNBaseObjectsMembershipRequest.h; sourceTree = ""; }; A5A45179246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNBaseObjectsMembershipRequest.m; sourceTree = ""; }; A5A45184246D8CD5008ECC74 /* PNBaseObjectsMembershipRequest+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNBaseObjectsMembershipRequest+Private.h"; sourceTree = ""; }; @@ -3199,12 +3843,6 @@ A5A451D1246F2679008ECC74 /* PNRemoveChannelMembersAPICallBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNRemoveChannelMembersAPICallBuilder.h; sourceTree = ""; }; A5A451F3246F268B008ECC74 /* PNRemoveMembershipsAPICallBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNRemoveMembershipsAPICallBuilder.h; sourceTree = ""; }; A5A451F5246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNRemoveMembershipsAPICallBuilder.m; sourceTree = ""; }; - A5A7AFC0234932F30060113B /* PNFetchMessagesActionsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNFetchMessagesActionsParser.m; sourceTree = ""; }; - A5A7AFC1234932F30060113B /* PNFetchMessagesActionsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNFetchMessagesActionsParser.h; sourceTree = ""; }; - A5A7AFC2234932F30060113B /* PNAddMessageActionParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNAddMessageActionParser.h; sourceTree = ""; }; - A5A7AFC3234932F30060113B /* PNAddMessageActionParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNAddMessageActionParser.m; sourceTree = ""; }; - A5A7AFC4234932F30060113B /* PNRemoveMessageActionParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNRemoveMessageActionParser.h; sourceTree = ""; }; - A5A7AFC5234932F30060113B /* PNRemoveMessageActionParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PNRemoveMessageActionParser.m; sourceTree = ""; }; A5A7AFF02349330E0060113B /* PNFetchMessageActionsRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PNFetchMessageActionsRequest.h; path = Message/PNFetchMessageActionsRequest.h; sourceTree = ""; }; A5A7AFF12349330E0060113B /* PNBaseMessageActionRequest+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "PNBaseMessageActionRequest+Private.h"; path = "Message/PNBaseMessageActionRequest+Private.h"; sourceTree = ""; }; A5A7AFF22349330E0060113B /* PNBaseMessageActionRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PNBaseMessageActionRequest.m; path = Message/PNBaseMessageActionRequest.m; sourceTree = ""; }; @@ -3216,6 +3854,64 @@ A5A7AFF82349330F0060113B /* PNBaseMessageActionRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PNBaseMessageActionRequest.h; path = Message/PNBaseMessageActionRequest.h; sourceTree = ""; }; A5ADD6242AC0CE8100310A08 /* NSInputStream+PNCrypto.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSInputStream+PNCrypto.h"; sourceTree = ""; }; A5ADD6252AC0CE8100310A08 /* NSInputStream+PNCrypto.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSInputStream+PNCrypto.m"; sourceTree = ""; }; + A5CB33A82C035D7D008527AA /* PNTransportRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNTransportRequest.h; sourceTree = ""; }; + A5CB33A92C035D7D008527AA /* PNTransportRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNTransportRequest.m; sourceTree = ""; }; + A5CB33C02C0371E6008527AA /* PNTransportRequest+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNTransportRequest+Private.h"; sourceTree = ""; }; + A5CB33C62C046A1A008527AA /* PNTransportConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNTransportConfiguration.h; sourceTree = ""; }; + A5CB33C72C046A1A008527AA /* PNTransportConfiguration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNTransportConfiguration.m; sourceTree = ""; }; + A5CB33D32C0C70B2008527AA /* PNTransportMiddleware.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNTransportMiddleware.h; sourceTree = ""; }; + A5CB33D42C0C70B2008527AA /* PNTransportMiddleware.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNTransportMiddleware.m; sourceTree = ""; }; + A5CB33DF2C0C7237008527AA /* PNTransportMiddlewareConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNTransportMiddlewareConfiguration.h; sourceTree = ""; }; + A5CB33E02C0C7237008527AA /* PNTransportMiddlewareConfiguration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNTransportMiddlewareConfiguration.m; sourceTree = ""; }; + A5CB33EB2C0C7E94008527AA /* PNTransportConfiguration+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNTransportConfiguration+Private.h"; sourceTree = ""; }; + A5CCEC4D2C0E006000DB02A4 /* PNURLSessionTransportResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNURLSessionTransportResponse.h; sourceTree = ""; }; + A5CCEC4E2C0E006000DB02A4 /* PNURLSessionTransportResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNURLSessionTransportResponse.m; sourceTree = ""; }; + A5CCEC592C0E816A00DB02A4 /* PNRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNRequest.h; sourceTree = ""; }; + A5CCEC5A2C0E816A00DB02A4 /* PNTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNTransport.h; sourceTree = ""; }; + A5CCEC5B2C0E816A00DB02A4 /* PNTransportResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNTransportResponse.h; sourceTree = ""; }; + A5CFE40C2C0F246400274165 /* PNBaseRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNBaseRequest.h; sourceTree = ""; }; + A5CFE40D2C0F246400274165 /* PNBaseRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNBaseRequest.m; sourceTree = ""; }; + A5CFE4182C1076A700274165 /* PNBaseRequest+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNBaseRequest+Private.h"; sourceTree = ""; }; + A5CFE43D2C11E8D500274165 /* PNChannelGroupManageRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNChannelGroupManageRequest.h; sourceTree = ""; }; + A5CFE43E2C11E8D500274165 /* PNChannelGroupManageRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNChannelGroupManageRequest.m; sourceTree = ""; }; + A5CFE45B2C123F2E00274165 /* PNBaseOperationData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNBaseOperationData.h; sourceTree = ""; }; + A5CFE45C2C123F2E00274165 /* PNBaseOperationData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNBaseOperationData.m; sourceTree = ""; }; + A5CFE46E2C14A90900274165 /* NSError+PNTransport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSError+PNTransport.h"; sourceTree = ""; }; + A5CFE46F2C14A90900274165 /* NSError+PNTransport.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSError+PNTransport.m"; sourceTree = ""; }; + A5CFE4B82C1647B000274165 /* PNPublishData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPublishData.h; sourceTree = ""; }; + A5CFE4B92C1647B000274165 /* PNPublishData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPublishData.m; sourceTree = ""; }; + A5CFE4D62C16500F00274165 /* PNSignalData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSignalData.h; sourceTree = ""; }; + A5CFE4D72C16500F00274165 /* PNSignalData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSignalData.m; sourceTree = ""; }; + A5CFE4EF2C16528700274165 /* PNTimeData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNTimeData.h; sourceTree = ""; }; + A5CFE4F02C16528700274165 /* PNTimeData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNTimeData.m; sourceTree = ""; }; + A5CFE5032C1658E700274165 /* PNHistoryFetchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNHistoryFetchData.h; sourceTree = ""; }; + A5CFE5042C1658E700274165 /* PNHistoryFetchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNHistoryFetchData.m; sourceTree = ""; }; + A5CFE50F2C1892AD00274165 /* PNPushNotificationManageRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPushNotificationManageRequest.h; sourceTree = ""; }; + A5CFE5102C1892AD00274165 /* PNPushNotificationManageRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPushNotificationManageRequest.m; sourceTree = ""; }; + A5CFE51B2C18969900274165 /* PNBasePushNotificationsRequest+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNBasePushNotificationsRequest+Private.h"; sourceTree = ""; }; + A5CFE5272C18C9D400274165 /* PNPushNotificationFetchRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNPushNotificationFetchRequest.h; sourceTree = ""; }; + A5CFE52E2C18D33500274165 /* PNHereNowRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNHereNowRequest.h; sourceTree = ""; }; + A5CFE52F2C18D33500274165 /* PNHereNowRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNHereNowRequest.m; sourceTree = ""; }; + A5CFE53A2C18D38600274165 /* PNWhereNowRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNWhereNowRequest.h; sourceTree = ""; }; + A5CFE53B2C18D38600274165 /* PNWhereNowRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNWhereNowRequest.m; sourceTree = ""; }; + A5CFE5462C18D3A700274165 /* PNPresenceStateSetRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPresenceStateSetRequest.h; sourceTree = ""; }; + A5CFE5472C18D3A700274165 /* PNPresenceStateSetRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPresenceStateSetRequest.m; sourceTree = ""; }; + A5CFE5522C18D3B600274165 /* PNPresenceStateFetchRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPresenceStateFetchRequest.h; sourceTree = ""; }; + A5CFE5532C18D3B600274165 /* PNPresenceStateFetchRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPresenceStateFetchRequest.m; sourceTree = ""; }; + A5CFE55E2C18E9C600274165 /* PNPresenceHereNowResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPresenceHereNowResult.h; sourceTree = ""; }; + A5CFE55F2C18E9C600274165 /* PNPresenceHereNowResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPresenceHereNowResult.m; sourceTree = ""; }; + A5CFE56B2C19066C00274165 /* PNHistoryFetchRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNHistoryFetchRequest.h; sourceTree = ""; }; + A5CFE56C2C19066C00274165 /* PNHistoryFetchRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNHistoryFetchRequest.m; sourceTree = ""; }; + A5CFE5782C191B8100274165 /* PNHistoryMessagesDeleteRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNHistoryMessagesDeleteRequest.m; sourceTree = ""; }; + A5CFE5832C19203700274165 /* PNHistoryMessagesCountRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNHistoryMessagesCountRequest.h; sourceTree = ""; }; + A5CFE5902C192ECA00274165 /* PNSubscribeRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSubscribeRequest.h; sourceTree = ""; }; + A5CFE5912C192ECA00274165 /* PNSubscribeRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSubscribeRequest.m; sourceTree = ""; }; + A5CFE59C2C1933BD00274165 /* PNPresenceLeaveRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNPresenceLeaveRequest.h; sourceTree = ""; }; + A5CFE59D2C1933BD00274165 /* PNPresenceLeaveRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNPresenceLeaveRequest.m; sourceTree = ""; }; + A5CFE5BB2C1AAAAC00274165 /* PNErrorData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNErrorData.h; sourceTree = ""; }; + A5CFE5BC2C1AAAAC00274165 /* PNErrorData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNErrorData.m; sourceTree = ""; }; + A5CFE5C72C1AE33500274165 /* PNBaseOperationData+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNBaseOperationData+Private.h"; sourceTree = ""; }; + A5CFE5CD2C1AFF9100274165 /* PNErrorData+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PNErrorData+Private.h"; sourceTree = ""; }; A5DB70922AAE778F005B6559 /* PNSequenceInputStream.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PNSequenceInputStream.h; sourceTree = ""; }; A5DB70932AAE778F005B6559 /* PNSequenceInputStream.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PNSequenceInputStream.m; sourceTree = ""; }; A5DB70B42AAEFE58005B6559 /* PNCryptorInputStream+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PNCryptorInputStream+Private.h"; sourceTree = ""; }; @@ -3472,15 +4168,14 @@ 79A238CC1D2E70BD00D080CD /* Categories */ = { isa = PBXGroup; children = ( - 79A238CF1D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfigurationPrivate.h */, - 79A238CD1D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.h */, - 79A238CE1D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.m */, A52DC1E42307E10B001F20B0 /* NSDateFormatter+PNCacheable.h */, A52DC1E52307E10B001F20B0 /* NSDateFormatter+PNCacheable.m */, A5ADD6242AC0CE8100310A08 /* NSInputStream+PNCrypto.h */, A5ADD6252AC0CE8100310A08 /* NSInputStream+PNCrypto.m */, A56BBFC02AB900B600260D83 /* NSInputStream+PNURL.h */, A56BBFC12AB900B600260D83 /* NSInputStream+PNURL.m */, + A5CFE46E2C14A90900274165 /* NSError+PNTransport.h */, + A5CFE46F2C14A90900274165 /* NSError+PNTransport.m */, A50319D42AA65EB400B25A44 /* NSArray+PNMap.h */, A50319D52AA65EB400B25A44 /* NSArray+PNMap.m */, ); @@ -3506,6 +4201,7 @@ 79CBB0AA1BD03DE4001FC34D /* Misc */, A5DB70B12AAEFE58005B6559 /* Modules */, 79CBB0CE1BD03DE4001FC34D /* Network */, + A5CCEC5D2C0E816A00DB02A4 /* Protocols */, 79CBB04F1BD03D93001FC34D /* Support Files */, ); path = PubNub; @@ -3530,6 +4226,8 @@ A56FAEF1233161570072ADD6 /* PubNub+MessageActions.m */, 79CBB0581BD03DE4001FC34D /* PubNub+ChannelGroup.h */, 79CBB0591BD03DE4001FC34D /* PubNub+ChannelGroup.m */, + A5567E682C1FBE44003C974F /* PubNub+Deprecated.h */, + A5567E692C1FBE44003C974F /* PubNub+Deprecated.m */, 79CBB0681BD03DE4001FC34D /* PubNub+SubscribePrivate.h */, 79CBB0661BD03DE4001FC34D /* PubNub+Subscribe.h */, 79CBB0671BD03DE4001FC34D /* PubNub+Subscribe.m */, @@ -3553,7 +4251,6 @@ 79CBB06A1BD03DE4001FC34D /* PubNub+Time.m */, A5FADC322490270E001D7704 /* PubNub+Files.h */, A5FADC332490270E001D7704 /* PubNub+Files.m */, - 79AA8ECE26EB3A1200ADA747 /* PubNub+PAMPrivate.h */, 7951954126BD44E9001E308C /* PubNub+PAM.h */, 7951954226BD44E9001E308C /* PubNub+PAM.m */, ); @@ -3564,7 +4261,7 @@ 79CBB06B1BD03DE4001FC34D /* Data */ = { isa = PBXGroup; children = ( - 79CD275224D6A1A5000698DD /* Storage */, + A5CB33A72C035D4C008527AA /* Transport */, 79CBB07C1BD03DE4001FC34D /* Service Objects */, 79CBB06C1BD03DE4001FC34D /* Managers */, 79A0D8091DC22C950039A264 /* Builders */, @@ -3578,11 +4275,10 @@ 79AA8EC826EAB81500ADA747 /* PNConfiguration+Private.h */, 79CBB07A1BD03DE4001FC34D /* PNConfiguration.h */, 79CBB07B1BD03DE4001FC34D /* PNConfiguration.m */, - A55CA69C2397389100B24E02 /* PNKeychain+Private.h */, - 79E2D0EC1C56434700BAA244 /* PNKeychain.h */, - 79E2D0ED1C56434700BAA244 /* PNKeychain.m */, A50319B02AA5B05900B25A44 /* PNResult.h */, A50319B12AA5B05900B25A44 /* PNResult.m */, + A51B4A9B2BF0B428008C3370 /* PNError.h */, + A51B4A9C2BF0B428008C3370 /* PNError.m */, A523692824A2270200656C19 /* PNAES+Private.h */, 79CBB0751BD03DE4001FC34D /* PNAES.h */, 79CBB0761BD03DE4001FC34D /* PNAES.m */, @@ -3594,8 +4290,6 @@ 79CBB06C1BD03DE4001FC34D /* Managers */ = { isa = PBXGroup; children = ( - 79ABD88F1F01636B007634E0 /* PNTelemetry.h */, - 79ABD8901F01636B007634E0 /* PNTelemetry.m */, 7932485C1D874D9F00FBDF36 /* PNPublishSequence.h */, 7932485D1D874D9F00FBDF36 /* PNPublishSequence.m */, 79CBB0711BD03DE4001FC34D /* PNStateListener.h */, @@ -3615,86 +4309,29 @@ 79CBB07C1BD03DE4001FC34D /* Service Objects */ = { isa = PBXGroup; children = ( - 79CBB0901BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.h */, - 79CBB0911BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.m */, - 79CBB0921BD03DE4001FC34D /* PNPresenceChannelHereNowResult.h */, - 79CBB0931BD03DE4001FC34D /* PNPresenceChannelHereNowResult.m */, - 79CBB0851BD03DE4001FC34D /* PNChannelGroupClientStateResult.h */, - 79CBB0861BD03DE4001FC34D /* PNChannelGroupClientStateResult.m */, - A5686577230072810014E17C /* PNManageChannelMembersStatus.h */, - A5686578230072810014E17C /* PNManageChannelMembersStatus.m */, - 79CBB0941BD03DE4001FC34D /* PNPresenceGlobalHereNowResult.h */, - 79CBB0951BD03DE4001FC34D /* PNPresenceGlobalHereNowResult.m */, - A504E11A24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h */, - A504E11B24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m */, - A55A86DE22FD81E2002D0A72 /* PNFetchChannelsMetadataResult.h */, - A55A86D722FD81E2002D0A72 /* PNFetchChannelsMetadataResult.m */, - 79CBB0831BD03DE4001FC34D /* PNChannelGroupChannelsResult.h */, - 79CBB0841BD03DE4001FC34D /* PNChannelGroupChannelsResult.m */, - 79CBB07F1BD03DE4001FC34D /* PNAPNSEnabledChannelsResult.h */, - 79CBB0801BD03DE4001FC34D /* PNAPNSEnabledChannelsResult.m */, - A56865872300729E0014E17C /* PNFetchChannelMembersResult.h */, - A56865882300729E0014E17C /* PNFetchChannelMembersResult.m */, - A586A9E42337E581008856D2 /* PNFetchMessageActionsResult.h */, - A586A9E32337E581008856D2 /* PNFetchMessageActionsResult.m */, - A58975B023005AAC0093BD9A /* PNManageMembershipsStatus.h */, - A58975B123005AAC0093BD9A /* PNManageMembershipsStatus.m */, - A55A86DD22FD81E2002D0A72 /* PNSetChannelMetadataStatus.h */, - A55A86DF22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m */, - 79CBB0961BD03DE4001FC34D /* PNPresenceWhereNowResult.h */, - 79CBB0971BD03DE4001FC34D /* PNPresenceWhereNowResult.m */, - A55A86D422FD81E1002D0A72 /* PNFetchUUIDMetadataResult.h */, - A55A86D522FD81E2002D0A72 /* PNFetchUUIDMetadataResult.m */, - A56865672300709F0014E17C /* PNFetchMembershipsResult.h */, - A56865682300709F0014E17C /* PNFetchMembershipsResult.m */, - 79CBB0811BD03DE4001FC34D /* PNChannelClientStateResult.h */, - 79CBB0821BD03DE4001FC34D /* PNChannelClientStateResult.m */, - A55BCCA02319243F0019DB68 /* PNAddMessageActionStatus.h */, - A55BCCA12319243F0019DB68 /* PNAddMessageActionStatus.m */, - 79CBB0891BD03DE4001FC34D /* PNClientStateUpdateStatus.h */, - 79CBB08A1BD03DE4001FC34D /* PNClientStateUpdateStatus.m */, - A55A86D922FD81E2002D0A72 /* PNSetUUIDMetadataStatus.h */, - A55A86DA22FD81E2002D0A72 /* PNSetUUIDMetadataStatus.m */, + A5567F8D2C220D67003C974F /* Message Persistence */, + A5567F902C220DA6003C974F /* Message Reaction */, + A5567F912C220DB1003C974F /* Push Notification */, + A5567F922C220DC7003C974F /* Channel Groups */, + A5567F942C220DEA003C974F /* App Context */, + A5567FA12C220E6D003C974F /* File Sharing */, + A5567FA32C220EEA003C974F /* Subscribe */, + A5567FA42C220EFE003C974F /* Presence */, + A5567FAB2C220FC4003C974F /* Publish */, + A5567FAC2C220FCE003C974F /* Signal */, + A5567FAD2C220FF5003C974F /* Error */, + A5567FAE2C220FFE003C974F /* Time */, 79CBB07D1BD03DE4001FC34D /* PNAcknowledgmentStatus.h */, 79CBB07E1BD03DE4001FC34D /* PNAcknowledgmentStatus.m */, - 79CBB0871BD03DE4001FC34D /* PNChannelGroupsResult.h */, - 79CBB0881BD03DE4001FC34D /* PNChannelGroupsResult.m */, - 79A3E416221569BA00F2ADB9 /* PNMessageCountResult.h */, - 79A3E417221569BA00F2ADB9 /* PNMessageCountResult.m */, - DD71BDF55F5AC37C145971EC /* PNClientStateGetResult.h */, - DD71B20066E72A597492173C /* PNClientStateGetResult.m */, - A504E12624AA90B8006DCF5B /* PNDownloadFileResult.h */, - A504E12724AA90B8006DCF5B /* PNDownloadFileResult.m */, - 79CBB0A31BD03DE4001FC34D /* PNSubscriberResults.h */, - 79CBB0A41BD03DE4001FC34D /* PNSubscriberResults.m */, - 79E20D231C8AEC5B001BC9CC /* PNSubscribeStatus+Private.h */, - 79CBB0A51BD03DE4001FC34D /* PNSubscribeStatus.h */, - 79CBB0A61BD03DE4001FC34D /* PNSubscribeStatus.m */, - 797ABBD624C9ADB80008CA1E /* PNSendFileStatus+Private.h */, - 799D60E824C1B33900171C29 /* PNSendFileStatus.h */, - 799D60E924C1B33900171C29 /* PNSendFileStatus.m */, - A504E10224AA8F44006DCF5B /* PNListFilesResult.h */, - A504E10324AA8F44006DCF5B /* PNListFilesResult.m */, - 79CBB0981BD03DE4001FC34D /* PNPublishStatus.h */, - 79CBB0991BD03DE4001FC34D /* PNPublishStatus.m */, - 79CBB08E1BD03DE4001FC34D /* PNHistoryResult.h */, - 79CBB08F1BD03DE4001FC34D /* PNHistoryResult.m */, + 79CBB09A1BD03DE4001FC34D /* PNOperationResult+Private.h */, + 79CBB09B1BD03DE4001FC34D /* PNOperationResult.h */, + 79CBB09C1BD03DE4001FC34D /* PNOperationResult.m */, 79CBB09D1BD03DE4001FC34D /* PNServiceData+Private.h */, - 797D606922D2E44000E64C94 /* PNSignalStatus.h */, - 797D606822D2E43F00E64C94 /* PNSignalStatus.m */, 79CBB09E1BD03DE4001FC34D /* PNServiceData.h */, 79CBB09F1BD03DE4001FC34D /* PNServiceData.m */, - 79CBB08B1BD03DE4001FC34D /* PNErrorStatus+Private.h */, - 79CBB08C1BD03DE4001FC34D /* PNErrorStatus.h */, - 79CBB08D1BD03DE4001FC34D /* PNErrorStatus.m */, - 79CBB0A71BD03DE4001FC34D /* PNTimeResult.h */, - 79CBB0A81BD03DE4001FC34D /* PNTimeResult.m */, 79CBB0A01BD03DE4001FC34D /* PNStatus+Private.h */, 79CBB0A11BD03DE4001FC34D /* PNStatus.h */, 79CBB0A21BD03DE4001FC34D /* PNStatus.m */, - 79CBB09A1BD03DE4001FC34D /* PNOperationResult+Private.h */, - 79CBB09B1BD03DE4001FC34D /* PNOperationResult.h */, - 79CBB09C1BD03DE4001FC34D /* PNOperationResult.m */, ); path = "Service Objects"; sourceTree = ""; @@ -3707,7 +4344,6 @@ 79CBB0AB1BD03DE4001FC34D /* Helpers */, 79CBB0BF1BD03DE4001FC34D /* Logger */, 79CBB0C91BD03DE4001FC34D /* PNPrivateStructures.h */, - 79CBB0C81BD03DE4001FC34D /* PNErrorCodes.h */, 79CBB0CA1BD03DE4001FC34D /* PNStructures.h */, 79CBB0C71BD03DE4001FC34D /* PNConstants.h */, ); @@ -3726,6 +4362,8 @@ 79CBB0BE1BD03DE4001FC34D /* PNURLRequest.m */, 79CBB0B41BD03DE4001FC34D /* PNDictionary.h */, 79CBB0B51BD03DE4001FC34D /* PNDictionary.m */, + A51B4A832BF0B197008C3370 /* PNFunctions.h */, + A51B4A842BF0B197008C3370 /* PNFunctions.m */, 79CBB0AE1BD03DE4001FC34D /* PNChannel.h */, 79CBB0AF1BD03DE4001FC34D /* PNChannel.m */, 79CBB0B81BD03DE4001FC34D /* PNHelpers.h */, @@ -3743,6 +4381,8 @@ 79CBB0B31BD03DE4001FC34D /* PNData.m */, A5105B4E238F027D00CB693D /* PNDate.h */, A5105B4F238F027D00CB693D /* PNDate.m */, + A51B4A8F2BF0B1E3008C3370 /* PNLock.h */, + A51B4A902BF0B1E3008C3370 /* PNLock.m */, ); path = Helpers; sourceTree = ""; @@ -3760,6 +4400,7 @@ 79CBB0CB1BD03DE4001FC34D /* Protocols */ = { isa = PBXGroup; children = ( + A51B4A092BF0ADAA008C3370 /* Serializer */, 79CD275F24D6A371000698DD /* PNKeyValueStorage.h */, A56BBFBA2AB63F8F00260D83 /* PNCryptoProvider.h */, 79CBB0CC1BD03DE4001FC34D /* PNEventsListener.h */, @@ -3774,67 +4415,15 @@ children = ( A504E0E324A64DBC006DCF5B /* Streams */, A55A874522FD8272002D0A72 /* Requests */, - 79CBB0CF1BD03DE4001FC34D /* Parsers */, - 79CBB0F01BD03DE4001FC34D /* PNNetworkResponseSerializer.h */, - 79CBB0F11BD03DE4001FC34D /* PNNetworkResponseSerializer.m */, - 79CBB0F41BD03DE4001FC34D /* PNRequestParameters.h */, - 79CBB0F51BD03DE4001FC34D /* PNRequestParameters.m */, - A5E3B9FF2B2F669200D3AA18 /* PNRequestRetryConfiguration+Private.h */, - A5E3BA0B2B3118BD00D3AA18 /* PNRequestRetryConfiguration.h */, - A5E3BA0C2B3118BE00D3AA18 /* PNRequestRetryConfiguration.m */, + A523EEDD2BFE80C0009F45AA /* Responses */, + A53248DF2C28E3AB003510FF /* Parsers */, 79CBB0F21BD03DE4001FC34D /* PNReachability.h */, 79CBB0F31BD03DE4001FC34D /* PNReachability.m */, - 79CBB0F61BD03DE4001FC34D /* PNURLBuilder.h */, - 79CBB0F71BD03DE4001FC34D /* PNURLBuilder.m */, - 79CBB0EE1BD03DE4001FC34D /* PNNetwork.h */, - 79CBB0EF1BD03DE4001FC34D /* PNNetwork.m */, ); name = Network; path = ../../PubNub/Network; sourceTree = ""; }; - 79CBB0CF1BD03DE4001FC34D /* Parsers */ = { - isa = PBXGroup; - children = ( - A504E13224AA9350006DCF5B /* Files */, - A55A873422FD825A002D0A72 /* Objects */, - A55BCD44231DBDC40019DB68 /* Actions */, - 79CBB0E61BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.h */, - 79CBB0E71BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.m */, - 79CBB0D21BD03DE4001FC34D /* PNChannelGroupModificationParser.h */, - 79CBB0D31BD03DE4001FC34D /* PNChannelGroupModificationParser.m */, - 79CBB0E41BD03DE4001FC34D /* PNPushNotificationsAuditParser.h */, - 79CBB0E51BD03DE4001FC34D /* PNPushNotificationsAuditParser.m */, - 79CBB0D01BD03DE4001FC34D /* PNChannelGroupAuditionParser.h */, - 79CBB0D11BD03DE4001FC34D /* PNChannelGroupAuditionParser.m */, - 79CBB0E21BD03DE4001FC34D /* PNPresenceWhereNowParser.h */, - 79CBB0E31BD03DE4001FC34D /* PNPresenceWhereNowParser.m */, - 79CBB0E01BD03DE4001FC34D /* PNPresenceHereNowParser.h */, - 79CBB0E11BD03DE4001FC34D /* PNPresenceHereNowParser.m */, - 79CBB0DE1BD03DE4001FC34D /* PNMessagePublishParser.h */, - 79CBB0DF1BD03DE4001FC34D /* PNMessagePublishParser.m */, - 79A3E426221569DA00F2ADB9 /* PNMessageCountParser.h */, - 79A3E427221569DA00F2ADB9 /* PNMessageCountParser.m */, - 79CBB0D41BD03DE4001FC34D /* PNClientStateParser.h */, - 79CBB0D51BD03DE4001FC34D /* PNClientStateParser.m */, - 79CBB0EA1BD03DE4001FC34D /* PNSubscribeParser.h */, - 79CBB0EB1BD03DE4001FC34D /* PNSubscribeParser.m */, - 79CBB0D81BD03DE4001FC34D /* PNHeartbeatParser.h */, - 79CBB0D91BD03DE4001FC34D /* PNHeartbeatParser.m */, - 79CBB0DA1BD03DE4001FC34D /* PNHistoryParser.h */, - 79CBB0DB1BD03DE4001FC34D /* PNHistoryParser.m */, - 79CBB0DC1BD03DE4001FC34D /* PNLeaveParser.h */, - 79CBB0DD1BD03DE4001FC34D /* PNLeaveParser.m */, - 79CBB0D61BD03DE4001FC34D /* PNErrorParser.h */, - 79CBB0D71BD03DE4001FC34D /* PNErrorParser.m */, - 79CBB0EC1BD03DE4001FC34D /* PNTimeParser.h */, - 79CBB0ED1BD03DE4001FC34D /* PNTimeParser.m */, - A55DAEEE24B1FE7600766EE9 /* PNXMLParser.h */, - A55DAEEF24B1FE7600766EE9 /* PNXMLParser.m */, - ); - path = Parsers; - sourceTree = ""; - }; 79CBB1D91BD043A2001FC34D /* Frameworks */ = { isa = PBXGroup; children = ( @@ -3868,19 +4457,6 @@ path = scripts; sourceTree = ""; }; - 79CD275224D6A1A5000698DD /* Storage */ = { - isa = PBXGroup; - children = ( - 79CD275324D6A1CB000698DD /* PNDataStorage.h */, - 79CD275424D6A1CB000698DD /* PNDataStorage.m */, - 79CD276524D75342000698DD /* PNKeychainStorage.h */, - 79CD276624D75342000698DD /* PNKeychainStorage.m */, - 79CD277124D75AE9000698DD /* PNInMemoryStorage.h */, - 79CD277224D75AE9000698DD /* PNInMemoryStorage.m */, - ); - path = Storage; - sourceTree = ""; - }; A504E0E324A64DBC006DCF5B /* Streams */ = { isa = PBXGroup; children = ( @@ -3890,19 +4466,6 @@ path = Streams; sourceTree = ""; }; - A504E13224AA9350006DCF5B /* Files */ = { - isa = PBXGroup; - children = ( - A504E1CA24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h */, - A504E1CB24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m */, - 797ABBCA24C6E8650008CA1E /* PNDeleteFileParser.h */, - 797ABBCB24C6E8650008CA1E /* PNDeleteFileParser.m */, - A504E13324AA9361006DCF5B /* PNListFilesParser.h */, - A504E13424AA9361006DCF5B /* PNListFilesParser.m */, - ); - path = Files; - sourceTree = ""; - }; A504E15124AA9CD5006DCF5B /* Files */ = { isa = PBXGroup; children = ( @@ -3922,6 +4485,440 @@ path = Files; sourceTree = ""; }; + A51B4A092BF0ADAA008C3370 /* Serializer */ = { + isa = PBXGroup; + children = ( + A51B4A112BF0AE2A008C3370 /* Object */, + A51B4A0A2BF0ADB9008C3370 /* JSON */, + ); + path = Serializer; + sourceTree = ""; + }; + A51B4A0A2BF0ADB9008C3370 /* JSON */ = { + isa = PBXGroup; + children = ( + A51B4A0B2BF0ADD6008C3370 /* PNJSONSerializer.h */, + ); + path = JSON; + sourceTree = ""; + }; + A51B4A112BF0AE2A008C3370 /* Object */ = { + isa = PBXGroup; + children = ( + A51B4A122BF0AE36008C3370 /* PNCodable.h */, + A51B4A182BF0AE57008C3370 /* PNDecoder.h */, + A51B4A1E2BF0AE79008C3370 /* PNEncoder.h */, + A51B4A242BF0AE92008C3370 /* PNObjectSerializer.h */, + ); + path = Object; + sourceTree = ""; + }; + A51B4A2A2BF0AF0E008C3370 /* Serializer */ = { + isa = PBXGroup; + children = ( + A51B4A2B2BF0AF21008C3370 /* JSON */, + A51B4A2C2BF0AF2F008C3370 /* Object */, + ); + path = Serializer; + sourceTree = ""; + }; + A51B4A2B2BF0AF21008C3370 /* JSON */ = { + isa = PBXGroup; + children = ( + A51B4A2D2BF0AFB8008C3370 /* PNJSONSerialization.h */, + A51B4A2E2BF0AFB8008C3370 /* PNJSONSerialization.m */, + ); + path = JSON; + sourceTree = ""; + }; + A51B4A2C2BF0AF2F008C3370 /* Object */ = { + isa = PBXGroup; + children = ( + A51B4A5D2BF0B0F5008C3370 /* Categories */, + A51B4A5E2BF0B104008C3370 /* Models */, + A53248AD2C24D987003510FF /* PNJSONDecoder+Private.h */, + A51B4A392BF0B097008C3370 /* PNJSONDecoder.h */, + A51B4A3A2BF0B097008C3370 /* PNJSONDecoder.m */, + A51B4A452BF0B0B0008C3370 /* PNJSONEncoder.h */, + A51B4A462BF0B0B0008C3370 /* PNJSONEncoder.m */, + A51B4A512BF0B0CB008C3370 /* PNJSONCoder.h */, + A51B4A522BF0B0CB008C3370 /* PNJSONCoder.m */, + ); + path = Object; + sourceTree = ""; + }; + A51B4A5D2BF0B0F5008C3370 /* Categories */ = { + isa = PBXGroup; + children = ( + A51B4A6B2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h */, + A51B4A6C2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m */, + A51B4A772BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h */, + A51B4A782BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m */, + ); + path = Categories; + sourceTree = ""; + }; + A51B4A5E2BF0B104008C3370 /* Models */ = { + isa = PBXGroup; + children = ( + A51B4A5F2BF0B117008C3370 /* PNJSONCodableObjects.h */, + A51B4A602BF0B117008C3370 /* PNJSONCodableObjects.m */, + ); + path = Models; + sourceTree = ""; + }; + A51B4AA72BF37DDE008C3370 /* Channel Groups */ = { + isa = PBXGroup; + children = ( + A5CFE43D2C11E8D500274165 /* PNChannelGroupManageRequest.h */, + A5CFE43E2C11E8D500274165 /* PNChannelGroupManageRequest.m */, + A51B4AA82BF37F03008C3370 /* PNChannelGroupFetchRequest.h */, + A51B4AA92BF37F03008C3370 /* PNChannelGroupFetchRequest.m */, + ); + path = "Channel Groups"; + sourceTree = ""; + }; + A523EEDD2BFE80C0009F45AA /* Responses */ = { + isa = PBXGroup; + children = ( + A5CFE5022C16576E00274165 /* Message Persistence */, + A5CFE5A82C19430100274165 /* Message Reaction */, + A5567E742C1FCA9C003C974F /* Push Notification */, + A5CFE41E2C10D7AA00274165 /* Channel Groups */, + A5567F1A2C21D505003C974F /* App Context */, + A5567EB32C207460003C974F /* File Sharing */, + A5567EB22C20743F003C974F /* Subscribe */, + A5567EA52C2036FD003C974F /* Presence */, + A5CFE4B62C1645D100274165 /* Publish */, + A5CFE4B72C16462B00274165 /* Signal */, + A5CFE46D2C12613700274165 /* Error */, + A5CFE4EE2C16526700274165 /* Time */, + A5567E5C2C1F8C53003C974F /* PNOperationDataParser.h */, + A5567E5D2C1F8C53003C974F /* PNOperationDataParser.m */, + A5CFE5C72C1AE33500274165 /* PNBaseOperationData+Private.h */, + A5CFE45B2C123F2E00274165 /* PNBaseOperationData.h */, + A5CFE45C2C123F2E00274165 /* PNBaseOperationData.m */, + ); + path = Responses; + sourceTree = ""; + }; + A523EEDE2BFE90DC009F45AA /* Transport */ = { + isa = PBXGroup; + children = ( + A5CB33D22C05CBB0008527AA /* Categories */, + A5CCEC4D2C0E006000DB02A4 /* PNURLSessionTransportResponse.h */, + A5CCEC4E2C0E006000DB02A4 /* PNURLSessionTransportResponse.m */, + A523EEDF2BFE910A009F45AA /* PNURLSessionTransport.h */, + A523EEE02BFE910A009F45AA /* PNURLSessionTransport.m */, + ); + path = Transport; + sourceTree = ""; + }; + A53248DF2C28E3AB003510FF /* Parsers */ = { + isa = PBXGroup; + children = ( + A53248DD2C28E3AB003510FF /* PNXMLParser.h */, + A53248DE2C28E3AB003510FF /* PNXMLParser.m */, + ); + path = Parsers; + sourceTree = ""; + }; + A5567E3C2C1EB506003C974F /* Time */ = { + isa = PBXGroup; + children = ( + A5567E2F2C1EB4ED003C974F /* PNTimeRequest.h */, + A5567E302C1EB4ED003C974F /* PNTimeRequest.m */, + ); + path = Time; + sourceTree = ""; + }; + A5567E4F2C1F0470003C974F /* Signal */ = { + isa = PBXGroup; + children = ( + A5567E502C1F0484003C974F /* PNSignalRequest.h */, + A5567E512C1F0484003C974F /* PNSignalRequest.m */, + ); + path = Signal; + sourceTree = ""; + }; + A5567E742C1FCA9C003C974F /* Push Notification */ = { + isa = PBXGroup; + children = ( + A5567E752C1FCADC003C974F /* PNPushNotificationFetchData.h */, + A5567E762C1FCADC003C974F /* PNPushNotificationFetchData.m */, + ); + path = "Push Notification"; + sourceTree = ""; + }; + A5567EA52C2036FD003C974F /* Presence */ = { + isa = PBXGroup; + children = ( + A5567ED82C209FF7003C974F /* PNPresenceWhereNowFetchData.h */, + A5567ED92C209FF7003C974F /* PNPresenceWhereNowFetchData.m */, + A55680032C225579003C974F /* PNPresenceUserStateFetchData+Private.h */, + A5567FF72C225146003C974F /* PNPresenceUserStateFetchData.h */, + A5567FF82C225146003C974F /* PNPresenceUserStateFetchData.m */, + A556801B2C226866003C974F /* PNPresenceUserStateSetData.h */, + A556801C2C226866003C974F /* PNPresenceUserStateSetData.m */, + A5567EF02C20D3DE003C974F /* PNPresenceHereNowFetchData+Private.h */, + A5567EA62C20371C003C974F /* PNPresenceHereNowFetchData.h */, + A5567EA72C20371C003C974F /* PNPresenceHereNowFetchData.m */, + ); + path = Presence; + sourceTree = ""; + }; + A5567EB22C20743F003C974F /* Subscribe */ = { + isa = PBXGroup; + children = ( + A55680A52C23880C003C974F /* PNSubscribeMessageActionEventData.h */, + A55680A62C23880C003C974F /* PNSubscribeMessageActionEventData.m */, + A55680C92C2400B3003C974F /* PNSubscribePresenceEventData.h */, + A55680CA2C2400B3003C974F /* PNSubscribePresenceEventData.m */, + A53248B32C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h */, + A55680992C2385BC003C974F /* PNSubscribeMessageEventData.h */, + A556809A2C2385BC003C974F /* PNSubscribeMessageEventData.m */, + A55680B12C238EEB003C974F /* PNSubscribeObjectEventData.h */, + A55680B22C238EEB003C974F /* PNSubscribeObjectEventData.m */, + A55680BD2C23A8CD003C974F /* PNSubscribeSignalEventData.h */, + A55680BE2C23A8CD003C974F /* PNSubscribeSignalEventData.m */, + A53248B92C24E3D4003510FF /* PNSubscribeFileEventData+Private.h */, + A55680D52C2428E8003C974F /* PNSubscribeFileEventData.h */, + A55680D62C2428E8003C974F /* PNSubscribeFileEventData.m */, + A5567EC02C207800003C974F /* PNSubscribeCursorData.h */, + A5567EC12C207800003C974F /* PNSubscribeCursorData.m */, + A55680932C237BC1003C974F /* PNSubscribeEventData+Private.h */, + A5567ECC2C208652003C974F /* PNSubscribeEventData.h */, + A5567ECD2C208652003C974F /* PNSubscribeEventData.m */, + A5567EB42C2077AE003C974F /* PNSubscribeData.h */, + A5567EB52C2077AE003C974F /* PNSubscribeData.m */, + ); + path = Subscribe; + sourceTree = ""; + }; + A5567EB32C207460003C974F /* File Sharing */ = { + isa = PBXGroup; + children = ( + A55680332C229587003C974F /* PNFileGenerateUploadURLData.h */, + A55680342C229587003C974F /* PNFileGenerateUploadURLData.m */, + A556808D2C235360003C974F /* PNFileDownloadData+Private.h */, + A55680812C23527D003C974F /* PNFileDownloadData.h */, + A55680822C23527D003C974F /* PNFileDownloadData.m */, + A556807B2C234B4D003C974F /* PNFileListFetchData+Private.h */, + A556806F2C2344A9003C974F /* PNFileListFetchData.h */, + A55680702C2344A9003C974F /* PNFileListFetchData.m */, + A556804B2C22BA84003C974F /* PNFileSendData+Private.h */, + A556803F2C229D8D003C974F /* PNFileSendData.h */, + A55680402C229D8D003C974F /* PNFileSendData.m */, + ); + path = "File Sharing"; + sourceTree = ""; + }; + A5567F1A2C21D505003C974F /* App Context */ = { + isa = PBXGroup; + children = ( + A5567F812C21F31E003C974F /* PNChannelMetadataFetchAllData.h */, + A5567F822C21F31E003C974F /* PNChannelMetadataFetchAllData.m */, + A5567F1B2C21D53D003C974F /* PNChannelMembersManageData.h */, + A5567F1C2C21D53D003C974F /* PNChannelMembersManageData.m */, + A5567FB52C221136003C974F /* PNChannelMetadataFetchData.h */, + A5567FB62C221136003C974F /* PNChannelMetadataFetchData.m */, + A5567F3F2C21E723003C974F /* PNChannelMembersFetchData.h */, + A5567F402C21E723003C974F /* PNChannelMembersFetchData.m */, + A5567F752C21F203003C974F /* PNUUIDMetadataFetchAllData.h */, + A5567F762C21F203003C974F /* PNUUIDMetadataFetchAllData.m */, + A5567F272C21DB10003C974F /* PNMembershipsManageData.h */, + A5567F282C21DB10003C974F /* PNMembershipsManageData.m */, + A5567FC12C221230003C974F /* PNChannelMetadataSetData.h */, + A5567FC22C221230003C974F /* PNChannelMetadataSetData.m */, + A5567F692C21F0EA003C974F /* PNUUIDMetadataFetchData.h */, + A5567F6A2C21F0EA003C974F /* PNUUIDMetadataFetchData.m */, + A5567F4B2C21E965003C974F /* PNMembershipsFetchData.h */, + A53248D72C28D3BB003510FF /* PNMembershipsFetchData.m */, + A5567F332C21E4DF003C974F /* PNUUIDMetadataSetData.h */, + A5567F342C21E4DF003C974F /* PNUUIDMetadataSetData.m */, + A5567F632C21ECBE003C974F /* PNPagedAppContextData+Private.h */, + A5567F572C21EBDF003C974F /* PNPagedAppContextData.h */, + A5567F582C21EBDF003C974F /* PNPagedAppContextData.m */, + ); + path = "App Context"; + sourceTree = ""; + }; + A5567F8D2C220D67003C974F /* Message Persistence */ = { + isa = PBXGroup; + children = ( + 79A3E416221569BA00F2ADB9 /* PNMessageCountResult.h */, + 79A3E417221569BA00F2ADB9 /* PNMessageCountResult.m */, + 79CBB08E1BD03DE4001FC34D /* PNHistoryResult.h */, + 79CBB08F1BD03DE4001FC34D /* PNHistoryResult.m */, + ); + path = "Message Persistence"; + sourceTree = ""; + }; + A5567F902C220DA6003C974F /* Message Reaction */ = { + isa = PBXGroup; + children = ( + A586A9E42337E581008856D2 /* PNFetchMessageActionsResult.h */, + A586A9E32337E581008856D2 /* PNFetchMessageActionsResult.m */, + A55BCCA02319243F0019DB68 /* PNAddMessageActionStatus.h */, + A55BCCA12319243F0019DB68 /* PNAddMessageActionStatus.m */, + ); + path = "Message Reaction"; + sourceTree = ""; + }; + A5567F912C220DB1003C974F /* Push Notification */ = { + isa = PBXGroup; + children = ( + 79CBB07F1BD03DE4001FC34D /* PNAPNSEnabledChannelsResult.h */, + 79CBB0801BD03DE4001FC34D /* PNAPNSEnabledChannelsResult.m */, + ); + path = "Push Notification"; + sourceTree = ""; + }; + A5567F922C220DC7003C974F /* Channel Groups */ = { + isa = PBXGroup; + children = ( + 79CBB0831BD03DE4001FC34D /* PNChannelGroupChannelsResult.h */, + 79CBB0841BD03DE4001FC34D /* PNChannelGroupChannelsResult.m */, + A53248FC2C2AC5C1003510FF /* PNChannelGroupsResult.h */, + A53248FD2C2AC5C1003510FF /* PNChannelGroupsResult.m */, + ); + path = "Channel Groups"; + sourceTree = ""; + }; + A5567F942C220DEA003C974F /* App Context */ = { + isa = PBXGroup; + children = ( + A5567FCE2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h */, + A5567FCD2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m */, + A5686577230072810014E17C /* PNManageChannelMembersStatus.h */, + A5686578230072810014E17C /* PNManageChannelMembersStatus.m */, + A55A86DE22FD81E2002D0A72 /* PNFetchChannelMetadataResult.h */, + A55A86D722FD81E2002D0A72 /* PNFetchChannelMetadataResult.m */, + A56865872300729E0014E17C /* PNFetchChannelMembersResult.h */, + A56865882300729E0014E17C /* PNFetchChannelMembersResult.m */, + A5567FD92C221A20003C974F /* PNFetchAllUUIDMetadataResult.h */, + A5567FDA2C221A20003C974F /* PNFetchAllUUIDMetadataResult.m */, + A58975B023005AAC0093BD9A /* PNManageMembershipsStatus.h */, + A58975B123005AAC0093BD9A /* PNManageMembershipsStatus.m */, + A55A86DD22FD81E2002D0A72 /* PNSetChannelMetadataStatus.h */, + A55A86DF22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m */, + A55A86D422FD81E1002D0A72 /* PNFetchUUIDMetadataResult.h */, + A55A86D522FD81E2002D0A72 /* PNFetchUUIDMetadataResult.m */, + A5567F952C220E32003C974F /* PNFetchMembershipsResult.h */, + A5567F962C220E32003C974F /* PNFetchMembershipsResult.m */, + A55A86D922FD81E2002D0A72 /* PNSetUUIDMetadataStatus.h */, + A55A86DA22FD81E2002D0A72 /* PNSetUUIDMetadataStatus.m */, + ); + path = "App Context"; + sourceTree = ""; + }; + A5567FA12C220E6D003C974F /* File Sharing */ = { + isa = PBXGroup; + children = ( + A55680272C2294ED003C974F /* PNGenerateFileUploadURLStatus.h */, + A55680282C2294ED003C974F /* PNGenerateFileUploadURLStatus.m */, + A504E12624AA90B8006DCF5B /* PNDownloadFileResult.h */, + A504E12724AA90B8006DCF5B /* PNDownloadFileResult.m */, + 799D60E824C1B33900171C29 /* PNSendFileStatus.h */, + 799D60E924C1B33900171C29 /* PNSendFileStatus.m */, + A504E10224AA8F44006DCF5B /* PNListFilesResult.h */, + A504E10324AA8F44006DCF5B /* PNListFilesResult.m */, + ); + path = "File Sharing"; + sourceTree = ""; + }; + A5567FA32C220EEA003C974F /* Subscribe */ = { + isa = PBXGroup; + children = ( + A55680F92C242D7C003C974F /* PNMessageActionResult.h */, + A55680FA2C242D7C003C974F /* PNMessageActionResult.m */, + A556811D2C242EE6003C974F /* PNPresenceEventResult.h */, + A556811E2C242EE6003C974F /* PNPresenceEventResult.m */, + A55681052C242E09003C974F /* PNObjectEventResult.h */, + A55681062C242E09003C974F /* PNObjectEventResult.m */, + A53248BF2C25B7BB003510FF /* PNSubscribeStatus+Private.h */, + 79CBB0A51BD03DE4001FC34D /* PNSubscribeStatus.h */, + 79CBB0A61BD03DE4001FC34D /* PNSubscribeStatus.m */, + A55680E12C242BFF003C974F /* PNMessageResult.h */, + A55680E22C242BFF003C974F /* PNMessageResult.m */, + A55681112C242E96003C974F /* PNFileEventResult.h */, + A55681122C242E96003C974F /* PNFileEventResult.m */, + A55680ED2C242D11003C974F /* PNSignalResult.h */, + A55680EE2C242D11003C974F /* PNSignalResult.m */, + ); + path = Subscribe; + sourceTree = ""; + }; + A5567FA42C220EFE003C974F /* Presence */ = { + isa = PBXGroup; + children = ( + A5567FA52C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h */, + 79CBB0901BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.h */, + 79CBB0911BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.m */, + A5567EFC2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h */, + 79CBB0921BD03DE4001FC34D /* PNPresenceChannelHereNowResult.h */, + 79CBB0931BD03DE4001FC34D /* PNPresenceChannelHereNowResult.m */, + A5567EF62C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h */, + 79CBB0941BD03DE4001FC34D /* PNPresenceGlobalHereNowResult.h */, + 79CBB0951BD03DE4001FC34D /* PNPresenceGlobalHereNowResult.m */, + A556800F2C226378003C974F /* PNChannelGroupClientStateResult+Private.h */, + 79CBB0851BD03DE4001FC34D /* PNChannelGroupClientStateResult.h */, + 79CBB0861BD03DE4001FC34D /* PNChannelGroupClientStateResult.m */, + A5567E3D2C1ECC59003C974F /* PNPresenceStateFetchResult.h */, + A5567E3E2C1ECC59003C974F /* PNPresenceStateFetchResult.m */, + 79CBB0961BD03DE4001FC34D /* PNPresenceWhereNowResult.h */, + 79CBB0971BD03DE4001FC34D /* PNPresenceWhereNowResult.m */, + A55680152C226632003C974F /* PNChannelClientStateResult+Private.h */, + 79CBB0811BD03DE4001FC34D /* PNChannelClientStateResult.h */, + 79CBB0821BD03DE4001FC34D /* PNChannelClientStateResult.m */, + 79CBB0891BD03DE4001FC34D /* PNClientStateUpdateStatus.h */, + A5567FAF2C22107D003C974F /* PNClientStateUpdateStatus.m */, + A5CFE55E2C18E9C600274165 /* PNPresenceHereNowResult.h */, + A5CFE55F2C18E9C600274165 /* PNPresenceHereNowResult.m */, + A55680092C22603F003C974F /* PNClientStateGetResult+Private.h */, + DD71BDF55F5AC37C145971EC /* PNClientStateGetResult.h */, + DD71B20066E72A597492173C /* PNClientStateGetResult.m */, + ); + path = Presence; + sourceTree = ""; + }; + A5567FAB2C220FC4003C974F /* Publish */ = { + isa = PBXGroup; + children = ( + 79CBB0981BD03DE4001FC34D /* PNPublishStatus.h */, + 79CBB0991BD03DE4001FC34D /* PNPublishStatus.m */, + ); + path = Publish; + sourceTree = ""; + }; + A5567FAC2C220FCE003C974F /* Signal */ = { + isa = PBXGroup; + children = ( + 797D606922D2E44000E64C94 /* PNSignalStatus.h */, + 797D606822D2E43F00E64C94 /* PNSignalStatus.m */, + ); + path = Signal; + sourceTree = ""; + }; + A5567FAD2C220FF5003C974F /* Error */ = { + isa = PBXGroup; + children = ( + 79CBB08B1BD03DE4001FC34D /* PNErrorStatus+Private.h */, + 79CBB08C1BD03DE4001FC34D /* PNErrorStatus.h */, + 79CBB08D1BD03DE4001FC34D /* PNErrorStatus.m */, + ); + path = Error; + sourceTree = ""; + }; + A5567FAE2C220FFE003C974F /* Time */ = { + isa = PBXGroup; + children = ( + 79CBB0A71BD03DE4001FC34D /* PNTimeResult.h */, + 79CBB0A81BD03DE4001FC34D /* PNTimeResult.m */, + ); + path = Time; + sourceTree = ""; + }; A55A85DF22FD80B9002D0A72 /* Objects */ = { isa = PBXGroup; children = ( @@ -3990,21 +4987,17 @@ A55A86A322FD817E002D0A72 /* Models */ = { isa = PBXGroup; children = ( - A55BCD24231D27F00019DB68 /* PNMessageAction+Private.h */, - A55BCD14231D26110019DB68 /* PNMessageAction.h */, - A55BCD15231D26110019DB68 /* PNMessageAction.m */, - A58975E023005CFB0093BD9A /* PNMembership+Private.h */, - A58975C023005BD80093BD9A /* PNMembership.h */, - A58975C123005BD80093BD9A /* PNMembership.m */, - A568655F2300622C0014E17C /* PNChannelMember+Private.h */, - A58975D023005BE60093BD9A /* PNChannelMember.h */, - A58975D123005BE60093BD9A /* PNChannelMember.m */, - A55A86A522FD817E002D0A72 /* PNChannelMetadata+Private.h */, + A5567F142C219B9A003C974F /* PNBaseAppContextObject+Private.h */, + A5567F082C219757003C974F /* PNBaseAppContextObject.h */, + A5567F092C219757003C974F /* PNBaseAppContextObject.m */, A55A86A622FD817E002D0A72 /* PNChannelMetadata.h */, A55A86A922FD817E002D0A72 /* PNChannelMetadata.m */, - A55A86A722FD817E002D0A72 /* PNUUIDMetadata+Private.h */, + A58975D023005BE60093BD9A /* PNChannelMember.h */, + A58975D123005BE60093BD9A /* PNChannelMember.m */, A55A86A822FD817E002D0A72 /* PNUUIDMetadata.h */, A55A86A422FD817E002D0A72 /* PNUUIDMetadata.m */, + A58975C023005BD80093BD9A /* PNMembership.h */, + A58975C123005BD80093BD9A /* PNMembership.m */, 79CFA2CF26DE1CD100D206D4 /* PNPAMToken+Private.h */, 79CFA2B726DE1C4900D206D4 /* PNPAMToken.h */, 79CFA2B826DE1C4900D206D4 /* PNPAMToken.m */, @@ -4018,38 +5011,23 @@ path = Models; sourceTree = ""; }; - A55A873422FD825A002D0A72 /* Objects */ = { - isa = PBXGroup; - children = ( - A56865B7230173030014E17C /* PNChannelMetadataChangeParser.h */, - A56865B8230173030014E17C /* PNChannelMetadataChangeParser.m */, - A55A873622FD825A002D0A72 /* PNUUIDMetadataChangeParser.h */, - A55A873522FD825A002D0A72 /* PNUUIDMetadataChangeParser.m */, - A56865C7230173AA0014E17C /* PNObjectsRemoveParser.h */, - A56865C8230173AA0014E17C /* PNObjectsRemoveParser.m */, - A56865D7230175EC0014E17C /* PNMembershipsParser.h */, - A56865D8230175EC0014E17C /* PNMembershipsParser.m */, - A56865A7230172950014E17C /* PNFetchChannelsMetadataParser.h */, - A56865A8230172950014E17C /* PNFetchChannelsMetadataParser.m */, - A5686597230170690014E17C /* PNFetchUUIDMetadataParser.h */, - A5686598230170690014E17C /* PNFetchUUIDMetadataParser.m */, - A56865E7230176760014E17C /* PNChannelMembersParser.h */, - A56865E8230176760014E17C /* PNChannelMembersParser.m */, - ); - path = Objects; - sourceTree = ""; - }; A55A874522FD8272002D0A72 /* Requests */ = { isa = PBXGroup; children = ( - 799D610024C36D3000171C29 /* Publish */, + A5CFE56A2C19064000274165 /* Message Persistence */, + A55BCCB023193A8C0019DB68 /* Message Reaction */, A57A3002238D59B500DE8C68 /* Push Notifications */, - A55BCCB023193A8C0019DB68 /* Actions */, + A51B4AA72BF37DDE008C3370 /* Channel Groups */, + A5CFE58F2C192EB900274165 /* Subscribe */, + A5CFE52D2C18D2CB00274165 /* Presence */, + 799D610024C36D3000171C29 /* Publish */, A55A874722FD8272002D0A72 /* Objects */, + A5567E4F2C1F0470003C974F /* Signal */, A5FADC3E249028FF001D7704 /* Files */, - A55A877122FD8272002D0A72 /* PNRequest+Private.h */, - A55A877222FD8272002D0A72 /* PNRequest.h */, - A55A874622FD8272002D0A72 /* PNRequest.m */, + A5567E3C2C1EB506003C974F /* Time */, + A5CFE4182C1076A700274165 /* PNBaseRequest+Private.h */, + A5CFE40C2C0F246400274165 /* PNBaseRequest.h */, + A5CFE40D2C0F246400274165 /* PNBaseRequest.m */, ); path = Requests; sourceTree = ""; @@ -4072,14 +5050,14 @@ A55A874922FD8272002D0A72 /* UUID */ = { isa = PBXGroup; children = ( - A55A874B22FD8272002D0A72 /* PNSetUUIDMetadataRequest.h */, - A55A875322FD8272002D0A72 /* PNSetUUIDMetadataRequest.m */, + A55A874D22FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.h */, + A55A875622FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.m */, A55A875422FD8272002D0A72 /* PNRemoveUUIDMetadataRequest.h */, A55A874F22FD8272002D0A72 /* PNRemoveUUIDMetadataRequest.m */, A55A875022FD8272002D0A72 /* PNFetchUUIDMetadataRequest.h */, A55A874A22FD8272002D0A72 /* PNFetchUUIDMetadataRequest.m */, - A55A874D22FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.h */, - A55A875622FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.m */, + A55A874B22FD8272002D0A72 /* PNSetUUIDMetadataRequest.h */, + A55A875322FD8272002D0A72 /* PNSetUUIDMetadataRequest.m */, ); path = UUID; sourceTree = ""; @@ -4087,14 +5065,14 @@ A55A875822FD8272002D0A72 /* Channel */ = { isa = PBXGroup; children = ( - A55A875D22FD8272002D0A72 /* PNSetChannelMetadataRequest.h */, - A55A876522FD8272002D0A72 /* PNSetChannelMetadataRequest.m */, + A55A876122FD8272002D0A72 /* PNFetchAllChannelsMetadataRequest.h */, + A55A875A22FD8272002D0A72 /* PNFetchAllChannelsMetadataRequest.m */, A55A876422FD8272002D0A72 /* PNRemoveChannelMetadataRequest.h */, A55A875E22FD8272002D0A72 /* PNRemoveChannelMetadataRequest.m */, A55A876222FD8272002D0A72 /* PNFetchChannelMetadataRequest.h */, A55A875922FD8272002D0A72 /* PNFetchChannelMetadataRequest.m */, - A55A876122FD8272002D0A72 /* PNFetchAllChannelsMetadataRequest.h */, - A55A875A22FD8272002D0A72 /* PNFetchAllChannelsMetadataRequest.m */, + A55A875D22FD8272002D0A72 /* PNSetChannelMetadataRequest.h */, + A55A876522FD8272002D0A72 /* PNSetChannelMetadataRequest.m */, ); path = Channel; sourceTree = ""; @@ -4102,43 +5080,44 @@ A55A876722FD8272002D0A72 /* Membership */ = { isa = PBXGroup; children = ( + A55A876F22FD8272002D0A72 /* PNManageChannelMembersRequest.h */, + A55A876B22FD8272002D0A72 /* PNManageChannelMembersRequest.m */, + A5A451AB246DE8C2008ECC74 /* PNRemoveChannelMembersRequest.h */, + A5A451A9246DE8C1008ECC74 /* PNRemoveChannelMembersRequest.m */, A5A45184246D8CD5008ECC74 /* PNBaseObjectsMembershipRequest+Private.h */, A5A45178246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h */, A5A45179246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.m */, + A55A876A22FD8272002D0A72 /* PNFetchChannelMembersRequest.h */, + A55A876E22FD8272002D0A72 /* PNFetchChannelMembersRequest.m */, A55A876D22FD8272002D0A72 /* PNManageMembershipsRequest.h */, A55A876822FD8272002D0A72 /* PNManageMembershipsRequest.m */, A5A4519C246DE792008ECC74 /* PNRemoveMembershipsRequest.h */, A5A4519D246DE792008ECC74 /* PNRemoveMembershipsRequest.m */, + A5046E272478471C0008C81E /* PNSetChannelMembersRequest.h */, + A5046E282478471C0008C81E /* PNSetChannelMembersRequest.m */, A55A876C22FD8272002D0A72 /* PNFetchMembershipsRequest.h */, A55A876922FD8272002D0A72 /* PNFetchMembershipsRequest.m */, - A55A876F22FD8272002D0A72 /* PNManageChannelMembersRequest.h */, - A55A876B22FD8272002D0A72 /* PNManageChannelMembersRequest.m */, - A5A451AB246DE8C2008ECC74 /* PNRemoveChannelMembersRequest.h */, - A5A451A9246DE8C1008ECC74 /* PNRemoveChannelMembersRequest.m */, A5046E292478471D0008C81E /* PNSetMembershipsRequest.h */, A5046E262478471C0008C81E /* PNSetMembershipsRequest.m */, - A55A876A22FD8272002D0A72 /* PNFetchChannelMembersRequest.h */, - A55A876E22FD8272002D0A72 /* PNFetchChannelMembersRequest.m */, - A5046E272478471C0008C81E /* PNSetChannelMembersRequest.h */, - A5046E282478471C0008C81E /* PNSetChannelMembersRequest.m */, ); path = Membership; sourceTree = ""; }; - A55BCCB023193A8C0019DB68 /* Actions */ = { + A55BCCB023193A8C0019DB68 /* Message Reaction */ = { isa = PBXGroup; children = ( - A5A7AFF32349330E0060113B /* PNAddMessageActionRequest.h */, - A5A7AFF42349330E0060113B /* PNAddMessageActionRequest.m */, + A53248F62C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h */, + A5A7AFF72349330F0060113B /* PNRemoveMessageActionRequest.h */, + A5A7AFF62349330E0060113B /* PNRemoveMessageActionRequest.m */, + A5A7AFF02349330E0060113B /* PNFetchMessageActionsRequest.h */, + A5A7AFF52349330E0060113B /* PNFetchMessageActionsRequest.m */, A5A7AFF12349330E0060113B /* PNBaseMessageActionRequest+Private.h */, A5A7AFF82349330F0060113B /* PNBaseMessageActionRequest.h */, A5A7AFF22349330E0060113B /* PNBaseMessageActionRequest.m */, - A5A7AFF02349330E0060113B /* PNFetchMessageActionsRequest.h */, - A5A7AFF52349330E0060113B /* PNFetchMessageActionsRequest.m */, - A5A7AFF72349330F0060113B /* PNRemoveMessageActionRequest.h */, - A5A7AFF62349330E0060113B /* PNRemoveMessageActionRequest.m */, + A5A7AFF32349330E0060113B /* PNAddMessageActionRequest.h */, + A5A7AFF42349330E0060113B /* PNAddMessageActionRequest.m */, ); - path = Actions; + path = "Message Reaction"; sourceTree = ""; }; A55BCCE2231D21480019DB68 /* Actions */ = { @@ -4149,14 +5128,6 @@ path = Actions; sourceTree = ""; }; - A55BCD44231DBDC40019DB68 /* Actions */ = { - isa = PBXGroup; - children = ( - A56FAF1523322E210072ADD6 /* Message */, - ); - path = Actions; - sourceTree = ""; - }; A56BBFB92AB63E6500260D83 /* Data */ = { isa = PBXGroup; children = ( @@ -4184,32 +5155,16 @@ path = Message; sourceTree = ""; }; - A56FAF1523322E210072ADD6 /* Message */ = { - isa = PBXGroup; - children = ( - A5A7AFC2234932F30060113B /* PNAddMessageActionParser.h */, - A5A7AFC3234932F30060113B /* PNAddMessageActionParser.m */, - A5A7AFC1234932F30060113B /* PNFetchMessagesActionsParser.h */, - A5A7AFC0234932F30060113B /* PNFetchMessagesActionsParser.m */, - A5A7AFC4234932F30060113B /* PNRemoveMessageActionParser.h */, - A5A7AFC5234932F30060113B /* PNRemoveMessageActionParser.m */, - ); - path = Message; - sourceTree = ""; - }; A57A3002238D59B500DE8C68 /* Push Notifications */ = { isa = PBXGroup; children = ( - A57A3003238D59B500DE8C68 /* PNAddPushNotificationsRequest.h */, - A57A3008238D59B500DE8C68 /* PNAddPushNotificationsRequest.m */, - A57A3005238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h */, - A57A300B238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m */, - A57A3006238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h */, - A57A300A238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m */, - A57A3009238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h */, - A57A3004238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m */, + A5CFE50F2C1892AD00274165 /* PNPushNotificationManageRequest.h */, + A5CFE5102C1892AD00274165 /* PNPushNotificationManageRequest.m */, + A5CFE51B2C18969900274165 /* PNBasePushNotificationsRequest+Private.h */, A57A300C238D59B500DE8C68 /* PNBasePushNotificationsRequest.h */, A57A3007238D59B500DE8C68 /* PNBasePushNotificationsRequest.m */, + A5CFE5272C18C9D400274165 /* PNPushNotificationFetchRequest.h */, + A5567E492C1EDB02003C974F /* PNPushNotificationFetchRequest.m */, ); path = "Push Notifications"; sourceTree = ""; @@ -4247,9 +5202,175 @@ path = APNS; sourceTree = ""; }; + A5CB33A72C035D4C008527AA /* Transport */ = { + isa = PBXGroup; + children = ( + A5CB33DF2C0C7237008527AA /* PNTransportMiddlewareConfiguration.h */, + A5CB33E02C0C7237008527AA /* PNTransportMiddlewareConfiguration.m */, + A5E3B9FF2B2F669200D3AA18 /* PNRequestRetryConfiguration+Private.h */, + A5E3BA0B2B3118BD00D3AA18 /* PNRequestRetryConfiguration.h */, + A5E3BA0C2B3118BE00D3AA18 /* PNRequestRetryConfiguration.m */, + A5CB33EB2C0C7E94008527AA /* PNTransportConfiguration+Private.h */, + A5CB33C62C046A1A008527AA /* PNTransportConfiguration.h */, + A5CB33C72C046A1A008527AA /* PNTransportConfiguration.m */, + A5CB33D32C0C70B2008527AA /* PNTransportMiddleware.h */, + A5CB33D42C0C70B2008527AA /* PNTransportMiddleware.m */, + A5CB33C02C0371E6008527AA /* PNTransportRequest+Private.h */, + A5CB33A82C035D7D008527AA /* PNTransportRequest.h */, + A5CB33A92C035D7D008527AA /* PNTransportRequest.m */, + ); + path = Transport; + sourceTree = ""; + }; + A5CB33D22C05CBB0008527AA /* Categories */ = { + isa = PBXGroup; + children = ( + 79A238CF1D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfigurationPrivate.h */, + 79A238CD1D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.h */, + 79A238CE1D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.m */, + ); + path = Categories; + sourceTree = ""; + }; + A5CCEC5C2C0E816A00DB02A4 /* Transport */ = { + isa = PBXGroup; + children = ( + A5CCEC5B2C0E816A00DB02A4 /* PNTransportResponse.h */, + A5CCEC5A2C0E816A00DB02A4 /* PNTransport.h */, + A5CCEC592C0E816A00DB02A4 /* PNRequest.h */, + ); + path = Transport; + sourceTree = ""; + }; + A5CCEC5D2C0E816A00DB02A4 /* Protocols */ = { + isa = PBXGroup; + children = ( + A5CCEC5C2C0E816A00DB02A4 /* Transport */, + ); + name = Protocols; + path = ../../PubNub/Protocols; + sourceTree = ""; + }; + A5CFE41E2C10D7AA00274165 /* Channel Groups */ = { + isa = PBXGroup; + children = ( + A5567E822C1FCF0F003C974F /* PNChannelGroupFetchData.h */, + A5567E812C1FCF0F003C974F /* PNChannelGroupFetchData.m */, + ); + path = "Channel Groups"; + sourceTree = ""; + }; + A5CFE46D2C12613700274165 /* Error */ = { + isa = PBXGroup; + children = ( + A5CFE5CD2C1AFF9100274165 /* PNErrorData+Private.h */, + A5CFE5BB2C1AAAAC00274165 /* PNErrorData.h */, + A5CFE5BC2C1AAAAC00274165 /* PNErrorData.m */, + ); + path = Error; + sourceTree = ""; + }; + A5CFE4B62C1645D100274165 /* Publish */ = { + isa = PBXGroup; + children = ( + A5CFE4B82C1647B000274165 /* PNPublishData.h */, + A5CFE4B92C1647B000274165 /* PNPublishData.m */, + ); + path = Publish; + sourceTree = ""; + }; + A5CFE4B72C16462B00274165 /* Signal */ = { + isa = PBXGroup; + children = ( + A5CFE4D62C16500F00274165 /* PNSignalData.h */, + A5CFE4D72C16500F00274165 /* PNSignalData.m */, + ); + path = Signal; + sourceTree = ""; + }; + A5CFE4EE2C16526700274165 /* Time */ = { + isa = PBXGroup; + children = ( + A5CFE4EF2C16528700274165 /* PNTimeData.h */, + A5CFE4F02C16528700274165 /* PNTimeData.m */, + ); + path = Time; + sourceTree = ""; + }; + A5CFE5022C16576E00274165 /* Message Persistence */ = { + isa = PBXGroup; + children = ( + A5567FE52C222F1B003C974F /* PNHistoryMessageCountData.h */, + A53248D12C28D211003510FF /* PNHistoryMessageCountData.m */, + A5567FF12C2242B1003C974F /* PNHistoryFetchData+Private.h */, + A5CFE5032C1658E700274165 /* PNHistoryFetchData.h */, + A5CFE5042C1658E700274165 /* PNHistoryFetchData.m */, + ); + path = "Message Persistence"; + sourceTree = ""; + }; + A5CFE52D2C18D2CB00274165 /* Presence */ = { + isa = PBXGroup; + children = ( + A5CFE5522C18D3B600274165 /* PNPresenceStateFetchRequest.h */, + A5CFE5532C18D3B600274165 /* PNPresenceStateFetchRequest.m */, + A5567EE42C20A51A003C974F /* PNPresenceHeartbeatRequest.h */, + A5567EE52C20A51A003C974F /* PNPresenceHeartbeatRequest.m */, + A5CFE5462C18D3A700274165 /* PNPresenceStateSetRequest.h */, + A5CFE5472C18D3A700274165 /* PNPresenceStateSetRequest.m */, + A53248A72C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h */, + A5CFE59C2C1933BD00274165 /* PNPresenceLeaveRequest.h */, + A5CFE59D2C1933BD00274165 /* PNPresenceLeaveRequest.m */, + A5CFE53A2C18D38600274165 /* PNWhereNowRequest.h */, + A5CFE53B2C18D38600274165 /* PNWhereNowRequest.m */, + A5CFE52E2C18D33500274165 /* PNHereNowRequest.h */, + A5CFE52F2C18D33500274165 /* PNHereNowRequest.m */, + ); + path = Presence; + sourceTree = ""; + }; + A5CFE56A2C19064000274165 /* Message Persistence */ = { + isa = PBXGroup; + children = ( + A5CFE5832C19203700274165 /* PNHistoryMessagesCountRequest.h */, + A53248CB2C28A426003510FF /* PNHistoryMessagesCountRequest.m */, + A53248C52C28A3B4003510FF /* PNHistoryMessagesDeleteRequest.h */, + A5CFE5782C191B8100274165 /* PNHistoryMessagesDeleteRequest.m */, + A53249082C2C7262003510FF /* PNHistoryFetchRequest+Private.h */, + A5CFE56B2C19066C00274165 /* PNHistoryFetchRequest.h */, + A5CFE56C2C19066C00274165 /* PNHistoryFetchRequest.m */, + ); + path = "Message Persistence"; + sourceTree = ""; + }; + A5CFE58F2C192EB900274165 /* Subscribe */ = { + isa = PBXGroup; + children = ( + A55681292C2435A5003C974F /* PNSubscribeRequest+Private.h */, + A5CFE5902C192ECA00274165 /* PNSubscribeRequest.h */, + A5CFE5912C192ECA00274165 /* PNSubscribeRequest.m */, + ); + path = Subscribe; + sourceTree = ""; + }; + A5CFE5A82C19430100274165 /* Message Reaction */ = { + isa = PBXGroup; + children = ( + A5567E8D2C1FDEF7003C974F /* PNMessageActionsFetchData.h */, + A5567E8E2C1FDEF7003C974F /* PNMessageActionsFetchData.m */, + A5567E992C20243C003C974F /* PNMessageActionFetchData.h */, + A5567E9A2C20243C003C974F /* PNMessageActionFetchData.m */, + A55BCD14231D26110019DB68 /* PNMessageAction.h */, + A55BCD15231D26110019DB68 /* PNMessageAction.m */, + ); + path = "Message Reaction"; + sourceTree = ""; + }; A5DB70B12AAEFE58005B6559 /* Modules */ = { isa = PBXGroup; children = ( + A523EEDE2BFE90DC009F45AA /* Transport */, + A51B4A2A2BF0AF0E008C3370 /* Serializer */, A5DB70B22AAEFE58005B6559 /* Crypto */, ); name = Modules; @@ -4305,11 +5426,15 @@ A5FADC3E249028FF001D7704 /* Files */ = { isa = PBXGroup; children = ( + A55680632C2311CF003C974F /* PNGenerateFileDownloadURLRequest.h */, + A55680642C2311CF003C974F /* PNGenerateFileDownloadURLRequest.m */, A504E1BF24AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h */, A504E1BE24AE78E3006DCF5B /* PNGenerateFileUploadURLRequest.m */, 79DA780824BFC1CF00AC72F2 /* PNDownloadFileRequest+Private.h */, A504E1A624AD3209006DCF5B /* PNDownloadFileRequest.h */, A504E1A724AD3209006DCF5B /* PNDownloadFileRequest.m */, + A55680512C22BE6D003C974F /* PNFileUploadRequest.h */, + A55680522C22BE6D003C974F /* PNFileUploadRequest.m */, A504E1B224AD3219006DCF5B /* PNDeleteFileRequest.h */, A504E1B324AD3219006DCF5B /* PNDeleteFileRequest.m */, A504E0F024A8F314006DCF5B /* PNSendFileRequest+Private.h */, @@ -4328,135 +5453,164 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A57A301B238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h in Headers */, + A5CCEC682C0E816A00DB02A4 /* PNTransportResponse.h in Headers */, + A55681202C242EE6003C974F /* PNPresenceEventResult.h in Headers */, 79A238DE1D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfigurationPrivate.h in Headers */, - 791582771BD709C60084FC70 /* PNPushNotificationsStateModificationParser.h in Headers */, + A51B4A1F2BF0AE79008C3370 /* PNEncoder.h in Headers */, A55DAF0724B1FEC800766EE9 /* PNXML+Private.h in Headers */, 79AA8EC926EAB81500ADA747 /* PNConfiguration+Private.h in Headers */, A58975B223005AAC0093BD9A /* PNManageMembershipsStatus.h in Headers */, 79A238D01D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.h in Headers */, 791582521BD709C60084FC70 /* PNPresenceChannelGroupHereNowResult.h in Headers */, + A5CFE53D2C18D38600274165 /* PNWhereNowRequest.h in Headers */, 7932485E1D874D9F00FBDF36 /* PNPublishSequence.h in Headers */, + A5CB33C82C046A1A008527AA /* PNTransportConfiguration.h in Headers */, 79A0D8441DC22C950039A264 /* PNAPNSAuditAPICallBuilder.h in Headers */, A55A886122FD8272002D0A72 /* PNFetchMembershipsRequest.h in Headers */, - A56865602300622C0014E17C /* PNChannelMember+Private.h in Headers */, + A5CCEC632C0E816A00DB02A4 /* PNTransport.h in Headers */, A504E16C24AAA70A006DCF5B /* PNListFilesAPICallBuilder.h in Headers */, - 791582A21BD709C60084FC70 /* PNChannelGroupModificationParser.h in Headers */, - A57A3037238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h in Headers */, A56BBFC22AB900B600260D83 /* NSInputStream+PNURL.h in Headers */, A5DB713D2AAEFE58005B6559 /* PNCryptorHeaderV1Data.h in Headers */, 791582541BD709C60084FC70 /* PNChannelGroupClientStateResult.h in Headers */, + A55680C02C23A8CD003C974F /* PNSubscribeSignalEventData.h in Headers */, A55A86E022FD81E3002D0A72 /* PNFetchUUIDMetadataResult.h in Headers */, - 791582611BD709C60084FC70 /* PNPushNotificationsAuditParser.h in Headers */, + A5567F642C21ECBE003C974F /* PNPagedAppContextData+Private.h in Headers */, A504E1A824AD3209006DCF5B /* PNDownloadFileRequest.h in Headers */, 791582531BD709C60084FC70 /* PNPresenceChannelHereNowResult.h in Headers */, + A5567FA62C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h in Headers */, 791582551BD709C60084FC70 /* PNPresenceGlobalHereNowResult.h in Headers */, - 791582A01BD709C60084FC70 /* PNChannelGroupAuditionParser.h in Headers */, 791582561BD709C60084FC70 /* PNChannelGroupChannelsResult.h in Headers */, + A53248C02C25B7BB003510FF /* PNSubscribeStatus+Private.h in Headers */, 79F90F1A1FDEC1BA007132A3 /* PNPresenceHeartbeatAPICallBuilder.h in Headers */, - A55DAEF024B1FE7600766EE9 /* PNXMLParser.h in Headers */, + A55680E42C242BFF003C974F /* PNMessageResult.h in Headers */, + A5567E5F2C1F8C53003C974F /* PNOperationDataParser.h in Headers */, 79CFA2B926DE1C4900D206D4 /* PNPAMToken.h in Headers */, + A51B4A302BF0AFB8008C3370 /* PNJSONSerialization.h in Headers */, + A5CFE5BE2C1AAAAC00274165 /* PNErrorData.h in Headers */, A57A30F1238DDCA300DE8C68 /* PNAPNSNotificationPayload+Private.h in Headers */, 79A0D8501DC22C950039A264 /* PNPresenceHereNowAPICallBuilder.h in Headers */, 79A0D85E1DC22C950039A264 /* PNStreamAPICallBuilder.h in Headers */, A57A30C2238DC71800DE8C68 /* PNAPNSNotificationConfiguration.h in Headers */, - 791582881BD709C60084FC70 /* PNNetworkResponseSerializer.h in Headers */, 791582571BD709C60084FC70 /* PNAPNSEnabledChannelsResult.h in Headers */, A50319B22AA5B05900B25A44 /* PNResult.h in Headers */, + A556800A2C22603F003C974F /* PNClientStateGetResult+Private.h in Headers */, 791582591BD709C60084FC70 /* PNChannelClientStateResult.h in Headers */, - 79E20D241C8AEC5B001BC9CC /* PNSubscribeStatus+Private.h in Headers */, + A556809C2C2385BC003C974F /* PNSubscribeMessageEventData.h in Headers */, 7915825A1BD709C60084FC70 /* PNClientStateUpdateStatus.h in Headers */, - A55A86B122FD817E002D0A72 /* PNChannelMetadata+Private.h in Headers */, - 791582961BD709C60084FC70 /* PNPresenceWhereNowParser.h in Headers */, + A5567FB82C221136003C974F /* PNChannelMetadataFetchData.h in Headers */, + A55680B42C238EEB003C974F /* PNSubscribeObjectEventData.h in Headers */, + A5CFE40F2C0F246400274165 /* PNBaseRequest.h in Headers */, 791582581BD709C60084FC70 /* PNPresenceWhereNowResult.h in Headers */, - 791582A41BD709C60084FC70 /* PNPresenceHereNowParser.h in Headers */, + A51B4A132BF0AE36008C3370 /* PNCodable.h in Headers */, A52DC1E62307E10B001F20B0 /* NSDateFormatter+PNCacheable.h in Headers */, + A5CFE5282C18C9D400274165 /* PNPushNotificationFetchRequest.h in Headers */, A55BCCA22319243F0019DB68 /* PNAddMessageActionStatus.h in Headers */, + A5CFE5862C19203700274165 /* PNHistoryMessagesCountRequest.h in Headers */, 791582A11BD709C60084FC70 /* PubNub+SubscribePrivate.h in Headers */, A55A87AB22FD8272002D0A72 /* PNFetchUUIDMetadataRequest.h in Headers */, + A5567EA92C20371C003C974F /* PNPresenceHereNowFetchData.h in Headers */, 791582951BD709C60084FC70 /* PubNub+PresencePrivate.h in Headers */, - 791582921BD709C60084FC70 /* PNMessagePublishParser.h in Headers */, 7915825B1BD709C60084FC70 /* PNAcknowledgmentStatus.h in Headers */, 791582A61BD709C60084FC70 /* PNErrorStatus+Private.h in Headers */, + A5CFE4BB2C1647B000274165 /* PNPublishData.h in Headers */, A504E1C524AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h in Headers */, A50319D62AA65EB400B25A44 /* NSArray+PNMap.h in Headers */, A55BCD06231D22400019DB68 /* PNFetchMessagesActionsAPICallBuilder.h in Headers */, 791582871BD709C60084FC70 /* PNServiceData+Private.h in Headers */, 7915825E1BD709C60084FC70 /* PNEventsListener.h in Headers */, 797D605A22D2E41100E64C94 /* PNSignalAPICallBuilder.h in Headers */, - A56865B9230173030014E17C /* PNChannelMetadataChangeParser.h in Headers */, + A5CB33EC2C0C7E94008527AA /* PNTransportConfiguration+Private.h in Headers */, + A5567E902C1FDEF7003C974F /* PNMessageActionsFetchData.h in Headers */, A57A30DA238DC87400DE8C68 /* PNAPNSNotificationTarget.h in Headers */, 7951954326BD44E9001E308C /* PubNub+PAM.h in Headers */, A51B49E02BDA7806008C3370 /* PNRequestRetryConfiguration+Private.h in Headers */, - 7915825C1BD709C60084FC70 /* PNChannelGroupsResult.h in Headers */, 79E20D151C8AEC3A001BC9CC /* PNEnvelopeInformation.h in Headers */, - A55CA69D2397389100B24E02 /* PNKeychain+Private.h in Headers */, A55A864122FD80B9002D0A72 /* PNFetchAllUUIDMetadataAPICallBuilder.h in Headers */, + A5567F0B2C219757003C974F /* PNBaseAppContextObject.h in Headers */, A5046E17247844E70008C81E /* PNSetChannelMembersAPICallBuilder.h in Headers */, + A5CFE5492C18D3A700274165 /* PNPresenceStateSetRequest.h in Headers */, 7925DB951D3FFCAC00857C0D /* PNLLogFileInformation.h in Headers */, A55A87FF22FD8272002D0A72 /* PNSetChannelMetadataRequest.h in Headers */, - 797ABBCC24C6E8650008CA1E /* PNDeleteFileParser.h in Headers */, A5897592230014220093BD9A /* PNManageChannelMembersAPICallBuilder.h in Headers */, + A5567EDB2C209FF7003C974F /* PNPresenceWhereNowFetchData.h in Headers */, A55A85D122FD8078002D0A72 /* PubNub+Objects.h in Headers */, + A5567EF12C20D3DE003C974F /* PNPresenceHereNowFetchData+Private.h in Headers */, 79A0D8521DC22C950039A264 /* PNPresenceWhereNowAPICallBuilder.h in Headers */, + A5CFE5312C18D33500274165 /* PNHereNowRequest.h in Headers */, 79650C2C1E775E8300006F66 /* PNDefines.h in Headers */, - 7915829B1BD709C60084FC70 /* PNClientStateParser.h in Headers */, - 791582901BD709C60084FC70 /* PNRequestParameters.h in Headers */, + A523EEE12BFE910A009F45AA /* PNURLSessionTransport.h in Headers */, + A5567F6C2C21F0EA003C974F /* PNUUIDMetadataFetchData.h in Headers */, 79A0D85C1DC22C950039A264 /* PNStateModificationAPICallBuilder.h in Headers */, 79A3E418221569BA00F2ADB9 /* PNMessageCountResult.h in Headers */, 797ABBAD24C415B50008CA1E /* PNBasePublishRequest+Private.h in Headers */, 7915827A1BD709C60084FC70 /* PNPrivateStructures.h in Headers */, A5A45186246D8CD5008ECC74 /* PNBaseObjectsMembershipRequest+Private.h in Headers */, - 79A3E428221569DA00F2ADB9 /* PNMessageCountParser.h in Headers */, + A5567F842C21F31E003C974F /* PNChannelMetadataFetchAllData.h in Headers */, A523692924A2270200656C19 /* PNAES+Private.h in Headers */, 79A0D86C1DC22C950039A264 /* PNTimeAPICallBuilder.h in Headers */, - A57A300D238D59B500DE8C68 /* PNAddPushNotificationsRequest.h in Headers */, + A53248FE2C2AC5C1003510FF /* PNChannelGroupsResult.h in Headers */, + A5CFE4402C11E8D500274165 /* PNChannelGroupManageRequest.h in Headers */, A57A30A8238D78C400DE8C68 /* PNBaseNotificationPayload+Private.h in Headers */, 791582601BD709C60084FC70 /* PNClientInformation.h in Headers */, + A5CFE4D92C16500F00274165 /* PNSignalData.h in Headers */, A55A87C722FD8272002D0A72 /* PNRemoveUUIDMetadataRequest.h in Headers */, + A5567F4E2C21E965003C974F /* PNMembershipsFetchData.h in Headers */, + A53249092C2C7262003510FF /* PNHistoryFetchRequest+Private.h in Headers */, A55A866B22FD80B9002D0A72 /* PNFetchAllChannelsMetadataAPICallBuilder.h in Headers */, - 7915825F1BD709C60084FC70 /* PNSubscriberResults.h in Headers */, 79A0D84E1DC22C950039A264 /* PNPresenceChannelHereNowAPICallBuilder.h in Headers */, A56FAEF2233161570072ADD6 /* PubNub+MessageActions.h in Headers */, + A53248C62C28A3B5003510FF /* PNHistoryMessagesDeleteRequest.h in Headers */, + A51B4A922BF0B1E3008C3370 /* PNLock.h in Headers */, 7915825D1BD709C60084FC70 /* PubNub+ChannelGroup.h in Headers */, 79A0D8561DC22C950039A264 /* PNPublishSizeAPICallBuilder.h in Headers */, 799D611524C391A100171C29 /* PNPublishFileMessageRequest.h in Headers */, A5046E21247844E70008C81E /* PNSetMembershipsAPICallBuilder.h in Headers */, A5A7B0002349330F0060113B /* PNBaseMessageActionRequest+Private.h in Headers */, A5A7AFF92349330F0060113B /* PNFetchMessageActionsRequest.h in Headers */, + A53248B42C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h in Headers */, 7915829F1BD709C60084FC70 /* PubNub+CorePrivate.h in Headers */, A504E19024AAA72E006DCF5B /* PNDeleteFileAPICallBuilder.h in Headers */, A55A885322FD8272002D0A72 /* PNFetchChannelMembersRequest.h in Headers */, - A57A3022238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h in Headers */, A5A7B00E2349330F0060113B /* PNAddMessageActionRequest.h in Headers */, + A51B4A542BF0B0CB008C3370 /* PNJSONCoder.h in Headers */, 79A0D8681DC22C950039A264 /* PNUnsubscribeAPICallBuilder.h in Headers */, A504E14C24AA9515006DCF5B /* PNFile+Private.h in Headers */, 797ABBA224C4148C0008CA1E /* PNBasePublishRequest.h in Headers */, - A56865E9230176760014E17C /* PNChannelMembersParser.h in Headers */, + A5567F5A2C21EBDF003C974F /* PNPagedAppContextData.h in Headers */, + A55681082C242E09003C974F /* PNObjectEventResult.h in Headers */, A55A877A22FD8272002D0A72 /* PNObjectsPaginatedRequest.h in Headers */, - 791582861BD709C60084FC70 /* PNHeartbeatParser.h in Headers */, + A5567E312C1EB4ED003C974F /* PNTimeRequest.h in Headers */, + A5CFE4712C14A90900274165 /* NSError+PNTransport.h in Headers */, A5FADC412490292A001D7704 /* PNSendFileRequest.h in Headers */, + A55680FC2C242D7C003C974F /* PNMessageActionResult.h in Headers */, A58975C223005BD80093BD9A /* PNMembership.h in Headers */, + A55680662C2311D0003C974F /* PNGenerateFileDownloadURLRequest.h in Headers */, 79A0D8641DC22C950039A264 /* PNSubscribeAPIBuilder.h in Headers */, - A55A888422FD8272002D0A72 /* PNRequest+Private.h in Headers */, + A5567E782C1FCADC003C974F /* PNPushNotificationFetchData.h in Headers */, + A55680CC2C2400B3003C974F /* PNSubscribePresenceEventData.h in Headers */, + A5CB33AA2C035D7D008527AA /* PNTransportRequest.h in Headers */, 797D607122D2E44000E64C94 /* PNSignalStatus.h in Headers */, - 79CD277324D75AE9000698DD /* PNInMemoryStorage.h in Headers */, - 791582821BD709C60084FC70 /* PNSubscribeParser.h in Headers */, + A55680542C22BE6D003C974F /* PNFileUploadRequest.h in Headers */, + A55680942C237BC1003C974F /* PNSubscribeEventData+Private.h in Headers */, + A5CCEC5E2C0E816A00DB02A4 /* PNRequest.h in Headers */, 791582631BD709C60084FC70 /* PNSubscribeStatus.h in Headers */, + A5CB33C12C0371E6008527AA /* PNTransportRequest+Private.h in Headers */, 7915829E1BD709C60084FC70 /* PNOperationResult+Private.h in Headers */, + A5567E522C1F0484003C974F /* PNSignalRequest.h in Headers */, 791582841BD709C60084FC70 /* PNStatus+Private.h in Headers */, 791582621BD709C60084FC70 /* PubNub+Subscribe.h in Headers */, A58975D223005BE60093BD9A /* PNChannelMember.h in Headers */, A55DAEFC24B1FE9E00766EE9 /* PNXML.h in Headers */, A55A87DC22FD8272002D0A72 /* PNBaseObjectsRequest.h in Headers */, A57A3089238D751400DE8C68 /* PNMPNSNotificationPayload.h in Headers */, + A5567FC42C221231003C974F /* PNChannelMetadataSetData.h in Headers */, 79A0D86E1DC22C950039A264 /* PNAPICallBuilder+Private.h in Headers */, A5DB70D92AAEFE58005B6559 /* PNCryptoModule.h in Headers */, A57A30E9238DCAAF00DE8C68 /* PNAPNSNotificationTarget+Private.h in Headers */, A55A881B22FD8272002D0A72 /* PNFetchAllChannelsMetadataRequest.h in Headers */, - A56865C9230173AA0014E17C /* PNObjectsRemoveParser.h in Headers */, 7915829D1BD709C60084FC70 /* PNStateListener.h in Headers */, - 791582911BD709C60084FC70 /* PNHistoryParser.h in Headers */, + A51B4A3C2BF0B097008C3370 /* PNJSONDecoder.h in Headers */, + A5567EF72C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h in Headers */, 791582681BD709C60084FC70 /* PNHistoryResult.h in Headers */, 791582671BD709C60084FC70 /* PNConfiguration.h in Headers */, 79A0D86F1DC22C950039A264 /* PNAPICallBuilder.h in Headers */, @@ -4465,134 +5619,174 @@ 79A0D84C1DC22C950039A264 /* PNPresenceChannelGroupHereNowAPICallBuilder.h in Headers */, 79A0D8541DC22C950039A264 /* PNPublishAPICallBuilder.h in Headers */, 791582661BD709C60084FC70 /* PNPublishStatus.h in Headers */, + A55680422C229D8D003C974F /* PNFileSendData.h in Headers */, A55A861022FD80B9002D0A72 /* PNRemoveUUIDMetadataAPICallBuilder.h in Headers */, 79A0D8661DC22C950039A264 /* PNSubscribeChannelsOrGroupsAPIBuilder.h in Headers */, - A55BCD25231D27F00019DB68 /* PNMessageAction+Private.h in Headers */, 791582641BD709C60084FC70 /* PubNub+Presence.h in Headers */, 791582811BD709C60084FC70 /* PNReachability.h in Headers */, 791582691BD709C60084FC70 /* PubNub+History.h in Headers */, 79A0D8461DC22C950039A264 /* PNAPNSModificationAPICallBuilder.h in Headers */, + A51B4A192BF0AE57008C3370 /* PNDecoder.h in Headers */, 791582651BD709C60084FC70 /* PubNub+Publish.h in Headers */, + A53248E02C28E3AB003510FF /* PNXMLParser.h in Headers */, + A55681142C242E96003C974F /* PNFileEventResult.h in Headers */, + A5567ECF2C208652003C974F /* PNSubscribeEventData.h in Headers */, + A5CFE5C82C1AE33500274165 /* PNBaseOperationData+Private.h in Headers */, A5DB71062AAEFE58005B6559 /* PNAESCBCCryptor+Private.h in Headers */, - A504E13524AA9361006DCF5B /* PNListFilesParser.h in Headers */, - 7915828D1BD709C60084FC70 /* PNLeaveParser.h in Headers */, 791582891BD709C60084FC70 /* PNClientState.h in Headers */, - 791582791BD709C60084FC70 /* PNErrorParser.h in Headers */, + A51B4A7A2BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h in Headers */, 79CFA2AD26DE0AEB00D206D4 /* PNCBORDecoder.h in Headers */, A5897582230014160093BD9A /* PNFetchMembershipsAPICallBuilder.h in Headers */, - A55A873E22FD825A002D0A72 /* PNUUIDMetadataChangeParser.h in Headers */, - A5A7AFD4234932F30060113B /* PNAddMessageActionParser.h in Headers */, + A53248A82C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h in Headers */, + A51B4A0C2BF0ADD6008C3370 /* PNJSONSerializer.h in Headers */, 791582711BD709C60084FC70 /* PNErrorStatus.h in Headers */, - A56865A9230172950014E17C /* PNFetchChannelsMetadataParser.h in Headers */, A5DB70F22AAEFE58005B6559 /* PNLegacyCryptor.h in Headers */, 79A0D8581DC22C950039A264 /* PNStateAPICallBuilder.h in Headers */, 79A0D8621DC22C950039A264 /* PNStreamModificationAPICallBuilder.h in Headers */, 7915826A1BD709C60084FC70 /* PNServiceData.h in Headers */, - 79CD276724D75342000698DD /* PNKeychainStorage.h in Headers */, 79A0D8601DC22C950039A264 /* PNStreamAuditAPICallBuilder.h in Headers */, 79A0D8481DC22C950039A264 /* PNHistoryAPICallBuilder.h in Headers */, 791582971BD709C60084FC70 /* PNDictionary.h in Headers */, + A5567F362C21E4DF003C974F /* PNUUIDMetadataSetData.h in Headers */, + A55680362C229587003C974F /* PNFileGenerateUploadURLData.h in Headers */, 799D610324C36D5B00171C29 /* PNPublishRequest.h in Headers */, + A55680D82C2428E8003C974F /* PNSubscribeFileEventData.h in Headers */, 79650C2D1E775E8300006F66 /* PNLockSupport.h in Headers */, 791582941BD709C60084FC70 /* PNSubscriber.h in Headers */, + A53248F72C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h in Headers */, 791582831BD709C60084FC70 /* PNURLRequest.h in Headers */, - 79CD275524D6A1CB000698DD /* PNDataStorage.h in Headers */, A55A865D22FD80B9002D0A72 /* PNFetchChannelMetadataAPICallBuilder.h in Headers */, A5A4519E246DE792008ECC74 /* PNRemoveMembershipsRequest.h in Headers */, - A504E11C24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h in Headers */, + A55680A82C23880C003C974F /* PNSubscribeMessageActionEventData.h in Headers */, A55A86B822FD817E002D0A72 /* PNChannelMetadata.h in Headers */, - 7915827E1BD709C60084FC70 /* PNURLBuilder.h in Headers */, - A55A86BF22FD817E002D0A72 /* PNUUIDMetadata+Private.h in Headers */, - 7915827C1BD709C60084FC70 /* PNTimeParser.h in Headers */, + A5567E9C2C20243C003C974F /* PNMessageActionFetchData.h in Headers */, A57A30D1238DC7FF00DE8C68 /* PNAPNSNotificationConfiguration+Private.h in Headers */, 791582721BD709C60084FC70 /* PNStructures.h in Headers */, + A55680842C23527D003C974F /* PNFileDownloadData.h in Headers */, + A5CFE5CE2C1AFF9100274165 /* PNErrorData+Private.h in Headers */, + A5567F1E2C21D53D003C974F /* PNChannelMembersManageData.h in Headers */, + A55680F02C242D11003C974F /* PNSignalResult.h in Headers */, + A55680042C225579003C974F /* PNPresenceUserStateFetchData+Private.h in Headers */, A57A304C238D59B500DE8C68 /* PNBasePushNotificationsRequest.h in Headers */, + A5CFE51C2C18969900274165 /* PNBasePushNotificationsRequest+Private.h in Headers */, A5DB71472AAEFE58005B6559 /* PNCryptorHeader.h in Headers */, A5DB71422AAEFE58005B6559 /* PNCryptorHeader+Private.h in Headers */, + A5567EFD2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h in Headers */, 791582701BD709C60084FC70 /* PNTimeResult.h in Headers */, - 7915826D1BD709C60084FC70 /* PNErrorCodes.h in Headers */, + A5567F152C219B9A003C974F /* PNBaseAppContextObject+Private.h in Headers */, A55A869C22FD80B9002D0A72 /* PNRemoveChannelMetadataAPICallBuilder.h in Headers */, + A5CCEC4F2C0E006000DB02A4 /* PNURLSessionTransportResponse.h in Headers */, 79A0D85A1DC22C950039A264 /* PNStateAuditAPICallBuilder.h in Headers */, A504E0F824AA8AEA006DCF5B /* PNListFilesRequest.h in Headers */, A504E15424AA9CFB006DCF5B /* PNFilesAPICallBuilder.h in Headers */, A55A879622FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.h in Headers */, A5ADD6262AC0CE8100310A08 /* NSInputStream+PNCrypto.h in Headers */, A5897572230014090093BD9A /* PNManageMembershipsAPICallBuilder.h in Headers */, + A51B4A6E2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h in Headers */, + A55680292C2294EE003C974F /* PNGenerateFileUploadURLStatus.h in Headers */, + A5CFE5122C1892AD00274165 /* PNPushNotificationManageRequest.h in Headers */, 7915826C1BD709C60084FC70 /* PubNub+State.h in Headers */, 79A3E40F2215699900F2ADB9 /* PNMessageCountAPICallBuilder.h in Headers */, 7915829C1BD709C60084FC70 /* PNConstants.h in Headers */, 791582781BD709C60084FC70 /* PNHeartbeat.h in Headers */, 79A0D8421DC22C950039A264 /* PNAPNSAPICallBuilder.h in Headers */, A5DB710B2AAEFE58005B6559 /* PNCryptorInputStream.h in Headers */, + A5567FDB2C221A20003C974F /* PNFetchAllUUIDMetadataResult.h in Headers */, + A556804C2C22BA84003C974F /* PNFileSendData+Private.h in Headers */, + A556801E2C226866003C974F /* PNPresenceUserStateSetData.h in Headers */, A5A7B0312349330F0060113B /* PNBaseMessageActionRequest.h in Headers */, A5A7B02A2349330F0060113B /* PNRemoveMessageActionRequest.h in Headers */, A586A9EC2337E581008856D2 /* PNFetchMessageActionsResult.h in Headers */, A57A3099238D784A00DE8C68 /* PNBaseNotificationPayload.h in Headers */, 7915826F1BD709C60084FC70 /* PubNub+Core.h in Headers */, + A5CFE59F2C1933BD00274165 /* PNPresenceLeaveRequest.h in Headers */, A55A878822FD8272002D0A72 /* PNSetUUIDMetadataRequest.h in Headers */, A55A863A22FD80B9002D0A72 /* PNFetchUUIDMetadataAPICallBuilder.h in Headers */, 7915826E1BD709C60084FC70 /* PubNub+Time.h in Headers */, + A5CFE4F22C16528700274165 /* PNTimeData.h in Headers */, + A5CFE5062C1658E700274165 /* PNHistoryFetchData.h in Headers */, A5A45205246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.h in Headers */, + A51B4A862BF0B197008C3370 /* PNFunctions.h in Headers */, + A55680102C226378003C974F /* PNChannelGroupClientStateResult+Private.h in Headers */, A589756922FEF0F70093BD9A /* PNBaseObjectsRequest+Private.h in Headers */, + A556808E2C235360003C974F /* PNFileDownloadData+Private.h in Headers */, 7915826B1BD709C60084FC70 /* PubNub+APNS.h in Headers */, + A5567E3F2C1ECC59003C974F /* PNPresenceStateFetchResult.h in Headers */, 791582851BD709C60084FC70 /* PNLogMacro.h in Headers */, 7960B6631F6811D700FFAEBB /* PNDeleteMessageAPICallBuilder.h in Headers */, + A556807C2C234B4E003C974F /* PNFileListFetchData+Private.h in Headers */, A55BCD16231D26110019DB68 /* PNMessageAction.h in Headers */, + A51B4AAB2BF37F03008C3370 /* PNChannelGroupFetchRequest.h in Headers */, A50319AB2AA48F1A00B25A44 /* PNCryptor.h in Headers */, - 79E2D0EE1C56434700BAA244 /* PNKeychain.h in Headers */, A55BCCF6231D222B0019DB68 /* PNRemoveMessageActionAPICallBuilder.h in Headers */, - 791582991BD709C60084FC70 /* PNNetwork.h in Headers */, A504E14124AA94C8006DCF5B /* PNFile.h in Headers */, + A5CFE5932C192ECA00274165 /* PNSubscribeRequest.h in Headers */, A55BCCE6231D21840019DB68 /* PNAddMessageActionAPICallBuilder.h in Headers */, A5DB70ED2AAEFE58005B6559 /* PNCCCryptorWrapper.h in Headers */, A55A871F22FD81E3002D0A72 /* PNSetChannelMetadataStatus.h in Headers */, A504E18424AAA724006DCF5B /* PNDownloadFileAPICallBuilder.h in Headers */, A5DB70942AAE778F005B6559 /* PNSequenceInputStream.h in Headers */, 791582931BD709C60084FC70 /* PNChannel.h in Headers */, + A5567E6B2C1FBE44003C974F /* PubNub+Deprecated.h in Headers */, 7915827F1BD709C60084FC70 /* PNHelpers.h in Headers */, + A51B4A622BF0B117008C3370 /* PNJSONCodableObjects.h in Headers */, A5105B50238F027D00CB693D /* PNDate.h in Headers */, 79CD276024D6A371000698DD /* PNKeyValueStorage.h in Headers */, 799D60EA24C1B33900171C29 /* PNSendFileStatus.h in Headers */, - A5686599230170690014E17C /* PNFetchUUIDMetadataParser.h in Headers */, + A51B4A9E2BF0B428008C3370 /* PNError.h in Headers */, + A5567FF22C2242B1003C974F /* PNHistoryFetchData+Private.h in Headers */, + A5567FFA2C225146003C974F /* PNPresenceUserStateFetchData.h in Headers */, + A5CFE56E2C19066C00274165 /* PNHistoryFetchRequest.h in Headers */, + A53248BA2C24E3D4003510FF /* PNSubscribeFileEventData+Private.h in Headers */, A55A861722FD80B9002D0A72 /* PNSetUUIDMetadataAPICallBuilder.h in Headers */, 79A0D86A1DC22C950039A264 /* PNUnsubscribeChannelsOrGroupsAPICallBuilder.h in Headers */, - 79ABD8911F01636B007634E0 /* PNTelemetry.h in Headers */, + A5567E882C1FCF0F003C974F /* PNChannelGroupFetchData.h in Headers */, 7925DB871D3FFCAC00857C0D /* PNLLogger.h in Headers */, 793887041BEAD49100DCC662 /* PNNumber.h in Headers */, + A5567F422C21E723003C974F /* PNChannelMembersFetchData.h in Headers */, A57A30B2238DC6B600DE8C68 /* PNAPNSNotificationPayload.h in Headers */, 7915828C1BD709C60084FC70 /* PNParser.h in Headers */, + A55680162C226632003C974F /* PNChannelClientStateResult+Private.h in Headers */, A5046E2F2478471D0008C81E /* PNSetChannelMembersRequest.h in Headers */, 7915828B1BD709C60084FC70 /* PNString.h in Headers */, A57A3069238D6BCC00DE8C68 /* PNFCMNotificationPayload.h in Headers */, 791582741BD709C60084FC70 /* PNOperationResult.h in Headers */, + A5567EC32C207800003C974F /* PNSubscribeCursorData.h in Headers */, 797ABBB424C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.h in Headers */, + A5567F2A2C21DB10003C974F /* PNMembershipsManageData.h in Headers */, A504E0F124A8F314006DCF5B /* PNSendFileRequest+Private.h in Headers */, - A504E1CC24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h in Headers */, 791582731BD709C60084FC70 /* PNStatus.h in Headers */, - A55A888B22FD8272002D0A72 /* PNRequest.h in Headers */, - A58975E123005CFB0093BD9A /* PNMembership+Private.h in Headers */, + A5CFE5552C18D3B600274165 /* PNPresenceStateFetchRequest.h in Headers */, A5FADC342490270E001D7704 /* PubNub+Files.h in Headers */, - A5A7AFE2234932F30060113B /* PNRemoveMessageActionParser.h in Headers */, A504E1B424AD3219006DCF5B /* PNDeleteFileRequest.h in Headers */, 79A0D84A1DC22C950039A264 /* PNPresenceAPICallBuilder.h in Headers */, A56BBFBB2AB63F8F00260D83 /* PNCryptoProvider.h in Headers */, A504E1D824B04751006DCF5B /* PNFilesManager.h in Headers */, - A55A872622FD81E3002D0A72 /* PNFetchChannelsMetadataResult.h in Headers */, + A5567EE72C20A51A003C974F /* PNPresenceHeartbeatRequest.h in Headers */, + A55A872622FD81E3002D0A72 /* PNFetchChannelMetadataResult.h in Headers */, + A5567FE82C222F1B003C974F /* PNHistoryMessageCountData.h in Headers */, + A5567FD42C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h in Headers */, + A53248AE2C24D987003510FF /* PNJSONDecoder+Private.h in Headers */, A504E10424AA8F44006DCF5B /* PNListFilesResult.h in Headers */, + A51B4A482BF0B0B0008C3370 /* PNJSONEncoder.h in Headers */, 7915828F1BD709C60084FC70 /* PNArray.h in Headers */, 79CFA2D026DE1CD100D206D4 /* PNPAMToken+Private.h in Headers */, + A5CB33D52C0C70B2008527AA /* PNTransportMiddleware.h in Headers */, 7915828E1BD709C60084FC70 /* PNData.h in Headers */, A5DB70E82AAEFE58005B6559 /* PNAESCBCCryptor.h in Headers */, 7915827D1BD709C60084FC70 /* PNGZIP.h in Headers */, A55A882222FD8272002D0A72 /* PNFetchChannelMetadataRequest.h in Headers */, + A5CFE45E2C123F2E00274165 /* PNBaseOperationData.h in Headers */, + A51B4A252BF0AE92008C3370 /* PNObjectSerializer.h in Headers */, + A5567F782C21F203003C974F /* PNUUIDMetadataFetchAllData.h in Headers */, A504E16024AAA6FE006DCF5B /* PNSendFileAPICallBuilder.h in Headers */, A56865892300729E0014E17C /* PNFetchChannelMembersResult.h in Headers */, - A56865692300709F0014E17C /* PNFetchMembershipsResult.h in Headers */, A55A868022FD80B9002D0A72 /* PNSetChannelMetadataAPICallBuilder.h in Headers */, A57A3059238D65A200DE8C68 /* PNNotificationsPayload.h in Headers */, + A556812A2C2435A5003C974F /* PNSubscribeRequest+Private.h in Headers */, A504E12824AA90B8006DCF5B /* PNDownloadFileResult.h in Headers */, + A55680722C2344A9003C974F /* PNFileListFetchData.h in Headers */, A504E19C24ACCA42006DCF5B /* PNFileDownloadURLAPICallBuilder.h in Headers */, - 79AA8ECF26EB3A1200ADA747 /* PubNub+PAMPrivate.h in Headers */, 7915827B1BD709C60084FC70 /* PNJSON.h in Headers */, 791582751BD709C60084FC70 /* PubNub.h in Headers */, A55A887622FD8272002D0A72 /* PNManageChannelMembersRequest.h in Headers */, @@ -4600,21 +5794,23 @@ A58975A2230014300093BD9A /* PNFetchChannelMembersAPICallBuilder.h in Headers */, DD71B9872595DE1337983CE1 /* PNClientStateGetResult.h in Headers */, A55A870322FD81E3002D0A72 /* PNSetUUIDMetadataStatus.h in Headers */, - 797ABBD724C9ADB80008CA1E /* PNSendFileStatus+Private.h in Headers */, A5A451EB246F2679008ECC74 /* PNRemoveChannelMembersAPICallBuilder.h in Headers */, - A5A7AFCD234932F30060113B /* PNFetchMessagesActionsParser.h in Headers */, A5DB70E32AAEFE58005B6559 /* PNEncryptedStream.h in Headers */, - A56865D9230175EC0014E17C /* PNMembershipsParser.h in Headers */, + A5567EB72C2077AE003C974F /* PNSubscribeData.h in Headers */, A5A4517A246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h in Headers */, + A5CFE4192C1076A700274165 /* PNBaseRequest+Private.h in Headers */, 79DA780924BFC1CF00AC72F2 /* PNDownloadFileRequest+Private.h in Headers */, A5DB70DE2AAEFE58005B6559 /* PNEncryptedData.h in Headers */, + A5567F972C220E32003C974F /* PNFetchMembershipsResult.h in Headers */, A5E3BA0D2B3118BE00D3AA18 /* PNRequestRetryConfiguration.h in Headers */, A5046E392478471D0008C81E /* PNSetMembershipsRequest.h in Headers */, A55A86C622FD817E002D0A72 /* PNUUIDMetadata.h in Headers */, A5A451BD246DE8C3008ECC74 /* PNRemoveChannelMembersRequest.h in Headers */, + A5CB33E12C0C7237008527AA /* PNTransportMiddlewareConfiguration.h in Headers */, A5686579230072810014E17C /* PNManageChannelMembersStatus.h in Headers */, CA01FCC4C674165F0F483715 /* PNObjectsAPICallBuilder.h in Headers */, A5DB70D42AAEFE58005B6559 /* PNCryptorInputStream+Private.h in Headers */, + A5CFE5612C18E9C600274165 /* PNPresenceHereNowResult.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4622,135 +5818,164 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A57A301D238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h in Headers */, + A5CCEC6A2C0E816A00DB02A4 /* PNTransportResponse.h in Headers */, + A55681242C242EE6003C974F /* PNPresenceEventResult.h in Headers */, 79A0D92C1DC230AB0039A264 /* PNStreamAPICallBuilder.h in Headers */, 79A238E01D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfigurationPrivate.h in Headers */, + A51B4A212BF0AE79008C3370 /* PNEncoder.h in Headers */, A55DAF0924B1FEC800766EE9 /* PNXML+Private.h in Headers */, 79AA8ECB26EAB81500ADA747 /* PNConfiguration+Private.h in Headers */, A58975B423005AAC0093BD9A /* PNManageMembershipsStatus.h in Headers */, - 791583201BD709D10084FC70 /* PNPushNotificationsStateModificationParser.h in Headers */, 79A238D21D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.h in Headers */, + A5CFE5402C18D38600274165 /* PNWhereNowRequest.h in Headers */, 791582FB1BD709D10084FC70 /* PNPresenceChannelGroupHereNowResult.h in Headers */, + A5CB33CC2C046A1A008527AA /* PNTransportConfiguration.h in Headers */, 793248601D874D9F00FBDF36 /* PNPublishSequence.h in Headers */, A55A886322FD8272002D0A72 /* PNFetchMembershipsRequest.h in Headers */, - A56865622300622C0014E17C /* PNChannelMember+Private.h in Headers */, + A5CCEC652C0E816A00DB02A4 /* PNTransport.h in Headers */, A504E16E24AAA70A006DCF5B /* PNListFilesAPICallBuilder.h in Headers */, - 7915834B1BD709D10084FC70 /* PNChannelGroupModificationParser.h in Headers */, - A57A3039238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h in Headers */, A56BBFC42AB900B600260D83 /* NSInputStream+PNURL.h in Headers */, A5DB713F2AAEFE58005B6559 /* PNCryptorHeaderV1Data.h in Headers */, 791582FD1BD709D10084FC70 /* PNChannelGroupClientStateResult.h in Headers */, + A55680C42C23A8CD003C974F /* PNSubscribeSignalEventData.h in Headers */, A55A86E222FD81E3002D0A72 /* PNFetchUUIDMetadataResult.h in Headers */, - 7915830A1BD709D10084FC70 /* PNPushNotificationsAuditParser.h in Headers */, + A5567F662C21ECBE003C974F /* PNPagedAppContextData+Private.h in Headers */, A504E1AA24AD3209006DCF5B /* PNDownloadFileRequest.h in Headers */, 791582FC1BD709D10084FC70 /* PNPresenceChannelHereNowResult.h in Headers */, + A5567FA82C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h in Headers */, 791582FE1BD709D10084FC70 /* PNPresenceGlobalHereNowResult.h in Headers */, - 791583491BD709D10084FC70 /* PNChannelGroupAuditionParser.h in Headers */, 791582FF1BD709D10084FC70 /* PNChannelGroupChannelsResult.h in Headers */, + A53248C22C25B7BB003510FF /* PNSubscribeStatus+Private.h in Headers */, 79F90F1C1FDEC1C7007132A3 /* PNPresenceHeartbeatAPICallBuilder.h in Headers */, - A55DAEF224B1FE7600766EE9 /* PNXMLParser.h in Headers */, + A55680E82C242BFF003C974F /* PNMessageResult.h in Headers */, + A5567E622C1F8C53003C974F /* PNOperationDataParser.h in Headers */, 79CFA2BB26DE1C4900D206D4 /* PNPAMToken.h in Headers */, + A51B4A332BF0AFB8008C3370 /* PNJSONSerialization.h in Headers */, + A5CFE5C12C1AAAAC00274165 /* PNErrorData.h in Headers */, A57A30F3238DDCA300DE8C68 /* PNAPNSNotificationPayload+Private.h in Headers */, - 791583311BD709D10084FC70 /* PNNetworkResponseSerializer.h in Headers */, 79F85801219640C900BFD0B1 /* PNClientStateGetResult.h in Headers */, A57A30C4238DC71800DE8C68 /* PNAPNSNotificationConfiguration.h in Headers */, 791583001BD709D10084FC70 /* PNAPNSEnabledChannelsResult.h in Headers */, 791583021BD709D10084FC70 /* PNChannelClientStateResult.h in Headers */, A50319B42AA5B05900B25A44 /* PNResult.h in Headers */, - 79E20D261C8AEFF2001BC9CC /* PNSubscribeStatus+Private.h in Headers */, + A556800C2C22603F003C974F /* PNClientStateGetResult+Private.h in Headers */, + A55680A02C2385BC003C974F /* PNSubscribeMessageEventData.h in Headers */, 791583031BD709D10084FC70 /* PNClientStateUpdateStatus.h in Headers */, - 7915833F1BD709D10084FC70 /* PNPresenceWhereNowParser.h in Headers */, - A55A86B322FD817E002D0A72 /* PNChannelMetadata+Private.h in Headers */, 79A0D8B41DC22FBB0039A264 /* PNPresenceAPICallBuilder.h in Headers */, + A5567FBB2C221136003C974F /* PNChannelMetadataFetchData.h in Headers */, + A55680B82C238EEB003C974F /* PNSubscribeObjectEventData.h in Headers */, + A5CFE4132C0F246400274165 /* PNBaseRequest.h in Headers */, 791583011BD709D10084FC70 /* PNPresenceWhereNowResult.h in Headers */, - 7915834D1BD709D10084FC70 /* PNPresenceHereNowParser.h in Headers */, + A51B4A152BF0AE36008C3370 /* PNCodable.h in Headers */, A52DC1E82307E10B001F20B0 /* NSDateFormatter+PNCacheable.h in Headers */, + A5CFE52A2C18C9D400274165 /* PNPushNotificationFetchRequest.h in Headers */, A55BCCA42319243F0019DB68 /* PNAddMessageActionStatus.h in Headers */, + A5CFE5892C19203700274165 /* PNHistoryMessagesCountRequest.h in Headers */, 7915834A1BD709D10084FC70 /* PubNub+SubscribePrivate.h in Headers */, A55A87AD22FD8272002D0A72 /* PNFetchUUIDMetadataRequest.h in Headers */, + A5567EAC2C20371C003C974F /* PNPresenceHereNowFetchData.h in Headers */, 7915833E1BD709D10084FC70 /* PubNub+PresencePrivate.h in Headers */, - 7915833B1BD709D10084FC70 /* PNMessagePublishParser.h in Headers */, 791583041BD709D10084FC70 /* PNAcknowledgmentStatus.h in Headers */, 7915834F1BD709D10084FC70 /* PNErrorStatus+Private.h in Headers */, + A5CFE4BE2C1647B000274165 /* PNPublishData.h in Headers */, A504E1C724AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h in Headers */, A50319D82AA65EB400B25A44 /* NSArray+PNMap.h in Headers */, A55BCD08231D22400019DB68 /* PNFetchMessagesActionsAPICallBuilder.h in Headers */, 79A0D90E1DC230760039A264 /* PNStateAuditAPICallBuilder.h in Headers */, 791583301BD709D10084FC70 /* PNServiceData+Private.h in Headers */, 797D605C22D2E41100E64C94 /* PNSignalAPICallBuilder.h in Headers */, - A56865BB230173030014E17C /* PNChannelMetadataChangeParser.h in Headers */, + A5CB33EE2C0C7E94008527AA /* PNTransportConfiguration+Private.h in Headers */, + A5567E932C1FDEF7003C974F /* PNMessageActionsFetchData.h in Headers */, A57A30DC238DC87400DE8C68 /* PNAPNSNotificationTarget.h in Headers */, 7951954526BD44E9001E308C /* PubNub+PAM.h in Headers */, A51B49E22BDA7807008C3370 /* PNRequestRetryConfiguration+Private.h in Headers */, 791583071BD709D10084FC70 /* PNEventsListener.h in Headers */, - 791583051BD709D10084FC70 /* PNChannelGroupsResult.h in Headers */, - A55CA69F2397389100B24E02 /* PNKeychain+Private.h in Headers */, A55A864322FD80B9002D0A72 /* PNFetchAllUUIDMetadataAPICallBuilder.h in Headers */, + A5567F0E2C219757003C974F /* PNBaseAppContextObject.h in Headers */, A5046E19247844E70008C81E /* PNSetChannelMembersAPICallBuilder.h in Headers */, + A5CFE54C2C18D3A700274165 /* PNPresenceStateSetRequest.h in Headers */, 79E20D181C8AEC43001BC9CC /* PNEnvelopeInformation.h in Headers */, A55A880122FD8272002D0A72 /* PNSetChannelMetadataRequest.h in Headers */, - 797ABBCE24C6E8650008CA1E /* PNDeleteFileParser.h in Headers */, A5897594230014220093BD9A /* PNManageChannelMembersAPICallBuilder.h in Headers */, + A5567EDE2C209FF7003C974F /* PNPresenceWhereNowFetchData.h in Headers */, A55A85D322FD8078002D0A72 /* PubNub+Objects.h in Headers */, + A5567EF32C20D3DF003C974F /* PNPresenceHereNowFetchData+Private.h in Headers */, 7925DB971D3FFCAC00857C0D /* PNLLogFileInformation.h in Headers */, - 791583441BD709D10084FC70 /* PNClientStateParser.h in Headers */, + A5CFE5342C18D33500274165 /* PNHereNowRequest.h in Headers */, 79650C301E775E8C00006F66 /* PNDefines.h in Headers */, + A523EEE62BFE910A009F45AA /* PNURLSessionTransport.h in Headers */, 79A0D9811DC2314C0039A264 /* PNTimeAPICallBuilder.h in Headers */, - 791583391BD709D10084FC70 /* PNRequestParameters.h in Headers */, + A5567F6F2C21F0EA003C974F /* PNUUIDMetadataFetchData.h in Headers */, 79A3E41A221569BA00F2ADB9 /* PNMessageCountResult.h in Headers */, 797ABBAF24C415B50008CA1E /* PNBasePublishRequest+Private.h in Headers */, 79A0D9081DC230670039A264 /* PNStateAPICallBuilder.h in Headers */, A5A45188246D8CD5008ECC74 /* PNBaseObjectsMembershipRequest+Private.h in Headers */, - 79A3E42A221569DA00F2ADB9 /* PNMessageCountParser.h in Headers */, + A5567F872C21F31E003C974F /* PNChannelMetadataFetchAllData.h in Headers */, A523692B24A2270200656C19 /* PNAES+Private.h in Headers */, 791583231BD709D10084FC70 /* PNPrivateStructures.h in Headers */, - A57A300F238D59B500DE8C68 /* PNAddPushNotificationsRequest.h in Headers */, + A53249022C2AC5C1003510FF /* PNChannelGroupsResult.h in Headers */, + A5CFE4432C11E8D500274165 /* PNChannelGroupManageRequest.h in Headers */, A57A30AA238D78C400DE8C68 /* PNBaseNotificationPayload+Private.h in Headers */, 791583091BD709D10084FC70 /* PNClientInformation.h in Headers */, + A5CFE4DC2C16500F00274165 /* PNSignalData.h in Headers */, A55A87C922FD8272002D0A72 /* PNRemoveUUIDMetadataRequest.h in Headers */, + A5567F512C21E965003C974F /* PNMembershipsFetchData.h in Headers */, + A532490B2C2C7262003510FF /* PNHistoryFetchRequest+Private.h in Headers */, A55A866D22FD80B9002D0A72 /* PNFetchAllChannelsMetadataAPICallBuilder.h in Headers */, 79A0D9381DC230CC0039A264 /* PNStreamModificationAPICallBuilder.h in Headers */, - 791583081BD709D10084FC70 /* PNSubscriberResults.h in Headers */, A56FAEF4233161570072ADD6 /* PubNub+MessageActions.h in Headers */, + A53248C82C28A3B5003510FF /* PNHistoryMessagesDeleteRequest.h in Headers */, + A51B4A952BF0B1E3008C3370 /* PNLock.h in Headers */, 791583061BD709D10084FC70 /* PubNub+ChannelGroup.h in Headers */, 791583481BD709D10084FC70 /* PubNub+CorePrivate.h in Headers */, 799D611724C391A100171C29 /* PNPublishFileMessageRequest.h in Headers */, A5046E23247844E70008C81E /* PNSetMembershipsAPICallBuilder.h in Headers */, A5A7B0022349330F0060113B /* PNBaseMessageActionRequest+Private.h in Headers */, A5A7AFFB2349330F0060113B /* PNFetchMessageActionsRequest.h in Headers */, - 7915832F1BD709D10084FC70 /* PNHeartbeatParser.h in Headers */, + A53248B62C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h in Headers */, A504E19224AAA72E006DCF5B /* PNDeleteFileAPICallBuilder.h in Headers */, A55A885522FD8272002D0A72 /* PNFetchChannelMembersRequest.h in Headers */, - A57A3024238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h in Headers */, A5A7B0102349330F0060113B /* PNAddMessageActionRequest.h in Headers */, + A51B4A572BF0B0CB008C3370 /* PNJSONCoder.h in Headers */, 79A0D8901DC22F690039A264 /* PNAPNSAuditAPICallBuilder.h in Headers */, A504E14E24AA9515006DCF5B /* PNFile+Private.h in Headers */, 797ABBA424C4148C0008CA1E /* PNBasePublishRequest.h in Headers */, - A56865EB230176760014E17C /* PNChannelMembersParser.h in Headers */, + A5567F5D2C21EBDF003C974F /* PNPagedAppContextData.h in Headers */, + A556810C2C242E09003C974F /* PNObjectEventResult.h in Headers */, A55A877C22FD8272002D0A72 /* PNObjectsPaginatedRequest.h in Headers */, - 7915832B1BD709D10084FC70 /* PNSubscribeParser.h in Headers */, + A5567E362C1EB4ED003C974F /* PNTimeRequest.h in Headers */, + A5CFE4742C14A90900274165 /* NSError+PNTransport.h in Headers */, A5FADC432490292A001D7704 /* PNSendFileRequest.h in Headers */, + A55681002C242D7C003C974F /* PNMessageActionResult.h in Headers */, A58975C423005BD80093BD9A /* PNMembership.h in Headers */, + A55680692C2311D0003C974F /* PNGenerateFileDownloadURLRequest.h in Headers */, 7915830C1BD709D10084FC70 /* PNSubscribeStatus.h in Headers */, - A55A888622FD8272002D0A72 /* PNRequest+Private.h in Headers */, + A5567E7B2C1FCADC003C974F /* PNPushNotificationFetchData.h in Headers */, + A55680D02C2400B3003C974F /* PNSubscribePresenceEventData.h in Headers */, + A5CB33AE2C035D7D008527AA /* PNTransportRequest.h in Headers */, 797D607322D2E44000E64C94 /* PNSignalStatus.h in Headers */, - 79CD277524D75AE9000698DD /* PNInMemoryStorage.h in Headers */, + A55680572C22BE6D003C974F /* PNFileUploadRequest.h in Headers */, 791583471BD709D10084FC70 /* PNOperationResult+Private.h in Headers */, + A55680962C237BC1003C974F /* PNSubscribeEventData+Private.h in Headers */, + A5CCEC602C0E816A00DB02A4 /* PNRequest.h in Headers */, 7915832D1BD709D10084FC70 /* PNStatus+Private.h in Headers */, + A5CB33C32C0371E6008527AA /* PNTransportRequest+Private.h in Headers */, 7915830B1BD709D10084FC70 /* PubNub+Subscribe.h in Headers */, + A5567E572C1F0484003C974F /* PNSignalRequest.h in Headers */, 791583461BD709D10084FC70 /* PNStateListener.h in Headers */, - 7915833A1BD709D10084FC70 /* PNHistoryParser.h in Headers */, A58975D423005BE60093BD9A /* PNChannelMember.h in Headers */, A55DAEFE24B1FE9E00766EE9 /* PNXML.h in Headers */, A55A87DE22FD8272002D0A72 /* PNBaseObjectsRequest.h in Headers */, A57A308B238D751400DE8C68 /* PNMPNSNotificationPayload.h in Headers */, + A5567FC72C221231003C974F /* PNChannelMetadataSetData.h in Headers */, 791583111BD709D10084FC70 /* PNHistoryResult.h in Headers */, A5DB70DB2AAEFE58005B6559 /* PNCryptoModule.h in Headers */, A57A30EB238DCAAF00DE8C68 /* PNAPNSNotificationTarget+Private.h in Headers */, A55A881D22FD8272002D0A72 /* PNFetchAllChannelsMetadataRequest.h in Headers */, - A56865CB230173AA0014E17C /* PNObjectsRemoveParser.h in Headers */, 79A0D9621DC231040039A264 /* PNUnsubscribeChannelsOrGroupsAPICallBuilder.h in Headers */, + A51B4A3F2BF0B097008C3370 /* PNJSONDecoder.h in Headers */, 79A0D8781DC22F220039A264 /* PNAPICallBuilder.h in Headers */, + A5567EF92C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h in Headers */, 791583101BD709D10084FC70 /* PNConfiguration.h in Headers */, 7915830F1BD709D10084FC70 /* PNPublishStatus.h in Headers */, 79A0D8721DC22F080039A264 /* PNAPICallBuilder+Private.h in Headers */, @@ -4759,134 +5984,174 @@ 7915830D1BD709D10084FC70 /* PubNub+Presence.h in Headers */, 7915832A1BD709D10084FC70 /* PNReachability.h in Headers */, 791583121BD709D10084FC70 /* PubNub+History.h in Headers */, + A55680452C229D8D003C974F /* PNFileSendData.h in Headers */, A55A861222FD80B9002D0A72 /* PNRemoveUUIDMetadataAPICallBuilder.h in Headers */, 7915830E1BD709D10084FC70 /* PubNub+Publish.h in Headers */, - A55BCD27231D27F00019DB68 /* PNMessageAction+Private.h in Headers */, - 791583361BD709D10084FC70 /* PNLeaveParser.h in Headers */, 791583321BD709D10084FC70 /* PNClientState.h in Headers */, - 791583221BD709D10084FC70 /* PNErrorParser.h in Headers */, 7915831A1BD709D10084FC70 /* PNErrorStatus.h in Headers */, + A51B4A1B2BF0AE57008C3370 /* PNDecoder.h in Headers */, 79A0D8A81DC22FA60039A264 /* PNHistoryAPICallBuilder.h in Headers */, + A55681182C242E96003C974F /* PNFileEventResult.h in Headers */, + A5567ED22C208652003C974F /* PNSubscribeEventData.h in Headers */, + A53248E22C28E3AB003510FF /* PNXMLParser.h in Headers */, + A5CFE5CA2C1AE33500274165 /* PNBaseOperationData+Private.h in Headers */, A5DB71082AAEFE58005B6559 /* PNAESCBCCryptor+Private.h in Headers */, - A504E13724AA9361006DCF5B /* PNListFilesParser.h in Headers */, 79A0D9321DC230BB0039A264 /* PNStreamAuditAPICallBuilder.h in Headers */, 791583131BD709D10084FC70 /* PNServiceData.h in Headers */, + A51B4A7D2BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h in Headers */, 791583401BD709D10084FC70 /* PNDictionary.h in Headers */, 79CFA2AF26DE0AEB00D206D4 /* PNCBORDecoder.h in Headers */, A5897584230014160093BD9A /* PNFetchMembershipsAPICallBuilder.h in Headers */, - A55A874022FD825A002D0A72 /* PNUUIDMetadataChangeParser.h in Headers */, - A5A7AFD6234932F30060113B /* PNAddMessageActionParser.h in Headers */, + A53248AA2C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h in Headers */, + A51B4A0E2BF0ADD6008C3370 /* PNJSONSerializer.h in Headers */, 7915833D1BD709D10084FC70 /* PNSubscriber.h in Headers */, - A56865AB230172950014E17C /* PNFetchChannelsMetadataParser.h in Headers */, A5DB70F42AAEFE58005B6559 /* PNLegacyCryptor.h in Headers */, 7915832C1BD709D10084FC70 /* PNURLRequest.h in Headers */, - 791583271BD709D10084FC70 /* PNURLBuilder.h in Headers */, 79A0D8CC1DC22FFA0039A264 /* PNPresenceWhereNowAPICallBuilder.h in Headers */, - 79CD276924D75342000698DD /* PNKeychainStorage.h in Headers */, - 791583251BD709D10084FC70 /* PNTimeParser.h in Headers */, 79A0D9501DC230F50039A264 /* PNSubscribeAPIBuilder.h in Headers */, 79A0D8F01DC230350039A264 /* PNPublishAPICallBuilder.h in Headers */, + A5567F392C21E4DF003C974F /* PNUUIDMetadataSetData.h in Headers */, + A55680392C229587003C974F /* PNFileGenerateUploadURLData.h in Headers */, 799D610524C36D5B00171C29 /* PNPublishRequest.h in Headers */, + A55680DC2C2428E8003C974F /* PNSubscribeFileEventData.h in Headers */, 7915831B1BD709D10084FC70 /* PNStructures.h in Headers */, 79650C361E775E9700006F66 /* PNLockSupport.h in Headers */, 79A0D9141DC230880039A264 /* PNStateModificationAPICallBuilder.h in Headers */, - 79CD275724D6A1CB000698DD /* PNDataStorage.h in Headers */, A55A865F22FD80B9002D0A72 /* PNFetchChannelMetadataAPICallBuilder.h in Headers */, + A53248F92C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h in Headers */, A5A451A0246DE792008ECC74 /* PNRemoveMembershipsRequest.h in Headers */, - A504E11E24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h in Headers */, + A55680AC2C23880C003C974F /* PNSubscribeMessageActionEventData.h in Headers */, A55A86BA22FD817E002D0A72 /* PNChannelMetadata.h in Headers */, 791583191BD709D10084FC70 /* PNTimeResult.h in Headers */, - A55A86C122FD817E002D0A72 /* PNUUIDMetadata+Private.h in Headers */, + A5567E9F2C20243C003C974F /* PNMessageActionFetchData.h in Headers */, 79A0D8C01DC22FD60039A264 /* PNPresenceChannelHereNowAPICallBuilder.h in Headers */, A57A30D3238DC7FF00DE8C68 /* PNAPNSNotificationConfiguration+Private.h in Headers */, - 791583161BD709D10084FC70 /* PNErrorCodes.h in Headers */, A57A304E238D59B500DE8C68 /* PNBasePushNotificationsRequest.h in Headers */, + A55680882C23527D003C974F /* PNFileDownloadData.h in Headers */, + A5CFE5D02C1AFF9100274165 /* PNErrorData+Private.h in Headers */, + A5567F212C21D53D003C974F /* PNChannelMembersManageData.h in Headers */, + A55680F42C242D11003C974F /* PNSignalResult.h in Headers */, + A55680062C225579003C974F /* PNPresenceUserStateFetchData+Private.h in Headers */, A5DB71492AAEFE58005B6559 /* PNCryptorHeader.h in Headers */, + A5CFE51E2C18969900274165 /* PNBasePushNotificationsRequest+Private.h in Headers */, A5DB71442AAEFE58005B6559 /* PNCryptorHeader+Private.h in Headers */, 791583151BD709D10084FC70 /* PubNub+State.h in Headers */, + A5567EFF2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h in Headers */, 791583451BD709D10084FC70 /* PNConstants.h in Headers */, + A5567F172C219B9A003C974F /* PNBaseAppContextObject+Private.h in Headers */, A55A869E22FD80B9002D0A72 /* PNRemoveChannelMetadataAPICallBuilder.h in Headers */, + A5CCEC542C0E006000DB02A4 /* PNURLSessionTransportResponse.h in Headers */, 79A0D9561DC230F90039A264 /* PNSubscribeChannelsOrGroupsAPIBuilder.h in Headers */, A504E0FA24AA8AEA006DCF5B /* PNListFilesRequest.h in Headers */, A504E15624AA9CFB006DCF5B /* PNFilesAPICallBuilder.h in Headers */, A55A879822FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.h in Headers */, A5ADD6282AC0CE8100310A08 /* NSInputStream+PNCrypto.h in Headers */, A5897574230014090093BD9A /* PNManageMembershipsAPICallBuilder.h in Headers */, + A51B4A712BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h in Headers */, + A556802B2C2294EE003C974F /* PNGenerateFileUploadURLStatus.h in Headers */, + A5CFE5152C1892AD00274165 /* PNPushNotificationManageRequest.h in Headers */, 791583211BD709D10084FC70 /* PNHeartbeat.h in Headers */, 79A3E4112215699900F2ADB9 /* PNMessageCountAPICallBuilder.h in Headers */, 791583181BD709D10084FC70 /* PubNub+Core.h in Headers */, 791583171BD709D10084FC70 /* PubNub+Time.h in Headers */, 79A0D8C61DC22FEA0039A264 /* PNPresenceHereNowAPICallBuilder.h in Headers */, A5DB710D2AAEFE58005B6559 /* PNCryptorInputStream.h in Headers */, + A5567FDD2C221A20003C974F /* PNFetchAllUUIDMetadataResult.h in Headers */, + A556804E2C22BA84003C974F /* PNFileSendData+Private.h in Headers */, + A55680212C226866003C974F /* PNPresenceUserStateSetData.h in Headers */, A5A7B0332349330F0060113B /* PNBaseMessageActionRequest.h in Headers */, A5A7B02C2349330F0060113B /* PNRemoveMessageActionRequest.h in Headers */, A586A9EE2337E581008856D2 /* PNFetchMessageActionsResult.h in Headers */, A57A309B238D784A00DE8C68 /* PNBaseNotificationPayload.h in Headers */, 791583141BD709D10084FC70 /* PubNub+APNS.h in Headers */, + A5CFE5A22C1933BD00274165 /* PNPresenceLeaveRequest.h in Headers */, A55A878A22FD8272002D0A72 /* PNSetUUIDMetadataRequest.h in Headers */, A55A863C22FD80B9002D0A72 /* PNFetchUUIDMetadataAPICallBuilder.h in Headers */, 7915832E1BD709D10084FC70 /* PNLogMacro.h in Headers */, + A5CFE4F52C16528700274165 /* PNTimeData.h in Headers */, + A5CFE5092C1658E700274165 /* PNHistoryFetchData.h in Headers */, A5A45207246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.h in Headers */, + A51B4A892BF0B197008C3370 /* PNFunctions.h in Headers */, + A55680122C226378003C974F /* PNChannelGroupClientStateResult+Private.h in Headers */, A589756B22FEF0F70093BD9A /* PNBaseObjectsRequest+Private.h in Headers */, - 79E2D0EF1C56434700BAA244 /* PNKeychain.h in Headers */, + A55680902C235360003C974F /* PNFileDownloadData+Private.h in Headers */, 79A0D8BA1DC22FC90039A264 /* PNPresenceChannelGroupHereNowAPICallBuilder.h in Headers */, - 791583421BD709D10084FC70 /* PNNetwork.h in Headers */, + A5567E442C1ECC59003C974F /* PNPresenceStateFetchResult.h in Headers */, A55BCD18231D26110019DB68 /* PNMessageAction.h in Headers */, + A556807E2C234B4E003C974F /* PNFileListFetchData+Private.h in Headers */, + A51B4AAE2BF37F03008C3370 /* PNChannelGroupFetchRequest.h in Headers */, A50319AD2AA48F1A00B25A44 /* PNCryptor.h in Headers */, 7960B6661F68122100FFAEBB /* PNDeleteMessageAPICallBuilder.h in Headers */, A55BCCF8231D222B0019DB68 /* PNRemoveMessageActionAPICallBuilder.h in Headers */, 7915833C1BD709D10084FC70 /* PNChannel.h in Headers */, A504E14324AA94C8006DCF5B /* PNFile.h in Headers */, + A5CFE5962C192ECA00274165 /* PNSubscribeRequest.h in Headers */, A55BCCE8231D21840019DB68 /* PNAddMessageActionAPICallBuilder.h in Headers */, A5DB70EF2AAEFE58005B6559 /* PNCCCryptorWrapper.h in Headers */, A55A872122FD81E3002D0A72 /* PNSetChannelMetadataStatus.h in Headers */, A504E18624AAA724006DCF5B /* PNDownloadFileAPICallBuilder.h in Headers */, A5DB70962AAE778F005B6559 /* PNSequenceInputStream.h in Headers */, 791583281BD709D10084FC70 /* PNHelpers.h in Headers */, + A5567E6E2C1FBE44003C974F /* PubNub+Deprecated.h in Headers */, 7925DB891D3FFCAC00857C0D /* PNLLogger.h in Headers */, + A51B4A652BF0B117008C3370 /* PNJSONCodableObjects.h in Headers */, A5105B52238F027D00CB693D /* PNDate.h in Headers */, 79CD276224D6A371000698DD /* PNKeyValueStorage.h in Headers */, 799D60EC24C1B33900171C29 /* PNSendFileStatus.h in Headers */, - A568659B230170690014E17C /* PNFetchUUIDMetadataParser.h in Headers */, + A51B4AA12BF0B428008C3370 /* PNError.h in Headers */, + A5567FF42C2242B1003C974F /* PNHistoryFetchData+Private.h in Headers */, + A5567FFD2C225146003C974F /* PNPresenceUserStateFetchData.h in Headers */, + A5CFE5712C19066C00274165 /* PNHistoryFetchRequest.h in Headers */, + A53248BC2C24E3D4003510FF /* PNSubscribeFileEventData+Private.h in Headers */, A55A861922FD80B9002D0A72 /* PNSetUUIDMetadataAPICallBuilder.h in Headers */, 793887061BEAD4A700DCC662 /* PNNumber.h in Headers */, + A5567E8A2C1FCF0F003C974F /* PNChannelGroupFetchData.h in Headers */, 791583351BD709D10084FC70 /* PNParser.h in Headers */, - 79ABD8931F01636B007634E0 /* PNTelemetry.h in Headers */, 791583341BD709D10084FC70 /* PNString.h in Headers */, + A5567F452C21E723003C974F /* PNChannelMembersFetchData.h in Headers */, A57A30B4238DC6B600DE8C68 /* PNAPNSNotificationPayload.h in Headers */, 79A0D95C1DC230FE0039A264 /* PNUnsubscribeAPICallBuilder.h in Headers */, + A55680182C226632003C974F /* PNChannelClientStateResult+Private.h in Headers */, A5046E312478471D0008C81E /* PNSetChannelMembersRequest.h in Headers */, 7915831D1BD709D10084FC70 /* PNOperationResult.h in Headers */, A57A306B238D6BCC00DE8C68 /* PNFCMNotificationPayload.h in Headers */, 7915831C1BD709D10084FC70 /* PNStatus.h in Headers */, + A5567EC62C207800003C974F /* PNSubscribeCursorData.h in Headers */, 797ABBB624C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.h in Headers */, + A5567F2D2C21DB10003C974F /* PNMembershipsManageData.h in Headers */, A504E0F324A8F314006DCF5B /* PNSendFileRequest+Private.h in Headers */, - A504E1CE24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h in Headers */, 791583381BD709D10084FC70 /* PNArray.h in Headers */, - A55A888D22FD8272002D0A72 /* PNRequest.h in Headers */, - A58975E323005CFB0093BD9A /* PNMembership+Private.h in Headers */, + A5CFE5582C18D3B600274165 /* PNPresenceStateFetchRequest.h in Headers */, A5FADC362490270E001D7704 /* PubNub+Files.h in Headers */, - A5A7AFE4234932F30060113B /* PNRemoveMessageActionParser.h in Headers */, A504E1B624AD3219006DCF5B /* PNDeleteFileRequest.h in Headers */, 79A0D89C1DC22F830039A264 /* PNAPNSModificationAPICallBuilder.h in Headers */, A56BBFBD2AB63F8F00260D83 /* PNCryptoProvider.h in Headers */, A504E1DA24B04751006DCF5B /* PNFilesManager.h in Headers */, - A55A872822FD81E3002D0A72 /* PNFetchChannelsMetadataResult.h in Headers */, + A5567EEA2C20A51A003C974F /* PNPresenceHeartbeatRequest.h in Headers */, + A55A872822FD81E3002D0A72 /* PNFetchChannelMetadataResult.h in Headers */, + A5567FEB2C222F1B003C974F /* PNHistoryMessageCountData.h in Headers */, + A5567FD62C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h in Headers */, + A53248B02C24D987003510FF /* PNJSONDecoder+Private.h in Headers */, A504E10624AA8F44006DCF5B /* PNListFilesResult.h in Headers */, + A51B4A4B2BF0B0B0008C3370 /* PNJSONEncoder.h in Headers */, 791583371BD709D10084FC70 /* PNData.h in Headers */, 79CFA2D226DE1CD100D206D4 /* PNPAMToken+Private.h in Headers */, + A5CB33D92C0C70B2008527AA /* PNTransportMiddleware.h in Headers */, 791583261BD709D10084FC70 /* PNGZIP.h in Headers */, A5DB70EA2AAEFE58005B6559 /* PNAESCBCCryptor.h in Headers */, 791583241BD709D10084FC70 /* PNJSON.h in Headers */, A55A882422FD8272002D0A72 /* PNFetchChannelMetadataRequest.h in Headers */, + A5CFE4612C123F2E00274165 /* PNBaseOperationData.h in Headers */, + A51B4A272BF0AE92008C3370 /* PNObjectSerializer.h in Headers */, + A5567F7B2C21F203003C974F /* PNUUIDMetadataFetchAllData.h in Headers */, A504E16224AAA6FE006DCF5B /* PNSendFileAPICallBuilder.h in Headers */, A568658B2300729E0014E17C /* PNFetchChannelMembersResult.h in Headers */, - A568656B2300709F0014E17C /* PNFetchMembershipsResult.h in Headers */, A55A868222FD80B9002D0A72 /* PNSetChannelMetadataAPICallBuilder.h in Headers */, A57A305B238D65A200DE8C68 /* PNNotificationsPayload.h in Headers */, + A556812C2C2435A5003C974F /* PNSubscribeRequest+Private.h in Headers */, A504E12A24AA90B8006DCF5B /* PNDownloadFileResult.h in Headers */, + A55680762C2344A9003C974F /* PNFileListFetchData.h in Headers */, A504E19E24ACCA42006DCF5B /* PNFileDownloadURLAPICallBuilder.h in Headers */, - 79AA8ED126EB3A1200ADA747 /* PubNub+PAMPrivate.h in Headers */, 7915831E1BD709D10084FC70 /* PubNub.h in Headers */, 7915831F1BD709D10084FC70 /* PNAES.h in Headers */, A55A887822FD8272002D0A72 /* PNManageChannelMembersRequest.h in Headers */, @@ -4894,21 +6159,23 @@ A58975A4230014300093BD9A /* PNFetchChannelMembersAPICallBuilder.h in Headers */, 79A0D8F61DC230460039A264 /* PNPublishSizeAPICallBuilder.h in Headers */, A55A870522FD81E3002D0A72 /* PNSetUUIDMetadataStatus.h in Headers */, - 797ABBD924C9ADB80008CA1E /* PNSendFileStatus+Private.h in Headers */, A5A451ED246F2679008ECC74 /* PNRemoveChannelMembersAPICallBuilder.h in Headers */, - A5A7AFCF234932F30060113B /* PNFetchMessagesActionsParser.h in Headers */, A5DB70E52AAEFE58005B6559 /* PNEncryptedStream.h in Headers */, - A56865DB230175EC0014E17C /* PNMembershipsParser.h in Headers */, + A5567EBA2C2077AE003C974F /* PNSubscribeData.h in Headers */, A5A4517C246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h in Headers */, + A5CFE41B2C1076A700274165 /* PNBaseRequest+Private.h in Headers */, 79DA780B24BFC1CF00AC72F2 /* PNDownloadFileRequest+Private.h in Headers */, A5DB70E02AAEFE58005B6559 /* PNEncryptedData.h in Headers */, + A5567F992C220E32003C974F /* PNFetchMembershipsResult.h in Headers */, A5E3BA0F2B3118BE00D3AA18 /* PNRequestRetryConfiguration.h in Headers */, A5046E3B2478471D0008C81E /* PNSetMembershipsRequest.h in Headers */, A55A86C822FD817E002D0A72 /* PNUUIDMetadata.h in Headers */, A5A451BF246DE8C3008ECC74 /* PNRemoveChannelMembersRequest.h in Headers */, + A5CB33E52C0C7237008527AA /* PNTransportMiddlewareConfiguration.h in Headers */, A568657B230072810014E17C /* PNManageChannelMembersStatus.h in Headers */, CA01FE429AC108DE239E57B6 /* PNObjectsAPICallBuilder.h in Headers */, A5DB70D62AAEFE58005B6559 /* PNCryptorInputStream+Private.h in Headers */, + A5CFE5642C18E9C600274165 /* PNPresenceHereNowResult.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4916,71 +6183,84 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + A5567FDF2C221A20003C974F /* PNFetchAllUUIDMetadataResult.h in Headers */, 79A238E31D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfigurationPrivate.h in Headers */, - 798842B01C18F2D5003E8948 /* PNPushNotificationsStateModificationParser.h in Headers */, + A5CFE4F92C16528700274165 /* PNTimeData.h in Headers */, 79A238D51D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.h in Headers */, + A5567F252C21D53D003C974F /* PNChannelMembersManageData.h in Headers */, 798842461C18F15C003E8948 /* PNPresenceChannelGroupHereNowResult.h in Headers */, A57A30D6238DC7FF00DE8C68 /* PNAPNSNotificationConfiguration+Private.h in Headers */, - 798842A61C18F2D3003E8948 /* PNChannelGroupModificationParser.h in Headers */, A57A30C7238DC71800DE8C68 /* PNAPNSNotificationConfiguration.h in Headers */, + A5567F682C21ECBE003C974F /* PNPagedAppContextData+Private.h in Headers */, A504E16424AAA6FE006DCF5B /* PNSendFileAPICallBuilder.h in Headers */, + A55680492C229D8D003C974F /* PNFileSendData.h in Headers */, A57A306E238D6BCC00DE8C68 /* PNFCMNotificationPayload.h in Headers */, + A556811B2C242E96003C974F /* PNFileEventResult.h in Headers */, 798842401C18F13C003E8948 /* PNChannelGroupClientStateResult.h in Headers */, 79A0D8C31DC22FD70039A264 /* PNPresenceChannelHereNowAPICallBuilder.h in Headers */, A55A879B22FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.h in Headers */, A55BCCEB231D21840019DB68 /* PNAddMessageActionAPICallBuilder.h in Headers */, - 798842AF1C18F2D5003E8948 /* PNPushNotificationsAuditParser.h in Headers */, 79A3E41D221569BA00F2ADB9 /* PNMessageCountResult.h in Headers */, 798842471C18F160003E8948 /* PNPresenceChannelHereNowResult.h in Headers */, + A51B4A812BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h in Headers */, 79A0D8931DC22F6A0039A264 /* PNAPNSAuditAPICallBuilder.h in Headers */, + A51B4A372BF0AFB8008C3370 /* PNJSONSerialization.h in Headers */, + A5567E7F2C1FCADC003C974F /* PNPushNotificationFetchData.h in Headers */, + A55680142C226378003C974F /* PNChannelGroupClientStateResult+Private.h in Headers */, A55A880422FD8272002D0A72 /* PNSetChannelMetadataRequest.h in Headers */, - A568656E2300709F0014E17C /* PNFetchMembershipsResult.h in Headers */, + A55680F72C242D11003C974F /* PNSignalResult.h in Headers */, + A5567EE22C209FF7003C974F /* PNPresenceWhereNowFetchData.h in Headers */, + A5CFE5192C1892AD00274165 /* PNPushNotificationManageRequest.h in Headers */, A55A872422FD81E3002D0A72 /* PNSetChannelMetadataStatus.h in Headers */, - 79CD276B24D75342000698DD /* PNKeychainStorage.h in Headers */, + A53248BE2C24E3D4003510FF /* PNSubscribeFileEventData+Private.h in Headers */, A5DB714B2AAEFE59005B6559 /* PNCryptorHeader.h in Headers */, - A58975E623005CFB0093BD9A /* PNMembership+Private.h in Headers */, 798842481C18F166003E8948 /* PNPresenceGlobalHereNowResult.h in Headers */, - 797ABBD024C6E8650008CA1E /* PNDeleteFileParser.h in Headers */, A56BBFBF2AB63F8F00260D83 /* PNCryptoProvider.h in Headers */, - A55A86C422FD817E002D0A72 /* PNUUIDMetadata+Private.h in Headers */, 79CFA2B126DE0AEB00D206D4 /* PNCBORDecoder.h in Headers */, + A556805B2C22BE6D003C974F /* PNFileUploadRequest.h in Headers */, + A55680982C237BC1003C974F /* PNSubscribeEventData+Private.h in Headers */, 797ABBB124C415B50008CA1E /* PNBasePublishRequest+Private.h in Headers */, + A5567FEF2C222F1B003C974F /* PNHistoryMessageCountData.h in Headers */, A55A870822FD81E3002D0A72 /* PNSetUUIDMetadataStatus.h in Headers */, 7988423F1C18F132003E8948 /* PNChannelGroupChannelsResult.h in Headers */, - 798842A51C18F2D3003E8948 /* PNChannelGroupAuditionParser.h in Headers */, + A5CFE5502C18D3A700274165 /* PNPresenceStateSetRequest.h in Headers */, + A5567EB02C20371C003C974F /* PNPresenceHereNowFetchData.h in Headers */, 79650C331E775E9300006F66 /* PNDefines.h in Headers */, 7988423D1C18F128003E8948 /* PNAPNSEnabledChannelsResult.h in Headers */, - A57A3027238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h in Headers */, - A5A7AFD2234932F30060113B /* PNFetchMessagesActionsParser.h in Headers */, A55A861522FD80B9002D0A72 /* PNRemoveUUIDMetadataAPICallBuilder.h in Headers */, 79A0D8871DC22F520039A264 /* PNAPNSAPICallBuilder.h in Headers */, A5A451C1246DE8C3008ECC74 /* PNRemoveChannelMembersRequest.h in Headers */, - 7988429C1C18F2BC003E8948 /* PNNetworkResponseSerializer.h in Headers */, + A5CFE5CC2C1AE33500274165 /* PNBaseOperationData+Private.h in Headers */, + A5CB33F02C0C7E94008527AA /* PNTransportConfiguration+Private.h in Headers */, + A51B4A992BF0B1E3008C3370 /* PNLock.h in Headers */, + A5567EBE2C2077AE003C974F /* PNSubscribeData.h in Headers */, 7988423E1C18F12E003E8948 /* PNChannelClientStateResult.h in Headers */, - 79E20D291C8AEFF4001BC9CC /* PNSubscribeStatus+Private.h in Headers */, 79A0D8D01DC22FFC0039A264 /* PNPresenceWhereNowAPICallBuilder.h in Headers */, 798842421C18F146003E8948 /* PNClientStateUpdateStatus.h in Headers */, - A55A889022FD8272002D0A72 /* PNRequest.h in Headers */, 79A0D8AB1DC22FA70039A264 /* PNHistoryAPICallBuilder.h in Headers */, - A57A303C238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h in Headers */, 797D605F22D2E41100E64C94 /* PNSignalAPICallBuilder.h in Headers */, - 798842AE1C18F2D5003E8948 /* PNPresenceWhereNowParser.h in Headers */, A5A7B0132349330F0060113B /* PNAddMessageActionRequest.h in Headers */, + A55680502C22BA84003C974F /* PNFileSendData+Private.h in Headers */, + A5567EA32C20243C003C974F /* PNMessageActionFetchData.h in Headers */, A55BCCFB231D222B0019DB68 /* PNRemoveMessageActionAPICallBuilder.h in Headers */, + A556801A2C226632003C974F /* PNChannelClientStateResult+Private.h in Headers */, 7960B6691F68122200FFAEBB /* PNDeleteMessageAPICallBuilder.h in Headers */, + A5CFE5202C18969900274165 /* PNBasePushNotificationsRequest+Private.h in Headers */, A55DAF0B24B1FEC800766EE9 /* PNXML+Private.h in Headers */, A5DB710F2AAEFE58005B6559 /* PNCryptorInputStream.h in Headers */, A504E15824AA9CFB006DCF5B /* PNFilesAPICallBuilder.h in Headers */, A57A308E238D751400DE8C68 /* PNMPNSNotificationPayload.h in Headers */, + A5CFE4E02C16500F00274165 /* PNSignalData.h in Headers */, A5A7AFFE2349330F0060113B /* PNFetchMessageActionsRequest.h in Headers */, A504E18824AAA724006DCF5B /* PNDownloadFileAPICallBuilder.h in Headers */, 798842491C18F16A003E8948 /* PNPresenceWhereNowResult.h in Headers */, A55A864622FD80B9002D0A72 /* PNFetchAllUUIDMetadataAPICallBuilder.h in Headers */, - 798842AD1C18F2D5003E8948 /* PNPresenceHereNowParser.h in Headers */, A5ADD62A2AC0CE8100310A08 /* NSInputStream+PNCrypto.h in Headers */, + A5CFE4472C11E8D500274165 /* PNChannelGroupManageRequest.h in Headers */, 79A0D9591DC230FA0039A264 /* PNSubscribeChannelsOrGroupsAPIBuilder.h in Headers */, 7988422A1C18F07B003E8948 /* PubNub+SubscribePrivate.h in Headers */, A568657E230072810014E17C /* PNManageChannelMembersStatus.h in Headers */, + A556803D2C229587003C974F /* PNFileGenerateUploadURLData.h in Headers */, 79A0D8F31DC230360039A264 /* PNPublishAPICallBuilder.h in Headers */, A56FAEF7233161570072ADD6 /* PubNub+MessageActions.h in Headers */, 7988423C1C18F124003E8948 /* PNAcknowledgmentStatus.h in Headers */, @@ -4989,196 +6269,250 @@ A55A86E522FD81E3002D0A72 /* PNFetchUUIDMetadataResult.h in Headers */, 798842291C18F071003E8948 /* PubNub+PresencePrivate.h in Headers */, A504E10824AA8F44006DCF5B /* PNListFilesResult.h in Headers */, + A55680082C225579003C974F /* PNPresenceUserStateFetchData+Private.h in Headers */, + A5567F732C21F0EA003C974F /* PNUUIDMetadataFetchData.h in Headers */, A5DB70F12AAEFE58005B6559 /* PNCCCryptorWrapper.h in Headers */, A55A86BD22FD817E002D0A72 /* PNChannelMetadata.h in Headers */, - 798842AC1C18F2D4003E8948 /* PNMessagePublishParser.h in Headers */, - A55DAEF424B1FE7600766EE9 /* PNXMLParser.h in Headers */, - 798842411C18F140003E8948 /* PNChannelGroupsResult.h in Headers */, + A5567F552C21E965003C974F /* PNMembershipsFetchData.h in Headers */, + A53248AC2C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h in Headers */, + A55680EB2C242BFF003C974F /* PNMessageResult.h in Headers */, 79A0D9841DC2314D0039A264 /* PNTimeAPICallBuilder.h in Headers */, A5046E3D2478471D0008C81E /* PNSetMembershipsRequest.h in Headers */, + A53249062C2AC5C1003510FF /* PNChannelGroupsResult.h in Headers */, 79A0D9531DC230F60039A264 /* PNSubscribeAPIBuilder.h in Headers */, + A55681032C242D7C003C974F /* PNMessageActionResult.h in Headers */, + A556808B2C23527D003C974F /* PNFileDownloadData.h in Headers */, 7988424D1C18F17F003E8948 /* PNServiceData+Private.h in Headers */, - A56865BE230173030014E17C /* PNChannelMetadataChangeParser.h in Headers */, + A556806D2C2311D0003C974F /* PNGenerateFileDownloadURLRequest.h in Headers */, 7988427D1C18F26E003E8948 /* PNEventsListener.h in Headers */, A5DB71462AAEFE58005B6559 /* PNCryptorHeader+Private.h in Headers */, 798842431C18F14E003E8948 /* PNErrorStatus+Private.h in Headers */, A5DB70E22AAEFE58005B6559 /* PNEncryptedData.h in Headers */, A57A30AD238D78C400DE8C68 /* PNBaseNotificationPayload+Private.h in Headers */, - A55A874322FD825A002D0A72 /* PNUUIDMetadataChangeParser.h in Headers */, A55BCD1B231D26110019DB68 /* PNMessageAction.h in Headers */, 799D60EE24C1B33900171C29 /* PNSendFileStatus.h in Headers */, A504E17024AAA70A006DCF5B /* PNListFilesAPICallBuilder.h in Headers */, 7925DB9A1D3FFCAC00857C0D /* PNLLogFileInformation.h in Headers */, A52DC1EB2307E10B001F20B0 /* NSDateFormatter+PNCacheable.h in Headers */, + A51B4AA52BF0B428008C3370 /* PNError.h in Headers */, + A51B4A8D2BF0B198008C3370 /* PNFunctions.h in Headers */, A5FADC452490292A001D7704 /* PNSendFileRequest.h in Headers */, A504E1AC24AD3209006DCF5B /* PNDownloadFileRequest.h in Headers */, A57A309E238D784A00DE8C68 /* PNBaseNotificationPayload.h in Headers */, 79650C391E775E9800006F66 /* PNLockSupport.h in Headers */, + A5567F122C219757003C974F /* PNBaseAppContextObject.h in Headers */, + A55681272C242EE6003C974F /* PNPresenceEventResult.h in Headers */, 79E20D1B1C8AEC4C001BC9CC /* PNEnvelopeInformation.h in Headers */, A504E19424AAA72E006DCF5B /* PNDeleteFileAPICallBuilder.h in Headers */, A568658E2300729E0014E17C /* PNFetchChannelMembersResult.h in Headers */, - A504E12024AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h in Headers */, A5DB70E72AAEFE58005B6559 /* PNEncryptedStream.h in Headers */, + A53248FB2C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h in Headers */, A55A882022FD8272002D0A72 /* PNFetchAllChannelsMetadataRequest.h in Headers */, - 798842A71C18F2D3003E8948 /* PNClientStateParser.h in Headers */, - A56865CE230173AA0014E17C /* PNObjectsRemoveParser.h in Headers */, + A5567F012C210714003C974F /* PNPresenceChannelHereNowResult+Private.h in Headers */, 79A0D8F91DC230470039A264 /* PNPublishSizeAPICallBuilder.h in Headers */, - 79A3E42D221569DA00F2ADB9 /* PNMessageCountParser.h in Headers */, A504E1DC24B04751006DCF5B /* PNFilesManager.h in Headers */, A5046E1B247844E70008C81E /* PNSetChannelMembersAPICallBuilder.h in Headers */, + A5567F3D2C21E4DF003C974F /* PNUUIDMetadataSetData.h in Headers */, A50319AF2AA48F1A00B25A44 /* PNCryptor.h in Headers */, A5A45209246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.h in Headers */, - 7988429E1C18F2BD003E8948 /* PNRequestParameters.h in Headers */, 793248631D874D9F00FBDF36 /* PNPublishSequence.h in Headers */, + A55680AF2C23880C003C974F /* PNSubscribeMessageActionEventData.h in Headers */, + A5CFE55C2C18D3B600274165 /* PNPresenceStateFetchRequest.h in Headers */, A55A882722FD8272002D0A72 /* PNFetchChannelMetadataRequest.h in Headers */, 7988427B1C18F263003E8948 /* PNPrivateStructures.h in Headers */, A5DB70F62AAEFE58005B6559 /* PNLegacyCryptor.h in Headers */, + A5CFE5C52C1AAAAD00274165 /* PNErrorData.h in Headers */, 7988422F1C18F098003E8948 /* PubNub+ChannelGroup.h in Headers */, + A5CFE52C2C18C9D400274165 /* PNPushNotificationFetchRequest.h in Headers */, + A556802D2C2294EE003C974F /* PNGenerateFileUploadURLStatus.h in Headers */, 79A0D9391DC230CC0039A264 /* PNStreamModificationAPICallBuilder.h in Headers */, 799D611924C391A100171C29 /* PNPublishFileMessageRequest.h in Headers */, - A56865652300622C0014E17C /* PNChannelMember+Private.h in Headers */, - A55BCD2A231D27F00019DB68 /* PNMessageAction+Private.h in Headers */, - A55A872B22FD81E3002D0A72 /* PNFetchChannelsMetadataResult.h in Headers */, - A504E13924AA9361006DCF5B /* PNListFilesParser.h in Headers */, - 798842761C18F205003E8948 /* PNSubscriberResults.h in Headers */, + A55A872B22FD81E3002D0A72 /* PNFetchChannelMetadataResult.h in Headers */, A55A86A122FD80B9002D0A72 /* PNRemoveChannelMetadataAPICallBuilder.h in Headers */, A5A7B02F2349330F0060113B /* PNRemoveMessageActionRequest.h in Headers */, 798842351C18F0FB003E8948 /* PNClientInformation.h in Headers */, + A5567EF52C20D3DF003C974F /* PNPresenceHereNowFetchData+Private.h in Headers */, + A5CFE4162C0F246400274165 /* PNBaseRequest.h in Headers */, 79A0D9111DC230770039A264 /* PNStateAuditAPICallBuilder.h in Headers */, 798842301C18F0A2003E8948 /* PubNub+CorePrivate.h in Headers */, + A5CB33D02C046A1A008527AA /* PNTransportConfiguration.h in Headers */, A55A86CB22FD817E002D0A72 /* PNUUIDMetadata.h in Headers */, - A56865EE230176760014E17C /* PNChannelMembersParser.h in Headers */, - A55CA6A22397389100B24E02 /* PNKeychain+Private.h in Headers */, - 798842B21C18F2D6003E8948 /* PNSubscribeParser.h in Headers */, - 798842A91C18F2D4003E8948 /* PNHeartbeatParser.h in Headers */, 798842771C18F208003E8948 /* PNSubscribeStatus.h in Headers */, A55A867022FD80B9002D0A72 /* PNFetchAllChannelsMetadataAPICallBuilder.h in Headers */, + A51B4A172BF0AE36008C3370 /* PNCodable.h in Headers */, + A51B4A752BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h in Headers */, 79A0D87B1DC22F230039A264 /* PNAPICallBuilder.h in Headers */, + A55680A32C2385BC003C974F /* PNSubscribeMessageEventData.h in Headers */, + A53248CA2C28A3B5003510FF /* PNHistoryMessagesDeleteRequest.h in Headers */, 79F85804219640CA00BFD0B1 /* PNClientStateGetResult.h in Headers */, 79CFA2D426DE1CD100D206D4 /* PNPAMToken+Private.h in Headers */, A5046E332478471D0008C81E /* PNSetChannelMembersRequest.h in Headers */, + A55680BB2C238EEB003C974F /* PNSubscribeObjectEventData.h in Headers */, + A556812E2C2435A5003C974F /* PNSubscribeRequest+Private.h in Headers */, 7988424B1C18F173003E8948 /* PNOperationResult+Private.h in Headers */, + A5CB33DD2C0C70B2008527AA /* PNTransportMiddleware.h in Headers */, 79A0D89F1DC22F850039A264 /* PNAPNSModificationAPICallBuilder.h in Headers */, A57A30F6238DDCA300DE8C68 /* PNAPNSNotificationPayload+Private.h in Headers */, + A51B4A1D2BF0AE57008C3370 /* PNDecoder.h in Headers */, + A556800E2C22603F003C974F /* PNClientStateGetResult+Private.h in Headers */, 798842741C18F1FB003E8948 /* PNStatus+Private.h in Headers */, 798842321C18F0AC003E8948 /* PubNub+Subscribe.h in Headers */, A51B49E42BDA7809008C3370 /* PNRequestRetryConfiguration+Private.h in Headers */, A57A30DF238DC87400DE8C68 /* PNAPNSNotificationTarget.h in Headers */, + A53248B22C24D987003510FF /* PNJSONDecoder+Private.h in Headers */, 797ABBA624C4148C0008CA1E /* PNBasePublishRequest.h in Headers */, + A5CFE4782C14A90900274165 /* NSError+PNTransport.h in Headers */, 7988422C1C18F088003E8948 /* PubNub+Presence.h in Headers */, + A523EEEA2BFE910A009F45AA /* PNURLSessionTransport.h in Headers */, A55BCCA72319243F0019DB68 /* PNAddMessageActionStatus.h in Headers */, 798842371C18F104003E8948 /* PNConfiguration.h in Headers */, A5DB70982AAE778F005B6559 /* PNSequenceInputStream.h in Headers */, + A5567FF62C2242B1003C974F /* PNHistoryFetchData+Private.h in Headers */, 79DA780D24BFC1CF00AC72F2 /* PNDownloadFileRequest+Private.h in Headers */, A55A885822FD8272002D0A72 /* PNFetchChannelMembersRequest.h in Headers */, A5DB70D82AAEFE58005B6559 /* PNCryptorInputStream+Private.h in Headers */, A57A30B7238DC6B600DE8C68 /* PNAPNSNotificationPayload.h in Headers */, 7988423A1C18F116003E8948 /* PNStateListener.h in Headers */, + A51B4A102BF0ADD6008C3370 /* PNJSONSerializer.h in Headers */, A504E0F524A8F314006DCF5B /* PNSendFileRequest+Private.h in Headers */, A55A868522FD80B9002D0A72 /* PNSetChannelMetadataAPICallBuilder.h in Headers */, A5897577230014090093BD9A /* PNManageMembershipsAPICallBuilder.h in Headers */, - 798842AA1C18F2D4003E8948 /* PNHistoryParser.h in Headers */, 798842451C18F157003E8948 /* PNHistoryResult.h in Headers */, A5DB70EC2AAEFE58005B6559 /* PNAESCBCCryptor.h in Headers */, + A51B4A692BF0B117008C3370 /* PNJSONCodableObjects.h in Headers */, A50319DA2AA65EB400B25A44 /* NSArray+PNMap.h in Headers */, A57A3051238D59B500DE8C68 /* PNBasePushNotificationsRequest.h in Headers */, A5A451A2246DE792008ECC74 /* PNRemoveMembershipsRequest.h in Headers */, A58975B723005AAC0093BD9A /* PNManageMembershipsStatus.h in Headers */, A5DB71412AAEFE58005B6559 /* PNCryptorHeaderV1Data.h in Headers */, + A5CFE5A62C1933BD00274165 /* PNPresenceLeaveRequest.h in Headers */, 7988424A1C18F16E003E8948 /* PNPublishStatus.h in Headers */, + A5567FAA2C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h in Headers */, + A5CFE5382C18D33500274165 /* PNHereNowRequest.h in Headers */, A504E14524AA94C8006DCF5B /* PNFile.h in Headers */, + A5CFE59A2C192ECA00274165 /* PNSubscribeRequest.h in Headers */, + A55680DF2C2428E8003C974F /* PNSubscribeFileEventData.h in Headers */, + A5567F9B2C220E32003C974F /* PNFetchMembershipsResult.h in Headers */, 7988422D1C18F08D003E8948 /* PubNub+Publish.h in Headers */, 7988429D1C18F2BD003E8948 /* PNReachability.h in Headers */, 7988422B1C18F081003E8948 /* PubNub+History.h in Headers */, A5A451EF246F2679008ECC74 /* PNRemoveChannelMembersAPICallBuilder.h in Headers */, - A504E1D024AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h in Headers */, + A5567ED62C208652003C974F /* PNSubscribeEventData.h in Headers */, 798842381C18F10D003E8948 /* PNClientState.h in Headers */, - 798842A81C18F2D3003E8948 /* PNErrorParser.h in Headers */, - A568659E230170690014E17C /* PNFetchUUIDMetadataParser.h in Headers */, 798842441C18F151003E8948 /* PNErrorStatus.h in Headers */, A5E3BA112B3118BE00D3AA18 /* PNRequestRetryConfiguration.h in Headers */, - 79CD275924D6A1CB000698DD /* PNDataStorage.h in Headers */, + A5567F192C219B9A003C974F /* PNBaseAppContextObject+Private.h in Headers */, A504E1C924AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h in Headers */, A55A883522FD8272002D0A72 /* PNRemoveChannelMetadataRequest.h in Headers */, - 798842AB1C18F2D4003E8948 /* PNLeaveParser.h in Headers */, A504E1B824AD3219006DCF5B /* PNDeleteFileRequest.h in Headers */, A57A305E238D65A200DE8C68 /* PNNotificationsPayload.h in Headers */, + A55680012C225146003C974F /* PNPresenceUserStateFetchData.h in Headers */, + A5CFE4652C123F2E00274165 /* PNBaseOperationData.h in Headers */, + A53248E42C28E3AB003510FF /* PNXMLParser.h in Headers */, A5A7B0362349330F0060113B /* PNBaseMessageActionRequest.h in Headers */, 7988424E1C18F182003E8948 /* PNServiceData.h in Headers */, + A5567EFB2C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h in Headers */, + A53248C42C25B7BB003510FF /* PNSubscribeStatus+Private.h in Headers */, A55A886622FD8272002D0A72 /* PNFetchMembershipsRequest.h in Headers */, + A5567E472C1ECC59003C974F /* PNPresenceStateFetchResult.h in Headers */, + A55680252C226866003C974F /* PNPresenceUserStateSetData.h in Headers */, + A51B4AB22BF37F03008C3370 /* PNChannelGroupFetchRequest.h in Headers */, + A5567F312C21DB10003C974F /* PNMembershipsManageData.h in Headers */, 79A0D9351DC230BD0039A264 /* PNStreamAuditAPICallBuilder.h in Headers */, A55A87CC22FD8272002D0A72 /* PNRemoveUUIDMetadataRequest.h in Headers */, + A5CFE5D22C1AFF9100274165 /* PNErrorData+Private.h in Headers */, 798842891C18F287003E8948 /* PNURLRequest.h in Headers */, 79AA8ECD26EAB81500ADA747 /* PNConfiguration+Private.h in Headers */, A523692D24A2270200656C19 /* PNAES+Private.h in Headers */, + A5CFE41D2C1076A700274165 /* PNBaseRequest+Private.h in Headers */, A5FADC382490270E001D7704 /* PubNub+Files.h in Headers */, + A5CFE5442C18D38600274165 /* PNWhereNowRequest.h in Headers */, + A5567E8C2C1FCF0F003C974F /* PNChannelGroupFetchData.h in Headers */, 7951954726BD44E9001E308C /* PubNub+PAM.h in Headers */, - 797ABBDB24C9ADB80008CA1E /* PNSendFileStatus+Private.h in Headers */, 79A0D8B71DC22FBC0039A264 /* PNPresenceAPICallBuilder.h in Headers */, A5105B55238F027D00CB693D /* PNDate.h in Headers */, 7988422E1C18F092003E8948 /* PubNub+State.h in Headers */, 798842781C18F20C003E8948 /* PNTimeResult.h in Headers */, A56BBFC62AB900B600260D83 /* NSInputStream+PNURL.h in Headers */, A504E15024AA9515006DCF5B /* PNFile+Private.h in Headers */, - A5A7AFE7234932F30060113B /* PNRemoveMessageActionParser.h in Headers */, A55A87B022FD8272002D0A72 /* PNFetchUUIDMetadataRequest.h in Headers */, - A57A3012238D59B500DE8C68 /* PNAddPushNotificationsRequest.h in Headers */, + A55680C72C23A8CD003C974F /* PNSubscribeSignalEventData.h in Headers */, + A51B4A4F2BF0B0B0008C3370 /* PNJSONEncoder.h in Headers */, 798842841C18F286003E8948 /* PNDictionary.h in Headers */, - A5A7AFD9234932F30060113B /* PNAddMessageActionParser.h in Headers */, + A53248B82C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h in Headers */, 7988427C1C18F267003E8948 /* PNStructures.h in Headers */, A55DAF0024B1FE9E00766EE9 /* PNXML.h in Headers */, - 798842B31C18F2D6003E8948 /* PNTimeParser.h in Headers */, + A5CCEC622C0E816A00DB02A4 /* PNRequest.h in Headers */, + A55680802C234B4E003C974F /* PNFileListFetchData+Private.h in Headers */, + A5567F612C21EBDF003C974F /* PNPagedAppContextData.h in Headers */, A58975A7230014300093BD9A /* PNFetchChannelMembersAPICallBuilder.h in Headers */, + A5CCEC572C0E006000DB02A4 /* PNURLSessionTransportResponse.h in Headers */, A58975C723005BD80093BD9A /* PNMembership.h in Headers */, 7988423B1C18F119003E8948 /* PNSubscriber.h in Headers */, - 7988427A1C18F25E003E8948 /* PNErrorCodes.h in Headers */, + A5CB33C52C0371E6008527AA /* PNTransportRequest+Private.h in Headers */, 797ABBB824C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.h in Headers */, 79F90F1F1FDEC1C8007132A3 /* PNPresenceHeartbeatAPICallBuilder.h in Headers */, + A5CFE58D2C19203700274165 /* PNHistoryMessagesCountRequest.h in Headers */, + A51B4A232BF0AE79008C3370 /* PNEncoder.h in Headers */, A55A85D622FD8078002D0A72 /* PubNub+Objects.h in Headers */, A58975D723005BE60093BD9A /* PNChannelMember.h in Headers */, A589756E22FEF0F70093BD9A /* PNBaseObjectsRequest+Private.h in Headers */, 79CD276424D6A371000698DD /* PNKeyValueStorage.h in Headers */, - 7988429F1C18F2BD003E8948 /* PNURLBuilder.h in Headers */, 79A0D9181DC2308A0039A264 /* PNStateModificationAPICallBuilder.h in Headers */, - A55A86B622FD817E002D0A72 /* PNChannelMetadata+Private.h in Headers */, + A55680D32C2400B3003C974F /* PNSubscribePresenceEventData.h in Headers */, + A51B4A292BF0AE92008C3370 /* PNObjectSerializer.h in Headers */, + A5567ECA2C207800003C974F /* PNSubscribeCursorData.h in Headers */, 798842391C18F111003E8948 /* PNHeartbeat.h in Headers */, 798842331C18F0B3003E8948 /* PubNub+Time.h in Headers */, 798842791C18F255003E8948 /* PNConstants.h in Headers */, - A55A888922FD8272002D0A72 /* PNRequest+Private.h in Headers */, + A5567E972C1FDEF7003C974F /* PNMessageActionsFetchData.h in Headers */, A504E0FC24AA8AEA006DCF5B /* PNListFilesRequest.h in Headers */, 798842281C18F02F003E8948 /* PubNub+APNS.h in Headers */, A5A4517E246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h in Headers */, + A532490D2C2C7262003510FF /* PNHistoryFetchRequest+Private.h in Headers */, + A5CCEC6C2C0E816A00DB02A4 /* PNTransportResponse.h in Headers */, + A5567FD82C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h in Headers */, 79A0D8751DC22F0A0039A264 /* PNAPICallBuilder+Private.h in Headers */, + A5CCEC672C0E816A00DB02A4 /* PNTransport.h in Headers */, 798842311C18F0A6003E8948 /* PubNub+Core.h in Headers */, 7988429A1C18F2AD003E8948 /* PNLogMacro.h in Headers */, - 79E2D0F21C56434700BAA244 /* PNKeychain.h in Headers */, - 7988429B1C18F2BC003E8948 /* PNNetwork.h in Headers */, - A56865DE230175EC0014E17C /* PNMembershipsParser.h in Headers */, + A5567E392C1EB4ED003C974F /* PNTimeRequest.h in Headers */, + A5567F8B2C21F31E003C974F /* PNChannelMetadataFetchAllData.h in Headers */, A55A87E122FD8272002D0A72 /* PNBaseObjectsRequest.h in Headers */, A504E1A024ACCA42006DCF5B /* PNFileDownloadURLAPICallBuilder.h in Headers */, + A5CFE4C22C1647B000274165 /* PNPublishData.h in Headers */, 798842861C18F286003E8948 /* PNHelpers.h in Headers */, A57A30EE238DCAAF00DE8C68 /* PNAPNSNotificationTarget+Private.h in Headers */, A5DB70DD2AAEFE58005B6559 /* PNCryptoModule.h in Headers */, + A556810F2C242E09003C974F /* PNObjectEventResult.h in Headers */, A5046E25247844E70008C81E /* PNSetMembershipsAPICallBuilder.h in Headers */, + A5CFE50D2C1658E700274165 /* PNHistoryFetchData.h in Headers */, 798842811C18F286003E8948 /* PNChannel.h in Headers */, - 79AA8ED326EB3A1200ADA747 /* PubNub+PAMPrivate.h in Headers */, + A5567F492C21E723003C974F /* PNChannelMembersFetchData.h in Headers */, + A5CB33E92C0C7237008527AA /* PNTransportMiddlewareConfiguration.h in Headers */, + A5567E662C1F8C53003C974F /* PNOperationDataParser.h in Headers */, A5897587230014160093BD9A /* PNFetchMembershipsAPICallBuilder.h in Headers */, + A51B4A5B2BF0B0CB008C3370 /* PNJSONCoder.h in Headers */, + A5CB33B22C035D7D008527AA /* PNTransportRequest.h in Headers */, A50319B62AA5B05900B25A44 /* PNResult.h in Headers */, + A5567F7F2C21F203003C974F /* PNUUIDMetadataFetchAllData.h in Headers */, A55A877F22FD8272002D0A72 /* PNObjectsPaginatedRequest.h in Headers */, + A5567FBF2C221136003C974F /* PNChannelMetadataFetchData.h in Headers */, 79A0D8BD1DC22FCA0039A264 /* PNPresenceChannelGroupHereNowAPICallBuilder.h in Headers */, 79A0D9651DC231050039A264 /* PNUnsubscribeChannelsOrGroupsAPICallBuilder.h in Headers */, A5DB710A2AAEFE58005B6559 /* PNAESCBCCryptor+Private.h in Headers */, - A56865AE230172950014E17C /* PNFetchChannelsMetadataParser.h in Headers */, 7925DB8C1D3FFCAC00857C0D /* PNLLogger.h in Headers */, 79CFA2BD26DE1C4900D206D4 /* PNPAMToken.h in Headers */, 79A3E4142215699900F2ADB9 /* PNMessageCountAPICallBuilder.h in Headers */, A55A866222FD80B9002D0A72 /* PNFetchChannelMetadataAPICallBuilder.h in Headers */, - 79ABD8961F01636B007634E0 /* PNTelemetry.h in Headers */, + A55680792C2344A9003C974F /* PNFileListFetchData.h in Headers */, 7988427F1C18F286003E8948 /* PNNumber.h in Headers */, A55A878D22FD8272002D0A72 /* PNSetUUIDMetadataRequest.h in Headers */, 7988427E1C18F272003E8948 /* PNParser.h in Headers */, 797D607622D2E44000E64C94 /* PNSignalStatus.h in Headers */, A5897597230014220093BD9A /* PNManageChannelMembersAPICallBuilder.h in Headers */, + A5567E722C1FBE44003C974F /* PubNub+Deprecated.h in Headers */, + A51B4A432BF0B097008C3370 /* PNJSONDecoder.h in Headers */, 798842751C18F1FE003E8948 /* PNStatus.h in Headers */, A55A886D22FD8272002D0A72 /* PNManageMembershipsRequest.h in Headers */, A55A863F22FD80B9002D0A72 /* PNFetchUUIDMetadataAPICallBuilder.h in Headers */, @@ -5187,7 +6521,9 @@ A5A4518A246D8CD5008ECC74 /* PNBaseObjectsMembershipRequest+Private.h in Headers */, A55BCD0B231D22400019DB68 /* PNFetchMessagesActionsAPICallBuilder.h in Headers */, 79A0D95F1DC230FF0039A264 /* PNUnsubscribeAPICallBuilder.h in Headers */, + A5567FCB2C221231003C974F /* PNChannelMetadataSetData.h in Headers */, 79A0D90B1DC230680039A264 /* PNStateAPICallBuilder.h in Headers */, + A5567EEE2C20A51A003C974F /* PNPresenceHeartbeatRequest.h in Headers */, 798842801C18F286003E8948 /* PNArray.h in Headers */, 798842831C18F286003E8948 /* PNData.h in Headers */, A5A7B0052349330F0060113B /* PNBaseMessageActionRequest+Private.h in Headers */, @@ -5196,11 +6532,13 @@ A586A9F12337E581008856D2 /* PNFetchMessageActionsResult.h in Headers */, A504E12C24AA90B8006DCF5B /* PNDownloadFileResult.h in Headers */, 799D610724C36D5B00171C29 /* PNPublishRequest.h in Headers */, + A5CFE5682C18E9C600274165 /* PNPresenceHereNowResult.h in Headers */, 798842851C18F286003E8948 /* PNGZIP.h in Headers */, - 79CD277724D75AE9000698DD /* PNInMemoryStorage.h in Headers */, 798842341C18F0F6003E8948 /* PNAES.h in Headers */, + A55680922C235360003C974F /* PNFileDownloadData+Private.h in Headers */, A55A887B22FD8272002D0A72 /* PNManageChannelMembersRequest.h in Headers */, - A57A3020238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h in Headers */, + A5567E5A2C1F0484003C974F /* PNSignalRequest.h in Headers */, + A5CFE5752C19066C00274165 /* PNHistoryFetchRequest.h in Headers */, CA01F1C4DDB41BF0E6E1DCB3 /* PNObjectsAPICallBuilder.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -5209,135 +6547,164 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A57A301C238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h in Headers */, + A5CCEC692C0E816A00DB02A4 /* PNTransportResponse.h in Headers */, + A55681212C242EE6003C974F /* PNPresenceEventResult.h in Headers */, 79A0D92B1DC230AB0039A264 /* PNStreamAPICallBuilder.h in Headers */, 79A238DF1D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfigurationPrivate.h in Headers */, + A51B4A202BF0AE79008C3370 /* PNEncoder.h in Headers */, A55DAF0824B1FEC800766EE9 /* PNXML+Private.h in Headers */, 79AA8ECA26EAB81500ADA747 /* PNConfiguration+Private.h in Headers */, A58975B323005AAC0093BD9A /* PNManageMembershipsStatus.h in Headers */, - 79A8BC8D1C58F93900015BDE /* PNPushNotificationsStateModificationParser.h in Headers */, 79A238D11D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.h in Headers */, + A5CFE53F2C18D38600274165 /* PNWhereNowRequest.h in Headers */, 79A8BC681C58F93900015BDE /* PNPresenceChannelGroupHereNowResult.h in Headers */, + A5CB33CB2C046A1A008527AA /* PNTransportConfiguration.h in Headers */, 7932485F1D874D9F00FBDF36 /* PNPublishSequence.h in Headers */, A55A886222FD8272002D0A72 /* PNFetchMembershipsRequest.h in Headers */, - A56865612300622C0014E17C /* PNChannelMember+Private.h in Headers */, + A5CCEC642C0E816A00DB02A4 /* PNTransport.h in Headers */, A504E16D24AAA70A006DCF5B /* PNListFilesAPICallBuilder.h in Headers */, - 79A8BCBA1C58F93900015BDE /* PNChannelGroupModificationParser.h in Headers */, - A57A3038238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h in Headers */, A56BBFC32AB900B600260D83 /* NSInputStream+PNURL.h in Headers */, A5DB713E2AAEFE58005B6559 /* PNCryptorHeaderV1Data.h in Headers */, 79A8BC6A1C58F93900015BDE /* PNChannelGroupClientStateResult.h in Headers */, + A55680C12C23A8CD003C974F /* PNSubscribeSignalEventData.h in Headers */, A55A86E122FD81E3002D0A72 /* PNFetchUUIDMetadataResult.h in Headers */, - 79A8BC771C58F93900015BDE /* PNPushNotificationsAuditParser.h in Headers */, + A5567F652C21ECBE003C974F /* PNPagedAppContextData+Private.h in Headers */, A504E1A924AD3209006DCF5B /* PNDownloadFileRequest.h in Headers */, 79A8BC691C58F93900015BDE /* PNPresenceChannelHereNowResult.h in Headers */, + A5567FA72C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h in Headers */, 79A8BC6B1C58F93900015BDE /* PNPresenceGlobalHereNowResult.h in Headers */, - 79A8BCB81C58F93900015BDE /* PNChannelGroupAuditionParser.h in Headers */, 79A8BC6C1C58F93900015BDE /* PNChannelGroupChannelsResult.h in Headers */, + A53248C12C25B7BB003510FF /* PNSubscribeStatus+Private.h in Headers */, 79F90F1B1FDEC1C6007132A3 /* PNPresenceHeartbeatAPICallBuilder.h in Headers */, - A55DAEF124B1FE7600766EE9 /* PNXMLParser.h in Headers */, + A55680E52C242BFF003C974F /* PNMessageResult.h in Headers */, + A5567E612C1F8C53003C974F /* PNOperationDataParser.h in Headers */, 79CFA2BA26DE1C4900D206D4 /* PNPAMToken.h in Headers */, + A51B4A312BF0AFB8008C3370 /* PNJSONSerialization.h in Headers */, + A5CFE5C02C1AAAAC00274165 /* PNErrorData.h in Headers */, A57A30F2238DDCA300DE8C68 /* PNAPNSNotificationPayload+Private.h in Headers */, - 79A8BC9F1C58F93900015BDE /* PNNetworkResponseSerializer.h in Headers */, 79F85800219640C500BFD0B1 /* PNClientStateGetResult.h in Headers */, A57A30C3238DC71800DE8C68 /* PNAPNSNotificationConfiguration.h in Headers */, 79A8BC6D1C58F93900015BDE /* PNAPNSEnabledChannelsResult.h in Headers */, 79A8BC6F1C58F93900015BDE /* PNChannelClientStateResult.h in Headers */, A50319B32AA5B05900B25A44 /* PNResult.h in Headers */, - 79E20D251C8AEFF1001BC9CC /* PNSubscribeStatus+Private.h in Headers */, + A556800B2C22603F003C974F /* PNClientStateGetResult+Private.h in Headers */, + A556809D2C2385BC003C974F /* PNSubscribeMessageEventData.h in Headers */, 79A8BC701C58F93900015BDE /* PNClientStateUpdateStatus.h in Headers */, - 79A8BCAD1C58F93900015BDE /* PNPresenceWhereNowParser.h in Headers */, - A55A86B222FD817E002D0A72 /* PNChannelMetadata+Private.h in Headers */, 79A0D8B31DC22FBB0039A264 /* PNPresenceAPICallBuilder.h in Headers */, + A5567FBA2C221136003C974F /* PNChannelMetadataFetchData.h in Headers */, + A55680B52C238EEB003C974F /* PNSubscribeObjectEventData.h in Headers */, + A5CFE4112C0F246400274165 /* PNBaseRequest.h in Headers */, 79A8BC6E1C58F93900015BDE /* PNPresenceWhereNowResult.h in Headers */, - 79A8BCBB1C58F93900015BDE /* PNPresenceHereNowParser.h in Headers */, + A51B4A142BF0AE36008C3370 /* PNCodable.h in Headers */, A52DC1E72307E10B001F20B0 /* NSDateFormatter+PNCacheable.h in Headers */, + A5CFE5292C18C9D400274165 /* PNPushNotificationFetchRequest.h in Headers */, A55BCCA32319243F0019DB68 /* PNAddMessageActionStatus.h in Headers */, + A5CFE5882C19203700274165 /* PNHistoryMessagesCountRequest.h in Headers */, 79A8BCB91C58F93900015BDE /* PubNub+SubscribePrivate.h in Headers */, A55A87AC22FD8272002D0A72 /* PNFetchUUIDMetadataRequest.h in Headers */, + A5567EAB2C20371C003C974F /* PNPresenceHereNowFetchData.h in Headers */, 79A8BCAC1C58F93900015BDE /* PubNub+PresencePrivate.h in Headers */, - 79A8BCA91C58F93900015BDE /* PNMessagePublishParser.h in Headers */, 79A8BC711C58F93900015BDE /* PNAcknowledgmentStatus.h in Headers */, 79A8BCBD1C58F93900015BDE /* PNErrorStatus+Private.h in Headers */, + A5CFE4BD2C1647B000274165 /* PNPublishData.h in Headers */, A504E1C624AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h in Headers */, A50319D72AA65EB400B25A44 /* NSArray+PNMap.h in Headers */, A55BCD07231D22400019DB68 /* PNFetchMessagesActionsAPICallBuilder.h in Headers */, 79A0D90D1DC230760039A264 /* PNStateAuditAPICallBuilder.h in Headers */, 79A8BC9E1C58F93900015BDE /* PNServiceData+Private.h in Headers */, 797D605B22D2E41100E64C94 /* PNSignalAPICallBuilder.h in Headers */, - A56865BA230173030014E17C /* PNChannelMetadataChangeParser.h in Headers */, + A5CB33ED2C0C7E94008527AA /* PNTransportConfiguration+Private.h in Headers */, + A5567E922C1FDEF7003C974F /* PNMessageActionsFetchData.h in Headers */, A57A30DB238DC87400DE8C68 /* PNAPNSNotificationTarget.h in Headers */, 7951954426BD44E9001E308C /* PubNub+PAM.h in Headers */, A51B49E12BDA7806008C3370 /* PNRequestRetryConfiguration+Private.h in Headers */, 79A8BC741C58F93900015BDE /* PNEventsListener.h in Headers */, - 79A8BC721C58F93900015BDE /* PNChannelGroupsResult.h in Headers */, - A55CA69E2397389100B24E02 /* PNKeychain+Private.h in Headers */, A55A864222FD80B9002D0A72 /* PNFetchAllUUIDMetadataAPICallBuilder.h in Headers */, + A5567F0D2C219757003C974F /* PNBaseAppContextObject.h in Headers */, A5046E18247844E70008C81E /* PNSetChannelMembersAPICallBuilder.h in Headers */, + A5CFE54B2C18D3A700274165 /* PNPresenceStateSetRequest.h in Headers */, 79E20D171C8AEC43001BC9CC /* PNEnvelopeInformation.h in Headers */, A55A880022FD8272002D0A72 /* PNSetChannelMetadataRequest.h in Headers */, - 797ABBCD24C6E8650008CA1E /* PNDeleteFileParser.h in Headers */, A5897593230014220093BD9A /* PNManageChannelMembersAPICallBuilder.h in Headers */, + A5567EDD2C209FF7003C974F /* PNPresenceWhereNowFetchData.h in Headers */, A55A85D222FD8078002D0A72 /* PubNub+Objects.h in Headers */, + A5567EF22C20D3DE003C974F /* PNPresenceHereNowFetchData+Private.h in Headers */, 7925DB961D3FFCAC00857C0D /* PNLLogFileInformation.h in Headers */, - 79A8BCB31C58F93900015BDE /* PNClientStateParser.h in Headers */, + A5CFE5332C18D33500274165 /* PNHereNowRequest.h in Headers */, 79650C2F1E775E8C00006F66 /* PNDefines.h in Headers */, + A523EEE42BFE910A009F45AA /* PNURLSessionTransport.h in Headers */, 79A0D9801DC2314B0039A264 /* PNTimeAPICallBuilder.h in Headers */, - 79A8BCA71C58F93900015BDE /* PNRequestParameters.h in Headers */, + A5567F6E2C21F0EA003C974F /* PNUUIDMetadataFetchData.h in Headers */, 79A3E419221569BA00F2ADB9 /* PNMessageCountResult.h in Headers */, 797ABBAE24C415B50008CA1E /* PNBasePublishRequest+Private.h in Headers */, 79A0D9071DC230670039A264 /* PNStateAPICallBuilder.h in Headers */, A5A45187246D8CD5008ECC74 /* PNBaseObjectsMembershipRequest+Private.h in Headers */, - 79A3E429221569DA00F2ADB9 /* PNMessageCountParser.h in Headers */, + A5567F862C21F31E003C974F /* PNChannelMetadataFetchAllData.h in Headers */, A523692A24A2270200656C19 /* PNAES+Private.h in Headers */, 79A8BC901C58F93900015BDE /* PNPrivateStructures.h in Headers */, - A57A300E238D59B500DE8C68 /* PNAddPushNotificationsRequest.h in Headers */, + A53249012C2AC5C1003510FF /* PNChannelGroupsResult.h in Headers */, + A5CFE4422C11E8D500274165 /* PNChannelGroupManageRequest.h in Headers */, A57A30A9238D78C400DE8C68 /* PNBaseNotificationPayload+Private.h in Headers */, 79A8BC761C58F93900015BDE /* PNClientInformation.h in Headers */, + A5CFE4DB2C16500F00274165 /* PNSignalData.h in Headers */, A55A87C822FD8272002D0A72 /* PNRemoveUUIDMetadataRequest.h in Headers */, + A5567F502C21E965003C974F /* PNMembershipsFetchData.h in Headers */, + A532490A2C2C7262003510FF /* PNHistoryFetchRequest+Private.h in Headers */, A55A866C22FD80B9002D0A72 /* PNFetchAllChannelsMetadataAPICallBuilder.h in Headers */, 79A0D9371DC230CB0039A264 /* PNStreamModificationAPICallBuilder.h in Headers */, - 79A8BC751C58F93900015BDE /* PNSubscriberResults.h in Headers */, A56FAEF3233161570072ADD6 /* PubNub+MessageActions.h in Headers */, + A53248C72C28A3B5003510FF /* PNHistoryMessagesDeleteRequest.h in Headers */, + A51B4A932BF0B1E3008C3370 /* PNLock.h in Headers */, 79A8BC731C58F93900015BDE /* PubNub+ChannelGroup.h in Headers */, 79A8BCB71C58F93900015BDE /* PubNub+CorePrivate.h in Headers */, 799D611624C391A100171C29 /* PNPublishFileMessageRequest.h in Headers */, A5046E22247844E70008C81E /* PNSetMembershipsAPICallBuilder.h in Headers */, A5A7B0012349330F0060113B /* PNBaseMessageActionRequest+Private.h in Headers */, A5A7AFFA2349330F0060113B /* PNFetchMessageActionsRequest.h in Headers */, - 79A8BC9D1C58F93900015BDE /* PNHeartbeatParser.h in Headers */, + A53248B52C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h in Headers */, A504E19124AAA72E006DCF5B /* PNDeleteFileAPICallBuilder.h in Headers */, A55A885422FD8272002D0A72 /* PNFetchChannelMembersRequest.h in Headers */, - A57A3023238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h in Headers */, A5A7B00F2349330F0060113B /* PNAddMessageActionRequest.h in Headers */, + A51B4A552BF0B0CB008C3370 /* PNJSONCoder.h in Headers */, 79A0D88F1DC22F690039A264 /* PNAPNSAuditAPICallBuilder.h in Headers */, A504E14D24AA9515006DCF5B /* PNFile+Private.h in Headers */, 797ABBA324C4148C0008CA1E /* PNBasePublishRequest.h in Headers */, - A56865EA230176760014E17C /* PNChannelMembersParser.h in Headers */, + A5567F5C2C21EBDF003C974F /* PNPagedAppContextData.h in Headers */, + A55681092C242E09003C974F /* PNObjectEventResult.h in Headers */, A55A877B22FD8272002D0A72 /* PNObjectsPaginatedRequest.h in Headers */, - 79A8BC991C58F93900015BDE /* PNSubscribeParser.h in Headers */, + A5567E332C1EB4ED003C974F /* PNTimeRequest.h in Headers */, + A5CFE4732C14A90900274165 /* NSError+PNTransport.h in Headers */, A5FADC422490292A001D7704 /* PNSendFileRequest.h in Headers */, + A55680FD2C242D7C003C974F /* PNMessageActionResult.h in Headers */, A58975C323005BD80093BD9A /* PNMembership.h in Headers */, + A55680682C2311D0003C974F /* PNGenerateFileDownloadURLRequest.h in Headers */, 79A8BC791C58F93900015BDE /* PNSubscribeStatus.h in Headers */, - A55A888522FD8272002D0A72 /* PNRequest+Private.h in Headers */, + A5567E7A2C1FCADC003C974F /* PNPushNotificationFetchData.h in Headers */, + A55680CD2C2400B3003C974F /* PNSubscribePresenceEventData.h in Headers */, + A5CB33AD2C035D7D008527AA /* PNTransportRequest.h in Headers */, 797D607222D2E44000E64C94 /* PNSignalStatus.h in Headers */, - 79CD277424D75AE9000698DD /* PNInMemoryStorage.h in Headers */, + A55680562C22BE6D003C974F /* PNFileUploadRequest.h in Headers */, 79A8BCB61C58F93900015BDE /* PNOperationResult+Private.h in Headers */, + A55680952C237BC1003C974F /* PNSubscribeEventData+Private.h in Headers */, + A5CCEC5F2C0E816A00DB02A4 /* PNRequest.h in Headers */, 79A8BC9B1C58F93900015BDE /* PNStatus+Private.h in Headers */, + A5CB33C22C0371E6008527AA /* PNTransportRequest+Private.h in Headers */, 79A8BC781C58F93900015BDE /* PubNub+Subscribe.h in Headers */, + A5567E542C1F0484003C974F /* PNSignalRequest.h in Headers */, 79A8BCB51C58F93900015BDE /* PNStateListener.h in Headers */, - 79A8BCA81C58F93900015BDE /* PNHistoryParser.h in Headers */, A58975D323005BE60093BD9A /* PNChannelMember.h in Headers */, A55DAEFD24B1FE9E00766EE9 /* PNXML.h in Headers */, A55A87DD22FD8272002D0A72 /* PNBaseObjectsRequest.h in Headers */, A57A308A238D751400DE8C68 /* PNMPNSNotificationPayload.h in Headers */, + A5567FC62C221231003C974F /* PNChannelMetadataSetData.h in Headers */, 79A8BC7E1C58F93900015BDE /* PNHistoryResult.h in Headers */, A5DB70DA2AAEFE58005B6559 /* PNCryptoModule.h in Headers */, A57A30EA238DCAAF00DE8C68 /* PNAPNSNotificationTarget+Private.h in Headers */, A55A881C22FD8272002D0A72 /* PNFetchAllChannelsMetadataRequest.h in Headers */, - A56865CA230173AA0014E17C /* PNObjectsRemoveParser.h in Headers */, 79A0D9611DC231030039A264 /* PNUnsubscribeChannelsOrGroupsAPICallBuilder.h in Headers */, + A51B4A3D2BF0B097008C3370 /* PNJSONDecoder.h in Headers */, 79A0D8771DC22F220039A264 /* PNAPICallBuilder.h in Headers */, + A5567EF82C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h in Headers */, 79A8BC7D1C58F93900015BDE /* PNConfiguration.h in Headers */, 79A8BC7C1C58F93900015BDE /* PNPublishStatus.h in Headers */, 79A0D8711DC22F070039A264 /* PNAPICallBuilder+Private.h in Headers */, @@ -5346,134 +6713,174 @@ 79A8BC7A1C58F93900015BDE /* PubNub+Presence.h in Headers */, 79A8BC981C58F93900015BDE /* PNReachability.h in Headers */, 79A8BC7F1C58F93900015BDE /* PubNub+History.h in Headers */, + A55680442C229D8D003C974F /* PNFileSendData.h in Headers */, A55A861122FD80B9002D0A72 /* PNRemoveUUIDMetadataAPICallBuilder.h in Headers */, 79A8BC7B1C58F93900015BDE /* PubNub+Publish.h in Headers */, - A55BCD26231D27F00019DB68 /* PNMessageAction+Private.h in Headers */, - 79A8BCA41C58F93900015BDE /* PNLeaveParser.h in Headers */, 79A8BCA01C58F93900015BDE /* PNClientState.h in Headers */, - 79A8BC8F1C58F93900015BDE /* PNErrorParser.h in Headers */, 79A8BC871C58F93900015BDE /* PNErrorStatus.h in Headers */, + A51B4A1A2BF0AE57008C3370 /* PNDecoder.h in Headers */, 79A0D8A71DC22FA60039A264 /* PNHistoryAPICallBuilder.h in Headers */, + A55681152C242E96003C974F /* PNFileEventResult.h in Headers */, + A5567ED12C208652003C974F /* PNSubscribeEventData.h in Headers */, + A53248E12C28E3AB003510FF /* PNXMLParser.h in Headers */, + A5CFE5C92C1AE33500274165 /* PNBaseOperationData+Private.h in Headers */, A5DB71072AAEFE58005B6559 /* PNAESCBCCryptor+Private.h in Headers */, - A504E13624AA9361006DCF5B /* PNListFilesParser.h in Headers */, 79A0D9311DC230BB0039A264 /* PNStreamAuditAPICallBuilder.h in Headers */, 79A8BC801C58F93900015BDE /* PNServiceData.h in Headers */, + A51B4A7B2BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h in Headers */, 79A8BCAF1C58F93900015BDE /* PNDictionary.h in Headers */, 79CFA2AE26DE0AEB00D206D4 /* PNCBORDecoder.h in Headers */, A5897583230014160093BD9A /* PNFetchMembershipsAPICallBuilder.h in Headers */, - A55A873F22FD825A002D0A72 /* PNUUIDMetadataChangeParser.h in Headers */, - A5A7AFD5234932F30060113B /* PNAddMessageActionParser.h in Headers */, + A53248A92C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h in Headers */, + A51B4A0D2BF0ADD6008C3370 /* PNJSONSerializer.h in Headers */, 79A8BCAB1C58F93900015BDE /* PNSubscriber.h in Headers */, - A56865AA230172950014E17C /* PNFetchChannelsMetadataParser.h in Headers */, A5DB70F32AAEFE58005B6559 /* PNLegacyCryptor.h in Headers */, 79A8BC9A1C58F93900015BDE /* PNURLRequest.h in Headers */, - 79A8BC951C58F93900015BDE /* PNURLBuilder.h in Headers */, 79A0D8CB1DC22FF90039A264 /* PNPresenceWhereNowAPICallBuilder.h in Headers */, - 79CD276824D75342000698DD /* PNKeychainStorage.h in Headers */, - 79A8BC921C58F93900015BDE /* PNTimeParser.h in Headers */, 79A0D94F1DC230F50039A264 /* PNSubscribeAPIBuilder.h in Headers */, 79A0D8EF1DC230340039A264 /* PNPublishAPICallBuilder.h in Headers */, + A5567F382C21E4DF003C974F /* PNUUIDMetadataSetData.h in Headers */, + A55680382C229587003C974F /* PNFileGenerateUploadURLData.h in Headers */, 799D610424C36D5B00171C29 /* PNPublishRequest.h in Headers */, + A55680D92C2428E8003C974F /* PNSubscribeFileEventData.h in Headers */, 79A8BC881C58F93900015BDE /* PNStructures.h in Headers */, 79650C351E775E9700006F66 /* PNLockSupport.h in Headers */, 79A0D9131DC230880039A264 /* PNStateModificationAPICallBuilder.h in Headers */, - 79CD275624D6A1CB000698DD /* PNDataStorage.h in Headers */, A55A865E22FD80B9002D0A72 /* PNFetchChannelMetadataAPICallBuilder.h in Headers */, + A53248F82C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h in Headers */, A5A4519F246DE792008ECC74 /* PNRemoveMembershipsRequest.h in Headers */, - A504E11D24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h in Headers */, + A55680A92C23880C003C974F /* PNSubscribeMessageActionEventData.h in Headers */, A55A86B922FD817E002D0A72 /* PNChannelMetadata.h in Headers */, 79A8BC861C58F93900015BDE /* PNTimeResult.h in Headers */, - A55A86C022FD817E002D0A72 /* PNUUIDMetadata+Private.h in Headers */, + A5567E9E2C20243C003C974F /* PNMessageActionFetchData.h in Headers */, 79A0D8BF1DC22FD60039A264 /* PNPresenceChannelHereNowAPICallBuilder.h in Headers */, A57A30D2238DC7FF00DE8C68 /* PNAPNSNotificationConfiguration+Private.h in Headers */, - 79A8BC831C58F93900015BDE /* PNErrorCodes.h in Headers */, A57A304D238D59B500DE8C68 /* PNBasePushNotificationsRequest.h in Headers */, + A55680852C23527D003C974F /* PNFileDownloadData.h in Headers */, + A5CFE5CF2C1AFF9100274165 /* PNErrorData+Private.h in Headers */, + A5567F202C21D53D003C974F /* PNChannelMembersManageData.h in Headers */, + A55680F12C242D11003C974F /* PNSignalResult.h in Headers */, + A55680052C225579003C974F /* PNPresenceUserStateFetchData+Private.h in Headers */, A5DB71482AAEFE58005B6559 /* PNCryptorHeader.h in Headers */, + A5CFE51D2C18969900274165 /* PNBasePushNotificationsRequest+Private.h in Headers */, A5DB71432AAEFE58005B6559 /* PNCryptorHeader+Private.h in Headers */, 79A8BC821C58F93900015BDE /* PubNub+State.h in Headers */, + A5567EFE2C210714003C974F /* PNPresenceChannelHereNowResult+Private.h in Headers */, 79A8BCB41C58F93900015BDE /* PNConstants.h in Headers */, + A5567F162C219B9A003C974F /* PNBaseAppContextObject+Private.h in Headers */, A55A869D22FD80B9002D0A72 /* PNRemoveChannelMetadataAPICallBuilder.h in Headers */, + A5CCEC512C0E006000DB02A4 /* PNURLSessionTransportResponse.h in Headers */, 79A0D9551DC230F90039A264 /* PNSubscribeChannelsOrGroupsAPIBuilder.h in Headers */, A504E0F924AA8AEA006DCF5B /* PNListFilesRequest.h in Headers */, A504E15524AA9CFB006DCF5B /* PNFilesAPICallBuilder.h in Headers */, A55A879722FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.h in Headers */, A5ADD6272AC0CE8100310A08 /* NSInputStream+PNCrypto.h in Headers */, A5897573230014090093BD9A /* PNManageMembershipsAPICallBuilder.h in Headers */, + A51B4A6F2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h in Headers */, + A556802A2C2294EE003C974F /* PNGenerateFileUploadURLStatus.h in Headers */, + A5CFE5142C1892AD00274165 /* PNPushNotificationManageRequest.h in Headers */, 79A8BC8E1C58F93900015BDE /* PNHeartbeat.h in Headers */, 79A3E4102215699900F2ADB9 /* PNMessageCountAPICallBuilder.h in Headers */, 79A8BC851C58F93900015BDE /* PubNub+Core.h in Headers */, 79A8BC841C58F93900015BDE /* PubNub+Time.h in Headers */, 79A0D8C51DC22FEA0039A264 /* PNPresenceHereNowAPICallBuilder.h in Headers */, A5DB710C2AAEFE58005B6559 /* PNCryptorInputStream.h in Headers */, + A5567FDC2C221A20003C974F /* PNFetchAllUUIDMetadataResult.h in Headers */, + A556804D2C22BA84003C974F /* PNFileSendData+Private.h in Headers */, + A55680202C226866003C974F /* PNPresenceUserStateSetData.h in Headers */, A5A7B0322349330F0060113B /* PNBaseMessageActionRequest.h in Headers */, A5A7B02B2349330F0060113B /* PNRemoveMessageActionRequest.h in Headers */, A586A9ED2337E581008856D2 /* PNFetchMessageActionsResult.h in Headers */, A57A309A238D784A00DE8C68 /* PNBaseNotificationPayload.h in Headers */, 79A8BC811C58F93900015BDE /* PubNub+APNS.h in Headers */, + A5CFE5A12C1933BD00274165 /* PNPresenceLeaveRequest.h in Headers */, A55A878922FD8272002D0A72 /* PNSetUUIDMetadataRequest.h in Headers */, A55A863B22FD80B9002D0A72 /* PNFetchUUIDMetadataAPICallBuilder.h in Headers */, 79A8BC9C1C58F93900015BDE /* PNLogMacro.h in Headers */, + A5CFE4F42C16528700274165 /* PNTimeData.h in Headers */, + A5CFE5082C1658E700274165 /* PNHistoryFetchData.h in Headers */, A5A45206246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.h in Headers */, + A51B4A872BF0B197008C3370 /* PNFunctions.h in Headers */, + A55680112C226378003C974F /* PNChannelGroupClientStateResult+Private.h in Headers */, A589756A22FEF0F70093BD9A /* PNBaseObjectsRequest+Private.h in Headers */, - 79A8BC941C58F93900015BDE /* PNKeychain.h in Headers */, + A556808F2C235360003C974F /* PNFileDownloadData+Private.h in Headers */, 79A0D8B91DC22FC80039A264 /* PNPresenceChannelGroupHereNowAPICallBuilder.h in Headers */, - 79A8BCB11C58F93900015BDE /* PNNetwork.h in Headers */, + A5567E412C1ECC59003C974F /* PNPresenceStateFetchResult.h in Headers */, A55BCD17231D26110019DB68 /* PNMessageAction.h in Headers */, + A556807D2C234B4E003C974F /* PNFileListFetchData+Private.h in Headers */, + A51B4AAC2BF37F03008C3370 /* PNChannelGroupFetchRequest.h in Headers */, A50319AC2AA48F1A00B25A44 /* PNCryptor.h in Headers */, 7960B6651F68122000FFAEBB /* PNDeleteMessageAPICallBuilder.h in Headers */, A55BCCF7231D222B0019DB68 /* PNRemoveMessageActionAPICallBuilder.h in Headers */, 79A8BCAA1C58F93900015BDE /* PNChannel.h in Headers */, A504E14224AA94C8006DCF5B /* PNFile.h in Headers */, + A5CFE5952C192ECA00274165 /* PNSubscribeRequest.h in Headers */, A55BCCE7231D21840019DB68 /* PNAddMessageActionAPICallBuilder.h in Headers */, A5DB70EE2AAEFE58005B6559 /* PNCCCryptorWrapper.h in Headers */, A55A872022FD81E3002D0A72 /* PNSetChannelMetadataStatus.h in Headers */, A504E18524AAA724006DCF5B /* PNDownloadFileAPICallBuilder.h in Headers */, A5DB70952AAE778F005B6559 /* PNSequenceInputStream.h in Headers */, 79A8BC961C58F93900015BDE /* PNHelpers.h in Headers */, + A5567E6D2C1FBE44003C974F /* PubNub+Deprecated.h in Headers */, 7925DB881D3FFCAC00857C0D /* PNLLogger.h in Headers */, + A51B4A632BF0B117008C3370 /* PNJSONCodableObjects.h in Headers */, A5105B51238F027D00CB693D /* PNDate.h in Headers */, 79CD276124D6A371000698DD /* PNKeyValueStorage.h in Headers */, 799D60EB24C1B33900171C29 /* PNSendFileStatus.h in Headers */, - A568659A230170690014E17C /* PNFetchUUIDMetadataParser.h in Headers */, + A51B4A9F2BF0B428008C3370 /* PNError.h in Headers */, + A5567FF32C2242B1003C974F /* PNHistoryFetchData+Private.h in Headers */, + A5567FFC2C225146003C974F /* PNPresenceUserStateFetchData.h in Headers */, + A5CFE5702C19066C00274165 /* PNHistoryFetchRequest.h in Headers */, + A53248BB2C24E3D4003510FF /* PNSubscribeFileEventData+Private.h in Headers */, A55A861822FD80B9002D0A72 /* PNSetUUIDMetadataAPICallBuilder.h in Headers */, 79A8BCAE1C58F93900015BDE /* PNNumber.h in Headers */, + A5567E892C1FCF0F003C974F /* PNChannelGroupFetchData.h in Headers */, 79A8BCA31C58F93900015BDE /* PNParser.h in Headers */, - 79ABD8921F01636B007634E0 /* PNTelemetry.h in Headers */, 79A8BCA21C58F93900015BDE /* PNString.h in Headers */, + A5567F442C21E723003C974F /* PNChannelMembersFetchData.h in Headers */, A57A30B3238DC6B600DE8C68 /* PNAPNSNotificationPayload.h in Headers */, 79A0D95B1DC230FE0039A264 /* PNUnsubscribeAPICallBuilder.h in Headers */, + A55680172C226632003C974F /* PNChannelClientStateResult+Private.h in Headers */, A5046E302478471D0008C81E /* PNSetChannelMembersRequest.h in Headers */, 79A8BC8A1C58F93900015BDE /* PNOperationResult.h in Headers */, A57A306A238D6BCC00DE8C68 /* PNFCMNotificationPayload.h in Headers */, 79A8BC891C58F93900015BDE /* PNStatus.h in Headers */, + A5567EC52C207800003C974F /* PNSubscribeCursorData.h in Headers */, 797ABBB524C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.h in Headers */, + A5567F2C2C21DB10003C974F /* PNMembershipsManageData.h in Headers */, A504E0F224A8F314006DCF5B /* PNSendFileRequest+Private.h in Headers */, - A504E1CD24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h in Headers */, 79A8BCA61C58F93900015BDE /* PNArray.h in Headers */, - A55A888C22FD8272002D0A72 /* PNRequest.h in Headers */, - A58975E223005CFB0093BD9A /* PNMembership+Private.h in Headers */, + A5CFE5572C18D3B600274165 /* PNPresenceStateFetchRequest.h in Headers */, A5FADC352490270E001D7704 /* PubNub+Files.h in Headers */, - A5A7AFE3234932F30060113B /* PNRemoveMessageActionParser.h in Headers */, A504E1B524AD3219006DCF5B /* PNDeleteFileRequest.h in Headers */, 79A0D89B1DC22F830039A264 /* PNAPNSModificationAPICallBuilder.h in Headers */, A56BBFBC2AB63F8F00260D83 /* PNCryptoProvider.h in Headers */, A504E1D924B04751006DCF5B /* PNFilesManager.h in Headers */, - A55A872722FD81E3002D0A72 /* PNFetchChannelsMetadataResult.h in Headers */, + A5567EE92C20A51A003C974F /* PNPresenceHeartbeatRequest.h in Headers */, + A55A872722FD81E3002D0A72 /* PNFetchChannelMetadataResult.h in Headers */, + A5567FEA2C222F1B003C974F /* PNHistoryMessageCountData.h in Headers */, + A5567FD52C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h in Headers */, + A53248AF2C24D987003510FF /* PNJSONDecoder+Private.h in Headers */, A504E10524AA8F44006DCF5B /* PNListFilesResult.h in Headers */, + A51B4A492BF0B0B0008C3370 /* PNJSONEncoder.h in Headers */, 79A8BCA51C58F93900015BDE /* PNData.h in Headers */, 79CFA2D126DE1CD100D206D4 /* PNPAMToken+Private.h in Headers */, + A5CB33D82C0C70B2008527AA /* PNTransportMiddleware.h in Headers */, 79A8BC931C58F93900015BDE /* PNGZIP.h in Headers */, A5DB70E92AAEFE58005B6559 /* PNAESCBCCryptor.h in Headers */, 79A8BC911C58F93900015BDE /* PNJSON.h in Headers */, A55A882322FD8272002D0A72 /* PNFetchChannelMetadataRequest.h in Headers */, + A5CFE4602C123F2E00274165 /* PNBaseOperationData.h in Headers */, + A51B4A262BF0AE92008C3370 /* PNObjectSerializer.h in Headers */, + A5567F7A2C21F203003C974F /* PNUUIDMetadataFetchAllData.h in Headers */, A504E16124AAA6FE006DCF5B /* PNSendFileAPICallBuilder.h in Headers */, A568658A2300729E0014E17C /* PNFetchChannelMembersResult.h in Headers */, - A568656A2300709F0014E17C /* PNFetchMembershipsResult.h in Headers */, A55A868122FD80B9002D0A72 /* PNSetChannelMetadataAPICallBuilder.h in Headers */, A57A305A238D65A200DE8C68 /* PNNotificationsPayload.h in Headers */, + A556812B2C2435A5003C974F /* PNSubscribeRequest+Private.h in Headers */, A504E12924AA90B8006DCF5B /* PNDownloadFileResult.h in Headers */, + A55680732C2344A9003C974F /* PNFileListFetchData.h in Headers */, A504E19D24ACCA42006DCF5B /* PNFileDownloadURLAPICallBuilder.h in Headers */, - 79AA8ED026EB3A1200ADA747 /* PubNub+PAMPrivate.h in Headers */, 79A8BC8B1C58F93900015BDE /* PubNub.h in Headers */, 79A8BC8C1C58F93900015BDE /* PNAES.h in Headers */, A55A887722FD8272002D0A72 /* PNManageChannelMembersRequest.h in Headers */, @@ -5481,21 +6888,23 @@ A58975A3230014300093BD9A /* PNFetchChannelMembersAPICallBuilder.h in Headers */, 79A0D8F51DC230450039A264 /* PNPublishSizeAPICallBuilder.h in Headers */, A55A870422FD81E3002D0A72 /* PNSetUUIDMetadataStatus.h in Headers */, - 797ABBD824C9ADB80008CA1E /* PNSendFileStatus+Private.h in Headers */, A5A451EC246F2679008ECC74 /* PNRemoveChannelMembersAPICallBuilder.h in Headers */, - A5A7AFCE234932F30060113B /* PNFetchMessagesActionsParser.h in Headers */, A5DB70E42AAEFE58005B6559 /* PNEncryptedStream.h in Headers */, - A56865DA230175EC0014E17C /* PNMembershipsParser.h in Headers */, + A5567EB92C2077AE003C974F /* PNSubscribeData.h in Headers */, A5A4517B246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h in Headers */, + A5CFE41A2C1076A700274165 /* PNBaseRequest+Private.h in Headers */, 79DA780A24BFC1CF00AC72F2 /* PNDownloadFileRequest+Private.h in Headers */, A5DB70DF2AAEFE58005B6559 /* PNEncryptedData.h in Headers */, + A5567F982C220E32003C974F /* PNFetchMembershipsResult.h in Headers */, A5E3BA0E2B3118BE00D3AA18 /* PNRequestRetryConfiguration.h in Headers */, A5046E3A2478471D0008C81E /* PNSetMembershipsRequest.h in Headers */, A55A86C722FD817E002D0A72 /* PNUUIDMetadata.h in Headers */, A5A451BE246DE8C3008ECC74 /* PNRemoveChannelMembersRequest.h in Headers */, + A5CB33E42C0C7237008527AA /* PNTransportMiddlewareConfiguration.h in Headers */, A568657A230072810014E17C /* PNManageChannelMembersStatus.h in Headers */, CA01FEB0C051AAFDD41B5E93 /* PNObjectsAPICallBuilder.h in Headers */, A5DB70D52AAEFE58005B6559 /* PNCryptorInputStream+Private.h in Headers */, + A5CFE5632C18E9C600274165 /* PNPresenceHereNowResult.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5503,135 +6912,164 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A57A301E238D59B500DE8C68 /* PNAuditPushNotificationsRequest.h in Headers */, + A5CCEC6B2C0E816A00DB02A4 /* PNTransportResponse.h in Headers */, + A55681262C242EE6003C974F /* PNPresenceEventResult.h in Headers */, 79A0D92D1DC230AC0039A264 /* PNStreamAPICallBuilder.h in Headers */, 79A238E11D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfigurationPrivate.h in Headers */, + A51B4A222BF0AE79008C3370 /* PNEncoder.h in Headers */, A55DAF0A24B1FEC800766EE9 /* PNXML+Private.h in Headers */, 79AA8ECC26EAB81500ADA747 /* PNConfiguration+Private.h in Headers */, A58975B523005AAC0093BD9A /* PNManageMembershipsStatus.h in Headers */, - 79E20D2C1C8B0AD5001BC9CC /* PNPushNotificationsStateModificationParser.h in Headers */, 79A238D31D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.h in Headers */, + A5CFE5432C18D38600274165 /* PNWhereNowRequest.h in Headers */, 79E20D2B1C8B0A70001BC9CC /* PNPresenceChannelGroupHereNowResult.h in Headers */, + A5CB33CE2C046A1A008527AA /* PNTransportConfiguration.h in Headers */, 793248611D874D9F00FBDF36 /* PNPublishSequence.h in Headers */, A55A886422FD8272002D0A72 /* PNFetchMembershipsRequest.h in Headers */, - A56865632300622C0014E17C /* PNChannelMember+Private.h in Headers */, + A5CCEC662C0E816A00DB02A4 /* PNTransport.h in Headers */, A504E16F24AAA70A006DCF5B /* PNListFilesAPICallBuilder.h in Headers */, - 79CBB16A1BD03DE4001FC34D /* PNChannelGroupModificationParser.h in Headers */, - A57A303A238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.h in Headers */, A56BBFC52AB900B600260D83 /* NSInputStream+PNURL.h in Headers */, A5DB71402AAEFE58005B6559 /* PNCryptorHeaderV1Data.h in Headers */, 79CBB1241BD03DE4001FC34D /* PNChannelGroupClientStateResult.h in Headers */, + A55680C62C23A8CD003C974F /* PNSubscribeSignalEventData.h in Headers */, A55A86E322FD81E3002D0A72 /* PNFetchUUIDMetadataResult.h in Headers */, - 79CBB17C1BD03DE4001FC34D /* PNPushNotificationsAuditParser.h in Headers */, + A5567F672C21ECBE003C974F /* PNPagedAppContextData+Private.h in Headers */, A504E1AB24AD3209006DCF5B /* PNDownloadFileRequest.h in Headers */, 79CBB1311BD03DE4001FC34D /* PNPresenceChannelHereNowResult.h in Headers */, + A5567FA92C220F18003C974F /* PNPresenceChannelGroupHereNowResult+Private.h in Headers */, 79CBB1331BD03DE4001FC34D /* PNPresenceGlobalHereNowResult.h in Headers */, - 79CBB1681BD03DE4001FC34D /* PNChannelGroupAuditionParser.h in Headers */, 79CBB1221BD03DE4001FC34D /* PNChannelGroupChannelsResult.h in Headers */, + A53248C32C25B7BB003510FF /* PNSubscribeStatus+Private.h in Headers */, 79F90F1D1FDEC1C7007132A3 /* PNPresenceHeartbeatAPICallBuilder.h in Headers */, - A55DAEF324B1FE7600766EE9 /* PNXMLParser.h in Headers */, + A55680EA2C242BFF003C974F /* PNMessageResult.h in Headers */, + A5567E642C1F8C53003C974F /* PNOperationDataParser.h in Headers */, 79CFA2BC26DE1C4900D206D4 /* PNPAMToken.h in Headers */, + A51B4A352BF0AFB8008C3370 /* PNJSONSerialization.h in Headers */, + A5CFE5C42C1AAAAD00274165 /* PNErrorData.h in Headers */, A57A30F4238DDCA300DE8C68 /* PNAPNSNotificationPayload+Private.h in Headers */, - 79CBB1881BD03DE4001FC34D /* PNNetworkResponseSerializer.h in Headers */, 79F85802219640CA00BFD0B1 /* PNClientStateGetResult.h in Headers */, A57A30C5238DC71800DE8C68 /* PNAPNSNotificationConfiguration.h in Headers */, 79CBB11E1BD03DE4001FC34D /* PNAPNSEnabledChannelsResult.h in Headers */, 79CBB1201BD03DE4001FC34D /* PNChannelClientStateResult.h in Headers */, A50319B52AA5B05900B25A44 /* PNResult.h in Headers */, - 79E20D271C8AEFF2001BC9CC /* PNSubscribeStatus+Private.h in Headers */, + A556800D2C22603F003C974F /* PNClientStateGetResult+Private.h in Headers */, + A55680A22C2385BC003C974F /* PNSubscribeMessageEventData.h in Headers */, 79CBB1281BD03DE4001FC34D /* PNClientStateUpdateStatus.h in Headers */, - 79CBB17A1BD03DE4001FC34D /* PNPresenceWhereNowParser.h in Headers */, - A55A86B422FD817E002D0A72 /* PNChannelMetadata+Private.h in Headers */, 79A0D8B51DC22FBB0039A264 /* PNPresenceAPICallBuilder.h in Headers */, + A5567FBD2C221136003C974F /* PNChannelMetadataFetchData.h in Headers */, + A55680BA2C238EEB003C974F /* PNSubscribeObjectEventData.h in Headers */, + A5CFE4142C0F246400274165 /* PNBaseRequest.h in Headers */, 79CBB1351BD03DE4001FC34D /* PNPresenceWhereNowResult.h in Headers */, - 79CBB1781BD03DE4001FC34D /* PNPresenceHereNowParser.h in Headers */, + A51B4A162BF0AE36008C3370 /* PNCodable.h in Headers */, A52DC1E92307E10B001F20B0 /* NSDateFormatter+PNCacheable.h in Headers */, + A5CFE52B2C18C9D400274165 /* PNPushNotificationFetchRequest.h in Headers */, A55BCCA52319243F0019DB68 /* PNAddMessageActionStatus.h in Headers */, + A5CFE58C2C19203700274165 /* PNHistoryMessagesCountRequest.h in Headers */, 79CBB10A1BD03DE4001FC34D /* PubNub+SubscribePrivate.h in Headers */, A55A87AE22FD8272002D0A72 /* PNFetchUUIDMetadataRequest.h in Headers */, + A5567EAE2C20371C003C974F /* PNPresenceHereNowFetchData.h in Headers */, 79CBB1031BD03DE4001FC34D /* PubNub+PresencePrivate.h in Headers */, - 79CBB1761BD03DE4001FC34D /* PNMessagePublishParser.h in Headers */, 79CBB11C1BD03DE4001FC34D /* PNAcknowledgmentStatus.h in Headers */, 79CBB12A1BD03DE4001FC34D /* PNErrorStatus+Private.h in Headers */, + A5CFE4C12C1647B000274165 /* PNPublishData.h in Headers */, A504E1C824AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.h in Headers */, A50319D92AA65EB400B25A44 /* NSArray+PNMap.h in Headers */, A55BCD09231D22400019DB68 /* PNFetchMessagesActionsAPICallBuilder.h in Headers */, 79A0D90F1DC230760039A264 /* PNStateAuditAPICallBuilder.h in Headers */, 79CBB13C1BD03DE4001FC34D /* PNServiceData+Private.h in Headers */, 797D605D22D2E41100E64C94 /* PNSignalAPICallBuilder.h in Headers */, - A56865BC230173030014E17C /* PNChannelMetadataChangeParser.h in Headers */, + A5CB33EF2C0C7E94008527AA /* PNTransportConfiguration+Private.h in Headers */, + A5567E952C1FDEF7003C974F /* PNMessageActionsFetchData.h in Headers */, A57A30DD238DC87400DE8C68 /* PNAPNSNotificationTarget.h in Headers */, 7951954626BD44E9001E308C /* PubNub+PAM.h in Headers */, A51B49E32BDA7808008C3370 /* PNRequestRetryConfiguration+Private.h in Headers */, 79CBB1661BD03DE4001FC34D /* PNEventsListener.h in Headers */, - 79CBB1261BD03DE4001FC34D /* PNChannelGroupsResult.h in Headers */, - A55CA6A02397389100B24E02 /* PNKeychain+Private.h in Headers */, A55A864422FD80B9002D0A72 /* PNFetchAllUUIDMetadataAPICallBuilder.h in Headers */, + A5567F102C219757003C974F /* PNBaseAppContextObject.h in Headers */, A5046E1A247844E70008C81E /* PNSetChannelMembersAPICallBuilder.h in Headers */, + A5CFE54F2C18D3A700274165 /* PNPresenceStateSetRequest.h in Headers */, 79E20D191C8AEC44001BC9CC /* PNEnvelopeInformation.h in Headers */, A55A880222FD8272002D0A72 /* PNSetChannelMetadataRequest.h in Headers */, - 797ABBCF24C6E8650008CA1E /* PNDeleteFileParser.h in Headers */, A5897595230014220093BD9A /* PNManageChannelMembersAPICallBuilder.h in Headers */, + A5567EE02C209FF7003C974F /* PNPresenceWhereNowFetchData.h in Headers */, A55A85D422FD8078002D0A72 /* PubNub+Objects.h in Headers */, - 79CBB16C1BD03DE4001FC34D /* PNClientStateParser.h in Headers */, - 79CBB18C1BD03DE4001FC34D /* PNRequestParameters.h in Headers */, + A5567EF42C20D3DF003C974F /* PNPresenceHereNowFetchData+Private.h in Headers */, + A5CFE5372C18D33500274165 /* PNHereNowRequest.h in Headers */, 79650C311E775E8D00006F66 /* PNDefines.h in Headers */, + A523EEE72BFE910A009F45AA /* PNURLSessionTransport.h in Headers */, 79A0D9821DC2314C0039A264 /* PNTimeAPICallBuilder.h in Headers */, + A5567F712C21F0EA003C974F /* PNUUIDMetadataFetchData.h in Headers */, 79CBB1641BD03DE4001FC34D /* PNPrivateStructures.h in Headers */, 79A3E41B221569BA00F2ADB9 /* PNMessageCountResult.h in Headers */, 797ABBB024C415B50008CA1E /* PNBasePublishRequest+Private.h in Headers */, 79A0D9091DC230670039A264 /* PNStateAPICallBuilder.h in Headers */, A5A45189246D8CD5008ECC74 /* PNBaseObjectsMembershipRequest+Private.h in Headers */, - 79A3E42B221569DA00F2ADB9 /* PNMessageCountParser.h in Headers */, + A5567F892C21F31E003C974F /* PNChannelMetadataFetchAllData.h in Headers */, A523692C24A2270200656C19 /* PNAES+Private.h in Headers */, 79CBB1171BD03DE4001FC34D /* PNClientInformation.h in Headers */, - A57A3010238D59B500DE8C68 /* PNAddPushNotificationsRequest.h in Headers */, + A53249052C2AC5C1003510FF /* PNChannelGroupsResult.h in Headers */, + A5CFE4462C11E8D500274165 /* PNChannelGroupManageRequest.h in Headers */, A57A30AB238D78C400DE8C68 /* PNBaseNotificationPayload+Private.h in Headers */, - 79CBB1421BD03DE4001FC34D /* PNSubscriberResults.h in Headers */, + A5CFE4DF2C16500F00274165 /* PNSignalData.h in Headers */, A55A87CA22FD8272002D0A72 /* PNRemoveUUIDMetadataRequest.h in Headers */, + A5567F532C21E965003C974F /* PNMembershipsFetchData.h in Headers */, A55A866E22FD80B9002D0A72 /* PNFetchAllChannelsMetadataAPICallBuilder.h in Headers */, + A532490C2C2C7262003510FF /* PNHistoryFetchRequest+Private.h in Headers */, 79A0D93A1DC230CD0039A264 /* PNStreamModificationAPICallBuilder.h in Headers */, 79CBB0FA1BD03DE4001FC34D /* PubNub+ChannelGroup.h in Headers */, A56FAEF5233161570072ADD6 /* PubNub+MessageActions.h in Headers */, + A53248C92C28A3B5003510FF /* PNHistoryMessagesDeleteRequest.h in Headers */, + A51B4A972BF0B1E3008C3370 /* PNLock.h in Headers */, 79CBB0FE1BD03DE4001FC34D /* PubNub+CorePrivate.h in Headers */, - 79CBB1701BD03DE4001FC34D /* PNHeartbeatParser.h in Headers */, 799D611824C391A100171C29 /* PNPublishFileMessageRequest.h in Headers */, A5046E24247844E70008C81E /* PNSetMembershipsAPICallBuilder.h in Headers */, A5A7B0032349330F0060113B /* PNBaseMessageActionRequest+Private.h in Headers */, A5A7AFFC2349330F0060113B /* PNFetchMessageActionsRequest.h in Headers */, - 79CBB1821BD03DE4001FC34D /* PNSubscribeParser.h in Headers */, + A53248B72C24E2D1003510FF /* PNSubscribeMessageEventData+Private.h in Headers */, A504E19324AAA72E006DCF5B /* PNDeleteFileAPICallBuilder.h in Headers */, A55A885622FD8272002D0A72 /* PNFetchChannelMembersRequest.h in Headers */, - A57A3025238D59B500DE8C68 /* PNRemovePushNotificationsRequest.h in Headers */, A5A7B0112349330F0060113B /* PNAddMessageActionRequest.h in Headers */, + A51B4A592BF0B0CB008C3370 /* PNJSONCoder.h in Headers */, 79A0D8911DC22F690039A264 /* PNAPNSAuditAPICallBuilder.h in Headers */, A504E14F24AA9515006DCF5B /* PNFile+Private.h in Headers */, 797ABBA524C4148C0008CA1E /* PNBasePublishRequest.h in Headers */, - A56865EC230176760014E17C /* PNChannelMembersParser.h in Headers */, + A5567F5F2C21EBDF003C974F /* PNPagedAppContextData.h in Headers */, + A556810E2C242E09003C974F /* PNObjectEventResult.h in Headers */, A55A877D22FD8272002D0A72 /* PNObjectsPaginatedRequest.h in Headers */, + A5567E372C1EB4ED003C974F /* PNTimeRequest.h in Headers */, + A5CFE4772C14A90900274165 /* NSError+PNTransport.h in Headers */, 79CBB1441BD03DE4001FC34D /* PNSubscribeStatus.h in Headers */, A5FADC442490292A001D7704 /* PNSendFileRequest.h in Headers */, + A55681022C242D7C003C974F /* PNMessageActionResult.h in Headers */, A58975C523005BD80093BD9A /* PNMembership.h in Headers */, + A556806B2C2311D0003C974F /* PNGenerateFileDownloadURLRequest.h in Headers */, 79CBB1391BD03DE4001FC34D /* PNOperationResult+Private.h in Headers */, - A55A888722FD8272002D0A72 /* PNRequest+Private.h in Headers */, + A5567E7D2C1FCADC003C974F /* PNPushNotificationFetchData.h in Headers */, + A55680D22C2400B3003C974F /* PNSubscribePresenceEventData.h in Headers */, + A5CB33B02C035D7D008527AA /* PNTransportRequest.h in Headers */, 797D607422D2E44000E64C94 /* PNSignalStatus.h in Headers */, - 79CD277624D75AE9000698DD /* PNInMemoryStorage.h in Headers */, + A55680592C22BE6D003C974F /* PNFileUploadRequest.h in Headers */, 79CBB13F1BD03DE4001FC34D /* PNStatus+Private.h in Headers */, + A55680972C237BC1003C974F /* PNSubscribeEventData+Private.h in Headers */, + A5CCEC612C0E816A00DB02A4 /* PNRequest.h in Headers */, 79CBB1081BD03DE4001FC34D /* PubNub+Subscribe.h in Headers */, + A5CB33C42C0371E6008527AA /* PNTransportRequest+Private.h in Headers */, 79CBB1111BD03DE4001FC34D /* PNStateListener.h in Headers */, - 79CBB1721BD03DE4001FC34D /* PNHistoryParser.h in Headers */, + A5567E582C1F0484003C974F /* PNSignalRequest.h in Headers */, 79CBB12D1BD03DE4001FC34D /* PNHistoryResult.h in Headers */, A58975D523005BE60093BD9A /* PNChannelMember.h in Headers */, A55DAEFF24B1FE9E00766EE9 /* PNXML.h in Headers */, A55A87DF22FD8272002D0A72 /* PNBaseObjectsRequest.h in Headers */, A57A308C238D751400DE8C68 /* PNMPNSNotificationPayload.h in Headers */, + A5567FC92C221231003C974F /* PNChannelMetadataSetData.h in Headers */, 79CBB11A1BD03DE4001FC34D /* PNConfiguration.h in Headers */, A5DB70DC2AAEFE58005B6559 /* PNCryptoModule.h in Headers */, A57A30EC238DCAAF00DE8C68 /* PNAPNSNotificationTarget+Private.h in Headers */, A55A881E22FD8272002D0A72 /* PNFetchAllChannelsMetadataRequest.h in Headers */, - A56865CC230173AA0014E17C /* PNObjectsRemoveParser.h in Headers */, 79A0D9631DC231040039A264 /* PNUnsubscribeChannelsOrGroupsAPICallBuilder.h in Headers */, + A51B4A412BF0B097008C3370 /* PNJSONDecoder.h in Headers */, 79A0D8791DC22F220039A264 /* PNAPICallBuilder.h in Headers */, + A5567EFA2C20FE98003C974F /* PNPresenceGlobalHereNowResult+Private.h in Headers */, 79CBB1371BD03DE4001FC34D /* PNPublishStatus.h in Headers */, 79CBB1011BD03DE4001FC34D /* PubNub+Presence.h in Headers */, 79A0D8731DC22F090039A264 /* PNAPICallBuilder+Private.h in Headers */, @@ -5640,134 +7078,174 @@ 79CBB18A1BD03DE4001FC34D /* PNReachability.h in Headers */, 79CBB0FF1BD03DE4001FC34D /* PubNub+History.h in Headers */, 79CBB1041BD03DE4001FC34D /* PubNub+Publish.h in Headers */, + A55680472C229D8D003C974F /* PNFileSendData.h in Headers */, A55A861322FD80B9002D0A72 /* PNRemoveUUIDMetadataAPICallBuilder.h in Headers */, - 79CBB1741BD03DE4001FC34D /* PNLeaveParser.h in Headers */, - A55BCD28231D27F00019DB68 /* PNMessageAction+Private.h in Headers */, 79CBB10D1BD03DE4001FC34D /* PNClientState.h in Headers */, - 79CBB16E1BD03DE4001FC34D /* PNErrorParser.h in Headers */, 79CBB12B1BD03DE4001FC34D /* PNErrorStatus.h in Headers */, 79CBB13D1BD03DE4001FC34D /* PNServiceData.h in Headers */, + A51B4A1C2BF0AE57008C3370 /* PNDecoder.h in Headers */, 79A0D8A91DC22FA60039A264 /* PNHistoryAPICallBuilder.h in Headers */, + A556811A2C242E96003C974F /* PNFileEventResult.h in Headers */, + A5567ED42C208652003C974F /* PNSubscribeEventData.h in Headers */, + A53248E32C28E3AB003510FF /* PNXMLParser.h in Headers */, + A5CFE5CB2C1AE33500274165 /* PNBaseOperationData+Private.h in Headers */, A5DB71092AAEFE58005B6559 /* PNAESCBCCryptor+Private.h in Headers */, - A504E13824AA9361006DCF5B /* PNListFilesParser.h in Headers */, 79A0D9341DC230BD0039A264 /* PNStreamAuditAPICallBuilder.h in Headers */, 79CBB1501BD03DE4001FC34D /* PNDictionary.h in Headers */, + A51B4A7F2BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.h in Headers */, 79CBB1131BD03DE4001FC34D /* PNSubscriber.h in Headers */, 79CFA2B026DE0AEB00D206D4 /* PNCBORDecoder.h in Headers */, A5897585230014160093BD9A /* PNFetchMembershipsAPICallBuilder.h in Headers */, - A55A874122FD825A002D0A72 /* PNUUIDMetadataChangeParser.h in Headers */, - A5A7AFD7234932F30060113B /* PNAddMessageActionParser.h in Headers */, + A53248AB2C24CD2B003510FF /* PNPresenceLeaveRequest+Private.h in Headers */, + A51B4A0F2BF0ADD6008C3370 /* PNJSONSerializer.h in Headers */, 79CBB1591BD03DE4001FC34D /* PNURLRequest.h in Headers */, - A56865AC230172950014E17C /* PNFetchChannelsMetadataParser.h in Headers */, A5DB70F52AAEFE58005B6559 /* PNLegacyCryptor.h in Headers */, - 79CBB18E1BD03DE4001FC34D /* PNURLBuilder.h in Headers */, - 79CBB1841BD03DE4001FC34D /* PNTimeParser.h in Headers */, 79A0D8CD1DC22FFA0039A264 /* PNPresenceWhereNowAPICallBuilder.h in Headers */, - 79CD276A24D75342000698DD /* PNKeychainStorage.h in Headers */, 79CBB1651BD03DE4001FC34D /* PNStructures.h in Headers */, 79A0D9511DC230F50039A264 /* PNSubscribeAPIBuilder.h in Headers */, 79A0D8F11DC230350039A264 /* PNPublishAPICallBuilder.h in Headers */, + A5567F3B2C21E4DF003C974F /* PNUUIDMetadataSetData.h in Headers */, + A556803B2C229587003C974F /* PNFileGenerateUploadURLData.h in Headers */, 799D610624C36D5B00171C29 /* PNPublishRequest.h in Headers */, + A55680DE2C2428E8003C974F /* PNSubscribeFileEventData.h in Headers */, 79CBB1461BD03DE4001FC34D /* PNTimeResult.h in Headers */, 79650C371E775E9700006F66 /* PNLockSupport.h in Headers */, 79A0D9151DC230890039A264 /* PNStateModificationAPICallBuilder.h in Headers */, - 79CD275824D6A1CB000698DD /* PNDataStorage.h in Headers */, A55A866022FD80B9002D0A72 /* PNFetchChannelMetadataAPICallBuilder.h in Headers */, + A53248FA2C2AB5B3003510FF /* PNRemoveMessageActionRequest+Private.h in Headers */, A5A451A1246DE792008ECC74 /* PNRemoveMembershipsRequest.h in Headers */, - A504E11F24AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.h in Headers */, + A55680AE2C23880C003C974F /* PNSubscribeMessageActionEventData.h in Headers */, A55A86BB22FD817E002D0A72 /* PNChannelMetadata.h in Headers */, - 79CBB1631BD03DE4001FC34D /* PNErrorCodes.h in Headers */, - A55A86C222FD817E002D0A72 /* PNUUIDMetadata+Private.h in Headers */, + A5567EA12C20243C003C974F /* PNMessageActionFetchData.h in Headers */, 79A0D8C11DC22FD60039A264 /* PNPresenceChannelHereNowAPICallBuilder.h in Headers */, A57A30D4238DC7FF00DE8C68 /* PNAPNSNotificationConfiguration+Private.h in Headers */, 79CBB1061BD03DE4001FC34D /* PubNub+State.h in Headers */, A57A304F238D59B500DE8C68 /* PNBasePushNotificationsRequest.h in Headers */, + A556808A2C23527D003C974F /* PNFileDownloadData.h in Headers */, + A5CFE5D12C1AFF9100274165 /* PNErrorData+Private.h in Headers */, + A5567F232C21D53D003C974F /* PNChannelMembersManageData.h in Headers */, + A55680F62C242D11003C974F /* PNSignalResult.h in Headers */, + A55680072C225579003C974F /* PNPresenceUserStateFetchData+Private.h in Headers */, A5DB714A2AAEFE59005B6559 /* PNCryptorHeader.h in Headers */, + A5CFE51F2C18969900274165 /* PNBasePushNotificationsRequest+Private.h in Headers */, A5DB71452AAEFE58005B6559 /* PNCryptorHeader+Private.h in Headers */, 79CBB1621BD03DE4001FC34D /* PNConstants.h in Headers */, + A5567F002C210714003C974F /* PNPresenceChannelHereNowResult+Private.h in Headers */, 79CBB10F1BD03DE4001FC34D /* PNHeartbeat.h in Headers */, + A5567F182C219B9A003C974F /* PNBaseAppContextObject+Private.h in Headers */, A55A869F22FD80B9002D0A72 /* PNRemoveChannelMetadataAPICallBuilder.h in Headers */, + A5CCEC562C0E006000DB02A4 /* PNURLSessionTransportResponse.h in Headers */, 79A0D9571DC230FA0039A264 /* PNSubscribeChannelsOrGroupsAPIBuilder.h in Headers */, A504E0FB24AA8AEA006DCF5B /* PNListFilesRequest.h in Headers */, A504E15724AA9CFB006DCF5B /* PNFilesAPICallBuilder.h in Headers */, A55A879922FD8272002D0A72 /* PNFetchAllUUIDMetadataRequest.h in Headers */, A5ADD6292AC0CE8100310A08 /* NSInputStream+PNCrypto.h in Headers */, A5897575230014090093BD9A /* PNManageMembershipsAPICallBuilder.h in Headers */, + A51B4A732BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.h in Headers */, + A556802C2C2294EE003C974F /* PNGenerateFileUploadURLStatus.h in Headers */, + A5CFE5182C1892AD00274165 /* PNPushNotificationManageRequest.h in Headers */, 79CBB0FC1BD03DE4001FC34D /* PubNub+Core.h in Headers */, 79A3E4122215699900F2ADB9 /* PNMessageCountAPICallBuilder.h in Headers */, 79CBB10B1BD03DE4001FC34D /* PubNub+Time.h in Headers */, 79CBB0F81BD03DE4001FC34D /* PubNub+APNS.h in Headers */, 79A0D8C71DC22FEA0039A264 /* PNPresenceHereNowAPICallBuilder.h in Headers */, A5DB710E2AAEFE58005B6559 /* PNCryptorInputStream.h in Headers */, + A5567FDE2C221A20003C974F /* PNFetchAllUUIDMetadataResult.h in Headers */, + A556804F2C22BA84003C974F /* PNFileSendData+Private.h in Headers */, + A55680232C226866003C974F /* PNPresenceUserStateSetData.h in Headers */, A5A7B0342349330F0060113B /* PNBaseMessageActionRequest.h in Headers */, A5A7B02D2349330F0060113B /* PNRemoveMessageActionRequest.h in Headers */, A586A9EF2337E581008856D2 /* PNFetchMessageActionsResult.h in Headers */, A57A309C238D784A00DE8C68 /* PNBaseNotificationPayload.h in Headers */, 79CBB1611BD03DE4001FC34D /* PNLogMacro.h in Headers */, + A5CFE5A52C1933BD00274165 /* PNPresenceLeaveRequest.h in Headers */, A55A878B22FD8272002D0A72 /* PNSetUUIDMetadataRequest.h in Headers */, A55A863D22FD80B9002D0A72 /* PNFetchUUIDMetadataAPICallBuilder.h in Headers */, - 79E2D0F01C56434700BAA244 /* PNKeychain.h in Headers */, + A5CFE4F82C16528700274165 /* PNTimeData.h in Headers */, + A5CFE50C2C1658E700274165 /* PNHistoryFetchData.h in Headers */, A5A45208246F268C008ECC74 /* PNRemoveMembershipsAPICallBuilder.h in Headers */, + A51B4A8B2BF0B197008C3370 /* PNFunctions.h in Headers */, A589756C22FEF0F70093BD9A /* PNBaseObjectsRequest+Private.h in Headers */, - 79CBB1861BD03DE4001FC34D /* PNNetwork.h in Headers */, + A55680132C226378003C974F /* PNChannelGroupClientStateResult+Private.h in Headers */, + A55680912C235360003C974F /* PNFileDownloadData+Private.h in Headers */, 79A0D8BB1DC22FC90039A264 /* PNPresenceChannelGroupHereNowAPICallBuilder.h in Headers */, + A5567E452C1ECC59003C974F /* PNPresenceStateFetchResult.h in Headers */, 79CBB14A1BD03DE4001FC34D /* PNChannel.h in Headers */, A55BCD19231D26110019DB68 /* PNMessageAction.h in Headers */, + A556807F2C234B4E003C974F /* PNFileListFetchData+Private.h in Headers */, + A51B4AB02BF37F03008C3370 /* PNChannelGroupFetchRequest.h in Headers */, A50319AE2AA48F1A00B25A44 /* PNCryptor.h in Headers */, 7960B6671F68122100FFAEBB /* PNDeleteMessageAPICallBuilder.h in Headers */, A55BCCF9231D222B0019DB68 /* PNRemoveMessageActionAPICallBuilder.h in Headers */, 79CBB1541BD03DE4001FC34D /* PNHelpers.h in Headers */, A504E14424AA94C8006DCF5B /* PNFile.h in Headers */, + A5CFE5992C192ECA00274165 /* PNSubscribeRequest.h in Headers */, A55BCCE9231D21840019DB68 /* PNAddMessageActionAPICallBuilder.h in Headers */, A5DB70F02AAEFE58005B6559 /* PNCCCryptorWrapper.h in Headers */, A55A872222FD81E3002D0A72 /* PNSetChannelMetadataStatus.h in Headers */, A504E18724AAA724006DCF5B /* PNDownloadFileAPICallBuilder.h in Headers */, A5DB70972AAE778F005B6559 /* PNSequenceInputStream.h in Headers */, 7925DB8A1D3FFCAC00857C0D /* PNLLogger.h in Headers */, + A5567E702C1FBE44003C974F /* PubNub+Deprecated.h in Headers */, 793887071BEAD4A800DCC662 /* PNNumber.h in Headers */, + A51B4A672BF0B117008C3370 /* PNJSONCodableObjects.h in Headers */, A5105B53238F027D00CB693D /* PNDate.h in Headers */, 79CD276324D6A371000698DD /* PNKeyValueStorage.h in Headers */, 799D60ED24C1B33900171C29 /* PNSendFileStatus.h in Headers */, - A568659C230170690014E17C /* PNFetchUUIDMetadataParser.h in Headers */, + A51B4AA32BF0B428008C3370 /* PNError.h in Headers */, + A5567FF52C2242B1003C974F /* PNHistoryFetchData+Private.h in Headers */, + A5567FFF2C225146003C974F /* PNPresenceUserStateFetchData.h in Headers */, + A5CFE5742C19066C00274165 /* PNHistoryFetchRequest.h in Headers */, + A53248BD2C24E3D4003510FF /* PNSubscribeFileEventData+Private.h in Headers */, A55A861A22FD80B9002D0A72 /* PNSetUUIDMetadataAPICallBuilder.h in Headers */, 79CBB1671BD03DE4001FC34D /* PNParser.h in Headers */, + A5567E8B2C1FCF0F003C974F /* PNChannelGroupFetchData.h in Headers */, 79CBB1571BD03DE4001FC34D /* PNString.h in Headers */, - 79ABD8941F01636B007634E0 /* PNTelemetry.h in Headers */, 79CBB13A1BD03DE4001FC34D /* PNOperationResult.h in Headers */, + A5567F472C21E723003C974F /* PNChannelMembersFetchData.h in Headers */, A57A30B5238DC6B600DE8C68 /* PNAPNSNotificationPayload.h in Headers */, 79A0D95D1DC230FF0039A264 /* PNUnsubscribeAPICallBuilder.h in Headers */, + A55680192C226632003C974F /* PNChannelClientStateResult+Private.h in Headers */, A5046E322478471D0008C81E /* PNSetChannelMembersRequest.h in Headers */, 79CBB1401BD03DE4001FC34D /* PNStatus.h in Headers */, A57A306C238D6BCC00DE8C68 /* PNFCMNotificationPayload.h in Headers */, 7925DB981D3FFCAC00857C0D /* PNLLogFileInformation.h in Headers */, + A5567EC82C207800003C974F /* PNSubscribeCursorData.h in Headers */, 797ABBB724C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.h in Headers */, + A5567F2F2C21DB10003C974F /* PNMembershipsManageData.h in Headers */, A504E0F424A8F314006DCF5B /* PNSendFileRequest+Private.h in Headers */, - A504E1CF24AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.h in Headers */, 79CBB1481BD03DE4001FC34D /* PNArray.h in Headers */, - A55A888E22FD8272002D0A72 /* PNRequest.h in Headers */, - A58975E423005CFB0093BD9A /* PNMembership+Private.h in Headers */, + A5CFE55B2C18D3B600274165 /* PNPresenceStateFetchRequest.h in Headers */, A5FADC372490270E001D7704 /* PubNub+Files.h in Headers */, - A5A7AFE5234932F30060113B /* PNRemoveMessageActionParser.h in Headers */, A504E1B724AD3219006DCF5B /* PNDeleteFileRequest.h in Headers */, 79A0D89D1DC22F840039A264 /* PNAPNSModificationAPICallBuilder.h in Headers */, A56BBFBE2AB63F8F00260D83 /* PNCryptoProvider.h in Headers */, A504E1DB24B04751006DCF5B /* PNFilesManager.h in Headers */, - A55A872922FD81E3002D0A72 /* PNFetchChannelsMetadataResult.h in Headers */, + A5567EEC2C20A51A003C974F /* PNPresenceHeartbeatRequest.h in Headers */, + A55A872922FD81E3002D0A72 /* PNFetchChannelMetadataResult.h in Headers */, + A5567FED2C222F1B003C974F /* PNHistoryMessageCountData.h in Headers */, + A5567FD72C2213AF003C974F /* PNFetchAllChannelsMetadataResult.h in Headers */, + A53248B12C24D987003510FF /* PNJSONDecoder+Private.h in Headers */, A504E10724AA8F44006DCF5B /* PNListFilesResult.h in Headers */, + A51B4A4D2BF0B0B0008C3370 /* PNJSONEncoder.h in Headers */, 79CBB14E1BD03DE4001FC34D /* PNData.h in Headers */, 79CFA2D326DE1CD100D206D4 /* PNPAMToken+Private.h in Headers */, + A5CB33DB2C0C70B2008527AA /* PNTransportMiddleware.h in Headers */, 79CBB1521BD03DE4001FC34D /* PNGZIP.h in Headers */, A5DB70EB2AAEFE58005B6559 /* PNAESCBCCryptor.h in Headers */, 79CBB1551BD03DE4001FC34D /* PNJSON.h in Headers */, A55A882522FD8272002D0A72 /* PNFetchChannelMetadataRequest.h in Headers */, + A5CFE4642C123F2E00274165 /* PNBaseOperationData.h in Headers */, + A51B4A282BF0AE92008C3370 /* PNObjectSerializer.h in Headers */, + A5567F7D2C21F203003C974F /* PNUUIDMetadataFetchAllData.h in Headers */, A504E16324AAA6FE006DCF5B /* PNSendFileAPICallBuilder.h in Headers */, A568658C2300729E0014E17C /* PNFetchChannelMembersResult.h in Headers */, - A568656C2300709F0014E17C /* PNFetchMembershipsResult.h in Headers */, A55A868322FD80B9002D0A72 /* PNSetChannelMetadataAPICallBuilder.h in Headers */, A57A305C238D65A200DE8C68 /* PNNotificationsPayload.h in Headers */, + A556812D2C2435A5003C974F /* PNSubscribeRequest+Private.h in Headers */, A504E12B24AA90B8006DCF5B /* PNDownloadFileResult.h in Headers */, + A55680782C2344A9003C974F /* PNFileListFetchData.h in Headers */, A504E19F24ACCA42006DCF5B /* PNFileDownloadURLAPICallBuilder.h in Headers */, - 79AA8ED226EB3A1200ADA747 /* PubNub+PAMPrivate.h in Headers */, 79CBB0421BD03D3F001FC34D /* PubNub.h in Headers */, 79CBB1151BD03DE4001FC34D /* PNAES.h in Headers */, A55A887922FD8272002D0A72 /* PNManageChannelMembersRequest.h in Headers */, @@ -5775,21 +7253,23 @@ A58975A5230014300093BD9A /* PNFetchChannelMembersAPICallBuilder.h in Headers */, 79A0D8F71DC230460039A264 /* PNPublishSizeAPICallBuilder.h in Headers */, A55A870622FD81E3002D0A72 /* PNSetUUIDMetadataStatus.h in Headers */, - 797ABBDA24C9ADB80008CA1E /* PNSendFileStatus+Private.h in Headers */, A5A451EE246F2679008ECC74 /* PNRemoveChannelMembersAPICallBuilder.h in Headers */, - A5A7AFD0234932F30060113B /* PNFetchMessagesActionsParser.h in Headers */, A5DB70E62AAEFE58005B6559 /* PNEncryptedStream.h in Headers */, - A56865DC230175EC0014E17C /* PNMembershipsParser.h in Headers */, + A5567EBC2C2077AE003C974F /* PNSubscribeData.h in Headers */, A5A4517D246D8CBE008ECC74 /* PNBaseObjectsMembershipRequest.h in Headers */, + A5CFE41C2C1076A700274165 /* PNBaseRequest+Private.h in Headers */, 79DA780C24BFC1CF00AC72F2 /* PNDownloadFileRequest+Private.h in Headers */, A5DB70E12AAEFE58005B6559 /* PNEncryptedData.h in Headers */, + A5567F9A2C220E32003C974F /* PNFetchMembershipsResult.h in Headers */, A5E3BA102B3118BE00D3AA18 /* PNRequestRetryConfiguration.h in Headers */, A5046E3C2478471D0008C81E /* PNSetMembershipsRequest.h in Headers */, A55A86C922FD817E002D0A72 /* PNUUIDMetadata.h in Headers */, A5A451C0246DE8C3008ECC74 /* PNRemoveChannelMembersRequest.h in Headers */, + A5CB33E72C0C7237008527AA /* PNTransportMiddlewareConfiguration.h in Headers */, A568657C230072810014E17C /* PNManageChannelMembersStatus.h in Headers */, CA01F83D2112B9CBF2A3BCCB /* PNObjectsAPICallBuilder.h in Headers */, A5DB70D72AAEFE58005B6559 /* PNCryptorInputStream+Private.h in Headers */, + A5CFE5672C18E9C600274165 /* PNPresenceHereNowResult.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -6254,86 +7734,97 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + A53248D22C28D211003510FF /* PNHistoryMessageCountData.m in Sources */, + A5CFE5542C18D3B600274165 /* PNPresenceStateFetchRequest.m in Sources */, A5046F0424784CAB0008C81E /* PNFetchChannelMetadataAPICallBuilder.m in Sources */, 7951954826BD44E9001E308C /* PubNub+PAM.m in Sources */, - 791582151BD709C60084FC70 /* PNPushNotificationsStateModificationParser.m in Sources */, + A5567EC22C207800003C974F /* PNSubscribeCursorData.m in Sources */, + A5CFE5052C1658E700274165 /* PNHistoryFetchData.m in Sources */, A57A30B9238DC6B600DE8C68 /* PNAPNSNotificationPayload.m in Sources */, A504E0FD24AA8AEA006DCF5B /* PNListFilesRequest.m in Sources */, 79A238D71D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.m in Sources */, + A51B4A912BF0B1E3008C3370 /* PNLock.m in Sources */, + A5567F352C21E4DF003C974F /* PNUUIDMetadataSetData.m in Sources */, 797ABBA724C4148C0008CA1E /* PNBasePublishRequest.m in Sources */, A5046EFB24784CAB0008C81E /* PNManageMembershipsAPICallBuilder.m in Sources */, - A5A7AFDB234932F30060113B /* PNAddMessageActionParser.m in Sources */, A5046F1624784CAB0008C81E /* PNFetchChannelMembersRequest.m in Sources */, + A523EEE22BFE910A009F45AA /* PNURLSessionTransport.m in Sources */, 791582411BD709C60084FC70 /* PNPresenceChannelGroupHereNowResult.m in Sources */, - 7915822A1BD709C60084FC70 /* PNChannelGroupModificationParser.m in Sources */, + A5567FB72C221136003C974F /* PNChannelMetadataFetchData.m in Sources */, + A55680EF2C242D11003C974F /* PNSignalResult.m in Sources */, A57A30C9238DC71800DE8C68 /* PNAPNSNotificationConfiguration.m in Sources */, 7915823F1BD709C60084FC70 /* PNChannelGroupClientStateResult.m in Sources */, 791582491BD709C60084FC70 /* PNPresenceChannelHereNowResult.m in Sources */, - 79ABD8981F01636B007634E0 /* PNTelemetry.m in Sources */, + A5567EA82C20371C003C974F /* PNPresenceHereNowFetchData.m in Sources */, 79A0D85B1DC22C950039A264 /* PNStateAuditAPICallBuilder.m in Sources */, + A5CFE56D2C19066C00274165 /* PNHistoryFetchRequest.m in Sources */, 79A0D8451DC22C950039A264 /* PNAPNSAuditAPICallBuilder.m in Sources */, A5A7B0232349330F0060113B /* PNRemoveMessageActionRequest.m in Sources */, 799D60EF24C1B33900171C29 /* PNSendFileStatus.m in Sources */, 79A0D8591DC22C950039A264 /* PNStateAPICallBuilder.m in Sources */, A5046F0324784CAB0008C81E /* PNRemoveChannelMetadataAPICallBuilder.m in Sources */, + A5CCEC502C0E006000DB02A4 /* PNURLSessionTransportResponse.m in Sources */, A5046F0724784CAB0008C81E /* PNRemoveUUIDMetadataAPICallBuilder.m in Sources */, 79A0D8431DC22C950039A264 /* PNAPNSAPICallBuilder.m in Sources */, - 7915821E1BD709C60084FC70 /* PNPushNotificationsAuditParser.m in Sources */, + A5567ECE2C208652003C974F /* PNSubscribeEventData.m in Sources */, A55BCCFD231D222B0019DB68 /* PNRemoveMessageActionAPICallBuilder.m in Sources */, 797ABBB924C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.m in Sources */, 7915820A1BD709C60084FC70 /* PNPresenceGlobalHereNowResult.m in Sources */, 7915822D1BD709C60084FC70 /* PNChannelGroupChannelsResult.m in Sources */, + A55680FB2C242D7C003C974F /* PNMessageActionResult.m in Sources */, + A55680712C2344A9003C974F /* PNFileListFetchData.m in Sources */, A504E1DD24B04751006DCF5B /* PNFilesManager.m in Sources */, - 791582191BD709C60084FC70 /* PNChannelGroupAuditionParser.m in Sources */, + A55680B32C238EEB003C974F /* PNSubscribeObjectEventData.m in Sources */, A504E18924AAA724006DCF5B /* PNDownloadFileAPICallBuilder.m in Sources */, A504E10924AA8F44006DCF5B /* PNListFilesResult.m in Sources */, A5046F0924784CAB0008C81E /* PNSetUUIDMetadataAPICallBuilder.m in Sources */, A5046EFC24784CAB0008C81E /* PNFetchMembershipsAPICallBuilder.m in Sources */, A5046F1B24784CAB0008C81E /* PNFetchAllChannelsMetadataRequest.m in Sources */, A5046F1224784CAB0008C81E /* PNFetchMembershipsRequest.m in Sources */, + A55680652C2311D0003C974F /* PNGenerateFileDownloadURLRequest.m in Sources */, A5046F1524784CAB0008C81E /* PNSetMembershipsRequest.m in Sources */, A5046F1824784CAB0008C81E /* PNSetChannelMetadataRequest.m in Sources */, + A5CFE53C2C18D38600274165 /* PNWhereNowRequest.m in Sources */, + A5567EE62C20A51A003C974F /* PNPresenceHeartbeatRequest.m in Sources */, A5DB71012AAEFE58005B6559 /* PNLegacyCryptor.m in Sources */, 791582471BD709C60084FC70 /* PNAPNSEnabledChannelsResult.m in Sources */, + A53248FF2C2AC5C1003510FF /* PNChannelGroupsResult.m in Sources */, A5046F0C24784CAB0008C81E /* PNChannelMember.m in Sources */, - A57A303E238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m in Sources */, - 791582451BD709C60084FC70 /* PNNetworkResponseSerializer.m in Sources */, A5046EFE24784CAB0008C81E /* PNManageChannelMembersAPICallBuilder.m in Sources */, 791582261BD709C60084FC70 /* PNChannelClientStateResult.m in Sources */, A55DAF0124B1FE9E00766EE9 /* PNXML.m in Sources */, A55A872D22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m in Sources */, - 791582371BD709C60084FC70 /* PNClientStateUpdateStatus.m in Sources */, + A5567E4A2C1EDB02003C974F /* PNPushNotificationFetchRequest.m in Sources */, 791582171BD709C60084FC70 /* PNPresenceWhereNowResult.m in Sources */, - 791582271BD709C60084FC70 /* PNPresenceWhereNowParser.m in Sources */, - A5046F2524784CAB0008C81E /* PNMembershipsParser.m in Sources */, - A57A3030238D59B500DE8C68 /* PNAddPushNotificationsRequest.m in Sources */, - A504E13A24AA9361006DCF5B /* PNListFilesParser.m in Sources */, + A5567E772C1FCADC003C974F /* PNPushNotificationFetchData.m in Sources */, + A5CFE5602C18E9C600274165 /* PNPresenceHereNowResult.m in Sources */, A504E1B924AD3219006DCF5B /* PNDeleteFileRequest.m in Sources */, - 7915824C1BD709C60084FC70 /* PNPresenceHereNowParser.m in Sources */, 791582211BD709C60084FC70 /* PNAcknowledgmentStatus.m in Sources */, - A55DAEF524B1FE7600766EE9 /* PNXMLParser.m in Sources */, - 791582311BD709C60084FC70 /* PNMessagePublishParser.m in Sources */, - 7915821A1BD709C60084FC70 /* PNChannelGroupsResult.m in Sources */, + A5CFE5302C18D33500274165 /* PNHereNowRequest.m in Sources */, + A55680832C23527D003C974F /* PNFileDownloadData.m in Sources */, 79E20D161C8AEC3A001BC9CC /* PNEnvelopeInformation.m in Sources */, 7925DB9C1D3FFCAC00857C0D /* PNLLogFileInformation.m in Sources */, 7915822C1BD709C60084FC70 /* PNClientInformation.m in Sources */, 793248651D874D9F00FBDF36 /* PNPublishSequence.m in Sources */, - A504E12124AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m in Sources */, - 791582231BD709C60084FC70 /* PNRequestParameters.m in Sources */, - 791582291BD709C60084FC70 /* PNSubscriberResults.m in Sources */, + A5567FCF2C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m in Sources */, A5FADC392490270E001D7704 /* PubNub+Files.m in Sources */, A5046F2024784CAB0008C81E /* PNObjectsPaginatedRequest.m in Sources */, 791582221BD709C60084FC70 /* PubNub+ChannelGroup.m in Sources */, + A5CFE5112C1892AD00274165 /* PNPushNotificationManageRequest.m in Sources */, A5046F0524784CAB0008C81E /* PNSetChannelMetadataAPICallBuilder.m in Sources */, - 7915824A1BD709C60084FC70 /* PNClientStateParser.m in Sources */, A504E17124AAA70A006DCF5B /* PNListFilesAPICallBuilder.m in Sources */, A57A3090238D751400DE8C68 /* PNMPNSNotificationPayload.m in Sources */, - 791582301BD709C60084FC70 /* PNSubscribeParser.m in Sources */, - 791582421BD709C60084FC70 /* PNHeartbeatParser.m in Sources */, + A5567E322C1EB4ED003C974F /* PNTimeRequest.m in Sources */, + A5567E5E2C1F8C53003C974F /* PNOperationDataParser.m in Sources */, + A5CFE4702C14A90900274165 /* NSError+PNTransport.m in Sources */, + A5CFE43F2C11E8D500274165 /* PNChannelGroupManageRequest.m in Sources */, A5046EFA24784CAB0008C81E /* PNRemoveMembershipsAPICallBuilder.m in Sources */, + A51B4A2F2BF0AFB8008C3370 /* PNJSONSerialization.m in Sources */, 791582111BD709C60084FC70 /* PNSubscribeStatus.m in Sources */, + A55680CB2C2400B3003C974F /* PNSubscribePresenceEventData.m in Sources */, 791582461BD709C60084FC70 /* PubNub+Subscribe.m in Sources */, 79A0D8631DC22C950039A264 /* PNStreamModificationAPICallBuilder.m in Sources */, + A5567FC32C221230003C974F /* PNChannelMetadataSetData.m in Sources */, A57A30A0238D784A00DE8C68 /* PNBaseNotificationPayload.m in Sources */, A5FADC462490292A001D7704 /* PNSendFileRequest.m in Sources */, 79A0D8471DC22C950039A264 /* PNAPNSModificationAPICallBuilder.m in Sources */, @@ -6343,82 +7834,96 @@ A55A86E722FD81E3002D0A72 /* PNFetchUUIDMetadataResult.m in Sources */, 7915823C1BD709C60084FC70 /* PubNub+Presence.m in Sources */, A5046F0824784CAB0008C81E /* PNFetchUUIDMetadataAPICallBuilder.m in Sources */, - 79CD275A24D6A1CB000698DD /* PNDataStorage.m in Sources */, + A556802E2C2294EE003C974F /* PNGenerateFileUploadURLStatus.m in Sources */, A5DB71292AAEFE58005B6559 /* PNCryptoModule.m in Sources */, - 791582131BD709C60084FC70 /* PNHistoryParser.m in Sources */, A56BBFC72AB900B600260D83 /* NSInputStream+PNURL.m in Sources */, + A5567F592C21EBDF003C974F /* PNPagedAppContextData.m in Sources */, A5046F1A24784CAB0008C81E /* PNFetchChannelMetadataRequest.m in Sources */, 79A0D8691DC22C950039A264 /* PNUnsubscribeAPICallBuilder.m in Sources */, 79A0D86D1DC22C950039A264 /* PNTimeAPICallBuilder.m in Sources */, A55BCCA92319243F0019DB68 /* PNAddMessageActionStatus.m in Sources */, + A5CB33D62C0C70B2008527AA /* PNTransportMiddleware.m in Sources */, + A53248E52C28E3AB003510FF /* PNXMLParser.m in Sources */, + A556809B2C2385BC003C974F /* PNSubscribeMessageEventData.m in Sources */, A5046F1324784CAB0008C81E /* PNManageChannelMembersRequest.m in Sources */, 799D611A24C391A100171C29 /* PNPublishFileMessageRequest.m in Sources */, 79A0D8701DC22C950039A264 /* PNAPICallBuilder.m in Sources */, + A5CFE45D2C123F2E00274165 /* PNBaseOperationData.m in Sources */, 79A0D86B1DC22C950039A264 /* PNUnsubscribeChannelsOrGroupsAPICallBuilder.m in Sources */, 7960B6641F6811D700FFAEBB /* PNDeleteMessageAPICallBuilder.m in Sources */, 791582241BD709C60084FC70 /* PNHistoryResult.m in Sources */, + A53248D82C28D3BC003510FF /* PNMembershipsFetchData.m in Sources */, A5DB711F2AAEFE58005B6559 /* PNEncryptedStream.m in Sources */, 7915821F1BD709C60084FC70 /* PNStateListener.m in Sources */, 79A0D8491DC22C950039A264 /* PNHistoryAPICallBuilder.m in Sources */, + A5567E6A2C1FBE44003C974F /* PubNub+Deprecated.m in Sources */, A5046F0024784CAB0008C81E /* PNFetchChannelMembersAPICallBuilder.m in Sources */, + A5567E9B2C20243C003C974F /* PNMessageActionFetchData.m in Sources */, 79A0D8511DC22C950039A264 /* PNPresenceHereNowAPICallBuilder.m in Sources */, + A51B4A532BF0B0CB008C3370 /* PNJSONCoder.m in Sources */, A5ADD62B2AC0CE8100310A08 /* NSInputStream+PNCrypto.m in Sources */, 791582121BD709C60084FC70 /* PNConfiguration.m in Sources */, + A5567F832C21F31E003C974F /* PNChannelMetadataFetchAllData.m in Sources */, 79F90F191FDEC1BA007132A3 /* PNPresenceHeartbeatAPICallBuilder.m in Sources */, 79CFA2BE26DE1C4900D206D4 /* PNPAMToken.m in Sources */, - 797ABBD124C6E8650008CA1E /* PNDeleteFileParser.m in Sources */, - A5046F2724784CAB0008C81E /* PNFetchUUIDMetadataParser.m in Sources */, + A51B4A612BF0B117008C3370 /* PNJSONCodableObjects.m in Sources */, A5DB70992AAE778F005B6559 /* PNSequenceInputStream.m in Sources */, + A5CFE59E2C1933BD00274165 /* PNPresenceLeaveRequest.m in Sources */, A504E14624AA94C8006DCF5B /* PNFile.m in Sources */, + A5567F1D2C21D53D003C974F /* PNChannelMembersManageData.m in Sources */, 799D610824C36D5B00171C29 /* PNPublishRequest.m in Sources */, + A556811F2C242EE6003C974F /* PNPresenceEventResult.m in Sources */, 7915823B1BD709C60084FC70 /* PNPublishStatus.m in Sources */, + A5567E532C1F0484003C974F /* PNSignalRequest.m in Sources */, A5046F0624784CAB0008C81E /* PNFetchAllUUIDMetadataAPICallBuilder.m in Sources */, 791582091BD709C60084FC70 /* PubNub+History.m in Sources */, A52DC1ED2307E10B001F20B0 /* NSDateFormatter+PNCacheable.m in Sources */, A5046F1424784CAB0008C81E /* PNRemoveChannelMembersRequest.m in Sources */, - A5A7AFC6234932F30060113B /* PNFetchMessagesActionsParser.m in Sources */, A57A3029238D59B500DE8C68 /* PNBasePushNotificationsRequest.m in Sources */, A58975B923005AAC0093BD9A /* PNManageMembershipsStatus.m in Sources */, + A5CFE40E2C0F246400274165 /* PNBaseRequest.m in Sources */, + A51B4A792BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m in Sources */, A504E12D24AA90B8006DCF5B /* PNDownloadFileResult.m in Sources */, A56865902300729E0014E17C /* PNFetchChannelMembersResult.m in Sources */, A5046F0124784CAB0008C81E /* PNSetChannelMembersAPICallBuilder.m in Sources */, A55BCCED231D21840019DB68 /* PNAddMessageActionAPICallBuilder.m in Sources */, - A55A877322FD8272002D0A72 /* PNRequest.m in Sources */, - A5046F2324784CAB0008C81E /* PNUUIDMetadataChangeParser.m in Sources */, + A5CFE5792C191B8100274165 /* PNHistoryMessagesDeleteRequest.m in Sources */, A5DB71242AAEFE58005B6559 /* PNEncryptedData.m in Sources */, A5DB70FC2AAEFE58005B6559 /* PNAESCBCCryptor.m in Sources */, - A5046F2624784CAB0008C81E /* PNFetchChannelsMetadataParser.m in Sources */, + A53248CC2C28A426003510FF /* PNHistoryMessagesCountRequest.m in Sources */, + A5CB33AB2C035D7D008527AA /* PNTransportRequest.m in Sources */, A57A3060238D65A200DE8C68 /* PNNotificationsPayload.m in Sources */, 79A0D8531DC22C950039A264 /* PNPresenceWhereNowAPICallBuilder.m in Sources */, A55A870A22FD81E3002D0A72 /* PNSetUUIDMetadataStatus.m in Sources */, + A556801D2C226866003C974F /* PNPresenceUserStateSetData.m in Sources */, A5046EFF24784CAB0008C81E /* PNSetMembershipsAPICallBuilder.m in Sources */, A504E15924AA9CFB006DCF5B /* PNFilesAPICallBuilder.m in Sources */, 7915824B1BD709C60084FC70 /* PubNub+Publish.m in Sources */, 79A0D85F1DC22C950039A264 /* PNStreamAPICallBuilder.m in Sources */, 7915820D1BD709C60084FC70 /* PNReachability.m in Sources */, - A57A3045238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m in Sources */, A5A7B0072349330F0060113B /* PNBaseMessageActionRequest.m in Sources */, 79A0D8611DC22C950039A264 /* PNStreamAuditAPICallBuilder.m in Sources */, + A5567E8F2C1FDEF7003C974F /* PNMessageActionsFetchData.m in Sources */, 7915822F1BD709C60084FC70 /* PNClientState.m in Sources */, 7915821C1BD709C60084FC70 /* PNErrorStatus.m in Sources */, + A51B4A852BF0B197008C3370 /* PNFunctions.m in Sources */, A5046F1924784CAB0008C81E /* PNRemoveChannelMetadataRequest.m in Sources */, A57A30E1238DC87400DE8C68 /* PNAPNSNotificationTarget.m in Sources */, - 7915822E1BD709C60084FC70 /* PNLeaveParser.m in Sources */, + A51B4A6D2BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m in Sources */, + A55680BF2C23A8CD003C974F /* PNSubscribeSignalEventData.m in Sources */, 791582361BD709C60084FC70 /* PNServiceData.m in Sources */, 79A0D8571DC22C950039A264 /* PNPublishSizeAPICallBuilder.m in Sources */, - 79CD276C24D75342000698DD /* PNKeychainStorage.m in Sources */, 79A0D8551DC22C950039A264 /* PNPublishAPICallBuilder.m in Sources */, - 791582251BD709C60084FC70 /* PNErrorParser.m in Sources */, + A5567FE02C221A20003C974F /* PNFetchAllUUIDMetadataResult.m in Sources */, 7915823D1BD709C60084FC70 /* PNSubscriber.m in Sources */, 7915821D1BD709C60084FC70 /* PubNub+State.m in Sources */, 79A0D84D1DC22C950039A264 /* PNPresenceChannelGroupHereNowAPICallBuilder.m in Sources */, - 791582331BD709C60084FC70 /* PNTimeParser.m in Sources */, - 7915823E1BD709C60084FC70 /* PNURLBuilder.m in Sources */, A5DB71332AAEFE58005B6559 /* PNCryptorHeader.m in Sources */, A5046F0D24784CAB0008C81E /* PNChannelMetadata.m in Sources */, A5105B57238F027D00CB693D /* PNDate.m in Sources */, 791582101BD709C60084FC70 /* PNDictionary.m in Sources */, 791582321BD709C60084FC70 /* PNURLRequest.m in Sources */, + A55680352C229587003C974F /* PNFileGenerateUploadURLData.m in Sources */, A55BCD0D231D22400019DB68 /* PNFetchMessagesActionsAPICallBuilder.m in Sources */, A5046EFD24784CAB0008C81E /* PNRemoveChannelMembersAPICallBuilder.m in Sources */, A57A3070238D6BCC00DE8C68 /* PNFCMNotificationPayload.m in Sources */, @@ -6427,53 +7932,71 @@ A5046F1E24784CAB0008C81E /* PNFetchUUIDMetadataRequest.m in Sources */, 791582201BD709C60084FC70 /* PNHeartbeat.m in Sources */, A5046F0F24784CAB0008C81E /* PNBaseObjectsMembershipRequest.m in Sources */, + A5CB33E22C0C7237008527AA /* PNTransportMiddlewareConfiguration.m in Sources */, 7915820C1BD709C60084FC70 /* PubNub+Core.m in Sources */, + A5567E402C1ECC59003C974F /* PNPresenceStateFetchResult.m in Sources */, + A5567EB62C2077AE003C974F /* PNSubscribeData.m in Sources */, + A5CFE5922C192ECA00274165 /* PNSubscribeRequest.m in Sources */, A55A85D822FD8078002D0A72 /* PubNub+Objects.m in Sources */, + A5CFE4F12C16528700274165 /* PNTimeData.m in Sources */, + A5567F6B2C21F0EA003C974F /* PNUUIDMetadataFetchData.m in Sources */, A5686580230072810014E17C /* PNManageChannelMembersStatus.m in Sources */, - A5046F2224784CAB0008C81E /* PNChannelMetadataChangeParser.m in Sources */, + A51B4A472BF0B0B0008C3370 /* PNJSONEncoder.m in Sources */, 791582181BD709C60084FC70 /* PubNub+APNS.m in Sources */, A586A9E52337E581008856D2 /* PNFetchMessageActionsResult.m in Sources */, 7915821B1BD709C60084FC70 /* PubNub+Time.m in Sources */, + A5CFE5482C18D3A700274165 /* PNPresenceStateSetRequest.m in Sources */, A504E1AD24AD3209006DCF5B /* PNDownloadFileRequest.m in Sources */, A504E16524AAA6FE006DCF5B /* PNSendFileAPICallBuilder.m in Sources */, + A55680D72C2428E8003C974F /* PNSubscribeFileEventData.m in Sources */, A50319DB2AA65EB400B25A44 /* NSArray+PNMap.m in Sources */, + A5567FF92C225146003C974F /* PNPresenceUserStateFetchData.m in Sources */, + A5567F9C2C220E32003C974F /* PNFetchMembershipsResult.m in Sources */, + A5567F292C21DB10003C974F /* PNMembershipsManageData.m in Sources */, 79A3E4082215699900F2ADB9 /* PNMessageCountAPICallBuilder.m in Sources */, 79A0D84F1DC22C950039A264 /* PNPresenceChannelHereNowAPICallBuilder.m in Sources */, 79A0D84B1DC22C950039A264 /* PNPresenceAPICallBuilder.m in Sources */, 797D606A22D2E44000E64C94 /* PNSignalStatus.m in Sources */, + A5567FB02C22107D003C974F /* PNClientStateUpdateStatus.m in Sources */, A5046F2124784CAB0008C81E /* PNBaseObjectsRequest.m in Sources */, A504E19524AAA72E006DCF5B /* PNDeleteFileAPICallBuilder.m in Sources */, A50319B72AA5B05900B25A44 /* PNResult.m in Sources */, - 79E2D0F41C56434700BAA244 /* PNKeychain.m in Sources */, + A5CFE4BA2C1647B000274165 /* PNPublishData.m in Sources */, 791582281BD709C60084FC70 /* PNChannel.m in Sources */, - 791582391BD709C60084FC70 /* PNNetwork.m in Sources */, A5046F1024784CAB0008C81E /* PNManageMembershipsRequest.m in Sources */, 79A3E41F221569BA00F2ADB9 /* PNMessageCountResult.m in Sources */, A504E1A124ACCA42006DCF5B /* PNFileDownloadURLAPICallBuilder.m in Sources */, 7925DB8E1D3FFCAC00857C0D /* PNLLogger.m in Sources */, + A5567F772C21F203003C974F /* PNUUIDMetadataFetchAllData.m in Sources */, + A55680412C229D8D003C974F /* PNFileSendData.m in Sources */, 797D606122D2E41100E64C94 /* PNSignalAPICallBuilder.m in Sources */, 79A0D85D1DC22C950039A264 /* PNStateModificationAPICallBuilder.m in Sources */, 7915820B1BD709C60084FC70 /* PNString.m in Sources */, + A5CB33C92C046A1A008527AA /* PNTransportConfiguration.m in Sources */, A55BCD1D231D26110019DB68 /* PNMessageAction.m in Sources */, - 79A3E42F221569DA00F2ADB9 /* PNMessageCountParser.m in Sources */, + A5CFE5BD2C1AAAAC00274165 /* PNErrorData.m in Sources */, A5A7B01C2349330F0060113B /* PNFetchMessageActionsRequest.m in Sources */, + A55681132C242E96003C974F /* PNFileEventResult.m in Sources */, 791582431BD709C60084FC70 /* PNStatus.m in Sources */, + A5567F412C21E723003C974F /* PNChannelMembersFetchData.m in Sources */, + A51B4AAA2BF37F03008C3370 /* PNChannelGroupFetchRequest.m in Sources */, 79A0D8671DC22C950039A264 /* PNSubscribeChannelsOrGroupsAPIBuilder.m in Sources */, - 79CD277824D75AE9000698DD /* PNInMemoryStorage.m in Sources */, - A57A3014238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m in Sources */, + A51B4A9D2BF0B428008C3370 /* PNError.m in Sources */, 793887051BEAD49100DCC662 /* PNNumber.m in Sources */, - A504E1D124AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m in Sources */, + A5567E832C1FCF0F003C974F /* PNChannelGroupFetchData.m in Sources */, + A55681072C242E09003C974F /* PNObjectEventResult.m in Sources */, 79650C2E1E775E8300006F66 /* PNLockSupport.m in Sources */, 791582481BD709C60084FC70 /* PNOperationResult.m in Sources */, 79CFA2B226DE0AEB00D206D4 /* PNCBORDecoder.m in Sources */, + A55680E32C242BFF003C974F /* PNMessageResult.m in Sources */, 791582441BD709C60084FC70 /* PNArray.m in Sources */, A5046F0A24784CAB0008C81E /* PNObjectsAPICallBuilder.m in Sources */, - A56865702300709F0014E17C /* PNFetchMembershipsResult.m in Sources */, + A5567F0A2C219757003C974F /* PNBaseAppContextObject.m in Sources */, A56FAEF9233161570072ADD6 /* PubNub+MessageActions.m in Sources */, + A55680532C22BE6D003C974F /* PNFileUploadRequest.m in Sources */, A5DB70F72AAEFE58005B6559 /* PNCCCryptorWrapper.m in Sources */, A5DB712E2AAEFE58005B6559 /* PNCryptorInputStream.m in Sources */, 79A0D8651DC22C950039A264 /* PNSubscribeAPIBuilder.m in Sources */, - A5046F2424784CAB0008C81E /* PNObjectsRemoveParser.m in Sources */, A5046F1D24784CAB0008C81E /* PNRemoveUUIDMetadataRequest.m in Sources */, A5046F0B24784CAB0008C81E /* PNMembership.m in Sources */, 791582161BD709C60084FC70 /* PNJSON.m in Sources */, @@ -6481,15 +8004,17 @@ A5E3BA122B3118BE00D3AA18 /* PNRequestRetryConfiguration.m in Sources */, 791582141BD709C60084FC70 /* PNGZIP.m in Sources */, A5046F0224784CAB0008C81E /* PNFetchAllChannelsMetadataAPICallBuilder.m in Sources */, + A55680A72C23880C003C974F /* PNSubscribeMessageActionEventData.m in Sources */, 791582381BD709C60084FC70 /* PNAES.m in Sources */, A5A7B0152349330F0060113B /* PNAddMessageActionRequest.m in Sources */, - A5046F2824784CAB0008C81E /* PNChannelMembersParser.m in Sources */, A504E1C024AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.m in Sources */, - A55A86F522FD81E3002D0A72 /* PNFetchChannelsMetadataResult.m in Sources */, + A5567EDA2C209FF7003C974F /* PNPresenceWhereNowFetchData.m in Sources */, + A51B4A3B2BF0B097008C3370 /* PNJSONDecoder.m in Sources */, + A55A86F522FD81E3002D0A72 /* PNFetchChannelMetadataResult.m in Sources */, + A5CFE4D82C16500F00274165 /* PNSignalData.m in Sources */, A5046F1F24784CAB0008C81E /* PNFetchAllUUIDMetadataRequest.m in Sources */, A5046F1124784CAB0008C81E /* PNRemoveMembershipsRequest.m in Sources */, DD71BCFC02D4AB87E006CBBB /* PNClientStateGetResult.m in Sources */, - A5A7AFE9234932F30060113B /* PNRemoveMessageActionParser.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -6497,162 +8022,187 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + A53248D42C28D211003510FF /* PNHistoryMessageCountData.m in Sources */, + A5CFE5592C18D3B600274165 /* PNPresenceStateFetchRequest.m in Sources */, A5046EA624784CAA0008C81E /* PNFetchChannelMetadataAPICallBuilder.m in Sources */, 7951954A26BD44E9001E308C /* PubNub+PAM.m in Sources */, + A5567EC72C207800003C974F /* PNSubscribeCursorData.m in Sources */, + A5CFE50A2C1658E700274165 /* PNHistoryFetchData.m in Sources */, 79A0D87E1DC22F460039A264 /* PNAPICallBuilder.m in Sources */, A57A30BB238DC6B600DE8C68 /* PNAPNSNotificationPayload.m in Sources */, A504E0FF24AA8AEA006DCF5B /* PNListFilesRequest.m in Sources */, - 791582BE1BD709D10084FC70 /* PNPushNotificationsStateModificationParser.m in Sources */, + A51B4A962BF0B1E3008C3370 /* PNLock.m in Sources */, + A5567F3A2C21E4DF003C974F /* PNUUIDMetadataSetData.m in Sources */, 797ABBA924C4148C0008CA1E /* PNBasePublishRequest.m in Sources */, A5046E9D24784CAA0008C81E /* PNManageMembershipsAPICallBuilder.m in Sources */, - A5A7AFDD234932F30060113B /* PNAddMessageActionParser.m in Sources */, A5046EB824784CAA0008C81E /* PNFetchChannelMembersRequest.m in Sources */, + A523EEE52BFE910A009F45AA /* PNURLSessionTransport.m in Sources */, 79A238D91D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.m in Sources */, + A5567FBC2C221136003C974F /* PNChannelMetadataFetchData.m in Sources */, + A55680F32C242D11003C974F /* PNSignalResult.m in Sources */, 791582EA1BD709D10084FC70 /* PNPresenceChannelGroupHereNowResult.m in Sources */, A57A30CB238DC71800DE8C68 /* PNAPNSNotificationConfiguration.m in Sources */, - 791582D31BD709D10084FC70 /* PNChannelGroupModificationParser.m in Sources */, 791582E81BD709D10084FC70 /* PNChannelGroupClientStateResult.m in Sources */, - 79ABD89A1F01636B007634E0 /* PNTelemetry.m in Sources */, + A5567EAD2C20371C003C974F /* PNPresenceHereNowFetchData.m in Sources */, 79A0D97A1DC231440039A264 /* PNUnsubscribeChannelsOrGroupsAPICallBuilder.m in Sources */, + A5CFE5722C19066C00274165 /* PNHistoryFetchRequest.m in Sources */, 79A0D8FC1DC230540039A264 /* PNPublishAPICallBuilder.m in Sources */, A5A7B0252349330F0060113B /* PNRemoveMessageActionRequest.m in Sources */, 799D60F124C1B33900171C29 /* PNSendFileStatus.m in Sources */, 791582F21BD709D10084FC70 /* PNPresenceChannelHereNowResult.m in Sources */, A5046EA524784CAA0008C81E /* PNRemoveChannelMetadataAPICallBuilder.m in Sources */, + A5CCEC532C0E006000DB02A4 /* PNURLSessionTransportResponse.m in Sources */, A5046EA924784CAA0008C81E /* PNRemoveUUIDMetadataAPICallBuilder.m in Sources */, - 791582C71BD709D10084FC70 /* PNPushNotificationsAuditParser.m in Sources */, + A5567ED32C208652003C974F /* PNSubscribeEventData.m in Sources */, 79A0D88A1DC22F620039A264 /* PNAPNSAPICallBuilder.m in Sources */, A55BCCFF231D222B0019DB68 /* PNRemoveMessageActionAPICallBuilder.m in Sources */, 797ABBBB24C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.m in Sources */, 791582B31BD709D10084FC70 /* PNPresenceGlobalHereNowResult.m in Sources */, 791582D61BD709D10084FC70 /* PNChannelGroupChannelsResult.m in Sources */, + A55680FF2C242D7C003C974F /* PNMessageActionResult.m in Sources */, + A55680752C2344A9003C974F /* PNFileListFetchData.m in Sources */, A504E1DF24B04751006DCF5B /* PNFilesManager.m in Sources */, 79A0D8DE1DC230180039A264 /* PNPresenceChannelHereNowAPICallBuilder.m in Sources */, + A55680B72C238EEB003C974F /* PNSubscribeObjectEventData.m in Sources */, A504E18B24AAA724006DCF5B /* PNDownloadFileAPICallBuilder.m in Sources */, A504E10B24AA8F44006DCF5B /* PNListFilesResult.m in Sources */, A5046EAB24784CAA0008C81E /* PNSetUUIDMetadataAPICallBuilder.m in Sources */, A5046E9E24784CAA0008C81E /* PNFetchMembershipsAPICallBuilder.m in Sources */, A5046EBD24784CAA0008C81E /* PNFetchAllChannelsMetadataRequest.m in Sources */, A5046EB424784CAA0008C81E /* PNFetchMembershipsRequest.m in Sources */, + A556806A2C2311D0003C974F /* PNGenerateFileDownloadURLRequest.m in Sources */, A5046EB724784CAA0008C81E /* PNSetMembershipsRequest.m in Sources */, A5046EBA24784CAA0008C81E /* PNSetChannelMetadataRequest.m in Sources */, + A5CFE5412C18D38600274165 /* PNWhereNowRequest.m in Sources */, + A5567EEB2C20A51A003C974F /* PNPresenceHeartbeatRequest.m in Sources */, A5DB71032AAEFE58005B6559 /* PNLegacyCryptor.m in Sources */, + A53249032C2AC5C1003510FF /* PNChannelGroupsResult.m in Sources */, 79A0D8E41DC2301D0039A264 /* PNPresenceHereNowAPICallBuilder.m in Sources */, A5046EAE24784CAA0008C81E /* PNChannelMember.m in Sources */, - A57A3040238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m in Sources */, 79A0D91A1DC2309B0039A264 /* PNStateAPICallBuilder.m in Sources */, A5046EA024784CAA0008C81E /* PNManageChannelMembersAPICallBuilder.m in Sources */, 79A0D93E1DC230DE0039A264 /* PNStreamAPICallBuilder.m in Sources */, A55DAF0324B1FE9E00766EE9 /* PNXML.m in Sources */, A55A872F22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m in Sources */, - 791582C21BD709D10084FC70 /* PNChannelGroupAuditionParser.m in Sources */, + A5567E4C2C1EDB02003C974F /* PNPushNotificationFetchRequest.m in Sources */, 791582F01BD709D10084FC70 /* PNAPNSEnabledChannelsResult.m in Sources */, - 791582EE1BD709D10084FC70 /* PNNetworkResponseSerializer.m in Sources */, - A5046EC724784CAA0008C81E /* PNMembershipsParser.m in Sources */, - A57A3032238D59B500DE8C68 /* PNAddPushNotificationsRequest.m in Sources */, - A504E13C24AA9361006DCF5B /* PNListFilesParser.m in Sources */, + A5567E7C2C1FCADC003C974F /* PNPushNotificationFetchData.m in Sources */, + A5CFE5652C18E9C600274165 /* PNPresenceHereNowResult.m in Sources */, A504E1BB24AD3219006DCF5B /* PNDeleteFileRequest.m in Sources */, 79A0D9021DC230590039A264 /* PNPublishSizeAPICallBuilder.m in Sources */, 79A0D9741DC2313F0039A264 /* PNUnsubscribeAPICallBuilder.m in Sources */, - A55DAEF724B1FE7600766EE9 /* PNXMLParser.m in Sources */, + A5CFE5352C18D33500274165 /* PNHereNowRequest.m in Sources */, + A55680872C23527D003C974F /* PNFileDownloadData.m in Sources */, 791582CF1BD709D10084FC70 /* PNChannelClientStateResult.m in Sources */, - 791582E01BD709D10084FC70 /* PNClientStateUpdateStatus.m in Sources */, - 791582D01BD709D10084FC70 /* PNPresenceWhereNowParser.m in Sources */, 791582C01BD709D10084FC70 /* PNPresenceWhereNowResult.m in Sources */, - 791582F51BD709D10084FC70 /* PNPresenceHereNowParser.m in Sources */, - 791582DA1BD709D10084FC70 /* PNMessagePublishParser.m in Sources */, - A504E12324AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m in Sources */, + A5567FD12C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m in Sources */, 791582CA1BD709D10084FC70 /* PNAcknowledgmentStatus.m in Sources */, 79A0D9871DC2315D0039A264 /* PNTimeAPICallBuilder.m in Sources */, A5FADC3B2490270E001D7704 /* PubNub+Files.m in Sources */, A5046EC224784CAA0008C81E /* PNObjectsPaginatedRequest.m in Sources */, - 791582C31BD709D10084FC70 /* PNChannelGroupsResult.m in Sources */, + A5CFE5162C1892AD00274165 /* PNPushNotificationManageRequest.m in Sources */, A5046EA724784CAA0008C81E /* PNSetChannelMetadataAPICallBuilder.m in Sources */, 79E20D1E1C8AEC51001BC9CC /* PNEnvelopeInformation.m in Sources */, A504E17324AAA70A006DCF5B /* PNListFilesAPICallBuilder.m in Sources */, A57A3092238D751400DE8C68 /* PNMPNSNotificationPayload.m in Sources */, + A5567E352C1EB4ED003C974F /* PNTimeRequest.m in Sources */, 7925DB9E1D3FFCAC00857C0D /* PNLLogFileInformation.m in Sources */, + A5567E632C1F8C53003C974F /* PNOperationDataParser.m in Sources */, + A5CFE4752C14A90900274165 /* NSError+PNTransport.m in Sources */, + A5CFE4442C11E8D500274165 /* PNChannelGroupManageRequest.m in Sources */, 79A0D8961DC22F7E0039A264 /* PNAPNSAuditAPICallBuilder.m in Sources */, A5046E9C24784CAA0008C81E /* PNRemoveMembershipsAPICallBuilder.m in Sources */, - 791582F31BD709D10084FC70 /* PNClientStateParser.m in Sources */, + A51B4A342BF0AFB8008C3370 /* PNJSONSerialization.m in Sources */, + A55680CF2C2400B3003C974F /* PNSubscribePresenceEventData.m in Sources */, 793248671D874D9F00FBDF36 /* PNPublishSequence.m in Sources */, 791582D51BD709D10084FC70 /* PNClientInformation.m in Sources */, + A5567FC82C221231003C974F /* PNChannelMetadataSetData.m in Sources */, A57A30A2238D784A00DE8C68 /* PNBaseNotificationPayload.m in Sources */, A5FADC482490292A001D7704 /* PNSendFileRequest.m in Sources */, - 791582D21BD709D10084FC70 /* PNSubscriberResults.m in Sources */, A5DB713A2AAEFE58005B6559 /* PNCryptorHeaderV1Data.m in Sources */, A5046EB024784CAA0008C81E /* PNUUIDMetadata.m in Sources */, A5046EB924784CAA0008C81E /* PNSetChannelMembersRequest.m in Sources */, A55A86E922FD81E3002D0A72 /* PNFetchUUIDMetadataResult.m in Sources */, - 791582CC1BD709D10084FC70 /* PNRequestParameters.m in Sources */, A5046EAA24784CAA0008C81E /* PNFetchUUIDMetadataAPICallBuilder.m in Sources */, - 79CD275C24D6A1CB000698DD /* PNDataStorage.m in Sources */, + A55680302C2294EE003C974F /* PNGenerateFileUploadURLStatus.m in Sources */, A5DB712B2AAEFE58005B6559 /* PNCryptoModule.m in Sources */, 791582CB1BD709D10084FC70 /* PubNub+ChannelGroup.m in Sources */, A56BBFC92AB900B600260D83 /* NSInputStream+PNURL.m in Sources */, + A5567F5E2C21EBDF003C974F /* PNPagedAppContextData.m in Sources */, A5046EBC24784CAA0008C81E /* PNFetchChannelMetadataRequest.m in Sources */, - 791582EB1BD709D10084FC70 /* PNHeartbeatParser.m in Sources */, - 791582D91BD709D10084FC70 /* PNSubscribeParser.m in Sources */, A55BCCAB2319243F0019DB68 /* PNAddMessageActionStatus.m in Sources */, + A53248E72C28E3AB003510FF /* PNXMLParser.m in Sources */, + A5CB33DA2C0C70B2008527AA /* PNTransportMiddleware.m in Sources */, + A556809F2C2385BC003C974F /* PNSubscribeMessageEventData.m in Sources */, A5046EB524784CAA0008C81E /* PNManageChannelMembersRequest.m in Sources */, 799D611C24C391A100171C29 /* PNPublishFileMessageRequest.m in Sources */, 791582BA1BD709D10084FC70 /* PNSubscribeStatus.m in Sources */, + A5CFE4622C123F2E00274165 /* PNBaseOperationData.m in Sources */, 791582EF1BD709D10084FC70 /* PubNub+Subscribe.m in Sources */, 7960B66C1F68123300FFAEBB /* PNDeleteMessageAPICallBuilder.m in Sources */, 791582E51BD709D10084FC70 /* PubNub+Presence.m in Sources */, + A53248DA2C28D3BC003510FF /* PNMembershipsFetchData.m in Sources */, A5DB71212AAEFE58005B6559 /* PNEncryptedStream.m in Sources */, 791582E41BD709D10084FC70 /* PNPublishStatus.m in Sources */, 79A0D8D21DC2300F0039A264 /* PNPresenceAPICallBuilder.m in Sources */, + A5567E6F2C1FBE44003C974F /* PubNub+Deprecated.m in Sources */, A5046EA224784CAA0008C81E /* PNFetchChannelMembersAPICallBuilder.m in Sources */, + A5567EA02C20243C003C974F /* PNMessageActionFetchData.m in Sources */, 79A0D8AE1DC22FB40039A264 /* PNHistoryAPICallBuilder.m in Sources */, + A51B4A582BF0B0CB008C3370 /* PNJSONCoder.m in Sources */, A5ADD62D2AC0CE8100310A08 /* NSInputStream+PNCrypto.m in Sources */, 791582CD1BD709D10084FC70 /* PNHistoryResult.m in Sources */, + A5567F882C21F31E003C974F /* PNChannelMetadataFetchAllData.m in Sources */, 79F90F251FDEC1DE007132A3 /* PNPresenceHeartbeatAPICallBuilder.m in Sources */, 79CFA2C026DE1C4900D206D4 /* PNPAMToken.m in Sources */, - 797ABBD324C6E8650008CA1E /* PNDeleteFileParser.m in Sources */, - A5046EC924784CAA0008C81E /* PNFetchUUIDMetadataParser.m in Sources */, + A51B4A662BF0B117008C3370 /* PNJSONCodableObjects.m in Sources */, A5DB709B2AAE778F005B6559 /* PNSequenceInputStream.m in Sources */, + A5CFE5A32C1933BD00274165 /* PNPresenceLeaveRequest.m in Sources */, A504E14824AA94C8006DCF5B /* PNFile.m in Sources */, + A5567F222C21D53D003C974F /* PNChannelMembersManageData.m in Sources */, 799D610A24C36D5B00171C29 /* PNPublishRequest.m in Sources */, + A55681232C242EE6003C974F /* PNPresenceEventResult.m in Sources */, 791582C81BD709D10084FC70 /* PNStateListener.m in Sources */, + A5567E562C1F0484003C974F /* PNSignalRequest.m in Sources */, A5046EA824784CAA0008C81E /* PNFetchAllUUIDMetadataAPICallBuilder.m in Sources */, - 791582BC1BD709D10084FC70 /* PNHistoryParser.m in Sources */, A52DC1EF2307E10B001F20B0 /* NSDateFormatter+PNCacheable.m in Sources */, A5046EB624784CAA0008C81E /* PNRemoveChannelMembersRequest.m in Sources */, - A5A7AFC8234932F30060113B /* PNFetchMessagesActionsParser.m in Sources */, A57A302B238D59B500DE8C68 /* PNBasePushNotificationsRequest.m in Sources */, A58975BB23005AAC0093BD9A /* PNManageMembershipsStatus.m in Sources */, + A5CFE4122C0F246400274165 /* PNBaseRequest.m in Sources */, + A51B4A7E2BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m in Sources */, A504E12F24AA90B8006DCF5B /* PNDownloadFileResult.m in Sources */, A56865922300729E0014E17C /* PNFetchChannelMembersResult.m in Sources */, A5046EA324784CAA0008C81E /* PNSetChannelMembersAPICallBuilder.m in Sources */, A55BCCEF231D21840019DB68 /* PNAddMessageActionAPICallBuilder.m in Sources */, - A55A877522FD8272002D0A72 /* PNRequest.m in Sources */, - A5046EC524784CAA0008C81E /* PNUUIDMetadataChangeParser.m in Sources */, + A5CFE57E2C191B8100274165 /* PNHistoryMessagesDeleteRequest.m in Sources */, A5DB71262AAEFE58005B6559 /* PNEncryptedData.m in Sources */, A5DB70FE2AAEFE58005B6559 /* PNAESCBCCryptor.m in Sources */, - A5046EC824784CAA0008C81E /* PNFetchChannelsMetadataParser.m in Sources */, + A53248CE2C28A426003510FF /* PNHistoryMessagesCountRequest.m in Sources */, + A5CB33AF2C035D7D008527AA /* PNTransportRequest.m in Sources */, A57A3062238D65A200DE8C68 /* PNNotificationsPayload.m in Sources */, 791582BB1BD709D10084FC70 /* PNConfiguration.m in Sources */, A55A870C22FD81E3002D0A72 /* PNSetUUIDMetadataStatus.m in Sources */, + A55680222C226866003C974F /* PNPresenceUserStateSetData.m in Sources */, A5046EA124784CAA0008C81E /* PNSetMembershipsAPICallBuilder.m in Sources */, A504E15B24AA9CFB006DCF5B /* PNFilesAPICallBuilder.m in Sources */, 79A0D9681DC231350039A264 /* PNSubscribeAPIBuilder.m in Sources */, 791582F41BD709D10084FC70 /* PubNub+Publish.m in Sources */, 79A0D94A1DC230E80039A264 /* PNStreamModificationAPICallBuilder.m in Sources */, - A57A3047238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m in Sources */, A5A7B0092349330F0060113B /* PNBaseMessageActionRequest.m in Sources */, 791582B61BD709D10084FC70 /* PNReachability.m in Sources */, + A5567E942C1FDEF7003C974F /* PNMessageActionsFetchData.m in Sources */, 791582B21BD709D10084FC70 /* PubNub+History.m in Sources */, 791582DF1BD709D10084FC70 /* PNServiceData.m in Sources */, + A51B4A8A2BF0B197008C3370 /* PNFunctions.m in Sources */, A5046EBB24784CAA0008C81E /* PNRemoveChannelMetadataRequest.m in Sources */, A57A30E3238DC87400DE8C68 /* PNAPNSNotificationTarget.m in Sources */, + A51B4A722BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m in Sources */, 79A0D9261DC230A30039A264 /* PNStateModificationAPICallBuilder.m in Sources */, + A55680C32C23A8CD003C974F /* PNSubscribeSignalEventData.m in Sources */, 791582D81BD709D10084FC70 /* PNClientState.m in Sources */, - 791582D71BD709D10084FC70 /* PNLeaveParser.m in Sources */, - 79CD276E24D75342000698DD /* PNKeychainStorage.m in Sources */, - 791582CE1BD709D10084FC70 /* PNErrorParser.m in Sources */, + A5567FE22C221A20003C974F /* PNFetchAllUUIDMetadataResult.m in Sources */, 791582C51BD709D10084FC70 /* PNErrorStatus.m in Sources */, - 791582E71BD709D10084FC70 /* PNURLBuilder.m in Sources */, 79A0D8D81DC230130039A264 /* PNPresenceChannelGroupHereNowAPICallBuilder.m in Sources */, 791582E61BD709D10084FC70 /* PNSubscriber.m in Sources */, 791582DD1BD709D10084FC70 /* PNTimeResult.m in Sources */, @@ -6660,8 +8210,8 @@ A5DB71352AAEFE58005B6559 /* PNCryptorHeader.m in Sources */, A5046EAF24784CAA0008C81E /* PNChannelMetadata.m in Sources */, A5105B59238F027D00CB693D /* PNDate.m in Sources */, - 791582DC1BD709D10084FC70 /* PNTimeParser.m in Sources */, 791582DB1BD709D10084FC70 /* PNURLRequest.m in Sources */, + A556803A2C229587003C974F /* PNFileGenerateUploadURLData.m in Sources */, A55BCD0F231D22400019DB68 /* PNFetchMessagesActionsAPICallBuilder.m in Sources */, A5046E9F24784CAA0008C81E /* PNRemoveChannelMembersAPICallBuilder.m in Sources */, A57A3072238D6BCC00DE8C68 /* PNFCMNotificationPayload.m in Sources */, @@ -6670,53 +8220,71 @@ A5046EC024784CAA0008C81E /* PNFetchUUIDMetadataRequest.m in Sources */, 791582B91BD709D10084FC70 /* PNDictionary.m in Sources */, A5046EB124784CAA0008C81E /* PNBaseObjectsMembershipRequest.m in Sources */, + A5CB33E62C0C7237008527AA /* PNTransportMiddlewareConfiguration.m in Sources */, 791582C91BD709D10084FC70 /* PNHeartbeat.m in Sources */, + A5567E432C1ECC59003C974F /* PNPresenceStateFetchResult.m in Sources */, + A5567EBB2C2077AE003C974F /* PNSubscribeData.m in Sources */, + A5CFE5972C192ECA00274165 /* PNSubscribeRequest.m in Sources */, A55A85DA22FD8078002D0A72 /* PubNub+Objects.m in Sources */, + A5CFE4F62C16528700274165 /* PNTimeData.m in Sources */, + A5567F702C21F0EA003C974F /* PNUUIDMetadataFetchData.m in Sources */, A5686582230072810014E17C /* PNManageChannelMembersStatus.m in Sources */, - A5046EC424784CAA0008C81E /* PNChannelMetadataChangeParser.m in Sources */, + A51B4A4C2BF0B0B0008C3370 /* PNJSONEncoder.m in Sources */, 79A0D8A21DC22F930039A264 /* PNAPNSModificationAPICallBuilder.m in Sources */, A586A9E72337E581008856D2 /* PNFetchMessageActionsResult.m in Sources */, 791582C41BD709D10084FC70 /* PubNub+Time.m in Sources */, + A5CFE54D2C18D3A700274165 /* PNPresenceStateSetRequest.m in Sources */, A504E1AF24AD3209006DCF5B /* PNDownloadFileRequest.m in Sources */, A504E16724AAA6FE006DCF5B /* PNSendFileAPICallBuilder.m in Sources */, + A55680DB2C2428E8003C974F /* PNSubscribeFileEventData.m in Sources */, A50319DD2AA65EB400B25A44 /* NSArray+PNMap.m in Sources */, + A5567FFE2C225146003C974F /* PNPresenceUserStateFetchData.m in Sources */, + A5567F9E2C220E32003C974F /* PNFetchMembershipsResult.m in Sources */, + A5567F2E2C21DB10003C974F /* PNMembershipsManageData.m in Sources */, 79A3E40A2215699900F2ADB9 /* PNMessageCountAPICallBuilder.m in Sources */, 79A0D9441DC230E30039A264 /* PNStreamAuditAPICallBuilder.m in Sources */, 791582C11BD709D10084FC70 /* PubNub+APNS.m in Sources */, 797D606C22D2E44000E64C94 /* PNSignalStatus.m in Sources */, + A5567FB22C22107D003C974F /* PNClientStateUpdateStatus.m in Sources */, A5046EC324784CAA0008C81E /* PNBaseObjectsRequest.m in Sources */, A504E19724AAA72E006DCF5B /* PNDeleteFileAPICallBuilder.m in Sources */, A50319B92AA5B05900B25A44 /* PNResult.m in Sources */, 791582B51BD709D10084FC70 /* PubNub+Core.m in Sources */, - 79E2D0F51C56434700BAA244 /* PNKeychain.m in Sources */, - 791582E21BD709D10084FC70 /* PNNetwork.m in Sources */, + A5CFE4BF2C1647B000274165 /* PNPublishData.m in Sources */, A5046EB224784CAA0008C81E /* PNManageMembershipsRequest.m in Sources */, 79A3E421221569BA00F2ADB9 /* PNMessageCountResult.m in Sources */, A504E1A324ACCA42006DCF5B /* PNFileDownloadURLAPICallBuilder.m in Sources */, 791582D11BD709D10084FC70 /* PNChannel.m in Sources */, + A5567F7C2C21F203003C974F /* PNUUIDMetadataFetchAllData.m in Sources */, + A55680462C229D8D003C974F /* PNFileSendData.m in Sources */, 797D606322D2E41100E64C94 /* PNSignalAPICallBuilder.m in Sources */, 7925DB901D3FFCAC00857C0D /* PNLLogger.m in Sources */, 791582F11BD709D10084FC70 /* PNOperationResult.m in Sources */, + A5CB33CD2C046A1A008527AA /* PNTransportConfiguration.m in Sources */, A55BCD1F231D26110019DB68 /* PNMessageAction.m in Sources */, - 79A3E431221569DA00F2ADB9 /* PNMessageCountParser.m in Sources */, + A5CFE5C22C1AAAAD00274165 /* PNErrorData.m in Sources */, A5A7B01E2349330F0060113B /* PNFetchMessageActionsRequest.m in Sources */, + A55681172C242E96003C974F /* PNFileEventResult.m in Sources */, 79F857FB219640A200BFD0B1 /* PNClientStateGetResult.m in Sources */, + A5567F462C21E723003C974F /* PNChannelMembersFetchData.m in Sources */, + A51B4AAF2BF37F03008C3370 /* PNChannelGroupFetchRequest.m in Sources */, 791582EC1BD709D10084FC70 /* PNStatus.m in Sources */, - 79CD277A24D75AE9000698DD /* PNInMemoryStorage.m in Sources */, - A57A3016238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m in Sources */, + A51B4AA22BF0B428008C3370 /* PNError.m in Sources */, 79A0D9201DC2309F0039A264 /* PNStateAuditAPICallBuilder.m in Sources */, - A504E1D324AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m in Sources */, + A5567E852C1FCF0F003C974F /* PNChannelGroupFetchData.m in Sources */, + A556810B2C242E09003C974F /* PNObjectEventResult.m in Sources */, 793887081BEAD4DE00DCC662 /* PNNumber.m in Sources */, 79650C3C1E775EA000006F66 /* PNLockSupport.m in Sources */, 79CFA2B426DE0AEB00D206D4 /* PNCBORDecoder.m in Sources */, + A55680E72C242BFF003C974F /* PNMessageResult.m in Sources */, 791582B41BD709D10084FC70 /* PNString.m in Sources */, A5046EAC24784CAA0008C81E /* PNObjectsAPICallBuilder.m in Sources */, - A56865722300709F0014E17C /* PNFetchMembershipsResult.m in Sources */, + A5567F0F2C219757003C974F /* PNBaseAppContextObject.m in Sources */, A56FAEFB233161570072ADD6 /* PubNub+MessageActions.m in Sources */, + A55680582C22BE6D003C974F /* PNFileUploadRequest.m in Sources */, A5DB70F92AAEFE58005B6559 /* PNCCCryptorWrapper.m in Sources */, A5DB71302AAEFE58005B6559 /* PNCryptorInputStream.m in Sources */, 79A0D96D1DC2313A0039A264 /* PNSubscribeChannelsOrGroupsAPIBuilder.m in Sources */, - A5046EC624784CAA0008C81E /* PNObjectsRemoveParser.m in Sources */, A5046EBF24784CAA0008C81E /* PNRemoveUUIDMetadataRequest.m in Sources */, A5046EAD24784CAA0008C81E /* PNMembership.m in Sources */, 791582ED1BD709D10084FC70 /* PNArray.m in Sources */, @@ -6724,15 +8292,17 @@ A5E3BA142B3118BE00D3AA18 /* PNRequestRetryConfiguration.m in Sources */, 791582BD1BD709D10084FC70 /* PNGZIP.m in Sources */, A5046EA424784CAA0008C81E /* PNFetchAllChannelsMetadataAPICallBuilder.m in Sources */, + A55680AB2C23880C003C974F /* PNSubscribeMessageActionEventData.m in Sources */, 791582B71BD709D10084FC70 /* PNData.m in Sources */, A5A7B0172349330F0060113B /* PNAddMessageActionRequest.m in Sources */, - A5046ECA24784CAA0008C81E /* PNChannelMembersParser.m in Sources */, A504E1C224AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.m in Sources */, - A55A86F722FD81E3002D0A72 /* PNFetchChannelsMetadataResult.m in Sources */, + A5567EDF2C209FF7003C974F /* PNPresenceWhereNowFetchData.m in Sources */, + A51B4A402BF0B097008C3370 /* PNJSONDecoder.m in Sources */, + A55A86F722FD81E3002D0A72 /* PNFetchChannelMetadataResult.m in Sources */, + A5CFE4DD2C16500F00274165 /* PNSignalData.m in Sources */, A5046EC124784CAA0008C81E /* PNFetchAllUUIDMetadataRequest.m in Sources */, A5046EB324784CAA0008C81E /* PNRemoveMembershipsRequest.m in Sources */, 791582E11BD709D10084FC70 /* PNAES.m in Sources */, - A5A7AFEB234932F30060113B /* PNRemoveMessageActionParser.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -6740,162 +8310,187 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + A53248D62C28D211003510FF /* PNHistoryMessageCountData.m in Sources */, + A5CFE55D2C18D3B600274165 /* PNPresenceStateFetchRequest.m in Sources */, A5046E4824784CA90008C81E /* PNFetchChannelMetadataAPICallBuilder.m in Sources */, 7951954C26BD44E9001E308C /* PubNub+PAM.m in Sources */, + A5567ECB2C207800003C974F /* PNSubscribeCursorData.m in Sources */, + A5CFE50E2C1658E700274165 /* PNHistoryFetchData.m in Sources */, 79A0D8811DC22F480039A264 /* PNAPICallBuilder.m in Sources */, A57A30BE238DC6B600DE8C68 /* PNAPNSNotificationPayload.m in Sources */, A504E10124AA8AEA006DCF5B /* PNListFilesRequest.m in Sources */, - 798842BF1C18F2EB003E8948 /* PNPushNotificationsStateModificationParser.m in Sources */, + A51B4A9A2BF0B1E3008C3370 /* PNLock.m in Sources */, + A5567F3E2C21E4DF003C974F /* PNUUIDMetadataSetData.m in Sources */, 797ABBAB24C4148C0008CA1E /* PNBasePublishRequest.m in Sources */, A5046E3F24784CA90008C81E /* PNManageMembershipsAPICallBuilder.m in Sources */, - A5A7AFE0234932F30060113B /* PNAddMessageActionParser.m in Sources */, A5046E5A24784CA90008C81E /* PNFetchChannelMembersRequest.m in Sources */, + A523EEE92BFE910A009F45AA /* PNURLSessionTransport.m in Sources */, 79A238DC1D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.m in Sources */, + A5567FC02C221136003C974F /* PNChannelMetadataFetchData.m in Sources */, + A55680F82C242D11003C974F /* PNSignalResult.m in Sources */, 798842691C18F1E3003E8948 /* PNPresenceChannelGroupHereNowResult.m in Sources */, A57A30CE238DC71800DE8C68 /* PNAPNSNotificationConfiguration.m in Sources */, - 798842B51C18F2EA003E8948 /* PNChannelGroupModificationParser.m in Sources */, 798842641C18F1E3003E8948 /* PNChannelGroupClientStateResult.m in Sources */, - 79ABD89D1F01636B007634E0 /* PNTelemetry.m in Sources */, + A5567EB12C20371C003C974F /* PNPresenceHereNowFetchData.m in Sources */, 79A0D97E1DC231470039A264 /* PNUnsubscribeChannelsOrGroupsAPICallBuilder.m in Sources */, + A5CFE5762C19066C00274165 /* PNHistoryFetchRequest.m in Sources */, 79A0D8FE1DC230550039A264 /* PNPublishAPICallBuilder.m in Sources */, A5A7B0282349330F0060113B /* PNRemoveMessageActionRequest.m in Sources */, 799D60F324C1B33900171C29 /* PNSendFileStatus.m in Sources */, 7988426A1C18F1E3003E8948 /* PNPresenceChannelHereNowResult.m in Sources */, A5046E4724784CA90008C81E /* PNRemoveChannelMetadataAPICallBuilder.m in Sources */, + A5CCEC582C0E006000DB02A4 /* PNURLSessionTransportResponse.m in Sources */, A5046E4B24784CA90008C81E /* PNRemoveUUIDMetadataAPICallBuilder.m in Sources */, - 798842BE1C18F2EB003E8948 /* PNPushNotificationsAuditParser.m in Sources */, + A5567ED72C208652003C974F /* PNSubscribeEventData.m in Sources */, 79A0D88D1DC22F630039A264 /* PNAPNSAPICallBuilder.m in Sources */, A55BCD02231D222B0019DB68 /* PNRemoveMessageActionAPICallBuilder.m in Sources */, 797ABBBD24C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.m in Sources */, 7988426B1C18F1E3003E8948 /* PNPresenceGlobalHereNowResult.m in Sources */, - 798842B41C18F2EA003E8948 /* PNChannelGroupAuditionParser.m in Sources */, + A55681042C242D7C003C974F /* PNMessageActionResult.m in Sources */, + A556807A2C2344A9003C974F /* PNFileListFetchData.m in Sources */, A504E1E124B04751006DCF5B /* PNFilesManager.m in Sources */, 79A0D8E11DC230190039A264 /* PNPresenceChannelHereNowAPICallBuilder.m in Sources */, + A55680BC2C238EEB003C974F /* PNSubscribeObjectEventData.m in Sources */, A504E18D24AAA724006DCF5B /* PNDownloadFileAPICallBuilder.m in Sources */, A504E10D24AA8F44006DCF5B /* PNListFilesResult.m in Sources */, A5046E4D24784CA90008C81E /* PNSetUUIDMetadataAPICallBuilder.m in Sources */, A5046E4024784CA90008C81E /* PNFetchMembershipsAPICallBuilder.m in Sources */, A5046E5F24784CA90008C81E /* PNFetchAllChannelsMetadataRequest.m in Sources */, A5046E5624784CA90008C81E /* PNFetchMembershipsRequest.m in Sources */, + A556806E2C2311D0003C974F /* PNGenerateFileDownloadURLRequest.m in Sources */, A5046E5924784CA90008C81E /* PNSetMembershipsRequest.m in Sources */, A5046E5C24784CA90008C81E /* PNSetChannelMetadataRequest.m in Sources */, + A5CFE5452C18D38600274165 /* PNWhereNowRequest.m in Sources */, + A5567EEF2C20A51A003C974F /* PNPresenceHeartbeatRequest.m in Sources */, A5DB71052AAEFE58005B6559 /* PNLegacyCryptor.m in Sources */, 79A0D8E71DC2301F0039A264 /* PNPresenceHereNowAPICallBuilder.m in Sources */, + A53249072C2AC5C1003510FF /* PNChannelGroupsResult.m in Sources */, A5046E5024784CA90008C81E /* PNChannelMember.m in Sources */, - A57A3043238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m in Sources */, 79A0D91D1DC2309C0039A264 /* PNStateAPICallBuilder.m in Sources */, A5046E4224784CA90008C81E /* PNManageChannelMembersAPICallBuilder.m in Sources */, 79A0D9411DC230DF0039A264 /* PNStreamAPICallBuilder.m in Sources */, A55DAF0524B1FE9E00766EE9 /* PNXML.m in Sources */, A55A873222FD81E3002D0A72 /* PNSetChannelMetadataStatus.m in Sources */, + A5567E4E2C1EDB02003C974F /* PNPushNotificationFetchRequest.m in Sources */, 798842631C18F1E3003E8948 /* PNChannelGroupChannelsResult.m in Sources */, 798842611C18F1E3003E8948 /* PNAPNSEnabledChannelsResult.m in Sources */, - 798842A11C18F2C2003E8948 /* PNNetworkResponseSerializer.m in Sources */, - A5046E6924784CA90008C81E /* PNMembershipsParser.m in Sources */, - A57A3035238D59B500DE8C68 /* PNAddPushNotificationsRequest.m in Sources */, - A504E13E24AA9361006DCF5B /* PNListFilesParser.m in Sources */, + A5567E802C1FCADC003C974F /* PNPushNotificationFetchData.m in Sources */, + A5CFE5692C18E9C600274165 /* PNPresenceHereNowResult.m in Sources */, A504E1BD24AD3219006DCF5B /* PNDeleteFileRequest.m in Sources */, 79A0D9051DC2305B0039A264 /* PNPublishSizeAPICallBuilder.m in Sources */, 79A0D9771DC231410039A264 /* PNUnsubscribeAPICallBuilder.m in Sources */, - A55DAEF924B1FE7600766EE9 /* PNXMLParser.m in Sources */, + A5CFE5392C18D33500274165 /* PNHereNowRequest.m in Sources */, + A556808C2C23527D003C974F /* PNFileDownloadData.m in Sources */, 798842621C18F1E3003E8948 /* PNChannelClientStateResult.m in Sources */, - 798842661C18F1E3003E8948 /* PNClientStateUpdateStatus.m in Sources */, - 798842BD1C18F2EB003E8948 /* PNPresenceWhereNowParser.m in Sources */, 7988426C1C18F1E3003E8948 /* PNPresenceWhereNowResult.m in Sources */, - 798842BC1C18F2EA003E8948 /* PNPresenceHereNowParser.m in Sources */, - 798842BB1C18F2EA003E8948 /* PNMessagePublishParser.m in Sources */, - A504E12524AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m in Sources */, + A5567FD32C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m in Sources */, 798842601C18F1E3003E8948 /* PNAcknowledgmentStatus.m in Sources */, 79A0D98B1DC2315F0039A264 /* PNTimeAPICallBuilder.m in Sources */, A5FADC3D2490270E001D7704 /* PubNub+Files.m in Sources */, A5046E6424784CA90008C81E /* PNObjectsPaginatedRequest.m in Sources */, - 798842651C18F1E3003E8948 /* PNChannelGroupsResult.m in Sources */, + A5CFE51A2C1892AD00274165 /* PNPushNotificationManageRequest.m in Sources */, A5046E4924784CA90008C81E /* PNSetChannelMetadataAPICallBuilder.m in Sources */, 79E20D211C8AEC53001BC9CC /* PNEnvelopeInformation.m in Sources */, A504E17524AAA70A006DCF5B /* PNListFilesAPICallBuilder.m in Sources */, A57A3095238D751400DE8C68 /* PNMPNSNotificationPayload.m in Sources */, + A5567E3A2C1EB4ED003C974F /* PNTimeRequest.m in Sources */, 7925DBA11D3FFCAC00857C0D /* PNLLogFileInformation.m in Sources */, + A5567E672C1F8C53003C974F /* PNOperationDataParser.m in Sources */, + A5CFE4792C14A90900274165 /* NSError+PNTransport.m in Sources */, + A5CFE4482C11E8D500274165 /* PNChannelGroupManageRequest.m in Sources */, 79A0D8991DC22F7F0039A264 /* PNAPNSAuditAPICallBuilder.m in Sources */, A5046E3E24784CA90008C81E /* PNRemoveMembershipsAPICallBuilder.m in Sources */, - 798842A31C18F2C2003E8948 /* PNRequestParameters.m in Sources */, + A51B4A382BF0AFB8008C3370 /* PNJSONSerialization.m in Sources */, + A55680D42C2400B3003C974F /* PNSubscribePresenceEventData.m in Sources */, 7932486A1D874D9F00FBDF36 /* PNPublishSequence.m in Sources */, 798842551C18F1C0003E8948 /* PubNub+ChannelGroup.m in Sources */, + A5567FCC2C221231003C974F /* PNChannelMetadataSetData.m in Sources */, A57A30A5238D784A00DE8C68 /* PNBaseNotificationPayload.m in Sources */, A5FADC4A2490292A001D7704 /* PNSendFileRequest.m in Sources */, - 798842B61C18F2EA003E8948 /* PNClientStateParser.m in Sources */, A5DB713C2AAEFE58005B6559 /* PNCryptorHeaderV1Data.m in Sources */, A5046E5224784CA90008C81E /* PNUUIDMetadata.m in Sources */, A5046E5B24784CA90008C81E /* PNSetChannelMembersRequest.m in Sources */, A55A86EC22FD81E3002D0A72 /* PNFetchUUIDMetadataResult.m in Sources */, 7988425E1C18F1CE003E8948 /* PNClientInformation.m in Sources */, A5046E4C24784CA90008C81E /* PNFetchUUIDMetadataAPICallBuilder.m in Sources */, - 79CD275E24D6A1CB000698DD /* PNDataStorage.m in Sources */, + A55680322C2294EE003C974F /* PNGenerateFileUploadURLStatus.m in Sources */, A5DB712D2AAEFE58005B6559 /* PNCryptoModule.m in Sources */, - 798842711C18F1E3003E8948 /* PNSubscriberResults.m in Sources */, A56BBFCB2AB900B600260D83 /* NSInputStream+PNURL.m in Sources */, + A5567F622C21EBDF003C974F /* PNPagedAppContextData.m in Sources */, A5046E5E24784CA90008C81E /* PNFetchChannelMetadataRequest.m in Sources */, - 798842C11C18F2EB003E8948 /* PNSubscribeParser.m in Sources */, - 798842B81C18F2EA003E8948 /* PNHeartbeatParser.m in Sources */, A55BCCAE2319243F0019DB68 /* PNAddMessageActionStatus.m in Sources */, + A53248E92C28E3AB003510FF /* PNXMLParser.m in Sources */, + A5CB33DE2C0C70B2008527AA /* PNTransportMiddleware.m in Sources */, + A55680A42C2385BC003C974F /* PNSubscribeMessageEventData.m in Sources */, A5046E5724784CA90008C81E /* PNManageChannelMembersRequest.m in Sources */, 799D611E24C391A100171C29 /* PNPublishFileMessageRequest.m in Sources */, 798842721C18F1E3003E8948 /* PNSubscribeStatus.m in Sources */, + A5CFE4662C123F2E00274165 /* PNBaseOperationData.m in Sources */, 798842571C18F1C0003E8948 /* PubNub+Subscribe.m in Sources */, 7960B66F1F68123400FFAEBB /* PNDeleteMessageAPICallBuilder.m in Sources */, - 798842B91C18F2EA003E8948 /* PNHistoryParser.m in Sources */, + A53248DC2C28D3BC003510FF /* PNMembershipsFetchData.m in Sources */, A5DB71232AAEFE58005B6559 /* PNEncryptedStream.m in Sources */, 7988426D1C18F1E3003E8948 /* PNPublishStatus.m in Sources */, 79A0D8D51DC230100039A264 /* PNPresenceAPICallBuilder.m in Sources */, + A5567E732C1FBE44003C974F /* PubNub+Deprecated.m in Sources */, A5046E4424784CA90008C81E /* PNFetchChannelMembersAPICallBuilder.m in Sources */, + A5567EA42C20243C003C974F /* PNMessageActionFetchData.m in Sources */, 79A0D8B11DC22FB60039A264 /* PNHistoryAPICallBuilder.m in Sources */, + A51B4A5C2BF0B0CB008C3370 /* PNJSONCoder.m in Sources */, A5ADD62F2AC0CE8100310A08 /* NSInputStream+PNCrypto.m in Sources */, 798842681C18F1E3003E8948 /* PNHistoryResult.m in Sources */, + A5567F8C2C21F31E003C974F /* PNChannelMetadataFetchAllData.m in Sources */, 79F90F221FDEC1DD007132A3 /* PNPresenceHeartbeatAPICallBuilder.m in Sources */, 79CFA2C226DE1C4900D206D4 /* PNPAMToken.m in Sources */, - 797ABBD524C6E8650008CA1E /* PNDeleteFileParser.m in Sources */, - A5046E6B24784CA90008C81E /* PNFetchUUIDMetadataParser.m in Sources */, + A51B4A6A2BF0B117008C3370 /* PNJSONCodableObjects.m in Sources */, A5DB709D2AAE778F005B6559 /* PNSequenceInputStream.m in Sources */, + A5CFE5A72C1933BD00274165 /* PNPresenceLeaveRequest.m in Sources */, A504E14A24AA94C8006DCF5B /* PNFile.m in Sources */, + A5567F262C21D53D003C974F /* PNChannelMembersManageData.m in Sources */, 799D610C24C36D5B00171C29 /* PNPublishRequest.m in Sources */, + A55681282C242EE6003C974F /* PNPresenceEventResult.m in Sources */, 7988425B1C18F1C8003E8948 /* PNStateListener.m in Sources */, + A5567E5B2C1F0484003C974F /* PNSignalRequest.m in Sources */, A5046E4A24784CA90008C81E /* PNFetchAllUUIDMetadataAPICallBuilder.m in Sources */, 7988425F1C18F1CE003E8948 /* PNConfiguration.m in Sources */, A52DC1F22307E10B001F20B0 /* NSDateFormatter+PNCacheable.m in Sources */, A5046E5824784CA90008C81E /* PNRemoveChannelMembersRequest.m in Sources */, - A5A7AFCB234932F30060113B /* PNFetchMessagesActionsParser.m in Sources */, A57A302E238D59B500DE8C68 /* PNBasePushNotificationsRequest.m in Sources */, A58975BE23005AAC0093BD9A /* PNManageMembershipsStatus.m in Sources */, + A5CFE4172C0F246400274165 /* PNBaseRequest.m in Sources */, + A51B4A822BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m in Sources */, A504E13124AA90B8006DCF5B /* PNDownloadFileResult.m in Sources */, A56865952300729E0014E17C /* PNFetchChannelMembersResult.m in Sources */, A5046E4524784CA90008C81E /* PNSetChannelMembersAPICallBuilder.m in Sources */, A55BCCF2231D21840019DB68 /* PNAddMessageActionAPICallBuilder.m in Sources */, - A55A877822FD8272002D0A72 /* PNRequest.m in Sources */, - A5046E6724784CA90008C81E /* PNUUIDMetadataChangeParser.m in Sources */, + A5CFE5822C191B8100274165 /* PNHistoryMessagesDeleteRequest.m in Sources */, A5DB71282AAEFE58005B6559 /* PNEncryptedData.m in Sources */, A5DB71002AAEFE58005B6559 /* PNAESCBCCryptor.m in Sources */, - A5046E6A24784CA90008C81E /* PNFetchChannelsMetadataParser.m in Sources */, + A53248D02C28A426003510FF /* PNHistoryMessagesCountRequest.m in Sources */, + A5CB33B32C035D7D008527AA /* PNTransportRequest.m in Sources */, A57A3065238D65A200DE8C68 /* PNNotificationsPayload.m in Sources */, 798842521C18F1B6003E8948 /* PubNub+Presence.m in Sources */, A55A870F22FD81E3002D0A72 /* PNSetUUIDMetadataStatus.m in Sources */, + A55680262C226866003C974F /* PNPresenceUserStateSetData.m in Sources */, A5046E4324784CA90008C81E /* PNSetMembershipsAPICallBuilder.m in Sources */, A504E15D24AA9CFB006DCF5B /* PNFilesAPICallBuilder.m in Sources */, 79A0D96B1DC231370039A264 /* PNSubscribeAPIBuilder.m in Sources */, 798842A21C18F2C2003E8948 /* PNReachability.m in Sources */, 79A0D94D1DC230EA0039A264 /* PNStreamModificationAPICallBuilder.m in Sources */, - A57A304A238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m in Sources */, A5A7B00C2349330F0060113B /* PNBaseMessageActionRequest.m in Sources */, 798842511C18F1AE003E8948 /* PubNub+History.m in Sources */, + A5567E982C1FDEF7003C974F /* PNMessageActionsFetchData.m in Sources */, 798842531C18F1C0003E8948 /* PubNub+Publish.m in Sources */, - 798842B71C18F2EA003E8948 /* PNErrorParser.m in Sources */, + A51B4A8E2BF0B198008C3370 /* PNFunctions.m in Sources */, A5046E5D24784CA90008C81E /* PNRemoveChannelMetadataRequest.m in Sources */, A57A30E6238DC87400DE8C68 /* PNAPNSNotificationTarget.m in Sources */, + A51B4A762BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m in Sources */, 79A0D9281DC230A40039A264 /* PNStateModificationAPICallBuilder.m in Sources */, - 798842BA1C18F2EA003E8948 /* PNLeaveParser.m in Sources */, + A55680C82C23A8CD003C974F /* PNSubscribeSignalEventData.m in Sources */, 7988426F1C18F1E3003E8948 /* PNServiceData.m in Sources */, - 79CD277024D75342000698DD /* PNKeychainStorage.m in Sources */, 798842591C18F1C8003E8948 /* PNClientState.m in Sources */, + A5567FE42C221A20003C974F /* PNFetchAllUUIDMetadataResult.m in Sources */, 798842671C18F1E3003E8948 /* PNErrorStatus.m in Sources */, - 798842A41C18F2C2003E8948 /* PNURLBuilder.m in Sources */, 79A0D8DB1DC230150039A264 /* PNPresenceChannelGroupHereNowAPICallBuilder.m in Sources */, 798842931C18F292003E8948 /* PNURLRequest.m in Sources */, 7988425C1C18F1C8003E8948 /* PNSubscriber.m in Sources */, @@ -6903,8 +8498,8 @@ A5DB71372AAEFE58005B6559 /* PNCryptorHeader.m in Sources */, A5046E5124784CA90008C81E /* PNChannelMetadata.m in Sources */, A5105B5C238F027D00CB693D /* PNDate.m in Sources */, - 798842C21C18F2EB003E8948 /* PNTimeParser.m in Sources */, 798842731C18F1E3003E8948 /* PNTimeResult.m in Sources */, + A556803E2C229587003C974F /* PNFileGenerateUploadURLData.m in Sources */, A55BCD12231D22400019DB68 /* PNFetchMessagesActionsAPICallBuilder.m in Sources */, A5046E4124784CA90008C81E /* PNRemoveChannelMembersAPICallBuilder.m in Sources */, A57A3075238D6BCC00DE8C68 /* PNFCMNotificationPayload.m in Sources */, @@ -6913,53 +8508,71 @@ A5046E6224784CA90008C81E /* PNFetchUUIDMetadataRequest.m in Sources */, 7988428F1C18F292003E8948 /* PNDictionary.m in Sources */, A5046E5324784CA90008C81E /* PNBaseObjectsMembershipRequest.m in Sources */, + A5CB33EA2C0C7237008527AA /* PNTransportMiddlewareConfiguration.m in Sources */, 798842561C18F1C0003E8948 /* PubNub+Core.m in Sources */, + A5567E482C1ECC59003C974F /* PNPresenceStateFetchResult.m in Sources */, + A5567EBF2C2077AE003C974F /* PNSubscribeData.m in Sources */, + A5CFE59B2C192ECA00274165 /* PNSubscribeRequest.m in Sources */, A55A85DD22FD8078002D0A72 /* PubNub+Objects.m in Sources */, + A5CFE4FA2C16528700274165 /* PNTimeData.m in Sources */, + A5567F742C21F0EA003C974F /* PNUUIDMetadataFetchData.m in Sources */, A5686585230072810014E17C /* PNManageChannelMembersStatus.m in Sources */, - A5046E6624784CA90008C81E /* PNChannelMetadataChangeParser.m in Sources */, + A51B4A502BF0B0B0008C3370 /* PNJSONEncoder.m in Sources */, 79A0D8A51DC22F940039A264 /* PNAPNSModificationAPICallBuilder.m in Sources */, A586A9EA2337E581008856D2 /* PNFetchMessageActionsResult.m in Sources */, 798842501C18F199003E8948 /* PubNub+APNS.m in Sources */, + A5CFE5512C18D3A700274165 /* PNPresenceStateSetRequest.m in Sources */, A504E1B124AD3209006DCF5B /* PNDownloadFileRequest.m in Sources */, A504E16924AAA6FE006DCF5B /* PNSendFileAPICallBuilder.m in Sources */, + A55680E02C2428E8003C974F /* PNSubscribeFileEventData.m in Sources */, A50319DF2AA65EB400B25A44 /* NSArray+PNMap.m in Sources */, + A55680022C225146003C974F /* PNPresenceUserStateFetchData.m in Sources */, + A5567FA02C220E32003C974F /* PNFetchMembershipsResult.m in Sources */, + A5567F322C21DB10003C974F /* PNMembershipsManageData.m in Sources */, 79A3E40D2215699900F2ADB9 /* PNMessageCountAPICallBuilder.m in Sources */, 79A0D9471DC230E50039A264 /* PNStreamAuditAPICallBuilder.m in Sources */, 7988425A1C18F1C8003E8948 /* PNHeartbeat.m in Sources */, 797D606F22D2E44000E64C94 /* PNSignalStatus.m in Sources */, + A5567FB42C22107D003C974F /* PNClientStateUpdateStatus.m in Sources */, A5046E6524784CA90008C81E /* PNBaseObjectsRequest.m in Sources */, A504E19924AAA72E006DCF5B /* PNDeleteFileAPICallBuilder.m in Sources */, A50319BB2AA5B05900B25A44 /* PNResult.m in Sources */, 798842581C18F1C0003E8948 /* PubNub+Time.m in Sources */, - 79E2D0F81C56434700BAA244 /* PNKeychain.m in Sources */, + A5CFE4C32C1647B000274165 /* PNPublishData.m in Sources */, 7988428C1C18F291003E8948 /* PNChannel.m in Sources */, A5046E5424784CA90008C81E /* PNManageMembershipsRequest.m in Sources */, 79A3E424221569BA00F2ADB9 /* PNMessageCountResult.m in Sources */, A504E1A524ACCA42006DCF5B /* PNFileDownloadURLAPICallBuilder.m in Sources */, - 798842A01C18F2C2003E8948 /* PNNetwork.m in Sources */, + A5567F802C21F203003C974F /* PNUUIDMetadataFetchAllData.m in Sources */, + A556804A2C229D8D003C974F /* PNFileSendData.m in Sources */, 797D606622D2E41100E64C94 /* PNSignalAPICallBuilder.m in Sources */, 7925DB931D3FFCAC00857C0D /* PNLLogger.m in Sources */, 7988426E1C18F1E3003E8948 /* PNOperationResult.m in Sources */, + A5CB33D12C046A1A008527AA /* PNTransportConfiguration.m in Sources */, A55BCD22231D26110019DB68 /* PNMessageAction.m in Sources */, - 79A3E434221569DA00F2ADB9 /* PNMessageCountParser.m in Sources */, + A5CFE5C62C1AAAAD00274165 /* PNErrorData.m in Sources */, A5A7B0212349330F0060113B /* PNFetchMessageActionsRequest.m in Sources */, + A556811C2C242E96003C974F /* PNFileEventResult.m in Sources */, 79F857FE219640AB00BFD0B1 /* PNClientStateGetResult.m in Sources */, + A5567F4A2C21E723003C974F /* PNChannelMembersFetchData.m in Sources */, + A51B4AB32BF37F03008C3370 /* PNChannelGroupFetchRequest.m in Sources */, 798842701C18F1E3003E8948 /* PNStatus.m in Sources */, - 79CD277C24D75AE9000698DD /* PNInMemoryStorage.m in Sources */, - A57A3019238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m in Sources */, + A51B4AA62BF0B428008C3370 /* PNError.m in Sources */, 79A0D9231DC230A00039A264 /* PNStateAuditAPICallBuilder.m in Sources */, - A504E1D524AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m in Sources */, + A5567E872C1FCF0F003C974F /* PNChannelGroupFetchData.m in Sources */, + A55681102C242E09003C974F /* PNObjectEventResult.m in Sources */, 798842921C18F292003E8948 /* PNString.m in Sources */, 79650C3F1E775EA100006F66 /* PNLockSupport.m in Sources */, 79CFA2B626DE0AEB00D206D4 /* PNCBORDecoder.m in Sources */, + A55680EC2C242BFF003C974F /* PNMessageResult.m in Sources */, 7988428A1C18F291003E8948 /* PNNumber.m in Sources */, A5046E4E24784CA90008C81E /* PNObjectsAPICallBuilder.m in Sources */, - A56865752300709F0014E17C /* PNFetchMembershipsResult.m in Sources */, + A5567F132C219757003C974F /* PNBaseAppContextObject.m in Sources */, A56FAEFE233161570072ADD6 /* PubNub+MessageActions.m in Sources */, + A556805C2C22BE6D003C974F /* PNFileUploadRequest.m in Sources */, A5DB70FB2AAEFE58005B6559 /* PNCCCryptorWrapper.m in Sources */, A5DB71322AAEFE58005B6559 /* PNCryptorInputStream.m in Sources */, 79A0D96F1DC2313B0039A264 /* PNSubscribeChannelsOrGroupsAPIBuilder.m in Sources */, - A5046E6824784CA90008C81E /* PNObjectsRemoveParser.m in Sources */, A5046E6124784CA90008C81E /* PNRemoveUUIDMetadataRequest.m in Sources */, A5046E4F24784CA90008C81E /* PNMembership.m in Sources */, 7988428B1C18F291003E8948 /* PNArray.m in Sources */, @@ -6967,15 +8580,17 @@ A5E3BA162B3118BE00D3AA18 /* PNRequestRetryConfiguration.m in Sources */, 7988428E1C18F292003E8948 /* PNData.m in Sources */, A5046E4624784CA90008C81E /* PNFetchAllChannelsMetadataAPICallBuilder.m in Sources */, + A55680B02C23880C003C974F /* PNSubscribeMessageActionEventData.m in Sources */, 798842901C18F292003E8948 /* PNGZIP.m in Sources */, A5A7B01A2349330F0060113B /* PNAddMessageActionRequest.m in Sources */, - A5046E6C24784CA90008C81E /* PNChannelMembersParser.m in Sources */, A504E1C424AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.m in Sources */, - A55A86FA22FD81E3002D0A72 /* PNFetchChannelsMetadataResult.m in Sources */, + A5567EE32C209FF7003C974F /* PNPresenceWhereNowFetchData.m in Sources */, + A51B4A442BF0B097008C3370 /* PNJSONDecoder.m in Sources */, + A55A86FA22FD81E3002D0A72 /* PNFetchChannelMetadataResult.m in Sources */, + A5CFE4E12C16500F00274165 /* PNSignalData.m in Sources */, A5046E6324784CA90008C81E /* PNFetchAllUUIDMetadataRequest.m in Sources */, A5046E5524784CA90008C81E /* PNRemoveMembershipsRequest.m in Sources */, 7988425D1C18F1CE003E8948 /* PNAES.m in Sources */, - A5A7AFEE234932F30060113B /* PNRemoveMessageActionParser.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -6983,162 +8598,187 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + A53248D32C28D211003510FF /* PNHistoryMessageCountData.m in Sources */, + A5CFE5562C18D3B600274165 /* PNPresenceStateFetchRequest.m in Sources */, A5046ED524784CAB0008C81E /* PNFetchChannelMetadataAPICallBuilder.m in Sources */, 7951954926BD44E9001E308C /* PubNub+PAM.m in Sources */, + A5567EC42C207800003C974F /* PNSubscribeCursorData.m in Sources */, + A5CFE5072C1658E700274165 /* PNHistoryFetchData.m in Sources */, 79A0D87D1DC22F460039A264 /* PNAPICallBuilder.m in Sources */, A57A30BA238DC6B600DE8C68 /* PNAPNSNotificationPayload.m in Sources */, A504E0FE24AA8AEA006DCF5B /* PNListFilesRequest.m in Sources */, - 79A8BC2A1C58F93900015BDE /* PNPushNotificationsStateModificationParser.m in Sources */, + A51B4A942BF0B1E3008C3370 /* PNLock.m in Sources */, + A5567F372C21E4DF003C974F /* PNUUIDMetadataSetData.m in Sources */, 797ABBA824C4148C0008CA1E /* PNBasePublishRequest.m in Sources */, A5046ECC24784CAB0008C81E /* PNManageMembershipsAPICallBuilder.m in Sources */, - A5A7AFDC234932F30060113B /* PNAddMessageActionParser.m in Sources */, A5046EE724784CAB0008C81E /* PNFetchChannelMembersRequest.m in Sources */, + A523EEE32BFE910A009F45AA /* PNURLSessionTransport.m in Sources */, 79A238D81D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.m in Sources */, + A5567FB92C221136003C974F /* PNChannelMetadataFetchData.m in Sources */, + A55680F22C242D11003C974F /* PNSignalResult.m in Sources */, 79A8BC571C58F93900015BDE /* PNPresenceChannelGroupHereNowResult.m in Sources */, A57A30CA238DC71800DE8C68 /* PNAPNSNotificationConfiguration.m in Sources */, - 79A8BC3F1C58F93900015BDE /* PNChannelGroupModificationParser.m in Sources */, 79A8BC561C58F93900015BDE /* PNChannelGroupClientStateResult.m in Sources */, - 79ABD8991F01636B007634E0 /* PNTelemetry.m in Sources */, + A5567EAA2C20371C003C974F /* PNPresenceHereNowFetchData.m in Sources */, 79A0D9791DC231440039A264 /* PNUnsubscribeChannelsOrGroupsAPICallBuilder.m in Sources */, + A5CFE56F2C19066C00274165 /* PNHistoryFetchRequest.m in Sources */, 79A0D8FB1DC230540039A264 /* PNPublishAPICallBuilder.m in Sources */, A5A7B0242349330F0060113B /* PNRemoveMessageActionRequest.m in Sources */, 799D60F024C1B33900171C29 /* PNSendFileStatus.m in Sources */, 79A8BC5F1C58F93900015BDE /* PNPresenceChannelHereNowResult.m in Sources */, A5046ED424784CAB0008C81E /* PNRemoveChannelMetadataAPICallBuilder.m in Sources */, + A5CCEC522C0E006000DB02A4 /* PNURLSessionTransportResponse.m in Sources */, A5046ED824784CAB0008C81E /* PNRemoveUUIDMetadataAPICallBuilder.m in Sources */, - 79A8BC331C58F93900015BDE /* PNPushNotificationsAuditParser.m in Sources */, + A5567ED02C208652003C974F /* PNSubscribeEventData.m in Sources */, 79A0D8891DC22F610039A264 /* PNAPNSAPICallBuilder.m in Sources */, A55BCCFE231D222B0019DB68 /* PNRemoveMessageActionAPICallBuilder.m in Sources */, 797ABBBA24C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.m in Sources */, 79A8BC1F1C58F93900015BDE /* PNPresenceGlobalHereNowResult.m in Sources */, 79A8BC421C58F93900015BDE /* PNChannelGroupChannelsResult.m in Sources */, + A55680FE2C242D7C003C974F /* PNMessageActionResult.m in Sources */, + A55680742C2344A9003C974F /* PNFileListFetchData.m in Sources */, A504E1DE24B04751006DCF5B /* PNFilesManager.m in Sources */, 79A0D8DD1DC230180039A264 /* PNPresenceChannelHereNowAPICallBuilder.m in Sources */, + A55680B62C238EEB003C974F /* PNSubscribeObjectEventData.m in Sources */, A504E18A24AAA724006DCF5B /* PNDownloadFileAPICallBuilder.m in Sources */, A504E10A24AA8F44006DCF5B /* PNListFilesResult.m in Sources */, A5046EDA24784CAB0008C81E /* PNSetUUIDMetadataAPICallBuilder.m in Sources */, A5046ECD24784CAB0008C81E /* PNFetchMembershipsAPICallBuilder.m in Sources */, A5046EEC24784CAB0008C81E /* PNFetchAllChannelsMetadataRequest.m in Sources */, A5046EE324784CAB0008C81E /* PNFetchMembershipsRequest.m in Sources */, + A55680672C2311D0003C974F /* PNGenerateFileDownloadURLRequest.m in Sources */, A5046EE624784CAB0008C81E /* PNSetMembershipsRequest.m in Sources */, A5046EE924784CAB0008C81E /* PNSetChannelMetadataRequest.m in Sources */, + A5CFE53E2C18D38600274165 /* PNWhereNowRequest.m in Sources */, + A5567EE82C20A51A003C974F /* PNPresenceHeartbeatRequest.m in Sources */, A5DB71022AAEFE58005B6559 /* PNLegacyCryptor.m in Sources */, + A53249002C2AC5C1003510FF /* PNChannelGroupsResult.m in Sources */, 79A0D8E31DC2301D0039A264 /* PNPresenceHereNowAPICallBuilder.m in Sources */, A5046EDD24784CAB0008C81E /* PNChannelMember.m in Sources */, - A57A303F238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m in Sources */, 79A0D9191DC2309A0039A264 /* PNStateAPICallBuilder.m in Sources */, A5046ECF24784CAB0008C81E /* PNManageChannelMembersAPICallBuilder.m in Sources */, 79A0D93D1DC230DD0039A264 /* PNStreamAPICallBuilder.m in Sources */, A55DAF0224B1FE9E00766EE9 /* PNXML.m in Sources */, A55A872E22FD81E3002D0A72 /* PNSetChannelMetadataStatus.m in Sources */, - 79A8BC2E1C58F93900015BDE /* PNChannelGroupAuditionParser.m in Sources */, + A5567E4B2C1EDB02003C974F /* PNPushNotificationFetchRequest.m in Sources */, 79A8BC5D1C58F93900015BDE /* PNAPNSEnabledChannelsResult.m in Sources */, - 79A8BC5B1C58F93900015BDE /* PNNetworkResponseSerializer.m in Sources */, - A5046EF624784CAB0008C81E /* PNMembershipsParser.m in Sources */, - A57A3031238D59B500DE8C68 /* PNAddPushNotificationsRequest.m in Sources */, - A504E13B24AA9361006DCF5B /* PNListFilesParser.m in Sources */, + A5567E792C1FCADC003C974F /* PNPushNotificationFetchData.m in Sources */, + A5CFE5622C18E9C600274165 /* PNPresenceHereNowResult.m in Sources */, A504E1BA24AD3219006DCF5B /* PNDeleteFileRequest.m in Sources */, 79A0D9011DC230590039A264 /* PNPublishSizeAPICallBuilder.m in Sources */, 79A0D9731DC2313F0039A264 /* PNUnsubscribeAPICallBuilder.m in Sources */, - A55DAEF624B1FE7600766EE9 /* PNXMLParser.m in Sources */, + A5CFE5322C18D33500274165 /* PNHereNowRequest.m in Sources */, + A55680862C23527D003C974F /* PNFileDownloadData.m in Sources */, 79A8BC3B1C58F93900015BDE /* PNChannelClientStateResult.m in Sources */, - 79A8BC4D1C58F93900015BDE /* PNClientStateUpdateStatus.m in Sources */, - 79A8BC3C1C58F93900015BDE /* PNPresenceWhereNowParser.m in Sources */, 79A8BC2C1C58F93900015BDE /* PNPresenceWhereNowResult.m in Sources */, - 79A8BC621C58F93900015BDE /* PNPresenceHereNowParser.m in Sources */, - 79A8BC461C58F93900015BDE /* PNMessagePublishParser.m in Sources */, - A504E12224AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m in Sources */, + A5567FD02C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m in Sources */, 79A8BC361C58F93900015BDE /* PNAcknowledgmentStatus.m in Sources */, 79A0D9861DC2315D0039A264 /* PNTimeAPICallBuilder.m in Sources */, A5FADC3A2490270E001D7704 /* PubNub+Files.m in Sources */, A5046EF124784CAB0008C81E /* PNObjectsPaginatedRequest.m in Sources */, - 79A8BC2F1C58F93900015BDE /* PNChannelGroupsResult.m in Sources */, + A5CFE5132C1892AD00274165 /* PNPushNotificationManageRequest.m in Sources */, A5046ED624784CAB0008C81E /* PNSetChannelMetadataAPICallBuilder.m in Sources */, 79E20D1D1C8AEC51001BC9CC /* PNEnvelopeInformation.m in Sources */, A504E17224AAA70A006DCF5B /* PNListFilesAPICallBuilder.m in Sources */, A57A3091238D751400DE8C68 /* PNMPNSNotificationPayload.m in Sources */, + A5567E342C1EB4ED003C974F /* PNTimeRequest.m in Sources */, 7925DB9D1D3FFCAC00857C0D /* PNLLogFileInformation.m in Sources */, + A5567E602C1F8C53003C974F /* PNOperationDataParser.m in Sources */, + A5CFE4722C14A90900274165 /* NSError+PNTransport.m in Sources */, + A5CFE4412C11E8D500274165 /* PNChannelGroupManageRequest.m in Sources */, 79A0D8951DC22F7E0039A264 /* PNAPNSAuditAPICallBuilder.m in Sources */, A5046ECB24784CAB0008C81E /* PNRemoveMembershipsAPICallBuilder.m in Sources */, - 79A8BC601C58F93900015BDE /* PNClientStateParser.m in Sources */, + A51B4A322BF0AFB8008C3370 /* PNJSONSerialization.m in Sources */, + A55680CE2C2400B3003C974F /* PNSubscribePresenceEventData.m in Sources */, 793248661D874D9F00FBDF36 /* PNPublishSequence.m in Sources */, 79A8BC411C58F93900015BDE /* PNClientInformation.m in Sources */, + A5567FC52C221231003C974F /* PNChannelMetadataSetData.m in Sources */, A57A30A1238D784A00DE8C68 /* PNBaseNotificationPayload.m in Sources */, A5FADC472490292A001D7704 /* PNSendFileRequest.m in Sources */, - 79A8BC3E1C58F93900015BDE /* PNSubscriberResults.m in Sources */, A5DB71392AAEFE58005B6559 /* PNCryptorHeaderV1Data.m in Sources */, A5046EDF24784CAB0008C81E /* PNUUIDMetadata.m in Sources */, A5046EE824784CAB0008C81E /* PNSetChannelMembersRequest.m in Sources */, A55A86E822FD81E3002D0A72 /* PNFetchUUIDMetadataResult.m in Sources */, - 79A8BC381C58F93900015BDE /* PNRequestParameters.m in Sources */, A5046ED924784CAB0008C81E /* PNFetchUUIDMetadataAPICallBuilder.m in Sources */, - 79CD275B24D6A1CB000698DD /* PNDataStorage.m in Sources */, + A556802F2C2294EE003C974F /* PNGenerateFileUploadURLStatus.m in Sources */, A5DB712A2AAEFE58005B6559 /* PNCryptoModule.m in Sources */, 79A8BC371C58F93900015BDE /* PubNub+ChannelGroup.m in Sources */, A56BBFC82AB900B600260D83 /* NSInputStream+PNURL.m in Sources */, + A5567F5B2C21EBDF003C974F /* PNPagedAppContextData.m in Sources */, A5046EEB24784CAB0008C81E /* PNFetchChannelMetadataRequest.m in Sources */, - 79A8BC581C58F93900015BDE /* PNHeartbeatParser.m in Sources */, - 79A8BC451C58F93900015BDE /* PNSubscribeParser.m in Sources */, A55BCCAA2319243F0019DB68 /* PNAddMessageActionStatus.m in Sources */, + A53248E62C28E3AB003510FF /* PNXMLParser.m in Sources */, + A5CB33D72C0C70B2008527AA /* PNTransportMiddleware.m in Sources */, + A556809E2C2385BC003C974F /* PNSubscribeMessageEventData.m in Sources */, A5046EE424784CAB0008C81E /* PNManageChannelMembersRequest.m in Sources */, 799D611B24C391A100171C29 /* PNPublishFileMessageRequest.m in Sources */, 79A8BC261C58F93900015BDE /* PNSubscribeStatus.m in Sources */, + A5CFE45F2C123F2E00274165 /* PNBaseOperationData.m in Sources */, 79A8BC5C1C58F93900015BDE /* PubNub+Subscribe.m in Sources */, 7960B66B1F68123300FFAEBB /* PNDeleteMessageAPICallBuilder.m in Sources */, 79A8BC531C58F93900015BDE /* PubNub+Presence.m in Sources */, + A53248D92C28D3BC003510FF /* PNMembershipsFetchData.m in Sources */, A5DB71202AAEFE58005B6559 /* PNEncryptedStream.m in Sources */, 79A8BC511C58F93900015BDE /* PNPublishStatus.m in Sources */, 79A0D8D11DC2300F0039A264 /* PNPresenceAPICallBuilder.m in Sources */, + A5567E6C2C1FBE44003C974F /* PubNub+Deprecated.m in Sources */, A5046ED124784CAB0008C81E /* PNFetchChannelMembersAPICallBuilder.m in Sources */, + A5567E9D2C20243C003C974F /* PNMessageActionFetchData.m in Sources */, 79A0D8AD1DC22FB40039A264 /* PNHistoryAPICallBuilder.m in Sources */, + A51B4A562BF0B0CB008C3370 /* PNJSONCoder.m in Sources */, A5ADD62C2AC0CE8100310A08 /* NSInputStream+PNCrypto.m in Sources */, 79A8BC391C58F93900015BDE /* PNHistoryResult.m in Sources */, + A5567F852C21F31E003C974F /* PNChannelMetadataFetchAllData.m in Sources */, 79F90F261FDEC1DE007132A3 /* PNPresenceHeartbeatAPICallBuilder.m in Sources */, 79CFA2BF26DE1C4900D206D4 /* PNPAMToken.m in Sources */, - 797ABBD224C6E8650008CA1E /* PNDeleteFileParser.m in Sources */, - A5046EF824784CAB0008C81E /* PNFetchUUIDMetadataParser.m in Sources */, + A51B4A642BF0B117008C3370 /* PNJSONCodableObjects.m in Sources */, A5DB709A2AAE778F005B6559 /* PNSequenceInputStream.m in Sources */, + A5CFE5A02C1933BD00274165 /* PNPresenceLeaveRequest.m in Sources */, A504E14724AA94C8006DCF5B /* PNFile.m in Sources */, + A5567F1F2C21D53D003C974F /* PNChannelMembersManageData.m in Sources */, 799D610924C36D5B00171C29 /* PNPublishRequest.m in Sources */, + A55681222C242EE6003C974F /* PNPresenceEventResult.m in Sources */, 79A8BC341C58F93900015BDE /* PNStateListener.m in Sources */, + A5567E552C1F0484003C974F /* PNSignalRequest.m in Sources */, A5046ED724784CAB0008C81E /* PNFetchAllUUIDMetadataAPICallBuilder.m in Sources */, - 79A8BC281C58F93900015BDE /* PNHistoryParser.m in Sources */, A52DC1EE2307E10B001F20B0 /* NSDateFormatter+PNCacheable.m in Sources */, A5046EE524784CAB0008C81E /* PNRemoveChannelMembersRequest.m in Sources */, - A5A7AFC7234932F30060113B /* PNFetchMessagesActionsParser.m in Sources */, A57A302A238D59B500DE8C68 /* PNBasePushNotificationsRequest.m in Sources */, A58975BA23005AAC0093BD9A /* PNManageMembershipsStatus.m in Sources */, + A5CFE4102C0F246400274165 /* PNBaseRequest.m in Sources */, + A51B4A7C2BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m in Sources */, A504E12E24AA90B8006DCF5B /* PNDownloadFileResult.m in Sources */, A56865912300729E0014E17C /* PNFetchChannelMembersResult.m in Sources */, A5046ED224784CAB0008C81E /* PNSetChannelMembersAPICallBuilder.m in Sources */, A55BCCEE231D21840019DB68 /* PNAddMessageActionAPICallBuilder.m in Sources */, - A55A877422FD8272002D0A72 /* PNRequest.m in Sources */, - A5046EF424784CAB0008C81E /* PNUUIDMetadataChangeParser.m in Sources */, + A5CFE57B2C191B8100274165 /* PNHistoryMessagesDeleteRequest.m in Sources */, A5DB71252AAEFE58005B6559 /* PNEncryptedData.m in Sources */, A5DB70FD2AAEFE58005B6559 /* PNAESCBCCryptor.m in Sources */, - A5046EF724784CAB0008C81E /* PNFetchChannelsMetadataParser.m in Sources */, + A53248CD2C28A426003510FF /* PNHistoryMessagesCountRequest.m in Sources */, + A5CB33AC2C035D7D008527AA /* PNTransportRequest.m in Sources */, A57A3061238D65A200DE8C68 /* PNNotificationsPayload.m in Sources */, 79A8BC271C58F93900015BDE /* PNConfiguration.m in Sources */, A55A870B22FD81E3002D0A72 /* PNSetUUIDMetadataStatus.m in Sources */, + A556801F2C226866003C974F /* PNPresenceUserStateSetData.m in Sources */, A5046ED024784CAB0008C81E /* PNSetMembershipsAPICallBuilder.m in Sources */, A504E15A24AA9CFB006DCF5B /* PNFilesAPICallBuilder.m in Sources */, 79A0D9671DC231350039A264 /* PNSubscribeAPIBuilder.m in Sources */, 79A8BC611C58F93900015BDE /* PubNub+Publish.m in Sources */, 79A0D9491DC230E80039A264 /* PNStreamModificationAPICallBuilder.m in Sources */, - A57A3046238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m in Sources */, A5A7B0082349330F0060113B /* PNBaseMessageActionRequest.m in Sources */, 79A8BC221C58F93900015BDE /* PNReachability.m in Sources */, + A5567E912C1FDEF7003C974F /* PNMessageActionsFetchData.m in Sources */, 79A8BC1E1C58F93900015BDE /* PubNub+History.m in Sources */, 79A8BC4C1C58F93900015BDE /* PNServiceData.m in Sources */, + A51B4A882BF0B197008C3370 /* PNFunctions.m in Sources */, A5046EEA24784CAB0008C81E /* PNRemoveChannelMetadataRequest.m in Sources */, A57A30E2238DC87400DE8C68 /* PNAPNSNotificationTarget.m in Sources */, + A51B4A702BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m in Sources */, 79A0D9251DC230A30039A264 /* PNStateModificationAPICallBuilder.m in Sources */, + A55680C22C23A8CD003C974F /* PNSubscribeSignalEventData.m in Sources */, 79A8BC441C58F93900015BDE /* PNClientState.m in Sources */, - 79A8BC431C58F93900015BDE /* PNLeaveParser.m in Sources */, - 79CD276D24D75342000698DD /* PNKeychainStorage.m in Sources */, - 79A8BC3A1C58F93900015BDE /* PNErrorParser.m in Sources */, + A5567FE12C221A20003C974F /* PNFetchAllUUIDMetadataResult.m in Sources */, 79A8BC311C58F93900015BDE /* PNErrorStatus.m in Sources */, - 79A8BC551C58F93900015BDE /* PNURLBuilder.m in Sources */, 79A0D8D71DC230130039A264 /* PNPresenceChannelGroupHereNowAPICallBuilder.m in Sources */, 79A8BC541C58F93900015BDE /* PNSubscriber.m in Sources */, 79A8BC4A1C58F93900015BDE /* PNTimeResult.m in Sources */, @@ -7146,8 +8786,8 @@ A5DB71342AAEFE58005B6559 /* PNCryptorHeader.m in Sources */, A5046EDE24784CAB0008C81E /* PNChannelMetadata.m in Sources */, A5105B58238F027D00CB693D /* PNDate.m in Sources */, - 79A8BC481C58F93900015BDE /* PNTimeParser.m in Sources */, 79A8BC471C58F93900015BDE /* PNURLRequest.m in Sources */, + A55680372C229587003C974F /* PNFileGenerateUploadURLData.m in Sources */, A55BCD0E231D22400019DB68 /* PNFetchMessagesActionsAPICallBuilder.m in Sources */, A5046ECE24784CAB0008C81E /* PNRemoveChannelMembersAPICallBuilder.m in Sources */, A57A3071238D6BCC00DE8C68 /* PNFCMNotificationPayload.m in Sources */, @@ -7156,53 +8796,71 @@ A5046EEF24784CAB0008C81E /* PNFetchUUIDMetadataRequest.m in Sources */, 79A8BC251C58F93900015BDE /* PNDictionary.m in Sources */, A5046EE024784CAB0008C81E /* PNBaseObjectsMembershipRequest.m in Sources */, + A5CB33E32C0C7237008527AA /* PNTransportMiddlewareConfiguration.m in Sources */, 79A8BC351C58F93900015BDE /* PNHeartbeat.m in Sources */, + A5567E422C1ECC59003C974F /* PNPresenceStateFetchResult.m in Sources */, + A5567EB82C2077AE003C974F /* PNSubscribeData.m in Sources */, + A5CFE5942C192ECA00274165 /* PNSubscribeRequest.m in Sources */, A55A85D922FD8078002D0A72 /* PubNub+Objects.m in Sources */, + A5CFE4F32C16528700274165 /* PNTimeData.m in Sources */, + A5567F6D2C21F0EA003C974F /* PNUUIDMetadataFetchData.m in Sources */, A5686581230072810014E17C /* PNManageChannelMembersStatus.m in Sources */, - A5046EF324784CAB0008C81E /* PNChannelMetadataChangeParser.m in Sources */, + A51B4A4A2BF0B0B0008C3370 /* PNJSONEncoder.m in Sources */, 79A0D8A11DC22F920039A264 /* PNAPNSModificationAPICallBuilder.m in Sources */, A586A9E62337E581008856D2 /* PNFetchMessageActionsResult.m in Sources */, 79A8BC301C58F93900015BDE /* PubNub+Time.m in Sources */, + A5CFE54A2C18D3A700274165 /* PNPresenceStateSetRequest.m in Sources */, A504E1AE24AD3209006DCF5B /* PNDownloadFileRequest.m in Sources */, A504E16624AAA6FE006DCF5B /* PNSendFileAPICallBuilder.m in Sources */, + A55680DA2C2428E8003C974F /* PNSubscribeFileEventData.m in Sources */, A50319DC2AA65EB400B25A44 /* NSArray+PNMap.m in Sources */, + A5567FFB2C225146003C974F /* PNPresenceUserStateFetchData.m in Sources */, + A5567F9D2C220E32003C974F /* PNFetchMembershipsResult.m in Sources */, + A5567F2B2C21DB10003C974F /* PNMembershipsManageData.m in Sources */, 79A3E4092215699900F2ADB9 /* PNMessageCountAPICallBuilder.m in Sources */, 79A0D9431DC230E20039A264 /* PNStreamAuditAPICallBuilder.m in Sources */, 79A8BC2D1C58F93900015BDE /* PubNub+APNS.m in Sources */, 797D606B22D2E44000E64C94 /* PNSignalStatus.m in Sources */, + A5567FB12C22107D003C974F /* PNClientStateUpdateStatus.m in Sources */, A5046EF224784CAB0008C81E /* PNBaseObjectsRequest.m in Sources */, A504E19624AAA72E006DCF5B /* PNDeleteFileAPICallBuilder.m in Sources */, A50319B82AA5B05900B25A44 /* PNResult.m in Sources */, 79A8BC211C58F93900015BDE /* PubNub+Core.m in Sources */, - 79A8BC491C58F93900015BDE /* PNKeychain.m in Sources */, - 79A8BC4F1C58F93900015BDE /* PNNetwork.m in Sources */, + A5CFE4BC2C1647B000274165 /* PNPublishData.m in Sources */, A5046EE124784CAB0008C81E /* PNManageMembershipsRequest.m in Sources */, 79A3E420221569BA00F2ADB9 /* PNMessageCountResult.m in Sources */, A504E1A224ACCA42006DCF5B /* PNFileDownloadURLAPICallBuilder.m in Sources */, 79A8BC3D1C58F93900015BDE /* PNChannel.m in Sources */, + A5567F792C21F203003C974F /* PNUUIDMetadataFetchAllData.m in Sources */, + A55680432C229D8D003C974F /* PNFileSendData.m in Sources */, 797D606222D2E41100E64C94 /* PNSignalAPICallBuilder.m in Sources */, 7925DB8F1D3FFCAC00857C0D /* PNLLogger.m in Sources */, 79A8BC5E1C58F93900015BDE /* PNOperationResult.m in Sources */, + A5CB33CA2C046A1A008527AA /* PNTransportConfiguration.m in Sources */, A55BCD1E231D26110019DB68 /* PNMessageAction.m in Sources */, - 79A3E430221569DA00F2ADB9 /* PNMessageCountParser.m in Sources */, + A5CFE5BF2C1AAAAC00274165 /* PNErrorData.m in Sources */, A5A7B01D2349330F0060113B /* PNFetchMessageActionsRequest.m in Sources */, + A55681162C242E96003C974F /* PNFileEventResult.m in Sources */, 79F857FA219640A200BFD0B1 /* PNClientStateGetResult.m in Sources */, + A5567F432C21E723003C974F /* PNChannelMembersFetchData.m in Sources */, + A51B4AAD2BF37F03008C3370 /* PNChannelGroupFetchRequest.m in Sources */, 79A8BC591C58F93900015BDE /* PNStatus.m in Sources */, - 79CD277924D75AE9000698DD /* PNInMemoryStorage.m in Sources */, - A57A3015238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m in Sources */, + A51B4AA02BF0B428008C3370 /* PNError.m in Sources */, 79A0D91F1DC2309F0039A264 /* PNStateAuditAPICallBuilder.m in Sources */, - A504E1D224AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m in Sources */, + A5567E842C1FCF0F003C974F /* PNChannelGroupFetchData.m in Sources */, + A556810A2C242E09003C974F /* PNObjectEventResult.m in Sources */, 79A8BC521C58F93900015BDE /* PNNumber.m in Sources */, 79650C3B1E775EA000006F66 /* PNLockSupport.m in Sources */, 79CFA2B326DE0AEB00D206D4 /* PNCBORDecoder.m in Sources */, + A55680E62C242BFF003C974F /* PNMessageResult.m in Sources */, 79A8BC201C58F93900015BDE /* PNString.m in Sources */, A5046EDB24784CAB0008C81E /* PNObjectsAPICallBuilder.m in Sources */, - A56865712300709F0014E17C /* PNFetchMembershipsResult.m in Sources */, + A5567F0C2C219757003C974F /* PNBaseAppContextObject.m in Sources */, A56FAEFA233161570072ADD6 /* PubNub+MessageActions.m in Sources */, + A55680552C22BE6D003C974F /* PNFileUploadRequest.m in Sources */, A5DB70F82AAEFE58005B6559 /* PNCCCryptorWrapper.m in Sources */, A5DB712F2AAEFE58005B6559 /* PNCryptorInputStream.m in Sources */, 79A0D96E1DC2313A0039A264 /* PNSubscribeChannelsOrGroupsAPIBuilder.m in Sources */, - A5046EF524784CAB0008C81E /* PNObjectsRemoveParser.m in Sources */, A5046EEE24784CAB0008C81E /* PNRemoveUUIDMetadataRequest.m in Sources */, A5046EDC24784CAB0008C81E /* PNMembership.m in Sources */, 79A8BC5A1C58F93900015BDE /* PNArray.m in Sources */, @@ -7210,15 +8868,17 @@ A5E3BA132B3118BE00D3AA18 /* PNRequestRetryConfiguration.m in Sources */, 79A8BC291C58F93900015BDE /* PNGZIP.m in Sources */, A5046ED324784CAB0008C81E /* PNFetchAllChannelsMetadataAPICallBuilder.m in Sources */, + A55680AA2C23880C003C974F /* PNSubscribeMessageActionEventData.m in Sources */, 79A8BC231C58F93900015BDE /* PNData.m in Sources */, A5A7B0162349330F0060113B /* PNAddMessageActionRequest.m in Sources */, - A5046EF924784CAB0008C81E /* PNChannelMembersParser.m in Sources */, A504E1C124AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.m in Sources */, - A55A86F622FD81E3002D0A72 /* PNFetchChannelsMetadataResult.m in Sources */, + A5567EDC2C209FF7003C974F /* PNPresenceWhereNowFetchData.m in Sources */, + A51B4A3E2BF0B097008C3370 /* PNJSONDecoder.m in Sources */, + A55A86F622FD81E3002D0A72 /* PNFetchChannelMetadataResult.m in Sources */, + A5CFE4DA2C16500F00274165 /* PNSignalData.m in Sources */, A5046EF024784CAB0008C81E /* PNFetchAllUUIDMetadataRequest.m in Sources */, A5046EE224784CAB0008C81E /* PNRemoveMembershipsRequest.m in Sources */, 79A8BC4E1C58F93900015BDE /* PNAES.m in Sources */, - A5A7AFEA234932F30060113B /* PNRemoveMessageActionParser.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -7226,162 +8886,187 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + A53248D52C28D211003510FF /* PNHistoryMessageCountData.m in Sources */, + A5CFE55A2C18D3B600274165 /* PNPresenceStateFetchRequest.m in Sources */, A5046E7724784CAA0008C81E /* PNFetchChannelMetadataAPICallBuilder.m in Sources */, 7951954B26BD44E9001E308C /* PubNub+PAM.m in Sources */, + A5567EC92C207800003C974F /* PNSubscribeCursorData.m in Sources */, + A5CFE50B2C1658E700274165 /* PNHistoryFetchData.m in Sources */, 79A0D87F1DC22F470039A264 /* PNAPICallBuilder.m in Sources */, A57A30BC238DC6B600DE8C68 /* PNAPNSNotificationPayload.m in Sources */, A504E10024AA8AEA006DCF5B /* PNListFilesRequest.m in Sources */, - 79CBB17F1BD03DE4001FC34D /* PNPushNotificationsStateModificationParser.m in Sources */, + A51B4A982BF0B1E3008C3370 /* PNLock.m in Sources */, + A5567F3C2C21E4DF003C974F /* PNUUIDMetadataSetData.m in Sources */, 797ABBAA24C4148C0008CA1E /* PNBasePublishRequest.m in Sources */, A5046E6E24784CAA0008C81E /* PNManageMembershipsAPICallBuilder.m in Sources */, - A5A7AFDE234932F30060113B /* PNAddMessageActionParser.m in Sources */, A5046E8924784CAA0008C81E /* PNFetchChannelMembersRequest.m in Sources */, + A523EEE82BFE910A009F45AA /* PNURLSessionTransport.m in Sources */, 79A238DA1D2E70BD00D080CD /* NSURLSessionConfiguration+PNConfiguration.m in Sources */, + A5567FBE2C221136003C974F /* PNChannelMetadataFetchData.m in Sources */, + A55680F52C242D11003C974F /* PNSignalResult.m in Sources */, 79CBB1301BD03DE4001FC34D /* PNPresenceChannelGroupHereNowResult.m in Sources */, A57A30CC238DC71800DE8C68 /* PNAPNSNotificationConfiguration.m in Sources */, - 79CBB16B1BD03DE4001FC34D /* PNChannelGroupModificationParser.m in Sources */, 79CBB1251BD03DE4001FC34D /* PNChannelGroupClientStateResult.m in Sources */, - 79ABD89B1F01636B007634E0 /* PNTelemetry.m in Sources */, + A5567EAF2C20371C003C974F /* PNPresenceHereNowFetchData.m in Sources */, 79A0D97B1DC231450039A264 /* PNUnsubscribeChannelsOrGroupsAPICallBuilder.m in Sources */, + A5CFE5732C19066C00274165 /* PNHistoryFetchRequest.m in Sources */, 79A0D8FD1DC230550039A264 /* PNPublishAPICallBuilder.m in Sources */, A5A7B0262349330F0060113B /* PNRemoveMessageActionRequest.m in Sources */, 799D60F224C1B33900171C29 /* PNSendFileStatus.m in Sources */, 79CBB1321BD03DE4001FC34D /* PNPresenceChannelHereNowResult.m in Sources */, A5046E7624784CAA0008C81E /* PNRemoveChannelMetadataAPICallBuilder.m in Sources */, + A5CCEC552C0E006000DB02A4 /* PNURLSessionTransportResponse.m in Sources */, A5046E7A24784CAA0008C81E /* PNRemoveUUIDMetadataAPICallBuilder.m in Sources */, - 79CBB17D1BD03DE4001FC34D /* PNPushNotificationsAuditParser.m in Sources */, + A5567ED52C208652003C974F /* PNSubscribeEventData.m in Sources */, 79A0D88B1DC22F620039A264 /* PNAPNSAPICallBuilder.m in Sources */, A55BCD00231D222B0019DB68 /* PNRemoveMessageActionAPICallBuilder.m in Sources */, 797ABBBC24C4408A0008CA1E /* PNPublishFileMessageAPICallBuilder.m in Sources */, 79CBB1341BD03DE4001FC34D /* PNPresenceGlobalHereNowResult.m in Sources */, - 79CBB1691BD03DE4001FC34D /* PNChannelGroupAuditionParser.m in Sources */, + A55681012C242D7C003C974F /* PNMessageActionResult.m in Sources */, + A55680772C2344A9003C974F /* PNFileListFetchData.m in Sources */, A504E1E024B04751006DCF5B /* PNFilesManager.m in Sources */, 79A0D8DF1DC230180039A264 /* PNPresenceChannelHereNowAPICallBuilder.m in Sources */, + A55680B92C238EEB003C974F /* PNSubscribeObjectEventData.m in Sources */, A504E18C24AAA724006DCF5B /* PNDownloadFileAPICallBuilder.m in Sources */, A504E10C24AA8F44006DCF5B /* PNListFilesResult.m in Sources */, A5046E7C24784CAA0008C81E /* PNSetUUIDMetadataAPICallBuilder.m in Sources */, A5046E6F24784CAA0008C81E /* PNFetchMembershipsAPICallBuilder.m in Sources */, A5046E8E24784CAA0008C81E /* PNFetchAllChannelsMetadataRequest.m in Sources */, A5046E8524784CAA0008C81E /* PNFetchMembershipsRequest.m in Sources */, + A556806C2C2311D0003C974F /* PNGenerateFileDownloadURLRequest.m in Sources */, A5046E8824784CAA0008C81E /* PNSetMembershipsRequest.m in Sources */, A5046E8B24784CAA0008C81E /* PNSetChannelMetadataRequest.m in Sources */, + A5CFE5422C18D38600274165 /* PNWhereNowRequest.m in Sources */, + A5567EED2C20A51A003C974F /* PNPresenceHeartbeatRequest.m in Sources */, A5DB71042AAEFE58005B6559 /* PNLegacyCryptor.m in Sources */, 79A0D8E51DC2301E0039A264 /* PNPresenceHereNowAPICallBuilder.m in Sources */, + A53249042C2AC5C1003510FF /* PNChannelGroupsResult.m in Sources */, A5046E7F24784CAA0008C81E /* PNChannelMember.m in Sources */, - A57A3041238D59B500DE8C68 /* PNRemovePushNotificationsRequest.m in Sources */, 79A0D91B1DC2309B0039A264 /* PNStateAPICallBuilder.m in Sources */, A5046E7124784CAA0008C81E /* PNManageChannelMembersAPICallBuilder.m in Sources */, 79A0D93F1DC230DE0039A264 /* PNStreamAPICallBuilder.m in Sources */, A55DAF0424B1FE9E00766EE9 /* PNXML.m in Sources */, A55A873022FD81E3002D0A72 /* PNSetChannelMetadataStatus.m in Sources */, + A5567E4D2C1EDB02003C974F /* PNPushNotificationFetchRequest.m in Sources */, 79CBB1231BD03DE4001FC34D /* PNChannelGroupChannelsResult.m in Sources */, - 79CBB1891BD03DE4001FC34D /* PNNetworkResponseSerializer.m in Sources */, + A5567E7E2C1FCADC003C974F /* PNPushNotificationFetchData.m in Sources */, 79CBB11F1BD03DE4001FC34D /* PNAPNSEnabledChannelsResult.m in Sources */, - A5046E9824784CAA0008C81E /* PNMembershipsParser.m in Sources */, - A57A3033238D59B500DE8C68 /* PNAddPushNotificationsRequest.m in Sources */, - A504E13D24AA9361006DCF5B /* PNListFilesParser.m in Sources */, + A5CFE5662C18E9C600274165 /* PNPresenceHereNowResult.m in Sources */, A504E1BC24AD3219006DCF5B /* PNDeleteFileRequest.m in Sources */, 79A0D9031DC2305A0039A264 /* PNPublishSizeAPICallBuilder.m in Sources */, 79A0D9751DC231400039A264 /* PNUnsubscribeAPICallBuilder.m in Sources */, - A55DAEF824B1FE7600766EE9 /* PNXMLParser.m in Sources */, + A5CFE5362C18D33500274165 /* PNHereNowRequest.m in Sources */, + A55680892C23527D003C974F /* PNFileDownloadData.m in Sources */, 79CBB1211BD03DE4001FC34D /* PNChannelClientStateResult.m in Sources */, - 79CBB1291BD03DE4001FC34D /* PNClientStateUpdateStatus.m in Sources */, 79CBB1361BD03DE4001FC34D /* PNPresenceWhereNowResult.m in Sources */, - 79CBB17B1BD03DE4001FC34D /* PNPresenceWhereNowParser.m in Sources */, - 79CBB1791BD03DE4001FC34D /* PNPresenceHereNowParser.m in Sources */, - 79CBB1771BD03DE4001FC34D /* PNMessagePublishParser.m in Sources */, - A504E12424AA8FBF006DCF5B /* PNGenerateFileUploadURLStatus.m in Sources */, + A5567FD22C2213AF003C974F /* PNFetchAllChannelsMetadataResult.m in Sources */, 79CBB11D1BD03DE4001FC34D /* PNAcknowledgmentStatus.m in Sources */, 79A0D9881DC2315E0039A264 /* PNTimeAPICallBuilder.m in Sources */, A5FADC3C2490270E001D7704 /* PubNub+Files.m in Sources */, A5046E9324784CAA0008C81E /* PNObjectsPaginatedRequest.m in Sources */, - 79CBB1271BD03DE4001FC34D /* PNChannelGroupsResult.m in Sources */, + A5CFE5172C1892AD00274165 /* PNPushNotificationManageRequest.m in Sources */, A5046E7824784CAA0008C81E /* PNSetChannelMetadataAPICallBuilder.m in Sources */, 79E20D1F1C8AEC52001BC9CC /* PNEnvelopeInformation.m in Sources */, A504E17424AAA70A006DCF5B /* PNListFilesAPICallBuilder.m in Sources */, A57A3093238D751400DE8C68 /* PNMPNSNotificationPayload.m in Sources */, + A5567E382C1EB4ED003C974F /* PNTimeRequest.m in Sources */, 7925DB9F1D3FFCAC00857C0D /* PNLLogFileInformation.m in Sources */, + A5567E652C1F8C53003C974F /* PNOperationDataParser.m in Sources */, + A5CFE4762C14A90900274165 /* NSError+PNTransport.m in Sources */, + A5CFE4452C11E8D500274165 /* PNChannelGroupManageRequest.m in Sources */, 79A0D8971DC22F7E0039A264 /* PNAPNSAuditAPICallBuilder.m in Sources */, A5046E6D24784CAA0008C81E /* PNRemoveMembershipsAPICallBuilder.m in Sources */, - 79CBB1431BD03DE4001FC34D /* PNSubscriberResults.m in Sources */, + A51B4A362BF0AFB8008C3370 /* PNJSONSerialization.m in Sources */, + A55680D12C2400B3003C974F /* PNSubscribePresenceEventData.m in Sources */, 793248681D874D9F00FBDF36 /* PNPublishSequence.m in Sources */, 79CBB1181BD03DE4001FC34D /* PNClientInformation.m in Sources */, + A5567FCA2C221231003C974F /* PNChannelMetadataSetData.m in Sources */, A57A30A3238D784A00DE8C68 /* PNBaseNotificationPayload.m in Sources */, A5FADC492490292A001D7704 /* PNSendFileRequest.m in Sources */, - 79CBB18D1BD03DE4001FC34D /* PNRequestParameters.m in Sources */, A5DB713B2AAEFE58005B6559 /* PNCryptorHeaderV1Data.m in Sources */, A5046E8124784CAA0008C81E /* PNUUIDMetadata.m in Sources */, A5046E8A24784CAA0008C81E /* PNSetChannelMembersRequest.m in Sources */, A55A86EA22FD81E3002D0A72 /* PNFetchUUIDMetadataResult.m in Sources */, - 79CBB16D1BD03DE4001FC34D /* PNClientStateParser.m in Sources */, A5046E7B24784CAA0008C81E /* PNFetchUUIDMetadataAPICallBuilder.m in Sources */, - 79CD275D24D6A1CB000698DD /* PNDataStorage.m in Sources */, + A55680312C2294EE003C974F /* PNGenerateFileUploadURLStatus.m in Sources */, A5DB712C2AAEFE58005B6559 /* PNCryptoModule.m in Sources */, 79CBB0FB1BD03DE4001FC34D /* PubNub+ChannelGroup.m in Sources */, A56BBFCA2AB900B600260D83 /* NSInputStream+PNURL.m in Sources */, + A5567F602C21EBDF003C974F /* PNPagedAppContextData.m in Sources */, A5046E8D24784CAA0008C81E /* PNFetchChannelMetadataRequest.m in Sources */, - 79CBB1831BD03DE4001FC34D /* PNSubscribeParser.m in Sources */, - 79CBB1711BD03DE4001FC34D /* PNHeartbeatParser.m in Sources */, A55BCCAC2319243F0019DB68 /* PNAddMessageActionStatus.m in Sources */, + A53248E82C28E3AB003510FF /* PNXMLParser.m in Sources */, + A5CB33DC2C0C70B2008527AA /* PNTransportMiddleware.m in Sources */, + A55680A12C2385BC003C974F /* PNSubscribeMessageEventData.m in Sources */, A5046E8624784CAA0008C81E /* PNManageChannelMembersRequest.m in Sources */, 799D611D24C391A100171C29 /* PNPublishFileMessageRequest.m in Sources */, 79CBB1451BD03DE4001FC34D /* PNSubscribeStatus.m in Sources */, + A5CFE4632C123F2E00274165 /* PNBaseOperationData.m in Sources */, 79CBB1091BD03DE4001FC34D /* PubNub+Subscribe.m in Sources */, 7960B66D1F68123300FFAEBB /* PNDeleteMessageAPICallBuilder.m in Sources */, - 79CBB1731BD03DE4001FC34D /* PNHistoryParser.m in Sources */, + A53248DB2C28D3BC003510FF /* PNMembershipsFetchData.m in Sources */, A5DB71222AAEFE58005B6559 /* PNEncryptedStream.m in Sources */, 79CBB1381BD03DE4001FC34D /* PNPublishStatus.m in Sources */, 79A0D8D31DC2300F0039A264 /* PNPresenceAPICallBuilder.m in Sources */, + A5567E712C1FBE44003C974F /* PubNub+Deprecated.m in Sources */, A5046E7324784CAA0008C81E /* PNFetchChannelMembersAPICallBuilder.m in Sources */, + A5567EA22C20243C003C974F /* PNMessageActionFetchData.m in Sources */, 79A0D8AF1DC22FB50039A264 /* PNHistoryAPICallBuilder.m in Sources */, + A51B4A5A2BF0B0CB008C3370 /* PNJSONCoder.m in Sources */, A5ADD62E2AC0CE8100310A08 /* NSInputStream+PNCrypto.m in Sources */, 79CBB1121BD03DE4001FC34D /* PNStateListener.m in Sources */, + A5567F8A2C21F31E003C974F /* PNChannelMetadataFetchAllData.m in Sources */, 79F90F241FDEC1DE007132A3 /* PNPresenceHeartbeatAPICallBuilder.m in Sources */, 79CFA2C126DE1C4900D206D4 /* PNPAMToken.m in Sources */, - 797ABBD424C6E8650008CA1E /* PNDeleteFileParser.m in Sources */, - A5046E9A24784CAA0008C81E /* PNFetchUUIDMetadataParser.m in Sources */, + A51B4A682BF0B117008C3370 /* PNJSONCodableObjects.m in Sources */, A5DB709C2AAE778F005B6559 /* PNSequenceInputStream.m in Sources */, + A5CFE5A42C1933BD00274165 /* PNPresenceLeaveRequest.m in Sources */, A504E14924AA94C8006DCF5B /* PNFile.m in Sources */, + A5567F242C21D53D003C974F /* PNChannelMembersManageData.m in Sources */, 799D610B24C36D5B00171C29 /* PNPublishRequest.m in Sources */, + A55681252C242EE6003C974F /* PNPresenceEventResult.m in Sources */, 79CBB1021BD03DE4001FC34D /* PubNub+Presence.m in Sources */, + A5567E592C1F0484003C974F /* PNSignalRequest.m in Sources */, A5046E7924784CAA0008C81E /* PNFetchAllUUIDMetadataAPICallBuilder.m in Sources */, 79CBB12E1BD03DE4001FC34D /* PNHistoryResult.m in Sources */, A52DC1F02307E10B001F20B0 /* NSDateFormatter+PNCacheable.m in Sources */, A5046E8724784CAA0008C81E /* PNRemoveChannelMembersRequest.m in Sources */, - A5A7AFC9234932F30060113B /* PNFetchMessagesActionsParser.m in Sources */, A57A302C238D59B500DE8C68 /* PNBasePushNotificationsRequest.m in Sources */, A58975BC23005AAC0093BD9A /* PNManageMembershipsStatus.m in Sources */, + A5CFE4152C0F246400274165 /* PNBaseRequest.m in Sources */, + A51B4A802BF0B14D008C3370 /* NSDateFormatter+PNJSONCodable.m in Sources */, A504E13024AA90B8006DCF5B /* PNDownloadFileResult.m in Sources */, A56865932300729E0014E17C /* PNFetchChannelMembersResult.m in Sources */, A5046E7424784CAA0008C81E /* PNSetChannelMembersAPICallBuilder.m in Sources */, A55BCCF0231D21840019DB68 /* PNAddMessageActionAPICallBuilder.m in Sources */, - A55A877622FD8272002D0A72 /* PNRequest.m in Sources */, - A5046E9624784CAA0008C81E /* PNUUIDMetadataChangeParser.m in Sources */, + A5CFE57F2C191B8100274165 /* PNHistoryMessagesDeleteRequest.m in Sources */, A5DB71272AAEFE58005B6559 /* PNEncryptedData.m in Sources */, A5DB70FF2AAEFE58005B6559 /* PNAESCBCCryptor.m in Sources */, - A5046E9924784CAA0008C81E /* PNFetchChannelsMetadataParser.m in Sources */, + A53248CF2C28A426003510FF /* PNHistoryMessagesCountRequest.m in Sources */, + A5CB33B12C035D7D008527AA /* PNTransportRequest.m in Sources */, A57A3063238D65A200DE8C68 /* PNNotificationsPayload.m in Sources */, 79CBB11B1BD03DE4001FC34D /* PNConfiguration.m in Sources */, A55A870D22FD81E3002D0A72 /* PNSetUUIDMetadataStatus.m in Sources */, + A55680242C226866003C974F /* PNPresenceUserStateSetData.m in Sources */, A5046E7224784CAA0008C81E /* PNSetMembershipsAPICallBuilder.m in Sources */, A504E15C24AA9CFB006DCF5B /* PNFilesAPICallBuilder.m in Sources */, 79A0D9691DC231360039A264 /* PNSubscribeAPIBuilder.m in Sources */, 79CBB1051BD03DE4001FC34D /* PubNub+Publish.m in Sources */, 79A0D94B1DC230E90039A264 /* PNStreamModificationAPICallBuilder.m in Sources */, - A57A3048238D59B500DE8C68 /* PNAuditPushNotificationsRequest.m in Sources */, A5A7B00A2349330F0060113B /* PNBaseMessageActionRequest.m in Sources */, 79CBB1001BD03DE4001FC34D /* PubNub+History.m in Sources */, + A5567E962C1FDEF7003C974F /* PNMessageActionsFetchData.m in Sources */, 79CBB18B1BD03DE4001FC34D /* PNReachability.m in Sources */, - 79CBB1751BD03DE4001FC34D /* PNLeaveParser.m in Sources */, + A51B4A8C2BF0B197008C3370 /* PNFunctions.m in Sources */, A5046E8C24784CAA0008C81E /* PNRemoveChannelMetadataRequest.m in Sources */, A57A30E4238DC87400DE8C68 /* PNAPNSNotificationTarget.m in Sources */, + A51B4A742BF0B136008C3370 /* NSNumberFormatter+PNJSONCodable.m in Sources */, 79A0D9271DC230A30039A264 /* PNStateModificationAPICallBuilder.m in Sources */, - 79CBB16F1BD03DE4001FC34D /* PNErrorParser.m in Sources */, + A55680C52C23A8CD003C974F /* PNSubscribeSignalEventData.m in Sources */, 79CBB13E1BD03DE4001FC34D /* PNServiceData.m in Sources */, - 79CD276F24D75342000698DD /* PNKeychainStorage.m in Sources */, 79CBB12C1BD03DE4001FC34D /* PNErrorStatus.m in Sources */, + A5567FE32C221A20003C974F /* PNFetchAllUUIDMetadataResult.m in Sources */, 79CBB10E1BD03DE4001FC34D /* PNClientState.m in Sources */, - 79CBB1851BD03DE4001FC34D /* PNTimeParser.m in Sources */, 79A0D8D91DC230140039A264 /* PNPresenceChannelGroupHereNowAPICallBuilder.m in Sources */, 79CBB1511BD03DE4001FC34D /* PNDictionary.m in Sources */, 79CBB1471BD03DE4001FC34D /* PNTimeResult.m in Sources */, @@ -7391,61 +9076,79 @@ A5105B5A238F027D00CB693D /* PNDate.m in Sources */, 79CBB1141BD03DE4001FC34D /* PNSubscriber.m in Sources */, 79CBB1071BD03DE4001FC34D /* PubNub+State.m in Sources */, + A556803C2C229587003C974F /* PNFileGenerateUploadURLData.m in Sources */, A55BCD10231D22400019DB68 /* PNFetchMessagesActionsAPICallBuilder.m in Sources */, A5046E7024784CAA0008C81E /* PNRemoveChannelMembersAPICallBuilder.m in Sources */, A57A3073238D6BCC00DE8C68 /* PNFCMNotificationPayload.m in Sources */, A5046E8F24784CAA0008C81E /* PNSetUUIDMetadataRequest.m in Sources */, - 79CBB18F1BD03DE4001FC34D /* PNURLBuilder.m in Sources */, A5046E9124784CAA0008C81E /* PNFetchUUIDMetadataRequest.m in Sources */, 79CBB15A1BD03DE4001FC34D /* PNURLRequest.m in Sources */, A5046E8224784CAA0008C81E /* PNBaseObjectsMembershipRequest.m in Sources */, + A5CB33E82C0C7237008527AA /* PNTransportMiddlewareConfiguration.m in Sources */, 79CBB1101BD03DE4001FC34D /* PNHeartbeat.m in Sources */, + A5567E462C1ECC59003C974F /* PNPresenceStateFetchResult.m in Sources */, + A5567EBD2C2077AE003C974F /* PNSubscribeData.m in Sources */, + A5CFE5982C192ECA00274165 /* PNSubscribeRequest.m in Sources */, A55A85DB22FD8078002D0A72 /* PubNub+Objects.m in Sources */, + A5CFE4F72C16528700274165 /* PNTimeData.m in Sources */, + A5567F722C21F0EA003C974F /* PNUUIDMetadataFetchData.m in Sources */, A5686583230072810014E17C /* PNManageChannelMembersStatus.m in Sources */, - A5046E9524784CAA0008C81E /* PNChannelMetadataChangeParser.m in Sources */, + A51B4A4E2BF0B0B0008C3370 /* PNJSONEncoder.m in Sources */, 79A0D8A31DC22F930039A264 /* PNAPNSModificationAPICallBuilder.m in Sources */, A586A9E82337E581008856D2 /* PNFetchMessageActionsResult.m in Sources */, 79CBB10C1BD03DE4001FC34D /* PubNub+Time.m in Sources */, + A5CFE54E2C18D3A700274165 /* PNPresenceStateSetRequest.m in Sources */, A504E1B024AD3209006DCF5B /* PNDownloadFileRequest.m in Sources */, A504E16824AAA6FE006DCF5B /* PNSendFileAPICallBuilder.m in Sources */, + A55680DD2C2428E8003C974F /* PNSubscribeFileEventData.m in Sources */, A50319DE2AA65EB400B25A44 /* NSArray+PNMap.m in Sources */, + A55680002C225146003C974F /* PNPresenceUserStateFetchData.m in Sources */, + A5567F9F2C220E32003C974F /* PNFetchMembershipsResult.m in Sources */, + A5567F302C21DB10003C974F /* PNMembershipsManageData.m in Sources */, 79A3E40B2215699900F2ADB9 /* PNMessageCountAPICallBuilder.m in Sources */, 79A0D9451DC230E30039A264 /* PNStreamAuditAPICallBuilder.m in Sources */, 79CBB0FD1BD03DE4001FC34D /* PubNub+Core.m in Sources */, 797D606D22D2E44000E64C94 /* PNSignalStatus.m in Sources */, + A5567FB32C22107D003C974F /* PNClientStateUpdateStatus.m in Sources */, A5046E9424784CAA0008C81E /* PNBaseObjectsRequest.m in Sources */, A504E19824AAA72E006DCF5B /* PNDeleteFileAPICallBuilder.m in Sources */, A50319BA2AA5B05900B25A44 /* PNResult.m in Sources */, 79CBB0F91BD03DE4001FC34D /* PubNub+APNS.m in Sources */, - 79E2D0F61C56434700BAA244 /* PNKeychain.m in Sources */, - 79CBB1871BD03DE4001FC34D /* PNNetwork.m in Sources */, + A5CFE4C02C1647B000274165 /* PNPublishData.m in Sources */, A5046E8324784CAA0008C81E /* PNManageMembershipsRequest.m in Sources */, 79A3E422221569BA00F2ADB9 /* PNMessageCountResult.m in Sources */, A504E1A424ACCA42006DCF5B /* PNFileDownloadURLAPICallBuilder.m in Sources */, 79CBB14B1BD03DE4001FC34D /* PNChannel.m in Sources */, + A5567F7E2C21F203003C974F /* PNUUIDMetadataFetchAllData.m in Sources */, + A55680482C229D8D003C974F /* PNFileSendData.m in Sources */, 797D606422D2E41100E64C94 /* PNSignalAPICallBuilder.m in Sources */, 7925DB911D3FFCAC00857C0D /* PNLLogger.m in Sources */, 793887091BEAD4E100DCC662 /* PNNumber.m in Sources */, + A5CB33CF2C046A1A008527AA /* PNTransportConfiguration.m in Sources */, A55BCD20231D26110019DB68 /* PNMessageAction.m in Sources */, - 79A3E432221569DA00F2ADB9 /* PNMessageCountParser.m in Sources */, + A5CFE5C32C1AAAAD00274165 /* PNErrorData.m in Sources */, A5A7B01F2349330F0060113B /* PNFetchMessageActionsRequest.m in Sources */, + A55681192C242E96003C974F /* PNFileEventResult.m in Sources */, 79F857FC219640A300BFD0B1 /* PNClientStateGetResult.m in Sources */, + A5567F482C21E723003C974F /* PNChannelMembersFetchData.m in Sources */, + A51B4AB12BF37F03008C3370 /* PNChannelGroupFetchRequest.m in Sources */, 79CBB1581BD03DE4001FC34D /* PNString.m in Sources */, - 79CD277B24D75AE9000698DD /* PNInMemoryStorage.m in Sources */, - A57A3017238D59B500DE8C68 /* PNRemoveAllPushNotificationsRequest.m in Sources */, + A51B4AA42BF0B428008C3370 /* PNError.m in Sources */, 79A0D9211DC2309F0039A264 /* PNStateAuditAPICallBuilder.m in Sources */, - A504E1D424AE7B5F006DCF5B /* PNGenerateFileUploadURLParser.m in Sources */, + A5567E862C1FCF0F003C974F /* PNChannelGroupFetchData.m in Sources */, + A556810D2C242E09003C974F /* PNObjectEventResult.m in Sources */, 79CBB1411BD03DE4001FC34D /* PNStatus.m in Sources */, 79650C3D1E775EA100006F66 /* PNLockSupport.m in Sources */, 79CFA2B526DE0AEB00D206D4 /* PNCBORDecoder.m in Sources */, + A55680E92C242BFF003C974F /* PNMessageResult.m in Sources */, 79CBB13B1BD03DE4001FC34D /* PNOperationResult.m in Sources */, A5046E7D24784CAA0008C81E /* PNObjectsAPICallBuilder.m in Sources */, - A56865732300709F0014E17C /* PNFetchMembershipsResult.m in Sources */, + A5567F112C219757003C974F /* PNBaseAppContextObject.m in Sources */, A56FAEFC233161570072ADD6 /* PubNub+MessageActions.m in Sources */, + A556805A2C22BE6D003C974F /* PNFileUploadRequest.m in Sources */, A5DB70FA2AAEFE58005B6559 /* PNCCCryptorWrapper.m in Sources */, A5DB71312AAEFE58005B6559 /* PNCryptorInputStream.m in Sources */, 79A0D9711DC2313C0039A264 /* PNSubscribeChannelsOrGroupsAPIBuilder.m in Sources */, - A5046E9724784CAA0008C81E /* PNObjectsRemoveParser.m in Sources */, A5046E9024784CAA0008C81E /* PNRemoveUUIDMetadataRequest.m in Sources */, A5046E7E24784CAA0008C81E /* PNMembership.m in Sources */, 79CBB1491BD03DE4001FC34D /* PNArray.m in Sources */, @@ -7453,15 +9156,17 @@ A5E3BA152B3118BE00D3AA18 /* PNRequestRetryConfiguration.m in Sources */, 79CBB1531BD03DE4001FC34D /* PNGZIP.m in Sources */, A5046E7524784CAA0008C81E /* PNFetchAllChannelsMetadataAPICallBuilder.m in Sources */, + A55680AD2C23880C003C974F /* PNSubscribeMessageActionEventData.m in Sources */, 79CBB14F1BD03DE4001FC34D /* PNData.m in Sources */, A5A7B0182349330F0060113B /* PNAddMessageActionRequest.m in Sources */, - A5046E9B24784CAA0008C81E /* PNChannelMembersParser.m in Sources */, A504E1C324AE78E4006DCF5B /* PNGenerateFileUploadURLRequest.m in Sources */, - A55A86F822FD81E3002D0A72 /* PNFetchChannelsMetadataResult.m in Sources */, + A5567EE12C209FF7003C974F /* PNPresenceWhereNowFetchData.m in Sources */, + A51B4A422BF0B097008C3370 /* PNJSONDecoder.m in Sources */, + A55A86F822FD81E3002D0A72 /* PNFetchChannelMetadataResult.m in Sources */, + A5CFE4DE2C16500F00274165 /* PNSignalData.m in Sources */, A5046E9224784CAA0008C81E /* PNFetchAllUUIDMetadataRequest.m in Sources */, A5046E8424784CAA0008C81E /* PNRemoveMembershipsRequest.m in Sources */, 79CBB1161BD03DE4001FC34D /* PNAES.m in Sources */, - A5A7AFEC234932F30060113B /* PNRemoveMessageActionParser.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -7556,6 +9261,7 @@ OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = "com.pubnub.pubnub-objc"; PRODUCT_NAME = PubNub; + RUN_DOCUMENTATION_COMPILER = YES; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; SWIFT_VERSION = 3.0; @@ -7593,6 +9299,7 @@ OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = "com.pubnub.pubnub-objc"; PRODUCT_NAME = PubNub; + RUN_DOCUMENTATION_COMPILER = YES; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; SWIFT_VERSION = 3.0; @@ -7631,6 +9338,7 @@ SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "watchsimulator watchos"; TARGETED_DEVICE_FAMILY = 4; + TARGET_IS_EXTENSION = 1; TVOS_DEPLOYMENT_TARGET = 14.0; WATCHOS_DEPLOYMENT_TARGET = 7.0; }; @@ -7666,6 +9374,7 @@ SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "watchsimulator watchos"; TARGETED_DEVICE_FAMILY = 4; + TARGET_IS_EXTENSION = 1; TVOS_DEPLOYMENT_TARGET = 14.0; WATCHOS_DEPLOYMENT_TARGET = 7.0; }; @@ -7934,6 +9643,7 @@ MACOSX_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + RUN_DOCUMENTATION_COMPILER = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 14.0; @@ -7991,6 +9701,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 14.0; MACOSX_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; + RUN_DOCUMENTATION_COMPILER = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 14.0; diff --git a/Framework/PubNub/Info.plist b/Framework/PubNub/Info.plist index c95176340..9eb76a905 100644 --- a/Framework/PubNub/Info.plist +++ b/Framework/PubNub/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable PubNub CFBundleGetInfoString - 5.5.0 + 5.6.0 CFBundleIdentifier com.pubnub.pubnub-objc CFBundleInfoDictionaryVersion @@ -17,11 +17,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 5.5.0 + 5.6.0 CFBundleSignature ???? CFBundleVersion - 5.5.0 + 5.6.0 NSHumanReadableCopyright © 2010 - 2020 PubNub, Inc. NSPrincipalClass diff --git a/Framework/PubNub/PubNub-iOS-Info.plist b/Framework/PubNub/PubNub-iOS-Info.plist index c95176340..9eb76a905 100644 --- a/Framework/PubNub/PubNub-iOS-Info.plist +++ b/Framework/PubNub/PubNub-iOS-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable PubNub CFBundleGetInfoString - 5.5.0 + 5.6.0 CFBundleIdentifier com.pubnub.pubnub-objc CFBundleInfoDictionaryVersion @@ -17,11 +17,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 5.5.0 + 5.6.0 CFBundleSignature ???? CFBundleVersion - 5.5.0 + 5.6.0 NSHumanReadableCopyright © 2010 - 2020 PubNub, Inc. NSPrincipalClass diff --git a/Framework/PubNub/PubNub-tvOS-Info.plist b/Framework/PubNub/PubNub-tvOS-Info.plist index c95176340..9eb76a905 100644 --- a/Framework/PubNub/PubNub-tvOS-Info.plist +++ b/Framework/PubNub/PubNub-tvOS-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable PubNub CFBundleGetInfoString - 5.5.0 + 5.6.0 CFBundleIdentifier com.pubnub.pubnub-objc CFBundleInfoDictionaryVersion @@ -17,11 +17,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 5.5.0 + 5.6.0 CFBundleSignature ???? CFBundleVersion - 5.5.0 + 5.6.0 NSHumanReadableCopyright © 2010 - 2020 PubNub, Inc. NSPrincipalClass diff --git a/Framework/PubNub/PubNub-watchOS-Info.plist b/Framework/PubNub/PubNub-watchOS-Info.plist index c95176340..9eb76a905 100644 --- a/Framework/PubNub/PubNub-watchOS-Info.plist +++ b/Framework/PubNub/PubNub-watchOS-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable PubNub CFBundleGetInfoString - 5.5.0 + 5.6.0 CFBundleIdentifier com.pubnub.pubnub-objc CFBundleInfoDictionaryVersion @@ -17,11 +17,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 5.5.0 + 5.6.0 CFBundleSignature ???? CFBundleVersion - 5.5.0 + 5.6.0 NSHumanReadableCopyright © 2010 - 2020 PubNub, Inc. NSPrincipalClass diff --git a/Framework/PubNub/PubNub.h b/Framework/PubNub/PubNub.h index 0b3dabcb1..78d398142 100644 --- a/Framework/PubNub/PubNub.h +++ b/Framework/PubNub/PubNub.h @@ -14,67 +14,58 @@ FOUNDATION_EXPORT double PubNubVersionNumber; FOUNDATION_EXPORT const unsigned char PubNubVersionString[]; -// Protocols -#import +#pragma mark - Categories // Categories #import -// Data objects -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import + +#pragma mark - Data types #import #import +#import +#import -#pragma mark - Cryptor module -// Cryptor implementations -#import -#import +#pragma mark - Base modules + +#import +#import + + +#pragma mark - Transport module + +#import +#import +#import -// Protocols -#import -#import -// Module +#pragma mark - Cryptor module + +// Cryptor implementations #import #import +#import +#import #import #import +#pragma mark - Shared protocols + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + #pragma mark - API // API @@ -89,7 +80,6 @@ FOUNDATION_EXPORT const unsigned char PubNubVersionString[]; #import #import #import -#import #import #import #import @@ -97,3 +87,8 @@ FOUNDATION_EXPORT const unsigned char PubNubVersionString[]; #import #import #import + + +#pragma mark - Errors + +#import diff --git a/Framework/scripts/export_for_spm.sh b/Framework/scripts/export_for_spm.sh index 728712e28..9ad427924 100755 --- a/Framework/scripts/export_for_spm.sh +++ b/Framework/scripts/export_for_spm.sh @@ -45,7 +45,7 @@ store_public_header() { # Function allow to retrieve list of headers which has been imported in file # and add them to public list of headers gather_imported_headers_in_file() { - regex="import \"(.*)\"" + regex="import " while IFS='' read -r line; do [[ -z "$line" || ! "$line" =~ $regex ]] && continue imported_header_path="$(path_for_file "${BASH_REMATCH[1]}")" diff --git a/PubNub.podspec b/PubNub.podspec index e59be2853..7aedc894d 100644 --- a/PubNub.podspec +++ b/PubNub.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |spec| spec.name = 'PubNub' - spec.version = '5.5.0' + spec.version = '5.6.0' spec.summary = 'The PubNub Real-Time Network. Build real-time apps quickly and scale them globally.' spec.homepage = 'https://github.com/pubnub/objective-c' @@ -31,23 +31,30 @@ Pod::Spec.new do |spec| spec.resource_bundles = { "PubNub" => ["Framework/PubNub/PrivacyInfo.xcprivacy"]} spec.subspec 'Core' do |core| - core.source_files = 'PubNub/{Core,Data,Modules,Misc,Network}/**/*', 'PubNub/PubNub.h' + core.source_files = 'PubNub/{Core,Data,Modules,Misc,Network,Protocols}/**/*', 'PubNub/PubNub.h' core.private_header_files = [ 'PubNub/**/*Private.h', - 'PubNub/Data/{PNEnvelopeInformation}.h', + 'PubNub/PubNub+Deprecated.h', + 'PubNub/Data/PNEnvelopeInformation.h', 'PubNub/Data/Managers/**/*.h', 'PubNub/Data/Models/PNXML.h', - 'PubNub/Data/Service Objects/PNGenerateFileUploadURLStatus.h', + 'PubNub/Data/Service Objects/File Sharing/PNGenerateFileUploadURLStatus.h', + 'PubNub/Data/Transport/{PNTransportMiddleware.h,PNTransportMiddlewareConfiguration.h}', 'PubNub/Misc/{PNConstants,PNPrivateStructures}.h', 'PubNub/Misc/Helpers/{PNArray,PNChannel,PNData,PNDate,PNDictionary,PNGZIP,PNHelpers,PNJSON,PNLockSupport,PNNumber,PNString,PNURLRequest}.h', 'PubNub/Misc/Logger/PNLogMacro.h', 'PubNub/Misc/Logger/Data/*.h', 'PubNub/Misc/Protocols/{PNKeyValueStorageProtocol,PNParser}.h', + "PubNub/Modules/Transport/{PNURLSessionTransportResponse,PNURLSessionTransport}.h", + "PubNub/Modules/Serializer/Object/{Categories,Models}/*.h", + "PubNub/Modules/Serializer/Object/{PNJSONDecoder,PNJSONEncoder}.h", "PubNub/Modules/Crypto/Cryptors/AES/PNCCCryptorWrapper.h", "PubNub/Modules/Crypto/Header/*.h", - 'PubNub/Network/{PNNetwork,PNNetworkResponseSerializer,PNReachability,PNRequestParameters,PNURLBuilder}.h', + 'PubNub/Network/PNReachability.h', 'PubNub/Network/Requests/Files/PNGenerateFileUploadURLRequest.h', - 'PubNub/Network/Parsers/**/*.h' + 'PubNub/Network/Parsers/**/*.h', + 'PubNub/Network/Streams/*.h', + 'PubNub/Protocols/PNRequest.h', ] core.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' } end diff --git a/PubNub/Core/PubNub+APNS.h b/PubNub/Core/PubNub+APNS.h index 0845f669c..99abd3fec 100644 --- a/PubNub/Core/PubNub+APNS.h +++ b/PubNub/Core/PubNub+APNS.h @@ -1,489 +1,538 @@ -#import -#import -#import -#import -#import -#import -#import -#import -#import #import +// Request +#import +#import -#pragma mark Class forward +// Response +#import +#import -@class PNAPNSEnabledChannelsResult, PNAcknowledgmentStatus, PNErrorStatus; +// Deprecated +#import +#import +#import NS_ASSUME_NONNULL_BEGIN -#pragma mark - API group interface - -/** - * @brief \b PubNub client core class extension to provide access to 'APNS' API group. - * - * @discussion Set of API which allow to manage push notifications on separate channels. If push - * notifications has been enabled on channels, then device will start receiving notifications while - * device inactive. - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ +#pragma mark Interface implementation + +/// **PubNub** `Push Notification` APIs. +/// +/// A set of APIs which allow fetching and managing a list of channels with push notifications enabled for the device. @interface PubNub (APNS) -#pragma mark - API builder support +#pragma mark - Push notification API builder interdace (deprecated) -/** - * @brief Push notification API access builder. - * - * @return API call configuration builder. - * - * @since 4.5.4 - */ -@property (nonatomic, readonly, strong) PNAPNSAPICallBuilder * (^push)(void); +/// Push notification API access builder. +@property (nonatomic, readonly, strong) PNAPNSAPICallBuilder * (^push)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); #pragma mark - Push notifications state manipulation -/** - * @brief Enabled push notifications on provided set of \c channels. - * - * @code - * [self.client addPushNotificationsOnChannels:@[@"wwdc",@"google.io"] - * withDevicePushToken:self.devicePushToken - * andCompletion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Push notifications successful enabled on passed channels. - * } else { - * // Handle modification error. Check 'category' property to find out possible issue because - * // of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channels List of channel names for which push notifications should be enabled. - * @param pushToken Device push token which should be used to enabled push notifications on - * specified set of channels. - * @param block Push notifications addition on channels completion block. - * - * @since 4.0 - */ +/// Manage notifications for device. +/// +/// Depending from used request it is possible to change channel notifications avaiability for device or disable all +/// notifications for device. +/// +/// #### Examples: +/// ##### Enable notification for channels: +/// ```objc +/// NSData *deviceToken = [NSData new]; // For FCM it should be string token. +/// NSArray *channels = @[@"channel-a", @"channel-b"]; +/// PNPushNotificationManageRequest *request = [PNPushNotificationManageRequest requestToAddChannels:channels +/// toDeviceWithToken:deviceToken +/// pushType:PNAPNS2Push]; +/// +/// [self.client managePushNotificationWithRequest:request completion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Push notifications successful enabled on passed channels. +/// } else { +/// // Handle modification error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// } +/// }]; +/// ``` +/// +/// ##### Disable notification for channels: +/// ```objc +/// NSData *deviceToken = [NSData new]; // For FCM it should be string token. +/// NSArray *channels = @[@"channel-a", @"channel-b"]; +/// PNPushNotificationManageRequest *request = [PNPushNotificationManageRequest requestToRemoveChannels:channels +/// fromDeviceWithToken:deviceToken +/// pushType:PNAPNS2Push]; +/// +/// [self.client managePushNotificationWithRequest:request completion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Push notification successfully disabled on passed channels. +/// } else { +/// // Handle modification error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// } +/// }]; +/// ``` +/// +/// ##### Disable device notifications: +/// ```objc +/// NSData *deviceToken = [NSData new]; // For FCM it should be string token. +/// NSArray *channels = @[@"channel-a", @"channel-b"]; +/// PNPushNotificationManageRequest *request = [PNPushNotificationManageRequest requestToRemoveDeviceWithToken:deviceToken +/// pushType:PNAPNS2Push]; +/// +/// [self.client managePushNotificationWithRequest:request completion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Push notification successfully disabled for all channels associated with specified device push token. +/// } else { +/// // Handle modification error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to manage push notification enabled channels for device. +/// - block: Push notification enabled channels modification request completion block. +- (void)managePushNotificationWithRequest:(PNPushNotificationManageRequest *)request + completion:(nullable PNPushNotificationsStateModificationCompletionBlock)block + NS_SWIFT_NAME(managePushNotificationWithRequest(_:completion:)); + +/// Enabled push notifications on provided set of `channels`. +/// +/// #### Example: +/// ```objc +/// [self.client addPushNotificationsOnChannels:@[@"wwdc",@"google.io"] +/// withDevicePushToken:self.devicePushToken +/// andCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Push notifications successful enabled on passed channels. +/// } else { +/// // Handle modification error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names for which push notifications should be enabled. +/// - pushToken: Device push token which should be used to enabled push notifications on specified set of channels. +/// - block: Push notifications addition on channels completion block. - (void)addPushNotificationsOnChannels:(NSArray *)channels - withDevicePushToken:(NSData *)pushToken - andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block - NS_SWIFT_NAME(addPushNotificationsOnChannels(_:withDevicePushToken:andCompletion:)); - -/** - * @brief Enable push notifications (sent using legacy APNs, FCM or MPNS) on provided set of - * \c channels. - * - * @code - * [self.client addPushNotificationsOnChannels:@[@"wwdc",@"google.io"] - * withDevicePushToken:self.devicePushToken - * pushType:PNAPNSPush - * andCompletion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Push notifications successful enabled on passed channels. - * } else { - * // Handle modification error. Check 'category' property to find out possible issue because - * // of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channels List of channel names for which push notifications should be enabled. - * @param pushToken Device token / identifier which depending from passed \c pushType should be - * \a NSData (for \b PNAPNS2Push and \b PNAPNSPush) or \a NSString for other. - * @param pushType One of \b PNPushType fields which specify service to manage notifications for - * device specified with \c pushToken. - * @param block \c Add \c notifications \c for \c channels request completion block. - * - * @since 4.12.0 - */ + withDevicePushToken:(NSData *)pushToken + andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block + NS_SWIFT_NAME(addPushNotificationsOnChannels(_:withDevicePushToken:andCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-managePushNotificationWithRequest:completion:' method instead."); + +/// Enable push notifications (sent using legacy APNs, FCM or MPNS) on provided set of `channels`. +/// +/// #### Example: +/// ```objc +/// [self.client addPushNotificationsOnChannels:@[@"wwdc",@"google.io"] +/// withDevicePushToken:self.devicePushToken +/// pushType:PNAPNSPush +/// andCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Push notifications successful enabled on passed channels. +/// } else { +/// // Handle modification error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// // +/// // Request can be resent using: `[status retry];` +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names for which push notifications should be enabled. +/// - pushToken: Device token / identifier which depending from passed `pushType` should be `NSData` (for +/// **PNAPNS2Push** and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `pushToken`. +/// - block: Push notifications addition on channels completion block. - (void)addPushNotificationsOnChannels:(NSArray *)channels - withDevicePushToken:(id)pushToken - pushType:(PNPushType)pushType - andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block - NS_SWIFT_NAME(addPushNotificationsOnChannels(_:withDevicePushToken:pushType:andCompletion:)); - -/** - * @brief Enable push notifications (sent using APNs over HTTP/2) on provided set of \c channels. - * - * @code - * [self.client addPushNotificationsOnChannels:@[@"wwdc",@"google.io"] - * withDevicePushToken:self.devicePushToken - * pushType:PNAPNS2Push - * environment:PNAPNSProduction - * topic:@"com.my-application.bundle" - * andCompletion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Push notifications successful enabled on passed channels. - * } else { - * // Handle modification error. Check 'category' property to find out possible issue because - * // of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channels List of channel names for which push notifications should be enabled. - * @param pushToken Device token / identifier which depending from passed \c pushType should be - * \a NSData (for \b PNAPNS2Push and \b PNAPNSPush) or \a NSString for other. - * @param pushType One of \b PNPushType fields which specify service to manage notifications for - * device specified with \c pushToken. - * @param environment One of \b PNAPNSEnvironment fields which specify environment within which - * device should manage list of channels with enabled notifications (works only if \c pushType - * set to \b PNAPNS2Push). - * @param topic Notifications topic name (usually it is application's bundle identifier). - * @param block \c Add \c notifications \c for \c channels request completion block. - * - * @since 4.12.0 - */ + withDevicePushToken:(id)pushToken + pushType:(PNPushType)pushType + andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block + NS_SWIFT_NAME(addPushNotificationsOnChannels(_:withDevicePushToken:pushType:andCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-managePushNotificationWithRequest:completion:' method instead."); + +/// Enable push notifications (sent using APNs over HTTP/2) on provided set of `channels`. +/// +/// #### Example: +/// ```objc +/// [self.client addPushNotificationsOnChannels:@[@"wwdc",@"google.io"] +/// withDevicePushToken:self.devicePushToken +/// pushType:PNAPNS2Push +/// environment:PNAPNSProduction +/// topic:@"com.my-application.bundle" +/// andCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Push notifications successful enabled on passed channels. +/// } else { +/// // Handle modification error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names for which push notifications should be enabled. +/// - pushToken: Device token / identifier which depending from passed `pushType` should be `NSData` (for +/// **PNAPNS2Push** and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `pushToken`. +/// - environment: One of **PNAPNSEnvironment** fields which specify environment within which device should manage +/// list of channels with enabled notifications (works only if `pushType` set to **PNAPNS2Push**). +/// - topic: Notifications topic name (usually it is application's bundle identifier). +/// - block: Push notifications addition on channels completion block. - (void)addPushNotificationsOnChannels:(NSArray *)channels - withDevicePushToken:(id)pushToken - pushType:(PNPushType)pushType - environment:(PNAPNSEnvironment)environment - topic:(NSString *)topic - andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block - NS_SWIFT_NAME(addPushNotificationsOnChannels(_:withDevicePushToken:pushType:environment:topic:andCompletion:)); - -/** - * @brief Disable push notifications on provided set of \c channels. - * - * @code - * [self.client removePushNotificationsFromChannels:@[@"wwdc",@"google.io"] - * withDevicePushToken:self.devicePushToken - * andCompletion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Push notification successfully disabled on passed channels. - * } else { - * // Handle modification error. Check 'category' property to find out possible issue because - * // of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channels List of channel names for which push notifications should be disabled. - * @param pushToken Device push token which should be used to disable push notifications on - * specified set of channels. - * @param block Push notifications removal from channels completion block. - * - * @since 4.0 - */ + withDevicePushToken:(id)pushToken + pushType:(PNPushType)pushType + environment:(PNAPNSEnvironment)environment + topic:(NSString *)topic + andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block + NS_SWIFT_NAME(addPushNotificationsOnChannels(_:withDevicePushToken:pushType:environment:topic:andCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-managePushNotificationWithRequest:completion:' method instead."); + +/// Disable push notifications on provided set of `channels`. +/// +/// #### Example: +/// ```objc +/// [self.client removePushNotificationsFromChannels:@[@"wwdc",@"google.io"] +/// withDevicePushToken:self.devicePushToken +/// andCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Push notification successfully disabled on passed channels. +/// } else { +/// // Handle modification error. Check `category` property to find out possible issue because +/// // of which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names for which push notifications should be disabled. +/// - pushToken: Device push token which should be used to disable push notifications on specified set of channels. +/// - block: Push notifications removal from channels completion block. - (void)removePushNotificationsFromChannels:(NSArray *)channels - withDevicePushToken:(NSData *)pushToken - andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block - NS_SWIFT_NAME(removePushNotificationsFromChannels(_:withDevicePushToken:andCompletion:)); - -/** - * @brief Disable push notifications (sent using legacy APNs, FCM or MPNS) on provided set of - * \c channels. - * - * @code - * [self.client removePushNotificationsFromChannels:@[@"wwdc",@"google.io"] - * withDevicePushToken:self.devicePushToken - * pushType:PNAPNSPush - * andCompletion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Push notification successfully disabled on passed channels. - * } else { - * // Handle modification error. Check 'category' property to find out possible issue because - * // of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channels List of channel names for which push notifications should be disabled. - * @param pushToken Device token / identifier which depending from passed \c pushType should be - * \a NSData (for \b PNAPNS2Push and \b PNAPNSPush) or \a NSString for other. - * @param pushType One of \b PNPushType fields which specify service to manage notifications for - * device specified with \c pushToken. - * @param block \c Remove \c notifications \c from \c channels request completion block. - * - * @since 4.12.0 - */ + withDevicePushToken:(NSData *)pushToken + andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block + NS_SWIFT_NAME(removePushNotificationsFromChannels(_:withDevicePushToken:andCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-managePushNotificationWithRequest:completion:' method instead."); + +/// Disable push notifications (sent using legacy APNs, FCM or MPNS) on provided set of `channels`. +/// +/// #### Example: +/// ```objc +/// [self.client removePushNotificationsFromChannels:@[@"wwdc",@"google.io"] +/// withDevicePushToken:self.devicePushToken +/// pushType:PNAPNSPush +/// andCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Push notification successfully disabled on passed channels. +/// } else { +/// // Handle modification error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// // +/// // Request can be resent using: `[status retry];` +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names for which push notifications should be disabled. +/// - pushToken: Device token / identifier which depending from passed `pushType` should be `NSData` (for +/// **PNAPNS2Push** and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `pushToken`. +/// - block: Push notifications removal from channels completion block. - (void)removePushNotificationsFromChannels:(NSArray *)channels - withDevicePushToken:(id)pushToken - pushType:(PNPushType)pushType - andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block - NS_SWIFT_NAME(removePushNotificationsFromChannels(_:withDevicePushToken:pushType:andCompletion:)); - -/** - * @brief Disable push notifications (sent using APNs over HTTP/2) on provided set of \c channels. - * - * @code - * [self.client removePushNotificationsFromChannels:@[@"wwdc",@"google.io"] - * withDevicePushToken:self.devicePushToken - * pushType:PNAPNS2Push - * environment:PNAPNSDevelopment - * topic:@"com.my-application.bundle" - * andCompletion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Push notification successfully disabled on passed channels. - * } else { - * // Handle modification error. Check 'category' property to find out possible issue because - * // of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channels List of channel names for which push notifications should be disabled. - * @param pushToken Device token / identifier which depending from passed \c pushType should be - * \a NSData (for \b PNAPNS2Push and \b PNAPNSPush) or \a NSString for other. - * @param pushType One of \b PNPushType fields which specify service to manage notifications for - * device specified with \c pushToken. - * @param environment One of \b PNAPNSEnvironment fields which specify environment within which - * device should manage list of channels with enabled notifications (works only if \c pushType - * set to \b PNAPNS2Push). - * @param topic Notifications topic name (usually it is application's bundle identifier). - * @param block \c Remove \c notifications \c from \c channels request completion block. - * - * @since 4.12.0 - */ + withDevicePushToken:(id)pushToken + pushType:(PNPushType)pushType + andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block + NS_SWIFT_NAME(removePushNotificationsFromChannels(_:withDevicePushToken:pushType:andCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-managePushNotificationWithRequest:completion:' method instead."); + +/// Disable push notifications (sent using APNs over HTTP/2) on provided set of `channels`. +/// +/// #### Example: +/// ```objc +/// [self.client removePushNotificationsFromChannels:@[@"wwdc",@"google.io"] +/// withDevicePushToken:self.devicePushToken +/// pushType:PNAPNS2Push +/// environment:PNAPNSDevelopment +/// topic:@"com.my-application.bundle" +/// andCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Push notification successfully disabled on passed channels. +/// } else { +/// // Handle modification error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names for which push notifications should be disabled. +/// - pushToken: Device token / identifier which depending from passed `pushType` should be `NSData` (for +/// **PNAPNS2Push** and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `pushToken`. +/// - environment: One of **PNAPNSEnvironment** fields which specify environment within which device should manage +/// list of channels with enabled notifications (works only if `pushType` set to **PNAPNS2Push**). +/// - topic: Notifications topic name (usually it is application's bundle identifier). +/// - block: Push notifications removal from channels completion block. - (void)removePushNotificationsFromChannels:(NSArray *)channels - withDevicePushToken:(id)pushToken - pushType:(PNPushType)pushType - environment:(PNAPNSEnvironment)environment + withDevicePushToken:(id)pushToken + pushType:(PNPushType)pushType + environment:(PNAPNSEnvironment)environment topic:(NSString *)topic - andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block - NS_SWIFT_NAME(removePushNotificationsFromChannels(_:withDevicePushToken:pushType:environment:topic:andCompletion:)); - -/** - * @brief Disable push notifications from all channels which is registered with specified - * \c pushToken. - * - * @code - * [self.client removeAllPushNotificationsFromDeviceWithPushToken:self.devicePushToken - * andCompletion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Push notification successfully disabled for all channels associated with specified - * // device push token. - * } else { - * // Handle modification error. Check 'category' property to find out possible issue because - * // of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param pushToken Device push token which should be used to disable push notifications on - * specified set of channels. - * @param block Push notifications removal from device completion block. - * - * @since 4.0 - */ + andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block + NS_SWIFT_NAME(removePushNotificationsFromChannels(_:withDevicePushToken:pushType:environment:topic:andCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-managePushNotificationWithRequest:completion:' method instead."); + +/// Disable push notifications from all channels which is registered with specified`pushToken`. +/// +/// #### Example: +/// ```objc +/// [self.client removeAllPushNotificationsFromDeviceWithPushToken:self.devicePushToken +/// andCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Push notification successfully disabled for all channels associated with specified device push token. +/// } else { +/// // Handle modification error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// // +/// // Request can be resent using: `[status retry];` +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - pushToken: Device push token which should be used to disable push notifications on specified set of channels. +/// - block: Push notifications removal from device completion block. - (void)removeAllPushNotificationsFromDeviceWithPushToken:(NSData *)pushToken - andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block - NS_SWIFT_NAME(removeAllPushNotificationsFromDeviceWithPushToken(_:andCompletion:)); - -/** - * @brief Disable push notifications (sent using legacy APNs, FCM or MPNS) from all channels which - * is registered with specified \c pushToken. - * - * @code - * [self.client removeAllPushNotificationsFromDeviceWithPushToken:self.devicePushToken - * pushType:PNAPNSPush - * andCompletion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Push notification successfully disabled for all channels associated with specified - * // device push token. - * } else { - * // Handle modification error. Check 'category' property to find out possible issue because - * // of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param pushToken Device token / identifier which depending from passed \c pushType should be - * \a NSData (for \b PNAPNS2Push and \b PNAPNSPush) or \a NSString for other. - * @param pushType One of \b PNPushType fields which specify service to manage notifications for - * device specified with \c pushToken. - * @param block \c Remove \c all \c notifications request completion block. - * - * @since 4.12.0 - */ + andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block + NS_SWIFT_NAME(removeAllPushNotificationsFromDeviceWithPushToken(_:andCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-managePushNotificationWithRequest:completion:' method instead."); + +/// Disable push notifications (sent using legacy APNs, FCM or MPNS) from all channels which is registered with +/// specified `pushToken`. +/// +/// #### Example: +/// ```objc +/// [self.client removeAllPushNotificationsFromDeviceWithPushToken:self.devicePushToken +/// pushType:PNAPNSPush +/// andCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Push notification successfully disabled for all channels associated with specified device push token. +/// } else { +/// // Handle modification error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - pushToken: Device token / identifier which depending from passed `pushType` should be `NSData` (for +/// **PNAPNS2Push** and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `pushToken`. +/// - block: Push notifications removal from device completion block. - (void)removeAllPushNotificationsFromDeviceWithPushToken:(id)pushToken - pushType:(PNPushType)pushType - andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block - NS_SWIFT_NAME(removeAllPushNotificationsFromDeviceWithPushToken(_:pushType:andCompletion:)); - -/** - * @brief Disable push notifications (sent using APNs over HTTP/2) from all channels - * which is registered with specified \c pushToken. - * - * @code - * [self.client removeAllPushNotificationsFromDeviceWithPushToken:self.devicePushToken - * pushType:PNAPNS2Push - * environment:PNAPNSDevelopment - * topic:@"com.my-application.bundle" - * andCompletion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Push notification successfully disabled for all channels associated with specified - * // device push token. - * } else { - * // Handle modification error. Check 'category' property to find out possible issue because - * // of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param pushToken Device token / identifier which depending from passed \c pushType should be - * \a NSData (for \b PNAPNS2Push and \b PNAPNSPush) or \a NSString for other. - * @param pushType One of \b PNPushType fields which specify service to manage notifications for - * device specified with \c pushToken. - * @param environment One of \b PNAPNSEnvironment fields which specify environment within which - * device should manage list of channels with enabled notifications (works only if \c pushType - * set to \b PNAPNS2Push). - * @param topic Notifications topic name (usually it is application's bundle identifier). - * @param block \c Remove \c all \c notifications request completion block. - * - * @since 4.12.0 - */ + pushType:(PNPushType)pushType + andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block + NS_SWIFT_NAME(removeAllPushNotificationsFromDeviceWithPushToken(_:pushType:andCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-managePushNotificationWithRequest:completion:' method instead."); + +/// Disable push notifications (sent using APNs over HTTP/2) from all channels which is registered with specified +/// `pushToken`. +/// +/// #### Example: +/// ```objc +/// [self.client removeAllPushNotificationsFromDeviceWithPushToken:self.devicePushToken +/// pushType:PNAPNS2Push +/// environment:PNAPNSDevelopment +/// topic:@"com.my-application.bundle" +/// andCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Push notification successfully disabled for all channels associated with specified device push token. +/// } else { +/// // Handle modification error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// // +/// // Request can be resent using: `[status retry];` +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - pushToken: Device token / identifier which depending from passed `pushType` should be \a `NSData` (for +/// **PNAPNS2Push** and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `pushToken`. +/// - environment: One of **PNAPNSEnvironment** fields which specify environment within which device should manage +/// list of channels with enabled notifications (works only if `pushType` set to **PNAPNS2Push**). +/// - topic: Notifications topic name (usually it is application's bundle identifier). +/// - block: Push notifications removal from device completion block. - (void)removeAllPushNotificationsFromDeviceWithPushToken:(id)pushToken - pushType:(PNPushType)pushType - environment:(PNAPNSEnvironment)environment - topic:(NSString *)topic - andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block - NS_SWIFT_NAME(removeAllPushNotificationsFromDeviceWithPushToken(_:pushType:environment:topic:andCompletion:)); + pushType:(PNPushType)pushType + environment:(PNAPNSEnvironment)environment + topic:(NSString *)topic + andCompletion:(nullable PNPushNotificationsStateModificationCompletionBlock)block + NS_SWIFT_NAME(removeAllPushNotificationsFromDeviceWithPushToken(_:pushType:environment:topic:andCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-managePushNotificationWithRequest:completion:' method instead."); #pragma mark - Push notifications state audit -/** - * @brief Request for all channels on which push notification has been enabled using specified - * \c pushToken. - * - * @code - * [self.client pushNotificationEnabledChannelsForDeviceWithPushToken:self.devicePushToken - * andCompletion:^(PNAPNSEnabledChannelsResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded list of channels using: result.data.channels - * } else { - * // Handle audition error. Check 'category' property to find out possible issue because of - * // which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param pushToken Device push token against which search on \b PubNub service should be performed. - * @param block Push notifications status audition completion block. - * - * @since 4.0 - */ +/// List notification enabled channels for device. +/// +/// Depending from used request it is possible to change channel notifications avaiability for device or disable all +/// notifications for device. +/// +/// #### Example: +/// ```objc +/// NSData *deviceToken = [NSData new]; // For FCM it should be string token. +/// PNPushNotificationFetchRequest *request = [PNPushNotificationFetchRequest requestWithDevicePushToken:deviceToken +/// pushType:PNAPNS2Push]; +/// +/// [self.client fetchPushNotificationWithRequest:request completion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded list of channels using: `result.data.channels`. +/// } else { +/// // Handle audition error. Check `category` property to find out possible issue because of which request did +/// // fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information about device for which push notification enabled channels list should be +/// retrieved. +/// - block: Push notification enabled channels retrieve request completion block. +- (void)fetchPushNotificationWithRequest:(PNPushNotificationFetchRequest *)request + completion:(PNPushNotificationsStateAuditCompletionBlock)block + NS_SWIFT_NAME(fetchPushNotificationWithRequest(_:completion:)); + +/// Request for all channels on which push notification has been enabled using specified `pushToken`. +/// +/// #### Example: +/// ```objc +/// [self.client pushNotificationEnabledChannelsForDeviceWithPushToken:self.devicePushToken +/// completion:^(PNAPNSEnabledChannelsResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded list of channels using: `result.data.channels`. +/// } else { +/// // Handle audition error. Check `category` property to find out possible issue because of which request did +/// // fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - pushToken: Device push token against which search on **PubNub** service should be performed. +/// - block: Push notifications status audition completion block. - (void)pushNotificationEnabledChannelsForDeviceWithPushToken:(NSData *)pushToken - andCompletion:(PNPushNotificationsStateAuditCompletionBlock)block - NS_SWIFT_NAME(pushNotificationEnabledChannelsForDeviceWithPushToken(_:andCompletion:)); - -/** - * @brief Request for all channels on which push notification (sent using legacy APNs, FCM or MPNS) - * has been enabled using specified \c pushToken. - * - * @code - * [self.client pushNotificationEnabledChannelsForDeviceWithPushToken:self.devicePushToken - * pushType:PNAPNSPush - * andCompletion:^(PNAPNSEnabledChannelsResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded list of channels using: result.data.channels - * } else { - * // Handle audition error. Check 'category' property to find out possible issue because of - * // which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param pushToken Device token / identifier which depending from passed \c pushType should be - * \a NSData (for \b PNAPNS2Push and \b PNAPNSPush) or \a NSString for other. - * @param pushType One of \b PNPushType fields which specify service to manage notifications for - * device specified with \c pushToken. - * @param block \c Audit \c notifications \c enabled \c channels request completion block. - * - * @since 4.12.0 - */ + andCompletion:(PNPushNotificationsStateAuditCompletionBlock)block + NS_SWIFT_NAME(pushNotificationEnabledChannelsForDeviceWithPushToken(_:andCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchPushNotificationWithRequest:completion:' method instead."); + +/// Request for all channels on which push notification (sent using legacy APNs, FCM or MPNS) has been enabled using +/// specified `pushToken`. +/// +/// #### Example: +/// ```objc +/// [self.client pushNotificationEnabledChannelsForDeviceWithPushToken:self.devicePushToken +/// pushType:PNAPNSPush +/// andCompletion:^(PNAPNSEnabledChannelsResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded list of channels using: `result.data.channels`. +/// } else { +/// // Handle audition error. Check `category` property to find out possible issue because of which request did +/// // fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - pushToken: Device token / identifier which depending from passed `pushType` should be `NSData` (for +/// **PNAPNS2Push** and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `pushToken`. +/// - block: Push notifications status audition completion block. - (void)pushNotificationEnabledChannelsForDeviceWithPushToken:(id)pushToken - pushType:(PNPushType)pushType - andCompletion:(PNPushNotificationsStateAuditCompletionBlock)block - NS_SWIFT_NAME(pushNotificationEnabledChannelsForDeviceWithPushToken(_:pushType:andCompletion:)); - -/** - * @brief Request for all channels on which push notification (sent using APNs over HTTP/2) has been - * enabled using specified \c pushToken. - * - * @code - * PNAuditPushNotificationsRequest *request = nil; - * request = [PNAuditPushNotificationsRequest requestWithDevicePushToken:self.devicePushToken - * pushType:PNAPNS2Push]; - * request.topic = @"com.my-application.bundle"; - * request.environment = PNAPNSProduction; - * - * [self.client pushNotificationEnabledChannelsForDeviceWithPushToken:self.devicePushToken - * pushType:PNAPNS2Push - * environment:PNAPNSDevelopment - * topic:@"com.my-application.bundle" - * andCompletion:^(PNAPNSEnabledChannelsResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded list of channels using: result.data.channels - * } else { - * // Handle audition error. Check 'category' property to find out possible issue because of - * // which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param pushToken Device token / identifier which depending from passed \c pushType should be - * \a NSData (for \b PNAPNS2Push and \b PNAPNSPush) or \a NSString for other. - * @param pushType One of \b PNPushType fields which specify service to manage notifications for - * device specified with \c pushToken. - * @param environment One of \b PNAPNSEnvironment fields which specify environment within which - * device should manage list of channels with enabled notifications (works only if \c pushType - * set to \b PNAPNS2Push). - * @param topic Notifications topic name (usually it is application's bundle identifier). - * @param block \c Audit \c notifications \c enabled \c channels request completion block. - * - * @since 4.12.0 - */ + pushType:(PNPushType)pushType + andCompletion:(PNPushNotificationsStateAuditCompletionBlock)block + NS_SWIFT_NAME(pushNotificationEnabledChannelsForDeviceWithPushToken(_:pushType:andCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchPushNotificationWithRequest:completion:' method instead."); + +/// Request for all channels on which push notification (sent using APNs over HTTP/2) has been enabled using specified +/// `pushToken`. +/// +/// #### Example: +/// ```objc +/// [self.client pushNotificationEnabledChannelsForDeviceWithPushToken:self.devicePushToken +/// pushType:PNAPNS2Push +/// environment:PNAPNSDevelopment +/// topic:@"com.my-application.bundle" +/// andCompletion:^(PNAPNSEnabledChannelsResult *result, +/// PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded list of channels using: `result.data.channels`. +/// } else { +/// // Handle audition error. Check `category` property to find out possible issue because of which request did +/// // fail. +/// // +/// // Request can be resent using: `[status retry];` +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - pushToken: Device token / identifier which depending from passed `pushType` should be `NSData` (for +/// **PNAPNS2Push** and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `pushToken`. +/// - environment: One of **PNAPNSEnvironment** fields which specify environment within which device should manage +/// list of channels with enabled notifications (works only if `pushType` set to **PNAPNS2Push**). +/// - topic: Notifications topic name (usually it is application's bundle identifier). +/// - block: Push notifications status audition completion block. - (void)pushNotificationEnabledChannelsForDeviceWithPushToken:(id)pushToken - pushType:(PNPushType)pushType - environment:(PNAPNSEnvironment)environment - topic:(NSString *)topic - andCompletion:(PNPushNotificationsStateAuditCompletionBlock)block - NS_SWIFT_NAME(pushNotificationEnabledChannelsForDeviceWithPushToken(_:pushType:environment:topic:andCompletion:)); + pushType:(PNPushType)pushType + environment:(PNAPNSEnvironment)environment + topic:(NSString *)topic + andCompletion:(PNPushNotificationsStateAuditCompletionBlock)block + NS_SWIFT_NAME(pushNotificationEnabledChannelsForDeviceWithPushToken(_:pushType:environment:topic:andCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchPushNotificationWithRequest:completion:' method instead."); #pragma mark - diff --git a/PubNub/Core/PubNub+APNS.m b/PubNub/Core/PubNub+APNS.m index f5efc41c4..3c5fe5332 100644 --- a/PubNub/Core/PubNub+APNS.m +++ b/PubNub/Core/PubNub+APNS.m @@ -1,190 +1,23 @@ - -/** - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ #import "PubNub+APNS.h" -#import "PNAPICallBuilder+Private.h" -#import "PNAcknowledgmentStatus.h" -#import "PNRequestParameters.h" +#import "PNBasePushNotificationsRequest+Private.h" +#import "PNOperationResult+Private.h" #import "PubNub+CorePrivate.h" #import "PNStatus+Private.h" -#import "PNErrorStatus.h" -#import "PNKeychain.h" -#import "PNHelpers.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface declaration - -@interface PubNub (APNSProtected) - - -#pragma mark - Push notifications state manipulation - -/** - * @brief Enable push notifications (sent using legacy APNs or APNs over HTTP/2) on provided set of - * \c channels. - * - * @code - * PNAddPushNotificationsRequest *request = nil; - * request = [PNAddPushNotificationsRequest requestWithDevicePushToken:self.devicePushToken - * pushType:PNAPNSPush]; - * request.channels = @[@"wwdc",@"google.io"]; - * - * [self.client addPushNotificationsWithRequest:request - * completion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Push notifications successful enabled on passed channels. - * } else { - * // Handle modification error. Check 'category' property to find out possible issue because - * // of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param request \c Add \c notifications \c for \c channels request with information required to - * enable notifications on \c channels. - * @param block \c Add \c notifications \c for \c channels request completion block. - * - * @since 4.12.0 - */ -- (void)addPushNotificationsWithRequest:(PNAddPushNotificationsRequest *)request - completion:(nullable PNPushNotificationsStateModificationCompletionBlock)block; - -/** - * @brief Disable push notifications (sent using legacy APNs or APNs over HTTP/2) on provided set of - * \c channels. - * - * @code - * PNRemovePushNotificationsRequest *request = nil; - * request = [PNRemovePushNotificationsRequest requestWithDevicePushToken:self.devicePushToken - * pushType:PNAPNSPush]; - * request.channels = @[@"wwdc",@"google.io"]; - * - * [self.client removePushNotificationsWithRequest:request - * completion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Push notification successfully disabled on passed channels. - * } else { - * // Handle modification error. Check 'category' property to find out possible issue because - * // of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param request \c Remove \c notifications \c from \c channels request with information required - * to disable notifications for \c channels. - * @param block \c Remove \c notifications \c from \c channels request completion block. - * - * @since 4.12.0 - */ -- (void)removePushNotificationsWithRequest:(PNRemovePushNotificationsRequest *)request - completion:(nullable PNPushNotificationsStateModificationCompletionBlock)block; - -/** - * @brief Disable push notifications (sent using legacy APNs or APNs over HTTP/2) from all channels - * which is registered with specified \c pushToken. - * - * @code - * PNRemoveAllPushNotificationsRequest *request = nil; - * request = [PNRemoveAllPushNotificationsRequest requestWithDevicePushToken:self.devicePushToken - * pushType:PNAPNS2Push]; - * request.topic = @"com.my-application.bundle"; - * request.environment = PNAPNSProduction; - * - * [self.client removeAllPushNotificationsWithRequest:request - * completion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Handle successful push notification disabling for all channels associated with - * // specified device push token. - * } else { - * // Handle modification error. Check 'category' property to find out possible issue because - * // of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param request \c Remove \c all \c notifications request with information required to disable - * notifications for \c device. - * @param block \c Remove \c all \c notifications request completion block. - * - * @since 4.12.0 - */ -- (void)removeAllPushNotificationsWithRequest:(PNRemoveAllPushNotificationsRequest *)request - completion:(nullable PNPushNotificationsStateModificationCompletionBlock)block; - - -#pragma mark - Push notifications state audit - -/** - * @brief Request for all channels on which push notification (sent using legacy APNs or APNs over - * HTTP/2) has been enabled using specified \c pushToken. - * - * @code - * PNAuditPushNotificationsRequest *request = nil; - * request = [PNAuditPushNotificationsRequest requestWithDevicePushToken:self.devicePushToken - * pushType:PNAPNS2Push]; - * request.topic = @"com.my-application.bundle"; - * request.environment = PNAPNSProduction; - * - * [self.client pushNotificationEnabledChannelsWithRequest:request - * andCompletion:^(PNAPNSEnabledChannelsResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded list of channels using: result.data.channels - * } else { - * // Handle audition error. Check 'category' property to find out possible issue because of - * // which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param request \c Audit \c notifications \c enabled \c channels request with information required - * to retrieve channels with enabled notifications. - * @param block \c Audit \c notifications \c enabled \c channels request completion block. - * - * @since 4.12.0 - */ -- (void)pushNotificationEnabledChannelsWithRequest:(PNAuditPushNotificationsRequest *)request - completion:(PNPushNotificationsStateAuditCompletionBlock)block; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END +// Deprecated +#import "PNAPICallBuilder+Private.h" -#pragma mark - Interface implementation +#pragma mark Interface implementation @implementation PubNub (APNS) -#pragma mark - API Builder support +#pragma mark - Push notification API builder interdace (deprecated) - (PNAPNSAPICallBuilder * (^)(void))push { - PNAPNSAPICallBuilder *builder = nil; - builder = [PNAPNSAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, - NSDictionary *parameters) { - + builder = [PNAPNSAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters) { NSArray *channels = parameters[NSStringFromSelector(@selector(channels))]; NSNumber *environmentValue = parameters[NSStringFromSelector(@selector(environment))]; NSNumber *pushTypeValue = parameters[NSStringFromSelector(@selector(pushType))]; @@ -193,46 +26,34 @@ @implementation PubNub (APNS) id token = parameters[NSStringFromSelector(@selector(token))]; PNPushType pushType = pushTypeValue.unsignedIntegerValue; NSDictionary *queryParam = parameters[@"queryParam"]; + PNBasePushNotificationsRequest *request = nil; id block = parameters[@"block"]; if ([flags containsObject:NSStringFromSelector(@selector(audit))]) { - PNAuditPushNotificationsRequest *request = nil; - request = [PNAuditPushNotificationsRequest requestWithDevicePushToken:token - pushType:pushType]; - request.arbitraryQueryParameters = queryParam; - request.environment = environment; - request.topic = topic; - - [self pushNotificationEnabledChannelsWithRequest:request completion:block]; + request = [PNPushNotificationFetchRequest requestWithDevicePushToken:token pushType:pushType]; } else if ([flags containsObject:NSStringFromSelector(@selector(enable))]) { - PNAddPushNotificationsRequest *request = nil; - request = [PNAddPushNotificationsRequest requestWithDevicePushToken:token - pushType:pushType]; - request.arbitraryQueryParameters = queryParam; - request.environment = environment; - request.channels = channels; - request.topic = topic; - - [self addPushNotificationsWithRequest:request completion:block]; + request = [PNPushNotificationManageRequest requestToAddChannels:channels + toDeviceWithToken:token + pushType:pushType]; } else if ([flags containsObject:NSStringFromSelector(@selector(disable))]) { - PNRemovePushNotificationsRequest *request = nil; - request = [PNRemovePushNotificationsRequest requestWithDevicePushToken:token - pushType:pushType]; - request.arbitraryQueryParameters = queryParam; - request.environment = environment; - request.channels = channels; - request.topic = topic; - - [self removePushNotificationsWithRequest:request completion:block]; + request = [PNPushNotificationManageRequest requestToRemoveChannels:channels + fromDeviceWithToken:token + pushType:pushType]; } else if ([flags containsObject:NSStringFromSelector(@selector(disableAll))]) { - PNRemoveAllPushNotificationsRequest *request = nil; - request = [PNRemoveAllPushNotificationsRequest requestWithDevicePushToken:token - pushType:pushType]; + request = [PNPushNotificationManageRequest requestToRemoveDeviceWithToken:token pushType:pushType]; + } + + if (request) { request.arbitraryQueryParameters = queryParam; request.environment = environment; request.topic = topic; - [self removeAllPushNotificationsWithRequest:request completion:block]; + if ([flags containsObject:NSStringFromSelector(@selector(audit))]) { + [self fetchPushNotificationWithRequest:(PNPushNotificationFetchRequest *)request + completion:block]; + } else { + [self managePushNotificationWithRequest:(PNPushNotificationManageRequest *)request completion:block]; + } } }]; @@ -244,21 +65,62 @@ @implementation PubNub (APNS) #pragma mark - Push notifications state manipulation +- (void)managePushNotificationWithRequest:(PNPushNotificationManageRequest *)userRequest + completion:(PNPushNotificationsStateModificationCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNAcknowledgmentStatus class]]; + PNPushNotificationsStateModificationCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNOperationType operation = userRequest.operation; + if (operation == PNRemoveAllPushNotificationsOperation || operation == PNRemoveAllPushNotificationsV2Operation) { + PNLogAPICall(self.logger, @" Disable push notifications for device '%@'%@.", + userRequest.pushToken, + userRequest.pushType == PNAPNS2Push + ? [NSString stringWithFormat:@" ('%@' topic in %@ environment)", + userRequest.topic, userRequest.environment == PNAPNSDevelopment ? @"development" : @"production"] + : @""); + } else { + PNLogAPICall(self.logger, @" %@ push notifications for device '%@'%@: %@.", + (operation == PNAddPushNotificationsOnChannelsOperation || + operation == PNAddPushNotificationsOnChannelsV2Operation) ? @"Enable" : @"Disable", + userRequest.pushToken, + userRequest.pushType == PNAPNS2Push + ? [NSString stringWithFormat:@" ('%@' topic in %@ environment)", + userRequest.topic, userRequest.environment == PNAPNSDevelopment ? @"development" : @"production"] + : @"", + [userRequest.channels componentsJoinedByString:@", "]); + } + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self managePushNotificationWithRequest:userRequest completion:block]; + }; +#pragma clang diagnostic pop + } + + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + - (void)addPushNotificationsOnChannels:(NSArray *)channels withDevicePushToken:(NSData *)pushToken andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { - - [self addPushNotificationsOnChannels:channels - withDevicePushToken:pushToken - pushType:PNAPNSPush - andCompletion:block]; + [self addPushNotificationsOnChannels:channels withDevicePushToken:pushToken pushType:PNAPNSPush andCompletion:block]; } - (void)addPushNotificationsOnChannels:(NSArray *)channels withDevicePushToken:(id)pushToken pushType:(PNPushType)pushType andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { - [self addPushNotificationsOnChannels:channels withDevicePushToken:pushToken pushType:pushType @@ -273,48 +135,22 @@ - (void)addPushNotificationsOnChannels:(NSArray *)channels environment:(PNAPNSEnvironment)environment topic:(NSString *)topic andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { - - PNAddPushNotificationsRequest *request = nil; - request = [PNAddPushNotificationsRequest requestWithDevicePushToken:pushToken - pushType:pushType]; - request.channels = channels; + PNPushNotificationManageRequest *request = nil; + request = [PNPushNotificationManageRequest requestToAddChannels:channels + toDeviceWithToken:pushToken + pushType:pushType]; if (pushType == PNAPNS2Push) { request.environment = environment; - request.topic = topic; + request.topic = topic ?: NSBundle.mainBundle.bundleIdentifier; } - [self addPushNotificationsWithRequest:request completion:block]; -} - -- (void)addPushNotificationsWithRequest:(PNAddPushNotificationsRequest *)request - completion:(PNPushNotificationsStateModificationCompletionBlock)block { - - PNLogAPICall(self.logger, @" Enable push notifications for device '%@'%@: %@.", - request.pushToken, - request.pushType == PNAPNS2Push ? [NSString stringWithFormat:@" ('%@' topic in %@ environment)", - request.topic, - request.environment == PNAPNSDevelopment ? @"development" : @"production"] - : @"", - [PNChannel namesForRequest:request.channels]); - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNAcknowledgmentStatus *status) { - if (status.isError) { - status.retryBlock = ^{ - [weakSelf addPushNotificationsWithRequest:request completion:block]; - }; - } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; + [self managePushNotificationWithRequest:request completion:block]; } - (void)removePushNotificationsFromChannels:(NSArray *)channels - withDevicePushToken:(NSData *)pushToken - andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { - + withDevicePushToken:(NSData *)pushToken + andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { [self removePushNotificationsFromChannels:channels withDevicePushToken:pushToken pushType:PNAPNSPush @@ -322,10 +158,9 @@ - (void)removePushNotificationsFromChannels:(NSArray *)channels } - (void)removePushNotificationsFromChannels:(NSArray *)channels - withDevicePushToken:(id)pushToken - pushType:(PNPushType)pushType - andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { - + withDevicePushToken:(id)pushToken + pushType:(PNPushType)pushType + andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { [self removePushNotificationsFromChannels:channels withDevicePushToken:pushToken pushType:pushType @@ -335,61 +170,33 @@ - (void)removePushNotificationsFromChannels:(NSArray *)channels } - (void)removePushNotificationsFromChannels:(NSArray *)channels - withDevicePushToken:(id)pushToken - pushType:(PNPushType)pushType - environment:(PNAPNSEnvironment)environment - topic:(NSString *)topic - andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { - - PNRemovePushNotificationsRequest *request = nil; - request = [PNRemovePushNotificationsRequest requestWithDevicePushToken:pushToken - pushType:pushType]; - request.channels = channels; + withDevicePushToken:(id)pushToken + pushType:(PNPushType)pushType + environment:(PNAPNSEnvironment)environment + topic:(NSString *)topic + andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { + + PNPushNotificationManageRequest *request = nil; + request = [PNPushNotificationManageRequest requestToRemoveChannels:channels + fromDeviceWithToken:pushToken + pushType:pushType]; if (pushType == PNAPNS2Push) { request.environment = environment; - request.topic = topic; + request.topic = topic ?: NSBundle.mainBundle.bundleIdentifier; } - [self removePushNotificationsWithRequest:request completion:block]; -} - -- (void)removePushNotificationsWithRequest:(PNRemovePushNotificationsRequest *)request - completion:(PNPushNotificationsStateModificationCompletionBlock)block { - - PNLogAPICall(self.logger, @" Disable push notifications for device '%@'%@: %@.", - request.pushToken, - request.pushType == PNAPNS2Push ? [NSString stringWithFormat:@" ('%@' topic in %@ environment)", - request.topic, - request.environment == PNAPNSDevelopment ? @"development" : @"production"] - : @"", - [PNChannel namesForRequest:request.channels]); - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNAcknowledgmentStatus *status) { - if (status.isError) { - status.retryBlock = ^{ - [weakSelf removePushNotificationsWithRequest:request completion:block]; - }; - } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; + [self managePushNotificationWithRequest:request completion:block]; } - (void)removeAllPushNotificationsFromDeviceWithPushToken:(NSData *)pushToken - andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { - - [self removeAllPushNotificationsFromDeviceWithPushToken:pushToken - pushType:PNAPNSPush - andCompletion:block]; + andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { + [self removeAllPushNotificationsFromDeviceWithPushToken:pushToken pushType:PNAPNSPush andCompletion:block]; } - (void)removeAllPushNotificationsFromDeviceWithPushToken:(id)pushToken - pushType:(PNPushType)pushType - andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { - + pushType:(PNPushType)pushType + andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { [self removeAllPushNotificationsFromDeviceWithPushToken:pushToken pushType:pushType environment:PNAPNSDevelopment @@ -398,61 +205,67 @@ - (void)removeAllPushNotificationsFromDeviceWithPushToken:(id)pushToken } - (void)removeAllPushNotificationsFromDeviceWithPushToken:(id)pushToken - pushType:(PNPushType)pushType - environment:(PNAPNSEnvironment)environment - topic:(NSString *)topic - andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { - - PNRemoveAllPushNotificationsRequest *request = nil; - request = [PNRemoveAllPushNotificationsRequest requestWithDevicePushToken:pushToken - pushType:pushType]; + pushType:(PNPushType)pushType + environment:(PNAPNSEnvironment)environment + topic:(NSString *)topic + andCompletion:(PNPushNotificationsStateModificationCompletionBlock)block { + + PNPushNotificationManageRequest *request = nil; + request = [PNPushNotificationManageRequest requestToRemoveDeviceWithToken:pushToken pushType:pushType]; if (pushType == PNAPNS2Push) { request.environment = environment; - request.topic = topic; + request.topic = topic ?: NSBundle.mainBundle.bundleIdentifier; } - [self removeAllPushNotificationsWithRequest:request completion:block]; + [self managePushNotificationWithRequest:request completion:block]; } -- (void)removeAllPushNotificationsWithRequest:(PNRemoveAllPushNotificationsRequest *)request - completion:(PNPushNotificationsStateModificationCompletionBlock)block { - - PNLogAPICall(self.logger, @" Disable push notifications for device '%@'%@.", - request.pushToken, - request.pushType == PNAPNS2Push ? [NSString stringWithFormat:@" ('%@' topic in %@ environment)", - request.topic, - request.environment == PNAPNSDevelopment ? @"development" : @"production"] - : @""); - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNAcknowledgmentStatus *status) { - if (status.isError) { - status.retryBlock = ^{ - [weakSelf removeAllPushNotificationsWithRequest:request completion:block]; + +#pragma mark - Push notifications state audit + +- (void)fetchPushNotificationWithRequest:(PNPushNotificationFetchRequest *)userRequest + completion:(PNPushNotificationsStateAuditCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNAPNSEnabledChannelsResult class] + status:[PNErrorStatus class]]; + PNPushNotificationsStateAuditCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNLogAPICall(self.logger, @" Push notification enabled channels for device '%@'%@.", + userRequest.pushToken, + userRequest.pushType == PNAPNS2Push + ? [NSString stringWithFormat:@" ('%@' topic in %@ environment)", + userRequest.topic, userRequest.environment == PNAPNSDevelopment ? @"development" : @"production"] + : @""); + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self fetchPushNotificationWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; -} + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; -#pragma mark - Push notifications state audit + [self performRequest:userRequest withParser:responseParser completion:handler]; +} - (void)pushNotificationEnabledChannelsForDeviceWithPushToken:(NSData *)pushToken - andCompletion:(PNPushNotificationsStateAuditCompletionBlock)block { - - [self pushNotificationEnabledChannelsForDeviceWithPushToken:pushToken - pushType:PNAPNSPush - andCompletion:block]; + andCompletion:(PNPushNotificationsStateAuditCompletionBlock)block { + [self pushNotificationEnabledChannelsForDeviceWithPushToken:pushToken pushType:PNAPNSPush andCompletion:block]; } - (void)pushNotificationEnabledChannelsForDeviceWithPushToken:(id)pushToken - pushType:(PNPushType)pushType - andCompletion:(PNPushNotificationsStateAuditCompletionBlock)block { - + pushType:(PNPushType)pushType + andCompletion:(PNPushNotificationsStateAuditCompletionBlock)block { [self pushNotificationEnabledChannelsForDeviceWithPushToken:pushToken pushType:pushType environment:PNAPNSDevelopment @@ -461,46 +274,19 @@ - (void)pushNotificationEnabledChannelsForDeviceWithPushToken:(id)pushToken } - (void)pushNotificationEnabledChannelsForDeviceWithPushToken:(id)pushToken - pushType:(PNPushType)pushType - environment:(PNAPNSEnvironment)environment - topic:(NSString *)topic - andCompletion:(PNPushNotificationsStateAuditCompletionBlock)block { - - PNAuditPushNotificationsRequest *request = nil; - request = [PNAuditPushNotificationsRequest requestWithDevicePushToken:pushToken - pushType:pushType]; + pushType:(PNPushType)pushType + environment:(PNAPNSEnvironment)environment + topic:(NSString *)topic + andCompletion:(PNPushNotificationsStateAuditCompletionBlock)block { + PNPushNotificationFetchRequest *request = nil; + request = [PNPushNotificationFetchRequest requestWithDevicePushToken:pushToken pushType:pushType]; if (pushType == PNAPNS2Push) { request.environment = environment; request.topic = topic; } - [self pushNotificationEnabledChannelsWithRequest:request completion:block]; -} - -- (void)pushNotificationEnabledChannelsWithRequest:(PNAuditPushNotificationsRequest *)request - completion:(PNPushNotificationsStateAuditCompletionBlock)block { - - PNLogAPICall(self.logger, @" Push notification enabled channels for device '%@'%@.", - request.pushToken, - request.pushType == PNAPNS2Push ? [NSString stringWithFormat:@" ('%@' topic in %@ environment)", - request.topic, - request.environment == PNAPNSDevelopment ? @"development" : @"production"] - : @""); - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request - withCompletion:^(PNAPNSEnabledChannelsResult *result, PNErrorStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf pushNotificationEnabledChannelsWithRequest:request completion:block]; - }; - } - - [weakSelf callBlock:block status:NO withResult:(PNOperationResult *)result andStatus:status]; - }]; + [self fetchPushNotificationWithRequest:request completion:block]; } #pragma mark - diff --git a/PubNub/Core/PubNub+ChannelGroup.h b/PubNub/Core/PubNub+ChannelGroup.h index 8c29f649f..6d9e4140e 100644 --- a/PubNub/Core/PubNub+ChannelGroup.h +++ b/PubNub/Core/PubNub+ChannelGroup.h @@ -1,166 +1,238 @@ -#import -#import -#import -#import #import +// Request +#import +#import -#pragma mark Class forward +// Response +#import +#import -@class PNChannelGroupChannelsResult, PNAcknowledgmentStatus, PNChannelGroupsResult, PNErrorStatus; +// Deprecated +#import +#import +#import NS_ASSUME_NONNULL_BEGIN -#pragma mark - API group interface - -/** - * @brief \b PubNub client core class extension to provide access to 'stream controller' API group. - * - * @discussion Set of API which allow to manage channels collections and manipulate list of channels - * in collection. - * - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ +#pragma mark Interface declaration + +/// **PubNub** `Channel Group` APIs. +/// +/// A set of APIs which allow accessing and managing channel groups and channels inside of them. @interface PubNub (ChannelGroup) -#pragma mark - API builder support +#pragma mark - Channel group API builder interface (deprecated) -/** - * @brief Stream API access builder. - * - * @return API call configuration builder. - * - * @since 4.5.4 - */ -@property (nonatomic, readonly, strong) PNStreamAPICallBuilder * (^stream)(void); +/// Stream API access builder. +@property (nonatomic, readonly, strong) PNStreamAPICallBuilder * (^stream)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); #pragma mark - Channel group audition -/** - * @brief Fetch list of channels which is registered in specified \c group. - * - * @code - * [self.client channelsForGroup:@"pubnub" - * withCompletion:^(PNChannelGroupChannelsResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded list of channels using: result.data.channels - * } else { - * // Handle channels for group audition error. Check 'category' property to find out - * // possible issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param group Name of the group from which channels should be fetched. - * @param block Channels audition completion block. - * - * @since 4.0 - */ +/// Fetch list of the channel group channels. +/// +/// #### Example: +/// ```objc +/// PNChannelGroupListFetchRequest *request = [PNChannelGroupListFetchRequest requestWithChannelGroup:@"pubnub"]; +/// +/// [self.client fetchChannelsForChannelGroupWithRequest:request +/// completion:^(PNChannelGroupChannelsResult *result, PNErrorStatus *status){ +/// if (!status.isError) { +/// // Handle list of channels using: `response.data.channels`. +/// } else { +/// // Handle channels for group audition error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to retrieve channel groups or channel group channels. +/// - block: Channel groups / channels retrieve request completion block. +- (void)fetchChannelsForChannelGroupWithRequest:(PNChannelGroupFetchRequest *)request + completion:(PNGroupChannelsAuditCompletionBlock)block + NS_SWIFT_NAME(fetchChannelsForChannelGroupWithRequest(_:completion:)); + +/// Fetch list of channels which is registered in specified `group`. +/// +/// #### Example: +/// ```objc +/// [self.client channelsForGroup:@"pubnub" +/// withCompletion:^(PNChannelGroupChannelsResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded list of channels using: `result.data.channels`. +/// } else { +/// // Handle channels for group audition error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - group: Name of the group from which channels should be fetched. +/// - block: Channels audition completion block. - (void)channelsForGroup:(NSString *)group withCompletion:(PNGroupChannelsAuditCompletionBlock)block - NS_SWIFT_NAME(channelsForGroup(_:withCompletion:)); + NS_SWIFT_NAME(channelsForGroup(_:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchChannelsForChannelGroupWithRequest:completion:' method instead."); #pragma mark - Channel group content manipulation -/** - * @brief Add new channels to the \c group. - * - * @discussion After addition channels to group it can be used in subscribe request to subscribe on - * remote data objects live feed with single group name. - * - * @code - * [self.client addChannels:@[@"ios", @"macos", @"Win"] toGroup:@"os" - * withCompletion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Handle successful channels list modification for group. - * } else { - * // Handle channels list modification for group error. Check 'category' property to find - * // out possible issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channels List of channel names which should be added to the \c group. - * @param group Name of the group into which channels should be added. - * @param block Channels addition completion block. - - @since 4.0 - */ +/// Modify channel group. +/// +/// Depending from used request it is possible to change list of channels in group or remove whole channel group. +/// +/// > Important: The group becomes invalid and can't be used in the subscribe process anymore if all channels or group +/// itself are removed. +/// +/// #### Examples: +/// ##### Add channels to channel group: +/// ```objc +/// NSArray *channels = @[@"channel-a", @"channel-b"]; +/// PNManageChannelGroupRequest *request = [PNManageChannelGroupRequest requestToAddChannels:channels +/// toChannelGroup:@"test-channel-group"]; +/// +/// [self.client manageChannelGroupWithRequest:request completion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Handle successful channels list modification for group. +/// } else { +/// // Handle channels list modification for group error. Check `category` property to find out possible issue +/// // because of which request did fail. +/// } +/// }]; +/// ``` +/// +/// ##### Remove channels from channel group: +/// ```objc +/// NSArray *channels = @[@"channel-a", @"channel-b"]; +/// PNManageChannelGroupRequest *request = [PNManageChannelGroupRequest requestToRemoveChannels:channels +/// fromChannelGroup:@"test-channel-group"]; +/// +/// [self.client manageChannelGroupWithRequest:request completion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Handle successful channels list modification for group. +/// } else { +/// // Handle channels list modification for group error. Check 'category' property to find +/// // out possible issue because of which request did fail. +/// } +/// }]; +/// ``` +/// +/// ##### Remove channel group: +/// ```objc +/// PNManageChannelGroupRequest *request = [PNManageChannelGroupRequest requestToRemoveChannelGroup:@"test-channel-group"]; +/// +/// [self.client manageChannelGroupWithRequest:request completion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Handle successful channel group removal. +/// } else { +/// // Handle channel group removal error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to manage channel group channels. +/// - block: Channel group channels list modification request completion block. +- (void)manageChannelGroupWithRequest:(PNChannelGroupManageRequest *)request + completion:(PNChannelGroupChangeCompletionBlock)block + NS_SWIFT_NAME(manageChannelGroupWithRequest(_:completion:)); + +/// Add new channels to the `group`. +/// +/// After addition channels to group it can be used in subscribe request to subscribe on remote data objects live feed +/// with single group name. +/// +/// #### Example: +/// ```objc +/// [self.client addChannels:@[@"ios", @"macos"] toGroup:@"os" withCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Handle successful channels list modification for group. +/// } else { +/// // Handle channels list modification for group error. Check `category` property to find out possible issue +/// // because of which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names which should be added to the `group`. +/// - group: Name of the group into which channels should be added. +/// - block: Channels addition completion block. - (void)addChannels:(NSArray *)channels toGroup:(NSString *)group withCompletion:(nullable PNChannelGroupChangeCompletionBlock)block - NS_SWIFT_NAME(addChannels(_:toGroup:withCompletion:)); - -/** - * @brief Remove specified \c channels from \c group. - * - * @discussion After specified channels will be removed, events from those channel's live feed won't - * be delivered to the client which is subscribed at specified channel group. - * - * @code - * [self.client removeChannels:@[@"ios", @"macos", @"Win"] fromGroup:@"os" - * withCompletion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Handle successful channels list modification for group. - * } else { - * // Handle channels list modification for group error. Check 'category' property to find - * // out possible issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channels List of channel names which should be removed from \c group. - * @param group Name of the group from which channels should be removed. - * @param block Channels removal completion block. - * - * @since 4.0 - */ + NS_SWIFT_NAME(addChannels(_:toGroup:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-manageChannelGroupWithRequest:completion:' method instead."); + + +/// Remove specified `channels` from `group`. +/// +/// > Important: The group becomes invalid and can't be used in the subscribe process anymore if all channels or group +/// itself are removed. +/// +/// #### Example: +/// ```objc +/// [self.client removeChannels:@[@"ios", @"macos"] fromGroup:@"os" withCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Handle successful channels list modification for group. +/// } else { +/// // Handle channels list modification for group error. Check `category` property to find out possible issue +/// // because of which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names which should be removed from `group`. +/// - group: Name of the group from which channels should be removed. +/// - block: Channels removal completion block. - (void)removeChannels:(NSArray *)channels fromGroup:(NSString *)group withCompletion:(nullable PNChannelGroupChangeCompletionBlock)block - NS_SWIFT_NAME(removeChannels(_:fromGroup:withCompletion:)); - -/** - * @brief Remove all channels from \c group. - * - * @discussion After all channels removed from \c group it become invalid and can't be used in - * subscribe process anymore. - * - * @code - * [self.client removeChannelsFromGroup:@"os" withCompletion:^(PNAcknowledgmentStatus *status) { - * if (!status.isError) { - * // Handle successful channel group removal. - * } else { - * // Handle channel group removal error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param group Name of the group from which all channels should be removed. - * @param block Channel group removal completion block. - * - * @since 4.0 - */ -- (void)removeChannelsFromGroup:(NSString *)group - withCompletion:(nullable PNChannelGroupChangeCompletionBlock)block - NS_SWIFT_NAME(removeChannelsFromGroup(_:withCompletion:)); + NS_SWIFT_NAME(removeChannels(_:fromGroup:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-manageChannelGroupWithRequest:completion:' method instead."); + +/// Remove all channels from `group`. +/// +/// > Important: The group becomes invalid and can't be used in the subscribe process anymore if all channels or group +/// itself are removed. +/// +/// #### Example: +/// ```objc +/// [self.client removeChannelsFromGroup:@"os" withCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Handle successful channel group removal. +/// } else { +/// // Handle channel group removal error. Check 'category' property to find out possible +/// // issue because of which request did fail. +/// // +/// // Request can be resent using: [status retry]; +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - group: Name of the group from which all channels should be removed. +/// - block: Channel group removal completion block. +- (void)removeChannelsFromGroup:(NSString *)group withCompletion:(nullable PNChannelGroupChangeCompletionBlock)block + NS_SWIFT_NAME(removeChannelsFromGroup(_:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-manageChannelGroupWithRequest:completion:' method instead."); #pragma mark - diff --git a/PubNub/Core/PubNub+ChannelGroup.m b/PubNub/Core/PubNub+ChannelGroup.m index c1ba043d3..2c66257ca 100644 --- a/PubNub/Core/PubNub+ChannelGroup.m +++ b/PubNub/Core/PubNub+ChannelGroup.m @@ -1,35 +1,27 @@ -/** - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ #import "PubNub+ChannelGroup.h" -#import "PNAPICallBuilder+Private.h" -#import "PNRequestParameters.h" #import "PubNub+CorePrivate.h" #import "PNStatus+Private.h" -#import "PNHelpers.h" + +// Deprecated +#import "PNAPICallBuilder+Private.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration -@interface PubNub (ChannelGroupProtected) +/// **PubNub** `Channel Group` APIs private extension. +@interface PubNub (ChannelGroupProtected) #pragma mark - Channel group audition -/** - * @brief Fetch list of channels which is registered in specified \c group. - * - * @param group Name of the group from which channels should be fetched. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block Channels audition completion block. - * - * @since 4.8.2 - */ +/// Fetch list of channels which is registered in specified `group`. +/// +/// - Parameters: +/// - group: Name of the group from which channels should be fetched. +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. +/// - block: Channels audition completion block. - (void)channelsForGroup:(NSString *)group withQueryParameters:(nullable NSDictionary *)queryParameters completion:(PNGroupChannelsAuditCompletionBlock)block; @@ -37,18 +29,14 @@ - (void)channelsForGroup:(NSString *)group #pragma mark - Channel group content manipulation -/** - * @brief Add or remove channels to / from the \c group. - * - * @param shouldAdd Whether provided \c channels should be added to the \c group or removed. - * @param channels List of channels names which should be used for \c group modification. - * @param group Name of the group which should be modified with list of passed \c objects. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block Channel group list modification completion block. - * - * @since 4.8.2 - */ +/// Add or remove channels to / from the `group`. +/// +/// - Parameters: +/// - shouldAdd: Whether provided `channels` should be added to the `group` or removed. +/// - channels: List of channels names which should be used for `group` modification. +/// - group: Name of the group which should be modified with list of passed `objects`. +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. +/// - block: Channel group list modification completion block. - (void)add:(BOOL)shouldAdd channels:(nullable NSArray *)channels toGroup:(NSString *)group @@ -71,26 +59,33 @@ @implementation PubNub (ChannelGroup) #pragma mark - API Builder support - (PNStreamAPICallBuilder * (^)(void))stream { - PNStreamAPICallBuilder *builder = nil; - builder = [PNStreamAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, - NSDictionary *parameters) { - + builder = [PNStreamAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters){ NSString *group = parameters[NSStringFromSelector(@selector(channelGroup))]; - NSDictionary *queryParam = parameters[@"queryParam"]; id block = parameters[@"block"]; if ([flags containsObject:NSStringFromSelector(@selector(audit))]) { - [self channelsForGroup:group withQueryParameters:queryParam completion:block]; + PNChannelGroupFetchRequest *request; + if (group.length == 0) request = [PNChannelGroupFetchRequest requestChannelGroups]; + else request = [PNChannelGroupFetchRequest requestWithChannelGroup:group]; + + request.arbitraryQueryParameters = parameters[@"queryParam"]; + + [self fetchChannelsForChannelGroupWithRequest:request completion:block]; } else { NSArray *channels = parameters[NSStringFromSelector(@selector(channels))]; BOOL adding = [flags containsObject:NSStringFromSelector(@selector(add))]; + + PNChannelGroupManageRequest *request; + if (channels.count == 0) request = [PNChannelGroupManageRequest requestToRemoveChannelGroup:group]; + else if (adding) request = [PNChannelGroupManageRequest requestToAddChannels:channels toChannelGroup:group]; + else if (!adding) { + request = [PNChannelGroupManageRequest requestToRemoveChannels:channels fromChannelGroup:group]; + } + + request.arbitraryQueryParameters = parameters[@"queryParam"]; - [self add:adding - channels:(channels.count ? channels : nil) - toGroup:group - queryParameters:queryParam - withCompletion:block]; + [self manageChannelGroupWithRequest:request completion:block]; } }]; @@ -102,72 +97,105 @@ @implementation PubNub (ChannelGroup) #pragma mark - Channel group audition -- (void)channelsForGroup:(NSString *)group - withCompletion:(PNGroupChannelsAuditCompletionBlock)block { +-(void)fetchChannelsForChannelGroupWithRequest:(PNChannelGroupFetchRequest *)userRequest + completion:(PNGroupChannelsAuditCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNChannelGroupChannelsResult class] + status:[PNErrorStatus class]]; + PNGroupChannelsAuditCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; + + if (userRequest.operation == PNChannelGroupsOperation) { + PNLogAPICall(self.logger, @" Request channels for '%@' channel group.", userRequest.channelGroup); + } else PNLogAPICall(self.logger, @" Request channel groups list."); + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self fetchChannelsForChannelGroupWithRequest:userRequest completion:block]; + }; +#pragma clang diagnostic pop + } + + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} +- (void)channelsForGroup:(NSString *)group withCompletion:(PNGroupChannelsAuditCompletionBlock)block { [self channelsForGroup:group withQueryParameters:nil completion:block]; } - (void)channelsForGroup:(NSString *)group withQueryParameters:(NSDictionary *)queryParameters completion:(PNGroupChannelsAuditCompletionBlock)block { - - PNOperationType operationType = (group ? PNChannelsForGroupOperation - : PNChannelGroupsOperation); - PNRequestParameters *parameters = [PNRequestParameters new]; + PNChannelGroupFetchRequest *request = nil; + + if (group.length == 0) request = [PNChannelGroupFetchRequest requestChannelGroups]; + else request = [PNChannelGroupFetchRequest requestWithChannelGroup:group]; + + request.arbitraryQueryParameters = queryParameters; + + [self fetchChannelsForChannelGroupWithRequest:request completion:block]; +} - [parameters addQueryParameters:queryParameters]; - - if (group.length) { - [parameters addPathComponent:[PNString percentEscapedString:group] - forPlaceholder:@"{channel-group}"]; - PNLogAPICall(self.logger, @" Request channels for '%@' channel group.", group); +#pragma mark - Channel group content manipulation + +- (void)manageChannelGroupWithRequest:(PNChannelGroupManageRequest *)userRequest + completion:(PNChannelGroupChangeCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNAcknowledgmentStatus class]]; + PNChannelGroupChangeCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + if (userRequest.operation == PNRemoveGroupOperation) { + PNLogAPICall(self.logger, @" Remove '%@' channel group", (userRequest.channelGroup?: @"")); } else { - PNLogAPICall(self.logger, @" Request channel groups list."); + PNLogAPICall(self.logger, @" %@ channels %@ '%@' channel group: %@", + (userRequest.operation == PNAddChannelsToGroupOperation ? @"Add" : @"Remove"), + (userRequest.operation == PNAddChannelsToGroupOperation ? @"to" : @"from"), + (userRequest.channelGroup?: @""), (userRequest.channels?: @"")); } - - __weak __typeof(self) weakSelf = self; - [self processOperation:operationType - withParameters:parameters - completionBlock:^(PNOperationResult *result, PNStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf channelsForGroup:group - withQueryParameters:queryParameters - completion:block]; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self manageChannelGroupWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - [weakSelf callBlock:block status:NO withResult:result andStatus:status]; - }]; -} - + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; -#pragma mark - Channel group content manipulation + [self performRequest:userRequest withParser:responseParser completion:handler]; +} - (void)addChannels:(NSArray *)channels toGroup:(NSString *)group withCompletion:(PNChannelGroupChangeCompletionBlock)block { - [self add:YES channels:channels toGroup:group queryParameters:nil withCompletion:block]; } - (void)removeChannels:(NSArray *)channels fromGroup:(NSString *)group withCompletion:(PNChannelGroupChangeCompletionBlock)block { - - [self add:NO - channels:(channels.count ? channels : nil) - toGroup:group - queryParameters:nil - withCompletion:block]; + [self add:NO channels:channels.count ? channels : nil toGroup:group queryParameters:nil withCompletion:block]; } -- (void)removeChannelsFromGroup:(NSString *)group - withCompletion:(PNChannelGroupChangeCompletionBlock)block { - +- (void)removeChannelsFromGroup:(NSString *)group withCompletion:(PNChannelGroupChangeCompletionBlock)block { [self removeChannels:@[] fromGroup:group withCompletion:block]; } @@ -176,54 +204,18 @@ - (void)add:(BOOL)shouldAdd toGroup:(NSString *)group queryParameters:(NSDictionary *)queryParameters withCompletion:(PNChannelGroupChangeCompletionBlock)block { - - PNRequestParameters *parameters = [PNRequestParameters new]; - PNOperationType operationType = PNRemoveGroupOperation; - BOOL removeAllObjects = !shouldAdd && !channels.count; - - [parameters addQueryParameters:queryParameters]; - - if (group.length) { - [parameters addPathComponent:[PNString percentEscapedString:group] - forPlaceholder:@"{channel-group}"]; - } - - if (!removeAllObjects){ - operationType = (shouldAdd ? PNAddChannelsToGroupOperation - : PNRemoveChannelsFromGroupOperation); + PNChannelGroupManageRequest *request; - if (channels.count) { - [parameters addQueryParameter:[PNChannel namesForRequest:channels] - forFieldName:(shouldAdd ? @"add":@"remove")]; - } - - PNLogAPICall(self.logger, @" %@ channels %@ '%@' channel group: %@", - (shouldAdd ? @"Add" : @"Remove"), (shouldAdd ? @"to" : @"from"), - (group?: @""), ([PNChannel namesForRequest:channels]?: @"")); - } else { - PNLogAPICall(self.logger, @" Remove '%@' channel group", (group?: @"")); - } - - __weak __typeof(self) weakSelf = self; - [self processOperation:operationType - withParameters:parameters - completionBlock:^(PNStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf add:shouldAdd - channels:channels - toGroup:group - queryParameters:queryParameters - withCompletion:block]; - }; - } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; + if (!shouldAdd && !channels.count) request = [PNChannelGroupManageRequest requestToRemoveChannelGroup:group]; + else if (shouldAdd) request = [PNChannelGroupManageRequest requestToAddChannels:channels toChannelGroup:group]; + else request = [PNChannelGroupManageRequest requestToRemoveChannels:channels fromChannelGroup:group]; + request.arbitraryQueryParameters = [queryParameters copy]; + + [self manageChannelGroupWithRequest:request completion:block]; } #pragma mark - @end + diff --git a/PubNub/Core/PubNub+Core.h b/PubNub/Core/PubNub+Core.h index 55634b852..2536216f6 100644 --- a/PubNub/Core/PubNub+Core.h +++ b/PubNub/Core/PubNub+Core.h @@ -1,6 +1,11 @@ #import +#import +#import +#import #import +#ifndef PUBNUB_DISABLE_LOGGER #import +#endif // PUBNUB_DISABLE_LOGGER #pragma mark Class forward @@ -15,19 +20,16 @@ NS_ASSUME_NONNULL_BEGIN /// /// Basically used by **PubNub** categories (each for own API group) and manage communication with **PubNub** network /// and share user-specified configuration. -/// -/// - Since: 4.0.0 -/// - Copyright: 2010-2023 PubNub, Inc. @interface PubNub : NSObject #pragma mark - Information +#ifndef PUBNUB_DISABLE_LOGGER /// **PubNub** client logger instance which can be used to add additional logs into console (if enabled) and file /// (if enabled). -/// -/// - Since: 4.5.0 @property (nonatomic, readonly, strong) PNLLogger *logger; +#endif // PUBNUB_DISABLE_LOGGER /// Basic information about **PubNub** client. /// @@ -49,12 +51,10 @@ NS_ASSUME_NONNULL_BEGIN /// User ID which has been used during client initialization. /// /// - Returns: User-provided unique user identifier. -/// -/// - Since: 5.1.4 - (NSString *)userID; -#pragma mark - Initialization and configuration +#pragma mark - Initialization and Configuration /// Create new **PubNub** client instance with pre-defined configuration. /// @@ -67,11 +67,12 @@ NS_ASSUME_NONNULL_BEGIN /// /// > Note: All required keys can be found on https://admin.pubnub.com /// +/// #### Example: /// ```objc /// PNConfiguration *configuration = [PNConfiguration configurationWithPublishKey:@"demo" /// subscribeKey:@"demo" /// userID:@"user"]; -/// PubNub *pubnub = [PubNub clientWithConfiguration:configuration]; +/// PubNub *client = [PubNub clientWithConfiguration:configuration]; /// ``` /// - Parameter configuration: User-provided information about how client should operate and handle events. /// - Returns: Initialized **PubNub** client instance. @@ -89,13 +90,13 @@ NS_ASSUME_NONNULL_BEGIN /// /// > Note: All required keys can be found on https://admin.pubnub.com /// +/// #### Example: /// ```objc /// PNConfiguration *configuration = [PNConfiguration configurationWithPublishKey:@"demo" /// subscribeKey:@"demo" /// userID:@"user"]; -/// dispatch_queue_t queue = dispatch_queue_create("com.my-app.callback-queue", -/// DISPATCH_QUEUE_SERIAL); -/// PubNub *pubnub = [PubNub clientWithConfiguration:configuration callbackQueue:queue]; +/// dispatch_queue_t queue = dispatch_queue_create("com.my-app.callback-queue", DISPATCH_QUEUE_SERIAL); +/// PubNub *client = [PubNub clientWithConfiguration:configuration callbackQueue:queue]; /// ``` /// - Parameters: /// - configuration: User-provided information about how client should operate and handle events. @@ -120,11 +121,12 @@ NS_ASSUME_NONNULL_BEGIN /// /// > Note: All listeners will be copied to new client. /// +/// #### Example: /// ```objc /// __weak __typeof(self) weakSelf = self; /// PNConfiguration *configuration = [self.pubnub currentConfiguration]; /// configuration.TLSEnabled = NO; -/// [self.pubnub copyWithConfiguration:configuration completion:^(PubNub *pubnub) { +/// [self.client copyWithConfiguration:configuration completion:^(PubNub *pubnub) { /// // Store reference on new client with updated configuration. /// weakSelf.pubnub = pubnub; /// }]; @@ -132,8 +134,7 @@ NS_ASSUME_NONNULL_BEGIN /// - Parameters: /// - configuration: User-provided information about how client should operate and handle events. /// - block: Copy completion block which will pass new **PubNub** client instance which use updated `configuration`. -- (void)copyWithConfiguration:(PNConfiguration *)configuration - completion:(void(^)(PubNub *client))block +- (void)copyWithConfiguration:(PNConfiguration *)configuration completion:(void(^)(PubNub *client))block NS_SWIFT_NAME(copyWithConfiguration(_:completion:)); /// Make copy of client with it's current state using new configuration. @@ -150,10 +151,10 @@ NS_ASSUME_NONNULL_BEGIN /// /// > Note: All listeners will be copied to new client. /// +/// #### Example: /// ```objc /// __weak __typeof(self) weakSelf = self; -/// dispatch_queue_t queue = dispatch_queue_create("com.my-app.callback-queue", -/// DISPATCH_QUEUE_SERIAL); +/// dispatch_queue_t queue = dispatch_queue_create("com.my-app.callback-queue", DISPATCH_QUEUE_SERIAL); /// PNConfiguration *configuration = [self.pubnub currentConfiguration]; /// configuration.TLSEnabled = NO; /// [self.pubnub copyWithConfiguration:configuration callbackQueue:queue completion:^(PubNub *pubnub) { diff --git a/PubNub/Core/PubNub+Core.m b/PubNub/Core/PubNub+Core.m index 4157846e5..7ad54ad9f 100644 --- a/PubNub/Core/PubNub+Core.m +++ b/PubNub/Core/PubNub+Core.m @@ -12,23 +12,22 @@ #import "PNOperationResult+Private.h" #import "PNConfiguration+Private.h" #import "PubNub+SubscribePrivate.h" +#import "NSError+PNTransport.h" #import "PNPrivateStructures.h" #import "PNClientInformation.h" -#import "PNRequestParameters.h" -#import "PNKeychain+Private.h" #import "PNSubscribeStatus.h" -#import "PubNub+PAMPrivate.h" #import "PNStatus+Private.h" #import "PNEventsListener.h" #import "PNConfiguration.h" #import "PNReachability.h" -#import "PNDataStorage.h" #import "PNConstants.h" #import "PNLogMacro.h" -#import "PNNetwork.h" #import "PNHelpers.h" +#import "PNTransportMiddleware.h" +#import "PNURLSessionTransport.h" #import "PNCryptoModule.h" +#import "PNRequest.h" #pragma mark Externs @@ -40,15 +39,11 @@ void pn_dispatch_async(dispatch_queue_t queue, dispatch_block_t block) { } void pn_safe_property_read(dispatch_queue_t queue, dispatch_block_t block) { - if (queue && block) { - dispatch_sync(queue, block); - } + if (queue && block) dispatch_sync(queue, block); } void pn_safe_property_write(dispatch_queue_t queue, dispatch_block_t block) { - if (queue && block) { - dispatch_barrier_async(queue, block); - } + if (queue && block) dispatch_barrier_async(queue, block); } NSString * pn_cpu_architecture(void) { @@ -99,23 +94,25 @@ @interface PubNub () #pragma mark - Properties -@property (nonatomic, nullable, strong) dispatch_queue_t resourceAccessQueue; +/// Resources access lock. +@property(strong, nonatomic) PNLock *lock; +#ifndef PUBNUB_DISABLE_LOGGER @property (nonatomic, strong) PNLLogger *logger; -@property (nonatomic, strong) dispatch_queue_t callbackQueue; -@property (nonatomic, copy) PNConfiguration *configuration; -@property (nonatomic, copy) NSString *instanceID; -@property (nonatomic, strong) PNSubscriber *subscriberManager; +#endif // PUBNUB_DISABLE_LOGGER +@property (nonatomic, strong) id subscriptionNetwork; +@property (nonatomic, assign) PNStatusCategory recentClientStatus; @property (nonatomic, strong) PNPublishSequence *sequenceManager; @property (nonatomic, strong) PNClientState *clientStateManager; @property (nonatomic, strong) PNStateListener *listenersManager; +@property (nonatomic, strong) PNSubscriber *subscriberManager; +@property (nonatomic, strong) id serviceNetwork; +@property (nonatomic, strong) dispatch_queue_t callbackQueue; +@property(strong, nonatomic) PNJSONSerialization *serializer; @property (nonatomic, strong) PNHeartbeat *heartbeatManager; -@property (nonatomic, strong) PNTelemetry *telemetryManager; -@property (nonatomic, assign) PNStatusCategory recentClientStatus; @property (nonatomic, strong) PNFilesManager *filesManager; -@property (nonatomic, strong) PNNetwork *subscriptionNetwork; -@property (nonatomic, strong) PNNetwork *serviceNetwork; -@property (nonatomic, strong) NSDictionary *defaultQueryComponents; -@property (nonatomic, strong) NSDictionary *defaultPathComponents; +@property (nonatomic, copy) PNConfiguration *configuration; +@property (nonatomic, copy) NSString *instanceID; +@property(strong, nonatomic) PNJSONCoder *coder; /// Reachability helper. /// @@ -130,11 +127,9 @@ @interface PubNub () /// /// If all keys will be specified, client will be able to read and modify data in **PubNub** network. /// -/// > Note: Client will make configuration deep copy and further changes in `PNConfiguration` after it has been passed +/// > Note: Client will make configuration deep copy and further changes in ``PNConfiguration`` after it has been passed /// to the client won't take any effect on client. -/// /// > Note: If `queue` is nil, completion blocks and delegate callbacks will be called on the main queue. -/// /// > Note: All required keys can be found on https://admin.pubnub.com /// /// - Parameters: @@ -153,8 +148,7 @@ - (instancetype)initWithConfiguration:(PNConfiguration *)configuration /// - Parameters: /// - recentClientStatus: Recent subscriber state which should be used to set proper client state. /// - shouldCheckReachability: Whether service reachability check should be started or not. -- (void)setRecentClientStatus:(PNStatusCategory)recentClientStatus - withReachabilityCheck:(BOOL)shouldCheckReachability; +- (void)setRecentClientStatus:(PNStatusCategory)recentClientStatus withReachabilityCheck:(BOOL)shouldCheckReachability; #pragma mark - Crypto module @@ -174,7 +168,14 @@ - (void)prepareReachability; /// Initialize and configure required **PubNub** network managers. - (void)prepareNetworkManagers; +/// Create transport instance with limited concurrent connections. +/// +/// - Parameter maximumConnections: Maximum number of concurrent connections (requests). +/// - Returns: Configured and ready to use requests transport instance. +- (id)transportWithMaximumConnections:(NSUInteger)maximumConnections; + +#if TARGET_OS_OSX || TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) #pragma mark - Handlers /// Handle application with active client transition between foreground and background execution contexts. @@ -182,34 +183,17 @@ - (void)prepareNetworkManagers; /// - Parameter notification: Notification which will provide information about to which context application has been /// pushed. - (void)handleContextTransition:(NSNotification *)notification; - +#endif #pragma mark - Misc -/// Status class which should be used to represent request error. -/// -/// - Parameter request: Request with information which should be used to decide on class. -/// - Returns: Class for error status presentation. -- (Class)errorStatusClassForRequest:(PNRequest *)request; - -/// Store provided unique user identifier in the Keychain. -/// -/// - Parameters: -/// - uuid: Unique user identifier which has been provided with `PNConfiguration` instance. -/// - identifier: Account publish or subscribe key which has been provided with `PNConfiguration` instance. -/// -/// - Since: 4.15.3 -- (void)storeUUID:(NSString *)uuid forIdentifier:(NSString *)identifier; - +#ifndef PUBNUB_DISABLE_LOGGER /// Create and configure **PubNub** client logger instance. -/// -/// - Since 4.5.0 - (void)setupClientLogger; /// Print out logger's verbosity configuration information. -/// -/// - Since 4.5.0 - (void)printLogVerbosityInformation; +#endif // PUBNUB_DISABLE_LOGGER #pragma mark - @@ -257,31 +241,23 @@ + (instancetype)clientWithConfiguration:(PNConfiguration *)configuration { } + (instancetype)clientWithConfiguration:(PNConfiguration *)configuration callbackQueue:(dispatch_queue_t)callbackQueue { - dispatch_queue_t queue = (callbackQueue ?: dispatch_get_main_queue()); - - if (@available(macOS 10.10, iOS 8.0, *)) { - if (configuration.applicationExtensionSharedGroupIdentifier) { - queue = dispatch_get_main_queue(); - } - } - - return [[self alloc] initWithConfiguration:configuration callbackQueue:queue]; + return [[self alloc] initWithConfiguration:configuration callbackQueue:callbackQueue ?: dispatch_get_main_queue()]; } - (instancetype)initWithConfiguration:(PNConfiguration *)configuration callbackQueue:(dispatch_queue_t)callbackQueue { if ((self = [super init])) { - NSString *storageIdentifier = configuration.publishKey ?: configuration.subscribeKey; - [self storeUUID:configuration.userID forIdentifier:storageIdentifier]; +#ifndef PUBNUB_DISABLE_LOGGER [self setupClientLogger]; - PNLogClientInfo(self.logger, @" PubNub SDK %@ (%@)", kPNLibraryVersion, kPNCommit); - +#endif // PUBNUB_DISABLE_LOGGER + + _lock = [PNLock lockWithIsolationQueueName:@"core" subsystemQueueIdentifier:@"com.pubnub.serializer"]; + _serializer = [PNJSONSerialization new]; + _coder = [PNJSONCoder coderWithJSONSerializer:_serializer]; + _instanceID = [[NSUUID UUID].UUIDString copy]; _configuration = [configuration copy]; _callbackQueue = callbackQueue; - _instanceID = [[[NSUUID UUID] UUIDString] copy]; - _resourceAccessQueue = dispatch_queue_create("com.pubnub.core", DISPATCH_QUEUE_CONCURRENT); - [self prepareRequiredParameters]; [self prepareNetworkManagers]; [self prepareCryptoModule]; @@ -291,37 +267,24 @@ - (instancetype)initWithConfiguration:(PNConfiguration *)configuration callbackQ _clientStateManager = [PNClientState stateForClient:self]; _listenersManager = [PNStateListener stateListenerForClient:self]; _heartbeatManager = [PNHeartbeat heartbeatForClient:self]; - _telemetryManager = [PNTelemetry new]; [self addListener:self]; [self prepareReachability]; + +#if TARGET_OS_OSX || TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) + SEL selector = @selector(handleContextTransition:); #if TARGET_OS_IOS - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter addObserver:self - selector:@selector(handleContextTransition:) - name:UIApplicationWillEnterForegroundNotification - object:nil]; - [notificationCenter addObserver:self - selector:@selector(handleContextTransition:) - name:UIApplicationDidEnterBackgroundNotification - object:nil]; -#elif TARGET_OS_WATCH - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter addObserver:self selector:@selector(handleContextTransition:) - name:NSExtensionHostWillEnterForegroundNotification object:nil]; - [notificationCenter addObserver:self selector:@selector(handleContextTransition:) - name:NSExtensionHostDidEnterBackgroundNotification object:nil]; + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center addObserver:self selector:selector name:UIApplicationWillEnterForegroundNotification object:nil]; + [center addObserver:self selector:selector name:UIApplicationDidEnterBackgroundNotification object:nil]; #elif TARGET_OS_OSX - NSNotificationCenter *notificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter]; - [notificationCenter addObserver:self selector:@selector(handleContextTransition:) - name:NSWorkspaceWillSleepNotification object:nil]; - [notificationCenter addObserver:self selector:@selector(handleContextTransition:) - name:NSWorkspaceSessionDidResignActiveNotification object:nil]; - [notificationCenter addObserver:self selector:@selector(handleContextTransition:) - name:NSWorkspaceDidWakeNotification object:nil]; - [notificationCenter addObserver:self selector:@selector(handleContextTransition:) - name:NSWorkspaceSessionDidBecomeActiveNotification object:nil]; -#endif + NSNotificationCenter *center = [[NSWorkspace sharedWorkspace] notificationCenter]; + [center addObserver:self selector:selector name:NSWorkspaceWillSleepNotification object:nil]; + [center addObserver:self selector:selector name:NSWorkspaceSessionDidResignActiveNotification object:nil]; + [center addObserver:self selector:selector name:NSWorkspaceDidWakeNotification object:nil]; + [center addObserver:self selector:selector name:NSWorkspaceSessionDidBecomeActiveNotification object:nil]; +#endif // TARGET_OS_OSX +#endif // TARGET_OS_OSX || TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) } return self; @@ -334,7 +297,6 @@ - (void)copyWithConfiguration:(PNConfiguration *)configuration completion:(void( - (void)copyWithConfiguration:(PNConfiguration *)configuration callbackQueue:(dispatch_queue_t)callbackQueue completion:(void(^)(PubNub *client))block { - PubNub *client = [PubNub clientWithConfiguration:configuration callbackQueue:callbackQueue]; [client.subscriberManager inheritStateFromSubscriber:self.subscriberManager]; @@ -386,23 +348,17 @@ - (void)setRecentClientStatus:(PNStatusCategory)recentClientStatus withReachabil PNStatusCategory previousState = self.recentClientStatus; PNStatusCategory currentState = recentClientStatus; - if (currentState == PNReconnectedCategory) { - currentState = PNConnectedCategory; - } - + if (currentState == PNReconnectedCategory) currentState = PNConnectedCategory; if (currentState == PNDisconnectedCategory && ([[self channels] count] || [[self channelGroups] count] || [[self presenceChannels] count])) { - currentState = PNConnectedCategory; } self->_recentClientStatus = currentState; if (currentState == PNUnexpectedDisconnectCategory && shouldCheckReachability) { - if (previousState == PNDisconnectedCategory) { - return; - } + if (previousState == PNDisconnectedCategory) return; __weak __typeof(self) weakSelf = self; dispatch_time_t delay = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)); @@ -457,158 +413,169 @@ - (void)prepareReachability { #pragma mark - PubNub Network managers - (void)prepareNetworkManagers { - /** - * Check whether application extension support enabled or not. - * Long-poll tasks not supported in application extension context. - */ - BOOL shouldCreateSubscriptionNetwork = YES; - NSInteger maximumConnections = 3; - - if (@available(macOS 10.10, iOS 8.0, *)) { - NSString *sharedGroupIdentifier = _configuration.applicationExtensionSharedGroupIdentifier; - shouldCreateSubscriptionNetwork = sharedGroupIdentifier == nil; - maximumConnections = shouldCreateSubscriptionNetwork ? maximumConnections : 1; - } + _subscriptionNetwork = [self transportWithMaximumConnections:1]; + _serviceNetwork = [self transportWithMaximumConnections:3]; +} + +- (id)transportWithMaximumConnections:(NSUInteger)maximumConnections { + PNURLSessionTransport *transport = [PNURLSessionTransport new]; + PNTransportMiddlewareConfiguration *configuration; +#ifdef PUBNUB_DISABLE_LOGGER + configuration = [PNTransportMiddlewareConfiguration configurationWithClientConfiguration:_configuration + clientInstanceId:self.instanceID + transport:transport + maximumConnections:maximumConnections]; +#else + configuration = [PNTransportMiddlewareConfiguration configurationWithClientConfiguration:_configuration + clientInstanceId:self.instanceID + transport:transport + maximumConnections:maximumConnections + logger:_logger]; +#endif // #ifdef PUBNUB_DISABLE_LOGGER + + return [PNTransportMiddleware middlewareWithConfiguration:configuration]; +} + + +#pragma mark - Requests helper - if (shouldCreateSubscriptionNetwork) { - _subscriptionNetwork = [PNNetwork networkForClient:self - requestTimeout:_configuration.subscribeMaximumIdleTime - maximumConnections:1 - longPoll:YES]; +- (void)performRequest:(PNBaseRequest *)userRequest + withParser:(PNOperationDataParser *)parser + completion:(PNParsedRequestCompletionBlock)handlerBlock { + PNParsedRequestCompletionBlock block = [handlerBlock copy]; + id handler; + + + if (!userRequest.responseAsFile) { + handler = ^(PNTransportRequest *request, id response, PNError *error) { + PNOperationDataParseResult *result = [parser parseOperation:userRequest.operation + withRequest:request + response:response + data:response.body + error:error]; + [self updateResult:result.result ?: result.status withRequest:request response:response]; + block(request, response, nil, result); + }; + } else { + handler = ^(PNTransportRequest *request, id response, NSURL *location, PNError *error) { + NSData *data = location ? [NSData dataWithContentsOfURL:location] : response.body; + PNOperationDataParseResult *result = [parser parseOperation:userRequest.operation + withRequest:request + response:response + data:data + error:error]; + + [self updateResult:result.result ?: result.status withRequest:request response:response]; + block(request, response, location, result); + }; } - _serviceNetwork = [PNNetwork networkForClient:self - requestTimeout:_configuration.nonSubscribeRequestTimeout - maximumConnections:maximumConnections - longPoll:NO]; + [self performRequest:userRequest withCompletion:handler]; } +- (void)performRequest:(PNBaseRequest *)userRequest withCompletion:(id)block { + dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + block = [block copy]; -#pragma mark - Requests helper + // Complete request configuration. + [userRequest setupWithClientConfiguration:self.configuration]; -- (void)performRequest:(PNRequest *)request withCompletion:(id)block { - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - __weak __typeof(self) weakSelf = self; - - if (@available(macOS 10.10, iOS 8.0, *)) { - if (self.configuration.applicationExtensionSharedGroupIdentifier) { - queue = dispatch_get_main_queue(); - } - } - + PNWeakify(self); dispatch_async(queue, ^{ - __strong __typeof__(weakSelf) strongSelf = weakSelf; - NSString *httpMethod = request.httpMethod.lowercaseString; - BOOL hasBody = [@[@"post", @"patch"] indexOfObject:httpMethod] != NSNotFound; - PNRequestParameters *parameters = request.requestParameters; - parameters.HTTPMethod = request.httpMethod; - NSData *data = hasBody ? request.bodyData : nil; - - NSError *error = request.parametersError; - id requestCompletionBlock = nil; - id errorStatus = nil; - - if (error) { - Class errorStatusClass = [self errorStatusClassForRequest:request]; - errorStatus = [errorStatusClass objectForOperation:request.operation - completedWithTask:nil - processedData:nil - processingError:error]; - [(PNStatus *)errorStatus updateCategory:PNBadRequestCategory]; - } + PNError *validationError = [userRequest validate]; + PNTransportRequest *transportRequest = userRequest.request; + BOOL isDownload = transportRequest.responseAsFile; + PNStrongify(self); - if ([request.httpMethod isEqualToString:@"GET"] && request.returnsResponse) { - requestCompletionBlock = ^(PNOperationResult *result, PNStatus *status) { - [strongSelf callBlock:block status:NO withResult:result andStatus:status]; - }; - } else { - requestCompletionBlock = ^(PNStatus *status) { - [strongSelf callBlock:block status:YES withResult:nil andStatus:status]; - }; - } - - if (errorStatus) { - if ([request.httpMethod isEqualToString:@"GET"] && request.returnsResponse) { - [strongSelf callBlock:block status:NO withResult:nil andStatus:errorStatus]; + if (validationError) { + if (!isDownload) { + ((void(^)(PNTransportRequest *, id, PNError *))block)(transportRequest, nil, validationError); } else { - [strongSelf callBlock:block status:YES withResult:nil andStatus:errorStatus]; + ((void(^)(PNTransportRequest *, id, NSURL *, PNError *))block)(transportRequest, + nil, + nil, + validationError); } + } else { + id transport; + + if (userRequest.operation == PNSubscribeOperation || userRequest.operation == PNUnsubscribeOperation) { + transport = self.subscriptionNetwork; + } else transport = self.serviceNetwork; - return; + if (!isDownload) { + [transport sendRequest:transportRequest + withCompletionBlock:^(PNTransportRequest *request, + id response, + PNError *error) { + ((void(^)(PNTransportRequest *, id, NSError *))block)(request, response, error); + }]; + } else { + [transport sendDownloadRequest:transportRequest + withCompletionBlock:^(PNTransportRequest *request, + id response, + NSURL *path, + PNError *error) { + ((void(^)(PNTransportRequest *, id, NSURL *, NSError *))block)(request, response, path, error); + }]; + } } - - [self processOperation:request.operation - withParameters:parameters - data:data - completionBlock:requestCompletionBlock]; }); } - -#pragma mark - Operation processing - -- (void)processOperation:(PNOperationType)operationType - withParameters:(PNRequestParameters *)parameters - completionBlock:(id)block { - - [self processOperation:operationType withParameters:parameters data:nil completionBlock:block]; +- (PNOperationDataParser *)parserWithResult:(Class)resultClass status:(Class)statusClass { + return [self parserWithResult:resultClass status:statusClass cryptoModule:nil]; } -- (void)processOperation:(PNOperationType)operationType - withParameters:(PNRequestParameters *)parameters - data:(NSData *)data - completionBlock:(id)block { +- (PNOperationDataParser *)parserWithStatus:(Class)statusClass { + return [self parserWithStatus:statusClass cryptoModule:nil]; +} - [self addAuthParameter:parameters]; - - if (operationType == PNSubscribeOperation || operationType == PNUnsubscribeOperation) { - [self.subscriptionNetwork processOperation:operationType - withParameters:parameters - data:data - completionBlock:block]; - } else { - [self.serviceNetwork processOperation:operationType - withParameters:parameters - data:data - completionBlock:block]; +- (PNOperationDataParser *)parserWithResult:(Class)resultClass + status:(Class)statusClass + cryptoModule:(id)cryptoModule { + NSDictionary *additionalData; + if (cryptoModule || self.configuration.cryptoModule) { + additionalData = @{ @"cryptoModule": cryptoModule ?: self.configuration.cryptoModule }; } + + return [PNOperationDataParser parserWithSerializer:self.coder + result:resultClass + status:statusClass + withAdditionalData:additionalData]; } -- (void)prepareRequiredParameters { - self.defaultPathComponents = @{@"{sub-key}": (self.configuration.subscribeKey ?: @""), - @"{pub-key}": (self.configuration.publishKey ?: @"")}; - - NSMutableDictionary *queryComponents = [@{ - @"uuid": [PNString percentEscapedString:(self.configuration.userID ?: @"")], - @"deviceid": (self.configuration.deviceID?: @""), - @"instanceid": self.instanceID, - @"pnsdk":[NSString stringWithFormat:@"PubNub-%@%%2F%@", kPNClientName, kPNLibraryVersion] - } mutableCopy]; +- (PNOperationDataParser *)parserWithStatus:(Class)statusClass cryptoModule:(id)cryptoModule { + NSDictionary *additionalData; + if (cryptoModule || self.configuration.cryptoModule) { + additionalData = @{ @"cryptoModule": cryptoModule ?: self.configuration.cryptoModule }; + } - self.defaultQueryComponents = [queryComponents copy]; + return [PNOperationDataParser parserWithSerializer:self.coder + result:nil + status:statusClass + withAdditionalData:additionalData]; } - #pragma mark - Operation information +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (NSInteger)packetSizeForOperation:(PNOperationType)operationType withParameters:(PNRequestParameters *)parameters data:(NSData *)data { - - PNNetwork *network = self.subscriptionNetwork; - - if (operationType != PNSubscribeOperation && operationType != PNUnsubscribeOperation) { - network = self.serviceNetwork; - } - - return [network packetSizeForOperation:operationType withParameters:parameters data:data]; + return 0; } +#pragma clang diagnostic pop - (void)appendClientInformation:(PNOperationResult *)result { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" result.TLSEnabled = self.configuration.isTLSEnabled; result.userID = self.configuration.userID; result.authKey = self.configuration.authToken ?: self.configuration.authKey; - result.origin = self.configuration.origin; + if (!result.origin) result.origin = self.configuration.origin; +#pragma clang diagnostic pop } @@ -618,12 +585,15 @@ - (void)callBlock:(id)block status:(BOOL)callingStatusBlock withResult:(PNOperationResult *)result andStatus:(PNStatus *)status { - - if (result) PNLogResult(self.logger, @" %@", [result stringifiedRepresentation]); - + if (result) [self appendClientInformation:result]; + if (status) [self appendClientInformation:status]; + + if (result) PNLogResult(self.logger, @" %@", [result stringifiedRepresentationWithSerializer:self.coder]); + if (status) { - if (status.isError) PNLogFailureStatus(self.logger, @" %@", [status stringifiedRepresentation]); - else PNLogStatus(self.logger, @" %@", [status stringifiedRepresentation]); + if (!status.isError) { + PNLogFailureStatus(self.logger, @" %@", [status stringifiedRepresentationWithSerializer:self.coder]); + } else PNLogStatus(self.logger, @" %@", [status stringifiedRepresentationWithSerializer:self.coder]); } if (block) { @@ -646,60 +616,49 @@ - (void)client:(PubNub *)__unused client didReceiveStatus:(PNSubscribeStatus *)s #pragma mark - Handlers +#if TARGET_OS_OSX || TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) - (void)handleContextTransition:(NSNotification *)notification { #if TARGET_OS_IOS if ([notification.name isEqualToString:UIApplicationDidEnterBackgroundNotification]) { PNLogClientInfo(self.logger, @" Did enter background execution context."); - - if (self.configuration.shouldCompleteRequestsBeforeSuspension) { - [self.subscriptionNetwork handleClientWillResignActive]; - [self.serviceNetwork handleClientWillResignActive]; - } + [self.subscriptionNetwork suspend]; + [self.serviceNetwork suspend]; } else if ([notification.name isEqualToString:UIApplicationWillEnterForegroundNotification]) { PNLogClientInfo(self.logger, @" Will enter foreground execution context."); - - if (self.configuration.shouldCompleteRequestsBeforeSuspension) { - [self.subscriptionNetwork handleClientDidBecomeActive]; - [self.serviceNetwork handleClientDidBecomeActive]; - } + [self.subscriptionNetwork resume]; + [self.serviceNetwork resume]; } #elif TARGET_OS_WATCH if ([notification.name isEqualToString:NSExtensionHostDidEnterBackgroundNotification]) { PNLogClientInfo(self.logger, @" Did enter background execution context."); + [self.subscriptionNetwork suspend]; + [self.serviceNetwork suspend]; } else if ([notification.name isEqualToString:NSExtensionHostWillEnterForegroundNotification]) { PNLogClientInfo(self.logger, @" Will enter foreground execution context."); + [self.subscriptionNetwork resume]; + [self.serviceNetwork resume]; } #elif TARGET_OS_OSX if ([notification.name isEqualToString:NSWorkspaceWillSleepNotification] || [notification.name isEqualToString:NSWorkspaceSessionDidResignActiveNotification]) { - PNLogClientInfo(self.logger, @" Workspace became inactive."); + [self.subscriptionNetwork suspend]; + [self.serviceNetwork suspend]; } else if ([notification.name isEqualToString:NSWorkspaceDidWakeNotification] || [notification.name isEqualToString:NSWorkspaceSessionDidBecomeActiveNotification]) { - PNLogClientInfo(self.logger, @" Workspace became active."); + [self.subscriptionNetwork resume]; + [self.serviceNetwork resume]; } #endif // TARGET_OS_OSX } +#endif // TARGET_OS_OSX || TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) -#pragma mark - Helpers - -- (Class)errorStatusClassForRequest:(PNRequest *)request { - Class class = [PNErrorStatus class]; - - if (PNOperationStatusClasses[request.operation]) { - class = NSClassFromString(PNOperationStatusClasses[request.operation]); - } - - return class; -} -- (void)storeUUID:(NSString *)uuid forIdentifier:(NSString *)identifier { - id storage = [PNDataStorage persistentClientDataWithIdentifier:identifier]; - [storage storeValue:uuid forKey:kPNConfigurationUserIDKey]; -} +#pragma mark - Helpers +#ifndef PUBNUB_DISABLE_LOGGER - (void)setupClientLogger { #if TARGET_OS_TV && !TARGET_OS_SIMULATOR NSSearchPathDirectory searchPath = NSCachesDirectory; @@ -710,7 +669,7 @@ - (void)setupClientLogger { NSString *logsPath = documents.lastObject; #if TARGET_OS_OSX || TARGET_OS_SIMULATOR NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; - if (NSClassFromString(@"XCTestExpectation")) { bundleIdentifier = @"com.pubnub.objc-tests"; } + if (NSClassFromString(@"XCTestExpectation")) bundleIdentifier = @"com.pubnub.objc-tests"; logsPath = [logsPath stringByAppendingPathComponent:bundleIdentifier]; #endif // TARGET_OS_OSX || TARGET_OS_SIMULATOR logsPath = [logsPath stringByAppendingPathComponent:@"Logs"]; @@ -720,7 +679,7 @@ - (void)setupClientLogger { self.logger.enabled = NO; self.logger.writeToConsole = YES; self.logger.writeToFile = YES; - [self.logger setLogLevel:(PNInfoLogLevel | PNFailureStatusLogLevel | PNAPICallLogLevel)]; + [self.logger setLogLevel:PNInfoLogLevel | PNFailureStatusLogLevel | PNAPICallLogLevel]; self.logger.logFilesDiskQuota = (50 * 1024 * 1024); self.logger.maximumLogFileSize = (5 * 1024 * 1024); self.logger.maximumNumberOfLogFiles = 5; @@ -736,8 +695,8 @@ - (void)setupClientLogger { } - (void)printLogVerbosityInformation { - NSUInteger verbosityFlags = self.logger.logLevel; NSMutableArray *enabledFlags = [NSMutableArray new]; + NSUInteger verbosityFlags = self.logger.logLevel; if (verbosityFlags & PNReachabilityLogLevel) [enabledFlags addObject:@"Reachability"]; if (verbosityFlags & PNRequestLogLevel) [enabledFlags addObject:@"Network Request"]; @@ -750,42 +709,25 @@ - (void)printLogVerbosityInformation { PNLogClientInfo(self.logger, @" Enabled verbosity level flags: %@", [enabledFlags componentsJoinedByString:@", "]); } +#endif // PUBNUB_DISABLE_LOGGER - (void)dealloc { #if TARGET_OS_IOS NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter removeObserver:self - name:UIApplicationWillEnterForegroundNotification - object:nil]; - [notificationCenter removeObserver:self - name:UIApplicationDidEnterBackgroundNotification - object:nil]; -#elif TARGET_OS_WATCH - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter removeObserver:self - name:NSExtensionHostDidEnterBackgroundNotification - object:nil]; - [notificationCenter removeObserver:self - name:NSExtensionHostWillEnterForegroundNotification - object:nil]; + [notificationCenter removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil]; + [notificationCenter removeObserver:self name:UIApplicationDidEnterBackgroundNotification object:nil]; #elif TARGET_OS_OSX NSNotificationCenter *notificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter]; [notificationCenter removeObserver:self name:NSWorkspaceWillSleepNotification object:nil]; - [notificationCenter removeObserver:self - name:NSWorkspaceSessionDidResignActiveNotification - object:nil]; + [notificationCenter removeObserver:self name:NSWorkspaceSessionDidResignActiveNotification object:nil]; [notificationCenter removeObserver:self name:NSWorkspaceDidWakeNotification object:nil]; - [notificationCenter removeObserver:self - name:NSWorkspaceSessionDidBecomeActiveNotification - object:nil]; + [notificationCenter removeObserver:self name:NSWorkspaceSessionDidBecomeActiveNotification object:nil]; #endif // TARGET_OS_OSX [_subscriptionNetwork invalidate]; _subscriptionNetwork = nil; [_serviceNetwork invalidate]; _serviceNetwork = nil; - [_telemetryManager invalidate]; - [_filesManager invalidate]; _filesManager = nil; } diff --git a/PubNub/Core/PubNub+CorePrivate.h b/PubNub/Core/PubNub+CorePrivate.h index 63e4617c3..37dd1cb26 100644 --- a/PubNub/Core/PubNub+CorePrivate.h +++ b/PubNub/Core/PubNub+CorePrivate.h @@ -1,22 +1,45 @@ #import "PubNub+Core.h" +#import +#import +#import +#import +#import +#import +#import "PNOperationDataParser.h" +#import "PNBaseRequest+Private.h" +#import "PNPrivateStructures.h" +#import "PubNub+Deprecated.h" #import "PNPublishSequence.h" -#import "PNRequest+Private.h" #import "PNStateListener.h" #import "PNFilesManager.h" #import "PNClientState.h" #import "PNSubscriber.h" -#import "PNTelemetry.h" #import "PNHeartbeat.h" #import "PNLogMacro.h" #pragma mark Class forward -@class PNRequestParameters, PNConfiguration, PNNetwork, PNOperationResult, PNStatus; +@class PNRequestParameters, PNConfiguration, PNOperationResult, PNStatus; NS_ASSUME_NONNULL_BEGIN +#pragma mark - Types + +/// Request perform and parse completion block. +/// +/// - Parameters: +/// - request: Actual request which has been used to access remote origin resource. +/// - response: Remote origin response with results of access to the resource. +/// - path: Path to the temporarily downloaded file location. +/// - result: Processed ``request`` response. +typedef void(^PNParsedRequestCompletionBlock)(PNTransportRequest *, + id, + NSURL * _Nullable, + PNOperationDataParseResult * _Nullable); + + #pragma mark - Private interface declaration /// **PubNub** client core class private extension. @@ -25,36 +48,10 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Properties -/** - * @brief Shared \a PubNub resources access serialization queue. - * - * @version 4.17.0 - * @since 4.17.0 - */ -/// Shared **PubNub** resources access serialization queue. -/// -/// - Since: 4.17.0 -@property (nonatomic, nullable, readonly, strong) dispatch_queue_t resourceAccessQueue; - -/// Current **PubNub** client configuration. -@property (nonatomic, readonly, copy) PNConfiguration *configuration; - -/// Unique instance identifier. -/// -/// - Since: 4.5.4 -@property (nonatomic, readonly, copy) NSString *instanceID; - -/// Subscription loop manager. -@property (nonatomic, readonly, strong) PNSubscriber *subscriberManager; - -/// Files upload / download manager. -/// -/// - Since: 4.15.0 -@property (nonatomic, readonly, strong) PNFilesManager *filesManager; +/// Recent client state (whether it was connected or not). +@property (nonatomic, readonly, assign) PNStatusCategory recentClientStatus; /// Publish sequence manager. -/// -/// - Since: 4.5.2 @property (nonatomic, readonly, strong) PNPublishSequence *sequenceManager; /// Client's state manager to store user's state for chats and group. @@ -63,77 +60,96 @@ NS_ASSUME_NONNULL_BEGIN /// Subscribe event listeners manager. @property (nonatomic, readonly, strong) PNStateListener *listenersManager; +/// Subscription loop manager. +@property (nonatomic, readonly, strong) PNSubscriber *subscriberManager; + +/// JSON serializer. +@property(strong, nonatomic, readonly) PNJSONSerialization *serializer; + +/// Queue on which completion / processing blocks will be called. +@property (nonatomic, readonly, strong) dispatch_queue_t callbackQueue; + /// Client's presence heartbeat manager. @property (nonatomic, readonly, strong) PNHeartbeat *heartbeatManager; -/// Network manager configured to be used for 'subscription' API group with long-polling. -@property (nonatomic, strong, nullable) PNNetwork *subscriptionNetwork; +/// Current **PubNub** client configuration. +@property (nonatomic, readonly, copy) PNConfiguration *configuration; -/// Network manager configured to be used for 'non-subscription' API group. -@property (nonatomic, strong, nullable) PNNetwork *serviceNetwork; +/// Files upload / download manager. +@property (nonatomic, readonly, strong) PNFilesManager *filesManager; -/// Client telemetry gather and publish manager. -/// -/// - Since: 4.6.2 -@property (nonatomic, readonly, strong) PNTelemetry *telemetryManager; +/// Transport for subscription loop. +@property (nonatomic, strong) id subscriptionNetwork; -/// Recent client state (whether it was connected or not). -@property (nonatomic, readonly, assign) PNStatusCategory recentClientStatus; +/// Transport for service requests (non-subscribe). +@property (nonatomic, strong) id serviceNetwork; -/// Queue on which completion / processing blocks will be called. -@property (nonatomic, readonly, strong) dispatch_queue_t callbackQueue; +/// Unique instance identifier. +@property (nonatomic, readonly, copy) NSString *instanceID; -/// Set of key/value pairs which is used in API endpoint path and common for all endpoints. -/// -/// - Since: 4.15.2 -@property (nonatomic, readonly, strong) NSDictionary *defaultPathComponents; +/// Data objects coder / decoder. +@property(strong, nonatomic, readonly) PNJSONCoder *coder; -/// Set of key/value pairs which is used in API endpoint query and common for all endpoints. -/// -/// - Since: 4.15.2 -@property (nonatomic, readonly, strong) NSDictionary *defaultQueryComponents; +/// Resources access lock. +@property(strong, nonatomic) PNLock *lock; -#pragma mark - Requests helper +#pragma mark - Requests processing /// Perform network request. /// /// - Parameters: -/// - request: Object which contain all required information to perform request. -/// - block: Request processing completion block. -- (void)performRequest:(PNRequest *)request withCompletion:(id)block; - +/// - userRequest: Object which contain all required information to perform request. +/// - parser: Pre-configured ``userRequest`` response parser. +/// - block: Request processing completion block. +- (void)performRequest:(PNBaseRequest *)userRequest + withParser:(PNOperationDataParser *)parser + completion:(PNParsedRequestCompletionBlock)block; -#pragma mark - Operation processing +/// Perform network request. +/// +/// - Parameters: +/// - userRequest: Object which contain all required information to perform request. +/// - block: Request processing completion block. Completion block can be one of: ``PNRequestCompletionBlock`` or +/// `PNDownloadRequestCompletionBlock` types. +- (void)performRequest:(PNBaseRequest *)userRequest withCompletion:(id)block; -/// Compose request to the **PubNub** network basing on operation type and passed `parameters`. +/// Create operation data parser. /// /// - Parameters: -/// - operationType: One of the `PNOperationType` enum fields which represent type of operation which should be issued -/// to **PubNub** network. -/// - parameters: Resource and query path fields wrapped into object. -/// - block: Operation processing completion block. -- (void)processOperation:(PNOperationType)operationType - withParameters:(PNRequestParameters *)parameters - completionBlock:(nullable id)block; - -/// Compose request to **PubNub** network basing on operation type and passed `parameters`. +/// - resultClass: Class of object which represents API result (for data fetching requests). +/// - statusClass: Class of object which represents API request processing status (for non-data fetching requests) or +/// error status data. +/// - Returns: Ready to use operation data parser. +- (PNOperationDataParser *)parserWithResult:(Class)resultClass status:(Class)statusClass; + +/// Create operation data parser. +/// +/// - Parameter statusClass: Class of object which represents API request processing status (for non-data fetching +/// requests) or error status data. +/// - Returns: Ready to use operation data parser. +- (PNOperationDataParser *)parserWithStatus:(Class)statusClass; + +/// Create operation data parser. /// /// - Parameters: -/// - operationType: One of the `PNOperationType` enum fields which represent type of operation which be issued to -/// **PubNub** network. -/// - parameters: Resource and query path fields wrapped into object. -/// - data: Data which should be pushed to the **PubNub** network. -/// - block: Operation processing completion block. -- (void)processOperation:(PNOperationType)operationType - withParameters:(PNRequestParameters *)parameters - data:(nullable NSData *)data - completionBlock:(nullable id)block; - -/// Compose objects which is used to provide default values for requests. +/// - resultClass: Class of object which represents API result (for data fetching requests). +/// - statusClass: Class of object which represents API request processing status (for non-data fetching requests) or +/// error status data. +/// - cryptoModule: Crypto module which should be used for data processing. +/// - Returns: Ready to use operation data parser. +- (PNOperationDataParser *)parserWithResult:(Class)resultClass + status:(Class)statusClass + cryptoModule:(nullable id)cryptoModule; + +/// Create operation data parser. /// -/// - Since: 4.15.2 -- (void)prepareRequiredParameters; +/// - Parameter statusClass: Class of object which represents API request processing status (for non-data fetching +/// requests) or error status data. +/// - cryptoModule: Crypto module which should be used for data processing. +/// - Returns: Ready to use operation data parser. +- (PNOperationDataParser *)parserWithStatus:(Class)statusClass + cryptoModule:(nullable id)cryptoModule; #pragma mark - Operation information @@ -148,7 +164,8 @@ NS_ASSUME_NONNULL_BEGIN /// - Returns: Size of the packet which include request string, host, headers and HTTP post body. - (NSInteger)packetSizeForOperation:(PNOperationType)operationType withParameters:(PNRequestParameters *)parameters - data:(NSData *)data; + data:(NSData *)data + DEPRECATED_MSG_ATTRIBUTE("This method deprecated and will be removed with the next major update."); /// Add available client information to object instance subclassed from `PNOperationResult` (`PNStatus`). /// diff --git a/PubNub/Core/PubNub+Deprecated.h b/PubNub/Core/PubNub+Deprecated.h new file mode 100644 index 000000000..b4bc59c09 --- /dev/null +++ b/PubNub/Core/PubNub+Deprecated.h @@ -0,0 +1,31 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// **PubNub** core extension for backward compatibility. +/// +/// Extension contains methods which handles deprecated features and compute required values. +@interface PubNub (Deprecated) + + +#pragma mark - Result and Status + +/// Set values for deprecated properties. +/// +/// - Parameters: +/// - result: Operation processing result object. +/// - request: Actual request which has been used to access remote origin resource. +/// - response: Remote origin response with results of access to the resource. +- (void)updateResult:(PNOperationResult *)result + withRequest:(nullable PNTransportRequest *)request + response:(nullable id)response; + +#pragma mark - + +@end + + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Core/PubNub+Deprecated.m b/PubNub/Core/PubNub+Deprecated.m new file mode 100644 index 000000000..ef7bbbe52 --- /dev/null +++ b/PubNub/Core/PubNub+Deprecated.m @@ -0,0 +1,59 @@ +#import "PubNub+Deprecated.h" +#import "PNOperationResult+Private.h" +#import "PNConfiguration+Private.h" +#import "PubNub+CorePrivate.h" +#import "PNHelpers.h" + + +#pragma mark Interface implementation + +@implementation PubNub (Deprecated) + + +#pragma mark - Result and Status + +- (void)updateResult:(PNOperationResult *)result + withRequest:(PNTransportRequest *)transportRequest + response:(id)response { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.TLSEnabled = self.configuration.isTLSEnabled; + result.userID = self.configuration.userID; + result.authKey = self.configuration.authToken ?: self.configuration.authKey; + if (result.statusCode == 0 || response.statusCode > result.statusCode) result.statusCode = response.statusCode; + result.origin = transportRequest.origin; + + if (!transportRequest) return; + + NSDictionary *query = transportRequest.query; + NSString *path = transportRequest.path; + + if (query.count > 0) { + NSMutableArray *keyValuePairs = [NSMutableArray arrayWithCapacity:query.count]; + [query enumerateKeysAndObjectsUsingBlock:^(NSString *key, id value, __unused BOOL *stop) { + value = [value isKindOfClass:[NSString class]] ? [PNString percentEscapedString:value] : value; + [keyValuePairs addObject:PNStringFormat(@"%@=%@", key, value)]; + }]; + + path = PNStringFormat(@"%@?%@", path, [keyValuePairs componentsJoinedByString:@"&"]); + } + + NSURL *url = [NSURL URLWithString:path relativeToURL:[NSURL URLWithString:transportRequest.origin]]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + request.HTTPMethod = transportRequest.stringifiedMethod; + request.timeoutInterval = transportRequest.timeout; + + if (transportRequest.method == TransportPOSTMethod || transportRequest.method == TransportPATCHMethod) { + if (transportRequest.bodyStreamAvailable) request.HTTPBodyStream = transportRequest.bodyStream; + else request.HTTPBody = transportRequest.body; + } + + request.allHTTPHeaderFields = transportRequest.headers; + result.clientRequest = request; +#pragma clang diagnostic pop +} + +#pragma mark - + + +@end diff --git a/PubNub/Core/PubNub+Files.h b/PubNub/Core/PubNub+Files.h index 716097814..a3c55e47c 100644 --- a/PubNub/Core/PubNub+Files.h +++ b/PubNub/Core/PubNub+Files.h @@ -1,14 +1,17 @@ #import + +// Request #import #import #import #import -#import +// Response #import #import #import +// Deprecated #import #import #import @@ -19,181 +22,151 @@ NS_ASSUME_NONNULL_BEGIN -#pragma mark API group interface - -/** - * @brief \b PubNub client core class extension to provide access to 'Files' API group. - * - * @discussion Set of API which allow to upload / download files. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +#pragma mark Interface implementation + +/// **PubNub** `File Share` APIs. +/// +/// A set of APIs that let you share, download files, and get a list of shared files. @interface PubNub (Files) -#pragma mark - API builder support +#pragma mark - Files API builder interdace (deprecated) -/** - * @brief Files API access builder. - * - * @return API call configuration builder. - */ +/// Files API access builder. @property (nonatomic, readonly, strong) PNFilesAPICallBuilder * (^files)(void); #pragma mark - File upload -/** - * @brief \c Send \c file to \c channel. - * - * @code - * NSURL *localFileURL = ...; - * PNSendFileRequest *request = [PNSendFileRequest requestWithChannel:@"channel" - * fileURL:localFileURL]; - * - * [self.client sendFileWithRequest:request completion:^(PNSendFileStatus *status) { - * if (!status.isError) { - * // File upload successfully completed. - * // Uploaded file information available here: - * // status.data.fileIdentifier - unique file identifier - * // status.data.fileName - name which has been used to store file - * } else { - * // Handle send file error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Check 'status.data.fileUploaded' to figure out whether request should be resent or - * // only file message publish should be called. - * } - * }]; - * @endcode - * - * @param request \c Send \c file request with all information about file and where is should be uploaded. - * @param block \c Send \c file request completion block. - */ -- (void)sendFileWithRequest:(PNSendFileRequest *)request - completion:(nullable PNSendFileCompletionBlock)block; +/// Upload file / data to specified `channel`. +/// +/// #### Example: +/// ```objc +/// NSURL *localFileURL = ...; +/// PNSendFileRequest *request = [PNSendFileRequest requestWithChannel:@"channel" fileURL:localFileURL]; +/// +/// [self.client sendFileWithRequest:request completion:^(PNSendFileStatus *status) { +/// if (!status.isError) { +/// // File upload successfully completed. +/// // Uploaded file information available here: +/// // `status.data.fileIdentifier` - unique file identifier +/// // `status.data.fileName` - name which has been used to store file +/// } else { +/// // Handle send file error. Check `category` property to find out possible issue because of which request did +/// // fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Send file` request with all information about file and where is should be uploaded. +/// - block: `Send file` request completion block. +- (void)sendFileWithRequest:(PNSendFileRequest *)request completion:(nullable PNSendFileCompletionBlock)block; #pragma mark - List files -/** - * @brief Fetch uploaded \c files \c list. - * - * @code - * PNListFilesRequest *request = [PNListFilesRequest requestWithChannel:@"channel"]; - * request.limit = 20; - * request.next = ...; - * - * [self.client listFilesWithRequest:request - * completion:^(PNListFilesResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Uploaded files list successfully fetched. - * // result.data.files - list of uploaded files (information) - * // result.data.next - cursor value to navigate to next fetched result page. - * // result.data.count - total number of files uploaded to channel. - * } else { - * // Handle fetch files list error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c List \c files request with all information which should be used to fetch channel's files list. - * @param block \c List \c files request completion block. - */ -- (void)listFilesWithRequest:(PNListFilesRequest *)request - completion:(PNListFilesCompletionBlock)block; +/// Retrieve list of files uploaded to `channel`. +/// +/// #### Example: +/// ```objc +/// PNListFilesRequest *request = [PNListFilesRequest requestWithChannel:@"channel"]; +/// request.limit = 20; +/// request.next = ...; +/// +/// [self.client listFilesWithRequest:request completion:^(PNListFilesResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Uploaded files list successfully fetched. +/// // `result.data.files` - list of uploaded files (information) +/// // `result.data.next` - cursor value to navigate to next fetched result page. +/// // `result.data.count` - total number of files uploaded to channel. +/// } else { +/// // Handle fetch files list error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `List files` request with all information which should be used to fetch channel's files list. +/// - block: `List files` request completion block. +- (void)listFilesWithRequest:(PNListFilesRequest *)request completion:(PNListFilesCompletionBlock)block; #pragma mark - Download files -/** - * @brief \c Get \c file \c download \c URL. - * - * @code - * // Generate URL which can be used to download file. - * NSURL *url = [self.client downloadURLForFileWithName:@"user_profile.png" - * identifier:@"" - * inChannel:@"lobby"]; - * @endcode - * - * @param name Name under which uploaded \c file is stored for \c channel. - * @param identifier Unique \c file identifier which has been assigned during \c file upload. - * @param channel Name of channel within which \c file with \c name has been uploaded. - * - * @return URL which can be used to download remote file with specified \c name and \c identifier. - */ +/// Generate URL which can be used to download file from target `channel`. +/// +/// #### Example: +/// ```objc +/// // Generate URL which can be used to download file. +/// NSURL *url = [self.client downloadURLForFileWithName:@"" +/// identifier:@"" +/// inChannel:@"lobby"]; +/// ``` +/// +/// - Parameters: +/// - name: Name under which uploaded `file` is stored for `channel`. +/// - identifier: Unique `file` identifier which has been assigned during `file` upload. +/// - channel: Name of channel within which `file` with `name` has been uploaded. +/// - Returns: URL which can be used to download remote file with specified `name` and `identifier`. - (nullable NSURL *)downloadURLForFileWithName:(NSString *)name identifier:(NSString *)identifier inChannel:(NSString *)channel; -/** - * @brief \c Download requested \c file (and decrypt it, if it will be required). - * - * @code - * NSURL *localFileURL = ...; - * PNDownloadFileRequest *request = [PNDownloadFileRequest requestWithChannel:@"lobby" - * identifier:@"" - * name:@"user_profile.png"]; - * request.targetURL = ...; - * - * [self.client downloadFileWithRequest:request completion:^(PNDownloadFileResult *result, - * PNErrorStatus *status) { - * - * if (!status.isError) { - * // File successfully has been downloaded. - * // status.data.location - location where downloaded file can be found - * // status.data.temporary - whether file has been downloaded to temporary storage and - * // will be removed on completion block return. - * } else { - * // Handle file download error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Download \c file request with information about file which should be downloaded. - * @param block \c Download \c file request completion block. - */ -- (void)downloadFileWithRequest:(PNDownloadFileRequest *)request - completion:(PNDownloadFileCompletionBlock)block; +/// `Download` requested `file` (and decrypt it, if it will be required). +/// +/// #### Example: +/// ```objc +/// NSURL *localFileURL = ...; +/// PNDownloadFileRequest *request = [PNDownloadFileRequest requestWithChannel:@"lobby" +/// identifier:@"" +/// name:@""]; +/// request.targetURL = ...; +/// +/// [self.client downloadFileWithRequest:request completion:^(PNDownloadFileResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // File successfully has been downloaded. +/// // `status.data.location` - location where downloaded file can be found +/// // `status.data.temporary` - whether file has been downloaded to temporary storage and will be removed on +/// // completion block return. +/// } else { +/// // Handle file download error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Download file` request with information about file which should be downloaded. +/// - block: `Download file` request completion block. +- (void)downloadFileWithRequest:(PNDownloadFileRequest *)request completion:(PNDownloadFileCompletionBlock)block; #pragma mark - Delete files -/** - * @brief \c Delete \c file from \c channel. - * - * @code - * PNDeleteFileRequest *request = [PNDeleteFileRequest requestWithChannel:@"channel" - * identifier:@"" - * name:@"greetings.txt"]; - * - * [self.client deleteFileWithRequest:request completion:^(PNAcknowledgmentStatus *status) { - * if (!status.isError) { - * // File successfully has been deleted. - * } else { - * // Handle file delete error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Delete \c file request with all information about file for removal. - * @param block \c Delete \c file request completion block. - */ -- (void)deleteFileWithRequest:(PNDeleteFileRequest *)request - completion:(nullable PNDeleteFileCompletionBlock)block; +/// `Delete file` from `channel`. +/// +/// #### Example: +/// ```objc +/// PNDeleteFileRequest *request = [PNDeleteFileRequest requestWithChannel:@"channel" +/// identifier:@"" +/// name:@""]; +/// +/// [self.client deleteFileWithRequest:request completion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // File successfully has been deleted. +/// } else { +/// // Handle file delete error. Check `category` property to find out possible issue because of which request +/// // did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Delete file` request with all information about file for removal. +/// - block: `Delete file` request completion block. +- (void)deleteFileWithRequest:(PNDeleteFileRequest *)request completion:(nullable PNDeleteFileCompletionBlock)block; #pragma mark - diff --git a/PubNub/Core/PubNub+Files.m b/PubNub/Core/PubNub+Files.m index 7ec8ca16f..ced6082fb 100644 --- a/PubNub/Core/PubNub+Files.m +++ b/PubNub/Core/PubNub+Files.m @@ -1,124 +1,113 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +#import "PubNub+Files.h" +#import "PNGenerateFileDownloadURLRequest.h" #import "PNGenerateFileUploadURLRequest.h" #import "PNGenerateFileUploadURLStatus.h" #import "PNDownloadFileRequest+Private.h" +#import "PNBaseOperationData+Private.h" +#import "PNFileListFetchData+Private.h" +#import "PNFileDownloadData+Private.h" #import "PNSendFileRequest+Private.h" #import "PNOperationResult+Private.h" -#import "PNAPICallBuilder+Private.h" -#import "PNSendFileStatus+Private.h" +#import "PNFileSendData+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFileUploadRequest.h" +#import "PNErrorData+Private.h" #import "PubNub+CorePrivate.h" -#import "PubNub+PAMPrivate.h" #import "PNStatus+Private.h" #import "PNPublishStatus.h" -#import "PNConfiguration.h" #import "PubNub+Publish.h" #import "PNCryptoModule.h" -#import "PNErrorStatus.h" -#import "PNURLBuilder.h" -#import "PubNub+Files.h" -#import "PNErrorCodes.h" +#import "PubNub+PAM.h" +#import "PNHelpers.h" + +// Deprecated +#import "PNAPICallBuilder+Private.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// **PubNub** `File Share` APIs private extension. @interface PubNub (FilesProtected) -#pragma mark - API Builder support +#pragma mark - Files API builder interdace (deprecated) -/** - * @brief Process information provider by user with builder API call and use it to send request which will upload file. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will upload file. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendFileRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request which will fetch uploaded files list. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will fetch uploaded +/// files list. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)listFilesRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and generate file download URL. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and generate file download URL. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)downloadFileURLUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to download specific file. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to download specific file. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)downloadFileRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request which will delete specific file. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will delete specific +/// file. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)deleteFileRequestUsingBuilderParameters:(NSDictionary *)parameters; #pragma mark - Handlers -/** - * @brief Handle upload URL generation success. - * - * @param status Status object with information which can be used to upload data specified by \c sendFileRequest. - * @param sendFileRequest Original \c send \c file request used to trigger upload URL generation. - * @param block \c Send \c file request processing completion block. - */ +/// Handle upload URL generation success. +/// +/// - Parameters: +/// - status: Status object with information which can be used to upload data specified by ``sendFileRequest``. +/// - sendFileRequest: Original `send file` request used to trigger upload URL generation. +/// - block: `Send file` request processing completion block. - (void)handleGenerateFileUploadURLSuccessWithStatus:(PNGenerateFileUploadURLStatus *)status sendFileRequest:(PNSendFileRequest *)sendFileRequest completion:(PNSendFileCompletionBlock)block; -/** - * @brief Handle upload URL generation failure. - * - * @param status Status object with information about what exactly went wrong during data upload. - * @param sendFileRequest Original \c send \c file request used to trigger upload URL generation. - * @param block \c Send \c file request processing completion block. - */ +/// Handle upload URL generation failure. +/// +/// - Parameters: +/// - status: Status object with information about what exactly went wrong during data upload. +/// - sendFileRequest: Original `send file` request used to trigger upload URL generation. +/// - block: `Send file` request processing completion block. - (void)handleGenerateFileUploadURLErrorWithStatus:(PNGenerateFileUploadURLStatus *)status sendFileRequest:(PNSendFileRequest *)sendFileRequest completion:(PNSendFileCompletionBlock)block; -/** - * @brief Handle \c file \c upload success. - * - * @param fileIdentifier Unique identifier which has been assigned to file during upload (upload URL generation). - * @param fileName Actual file name which has been used to store uploaded data (can be different from what has been configured - * with \c sendFileRequest). - * @param sendFileRequest Original \c send \c file request used to trigger \c file \c upload. - * @param block \c Send \c file request processing completion block. - */ +/// Handle `file upload` success. +/// +/// - Parameters: +/// - fileIdentifier: Unique identifier which has been assigned to file during upload (upload URL generation). +/// - fileName: Actual file name which has been used to store uploaded data (can be different from what has been +/// configured with ``sendFileRequest``). +/// - sendFileRequest: Original `send file` request used to trigger `file upload`. +/// - block: `Send file` request processing completion block. - (void)handleUploadFileSuccessWithFileIdentifier:(NSString *)fileIdentifier fileName:(NSString *)fileName sendFileRequest:(PNSendFileRequest *)sendFileRequest completion:(PNSendFileCompletionBlock)block; -/** - * @brief Handle \c file \c upload failure. - * - * @param fileIdentifier Unique identifier which has been assigned to file during upload (upload URL generation). - * @param fileName Actual file name which has been used to store uploaded data (can be different from what has been configured - * with \c sendFileRequest). - * @param error Error instance with information about what exactly went wrong during data upload. - * @param block \c Send \c file request processing completion block. - */ +/// Handle `file upload` failure. +/// +/// - Parameters: +/// - fileIdentifier: Unique identifier which has been assigned to file during upload (upload URL generation). +/// - fileName: Actual file name which has been used to store uploaded data (can be different from what has been +/// configured with ``sendFileRequest``). +/// - category: File upload request processing error category. +/// - block: `Send file` request processing completion block. - (void)handleUploadFileErrorWithFileIdentifier:(NSString *)fileIdentifier name:(NSString *)fileName - error:(NSError *)error + category:(PNStatusCategory)category completion:(PNSendFileCompletionBlock)block; #pragma mark - @@ -129,10 +118,12 @@ - (void)handleUploadFileErrorWithFileIdentifier:(NSString *)fileIdentifier NS_ASSUME_NONNULL_END +#pragma mark - Interface implementation + @implementation PubNub (Files) -#pragma mark - API Builder support +#pragma mark - Files API builder interdace (deprecated) - (PNFilesAPICallBuilder * (^)(void))files { PNFilesAPICallBuilder *builder = nil; @@ -170,16 +161,12 @@ - (void)sendFileRequestUsingBuilderParameters:(NSDictionary *)parameters { PNSendFileRequest *request = nil; if (stream) { - request = [PNSendFileRequest requestWithChannel:channel - fileName:name - stream:stream - size:size.unsignedIntegerValue]; + NSUInteger streamSize = size.unsignedIntegerValue; + request = [PNSendFileRequest requestWithChannel:channel fileName:name stream:stream size:streamSize]; } else if (url) { request = [PNSendFileRequest requestWithChannel:channel fileURL:url]; if (name) request.filename = name; - } else { - request = [PNSendFileRequest requestWithChannel:channel fileName:name data:data]; - } + } else request = [PNSendFileRequest requestWithChannel:channel fileName:name data:data]; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -247,64 +234,76 @@ - (void)deleteFileRequestUsingBuilderParameters:(NSDictionary *)parameters { #pragma mark - File upload -- (void)sendFileWithRequest:(PNSendFileRequest *)request completion:(PNSendFileCompletionBlock)block { +- (void)sendFileWithRequest:(PNSendFileRequest *)userRequest completion:(PNSendFileCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNGenerateFileUploadURLStatus class]]; + PNSendFileCompletionBlock block = [handlerBlock copy]; + PNGenerateFileUploadURLRequest *urlRequest = nil; - urlRequest = [PNGenerateFileUploadURLRequest requestWithChannel:request.channel filename:request.filename]; - urlRequest.parametersError = request.parametersError; + urlRequest = [PNGenerateFileUploadURLRequest requestWithChannel:userRequest.channel filename:userRequest.filename]; + urlRequest.arbitraryQueryParameters = userRequest.arbitraryQueryParameters; + [urlRequest setupWithClientConfiguration:self.configuration]; + PNParsedRequestCompletionBlock handler; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" - if (!request.cryptoModule) { - NSString *cipherKey = request.cipherKey ?: self.configuration.cipherKey; - if (!cipherKey) request.cryptoModule = self.configuration.cryptoModule; + if (!userRequest.cryptoModule) { + NSString *cipherKey = userRequest.cipherKey ?: self.configuration.cipherKey; + if (!cipherKey) userRequest.cryptoModule = self.configuration.cryptoModule; else if (![cipherKey isEqualToString:self.configuration.cipherKey]) { // Construct backward-compatible crypto module. - request.cryptoModule = [PNCryptoModule legacyCryptoModuleWithCipherKey:cipherKey - randomInitializationVector:YES]; - } + userRequest.cryptoModule = [PNCryptoModule legacyCryptoModuleWithCipherKey:cipherKey + randomInitializationVector:YES]; + } else userRequest.cryptoModule = self.configuration.cryptoModule; } #pragma clang diagnostic pop - // Retrieving URL which should be used for data upload. - [self performRequest:urlRequest withCompletion:^(PNGenerateFileUploadURLStatus *status) { + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + PNGenerateFileUploadURLStatus *status = result.status; + if (!status.isError) { - [self handleGenerateFileUploadURLSuccessWithStatus:status sendFileRequest:request completion:block]; - } else { - [self handleGenerateFileUploadURLErrorWithStatus:status sendFileRequest:request completion:block]; - } - }]; + [self handleGenerateFileUploadURLSuccessWithStatus:status sendFileRequest:userRequest completion:block]; + } else [self handleGenerateFileUploadURLErrorWithStatus:status sendFileRequest:userRequest completion:block]; + }; + + [self performRequest:urlRequest withParser:responseParser completion:handler]; } + #pragma mark - List files -- (void)listFilesWithRequest:(PNListFilesRequest *)request completion:(PNListFilesCompletionBlock)block { - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNListFilesResult *result, PNErrorStatus *status) { - if (status.isError) { - status.retryBlock = ^{ - [weakSelf listFilesWithRequest:request completion:block]; +- (void)listFilesWithRequest:(PNListFilesRequest *)userRequest completion:(PNListFilesCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNListFilesResult class] + status:[PNErrorStatus class]]; + PNListFilesCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.result) { + [result.result.data setFilesDownloadURLWithBlock:^NSURL *(NSString *identifier, NSString *name) { + return [self downloadURLForFileWithName:name identifier:identifier inChannel:userRequest.channel]; + }]; + } + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self listFilesWithRequest:userRequest completion:block]; }; - } else { - NSMutableDictionary *serviceData = [result.serviceData mutableCopy]; - NSMutableArray *updatedFiles = [NSMutableArray new]; - NSArray *files = serviceData[@"files"]; - - for (NSDictionary *file in files) { - NSMutableDictionary *updatedFile = [file mutableCopy]; - NSURL *downloadURL = [weakSelf downloadURLForFileWithName:file[@"name"] - identifier:file[@"id"] - inChannel:request.channel]; - updatedFile[@"downloadURL"] = downloadURL.absoluteString; - [updatedFiles addObject:updatedFile]; - } - - serviceData[@"files"] = updatedFiles; - [status updateData:serviceData]; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:NO withResult:result andStatus:status]; - }]; + + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } @@ -313,166 +312,192 @@ - (void)listFilesWithRequest:(PNListFilesRequest *)request completion:(PNListFil - (NSURL *)downloadURLForFileWithName:(NSString *)name identifier:(NSString *)identifier inChannel:(NSString *)channel { if (!name.length || !identifier.length || !channel.length) return nil; - NSURL *baseURL = [NSURL URLWithString:[NSString stringWithFormat:@"http%@://%@", - (self.configuration.TLSEnabled ? @"s" : @""), - self.configuration.origin]]; - PNRequestParameters *parameters = [PNRequestParameters new]; - [parameters addPathComponents:@{ @"{channel}": channel, @"{id}": identifier, @"{name}": name }]; - [parameters addPathComponents:self.defaultPathComponents]; - [parameters addQueryParameters:self.defaultQueryComponents]; - [self addAuthParameter:parameters]; - - if (parameters.shouldIncludeTelemetry) { - [parameters addQueryParameters:[self.telemetryManager operationsLatencyForRequest]]; + PNGenerateFileDownloadURLRequest *request; + request = [PNGenerateFileDownloadURLRequest requestWithChannel:channel fileIdentifier:identifier fileName:name]; + [request setupWithClientConfiguration:self.configuration]; + + if ([request validate]) return nil; + + PNTransportRequest *transportRequest = [self.serviceNetwork transportRequestFromTransportRequest:request.request]; + NSMutableString *path = [transportRequest.path mutableCopy]; + NSDictionary *query = transportRequest.query; + + if (query.count > 0) { + NSMutableArray *keyValuePairs = [NSMutableArray arrayWithCapacity:query.count]; + [query enumerateKeysAndObjectsUsingBlock:^(NSString *key, id value, __unused BOOL *stop) { + value = [value isKindOfClass:[NSString class]] ? [PNString percentEscapedString:value] : value; + [keyValuePairs addObject:PNStringFormat(@"%@=%@", key, value)]; + }]; + + [path appendFormat:@"?%@", [keyValuePairs componentsJoinedByString:@"&"]]; } - - [parameters addQueryParameter:[[NSUUID UUID] UUIDString] forFieldName:@"requestid"]; - NSURL *requestURL = [PNURLBuilder URLForOperation:PNDownloadFileOperation withParameters:parameters]; - - return [NSURL URLWithString:requestURL.absoluteString relativeToURL:baseURL]; + return [NSURL URLWithString:path relativeToURL:[NSURL URLWithString:transportRequest.origin]]; } -- (void)downloadFileWithRequest:(PNDownloadFileRequest *)request completion:(PNDownloadFileCompletionBlock)block { - NSURL *downloadURL = [self downloadURLForFileWithName:request.name - identifier:request.identifier - inChannel:request.channel]; +- (void)downloadFileWithRequest:(PNDownloadFileRequest *)userRequest completion:(PNDownloadFileCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNErrorStatus class]]; + responseParser.errorOnly = YES; + PNDownloadFileCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" - if (!request.cryptoModule) { - NSString *cipherKey = request.cipherKey ?: self.configuration.cipherKey; - if (!cipherKey) request.cryptoModule = self.configuration.cryptoModule; + if (!userRequest.cryptoModule) { + NSString *cipherKey = userRequest.cipherKey ?: self.configuration.cipherKey; + if (!cipherKey) userRequest.cryptoModule = self.configuration.cryptoModule; else if (![cipherKey isEqualToString:self.configuration.cipherKey]) { // Construct backward-compatible crypto module. - request.cryptoModule = [PNCryptoModule legacyCryptoModuleWithCipherKey:cipherKey - randomInitializationVector:YES]; - } + userRequest.cryptoModule = [PNCryptoModule legacyCryptoModuleWithCipherKey:cipherKey + randomInitializationVector:YES]; + } else userRequest.cryptoModule = self.configuration.cryptoModule; } #pragma clang diagnostic pop - BOOL temporary = request.targetURL == nil; - __weak __typeof(self) weakSelf = self; - - [self.filesManager downloadFileAtURL:downloadURL - toURL:request.targetURL - withCryptoModule:request.cryptoModule - completion:^(NSURLRequest *downloadRequest, NSURL *location, NSError *error) { - PNDownloadFileResult *result = nil; - PNErrorStatus *errorStatus = nil; - - if (error) { - NSDictionary *serviceData = error.userInfo[@"pn_serviceResponse"]; - errorStatus = [PNErrorStatus objectForOperation:request.operation - completedWithTask:nil - processedData:serviceData - processingError:error]; - - if ([error.domain isEqualToString:kPNStorageErrorDomain] && errorStatus.statusCode == -1) { - errorStatus.statusCode = error.code; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, NSURL *url, + PNOperationDataParseResult *result) { + PNStrongify(self); + BOOL temporary = userRequest.targetURL == nil; + + [self.filesManager handleDownloadedFileAtURL:url + withStoreURL:userRequest.targetURL + cryptoModule:userRequest.cryptoModule + completion:^(NSURL *location, NSError *error) { + PNErrorStatus *status = result.status; + PNDownloadFileResult *downloadResult; + + if (error && !status) { + PNErrorData *data = [PNErrorData dataWithError:error]; + status = [PNErrorStatus objectWithOperation:userRequest.operation + category:PNUnknownCategory + response:data]; + [self updateResult:status withRequest:request response:response]; } - - if (errorStatus.category == PNUnknownCategory) [errorStatus setCategory:PNDownloadErrorCategory]; - - [self appendClientInformation:errorStatus]; - errorStatus.error = YES; - - errorStatus.retryBlock = ^{ - [weakSelf downloadFileWithRequest:request completion:block]; - }; - } else { - NSDictionary *serviceData = @{ @"temporary": @(temporary), @"location": location.absoluteString }; - result = [PNDownloadFileResult objectForOperation:request.operation - completedWithTask:nil - processedData:serviceData - processingError:nil]; - result.clientRequest = downloadRequest; - } - - if (!temporary) [weakSelf callBlock:block status:NO withResult:result andStatus:errorStatus]; - else if (block) block(result, errorStatus); - }]; + + if (status && status.isError) { + if (status.category == PNUnknownCategory) status.category = PNDownloadErrorCategory; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + status.retryBlock = ^{ + [self downloadFileWithRequest:userRequest completion:block]; + }; +#pragma clang diagnostic pop + } + + if (!status.isError) { + PNFileDownloadData *data = [PNFileDownloadData dataForFileAtLocation:location temporarily:temporary]; + downloadResult = [PNDownloadFileResult objectWithOperation:userRequest.operation response:data]; + [self updateResult:downloadResult withRequest:request response:response]; + } + + if (!temporary) [self callBlock:block status:NO withResult:downloadResult andStatus:status]; + else if (block) block(downloadResult, status); + }]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } #pragma mark - Delete files -- (void)deleteFileWithRequest:(PNDeleteFileRequest *)request completion:(PNDeleteFileCompletionBlock)block { - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNAcknowledgmentStatus *status) { - if (status.isError) { - status.retryBlock = ^{ - [weakSelf deleteFileWithRequest:request completion:block]; +- (void)deleteFileWithRequest:(PNDeleteFileRequest *)userRequest completion:(PNDeleteFileCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNAcknowledgmentStatus class]]; + PNDeleteFileCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self deleteFileWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; + + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } #pragma mark - Handlers -- (void)handleGenerateFileUploadURLSuccessWithStatus:(PNGenerateFileUploadURLStatus *)status +- (void)handleGenerateFileUploadURLSuccessWithStatus:(PNGenerateFileUploadURLStatus *)generateStatus sendFileRequest:(PNSendFileRequest *)sendFileRequest completion:(PNSendFileCompletionBlock)block { - NSMutableURLRequest *uploadRequest = [NSMutableURLRequest requestWithURL:status.data.requestURL]; - uploadRequest.HTTPMethod = status.data.httpMethod.uppercaseString; - uploadRequest.HTTPBodyStream = sendFileRequest.stream; + PNFileUploadRequest *userRequest = [PNFileUploadRequest requestWithURL:generateStatus.data.requestURL + httpMethod:generateStatus.data.httpMethod + formData:generateStatus.data.formFields]; + PNOperationDataParser *responseParser = [self parserWithStatus:[PNAcknowledgmentStatus class] + cryptoModule:sendFileRequest.cryptoModule]; + responseParser.errorOnly = YES; + userRequest.cryptoModule = sendFileRequest.cryptoModule; + userRequest.filename = generateStatus.data.filename; + userRequest.bodyStream = sendFileRequest.stream; + userRequest.dataSize = sendFileRequest.size; + PNParsedRequestCompletionBlock handler; - [self.filesManager uploadWithRequest:uploadRequest - formData:status.data.formFields - filename:status.data.filename - dataSize:sendFileRequest.size - withCryptoModule:sendFileRequest.cryptoModule - completion:^(NSError *uploadError) { - if (uploadError) { - [self handleUploadFileErrorWithFileIdentifier:status.data.fileIdentifier - name:status.data.filename - error:uploadError + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + PNErrorStatus *status = result.status; + + if (status.isError) { + [self handleUploadFileErrorWithFileIdentifier:generateStatus.data.fileIdentifier + name:generateStatus.data.filename + category:result.status.category completion:block]; } else { - [self handleUploadFileSuccessWithFileIdentifier:status.data.fileIdentifier - fileName:status.data.filename + [self handleUploadFileSuccessWithFileIdentifier:generateStatus.data.fileIdentifier + fileName:generateStatus.data.filename sendFileRequest:sendFileRequest completion:block]; } - }]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } - (void)handleGenerateFileUploadURLErrorWithStatus:(PNGenerateFileUploadURLStatus *)status sendFileRequest:(PNSendFileRequest *)sendFileRequest completion:(PNSendFileCompletionBlock)block { PNStatusCategory category = status.category != PNUnknownCategory ? status.category : PNSendFileErrorCategory; - NSMutableDictionary *serviceData = [(status.serviceData ?: @{}) mutableCopy]; - serviceData[@"status"] = @(status.statusCode); - if (!serviceData[@"information"]) serviceData[@"information"] = @"Unknown error"; - - PNSendFileStatus *sendStatus = [PNSendFileStatus objectForOperation:sendFileRequest.operation - completedWithTask:nil - processedData:serviceData - processingError:nil]; + PNFileSendData *fileData = [PNFileSendData fileDataWithId:status.data.fileIdentifier name:status.data.filename]; + PNSendFileStatus *sendStatus = [PNSendFileStatus objectWithOperation:sendFileRequest.operation + category:category + response:fileData]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + sendStatus.statusCode = status.statusCode; sendStatus.retryBlock = ^{}; - - [sendStatus setCategory:category]; - [self appendClientInformation:sendStatus]; + [self updateResult:sendStatus withRequest:nil response:nil]; +#pragma clang diagnostic pop sendStatus.error = YES; - + [self callBlock:block status:YES withResult:nil andStatus:sendStatus]; } - (void)handleUploadFileSuccessWithFileIdentifier:(NSString *)fileIdentifier fileName:(NSString *)fileName sendFileRequest:(PNSendFileRequest *)sendFileRequest - completion:(PNSendFileCompletionBlock)block { + completion:(PNSendFileCompletionBlock)handlerBlock { NSUInteger fileMessagePublishRetryLimit = self.configuration.fileMessagePublishRetryLimit; + PNSendFileCompletionBlock block = [handlerBlock copy]; PNPublishFileMessageRequest *request = nil; - __weak __typeof(self) weakSelf = self; - + request = [PNPublishFileMessageRequest requestWithChannel:sendFileRequest.channel fileIdentifier:fileIdentifier name:fileName]; - request.arbitraryQueryParameters = sendFileRequest.arbitraryQueryParameters; request.metadata = sendFileRequest.fileMessageMetadata; request.store = sendFileRequest.fileMessageStore; @@ -480,36 +505,46 @@ - (void)handleUploadFileSuccessWithFileIdentifier:(NSString *)fileIdentifier if (request.store) request.ttl = sendFileRequest.fileMessageTTL; __block NSUInteger publishAttemptsCount = 1; - + PNWeakify(self); + [self publishFileMessageWithRequest:request completion:^(PNPublishStatus *status) { + PNStrongify(self); + if (!status.isError || publishAttemptsCount >= fileMessagePublishRetryLimit) { + PNFileSendData *data = [PNFileSendData fileDataWithId:fileIdentifier name:fileName]; PNSendFileStatus *sendFileStatus = nil; - NSMutableDictionary *serviceData = [@{ @"id": fileIdentifier, @"name": fileName } mutableCopy]; - if (status.data.timetoken) serviceData[@"timetoken"] = status.data.timetoken; - if (status.isError) { - serviceData[@"information"] = status.serviceData[@"information"]; - serviceData[@"status"] = @(status.statusCode) ?: @(400); + if (!status.isError) { + data.timetoken = status.data.timetoken; + sendFileStatus = [PNSendFileStatus objectWithOperation:sendFileRequest.operation response:data]; + sendFileStatus.category = PNAcknowledgmentCategory; + } else { + data.category = status.category; + sendFileStatus = [PNSendFileStatus objectWithOperation:sendFileRequest.operation + category:status.category + response:data]; } - sendFileStatus = [PNSendFileStatus objectForOperation:sendFileRequest.operation - completedWithTask:nil - processedData:serviceData - processingError:nil]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + sendFileStatus.statusCode = status.statusCode; + sendFileStatus.retryBlock = ^{}; +#pragma clang diagnostic pop sendFileStatus.data.fileUploaded = YES; - - [weakSelf appendClientInformation:sendFileStatus]; sendFileStatus.error = status.isError; - sendFileStatus.retryBlock = ^{}; - - [weakSelf callBlock:block status:YES withResult:nil andStatus:sendFileStatus]; + + [self appendClientInformation:sendFileStatus]; + [self callBlock:block status:YES withResult:nil andStatus:sendFileStatus]; } else { dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); int64_t delayInNanoseconds = (int64_t)(1 * NSEC_PER_SEC); publishAttemptsCount++; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, delayInNanoseconds), queue, ^{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [status retry]; +#pragma clang diagnostic pop }); } }]; @@ -517,29 +552,20 @@ - (void)handleUploadFileSuccessWithFileIdentifier:(NSString *)fileIdentifier - (void)handleUploadFileErrorWithFileIdentifier:(NSString *)fileIdentifier name:(NSString *)fileName - error:(NSError *)error + category:(PNStatusCategory)category completion:(PNSendFileCompletionBlock)block { - NSDictionary *serviceData = error.userInfo[@"pn_serviceResponse"]; - PNSendFileStatus *sendStatus = [PNSendFileStatus objectForOperation:PNSendFileOperation - completedWithTask:nil - processedData:serviceData - processingError:error]; - sendStatus.data.fileUploaded = YES; - sendStatus.retryBlock = ^{}; - - if ([error.domain isEqualToString:kPNStorageErrorDomain] && sendStatus.statusCode == -1) { - sendStatus.statusCode = error.code; - } - - NSMutableDictionary *updatedServiceData = [NSMutableDictionary dictionaryWithDictionary:sendStatus.serviceData]; - [updatedServiceData addEntriesFromDictionary:@{ @"id": fileIdentifier, @"name": fileName }]; - [sendStatus updateData:updatedServiceData]; - - if (sendStatus.category == PNUnknownCategory) [sendStatus setCategory:PNSendFileErrorCategory]; - [self appendClientInformation:sendStatus]; - sendStatus.error = YES; - - [self callBlock:block status:YES withResult:nil andStatus:sendStatus]; + PNFileSendData *data = [PNFileSendData fileDataWithId:fileIdentifier name:fileName]; + category = category != PNUnknownCategory ? category : PNSendFileErrorCategory; + PNSendFileStatus *status = [PNSendFileStatus objectWithOperation:PNSendFileOperation category:category response:data]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + status.statusCode = status.statusCode; + status.retryBlock = ^{}; + [self updateResult:status withRequest:nil response:nil]; +#pragma clang diagnostic pop + status.error = YES; + + [self callBlock:block status:YES withResult:nil andStatus:status]; } #pragma mark - diff --git a/PubNub/Core/PubNub+History.h b/PubNub/Core/PubNub+History.h index d9916ea69..ace4c61e2 100644 --- a/PubNub/Core/PubNub+History.h +++ b/PubNub/Core/PubNub+History.h @@ -1,639 +1,704 @@ -#import -#import -#import -#import #import +// Request +#import +#import +#import -#pragma mark Class forward +// Response +#import +#import -@class PNHistoryResult, PNErrorStatus; +// Deprecated +#import +#import +#import NS_ASSUME_NONNULL_BEGIN -#pragma mark - API group interface - -/** - * @brief \b PubNub client core class extension to provide access to 'history' API group. - * - * @discussion Set of API which allow to fetch events which has been moved from remote data object - * live feed to persistent storage. - * - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ +#pragma mark Interface declaration + +/// **PubNub** `Message Persistence` APIs. +/// +/// Set of API which allow fetching events which has been moved from remote data object live feed to persistent storage. @interface PubNub (History) -#pragma mark - API builder support - -/** - * @brief History / storage API access builder. - * - * @return API call configuration builder. - * - * @since 4.5.4 - */ -@property (nonatomic, readonly, strong) PNHistoryAPICallBuilder * (^history)(void); - -/** - * @brief History / storage manipulation API access builder. - * - * @return API call configuration builder. - * - * @since 4.7.0 - */ -@property (nonatomic, readonly, strong) PNDeleteMessageAPICallBuilder * (^deleteMessage)(void); - -/** - * @brief Storage messages count audition API call builder. - * - * @return API call configuration builder. - * - * @since 4.8.4 - */ -@property (nonatomic, readonly, strong) PNMessageCountAPICallBuilder * (^messageCounts)(void); +#pragma mark - Message persistence API builder interdace (deprecated) + +/// History / storage API access builder. +@property (nonatomic, readonly, strong) PNHistoryAPICallBuilder * (^history)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); + +/// History / storage manipulation API access builder. +@property (nonatomic, readonly, strong) PNDeleteMessageAPICallBuilder * (^deleteMessage)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); + +/// Storage messages count audition API call builder. +@property (nonatomic, readonly, strong) PNMessageCountAPICallBuilder * (^messageCounts)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); #pragma mark - Full history -/** - * @brief Allow to fetch up to \b 100 events from specified \c channel's events storage. - * - * @code - * [self.client historyForChannel:@"storage" - * withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // result.data.start - oldest message time stamp in response - * // result.data.end - newest message time stamp in response - * // result.data.messages - list of messages - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param block History pull completion block. - * - * @since 4.0 - */ -- (void)historyForChannel:(NSString *)channel withCompletion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:withCompletion:)); - -/** - * @brief Allow to fetch up to \b 100 events from specified \c channel's events storage including - * \c metadata which has been sent along with messages. - * - * @code - * [self.client historyForChannel:@"storage" withMetadata:YES - * completion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Fetched data available here: - * // result.data.channels - dictionary with single key (name of requested channel) and - * // list of dictionaries as value. Each entry will include two keys: "message" - for - * // body and "metadata" for meta which has been added during message publish. - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param shouldIncludeMetadata Whether event metadata should be included in response or not. - * @param block History pull completion block. - * - * @since 4.11.0 - */ +/// Fetch message history for channels. +/// +/// #### Example: +/// ```objc +/// PNHistoryFetchRequest *request = [PNHistoryFetchRequest requestWithChannels:@[@"channel-a", @"channel-b"]]; +/// +/// [self.client fetchHistoryWithRequest:request completion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // `result.data.start` - oldest message time stamp in response +/// // `result.data.end` - newest message time stamp in response +/// // `result.data.messages` - list of messages +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to retrieve channels history. +/// - block: History retrieve request completion block. +- (void)fetchHistoryWithRequest:(PNHistoryFetchRequest *)request completion:(PNHistoryCompletionBlock)block + NS_SWIFT_NAME(fetchHistoryWithRequest(_:completion:)); + +/// Allow to fetch up to **100** events from specified `channel`'s events storage. +/// +/// #### Example: +/// ```objc +/// [self.client historyForChannel:@"storage" withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // `result.data.start` - oldest message time stamp in response +/// // `result.data.end` - newest message time stamp in response +/// // `result.data.messages` - list of messages +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - block: History pull completion block. +- (void)historyForChannel:(NSString *)channel withCompletion:(PNHistoryCompletionBlock)block + NS_SWIFT_NAME(historyForChannel(_:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); + +/// Allow to fetch up to **100** events from specified `channel`'s events storage including `metadata` which has been +/// sent along with messages. +/// +/// #### Example: +/// ```objc +/// [self.client historyForChannel:@"storage" +/// withMetadata:YES +/// completion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Fetched data available here: +/// // `result.data.channels` - dictionary with single key (name of requested channel) and list of dictionaries +/// // as value. Each entry will include two keys: `message` - for body and `metadata` +/// // for meta which has been added during message publish. +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - shouldIncludeMetadata: Whether event metadata should be included in response or not. +/// - block: History pull completion block. - (void)historyForChannel:(NSString *)channel withMetadata:(BOOL)shouldIncludeMetadata completion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:withMetadata:completion:)); - -/** - * @brief Allow to fetch up to \b 100 events from specified \c channel's events storage including - * \c actions which has been added to messages. - * - * @code - * [self.client historyForChannel:@"chat" withMessageActions:YES - * completion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Fetched data available here: - * // result.data.channels - dictionary with single key (name of requested channel) and - * // list of dictionaries. Each entry will include two keys: "message" - for body and - * // "actions" for list of added actions. - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param shouldIncludeMessageActions Whether event actions should be included in response - * or not. - * @param block History pull completion block. - * - * @since 4.11.0 - */ + NS_SWIFT_NAME(historyForChannel(_:withMetadata:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); + +/// Allow to fetch up to **100** events from specified `channel`'s events storage including `actions` which has been +/// added to messages. +/// +/// #### Example: +/// ```objc +/// [self.client historyForChannel:@"chat" +/// withMessageActions:YES +/// completion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Fetched data available here: +/// // `result.data.channels` - dictionary with single key (name of requested channel) and list of +/// // dictionaries. +/// // Each entry will include two keys: `message` - for body and `actions` for list +/// // of added actions. +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - shouldIncludeMessageActions: Whether event actions should be included in response or not. +/// - block: History pull completion block. - (void)historyForChannel:(NSString *)channel withMessageActions:(BOOL)shouldIncludeMessageActions completion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:withMessageActions:completion:)); - -/** - * @brief Allow to fetch up to \b 100 events from specified \c channel's events storage including - * message \c meta and \c actions which has been added to messages. - * - * @code - * [self.client historyForChannel:@"chat" withMetadata:YES messageActions:YES - * completion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Fetched data available here: - * // result.data.channels - dictionary with single key (name of requested channel) and - * // list of dictionaries. Each entry will include three keys: "message" - for body, - * // "metadata" for meta which has been added during message publish and "actions" - * // for list of added actions. - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param shouldIncludeMetadata Whether event metadata should be included in response or not. - * @param shouldIncludeMessageActions Whether event actions should be included in response - * or not. - * @param block History pull completion block. - * - * @since 4.11.0 - */ + NS_SWIFT_NAME(historyForChannel(_:withMessageActions:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); + +/// Allow to fetch up to **100** events from specified `channel`'s events storage including message `meta` and `actions` +/// which has been added to messages. +/// +/// #### Example: +/// ```objc +/// [self.client historyForChannel:@"chat" +/// withMetadata:YES +/// messageActions:YES +/// completion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Fetched data available here: +/// // `result.data.channels` - dictionary with single key (name of requested channel) and list of +/// // dictionaries. Each entry will include three keys: `message` - for body, +/// // `metadata` for meta which has been added during message publish and `actions` +/// // for list of added actions. +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - shouldIncludeMetadata: Whether event metadata should be included in response or not. +/// - shouldIncludeMessageActions: Whether event actions should be included in response or not. +/// - block: History pull completion block. - (void)historyForChannel:(NSString *)channel withMetadata:(BOOL)shouldIncludeMetadata messageActions:(BOOL)shouldIncludeMessageActions completion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:withMetadata:messageActions:completion:)); + NS_SWIFT_NAME(historyForChannel(_:withMetadata:messageActions:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); #pragma mark - History in specified frame -/** - * @brief Allow to fetch events from specified \c channel's history within specified time frame. - * - * @code - * NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); - * NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); - * - * [self.client historyForChannel:@"storage" start:startDate end:endDate - * withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded history using: - * // result.data.start - oldest message time stamp in response - * // result.data.end - newest message time stamp in response - * // result.data.messages - list of messages - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param startDate Timetoken for oldest event starting from which next should be returned events. - * Value will be converted to required precision internally. - * @param endDate Timetoken for latest event till which events should be pulled out. - * Value will be converted to required precision internally. - * @param block History pull completion block. - * - * @since 4.0 - */ +/// Allow to fetch events from specified `channel`'s history within specified time frame. +/// +/// #### Example: +/// ```objc +/// NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); +/// NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); +/// +/// [self.client historyForChannel:@"storage" +/// start:startDate +/// end:endDate +/// withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded history using: +/// // `result.data.start` - oldest message time stamp in response +/// // `result.data.end` - newest message time stamp in response +/// // `result.data.messages` - list of messages +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - startDate: Timetoken for oldest event starting from which next should be returned events. +/// Value will be converted to required precision internally. +/// - endDate: Timetoken for latest event till which events should be pulled out. +/// Value will be converted to required precision internally. +/// - block: History pull completion block. - (void)historyForChannel:(NSString *)channel start:(nullable NSNumber *)startDate end:(nullable NSNumber *)endDate withCompletion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:start:end:withCompletion:)); - -/** - * @brief Allow to fetch events from specified \c channel's history within specified time frame - * including \c metadata which has been sent along with messages. - * - * @code - * NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); - * NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); - * - * [self.client historyForChannel:@"storage" start:startDate end:endDate includeMetadata:YES - * withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Fetched data available here: - * // result.data.channels - dictionary with single key (name of requested channel) and - * // list of dictionaries. Each entry will include two keys: "message" - for body and - * // "metadata" for meta which has been added during message publish. - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param startDate Timetoken for oldest event starting from which next should be returned events. - * Value will be converted to required precision internally. - * @param endDate Timetoken for latest event till which events should be pulled out. - * Value will be converted to required precision internally. - * @param shouldIncludeMetadata Whether event metadata should be included in response or not. - * @param block History pull completion block. - * - * @since 4.11.0 - */ + NS_SWIFT_NAME(historyForChannel(_:start:end:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); + +/// Allow to fetch events from specified `channel`'s history within specified time frame including `metadata` which has +/// been sent along with messages. +/// +/// #### Example: +/// ```objc +/// NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); +/// NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); +/// +/// [self.client historyForChannel:@"storage" +/// start:startDate +/// end:endDate +/// includeMetadata:YES +/// withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Fetched data available here: +/// // `result.data.channels` - dictionary with single key (name of requested channel) and list of +/// // dictionaries. Each entry will include two keys: `message` - for body and +/// // `metadata` for meta which has been added during message publish. +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - startDate: Timetoken for oldest event starting from which next should be returned events. +/// Value will be converted to required precision internally. +/// - endDate: Timetoken for latest event till which events should be pulled out. +/// Value will be converted to required precision internally. +/// - shouldIncludeMetadata: Whether event metadata should be included in response or not. +/// - block: History pull completion block. - (void)historyForChannel:(NSString *)channel start:(nullable NSNumber *)startDate end:(nullable NSNumber *)endDate includeMetadata:(BOOL)shouldIncludeMetadata withCompletion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:start:end:includeMetadata:withCompletion:)); - -/** - * @brief Allow to fetch events from specified \c channel's history within specified time frame - * including \c actions which has been added to messages. - * - * @code - * NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); - * NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); - * - * [self.client historyForChannel:@"storage" start:startDate end:endDate includeMessageActions:YES - * withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Fetched data available here: - * // result.data.channels - dictionary with single key (name of requested channel) and - * // list of dictionaries. Each entry will include two keys: "message" - for body and - * // "actions" for list of added actions. - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param startDate Timetoken for oldest event starting from which next should be returned events. - * Value will be converted to required precision internally. - * @param endDate Timetoken for latest event till which events should be pulled out. - * Value will be converted to required precision internally. - * @param shouldIncludeMessageActions Whether event actions should be included in response - * or not. - * @param block History pull completion block. - * - * @since 4.11.0 - */ + NS_SWIFT_NAME(historyForChannel(_:start:end:includeMetadata:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); + +/// Allow to fetch events from specified `channel`'s history within specified time frame including `actions` which has +/// been added to messages. +/// +/// #### Example: +/// ```objc +/// NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); +/// NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); +/// +/// [self.client historyForChannel:@"storage" +/// start:startDate +/// end:endDate +/// includeMessageActions:YES +/// withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Fetched data available here: +/// // `result.data.channels` - dictionary with single key (name of requested channel) and list of +/// // dictionaries. Each entry will include two keys: `message` - for body and +/// // `actions` for list of added actions. +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - startDate: Timetoken for oldest event starting from which next should be returned events. +/// Value will be converted to required precision internally. +/// - endDate: Timetoken for latest event till which events should be pulled out. +/// Value will be converted to required precision internally. +/// - shouldIncludeMessageActions: Whether event actions should be included in response or not. +/// - block: History pull completion block. - (void)historyForChannel:(NSString *)channel start:(nullable NSNumber *)startDate end:(nullable NSNumber *)endDate includeMessageActions:(BOOL)shouldIncludeMessageActions withCompletion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:start:end:includeMessageActions:withCompletion:)); - -/** - * @brief Allow to fetch events from specified \c channel's history within specified time frame - * including message \c meta and \c actions which has been added to messages. - * - * @code - * NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); - * NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); - * - * [self.client historyForChannel:@"storage" start:startDate end:endDate includeMetadata:YES - * includeMessageActions:YES - * withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Fetched data available here: - * // result.data.channels - dictionary with single key (name of requested channel) and - * // list of dictionaries. Each entry will include three keys: "message" - for body, - * // "metadata" for meta which has been added during message publish and "actions" for - * // list of added actions. - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param startDate Timetoken for oldest event starting from which next should be returned events. - * Value will be converted to required precision internally. - * @param endDate Timetoken for latest event till which events should be pulled out. - * Value will be converted to required precision internally. - * @param shouldIncludeMetadata Whether event metadata should be included in response or not. - * @param shouldIncludeMessageActions Whether event actions should be included in response - * or not. - * @param block History pull completion block. - * - * @since 4.11.0 - */ + NS_SWIFT_NAME(historyForChannel(_:start:end:includeMessageActions:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); + +/// Allow to fetch events from specified `channel`'s history within specified time frame including message `meta` and +/// `actions` which has been added to messages. +/// +/// #### Example: +/// ```objc +/// NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); +/// NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); +/// +/// [self.client historyForChannel:@"storage" +/// start:startDate +/// end:endDate +/// includeMetadata:YES +/// includeMessageActions:YES +/// withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Fetched data available here: +/// // `result.data.channels` - dictionary with single key (name of requested channel) and list of +/// // dictionaries. Each entry will include three keys: `message` - for body, +/// // `metadata` for meta which has been added during message publish and `actions` +/// // for list of added actions. +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - startDate: Timetoken for oldest event starting from which next should be returned events. +/// Value will be converted to required precision internally. +/// - endDate: Timetoken for latest event till which events should be pulled out. +/// Value will be converted to required precision internally. +/// - shouldIncludeMetadata: Whether event metadata should be included in response or not. +/// - shouldIncludeMessageActions: Whether event actions should be included in response or not. +/// - block: History pull completion block. - (void)historyForChannel:(NSString *)channel start:(nullable NSNumber *)startDate end:(nullable NSNumber *)endDate includeMetadata:(BOOL)shouldIncludeMetadata includeMessageActions:(BOOL)shouldIncludeMessageActions withCompletion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:start:end:includeMetadata:includeMessageActions:withCompletion:)); - -/** - * @brief Allow to fetch events from specified \c channel's history within specified time frame. - * - * @code - * NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); - * NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); - * - * [self.client historyForChannel:@"storage" start:startDate end:endDate limit:50 - * withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded history using: - * // result.data.start - oldest message time stamp in response - * // result.data.end - newest message time stamp in response - * // result.data.messages - list of messages - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param startDate Timetoken for oldest event starting from which next should be returned events. - * Value will be converted to required precision internally. - * @param endDate Timetoken for latest event till which events should be pulled out. - * Value will be converted to required precision internally. - * @param limit Maximum number of events which should be returned in response (not more then - * \b 100). - * @param block History pull completion block. - * - * @since 4.0 - */ + NS_SWIFT_NAME(historyForChannel(_:start:end:includeMetadata:includeMessageActions:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); + +/// Allow to fetch events from specified `channel`'s history within specified time frame. +/// +/// #### Example: +/// ```objc +/// NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); +/// NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); +/// +/// [self.client historyForChannel:@"storage" +/// start:startDate +/// end:endDate +/// limit:50 +/// withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded history using: +/// // `result.data.start` - oldest message time stamp in response +/// // `result.data.end` - newest message time stamp in response +/// // `result.data.messages` - list of messages +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - startDate: Timetoken for oldest event starting from which next should be returned events. +/// Value will be converted to required precision internally. +/// - endDate: Timetoken for latest event till which events should be pulled out. +/// Value will be converted to required precision internally. +/// - limit: Maximum number of events which should be returned in response (not more then **100**). +/// - block: History pull completion block. - (void)historyForChannel:(NSString *)channel start:(nullable NSNumber *)startDate end:(nullable NSNumber *)endDate limit:(NSUInteger)limit withCompletion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:start:end:limit:withCompletion:)); + NS_SWIFT_NAME(historyForChannel(_:start:end:limit:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); #pragma mark - History in frame with extended response -/** - * @brief Allow to fetch events from specified \c channel's history within specified time frame. - * - * @code - * NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); - * NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); - * - * [self.client historyForChannel:@"storage" start:startDate end:endDate includeTimeToken:YES - * withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * - * // Handle downloaded history using: - * // result.data.start - oldest message time stamp in response - * // result.data.end - newest message time stamp in response - * // result.data.messages - list of dictionaries. Each entry will include two keys: - * // "message" - for body and "timetoken" for date when message has - * // been sent. - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param startDate Timetoken for oldest event starting from which next should be returned events. - * Value will be converted to required precision internally. - * @param endDate Timetoken for latest event till which events should be pulled out. - * Value will be converted to required precision internally. - * @param shouldIncludeTimeToken Whether event dates (time tokens) should be included in response or - * not. - * @param block History pull completion block which. - * - * @since 4.0 - */ +/// Allow to fetch events from specified `channel`'s history within specified time frame. +/// +/// #### Example: +/// ```objc +/// NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); +/// NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); +/// +/// [self.client historyForChannel:@"storage" +/// start:startDate +/// end:endDate +/// includeTimeToken:YES +/// withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded history using: +/// // `result.data.start` - oldest message time stamp in response +/// // `result.data.end` - newest message time stamp in response +/// // `result.data.messages` - list of dictionaries. Each entry will include two keys: `message` - for body +/// // and `timetoken` for date when message has been sent. +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - startDate: Timetoken for oldest event starting from which next should be returned events. +/// Value will be converted to required precision internally. +/// - endDate: Timetoken for latest event till which events should be pulled out. +/// Value will be converted to required precision internally. +/// - shouldIncludeTimeToken: Whether event dates (time tokens) should be included in response or not. +/// - block: History pull completion block which. - (void)historyForChannel:(NSString *)channel start:(nullable NSNumber *)startDate end:(nullable NSNumber *)endDate includeTimeToken:(BOOL)shouldIncludeTimeToken withCompletion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:start:end:includeTimeToken:withCompletion:)); - -/** - * @brief Allow to fetch events from specified \c channel's history within specified time frame. - * - * @code - * NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); - * NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); - * - * [self.client historyForChannel:@"storage" start:startDate end:endDate - * limit:35 includeTimeToken:YES - * withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded history using: - * // result.data.start - oldest message time stamp in response - * // result.data.end - newest message time stamp in response - * // result.data.messages - list of dictionaries. Each entry will include two keys: - * // "message" - for body and "timetoken" for date when message has - * // been sent. - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param startDate Timetoken for oldest event starting from which next should be returned events. - * Value will be converted to required precision internally. - * @param endDate Timetoken for latest event till which events should be pulled out. - * Value will be converted to required precision internally. - * @param limit Maximum number of events which should be returned in response (not more then - * \b 100). - * @param shouldIncludeTimeToken Whether event dates (time tokens) should be included in response or - * not. - * @param block History pull completion block. - * - * @since 4.0 - */ + NS_SWIFT_NAME(historyForChannel(_:start:end:includeTimeToken:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); + +/// Allow to fetch events from specified `channel`'s history within specified time frame. +/// +/// #### Example: +/// ```objc +/// NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); +/// NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); +/// +/// [self.client historyForChannel:@"storage" +/// start:startDate +/// end:endDate +/// limit:35 includeTimeToken:YES +/// withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded history using: +/// // `result.data.start` - oldest message time stamp in response +/// // `result.data.end` - newest message time stamp in response +/// // `result.data.messages` - list of dictionaries. Each entry will include two keys: `message` - for body +/// // and `timetoken` for date when message has been sent. +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - startDate: Timetoken for oldest event starting from which next should be returned events. +/// Value will be converted to required precision internally. +/// - endDate: Timetoken for latest event till which events should be pulled out. +/// Value will be converted to required precision internally. +/// - limit: Maximum number of events which should be returned in response (not more then **100**). +/// - shouldIncludeTimeToken: Whether event dates (time tokens) should be included in response or not. +/// - block: History pull completion block. - (void)historyForChannel:(NSString *)channel start:(nullable NSNumber *)startDate end:(nullable NSNumber *)endDate limit:(NSUInteger)limit includeTimeToken:(BOOL)shouldIncludeTimeToken withCompletion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:start:end:limit:includeTimeToken:withCompletion:)); - -/** - * @brief Allow to fetch events from specified \c channel's history within specified time frame. - * - * @code - * NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); - * NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); - * - * [self.client historyForChannel:@"storage" start:startDate end:endDate limit:35 reverse:YES - * withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded history using: - * // result.data.start - oldest message time stamp in response - * // result.data.end - newest message time stamp in response - * // result.data.messages - list of messages - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param startDate Timetoken for oldest event starting from which next should be returned events. - * Value will be converted to required precision internally. - * @param endDate Timetoken for latest event till which events should be pulled out. - * Value will be converted to required precision internally. - * @param limit Maximum number of events which should be returned in response (not more then - * \b 100). - * @param shouldReverseOrder Whether events order in response should be reversed or not. - * @param block History pull completion block. - * - * @since 4.0 - */ + NS_SWIFT_NAME(historyForChannel(_:start:end:limit:includeTimeToken:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); + +/// Allow to fetch events from specified `channel`'s history within specified time frame. +/// +/// #### Example: +/// ```objc +/// NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); +/// NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); +/// +/// [self.client historyForChannel:@"storage" +/// start:startDate +/// end:endDate +/// limit:35 +/// reverse:YES +/// withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded history using: +/// // `result.data.start` - oldest message time stamp in response +/// // `result.data.end` - newest message time stamp in response +/// // `result.data.messages` - list of messages +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - startDate: Timetoken for oldest event starting from which next should be returned events. +/// Value will be converted to required precision internally. +/// - endDate: Timetoken for latest event till which events should be pulled out. +/// Value will be converted to required precision internally. +/// - limit: Maximum number of events which should be returned in response (not more then **100**). +/// - shouldReverseOrder: Whether events order in response should be reversed or not. +/// - block: History pull completion block. - (void)historyForChannel:(NSString *)channel start:(nullable NSNumber *)startDate end:(nullable NSNumber *)endDate limit:(NSUInteger)limit reverse:(BOOL)shouldReverseOrder withCompletion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:start:end:limit:reverse:withCompletion:)); - -/** - * @brief Allow to fetch events from specified \c channel's history within specified time frame. - * - * @code - * NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); - * NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); - * - * [self.client historyForChannel:@"storage" start:startDate end:endDate limit:35 - * reverse:YES includeTimeToken:YES - * withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded history using: - * // result.data.start - oldest message time stamp in response - * // result.data.end - newest message time stamp in response - * // result.data.messages - list of dictionaries. Each entry will include two keys: - * // "message" - for body and "timetoken" for date when message has - * // been sent. - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel for which events should be pulled out from storage. - * @param startDate Timetoken for oldest event starting from which next should be returned events. - * Value will be converted to required precision internally. - * @param endDate Timetoken for latest event till which events should be pulled out. - * Value will be converted to required precision internally. - * @param limit Maximum number of events which should be returned in response (not more then - * \b 100). - * @param shouldReverseOrder Whether events order in response should be reversed or not. - * @param shouldIncludeTimeToken Whether event dates (time tokens) should be included in response or - * not. - * @param block History pull completion block. - * - * @since 4.0 - */ + NS_SWIFT_NAME(historyForChannel(_:start:end:limit:reverse:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); + +/// Allow to fetch events from specified `channel`'s history within specified time frame. +/// +/// #### Example: +/// ```objc +/// NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); +/// NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); +/// +/// [self.client historyForChannel:@"storage" +/// start:startDate +/// end:endDate +/// limit:35 +/// reverse:YES +/// includeTimeToken:YES +/// withCompletion:^(PNHistoryResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded history using: +/// // `result.data.start` - oldest message time stamp in response +/// // `result.data.end` - newest message time stamp in response +/// // `result.data.messages` - list of dictionaries. Each entry will include two keys: `message` - for body +/// // and `timetoken` for date when message has been sent. +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel for which events should be pulled out from storage. +/// - startDate: Timetoken for oldest event starting from which next should be returned events. +/// Value will be converted to required precision internally. +/// - endDate: Timetoken for latest event till which events should be pulled out. +/// Value will be converted to required precision internally. +/// - limit: Maximum number of events which should be returned in response (not more then **100**). +/// - shouldReverseOrder: Whether events order in response should be reversed or not. +/// - shouldIncludeTimeToken: Whether event dates (time tokens) should be included in response or not. +/// - block: History pull completion block. +/// +/// @since 4.0 +//// - (void)historyForChannel:(NSString *)channel start:(nullable NSNumber *)startDate end:(nullable NSNumber *)endDate limit:(NSUInteger)limit reverse:(BOOL)shouldReverseOrder includeTimeToken:(BOOL)shouldIncludeTimeToken withCompletion:(PNHistoryCompletionBlock)block - NS_SWIFT_NAME(historyForChannel(_:start:end:limit:reverse:includeTimeToken:withCompletion:)); + NS_SWIFT_NAME(historyForChannel(_:start:end:limit:reverse:includeTimeToken:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchHistoryWithRequest:completion:' method instead."); #pragma mark - History manipulation -/** - * @brief Allow to remove events from specified \c channel's history within specified time frame. - * - * @code - * NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); - * NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); - * - * [self.client deleteMessagesFromChannel:@"storage" start:startDate end:endDate - * withCompletion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Messages within specified time frame has been removed. - * } else { - * // Handle message history download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Name of the channel from which events should be removed. - * @param startDate Timetoken for oldest event starting from which events should be removed. - * Value will be converted to required precision internally. If no \c endDate value provided, - * will be removed all events till specified \c startDate date (not inclusive). - * @param endDate Timetoken for latest event till which events should be removed. - * Value will be converted to required precision internally. If no \c startDate value provided, - * will be removed all events starting from specified \c endDate date (inclusive). - * @param block Events remove completion block. - * - * @since 4.0 - */ +/// Delete messages from `channel`. +/// +/// #### Example: +/// ```objc +/// PNHistoryMessagesDeleteRequest *request = [PNHistoryMessagesDeleteRequest requestWithChannel:@"channel-a"]; +/// request.start = @([[NSDate dateWithTimeIntervalSinceNow:-(60 * 60)] timeIntervalSince1970]); +/// request.end = @([[NSDate date] timeIntervalSince1970]); +/// +/// [self.client deleteMessagesWithRequest:request completion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Messages within specified time frame has been removed. +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to remove portion of channels messages. +/// - block: Messages delete request completion block. +- (void)deleteMessagesWithRequest:(PNHistoryMessagesDeleteRequest *)request + completion:(PNMessageDeleteCompletionBlock)block + NS_SWIFT_NAME(deleteMessagesWithRequest(_:completion:)); + +/// Allow to remove events from specified `channel`'s history within specified time frame. +/// +/// #### Example: +/// ```objc +/// NSNumber *startDate = @([[NSDate dateWithTimeIntervalSinceNow:-(60*60)] timeIntervalSince1970]); +/// NSNumber *endDate = @([[NSDate date] timeIntervalSince1970]); +/// +/// [self.client deleteMessagesFromChannel:@"storage" +/// start:startDate +/// end:endDate +/// withCompletion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Messages within specified time frame has been removed. +/// } else { +/// // Handle message history download error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Name of the channel from which events should be removed. +/// - startDate: Timetoken for oldest event starting from which events should be removed. +/// Value will be converted to required precision internally. If no `endDate` value provided, will be removed all +/// events till specified `startDate` date (not inclusive). +/// - endDate: Timetoken for latest event till which events should be removed. +/// Value will be converted to required precision internally. If no `startDate` value provided, will be removed all +/// events starting from specified `endDate` date (inclusive). +/// - block: Events remove completion block. - (void)deleteMessagesFromChannel:(NSString *)channel start:(nullable NSNumber *)startDate end:(nullable NSNumber *)endDate withCompletion:(nullable PNMessageDeleteCompletionBlock)block - NS_SWIFT_NAME(deleteMessagesFromChannel(_:start:end:withCompletion:)); + NS_SWIFT_NAME(deleteMessagesFromChannel(_:start:end:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-deleteMessagesWithRequest:completion:' method instead."); + + +#pragma mark - Messages count + + +/// Count number of messages. +/// +/// #### Example: +/// ```objc +/// PNHistoryMessagesCountRequest *request = [PNHistoryMessagesCountRequest requestWithChannel:@"channel-a"]; +/// +/// [self.client fetchMessagesCountWithRequest:request completion:^(PNMessageCountResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Messages count successfully retrieved. Per-channel count available here: `result.data.channels`. +/// } else { +/// // Messages count error. Check `category` property to find out possible issue because of which request did +/// fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to retrieve number of messaes for channels in specific timeframe. +/// - block: Messages count request completion block. +- (void)fetchMessagesCountWithRequest:(PNHistoryMessagesCountRequest *)request + completion:(PNMessageCountCompletionBlock)block; #pragma mark - diff --git a/PubNub/Core/PubNub+History.m b/PubNub/Core/PubNub+History.m index 0dd2f2080..c81ffc197 100644 --- a/PubNub/Core/PubNub+History.m +++ b/PubNub/Core/PubNub+History.m @@ -1,20 +1,13 @@ -/** - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ #import "PubNub+History.h" -#import "PNOperationResult+Private.h" -#import "PNAPICallBuilder+Private.h" -#import "PNServiceData+Private.h" +#import "PNHistoryFetchRequest+Private.h" +#import "PNBaseOperationData+Private.h" +#import "PNHistoryFetchData+Private.h" #import "PNErrorStatus+Private.h" -#import "PNRequestParameters.h" #import "PubNub+CorePrivate.h" -#import "PNSubscribeStatus.h" #import "PNStatus+Private.h" -#import "PNHistoryResult.h" -#import "PNLogMacro.h" -#import "PNHelpers.h" + +// Deprecated +#import "PNAPICallBuilder+Private.h" NS_ASSUME_NONNULL_BEGIN @@ -26,33 +19,27 @@ @interface PubNub (HistoryProtected) #pragma mark - History audition -/** - * @brief Allow to fetch events from specified \c channel's history within specified time frame. - * - * @param multipleChannels Whether history should be fetched for multiple \c object or not. If set - * to \c YES then \c object contain list of channel names for which history should be retrieved. - * @param object Name of the channel for which events should be pulled out from storage. - * @param startDate Reference on time token for oldest event starting from which next should be - * returned events. Value will be converted to required precision internally. - * @param endDate Reference on time token for latest event till which events should be pulled out. - * Value will be converted to required precision internally. - * @param limit Maximum number of events which should be returned in response (not more then - * \b 100). - * @param shouldReverseOrder Whether events order in response should be reversed or not. - * @param shouldIncludeTimeToken Whether event dates (time tokens) should be included in response or - * not. - * @param includeMessageType Whether event type should be included in response or not. - * By default set to: \b YES. - * @param includeUUID Whether event publisher UUID should be included in response or not. - * By default set to: \b YES. - * @param shouldIncludeMessageActions Whether event actions should be included in response or not. - * @param shouldIncludeMetadata Whether event metadata should be included in response or not. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block History pull completion block. - * - * @since 4.15.3 - */ +/// Allow to fetch events from specified `channel`'s history within specified time frame. +/// +/// - Parameters: +/// - multipleChannels: Whether history should be fetched for multiple ``object`` or not. If set `YES` then ``object`` +/// contain list of channel names for which history should be retrieved. +/// - object: Name of the channel for which events should be pulled out from storage. +/// - startDate: Reference on time token for oldest event starting from which next should be returned events. +/// Value will be converted to required precision internally. +/// - endDate: Reference on time token for latest event till which events should be pulled out. +/// Value will be converted to required precision internally. +/// - limit: Maximum number of events which should be returned in response (not more then **100**). +/// - shouldReverseOrder: Whether events order in response should be reversed or not. +/// - shouldIncludeTimeToken: Whether event dates (time tokens) should be included in response or not. +/// - includeMessageType: Whether event type should be included in response or not. +/// By default set to: `YES`. +/// - includeUUID: Whether event publisher UUID should be included in response or not. +/// By default set to: `YES`. +/// - shouldIncludeMessageActions: Whether event actions should be included in response or not. +/// - shouldIncludeMetadata: Whether event metadata should be included in response or not. +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. +/// - block History pull completion block. - (void)historyForChannels:(BOOL)multipleChannels object:(id)object start:(nullable NSNumber *)startDate @@ -67,18 +54,14 @@ - (void)historyForChannels:(BOOL)multipleChannels queryParameters:(nullable NSDictionary *)queryParameters withCompletion:(PNHistoryCompletionBlock)block; -/** - * @brief Allow to fetch number of messages for specified channels from specific dates (timetokens). - * - * @param channels List of channel names for which persist messages count should be fetched. - * @param timetokens List with timetokens, where each timetoken's position in correspond to target - * \c channel location in channel names list. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block Messages count pull completion block. - * - * @since 4.8.4 - */ +/// Allow to fetch number of messages for specified channels from specific dates (timetokens). +/// +/// - Parameters: +/// - channels: List of channel names for which persist messages count should be fetched. +/// - timetokens: List with timetokens, where each timetoken's position in correspond to target `channel` location in +/// channel names list. +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. +/// - block: Messages count pull completion block. - (void)messageCountForChannels:(NSArray *)channels timetokens:(nullable NSArray *)timetokens queryParameters:(nullable NSDictionary *)queryParameters @@ -87,20 +70,17 @@ - (void)messageCountForChannels:(NSArray *)channels #pragma mark - History manipulation -/** - * @brief Allow to remove events from specified \c channel's history within specified time frame. - * - * @param channel Name of the channel from which events should be removed. - * @param startDate Reference on time token for oldest event starting from which events should be - * removed. Value will be converted to required precision internally. If no \c endDate value provided, - * will be removed all events till specified \c startDate date (not inclusive). - * @param endDate Reference on time token for latest event till which events should be removed. - * Value will be converted to required precision internally. If no \c startDate value provided, will be - * removed all events starting from specified \c endDate date (inclusive). - * @param block Events remove completion block. - * - * @since 4.8.2 - */ +/// Allow to remove events from specified `channel`'s history within specified time frame. +/// +/// - Parameters: +/// - channel: Name of the channel from which events should be removed. +/// - startDate: Reference on time token for oldest event starting from which events should be removed. +/// Value will be converted to required precision internally. If no ``endDate`` value provided, will be removed all +/// events till specified ``startDate`` date (not inclusive). +/// - endDate: Reference on time token for latest event till which events should be removed. Value will be converted +/// to required precision internally. If no ``startDate`` value provided, will be removed all events starting from +/// specified ``endDate`` date (inclusive). +/// - block: Events remove completion block. - (void)deleteMessagesFromChannel:(NSString *)channel start:(nullable NSNumber *)startDate end:(nullable NSNumber *)endDate @@ -110,16 +90,12 @@ - (void)deleteMessagesFromChannel:(NSString *)channel #pragma mark - Handlers -/** - * @brief History request results handling and pre-processing before notify to completion blocks - * (if required at all). - * - * @param result Reference on object which represent server useful response data. - * @param status Reference on object which represent request processing results. - * @param block History pull completion block. - * - * @since 4.0 - */ +/// History request results handling and pre-processing before notify to completion blocks (if required at all). +/// +/// - Parameters: +/// - result: Reference on object which represent server useful response data. +/// - status: Reference on object which represent request processing results. +/// - block: History pull completion block. - (void)handleHistoryResult:(nullable PNOperationResult *)result withStatus:(nullable PNStatus *)status completion:(PNHistoryCompletionBlock)block; @@ -137,14 +113,12 @@ - (void)handleHistoryResult:(nullable PNOperationResult *)result @implementation PubNub (History) -#pragma mark - API Builder support +#pragma mark - Message persistence API builder interdace (deprecated) - (PNHistoryAPICallBuilder * (^)(void))history { - PNHistoryAPICallBuilder *builder = nil; - builder = [PNHistoryAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, + builder = [PNHistoryAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters) { - NSString *channel = parameters[NSStringFromSelector(@selector(channel))]; NSArray *channels = parameters[NSStringFromSelector(@selector(channels))]; NSNumber *limit = parameters[NSStringFromSelector(@selector(limit))]; @@ -180,9 +154,8 @@ @implementation PubNub (History) } - (PNDeleteMessageAPICallBuilder * (^)(void))deleteMessage { - PNDeleteMessageAPICallBuilder *builder = nil; - builder = [PNDeleteMessageAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, + builder = [PNDeleteMessageAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters) { NSString *channel = parameters[NSStringFromSelector(@selector(channel))]; NSNumber *start = parameters[NSStringFromSelector(@selector(start))]; @@ -190,11 +163,7 @@ @implementation PubNub (History) NSDictionary *queryParam = parameters[@"queryParam"]; id block = parameters[@"block"]; - [self deleteMessagesFromChannel:channel - start:start - end:end - queryParameters:queryParam - withCompletion:block]; + [self deleteMessagesFromChannel:channel start:start end:end queryParameters:queryParam withCompletion:block]; }]; return ^PNDeleteMessageAPICallBuilder * { @@ -203,20 +172,15 @@ @implementation PubNub (History) } - (PNMessageCountAPICallBuilder * (^)(void))messageCounts { - PNMessageCountAPICallBuilder *builder = nil; builder = [PNMessageCountAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters) { - NSArray *timetokens = parameters[NSStringFromSelector(@selector(timetokens))]; NSArray *channels = parameters[NSStringFromSelector(@selector(channels))]; NSDictionary *queryParam = parameters[@"queryParam"]; id block = parameters[@"block"]; - [self messageCountForChannels:channels - timetokens:timetokens - queryParameters:queryParam - withCompletion:block]; + [self messageCountForChannels:channels timetokens:timetokens queryParameters:queryParam withCompletion:block]; }]; return ^PNMessageCountAPICallBuilder * { @@ -227,22 +191,62 @@ @implementation PubNub (History) #pragma mark - Full history +- (void)fetchHistoryWithRequest:(PNHistoryFetchRequest *)userRequest completion:(PNHistoryCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNHistoryResult class] status:[PNErrorStatus class]]; + PNHistoryCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; + + if (userRequest.multipleChannels) { + PNLogAPICall(self.logger, @" History for '%@' channels%@%@ with %@ limit.", + (userRequest.channels != nil ? [userRequest.channels componentsJoinedByString:@", "] : @""), + (userRequest.start ? [NSString stringWithFormat:@" from %@", userRequest.start] : @""), + (userRequest.end ? [NSString stringWithFormat:@" to %@", userRequest.end] : @""), + @(userRequest.limit)); + } else { + PNLogAPICall(self.logger, @" %@ for '%@' channel%@%@ with %@ limit%@.", + (userRequest.reverse ? @"Reversed history" : @"History"), + (userRequest.channels.firstObject?: @""), + (userRequest.start ? [NSString stringWithFormat:@" from %@", userRequest.start] : @""), + (userRequest.end ? [NSString stringWithFormat:@" to %@", userRequest.end] : @""), + @(userRequest.limit), (userRequest.includeTimeToken ? @" (including: message time tokens" : @"")); + } + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self fetchHistoryWithRequest:userRequest completion:block]; + }; +#pragma clang diagnostic pop + } else if (result.result && !userRequest.multipleChannels && userRequest.channels.count == 1) { + [result.result.data setSingleChannelName:userRequest.channels.firstObject]; + } + + [self handleHistoryResult:result.result withStatus:result.status completion:block]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; + +} + - (void)historyForChannel:(NSString *)channel withCompletion:(PNHistoryCompletionBlock)block { - [self historyForChannel:channel start:nil end:nil withCompletion:block]; } - (void)historyForChannel:(NSString *)channel withMetadata:(BOOL)shouldIncludeMetadata completion:(PNHistoryCompletionBlock)block { - [self historyForChannel:channel withMetadata:shouldIncludeMetadata messageActions:NO completion:block]; } - (void)historyForChannel:(NSString *)channel withMessageActions:(BOOL)shouldIncludeMessageActions completion:(PNHistoryCompletionBlock)block { - [self historyForChannel:channel withMetadata:NO messageActions:shouldIncludeMessageActions @@ -253,7 +257,6 @@ - (void)historyForChannel:(NSString *)channel withMetadata:(BOOL)shouldIncludeMetadata messageActions:(BOOL)shouldIncludeMessageActions completion:(PNHistoryCompletionBlock)block { - [self historyForChannel:channel start:nil end:nil @@ -269,7 +272,6 @@ - (void)historyForChannel:(NSString *)channel start:(NSNumber *)startDate end:(NSNumber *)endDate withCompletion:(PNHistoryCompletionBlock)block { - [self historyForChannel:channel start:startDate end:endDate limit:100 withCompletion:block]; } @@ -278,7 +280,6 @@ - (void)historyForChannel:(NSString *)channel end:(NSNumber *)endDate includeMetadata:(BOOL)shouldIncludeMetadata withCompletion:(PNHistoryCompletionBlock)block { - [self historyForChannel:channel start:startDate end:endDate @@ -292,7 +293,6 @@ - (void)historyForChannel:(NSString *)channel end:(NSNumber *)endDate includeMessageActions:(BOOL)shouldIncludeMessageActions withCompletion:(PNHistoryCompletionBlock)block { - [self historyForChannel:channel start:startDate end:endDate @@ -307,7 +307,6 @@ - (void)historyForChannel:(NSString *)channel includeMetadata:(BOOL)shouldIncludeMetadata includeMessageActions:(BOOL)shouldIncludeMessageActions withCompletion:(PNHistoryCompletionBlock)block { - [self historyForChannels:NO object:channel start:startDate @@ -329,7 +328,6 @@ - (void)historyForChannel:(NSString *)channel end:(NSNumber *)endDate limit:(NSUInteger)limit withCompletion:(PNHistoryCompletionBlock)block { - [self historyForChannel:channel start:startDate end:endDate @@ -346,7 +344,6 @@ - (void)historyForChannel:(NSString *)channel end:(NSNumber *)endDate includeTimeToken:(BOOL)shouldIncludeTimeToken withCompletion:(PNHistoryCompletionBlock)block { - [self historyForChannel:channel start:startDate end:endDate @@ -361,7 +358,6 @@ - (void)historyForChannel:(NSString *)channel limit:(NSUInteger)limit includeTimeToken:(BOOL)shouldIncludeTimeToken withCompletion:(PNHistoryCompletionBlock)block { - [self historyForChannel:channel start:startDate end:endDate @@ -377,7 +373,6 @@ - (void)historyForChannel:(NSString *)channel limit:(NSUInteger)limit reverse:(BOOL)shouldReverseOrder withCompletion:(PNHistoryCompletionBlock)block { - [self historyForChannel:channel start:startDate end:endDate @@ -394,7 +389,6 @@ - (void)historyForChannel:(NSString *)channel reverse:(BOOL)shouldReverseOrder includeTimeToken:(BOOL)shouldIncludeTimeToken withCompletion:(PNHistoryCompletionBlock)block { - [self historyForChannels:NO object:channel start:startDate @@ -423,227 +417,75 @@ - (void)historyForChannels:(BOOL)multipleChannels includeMetadata:(NSNumber *)shouldIncludeMetadata queryParameters:(NSDictionary *)queryParameters withCompletion:(PNHistoryCompletionBlock)block { - - PNRequestParameters *parameters = [PNRequestParameters new]; - [parameters addQueryParameters:queryParameters]; - - if (startDate && endDate && [startDate compare:endDate] == NSOrderedDescending) { - NSNumber *_startDate = startDate; - startDate = endDate; - endDate = _startDate; - } - - if (!limit || limit.unsignedIntValue == 0) { - limit = nil; - } - - if (!includeMessageType) { - includeMessageType = @YES; - } - - if (!includeUUID) { - includeUUID = @YES; - } - - PNOperationType operation = (!multipleChannels ? PNHistoryOperation - : PNHistoryForChannelsOperation); - - if (shouldIncludeMessageActions && shouldIncludeMessageActions.boolValue) { - operation = PNHistoryWithActionsOperation; - } - - unsigned int defaultLimit = multipleChannels ? 25 : 100; - - if (operation == PNHistoryForChannelsOperation && ((NSArray *)object).count == 1) { - defaultLimit = 100; - } - - unsigned int limitValue = defaultLimit; - - if (limit) { - limitValue = MIN(limit.unsignedIntValue, defaultLimit); - } - - - if (operation == PNHistoryWithActionsOperation) { - if (limit) { - limitValue = limit.unsignedIntValue; - } - - if (multipleChannels) { - NSArray *channels = object; - object = channels.count ? channels.firstObject : nil; - multipleChannels = NO; - - if (channels.count > 1) { - NSString *reason = @"History can return actions data for a single channel only. " - "Either pass a single channel or disable the " - "includeMessageActions flag"; + PNHistoryFetchRequest *request; + if (!multipleChannels) request = [PNHistoryFetchRequest requestWithChannel:object]; + else request = [PNHistoryFetchRequest requestWithChannels:object]; + if (startDate) request.start = startDate; + if (endDate) request.end = endDate; + if (limit) request.limit = limit.unsignedIntegerValue; + if (shouldReverseOrder) request.reverse = shouldReverseOrder.boolValue; + if (shouldIncludeTimeToken) request.includeTimeToken = shouldIncludeTimeToken.boolValue; + if (includeMessageType) request.includeMessageType = includeMessageType.boolValue; + if (includeUUID) request.includeUUID = includeUUID.boolValue; + if (shouldIncludeMessageActions) request.includeMessageActions = shouldIncludeMessageActions.boolValue; + if (shouldIncludeMetadata) request.includeMetadata = shouldIncludeMetadata.boolValue; + request.arbitraryQueryParameters = queryParameters; - @throw [NSException exceptionWithName:@"PNUnacceptableParametersInput" - reason:reason - userInfo:nil]; - } - } - } - - if (startDate) { - [parameters addQueryParameter:[PNNumber timeTokenFromNumber:startDate].stringValue - forFieldName:@"start"]; - } - - if (endDate) { - [parameters addQueryParameter:[PNNumber timeTokenFromNumber:endDate].stringValue - forFieldName:@"end"]; - } - - if (shouldReverseOrder && shouldReverseOrder.boolValue) { - [parameters addQueryParameter:@"true" forFieldName:@"reverse"]; - } - - if (shouldIncludeMetadata && shouldIncludeMetadata.boolValue) { - [parameters addQueryParameter:@"true" forFieldName:@"include_meta"]; - } - - if (operation == PNHistoryWithActionsOperation || multipleChannels) { - [parameters addQueryParameter:(includeMessageType.boolValue ? @"true" : @"false") - forFieldName:@"include_message_type"]; - [parameters addQueryParameter:(includeUUID.boolValue ? @"true" : @"false") - forFieldName:@"include_uuid"]; - } - - if (!multipleChannels) { - if (limit) { - [parameters addQueryParameter:[NSString stringWithFormat:@"%d", limitValue] - forFieldName:(operation == PNHistoryOperation ? @"count" : @"max")]; - } - - if (shouldIncludeTimeToken && shouldIncludeTimeToken.boolValue) { - [parameters addQueryParameter:@"true" forFieldName:@"include_token"]; - } - - NSString *channel = object; - - if (channel.length) { - [parameters addPathComponent:[PNString percentEscapedString:channel] - forPlaceholder:@"{channel}"]; - } - - PNLogAPICall(self.logger, @" %@ for '%@' channel%@%@ with %@ limit%@.", - (shouldReverseOrder && shouldReverseOrder.boolValue ? @"Reversed history" : @"History"), - (channel?: @""), - (startDate ? [NSString stringWithFormat:@" from %@", startDate] : @""), - (endDate ? [NSString stringWithFormat:@" to %@", endDate] : @""), @(limitValue), - (shouldIncludeTimeToken.boolValue ? @" (including: message time tokens" : @"")); - } else { - NSArray *channels = object; - - if (limit || (channels.count == 1 && operation != PNHistoryWithActionsOperation)) { - [parameters addQueryParameter:[NSString stringWithFormat:@"%d", limitValue] - forFieldName:@"max"]; - } - - if (channels.count) { - [parameters addPathComponent:[PNChannel namesForRequest:channels] - forPlaceholder:@"{channels}"]; - } - - PNLogAPICall(self.logger, @" History for '%@' channels%@%@ with %@ limit.", - (channels != nil ? [channels componentsJoinedByString:@", "] : @""), - (startDate ? [NSString stringWithFormat:@" from %@", startDate] : @""), - (endDate ? [NSString stringWithFormat:@" to %@", endDate] : @""), @(limitValue)); - } - - __weak __typeof(self) weakSelf = self; - [self processOperation:operation - withParameters:parameters - completionBlock:^(PNOperationResult *result, PNStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf historyForChannels:multipleChannels - object:object - start:startDate - end:endDate - limit:limit - reverse:shouldReverseOrder - includeTimeToken:shouldIncludeTimeToken - includeMessageType:includeMessageType - includeUUID:includeUUID - includeMessageActions:shouldIncludeMessageActions - includeMetadata:shouldIncludeMetadata - queryParameters:queryParameters - withCompletion:block]; - }; - } - - [weakSelf handleHistoryResult:result withStatus:status completion:block]; - }]; + [self fetchHistoryWithRequest:request completion:block]; } - (void)messageCountForChannels:(NSArray *)channels timetokens:(NSArray *)timetokens queryParameters:(NSDictionary *)queryParameters withCompletion:(PNMessageCountCompletionBlock)block { - - PNRequestParameters *parameters = [PNRequestParameters new]; - NSUInteger timetokensCount = timetokens.count; - NSNumber *timetoken = timetokens.firstObject; - - [parameters addQueryParameters:queryParameters]; - - if (channels.count && (timetokensCount == 1 || timetokensCount == channels.count)) { - [parameters addPathComponent:[PNChannel namesForRequest:channels] - forPlaceholder:@"{channels}"]; - } - - if (timetokensCount > 0) { - if (timetokensCount == 1) { - [parameters addQueryParameter:[PNNumber timeTokenFromNumber:timetoken].stringValue - forFieldName:@"timetoken"]; - } else { - NSMutableArray *pubNubTimetokens = [NSMutableArray arrayWithCapacity:timetokensCount]; - - for (NSNumber *timetoken in timetokens) { - [pubNubTimetokens addObject:[PNNumber timeTokenFromNumber:timetoken].stringValue]; - } - - [parameters addQueryParameter:[pubNubTimetokens componentsJoinedByString:@","] - forFieldName:@"channelsTimetoken"]; - } - } - - PNLogAPICall(self.logger, @" Messages count fetch for '%@' channels%@%@.", - (channels != nil ? [channels componentsJoinedByString:@", "] : @""), - (timetokensCount == 1 ? [NSString stringWithFormat:@" starting from %@", timetoken] : @""), - (timetokensCount > 1 ? [NSString stringWithFormat:@" with per-channel starting point %@", - [timetokens componentsJoinedByString:@","]] : @"")); - - __weak __typeof(self) weakSelf = self; - [self processOperation:PNMessageCountOperation - withParameters:parameters - completionBlock:^(PNOperationResult *result, PNStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf messageCountForChannels:channels - timetokens:timetokens - queryParameters:queryParameters - withCompletion:block]; + PNHistoryMessagesCountRequest *request = [PNHistoryMessagesCountRequest requestWithChannels:channels + timetokens:timetokens]; + request.arbitraryQueryParameters = queryParameters; + + [self fetchMessagesCountWithRequest:request completion:block]; +} + +#pragma mark - History manipulation + +- (void)deleteMessagesWithRequest:(PNHistoryMessagesDeleteRequest *)userRequest + completion:(PNMessageDeleteCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNAcknowledgmentStatus class]]; + PNMessageDeleteCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNLogAPICall(self.logger, @" Delete messages from '%@' channel%@%@.", + (userRequest.channel?: @""), + (userRequest.start + ? [NSString stringWithFormat:@" %@ %@", userRequest.end ? @"from" : @"till", userRequest.start] + : @""), + (userRequest.end + ? [NSString stringWithFormat:@" %@ %@", userRequest.start ? @"to" : @"from", userRequest.end] + : @"")); + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self deleteMessagesWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - [weakSelf callBlock:block status:NO withResult:(status ? nil : result) andStatus:status]; - }]; -} + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; -#pragma mark - History manipulation + [self performRequest:userRequest withParser:responseParser completion:handler]; +} - (void)deleteMessagesFromChannel:(NSString *)channel start:(NSNumber *)startDate end:(NSNumber *)endDate withCompletion:(PNMessageDeleteCompletionBlock)block { - [self deleteMessagesFromChannel:channel start:startDate end:endDate @@ -656,57 +498,52 @@ - (void)deleteMessagesFromChannel:(NSString *)channel end:(NSNumber *)endDate queryParameters:(NSDictionary *)queryParameters withCompletion:(PNMessageDeleteCompletionBlock)block { - - // Swap time frame dates if required. - if (startDate && endDate && [startDate compare:endDate] == NSOrderedDescending) { - NSNumber *_startDate = startDate; - startDate = endDate; - endDate = _startDate; - } - - PNRequestParameters *parameters = [PNRequestParameters new]; - [parameters addQueryParameters:queryParameters]; - parameters.HTTPMethod = @"DELETE"; - - if (startDate) { - [parameters addQueryParameter:[PNNumber timeTokenFromNumber:startDate].stringValue - forFieldName:@"start"]; - } - - if (endDate) { - [parameters addQueryParameter:[PNNumber timeTokenFromNumber:endDate].stringValue - forFieldName:@"end"]; - } - - if (channel.length) { - [parameters addPathComponent:[PNString percentEscapedString:channel] - forPlaceholder:@"{channel}"]; - } - - PNLogAPICall(self.logger, @" Delete messages from '%@' channel%@%@.", - (channel?: @""), - (startDate ? [NSString stringWithFormat:@" %@ %@", - endDate ? @"from" : @"till", startDate] : @""), - (endDate ? [NSString stringWithFormat:@" %@ %@", - startDate ? @"to" : @"from", endDate] : @"")); - - __weak __typeof(self) weakSelf = self; - [self processOperation:PNDeleteMessageOperation - withParameters:parameters - completionBlock:^(PNStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf deleteMessagesFromChannel:channel - start:startDate - end:endDate - queryParameters:queryParameters - withCompletion:block]; + PNHistoryMessagesDeleteRequest *request = [PNHistoryMessagesDeleteRequest requestWithChannel:channel]; + request.start = startDate; + request.end = endDate; + request.arbitraryQueryParameters = queryParameters; + + [self deleteMessagesWithRequest:request completion:block]; +} + + +#pragma mark - Messages count + + +- (void)fetchMessagesCountWithRequest:(PNHistoryMessagesCountRequest *)userRequest + completion:(PNMessageCountCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNMessageCountResult class] + status:[PNErrorStatus class]]; + PNMessageCountCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNLogAPICall(self.logger, @" Messages count fetch for '%@' channels%@%@.", + [userRequest.channels componentsJoinedByString:@", "], + (userRequest.timetokens.count == 1 + ? [NSString stringWithFormat:@" starting from %@", userRequest.timetokens.firstObject] + : @""), + (userRequest.timetokens.count > 1 + ? [NSString stringWithFormat:@" with per-channel starting point %@", [userRequest.timetokens componentsJoinedByString:@","]] + : @"")); + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self fetchMessagesCountWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; + + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } @@ -716,24 +553,12 @@ - (void)handleHistoryResult:(PNHistoryResult *)result withStatus:(PNErrorStatus *)status completion:(PNHistoryCompletionBlock)block { - if (result && (result.serviceData[@"decryptError"] || result.serviceData[@"apiError"])) { - PNStatusCategory category = result.serviceData[@"decryptError"] ? PNDecryptionErrorCategory - : PNAccessDeniedCategory; - status = [PNErrorStatus statusForOperation:PNHistoryOperation - category:category - withProcessingError:nil]; - - NSMutableDictionary *updatedData = [result.serviceData mutableCopy]; - [updatedData removeObjectsForKeys:@[@"decryptError", @"apiError", @"envelope"]]; - - if (category == PNDecryptionErrorCategory) { - status.associatedObject = [PNHistoryData dataWithServiceResponse:updatedData]; - } - - [status updateData:updatedData]; + if (result.data.decryptError) { + status = [PNErrorStatus objectWithOperation:PNHistoryOperation category:PNDecryptionErrorCategory response:nil]; + status.associatedObject = result.data; } - [self callBlock:block status:NO withResult:(status ? nil : result) andStatus:status]; + [self callBlock:block status:NO withResult:status ? nil : result andStatus:status]; } #pragma mark - diff --git a/PubNub/Core/PubNub+MessageActions.h b/PubNub/Core/PubNub+MessageActions.h index 83f69417e..ffe88f0dd 100644 --- a/PubNub/Core/PubNub+MessageActions.h +++ b/PubNub/Core/PubNub+MessageActions.h @@ -1,155 +1,130 @@ #import +// Request #import #import #import +// Response #import #import +#import -#import -#import +// Deprecated #import +#import +#import NS_ASSUME_NONNULL_BEGIN -#pragma mark API group interface - -/** - * @brief \b PubNub client core class extension to provide access to 'Message Actions' API group. - * - * @discussion Set of API which allow to manage \c actions attached to particular \c message and - * fetch previous changes. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ +#pragma mark Interface declaration + +/// **PubNub** `Message Reaction` APIs. +/// +/// Set of API which allow managing reactions attached to particular message and fetch previous changes. @interface PubNub (MessageActions) -#pragma mark - Message Actions API builder support +#pragma mark - Message Actions API builder interdace (deprecated) -/** - * @brief \c Add \c message \c action API access builder block. - * - * @return API call configuration builder. - */ -@property (nonatomic, readonly, strong) PNAddMessageActionAPICallBuilder * (^addMessageAction)(void); +/// `Add message action` API access builder block. +@property (nonatomic, readonly, strong) PNAddMessageActionAPICallBuilder * (^addMessageAction)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); -/** - * @brief \c Remove \c message \c action API access builder block. - * - * @return API call configuration builder. - */ -@property (nonatomic, readonly, strong) PNRemoveMessageActionAPICallBuilder * (^removeMessageAction)(void); +/// `Remove message action` API access builder block. +@property (nonatomic, readonly, strong) PNRemoveMessageActionAPICallBuilder * (^removeMessageAction)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); -/** - * @brief \c Fetch \c message \c actions API access builder block. - * - * @return API call configuration builder. - */ -@property (nonatomic, readonly, strong) PNFetchMessagesActionsAPICallBuilder * (^fetchMessageActions)(void); +/// `Fetch message actions` API access builder block. +@property (nonatomic, readonly, strong) PNFetchMessagesActionsAPICallBuilder * (^fetchMessageActions)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); #pragma mark - Message actions -/** - * @brief \c Add \c message \c action. - * - * @code - * PNAddMessageActionRequest *request = [PNAddMessageActionRequest requestWithChannel:@"PubNub" - * messageTimetoken:@(1234567890)]; - * request.type = @"reaction"; - * request.value = @"smile"; - * - * [self.client addMessageActionWithRequest:request completion:^(PNAddMessageActionStatus *status) { - * if (!status.isError) { - * // Message action successfully added. - * // Created message action information available here: status.data.action - * } else { - * if (status.statusCode == 207) { - * // Message action has been added, but event not published. - * } else { - * // Handle add message action error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * } - * }]; - * @endcode - * - * @param request \c Add \c message \c action request with all information about new - * \c message \c action which will be passed to \b PubNub service. - * @param block \c Add \c message \c action request completion block. - */ +/// Add an action on a published `message`. +/// +/// #### Example: +/// ```objc +/// PNAddMessageActionRequest *request = [PNAddMessageActionRequest requestWithChannel:@"PubNub" +/// messageTimetoken:@(1234567890)]; +/// request.type = @"reaction"; +/// request.value = @"smile"; +/// +/// [self.client addMessageActionWithRequest:request completion:^(PNAddMessageActionStatus *status) { +/// if (!status.isError) { +/// // Message action successfully added. +/// // Created message action information available here: `status.data.action` +/// } else { +/// if (status.statusCode == 207) { +/// // Message action has been added, but event not published. +/// } else { +/// // Handle add message action error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Add message action` request with all information about new `message action` which will be passed to +/// **PubNub** service. +/// - block: `Add message action` request completion `block`. - (void)addMessageActionWithRequest:(PNAddMessageActionRequest *)request completion:(nullable PNAddMessageActionCompletionBlock)block; -/** - * @brief \c Remove \c message \c action. - * - * @code - * PNRemoveMessageActionRequest *request = [PNRemoveMessageActionRequest requestWithChannel:@"chat" - * messageTimetoken:@(1234567890)]; - * request.actionTimetoken = @(1234567891); - * - * [self.client removeMessageActionWithRequest:request - * completion:^(PNAcknowledgmentStatus *status) { - * - * if (!status.isError) { - * // Message action successfully removed. - * } else { - * // Handle remove message action error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Remove \c message \c action request with information about existing - * \c message \c action. - * @param block \c Remove \c message \c action request completion block. - */ +/// Remove a previously added action on a published `message`. +/// +/// #### Example: +/// ```objc +/// PNRemoveMessageActionRequest *request = [PNRemoveMessageActionRequest requestWithChannel:@"chat" +/// messageTimetoken:@(1234567890)]; +/// request.actionTimetoken = @(1234567891); +/// +/// [self.client removeMessageActionWithRequest:request completion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Message action successfully removed. +/// } else { +/// // Handle remove message action error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Remove message action` request with information about existing `message action`. +/// - block: `Remove message action` request completion block. - (void)removeMessageActionWithRequest:(PNRemoveMessageActionRequest *)request completion:(nullable PNRemoveMessageActionCompletionBlock)block; -/** - * @brief \c Fetch \c message \c actions. - * - * @code - * PNFetchMessageActionsRequest *request = [PNFetchMessageActionsRequest requestWithChannel:@"chat"]; - * request.start = @(1234567891); - * request.limit = 200; - * - * [self.client fetchMessageActionsWithRequest:request - * completion:^(PNFetchMessageActionsResult *result, - PNErrorStatus *status) { - * - * if (!status.isError) { - * // Message actions successfully fetched. - * // Result object has following information: - * // result.data.actions - list of message action instances - * // result.data.start - fetched messages actions time range start (oldest message - * // action timetoken). - * // result.data.end - fetched messages actions time range end (newest action timetoken). - * } else { - * // Handle fetch message actions error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Fetch \c message \c actions request with all information which should be used - * to fetch existing \c message \c actions. - * @param block \c Fetch \c message \c actions request completion block. - */ +/// `Fetch message actions`. +/// +/// #### Example: +/// ```objc +/// PNFetchMessageActionsRequest *request = [PNFetchMessageActionsRequest requestWithChannel:@"chat"]; +/// request.start = @(1234567891); +/// request.limit = 200; +/// +/// [self.client fetchMessageActionsWithRequest:request +/// completion:^(PNFetchMessageActionsResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Message actions successfully fetched. +/// // Result object has following information: +/// // `result.data.actions` - list of message action instances +/// // `result.data.start` - fetched messages actions time range start (oldest message action timetoken). +/// // `result.data.end` - fetched messages actions time range end (newest action timetoken). +/// } else { +/// // Handle fetch message actions error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Fetch message actions` request with all information which should be used to fetch existing +/// `message actions`. +/// - block: `Fetch message actions` request completion block. - (void)fetchMessageActionsWithRequest:(PNFetchMessageActionsRequest *)request completion:(PNFetchMessageActionsCompletionBlock)block; diff --git a/PubNub/Core/PubNub+MessageActions.m b/PubNub/Core/PubNub+MessageActions.m index a3c902c76..ca249c24d 100644 --- a/PubNub/Core/PubNub+MessageActions.m +++ b/PubNub/Core/PubNub+MessageActions.m @@ -1,29 +1,25 @@ -/** - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNAPICallBuilder+Private.h" #import "PubNub+MessageActions.h" #import "PubNub+CorePrivate.h" #import "PNStatus+Private.h" +// Deprecated +#import "PNAPICallBuilder+Private.h" + #pragma mark Interface implementation @implementation PubNub (MessageActions) -#pragma mark - Message Actions API builder support +#pragma mark - Message Actions API builder interdace (deprecated) - (PNAddMessageActionAPICallBuilder * (^)(void))addMessageAction { PNAddMessageActionAPICallBuilder *builder = nil; - __weak __typeof(self) weakSelf = self; + PNWeakify(self); builder = [PNAddMessageActionAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, - NSDictionary *parameters) { - + NSDictionary *parameters) { + PNStrongify(self); NSNumber *timetoken = parameters[NSStringFromSelector(@selector(messageTimetoken))]; NSString *channel = parameters[NSStringFromSelector(@selector(channel))]; PNAddMessageActionRequest *request = nil; @@ -32,7 +28,7 @@ @implementation PubNub (MessageActions) request.value = parameters[NSStringFromSelector(@selector(value))]; request.type = parameters[NSStringFromSelector(@selector(type))]; - [weakSelf addMessageActionWithRequest:request completion:parameters[@"block"]]; + [self addMessageActionWithRequest:request completion:parameters[@"block"]]; }]; return ^PNAddMessageActionAPICallBuilder * { @@ -42,20 +38,21 @@ @implementation PubNub (MessageActions) - (PNRemoveMessageActionAPICallBuilder * (^)(void))removeMessageAction { PNRemoveMessageActionAPICallBuilder *builder = nil; - __weak __typeof(self) weakSelf = self; + PNWeakify(self); builder = [PNRemoveMessageActionAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters) { - + PNStrongify(self); + NSNumber *actionTimetoken = parameters[NSStringFromSelector(@selector(actionTimetoken))]; NSNumber *timetoken = parameters[NSStringFromSelector(@selector(messageTimetoken))]; NSString *channel = parameters[NSStringFromSelector(@selector(channel))]; PNRemoveMessageActionRequest *request = nil; request = [PNRemoveMessageActionRequest requestWithChannel:channel - messageTimetoken:timetoken]; - request.actionTimetoken = parameters[NSStringFromSelector(@selector(actionTimetoken))]; + messageTimetoken:timetoken + actionTimetoken:actionTimetoken]; - [weakSelf removeMessageActionWithRequest:request completion:parameters[@"block"]]; + [self removeMessageActionWithRequest:request completion:parameters[@"block"]]; }]; return ^PNRemoveMessageActionAPICallBuilder * { @@ -65,12 +62,12 @@ @implementation PubNub (MessageActions) - (PNFetchMessagesActionsAPICallBuilder * (^)(void))fetchMessageActions { PNFetchMessagesActionsAPICallBuilder *builder = nil; - __weak __typeof(self) weakSelf = self; + PNWeakify(self); builder = [PNFetchMessagesActionsAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, - NSDictionary *parameters) { - - NSNumber *limit = parameters[NSStringFromSelector(@selector(limit))] ?: @(100); + NSDictionary *parameters) { + PNStrongify(self); + NSNumber *limit = parameters[NSStringFromSelector(@selector(limit))] ?: @100; NSString *channel = parameters[NSStringFromSelector(@selector(channel))]; PNFetchMessageActionsRequest *request = nil; @@ -79,7 +76,7 @@ @implementation PubNub (MessageActions) request.end = parameters[NSStringFromSelector(@selector(end))]; request.limit = limit.unsignedIntegerValue; - [weakSelf fetchMessageActionsWithRequest:request completion:parameters[@"block"]]; + [self fetchMessageActionsWithRequest:request completion:parameters[@"block"]]; }]; return ^PNFetchMessagesActionsAPICallBuilder * { @@ -90,54 +87,84 @@ @implementation PubNub (MessageActions) #pragma mark - Message actions -- (void)addMessageActionWithRequest:(PNAddMessageActionRequest *)request - completion:(nullable PNAddMessageActionCompletionBlock)block { +- (void)addMessageActionWithRequest:(PNAddMessageActionRequest *)userRequest + completion:(PNAddMessageActionCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNAddMessageActionStatus class]]; + PNAddMessageActionCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNAddMessageActionStatus *status) { - if (status.isError) { - status.retryBlock = ^{ - [weakSelf addMessageActionWithRequest:request completion:block]; + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self addMessageActionWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; + + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } -- (void)removeMessageActionWithRequest:(PNRemoveMessageActionRequest *)request - completion:(nullable PNRemoveMessageActionCompletionBlock)block { +- (void)removeMessageActionWithRequest:(PNRemoveMessageActionRequest *)userRequest + completion:(PNRemoveMessageActionCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNAcknowledgmentStatus class]]; + PNRemoveMessageActionCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNAcknowledgmentStatus *status) { - if (status.isError) { - status.retryBlock = ^{ - [weakSelf removeMessageActionWithRequest:request completion:block]; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self removeMessageActionWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; + + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } -- (void)fetchMessageActionsWithRequest:(PNFetchMessageActionsRequest *)request - completion:(PNFetchMessageActionsCompletionBlock)block { - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request - withCompletion:^(PNFetchMessageActionsResult *result, PNErrorStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf fetchMessageActionsWithRequest:request completion:block]; +- (void)fetchMessageActionsWithRequest:(PNFetchMessageActionsRequest *)userRequest + completion:(PNFetchMessageActionsCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNFetchMessageActionsResult class] + status:[PNErrorStatus class]]; + PNFetchMessageActionsCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self fetchMessageActionsWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - [weakSelf callBlock:block status:NO withResult:result andStatus:status]; - }]; + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } #pragma mark - diff --git a/PubNub/Core/PubNub+Objects.h b/PubNub/Core/PubNub+Objects.h index 70e4d39bd..673566f45 100644 --- a/PubNub/Core/PubNub+Objects.h +++ b/PubNub/Core/PubNub+Objects.h @@ -1,639 +1,579 @@ #import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import + +// Request #import +#import #import +#import +#import +#import +#import +#import -#import -#import +#import +#import +#import +#import + +#import +#import +#import +#import + +// Response +#import +#import +#import +#import +#import #import -#import +#import #import #import -#import -#import - -#import - -#import -#import -#import -#import +#import -#import +// Deprecated +#import #import #import -#import - -#import -#import -#import -#import -#import #import #import +#import #import - -#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import NS_ASSUME_NONNULL_BEGIN -#pragma mark API group interface - -/** - * @brief \b PubNub client core class extension to provide access to 'Objects' API group. - * - * @discussion Set of API which allow to manage UUID / channels metadata and their relationships. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +#pragma mark Interface declaration + +/// **PubNub** `App Context` APIs. +/// +/// Set of API which allow managing `UUID` / `channels` metadata and their `relationships`. @interface PubNub (Objects) -#pragma mark - API builder support +#pragma mark - App Context API builder interdace (deprecated) -/** - * @brief Objects API access builder. - * - * @return API call configuration builder. - */ -@property (nonatomic, readonly, strong) PNObjectsAPICallBuilder * (^objects)(void); +/// Objects API access builder. +@property (nonatomic, readonly, strong) PNObjectsAPICallBuilder * (^objects)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); #pragma mark - UUID metadata object -/** - * @brief \c Set \c metadata for \c UUID. - * - * @code - * PNSetUUIDMetadataRequest *request = [PNSetUUIDMetadataRequest requestWithUUID:@"uuid"]; - * // With this option on, returned metadata model will have value which has been set to 'custom' - * // property. - * request.includeFields = PNUUIDCustomField; - * request.custom = @{ @"age": @(39), @"status": @"Checking some stuff..." }; - * request.email = @"support@pubnub.com"; - * request.name = @"David"; - * - * [self.client setUUIDMetadataWithRequest:request completion:^(PNSetUUIDMetadataData *status) { - * if (!status.isError) { - * // UUID metadata successfully has been set. - * // UUID metadata information available here: status.data.metadata - * } else { - * // Handle UUID metadata set error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Set \c UUID \c metadata request with all information which should be associated - * with \c UUID. - * @param block \c Set \c UUID \c metadata request completion block. - */ +/// `Set UUID metadata`. +/// +/// #### Example: +/// ```objc +/// PNSetUUIDMetadataRequest *request = [PNSetUUIDMetadataRequest requestWithUUID:@"uuid"]; +/// // With this option on, returned metadata model will have value which has been set to 'custom' +/// // property. +/// request.includeFields = PNUUIDCustomField; +/// request.custom = @{ @"age": @(39), @"status": @"Checking some stuff..." }; +/// request.email = @"support@pubnub.com"; +/// request.name = @"David"; +/// +/// [self.client setUUIDMetadataWithRequest:request completion:^(PNSetUUIDMetadataData *status) { +/// if (!status.isError) { +/// // UUID metadata successfully has been set. +/// // UUID metadata information available here: `status.data.metadata`. +/// } else { +/// // Handle UUID metadata set error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Set UUID metadata` request with all information which should be associated with `UUID`. +/// - block: `Set UUID metadata` request completion block. - (void)setUUIDMetadataWithRequest:(PNSetUUIDMetadataRequest *)request completion:(nullable PNSetUUIDMetadataCompletionBlock)block; -/** - * @brief \c Remove \c UUID \c metadata. - * - * @code - * PNRemoveUUIDMetadataRequest *request = [PNRemoveUUIDMetadataRequest requestWithUUID:@"uuid"]; - * - * [self.client removeUUIDMetadataWithRequest:request completion:^(PNAcknowledgmentStatus *status) { - * if (!status.isError) { - * // UUID metadata successfully removed. - * } else { - * // Handle UUID metadata remove error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Remove \c UUID \c metadata request with information about existing \c metadata. - * @param block \c Remove \c UUID \c metadata request completion block. - */ +/// `Remove UUID metadata`. +/// +/// #### Example: +/// ```objc +/// PNRemoveUUIDMetadataRequest *request = [PNRemoveUUIDMetadataRequest requestWithUUID:@"uuid"]; +/// +/// [self.client removeUUIDMetadataWithRequest:request completion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // UUID metadata successfully removed. +/// } else { +/// // Handle UUID metadata remove error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Remove UUID metadata` request with information about existing `metadata`. +/// - block: `Remove UUID metadata` request completion block. - (void)removeUUIDMetadataWithRequest:(PNRemoveUUIDMetadataRequest *)request completion:(nullable PNRemoveUUIDMetadataCompletionBlock)block; -/** - * @brief \c Fetch specific \c UUID \c metadata. - * - * @code - * PNFetchUUIDMetadataRequest *request = [PNFetchUUIDMetadataRequest requestWithUUID:@"uuid"]; - * // Add this request option, if returned metadata model should have value which has been set to - * // 'custom' property. - * request.includeFields = PNUUIDCustomField; - * - * [self.client uuidMetadataWithRequest:request - * completion:^(PNFetchUUIDMetadataData *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // UUID metadata successfully fetched. - * // Fetched UUID metadata information available here: result.data.metadata - * } else { - * // Handle UUID metadata fetch error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Fetch \c UUID \c metadata request with all information which should be used to - * fetch existing \c UUID \c metadata. - * @param block \c Fetch \c UUID \c metadata request completion block. - */ +/// `Fetch UUID metadata`. +/// +/// #### Example: +/// ```objc +/// PNFetchUUIDMetadataRequest *request = [PNFetchUUIDMetadataRequest requestWithUUID:@"uuid"]; +/// // Add this request option, if returned metadata model should have value which has been set to +/// // 'custom' property. +/// request.includeFields = PNUUIDCustomField; +/// +/// [self.client uuidMetadataWithRequest:request completion:^(PNFetchUUIDMetadataData *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // UUID metadata successfully fetched. +/// // Fetched UUID metadata information available here: result.data.metadata +/// } else { +/// // Handle UUID metadata fetch error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Fetch UUID metadata` request with all information which should be used to fetch existing +/// `UUID metadata`. +/// - block: `Fetch UUID metadata` request completion block. - (void)uuidMetadataWithRequest:(PNFetchUUIDMetadataRequest *)request completion:(PNFetchUUIDMetadataCompletionBlock)block; -/** - * @brief \c Fetch \c all \c UUID \c metadata. - * - * @code - * PNFetchAllUUIDMetadataRequest *request = [PNFetchAllUUIDMetadataRequest new]; - * request.start = @""; - * // Add this request option, if returned metadata models should have value which has been set to - * // 'custom' property. - * request.includeFields = PNUUIDCustomField | PNUUIDTotalCountField; - * request.limit = 40; - * - * [self.client allUUIDMetadataWithRequest:request - * completion:^(PNFetchAllUUIDMetadataResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // UUID metadata successfully fetched. - * // Result object has following information: - * // result.data.metadata - list of fetched UUID metadata, - * // result.data.next - cursor bookmark for fetching the next page, - * // result.data.prev - cursor bookmark for fetching the previous page, - * // result.data.totalCount - total number of created UUID metadata. - * } else { - * // Handle UUID metadata fetch error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Fetch \c all \c UUID \c metadata request object with all information which - * should be used to fetch existing \c UUID \c metadata. - * @param block \c Fetch \c all \c UUID \c metadata request completion block. - */ +/// `Fetch all UUID metadata`. +/// +/// #### Example: +/// ```objc +/// PNFetchAllUUIDMetadataRequest *request = [PNFetchAllUUIDMetadataRequest new]; +/// request.start = @""; +/// // Add this request option, if returned metadata models should have value which has been set to +/// // 'custom' property. +/// request.includeFields = PNUUIDCustomField | PNUUIDTotalCountField; +/// request.limit = 40; +/// +/// [self.client allUUIDMetadataWithRequest:request +/// completion:^(PNFetchAllUUIDMetadataResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // UUID metadata successfully fetched. +/// // Result object has following information: +/// // result.data.metadata - list of fetched UUID metadata, +/// // result.data.next - cursor bookmark for fetching the next page, +/// // result.data.prev - cursor bookmark for fetching the previous page, +/// // result.data.totalCount - total number of created UUID metadata. +/// } else { +/// // Handle UUID metadata fetch error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Fetch all UUID metadata` request object with all information which should be used to fetch existing +/// `UUID metadata`. +/// - block: `Fetch all UUID metadata` request completion block. - (void)allUUIDMetadataWithRequest:(PNFetchAllUUIDMetadataRequest *)request completion:(PNFetchAllUUIDMetadataCompletionBlock)block; #pragma mark - Channel metadata object -/** - * @brief \c Set \c metadata for \c channel. - * - * @code - * PNSetChannelMetadataRequest *request = [PNSetChannelMetadataRequest requestWithChannel:@"channel"]; - * // Add this request option, if returned metadata model should have value which has been set to - * // 'custom' property. - * request.includeFields = PNChannelCustomField; - * request.custom = @{ @"responsibilities": @"Manage tests", @"status": @"offline" }; - * request.name = @"Updated channel name"; - * - * [self.client setChannelMetadataWithRequest:request completion:^(PNSetChannelMetadataStatus *status) { - * if (!status.isError) { - * // Channel metadata successfully has been set. - * // Channel metadata information available here: status.data.metadata - * } else { - * // Handle channel metadata update error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Set \c channel \c metadata request with all information which should be - * associated with \c channel. - * @param block \c Set \c channel \c metadata request completion block. - */ +/// `Set channel metadata`. +/// +/// #### Example: +/// ```objc +/// PNSetChannelMetadataRequest *request = [PNSetChannelMetadataRequest requestWithChannel:@"channel"]; +/// // Add this request option, if returned metadata model should have value which has been set to +/// // 'custom' property. +/// request.includeFields = PNChannelCustomField; +/// request.custom = @{ @"responsibilities": @"Manage tests", @"status": @"offline" }; +/// request.name = @"Updated channel name"; +/// +/// [self.client setChannelMetadataWithRequest:request completion:^(PNSetChannelMetadataStatus *status) { +/// if (!status.isError) { +/// // Channel metadata successfully has been set. +/// // Channel metadata information available here: status.data.metadata +/// } else { +/// // Handle channel metadata update error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Set channel metadata` request with all information which should be associated with `channel`. +/// - block: `Set channel metadata` request completion block. - (void)setChannelMetadataWithRequest:(PNSetChannelMetadataRequest *)request completion:(nullable PNSetChannelMetadataCompletionBlock)block; -/** - * @brief \c Remove \c channel \c metadata. - * - * @code - * PNRemoveChannelMetadataRequest *request = [PNRemoveChannelMetadataRequest requestWithChannel:@"channel"]; - * - * [self.client removeChannelMetadataWithRequest:request completion:^(PNAcknowledgmentStatus *status) { - * if (!status.isError) { - * // Channel metadata successfully removed. - * } else { - * // Handle channel metadata remove error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Remove \c channel \c metadata request with information about existing - * \c metadata. - * @param block \c Remove \c channel \c metadata request completion block. - */ +/// `Remove channel metadata`. +/// +/// #### Exaple: +/// ```objc +/// PNRemoveChannelMetadataRequest *request = [PNRemoveChannelMetadataRequest requestWithChannel:@"channel"]; +/// +/// [self.client removeChannelMetadataWithRequest:request completion:^(PNAcknowledgmentStatus *status) { +/// if (!status.isError) { +/// // Channel metadata successfully removed. +/// } else { +/// // Handle channel metadata remove error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Remove channel metadata` request with information about existing `metadata`. +/// - block: `Remove channel metadata` request completion block. - (void)removeChannelMetadataWithRequest:(PNRemoveChannelMetadataRequest *)request completion:(nullable PNRemoveChannelMetadataCompletionBlock)block; -/** - * @brief \c Fetch specific \c channel \c metadata. - * - * @code - * PNFetchChannelMetadataRequest *request = [PNFetchChannelMetadataRequest requestWithChannel:@"channel"]; - * // Add this request option, if returned metadata model should have value which has been set to - * // 'custom' property. - * request.includeFields = PNChannelCustomField; - * - * [self.client channelMetadataWithRequest:request - * completion:^(PNFetchChannelsMetadataResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Channel metadata successfully fetched. - * // Channel metadata information available here: result.data.metadata - * } else { - * // Handle channel metadata fetch error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Fetch \c channel \c metadata request with all information which should be used - * to fetch existing \c channel \c metadata. - * @param block \c Fetch \c channel \c metadata request completion block. - */ +/// `Fetch channel metadata`. +/// +/// #### Example: +/// ```objc +/// PNFetchChannelMetadataRequest *request = [PNFetchChannelMetadataRequest requestWithChannel:@"channel"]; +/// // Add this request option, if returned metadata model should have value which has been set to +/// // 'custom' property. +/// request.includeFields = PNChannelCustomField; +/// +/// [self.client channelMetadataWithRequest:request +/// completion:^(PNFetchChannelsMetadataResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Channel metadata successfully fetched. +/// // Channel metadata information available here: result.data.metadata +/// } else { +/// // Handle channel metadata fetch error. Check `category` property to find out possible +/// // issue because of which request did fail. +/// // +/// // Request can be resent using: [status retry] +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Fetch channel metadata` request with all information which should be used to fetch existing +/// `channel metadata`. +/// - block: `Fetch channel metadata` request completion block. - (void)channelMetadataWithRequest:(PNFetchChannelMetadataRequest *)request completion:(PNFetchChannelMetadataCompletionBlock)block; -/** - * @brief \c Fetch \c all \c channels metadata. - * - * @code - * PNFetchAllChannelsMetadataRequest *request = [PNFetchAllChannelsMetadataRequest new]; - * request.start = @""; - * // Add this request option, if returned metadata models should have value which has been set to - * // 'custom' property. - * request.includeFields = PNChannelCustomField | PNChannelTotalCountField; - * request.limit = 40; - * - * [self.client allChannelsMetadataWithRequest:request - * completion:^(PNFetchAllChannelsMetadataResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Channels metadata successfully fetched. - * // Result object has following information: - * // result.data.metadata - list of fetched channels metadata, - * // result.data.next - cursor bookmark for fetching the next page, - * // result.data.prev - cursor bookmark for fetching the previous page, - * // result.data.totalCount - total number of associated channel metadata. - * } else { - * // Handle channels metadata fetch error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Fetch \c all \c channels \c metadata request with all information which should - * be used to fetch existing \c channels \c metadata. - * @param block \c Fetch \c all \c channels \c metadata request completion block. - */ +/// `Fetch all channels metadata`. +/// +/// #### Example: +/// ```objc +/// PNFetchAllChannelsMetadataRequest *request = [PNFetchAllChannelsMetadataRequest new]; +/// request.start = @""; +/// // Add this request option, if returned metadata models should have value which has been set to +/// // 'custom' property. +/// request.includeFields = PNChannelCustomField | PNChannelTotalCountField; +/// request.limit = 40; +/// +/// [self.client allChannelsMetadataWithRequest:request +/// completion:^(PNFetchAllChannelsMetadataResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Channels metadata successfully fetched. +/// // Result object has following information: +/// // result.data.metadata - list of fetched channels metadata, +/// // result.data.next - cursor bookmark for fetching the next page, +/// // result.data.prev - cursor bookmark for fetching the previous page, +/// // result.data.totalCount - total number of associated channel metadata. +/// } else { +/// // Handle channels metadata fetch error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Fetch all channels metadata` request with all information which should be used to fetch existing +/// `channels metadata`. +/// - block: `Fetch all channels metadata` request completion block. - (void)allChannelsMetadataWithRequest:(PNFetchAllChannelsMetadataRequest *)request completion:(PNFetchAllChannelsMetadataCompletionBlock)block; #pragma mark - Membership objects -/** - * @brief \c Set \c UUID's \c membership in target \c channels. - * - * @code - * NSArray *channels = @[ - * @{ @"channel": @"channel1", @"custom": @{ @"role": @"moderator" } } - * ]; - * - * PNSetMembershipsRequest *request = [PNSetMembershipsRequest requestWithUUID:@"uuid" - * channels:channels]; - * // Add this request option, if returned membership models should have value which has been set to - * // 'custom' and 'channel' properties. - * request.includeFields = PNMembershipCustomField | PNMembershipChannelField | PNMembershipsTotalCountField; - * request.limit = 40; - * - * [self.client setMembershipsWithRequest:request completion:^(PNManageMembershipsStatus *status) { - * if (!status.isError) { - * // UUID's memberships successfully set. - * // Result object has following information: - * // status.data.memberships - list of UUID's existing memberships, - * // status.data.next - cursor bookmark for fetching the next page, - * // status.data.prev - cursor bookmark for fetching the previous page, - * // status.data.totalCount - total number of UUID's memberships. - * } else { - * // Handle UUID's memberships set error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Set \c UUID's \c memberships request with information which should be used - * to set \c channels membership. - * @param block \c Set \c UUID's \c memberships request completion block. - */ +/// `Set UUID's membership` in target `channels`. +/// +/// #### Example: +/// ```objc +/// NSArray *channels = @[ +/// @{ @"channel": @"channel1", @"custom": @{ @"role": @"moderator" } } +/// ]; +/// +/// PNSetMembershipsRequest *request = [PNSetMembershipsRequest requestWithUUID:@"uuid" channels:channels]; +/// // Add this request option, if returned membership models should have value which has been set to +/// // 'custom' and 'channel' properties. +/// request.includeFields = PNMembershipCustomField | PNMembershipChannelField | PNMembershipsTotalCountField; +/// request.limit = 40; +/// +/// [self.client setMembershipsWithRequest:request completion:^(PNManageMembershipsStatus *status) { +/// if (!status.isError) { +/// // UUID's memberships successfully set. +/// // Result object has following information: +/// // status.data.memberships - list of UUID's existing memberships, +/// // status.data.next - cursor bookmark for fetching the next page, +/// // status.data.prev - cursor bookmark for fetching the previous page, +/// // status.data.totalCount - total number of UUID's memberships. +/// } else { +/// // Handle UUID's memberships set error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Set UUID's memberships` request with information which should be used to set `channels` membership. +/// - block: `Set UUID's memberships` request completion block. - (void)setMembershipsWithRequest:(PNSetMembershipsRequest *)request completion:(nullable PNManageMembershipsCompletionBlock)block; -/** - * @brief \c Remove \c UUID's \c membership in target \c channels. - * - * @code - * NSArray *channels = @[@"channel1", @"channel2"]; - * - * PNRemoveMembershipsRequest *request = [PNRemoveMembershipsRequest requestWithUUID:@"uuid" - * channels:channels]; - * // Add this request option, if returned membership models should have value which has been set to - * // 'custom' and 'channel' properties. - * request.includeFields = PNMembershipCustomField | PNMembershipChannelField | PNMembershipsTotalCountField; - * request.limit = 40; - * - * [self.client removeMembershipsWithRequest:request - * completion:^(PNManageMembershipsStatus *status) { - * - * if (!status.isError) { - * // UUID's memberships successfully removed. - * // Result object has following information: - * // status.data.memberships - list of UUID's existing memberships, - * // status.data.next - cursor bookmark for fetching the next page, - * // status.data.prev - cursor bookmark for fetching the previous page, - * // status.data.totalCount - total number of UUID's memberships. - * } else { - * // Handle UUID's memberships remove error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Remove \c UUID's \c memberships request with information which should be used - * to remove \c channels membership. - * @param block \c Remove \c UUID's \c memberships request completion block. - */ +/// `Remove UUID's membership` in target `channels`. +/// +/// #### Example: +/// ```objc +/// NSArray *channels = @[@"channel1", @"channel2"]; +/// +/// PNRemoveMembershipsRequest *request = [PNRemoveMembershipsRequest requestWithUUID:@"uuid" channels:channels]; +/// // Add this request option, if returned membership models should have value which has been set to +/// // 'custom' and 'channel' properties. +/// request.includeFields = PNMembershipCustomField | PNMembershipChannelField | PNMembershipsTotalCountField; +/// request.limit = 40; +/// +/// [self.client removeMembershipsWithRequest:request completion:^(PNManageMembershipsStatus *status) { +/// if (!status.isError) { +/// // UUID's memberships successfully removed. +/// // Result object has following information: +/// // status.data.memberships - list of UUID's existing memberships, +/// // status.data.next - cursor bookmark for fetching the next page, +/// // status.data.prev - cursor bookmark for fetching the previous page, +/// // status.data.totalCount - total number of UUID's memberships. +/// } else { +/// // Handle UUID's memberships remove error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Remove UUID's memberships` request with information which should be used to remove `channels` +/// membership. +/// - block: `Remove UUID's memberships` request completion block. - (void)removeMembershipsWithRequest:(PNRemoveMembershipsRequest *)request completion:(nullable PNManageMembershipsCompletionBlock)block; -/** - * @brief \c Manage \c UUID's \c membership in target \c channels. - * - * @code - * PNManageMembershipsRequest *request = [PNManageMembershipsRequest requestWithUUID:@"uuid"]; - * request.setChannels = @[ - * @{ @"channel": @"channel1", @"custom": @{ @"role": @"moderator" } } - * ]; - * request.removeChannels = @[@"channel3", @"channel4"]; - * // Add this request option, if returned membership models should have value which has been set to - * // 'custom' and 'channel' properties. - * request.includeFields = PNMembershipCustomField | PNMembershipChannelField | PNMembershipsTotalCountField; - * request.limit = 40; - * - * [self.client manageMembershipsWithRequest:request - * completion:^(PNManageMembershipsStatus *status) { - * - * if (!status.isError) { - * // UUID's memberships successfully set. - * // Result object has following information: - * // status.data.memberships - list of UUID's existing memberships, - * // status.data.next - cursor bookmark for fetching the next page, - * // status.data.prev - cursor bookmark for fetching the previous page, - * // status.data.totalCount - total number of UUID's memberships. - * } else { - * // Handle UUID's memberships set error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Manage \c UUID's \c memberships request with information what modifications to - * \c UUID's \c memberships should be done (\c set / \c remove \c channels). - * @param block \c Manage \c UUID's \c memberships request completion block. - */ +/// `Manage UUID's membership` in target `channels`. +/// +/// #### Example: +/// ```objc +/// PNManageMembershipsRequest *request = [PNManageMembershipsRequest requestWithUUID:@"uuid"]; +/// request.setChannels = @[ +/// @{ @"channel": @"channel1", @"custom": @{ @"role": @"moderator" } } +/// ]; +/// request.removeChannels = @[@"channel3", @"channel4"]; +/// // Add this request option, if returned membership models should have value which has been set to +/// // 'custom' and 'channel' properties. +/// request.includeFields = PNMembershipCustomField | PNMembershipChannelField | PNMembershipsTotalCountField; +/// request.limit = 40; +/// +/// [self.client manageMembershipsWithRequest:request completion:^(PNManageMembershipsStatus *status) { +/// if (!status.isError) { +/// // UUID's memberships successfully set. +/// // Result object has following information: +/// // status.data.memberships - list of UUID's existing memberships, +/// // status.data.next - cursor bookmark for fetching the next page, +/// // status.data.prev - cursor bookmark for fetching the previous page, +/// // status.data.totalCount - total number of UUID's memberships. +/// } else { +/// // Handle UUID's memberships set error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Manage UUID's memberships` request with information what modifications to `UUID's memberships` should +/// be done (`set` / `remove `channels`). +/// - block: `Manage UUID's memberships` request completion block. - (void)manageMembershipsWithRequest:(PNManageMembershipsRequest *)request completion:(nullable PNManageMembershipsCompletionBlock)block; -/** - * @brief \c Fetch \c UUID's \c memberships. - * - * @code - * PNFetchMembershipsRequest *request = [PNFetchMembershipsRequest requestWithUUID:@"uuid"]; - * request.start = @""; - * // Add this request option, if returned membership models should have value which has been set to - * // 'custom' and 'channel' properties. - * request.includeFields = PNMembershipCustomField | PNMembershipChannelField | PNMembershipsTotalCountField; - * request.limit = 40; - * - * [self.client membershipsWithRequest:request - * completion:^(PNFetchMembershipsResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // UUID's memberships successfully fetched. - * // Result object has following information: - * // result.data.memberships - list of UUID's memberships, - * // result.data.next - cursor bookmark for fetching the next page, - * // result.data.prev - cursor bookmark for fetching the previous page, - * // result.data.totalCount - total number of UUID's memberships - * } else { - * // Handle UUID's memberships fetch error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Fetch \c UUID's \c memberships request with all information which should be - * used to fetch existing \c UUID's \c memberships. - * @param block \c Fetch \c UUID's \c memberships request completion block. - */ -- (void)membershipsWithRequest:(PNFetchMembershipsRequest *)request - completion:(PNFetchMembershipsCompletionBlock)block; - -/** - * @brief \c Set \c channel's \c members list. - * - * @code - * NSArray *uuids = @[ - * @{ @"uuid": @"uuid2", @"custom": @{ @"role": @"moderator" } } - * ]; - * - * PNSetChannelMembersRequest *request = [PNSetChannelMembersRequest requestWithChannel:@"channel" - * uuids:uuids]; - * // Add this request option, if returned member models should have value which has been set to - * // 'custom' and 'uuid' properties. - * request.includeFields = PNChannelMemberCustomField | PNChannelMemberUUIDField | PNChannelMembersTotalCountField; - * request.limit = 40; - * - * [self.client setChannelMembersWithRequest:request completion:^(PNManageChannelMembersStatus *status) { - * if (!status.isError) { - * // Channel's members successfully set. - * // Result object has following information: - * // result.data.members - list of existing channel's members, - * // result.data.next - cursor bookmark for fetching the next page, - * // result.data.prev - cursor bookmark for fetching the previous page, - * // result.data.totalCount - total number of channel's members. - * } else { - * // Handle channel's members set error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Set \c channel's \c members list request with information which should be - * used to set \c UUID member. - * @param block \c Set \c channel's \c members list request completion block. - */ +/// `Fetch UUID's memberships`. +/// +/// #### Example: +/// ```objc +/// PNFetchMembershipsRequest *request = [PNFetchMembershipsRequest requestWithUUID:@"uuid"]; +/// request.start = @""; +/// // Add this request option, if returned membership models should have value which has been set to +/// // 'custom' and 'channel' properties. +/// request.includeFields = PNMembershipCustomField | PNMembershipChannelField | PNMembershipsTotalCountField; +/// request.limit = 40; +/// +/// [self.client membershipsWithRequest:request completion:^(PNFetchMembershipsResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // UUID's memberships successfully fetched. +/// // Result object has following information: +/// // result.data.memberships - list of UUID's memberships, +/// // result.data.next - cursor bookmark for fetching the next page, +/// // result.data.prev - cursor bookmark for fetching the previous page, +/// // result.data.totalCount - total number of UUID's memberships +/// } else { +/// // Handle UUID's memberships fetch error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Fetch UUID's memberships` request with all information which should be used to fetch existing +/// `UUID's memberships`. +/// - block: `Fetch UUID's memberships` request completion block. +- (void)membershipsWithRequest:(PNFetchMembershipsRequest *)request completion:(PNFetchMembershipsCompletionBlock)block; + +/// `Set channel's members` list. +/// +/// #### Example: +/// ```objc +/// NSArray *uuids = @[ +/// @{ @"uuid": @"uuid2", @"custom": @{ @"role": @"moderator" } } +/// ]; +/// +/// PNSetChannelMembersRequest *request = [PNSetChannelMembersRequest requestWithChannel:@"channel" uuids:uuids]; +/// // Add this request option, if returned member models should have value which has been set to +/// // 'custom' and 'uuid' properties. +/// request.includeFields = PNChannelMemberCustomField | PNChannelMemberUUIDField | PNChannelMembersTotalCountField; +/// request.limit = 40; +/// +/// [self.client setChannelMembersWithRequest:request completion:^(PNManageChannelMembersStatus *status) { +/// if (!status.isError) { +/// // Channel's members successfully set. +/// // Result object has following information: +/// // result.data.members - list of existing channel's members, +/// // result.data.next - cursor bookmark for fetching the next page, +/// // result.data.prev - cursor bookmark for fetching the previous page, +/// // result.data.totalCount - total number of channel's members. +/// } else { +/// // Handle channel's members set error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Set channel's members` list request with information which should be used to set `UUID` member. +/// - block: `Set channel's members` list request completion block. - (void)setChannelMembersWithRequest:(PNSetChannelMembersRequest *)request completion:(nullable PNManageChannelMembersCompletionBlock)block; -/** - * @brief \c Remove \c channel's \c members. - * - * @code - * NSArray *uuids = @[@"uuid3", @"uuid4"]; - * PNRemoveChannelMembersRequest *request = [PNRemoveChannelMembersRequest requestWithChannel:@"channel" - * uuids:uuids]; - * // Add this request option, if returned member models should have value which has been set to - * // 'custom' and 'uuid' properties. - * request.includeFields = PNChannelMemberCustomField | PNChannelMemberUUIDField | PNChannelMembersTotalCountField; - * request.limit = 40; - * - * [self.client removeChannelMembersWithRequest:request completion:^(PNManageChannelMembersStatus *status) { - * if (!status.isError) { - * // Channel's members successfully removed. - * // Result object has following information: - * // result.data.members - list of channel's existing members, - * // result.data.next - cursor bookmark for fetching the next page, - * // result.data.prev - cursor bookmark for fetching the previous page, - * // result.data.totalCount - total number of channel's members. - * } else { - * // Handle channel's members remove error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Remove \c channel's \c members request with information which should be used - * to remove \c UUID members. - * @param block \c Remove \c channel's \c members request completion block. - */ +/// `Remove channel's members`. +/// +/// #### Example: +/// ```objc +/// NSArray *uuids = @[@"uuid3", @"uuid4"]; +/// PNRemoveChannelMembersRequest *request = [PNRemoveChannelMembersRequest requestWithChannel:@"channel" uuids:uuids]; +/// // Add this request option, if returned member models should have value which has been set to +/// // 'custom' and 'uuid' properties. +/// request.includeFields = PNChannelMemberCustomField | PNChannelMemberUUIDField | PNChannelMembersTotalCountField; +/// request.limit = 40; +/// +/// [self.client removeChannelMembersWithRequest:request completion:^(PNManageChannelMembersStatus *status) { +/// if (!status.isError) { +/// // Channel's members successfully removed. +/// // Result object has following information: +/// // result.data.members - list of channel's existing members, +/// // result.data.next - cursor bookmark for fetching the next page, +/// // result.data.prev - cursor bookmark for fetching the previous page, +/// // result.data.totalCount - total number of channel's members. +/// } else { +/// // Handle channel's members remove error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Remove channel's members` request with information which should be used to remove `UUID` members. +/// - block: `Remove channel's members` request completion block. - (void)removeChannelMembersWithRequest:(PNRemoveChannelMembersRequest *)request completion:(nullable PNManageChannelMembersCompletionBlock)block; -/** - * @brief \c Manage \c channel's members list. - * - * @code - * PNManageChannelMembersRequest *request = [PNManageChannelMembersRequest requestWithChannel:@"channel"]; - * request.setMembers = @[ - * @{ @"uuid": @"uuid2", @"custom": @{ @"role": @"moderator" } } - * ]; - * request.removeMembers = @[@"uuid3", @"uuid4"]; - * // Add this request option, if returned member models should have value which has been set to - * // 'custom' and 'uuid' properties. - * request.includeFields = PNChannelMemberCustomField | PNChannelMemberUUIDField | PNChannelMembersTotalCountField; - * request.limit = 40; - * - * [self.client manageChannelMembersWithRequest:request completion:^(PNManageChannelMembersStatus *status) { - * if (!status.isError) { - * // Channel's members successfully changed. - * // Result object has following information: - * // result.data.members - list of existing channel's members, - * // result.data.next - cursor bookmark for fetching the next page, - * // result.data.prev - cursor bookmark for fetching the previous page, - * // result.data.totalCount - total number of channel's members. - * } else { - * // Handle channel's members manage error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Manage \c channel's \c members list request with information what modifications - * to \c channel's members list should be done (\c set / \c remove \c UUID). - * @param block \c Manage \c channel's \c members list request completion block. - */ +/// `Manage channel's members` list. +/// +/// #### Example: +/// ```objc +/// PNManageChannelMembersRequest *request = [PNManageChannelMembersRequest requestWithChannel:@"channel"]; +/// request.setMembers = @[ +/// @{ @"uuid": @"uuid2", @"custom": @{ @"role": @"moderator" } } +/// ]; +/// request.removeMembers = @[@"uuid3", @"uuid4"]; +/// // Add this request option, if returned member models should have value which has been set to +/// // 'custom' and 'uuid' properties. +/// request.includeFields = PNChannelMemberCustomField | PNChannelMemberUUIDField | PNChannelMembersTotalCountField; +/// request.limit = 40; +/// +/// [self.client manageChannelMembersWithRequest:request completion:^(PNManageChannelMembersStatus *status) { +/// if (!status.isError) { +/// // Channel's members successfully changed. +/// // Result object has following information: +/// // result.data.members - list of existing channel's members, +/// // result.data.next - cursor bookmark for fetching the next page, +/// // result.data.prev - cursor bookmark for fetching the previous page, +/// // result.data.totalCount - total number of channel's members. +/// } else { +/// // Handle channel's members manage error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Manage channel's members` list request with information what modifications to `channel's members` list +/// should be done (`set` / `remove` `UUID`). +/// - block: `Manage channel's members` list request completion block. - (void)manageChannelMembersWithRequest:(PNManageChannelMembersRequest *)request completion:(nullable PNManageChannelMembersCompletionBlock)block; -/** - * @brief \c Fetch \c channel's \c members. - * - * @code - * PNFetchChannelMembersRequest *request = [PNFetchChannelMembersRequest requestWithChannel:@"channel"]; - * request.start = @""; - * // Add this request option, if returned member models should have value which has been set to - * // 'custom' and 'uuid' properties. - * request.includeFields = PNChannelMemberCustomField | PNChannelMemberUUIDField | PNChannelMembersTotalCountField; - * request.limit = 40; - * - * [self.client channelMembersWithRequest:request - * completion:^(PNFetchChannelMembersResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Channel's members successfully fetched. - * // Result object has following information: - * // result.data.members - list of channel's members, - * // result.data.next - cursor bookmark for fetching the next page, - * // result.data.prev - cursor bookmark for fetching the previous page, - * // result.data.totalCount - total number of channel's members. - * } else { - * // Handle channel's members fetch error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry] - * } - * }]; - * @endcode - * - * @param request \c Fetch \c channel's \c members request with all information which should be used - * to fetch existing \c channel's \c members. - * @param block \c Fetch \c channel's \c members request completion block. - */ +/// `Fetch channel's members`. +/// +/// #### Example: +/// ```objc +/// PNFetchChannelMembersRequest *request = [PNFetchChannelMembersRequest requestWithChannel:@"channel"]; +/// request.start = @""; +/// // Add this request option, if returned member models should have value which has been set to +/// // 'custom' and 'uuid' properties. +/// request.includeFields = PNChannelMemberCustomField | PNChannelMemberUUIDField | PNChannelMembersTotalCountField; +/// request.limit = 40; +/// +/// [self.client channelMembersWithRequest:request +/// completion:^(PNFetchChannelMembersResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Channel's members successfully fetched. +/// // Result object has following information: +/// // result.data.members - list of channel's members, +/// // result.data.next - cursor bookmark for fetching the next page, +/// // result.data.prev - cursor bookmark for fetching the previous page, +/// // result.data.totalCount - total number of channel's members. +/// } else { +/// // Handle channel's members fetch error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: `Fetch channel's members` request with all information which should be used to fetch existing +/// `channel's members`. +/// - block: `Fetch channel's members` request completion block. - (void)channelMembersWithRequest:(PNFetchChannelMembersRequest *)request completion:(PNFetchChannelMembersCompletionBlock)block; diff --git a/PubNub/Core/PubNub+Objects.m b/PubNub/Core/PubNub+Objects.m index d12a15005..c078bc683 100644 --- a/PubNub/Core/PubNub+Objects.m +++ b/PubNub/Core/PubNub+Objects.m @@ -1,164 +1,126 @@ -/** - * @author Serhii Mamontov - * @version 4.10.0 - * @since 4.10.0 - * @copyright © 2010-2019 PubNub, Inc. - */ +#import "PubNub+Objects.h" #import "PNBaseObjectsRequest+Private.h" -#import "PNAPICallBuilder+Private.h" #import "PubNub+CorePrivate.h" #import "PNStatus+Private.h" -#import "PNConfiguration.h" -#import "PubNub+Objects.h" +#import "PNHelpers.h" + +// Deprecated +#import "PNAPICallBuilder+Private.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration @interface PubNub (ObjectsProtected) -#pragma mark - API Builder support +#pragma mark - App Context API builder interdace (deprecated) -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will set UUID's metadata. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will set UUID's +/// metadata. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendSetUUIDMetadataRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will remove UUID's metadata. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will remove UUID's +/// metadata. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendRemoveUUIDMetadataRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will fetch specific UUID's metadata. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will fetch specific +/// UUID's metadata. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendFetchUUIDMetadataRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will fetch all UUIDs metadata. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will fetch all UUIDs +/// metadata. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendFetchAllUUIDsMetadataRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will set channel's metadata. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will set channel's +/// metadata. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendSetChannelMetadataRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will remove channel's metadata. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will remove channel's +/// metadata. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendRemoveChannelMetadataRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will fetch specific channel's metadata. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will fetch specific +/// channel's metadata. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendFetchChannelMetadataRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will fetch all channels metadata. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will fetch all channels +/// metadata. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendFetchAllChannelsMetadataRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will set UUID's memberships. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will set UUID's +/// memberships. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendSetMembershipsRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will remove UUID's memberships. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will remove UUID's +/// memberships. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendRemoveMembershipsRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will manage UUID's memberships. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will manage UUID's +/// memberships. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendManageMembershipsRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will fetch UUID's memberships. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will fetch UUID's +/// memberships. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendFetchMembershipsRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will set channel's members. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will set channel's +/// members. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendSetChannelMembersRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will remove channel's members. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will remove channel's +/// members. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendRemoveChannelMembersRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will manage channel's members. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will manage channel's +/// members. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendManageChannelMembersRequestUsingBuilderParameters:(NSDictionary *)parameters; -/** - * @brief Process information provider by user with builder API call and use it to send request - * which will fetch channel's members. - * - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Process information provider by user with builder API call and use it to send request which will fetch channel's +/// members. +/// +/// - Parameter parameters: Dictionary with information passed to builder-based API. - (void)sendFetchChannelMembersRequestUsingBuilderParameters:(NSDictionary *)parameters; #pragma mark - Misc -/** - * @brief Add common parameters for multi-paged request suing information passed to - * builder-based API. - * - * @param request Request for which properties should be set. - * @param parameters Dictionary with information passed to builder-based API. - */ +/// Add common parameters for multi-paged request suing information passed to builder-based API. +/// +/// - Parameters: +/// - request: Request for which properties should be set. +/// - parameters: Dictionary with information passed to builder-based API. - (void)addObjectsPaginationOptionsToRequest:(PNObjectsPaginatedRequest *)request usingBuilderParameters:(NSDictionary *)parameters; @@ -175,7 +137,7 @@ - (void)addObjectsPaginationOptionsToRequest:(PNObjectsPaginatedRequest *)reques @implementation PubNub (Objects) -#pragma mark - API Builder support +#pragma mark - App Context API builder interdace (deprecated) - (PNObjectsAPICallBuilder *(^)(void))objects { PNObjectsAPICallBuilder *builder = nil; @@ -236,9 +198,7 @@ - (void)sendSetUUIDMetadataRequestUsingBuilderParameters:(NSDictionary *)paramet request.name = parameters[NSStringFromSelector(@selector(name))]; request.arbitraryQueryParameters = parameters[@"queryParam"]; - if (includeFields) { - request.includeFields = (PNUUIDFields)includeFields.unsignedIntegerValue; - } + if (includeFields) request.includeFields = (PNUUIDFields)includeFields.unsignedIntegerValue; [self setUUIDMetadataWithRequest:request completion:parameters[@"block"]]; } @@ -258,9 +218,7 @@ - (void)sendFetchUUIDMetadataRequestUsingBuilderParameters:(NSDictionary *)param PNFetchUUIDMetadataRequest *request = [PNFetchUUIDMetadataRequest requestWithUUID:uuid]; request.arbitraryQueryParameters = parameters[@"queryParam"]; - if (includeFields) { - request.includeFields = (PNUUIDFields)includeFields.unsignedIntegerValue; - } + if (includeFields) request.includeFields = (PNUUIDFields)includeFields.unsignedIntegerValue; [self uuidMetadataWithRequest:request completion:parameters[@"block"]]; } @@ -273,11 +231,8 @@ - (void)sendFetchAllUUIDsMetadataRequestUsingBuilderParameters:(NSDictionary *)p [self addObjectsPaginationOptionsToRequest:request usingBuilderParameters:parameters]; if (includeCount) { - if (includeCount.boolValue) { - request.includeFields |= PNUUIDTotalCountField; - } else { - request.includeFields ^= PNUUIDTotalCountField; - } + if (includeCount.boolValue) request.includeFields |= PNUUIDTotalCountField; + else request.includeFields ^= PNUUIDTotalCountField; } [self allUUIDMetadataWithRequest:request completion:parameters[@"block"]]; @@ -293,9 +248,7 @@ - (void)sendSetChannelMetadataRequestUsingBuilderParameters:(NSDictionary *)para request.name = parameters[NSStringFromSelector(@selector(name))]; request.arbitraryQueryParameters = parameters[@"queryParam"]; - if (includeFields) { - request.includeFields = (PNChannelFields)includeFields.unsignedIntegerValue; - } + if (includeFields) request.includeFields = (PNChannelFields)includeFields.unsignedIntegerValue; [self setChannelMetadataWithRequest:request completion:parameters[@"block"]]; } @@ -315,9 +268,7 @@ - (void)sendFetchChannelMetadataRequestUsingBuilderParameters:(NSDictionary *)pa PNFetchChannelMetadataRequest *request = [PNFetchChannelMetadataRequest requestWithChannel:channel]; request.arbitraryQueryParameters = parameters[@"queryParam"]; - if (includeFields) { - request.includeFields = (PNChannelFields)includeFields.unsignedIntegerValue; - } + if (includeFields) request.includeFields = (PNChannelFields)includeFields.unsignedIntegerValue; [self channelMetadataWithRequest:request completion:parameters[@"block"]]; } @@ -330,11 +281,8 @@ - (void)sendFetchAllChannelsMetadataRequestUsingBuilderParameters:(NSDictionary [self addObjectsPaginationOptionsToRequest:request usingBuilderParameters:parameters]; if (includeCount) { - if (includeCount.boolValue) { - request.includeFields |= PNChannelTotalCountField; - } else { - request.includeFields ^= PNChannelTotalCountField; - } + if (includeCount.boolValue) request.includeFields |= PNChannelTotalCountField; + else request.includeFields ^= PNChannelTotalCountField; } [self allChannelsMetadataWithRequest:request completion:parameters[@"block"]]; @@ -354,11 +302,8 @@ - (void)sendSetMembershipsRequestUsingBuilderParameters:(NSDictionary *)paramete [self addObjectsPaginationOptionsToRequest:request usingBuilderParameters:parameters]; if (includeCount) { - if (includeCount.boolValue) { - request.includeFields |= PNMembershipsTotalCountField; - } else { - request.includeFields ^= PNMembershipsTotalCountField; - } + if (includeCount.boolValue) request.includeFields |= PNMembershipsTotalCountField; + else request.includeFields ^= PNMembershipsTotalCountField; } [self setMembershipsWithRequest:request completion:parameters[@"block"]]; @@ -375,11 +320,8 @@ - (void)sendRemoveMembershipsRequestUsingBuilderParameters:(NSDictionary *)param [self addObjectsPaginationOptionsToRequest:request usingBuilderParameters:parameters]; if (includeCount) { - if (includeCount.boolValue) { - request.includeFields |= PNMembershipsTotalCountField; - } else { - request.includeFields ^= PNMembershipsTotalCountField; - } + if (includeCount.boolValue) request.includeFields |= PNMembershipsTotalCountField; + else request.includeFields ^= PNMembershipsTotalCountField; } [self removeMembershipsWithRequest:request completion:parameters[@"block"]]; @@ -397,11 +339,8 @@ - (void)sendManageMembershipsRequestUsingBuilderParameters:(NSDictionary *)param [self addObjectsPaginationOptionsToRequest:request usingBuilderParameters:parameters]; if (includeCount) { - if (includeCount.boolValue) { - request.includeFields |= PNMembershipsTotalCountField; - } else { - request.includeFields ^= PNMembershipsTotalCountField; - } + if (includeCount.boolValue) request.includeFields |= PNMembershipsTotalCountField; + else request.includeFields ^= PNMembershipsTotalCountField; } [self manageMembershipsWithRequest:request completion:parameters[@"block"]]; @@ -417,11 +356,8 @@ - (void)sendFetchMembershipsRequestUsingBuilderParameters:(NSDictionary *)parame [self addObjectsPaginationOptionsToRequest:request usingBuilderParameters:parameters]; if (includeCount) { - if (includeCount.boolValue) { - request.includeFields |= PNMembershipsTotalCountField; - } else { - request.includeFields ^= PNMembershipsTotalCountField; - } + if (includeCount.boolValue) request.includeFields |= PNMembershipsTotalCountField; + else request.includeFields ^= PNMembershipsTotalCountField; } [self membershipsWithRequest:request completion:parameters[@"block"]]; @@ -438,11 +374,8 @@ - (void)sendSetChannelMembersRequestUsingBuilderParameters:(NSDictionary *)param [self addObjectsPaginationOptionsToRequest:request usingBuilderParameters:parameters]; if (includeCount) { - if (includeCount.boolValue) { - request.includeFields |= PNChannelMembersTotalCountField; - } else { - request.includeFields ^= PNChannelMembersTotalCountField; - } + if (includeCount.boolValue) request.includeFields |= PNChannelMembersTotalCountField; + else request.includeFields ^= PNChannelMembersTotalCountField; } [self setChannelMembersWithRequest:request completion:parameters[@"block"]]; @@ -459,11 +392,8 @@ - (void)sendRemoveChannelMembersRequestUsingBuilderParameters:(NSDictionary *)pa [self addObjectsPaginationOptionsToRequest:request usingBuilderParameters:parameters]; if (includeCount) { - if (includeCount.boolValue) { - request.includeFields |= PNChannelMembersTotalCountField; - } else { - request.includeFields ^= PNChannelMembersTotalCountField; - } + if (includeCount.boolValue) request.includeFields |= PNChannelMembersTotalCountField; + else request.includeFields ^= PNChannelMembersTotalCountField; } [self removeChannelMembersWithRequest:request completion:parameters[@"block"]]; @@ -481,11 +411,8 @@ - (void)sendManageChannelMembersRequestUsingBuilderParameters:(NSDictionary *)pa [self addObjectsPaginationOptionsToRequest:request usingBuilderParameters:parameters]; if (includeCount) { - if (includeCount.boolValue) { - request.includeFields |= PNChannelMembersTotalCountField; - } else { - request.includeFields ^= PNChannelMembersTotalCountField; - } + if (includeCount.boolValue) request.includeFields |= PNChannelMembersTotalCountField; + else request.includeFields ^= PNChannelMembersTotalCountField; } [self manageChannelMembersWithRequest:request completion:parameters[@"block"]]; @@ -501,11 +428,8 @@ - (void)sendFetchChannelMembersRequestUsingBuilderParameters:(NSDictionary *)par [self addObjectsPaginationOptionsToRequest:request usingBuilderParameters:parameters]; if (includeCount) { - if (includeCount.boolValue) { - request.includeFields |= PNChannelMembersTotalCountField; - } else { - request.includeFields ^= PNChannelMembersTotalCountField; - } + if (includeCount.boolValue) request.includeFields |= PNChannelMembersTotalCountField; + else request.includeFields ^= PNChannelMembersTotalCountField; } [self channelMembersWithRequest:request completion:parameters[@"block"]]; @@ -514,284 +438,439 @@ - (void)sendFetchChannelMembersRequestUsingBuilderParameters:(NSDictionary *)par #pragma mark - UUID metadata object -- (void)setUUIDMetadataWithRequest:(PNSetUUIDMetadataRequest *)request - completion:(PNSetUUIDMetadataCompletionBlock)block { - - request.identifier = request.identifier.length ? request.identifier : self.configuration.userID; - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNSetUUIDMetadataStatus *status) { - if (block && status.isError) { - status.retryBlock = ^{ - [weakSelf setUUIDMetadataWithRequest:request completion:block]; +- (void)setUUIDMetadataWithRequest:(PNSetUUIDMetadataRequest *)userRequest + completion:(PNSetUUIDMetadataCompletionBlock)handleBlock { + userRequest.identifier = userRequest.identifier.length ? userRequest.identifier : self.configuration.userID; + PNOperationDataParser *responseParser = [self parserWithStatus:[PNSetUUIDMetadataStatus class]]; + PNSetUUIDMetadataCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self setUUIDMetadataWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; -} -- (void)removeUUIDMetadataWithRequest:(PNRemoveUUIDMetadataRequest *)request - completion:(PNRemoveUUIDMetadataCompletionBlock)block { + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; - request.identifier = request.identifier.length ? request.identifier : self.configuration.userID; - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNAcknowledgmentStatus *status) { - if (block && status.isError) { - status.retryBlock = ^{ - [weakSelf removeUUIDMetadataWithRequest:request completion:block]; + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)removeUUIDMetadataWithRequest:(PNRemoveUUIDMetadataRequest *)userRequest + completion:(PNRemoveUUIDMetadataCompletionBlock)handleBlock { + userRequest.identifier = userRequest.identifier.length ? userRequest.identifier : self.configuration.userID; + PNOperationDataParser *responseParser = [self parserWithStatus:[PNAcknowledgmentStatus class]]; + PNRemoveUUIDMetadataCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self removeUUIDMetadataWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; -} -- (void)uuidMetadataWithRequest:(PNFetchUUIDMetadataRequest *)request - completion:(PNFetchUUIDMetadataCompletionBlock)block { + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; - request.identifier = request.identifier.length ? request.identifier : self.configuration.userID; - __weak __typeof(self) weakSelf = self; - - [self performRequest:request - withCompletion:^(PNFetchUUIDMetadataResult *result, PNErrorStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf uuidMetadataWithRequest:request completion:block]; + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)uuidMetadataWithRequest:(PNFetchUUIDMetadataRequest *)userRequest + completion:(PNFetchUUIDMetadataCompletionBlock)handleBlock { + userRequest.identifier = userRequest.identifier.length ? userRequest.identifier : self.configuration.userID; + PNOperationDataParser *responseParser = [self parserWithResult:[PNFetchUUIDMetadataResult class] + status:[PNErrorStatus class]]; + PNFetchUUIDMetadataCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self uuidMetadataWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:NO withResult:result andStatus:status]; - }]; -} -- (void)allUUIDMetadataWithRequest:(PNFetchAllUUIDMetadataRequest *)request - completion:(PNFetchAllUUIDMetadataCompletionBlock)block { - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request - withCompletion:^(PNFetchAllUUIDMetadataResult *result, PNErrorStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf allUUIDMetadataWithRequest:request completion:block]; + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)allUUIDMetadataWithRequest:(PNFetchAllUUIDMetadataRequest *)userRequest + completion:(PNFetchAllUUIDMetadataCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNFetchAllUUIDMetadataResult class] + status:[PNErrorStatus class]]; + PNFetchAllUUIDMetadataCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self allUUIDMetadataWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:NO withResult:result andStatus:status]; - }]; + + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } #pragma mark - Channel metadata object -- (void)setChannelMetadataWithRequest:(PNSetChannelMetadataRequest *)request - completion:(nullable PNSetChannelMetadataCompletionBlock)block { - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNSetChannelMetadataStatus *status) { - if (block && status.isError) { - status.retryBlock = ^{ - [weakSelf setChannelMetadataWithRequest:request completion:block]; +- (void)setChannelMetadataWithRequest:(PNSetChannelMetadataRequest *)userRequest + completion:(PNSetChannelMetadataCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNSetChannelMetadataStatus class]]; + PNSetChannelMetadataCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self setChannelMetadataWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; -} -- (void)removeChannelMetadataWithRequest:(PNRemoveChannelMetadataRequest *)request - completion:(nullable PNRemoveChannelMetadataCompletionBlock)block { - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNAcknowledgmentStatus *status) { - if (block && status.isError) { - status.retryBlock = ^{ - [weakSelf removeChannelMetadataWithRequest:request completion:block]; + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)removeChannelMetadataWithRequest:(PNRemoveChannelMetadataRequest *)userRequest + completion:(PNRemoveChannelMetadataCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNAcknowledgmentStatus class]]; + PNRemoveChannelMetadataCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self removeChannelMetadataWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; -} -- (void)channelMetadataWithRequest:(PNFetchChannelMetadataRequest *)request - completion:(PNFetchChannelMetadataCompletionBlock)block { - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request - withCompletion:^(PNFetchChannelMetadataResult *result, PNErrorStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf channelMetadataWithRequest:request completion:block]; + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)channelMetadataWithRequest:(PNFetchChannelMetadataRequest *)userRequest + completion:(PNFetchChannelMetadataCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNFetchChannelMetadataResult class] + status:[PNErrorStatus class]]; + PNFetchChannelMetadataCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self channelMetadataWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:NO withResult:result andStatus:status]; - }]; -} -- (void)allChannelsMetadataWithRequest:(PNFetchAllChannelsMetadataRequest *)request - completion:(PNFetchAllChannelsMetadataCompletionBlock)block { - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request - withCompletion:^(PNFetchAllChannelsMetadataResult *result, PNErrorStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf allChannelsMetadataWithRequest:request completion:block]; + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)allChannelsMetadataWithRequest:(PNFetchAllChannelsMetadataRequest *)userRequest + completion:(PNFetchAllChannelsMetadataCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNFetchAllChannelsMetadataResult class] + status:[PNErrorStatus class]]; + PNFetchAllChannelsMetadataCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self allChannelsMetadataWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:NO withResult:result andStatus:status]; - }]; + + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } #pragma mark - Membership objects -- (void)setMembershipsWithRequest:(PNSetMembershipsRequest *)request - completion:(nullable PNManageMembershipsCompletionBlock)block { - - request.identifier = request.identifier.length ? request.identifier : self.configuration.userID; - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNManageMembershipsStatus *status) { - if (block && status.isError) { - status.retryBlock = ^{ - [weakSelf setMembershipsWithRequest:request completion:block]; +- (void)setMembershipsWithRequest:(PNSetMembershipsRequest *)userRequest + completion:(PNManageMembershipsCompletionBlock)handleBlock { + userRequest.identifier = userRequest.identifier.length ? userRequest.identifier : self.configuration.userID; + PNOperationDataParser *responseParser = [self parserWithStatus:[PNManageMembershipsStatus class]]; + PNManageMembershipsCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self setMembershipsWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; -} -- (void)removeMembershipsWithRequest:(PNRemoveMembershipsRequest *)request - completion:(PNManageMembershipsCompletionBlock)block { - - request.identifier = request.identifier.length ? request.identifier : self.configuration.userID; - __weak __typeof(self) weakSelf = self; + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; - [self performRequest:request withCompletion:^(PNManageMembershipsStatus *status) { - if (block && status.isError) { - status.retryBlock = ^{ - [weakSelf removeMembershipsWithRequest:request completion:block]; + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)removeMembershipsWithRequest:(PNRemoveMembershipsRequest *)userRequest + completion:(PNManageMembershipsCompletionBlock)handleBlock { + userRequest.identifier = userRequest.identifier.length ? userRequest.identifier : self.configuration.userID; + PNOperationDataParser *responseParser = [self parserWithStatus:[PNManageMembershipsStatus class]]; + PNManageMembershipsCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self removeMembershipsWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; -} -- (void)manageMembershipsWithRequest:(PNManageMembershipsRequest *)request - completion:(PNManageMembershipsCompletionBlock)block { - - request.identifier = request.identifier.length ? request.identifier : self.configuration.userID; - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNManageMembershipsStatus *status) { - if (block && status.isError) { - status.retryBlock = ^{ - [weakSelf manageMembershipsWithRequest:request completion:block]; + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)manageMembershipsWithRequest:(PNManageMembershipsRequest *)userRequest + completion:(PNManageMembershipsCompletionBlock)handleBlock { + userRequest.identifier = userRequest.identifier.length ? userRequest.identifier : self.configuration.userID; + PNOperationDataParser *responseParser = [self parserWithStatus:[PNManageMembershipsStatus class]]; + PNManageMembershipsCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self manageMembershipsWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; -} -- (void)membershipsWithRequest:(PNFetchMembershipsRequest *)request - completion:(PNFetchMembershipsCompletionBlock)block { - - request.identifier = request.identifier.length ? request.identifier : self.configuration.userID; - __weak __typeof(self) weakSelf = self; - - [self performRequest:request - withCompletion:^(PNFetchMembershipsResult *result, PNErrorStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf membershipsWithRequest:request completion:block]; + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)membershipsWithRequest:(PNFetchMembershipsRequest *)userRequest + completion:(PNFetchMembershipsCompletionBlock)handleBlock { + userRequest.identifier = userRequest.identifier.length ? userRequest.identifier : self.configuration.userID; + PNOperationDataParser *responseParser = [self parserWithResult:[PNFetchMembershipsResult class] + status:[PNErrorStatus class]]; + PNFetchMembershipsCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self membershipsWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:NO withResult:result andStatus:status]; - }]; -} - -- (void)setChannelMembersWithRequest:(PNSetChannelMembersRequest *)request - completion:(PNManageChannelMembersCompletionBlock)block { - __weak __typeof(self) weakSelf = self; + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; - [self performRequest:request withCompletion:^(PNManageChannelMembersStatus *status) { - if (block && status.isError) { - status.retryBlock = ^{ - [weakSelf setChannelMembersWithRequest:request completion:block]; + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)setChannelMembersWithRequest:(PNSetChannelMembersRequest *)userRequest + completion:(PNManageChannelMembersCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNManageChannelMembersStatus class]]; + PNManageChannelMembersCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self setChannelMembersWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; -} - -- (void)removeChannelMembersWithRequest:(PNRemoveChannelMembersRequest *)request - completion:(PNManageChannelMembersCompletionBlock)block { - __weak __typeof(self) weakSelf = self; + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; - [self performRequest:request withCompletion:^(PNManageChannelMembersStatus *status) { - if (block && status.isError) { - status.retryBlock = ^{ - [weakSelf removeChannelMembersWithRequest:request completion:block]; + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)removeChannelMembersWithRequest:(PNRemoveChannelMembersRequest *)userRequest + completion:(PNManageChannelMembersCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNManageChannelMembersStatus class]]; + PNManageChannelMembersCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self removeChannelMembersWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; -} -- (void)manageChannelMembersWithRequest:(PNManageChannelMembersRequest *)request - completion:(PNManageChannelMembersCompletionBlock)block { - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNManageChannelMembersStatus *status) { - if (block && status.isError) { - status.retryBlock = ^{ - [weakSelf manageChannelMembersWithRequest:request completion:block]; + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)manageChannelMembersWithRequest:(PNManageChannelMembersRequest *)userRequest + completion:(PNManageChannelMembersCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNManageChannelMembersStatus class]]; + PNManageChannelMembersCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self manageChannelMembersWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; + + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } -- (void)channelMembersWithRequest:(PNFetchChannelMembersRequest *)request - completion:(PNFetchChannelMembersCompletionBlock)block { - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request - withCompletion:^(PNFetchChannelMembersResult *result, PNErrorStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf channelMembersWithRequest:request completion:block]; +- (void)channelMembersWithRequest:(PNFetchChannelMembersRequest *)userRequest + completion:(PNFetchChannelMembersCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNFetchChannelMembersResult class] + status:[PNErrorStatus class]]; + PNFetchChannelMembersCompletionBlock block = [handleBlock copy]; + [userRequest setupWithClientConfiguration:self.configuration]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self channelMembersWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:NO withResult:result andStatus:status]; - }]; + + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } @@ -808,9 +887,7 @@ - (void)addObjectsPaginationOptionsToRequest:(PNObjectsPaginatedRequest *)reques request.end = parameters[NSStringFromSelector(@selector(end))]; request.limit = limit.unsignedIntegerValue; - if (includeFields) { - request.includeFields = includeFields.unsignedIntegerValue; - } + if (includeFields) request.includeFields = includeFields.unsignedIntegerValue; } #pragma mark - diff --git a/PubNub/Core/PubNub+PAM.h b/PubNub/Core/PubNub+PAM.h index d39470011..a88a5a93e 100644 --- a/PubNub/Core/PubNub+PAM.h +++ b/PubNub/Core/PubNub+PAM.h @@ -4,41 +4,31 @@ NS_ASSUME_NONNULL_BEGIN -#pragma mark API group interface - -/** - * @brief \b PubNub client core class extension to provide access to 'PAM' API group. - * - * @discussion Set of API which allow to change access token used by client. - * - * @author Serhii Mamontov - * @version 4.17.0 - * @since 4.17.0 - * @copyright © 2010-2021 PubNub, Inc. - */ +#pragma mark Interface declaration + +/// **PubNub** `File Share` APIs. +/// +/// Set of API which allow to change access token used by client. @interface PubNub (PAM) #pragma mark - PAM -/** - * @brief Decode an existing token and returns the object containing permissions embedded in that token. The client may use this method for debugging. - * - * @param token Base64-encoded PubNub access token. - * - * @return Decoded token representation instance. - */ +/// Decode an existing token and returns the object containing permissions embedded in that token. The client may use +/// this method for debugging. +/// +/// - Parameter token: Base64-encoded PubNub access token. +/// - Returns: Decoded token representation instance. - (nullable PNPAMToken *)parseAuthToken:(NSString *)token; -/** - * @brief Set PubNub access token which should be used to authorize REST API calls. - * - * @code - * [self.client setAuthToken:@"access-token"]; - * @endcode - * - * @param token Base64-encoded PubNub access token. - */ +/// Set PubNub access token which should be used to authorize REST API calls. +/// +/// #### Example: +/// ```objc +/// [self.client setAuthToken:@"access-token"]; +/// ``` +/// +/// - Parameter token: Base64-encoded PubNub access token. - (void)setAuthToken:(NSString *)token; #pragma mark - diff --git a/PubNub/Core/PubNub+PAM.m b/PubNub/Core/PubNub+PAM.m index 4007c0eee..79fcb08e3 100644 --- a/PubNub/Core/PubNub+PAM.m +++ b/PubNub/Core/PubNub+PAM.m @@ -1,18 +1,10 @@ -/** - * @author Serhii Mamontov - * @version 4.17.0 - * @since 4.17.0 - * @copyright © 2010-2021 PubNub, Inc. - */ +#import "PubNub+PAM.h" #import "PNConfiguration+Private.h" #import "PubNub+CorePrivate.h" #import "PNPAMToken+Private.h" -#import "PubNub+PAMPrivate.h" -#import "PNConfiguration.h" -#import "PNHelpers.h" -#pragma mark Public interface implementation +#pragma mark Interface implementation @implementation PubNub (PAM) @@ -24,22 +16,9 @@ - (PNPAMToken *)parseAuthToken:(NSString *)token { } - (void)setAuthToken:(NSString *)token { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock asyncWriteAccessWithBlock:^{ self.configuration.authToken = token; - }); -} - - -#pragma mark - Request helper - -- (void)addAuthParameter:(PNRequestParameters *)parameters { - pn_safe_property_read(self.resourceAccessQueue, ^{ - if (self.configuration.authToken.length) { - [parameters addQueryParameter:self.configuration.authToken forFieldName:@"auth"]; - } else if (self.configuration.authKey.length) { - [parameters addQueryParameter:self.configuration.authKey forFieldName:@"auth"]; - } - }); + }]; } #pragma mark - diff --git a/PubNub/Core/PubNub+PAMPrivate.h b/PubNub/Core/PubNub+PAMPrivate.h deleted file mode 100644 index 0b7892648..000000000 --- a/PubNub/Core/PubNub+PAMPrivate.h +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.17.0 - * @since 4.17.0 - * @copyright © 2010-2021 PubNub, Inc. - */ -#import "PubNub+PAM.h" -#import "PNRequestParameters.h" - - -NS_ASSUME_NONNULL_BEGIN - -@interface PubNub (PAMPrivate) - - -#pragma mark - Request helper - -/** - * @brief Add required authorization parameter (auth token or auth key) parameter to request. - * - * @param parameters Object which holds set of parameters required to perform request. - */ -- (void)addAuthParameter:(PNRequestParameters *)parameters; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Core/PubNub+Presence.h b/PubNub/Core/PubNub+Presence.h index 38f90f09c..4c7c906ac 100644 --- a/PubNub/Core/PubNub+Presence.h +++ b/PubNub/Core/PubNub+Presence.h @@ -1,301 +1,381 @@ -#import +#import + +// Request +#import +#import +#import +#import + +// Response +#import +#import +#import +#import + +// Deprecated #import #import #import #import #import #import -#import +NS_ASSUME_NONNULL_BEGIN -#pragma mark Class forward +#pragma mark Interface declaration -@class PNPresenceChannelGroupHereNowResult, PNPresenceChannelHereNowResult, - PNPresenceGlobalHereNowResult, PNPresenceWhereNowResult, PNErrorStatus; +/// **PubNub** `Presence` APIs. +/// +/// Set of APIs which allow retrieving information about channels and user presence and perform heartbeat requests to +/// let PubNub service know what client still present. +@interface PubNub (Presence) -NS_ASSUME_NONNULL_BEGIN +#pragma mark - Presence API builder interdace (deprecated) + +/// Presence API access builder. +@property (nonatomic, readonly, strong) PNPresenceAPICallBuilder * (^presence)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); -#pragma mark - API group interface -/** - * @brief \b PubNub client core class extension to provide access to 'presence' API group. - * - * @discussion Set of API which allow to retrieve information about subscriber(s) on remote data - * object live feeds and perform heartbeat requests to let \b PubNub service know what client still - * interested in updates from feed. - * - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ -@interface PubNub (Presence) +#pragma mark - Channel and Channel Groups presence -#pragma mark - API builder support -/** - * @brief Presence API access builder. - * - * @return API call configuration builder. - * - * @since 4.5.4 - */ -@property (nonatomic, readonly, strong) PNPresenceAPICallBuilder * (^presence)(void); +/// Retrieve channels and groups presence information. +/// +/// Depending from used request it is possible to retrieve global or presence on channels / channel groups. +/// +/// #### Examples: +/// ##### Global presence: +/// ```objc +/// PNHereNowRequest *request = [PNHereNowRequest requestGlobal]; +/// [self.client hereNowWithRequest:request completion:^(PNPresenceHereNowResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded presence information using: +/// // `result.data.channels` - dictionary with active channels and presence information on each. Each channel +/// // will have next fields: `uuids` - list of subscribers; `occupancy` - number of +/// // active subscribers. +/// // Each uuids entry has next fields: `uuid` - identifier and `state` if it has been +/// // provided. +/// // `result.data.totalChannels` - total number of active channels. +/// // `result.data.totalOccupancy` - total number of active subscribers. +/// } else { +/// // Handle presence audit error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// ##### Channels presence: +/// ```objc +/// PNHereNowRequest *request = [PNHereNowRequest requestForChannels:@[@"test-channel-a", @"test-channel-b"]]; +/// [self.client hereNowWithRequest:request completion:^(PNPresenceHereNowResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded presence information using: +/// // `result.data.channels` - dictionary with active channels and presence information on each. Each channel +/// // will have next fields: `uuids` - list of subscribers; `occupancy` - number of +/// // active subscribers. +/// // Each uuids entry has next fields: `uuid` - identifier and `state` if it has +/// // been provided. +/// // `result.data.totalChannels` - total number of active channels. +/// // `result.data.totalOccupancy` - total number of active subscribers. +/// } else { +/// // Handle presence audit error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// ##### Channel groups presence: +/// ```objc +/// PNHereNowRequest *request = [PNHereNowRequest requestForChannelGroups:@[@"channel-group-a", @"channel-group-b"]]; +/// [self.client hereNowWithRequest:request completion:^(PNPresenceHereNowResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded presence information using: +/// // `result.data.channels` - dictionary with active channels and presence information on each. Each channel +/// // will have next fields: `uuids` - list of subscribers; `occupancy` - number of +/// // active subscribers. +/// // Each uuids entry has next fields: `uuid` - identifier and `state` if it has +/// // been provided. +/// // `result.data.totalChannels` - total number of active channels. +/// // `result.data.totalOccupancy` - total number of active subscribers. +/// } else { +/// // Handle presence audit error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to retrieve presence information. +/// - block: Channel / channel group presence retrieved request completion block. +- (void)hereNowWithRequest:(PNHereNowRequest *)request completion:(PNHereNowCompletionBlock)block + NS_SWIFT_NAME(hereNowWithRequest(_:completion:)); #pragma mark - Global here now -/** - * @brief Request information about subscribers on all remote data objects live feeds. - * - * @discussion This is application wide request for all remote data objects which is registered - * under publish and subscribe keys used for client configuration. - * - * @note This API will retrieve only list of UUIDs along with their state for each remote data - * object and number of subscribers in total for objects and overall. - * - * @code - * [self.client hereNowWithCompletion:^(PNPresenceGlobalHereNowResult *result, - * PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded presence information using: - * // result.data.channels - dictionary with active channels and presence information on - * // each. Each channel will have next fields: "uuids" - list of - * // subscribers; occupancy - number of active subscribers. - * // Each uuids entry has next fields: "uuid" - identifier and - * // "state" if it has been provided. - * // result.data.totalChannels - total number of active channels. - * // result.data.totalOccupancy - total number of active subscribers. - * } else { - * // Handle presence audit error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param block Here now fetch completion block. - * - * @since 4.0 - */ +/// Request information about subscribers on all remote data objects live feeds. +/// +/// This is application wide request for all remote data objects which is registered under publish and subscribe keys +/// used for client configuration. +/// +/// > Note: This API will retrieve only list of UUIDs along with their state for each remote data object and number of +/// subscribers in total for objects and overall. +/// +/// #### Example: +/// ```objc +/// [self.client hereNowWithCompletion:^(PNPresenceGlobalHereNowResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded presence information using: +/// // `result.data.channels` - dictionary with active channels and presence information on each. Each channel +/// // will have next fields: `uuids` - list of subscribers; `occupancy` - number of +/// // active subscribers. +/// // Each uuids entry has next fields: `uuid` - identifier and `state` if it has +/// // been provided. +/// // `result.data.totalChannels` - total number of active channels. +/// // `result.data.totalOccupancy` - total number of active subscribers. +/// } else { +/// // Handle presence audit error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameter block: Here now fetch completion block. - (void)hereNowWithCompletion:(PNGlobalHereNowCompletionBlock)block - NS_SWIFT_NAME(hereNowWithCompletion(_:)); - -/** - * @brief Request information about subscribers on all remote data objects live feeds. - * - * @discussion This is application wide request for all remote data objects which is registered - * under publish and subscribe keys used for client configuration. - * - * @code - * [self.client hereNowWithVerbosity:PNHereNowState - * completion:^(PNPresenceGlobalHereNowResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded presence information using: - * // result.data.channels - dictionary with active channels and presence information on - * // each. Each channel will have next fields: "uuids" - list of - * // subscribers; "occupancy" - number of active subscribers. - * // Each uuids entry has next fields: "uuid" - identifier and - * // "state" if it has been provided. - * // result.data.totalChannels - total number of active channels. - * // result.data.totalOccupancy - total number of active subscribers. - * } else { - * // Handle presence audit error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param level One of \b PNHereNowVerbosityLevel fields to instruct what exactly data it expected - * in response. - * @param block Here now fetch completion block. - * - * @since 4.0 - */ + NS_SWIFT_NAME(hereNowWithCompletion(_:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-hereNowWithRequest:completion:' method instead."); + +/// Request information about subscribers on all remote data objects live feeds. +/// +/// This is application wide request for all remote data objects which is registered under publish and subscribe keys +/// used for client configuration. +/// +/// #### Example: +/// ```objc +/// [self.client hereNowWithVerbosity:PNHereNowState +/// completion:^(PNPresenceGlobalHereNowResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded presence information using: +/// // `result.data.channels` - dictionary with active channels and presence information on each. Each channel +/// // will have next fields: `uuids` - list of subscribers; `occupancy` - number of +/// // active subscribers. +/// // Each uuids entry has next fields: `uuid` - identifier and `state` if it has +/// // been provided. +/// // `result.data.totalChannels` - total number of active channels. +/// // `result.data.totalOccupancy` - total number of active subscribers. +/// } else { +/// // Handle presence audit error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - level: One of **PNHereNowVerbosityLevel** fields to instruct what exactly data it expected in response. +/// - block: Here now fetch completion block. - (void)hereNowWithVerbosity:(PNHereNowVerbosityLevel)level completion:(PNGlobalHereNowCompletionBlock)block - NS_SWIFT_NAME(hereNowWithVerbosity(_:completion:)); + NS_SWIFT_NAME(hereNowWithVerbosity(_:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-hereNowWithRequest:completion:' method instead."); #pragma mark - Channel here now -/** - * @brief Request information about subscribers on specific channel live feeds. - * - * @note This API will retrieve only list of UUIDs along with their state for each remote data - * object and number of subscribers in total for objects and overall. - * - * @code - * [self.client hereNowForChannel:@"pubnub" - * withCompletion:^(PNPresenceChannelHereNowResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded presence information using: - * // result.data.uuids - dictionary with active subscriber. Each entry will have next - * // fields: "uuid" - identifier and "state" if it has been provided. - * // result.data.occupancy - total number of active subscribers. - * } else { - * // Handle presence audit error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Channel for which here now information should be received. - * @param block Here now fetch completion block. - * - * @since 4.0 - */ -- (void)hereNowForChannel:(NSString *)channel withCompletion:(PNHereNowCompletionBlock)block - NS_SWIFT_NAME(hereNowForChannel(_:withCompletion:)); - -/** - * @brief Request information about subscribers on specific channel live feeds. - * - * @code - * [self.client hereNowForChannel:@"pubnub" withVerbosity:PNHereNowState - * completion:^(PNPresenceChannelHereNowResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded presence information using: - * // result.data.uuids - dictionary with active subscriber. Each entry will have next - * // fields: "uuid" - identifier and "state" if it has been provided. - * // result.data.occupancy - total number of active subscribers. - * } else { - * // Handle presence audit error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param channel Channel for which here now information should be received. - * @param level One of \b PNHereNowVerbosityLevel fields to instruct what exactly data it expected - * in response. - * @param block Here now fetch completion block. - * - * @since 4.0 - */ +/// Request information about subscribers on specific channel live feeds. +/// +/// > Note: This API will retrieve only list of UUIDs along with their state for each remote data object and number of +/// subscribers in total for objects and overall. +/// +/// #### Example: +/// ```objc +/// [self.client hereNowForChannel:@"pubnub" +/// withCompletion:^(PNPresenceChannelHereNowResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded presence information using: +/// // `result.data.uuids` - dictionary with active subscriber. Each entry will have next fields: +/// // `uuid` - identifier and `state` if it has been provided. +/// // `result.data.occupancy` - total number of active subscribers. +/// } else { +/// // Handle presence audit error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Channel for which here now information should be received. +/// - block: Here now fetch completion block. +- (void)hereNowForChannel:(NSString *)channel withCompletion:(PNChannelHereNowCompletionBlock)block + NS_SWIFT_NAME(hereNowForChannel(_:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-hereNowWithRequest:completion:' method instead."); + +/// Request information about subscribers on specific channel live feeds. +/// +/// #### Example: +/// ```objc +/// [self.client hereNowForChannel:@"pubnub" +/// withVerbosity:PNHereNowState +/// completion:^(PNPresenceChannelHereNowResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded presence information using: +/// // `result.data.uuids` - dictionary with active subscriber. Each entry will have next fields: +/// // `uuid` - identifier and `state` if it has been provided. +/// // `result.data.occupancy` - total number of active subscribers. +/// } else { +/// // Handle presence audit error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - channel: Channel for which here now information should be received. +/// - level: One of **PNHereNowVerbosityLevel** fields to instruct what exactly data it expected in response. +/// - block: Here now fetch completion block. - (void)hereNowForChannel:(NSString *)channel withVerbosity:(PNHereNowVerbosityLevel)level - completion:(PNHereNowCompletionBlock)block - NS_SWIFT_NAME(hereNowForChannel(_:withVerbosity:completion:)); + completion:(PNChannelHereNowCompletionBlock)block + NS_SWIFT_NAME(hereNowForChannel(_:withVerbosity:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-hereNowWithRequest:completion:' method instead."); #pragma mark - Channel group here now -/** - * @brief Request information about subscribers on specific channel group live feeds. - * - * @note This API will retrieve only list of UUIDs along with their state for each remote data - * object and number of subscribers in total for objects and overall. - * - * @code - * [self.client hereNowForChannelGroup:@"developers" - * withCompletion:^(PNPresenceChannelGroupHereNowResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded presence information using: - * // result.data.channels - dictionary with active channels and presence information on - * // each. Each channel will have next fields: "uuids" - list of - * // subscribers; occupancy - number of active subscribers. - * // Each uuids entry has next fields: "uuid" - identifier and - * // "state" if it has been provided. - * // result.data.totalChannels - total number of active channels. - * // result.data.totalOccupancy - total number of active subscribers. - * } else { - * // Handle presence audit error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param group Channel group name for which here now information should be received. - * @param block Here now fetch completion block. - * - * @since 4.0 - */ -- (void)hereNowForChannelGroup:(NSString *)group - withCompletion:(PNChannelGroupHereNowCompletionBlock)block - NS_SWIFT_NAME(hereNowForChannelGroup(_:withCompletion:)); - -/** - * @brief Request information about subscribers on specific channel group live feeds. - * - * @code - * [self.client hereNowForChannelGroup:@"developers" withVerbosity:PNHereNowState - * completion:^(PNPresenceChannelGroupHereNowResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded presence information using: - * // result.data.channels - dictionary with active channels and presence information on - * // each. Each channel will have next fields: "uuids" - list of - * // subscribers; occupancy - number of active subscribers. - * // Each uuids entry has next fields: "uuid" - identifier and - * // "state" if it has been provided. - * // result.data.totalChannels - total number of active channels. - * // result.data.totalOccupancy - total number of active subscribers. - * } else { - * // Handle presence audit error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param group Channel group for which here now information should be received. - * @param level One of \b PNHereNowVerbosityLevel fields to instruct what exactly data it expected - * in response. - * @param block Here now fetch completion block. - * - * @since 4.0 - */ +/// Request information about subscribers on specific channel group live feeds. +/// +/// > Note: This API will retrieve only list of UUIDs along with their state for each remote data object and number of +/// subscribers in total for objects and overall. +/// +/// #### Example: +/// ```objc +/// [self.client hereNowForChannelGroup:@"developers" +/// withCompletion:^(PNPresenceChannelGroupHereNowResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded presence information using: +/// // `result.data.channels` - dictionary with active channels and presence information on each. Each channel +/// // will have next fields: `uuids` - list of subscribers; `occupancy` - number of +/// // active subscribers. +/// // Each uuids entry has next fields: `uuid` - identifier and `state` if it has +/// // been provided. +/// // `result.data.totalChannels` - total number of active channels. +/// // `result.data.totalOccupancy` - total number of active subscribers. +/// } else { +/// // Handle presence audit error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - group: Channel group name for which here now information should be received. +/// - block: Here now fetch completion block. +- (void)hereNowForChannelGroup:(NSString *)group withCompletion:(PNChannelGroupHereNowCompletionBlock)block + NS_SWIFT_NAME(hereNowForChannelGroup(_:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-hereNowWithRequest:completion:' method instead."); + +/// Request information about subscribers on specific channel group live feeds. +/// +/// #### Example: +/// ```objc +/// [self.client hereNowForChannelGroup:@"developers" +/// withVerbosity:PNHereNowState +/// completion:^(PNPresenceChannelGroupHereNowResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded presence information using: +/// // `result.data.channels` - dictionary with active channels and presence information on each. Each channel +/// // will have next fields: `uuids` - list of subscribers; `occupancy` - number of +/// // active subscribers. +/// // Each uuids entry has next fields: `uuid` - identifier and `state` if it has +/// // been provided. +/// // `result.data.totalChannels` - total number of active channels. +/// // `result.data.totalOccupancy` - total number of active subscribers. +/// } else { +/// // Handle presence audit error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - group: Channel group for which here now information should be received. +/// - level: One of **PNHereNowVerbosityLevel** fields to instruct what exactly data it expected in response. +/// - block: Here now fetch completion block. - (void)hereNowForChannelGroup:(NSString *)group withVerbosity:(PNHereNowVerbosityLevel)level completion:(PNChannelGroupHereNowCompletionBlock)block - NS_SWIFT_NAME(hereNowForChannelGroup(_:withVerbosity:completion:)); + NS_SWIFT_NAME(hereNowForChannelGroup(_:withVerbosity:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-hereNowWithRequest:completion:' method instead."); #pragma mark - Client where now -/** - * @brief Request information about remote data object live feeds on which client with specified - * UUID subscribed at this moment. - * - * @code - * [self.client whereNowUUID:@"Steve" - * withCompletion:^(PNPresenceWhereNowResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded presence 'where now' information using: result.data.channels - * } else { - * // Handle presence audit error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param uuid UUID for which request should be performed. - * @param block Where now fetch completion block. - * - * @since 4.0 - */ + +/// Retrieve user presence information. +/// +/// #### Example: +/// ```objc +/// PNWhereNowRequest *request = [PNWhereNowRequest requestForUserId:@"Steve"]; +/// [self.client whereNowWithRequest:request completion:^(PNPresenceWhereNowResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle fetched `where now` information using: `result.data.channels` +/// } else { +/// // Handle fetch `where now` error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to retrieve user's presence information. +/// - block: User presence retrieved request completion block. +- (void)whereNowWithRequest:(PNWhereNowRequest *)request completion:(PNWhereNowCompletionBlock)block + NS_SWIFT_NAME(whereNowWithRequest(_:completion:)); + +/// Request information about remote data object live feeds on which client with specified UUID subscribed at this +/// moment. +/// +/// #### Example: +/// ```objc +/// [self.client whereNowUUID:@"Steve" withCompletion:^(PNPresenceWhereNowResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded presence `where now` information using: `result.data.channels` +/// } else { +/// // Handle presence audit error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - uuid: UUID for which request should be performed. +/// - block: Where now fetch completion block. - (void)whereNowUUID:(NSString *)uuid withCompletion:(PNWhereNowCompletionBlock)block - NS_SWIFT_NAME(whereNowUUID(_:withCompletion:)); + NS_SWIFT_NAME(whereNowUUID(_:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-whereNowWithRequest:completion:' method instead."); #pragma mark - diff --git a/PubNub/Core/PubNub+Presence.m b/PubNub/Core/PubNub+Presence.m index b6628a458..d1efd6c20 100644 --- a/PubNub/Core/PubNub+Presence.m +++ b/PubNub/Core/PubNub+Presence.m @@ -1,65 +1,56 @@ -/** - * @author Serhii Mamontov - * @version 4.15.8 - * @since 4.0.0 - * @copyright © 2010-2018 PubNub, Inc. - */ #import "PubNub+PresencePrivate.h" -#import "PNAPICallBuilder+Private.h" +#import "PNPresenceChannelGroupHereNowResult+Private.h" +#import "PNPresenceChannelHereNowResult+Private.h" +#import "PNPresenceGlobalHereNowResult+Private.h" +#import "PNPresenceHereNowFetchData+Private.h" +#import "PNBaseOperationData+Private.h" +#import "PNOperationResult+Private.h" #import "PubNub+SubscribePrivate.h" -#import "PNPrivateStructures.h" -#import "PNRequestParameters.h" #import "PubNub+CorePrivate.h" #import "PNStatus+Private.h" -#import "PNConfiguration.h" -#import "PNErrorStatus.h" -#import "PNLogMacro.h" #import "PNHelpers.h" +// Deprecated +#import "PNAPICallBuilder+Private.h" + NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration @interface PubNub (PresenceProtected) #pragma mark - Channel/Channel group here now -/** - * @brief Request information about subscribers on specific remote data object live feeds. - * - * @param level One of \b PNHereNowVerbosityLevel fields to instruct what exactly data it expected - * in response. - * @param objects Remote data objects for which here now information should be received. - * @param operation One of \b PNOperationType fields to identify which kind on of presence operation - * should be performed. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block Here now fetch completion block. - * - * @since 4.15.8 - */ +/// Request information about subscribers on specific remote data object live feeds. +/// +/// - Parameters: +/// - level: One of **PNHereNowVerbosityLevel** fields to instruct what exactly data it expected in response. +/// - objects: Remote data objects for which here now information should be received. +/// - operation: One of **PNOperationType** fields to identify which kind on of presence operation should be +/// performed. +/// - shouldMapResult: Whether returned result should be re-mapped to the expected return type (depends from +/// `operation`). +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. +/// - block: Here now fetch completion block. - (void)hereNowWithVerbosity:(PNHereNowVerbosityLevel)level forObjects:(nullable NSArray *)objects withOperationType:(PNOperationType)operation queryParameters:(nullable NSDictionary *)queryParameters - completionBlock:(id)block; + mapResult:(BOOL)shouldMapResult + completionBlock:(PNHereNowCompletionBlock)block; #pragma mark - Client where now -/** - * @brief Request information about remote data object live feeds on which client with specified - * UUID subscribed at this moment. - * - * @param uuid Reference on UUID for which request should be performed. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block Where now fetch completion block. - * - * @since 4.8.2 - */ +/// Request information about remote data object live feeds on which client with specified UUID subscribed at this +/// moment. +/// +/// - Parameters: +/// - uuid: Reference on UUID for which request should be performed. +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. +/// - block: Where now fetch completion block. - (void)whereNowUUID:(NSString *)uuid withQueryParameters:(nullable NSDictionary *)queryParameters completion:(PNWhereNowCompletionBlock)block; @@ -67,52 +58,38 @@ - (void)whereNowUUID:(NSString *)uuid #pragma mark - Heartbeat -/** - * @brief Send request to change client's presence at specified \c channels and / or \c groups. - * - * @discussion Depending from \c connected flag value, heartbeat can be used for passed objects - * (channels/groups) to trigger \a join event or use presence \a leave API to trigger \a leave - * event. - * - * @param connected Whether \c join or \c leave events should be generated for client. - * @param channels List of \c channels for which client should change it's presence state according - * to \c connected flag value. - * @param channelGroups List of channel \c groups for which client should change it's presence state - * according to \c connected flag value. - * @param states Client's state which should be set for passed objects (same as state passed during - * subscription or using state change API). - * @param block Client's presence modification completion block. - * - * @since 4.8.2 - */ +/// Send request to change client's presence at specified `channels` and / or `groups`. +/// +/// Depending from ``connected`` flag value, heartbeat can be used for passed objects (channels / groups) to trigger +/// `join` event or use presence `leave` API to trigger `leave` event. +/// +/// - Parameters: +/// - connected: Whether `join` or `leave` events should be generated for client. +/// - channels: List of ``channels`` for which client should change it's presence state according to ``connected`` +/// flag value. +/// - channelGroups: List of channel `groups` for which client should change it's presence state according to ``connected`` flag value. +/// - states: Client's state which should be set for passed objects (same as state passed during subscription or using state change API). +/// - block: Client's presence modification completion block. - (void)setConnected:(BOOL)connected forChannels:(nonnull NSArray *)channels channelGroups:(nonnull NSArray *)channelGroups withState:(nonnull NSDictionary *)states completionBlock:(nonnull PNStatusBlock)block; -/** - * @brief List of channels which should be used with heartbeat request. - * - * @discussion Use subscriber's and heartbeat managers information about active channels to create - * full list which should be passed to heartbeat request. - * - * @return Full list of active channels. - * - * @since 4.7.5 - */ +/// List of channels which should be used with heartbeat request. +/// +/// Use subscriber's and heartbeat managers information about active channels to create full list which should be passed +/// to heartbeat request. +/// +/// - Returns: Full list of active channels. - (NSArray *)channelsForHeartbeat; -/** - * @brief List of channel groups which should be used with heartbeat request. - * - * @discussion Use subscriber's and heartbeat managers information about active channel groups to - * create full list which should be passed to heartbeat request. - * - * @return Full list of active channel groups. - * - * @since 4.7.5 - */ +/// List of channel groups which should be used with heartbeat request. +/// +/// Use subscriber's and heartbeat managers information about active channel groups to create full list which should be +/// passed to heartbeat request. +/// +/// - Returns: Full list of active channel groups. - (NSArray *)channelGroupsForHeartbeat; #pragma mark - @@ -128,13 +105,12 @@ - (void)setConnected:(BOOL)connected @implementation PubNub (Presence) -#pragma mark - API Builder support +#pragma mark - Presence API builder interdace (deprecated) - (PNPresenceAPICallBuilder * (^)(void))presence { PNPresenceAPICallBuilder *builder = nil; - builder = [PNPresenceAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, + builder = [PNPresenceAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters) { - NSDictionary *queryParam = parameters[@"queryParam"]; id block = parameters[@"block"]; @@ -165,33 +141,77 @@ @implementation PubNub (Presence) type = PNHereNowForChannelGroupOperation; } - if (!objects) { - objects = @[object]; - } + if (!objects) objects = @[object]; } if (parameters[NSStringFromSelector(@selector(verbosity))]) { NSNumber *verbosity = parameters[NSStringFromSelector(@selector(verbosity))]; level = (PNHereNowVerbosityLevel)verbosity.integerValue; } - + [self hereNowWithVerbosity:level forObjects:objects withOperationType:type queryParameters:queryParam + mapResult:YES completionBlock:block]; } else { NSString *uuid = parameters[NSStringFromSelector(@selector(uuid))]; [self whereNowUUID:uuid withQueryParameters:queryParam completion:block]; } }]; - + return ^PNPresenceAPICallBuilder * { return builder; }; } +#pragma mark - Channel and Channel Groups presence + +- (void)hereNowWithRequest:(PNHereNowRequest *)userRequest completion:(PNHereNowCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNPresenceHereNowResult class] + status:[PNErrorStatus class]]; + PNHereNowCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + if (userRequest.operation == PNHereNowGlobalOperation) { + PNLogAPICall(self.logger, @" Global 'here now' information with %@ data.", + PNHereNowDataStrings[userRequest.verbosityLevel]); + } else { + PNLogAPICall(self.logger, @" Channel%@ 'here now' information for %@ with " + "%@ data.", (userRequest.operation == PNHereNowForChannelGroupOperation ? @" group" : @""), + ([userRequest.channels ?: userRequest.channelGroups componentsJoinedByString:@","] ?: @""), + PNHereNowDataStrings[userRequest.verbosityLevel]); + } + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.result) { + if (!userRequest.channelGroups.count && userRequest.channels.count == 1) { + [result.result.data setPresenceChannel:userRequest.channels.firstObject]; + } + } + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self hereNowWithRequest:userRequest completion:block]; + }; +#pragma clang diagnostic pop + } + + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + + #pragma mark - Global here now - (void)hereNowWithCompletion:(PNGlobalHereNowCompletionBlock)block { @@ -199,31 +219,32 @@ - (void)hereNowWithCompletion:(PNGlobalHereNowCompletionBlock)block { } - (void)hereNowWithVerbosity:(PNHereNowVerbosityLevel)level - completion:(PNGlobalHereNowCompletionBlock)block { - + completion:(PNGlobalHereNowCompletionBlock)handlerBlock { + PNGlobalHereNowCompletionBlock block = [handlerBlock copy]; [self hereNowWithVerbosity:level forObjects:nil withOperationType:PNHereNowGlobalOperation queryParameters:nil - completionBlock:block]; + mapResult:YES + completionBlock:(id)block]; } #pragma mark - Channel here now -- (void)hereNowForChannel:(NSString *)channel withCompletion:(PNHereNowCompletionBlock)block { +- (void)hereNowForChannel:(NSString *)channel withCompletion:(PNChannelHereNowCompletionBlock)block { [self hereNowForChannel:channel withVerbosity:PNHereNowState completion:block]; } - (void)hereNowForChannel:(NSString *)channel withVerbosity:(PNHereNowVerbosityLevel)level - completion:(PNHereNowCompletionBlock)block { - + completion:(PNChannelHereNowCompletionBlock)block { [self hereNowWithVerbosity:level forObjects:(channel ? @[channel] : nil) withOperationType:PNHereNowForChannelOperation queryParameters:nil - completionBlock:block]; + mapResult:YES + completionBlock:(id)block]; } @@ -243,71 +264,84 @@ - (void)hereNowForChannelGroup:(NSString *)group forObjects:(group ? @[group] : nil) withOperationType:PNHereNowForChannelGroupOperation queryParameters:nil - completionBlock:block]; + mapResult:YES + completionBlock:(id)block]; } - (void)hereNowWithVerbosity:(PNHereNowVerbosityLevel)level - forObjects:(NSArray *)objects + forObjects:(nullable NSArray *)objects withOperationType:(PNOperationType)operation - queryParameters:(NSDictionary *)queryParameters - completionBlock:(id)block { + queryParameters:(nullable NSDictionary *)queryParameters + mapResult:(BOOL)shouldMapResult + completionBlock:(PNHereNowCompletionBlock)block { + PNHereNowRequest *request = nil; + request.verbosityLevel = level; + + if (operation == PNHereNowGlobalOperation) request = [PNHereNowRequest requestGlobal]; + else if (operation == PNHereNowForChannelOperation) request = [PNHereNowRequest requestForChannels:objects]; + else if (operation == PNHereNowForChannelGroupOperation) { + request = [PNHereNowRequest requestForChannelGroups:objects]; + } + + request.arbitraryQueryParameters = queryParameters; + request.verbosityLevel = level; - PNRequestParameters *parameters = [PNRequestParameters new]; - [parameters addQueryParameter:@"1" forFieldName:@"disable_uuids"]; - [parameters addQueryParameter:@"0" forFieldName:@"state"]; - [parameters addQueryParameters:queryParameters]; - - if (level == PNHereNowUUID || level == PNHereNowState){ - [parameters addQueryParameter:@"0" forFieldName:@"disable_uuids"]; - - if (level == PNHereNowState) { - [parameters addQueryParameter:@"1" forFieldName:@"state"]; - } + if (!shouldMapResult) { + [self hereNowWithRequest:request completion:block]; + return; } - - if (operation == PNHereNowGlobalOperation) { - PNLogAPICall(self.logger, @" Global 'here now' information with %@ data.", - PNHereNowDataStrings[level]); - } else { - NSString *channelsOrGroups = [PNChannel namesForRequest:objects defaultString:@","]; - - if (objects.count) { - NSString *channels = operation == PNHereNowForChannelOperation ? channelsOrGroups : @","; - - [parameters addPathComponent:channels forPlaceholder:@"{channel}"]; - - if (operation == PNHereNowForChannelGroupOperation) { - [parameters addQueryParameter:channelsOrGroups forFieldName:@"channel-group"]; + + PNWeakify(self); + [self hereNowWithRequest:request completion:^(PNPresenceHereNowResult *result, PNErrorStatus *status) { + PNStrongify(self); + id mappedResult = result; + + if (mappedResult) { + if (operation == PNHereNowGlobalOperation) { + mappedResult = [PNPresenceGlobalHereNowResult legacyPresenceFromPresence:result]; + } else if (operation == PNHereNowForChannelOperation) { + mappedResult = [PNPresenceChannelHereNowResult legacyPresenceFromPresence:result]; + } else if (operation == PNHereNowForChannelGroupOperation) { + mappedResult = [PNPresenceChannelGroupHereNowResult legacyPresenceFromPresence:result]; } } - - PNLogAPICall(self.logger, @" Channel%@ 'here now' information for %@ with " - "%@ data.", (operation == PNHereNowForChannelGroupOperation ? @" group" : @""), - (channelsOrGroups ?: @""), PNHereNowDataStrings[level]); - } - - __weak __typeof(self) weakSelf = self; - [self processOperation:operation - withParameters:parameters - completionBlock:^(PNOperationResult *result, PNStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf hereNowWithVerbosity:level - forObjects:objects - withOperationType:operation - queryParameters:queryParameters - completionBlock:block]; - }; - } - - [weakSelf callBlock:block status:NO withResult:result andStatus:status]; + + [self callBlock:block status:NO withResult:mappedResult andStatus:status]; }]; } #pragma mark - Client where now +- (void)whereNowWithRequest:(PNWhereNowRequest *)userRequest completion:(PNWhereNowCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNPresenceWhereNowResult class] + status:[PNErrorStatus class]]; + PNWhereNowCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNLogAPICall(self.logger, @" 'Where now' presence information for %@.", + userRequest.userId ?: @""); + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self whereNowWithRequest:userRequest completion:block]; + }; +#pragma clang diagnostic pop + } + + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + - (void)whereNowUUID:(NSString *)uuid withCompletion:(PNWhereNowCompletionBlock)block { [self whereNowUUID:uuid withQueryParameters:nil completion:block]; } @@ -315,30 +349,10 @@ - (void)whereNowUUID:(NSString *)uuid withCompletion:(PNWhereNowCompletionBlock) - (void)whereNowUUID:(NSString *)uuid withQueryParameters:(NSDictionary *)queryParameters completion:(PNWhereNowCompletionBlock)block { + PNWhereNowRequest *request = [PNWhereNowRequest requestForUserId:uuid]; + request.arbitraryQueryParameters = queryParameters; - PNRequestParameters *parameters = [PNRequestParameters new]; - [parameters addQueryParameters:queryParameters]; - - if (uuid.length) { - [parameters addPathComponent:[PNString percentEscapedString:uuid] forPlaceholder:@"{uuid}"]; - } - - PNLogAPICall(self.logger, @" 'Where now' presence information for %@.", - (uuid?: @"")); - - __weak __typeof(self) weakSelf = self; - [self processOperation:PNWhereNowOperation - withParameters:parameters - completionBlock:^(PNOperationResult *result, PNStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf whereNowUUID:uuid withQueryParameters:queryParameters completion:block]; - }; - } - - [weakSelf callBlock:block status:NO withResult:result andStatus:status]; - }]; + [self whereNowWithRequest:request completion:block]; } @@ -349,30 +363,32 @@ - (void)setConnected:(BOOL)connected channelGroups:(NSArray *)channelGroups withState:(NSDictionary *)states completionBlock:(PNStatusBlock)block { - + PNErrorStatus *(^errorStatus)(PNStatusCategory) = ^(PNStatusCategory category) { PNOperationType operation = connected ? PNHeartbeatOperation : PNUnsubscribeOperation; - PNErrorStatus *badRequestStatus = [PNErrorStatus statusForOperation:operation - category:category - withProcessingError:nil]; - - __weak __typeof(self) weakSelf = self; + PNErrorStatus *badRequestStatus = [PNErrorStatus objectWithOperation:operation + category:category + response:nil]; + PNWeakify(self); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" badRequestStatus.retryBlock = ^{ - [weakSelf setConnected:connected - forChannels:channels - channelGroups:channelGroups - withState:states - completionBlock:block]; + PNStrongify(self); + [self setConnected:connected + forChannels:channels + channelGroups:channelGroups + withState:states + completionBlock:block]; }; - - [self appendClientInformation:badRequestStatus]; - +#pragma clang diagnostic pop + [self updateResult:badRequestStatus withRequest:nil response:nil]; + return badRequestStatus; }; - + if (!self.configuration.shouldManagePresenceListManually) { PNErrorStatus *badRequestStatus = errorStatus(PNCancelledCategory); - + [self callBlock:block status:YES withResult:nil andStatus:badRequestStatus]; return; } @@ -381,7 +397,7 @@ - (void)setConnected:(BOOL)connected NSArray *presenceChannelGroups = [PNChannel objectsWithOutPresenceFrom:channelGroups]; NSMutableArray *allPresenceObjects = [NSMutableArray arrayWithArray:presenceChannels]; [allPresenceObjects addObjectsFromArray:presenceChannelGroups]; - + [self.heartbeatManager setConnected:connected forChannelGroups:presenceChannelGroups]; [self.heartbeatManager setConnected:connected forChannels:presenceChannels]; @@ -402,102 +418,100 @@ - (void)setConnected:(BOOL)connected withQueryParameters:nil listenersNotification:NO completion:^(PNSubscribeStatus *status) { - - if (block) { - block((id)status); - } + if (block) block((id)status); }]; } } else { PNErrorStatus *badRequestStatus = errorStatus(PNBadRequestCategory); - [self callBlock:block status:YES withResult:nil andStatus:badRequestStatus]; } } -- (void)heartbeatWithCompletion:(PNStatusBlock)block { - - __weak __typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - NSArray *channels = [self channelsForHeartbeat]; - NSArray *groups = [self channelGroupsForHeartbeat]; +- (void)heartbeatWithRequest:(PNPresenceHeartbeatRequest *)userRequest completion:(PNStatusBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNErrorStatus class]]; + PNStatusBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNLogAPICall(self.logger, @" Heartbeat for %@%@%@.", + userRequest.channels.count + ? [NSString stringWithFormat:@"channel%@ '%@'", userRequest.channels.count > 1 ? @"s" : @"", + [userRequest.channels componentsJoinedByString:@", "]] + : @"", + userRequest.channels.count && userRequest.channelGroups.count ? @" and " : @"", + userRequest.channelGroups.count + ? [NSString stringWithFormat:@"group%@ '%@'", userRequest.channelGroups.count > 1 ? @"s" : @"", + [userRequest.channelGroups componentsJoinedByString:@", "]] + : @""); + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self heartbeatWithRequest:userRequest completion:block]; + }; +#pragma clang diagnostic pop + } - if (self.configuration.presenceHeartbeatValue > 0 && (channels.count || groups.count)) { - PNRequestParameters *parameters = [PNRequestParameters new]; + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; - [parameters addPathComponent:[PNChannel namesForRequest:channels defaultString:@","] - forPlaceholder:@"{channels}"]; + [self performRequest:userRequest withParser:responseParser completion:handler]; +} - if (groups.count) { - [parameters addQueryParameter:[PNChannel namesForRequest:groups] - forFieldName:@"channel-group"]; - } +- (void)heartbeatWithCompletion:(PNStatusBlock)handlerBlock { + NSArray *groups = [self channelGroupsForHeartbeat]; + NSArray *channels = [self channelsForHeartbeat]; - [parameters addQueryParameter:@(self.configuration.presenceHeartbeatValue).stringValue - forFieldName:@"heartbeat"]; + if (channels.count == 0 && groups.count == 0) { + PNErrorStatus *status = [PNErrorStatus objectWithOperation:PNHeartbeatOperation + category:PNAcknowledgmentCategory + response:nil]; + [self callBlock:handlerBlock status:YES withResult:nil andStatus:status]; - NSDictionary *state = [self.clientStateManager state]; + return; + } - if (state.count) { - if (self.configuration.shouldManagePresenceListManually) { - NSMutableArray *allObjects = [NSMutableArray arrayWithArray:channels]; - [allObjects addObjectsFromArray:groups]; - - /** - * Keep state only for channels / groups specified during manual presence manipulation method. - */ - state = [state dictionaryWithValuesForKeys:allObjects]; - } - - NSString *stateString = [PNJSON JSONStringFrom:state withError:nil]; + NSInteger heartbeat = self.configuration.presenceHeartbeatValue; + PNPresenceHeartbeatRequest *request = [PNPresenceHeartbeatRequest requestWithHeartbeat:heartbeat + channels:channels + channelGroups:groups]; + NSDictionary *state = [self.clientStateManager state]; - if (stateString.length) { - [parameters addQueryParameter:[PNString percentEscapedString:stateString] - forFieldName:@"state"]; - } - } - - PNLogAPICall(weakSelf.logger, @" Heartbeat for %@%@%@.", - (channels.count ? [NSString stringWithFormat:@"channel%@ '%@'", - (channels.count > 1 ? @"s" : @""), - [channels componentsJoinedByString:@", "]] : @""), - (channels.count && groups.count ? @" and " : @""), - (groups.count ? [NSString stringWithFormat:@"group%@ '%@'", - (groups.count > 1 ? @"s" : @""), - [groups componentsJoinedByString:@", "]] : @"")); - - [self processOperation:PNHeartbeatOperation - withParameters:parameters - completionBlock:^(PNStatus *status) { + if (state.count) { + if (self.configuration.shouldManagePresenceListManually) { + NSMutableArray *allObjects = [NSMutableArray arrayWithArray:channels]; + [allObjects addObjectsFromArray:groups]; - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; + // Keep state only for channels / groups specified during manual presence manipulation method. + state = [state dictionaryWithValuesForKeys:allObjects]; } - }); + } + + if (state.count > 0) request.state = state; + + [self heartbeatWithRequest:request completion:handlerBlock]; } - (NSArray *)channelsForHeartbeat { - NSArray *subscribedChannels = nil; - if (self.configuration.shouldManagePresenceListManually) { - subscribedChannels = [self.heartbeatManager channels]; - } else { - subscribedChannels = [self.subscriberManager channels]; - } + if (self.configuration.shouldManagePresenceListManually) subscribedChannels = [self.heartbeatManager channels]; + else subscribedChannels = [self.subscriberManager channels]; return [PNChannel objectsWithOutPresenceFrom:subscribedChannels]; } - (NSArray *)channelGroupsForHeartbeat { - NSArray *subscribedChannelGroups = nil; if (self.configuration.shouldManagePresenceListManually) { subscribedChannelGroups = [self.heartbeatManager channelGroups]; - } else { - subscribedChannelGroups = [self.subscriberManager channelGroups]; - } + } else subscribedChannelGroups = [self.subscriberManager channelGroups]; return [PNChannel objectsWithOutPresenceFrom:subscribedChannelGroups]; } diff --git a/PubNub/Core/PubNub+PresencePrivate.h b/PubNub/Core/PubNub+PresencePrivate.h index 5e55a8f1b..d7a1c335b 100644 --- a/PubNub/Core/PubNub+PresencePrivate.h +++ b/PubNub/Core/PubNub+PresencePrivate.h @@ -1,8 +1,3 @@ -/** - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ #import "PubNub+Presence.h" @@ -15,15 +10,18 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Heartbeat support -/** - * @brief Issue heartbeat request to \b PubNub network. - * - * @discussion Heartbeat help \b PubNub presence service to control subscribers availability. - * - * @param block Block which should be called with service information. - * - * @since 4.0 - */ +/// Announce user presence on specified `channels` and `channel groups`. +/// +/// - Parameters: +/// - request: Request with information required to announce presence. +/// - block: Presence announce request completion block. +- (void)heartbeatWithRequest:(PNPresenceHeartbeatRequest *)request completion:(PNStatusBlock)block; + +/// Issue heartbeat request to **PubNub** network. +/// +/// Heartbeat help **PubNub** presence service to control subscribers availability. +/// +/// - Parameter block: Block which should be called with service information. - (void)heartbeatWithCompletion:(PNStatusBlock)block; #pragma mark - diff --git a/PubNub/Core/PubNub+Publish.h b/PubNub/Core/PubNub+Publish.h index d7464de36..5b966b86e 100644 --- a/PubNub/Core/PubNub+Publish.h +++ b/PubNub/Core/PubNub+Publish.h @@ -1,723 +1,718 @@ #import +// Request #import #import +#import +// Response +#import +#import + +// Deprecated #import #import #import #import -#pragma mark Class forward +NS_ASSUME_NONNULL_BEGIN -@class PNPublishStatus; +#pragma mark Interface declaration +/// **PubNub** `Publish` APIs. +/// +/// Set of API which allow pushing data to PubNub service. +@interface PubNub (Publish) -NS_ASSUME_NONNULL_BEGIN -#pragma mark - API group interface - -/** - * @brief \b PubNub client core class extension to provide access to 'publish' API group. - * - * @discussion Set of API which allow to push data to \b PubNub service. Data pushed to remote data - * objects called 'channels' and then delivered on their live feeds to all subscribers. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.0.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PubNub (Publish) +#pragma mark - Publish API builder interdace (deprecated) + +/// Publish File Message API access builder. +@property(strong, nonatomic, readonly) PNPublishFileMessageAPICallBuilder * (^publishFileMessage)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); + +/// Publish API access builder. +@property(strong, nonatomic, readonly) PNPublishAPICallBuilder * (^publish)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); + +/// Publish API access builder. +/// +/// Pre-configured to send messages which won't be stored in `Storage` and won't be replicated. +@property(strong, nonatomic, readonly) PNPublishAPICallBuilder * (^fire)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); +/// Signal API access builder. +@property(strong, nonatomic, readonly) PNSignalAPICallBuilder * (^signal)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); -#pragma mark - API builder support - -/** - * @brief Publish File Message API access builder. - * - * @return API call configuration builder. - * - * @since 4.15.0 - */ -@property (nonatomic, readonly, strong) PNPublishFileMessageAPICallBuilder * (^publishFileMessage)(void); - -/** - * @brief Publish API access builder. - * - * @return API call configuration builder. - * - * @since 4.5.4 - */ -@property (nonatomic, readonly, strong) PNPublishAPICallBuilder * (^publish)(void); - -/** - * @brief Publish API access builder. - * - * @note Builder is pre-configured to send messages which won't be stored in \c Storage and won't be replicated. - * - * @return API call configuration builder. - * - * @since 4.5.4 - */ -@property (nonatomic, readonly, strong) PNPublishAPICallBuilder * (^fire)(void); - -/** - * @brief Signal API access builder. - * - * @return API call configuration builder. - * - * @since 4.9.0 - */ -@property (nonatomic, readonly, strong) PNSignalAPICallBuilder * (^signal)(void); - -/** - * @brief Publish message size calculation builder. - * - * @return API call configuration builder. - * - * @since 4.5.4 - */ -@property (nonatomic, readonly, strong) PNPublishSizeAPICallBuilder * (^size)(void); +/// Publish message size calculation builder. +@property (nonatomic, readonly, strong) PNPublishSizeAPICallBuilder * (^size)(void) +DEPRECATED_MSG_ATTRIBUTE("This builder-based interface deprecated. Completion block always will be called with '0' " + "size."); #pragma mark - Files message -/** - * @brief Publish \c file \c message to specified \c channel. - * - * @code - * PNPublishFileMessageRequest *request = [PNPublishFileMessageRequest requestWithChannel:@"channel" - * fileIdentifier:@"fileIdentifier" - * name:@"fileName"]; - * - * [self.client publishFileMessageWithRequest:request completion:^(PNPublishStatus *status) { - * if (!status.isError) { - * // File message successfully published. - * } else { - * // Handle file message publish error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param request \c File \c message \c publish request with all information about uploaded file. - * @param block \c File \c message \c publish request completion block. - * - * @since 4.15.0 - */ +/// Publish `file message` to specified `channel`. +/// +/// #### Example: +/// ```objc +/// PNPublishFileMessageRequest *request = [PNPublishFileMessageRequest requestWithChannel:@"channel" +/// fileIdentifier:@"fileIdentifier" +/// name:@"fileName"]; +/// +/// [self.client publishFileMessageWithRequest:request completion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // File message successfully published. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle file message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to publish shared file payload. +/// - block: Shared file payload publish request completion block. - (void)publishFileMessageWithRequest:(PNPublishFileMessageRequest *)request completion:(nullable PNPublishCompletionBlock)block; #pragma mark - Publish with request -/** - * @brief \c Publish provided Foundation object to \b PubNub service. - * - * @code - * PNPublishRequest *request = [PNPublishRequest requestWithChannel:@"announcement"]; - * request.metadata = @{ @"to": @"John Doe" }; - * request.message = @{ @"Hello": @"world" }; - * - * [self.client publishWithRequest:request completion:^(PNPublishStatus *status) { - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param request \c Publish \c message request with all information required to deliver message. - * @param block \c Publish \c message request completion block. - * - * @since 4.15.0 - */ -- (void)publishWithRequest:(PNPublishRequest *)request - completion:(nullable PNPublishCompletionBlock)block; +/// Publish provided object to the **PubNub** service. +/// +/// #### Example: +/// ```objc +/// PNPublishRequest *request = [PNPublishRequest requestWithChannel:@"announcement"]; +/// request.metadata = @{ @"to": @"John Doe" }; +/// request.message = @{ @"Hello": @"world" }; +/// +/// [self.client publishWithRequest:request completion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to publish provided data. +/// - block: Data publish request completion block. +- (void)publishWithRequest:(PNPublishRequest *)request completion:(nullable PNPublishCompletionBlock)block; #pragma mark - Plain message publish -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" - * withCompletion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param block Publish completion block. - */ +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// withCompletion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - block: Publish completion block. +/// - (void)publish:(id)message toChannel:(NSString *)channel withCompletion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:withCompletion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" - * withMetadata:@{ @"to": @"John Doe" } completion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param metadata \b NSDictionary with values which should be used by \b PubNub service to filter - * messages. - * @param block Publish completion block. - * - * @since 4.3.0 - */ + NS_SWIFT_NAME(publish(_:toChannel:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// withMetadata:@{ @"to": @"John Doe" } +/// completion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - metadata: `NSDictionary` with values which should be used by **PubNub** service to filter messages. +/// - block: Publish completion block. - (void)publish:(id)message toChannel:(NSString *)channel withMetadata:(nullable NSDictionary *)metadata completion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:withMetadata:completion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" compressed:NO - * withCompletion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param compressed Whether message should be compressed before sending or not. - * @param block Publish completion block. - */ + NS_SWIFT_NAME(publish(_:toChannel:withMetadata:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// compressed:NO +/// withCompletion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - compressed: Whether message should be compressed before sending or not. +/// - block: Publish completion block. - (void)publish:(id)message toChannel:(NSString *)channel compressed:(BOOL)compressed withCompletion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:compressed:withCompletion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" compressed:NO - * withMetadata:@{ @"to": @"John Doe" } completion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param compressed Whether message should be compressed before sending or not. - * @param metadata \b NSDictionary with values which should be used by \b PubNub service to filter messages. - * @param block Publish completion block. - * - * @since 4.3.0 - */ + NS_SWIFT_NAME(publish(_:toChannel:compressed:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// compressed:NO +/// withMetadata:@{ @"to": @"John Doe" } +/// completion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - compressed: Whether message should be compressed before sending or not. +/// - metadata: `NSDictionary` with values which should be used by **PubNub** service to filter messages. +/// - block: Publish completion block. - (void)publish:(id)message toChannel:(NSString *)channel compressed:(BOOL)compressed withMetadata:(nullable NSDictionary *)metadata completion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:compressed:withMetadata:completion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" storeInHistory:NO - * withCompletion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param shouldStore Whether message should be stored and available with history API or not. - * @param block Publish completion block. - */ + NS_SWIFT_NAME(publish(_:toChannel:compressed:withMetadata:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// storeInHistory:NO +/// withCompletion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - shouldStore: Whether message should be stored and available with history API or not. +/// - block: Publish completion block. - (void)publish:(id)message toChannel:(NSString *)channel storeInHistory:(BOOL)shouldStore withCompletion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:storeInHistory:withCompletion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" storeInHistory:NO - * withMetadata:@{ @"to": @"John Doe" } completion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param shouldStore Whether message should be stored and available with history API or not. - * @param metadata \b NSDictionary with values which should be used by \b PubNub service to filter messages. - * @param block Publish completion block. - * - * @since 4.3.0 - */ + NS_SWIFT_NAME(publish(_:toChannel:storeInHistory:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// storeInHistory:NO +/// withMetadata:@{ @"to": @"John Doe" } +/// completion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - shouldStore: Whether message should be stored and available with history API or not. +/// - metadata: `NSDictionary` with values which should be used by **PubNub** service to filter messages. +/// - block: Publish completion block. - (void)publish:(id)message toChannel:(NSString *)channel storeInHistory:(BOOL)shouldStore withMetadata:(nullable NSDictionary *)metadata completion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:storeInHistory:withMetadata:completion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" storeInHistory:NO - * compressed:YES withCompletion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param shouldStore Whether message should be stored and available with history API or not. - * @param compressed Whether message should be compressed before sending or not. - * @param block Publish completion block. - */ + NS_SWIFT_NAME(publish(_:toChannel:storeInHistory:withMetadata:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" +/// storeInHistory:NO +/// compressed:YES +/// withCompletion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - shouldStore: Whether message should be stored and available with history API or not. +/// - compressed: Whether message should be compressed before sending or not. +/// - block: Publish completion block. - (void)publish:(id)message toChannel:(NSString *)channel storeInHistory:(BOOL)shouldStore compressed:(BOOL)compressed withCompletion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:storeInHistory:compressed:withCompletion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" storeInHistory:NO - * compressed:YES withMetadata:@{@"to":@"John Doe"} - * completion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param shouldStore Whether message should be stored and available with history API or not. - * @param compressed Whether message should be compressed before sending or not. - * @param metadata \b NSDictionary with values which should be used by \b PubNub service to filter messages. - * @param block Publish completion block. - * - * @since 4.3.0 - */ + NS_SWIFT_NAME(publish(_:toChannel:storeInHistory:compressed:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" storeInHistory:NO +/// compressed:YES +/// withMetadata:@{@"to":@"John Doe"} +/// completion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - shouldStore: Whether message should be stored and available with history API or not. +/// - compressed: Whether message should be compressed before sending or not. +/// - metadata: `NSDictionary` with values which should be used by **PubNub** service to filter messages. +/// - block: Publish completion block. - (void)publish:(id)message toChannel:(NSString *)channel storeInHistory:(BOOL)shouldStore compressed:(BOOL)compressed withMetadata:(nullable NSDictionary *)metadata completion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:storeInHistory:compressed:withMetadata:completion:)); + NS_SWIFT_NAME(publish(_:toChannel:storeInHistory:compressed:withMetadata:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); #pragma mark - Composite message publish -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" - * mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } - * withCompletion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param payloads \b NSDictionary with payloads for different push notification services (Apple with "apns" key and Google - * with "gcm"). - * @param block Publish completion block. - */ +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } +/// withCompletion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - payloads: `NSDictionary` with payloads for different push notification services (Apple with "apns" key and +/// Google with "gcm"). +/// - block: Publish completion block. - (void)publish:(nullable id)message toChannel:(NSString *)channel mobilePushPayload:(nullable NSDictionary *)payloads withCompletion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:withCompletion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" - * mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } - * withMetadata:@{ @"to": @"John Doe" } completion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param payloads \b NSDictionary with payloads for different push notification services (Apple with "apns" key and Google - * with "gcm"). - * @param block Publish completion block. - * - * @since 4.3.0 - */ + NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } +/// withMetadata:@{ @"to": @"John Doe" } +/// completion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - payloads: `NSDictionary` with payloads for different push notification services (Apple with "apns" key and +/// Google with "gcm"). +/// - block: Publish completion block. - (void)publish:(nullable id)message toChannel:(NSString *)channel mobilePushPayload:(nullable NSDictionary *)payloads withMetadata:(nullable NSDictionary *)metadata completion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:withMetadata:completion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" - * mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } compressed:YES - * withCompletion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param payloads \b NSDictionary with payloads for different push notification services (Apple with "apns" key and Google - * with "gcm"). - * @param compressed Whether message should be compressed before sending or not. - * @param block Publish completion block. - */ + NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:withMetadata:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } +/// compressed:YES +/// withCompletion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - payloads: `NSDictionary` with payloads for different push notification services (Apple with "apns" key and +/// Google with "gcm"). +/// - compressed: Whether message should be compressed before sending or not. +/// - block: Publish completion block. - (void)publish:(nullable id)message toChannel:(NSString *)channel mobilePushPayload:(nullable NSDictionary *)payloads compressed:(BOOL)compressed withCompletion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:compressed:withCompletion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" - * mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } compressed:YES - * withMetadata:@{ @"to": @"John Doe" } completion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param payloads \b NSDictionary with payloads for different push notification services (Apple with "apns" key and Google - * with "gcm"). - * @param compressed Whether message should be compressed before sending or not. - * @param metadata \b NSDictionary with values which should be used by \b PubNub service to filter messages. - * @param block Publish completion block. - * - * @since 4.3.0 - */ + NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:compressed:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } +/// compressed:YES +/// withMetadata:@{ @"to": @"John Doe" } +/// completion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - payloads: `NSDictionary` with payloads for different push notification services (Apple with "apns" key and +/// Google with "gcm"). +/// - compressed: Whether message should be compressed before sending or not. +/// - metadata: `NSDictionary` with values which should be used by **PubNub** service to filter messages. +/// - block: Publish completion block. - (void)publish:(nullable id)message toChannel:(NSString *)channel mobilePushPayload:(nullable NSDictionary *)payloads compressed:(BOOL)compressed withMetadata:(nullable NSDictionary *)metadata completion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:compressed:withMetadata:completion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" - * mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } storeInHistory:YES - * withCompletion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param payloads \b NSDictionary with payloads for different push notification services (Apple with "apns" key and Google - * with "gcm"). - * @param shouldStore Whether message should be stored and available with history API or not. - * @param block Publish completion block. - */ + NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:compressed:withMetadata:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } +/// storeInHistory:YES +/// withCompletion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - payloads: `NSDictionary` with payloads for different push notification services (Apple with "apns" key and +/// Google with "gcm"). +/// - shouldStore: Whether message should be stored and available with history API or not. +/// - block: Publish completion block. - (void)publish:(nullable id)message toChannel:(NSString *)channel mobilePushPayload:(nullable NSDictionary *)payloads storeInHistory:(BOOL)shouldStore withCompletion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:storeInHistory:withCompletion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" - * mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } storeInHistory:YES - * withMetadata:@{ @"to": @"John Doe" } completion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param payloads \b NSDictionary with payloads for different push notification services (Apple with "apns" key and Google - * with "gcm"). - * @param shouldStore Whether message should be stored and available with history API or not. - * @param metadata \b NSDictionary with values which should be used by \b PubNub service to filter messages. - * @param block Publish completion block. - * - * @since 4.3.0 - */ + NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:storeInHistory:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } +/// storeInHistory:YES +/// withMetadata:@{ @"to": @"John Doe" } +/// completion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];` +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - payloads: `NSDictionary` with payloads for different push notification services (Apple with "apns" key and +/// Google with "gcm"). +/// - shouldStore: Whether message should be stored and available with history API or not. +/// - metadata: `NSDictionary` with values which should be used by **PubNub** service to filter messages. +/// - block: Publish completion block. - (void)publish:(nullable id)message toChannel:(NSString *)channel mobilePushPayload:(nullable NSDictionary *)payloads storeInHistory:(BOOL)shouldStore withMetadata:(nullable NSDictionary *)metadata completion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:storeInHistory:withMetadata:completion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" - * mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } storeInHistory:YES - * compressed:NO withCompletion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param payloads \b NSDictionary with payloads for different push notification services (Apple with "apns" key and Google - * with "gcm"). - * @param shouldStore Whether message should be stored and available with history API or not. - * @param compressed Whether message should be compressed before sending or not. - * @param block Publish completion block. - */ + NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:storeInHistory:withMetadata:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } +/// storeInHistory:YES +/// compressed:NO +/// withCompletion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - payloads: `NSDictionary` with payloads for different push notification services (Apple with "apns" key and +/// Google with "gcm"). +/// - shouldStore: Whether message should be stored and available with history API or not. +/// - compressed: Whether message should be compressed before sending or not. +/// - block: Publish completion block. - (void)publish:(nullable id)message toChannel:(NSString *)channel mobilePushPayload:(nullable NSDictionary *)payloads storeInHistory:(BOOL)shouldStore compressed:(BOOL)compressed withCompletion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:storeInHistory:compressed:withCompletion:)); - -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client publish:@{ @"Hello": @"world" } toChannel:@"announcement" - * mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } storeInHistory:YES - * compressed:NO withMetadata:@{ @"to": @"John Doe" } - * completion:^(PNPublishStatus *status) { - * - * if (!status.isError) { - * // Message successfully published to specified channel. - * } else { - * // Handle message publish error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be published. - * @param channel Name of the channel to which message should be published. - * @param payloads \b NSDictionary with payloads for different push notification services (Apple with "apns" key and Google - * with "gcm"). - * @param shouldStore Whether message should be stored and available with history API or not. - * @param compressed Whether message should be compressed before sending or not. - * @param metadata \b NSDictionary with values which should be used by \b PubNub service to filter messages. - * @param block Publish completion block. - * - * @since 4.3.0 - */ + NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:storeInHistory:compressed:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client publish:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// mobilePushPayload:@{ @"apns": @{ @"alert": @"Hello from PubNub" } } +/// storeInHistory:YES +/// compressed:NO +/// withMetadata:@{ @"to": @"John Doe" } +/// completion:^(PNPublishStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];` +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. +/// - channel: Name of the channel to which message should be published. +/// - payloads:`NSDictionary` with payloads for different push notification services (Apple with "apns" key and Google +/// with "gcm"). +/// - shouldStore: Whether message should be stored and available with history API or not. +/// - compressed: Whether message should be compressed before sending or not. +/// - metadata: `NSDictionary` with values which should be used by **PubNub** service to filter messages. +/// - block: Publish completion block. - (void)publish:(nullable id)message toChannel:(NSString *)channel mobilePushPayload:(nullable NSDictionary *)payloads @@ -725,254 +720,293 @@ NS_ASSUME_NONNULL_BEGIN compressed:(BOOL)compressed withMetadata:(nullable NSDictionary *)metadata completion:(nullable PNPublishCompletionBlock)block - NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:storeInHistory:compressed:withMetadata:completion:)); + NS_SWIFT_NAME(publish(_:toChannel:mobilePushPayload:storeInHistory:compressed:withMetadata:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-publishWithRequest:completion:' method instead."); #pragma mark - Signal -/** - * @brief Send provided Foundation object to \b PubNub service. - * - * @discussion Provided object will be serialized into JSON string before pushing to \b PubNub service. If client has been - * configured with cipher key message will be encrypted as well. - * - * @code - * [self.client signal:@{ @"Hello": @"world" } channel:@"announcement" - * withCompletion:^(PNSignalStatus *status) { - * - * if (!status.isError) { - * // Signal successfully sent to specified channel. - * } else { - * // Handle signal sending error. Check 'category' property to find out possible issue - * // because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param message Object (\a NSString, \a NSNumber, \a NSArray, \a NSDictionary) which will be sent with signal. - * @param channel Name of the channel to which signal should be sent. - * @param block Signal completion block. - * - * @since 4.9.0 - */ +/// Send signal with provided object to the **PubNub** service. +/// +/// #### Example: +/// ```objc +/// PNSignalRequest *request = [PNSignalRequest requestWithChannel:@"announcement" signal:@{ @"status": @"online" }]; +/// +/// [self.client sendSignalWithRequest:request completion:^(PNSignalStatus *status) { +/// if (!status.isError) { +/// // Message successfully published to specified channel. Signal time stored in: `result.data.timetoken`. +/// } else { +/// // Handle message publish error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to send signal with procided data. +/// - block: Signal data send request completion block. +- (void)sendSignalWithRequest:(PNSignalRequest *)request completion:(nullable PNSignalCompletionBlock)block; + +/// Send provided Foundation object to **PubNub** service. +/// +/// Provided object will be serialized into JSON string before pushing to **PubNub** service. If client has been +/// configured with cipher key message will be encrypted as well. +/// +/// #### Example: +/// ```objc +/// [self.client signal:@{ @"Hello": @"world" } +/// channel:@"announcement" +/// withCompletion:^(PNSignalStatus *status) { +/// if (!status.isError) { +/// // Signal successfully sent to specified channel. Publish time stored in: `result.data.timetoken`. +/// } else { +/// // Handle signal sending error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be sent with signal. +/// - channel: Name of the channel to which signal should be sent. +/// - block: Signal completion block. - (void)signal:(id)message channel:(NSString *)channel withCompletion:(nullable PNSignalCompletionBlock)block - NS_SWIFT_NAME(signal(_:channel:withCompletion:)); + NS_SWIFT_NAME(signal(_:channel:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-sendSignalWithRequest:completion:' method instead."); #pragma mark - Message helper -/** - * @brief Helper method which allow to calculate resulting message before it will be sent to \b PubNub network. - * - * @note Size calculation use percent-escaped \c message and all added headers to get full size. - * - * @code - * [self.client sizeOfMessage:@{ @"Hello": @"world" } toChannel:@"announcement" - * withCompletion:^(NSInteger size) { - * - * // Actual message size is: size - * }]; - * @endcode - * - * @param message Message for which size should be calculated. - * @param channel Name of the channel to which message should be published. - * @param block Message size calculation completion block. - */ +/// Helper method which allow to calculate resulting message before it will be sent to **PubNub** network. +/// +/// Size calculation use percent-escaped `message` and all added headers to get full size. +/// +/// #### Example: +/// ```objc +/// [self.client sizeOfMessage:@{ @"Hello": @"world" } toChannel:@"announcement" withCompletion:^(NSInteger size) { +/// // Actual message size is: size +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Message for which size should be calculated. +/// - channel: Name of the channel to which message should be published. +/// - block: Message size calculation completion block. - (void)sizeOfMessage:(id)message toChannel:(NSString *)channel withCompletion:(PNMessageSizeCalculationCompletionBlock)block - NS_SWIFT_NAME(sizeOfMessage(_:toChannel:withCompletion:)); - -/** - * @brief Helper method which allow to calculate resulting message before it will be sent to \b PubNub network. - * - * @note Size calculation use percent-escaped \c message and all added headers to get full size. - * - * @code - * [self.client sizeOfMessage:@{ @"Hello": @"world" } toChannel:@"announcement" - * withMetadata:@{ @"to": @"John Doe" } completion:^(NSInteger size) { - * - * // Actual message size is: size - * }]; - * @endcode - * - * @param message Message for which size should be calculated. - * @param channel Name of the channel to which message should be published. - * @param metadata \b NSDictionary with values which should be used by \b PubNub service to filter messages. - * @param block Message size calculation completion block. - * - * @since 4.3.0 - */ + NS_SWIFT_NAME(sizeOfMessage(_:toChannel:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Completion block" + " always will be called with '0' size."); + +/// Helper method which allow to calculate resulting message before it will be sent to **PubNub** network. +/// +/// Size calculation use percent-escaped `message` and all added headers to get full size. +/// +/// #### Example: +/// ```objc +/// [self.client sizeOfMessage:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// withMetadata:@{ @"to": @"John Doe" } +/// completion:^(NSInteger size) { +/// // Actual message size is: size +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Message for which size should be calculated. +/// - channel: Name of the channel to which message should be published. +/// - metadata:`NSDictionary` with values which should be used by **PubNub** service to filter messages. +/// - block: Message size calculation completion block. - (void)sizeOfMessage:(id)message toChannel:(NSString *)channel withMetadata:(nullable NSDictionary *)metadata completion:(PNMessageSizeCalculationCompletionBlock)block - NS_SWIFT_NAME(sizeOfMessage(_:toChannel:withMetadata:completion:)); - -/** - * @brief Helper method which allow to calculate resulting message before it will be sent to \b PubNub network. - * - * @note Size calculation use percent-escaped \c message and all added headers to get full size. - * - * @code - * [self.client sizeOfMessage:@{ @"Hello": @"world" } toChannel:@"announcement" compressed:YES - * withCompletion:^(NSInteger size) { - * - * // Actual message size is: size - * }]; - * @endcode - * - * @param message Message for which size should be calculated. - * @param channel Name of the channel to which message should be published. - * @param compressMessage Whether message should be compressed before sending or not. - * @param block Message size calculation completion block. - */ + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Completion block" + " always will be called with '0' size."); + +/// Helper method which allow to calculate resulting message before it will be sent to **PubNub** network. +/// +/// Size calculation use percent-escaped `message` and all added headers to get full size. +/// +/// #### Example: +/// ```objc +/// [self.client sizeOfMessage:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// compressed:YES +/// withCompletion:^(NSInteger size) { +/// // Actual message size is: size +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Message for which size should be calculated. +/// - channel: Name of the channel to which message should be published. +/// - compressMessage: Whether message should be compressed before sending or not. +/// - block: Message size calculation completion block. - (void)sizeOfMessage:(id)message toChannel:(NSString *)channel compressed:(BOOL)compressMessage withCompletion:(PNMessageSizeCalculationCompletionBlock)block - NS_SWIFT_NAME(sizeOfMessage(_:toChannel:compressed:withCompletion:)); - -/** - * @brief Helper method which allow to calculate resulting message before it will be sent to \b PubNub network. - * - * @note Size calculation use percent-escaped \c message and all added headers to get full size. - * - * @code - * [self.client sizeOfMessage:@{ @"Hello": @"world" } toChannel:@"announcement" compressed:YES - * withMetadata:@{ @"to": @"John Doe" } completion:^(NSInteger size) { - * - * // Actual message size is: size - * }]; - * @endcode - * - * @param message Message for which size should be calculated. - * @param channel Name of the channel to which message should be published. - * @param compressMessage Whether message should be compressed before sending or not. - * @param metadata \b NSDictionary with values which should be used by \b PubNub service to filter messages. - * @param block Message size calculation completion block. - * - * @since 4.3.0 - */ + NS_SWIFT_NAME(sizeOfMessage(_:toChannel:compressed:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Completion block" + " always will be called with '0' size."); + +/// Helper method which allow to calculate resulting message before it will be sent to **PubNub** network. +/// +/// Size calculation use percent-escaped `message` and all added headers to get full size. +/// +/// #### Example: +/// ```objc +/// [self.client sizeOfMessage:@{ @"Hello": @"world" } +/// toChannel:@"announcement" compressed:YES +/// withMetadata:@{ @"to": @"John Doe" } +/// completion:^(NSInteger size) { +/// // Actual message size is: size +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Message for which size should be calculated. +/// - channel: Name of the channel to which message should be published. +/// - compressMessage: Whether message should be compressed before sending or not. +/// - metadata: `NSDictionary` with values which should be used by **PubNub** service to filter messages. +/// - block: Message size calculation completion block. - (void)sizeOfMessage:(id)message toChannel:(NSString *)channel compressed:(BOOL)compressMessage withMetadata:(nullable NSDictionary *)metadata completion:(PNMessageSizeCalculationCompletionBlock)block - NS_SWIFT_NAME(sizeOfMessage(_:toChannel:compressed:withMetadata:completion:)); - -/** - * @brief Helper method which allow to calculate resulting message before it will be sent to \b PubNub network. - * - * @note Size calculation use percent-escaped \c message and all added headers to get full size. - * - * @code - * [self.client sizeOfMessage:@{ @"Hello": @"world" } toChannel:@"announcement" storeInHistory:NO - * withCompletion:^(NSInteger size) { - * - * // Actual message size is: size - * }]; - * @endcode - * - * @param message Message for which size should be calculated. - * @param channel Name of the channel to which message should be published. - * @param shouldStore Whether message should be stored and available with history API or not. - * @param block Message size calculation completion block. - */ + NS_SWIFT_NAME(sizeOfMessage(_:toChannel:compressed:withMetadata:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Completion block" + " always will be called with '0' size."); + +/// Helper method which allow to calculate resulting message before it will be sent to **PubNub** network. +/// +/// Size calculation use percent-escaped `message` and all added headers to get full size. +/// +/// #### Example: +/// ```objc +/// [self.client sizeOfMessage:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// storeInHistory:NO +/// withCompletion:^(NSInteger size) { +/// // Actual message size is: size +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Message for which size should be calculated. +/// - channel: Name of the channel to which message should be published. +/// - shouldStore: Whether message should be stored and available with history API or not. +/// - block: Message size calculation completion block. - (void)sizeOfMessage:(id)message toChannel:(NSString *)channel storeInHistory:(BOOL)shouldStore withCompletion:(PNMessageSizeCalculationCompletionBlock)block - NS_SWIFT_NAME(sizeOfMessage(_:toChannel:storeInHistory:withCompletion:)); - -/** - * @brief Helper method which allow to calculate resulting message before it will be sent to \b PubNub network. - * - * @note Size calculation use percent-escaped \c message and all added headers to get full size. - * - * @code - * [self.client sizeOfMessage:@{ @"Hello": @"world" } toChannel:@"announcement" storeInHistory:NO - * withMetadata:@{ @"to": @"John Doe" } completion:^(NSInteger size) { - * - * // Actual message size is: size - * }]; - * @endcode - * - * @param message Message for which size should be calculated. - * @param channel Name of the channel to which message should be published. - * @param shouldStore Whether message should be stored and available with history API or not. - * @param metadata \b NSDictionary with values which should be used by \b PubNub service to filter messages. - * @param block Message size calculation completion block. - * - * @since 4.3.0 - */ + NS_SWIFT_NAME(sizeOfMessage(_:toChannel:storeInHistory:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Completion block" + " always will be called with '0' size."); + +/// Helper method which allow to calculate resulting message before it will be sent to **PubNub** network. +/// +/// Size calculation use percent-escaped `message` and all added headers to get full size. +/// +/// #### Example: +/// ```objc +/// [self.client sizeOfMessage:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// storeInHistory:NO +/// withMetadata:@{ @"to": @"John Doe" } +/// completion:^(NSInteger size) { +/// // Actual message size is: size +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Message for which size should be calculated. +/// - channel: Name of the channel to which message should be published. +/// - shouldStore: Whether message should be stored and available with history API or not. +/// - metadata: `NSDictionary` with values which should be used by **PubNub** service to filter messages. +/// - block: Message size calculation completion block. - (void)sizeOfMessage:(id)message toChannel:(NSString *)channel storeInHistory:(BOOL)shouldStore withMetadata:(nullable NSDictionary *)metadata completion:(PNMessageSizeCalculationCompletionBlock)block - NS_SWIFT_NAME(sizeOfMessage(_:toChannel:storeInHistory:withMetadata:completion:)); - -/** - * @brief Helper method which allow to calculate resulting message before it will be sent to \b PubNub network. - * - * @note Size calculation use percent-escaped \c message and all added headers to get full size. - * - * @code - * [self.client sizeOfMessage:@{ @"Hello": @"world" } toChannel:@"announcement" compressed:NO - * storeInHistory:NO withCompletion:^(NSInteger size) { - * - * // Actual message size is: size - * }]; - * @endcode - * - * @param message Message for which size should be calculated. - * @param channel Name of the channel to which message should be published. - * @param compressMessage Whether message should be compressed before sending or not. - * @param shouldStore Whether message should be stored and available with history API or not. - * @param block Message size calculation completion block. - */ + NS_SWIFT_NAME(sizeOfMessage(_:toChannel:storeInHistory:withMetadata:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Completion block" + " always will be called with '0' size."); + +/// Helper method which allow to calculate resulting message before it will be sent to **PubNub** network. +/// +/// Size calculation use percent-escaped `message` and all added headers to get full size. +/// +/// #### Example: +/// ```objc +/// [self.client sizeOfMessage:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// compressed:NO +/// storeInHistory:NO +/// withCompletion:^(NSInteger size) { +/// // Actual message size is: size +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Message for which size should be calculated. +/// - channel: Name of the channel to which message should be published. +/// - compressMessage: Whether message should be compressed before sending or not. +/// - shouldStore: Whether message should be stored and available with history API or not. +/// - block: Message size calculation completion block. - (void)sizeOfMessage:(id)message toChannel:(NSString *)channel compressed:(BOOL)compressMessage storeInHistory:(BOOL)shouldStore withCompletion:(PNMessageSizeCalculationCompletionBlock)block - NS_SWIFT_NAME(sizeOfMessage(_:toChannel:compressed:storeInHistory:withCompletion:)); - -/** - * @brief Helper method which allow to calculate resulting message before it will be sent to \b PubNub network. - * - * @note Size calculation use percent-escaped \c message and all added headers to get full size. - * - * @code - * [self.client sizeOfMessage:@{ @"Hello": @"world" } toChannel:@"announcement" compressed:NO - * storeInHistory:NO withMetadata:@{ @"to": @"John Doe" } completion:^(NSInteger size) { - * - * // Actual message size is: size - * }]; - * @endcode - * - * @param message Message for which size should be calculated. - * @param channel Name of the channel to which message should be published. - * @param compressMessage Whether message should be compressed before sending or not. - * @param shouldStore Whether message should be stored and available with history API or not. - * @param metadata \b NSDictionary with values which should be used by \b PubNub service to filter messages. - * @param block Message size calculation completion block. - * - * @since 4.3.0 - */ + NS_SWIFT_NAME(sizeOfMessage(_:toChannel:compressed:storeInHistory:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Completion block" + " always will be called with '0' size."); + +/// Helper method which allow to calculate resulting message before it will be sent to **PubNub** network. +/// +/// Size calculation use percent-escaped `message` and all added headers to get full size. +/// +/// #### Example: +/// ```objc +/// [self.client sizeOfMessage:@{ @"Hello": @"world" } +/// toChannel:@"announcement" +/// compressed:NO +/// storeInHistory:NO +/// withMetadata:@{ @"to": @"John Doe" } +/// completion:^(NSInteger size) { +/// // Actual message size is: size +/// }]; +/// ``` +/// +/// - Parameters: +/// - message: Message for which size should be calculated. +/// - channel: Name of the channel to which message should be published. +/// - compressMessage: Whether message should be compressed before sending or not. +/// - shouldStore: Whether message should be stored and available with history API or not. +/// - metadata: `NSDictionary` with values which should be used by **PubNub** service to filter messages. +/// - block: Message size calculation completion block. - (void)sizeOfMessage:(id)message toChannel:(NSString *)channel compressed:(BOOL)compressMessage storeInHistory:(BOOL)shouldStore withMetadata:(nullable NSDictionary *)metadata completion:(PNMessageSizeCalculationCompletionBlock)block - NS_SWIFT_NAME(sizeOfMessage(_:toChannel:compressed:storeInHistory:withMetadata:completion:)); + NS_SWIFT_NAME(sizeOfMessage(_:toChannel:compressed:storeInHistory:withMetadata:completion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Completion block" + " always will be called with '0' size."); #pragma mark - diff --git a/PubNub/Core/PubNub+Publish.m b/PubNub/Core/PubNub+Publish.m index 9574df5da..a511de4e0 100644 --- a/PubNub/Core/PubNub+Publish.m +++ b/PubNub/Core/PubNub+Publish.m @@ -1,14 +1,12 @@ #import "PubNub+Publish.h" #import "PNBasePublishRequest+Private.h" -#import "PNAPICallBuilder+Private.h" -#import "PNRequestParameters.h" #import "PubNub+CorePrivate.h" #import "PNStatus+Private.h" -#import "PNConfiguration.h" -#import "PNPublishStatus.h" #import "PNLogMacro.h" #import "PNHelpers.h" -#import "PNAES.h" + +// Deprecated +#import "PNAPICallBuilder+Private.h" NS_ASSUME_NONNULL_BEGIN @@ -35,8 +33,6 @@ @interface PubNub (PublishProtected) /// - metadata: `NSDictionary` with values which should be used by **PubNub** network to filter messages. /// - queryParameters: List arbitrary query parameters which should be sent along with original API call. /// - block: Publish completion block which. -/// -/// - Since: 4.8.2 - (void)publish:(nullable id)message toChannel:(NSString *)channel mobilePushPayload:(nullable NSDictionary *)payloads @@ -61,8 +57,6 @@ - (void)publish:(nullable id)message /// - channel: Name of the channel to which signal should be sent. /// - queryParameters: List arbitrary query parameters which should be sent along with original API call. /// - block: Signal completion block. -/// -/// - Since: 4.9.0 - (void)signal:(id)message channel:(NSString *)channel withQueryParameters:(nullable NSDictionary *)queryParameters @@ -87,8 +81,6 @@ - (void)signal:(id)message /// - metadata: `NSDictionary` with values which should be used by **PubNub** service to filter messages. /// - queryParameters: List arbitrary query parameters which should be sent along with original API call. /// - block: Message size calculation completion block. -/// -/// - Since: 4.8.2 - (void)sizeOfMessage:(id)message toChannel:(NSString *)channel compressed:(BOOL)compressMessage @@ -97,7 +89,9 @@ - (void)sizeOfMessage:(id)message withReplication:(BOOL)replicate metadata:(nullable NSDictionary *)metadata queryParameters:(nullable NSDictionary *)queryParameters - completion:(PNMessageSizeCalculationCompletionBlock)block; + completion:(PNMessageSizeCalculationCompletionBlock)block + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Completion block" + " always will be called with '0' size."); #pragma mark - Handlers @@ -110,59 +104,8 @@ - (void)sizeOfMessage:(id)message /// - Parameters: /// - flags: List of conditional flags which has been generated by builder on user request. /// - parameters: List of user-provided data which will be consumed by used API endpoint. -/// -/// - Since: 4.5.4 - (void)handlePublishBuilderExecutionWithFlags:(NSArray *)flags parameters:(NSDictionary *)parameters; - -#pragma mark - Helpers - -/// - Parameters: -/// - message: Object (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) which will be published. -/// - channel: Name of the channel to which message should be published. -/// - replicate: Whether message should be replicated across the PubNub network and sent simultaneously to all -/// subscribed clients on a channel. -/// - shouldStore: Whether message should be stored and available with history API or not. -/// - ttl How long message should be stored in channel's storage. If **0** it will be stored forever or -/// if `nil` - depends from account configuration. -/// - metadata: `NSDictionary` with values which should be used by the **PubNub** network to filter messages. -/// - sequenceNumber: Next published message sequence number which should be used. -/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. -/// - Returns: Initialized publish request instance. -- (PNRequestParameters *)requestParametersForMessage:(NSString *)message - toChannel:(NSString *)channel - compressed:(BOOL)compressMessage - storeInHistory:(BOOL)shouldStore - ttl:(nullable NSNumber *)ttl - replicate:(BOOL)replicate - metadata:(nullable NSString *)metadata - sequenceNumber:(NSUInteger)sequenceNumber - queryParameters:(NSDictionary *)queryParameters; - -/// Merge user-specified message with push payloads into single message which will be processed on the -/// **PubNub** service. -/// -/// In case if aside from `message` has been passed `payloads` this method will merge them into format known by the -/// **PubNub** network and will cause further push distribution to specified vendors. -/// -/// - Parameters: -/// - message: Message which should be merged with `payloads`. -/// - payloads: `NSDictionary` with payloads for different push notification services (Apple with `'apns'` key and -/// Google with `'gcm'`). -/// - Returns: Merged message or original message if there is no data in `payloads`. -- (NSDictionary *)mergedMessage:(nullable id)message - withMobilePushPayload:(nullable NSDictionary *)payloads; - -/// Try perform encryption of data which should be pushed to **PubNub** services. -/// -/// - Parameters: -/// - message: Data which crypto module should try to encrypt. -/// - error: Pointer into which data encryption error will be passed. -/// - Returns: Encrypted Base64-encoded string. -/// -/// - Since: 4.16.0 -- (nullable NSString *)encryptedMessage:(NSString *)message error:(NSError **)error; - #pragma mark - @@ -176,7 +119,7 @@ - (nullable NSString *)encryptedMessage:(NSString *)message error:(NSError **)er @implementation PubNub (Publish) -#pragma mark - API Builder support +#pragma mark - Publish API builder interdace (deprecated) - (PNPublishFileMessageAPICallBuilder * (^)(void))publishFileMessage { PNPublishFileMessageAPICallBuilder *builder = nil; @@ -191,6 +134,7 @@ @implementation PubNub (Publish) NSNumber *ttl = parameters[NSStringFromSelector(@selector(ttl))]; if (shouldStore && !shouldStore.boolValue) ttl = nil; + PNPublishFileMessageRequest *request = [PNPublishFileMessageRequest requestWithChannel:channel fileIdentifier:identifier name:filename]; @@ -211,26 +155,10 @@ @implementation PubNub (Publish) - (PNPublishAPICallBuilder * (^)(void))publish { PNPublishAPICallBuilder *builder = nil; __weak __typeof(self) weakSelf = self; - builder = [PNPublishAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, + + builder = [PNPublishAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters) { - NSString *channel = parameters[NSStringFromSelector(@selector(channel))]; - NSNumber *shouldStore = parameters[NSStringFromSelector(@selector(shouldStore))]; - NSNumber *ttl = parameters[NSStringFromSelector(@selector(ttl))]; - NSNumber *compressed = parameters[NSStringFromSelector(@selector(compress))]; - NSNumber *replicate = parameters[NSStringFromSelector(@selector(replicate))]; - - if (shouldStore && !shouldStore.boolValue) ttl = nil; - PNPublishRequest *request = [PNPublishRequest requestWithChannel:channel]; - request.metadata = parameters[NSStringFromSelector(@selector(metadata))]; - request.payloads = parameters[NSStringFromSelector(@selector(payloads))]; - request.message = parameters[NSStringFromSelector(@selector(message))]; - request.arbitraryQueryParameters = parameters[@"queryParam"]; - request.store = shouldStore ? shouldStore.boolValue : YES; - request.replicate = replicate ? replicate.boolValue : YES; - request.compress = compressed.boolValue; - request.ttl = ttl.unsignedIntegerValue; - - [weakSelf publishWithRequest:request completion:parameters[@"block"]]; + [weakSelf handlePublishBuilderExecutionWithFlags:flags parameters:parameters]; }]; return ^PNPublishAPICallBuilder * { @@ -241,6 +169,7 @@ @implementation PubNub (Publish) - (PNPublishAPICallBuilder * (^)(void))fire { PNPublishAPICallBuilder *builder = nil; __weak __typeof(self) weakSelf = self; + builder = [PNPublishAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters) { [weakSelf handlePublishBuilderExecutionWithFlags:flags parameters:parameters]; @@ -306,62 +235,76 @@ @implementation PubNub (Publish) #pragma mark - Files message -- (void)publishFileMessageWithRequest:(PNPublishFileMessageRequest *)request +- (void)publishFileMessageWithRequest:(PNPublishFileMessageRequest *)userRequest completion:(PNPublishCompletionBlock)block { - if (!request.retried) request.sequenceNumber = [self.sequenceManager nextSequenceNumber:YES]; - request.cryptoModule = self.configuration.cryptoModule; - + if (!userRequest.retried) userRequest.sequenceNumber = [self.sequenceManager nextSequenceNumber:YES]; + if (!userRequest.cryptoModule) userRequest.cryptoModule = self.configuration.cryptoModule; + PNOperationDataParser *responseParser = [self parserWithStatus:[PNPublishStatus class]]; + PNParsedRequestCompletionBlock handler; + PNLogAPICall(self.logger, @" Publish '%@' file message to '%@' channel%@%@%@", - (request.identifier ?: @""), - (request.channel ?: @""), - (request.metadata ? [NSString stringWithFormat:@" with metadata (%@)", request.metadata] : @""), - (!request.shouldStore ? @" which won't be saved in history" : @""), - [NSString stringWithFormat:@": %@", (request.preFormattedMessage ?: @"")]); - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNPublishStatus *status) { - if (block && status.isError) { - status.retryBlock = ^{ - request.retried = YES; - [weakSelf publishFileMessageWithRequest:request completion:block]; + (userRequest.identifier ?: @""), + (userRequest.channel ?: @""), + (userRequest.metadata ? [NSString stringWithFormat:@" with metadata (%@)", userRequest.metadata] : @""), + (!userRequest.shouldStore ? @" which won't be saved in history" : @""), + [NSString stringWithFormat:@": %@", (userRequest.preFormattedMessage ?: @"")]); + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self publishFileMessageWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; + + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } -#pragma mark - Publish with request -- (void)publishWithRequest:(PNPublishRequest *)request completion:(PNPublishCompletionBlock)block { - if (!request.retried) request.sequenceNumber = [self.sequenceManager nextSequenceNumber:YES]; - request.cryptoModule = self.configuration.cryptoModule; +#pragma mark - Plain message publish + +- (void)publishWithRequest:(PNPublishRequest *)userRequest completion:(PNPublishCompletionBlock)block { + if (!userRequest.retried) userRequest.sequenceNumber = [self.sequenceManager nextSequenceNumber:YES]; + if (!userRequest.cryptoModule) userRequest.cryptoModule = self.configuration.cryptoModule; + PNOperationDataParser *responseParser = [self parserWithStatus:[PNPublishStatus class]]; + PNParsedRequestCompletionBlock handler; PNLogAPICall(self.logger, @" Publish%@ message to '%@' channel%@%@%@", - (request.shouldCompress ? @" compressed" : @""), - (request.channel ?: @""), - (request.metadata ? [NSString stringWithFormat:@" with metadata (%@)", request.metadata] : @""), - (!request.shouldStore ? @" which won't be saved in history" : @""), - (!request.shouldCompress ? [NSString stringWithFormat:@": %@", - (request.message ?: @"")] : @".")); - - __weak __typeof(self) weakSelf = self; - - [self performRequest:request withCompletion:^(PNPublishStatus *status) { - if (block && status.isError) { - status.retryBlock = ^{ - request.retried = YES; - [weakSelf publishWithRequest:request completion:block]; + (userRequest.shouldCompress ? @" compressed" : @""), + (userRequest.channel ?: @""), + (userRequest.metadata ? [NSString stringWithFormat:@" with metadata (%@)", userRequest.metadata] : @""), + (!userRequest.shouldStore ? @" which won't be saved in history" : @""), + (!userRequest.shouldCompress ? [NSString stringWithFormat:@": %@", + (userRequest.message ?: @"")] : @".")); + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self publishWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; -} + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; -#pragma mark - Plain message publish + [self performRequest:userRequest withParser:responseParser completion:handler]; +} - (void)publish:(id)message toChannel:(NSString *)channel withCompletion:(PNPublishCompletionBlock)block { [self publish:message toChannel:channel withMetadata:nil completion:block]; @@ -568,20 +511,48 @@ - (void)publish:(id)message PNPublishRequest *request = [PNPublishRequest requestWithChannel:channel]; request.arbitraryQueryParameters = queryParameters; - request.ttl = ttl.unsignedIntegerValue; request.replicate = replicate; request.compress = compressed; request.metadata = metadata; request.payloads = payloads; request.store = shouldStore; request.message = message; - + + if (ttl) request.ttl = ttl.unsignedIntegerValue; + [self publishWithRequest:request completion:block]; } #pragma mark - Signal +- (void)sendSignalWithRequest:(PNSignalRequest *)userRequest completion:(PNSignalCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNSignalStatus class]]; + PNSignalCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNLogAPICall(self.logger, @" Signal to '%@' channel.", (userRequest.channel ?: @"")); + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self sendSignalWithRequest:userRequest completion:block]; + }; +#pragma clang diagnostic pop + } + + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + - (void)signal:(id)message channel:(NSString *)channel withCompletion:(PNSignalCompletionBlock)block { [self signal:message channel:channel withQueryParameters:nil completion:block]; } @@ -590,47 +561,10 @@ - (void)signal:(id)message channel:(NSString *)channel withQueryParameters:(NSDictionary *)queryParameters completion:(PNSignalCompletionBlock)block { - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - __weak __typeof(self) weakSelf = self; - - if (@available(macOS 10.10, iOS 8.0, *)) { - if (self.configuration.applicationExtensionSharedGroupIdentifier) queue = dispatch_get_main_queue(); - } - - dispatch_async(queue, ^{ - __strong __typeof__(weakSelf) strongSelf = weakSelf; - NSError *signalError = nil; - NSString *messageForSignal = [PNJSON JSONStringFrom:message withError:&signalError]; - PNRequestParameters *parameters = [PNRequestParameters new]; - [parameters addQueryParameters:queryParameters]; - - if (channel.length) { - [parameters addPathComponent:[PNString percentEscapedString:channel] forPlaceholder:@"{channel}"]; - } - - if (([messageForSignal isKindOfClass:[NSString class]] && messageForSignal.length) || messageForSignal) { - [parameters addPathComponent:[PNString percentEscapedString:messageForSignal] forPlaceholder:@"{message}"]; - } - - PNLogAPICall(strongSelf.logger, @" Signal to '%@' channel.", (channel ?: @"")); - - [strongSelf processOperation:PNSignalOperation - withParameters:parameters - data:nil - completionBlock:^(PNStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf signal:message - channel:channel - withQueryParameters:queryParameters - completion:block]; - }; - } - - [weakSelf callBlock:block status:YES withResult:nil andStatus:status]; - }]; - }); + + PNSignalRequest *request = [PNSignalRequest requestWithChannel:channel signal:message]; + request.arbitraryQueryParameters = queryParameters; + [self sendSignalWithRequest:request completion:block]; } @@ -723,178 +657,44 @@ - (void)sizeOfMessage:(id)message completion:block]; } -- (void)sizeOfMessage:(id)message - toChannel:(NSString *)channel - compressed:(BOOL)compressMessage - storeInHistory:(BOOL)shouldStore - ttl:(NSNumber *)ttl - withReplication:(BOOL)replicate - metadata:(NSDictionary *)metadata - queryParameters:(NSDictionary *)queryParameters +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" +- (void)sizeOfMessage:(id)__unused message + toChannel:(NSString *)__unused channel + compressed:(BOOL)__unused compressMessage + storeInHistory:(BOOL)__unused shouldStore + ttl:(NSNumber *)__unused ttl + withReplication:(BOOL)__unused replicate + metadata:(NSDictionary *)__unused metadata + queryParameters:(NSDictionary *)__unused queryParameters completion:(PNMessageSizeCalculationCompletionBlock)block { - if (block) { - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - NSUInteger nextSequenceNumber = [self.sequenceManager nextSequenceNumber:NO]; - __weak __typeof(self) weakSelf = self; - - if (@available(macOS 10.10, iOS 8.0, *)) { - if (self.configuration.applicationExtensionSharedGroupIdentifier) queue = dispatch_get_main_queue(); - } - - dispatch_async(queue, ^{ - NSError *publishError = nil; - NSString *messageForPublish = [PNJSON JSONStringFrom:message withError:&publishError]; - NSString *metadataForPublish = nil; - NSData *publishData = nil; - - // Silence static analyzer warnings. - // Code is aware about this case and at the end will simply call on 'nil' object method. - // In most cases if referenced object become 'nil' it mean what there is no more need in - // it and probably whole client instance has been deallocated. - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" - // Encrypt message in case if serialization to JSON was successful. - if (!publishError && weakSelf.configuration.cryptoModule) { - messageForPublish = [weakSelf encryptedMessage:messageForPublish error:&publishError]; - - } - if (metadata) metadataForPublish = [PNJSON JSONStringFrom:metadata withError:&publishError]; - - PNRequestParameters *parameters = [weakSelf requestParametersForMessage:messageForPublish - toChannel:channel - compressed:compressMessage - storeInHistory:shouldStore - ttl:ttl - replicate:replicate - metadata:metadataForPublish - sequenceNumber:nextSequenceNumber - queryParameters:queryParameters]; - - if (compressMessage) { - NSData *messageData = [messageForPublish dataUsingEncoding:NSUTF8StringEncoding]; - NSData *compressedBody = [PNGZIP GZIPDeflatedData:messageData]; - publishData = (compressedBody?: [@"" dataUsingEncoding:NSUTF8StringEncoding]); - } - - NSInteger size = [weakSelf packetSizeForOperation:PNPublishOperation - withParameters:parameters - data:publishData]; - - pn_dispatch_async(weakSelf.callbackQueue, ^{ - block(size); - }); - #pragma clang diagnostic pop - }); - } + pn_dispatch_async(self.callbackQueue, ^{ + block(0); + }); } +#pragma clang diagnostic pop #pragma mark - Handlers - (void)handlePublishBuilderExecutionWithFlags:(NSArray *)flags parameters:(NSDictionary *)parameters { - id message = parameters[NSStringFromSelector(@selector(message))]; - NSString *channel = parameters[NSStringFromSelector(@selector(channel))]; - NSDictionary *payloads = parameters[NSStringFromSelector(@selector(payloads))]; NSNumber *shouldStore = parameters[NSStringFromSelector(@selector(shouldStore))]; NSNumber *ttl = parameters[NSStringFromSelector(@selector(ttl))]; - if (shouldStore && !shouldStore.boolValue) { ttl = nil; } NSNumber *compressed = parameters[NSStringFromSelector(@selector(compress))]; NSNumber *replicate = parameters[NSStringFromSelector(@selector(replicate))]; - NSDictionary *metadata = parameters[NSStringFromSelector(@selector(metadata))]; - - [self publish:message - toChannel:channel - mobilePushPayload:payloads - storeInHistory:(shouldStore ? shouldStore.boolValue : YES) - ttl:ttl - compressed:compressed.boolValue - withReplication:(replicate ? replicate.boolValue : YES) - metadata:metadata - queryParameters:parameters[@"queryParam"] - completion:parameters[@"block"]]; -} - - -#pragma mark - Misc - -- (PNRequestParameters *)requestParametersForMessage:(NSString *)message - toChannel:(NSString *)channel - compressed:(BOOL)compressMessage - storeInHistory:(BOOL)shouldStore - ttl:(NSNumber *)ttl - replicate:(BOOL)replicate - metadata:(NSString *)metadata - sequenceNumber:(NSUInteger)sequenceNumber - queryParameters:(NSDictionary *)queryParameters { - PNRequestParameters *parameters = [PNRequestParameters new]; - [parameters addQueryParameters:queryParameters]; - - if (channel.length) { - [parameters addPathComponent:[PNString percentEscapedString:channel] forPlaceholder:@"{channel}"]; - } - - if (!shouldStore) [parameters addQueryParameter:@"0" forFieldName:@"store"]; - if (ttl) [parameters addQueryParameter:ttl.stringValue forFieldName:@"ttl"]; - if (!replicate) [parameters addQueryParameter:@"true" forFieldName:@"norep"]; - - if (([message isKindOfClass:[NSString class]] && message.length) || message) { - id targetMessage = !compressMessage ? [PNString percentEscapedString:message] : @""; - [parameters addPathComponent:targetMessage forPlaceholder:@"{message}"]; - } - - if ([metadata isKindOfClass:[NSString class]] && metadata.length) { - [parameters addQueryParameter:[PNString percentEscapedString:metadata] forFieldName:@"meta"]; - } - - [parameters addQueryParameter:@(sequenceNumber).stringValue forFieldName:@"seqn"]; - - return parameters; -} - -- (NSDictionary *)mergedMessage:(id)message - withMobilePushPayload:(NSDictionary *)payloads { - // Convert passed message to mutable dictionary into which required by push notification - // delivery service provider data will be added. - NSDictionary *originalMessage = message ?: @{}; - if (message && ![message isKindOfClass:[NSDictionary class]]) { - originalMessage = @{ @"pn_other": message }; - } - - NSMutableDictionary *mergedMessage = [originalMessage mutableCopy]; - - for (NSString *pushProviderType in payloads) { - id payload = payloads[pushProviderType]; - NSString *providerKey = pushProviderType; - - if (![pushProviderType hasPrefix:@"pn_"]) { - providerKey = [NSString stringWithFormat:@"pn_%@", pushProviderType]; - - if ([pushProviderType isEqualToString:@"aps"]) { - payload = @{pushProviderType:payload}; - providerKey = @"pn_apns"; - } - } - - [mergedMessage setValue:payload forKey:providerKey]; - } - - return [mergedMessage copy]; -} - -- (NSString *)encryptedMessage:(NSString *)message error:(NSError **)error { - NSString *encryptedMessage = message; - NSData *JSONData = [message dataUsingEncoding:NSUTF8StringEncoding]; - PNResult *encryptionResult = [self.configuration.cryptoModule encryptData:JSONData]; - if (encryptionResult.isError) { - *error = encryptionResult.error; - encryptedMessage = nil; - } else { - NSString *base64 = [encryptionResult.data base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)0]; - encryptedMessage = [PNJSON JSONStringFrom:base64 withError:error]; - } + if (shouldStore && !shouldStore.boolValue) ttl = nil; - return encryptedMessage; + [self publish:parameters[NSStringFromSelector(@selector(message))] + toChannel:parameters[NSStringFromSelector(@selector(channel))] + mobilePushPayload:parameters[NSStringFromSelector(@selector(payloads))] + storeInHistory:(shouldStore ? shouldStore.boolValue : YES) + ttl:ttl + compressed:compressed.boolValue + withReplication:(replicate ? replicate.boolValue : YES) + metadata:parameters[NSStringFromSelector(@selector(metadata))] + queryParameters:parameters[@"queryParam"] + completion:parameters[@"block"]]; } #pragma mark - diff --git a/PubNub/Core/PubNub+State.h b/PubNub/Core/PubNub+State.h index 927753b80..55fce21d4 100644 --- a/PubNub/Core/PubNub+State.h +++ b/PubNub/Core/PubNub+State.h @@ -1,171 +1,220 @@ -#import -#import -#import -#import #import +// Request +#import +#import + -#pragma mark Class forward +// Response +#import +#import +#import +#import +#import -@class PNChannelGroupClientStateResult, PNChannelClientStateResult, PNClientStateUpdateStatus, - PNClientStateGetResult, PNErrorStatus; +// Deprecated +#import +#import +#import NS_ASSUME_NONNULL_BEGIN -#pragma mark - API group interface - -/** - * @brief \b PubNub client core class extension to provide access to 'state' API group. - * - * @discussion Set of API which allow to fetch events which has been moved from remote data object - * live feed to persistent storage. - * - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ +#pragma mark Interface declaration + +/// **PubNub** `Presence State` API. +/// +/// A set of APIs which allow fetching and managing presence state associated with a specific user ID in channel(s). @interface PubNub (State) -#pragma mark - API builder support +#pragma mark - Presence API builder interface (deprecated) -/** - * @briefState API access builder. - * - * @return API call configuration builder. - * - * @since 4.5.4 - */ -@property (nonatomic, readonly, strong) PNStateAPICallBuilder * (^state)(void); +/// State API access builder. +@property (nonatomic, readonly, strong) PNStateAPICallBuilder * (^state)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); #pragma mark - Client state information manipulation -/** - * @brief Modify state information for \c uuid on specified remote data object (channel or channel - * group). - * - * @code - * [self.client setState:@{ @"state": @"online" } forUUID:self.client.uuid onChannel:@"chat" - * withCompletion:^(PNClientStateUpdateStatus *status) { - * - * if (!status.isError) { - * // Client state successfully modified on specified channel. - * } else { - * // Handle client state modification error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param state \a NSDictionary with data which should be bound to \c uuid on channel. - * @param uuid Unique user identifier for which state should be bound. - * @param channel Name of the channel which will store provided state information for \c uuid. - * @param block State modification for user on channel completion block. - * - * @since 4.0 - */ +/// Update presence state associated with user. +/// +/// #### Example: +/// ```objc +/// PNPresenceStateSetRequest *request = [PNPresenceStateSetRequest requestWithUserId:self.client.userID]; +/// request.state = @{ @"state": @"online" }; +/// request.channels = @[@"chat"]; +/// +/// [self.client setPresenceStateWithRequest:request completion:^(PNClientStateUpdateStatus *status) { +/// if (!status.isError) { +/// // Client state successfully modified on specified channels. State returned here: `response.data.state`. +/// } else { +/// // Handle client state modification error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to update presence state associated with user. +/// - block: Presence state update request completion block. +- (void)setPresenceStateWithRequest:(PNPresenceStateSetRequest *)request + completion:(nullable PNSetStateCompletionBlock)block + NS_SWIFT_NAME(setPresenceStateWithRequest(_:completion:)); + +/// Modify state information for `uuid` on specified remote data object (channel or channel group). +/// +/// ### Example: +/// ```objc +/// [self.client setState:@{ @"state": @"online" } +/// forUUID:self.client.userID +/// onChannel:@"chat" +/// withCompletion:^(PNClientStateUpdateStatus *status) { +/// if (!status.isError) { +/// // Client state successfully modified on specified channels. State returned here: `response.data.state`. +/// } else { +/// // Handle client state modification error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - state: `NSDictionary` with data which should be bound to `uuid` on channel. +/// - uuid: Unique user identifier for which state should be bound. +/// - channel: Name of the channel which will store provided state information for `uuid`. +/// - block: State modification for user on channel completion block. - (void)setState:(nullable NSDictionary *)state forUUID:(NSString *)uuid onChannel:(NSString *)channel withCompletion:(nullable PNSetStateCompletionBlock)block - NS_SWIFT_NAME(setState(_:forUUID:onChannel:withCompletion:)); - -/** - * @brief Modify state information for \c uuid on specified channel group. - * - * @code - * [self.client setState:@{ @"announcement": @"New red is blue" } forUUID:self.client.uuid - * onChannelGroup:@"system" withCompletion:^(PNClientStateUpdateStatus *status) { - * - * if (!status.isError) { - * // Client state successfully modified on specified channel group. - * } else { - * // Handle client state modification error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param state \a NSDictionary with data which should be bound to \c uuid on channel group. - * @param uuid Unique user identifier for which state should be bound. - * @param group Name of channel group which will store provided state information for \c uuid. - * @param block State modification for user on channel completion block. - * - * @since 4.0 - */ + NS_SWIFT_NAME(setState(_:forUUID:onChannel:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-setPresenceStateWithRequest:completion:' method instead."); + +/// Modify state information for `uuid` on specified channel group. +/// +/// #### Example: +/// ```objc +/// [self.client setState:@{ @"announcement": @"New red is blue" } +/// forUUID:self.client.userID +/// onChannelGroup:@"system" +/// withCompletion:^(PNClientStateUpdateStatus *status) { +/// if (!status.isError) { +/// // Client state successfully modified on specified channel group. +/// // State returned here: `response.data.state`. +/// } else { +/// // Handle client state modification error. Check `category` property to find out possible issue because of +/// // which request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - state: `NSDictionary` with data which should be bound to `uuid` on channel group. +/// - uuid: Unique user identifier for which state should be bound. +/// - group: Name of channel group which will store provided state information for `uuid`. +/// - block: State modification for user on channel completion block. - (void)setState:(nullable NSDictionary *)state forUUID:(NSString *)uuid onChannelGroup:(NSString *)group withCompletion:(nullable PNSetStateCompletionBlock)block - NS_SWIFT_NAME(setState(_:forUUID:onChannelGroup:withCompletion:)); + NS_SWIFT_NAME(setState(_:forUUID:onChannelGroup:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-setPresenceStateWithRequest:completion:' method instead."); #pragma mark - Client state information audit -/** - * @brief Retrieve state information for \c uuid on specified channel. - * - * @code - * [self.client stateForUUID:self.client.uuid onChannel:@"chat" - * withCompletion:^(PNChannelClientStateResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded state information using: result.data.state - * } else { - * // Handle client state audit error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param uuid Unique user identifier for which state should be retrieved. - * @param channel Name of channel from which state information for \c uuid will be pulled out. - * @param block State audition for user on channel completion block. - * - * @since 4.0 - */ +/// Update presence state associated with user. +/// +/// #### Example: +/// ```objc +/// PNFetchPresenceStateRequest *request = [PNPresenceStateFetchRequest requestWithUserId:self.client.userID]; +/// request.channels = @[@"chat"]; +/// +/// [self.client fetchPresenceStateWithRequest:request +/// completion:^(PNPresenceStateFetchResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle fetched presence state information: +/// // - for single channel: `result.data.state` +/// // - for multuple channels or channel groups: `result.data.channels`. +/// } else { +/// // Handle presence state fetch error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to fetch presence state associated with user. +/// - block: Presence state fetch request completion block. +- (void)fetchPresenceStateWithRequest:(PNPresenceStateFetchRequest *)request + completion:(PNPresenceStateFetchCompletionBlock)block + NS_SWIFT_NAME(fetchPresenceStateWithRequest(_:completion:)); + +/// Retrieve state information for `uuid` on specified channel. +/// +/// #### Example: +/// ```objc +/// [self.client stateForUUID:self.client.userID +/// onChannel:@"chat" +/// withCompletion:^(PNChannelClientStateResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle fetched presence state information using: `result.data.state`. +/// } else { +/// // Handle presence state fetch error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - uuid: Unique user identifier for which state should be retrieved. +/// - channel: Name of channel from which state information for `uuid` will be pulled out. +/// - block: State audition for user on channel completion block. - (void)stateForUUID:(NSString *)uuid onChannel:(NSString *)channel withCompletion:(PNChannelStateCompletionBlock)block - NS_SWIFT_NAME(stateForUUID(_:onChannel:withCompletion:)); - -/** - * @brief Retrieve state information for \c uuid on specified channel group. - * - * @code - * [self.client stateForUUID:self.client.uuid onChannelGroup:@"system" - * withCompletion:^(PNChannelGroupClientStateResult *result, PNErrorStatus *status) { - * - * if (!status.isError) { - * // Handle downloaded state information using: result.data.channels - * // Each channel entry contain state as value. - * } else { - * // Handle client state audit error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param uuid Unique user identifier for which state should be retrieved. - * @param group Name of channel group from which state information for \c uuid will be pulled out. - * @param block State audition for user on channel group completion block. - * - * @since 4.0 - */ + NS_SWIFT_NAME(stateForUUID(_:onChannel:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchPresenceStateWithRequest:completion:' method instead."); + +/// Retrieve state information for `uuid` on specified channel group. +/// +/// #### Example: +/// ```objc +/// [self.client stateForUUID:self.client.userID +/// onChannelGroup:@"system" +/// withCompletion:^(PNChannelGroupClientStateResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded state information using: `result.data.channels`. +/// // Each channel entry contain state as value. +/// } else { +/// // Handle presence state fetch error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - uuid: Unique user identifier for which state should be retrieved. +/// - group: Name of channel group from which state information for `uuid` will be pulled out. +/// - block: State audition for user on channel group completion block. - (void)stateForUUID:(NSString *)uuid onChannelGroup:(NSString *)group withCompletion:(PNChannelGroupStateCompletionBlock)block - NS_SWIFT_NAME(stateForUUID(_:onChannelGroup:withCompletion:)); + NS_SWIFT_NAME(stateForUUID(_:onChannelGroup:withCompletion:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-fetchPresenceStateWithRequest:completion:' method instead."); #pragma mark - diff --git a/PubNub/Core/PubNub+State.m b/PubNub/Core/PubNub+State.m index e1c06c40d..20bd00d98 100644 --- a/PubNub/Core/PubNub+State.m +++ b/PubNub/Core/PubNub+State.m @@ -1,44 +1,35 @@ -/** - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ #import "PubNub+State.h" -#import "PNChannelGroupClientStateResult.h" -#import "PNClientStateUpdateStatus.h" -#import "PNAPICallBuilder+Private.h" -#import "PNClientStateGetResult.h" -#import "PNRequestParameters.h" +#import "PNChannelGroupClientStateResult+Private.h" +#import "PNPresenceUserStateFetchData+Private.h" +#import "PNChannelClientStateResult+Private.h" +#import "PNClientStateGetResult+Private.h" +#import "PNOperationResult+Private.h" #import "PubNub+CorePrivate.h" #import "PNStatus+Private.h" -#import "PNConfiguration.h" -#import "PNLogMacro.h" -#import "PNHelpers.h" + +// Deprecated +#import "PNAPICallBuilder+Private.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// **PubNub** `Presence State` API private extension. @interface PubNub (StateProtected) #pragma mark - Client state information manipulation -/** - * @brief Modify state information for \c uuid on specified remote data object. - * - * @param state \a NSDictionary with data which should be bound to \c uuid on channel group. - * @param uuid Unique user identifier for which state should be bound. - * @param channels List of the channels which will store provided state information for \c uuid. - * @param groups List of channel group names which will store provided state information for - * \c uuid. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block State modification for user on channel completion block. - * - * @since 4.8.2 - */ +/// Modify state information for `uuid` on specified remote data object. +/// +/// - Parameters: +/// - state: `NSDictionary` with data which should be bound to `uuid` on channel group. +/// - uuid: Unique user identifier for which state should be bound. +/// - channels: List of the channels which will store provided state information for `uuid`. +/// - groups: List of channel group names which will store provided state information for `uuid`. +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. +/// - block: State modification for user on channel completion block. - (void)setState:(nullable NSDictionary *)state forUUID:(NSString *)uuid onChannels:(nullable NSArray *)channels @@ -46,20 +37,15 @@ - (void)setState:(nullable NSDictionary *)state withQueryParameters:(nullable NSDictionary *)queryParameters completion:(nullable PNSetStateCompletionBlock)block; -/** - * @brief Retrieve state information for \c uuid on specified remote data object. - * - * @param uuid Unique user identifier for which state should be retrieved. - * @param channels List of the channels from which state information for \c uuid will be pulled out. - * @param groups List of channel group names from which state information for \c uuid will be - * pulled out. - * @param apiCallBuilder Whether API has been called from API call builder or not. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block State audition for user on remote data object completion block. - * - * @since 4.8.2 - */ +/// Retrieve state information for `uuid` on specified remote data object. +/// +/// - Parameters: +/// - uuid: Unique user identifier for which state should be retrieved. +/// - channels: List of the channels from which state information for `uuid` will be pulled out. +/// - groups: List of channel group names from which state information for `uuid` will be pulled out. +/// - apiCallBuilder: Whether API has been called from API call builder or not. +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. +/// - block: State audition for user on remote data object completion block. - (void)stateForUUID:(NSString *)uuid onChannels:(nullable NSArray *)channels groups:(nullable NSArray *)groups @@ -70,45 +56,34 @@ - (void)stateForUUID:(NSString *)uuid #pragma mark - Handlers -/** - * @brief Process client state modification request completion and notify observers about results. - * - * @param status State modification status instance. - * @param uuid Unique user identifier for which state should be updated. - * @param channels List of the channels which will store provided state information for \c uuid. - * @param groups List of channel group names which will store provided state information for - * \c uuid. - * @param block State modification for user on channel completion block. - * - * @since 4.0 - */ +/// Process client state modification request completion and notify observers about results. +/// +/// - Parameters: +/// - status: State modification status instance. +/// - uuid: Unique user identifier for which state should be updated. +/// - channels: List of the channels which will store provided state information for `uuid`. +/// - groups: List of channel group names which will store provided state information for `uuid`. +/// - block: State modification for user on channel completion block. - (void)handleSetStateStatus:(PNClientStateUpdateStatus *)status forUUID:(NSString *)uuid atChannels:(nullable NSArray *)channels groups:(nullable NSArray *)groups withCompletion:(nullable PNSetStateCompletionBlock)block; -/** - * @brief Process client state audition request completion and notify observers about results. - * - * @param result Service response results instance. - * @param status State request status instance. - * @param uuid Unique user identifier for which state should be retrieved. - * @param channels List of the channels which will store provided state information for \c uuid. - * @param groups List of channel group names which will store provided state information for - * \c uuid. - * @param apiCallBuilder Whether processing data which has been received by API call from API call - * builder or not. - * @param block State audition for user on channel completion block. - - @since 4.0 - */ -- (void)handleStateResult:(nullable id)result +/// Process client state audition request completion and notify observers about results. +/// +/// - Parameters: +/// - result: Service response results instance. +/// - status: State request status instance. +/// - uuid: Unique user identifier for which state should be retrieved. +/// - channels: List of the channels which will store provided state information for `uuid`. +/// - groups: List of channel group names which will store provided state information for `uuid`. +/// - block: State audition for user on channel completion block. +- (void)handleStateResult:(nullable PNPresenceStateFetchResult *)result withStatus:(nullable PNStatus *)status forUUID:(NSString *)uuid atChannels:(nullable NSArray *)channels groups:(nullable NSArray *)groups - fromBuilder:(BOOL)apiCallBuilder withCompletion:(id)block; #pragma mark - @@ -119,23 +94,20 @@ - (void)handleStateResult:(nullable id)result NS_ASSUME_NONNULL_END -#pragma mark Interface implementation +#pragma mark - Interface implementation @implementation PubNub (State) -#pragma mark - API Builder support +#pragma mark - Presence API builder interface (deprecated) - (PNStateAPICallBuilder * (^)(void))state { - PNStateAPICallBuilder *builder = nil; - builder = [PNStateAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, - NSDictionary *parameters) { - - NSString *uuid = parameters[NSStringFromSelector(@selector(uuid))]; - NSArray *channels = parameters[NSStringFromSelector(@selector(channels))]; + builder = [PNStateAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters) { NSArray *groups = parameters[NSStringFromSelector(@selector(channelGroups))]; + NSArray *channels = parameters[NSStringFromSelector(@selector(channels))]; NSDictionary *state = parameters[NSStringFromSelector(@selector(state))]; + NSString *uuid = parameters[NSStringFromSelector(@selector(uuid))]; NSDictionary *queryParam = parameters[@"queryParam"]; id block = parameters[@"block"]; @@ -164,11 +136,50 @@ @implementation PubNub (State) #pragma mark - Client state information manipulation +- (void)setPresenceStateWithRequest:(PNPresenceStateSetRequest *)userRequest + completion:(PNSetStateCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNClientStateUpdateStatus class]]; + PNSetStateCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNLogAPICall(self.logger, @" Set %@'s state on%@%@: %@.", + userRequest.userId, + (userRequest.channels.count + ? [NSString stringWithFormat:@" channels (%@)", [userRequest.channels componentsJoinedByString:@","]] + : @""), + (userRequest.channelGroups.count + ? [NSString stringWithFormat:@" %@channel groups (%@)", userRequest.channels.count ? @"and " : @"", [userRequest.channelGroups componentsJoinedByString:@","]] + : @""), + userRequest.state); + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self setPresenceStateWithRequest:userRequest completion:block]; + }; +#pragma clang diagnostic pop + } + + [self handleSetStateStatus:result.status + forUUID:userRequest.userId + atChannels:userRequest.channels + groups:userRequest.channelGroups + withCompletion:block]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + - (void)setState:(NSDictionary *)state forUUID:(NSString *)uuid onChannel:(NSString *)channel withCompletion:(PNSetStateCompletionBlock)block { - NSArray *channels = channel ? @[channel] : nil; [self setState:state @@ -183,7 +194,6 @@ - (void)setState:(NSDictionary *)state forUUID:(NSString *)uuid onChannelGroup:(NSString *)group withCompletion:(PNSetStateCompletionBlock)block { - NSArray *groups = group ? @[group] : nil; [self setState:state @@ -200,87 +210,63 @@ - (void)setState:(nullable NSDictionary *)state groups:(NSArray *)groups withQueryParameters:(NSDictionary *)queryParameters completion:(PNSetStateCompletionBlock)block { + PNPresenceStateSetRequest *request = [PNPresenceStateSetRequest requestWithUserId:uuid]; + request.arbitraryQueryParameters = queryParameters; + request.channelGroups = groups; + request.channels = channels; + request.state = state; - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - __weak __typeof(self) weakSelf = self; - - if (@available(macOS 10.10, iOS 8.0, *)) { - if (self.configuration.applicationExtensionSharedGroupIdentifier) { - queue = dispatch_get_main_queue(); - } - } - - // State set retry block. - dispatch_block_t retryBlock = ^{ - [weakSelf setState:state - forUUID:uuid - onChannels:channels - groups:groups - withQueryParameters:queryParameters - completion:block]; - }; - - if ((!channels.count && !groups.count) || !uuid.length) { - PNErrorStatus *badRequestStatus = [PNErrorStatus statusForOperation:PNSetStateOperation - category:PNBadRequestCategory - withProcessingError:nil]; - - badRequestStatus.retryBlock = retryBlock; - [self appendClientInformation:badRequestStatus]; - - [self callBlock:block status:YES withResult:nil andStatus:badRequestStatus]; - return; - } - - dispatch_async(queue, ^{ - __strong __typeof__(weakSelf) strongSelf = weakSelf; - NSString *stateString = [PNJSON JSONStringFrom:state withError:NULL] ?: @"{}"; - PNRequestParameters *parameters = [PNRequestParameters new]; - - [parameters addPathComponent:(channels.count ? [PNChannel namesForRequest:channels] : @",") - forPlaceholder:@"{channel}"]; - [parameters addQueryParameter:[PNString percentEscapedString:stateString] - forFieldName:@"state"]; - [parameters addQueryParameters:queryParameters]; - [parameters addPathComponent:[PNString percentEscapedString:uuid] forPlaceholder:@"{uuid}"]; - - if (groups.count) { - [parameters addQueryParameter:[PNChannel namesForRequest:groups] - forFieldName:@"channel-group"]; - } - - PNLogAPICall(strongSelf.logger, @" Set %@'s state on%@%@: %@.", uuid, - (channels.count ? [NSString stringWithFormat:@" channels (%@)", - [channels componentsJoinedByString:@","]] : @""), - (groups.count ? [NSString stringWithFormat:@" %@channel groups (%@)", - channels.count ? @"and " : @"", - [groups componentsJoinedByString:@","]] : @""), - parameters.query[@"state"]); - - [strongSelf processOperation:PNSetStateOperation - withParameters:parameters - completionBlock:^(PNStatus *status) { - - if (status.isError) { - status.retryBlock = retryBlock; - } - - [weakSelf handleSetStateStatus:(PNClientStateUpdateStatus *)status - forUUID:uuid - atChannels:channels - groups:groups - withCompletion:block]; - }]; - }); + [self setPresenceStateWithRequest:request completion:block]; } #pragma mark - Client state information audit +- (void)fetchPresenceStateWithRequest:(PNPresenceStateFetchRequest *)userRequest + completion:(PNPresenceStateFetchCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNPresenceStateFetchResult class] + status:[PNErrorStatus class]]; + PNPresenceStateFetchCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNLogAPICall(self.logger, @" State request on %@%@ for %@.", + (userRequest.channels.count + ? [NSString stringWithFormat:@" channels (%@)", [userRequest.channels componentsJoinedByString:@","]] + : @""), + (userRequest.channelGroups.count + ? [NSString stringWithFormat:@" %@channel groups (%@)", userRequest.channels.count ? @"and " : @"", + [userRequest.channelGroups componentsJoinedByString:@","]] + : @""), + userRequest.userId); + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self fetchPresenceStateWithRequest:userRequest completion:block]; + }; +#pragma clang diagnostic pop + } + + [self handleStateResult:result.result + withStatus:result.status + forUUID:userRequest.userId + atChannels:userRequest.channels + groups:userRequest.channelGroups + withCompletion:block]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + - (void)stateForUUID:(NSString *)uuid onChannel:(NSString *)channel withCompletion:(PNChannelStateCompletionBlock)block { - NSArray *channels = channel ? @[channel] : nil; [self stateForUUID:uuid @@ -294,7 +280,6 @@ - (void)stateForUUID:(NSString *)uuid - (void)stateForUUID:(NSString *)uuid onChannelGroup:(NSString *)group withCompletion:(PNChannelGroupStateCompletionBlock)block { - NSArray *groups = group ? @[group] : nil; [self stateForUUID:uuid @@ -310,71 +295,29 @@ - (void)stateForUUID:(NSString *)uuid groups:(NSArray *)groups fromBuilder:(BOOL)apiCallBuilder withQueryParameters:(NSDictionary *)queryParameters - completion:(id)block { - - PNRequestParameters *parameters = [PNRequestParameters new]; - PNOperationType operation = PNGetStateOperation; - __weak __typeof(self) weakSelf = self; - - if (!apiCallBuilder) { - operation = groups.count ? PNStateForChannelGroupOperation : PNStateForChannelOperation; - } - - // State fetch retry block. - dispatch_block_t retryBlock = ^{ - [weakSelf stateForUUID:uuid - onChannels:channels - groups:groups - fromBuilder:apiCallBuilder - withQueryParameters:queryParameters - completion:block]; - }; - - if ((!channels.count && !groups.count) || !uuid.length) { - PNErrorStatus *badRequestStatus = [PNErrorStatus statusForOperation:operation - category:PNBadRequestCategory - withProcessingError:nil]; - - badRequestStatus.retryBlock = retryBlock; - [self appendClientInformation:badRequestStatus]; - - [self callBlock:block status:NO withResult:nil andStatus:badRequestStatus]; - return; - } - - [parameters addPathComponent:(channels.count ? [PNChannel namesForRequest:channels] : @",") - forPlaceholder:@"{channel}"]; - [parameters addQueryParameters:queryParameters]; - [parameters addPathComponent:[PNString percentEscapedString:uuid] forPlaceholder:@"{uuid}"]; - - if (groups.count) { - [parameters addQueryParameter:[PNChannel namesForRequest:groups] - forFieldName:@"channel-group"]; - } - - PNLogAPICall(self.logger, @" State request on %@%@ for %@.", - (channels.count ? [NSString stringWithFormat:@" channels (%@)", - [channels componentsJoinedByString:@","]] : @""), - (groups.count ? [NSString stringWithFormat:@" %@channel groups (%@)", - channels.count ? @"and " : @"", - [groups componentsJoinedByString:@","]] : @""), - uuid); - - [self processOperation:operation - withParameters:parameters - completionBlock:^(PNOperationResult *result, PNStatus *status) { - - if (status.isError) { - status.retryBlock = retryBlock; + completion:(id)handlerBlock { + + PNPresenceStateFetchRequest *request = [PNPresenceStateFetchRequest requestWithUserId:uuid]; + request.arbitraryQueryParameters = queryParameters; + request.channelGroups = groups; + id block = [handlerBlock copy]; + request.channels = channels; + + [self fetchPresenceStateWithRequest:request completion:^(PNPresenceStateFetchResult *result, PNErrorStatus *status) { + id mappedResult = result; + if (apiCallBuilder) { + if (mappedResult) mappedResult = [PNClientStateGetResult legacyPresenceStateFromPresenceState:result]; + } else { + if (channels.count == 1 && groups.count == 0) { + if (mappedResult) mappedResult = [PNChannelClientStateResult legacyPresenceFromPresence:result]; + else status.operation = PNStateForChannelOperation; + } else if (channels.count > 1 || groups.count >= 1) { + if (mappedResult) mappedResult = [PNChannelGroupClientStateResult legacyPresenceFromPresence:result]; + else status.operation = PNStateForChannelGroupOperation; + } } - [weakSelf handleStateResult:(PNChannelClientStateResult *)result - withStatus:status - forUUID:uuid - atChannels:channels - groups:groups - fromBuilder:apiCallBuilder - withCompletion:block]; + [self callBlock:block status:NO withResult:mappedResult andStatus:status]; }]; } @@ -397,26 +340,18 @@ - (void)handleSetStateStatus:(PNClientStateUpdateStatus *)status [self callBlock:block status:YES withResult:nil andStatus:status]; } -- (void)handleStateResult:(id)result +- (void)handleStateResult:(PNPresenceStateFetchResult *)result withStatus:(PNStatus *)status forUUID:(NSString *)uuid atChannels:(NSArray *)channels groups:(NSArray *)groups - fromBuilder:(BOOL)apiCallBuilder withCompletion:(id)block { if (result && [uuid isEqualToString:self.configuration.userID]) { NSDictionary *state = @{}; - if (!apiCallBuilder) { - if (channels.count) { - state = @{ channels[0]: ((PNChannelClientStateResult *)result).data.state ?: @{} }; - } else if (groups.count) { - state = ((PNChannelGroupClientStateResult *)result).data.channels; - } - } else { - state = ((PNClientStateGetResult *)result).data.channels; - } + if (result.data.channel) state = @{ result.data.channel: result.data.state }; + else state = result.data.channels; NSMutableDictionary *existingState = [(self.clientStateManager.state ?: @{}) mutableCopy]; [existingState addEntriesFromDictionary:state]; @@ -424,9 +359,7 @@ - (void)handleStateResult:(id)result NSArray *channelsWithState = self.clientStateManager.state.allKeys; state = [existingState dictionaryWithValuesForKeys:channelsWithState]; - if (state.count) { - [self.clientStateManager setState:state forObjects:channelsWithState]; - } + if (state.count) [self.clientStateManager setState:state forObjects:channelsWithState]; } [self callBlock:block status:NO withResult:result andStatus:status]; diff --git a/PubNub/Core/PubNub+Subscribe.h b/PubNub/Core/PubNub+Subscribe.h index ca11ac10f..a5083410c 100644 --- a/PubNub/Core/PubNub+Subscribe.h +++ b/PubNub/Core/PubNub+Subscribe.h @@ -1,9 +1,21 @@ -#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +// Deprecated #import #import #import #import -#import #pragma mark Class forward @@ -11,447 +23,420 @@ @class PNSubscribeStatus; -#pragma mark - Protocols - -@protocol PNEventsListener; - - NS_ASSUME_NONNULL_BEGIN -/** - * @brief \b PubNub client core class extension to provide access to 'publish' API group. - * - * @discussion Set of API which allow to push data to \b PubNub service. Data pushed to remote data - * objects called 'channels' and then delivered on their live feeds to all subscribers. - * - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ +#pragma mark - Interface implementation + +/// **PubNub** `Subscribe` APIs. +/// +/// Set of API which allow to push data to **PubNub** service. Data pushed to remote data objects called `channels` and +/// then delivered on their live feeds to all subscribers. @interface PubNub (Subscribe) #pragma mark - Information -/** - * @brief Retrieve list of channels on which client subscribed now. - * - * @return \a NSArray of channel names on which client subscribed at this moment. - * - * @since 4.0 - */ +/// Retrieve list of channels on which client subscribed now. +/// +///- Returns: `NSArray` of channel names on which client subscribed at this moment. - (NSArray *)channels; -/** - * @brief Retrieve list of channel groups on which client subscribed now. - * - * @return \a NSArray of channel group names on which client subscribed at this moment. - * - * @since 4.0 - */ +/// Retrieve list of channel groups on which client subscribed now. +/// +/// - Returns: `NSArray` of channel group names on which client subscribed at this moment. - (NSArray *)channelGroups; -/** - * @brief List of channels for which presence events observation has been enabled. - * - * @return \a NSArray of presence channel names on which client subscribed at this moment. - * - * @since 4.0 - */ +/// List of channels for which presence events observation has been enabled. +/// +/// - Returns: `NSArray` of presence channel names on which client subscribed at this moment. - (NSArray *)presenceChannels; -/** - * @brief Check whether \b PubNub client currently subscribed on specified data object or not. - * - * @param name Name of data object against which check should be performed. - * - * @return Whether subscribed on specified data object or not. - * - * @since 4.0 - */ +/// Check whether **PubNub** client currently subscribed on specified data object or not. +/// +/// - Parameter name: Name of data object against which check should be performed. +/// - Returns: Whether subscribed on specified data object or not. - (BOOL)isSubscribedOn:(NSString *)name; #pragma mark - Listeners -/** - * @brief Add observer which conform to \b PNEventsListener protocol and would like to receive - * updates based on live feed events and status change. - * - * @discussion Listener can implement only required callbacks from \b PNEventsListener protocol - * and called only when desired type of event arrive. - * - * @param listener Listener which would like to receive updates. - * - * @since 4.0 - */ -- (void)addListener:(id )listener NS_SWIFT_NAME(addListener(_:)); - -/** - * @brief Remove listener from list for callback calls. - * - * @discussion When listener not interested in live feed updates it can remove itself from updates - * list using this method. - * - * @param listener Listener which doesn't want to receive updates anymore. - * - * @since 4.0 - */ -- (void)removeListener:(id )listener NS_SWIFT_NAME(removeListener(_:)); +/// Add observer which conform to ``PNEventsListener`` protocol and would like to receive updates based on live feed +/// events and status change. +/// +/// Listener can implement only required callbacks from ``PNEventsListener`` protocol and called only when desired type +/// of event arrive. +/// +/// - Parameter listener: Listener which would like to receive updates. +- (void)addListener:(id)listener NS_SWIFT_NAME(addListener(_:)); + +/// Remove listener from list for callback calls. +/// +/// When listener not interested in live feed updates it can remove itself from updates list using this method. +/// +/// - Parameter listener: Listener which doesn't want to receive updates anymore. +- (void)removeListener:(id)listener NS_SWIFT_NAME(removeListener(_:)); #pragma mark - Filtering -/** - * @brief String representation of filtering expression which should be applied to decide which - * updates should reach client. - * - * @warning If your filter expression is malformed, \b PNEventsListener won't receive any - * messages and presence events from service (only error status). - */ +/// String representation of filtering expression which should be applied to decide which updates should reach client. +/// +/// > Warning: If your filter expression is malformed, ``PNEventsListener`` won't receive any messages and presence +/// events from service (only error status). @property (nonatomic, nullable, copy) NSString *filterExpression; #pragma mark - API Builder support -/** - * @brief Subscribe API access builder. - * - * @note Since \b 4.8.0 if \c managePresenceListManually client configuration property is set to - * \c YES this API won't add channels and / or channel groups to presence heartbeat list. - * - * @return API call configuration builder. - * - * @since 4.5.4 - */ -@property (nonatomic, readonly, strong) PNSubscribeAPIBuilder * (^subscribe)(void); - -/** - * @brief Unsubscribe API access builder. - * - * @return API call configuration builder. - * - * @since 4.5.4 - */ -@property (nonatomic, readonly, strong) PNUnsubscribeAPICallBuilder * (^unsubscribe)(void); +/// Subscribe API access builder. +/// +/// > Note: Since **4.8.0** if `managePresenceListManually` client configuration property is set to `YES` this API won't +/// add channels and / or channel groups to presence heartbeat list. +@property (nonatomic, readonly, strong) PNSubscribeAPIBuilder * (^subscribe)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); + +/// Unsubscribe API access builder. +@property (nonatomic, readonly, strong) PNUnsubscribeAPICallBuilder * (^unsubscribe)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); #pragma mark - Subscription -/** - * @brief Try subscribe on specified set of channels. - * - * @discussion Client is able to subscribe of remote data objects live feed and listen for new - * events from them. - * - * @note Since \b 4.8.0 if \c managePresenceListManually client configuration property is set to - * \c YES this API won't add channels to presence heartbeat list. - * - * @code - * [self.client subscribeToChannels:@[@"swift"] withPresence:YES]; - * @endcode - * - * @param channels List of channel names on which client should try to subscribe. - * @param shouldObservePresence Whether presence observation should be enabled for \c channels or - * not. - * - * @since 4.0 - */ +/// Subscribe to specified resources. +/// +/// #### Examples: +/// ##### Subscribe on regular channels and groups: +/// ```objc +/// PNSubscribeRequest *request = [PNSubscribeRequest requestWithChannels:@[@"channel-a"] channelGroups:nil]; +/// request.observePresence = YES; +/// request.timetoken = @(1234567890); +/// +/// [self.client subscribeWithRequest:request]; +/// ``` +/// +/// ##### Subscribe on presence channels and groups: +/// ```objc +/// // This request will subscribe on presence events from `group-a-pnpres` group. +/// PNSubscribeRequest *request = [PNSubscribeRequest requestWithPresenceChannels:nil channelGroups:@[@"group-a"]]; +/// request.timetoken = @(1234567890); +/// +/// [self.client subscribeWithRequest:request]; +/// ``` +/// +/// - Parameter request: Request with information about resources from which client will receive real-time updates. +- (void)subscribeWithRequest:(PNSubscribeRequest *)request NS_SWIFT_NAME(subscribeWithRequest(_:)); + +/// Try subscribe on specified set of channels. +/// +/// Client is able to subscribe of remote data objects live feed and listen for new events from them. +/// +/// > Note: Since **4.8.0** if `managePresenceListManually` client configuration property is set to `YES` this API won't +/// add channels to presence heartbeat list. +/// +/// #### Example: +/// ```objc +/// [self.client subscribeToChannels:@[@"swift"] withPresence:YES]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names on which client should try to subscribe. +/// - shouldObservePresence: Whether presence observation should be enabled for `channels` or not. - (void)subscribeToChannels:(NSArray *)channels withPresence:(BOOL)shouldObservePresence - NS_SWIFT_NAME(subscribeToChannels(_:withPresence:)); - -/** - * @brief Try subscribe on specified set of channels. - * - * @discussion Client is able to subscribe of remote data objects live feed and listen for new - * events from them. - * - * @note Since \b 4.8.0 if \c managePresenceListManually client configuration property is set to - * \c YES this API won't add channels to presence heartbeat list. - * - * @code - * NSNumber *timeToken = @([[NSDate dateWithTimeIntervalSinceNow:-2.0] timeIntervalSince1970]); - * - * [self.client subscribeToChannels:@[@"swift"] withPresence:YES usingTimeToken:timeToken]; - * @endcode - * - * @param channels List of channel names on which client should try to subscribe. - * @param shouldObservePresence Whether presence observation should be enabled for \c channels or - * not. - * @param timeToken Time from which client should try to catch up on messages. - * - * @since 4.2.0 - */ + NS_SWIFT_NAME(subscribeToChannels(_:withPresence:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-subscribeWithRequest:' method instead."); + +/// Try subscribe on specified set of channels. +/// +/// Client is able to subscribe of remote data objects live feed and listen for new events from them. +/// +/// > Note: Since **4.8.0** if `managePresenceListManually` client configuration property is set to `YES` this API won't +/// add channels to presence heartbeat list. +/// +/// #### Example: +/// ``` +/// NSNumber *timeToken = @([[NSDate dateWithTimeIntervalSinceNow:-2.0] timeIntervalSince1970]); +/// +/// [self.client subscribeToChannels:@[@"swift"] withPresence:YES usingTimeToken:timeToken]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names on which client should try to subscribe. +/// - shouldObservePresence: Whether presence observation should be enabled for `channels` or not. +/// - timeToken: Time from which client should try to catch up on messages. - (void)subscribeToChannels:(NSArray *)channels withPresence:(BOOL)shouldObservePresence usingTimeToken:(nullable NSNumber *)timeToken - NS_SWIFT_NAME(subscribeToChannels(_:withPresence:usingTimeToken:)); - -/** - * @brief Try subscribe on specified set of channels. - * - * @discussion Client is able to subscribe of remote data objects live feed and listen for new - * events from them. - * - * @note Since \b 4.8.0 if \c managePresenceListManually client configuration property is set to - * \c YES this API won't add channels to presence heartbeat list. - * - * @code - * [self.client subscribeToChannels:@[@"swift"] withPresence:YES - * clientState:@{ @"swift": @{ @"Type": @"Developer" } }]; - * @endcode - * - * @param channels List of channel names on which client should try to subscribe. - * @param shouldObservePresence Whether presence observation should be enabled for \c channels or - * not. - * @param state \a NSDictionary with key-value pairs based on channel group name and value which - * should be assigned to it. - * - * @since 4.0 - */ + NS_SWIFT_NAME(subscribeToChannels(_:withPresence:usingTimeToken:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-subscribeWithRequest:' method instead."); + +/// Try subscribe on specified set of channels. +/// +/// Client is able to subscribe of remote data objects live feed and listen for new events from them. +/// +/// > Note: Since **4.8.0** if `managePresenceListManually` client configuration property is set to `YES` this API won't +/// add channels to presence heartbeat list. +/// +/// #### Example: +/// ``` +/// [self.client subscribeToChannels:@[@"swift"] withPresence:YES clientState:@{ @"swift": @{ @"Type": @"Developer" }}]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names on which client should try to subscribe. +/// - shouldObservePresence: Whether presence observation should be enabled for `channels` or not. +/// - state: `NSDictionary` with key-value pairs based on channel group name and value which should be assigned to it. - (void)subscribeToChannels:(NSArray *)channels withPresence:(BOOL)shouldObservePresence clientState:(nullable NSDictionary *)state - NS_SWIFT_NAME(subscribeToChannels(_:withPresence:clientState:)); - -/** - * @brief Try subscribe on specified set of channels. - * - * @discussion Client is able to subscribe of remote data objects live feed and listen for new - * events from them. - * - * @note Since \b 4.8.0 if \c managePresenceListManually client configuration property is set to - * \c YES this API won't add channels to presence heartbeat list. - * - * @code - * NSNumber *timeToken = @([[NSDate dateWithTimeIntervalSinceNow:-2.0] timeIntervalSince1970]); - * - * [self.client subscribeToChannels:@[@"swift"] withPresence:YES usingTimeToken:timeToken - * clientState:@{ @"swift": @{ @"Type": @"Developer" } }]; - * @endcode - * - * @param channels List of channel names on which client should try to subscribe. - * @param shouldObservePresence Whether presence observation should be enabled for \c channels or - * not. - * @param timeToken Time from which client should try to catch up on messages. - * @param state \a NSDictionary with key-value pairs based on channel group name and value which - * should be assigned to it. - * - * @since 4.2.0 - */ + NS_SWIFT_NAME(subscribeToChannels(_:withPresence:clientState:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-subscribeWithRequest:' method instead."); + +/// Try subscribe on specified set of channels. +/// +/// Client is able to subscribe of remote data objects live feed and listen for new events from them. +/// +/// > Note: Since **4.8.0** if `managePresenceListManually` client configuration property is set to `YES` this API won't +/// add channels to presence heartbeat list. +/// +/// #### Example: +/// ```objc +/// NSNumber *timeToken = @([[NSDate dateWithTimeIntervalSinceNow:-2.0] timeIntervalSince1970]); +/// +/// [self.client subscribeToChannels:@[@"swift"] +/// withPresence:YES +/// usingTimeToken:timeToken +/// clientState:@{ @"swift": @{ @"Type": @"Developer" }}]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names on which client should try to subscribe. +/// - shouldObservePresence: Whether presence observation should be enabled for `channels` or not. +/// - timeToken: Time from which client should try to catch up on messages. +/// - state: `NSDictionary` with key-value pairs based on channel group name and value which should be assigned to it. - (void)subscribeToChannels:(NSArray *)channels withPresence:(BOOL)shouldObservePresence usingTimeToken:(nullable NSNumber *)timeToken clientState:(nullable NSDictionary *)state - NS_SWIFT_NAME(subscribeToChannels(_:withPresence:usingTimeToken:clientState:)); - -/** - * @brief Try subscribe on specified set of channel groups. - * - * @discussion Client is able to subscribe of remote data objects live feed and listen for new - * events from them. - * - * @note Since \b 4.8.0 if \c managePresenceListManually client configuration property is set to - * \c YES this API won't add channel groups to presence heartbeat list. - * - * @code - * [self.client subscribeToChannelGroups:@[@"developers"] withPresence:YES]; - * @endcode - * - * @param groups List of channel group names on which client should try to subscribe. - * @param shouldObservePresence Whether presence observation should be enabled for \c groups or not. - * - * @since 4.0 - */ -- (void)subscribeToChannelGroups:(NSArray *)groups - withPresence:(BOOL)shouldObservePresence - NS_SWIFT_NAME(subscribeToChannelGroups(_:withPresence:)); - -/** - * @brief Try subscribe on specified set of channel groups. - * - * @discussion Client is able to subscribe of remote data objects live feed and listen for new - * events from them. - * - * @note Since \b 4.8.0 if \c managePresenceListManually client configuration property is set to - * \c YES this API won't add channel groups to presence heartbeat list. - * - * @code - * NSNumber *timeToken = @([[NSDate dateWithTimeIntervalSinceNow:-2.0] timeIntervalSince1970]); - * - * [self.client subscribeToChannelGroups:@[@"developers"] withPresence:YES usingTimeToken:timeToken]; - * @endcode - * - * @param groups List of channel group names on which client should try to subscribe. - * @param shouldObservePresence Whether presence observation should be enabled for \c groups or not. - * @param timeToken Time from which client should try to catch up on messages. - * - * @since 4.2.0 - */ + NS_SWIFT_NAME(subscribeToChannels(_:withPresence:usingTimeToken:clientState:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-subscribeWithRequest:' method instead."); + +/// Try subscribe on specified set of channel groups. +/// +/// Client is able to subscribe of remote data objects live feed and listen for new events from them. +/// +/// > Note: Since **4.8.0** if `managePresenceListManually` client configuration property is set to `YES` this API won't +/// add channel groups to presence heartbeat list. +/// +/// #### Example: +/// ```objc +/// [self.client subscribeToChannelGroups:@[@"developers"] withPresence:YES]; +/// ``` +/// +/// - Parameters: +/// - groups: List of channel group names on which client should try to subscribe. +/// - shouldObservePresence: Whether presence observation should be enabled for `groups` or not. +- (void)subscribeToChannelGroups:(NSArray *)groups withPresence:(BOOL)shouldObservePresence + NS_SWIFT_NAME(subscribeToChannelGroups(_:withPresence:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-subscribeWithRequest:' method instead."); + +/// Try subscribe on specified set of channel groups. +/// +/// Client is able to subscribe of remote data objects live feed and listen for new events from them. +/// +/// > Note: Since **4.8.0** if `managePresenceListManually` client configuration property is set to `YES` this API won't +/// add channel groups to presence heartbeat list. +/// +/// #### Example: +/// ```objc +/// NSNumber *timeToken = @([[NSDate dateWithTimeIntervalSinceNow:-2.0] timeIntervalSince1970]); +/// +/// [self.client subscribeToChannelGroups:@[@"developers"] withPresence:YES usingTimeToken:timeToken]; +/// ``` +/// +/// - Parameters: +/// - groups: List of channel group names on which client should try to subscribe. +/// - shouldObservePresence: Whether presence observation should be enabled for `groups` or not. +/// - timeToken: Time from which client should try to catch up on messages. - (void)subscribeToChannelGroups:(NSArray *)groups withPresence:(BOOL)shouldObservePresence usingTimeToken:(nullable NSNumber *)timeToken - NS_SWIFT_NAME(subscribeToChannelGroups(_:withPresence:usingTimeToken:)); - -/** - * @brief Try subscribe on specified set of channel groups. - * - * @discussion Client is able to subscribe of remote data objects live feed and listen for new - * events from them. - * - * @note Since \b 4.8.0 if \c managePresenceListManually client configuration property is set to - * \c YES this API won't add channel groups to presence heartbeat list. - * - * @code - * [self.client subscribeToChannelGroups:@[@"developers"] withPresence:YES - * clientState:@{ @"developers": @{ @"Name": @"Bob" } }]; - * @endcode - * - * @param groups List of channel group names on which client should try to subscribe. - * @param shouldObservePresence Whether presence observation should be enabled for \c groups or not. - * @param state \a NSDictionary with key-value pairs based on channel group name and value which - * should be assigned to it. - * - * @since 4.0 - */ + NS_SWIFT_NAME(subscribeToChannelGroups(_:withPresence:usingTimeToken:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-subscribeWithRequest:' method instead."); + +/// Try subscribe on specified set of channel groups. +/// +/// Client is able to subscribe of remote data objects live feed and listen for new events from them. +/// +/// > Note: Since **4.8.0** if `managePresenceListManually` client configuration property is set to `YES` this API won't +/// add channel groups to presence heartbeat list. +/// +/// #### Example: +/// ```objc +/// [self.client subscribeToChannelGroups:@[@"developers"] +/// withPresence:YES +/// clientState:@{ @"developers": @{ @"Name": @"Bob" }}]; +/// ``` +/// +/// - Parameters: +/// - groups: List of channel group names on which client should try to subscribe. +/// - shouldObservePresence: Whether presence observation should be enabled for `groups` or not. +/// - state: `NSDictionary` with key-value pairs based on channel group name and value which should be assigned to it. - (void)subscribeToChannelGroups:(NSArray *)groups withPresence:(BOOL)shouldObservePresence clientState:(nullable NSDictionary *)state - NS_SWIFT_NAME(subscribeToChannelGroups(_:withPresence:clientState:)); - -/** - * @brief Try subscribe on specified set of channel groups. - * - * @discussion Client is able to subscribe of remote data objects live feed and listen for new - * events from them. - * - * @note Since \b 4.8.0 if \c managePresenceListManually client configuration property is set to - * \c YES this API won't add channel groups to presence heartbeat list. - * - * @code - * NSNumber *timeToken = @([[NSDate dateWithTimeIntervalSinceNow:-2.0] timeIntervalSince1970]); - * - * [self.client subscribeToChannelGroups:@[@"developers"] withPresence:YES usingTimeToken:timeToken - * clientState:@{ @"developers": @{ @"Name": @"Bob" } }]; - * @endcode - * - * @param groups List of channel group names on which client should try to subscribe. - * @param shouldObservePresence Whether presence observation should be enabled for \c groups or not. - * @param timeToken Time from which client should try to catch up on messages. - * @param state \a NSDictionary with key-value pairs based on channel group name and value which - * should be assigned to it. - * - * @since 4.2.0 - */ + NS_SWIFT_NAME(subscribeToChannelGroups(_:withPresence:clientState:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-subscribeWithRequest:' method instead."); + +/// Try subscribe on specified set of channel groups. +/// +/// Client is able to subscribe of remote data objects live feed and listen for new events from them. +/// +/// > Note: Since **4.8.0** if `managePresenceListManually` client configuration property is set to `YES` this API won't +/// add channel groups to presence heartbeat list. +/// +/// #### Example: +/// ```objc +/// NSNumber *timeToken = @([[NSDate dateWithTimeIntervalSinceNow:-2.0] timeIntervalSince1970]); +/// +/// [self.client subscribeToChannelGroups:@[@"developers"] +/// withPresence:YES +/// usingTimeToken:timeToken +/// clientState:@{ @"developers": @{ @"Name": @"Bob" }}]; +/// ``` +/// +/// - Parameters: +/// - groups: List of channel group names on which client should try to subscribe. +/// - shouldObservePresence: Whether presence observation should be enabled for `groups` or not. +/// - timeToken: Time from which client should try to catch up on messages. +/// - state: `NSDictionary` with key-value pairs based on channel group name and value which should be assigned to it. - (void)subscribeToChannelGroups:(NSArray *)groups withPresence:(BOOL)shouldObservePresence usingTimeToken:(nullable NSNumber *)timeToken clientState:(nullable NSDictionary *)state - NS_SWIFT_NAME(subscribeToChannelGroups(_:withPresence:usingTimeToken:clientState:)); - -/** - * @brief Enable presence observation on specified \c channels. - * - * @discussion Client will be able to observe for presence events which is pushed to remote data - * objects. - * - * @code - * [self.client subscribeToPresenceChannels:@[@"swift"]]; - * @endcode - * - * @param channels List of channel names for which client should try to subscribe on presence - * observing channels. - * - * @since 4.0 - */ + NS_SWIFT_NAME(subscribeToChannelGroups(_:withPresence:usingTimeToken:clientState:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-subscribeWithRequest:' method instead."); + +/// Enable presence observation on specified `channels`. +/// +/// Client will be able to observe for presence events which is pushed to remote data objects. +/// +/// #### Example: +/// ```objc +/// [self.client subscribeToPresenceChannels:@[@"swift"]]; +/// ``` +/// +/// - Parameter channels: List of channel names for which client should try to subscribe on presence observing channels. - (void)subscribeToPresenceChannels:(NSArray *)channels - NS_SWIFT_NAME(subscribeToPresenceChannels(_:)); + NS_SWIFT_NAME(subscribeToPresenceChannels(_:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-subscribeWithRequest:' method instead."); #pragma mark - Un-subscription -/** - * @brief Unsubscribe / leave from specified set of channels. - * - * @discussion Client will push \c leave presence event on specified \c channels. - * - * @code - * [self.client unsubscribeFromChannels:@[@"objc"] withPresence:YES]; - * @endcode - * - * @param channels List of channel names from which client should try to unsubscribe. - * @param shouldObservePresence Whether client should disable presence observation on specified - * channels or keep listening for presence event on them. - * - * @since 4.0 - */ -- (void)unsubscribeFromChannels:(NSArray *)channels - withPresence:(BOOL)shouldObservePresence - NS_SWIFT_NAME(unsubscribeFromChannels(_:withPresence:)); - -/** - * @brief Unsubscribe / leave from specified set of channel groups. - * - * @discussion Client will push \c leave presence event on specified \c groups and all channels - * which is part of \c groups. - * - * @code - * [self.client unsubscribeFromChannelGroups:@[@"developers"] withPresence:YES]; - * @endcode - * - * @param groups List of channel group names from which client should try to unsubscribe. - * @param shouldObservePresence Whether client should disable presence observation on specified - * channel groups or keep listening for presence event on them. - * - * @since 4.0 - */ -- (void)unsubscribeFromChannelGroups:(NSArray *)groups - withPresence:(BOOL)shouldObservePresence - NS_SWIFT_NAME(unsubscribeFromChannelGroups(_:withPresence:)); - -/** - * @brief Disable presence events observation on specified channels. - * - * @code - * [self.client unsubscribeFromPresenceChannels:@[@"swifty"]]; - * @endcode - * - * @param channels List of channel names for which client should try to unsubscribe from presence - * observing channels. - * - * @since 4.0 - */ +/// Unsubscribe from specified resources. +/// +/// #### Examples: +/// ##### Unsubscribe from regular channels and groups: +/// ```objc +/// PNPresenceLeaveRequest *request = [PNPresenceLeaveRequest requestWithChannels:@[@"channel-a"] channelGroups:nil]; +/// [self.client unsubscribWithRequest:request]; +/// ``` +/// +/// ##### Unsubscribe from presence channels and groups: +/// ```objc +/// // This request will unsubscribe from presence events on `group-a-pnpres` group. +/// PNPresenceLeaveRequest *request = [PNPresenceLeaveRequest requestWithPresenceChannels:nil +/// channelGroups:@[@"group-a"]]; +/// request.observePresence = YES; +/// [self.client unsubscribeWithRequest:request]; +/// ``` +/// +/// - Parameter request: Request with information about resources from which client should stop receiving real-time +/// updates. +- (void)unsubscribeWithRequest:(PNPresenceLeaveRequest *)request + NS_SWIFT_NAME(unsubscribWithRequest(_:)); + +/// Unsubscribe / leave from specified set of channels. +/// +/// Client will push `leave` presence event on specified `channels`. +/// +/// #### Example: +/// ```objc +/// [self.client unsubscribeFromChannels:@[@"objc"] withPresence:YES]; +/// ``` +/// +/// - Parameters: +/// - channels: List of channel names from which client should try to unsubscribe. +/// - shouldObservePresence: Whether client should disable presence observation on specified channels or keep +/// listening for presence event on them. +- (void)unsubscribeFromChannels:(NSArray *)channels withPresence:(BOOL)shouldObservePresence + NS_SWIFT_NAME(unsubscribeFromChannels(_:withPresence:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-unsubscribWithRequest:' method instead."); + +/// Unsubscribe / leave from specified set of channel groups. +/// +/// Client will push `leave` presence event on specified `groups` and all channels which is part of `groups`. +/// +/// #### Example: +/// ```objc +/// [self.client unsubscribeFromChannelGroups:@[@"developers"] withPresence:YES]; +/// ``` +/// +/// - Parameters: +/// - groups: List of channel group names from which client should try to unsubscribe. +/// - shouldObservePresence: Whether client should disable presence observation on specified channel groups or keep +/// listening for presence event on them. +- (void)unsubscribeFromChannelGroups:(NSArray *)groups withPresence:(BOOL)shouldObservePresence + NS_SWIFT_NAME(unsubscribeFromChannelGroups(_:withPresence:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-unsubscribWithRequest:' method instead."); + +/// Disable presence events observation on specified channels. +/// +/// #### Example: +/// ```objc +/// [self.client unsubscribeFromPresenceChannels:@[@"swifty"]]; +/// ``` +/// +/// - Parameter channels: List of channel names for which client should try to unsubscribe from presence observing +/// channels. - (void)unsubscribeFromPresenceChannels:(NSArray *)channels - NS_SWIFT_NAME(unsubscribeFromPresenceChannels(_:)); - -/** - * @brief Unsubscribe from all channels and groups on which client has been subscribed so far. - * - * @discussion This API will remove all channels, presence channels and channel groups from - * subscribe cycle and as result will stop it. - * - * @code - * [self.client unsubscribeFromAll]; - * @endcode - * - * @since 4.2.0 - */ + NS_SWIFT_NAME(unsubscribeFromPresenceChannels(_:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-unsubscribWithRequest:' method instead."); + +/// Unsubscribe from all channels and groups on which client has been subscribed so far. +/// +/// This API will remove all channels, presence channels and channel groups from +/// subscribe cycle and as result will stop it. +/// +/// #### Example: +/// ```objc +/// [self.client unsubscribeFromAll]; +/// ``` - (void)unsubscribeFromAll; -/** - * @brief Unsubscribe from all channels and groups on which client has been subscribed so far. - * - * @code - * [self.client unsubscribeFromAllWithCompletion:^(PNAcknowledgmentStatus *status) { - * // Handle unsubscription process completion. - * }]; - * @endcode - * - * @param block Un-subscription completion block. - * - * @since 4.7.2 - */ -- (void)unsubscribeFromAllWithCompletion:(void(^__nullable)(PNStatus *status))block; +/// Unsubscribe from all channels and groups on which client has been subscribed so far. +/// +/// #### Example: +/// ```objc +/// [self.client unsubscribeFromAllWithCompletion:^(PNAcknowledgmentStatus *status) { +/// // Handle unsubscription process completion. +/// }]; +/// ``` +/// +/// - Parameter block: Un-subscription completion block. +- (void)unsubscribeFromAllWithCompletion:(nullable PNStatusBlock)block; #pragma mark - diff --git a/PubNub/Core/PubNub+Subscribe.m b/PubNub/Core/PubNub+Subscribe.m index b3313d10f..a8612b958 100644 --- a/PubNub/Core/PubNub+Subscribe.m +++ b/PubNub/Core/PubNub+Subscribe.m @@ -1,56 +1,50 @@ -/** - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ -#import "PubNub+Subscribe.h" -#import "PNAPICallBuilder+Private.h" +#import "PubNub+SubscribePrivate.h" +#import "PNBaseOperationData+Private.h" +#import "PNSubscribeRequest+Private.h" +#import "PNOperationResult+Private.h" +#import "PNSubscribeStatus+Private.h" +#import "PNConfiguration+Private.h" #import "PubNub+CorePrivate.h" +#import "PNStatus+Private.h" +#import "PNSubscribeData.h" #import "PNSubscriber.h" -#import "PNNetwork.h" #import "PNHelpers.h" -#pragma mark - Constants +// Deprecated +#import "PNAPICallBuilder+Private.h" + + +#pragma mark Constants -/** - * @brief Subscribe REST API path prefix. - * - * @discussion Prefix used for faster request identification (w/o performing search of range with - * options). - * - * @since 4.6.2 - */ +/// Subscribe REST API path prefix. +/// +/// Prefix used for faster request identification (w/o performing search of range with options). static NSString * const kPNSubscribeAPIPrefix = @"/v2/subscribe/"; NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark - Private interface declaration +/// **PubNub** `Subscribe` APIs private extension. @interface PubNub (SubscribeProtected) #pragma mark - Subscription -/** - * @brief Try subscribe on specified set of channels and/or groups. - * - * @discussion Using subscribe API client is able to subscribe of remote data objects live feed and - * listen for new events from them. - * - * @param channels List of channel names on which client should try to subscribe. - * @param groups List of channel group names on which client should try to subscribe. - * @param shouldObservePresence Whether presence observation should be enabled for \c channels and - * \c groups or not. - * @param timeToken Time from which client should try to catch up on messages. - * @param state \a NSDictionary with key-value pairs based on channel group name and value which - * should be assigned to it. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * - * @since 4.8.2 - */ +/// Try subscribe on specified set of channels and/or groups. +/// +/// Using subscribe API client is able to subscribe of remote data objects live feed and listen for new events from +/// them. +/// +/// - Parameters: +/// - channels:P List of channel names on which client should try to subscribe. +/// - groups: List of channel group names on which client should try to subscribe. +/// - shouldObservePresence: Whether presence observation should be enabled for `channels` and `groups` or not. +/// - timeToken: Time from which client should try to catch up on messages. +/// - state: `NSDictionary` with key-value pairs based on channel group name and value which should be assigned to it. +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. - (void)subscribeToChannels:(nullable NSArray *)channels groups:(nullable NSArray *)groups withPresence:(BOOL)shouldObservePresence @@ -58,51 +52,36 @@ - (void)subscribeToChannels:(nullable NSArray *)channels clientState:(nullable NSDictionary *)state queryParameters:(nullable NSDictionary *)queryParameters; -/** - * @brief Enable presence observation on specified \c channels. - * - * @discussion Using this API client will be able to observe for presence events which is pushed to - * remote data objects. - * - * @param channels List of channel names for which client should try to subscribe on presence - * observing channels. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * - * @since 4.8.2 - */ +/// Enable presence observation on specified `channels`. +/// +/// Using this API client will be able to observe for presence events which is pushed to remote data objects. +/// +/// - Parameters: +/// - channels: List of channel names for which client should try to subscribe on presence observing channels. +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. - (void)subscribeToPresenceChannels:(NSArray *)channels withQueryParameters:(nullable NSDictionary *)queryParameters; #pragma mark - Unsubscription -/** - * @brief Disable presence events observation on specified channels. - * - * @discussion This API allow to stop presence observation on specified set of channels. - * - * @param channels List of channel names for which client should try to unsubscribe from presence - * observing channels. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * - * @since 4.8.2 - */ +/// Disable presence events observation on specified channels. +/// +/// This API allow to stop presence observation on specified set of channels. +/// +/// - Parameters: +/// - channels: List of channel names for which client should try to unsubscribe from presence observing channels. +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. - (void)unsubscribeFromPresenceChannels:(NSArray *)channels withQueryParameters:(nullable NSDictionary *)queryParameters; -/** - * @brief Unsubscribe from all channels and groups on which client has been subscribed so far. - * - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block Un-subscription completion block. - * - * @since 4.8.2 - */ +/// Unsubscribe from all channels and groups on which client has been subscribed so far. +/// +/// - Parameters: +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. +/// - block: Un-subscription completion block. - (void)unsubscribeFromAllWithQueryParameters:(nullable NSDictionary *)queryParameters - completion:(void(^__nullable)(PNStatus *status))block; + completion:(void(^__nullable)(PNAcknowledgmentStatus *status))block; #pragma mark - @@ -120,22 +99,18 @@ @implementation PubNub (Subscribe) #pragma mark - Subscription state information - (NSArray *)channels { - return [self.subscriberManager channels]; } - (NSArray *)channelGroups { - return [self.subscriberManager channelGroups]; } - (NSArray *)presenceChannels { - return [self.subscriberManager presenceChannels]; } - (BOOL)isSubscribedOn:(NSString *)name { - return ([[self channels] containsObject:name] || [[self channelGroups] containsObject:name] || [[self presenceChannels] containsObject:name]); } @@ -144,14 +119,10 @@ - (BOOL)isSubscribedOn:(NSString *)name { #pragma mark - Listeners - (void)addListener:(id )listener { - - // Forwarding calls to listener manager. [self.listenersManager addListener:listener]; } - (void)removeListener:(id )listener { - - // Forwarding calls to listener manager. [self.listenersManager removeListener:listener]; } @@ -159,16 +130,14 @@ - (void)removeListener:(id )listener { #pragma mark - Filtering - (NSString *)filterExpression { - - return self.subscriberManager.filterExpression; + return self.configuration.filterExpression; } - (void)setFilterExpression:(NSString *)filterExpression { - - self.subscriberManager.filterExpression = filterExpression; + self.configuration.filterExpression = filterExpression; if ([self.subscriberManager allObjects].count) { - [self subscribeToChannels:@[] withPresence:NO]; + [self subscribeWithRequest:[PNSubscribeRequest requestWithChannels:@[] channelGroups:@[]]]; } } @@ -176,17 +145,14 @@ - (void)setFilterExpression:(NSString *)filterExpression { #pragma mark - API Builder support - (PNSubscribeAPIBuilder * (^)(void))subscribe { - PNSubscribeAPIBuilder *builder = nil; - builder = [PNSubscribeAPIBuilder builderWithExecutionBlock:^(NSArray *flags, - NSDictionary *parameters) { - + builder = [PNSubscribeAPIBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters) { + NSArray *presenceChannels = parameters[NSStringFromSelector(@selector(presenceChannels))]; NSDictionary *state = parameters[NSStringFromSelector(@selector(state))]; NSNumber *withPresence = parameters[NSStringFromSelector(@selector(withPresence))]; NSNumber *timetoken = parameters[NSStringFromSelector(@selector(withTimetoken))]; NSArray *channels = parameters[NSStringFromSelector(@selector(channels))]; NSArray *groups = parameters[NSStringFromSelector(@selector(channelGroups))]; - NSArray *presenceChannels = parameters[NSStringFromSelector(@selector(presenceChannels))]; NSDictionary *queryParam = parameters[@"queryParam"]; if (channels.count || groups.count) { @@ -207,11 +173,9 @@ - (void)setFilterExpression:(NSString *)filterExpression { } - (PNUnsubscribeAPICallBuilder * (^)(void))unsubscribe { - PNUnsubscribeAPICallBuilder *builder = nil; builder = [PNUnsubscribeAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters) { - NSNumber *withPresence = parameters[NSStringFromSelector(@selector(withPresence))]; NSArray *channels = parameters[NSStringFromSelector(@selector(channels))]; NSArray *groups = parameters[NSStringFromSelector(@selector(channelGroups))]; @@ -226,9 +190,7 @@ - (void)setFilterExpression:(NSString *)filterExpression { completion:nil]; } else if ((channels = presenceChannels).count) { [self unsubscribeFromPresenceChannels:channels withQueryParameters:queryParam]; - } else { - [self unsubscribeFromAllWithQueryParameters:queryParam completion:nil]; - } + } else [self unsubscribeFromAllWithQueryParameters:queryParam completion:nil]; }]; return ^PNUnsubscribeAPICallBuilder * { @@ -239,93 +201,84 @@ - (void)setFilterExpression:(NSString *)filterExpression { #pragma mark - Subscription -- (void)subscribeToChannels:(NSArray *)channels - withPresence:(BOOL)shouldObservePresence { - +- (void)subscribeWithRequest:(PNSubscribeRequest *)request { + [self cancelSubscribeOperations]; + [self.subscriberManager subscribeWithRequest:request]; +} + +- (void)subscribeWithRequest:(PNSubscribeRequest *)userRequest completion:(PNSubscriberCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNSubscribeStatus class]]; + userRequest.presenceHeartbeatValue = self.configuration.presenceHeartbeatValue; + userRequest.filterExpression = self.filterExpression; + + [userRequest setupWithClientConfiguration:self.configuration]; + PNSubscriberCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + + result.status.initialSubscription = [userRequest.timetoken isEqualToNumber:@0]; + + [self callBlock:block status:YES withResult:nil andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)subscribeToChannels:(NSArray *)channels withPresence:(BOOL)shouldObservePresence { [self subscribeToChannels:channels withPresence:shouldObservePresence usingTimeToken:nil]; } - (void)subscribeToChannels:(NSArray *)channels withPresence:(BOOL)shouldObservePresence usingTimeToken:(NSNumber *)timeToken { - - [self subscribeToChannels:channels - withPresence:shouldObservePresence - usingTimeToken:timeToken - clientState:nil]; + [self subscribeToChannels:channels withPresence:shouldObservePresence usingTimeToken:timeToken clientState:nil]; } - (void)subscribeToChannels:(NSArray *)channels withPresence:(BOOL)shouldObservePresence clientState:(NSDictionary *)state { - - [self subscribeToChannels:channels - withPresence:shouldObservePresence - usingTimeToken:nil - clientState:state]; + [self subscribeToChannels:channels withPresence:shouldObservePresence usingTimeToken:nil clientState:state]; } - (void)subscribeToChannels:(NSArray *)channels withPresence:(BOOL)shouldObservePresence usingTimeToken:(NSNumber *)timeToken clientState:(NSDictionary *)state { - [self subscribeToChannels:channels groups:nil withPresence:shouldObservePresence usingTimeToken:timeToken - clientState:state]; + clientState:state + queryParameters:nil]; } -- (void)subscribeToChannelGroups:(NSArray *)groups - withPresence:(BOOL)shouldObservePresence { - - [self subscribeToChannelGroups:groups - withPresence:shouldObservePresence - usingTimeToken:nil]; +- (void)subscribeToChannelGroups:(NSArray *)groups withPresence:(BOOL)shouldObservePresence { + [self subscribeToChannelGroups:groups withPresence:shouldObservePresence usingTimeToken:nil]; } - (void)subscribeToChannelGroups:(NSArray *)groups withPresence:(BOOL)shouldObservePresence usingTimeToken:(NSNumber *)timeToken { - - [self subscribeToChannelGroups:groups - withPresence:shouldObservePresence - usingTimeToken:timeToken - clientState:nil]; + [self subscribeToChannelGroups:groups withPresence:shouldObservePresence usingTimeToken:timeToken clientState:nil]; } - (void)subscribeToChannelGroups:(NSArray *)groups withPresence:(BOOL)shouldObservePresence clientState:(NSDictionary *)state { - - [self subscribeToChannelGroups:groups - withPresence:shouldObservePresence - usingTimeToken:nil - clientState:state]; + [self subscribeToChannelGroups:groups withPresence:shouldObservePresence usingTimeToken:nil clientState:state]; } - (void)subscribeToChannelGroups:(NSArray *)groups withPresence:(BOOL)shouldObservePresence usingTimeToken:(NSNumber *)timeToken clientState:(NSDictionary *)state { - [self subscribeToChannels:nil groups:groups withPresence:shouldObservePresence - usingTimeToken:timeToken - clientState:state]; -} - -- (void)subscribeToChannels:(NSArray *)channels - groups:(NSArray *)groups - withPresence:(BOOL)shouldObservePresence - usingTimeToken:(NSNumber *)timeToken - clientState:(NSDictionary *)state { - - [self subscribeToChannels:channels - groups:groups - withPresence:shouldObservePresence usingTimeToken:timeToken clientState:state queryParameters:nil]; @@ -337,79 +290,70 @@ - (void)subscribeToChannels:(NSArray *)channels usingTimeToken:(NSNumber *)timeToken clientState:(NSDictionary *)state queryParameters:(NSDictionary *)queryParameters { - - channels = (channels ?: @[]); - groups = (groups ?: @[]); - - if (channels.count) { - NSArray *presenceList = nil; - - if (shouldObservePresence) { - presenceList = [PNChannel presenceChannelsFrom:channels]; - - } - - NSArray *channelsForAddition = [channels arrayByAddingObjectsFromArray:presenceList]; - [self.subscriberManager addChannels:channelsForAddition]; - } - - if (groups.count) { - NSArray *presenceList = nil; - - if (shouldObservePresence) { - presenceList = [PNChannel presenceChannelsFrom:groups]; - } - - NSArray *groupsForAddition = [groups arrayByAddingObjectsFromArray:presenceList]; - [self.subscriberManager addChannelGroups:groupsForAddition]; - } - - [self cancelSubscribeOperations]; - [self.subscriberManager subscribeUsingTimeToken:timeToken - withState:state - queryParameters:queryParameters - completion:nil]; + PNSubscribeRequest *request = [PNSubscribeRequest requestWithChannels:channels ?: @[] channelGroups:groups ?: @[]]; + request.arbitraryQueryParameters = queryParameters; + request.observePresence = shouldObservePresence; + request.timetoken = timeToken; + request.state = state; + + [self subscribeWithRequest:request]; } - (void)subscribeToPresenceChannels:(NSArray *)channels { - [self subscribeToPresenceChannels:channels withQueryParameters:nil]; } -- (void)subscribeToPresenceChannels:(NSArray *)channels - withQueryParameters:(NSDictionary *)queryParameters { - - channels = [PNChannel presenceChannelsFrom:channels]; +- (void)subscribeToPresenceChannels:(NSArray *)channels withQueryParameters:(NSDictionary *)query { + PNSubscribeRequest *request = [PNSubscribeRequest requestWithPresenceChannels:channels channelGroups:nil]; + request.arbitraryQueryParameters = query; - [self.subscriberManager addPresenceChannels:channels]; - [self cancelSubscribeOperations]; - [self.subscriberManager subscribeUsingTimeToken:nil - withState:nil - queryParameters:queryParameters - completion:nil]; + [self subscribeWithRequest:request]; } #pragma mark - Unsubscription -- (void)unsubscribeFromChannels:(NSArray *)channels - withPresence:(BOOL)shouldObservePresence { - - [self unsubscribeFromChannels:channels - groups:nil - withPresence:shouldObservePresence - queryParameters:nil - completion:nil]; +- (void)unsubscribeWithRequest:(PNPresenceLeaveRequest *)request { + if (request.channels.count == 0 && request.channelGroups.count == 0) return; + + [self cancelSubscribeOperations]; + [self.subscriberManager unsubscribeWithRequest:request completion:nil]; +} + +- (void)unsubscribeWithRequest:(PNPresenceLeaveRequest *)userRequest + completion:(PNSubscriberCompletionBlock)handleBlock { + PNOperationDataParser *responseParser = [self parserWithStatus:[PNAcknowledgmentStatus class]]; + PNSubscriberCompletionBlock block = [handleBlock copy]; + PNParsedRequestCompletionBlock handler; + + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); + PNSubscribeStatus *subscribeStatus; + + if (!result.status.isError) { + subscribeStatus = [PNSubscribeStatus objectWithOperation:userRequest.operation + response:result.status.responseData]; + } else { + subscribeStatus = [PNSubscribeStatus objectWithOperation:userRequest.operation + category:result.status.category + response:result.status.responseData]; + } + + [self updateResult:subscribeStatus withRequest:request response:response]; + [self callBlock:block status:YES withResult:nil andStatus:subscribeStatus]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; } -- (void)unsubscribeFromChannelGroups:(NSArray *)groups - withPresence:(BOOL)shouldObservePresence { +- (void)unsubscribeFromChannels:(NSArray *)channels withPresence:(BOOL)presence { + [self unsubscribeFromChannels:channels groups:nil withPresence:presence queryParameters:nil completion:nil]; +} - [self unsubscribeFromChannels:nil - groups:groups - withPresence:shouldObservePresence - queryParameters:nil - completion:nil]; +- (void)unsubscribeFromChannelGroups:(NSArray *)groups withPresence:(BOOL)presence { + [self unsubscribeFromChannels:nil groups:groups withPresence:presence queryParameters:nil completion:nil]; } - (void)unsubscribeFromChannels:(NSArray *)channels @@ -417,79 +361,41 @@ - (void)unsubscribeFromChannels:(NSArray *)channels withPresence:(BOOL)shouldObservePresence queryParameters:(NSDictionary *)queryParameters completion:(PNSubscriberCompletionBlock)block { - - channels = (channels ?: @[]); - groups = (groups ?: @[]); - - if (channels.count) { - NSArray *presenceList = nil; - - if (shouldObservePresence) { - presenceList = [PNChannel presenceChannelsFrom:channels]; - } + PNPresenceLeaveRequest *request = [PNPresenceLeaveRequest requestWithChannels:channels ?: @[] + channelGroups:groups ?: @[]]; + request.arbitraryQueryParameters = queryParameters; + request.observePresence = shouldObservePresence; - NSArray *channelsForRemoval = [channels arrayByAddingObjectsFromArray:presenceList]; - [self.subscriberManager removeChannels:channelsForRemoval]; - } - - if (groups.count) { - NSArray *presenceList = nil; - - if (shouldObservePresence) { - presenceList = [PNChannel presenceChannelsFrom:groups]; - } - - NSArray *groupsForRemoval = [groups arrayByAddingObjectsFromArray:presenceList]; - [self.subscriberManager removeChannelGroups:groupsForRemoval]; - } - - if (channels.count || groups.count) { + if (request.channels.count || request.channelGroups.count) { [self cancelSubscribeOperations]; - [self.subscriberManager unsubscribeFromChannels:channels - groups:groups - withQueryParameters:queryParameters - listenersNotification:YES - completion:block]; + [self.subscriberManager unsubscribeWithRequest:request completion:block]; } else if (block) { pn_dispatch_async(self.callbackQueue, ^{ block(nil); }); - } } - (void)unsubscribeFromPresenceChannels:(NSArray *)channels { - [self unsubscribeFromPresenceChannels:channels withQueryParameters:nil]; } -- (void)unsubscribeFromPresenceChannels:(NSArray *)channels - withQueryParameters:(NSDictionary *)queryParameters { - - channels = [PNChannel presenceChannelsFrom:channels]; - - [self.subscriberManager removePresenceChannels:channels]; - [self cancelSubscribeOperations]; - [self.subscriberManager unsubscribeFromChannels:channels - groups:nil - withQueryParameters:queryParameters - listenersNotification:YES - completion:nil]; +- (void)unsubscribeFromPresenceChannels:(NSArray *)channels withQueryParameters:(NSDictionary *)query { + PNPresenceLeaveRequest *request = [PNPresenceLeaveRequest requestWithPresenceChannels:channels channelGroups:nil]; + request.arbitraryQueryParameters = query; + + [self unsubscribeWithRequest:request]; } - (void)unsubscribeFromAll { - [self unsubscribeFromAllWithCompletion:nil]; } -- (void)unsubscribeFromAllWithCompletion:(void(^)(PNStatus *status))block { - +- (void)unsubscribeFromAllWithCompletion:(PNStatusBlock)block { [self unsubscribeFromAllWithQueryParameters:nil completion:block]; } -- (void)unsubscribeFromAllWithQueryParameters:(NSDictionary *)queryParameters - completion:(void(^)(PNStatus *status))block { - +- (void)unsubscribeFromAllWithQueryParameters:(NSDictionary *)queryParameters completion:(PNStatusBlock)block { [self cancelSubscribeOperations]; [self.subscriberManager unsubscribeFromAllWithQueryParameters:queryParameters completion:block]; } @@ -498,8 +404,11 @@ - (void)unsubscribeFromAllWithQueryParameters:(NSDictionary *)queryParameters #pragma mark - Misc - (void)cancelSubscribeOperations { - - [self.subscriptionNetwork cancelAllOperationsWithURLPrefix:kPNSubscribeAPIPrefix]; + [self.subscriptionNetwork requestsWithBlock:^(NSArray *requests) { + for(PNTransportRequest *request in requests) { + if ([request.path hasPrefix:kPNSubscribeAPIPrefix]) request.cancel(); + } + }]; } #pragma mark - diff --git a/PubNub/Core/PubNub+SubscribePrivate.h b/PubNub/Core/PubNub+SubscribePrivate.h index b956ebdd3..b1f23ef54 100644 --- a/PubNub/Core/PubNub+SubscribePrivate.h +++ b/PubNub/Core/PubNub+SubscribePrivate.h @@ -1,8 +1,3 @@ -/** - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ #import "PubNub+Subscribe.h" #import "PNSubscriber.h" @@ -11,52 +6,80 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Private interface declaration +/// **PubNub** `Subscribe` APIs private extension. @interface PubNub (SubscribePrivate) #pragma mark - Subscription -/** - * @brief Try subscribe on specified set of channels and/or groups. - * - * @discussion Client is able to subscribe of remote data objects live feed and listen for new - * events from them. - * - * @param channels List of channel names on which client should try to subscribe. - * @param groups List of channel group names on which client should try to subscribe. - * @param shouldObservePresence Whether presence observation should be enabled for \c channels and - * \c groups or not. - * @param timeToken Time from which client should try to catch up on messages. - * @param state \a NSDictionary with key-value pairs based on channel group name and value which - * should be assigned to it. - * - * @since 4.5.6 - */ -- (void)subscribeToChannels:(nullable NSArray *)channels - groups:(nullable NSArray *)groups - withPresence:(BOOL)shouldObservePresence - usingTimeToken:(nullable NSNumber *)timeToken - clientState:(nullable NSDictionary *)state; +/// Subscribe to specified resources. +/// +/// > Important: Method used by ``PNSubscriber`` manager to make actual network calls. +/// +/// #### Examples: +/// ##### Subscribe on regular channels and groups: +/// ```objc +/// PNSubscribeRequest *request = [PNSubscribeRequest requestWithChannels:@[@"channel-a"] channelGroups:nil]; +/// request.timetoken = @(1234567890); +/// [self.client subscribeWithRequest:request completion:^(PNSubscribeStatus *status) { +/// if (!status.isError) { +/// // Handle successful subscription completion. +/// } else { +/// // Handle subscription error. Check 'category' property to find out possible issue because of which request +/// // did fail. +/// +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information about resources from which client will receive real-time updates. +/// - block: Subscribe request completion block +- (void)subscribeWithRequest:(PNSubscribeRequest *)request completion:(nullable PNSubscriberCompletionBlock)block; #pragma mark - Un-subscription -/** - * @brief Unsubscribe / leave from specified set of channels / groups. - * - * @discussion Using this API client will push leave presence event on specified \c channels - * and/or \c groups. If it will be required it will re-subscribe on rest of the channels. - * - * @param channels List of channel names from which client should try to unsubscribe. - * @param groups List of channel group names from which client should try to unsubscribe. - * @param shouldObservePresence Whether client should disable presence observation on specified - * channel groups or keep listening for presence event on them. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block Subscription completion block. - * - * @since 4.8.2 - */ +/// Unsubscribe from specified resources. +/// +/// > Important: Method used by ``PNSubscriber`` manager to make actual network calls. +/// +/// #### Examples: +/// ##### Unsubscribe from regular channels and groups: +/// ```objc +/// PNPresenceLeaveRequest *request = [PNPresenceLeaveRequest requestWithChannels:@[@"channel-a"] channelGroups:nil]; +/// request.observePresence = YES; +/// +/// [self.client unsubscribeWithRequest:request]; +/// ``` +/// +/// ##### Unsubscribe from presence channels and groups: +/// ```objc +/// // This request will unsubscribe from presence events on `group-a-pnpres` group. +/// PNPresenceLeaveRequest *request = [PNPresenceLeaveRequest requestWithPresenceChannels:nil +/// channelGroups:@[@"group-a"]]; +/// [self.client unsubscribeWithRequest:request completion:^(PNSubscriberCompletionBlock *status) { +/// // Handle leave completion. +/// }]; +/// ``` +/// +/// - Parameters +/// - request: Request with information about resources from which client should stop receiving real-time updates. +/// - block: Unsubscribe request completion block +- (void)unsubscribeWithRequest:(PNPresenceLeaveRequest *)request completion:(PNSubscriberCompletionBlock)block; + +/// Unsubscribe / leave from specified set of channels / groups. +/// +/// Using this API client will push leave presence event on specified `channels` and / or `groups`. If it will be +/// required it will re-subscribe on rest of the channels. +/// +/// - Parameters: +/// - channels: List of channel names from which client should try to unsubscribe. +/// - groups: List of channel group names from which client should try to unsubscribe. +/// - shouldObservePresence: Whether client should disable presence observation on specified channel groups or keep +/// listening for presence event on them. +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. +/// - block: Subscription completion block. - (void)unsubscribeFromChannels:(nullable NSArray *)channels groups:(nullable NSArray *)groups withPresence:(BOOL)shouldObservePresence @@ -66,11 +89,7 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Misc -/** - @brief Cancel any active long-polling subscribe operations scheduled for processing. - - @since 4.6.2 - */ +/// Cancel any active long-polling subscribe operations scheduled for processing. - (void)cancelSubscribeOperations; #pragma mark - diff --git a/PubNub/Core/PubNub+Time.h b/PubNub/Core/PubNub+Time.h index f97acb622..4ae54e753 100644 --- a/PubNub/Core/PubNub+Time.h +++ b/PubNub/Core/PubNub+Time.h @@ -1,62 +1,73 @@ -#import -#import #import +// Request +#import -#pragma mark Class forward +// Response +#import -@class PNErrorStatus, PNTimeResult; +// Deprecated +#import NS_ASSUME_NONNULL_BEGIN -#pragma mark - API group interface +#pragma mark Interface declaration -/** - * @brief \b PubNub client core class extension to provide access to 'time' API group. - * - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ +/// **PubNub** `Time` API. @interface PubNub (Time) -#pragma mark - API builder support +#pragma mark - Time token API builder interdace (deprecated) -/** - * @brief Time API access builder. - * - * @return API call configuration builder. - * - * @since 4.5.4 - */ -@property (nonatomic, readonly, strong) PNTimeAPICallBuilder * (^time)(void); +/// Time API access builder. +@property (nonatomic, readonly, strong) PNTimeAPICallBuilder * (^time)(void) + DEPRECATED_MSG_ATTRIBUTE("Builder-based interface deprecated. Please use corresponding request-based interfaces."); #pragma mark - Time token request -/** - * @brief Request current time from \b PubNub service servers. - * - * @code - * [self.client timeWithCompletion:^(PNTimeResult *result, PNErrorStatus *status) { - * if (!status.isError) { - * // Handle downloaded server time token using: result.data.timetoken - * } else { - * // Handle time token download error. Check 'category' property to find out possible - * // issue because of which request did fail. - * // - * // Request can be resent using: [status retry]; - * } - * }]; - * @endcode - * - * @param block Time request completion block. - * - * @since 4.0 - */ -- (void)timeWithCompletion:(PNTimeCompletionBlock)block NS_SWIFT_NAME(timeWithCompletion(_:)); +/// Fetch high-precision PubNub timetoken. +/// +/// #### Example: +/// ```objc +/// [self.client timeWithRequest:[PNTimeRequest new] completion:^(PNTimeResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded server time token using: `result.data.timetoken`. +/// } else { +/// // Handle time token fetch error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// } +/// }]; +/// ``` +/// +/// - Parameters: +/// - request: Request with information required to fetch timetoken. +/// - block: Timetoken fetch request completion block. +- (void)timeWithRequest:(PNTimeRequest *)request completion:(PNTimeCompletionBlock)block + NS_SWIFT_NAME(timeWithRequest(_:completion:)); + +/// Request current time from **PubNub** service servers. +/// +/// #### Example: +/// ```objc +/// [self.client timeWithCompletion:^(PNTimeResult *result, PNErrorStatus *status) { +/// if (!status.isError) { +/// // Handle downloaded server time token using: `result.data.timetoken`. +/// } else { +/// // Handle time token download error. Check `category` property to find out possible issue because of which +/// // request did fail. +/// // +/// // Request can be resent using: `[status retry];`. +/// } +/// }]; +/// ``` +/// +/// - Parameter block: Time request completion block. +- (void)timeWithCompletion:(PNTimeCompletionBlock)block + NS_SWIFT_NAME(timeWithCompletion(_:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated since and will be removed with next major update. Please use " + "'-timeWithRequest:completion:' method instead."); #pragma mark - diff --git a/PubNub/Core/PubNub+Time.m b/PubNub/Core/PubNub+Time.m index 90f542b76..743675917 100644 --- a/PubNub/Core/PubNub+Time.m +++ b/PubNub/Core/PubNub+Time.m @@ -1,60 +1,26 @@ -/** - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ #import "PubNub+Time.h" -#import "PNAPICallBuilder+Private.h" -#import "PNRequestParameters.h" #import "PubNub+CorePrivate.h" #import "PNStatus+Private.h" -#import "PNLogMacro.h" -#import "PNStatus.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interface declaration - -@interface PubNub (SubscribeProtected) - - -#pragma mark - Time token request - -/** - * @brief Request current time from \b PubNub service servers. - * - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block Time request process results handling block. - * - * @since 4.8.2 - */ -- (void)timeWithQueryParameters:(nullable NSDictionary *)queryParameters - completion:(PNTimeCompletionBlock)block; - -#pragma mark - - - -@end -NS_ASSUME_NONNULL_END +// Deprecated +#import "PNAPICallBuilder+Private.h" -#pragma mark - Interface implementation +#pragma mark Interface implementation +/// **PubNub** `Time` API private extension. @implementation PubNub (Time) -#pragma mark - API Builder support +#pragma mark - Time token API builder interdace (deprecated) - (PNTimeAPICallBuilder * (^)(void))time { - PNTimeAPICallBuilder *builder = nil; - builder = [PNTimeAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, - NSDictionary *parameters) { - - [self timeWithQueryParameters:parameters[@"queryParam"] completion:parameters[@"block"]]; + builder = [PNTimeAPICallBuilder builderWithExecutionBlock:^(NSArray *flags, NSDictionary *parameters) { + PNTimeRequest *request = [PNTimeRequest new]; + request.arbitraryQueryParameters = parameters[@"queryParam"]; + + [self timeWithRequest:request completion:parameters[@"block"]]; }]; return ^PNTimeAPICallBuilder * { @@ -65,33 +31,35 @@ @implementation PubNub (Time) #pragma mark - Time token request -- (void)timeWithCompletion:(PNTimeCompletionBlock)block { - - [self timeWithQueryParameters:nil completion:block]; -} - -- (void)timeWithQueryParameters:(NSDictionary *)queryParameters - completion:(PNTimeCompletionBlock)block { +- (void)timeWithRequest:(PNTimeRequest *)userRequest completion:(PNTimeCompletionBlock)handlerBlock { + PNOperationDataParser *responseParser = [self parserWithResult:[PNTimeResult class] status:[PNErrorStatus class]]; + PNTimeCompletionBlock block = [handlerBlock copy]; + PNParsedRequestCompletionBlock handler; PNLogAPICall(self.logger, @" Time token request."); - PNRequestParameters *parameters = [PNRequestParameters new]; + PNWeakify(self); + handler = ^(PNTransportRequest *request, id response, __unused NSURL *location, + PNOperationDataParseResult *result) { + PNStrongify(self); - [parameters addQueryParameters:queryParameters]; - - __weak __typeof(self) weakSelf = self; - [self processOperation:PNTimeOperation - withParameters:[PNRequestParameters new] - completionBlock:^(PNOperationResult *result, PNStatus *status) { - - if (status.isError) { - status.retryBlock = ^{ - [weakSelf timeWithQueryParameters:queryParameters completion:block]; + if (result.status.isError) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + result.status.retryBlock = ^{ + [self timeWithRequest:userRequest completion:block]; }; +#pragma clang diagnostic pop } - [weakSelf callBlock:block status:NO withResult:result andStatus:status]; - }]; + [self callBlock:block status:NO withResult:result.result andStatus:result.status]; + }; + + [self performRequest:userRequest withParser:responseParser completion:handler]; +} + +- (void)timeWithCompletion:(PNTimeCompletionBlock)block { + [self timeWithRequest:[PNTimeRequest new] completion:block]; } #pragma mark - diff --git a/PubNub/Data/Builders/API Call/Presence/PNPresenceChannelHereNowAPICallBuilder.h b/PubNub/Data/Builders/API Call/Presence/PNPresenceChannelHereNowAPICallBuilder.h index 7a63aee7a..786c4a57d 100644 --- a/PubNub/Data/Builders/API Call/Presence/PNPresenceChannelHereNowAPICallBuilder.h +++ b/PubNub/Data/Builders/API Call/Presence/PNPresenceChannelHereNowAPICallBuilder.h @@ -43,7 +43,7 @@ NS_ASSUME_NONNULL_BEGIN #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wincompatible-pointer-types" #pragma clang diagnostic ignored "-Wincompatible-property-type" -@property (nonatomic, readonly, strong) void(^performWithCompletion)(PNHereNowCompletionBlock block); +@property (nonatomic, readonly, strong) void(^performWithCompletion)(PNChannelHereNowCompletionBlock block); #pragma clang diagnostic pop diff --git a/PubNub/Data/Builders/API Call/Presence/PNPresenceChannelHereNowAPICallBuilder.m b/PubNub/Data/Builders/API Call/Presence/PNPresenceChannelHereNowAPICallBuilder.m index 58b3fa0af..8813e0798 100644 --- a/PubNub/Data/Builders/API Call/Presence/PNPresenceChannelHereNowAPICallBuilder.m +++ b/PubNub/Data/Builders/API Call/Presence/PNPresenceChannelHereNowAPICallBuilder.m @@ -30,9 +30,9 @@ @implementation PNPresenceChannelHereNowAPICallBuilder #pragma mark - Execution -- (void(^)(PNHereNowCompletionBlock block))performWithCompletion { - - return ^(PNHereNowCompletionBlock block) { +- (void(^)(PNChannelHereNowCompletionBlock block))performWithCompletion { + + return ^(PNChannelHereNowCompletionBlock block) { [super performWithBlock:block]; }; } diff --git a/PubNub/Data/Managers/PNFilesManager.h b/PubNub/Data/Managers/PNFilesManager.h index 1da9bba07..412bda8b8 100644 --- a/PubNub/Data/Managers/PNFilesManager.h +++ b/PubNub/Data/Managers/PNFilesManager.h @@ -1,21 +1,15 @@ #import - - -#pragma mark Class forward - -@class PNAcknowledgmentStatus, PubNub; -@protocol PNCryptoProvider; +#import +#import NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/// Files / data upload / download manager. +/// Files manager. /// /// Manager able to upload / download regular data or make encryption / decryption if required. -/// - Since: 4.15.0 -/// - Copyright: 2010-2023 PubNub, Inc. @interface PNFilesManager : NSObject @@ -28,44 +22,19 @@ NS_ASSUME_NONNULL_BEGIN + (instancetype)filesManagerForClient:(PubNub *)client; -#pragma mark - Upload data - -/// Upload user-provided data. -/// -/// - Parameters: -/// - request: Request instance with configured URL and user-provided HTTP body stream. -/// - formData: List of fields which should be sent as `multipart/form-data` fields. -/// - filename: Name with which uploaded file should be stored. -/// - dataSize: Actual size of uploaded data (passes by user only for stream-based uploads). -/// - cryptoModule: Crypto module which should be used to _encrypt_ data before upload. -/// - block: Data upload completion block. -- (void)uploadWithRequest:(NSURLRequest *)request - formData:(nullable NSArray *)formData - filename:(NSString *)filename - dataSize:(NSUInteger)dataSize - withCryptoModule:(nullable id)cryptoModule - completion:(void(^)(NSError * _Nullable error))block; - - #pragma mark - Download data -/// Download file from specified URL. +/// Handle downloaded file from specified URL. /// /// - Parameters: -/// - remoteURL: Remote file URL which should be used during download. -/// - localURL: Location on local file system where file should be stored. +/// - url: Location on the local file system where file has been temporarily stored. +/// - localURL: Location on the local file system where file should be stored. /// - cryptoModule: Crypto module which should be used to _decrypt_ downloaded file. -/// - block Data download completion block. -- (void)downloadFileAtURL:(NSURL *)remoteURL - toURL:(NSURL *)localURL - withCryptoModule:(nullable id)cryptoModule - completion:(void(^)(NSURLRequest *request, NSURL * _Nullable location, NSError * _Nullable error))block; - - -#pragma mark - Helpers - -/// Invalidate and reclaim all resources allocated by files manager. -- (void)invalidate; +/// - block Downloaded data processing completion block. +- (void)handleDownloadedFileAtURL:(nullable NSURL *)url + withStoreURL:(nullable NSURL *)localURL + cryptoModule:(nullable id)cryptoModule + completion:(void(^)( NSURL * _Nullable location, NSError * _Nullable error))block; #pragma mark - diff --git a/PubNub/Data/Managers/PNFilesManager.m b/PubNub/Data/Managers/PNFilesManager.m index 98bd15688..ccde44421 100644 --- a/PubNub/Data/Managers/PNFilesManager.m +++ b/PubNub/Data/Managers/PNFilesManager.m @@ -1,47 +1,19 @@ -#import "PNAcknowledgmentStatus.h" -#import "NSInputStream+PNCrypto.h" -#import "PNSequenceInputStream.h" -#import "PNCryptorInputStream.h" +#import "PNFilesManager.h" #import "NSInputStream+PNURL.h" #import "PubNub+CorePrivate.h" -#import "PNConfiguration.h" -#import "PNFilesManager.h" -#import "PNCryptoModule.h" -#import "PNErrorParser.h" -#import "PNErrorCodes.h" -#import "PubNub+Core.h" -#import "PNXMLParser.h" -#import "PNAES+Private.h" - -#if !TARGET_OS_OSX -#import -#endif // !TARGET_OS_OSX - - -#pragma mark Constants - -/// How many simultaneous connections can be opened to single host. -static NSUInteger const kPNFilesManagerSessionMaximumConnections = 2; +#import "PNFunctions.h" +#import "PNError.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark - Protected interface declaration +#pragma mark Protected interface declaration /// Files manager private extension. -@interface PNFilesManager () - - -#pragma mark - Information +@interface PNFilesManager () -/// Queue which should be used by session to call callbacks and completion blocks on `PNFilesManager` instance. -@property (nonatomic, strong) NSOperationQueue *delegateQueue; -/// Session which is used to send network requests. -@property (nonatomic, strong, nullable) NSURLSession *session; - -/// Maximum simultaneous requests. -@property (nonatomic, assign) NSInteger maximumConnections; +#pragma mark - Properties /// Crypto module for data processing. /// @@ -59,104 +31,13 @@ @interface PNFilesManager () - (instancetype)initWithClient:(PubNub *)client; -#pragma mark - Session constructor - -/// Complete `NSURLSession` instantiation and configuration. -/// -/// - Parameter maximumConnections: Maximum simultaneously connections (requests) which can be opened. -- (void)prepareSessionWithMaximumConnections:(NSInteger)maximumConnections; - -/// Create base `NSURLSession` configuration. -/// -/// - Parameter maximumConnections: Maximum simultaneously connections (requests) which can be opened. -/// - Returns: Initialized `NSURLSession` configuration instance. -- (NSURLSessionConfiguration *)configurationWithMaximumConnections:(NSInteger)maximumConnections; - -/// Create queue on which session will call delegate callbacks and completion blocks. -/// -/// - Parameter configuration: Session configuration which should be used to complete queue configuration. -/// - Returns: Initialized operation queue instance. -- (NSOperationQueue *)operationQueueWithConfiguration:(NSURLSessionConfiguration *)configuration; - -/// Create `NSURLSession` manager used to communicate with **PubNub** network. -/// -/// - Parameter configuration: Complete configuration which should be applied to `NSURL` session. -/// - Returns: Initialized `NSURLSession` manager instance. -- (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration; - - #pragma mark - Helpers -/// Create data upload error using information received from the service. -/// -/// - Parameters: -/// - task: Task which has been used to upload data. -/// - response: Service's HTTP response on data upload request. -/// - data: Service's response body. -/// - error: Upload request processing error. -/// - Returns: `Error` object with detailed information about file upload error. -- (NSError *)uploadErrorForTask:(nullable NSURLSessionDataTask *)task - httpResponse:(nullable NSHTTPURLResponse *)response - responseData:(nullable NSData *)data - error:(nullable NSError *)error; - /// Create data download error using information received from the service. /// -/// - Parameters: -/// - task: Task which has been used to download data. -/// - response: Service's HTTP response on data download request. -/// - location: Location where requested data has been downloaded (can be error JSON / XML file). -/// - error: Download request processing error. +/// - Parameter error: Download request processing error. /// - Returns: `Error` object with detailed information about file download error. -- (NSError *)downloadErrorForTask:(nullable NSURLSessionDownloadTask *)task - httpResponse:(nullable NSHTTPURLResponse *)response - fileLocation:(nullable NSURL *)location - error:(nullable NSError *)error; - -/// Create input stream with `multipart/form-data` stream-based data. -/// -/// - Parameters: -/// - boundary: Boundary which should be used to separate `multipart/form-data` fields in POST body. -/// - stream: Input stream with data which should be uploaded. -/// - filename: Name which should be used to store uploaded data. -/// - cryptoModule: Crypto module for data _encryption_. -/// - fields: List of multipart/form-data fields which should be processed. -/// - streamsTotalSize: Pointer which is used to store overall input streams size. -/// - Returns: Initialized input stream with `multipart/form-data` stream-based data. -- (nullable NSInputStream *)multipartFormDataStreamWithBoundary:(NSString *)boundary - dataInputStream:(NSInputStream *)stream - filename:(NSString *)filename - cryptoModule:(nullable id)cryptoModule - fromFields:(NSArray *)fields - streamsSize:(NSUInteger *)streamsTotalSize; - -/// Prepare provided multipart/form-data fields to be sent with request POST body. -/// -/// - Parameters: -/// - boundary: Separator for key/value pairs. -/// - fields: List of multipart/form-data fields which should be processed. -/// - Returns: Data object which can be sent with request post body or \c nil in case if there is no `fields` provided. -- (nullable NSData *)multipartFormDataWithBoundary:(NSString *)boundary fromFields:(NSArray *)fields; - -/// Prepare multipart/form-data file data to be sent with request POST body. -/// -/// - Parameters: -/// - filename: Name under which uploaded data should be stored. -/// - boundary: Separator for key/value pairs. -/// - Returns: Data object which can be sent with request post body. -- (NSData *)multipartFormFile:(NSString *)filename dataWithBoundary:(NSString *)boundary; - -/// Multipart form data end data. -/// -/// - Parameter boundary: Separator for key/value pairs. -/// - Returns: Data object which should be send at the end of multipart/form-data HTTP body stream. -- (NSData *)multipartFormEndDataWithBoundary:(NSString *)boundary; - -/// Identify file MIME type using file extension. -/// -/// - Parameter filename: Name from which extension should be examined. -/// - Returns: Actual file MIME type or `application/octet-stream` if type can't be identified. -- (NSString *)mimeTypeFromFilename:(NSString *)filename; +- (NSError *)downloadErrorForError:(nullable NSError *)error; #pragma mark - @@ -178,442 +59,78 @@ + (instancetype)filesManagerForClient:(PubNub *)client { } - (instancetype)initWithClient:(PubNub *)client { - if ((self = [super init])) { - _cryptoModule = client.configuration.cryptoModule; - [self prepareSessionWithMaximumConnections:kPNFilesManagerSessionMaximumConnections]; - } - + if ((self = [super init])) _cryptoModule = client.configuration.cryptoModule; return self; } -#pragma mark - Upload data - -- (void)uploadWithRequest:(NSURLRequest *)request - formData:(NSArray *)formData - filename:(NSString *)filename - dataSize:(NSUInteger)dataSize - withCryptoModule:(nullable id)cryptoModule - completion:(void(^)(NSError *error))block { - NSInputStream *httpBodyInputStream = request.HTTPBodyStream; - NSMutableURLRequest *uploadRequest = [request mutableCopy]; - cryptoModule = cryptoModule ?: self.cryptoModule; - - if (formData.count) { - NSString *boundary = [[NSUUID UUID].UUIDString stringByReplacingOccurrencesOfString:@"-" withString:@""]; - NSString *contentType = [@"multipart/form-data; boundary=" stringByAppendingString:boundary]; - [uploadRequest setValue:contentType forHTTPHeaderField: @"Content-Type"]; - httpBodyInputStream = [self multipartFormDataStreamWithBoundary:boundary - dataInputStream:httpBodyInputStream - filename:filename - cryptoModule:cryptoModule - fromFields:formData - streamsSize:&dataSize]; - - [uploadRequest setValue:@(dataSize).stringValue forHTTPHeaderField:@"Content-Length"]; - - if (!httpBodyInputStream) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: @"Unable to create HTTP body stream", - NSLocalizedFailureReasonErrorKey: @"Provided data streams opened or file is missing", - @"statusCode": @400 - }; - - NSError *uploadError = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:userInfo]; - - block(uploadError); - return; - } - } - - uploadRequest.HTTPBodyStream = httpBodyInputStream; - - __block NSURLSessionDataTask *task = nil; - task = [self.session dataTaskWithRequest:uploadRequest - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; - NSError *uploadError = nil; - - if (httpResponse.statusCode >= 400 || error) { - uploadError = [self uploadErrorForTask:task httpResponse:httpResponse responseData:data error:error]; - } - - block(uploadError); - }]; - - [task resume]; -} - - #pragma mark - Download data -- (void)downloadFileAtURL:(NSURL *)remoteURL - toURL:(NSURL *)localURL - withCryptoModule:(nullable id)cryptoModule - completion:(void(^)(NSURLRequest *request, NSURL *location, NSError *error))block { +- (void)handleDownloadedFileAtURL:(NSURL *)location + withStoreURL:(NSURL *)localURL + cryptoModule:(nullable id)cryptoModule + completion:(void(^)( NSURL *location, NSError *error))block { + if (!location) block(nil, nil); + cryptoModule = cryptoModule ?: self.cryptoModule; - __block NSURLSessionDownloadTask *task = nil; BOOL temporary = !localURL; - if (!localURL) { + if (temporary) { localURL = [NSURL URLWithString:[NSString pathWithComponents:@[NSTemporaryDirectory(), [NSUUID UUID].UUIDString]]]; } if (!localURL.isFileURL) localURL = [NSURL fileURLWithPath:localURL.path]; - - if (!remoteURL) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: @"Unable complete request", - NSLocalizedFailureReasonErrorKey: @"Remote resource URL is missing" - }; - - NSError *error = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:userInfo]; - - block(nil, nil, error); - return; - } - - task = [self.session downloadTaskWithURL:remoteURL - completionHandler:^(NSURL *location, NSURLResponse *response, NSError *error) { - NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; - NSURLRequest *downloadRequest = task.originalRequest; - - if (httpResponse.statusCode >= 400 || error) { - NSError *requestError = [self downloadErrorForTask:task - httpResponse:httpResponse - fileLocation:location - error:error]; - block(downloadRequest, location, requestError); - } else { - - NSFileManager *fileManager = NSFileManager.defaultManager; - NSURL *storeURL = temporary ? location : localURL; - NSError *fileMoveError = nil; - - if (!temporary && [storeURL checkResourceIsReachableAndReturnError:nil]) { - [fileManager removeItemAtURL:storeURL error:&fileMoveError]; - } - - if (cryptoModule) { - if (temporary) storeURL = [storeURL URLByAppendingPathExtension:@"dec"]; - } else if (!fileMoveError && !temporary) { - [fileManager moveItemAtURL:location toURL:storeURL error:&fileMoveError]; - } - - if (fileMoveError) { - NSError *error = [self downloadErrorForTask:nil httpResponse:nil fileLocation:nil error:fileMoveError]; - block(downloadRequest, location, error); - } else if(cryptoModule) { - NSDictionary *fileAttributes = [fileManager attributesOfItemAtPath:location.path error:&error]; - NSUInteger fileSize = ((NSNumber *)[fileAttributes objectForKey:NSFileSize]).unsignedIntegerValue; - NSInputStream *sourceStream = [NSInputStream inputStreamWithURL:location]; - - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - PNResult *decryptResult = [cryptoModule decryptStream:sourceStream - dataLength:fileSize]; - NSError *decryptError = decryptResult.error; - - if (!decryptResult.isError) { - [decryptResult.data pn_writeToFileAtURL:storeURL withBufferSize:1024 * 1024 error:&decryptError]; - } - - block(downloadRequest, !decryptResult.isError ? storeURL : nil, decryptError); - - if (temporary && !decryptError && ![fileManager removeItemAtURL:location error:&decryptError]) { - NSLog(@" Encrypted file clean up error: %@", decryptError); - } - }); - } else { - NSError *tempRemoveError = nil; - block(downloadRequest, storeURL, tempRemoveError); - - if (temporary && ![fileManager removeItemAtURL:location error:&tempRemoveError]) { - NSLog(@" Temporary file clean up error: %@", tempRemoveError); - } - } - } - }]; - - [task resume]; -} - -#pragma mark - Session constructor -- (void)prepareSessionWithMaximumConnections:(NSInteger)maximumConnections { - self.maximumConnections = maximumConnections; - NSURLSessionConfiguration *configuration = [self configurationWithMaximumConnections:maximumConnections]; - self.delegateQueue = [self operationQueueWithConfiguration:configuration]; - self.session = [self sessionWithConfiguration:configuration]; -} + NSFileManager *fileManager = NSFileManager.defaultManager; + NSURL *storeURL = temporary ? location : localURL; + NSError *fileMoveError = nil; -- (NSURLSessionConfiguration *)configurationWithMaximumConnections:(NSInteger)maximumConnections { - NSURLSessionConfiguration *configuration = NSURLSessionConfiguration.defaultSessionConfiguration; - configuration.HTTPMaximumConnectionsPerHost = maximumConnections; - - return configuration; -} - -- (NSOperationQueue *)operationQueueWithConfiguration:(NSURLSessionConfiguration *)configuration { - NSOperationQueue *queue = [NSOperationQueue new]; - queue.maxConcurrentOperationCount = configuration.HTTPMaximumConnectionsPerHost; - - return queue; -} - -- (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration { - return [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:self.delegateQueue]; -} - - -#pragma mark - URLSession & Tasks delegate callbacks - -- (void)URLSession:(NSURLSession *)session didBecomeInvalidWithError:(NSError *)error { - if (!error) return; - [self prepareSessionWithMaximumConnections:self.maximumConnections]; -} - - -#pragma mark - Misc - -- (void)invalidate { - [self.session finishTasksAndInvalidate]; -} - -- (NSError *)uploadErrorForTask:(NSURLSessionDataTask *)task - httpResponse:(NSHTTPURLResponse *)response - responseData:(NSData *)data - error:(NSError *)error { - NSError *uploadError = nil; - NSDictionary *userInfo = [self errorUserInfoForFailedRequest:task.currentRequest - withHTTPResponse:response - responseData:data - fileLocation:nil - error:error]; - - if (response) { - NSNumber *statusCode = userInfo[@"statusCode"]; - uploadError = [NSError errorWithDomain:kPNStorageErrorDomain - code:statusCode.integerValue - userInfo:userInfo]; - } else { - uploadError = error; + if (!temporary && [storeURL checkResourceIsReachableAndReturnError:nil]) { + [fileManager removeItemAtURL:storeURL error:&fileMoveError]; } - return uploadError; -} + if (cryptoModule) { + if (temporary) storeURL = [storeURL URLByAppendingPathExtension:@"dec"]; + } else if (!fileMoveError && !temporary) [fileManager moveItemAtURL:location toURL:storeURL error:&fileMoveError]; -- (NSError *)downloadErrorForTask:(NSURLSessionDownloadTask *)task - httpResponse:(NSHTTPURLResponse *)response - fileLocation:(NSURL *)location - error:(NSError *)error { - NSError *downloadError = nil; - NSDictionary *userInfo = [self errorUserInfoForFailedRequest:task.currentRequest - withHTTPResponse:response - responseData:nil - fileLocation:location - error:error]; - - if (response) { - NSNumber *statusCode = userInfo[@"statusCode"]; - downloadError = [NSError errorWithDomain:kPNStorageErrorDomain - code:statusCode.integerValue - userInfo:userInfo]; - } else { - downloadError = error; - } + if (fileMoveError) { + NSError *error = [self downloadErrorForError:fileMoveError]; + block(location, error); + } else if(cryptoModule) { + NSDictionary *fileAttributes = [fileManager attributesOfItemAtPath:location.path error:nil]; + NSUInteger fileSize = ((NSNumber *)[fileAttributes objectForKey:NSFileSize]).unsignedIntegerValue; + NSInputStream *sourceStream = [NSInputStream inputStreamWithURL:location]; - return downloadError; -} + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + PNResult *decryptResult = [cryptoModule decryptStream:sourceStream dataLength:fileSize]; + NSError *decryptError = decryptResult.error; -- (NSDictionary *)errorUserInfoForFailedRequest:(NSURLRequest *)request - withHTTPResponse:(NSHTTPURLResponse *)response - responseData:(NSData *)data - fileLocation:(NSURL *)location - error:(NSError *)error { - NSString *failureDescription = error.localizedDescription ?: @"Unable to complete request"; - NSUInteger statusCode = response ? response.statusCode : 400; - NSMutableDictionary *userInfo = [NSMutableDictionary new]; - NSString *failureReason = error.localizedFailureReason; - NSDictionary *serviceResponse = nil; - - if (location) data = [NSData dataWithContentsOfURL:location]; - if ([request.URL.absoluteString rangeOfString:@".s3."].location != NSNotFound) { - if (data.length) { - PNXMLParser *parser = [PNXMLParser parserWithData:data]; - PNXML *parsedXML = [parser parse]; - NSString *errorMessage = [parsedXML valueForKeyPath:@"Error.Message"]; - NSString *errorCode = [parsedXML valueForKeyPath:@"Error.Code"]; - - if (errorMessage) failureReason = errorMessage; - else if (!failureReason) { - failureReason = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + if (!decryptResult.isError) { + [decryptResult.data pn_writeToFileAtURL:storeURL withBufferSize:1024 * 1024 error:&decryptError]; } - - if (errorCode) { - static NSArray *_s3AccessDeniedCodes; - static NSArray *_s3NotAvailableCodes; - static NSArray *_s3NotFoundCodes; - static dispatch_once_t onceToken; - - dispatch_once(&onceToken, ^{ - _s3AccessDeniedCodes = @[ - @"AccessDenied", @"AccountProblem", @"AllAccessDisabled", - @"InvalidAccessKeyId", @"InvalidObjectState", @"InvalidPayer", - @"InvalidSecurity", @"NotSignedUp", @"RequestTimeTooSkewed", - @"SignatureDoesNotMatch" - ]; - - _s3NotAvailableCodes = @[@"ServiceUnavailable", @"SlowDown"]; - _s3NotFoundCodes = @[ - @"NoSuchBucket", @"NoSuchBucketPolicy", @"NoSuchKey", - @"NoSuchLifecycleConfiguration", @"NoSuchUpload", @"NoSuchVersion" - ]; - }); - - if ([_s3AccessDeniedCodes containsObject:errorCode]) statusCode = 403; - else if ([errorCode isEqualToString:@"MethodNotAllowed"]) statusCode = 405; - else if ([errorCode isEqualToString:@"InvalidBucketState"]) statusCode = 409; - else if ([errorCode isEqualToString:@"MissingContentLength"]) statusCode = 411; - else if ([_s3NotFoundCodes containsObject:errorCode]) statusCode = 404; - else if ([errorCode isEqualToString:@"InternalError"]) statusCode = 500; - else if ([errorCode isEqualToString:@"NotImplemented"]) statusCode = 501; - else if ([_s3NotAvailableCodes containsObject:errorCode]) statusCode = 503; - } - } - } else { - serviceResponse = [PNErrorParser parsedServiceResponse:data]; - - if (serviceResponse) { - failureReason = serviceResponse[@"information"]; - if (serviceResponse[@"status"]) statusCode = ((NSNumber *)serviceResponse[@"status"]).unsignedIntegerValue; - } - } - - if (error) userInfo[NSUnderlyingErrorKey] = error; - userInfo[NSLocalizedFailureReasonErrorKey] = failureReason ?: @"Unknown error reason"; - userInfo[NSLocalizedDescriptionKey] = failureDescription ?: @"Unknown error"; - userInfo[@"statusCode"] = @(statusCode); - if (serviceResponse) userInfo[@"pn_serviceResponse"] = serviceResponse; - - return userInfo; -} -- (NSInputStream *)multipartFormDataStreamWithBoundary:(NSString *)boundary - dataInputStream:(NSInputStream *)stream - filename:(NSString *)filename - cryptoModule:(id)cryptoModule - fromFields:(NSArray *)fields - streamsSize:(NSUInteger *)streamsTotalSize { - NSString *fileMIMEType = [self mimeTypeFromFilename:filename]; - - if (fileMIMEType.length) { - NSMutableArray *mutableFields = [fields mutableCopy]; - - for (NSUInteger fieldIdx = 0; fieldIdx < fields.count; fieldIdx++) { - if (![fields[fieldIdx][@"key"] isEqualToString:@"Content-Type"]) continue; - NSMutableDictionary *mutableField = [fields[fieldIdx] mutableCopy]; - NSString *fieldValue = mutableField[@"value"]; - - if (fieldValue.length == 0 || [fieldValue rangeOfString:@"octet-stream"].location != NSNotFound) { - mutableField[@"value"] = fileMIMEType; - mutableFields[fieldIdx] = mutableField; - fields = [mutableFields copy]; + block(!decryptResult.isError ? storeURL : nil, decryptError); + + if (temporary && !decryptError && ![fileManager removeItemAtURL:location error:&decryptError]) { + NSLog(@" Encrypted file clean up error: %@", decryptError); } - - break; - } - } - - NSData *multipartFormData = [self multipartFormDataWithBoundary:boundary fromFields:fields]; - NSData *fileFormData = [self multipartFormFile:filename dataWithBoundary:boundary]; - NSMutableArray *inputStreams = [NSMutableArray new]; - NSMutableArray *streamLengths = [NSMutableArray new]; - NSInputStream *formDataStream = nil; - - if (multipartFormData) { - [streamLengths addObject:@(multipartFormData.length)]; - [inputStreams addObject:[NSInputStream inputStreamWithData:multipartFormData]]; - } - - if (fileFormData) { - [streamLengths addObject:@(fileFormData.length)]; - [inputStreams addObject:[NSInputStream inputStreamWithData:fileFormData]]; - } + }); + } else { + NSError *tempRemoveError = nil; + block(storeURL, tempRemoveError); - NSNumber *fileStreamSize = @(*streamsTotalSize); - if (cryptoModule) { - PNResult *encryptResult = [cryptoModule encryptStream:stream dataLength:*streamsTotalSize]; - if (!encryptResult.isError) { - stream = encryptResult.data; - fileStreamSize = @(stream.pn_dataLength); + if (temporary && ![fileManager removeItemAtURL:location error:&tempRemoveError]) { + NSLog(@" Temporary file clean up error: %@", tempRemoveError); } } - [streamLengths addObject:fileStreamSize]; - [inputStreams addObject:stream]; - - NSData *multipartFormEndData = [self multipartFormEndDataWithBoundary:boundary]; - [streamLengths addObject:@(multipartFormEndData.length)]; - [inputStreams addObject:[NSInputStream inputStreamWithData:multipartFormEndData]]; - - if (inputStreams.count == 4) { - formDataStream = [PNSequenceInputStream inputStreamWithInputStreams:inputStreams lengths:streamLengths]; - *streamsTotalSize = ((PNSequenceInputStream *)formDataStream).length; - } else { - *streamsTotalSize = 0; - } - - return formDataStream; -} - -- (NSData *)multipartFormDataWithBoundary:(NSString *)boundary fromFields:(NSArray *)fields { - NSMutableData *multipartFormData = [NSMutableData new]; - - [fields enumerateObjectsUsingBlock:^(NSDictionary *fieldData, NSUInteger fieldDataIdx, BOOL *stop) { - NSString *fieldValue = fieldData[@"value"]; - NSString *fieldName = fieldData[@"key"]; - - [multipartFormData appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] - dataUsingEncoding:NSUTF8StringEncoding]]; - [multipartFormData appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n", - fieldName] - dataUsingEncoding:NSUTF8StringEncoding]]; - [multipartFormData appendData:[[NSString stringWithFormat:@"%@\r\n", fieldValue] - dataUsingEncoding:NSUTF8StringEncoding]]; - }]; - - return multipartFormData; } -- (NSData *)multipartFormFile:(NSString *)filename dataWithBoundary:(NSString *)boundary { - NSMutableData *multipartFormFileData = [NSMutableData new]; - - [multipartFormFileData appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] - dataUsingEncoding:NSUTF8StringEncoding]]; - [multipartFormFileData appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"file\"; filename=\"%@\"\r\n\r\n", filename] - dataUsingEncoding:NSUTF8StringEncoding]]; - - return multipartFormFileData; -} -- (NSData *)multipartFormEndDataWithBoundary:(NSString *)boundary { - return [[NSString stringWithFormat:@"\r\n--%@--\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]; -} +#pragma mark - Misc -- (NSString *)mimeTypeFromFilename:(NSString *)filename { -#if !TARGET_OS_OSX - CFStringRef extension = (__bridge CFStringRef _Nonnull)filename.pathExtension; - CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extension, NULL); - NSString *mimeType = CFBridgingRelease(UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)); - if (uti != NULL) CFRelease(uti); - - return mimeType ?: @"application/octet-stream"; -#else - return @"application/octet-stream"; -#endif // TARGET_OS_OSX +- (NSError *)downloadErrorForError:(NSError *)error { + NSDictionary *userInfo = PNErrorUserInfo(error.localizedDescription, error.localizedFailureReason, nil, error); + return [PNError errorWithDomain:PNStorageErrorDomain code:PNErrorUnknown userInfo:userInfo]; } #pragma mark - diff --git a/PubNub/Data/Managers/PNPublishSequence.m b/PubNub/Data/Managers/PNPublishSequence.m index 85488a146..617583c69 100644 --- a/PubNub/Data/Managers/PNPublishSequence.m +++ b/PubNub/Data/Managers/PNPublishSequence.m @@ -1,164 +1,43 @@ -/** - * @author Sergey Mamontov - * @version 4.15.3 - * @since 4.5.2 - * @copyright © 2010-2020 PubNub, Inc. - */ #import "PNPublishSequence.h" #import "PNPrivateStructures.h" -#import "PNKeychain+Private.h" -#import "PNDataStorage.h" - -#if TARGET_OS_IOS - #import -#elif TARGET_OS_OSX - #import -#endif // TARGET_OS_OSX - #import "PNConfiguration.h" #import "PubNub+Core.h" -#import "PNKeychain.h" #import "PNHelpers.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Static - -NSString * const kPNPublishSequenceDataKey = @"pn_publishSequence"; - -/** - * @brief Maximum age of \c publish key inactivity after which it will be removed and count for it - * will be reset to \b 0. - * - * @note \b Default: 30 days - */ -static NSUInteger const kPNMaximumPublishSequenceDataAge = (30 * 24 * 60 * 60); - - -#pragma mark - Structures - -/** - * @brief Storable sequence manager data structure. - */ -struct PNPublishSequenceDataStructure { - /** - * @brief Key under which stored date when sequence last has been re-saved / modified. - */ - __unsafe_unretained NSString *lastSaveDate; - - /** - * @brief Key under which stored last saved sequence number value. - */ - __unsafe_unretained NSString *sequence; -}; - -struct PNPublishSequenceDataStructure PNPublishSequenceData = { - .lastSaveDate = @"sd", - .sequence = @"sn" -}; - - -#pragma mark - Protected interface declaration +#pragma mark Private interface declaration @interface PNPublishSequence () #pragma mark - Information -/** - * @brief Queue which is used to serialize access to shared client state information. - * - * @since 4.15.3 - */ +/// Queue which is used to serialize access to shared client state information. @property (nonatomic, strong) dispatch_queue_t resourceAccessQueue; -/** - * @brief Storage which is used to store information about current publish sequence number. - * - * @since 4.15.3 - */ -@property (nonatomic, strong) id dataStorage; +/// Whether stored sequence number for `publishKey` has been changed or not. +@property (nonatomic, assign) BOOL sequenceNumberChanged; -/** - * @brief Sequence number which has been used for recent message publish API usage. - */ +/// Sequence number which has been used for recent message publish API usage. @property (nonatomic, assign) NSUInteger sequenceNumber; -/** - * @brief Whether stored sequence number for \b publishKey has been changed or not. - */ -@property (nonatomic, assign) BOOL sequenceNumberChanged; - #pragma mark - Initialization and Configuration -/** - * @brief Dictionary which store initialized publish sequence number managers. - * - * @return Dictionary where publish sequence numbers stored under publish keys which is used for - * \b PubNub client configuration. - */ +/// Dictionary which store initialized publish sequence number managers. +/// +/// - Returns: Dictionary where publish sequence numbers stored under publish keys which is used for **PubNub** client +/// configuration. + (NSMutableDictionary *)sequenceManagers; -/** - * @brief Initialize published messages sequence manager. - * - * @param client Client for which published messages sequence manager should be created. - * - * @return Initialized and ready to use client published messages sequence manager. - */ +/// Initialize published messages sequence manager. +/// +/// - Parameter client: Client for which published messages sequence manager should be created. +/// - Returns: Initialized and ready to use client published messages sequence manager. - (instancetype)initForClient:(PubNub *)client; - -#pragma mark - Data storage - -/** - * @brief Fetch sequence information from \b Keychain. - */ -- (void)loadFromPersistentStorage; - -/** - * @brief Store in-memory sequence information to \b Keychain. - */ -- (void)saveToPersistentStorage; - -/** - * @brief Clean-up sequence information from information about \c old publish keys. - */ -- (void)cleanUpIfRequired; - - -#pragma mark - Storage - -/** - * @brief Migrate previously stored client data in default storage to new one (identifier-based storage). - * - * @param identifier Unique identifier of storage to which information should be moved from default storage. - */ -- (void)migrateDefaultToStorageWithIdentifier:(NSString *)identifier; - - -#pragma mark - Handlers - -/** - * @brief Handle application transition between different execution contexts. - * - * @param notification Notification which triggered callback. - */ -- (void)handleContextTransition:(NSNotification *)notification; - - -#pragma mark - Misc - -/** - * @brief Subscribe to application context change notifications. - * - * @discussion Context change allow to react and if required save sequence data information into - * persistent storage. - */ -- (void)subscribeOnNotifications; - #pragma mark - @@ -196,11 +75,8 @@ - (NSUInteger)nextSequenceNumber:(BOOL)shouldUpdateCurrent { } }; - if (shouldUpdateCurrent) { - dispatch_barrier_sync(self.resourceAccessQueue, block); - } else { - dispatch_sync(self.resourceAccessQueue, block); - } + if (shouldUpdateCurrent) dispatch_barrier_sync(self.resourceAccessQueue, block); + else dispatch_sync(self.resourceAccessQueue, block); return sequenceNumber; } @@ -237,20 +113,9 @@ + (instancetype)sequenceForClient:(PubNub *)client { - (instancetype)initForClient:(PubNub *)client { if ((self = [super init])) { - NSString *subscribeKey = client.currentConfiguration.subscribeKey; - NSString *publishKey = client.currentConfiguration.publishKey; - NSString *storageIdentifier = publishKey ?: subscribeKey; - [self migrateDefaultToStorageWithIdentifier:storageIdentifier]; - const char *queueIdentifier = "com.pubnub.publish-sequence"; _resourceAccessQueue = dispatch_queue_create(queueIdentifier, DISPATCH_QUEUE_CONCURRENT); dispatch_set_target_queue(_resourceAccessQueue, NULL); - - _dataStorage = [PNDataStorage persistentClientDataWithIdentifier:storageIdentifier]; - - [self loadFromPersistentStorage]; - [self cleanUpIfRequired]; - [self subscribeOnNotifications]; } return self; @@ -261,142 +126,6 @@ - (void)reset { self->_sequenceNumberChanged = YES; self->_sequenceNumber = 0; }); - - [self saveToPersistentStorage]; -} - - -#pragma mark - Data storage - -- (void)loadFromPersistentStorage { - NSString *key = kPNPublishSequenceDataKey; - - dispatch_barrier_async(self.resourceAccessQueue, ^{ - [self.dataStorage batchAsyncAccessWithBlock:^(dispatch_block_t completion) { - NSMutableDictionary *sequenceData = [([self.dataStorage valueForKey:key]?: @{}) mutableCopy]; - NSNumber *sequenceNumber = (NSNumber *)sequenceData[PNPublishSequenceData.sequence]; - sequenceData[PNPublishSequenceData.lastSaveDate] = @([NSDate date].timeIntervalSince1970); - self->_sequenceNumber = sequenceNumber.unsignedIntegerValue; - - [self.dataStorage storeValue:sequenceData forKey:key]; - completion(); - }]; - }); -} - -- (void)saveToPersistentStorage { - NSString *key = kPNPublishSequenceDataKey; - - dispatch_barrier_async(self.resourceAccessQueue, ^{ - if (!self.sequenceNumberChanged) { - return; - } - - self.sequenceNumberChanged = NO; - - [self.dataStorage batchAsyncAccessWithBlock:^(dispatch_block_t completion) { - NSMutableDictionary *sequenceData = [([self.dataStorage valueForKey:key]?: @{}) mutableCopy]; - sequenceData[PNPublishSequenceData.sequence] = @(self->_sequenceNumber); - sequenceData[PNPublishSequenceData.lastSaveDate] = @([NSDate date].timeIntervalSince1970); - - [self.dataStorage storeValue:sequenceData forKey:key]; - completion(); - }]; - }); -} - -- (void)cleanUpIfRequired { - NSTimeInterval currentTimestamp = [NSDate date].timeIntervalSince1970; - NSString *key = kPNPublishSequenceDataKey; - - dispatch_barrier_async(self.resourceAccessQueue, ^{ - [self.dataStorage batchAsyncAccessWithBlock:^(dispatch_block_t completion) { - NSMutableDictionary *sequenceData = [self.dataStorage valueForKey:key]; - - NSNumber *lastUpdateDate = sequenceData[PNPublishSequenceData.lastSaveDate]; - NSTimeInterval lastUpdateTimestamp = lastUpdateDate.doubleValue; - - if (ABS(currentTimestamp - lastUpdateTimestamp) > kPNMaximumPublishSequenceDataAge) { - [self.dataStorage storeValue:nil forKey:key]; - } - - completion(); - }]; - }); -} - - -#pragma mark - Storage - -- (void)migrateDefaultToStorageWithIdentifier:(NSString *)identifier { - id storage = [PNDataStorage persistentClientDataWithIdentifier:identifier]; - PNKeychain *defaultKeychain = PNKeychain.defaultKeychain; - - NSDictionary *sequenceData = [defaultKeychain valueForKey:kPNPublishSequenceDataKey]; - - if (sequenceData.count) { - sequenceData = sequenceData[sequenceData.allKeys.lastObject]; - - /** - * 'sequenceData' expected to be dictionary which stored some metrics for specific publish key. - */ - if ([sequenceData isKindOfClass:[NSDictionary class]]) { - [storage syncStoreValue:sequenceData forKey:kPNPublishSequenceDataKey]; - } - - [defaultKeychain removeValueForKey:kPNPublishSequenceDataKey]; - } -} - - -#pragma mark - Handlers - -- (void)handleContextTransition:(NSNotification *)notification { - [self saveToPersistentStorage]; -} - - -#pragma mark - Misc - -- (void)subscribeOnNotifications { -#if TARGET_OS_IOS - NSNotificationCenter *notificationCenter = NSNotificationCenter.defaultCenter; - - [notificationCenter addObserver:self - selector:@selector(handleContextTransition:) - name:UIApplicationWillResignActiveNotification - object:nil]; - [notificationCenter addObserver:self - selector:@selector(handleContextTransition:) - name:UIApplicationDidEnterBackgroundNotification - object:nil]; -#elif TARGET_OS_WATCH - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - - [notificationCenter addObserver:self - selector:@selector(handleContextTransition:) - name:NSExtensionHostWillResignActiveNotification - object:nil]; - [notificationCenter addObserver:self - selector:@selector(handleContextTransition:) - name:NSExtensionHostDidEnterBackgroundNotification - object:nil]; -#elif TARGET_OS_OSX - NSNotificationCenter *notificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter]; - - [notificationCenter addObserver:self - selector:@selector(handleContextTransition:) - name:NSWorkspaceWillSleepNotification - object:nil]; - [notificationCenter addObserver:self - selector:@selector(handleContextTransition:) - name:NSWorkspaceSessionDidResignActiveNotification - object:nil]; - [notificationCenter addObserver:self - selector:@selector(handleContextTransition:) - name:NSWorkspaceDidDeactivateApplicationNotification - object:nil]; -#endif // TARGET_OS_OSX } #pragma mark - diff --git a/PubNub/Data/Managers/PNSubscriber.h b/PubNub/Data/Managers/PNSubscriber.h index 2ef7bd499..f898229cd 100644 --- a/PubNub/Data/Managers/PNSubscriber.h +++ b/PubNub/Data/Managers/PNSubscriber.h @@ -12,203 +12,144 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Types -/** - * @brief Subscriber operation completion block. - * - * @param status Reference on subscribe/unsubscribe operation request service processing result. - */ +/// Subscriber operation completion block. +/// +/// - Parameter status: Reference on subscribe/unsubscribe operation request service processing result. typedef void(^PNSubscriberCompletionBlock)(PNSubscribeStatus * _Nullable status); -/** - * @brief Class which allow to manage subscribe loop. - * - * @discussion Track subscription and time token information. Subscriber manage recovery as well. - * - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2019 PubNub, Inc. - */ +/// Class which allow to manage subscribe loop. +/// +/// Track subscription and time token information. Subscriber manage recovery as well. @interface PNSubscriber : NSObject #pragma mark - State Information and Manipulation -/** - * @brief Retrieve list of all remote data objects names to which client subscriber at this moment. - * - * @return Object names list. - */ +/// Retrieve list of all remote data objects names to which client subscriber at this moment. - (NSArray *)allObjects; -/** - * @brief List of channels. - * - * @return Return list of channels on which client subscribed at this moment. - */ +/// List of channels on which client subscribed at this moment. - (NSArray *)channels; -/** - * @brief List of channel groups. - * - * @return Return list of channel groups on which client subscribed at this moment. - */ +/// List of channel groups on which client subscribed at this moment. - (NSArray *)channelGroups; -/** - * @brief List of presence channels. - * - * @return Return list of presence channels for which client observing for presence events. - */ +/// List of presence channels for which client observing for presence events. - (NSArray *)presenceChannels; #pragma mark - Initialization and Configuration -/** - * @brief Construct subscribe loop manager for concrete \b PubNub client. - * - * @param client Client which will be weakly stored in subscriber. - * - * @return Configured and ready to use subscribe manager instance. - */ +/// Construct subscribe loop manager for concrete **PubNub** client. +/// +/// - Parameter client: Client which will be weakly stored in subscriber. +/// - Returns: Configured and ready to use subscribe manager instance. + (instancetype)subscriberForClient:(PubNub *)client; -/** - * @brief Copy specified subscriber's state information. - * - * @param subscriber Subscriber whose information should be copied into receiver's state objects. - */ +/// Copy specified subscriber's state information. +/// +/// - Parameters subscriber: Subscriber whose information should be copied into receiver's state objects. - (void)inheritStateFromSubscriber:(PNSubscriber *)subscriber; #pragma mark - Subscription information modification -/** - * @brief Add new channels to the list at which client subscribed. - * - * @param channels List of channels which should be added to the list. - */ +/// Add new channels to the list at which client subscribed. +/// +/// - Parameter channels: List of channels which should be added to the list. - (void)addChannels:(NSArray *)channels; -/** - * @brief Remove channels from the list on which client subscribed. - * - * @param channels List of channels which should be removed from the list. - */ +/// Remove channels from the list on which client subscribed. +/// +/// - Parameter channels: List of channels which should be removed from the list. - (void)removeChannels:(NSArray *)channels; -/** - * @brief Add new channel groups to the list at which client subscribed. - * - * @param groups List of channel groups which should be added to the list. - */ +/// Add new channel groups to the list at which client subscribed. +/// +/// - Parameter groups: List of channel groups which should be added to the list. - (void)addChannelGroups:(NSArray *)groups; -/** - * @brief Remove channel groups from the list on which client subscribed. - * - * @param groups List of channel groups which should be removed from the list. - */ +/// Remove channel groups from the list on which client subscribed. +/// +/// - Parameter groups: List of channel groups which should be removed from the list. - (void)removeChannelGroups:(NSArray *)groups; -/** - * @brief Add new presence channels to the list at which client subscribed. - * - * @param presenceChannels List of presence channels which should be added to the list. - */ +/// Add new presence channels to the list at which client subscribed. +/// +/// - Parameter presenceChannels: List of presence channels which should be added to the list. - (void)addPresenceChannels:(NSArray *)presenceChannels; -/** - * @brief Remove presence channels from the list on which client subscribed. - * - * @param presenceChannels List of presence channels which should be removed from the list. - */ +/// Remove presence channels from the list on which client subscribed. +/// +/// - Parameter presenceChannels: List of presence channels which should be removed from the list. - (void)removePresenceChannels:(NSArray *)presenceChannels; -#pragma mark - Filtering - -/** - * @brief Stores reference on string representation of filtering expression which should be applied - * to decide which updates should reach client. - * - * @warning If your filter expression is malformed, \b PNEventsListener won't receive any - * messages and presence events from service (only error status). - */ -@property (nonatomic, nullable, copy) NSString *filterExpression; - - #pragma mark - Subscription -/** - * @brief Perform initial subscription with \b 0 timetoken. - * - * @discussion Subscription with \b 0 timetoken "register" client in \b PubNub network and allow to - * receive live updates from remote data objects live feed. - * - * @param timeToken Time from which client should try to catch up on messages. - * @param state Client state which should be bound to channels on which client has been subscribed - * or will subscribe now. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block Subscription completion block which is used to notify code. - * - * @since 4.8.2 - */ -- (void)subscribeUsingTimeToken:(nullable NSNumber *)timeToken - withState:(nullable NSDictionary *)state - queryParameters:(nullable NSDictionary *)queryParameters - completion:(nullable PNSubscriberCompletionBlock)block; -/** - * @brief Try restore subscription cycle by using \b 0 time token and if required try to catch up on - * previous subscribe time token (basing on user configuration). - * - * @param block Subscription completion block which is used to notify code. - */ +/// Perform initial subscription with **0** timetoken. +/// +/// Subscription with **0** timetoken "register" client in **PubNub** network and allow to receive live updates from +/// remote data objects live feed. +/// +/// - Parameter request: Request with information about resources from which client will receive real-time updates. +- (void)subscribeWithRequest:(PNSubscribeRequest *)request; + +/// Try restore subscription cycle by using **0** time token and if required try to catch up on previous subscribe time +/// token (basing on user configuration). +/// +/// - Parameter block: Subscription completion block which is used to notify code. - (void)restoreSubscriptionCycleIfRequiredWithCompletion:(nullable PNSubscriberCompletionBlock)block; -/** - * @brief Continue subscription cycle using \c currentTimeToken value and channels, stored in cache. - * - * @param block Subscription completion block which is used to notify code. - */ +/// Continue subscription cycle using `currentTimeToken` value and channels, stored in cache. +/// +/// - Parameter block: Subscription completion block which is used to notify code. - (void)continueSubscriptionCycleIfRequiredWithCompletion:(nullable PNSubscriberCompletionBlock)block; #pragma mark - Unsubscription -/** - * @brief Perform unsubscription operation. - * - * @discussion Client will as \b PubNub presence service to trigger \c 'leave' for all channels and - * groups (except presence) on which client was subscribed earlier. - * - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block Unsubscription completion block which is used to notify code. - * - * @since 4.7.2 - */ +/// Unsubscribe from specified resources. +/// +/// #### Example: +/// ```objc +/// // This request will unsubscribe from presence events on `group-a-pnpres` group. +/// PNPresenceLeaveRequest *request = [PNPresenceLeaveRequest requestWithPresenceChannels:nil +/// channelGroups:@[@"group-a"]]; +/// [self unsubscribeWithRequest:request completion:^(PNSubscribeStatus *status) { +/// // Handle leave completion. +/// }]; +/// ``` +/// +/// - Parameters +/// - request: Request with information about resources from which client should stop receiving real-time updates. +/// - block: Unsubscribe request completion block +- (void)unsubscribeWithRequest:(PNPresenceLeaveRequest *)request completion:(nullable PNSubscriberCompletionBlock)block; + +/// Perform unsubscription operation. +/// +/// Client will as **PubNub** presence service to trigger `leave` for all channels and groups (except presence) on which +/// client was subscribed earlier. +/// +/// - Parameters: +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. +/// - block: Unsubscription completion block which is used to notify code. - (void)unsubscribeFromAllWithQueryParameters:(NSDictionary *)queryParameters - completion:(void (^)(PNStatus *status))block; - -/** - * @brief Perform unsubscription operation. - * - * @discussion If suitable objects has been passed, then client will ask \b PubNub presence service - * to trigger \c 'leave' presence events on passed objects. - * - * @param channels List of channels from which client should unsubscribe. - * @param groups List of channel groups from which client should unsubscribe. - * @param shouldInformListener Whether listener should be informed at the end of operation or not. - * @param queryParameters List arbitrary query parameters which should be sent along with original - * API call. - * @param block Unsubscription completion block which is used to notify code. - * - * @since 4.8.2 - */ + completion:(PNSubscriberCompletionBlock)block; + +/// Perform unsubscription operation. +/// +/// If suitable objects has been passed, then client will ask **PubNub** presence service to trigger `leave` presence +/// events on passed objects. +/// +/// - Parameters: +/// - channels: List of channels from which client should unsubscribe. +/// - groups: List of channel groups from which client should unsubscribe. +/// - shouldInformListener: Whether listener should be informed at the end of operation or not. +/// - queryParameters: List arbitrary query parameters which should be sent along with original API call. +/// - block: Unsubscription completion block which is used to notify code. - (void)unsubscribeFromChannels:(nullable NSArray *)channels groups:(nullable NSArray *)groups withQueryParameters:(nullable NSDictionary *)queryParameters diff --git a/PubNub/Data/Managers/PNSubscriber.m b/PubNub/Data/Managers/PNSubscriber.m index d7b47ba99..e81a5503c 100644 --- a/PubNub/Data/Managers/PNSubscriber.m +++ b/PubNub/Data/Managers/PNSubscriber.m @@ -1,78 +1,57 @@ -/** - * @author Serhii Mamontov - * @copyright © 2010-2020 PubNub, Inc. - */ #import "PNSubscriber.h" -#import "PNSubscribeStatus+Private.h" +#import +#import "PNSubscribeMessageEventData+Private.h" +#import "PNSubscribeFileEventData+Private.h" +#import "PNPresenceLeaveRequest+Private.h" +#import "PNSubscribeEventData+Private.h" +#import "PNSubscribeRequest+Private.h" #import "PNOperationResult+Private.h" +#import "PNSubscribeStatus+Private.h" #import "PubNub+SubscribePrivate.h" #import "PNAcknowledgmentStatus.h" #import "PNEnvelopeInformation.h" #import "PNServiceData+Private.h" #import "PNErrorStatus+Private.h" -#import "PNSubscriberResults.h" -#import "PNRequestParameters.h" #import "PubNub+CorePrivate.h" #import "PNStatus+Private.h" #import "PNConfiguration.h" +#import "PNFile+Private.h" #import "PubNub+Files.h" #import -#import "PNLogMacro.h" #import "PNHelpers.h" #pragma mark Static -/** - * @brief Time which should be used by retry timer as interval between subscription retry attempts. - */ +/// Time which should be used by retry timer as interval between subscription retry attempts. static NSTimeInterval const kPubNubSubscriptionRetryInterval = 1.0f; #pragma mark - Structures typedef NS_OPTIONS(NSUInteger, PNSubscriberState) { - /** - * @brief State set when subscriber has been just initialized. - */ + /// State set when subscriber has been just initialized. PNInitializedSubscriberState, - - /** - * @brief State set at the moment when client received response on 'leave' request and not - * subscribed to any remote data objects live feed. - */ + + /// State set at the moment when client received response on `leave` request and not subscribed to any remote data + /// objects live feed. PNDisconnectedSubscriberState, - - /** - * @brief State set at the moment when client lost connection or experienced other issues with - * communication established with \b PubNub service. - */ + + /// State set at the moment when client lost connection or experienced other issues with communication established + /// with **PubNub** service. PNDisconnectedUnexpectedlySubscriberState, - - /** - * @brief State set at the moment when client received response with 200 status code for - * subscribe request with TT 0. - */ + + /// State set at the moment when client received response with `200` status code for subscribe request with TT `0`. PNConnectedSubscriberState, - - /** - * @brief State set at the moment when client received response with 403 status code for - * subscribe request. - */ + + /// State set at the moment when client received response with `403` status code for subscribe request. PNAccessRightsErrorSubscriberState, - - /** - * @brief State set at the moment when client received response with 481 status code for - * subscribe request. - */ + + /// State set at the moment when client received response with `481` status code for subscribe request. PNMalformedFilterExpressionErrorSubscriberState, - - /** - * @brief State set at the moment when client received response with 414 status code for - * subscribe / unsubscribe requests. - * - * @since 4.6.2 - */ + + /// State set at the moment when client received response with `414` status code for subscribe / unsubscribe + /// requests. PNPNRequestURITooLongErrorSubscriberState }; @@ -86,224 +65,148 @@ @interface PNSubscriber () #pragma mark - Information -/** - * @brief Client for which subscribe manager manage subscribe loop. - */ -@property (nonatomic, weak) PubNub *client; - -/** - * @brief Current subscriber state. - */ -@property (nonatomic, assign) PNSubscriberState currentState; - -/** - * @brief Whether subscriber potentially should expect for subscription restore call or not. - * - * @discussion In case if client tried to connect and failed or disconnected because of network - * issues this flag should be set to \c YES. - */ -@property (nonatomic, assign) BOOL mayRequireSubscriptionRestore; - -/** - * @brief Whether subscriber recovers after network issues. - * - * @since 4.13.0 - */ -@property (nonatomic, assign) BOOL restoringAfterNetworkIssues; - -/** - * @brief Actual storage for list of channels on which client subscribed at this moment and listen - * for updates from live feeds. - */ -@property (nonatomic, strong) NSMutableSet *channelsSet; - -/** - * @brief Actual storage for list of channel groups on which client subscribed at this moment and - * listen for updates from live feeds. - */ -@property (nonatomic, strong) NSMutableSet *channelGroupsSet; - -/** - * @brief Actual storage for list of presence channels on which client subscribed at this moment and - * listen for presence updates. - */ -@property (nonatomic, strong) NSMutableSet *presenceChannelsSet; - -/** - * @brief Dictionary which is used in messages 'de-dupe' logic to prevent same messages or presence - * events delivering to objects event listeners. - * - * @since 4.5.8 - */ -@property (nonatomic, strong) NSMutableDictionary *> *cachedObjects; - -/** - * @brief List of cached object identifiers. - * - * @discussion Array used every time when maximum cached objects count has been reached to clean up - * cache from older entries. - * - * @since 4.5.8 - */ -@property (nonatomic, strong) NSMutableArray *cachedObjectIdentifiers; - -/** - * @brief Percent-escaped message filtering expression. - * - * @since 4.3.0 - */ -@property (nonatomic, nullable, copy) NSString *escapedFilterExpression; - -/** - * @brief Time token which is used for current subscribe loop iteration. - * - * @discussion \b 0 for initial subscription loop and non-zero for long-poll requests. - */ -@property (nonatomic, strong) NSNumber *currentTimeToken; - -/** - * @brief Time token which should be used after initial subscription with \b 0 timetoken. - * - * @discussion Override token used by subscribe API which allow to subscribe on arbitrarily time - * token and will be used in logic which decide which time token should be used for next - * subscription cycle. - * - * @since 4.2.0 - */ -@property (nonatomic, nullable, strong) NSNumber *overrideTimeToken; - -/** - * @brief Time token which has been used for previous subscribe loop iteration. - * - * @discussion \b 0 for initial subscription loop and non-zero for long-poll requests. - */ -@property (nonatomic, strong) NSNumber *lastTimeToken; - -/** - * @brief \b PubNub server region identifier (which generated \c currentTimeToken value). - * - * @discussion \b 0 for initial subscription loop and non-zero for long-poll requests. - * - * @since 4.3.0 - */ -@property (nonatomic, readonly, copy) NSNumber *currentTimeTokenRegion; - -/** - * @brief Time token region which has been used for previous subscribe loop iteration. - * - * @discussion \b 0 for initial subscription loop and non-zero for long-poll requests. - * - * @since 4.3.0 - */ -@property (nonatomic, readonly, copy) NSNumber *lastTimeTokenRegion; - -/** - * @brief Queue which is used to serialize access to shared subscriber information. - */ -@property (nonatomic, strong) dispatch_queue_t resourceAccessQueue; - -/** - * @brief GCD timer used to re-issue subscribe request. - * - * @discussion Timer activated in cases if previous subscribe loop failed with category type which - * can be temporary. - */ +/// Dictionary which is used in messages 'de-dupe' logic to prevent same messages or presence events delivering to +/// objects event listeners. +@property(strong, nonatomic) NSMutableDictionary *> *cachedObjects; + +/// List of cached object identifiers. +/// +/// Array used every time when maximum cached objects count has been reached to clean up cache from older entries. +@property(strong, nonatomic) NSMutableArray *cachedObjectIdentifiers; + +/// Actual storage for list of presence channels on which client subscribed at this moment and listen for presence +/// updates. +@property(strong, nonatomic) NSMutableSet *presenceChannelsSet; + +/// Actual storage for list of channel groups on which client subscribed at this moment and listen for updates from live +/// feeds. +@property(strong, nonatomic) NSMutableSet *channelGroupsSet; + +/// **PubNub** server region identifier (which generated `currentTimeToken` value). +/// +/// **0** for initial subscription loop and non-zero for long-poll requests. +@property(copy, nonatomic, readonly) NSNumber *currentTimeTokenRegion; + +/// GCD timer used to re-issue subscribe request. +/// +/// Timer activated in cases if previous subscribe loop failed with category type which can be temporary. @property (nonatomic, nullable, strong) dispatch_source_t retryTimer; +/// Actual storage for list of channels on which client subscribed at this moment and listen for updates from live feeds. +@property(strong, nonatomic) NSMutableSet *channelsSet; + +/// Time token which should be used after initial subscription with **0** timetoken. +/// +/// Override token used by subscribe API which allow to subscribe on arbitrarily time token and will be used in logic +/// which decide which time token should be used for next subscription cycle. +@property(strong, nullable, nonatomic) NSNumber *overrideTimeToken; + +/// Time token region which has been used for previous subscribe loop iteration. +/// +/// **0** for initial subscription loop and non-zero for long-poll requests. +@property(copy, nonatomic, readonly) NSNumber *lastTimeTokenRegion; + +/// Whether subscriber potentially should expect for subscription restore call or not. +/// +/// In case if client tried to connect and failed or disconnected because of network issues this flag should be set to +/// `YES`. +@property(assign, nonatomic) BOOL mayRequireSubscriptionRestore; + +/// Whether subscriber recovers after network issues. +@property(assign, nonatomic) BOOL restoringAfterNetworkIssues; + +/// Current subscriber state. +@property(assign, nonatomic) PNSubscriberState currentState; + +/// Time token which is used for current subscribe loop iteration. +/// +/// **0** for initial subscription loop and non-zero for long-poll requests. +@property(strong, nonatomic) NSNumber *currentTimeToken; + +/// Time token which has been used for previous subscribe loop iteration. +/// +/// **0** for initial subscription loop and non-zero for long-poll requests. +@property(strong, nonatomic) NSNumber *lastTimeToken; + +/// Client for which subscribe manager manage subscribe loop. +@property(weak, nonatomic) PubNub *client; + +/// Resources access lock. +@property(strong, nonatomic) PNLock *lock; + #pragma mark - Initialization and Configuration -/** - * @brief Initialize subscribe loop manager for concrete \b PubNub client. - * - * @param client Reference on client which will be weakly stored in subscriber. - * - * @return Initialized and ready to use subscribe manager instance. - */ +/// Initialize subscribe loop manager for concrete **PubNub** client. +/// +/// - Parameter client: Reference on client which will be weakly stored in subscriber. +/// - Returns: Initialized subscribe manager instance. - (instancetype)initForClient:(PubNub *)client; #pragma mark - Subscription information modification -/** - * @brief Update current subscriber state. - * - * @discussion If possible, state transition will be reported to the listeners. - * - * @param state New state from \b PNSubscriberState enum fields. - * @param status Status object which should be passed along to listeners. - * @param block Bblock which will be called at the end of subscriber's state update process. Block - * pass only one argument - reference on one of \c PNStatusCategory enum fields which represent - * calculated status category (may differ from the one, which is passed into method because of - * current and expected subscriber's state). - * - * @since 4.5.15 - */ +/// Update current subscriber state. +/// +/// If possible, state transition will be reported to the listeners. +/// +/// - Parameters: +/// - state: New state from ``PNSubscriberState`` enum fields. +/// - status: Status object which should be passed along to listeners. +/// - block: Block which will be called at the end of subscriber's state update process. Block pass only one +/// argument - reference on one of `PNStatusCategory` enum fields which represent calculated status category (may +/// differ from the one, which is passed into method because of current and expected subscriber's state). - (void)updateStateTo:(PNSubscriberState)state - withStatus:(PNSubscribeStatus *)status + withStatus:(PNStatus *)status completion:(nullable void(^)(PNStatusCategory category))block; #pragma mark - Subscription -/** - * @brief Perform initial subscription with \b 0 timetoken. - * - * @discussion Subscription with \b 0 timetoken "register" client in \b PubNub network and allow to - * receive live updates from remote data objects live feed. - * - * @param initialSubscribe Whether client trying to subscriber using \b 0 time token and trigger all - * required presence notifications or not. - * @param timeToken Time from which client should try to catch up on messages. - * @param state Cclient state which should be bound to channels on which client has been subscribed - * or will subscribe now. - * @param queryParameters List arbitrary query paramters which should be sent along with original - * API call. - * @param block Subscription completion block which is used to notify code. - * - * @since 4.8.2 - */ +/// Perform initial subscription with **0** timetoken. +/// +/// Subscription with **0** timetoken "register" client in **PubNub** network and allow to receive live updates from +/// remote data objects live feed. +/// +/// - Parameters: +/// - initialSubscribe: Whether client trying to subscriber using **0** time token and trigger all required presence +/// notifications or not. +/// - timeToken: Time from which client should try to catch up on messages. +/// - state Cclient state which should be bound to channels on which client has been subscribed or will subscribe now. +/// - queryParameters: List arbitrary query paramters which should be sent along with original API call. +/// - block: Subscription completion block which is used to notify code. - (void)subscribe:(BOOL)initialSubscribe usingTimeToken:(nullable NSNumber *)timeToken withState:(nullable NSDictionary *)state queryParameters:(nullable NSDictionary *)queryParameters completion:(nullable PNSubscriberCompletionBlock)block; -/** - * @brief Launch subscription retry timer. - * - * @discussion Launch timer with default 1 second interval after each subscribe attempt. In most of - * cases timer used to retry subscription after PubNub Access Manager denial because of client - * doesn't has enough rights. - */ +/// Launch subscription retry timer. +/// +/// Launch timer with default `1` second interval after each subscribe attempt. In most of cases timer used to retry +/// subscription after PubNub Access Manager denial because of client doesn't has enough rights. - (void)startRetryTimer; -/** - * @brief Terminate previously launched subscription retry counter. - * - * @discussion In case if another subscribe request from user client better to stop retry timer to - * eliminate race of conditions. - */ +/// Terminate previously launched subscription retry counter. +/// +/// In case if another subscribe request from user client better to stop retry timer to eliminate race of conditions. - (void)stopRetryTimer; #pragma mark - Unsubscription -/** - * @brief Perform unsubscription operation. - * - * @discussion If suitable objects has been passed, then client will ask \b PubNub presence service - * to trigger \c 'leave' presence events on passed objects. - * - * @param channels List of channels from which client should unsubscribe. - * @param groups List of channel groups from which client should unsubscribe. - * @param shouldInformListener Whether listener should be informed at the end of operation or not. - * @param subscribeOnRestChannels Whether client should try to subscribe on channels which may be - * left after unsubscription. - * @param block Unsubscription completion block which is used to notify code. - * - * @since 4.5.6 - */ +/// Perform unsubscription operation. +/// +/// If suitable objects has been passed, then client will ask **PubNub** presence service to trigger `leave` presence +/// events on passed objects. +/// +/// - Parameters: +/// - channels: List of channels from which client should unsubscribe. +/// - groups: List of channel groups from which client should unsubscribe. +/// - shouldInformListener: Whether listener should be informed at the end of operation or not. +/// - subscribeOnRestChannels: Whether client should try to subscribe on channels which may be left after +/// unsubscription. +/// - block: Unsubscription completion block which is used to notify code. - (void)unsubscribeFromChannels:(nullable NSArray *)channels groups:(nullable NSArray *)groups withQueryParameters:(NSDictionary *)queryParameters @@ -314,194 +217,141 @@ - (void)unsubscribeFromChannels:(nullable NSArray *)channels #pragma mark - Handlers -/** - * @brief Handle subscription status update. - * - * @discussion Depending on passed status category and whether it is error it will be sent for - * processing to corresponding methods. - * - * @param status Status object which has been received from \b PubNub network. - */ +/// Handle subscription status update. +/// +/// Depending on passed status category and whether it is error it will be sent for processing to corresponding methods. +/// +/// - Parameter status: Status object which has been received from **PubNub** network. - (void)handleSubscriptionStatus:(PNSubscribeStatus *)status; -/** - * @brief Process successful subscription status. - * - * @discussion Success can be called as result of initial subscription successful ACK response as - * well as long-poll response with events from remote data objects live feed. - * - * @param status Status object which has been received from \b PubNub network. - */ +/// Process successful subscription status. +/// +/// Success can be called as result of initial subscription successful ACK response as well as long-poll response with +/// events from remote data objects live feed. +/// +/// - Parameter status: Status object which has been received from **PubNub** network. - (void)handleSuccessSubscriptionStatus:(PNSubscribeStatus *)status; -/** - * @brief Process failed subscription status. - * - * @discussion Failure can be cause by Access Denied error, network issues or called when last - * subscribe request has been canceled (to execute new subscription for example). - * - * @param status Status object which has been received from \b PubNub network. - */ +/// Process failed subscription status. +/// +/// Failure can be cause by Access Denied error, network issues or called when last subscribe request has been canceled +/// (to execute new subscription for example). +/// +/// - Parameter status: Status object which has been received from **PubNub** network. - (void)handleFailedSubscriptionStatus:(PNSubscribeStatus *)status; -/** - * @brief Handle subscription time token received from \b PubNub network. - * - * @param initialSubscription Whether subscription is initial or received time token on long-poll - * request. - * @param timeToken Time token which has been received from \b PubNub network. - * @param region \b PubNub server region identifier (which generated \c timeToken value). - */ +/// Handle subscription time token received from **PubNub** network. +/// +/// - Parameters: +/// - initialSubscription: Whether subscription is initial or received time token on long-poll request. +/// - timeToken: Time token which has been received from **PubNub** network. +/// - region: **PubNub** server region identifier (which generated `timeToken` value). - (void)handleSubscription:(BOOL)initialSubscription timeToken:(nullable NSNumber *)timeToken region:(nullable NSNumber *)region; -/** - * @brief Handle long-poll service response and deliver events to listeners if required. - * - * @param status Status object which has been received from \b PubNub network. - * @param initialSubscription Whether message has been received in response on initial subscription - * request. - * @param overrideTimeToken Timetoken which is used to override timetoken which has been received - * during initial subscription. - */ +/// Handle long-poll service response and deliver events to listeners if required. +/// +/// - Parameters: +/// - status: Status object which has been received from **PubNub** network. +/// - initialSubscription: Whether message has been received in response on initial subscription request. +/// - overrideTimeToken: Timetoken which is used to override timetoken which has been received during initial +/// subscription. - (void)handleLiveFeedEvents:(PNSubscribeStatus *)status forInitialSubscription:(BOOL)initialSubscription overrideTimeToken:(nullable NSNumber *)overrideTimeToken; -/** - * @brief Process message which just has been received from \b PubNub service through live feed on - * which client subscribed at this moment. - * - * @param data Result data which hold information about request on which this response has been - * received and message itself. - */ -- (void)handleNewMessage:(PNMessageResult *)data; - -/** - * @brief Process \c signal which just has been received from \b PubNub service through live feed on - * which client subscribed at this moment. - * - * @param data Result data which hold information about request on which this response has been - * received and message itself. - * - * @since 4.9.0 - */ -- (void)handleNewSignal:(PNSignalResult *)data; - -/** - * @brief Process \c message \c action which just has been received from \b PubNub service - * through live feed on which client subscribed at this moment. - * - * @param data Result data which hold information about request on which this response has been - * received and message itself. - * - * @since 4.11.0 - */ -- (void)handleNewMessageAction:(PNMessageActionResult *)data; - -/** - * @brief Process \c objects API event which just has been received from \b PubNub service through - * live feed on which client subscribed at this moment. - * - * @param data Result data which hold information about request on which this response has been - * received and message itself. - * - * @since 4.10.0 - */ -- (void)handleNewObjectsEvent:(PNOperationResult *)data; - -/** - * @brief Process \c files API event which just has been received from \b PubNub service through - * live feed on which client subscribed at this moment. - * - * @param data Result data which hold information about request on which this response has been - * received and message itself. - * - * @since 4.15.0 - */ -- (void)handleNewFileEvent:(PNFileEventResult *)data; - -/** - * @brief Process presence event which just has been received from \b PubNub service through - * presence live feeds on which client subscribed at this moment. - * - * @param data Result data which hold information about request on which this response has been - * received and presence event itself. - */ -- (void)handleNewPresenceEvent:(PNPresenceEventResult *)data; +/// Process message which just has been received from **PubNub** service through live feed on which client subscribed at +/// this moment. +/// +/// - Parameter message: Result data which hold information about request on which this response has been received and +/// message itself. +- (void)handleNewMessage:(PNMessageResult *)message; + +/// Process `signal` which just has been received from **PubNub** service through live feed on which client subscribed +/// at this moment. +/// +/// - Parameter signal: Result data which hold information about request on which this response has been received and +/// message itself. +- (void)handleNewSignal:(PNSignalResult *)signal; + +/// Process `message action` which just has been received from **PubNub** service through live feed on which client +/// subscribed at this moment. +/// +/// - Parameter action: Result data which hold information about request on which this response has been received and +/// message itself. +- (void)handleNewMessageAction:(PNMessageActionResult *)action; + +/// Process `objects` API event which just has been received from **PubNub** service through live feed on which client +/// subscribed at this moment. +/// +/// - Parameter object: Result data which hold information about request on which this response has been received and +/// message itself. +- (void)handleNewObjectsEvent:(PNOperationResult *)object; + +/// Process `files` API event which just has been received from **PubNub** service through live feed on which client +/// subscribed at this moment. +/// +/// - Parameter file: Result data which hold information about request on which this response has been received and +/// message itself. +- (void)handleNewFileEvent:(PNFileEventResult *)file; + +/// Process presence event which just has been received from **PubNub** service through presence live feeds on which +/// client subscribed at this moment. +/// +/// - Parameter presence: Result data which hold information about request on which this response has been received and +/// presence event itself. +- (void)handleNewPresenceEvent:(PNPresenceEventResult *)presence; #pragma mark - Misc -/** - * @brief Compose request parameters instance basing on current subscriber state. - * - * @param state Merged client state which should be used in request. - * - * @return Configured and ready to use parameters instance. - */ -- (PNRequestParameters *)subscribeRequestParametersWithState:(nullable NSDictionary *)state; - -/** - * @brief Clean up \c events list from messages which has been already received. - * - * @discussion Use messages cache to identify message duplicates and remove them from input - * \c events list so listeners won't receive them through callback methods again. - * - * @warning Method should be called within resource access queue to prevent race of conditions. - * - * @param events List of received events from real-time channels and should be clean up from message - * duplicates. - * - * @since 4.5.8 - */ -- (void)deDuplicateMessages:(NSMutableArray *)events; - -/** - * @brief Remove from messages cache those who has date same or newer than passed \c timetoken. - * - * @discussion Method used for subscriptions where user pass specific \c timetoken to which client - * should catch up. It expensive to run, but subscriptions to specific \c timetoken pretty rare and - * shouldn't affect overall performance. - * - * @warning Method should be called within resource access queue to prevent race of conditions. - */ +/// Compose request basing on current subscriber state. +/// +/// - Parameter state: Merged client state which should be used in request. +/// - Returns: Ready to use subscribe request. +- (PNSubscribeRequest *)subscribeRequestWithState:(nullable NSDictionary *)state; + +/// Clean up `events` list from messages which has been already received. +/// +/// Use messages cache to identify message duplicates and remove them from input `events` list so listeners won't +/// receive them through callback methods again. +/// +/// > Warning: Method should be called within resource access queue to prevent race of conditions. +/// +/// - Parameter events: List of received events from real-time channels and should be clean up from message duplicates. +- (void)deDuplicateMessages:(NSMutableArray *)events; + +/// Remove from messages cache those who has date same or newer than passed `timetoken`. +/// +/// Method used for subscriptions where user pass specific `timetoken` to which client should catch up. It expensive to +/// run, but subscriptions to specific `timetoken` pretty rare and shouldn't affect overall performance. +/// +/// > Warning: Method should be called within resource access queue to prevent race of conditions. +/// +/// - Parameter timetoken: High-precision **PubNub** timetoken which will be to filter out older messages. - (void)clearCacheFromMessagesNewerThan:(NSNumber *)timetoken; -/** - * @brief Store to cache passed \c object. - - * @discussion This method used by 'de-dupe' logic to identify unique objects about which object - * listeners should be notified. - - * @warning Method should be called within resource access queue to prevent race of conditions. - * - * @param object Reference on object which client should try to store in cache. - * @param size Maximum number of objects which can be stored in cache and used during messages - * de-duplication process. - * - * @return \c YES in case if object successfully stored in cache and object listeners should be - * notified about it. - * - * @since 4.5.8 - */ -- (BOOL)cacheObjectIfPossible:(NSDictionary *)object withMaximumCacheSize:(NSUInteger)size; - -/** - * @brief Shrink messages cache size to specified size if required. - * - * @param maximumCacheSize Messages cache maximum size. - * - * @since 4.5.8 - */ +/// Store to cache passed `object`. +/// +/// This method used by `de-dupe` logic to identify unique objects about which object listeners should be notified. +/// +/// > Warning: Method should be called within resource access queue to prevent race of conditions. +/// +/// - Parameters: +/// - object: Reference on object which client should try to store in cache. +/// - size: Maximum number of objects which can be stored in cache and used during messages de-duplication process. +/// - Returns: `YES` in case if object successfully stored in cache and object listeners should be notified about it. +- (BOOL)cacheObjectIfPossible:(PNSubscribeMessageEventData *)object withMaximumCacheSize:(NSUInteger)size; + +/// Shrink messages cache size to specified size if required. +/// +/// - Parameter maximumCacheSize: Messages cache maximum size. - (void)cleanUpCachedObjectsIfRequired:(NSUInteger)maximumCacheSize; -/** - * @brief Append subscriber information to status object. - * - * @param status Reference on status object which should be updated with subscriber information. - */ +/// Append subscriber information to status object. +/// +/// - Parameter status: Reference on status object which should be updated with subscriber information. - (void)appendSubscriberInformation:(PNStatus *)status; #pragma mark - @@ -517,31 +367,30 @@ - (void)appendSubscriberInformation:(PNStatus *)status; @implementation PNSubscriber @synthesize restoringAfterNetworkIssues = _restoringAfterNetworkIssues; -@synthesize retryTimer = _retryTimer; +@synthesize currentTimeTokenRegion = _currentTimeTokenRegion; +@synthesize lastTimeTokenRegion = _lastTimeTokenRegion; @synthesize overrideTimeToken = _overrideTimeToken; @synthesize currentTimeToken = _currentTimeToken; @synthesize lastTimeToken = _lastTimeToken; -@synthesize currentTimeTokenRegion = _currentTimeTokenRegion; -@synthesize lastTimeTokenRegion = _lastTimeTokenRegion; -@synthesize filterExpression = _filterExpression; +@synthesize retryTimer = _retryTimer; -#pragma mark - Information +#pragma mark - Properties - (dispatch_source_t)retryTimer { __block dispatch_source_t retryTimer = nil; - - pn_safe_property_read(self.resourceAccessQueue, ^{ + + [self.lock readAccessWithBlock:^{ retryTimer = self->_retryTimer; - }); - + }]; + return retryTimer; } - (void)setRetryTimer:(dispatch_source_t)retryTimer { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ self->_retryTimer = retryTimer; - }); + }]; } @@ -550,17 +399,17 @@ - (void)setRetryTimer:(dispatch_source_t)retryTimer { - (BOOL)restoringAfterNetworkIssues { __block BOOL restoring = NO; - pn_safe_property_read(self.resourceAccessQueue, ^{ + [self.lock readAccessWithBlock:^{ restoring = self->_restoringAfterNetworkIssues; - }); - + }]; + return restoring; } - (void)setRestoringAfterNetworkIssues:(BOOL)restoringAfterNetworkIssues { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ self->_restoringAfterNetworkIssues = restoringAfterNetworkIssues; - }); + }]; } - (NSArray *)allObjects { @@ -571,15 +420,15 @@ - (void)setRestoringAfterNetworkIssues:(BOOL)restoringAfterNetworkIssues { - (NSArray *)channels { __block NSArray *channels = nil; - pn_safe_property_read(self.resourceAccessQueue, ^{ + [self.lock readAccessWithBlock:^{ channels = self.channelsSet.allObjects; - }); - + }]; + return channels; } - (void)addChannels:(NSArray *)channels { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ NSArray *channelsOnly = [PNChannel objectsWithOutPresenceFrom:channels]; if ([channelsOnly count] != [channels count]) { @@ -589,146 +438,145 @@ - (void)addChannels:(NSArray *)channels { } [self.channelsSet addObjectsFromArray:channelsOnly]; - }); + }]; } - (void)removeChannels:(NSArray *)channels { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ NSSet *channelsSet = [NSSet setWithArray:channels]; [self.presenceChannelsSet minusSet:channelsSet]; [self.channelsSet minusSet:channelsSet]; - }); + }]; } - (NSArray *)channelGroups { __block NSArray *channelGroups = nil; - pn_safe_property_read(self.resourceAccessQueue, ^{ + [self.lock readAccessWithBlock:^{ channelGroups = self.channelGroupsSet.allObjects; - }); - + }]; + return channelGroups; } - (void)addChannelGroups:(NSArray *)groups { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ [self.channelGroupsSet addObjectsFromArray:groups]; - }); + }]; } - (void)removeChannelGroups:(NSArray *)groups { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ [self.channelGroupsSet minusSet:[NSSet setWithArray:groups]]; - }); + }]; } - (NSArray *)presenceChannels { __block NSArray *presenceChannels = nil; - pn_safe_property_read(self.resourceAccessQueue, ^{ + [self.lock readAccessWithBlock:^{ presenceChannels = self.presenceChannelsSet.allObjects; - }); - + }]; + return presenceChannels; } - (void)addPresenceChannels:(NSArray *)presenceChannels { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ [self.presenceChannelsSet addObjectsFromArray:presenceChannels]; - }); + }]; } - (void)removePresenceChannels:(NSArray *)presenceChannels { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ [self.presenceChannelsSet minusSet:[NSSet setWithArray:presenceChannels]]; - }); + }]; } - (NSNumber *)currentTimeToken { __block NSNumber *currentTimeToken = nil; - pn_safe_property_read(self.resourceAccessQueue, ^{ + [self.lock readAccessWithBlock:^{ currentTimeToken = self->_currentTimeToken; - }); - + }]; + return currentTimeToken; } - (void)setCurrentTimeToken:(NSNumber *)currentTimeToken { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ self->_currentTimeToken = currentTimeToken; - }); + }]; } - (NSNumber *)lastTimeToken { __block NSNumber *lastTimeToken = nil; - - pn_safe_property_read(self.resourceAccessQueue, ^{ + + [self.lock readAccessWithBlock:^{ lastTimeToken = self->_lastTimeToken; - }); - + }]; + return lastTimeToken; } - (void)setLastTimeToken:(NSNumber *)lastTimeToken { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ self->_lastTimeToken = lastTimeToken; - }); + }]; } - (NSNumber *)overrideTimeToken { __block NSNumber *overrideTimeToken = nil; - - pn_safe_property_read(self.resourceAccessQueue, ^{ + + [self.lock readAccessWithBlock:^{ overrideTimeToken = self->_overrideTimeToken; - }); - + }]; + return overrideTimeToken; } - (void)setOverrideTimeToken:(NSNumber *)overrideTimeToken { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ self->_overrideTimeToken = [PNNumber timeTokenFromNumber:overrideTimeToken]; - }); + }]; } - (NSNumber *)currentTimeTokenRegion { __block NSNumber *currentTimeTokenRegion = nil; - pn_safe_property_read(self.resourceAccessQueue, ^{ + [self.lock readAccessWithBlock:^{ currentTimeTokenRegion = self->_currentTimeTokenRegion; - }); - + }]; + return currentTimeTokenRegion; } - (void)setCurrentTimeTokenRegion:(NSNumber *)currentTimeTokenRegion { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ self->_currentTimeTokenRegion = currentTimeTokenRegion; - }); + }]; } - (NSNumber *)lastTimeTokenRegion { __block NSNumber *lastTimeTokenRegion = nil; - pn_safe_property_read(self.resourceAccessQueue, ^{ + [self.lock readAccessWithBlock:^{ lastTimeTokenRegion = self->_lastTimeTokenRegion; - }); - + }]; + return lastTimeTokenRegion; } - (void)setLastTimeTokenRegion:(NSNumber *)lastTimeTokenRegion { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ self->_lastTimeTokenRegion = lastTimeTokenRegion; - }); + }]; } - (void)updateStateTo:(PNSubscriberState)state - withStatus:(PNSubscribeStatus *)status + withStatus:(PNStatus *)status completion:(void(^)(PNStatusCategory category))block { - - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ // Compose status object to report state change to listeners. PNStatusCategory category = PNUnknownCategory; PNSubscriberState targetState = state; @@ -745,9 +593,7 @@ - (void)updateStateTo:(PNSubscriberState)state currentState == PNConnectedSubscriberState); // Check whether client transit from 'access denied' -> 'connected' state. - if (!shouldHandleTransition) { - shouldHandleTransition = currentState == PNAccessRightsErrorSubscriberState; - } + if (!shouldHandleTransition) shouldHandleTransition = currentState == PNAccessRightsErrorSubscriberState; // Check whether client transit from 'unexpected disconnect' -> 'connected' state if (!shouldHandleTransition && currentState == PNDisconnectedUnexpectedlySubscriberState) { @@ -800,14 +646,13 @@ - (void)updateStateTo:(PNSubscriberState)state // Check whether allowed state transition has been issued or not. if (shouldHandleTransition) { self->_currentState = targetState; - + /** * Build status object in case if update has been called as transition between two different states. */ - PNStatus *targetStatus = [(PNStatus *)status copy]; + PNStatus *targetStatus = [status copy]; if (!targetStatus) { - targetStatus = [PNStatus statusForOperation:PNSubscribeOperation - category:category withProcessingError:nil]; + targetStatus = [PNStatus objectWithOperation:PNSubscribeOperation category:category response:nil]; } [targetStatus updateCategory:category]; @@ -816,16 +661,14 @@ - (void)updateStateTo:(PNSubscriberState)state [self.client.listenersManager notifyWithBlock:^{ [self.client.listenersManager notifyStatusChange:(PNSubscribeStatus *)targetStatus]; }]; - } else { - category = (status ? status.category : PNUnknownCategory); - } + } else category = status ? status.category : PNUnknownCategory; if (block) { pn_dispatch_async(self.client.callbackQueue, ^{ block(category); }); } - }); + }]; } @@ -848,17 +691,16 @@ - (instancetype)initForClient:(PubNub *)client { _cachedObjects = [NSMutableDictionary new]; _currentTimeToken = @0; _lastTimeToken = @0; - _resourceAccessQueue = dispatch_queue_create("com.pubnub.subscriber", - DISPATCH_QUEUE_CONCURRENT); + _lock = [PNLock lockWithIsolationQueueName:@"subscriber" subsystemQueueIdentifier:@"com.pubnub.subscriber"]; } return self; } - (void)inheritStateFromSubscriber:(PNSubscriber *)subscriber { - _channelsSet = [subscriber.channelsSet mutableCopy]; - _channelGroupsSet = [subscriber.channelGroupsSet mutableCopy]; _presenceChannelsSet = [subscriber.presenceChannelsSet mutableCopy]; + _channelGroupsSet = [subscriber.channelGroupsSet mutableCopy]; + _channelsSet = [subscriber.channelsSet mutableCopy]; if (_channelsSet.count || _channelGroupsSet.count || _presenceChannelsSet.count) { _currentState = PNDisconnectedSubscriberState; @@ -866,67 +708,51 @@ - (void)inheritStateFromSubscriber:(PNSubscriber *)subscriber { _cachedObjects = [subscriber.cachedObjects mutableCopy]; _cachedObjectIdentifiers = [subscriber.cachedObjectIdentifiers mutableCopy]; - _currentTimeToken = subscriber.currentTimeToken; - _lastTimeToken = subscriber.lastTimeToken; _currentTimeTokenRegion = subscriber.currentTimeTokenRegion; _lastTimeTokenRegion = subscriber.lastTimeTokenRegion; - _escapedFilterExpression = subscriber.escapedFilterExpression; + _currentTimeToken = subscriber.currentTimeToken; + _lastTimeToken = subscriber.lastTimeToken; } -#pragma mark - Filtering - -- (NSString *)filterExpression { - __block NSString *expression = nil; - - pn_safe_property_read(self.resourceAccessQueue, ^{ - expression = self->_filterExpression; - }); - - return expression; -} - -- (void)setFilterExpression:(NSString *)filterExpression { - pn_safe_property_write(self.resourceAccessQueue, ^{ - self->_filterExpression = [filterExpression copy]; - self->_escapedFilterExpression = (filterExpression ? [PNString percentEscapedString:filterExpression] - : nil); - }); -} +#pragma mark - Subscription -- (NSString *)escapedFilterExpression { - __block NSString *expression = nil; - - pn_safe_property_read(self.resourceAccessQueue, ^{ - expression = self->_escapedFilterExpression; - }); - - return expression; -} +- (void)subscribeWithRequest:(PNSubscribeRequest *)request { + BOOL shouldObservePresence = request.shouldObservePresence; + NSArray *groups = request.channelGroups; + NSArray *channels = request.channels; + if (request.presenceOnly) { + [self addPresenceChannels:[PNChannel presenceChannelsFrom:channels]]; + } else { + if (channels.count) { + NSArray *presenceList = shouldObservePresence ? [PNChannel presenceChannelsFrom:channels] : nil; + NSArray *channelsForAddition = [channels arrayByAddingObjectsFromArray:presenceList]; + [self addChannels:channelsForAddition]; + } -#pragma mark - Subscription + if (groups.count) { + NSArray *presenceList = shouldObservePresence ? [PNChannel presenceChannelsFrom:groups] : nil; + NSArray *groupsForAddition = [groups arrayByAddingObjectsFromArray:presenceList]; + [self addChannelGroups:groupsForAddition]; + } + } -- (void)subscribeUsingTimeToken:(NSNumber *)timeToken - withState:(NSDictionary *)state - queryParameters:(NSDictionary *)queryParameters - completion:(PNSubscriberCompletionBlock)block { - self.restoringAfterNetworkIssues = NO; - - [self subscribe:YES - usingTimeToken:timeToken - withState:state - queryParameters:queryParameters - completion:block]; + [self subscribe:YES + usingTimeToken:request.timetoken + withState:request.state + queryParameters:request.arbitraryQueryParameters + completion:nil]; + } - (void)subscribe:(BOOL)initialSubscribe usingTimeToken:(NSNumber *)timeToken withState:(NSDictionary *)state queryParameters:(NSDictionary *)queryParameters - completion:(PNSubscriberCompletionBlock)block; { - + completion:(PNSubscriberCompletionBlock)handlerBlock; { + PNSubscriberCompletionBlock block = [handlerBlock copy]; [self stopRetryTimer]; /** @@ -938,16 +764,13 @@ - (void)subscribe:(BOOL)initialSubscribe #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" if ([self allObjects].count) { - if (!self.restoringAfterNetworkIssues) { - self.overrideTimeToken = timeToken; - } + if (!self.restoringAfterNetworkIssues) self.overrideTimeToken = timeToken; if (initialSubscribe) { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ self.mayRequireSubscriptionRestore = NO; - if (self->_currentTimeToken && - [self->_currentTimeToken compare:@0] != NSOrderedSame) { + if (self->_currentTimeToken && [self->_currentTimeToken compare:@0] != NSOrderedSame) { self->_lastTimeToken = self->_currentTimeToken; } @@ -960,54 +783,53 @@ - (void)subscribe:(BOOL)initialSubscribe self->_currentTimeToken = @0; self->_currentTimeTokenRegion = @(-1); - }); + }]; } - PNRequestParameters *parameters = [self subscribeRequestParametersWithState:state]; - [parameters addQueryParameters:queryParameters]; - + PNSubscribeRequest *request = [self subscribeRequestWithState:state]; + request.arbitraryQueryParameters = queryParameters; + if (initialSubscribe) { PNLogAPICall(self.client.logger, @" Subscribe (channels: %@; groups: %@)%@", - parameters.pathComponents[@"{channels}"], parameters.query[@"channel-group"], + [request.channels componentsJoinedByString:@", "], + [request.channelGroups componentsJoinedByString:@", "], (timeToken ? [NSString stringWithFormat:@" with catch up from %@.", timeToken] : @".")); } else if (block) { - PNSubscribeStatus *status = [PNSubscribeStatus statusForOperation:PNSubscribeOperation - category:PNConnectedCategory - withProcessingError:nil]; + PNSubscribeStatus *status = [PNSubscribeStatus objectWithOperation:PNSubscribeOperation + category:PNConnectedCategory + response:nil]; + [self.client appendClientInformation:status]; block(status); block = nil; } - __weak __typeof(self) weakSelf = self; - [self.client processOperation:PNSubscribeOperation - withParameters:parameters - completionBlock:^(PNStatus *status){ - - __strong __typeof(self) strongSelf = weakSelf; - [strongSelf handleSubscriptionStatus:(PNSubscribeStatus *)status]; - - if (block) { - pn_dispatch_async(weakSelf.client.callbackQueue, ^{ - block((PNSubscribeStatus *)status); - }); - } - }]; + PNWeakify(self); + [self.client subscribeWithRequest:request completion:^(PNSubscribeStatus *status) { + PNStrongify(self); + [self handleSubscriptionStatus:(PNSubscribeStatus *)status]; + + if (block) { + pn_dispatch_async(self.client.callbackQueue, ^{ + block((PNSubscribeStatus *)status); + }); + } + }]; } else { - PNStatus *status = [PNStatus statusForOperation:PNSubscribeOperation - category:PNDisconnectedCategory - withProcessingError:nil]; + PNStatus *status = [PNStatus objectWithOperation:PNSubscribeOperation + category:PNDisconnectedCategory + response:nil]; [self.client appendClientInformation:status]; - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ self->_lastTimeToken = @0; self->_currentTimeToken = @0; self->_lastTimeTokenRegion = @(-1); self->_currentTimeTokenRegion = @(-1); self->_restoringAfterNetworkIssues = NO; self->_overrideTimeToken = nil; - }); - + }]; + if (block) { pn_dispatch_async(self.client.callbackQueue, ^{ block((PNSubscribeStatus *)status); @@ -1017,10 +839,9 @@ - (void)subscribe:(BOOL)initialSubscribe [self updateStateTo:PNDisconnectedSubscriberState withStatus:(PNSubscribeStatus *)status completion:^(PNStatusCategory category) { - [self.client cancelSubscribeOperations]; [status updateCategory:category]; - + [self.client callBlock:nil status:YES withResult:nil andStatus:status]; }]; } @@ -1031,43 +852,66 @@ - (void)restoreSubscriptionCycleIfRequiredWithCompletion:(PNSubscriberCompletion __block BOOL shouldStopRetryTimer; __block BOOL shouldRestore; __block BOOL ableToRestore; - - - pn_safe_property_read(self.resourceAccessQueue, ^{ + + [self.lock readAccessWithBlock:^{ shouldStopRetryTimer = self.currentState == PNAccessRightsErrorSubscriberState; shouldRestore = (shouldStopRetryTimer || (self.currentState == PNDisconnectedUnexpectedlySubscriberState && self.mayRequireSubscriptionRestore)); - ableToRestore = ([self.channelsSet count] || [self.channelGroupsSet count] || - [self.presenceChannelsSet count]); - }); - - if (shouldStopRetryTimer) { - [self stopRetryTimer]; - } - + ableToRestore = [self.channelsSet count] || [self.channelGroupsSet count] || + [self.presenceChannelsSet count]; + }]; + + if (shouldStopRetryTimer) [self stopRetryTimer]; if (shouldRestore && ableToRestore) { self.restoringAfterNetworkIssues = YES; [self subscribe:YES usingTimeToken:nil withState:nil queryParameters:nil completion:block]; - } else if (block) { - block(nil); - } + } else if (block) block(nil); } - (void)continueSubscriptionCycleIfRequiredWithCompletion:(PNSubscriberCompletionBlock)block { [self subscribe:NO usingTimeToken:nil withState:nil queryParameters:nil completion:block]; } +- (void)unsubscribeWithRequest:(PNPresenceLeaveRequest *)request completion:(PNSubscriberCompletionBlock)block { + BOOL shouldObservePresence = request.shouldObservePresence; + NSArray *groups = request.channelGroups; + NSArray *channels = request.channels; + + if (request.presenceOnly) { + channels = [PNChannel presenceChannelsFrom:channels]; + [self removePresenceChannels:channels]; + groups = nil; + } else { + if (channels.count) { + NSArray *presenceList = shouldObservePresence ? [PNChannel presenceChannelsFrom:channels] : nil; + NSArray *channelsForRemoval = [channels arrayByAddingObjectsFromArray:presenceList]; + [self removeChannels:channelsForRemoval]; + } + + if (groups.count) { + NSArray *presenceList = shouldObservePresence ? [PNChannel presenceChannelsFrom:groups] : nil; + NSArray *groupsForRemoval = [groups arrayByAddingObjectsFromArray:presenceList]; + [self removeChannelGroups:groupsForRemoval]; + } + } + + [self unsubscribeFromChannels:channels + groups:groups + withQueryParameters:request.arbitraryQueryParameters + listenersNotification:YES + completion:block]; +} + - (void)unsubscribeFromAllWithQueryParameters:(NSDictionary *)queryParameters - completion:(void (^)(PNStatus *status))block { - - NSArray *channels = [self.channels copy]; + completion:(PNSubscriberCompletionBlock)block { NSArray *channelGroups = [self.channelGroups copy]; + NSArray *channels = [self.channels copy]; if (channels.count || channelGroups.count) { PNLogAPICall(self.client.logger, @" Unsubscribe from all"); - + [self removeChannels:channels]; [self removePresenceChannels:self.presenceChannels]; [self removeChannelGroups:channelGroups]; @@ -1085,7 +929,6 @@ - (void)unsubscribeFromChannels:(NSArray *)channels withQueryParameters:(NSDictionary *)queryParameters listenersNotification:(BOOL)shouldInformListener completion:(PNSubscriberCompletionBlock)block { - [self unsubscribeFromChannels:channels groups:groups withQueryParameters:queryParameters @@ -1100,13 +943,6 @@ - (void)unsubscribeFromChannels:(NSArray *)channels listenersNotification:(BOOL)shouldInformListener subscribeOnRest:(BOOL)subscribeOnRestChannels completion:(nullable PNSubscriberCompletionBlock)block { - - /** - * Silence static analyzer warnings. - * Code is aware about this case and at the end will simply call on 'nil' object method. - * In most cases if referenced object become 'nil' it mean what there is no more need in - * it and probably whole client instance has been deallocated. - */ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" [self.client.clientStateManager removeStateForObjects:channels]; @@ -1114,118 +950,93 @@ - (void)unsubscribeFromChannels:(NSArray *)channels NSArray *channelsWithOutPresence = nil; NSArray *groupsWithOutPresence = nil; - if (channels.count) { - channelsWithOutPresence = [PNChannel objectsWithOutPresenceFrom:channels]; - } - - if (groups.count) { - groupsWithOutPresence = [PNChannel objectsWithOutPresenceFrom:groups]; - } + if (channels.count) channelsWithOutPresence = [PNChannel objectsWithOutPresenceFrom:channels]; + if (groups.count) groupsWithOutPresence = [PNChannel objectsWithOutPresenceFrom:groups]; - PNAcknowledgmentStatus *successStatus = [PNAcknowledgmentStatus statusForOperation:PNUnsubscribeOperation - category:PNAcknowledgmentCategory - withProcessingError:nil]; + PNAcknowledgmentStatus *successStatus = [PNAcknowledgmentStatus objectWithOperation:PNUnsubscribeOperation + category:PNAcknowledgmentCategory + response:nil]; [self.client appendClientInformation:successStatus]; - __weak __typeof(self) weakSelf = self; - + +#ifndef PUBNUB_DISABLE_LOGGER PNLogAPICall(self.client.logger, @" Unsubscribe (channels: %@; groups: %@)", [channelsWithOutPresence componentsJoinedByString:@","], [groupsWithOutPresence componentsJoinedByString:@","]); - +#endif // PUBNUB_DISABLE_LOGGER + NSSet *subscriptionObjects = [NSSet setWithArray:[self allObjects]]; if (subscriptionObjects.count == 0) { - pn_safe_property_write(self.resourceAccessQueue, ^{ + [self.lock writeAccessWithBlock:^{ self->_lastTimeToken = @0; self->_currentTimeToken = @0; self->_lastTimeTokenRegion = @(-1); self->_currentTimeTokenRegion = @(-1); self->_restoringAfterNetworkIssues = NO; self->_overrideTimeToken = nil; - }); + }]; } if (channelsWithOutPresence.count || groupsWithOutPresence.count) { - NSString *channelsList = [PNChannel namesForRequest:channelsWithOutPresence defaultString:@","]; - PNRequestParameters *parameters = [PNRequestParameters new]; - - [parameters addQueryParameters:queryParameters]; - [parameters addPathComponent:channelsList forPlaceholder:@"{channels}"]; - - if (groupsWithOutPresence.count) { - [parameters addQueryParameter:[PNChannel namesForRequest:groupsWithOutPresence] - forFieldName:@"channel-group"]; - } + PNPresenceLeaveRequest *request = [PNPresenceLeaveRequest requestWithChannels:channelsWithOutPresence + channelGroups:groupsWithOutPresence]; + request.arbitraryQueryParameters = queryParameters; + PNWeakify(self); void(^updateCompletion)(PNStatusCategory) = ^(PNStatusCategory category) { + PNStrongify(self); + [successStatus updateCategory:category]; - [weakSelf.client callBlock:nil status:YES withResult:nil andStatus:successStatus]; - BOOL listChanged = ![[NSSet setWithArray:[weakSelf allObjects]] isEqualToSet:subscriptionObjects]; - + [self.client callBlock:nil status:YES withResult:nil andStatus:successStatus]; + + BOOL listChanged = ![[NSSet setWithArray:[self allObjects]] isEqualToSet:subscriptionObjects]; + if (subscribeOnRestChannels && (subscriptionObjects.count > 0 && !listChanged)) { - [weakSelf subscribe:NO - usingTimeToken:nil - withState:nil - queryParameters:nil - completion:nil]; + [self subscribe:NO usingTimeToken:nil withState:nil queryParameters:nil completion:nil]; } - + if (block) { - pn_dispatch_async(weakSelf.client.callbackQueue, ^{ + pn_dispatch_async(self.client.callbackQueue, ^{ block((PNSubscribeStatus *)successStatus); }); } }; - void(^unsubscribeCompletionBlock)(PNStatus *) = ^(PNStatus *status1) { + PNSubscriberCompletionBlock unsubscribeCompletionBlock = ^(PNSubscribeStatus *status1) { + PNStrongify(self); if (shouldInformListener) { - PNSubscriberState targetState = PNDisconnectedSubscriberState; - - if (status1.category == PNAccessDeniedCategory) { - targetState = PNAccessRightsErrorSubscriberState; - } - - [weakSelf updateStateTo:targetState - withStatus:(PNSubscribeStatus *)successStatus - completion:updateCompletion]; - } else { - updateCompletion(successStatus.category); - } + PNSubscriberState state = PNDisconnectedSubscriberState; + if (status1.category == PNAccessDeniedCategory) state = PNAccessRightsErrorSubscriberState; + + [self updateStateTo:state withStatus:successStatus completion:updateCompletion]; + } else updateCompletion(successStatus.category); }; + if (!self.client.configuration.shouldSuppressLeaveEvents) { - [self.client processOperation:PNUnsubscribeOperation - withParameters:parameters - completionBlock:unsubscribeCompletionBlock]; - } else { - unsubscribeCompletionBlock(nil); - } + [self.client unsubscribeWithRequest:request completion:unsubscribeCompletionBlock]; + } else unsubscribeCompletionBlock(nil); } else { - [self subscribe:YES - usingTimeToken:nil - withState:nil - queryParameters:nil - completion:^(__unused PNSubscribeStatus *status) { - + PNWeakify(self); + [self subscribe:YES usingTimeToken:nil withState:nil queryParameters:nil completion:^(__unused PNStatus *status) { + PNStrongify(self); + if (block) { - pn_dispatch_async(weakSelf.client.callbackQueue, ^{ + pn_dispatch_async(self.client.callbackQueue, ^{ block((PNSubscribeStatus *)successStatus); }); } void(^updateCompletion)(PNStatusCategory) = ^(PNStatusCategory category) { [successStatus updateCategory:category]; - - [weakSelf.client callBlock:nil status:YES withResult:nil andStatus:successStatus]; + [self.client callBlock:nil status:YES withResult:nil andStatus:successStatus]; }; if (shouldInformListener) { - [weakSelf updateStateTo:PNDisconnectedSubscriberState - withStatus:(PNSubscribeStatus *)successStatus - completion:updateCompletion]; - } else { - updateCompletion(successStatus.category); - } + [self updateStateTo:PNDisconnectedSubscriberState + withStatus:(PNSubscribeStatus *)successStatus + completion:updateCompletion]; + } else updateCompletion(successStatus.category); }]; } #pragma clang diagnostic pop @@ -1251,11 +1062,7 @@ - (void)startRetryTimer { - (void)stopRetryTimer { dispatch_source_t timer = [self retryTimer]; - - if (timer != NULL && dispatch_source_testcancel(timer) == 0) { - dispatch_source_cancel(timer); - } - + if (timer != NULL && dispatch_source_testcancel(timer) == 0) dispatch_source_cancel(timer); self.retryTimer = nil; } @@ -1264,41 +1071,24 @@ - (void)stopRetryTimer { - (void)handleSubscriptionStatus:(PNSubscribeStatus *)status { [self stopRetryTimer]; - - if (!status.isError && status.category != PNCancelledCategory) { - [self handleSuccessSubscriptionStatus:status]; - } else { - [self handleFailedSubscriptionStatus:status]; - } + + if (!status.isError && status.category != PNCancelledCategory) [self handleSuccessSubscriptionStatus:status]; + else [self handleFailedSubscriptionStatus:status]; } - (void)handleSuccessSubscriptionStatus:(PNSubscribeStatus *)status { - BOOL isInitialSubscription = ([status.clientRequest.URL.query rangeOfString:@"tt=0"].location != NSNotFound); NSNumber *overrideTimeToken = self.overrideTimeToken; + BOOL initialSubscribe = status.isInitialSubscription; + + [self handleSubscription:initialSubscribe timeToken:status.data.cursor.timetoken region:status.data.cursor.region]; + [self handleLiveFeedEvents:status forInitialSubscription:initialSubscribe overrideTimeToken:overrideTimeToken]; - if (status.data.timetoken != nil && status.clientRequest.URL != nil) { - [self handleSubscription:isInitialSubscription - timeToken:status.data.timetoken - region:status.data.region]; - } - - [self handleLiveFeedEvents:status - forInitialSubscription:isInitialSubscription - overrideTimeToken:overrideTimeToken]; - if (!self.client.configuration.shouldManagePresenceListManually) { - /** - * Because client received new event from service, it can restart reachability timer with new interval. - */ [self.client.heartbeatManager startHeartbeatIfRequired]; } - - - if (status.clientRequest.URL != nil && isInitialSubscription) { - [self updateStateTo:PNConnectedSubscriberState - withStatus:status - completion:^(PNStatusCategory category) { - + + if (initialSubscribe) { + [self updateStateTo:PNConnectedSubscriberState withStatus:status completion:^(PNStatusCategory category) { [status updateCategory:category]; [self.client callBlock:nil status:YES withResult:nil andStatus:(PNStatus *)status]; }]; @@ -1306,15 +1096,8 @@ - (void)handleSuccessSubscriptionStatus:(PNSubscribeStatus *)status { } - (void)handleFailedSubscriptionStatus:(PNSubscribeStatus *)status { - PNStatusCategory statusCategory = status.category; - - /** - * Silence static analyzer warnings. - * Code is aware about this case and at the end will simply call on 'nil' object method. - * In most cases if referenced object become 'nil' it mean what there is no more need in - * it and probably whole client instance has been deallocated. - */ + #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" if (statusCategory == PNCancelledCategory) { @@ -1330,6 +1113,8 @@ - (void)handleFailedSubscriptionStatus:(PNSubscribeStatus *)status { statusCategory == PNTLSConnectionFailedCategory) { __weak __typeof(self) weakSelf = self; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" ((PNStatus *)status).automaticallyRetry = (statusCategory != PNMalformedFilterExpressionCategory && statusCategory != PNRequestURITooLongCategory); PNSubscriberState subscriberState = PNAccessRightsErrorSubscriberState; @@ -1337,13 +1122,12 @@ - (void)handleFailedSubscriptionStatus:(PNSubscribeStatus *)status { PNLogAPICall(weakSelf.client.logger, @" Cancel retry"); [weakSelf stopRetryTimer]; }; - if (((PNStatus *)status).willAutomaticallyRetry) { ((PNStatus *)status).requireNetworkAvailabilityCheck = NO; - [self startRetryTimer]; } - +#pragma clang diagnostic pop + if (statusCategory == PNMalformedFilterExpressionCategory) { subscriberState = PNMalformedFilterExpressionErrorSubscriberState; } else if(statusCategory == PNRequestURITooLongCategory) { @@ -1361,12 +1145,15 @@ - (void)handleFailedSubscriptionStatus:(PNSubscribeStatus *)status { [self updateStateTo:subscriberState withStatus:status completion:nil]; } else { ((PNStatus *)status).requireNetworkAvailabilityCheck = YES; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" ((PNStatus *)status).automaticallyRetry = YES; ((PNStatus *)status).retryCancelBlock = ^{ /* Do nothing, because we can't stop auto-retry in case of network issues. It handled by client configuration. */ }; - - pn_safe_property_write(self.resourceAccessQueue, ^{ +#pragma clang diagnostic pop + + [self.lock writeAccessWithBlock:^{ if (self.client.configuration.shouldTryCatchUpOnSubscriptionRestore) { if (self->_currentTimeToken && [self->_currentTimeToken compare:@0] != NSOrderedSame) { @@ -1388,8 +1175,8 @@ - (void)handleFailedSubscriptionStatus:(PNSubscribeStatus *)status { self->_currentTimeTokenRegion = @(-1); self->_lastTimeTokenRegion = @(-1); } - }); - + }]; + [(PNStatus *)status updateCategory:PNUnexpectedDisconnectCategory]; if (!self.client.configuration.shouldManagePresenceListManually) { @@ -1404,11 +1191,8 @@ - (void)handleFailedSubscriptionStatus:(PNSubscribeStatus *)status { #pragma clang diagnostic pop } -- (void)handleSubscription:(BOOL)initialSubscription - timeToken:(NSNumber *)timeToken - region:(NSNumber *)region { - - pn_safe_property_write(self.resourceAccessQueue, ^{ +- (void)handleSubscription:(BOOL)initialSubscription timeToken:(NSNumber *)timeToken region:(NSNumber *)region { + [self.lock writeAccessWithBlock:^{ BOOL restoringAfterNetworkIssues = self->_restoringAfterNetworkIssues; self->_restoringAfterNetworkIssues = NO; BOOL shouldAcceptNewTimeToken = YES; @@ -1416,13 +1200,7 @@ - (void)handleSubscription:(BOOL)initialSubscription // Whether time token should be overridden despite subscription behaviour configuration. BOOL shouldOverrideTimeToken = (initialSubscription && self->_overrideTimeToken && [self->_overrideTimeToken compare:@0] != NSOrderedSame); - - /** - * Silence static analyzer warnings. - * Code is aware about this case and at the end will simply call on 'nil' object method. - * In most cases if referenced object become 'nil' it mean what there is no more need in - * it and probably whole client instance has been deallocated. - */ + #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" if (initialSubscription) { @@ -1440,14 +1218,14 @@ - (void)handleSubscription:(BOOL)initialSubscription // previous sessions. if (shouldUseLastTimeToken && self->_lastTimeToken && [self->_lastTimeToken compare:@0] != NSOrderedSame) { - - BOOL keepOnListChange = self.client.configuration.shouldKeepTimeTokenOnListChange; + PNLogResult(self.client.logger, @" Reuse existing subscription loop information " "because of '%@' is set to 'YES' (timetoken = %@, region = %@)", - (keepOnListChange ? @"keepTimeTokenOnListChange" : @"catchUpOnSubscriptionRestore"), + (self.client.configuration.shouldKeepTimeTokenOnListChange + ? @"keepTimeTokenOnListChange" + : @"catchUpOnSubscriptionRestore"), self->_lastTimeToken, self->_lastTimeTokenRegion); - shouldAcceptNewTimeToken = NO; // Swap time tokens to catch up on events which happened while client changed @@ -1463,20 +1241,17 @@ - (void)handleSubscription:(BOOL)initialSubscription // subscription while current time token report 0. if (!initialSubscription && self->_currentTimeToken && [self->_currentTimeToken compare:@0] == NSOrderedSame) { - PNLogResult(self.client.logger, @" Ignore new subscription loop information because " "non-initial subscribe request received when current timetoken is 0 (timetoken = %@, " "region = %@). Potentially delayed request has been processed.", timeToken, region); - shouldAcceptNewTimeToken = NO; } if (shouldAcceptNewTimeToken) { - if (self->_currentTimeToken && [self->_currentTimeToken compare:@0] != NSOrderedSame) { - self->_lastTimeToken = self->_currentTimeToken; } + if (self->_currentTimeTokenRegion && [self->_currentTimeTokenRegion compare:@0] != NSOrderedSame && [self->_currentTimeTokenRegion compare:@(-1)] == NSOrderedDescending) { @@ -1485,207 +1260,160 @@ - (void)handleSubscription:(BOOL)initialSubscription self->_currentTimeToken = (shouldOverrideTimeToken ? self->_overrideTimeToken : timeToken); PNLogResult(self.client.logger, @" Did receive next subscription loop information: " "timetoken = %@, region = %@.%@", timeToken, region, - (shouldOverrideTimeToken ? [NSString stringWithFormat:@" But received timetoken " - "should be replaced with user provided: %@", - self->_overrideTimeToken] : @"")); + shouldOverrideTimeToken + ? [NSString stringWithFormat:@" But received timetoken should be replaced with user provided: %@", + self->_overrideTimeToken] + : @""); self->_currentTimeTokenRegion = region; } self->_overrideTimeToken = nil; - }); + }]; } -- (void)handleLiveFeedEvents:(PNSubscribeStatus *)status forInitialSubscription:(BOOL)initialSubscription - overrideTimeToken:(NSNumber *)overrideTimeToken { - - NSMutableArray *events = [(NSArray *)(status.serviceData)[@"events"] mutableCopy]; - NSUInteger eventsCount = events.count; +- (void)handleLiveFeedEvents:(PNSubscribeStatus *)status forInitialSubscription:(BOOL)initialSubscription overrideTimeToken:(NSNumber *)overrideTimeToken { NSUInteger messageCountThreshold = self.client.configuration.requestMessageCountThreshold; + NSMutableArray *events = [status.data.updates mutableCopy]; + NSUInteger eventsCount = events.count; - if (events.count) { - [self.client.listenersManager notifyWithBlock:^{ - // Check whether after initial subscription client should use user-provided timetoken to catch up on - // messages since specified date. - if (initialSubscription && overrideTimeToken && [overrideTimeToken compare:@0] != NSOrderedSame) { - [self clearCacheFromMessagesNewerThan:overrideTimeToken]; - } - - // Remove message duplicates from received events list. - [self deDuplicateMessages:events]; - [self continueSubscriptionCycleIfRequiredWithCompletion:nil]; - - // Check whether number of messages exceed specified threshold or not. - if (messageCountThreshold > 0 && eventsCount >= messageCountThreshold) { - PNSubscribeStatus *exceedStatus = [status copyWithMutatedData:nil]; - [exceedStatus updateCategory:PNRequestMessageCountExceededCategory]; - [self.client.listenersManager notifyStatusChange:exceedStatus]; - } - - // Iterate through array with notifications and report back using callback blocks to the - // user. - for (NSMutableDictionary *event in events) { - id eventResultObject = [status copyWithMutatedData:event]; - - // Check whether event has been triggered on presence channel or channel group. - if (event[@"presenceEvent"] != nil) { - object_setClass(eventResultObject, [PNPresenceEventResult class]); - [self handleNewPresenceEvent:((PNPresenceEventResult *)eventResultObject)]; - } else { - PNEnvelopeInformation *envelope = event[@"envelope"]; - PNMessageType messageType = envelope.messageType; - - if (messageType == PNObjectMessageType) { - [self handleNewObjectsEvent:eventResultObject]; - } else if (messageType == PNFileMessageType) { - [self handleNewFileEvent:(PNFileEventResult *)eventResultObject]; - } else if (messageType == PNRegularMessageType) { - object_setClass(eventResultObject, [PNMessageResult class]); - [self handleNewMessage:(PNMessageResult *)eventResultObject]; - } else if (messageType == PNSignalMessageType) { - object_setClass(eventResultObject, [PNSignalResult class]); - [self handleNewSignal:(PNSignalResult *)eventResultObject]; - } else if (messageType == PNMessageActionType) { - object_setClass(eventResultObject, [PNMessageActionResult class]); - [self handleNewMessageAction:(PNMessageActionResult *)eventResultObject]; - } - } - } - }]; - } else { + if (!events.count) { [self continueSubscriptionCycleIfRequiredWithCompletion:nil]; + return; } - - [status updateData:[status.serviceData dictionaryWithValuesForKeys:@[@"timetoken", @"region"]]]; + + [self.client.listenersManager notifyWithBlock:^{ + // Check whether after initial subscription client should use user-provided timetoken to catch up on messages + // since specified date. + if (initialSubscription && overrideTimeToken && [overrideTimeToken compare:@0] != NSOrderedSame) { + [self clearCacheFromMessagesNewerThan:overrideTimeToken]; + } + + // Remove message duplicates from received events list. + [self deDuplicateMessages:events]; + [self continueSubscriptionCycleIfRequiredWithCompletion:nil]; + + // Check whether number of messages exceed specified threshold or not. + if (messageCountThreshold > 0 && eventsCount >= messageCountThreshold) { + PNSubscribeStatus *exceedStatus = [status copy]; + exceedStatus.responseData = nil; + + [exceedStatus updateCategory:PNRequestMessageCountExceededCategory]; + [self.client.listenersManager notifyStatusChange:exceedStatus]; + } + + // Iterate through array with notifications and report back using callback blocks to the + // user. + for (PNSubscribeEventData *event in events) { + NSInteger messageType = event.messageType.integerValue; + id resultObject; + + if (messageType == PNPresenceMessageType) { + resultObject = [PNPresenceEventResult objectWithOperation:PNSubscribeOperation response:event]; + [self handleNewPresenceEvent:((PNPresenceEventResult *)resultObject)]; + } else if (messageType == PNRegularMessageType) { + resultObject = [PNMessageResult objectWithOperation:PNSubscribeOperation response:event]; + [self handleNewMessage:((PNMessageResult *)resultObject)]; + } else if (messageType == PNSignalMessageType) { + resultObject = [PNSignalResult objectWithOperation:PNSubscribeOperation response:event]; + [self handleNewSignal:((PNSignalResult *)resultObject)]; + } else if (messageType == PNObjectMessageType) { + resultObject = [PNObjectEventResult objectWithOperation:PNSubscribeOperation response:event]; + [self handleNewObjectsEvent:((PNObjectEventResult *)resultObject)]; + } else if (messageType == PNMessageActionType) { + resultObject = [PNMessageActionResult objectWithOperation:PNSubscribeOperation response:event]; + [self handleNewMessageAction:((PNMessageActionResult *)resultObject)]; + } else if (messageType == PNFileMessageType) { + resultObject = [PNFileEventResult objectWithOperation:PNSubscribeOperation response:event]; + [self handleNewFileEvent:((PNFileEventResult *)resultObject)]; + } + } + }]; + } -- (void)handleNewMessage:(PNMessageResult *)data { +- (void)handleNewMessage:(PNMessageResult *)message { + if (!message) return; + PNErrorStatus *status = nil; - - if (data) { - PNLogResult(self.client.logger, @" %@", [(PNOperationResult *)data stringifiedRepresentation]); - - if ([data.serviceData[@"decryptError"] boolValue]) { - status = [PNErrorStatus statusForOperation:PNSubscribeOperation - category:PNDecryptionErrorCategory - withProcessingError:nil]; - - NSMutableDictionary *updatedData = [data.serviceData mutableCopy]; - [updatedData removeObjectsForKeys:@[@"decryptError", @"envelope"]]; - status.associatedObject = [PNMessageData dataWithServiceResponse:updatedData]; - [status updateData:updatedData]; - } - } - if (status) { - [self.client.listenersManager notifyStatusChange:(id)status]; - } else if (data) { - [self.client.listenersManager notifyMessage:data]; + PNLogResult(self.client.logger, @" %@", [message stringifiedRepresentationWithSerializer:nil]); + + if (message.data.decryptionError) { + status = [PNErrorStatus objectWithOperation:PNSubscribeOperation + category:PNDecryptionErrorCategory + response:nil]; + status.associatedObject = message.data; } + + if (status) [self.client.listenersManager notifyStatusChange:(id)status]; + else if (message) [self.client.listenersManager notifyMessage:message]; } -- (void)handleNewSignal:(PNSignalResult *)data { - if (!data) { - return; - } - - PNLogResult(self.client.logger, @" %@", [data stringifiedRepresentation]); - - [self.client.listenersManager notifySignal:(PNSignalResult *)data]; +- (void)handleNewSignal:(PNSignalResult *)signal { + if (!signal) return; + + PNLogResult(self.client.logger, @" %@", [signal stringifiedRepresentationWithSerializer:nil]); + + [self.client.listenersManager notifySignal:signal]; } -- (void)handleNewMessageAction:(PNMessageActionResult *)data { - if (!data) { - return; - } - - PNLogResult(self.client.logger, @" %@", [data stringifiedRepresentation]); - - [self.client.listenersManager notifyMessageAction:(PNMessageActionResult *)data]; +- (void)handleNewMessageAction:(PNMessageActionResult *)action { + if (!action) return; + + PNLogResult(self.client.logger, @" %@", [action stringifiedRepresentationWithSerializer:nil]); + + [self.client.listenersManager notifyMessageAction:action]; } -- (void)handleNewObjectsEvent:(PNOperationResult *)data { - if (!data) { - return; - } - - static NSArray *_knownTypesOfObjectEvents; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _knownTypesOfObjectEvents = @[@"membership", @"channel", @"uuid"]; - }); +- (void)handleNewObjectsEvent:(PNObjectEventResult *)object { + if (!object) return; - PNLogResult(self.client.logger, @" %@", [data stringifiedRepresentation]); - - if ([_knownTypesOfObjectEvents containsObject:data.serviceData[@"type"]]) { - object_setClass(data, [PNObjectEventResult class]); - [self.client.listenersManager notifyObjectEvent:(PNObjectEventResult *)data]; - } + PNLogResult(self.client.logger, @" %@", [object stringifiedRepresentationWithSerializer:nil]); + + [self.client.listenersManager notifyObjectEvent:object]; } -- (void)handleNewFileEvent:(PNOperationResult *)data { +- (void)handleNewFileEvent:(PNFileEventResult *)file { PNErrorStatus *status = nil; - if (data) { - PNLogResult(self.client.logger, @" %@", [(PNOperationResult *)data stringifiedRepresentation]); - NSMutableDictionary *updatedData = [data.serviceData mutableCopy]; - - if ([data.serviceData[@"decryptError"] boolValue]) { - status = [PNErrorStatus statusForOperation:PNSubscribeOperation - category:PNDecryptionErrorCategory - withProcessingError:nil]; - - [updatedData removeObjectsForKeys:@[@"decryptError", @"envelope"]]; - status.associatedObject = [PNFileEventData dataWithServiceResponse:updatedData]; + if (file) { + PNLogResult(self.client.logger, @" %@", [file stringifiedRepresentationWithSerializer:nil]); + + if (file.data.decryptionError) { + status = [PNErrorStatus objectWithOperation:PNSubscribeOperation + category:PNDecryptionErrorCategory + response:nil]; + status.associatedObject = file.data; } else { - NSMutableDictionary *fileData = [updatedData[@"file"] mutableCopy]; - NSURL *downloadURL = [self.client downloadURLForFileWithName:fileData[@"name"] - identifier:fileData[@"id"] - inChannel:updatedData[@"channel"]]; - fileData[@"downloadURL"] = downloadURL.absoluteString; - updatedData[@"file"] = fileData; + NSURL *url = [self.client downloadURLForFileWithName:file.data.file.name + identifier:file.data.file.identifier + inChannel:file.data.channel]; + file.data.file.downloadURL = url; } - - [data updateData:updatedData]; } - if (status) { - [self.client.listenersManager notifyStatusChange:(id)status]; - } else if (data) { - object_setClass(data, [PNFileEventResult class]); - [self.client.listenersManager notifyFileEvent:(PNFileEventResult *)data]; - } + if (status) [self.client.listenersManager notifyStatusChange:(id)status]; + else if (file) [self.client.listenersManager notifyFileEvent:file]; } -- (void)handleNewPresenceEvent:(PNPresenceEventResult *)data { - if (data) { - PNLogResult(self.client.logger, @" %@", [(PNOperationResult *)data stringifiedRepresentation]); +- (void)handleNewPresenceEvent:(PNPresenceEventResult *)presence { + if (presence) { + PNLogResult(self.client.logger, @" %@", [presence stringifiedRepresentationWithSerializer:nil]); } - // Check whether state modification event arrived or not. - // In case of state modification event for current client it should be applied on local storage. - if ([data.data.presenceEvent isEqualToString:@"state-change"]) { - // Check whether state has been changed for current client or not. - if ([data.data.presence.uuid isEqualToString:self.client.configuration.userID]) { - [self.client.clientStateManager setState:data.data.presence.state forObjects:@[data.data.channel]]; - } - } - - [self.client.listenersManager notifyPresenceEvent:data]; + [self.client.listenersManager notifyPresenceEvent:presence]; } #pragma mark - Misc -- (PNRequestParameters *)subscribeRequestParametersWithState:(NSDictionary *)state { - +- (PNSubscribeRequest *)subscribeRequestWithState:(NSDictionary *)state { // Compose full list of channels and groups stored in active subscription list. NSArray *channels = [[self channels] arrayByAddingObjectsFromArray:[self presenceChannels]]; - NSString *channelsList = [PNChannel namesForRequest:channels defaultString:@","]; - NSString *groupsList = [PNChannel namesForRequest:[self channelGroups]]; - NSArray *fullObjectsList = [channels arrayByAddingObjectsFromArray:[self channelGroups]]; + NSArray *groups = [self channelGroups]; + NSArray *fullObjectsList = [channels arrayByAddingObjectsFromArray:groups]; - NSDictionary *mergedState = [self.client.clientStateManager stateMergedWith:state - forObjects:fullObjectsList]; + NSDictionary *mergedState = [self.client.clientStateManager stateMergedWith:state forObjects:fullObjectsList]; [self.client.clientStateManager mergeWithState:mergedState]; // Extract state information only for channels and groups which is used in subscribe loop. @@ -1698,73 +1426,45 @@ - (PNRequestParameters *)subscribeRequestParametersWithState:(NSDictionary 0) { - [parameters addQueryParameter:@(self.client.configuration.presenceHeartbeatValue).stringValue - forFieldName:@"heartbeat"]; - } - - if (groupsList.length) { - [parameters addQueryParameter:groupsList forFieldName:@"channel-group"]; - } - - if (mergedState.count) { - NSString *mergedStateString = [PNJSON JSONStringFrom:mergedState withError:nil]; - - if (mergedStateString.length) { - [parameters addQueryParameter:[PNString percentEscapedString:mergedStateString] - forFieldName:@"state"]; - } - } - - if (self.escapedFilterExpression) { - [parameters addQueryParameter:self.escapedFilterExpression forFieldName:@"filter-expr"]; - } + PNSubscribeRequest *request = [PNSubscribeRequest requestWithChannels:channels channelGroups:groups]; + request.timetoken = self.currentTimeToken; + request.state = mergedState; + + if ([self.currentTimeTokenRegion compare:@(-1)] == NSOrderedDescending) request.region = self.currentTimeTokenRegion; - return parameters; + return request; } -- (void)deDuplicateMessages:(NSMutableArray *)events { - - NSUInteger maximumMessagesCacheSize = self.client.configuration.maximumMessagesCacheSize; - - if (maximumMessagesCacheSize > 0) { +- (void)deDuplicateMessages:(NSMutableArray *)events { + NSUInteger cacheSize = self.client.configuration.maximumMessagesCacheSize; + + if (cacheSize > 0) { NSMutableIndexSet *duplicateMessagesIndices = [NSMutableIndexSet indexSet]; - [events enumerateObjectsUsingBlock:^(NSDictionary *event, NSUInteger eventIdx, + [events enumerateObjectsUsingBlock:^(PNSubscribeEventData *event, NSUInteger eventIdx, BOOL *eventsEnumeratorStop) { - PNMessageType messageType = ((PNEnvelopeInformation *)event[@"envelope"]).messageType; - BOOL isMessageEvent = (messageType != PNFileMessageType && - messageType != PNObjectMessageType && - messageType != PNMessageActionType); - BOOL isPresenceEvent = event[@"presenceEvent"] != nil; - BOOL isDecryptionError = ((NSNumber *)event[@"decryptError"]).boolValue; - + PNMessageType messageType = event.messageType.integerValue; + BOOL isMessageEvent = messageType == PNRegularMessageType || messageType == PNSignalMessageType; + BOOL isPresenceEvent = messageType == PNPresenceMessageType; + BOOL isDecryptionError = NO; + + if (messageType == PNRegularMessageType) { + isDecryptionError = ((PNSubscribeMessageEventData *)event).decryptionError; + } + if (!isPresenceEvent && !isDecryptionError && isMessageEvent && - ![self cacheObjectIfPossible:event withMaximumCacheSize:maximumMessagesCacheSize]) { - + ![self cacheObjectIfPossible:(PNSubscribeMessageEventData *)event withMaximumCacheSize:cacheSize]) { + [duplicateMessagesIndices addIndex:eventIdx]; } }]; - if (duplicateMessagesIndices.count) { - [events removeObjectsAtIndexes:duplicateMessagesIndices]; - } - - [self cleanUpCachedObjectsIfRequired:maximumMessagesCacheSize]; + if (duplicateMessagesIndices.count) [events removeObjectsAtIndexes:duplicateMessagesIndices]; + [self cleanUpCachedObjectsIfRequired:cacheSize]; } } - (void)clearCacheFromMessagesNewerThan:(NSNumber *)timetoken { - NSUInteger maximumMessagesCacheSize = self.client.configuration.maximumMessagesCacheSize; if (maximumMessagesCacheSize > 0) { @@ -1794,47 +1494,39 @@ - (void)clearCacheFromMessagesNewerThan:(NSNumber *)timetoken { } } -- (BOOL)cacheObjectIfPossible:(NSDictionary *)object withMaximumCacheSize:(NSUInteger)size { - +- (BOOL)cacheObjectIfPossible:(PNSubscribeMessageEventData *)object withMaximumCacheSize:(NSUInteger)size { BOOL cached = NO; - NSString *identifier = [@[object[@"timetoken"], object[@"channel"]] componentsJoinedByString:@"_"]; - NSMutableArray *objects = (_cachedObjects[identifier]?: [NSMutableArray new]); + NSString *identifier = [@[object.timetoken.stringValue, object.channel] componentsJoinedByString:@"_"]; + NSMutableArray *objects = _cachedObjects[identifier]?: [NSMutableArray new]; NSUInteger cachedMessagesCount = objects.count; // Cache objects if required. - id data = object[@"message"]; - + id data = object.message; + if (data && (objects.count == 0 || [objects indexOfObject:data] == NSNotFound)) { cached = YES; [objects addObject:data]; [_cachedObjectIdentifiers addObject:identifier]; } - if (cachedMessagesCount == 0) { - _cachedObjects[identifier] = objects; - } + if (cachedMessagesCount == 0) _cachedObjects[identifier] = objects; return cached; } - (void)cleanUpCachedObjectsIfRequired:(NSUInteger)maximumCacheSize { - while (_cachedObjectIdentifiers.count > maximumCacheSize) { NSString *identifier = [_cachedObjectIdentifiers objectAtIndex:0]; NSMutableArray *objects = _cachedObjects[identifier]; - if (objects.count == 1) { - [_cachedObjects removeObjectForKey:identifier]; - } else { - [objects removeObjectAtIndex:0]; - } + if (objects.count == 1) [_cachedObjects removeObjectForKey:identifier]; + else [objects removeObjectAtIndex:0]; [_cachedObjectIdentifiers removeObjectAtIndex:0]; } } - (void)appendSubscriberInformation:(PNStatus *)status { - status.currentTimetoken = _currentTimeToken; status.lastTimeToken = _lastTimeToken; status.currentTimeTokenRegion = _currentTimeTokenRegion; diff --git a/PubNub/Data/Managers/PNTelemetry.h b/PubNub/Data/Managers/PNTelemetry.h deleted file mode 100644 index e0d114a96..000000000 --- a/PubNub/Data/Managers/PNTelemetry.h +++ /dev/null @@ -1,91 +0,0 @@ -#import -#import "PNStructures.h" -#import "PNDefines.h" - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Class which responsible for gathering of client's 'telemetry'. - * - * @discussion Track various client parameters which can be used for service performance analysis. - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.6.2 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNTelemetry : NSObject - - -#pragma mark Telemetry information - -/** - * @brief Retrieve dictionary with latencies for each used API endpoint. - * - * @discussion \a NSDictionary will contain pre-formatted keys, so SDK will be able to use them with - * URL building method to append to each API endpoint. - * - * @return \a NSDictionary with latency information from last minute for each used API endpoint. - */ -- (NSDictionary *)operationsLatencyForRequest; - - -#pragma mark - Telemetry information tracking - -/** - * @brief Start request execution time tracking. - * - * @discussion Internally manager will mark time when request has been started and it will be used - * to calculate resulting latency. This methods used if metrics not available. - * - * @param operationType One of \b PNOperationType enumerator fields which describe for what kind of - * operation manager should start tracking execution time. - * @param identifier Unique operation identifier which will be used to store start time. - */ -- (void)startLatencyMeasureFor:(PNOperationType)operationType withIdentifier:(NSString *)identifier; - -/** - * @brief Stop request execution time tracking. - * - * @discussion Internally manager will find information about request start timestamp and calculate - * resulting operation execution time. This methods used if metrics not available. - * - * @param operationType One of \b PNOperationType enumerator fields which describe what kind of - * operation manager should stop tracking execution time. - * @param identifier Unique operation identifier which will be used to find information about - * operation start time. - */ -- (void)stopLatencyMeasureFor:(PNOperationType)operationType withIdentifier:(NSString *)identifier; - - -#pragma mark - Telemetry information update - -/** - * @brief Store latency for operation which has been processed recently. - * - * @discussion Method allow to gathen (and maintain internally) information about requests latency - * (or request duration if metrics not available). - * - * @param latency Calculated operation latency. - * @param operationType One of \b PNOperationType enumerator fields which describe what kind of - * operation manager should store request latency. - */ -- (void)setLatency:(NSTimeInterval)latency forOperation:(PNOperationType)operationType; - - -#pragma mark - Misc - -/** - * @brief Invalidate accumulated telemetry information. - * - * @discussion Along with invalidated data all scheduled timers will be invalidated as well. - */ -- (void)invalidate; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Managers/PNTelemetry.m b/PubNub/Data/Managers/PNTelemetry.m deleted file mode 100644 index ee22b7cb8..000000000 --- a/PubNub/Data/Managers/PNTelemetry.m +++ /dev/null @@ -1,339 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.6.2 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNTelemetry.h" -#import "PNPrivateStructures.h" -#import "PNLockSupport.h" -#import "PNHelpers.h" -#import "PNNumber.h" - - -#pragma mark Static - -/** - * @brief Stores for how long each stored latency should live in persistent storage for particular - * API endpoint. - */ -static NSTimeInterval const kPNOperationLatencyMaximumAge = 60.0f; - -/** - * @brief Stores reference on key under which service advisory information stored. - */ -static NSString * const kPNOperationLatencyKey = @"l"; - -/** - * @brief Stores reference on key under which request status is stored. - */ -static NSString * const kPNOperationDateKey = @"d"; - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - Protected interface declaration - -@interface PNTelemetry () - - -#pragma mark - Information - -/** - * @brief \a NSDictionary with per-API latencies information. - */ -@property (nonatomic, strong) NSMutableDictionary *> *latencies; - -/** - * @brief Map of active operations and their start date. - * - * @discussion \a NSDictionary used by start / stop latency measure API to calculate operation - * latency from time which has been required to receive response (if metrics not available). - */ -@property (nonatomic, strong) NSMutableDictionary *trackedLatencies; - -/** - * @brief Timer which is used to clean accumulated latencies information. - * - * @discussion SDK required to store latency information for last usage minute, so all outdated - * latencies information should be removed from persistent storage. - */ -@property (nonatomic, strong, nullable) NSTimer *cleanUpTimer; - -/** - * @brief Queue which is used to serialize access to shared telemetry information. - * - * @since 4.7.1 - */ -@property (nonatomic, strong) dispatch_queue_t resourceAccessQueue; - - -#pragma mark - Operation information - -/** - * @brief Shortened name of API endpoint for specific operation. - * - * @discussion Some operations refer to single endpoint with only difference in passed parameters, - * but actual endpoint is the same. This method return shortened name of this endpoint. - * - * @param operationType One of \b PNOperationType enumerator fields which describe for which - * operation endpoint should be retrieved. - * - * @return Shortened API endpoint name. - */ -- (NSString *)endpointNameForOperation:(PNOperationType)operationType; - - -#pragma mark - Handlers - -/** - * @brief Handler clean up timmer triggered. - * - * @discussion Use this handler to clean up outdated latencies information. - * - * @param timer Reference on timer which triggered callback. - */ -- (void)handleCleanUpTimer:(NSTimer *)timer; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -@implementation PNTelemetry - - -#pragma mark - Initialization and configuration - -- (instancetype)init { - - if ((self = [super init])) { - - _resourceAccessQueue = dispatch_queue_create("com.pubnub.telemetry", - DISPATCH_QUEUE_CONCURRENT); - _latencies = [NSMutableDictionary new]; - _trackedLatencies = [NSMutableDictionary new]; - _cleanUpTimer = [NSTimer scheduledTimerWithTimeInterval:1.0f - target:self - selector:@selector(handleCleanUpTimer:) - userInfo:nil repeats:YES]; - } - - return self; -} - - -#pragma mark - Telemetry information - -- (NSDictionary *)operationsLatencyForRequest { - - NSMutableDictionary *latenciesForRequest = [NSMutableDictionary new]; - - pn_safe_property_read(self.resourceAccessQueue, ^{ - NSString *averageKeyPath = [@"@avg." stringByAppendingString:kPNOperationLatencyKey]; - - [self.latencies enumerateKeysAndObjectsUsingBlock:^(NSString *latencyKey, - NSMutableArray *latencies, - BOOL *latenciesEnumeratorStop) { - - NSString *averageLatencyKey = [@"l_" stringByAppendingString:latencyKey]; - NSNumber *averageLatency = [latencies valueForKeyPath:averageKeyPath]; - latenciesForRequest[averageLatencyKey] = averageLatency.stringValue; - }]; - }); - - return [latenciesForRequest copy]; -} - - - -#pragma mark - Telemetry information tracking - -- (void)startLatencyMeasureFor:(PNOperationType)operationType - withIdentifier:(NSString *)identifier { - - if (operationType != PNSubscribeOperation && identifier) { - NSNumber *date = @([[NSDate date] timeIntervalSince1970]); - - pn_safe_property_write(self.resourceAccessQueue, ^{ - self.trackedLatencies[identifier] = date; - }); - } -} - -- (void)stopLatencyMeasureFor:(PNOperationType)operationType withIdentifier:(NSString *)identifier { - - if (operationType != PNSubscribeOperation && identifier) { - NSTimeInterval date = [[NSDate date] timeIntervalSince1970]; - __block NSNumber *startDate; - - pn_safe_property_read(self.resourceAccessQueue, ^{ - startDate = self.trackedLatencies[identifier]; - }); - - pn_safe_property_write(self.resourceAccessQueue, ^{ - [self.trackedLatencies removeObjectForKey:identifier]; - }); - - [self setLatency:(date - startDate.doubleValue) forOperation:operationType]; - } -} - -#pragma mark - Telemetry information update - -- (void)setLatency:(NSTimeInterval)latency forOperation:(PNOperationType)operationType { - - if (operationType != PNSubscribeOperation) { - NSNumber *date = @([[NSDate date] timeIntervalSince1970]); - NSString *endpointName = [self endpointNameForOperation:operationType]; - - pn_safe_property_write(self.resourceAccessQueue, ^{ - NSMutableArray *latencies = self.latencies[endpointName]; - - if (!latencies) { - latencies = [NSMutableArray new]; - self.latencies[endpointName] = latencies; - } - - [latencies addObject:@{ - kPNOperationDateKey: date, - kPNOperationLatencyKey: @((NSInteger)(latency * 1000)) - }]; - }); - } -} - - -#pragma mark - Operation information - -- (NSString *)endpointNameForOperation:(PNOperationType)operationType { - - NSString *operation = nil; - switch (operationType) { - case PNPublishOperation: - operation = @"pub"; - break; - case PNSignalOperation: - operation = @"sig"; - break; - case PNHistoryOperation: - case PNHistoryForChannelsOperation: - case PNHistoryWithActionsOperation: - case PNDeleteMessageOperation: - case PNMessageCountOperation: - operation = @"hist"; - break; - case PNUnsubscribeOperation: - case PNWhereNowOperation: - case PNHereNowGlobalOperation: - case PNHereNowForChannelOperation: - case PNHereNowForChannelGroupOperation: - case PNHeartbeatOperation: - case PNSetStateOperation: - case PNStateForChannelOperation: - case PNStateForChannelGroupOperation: - operation = @"pres"; - break; - case PNAddChannelsToGroupOperation: - case PNRemoveChannelsFromGroupOperation: - case PNChannelGroupsOperation: - case PNRemoveGroupOperation: - case PNChannelsForGroupOperation: - operation = @"cg"; - break; - case PNPushNotificationEnabledChannelsOperation: - case PNAddPushNotificationsOnChannelsOperation: - case PNRemovePushNotificationsFromChannelsOperation: - case PNRemoveAllPushNotificationsOperation: - case PNPushNotificationEnabledChannelsV2Operation: - case PNAddPushNotificationsOnChannelsV2Operation: - case PNRemovePushNotificationsFromChannelsV2Operation: - case PNRemoveAllPushNotificationsV2Operation: - operation = @"push"; - break; - case PNSetUUIDMetadataOperation: - case PNRemoveUUIDMetadataOperation: - case PNFetchUUIDMetadataOperation: - case PNFetchAllUUIDMetadataOperation: - case PNSetChannelMetadataOperation: - case PNRemoveChannelMetadataOperation: - case PNFetchChannelMetadataOperation: - case PNFetchAllChannelsMetadataOperation: - case PNSetMembershipsOperation: - case PNRemoveMembershipsOperation: - case PNManageMembershipsOperation: - case PNFetchMembershipsOperation: - case PNSetChannelMembersOperation: - case PNRemoveChannelMembersOperation: - case PNManageChannelMembersOperation: - case PNFetchChannelMembersOperation: - operation = @"obj"; - break; - case PNGenerateFileUploadURLOperation: - case PNListFilesOperation: - case PNDownloadFileOperation: - case PNDeleteFileOperation: - operation = @"file"; - break; - case PNAddMessageActionOperation: - case PNRemoveMessageActionOperation: - case PNFetchMessagesActionsOperation: - operation = @"msga"; - break; - default: - operation = @"time"; - break; - } - - return operation; -} - - -#pragma mark - Handlers - -- (void)handleCleanUpTimer:(NSTimer *)timer { - - pn_safe_property_write(self.resourceAccessQueue, ^{ - NSTimeInterval date = [[NSDate date] timeIntervalSince1970]; - NSArray *endpoints = self.latencies.allKeys; - - for (NSString *key in endpoints) { - NSMutableArray *latencies = self.latencies[key]; - NSMutableArray *outdatedLatencies = [NSMutableArray new]; - - for (NSDictionary *latencyInformation in latencies) { - NSNumber *latencyStoreDate = latencyInformation[kPNOperationDateKey]; - - if (date - latencyStoreDate.doubleValue > kPNOperationLatencyMaximumAge) { - [outdatedLatencies addObject:latencyInformation]; - } - } - - [latencies removeObjectsInArray:outdatedLatencies]; - - if (latencies.count == 0) { - [self.latencies removeObjectForKey:key]; - } - } - }); -} - - -#pragma mark - Misc - -- (void)invalidate { - - if ([_cleanUpTimer isValid]) { - [_cleanUpTimer invalidate]; - } - - _cleanUpTimer = nil; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Models/PNBaseAppContextObject+Private.h b/PubNub/Data/Models/PNBaseAppContextObject+Private.h new file mode 100644 index 000000000..19debe955 --- /dev/null +++ b/PubNub/Data/Models/PNBaseAppContextObject+Private.h @@ -0,0 +1,31 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// General `App Context` data object private extension. +@interface PNBaseAppContextObject (Private) + + +#pragma mark - Properties + +/// Additional data associated with App Context object. +/// +/// > Important: Values must be scalars; only arrays or objects are supported. App Context filtering language doesn’t +/// support filtering by custom properties. +@property(strong, nullable, nonatomic) NSDictionary *custom; + + +#pragma mark - Misc + +/// Translate `App Context` data model to dictionary. +- (NSMutableDictionary *)dictionaryRepresentation; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Models/PNBaseAppContextObject.h b/PubNub/Data/Models/PNBaseAppContextObject.h new file mode 100644 index 000000000..32bf3cc96 --- /dev/null +++ b/PubNub/Data/Models/PNBaseAppContextObject.h @@ -0,0 +1,35 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// General `App Context` data object. +@interface PNBaseAppContextObject : NSObject + + +#pragma mark - Properties + +/// Additional data associated with `App Context` object. +/// +/// > Important: Values must be scalars; only arrays or objects are supported. App Context filtering language doesn’t +/// support filtering by custom properties. +@property(strong, nullable, nonatomic, readonly) NSDictionary *custom; + +/// Last `App Context` object update date. +/// +/// > Note: Value will be `nil` for objects received through subscribe real-time updates. +@property(strong, nullable, nonatomic, readonly) NSDate *updated; + +/// `App Context` object version identifier. +/// +/// > Note: Value will be `nil` for objects received through subscribe real-time updates. +@property(copy, nullable, nonatomic, readonly) NSString *eTag; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Models/PNBaseAppContextObject.m b/PubNub/Data/Models/PNBaseAppContextObject.m new file mode 100644 index 000000000..54e528af3 --- /dev/null +++ b/PubNub/Data/Models/PNBaseAppContextObject.m @@ -0,0 +1,63 @@ +#import "PNBaseAppContextObject+Private.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// General `App Context` data object private extension. +@interface PNBaseAppContextObject () + + +#pragma mark - Properties + +/// Additional data associated with App Context object. +/// +/// > Important: Values must be scalars; only arrays or objects are supported. App Context filtering language doesn’t +/// support filtering by custom properties. +@property(strong, nullable, nonatomic) NSDictionary *custom; + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNBaseAppContextObject + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ + @"custom": @"custom", + @"updated": @"updated", + @"eTag": @"eTag", + }; +} + ++ (NSArray *)optionalKeys { + return @[@"custom", @"updated", @"eTag"]; +} + + +#pragma mark - Misc + +- (NSMutableDictionary *)dictionaryRepresentation { + NSMutableDictionary *dictionary = [@{ @"updated": self.updated, @"eTag": self.eTag } mutableCopy]; + + if (self.custom) dictionary[@"custom"] = self.custom; + + return dictionary; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Models/PNChannelMember+Private.h b/PubNub/Data/Models/PNChannelMember+Private.h deleted file mode 100644 index 5dbf984d0..000000000 --- a/PubNub/Data/Models/PNChannelMember+Private.h +++ /dev/null @@ -1,44 +0,0 @@ -#import "PNChannelMember.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface declaration - -/** - * @brief Private \c member extension to provide ability to set data from service response. - * - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNChannelMember (Private) - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c member data model from dictionary. - * - * @param data Dictionary with information about \c member from Objects API. - * - * @return Configured and ready to use \c member model. - */ -+ (instancetype)memberFromDictionary:(NSDictionary *)data; - -/** - * @brief Create and configure \c member data model. - * - * @param metadata \c Metadata which associated with specified \c UUID in context of \c channel. - * - * @return Configured and ready to use \c member representation model. - */ -+ (instancetype)memberWithUUIDMetadata:(PNUUIDMetadata *)metadata; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Models/PNChannelMember.h b/PubNub/Data/Models/PNChannelMember.h index 1dc054743..d9d88966e 100644 --- a/PubNub/Data/Models/PNChannelMember.h +++ b/PubNub/Data/Models/PNChannelMember.h @@ -1,56 +1,25 @@ -#import +#import +#import -#pragma mark Class forward +NS_ASSUME_NONNULL_BEGIN -@class PNUUIDMetadata; +#pragma mark Interface declaration +/// `Channel member` object. +@interface PNChannelMember : PNBaseAppContextObject -NS_ASSUME_NONNULL_BEGIN -#pragma mark Interface declaration +#pragma mark - Properties + +/// Metadata associated with `UUID` which is listed in `channel`'s members list. +/// +/// > Note: This property will be set only if **PNChannelMemberUUIDField** has been added to `includeFields` list during +/// request. +@property(strong, nonatomic, nullable, readonly) PNUUIDMetadata *metadata; -/** - * @brief Object which is used to represent \c chanel \c member. - * - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNChannelMember : NSObject - - -#pragma mark - Information - -/** - * @brief \c Metadata associated with \c UUID which is listed in \c channel's members list. - * - * @note This property will be set only if \b PNChannelMemberUUIDField has been added to - * \c includeFields list during request. - */ -@property (nonatomic, nullable, readonly, strong) PNUUIDMetadata *metadata; - -/** - * @brief Additional information from \c metadata which has been associated with \c UUID during - * \c channel \c member \c add requests. - */ -@property (nonatomic, nullable, readonly, strong) NSDictionary *custom; - -/** - * @brief \c Member data modification date. - */ -@property (nonatomic, readonly, strong) NSDate *updated; - -/** - * @brief Identifier which is listed in \c channel's members list. - */ -@property (nonatomic, readonly, copy) NSString *uuid; - -/** - * @brief \c Member object version identifier. - */ -@property (nonatomic, readonly, copy) NSString *eTag; +/// Identifier which is listed in `channel`'s members list. +@property(copy, nonatomic, readonly) NSString *uuid; #pragma mark - diff --git a/PubNub/Data/Models/PNChannelMember.m b/PubNub/Data/Models/PNChannelMember.m index 0871d20d4..82acbbb40 100644 --- a/PubNub/Data/Models/PNChannelMember.m +++ b/PubNub/Data/Models/PNChannelMember.m @@ -1,56 +1,16 @@ -/** - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "NSDateFormatter+PNCacheable.h" -#import "PNUUIDMetadata+Private.h" -#import "PNChannelMember+Private.h" +#import "PNChannelMember.h" +#import +#import "PNBaseAppContextObject+Private.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration -@interface PNChannelMember () +/// `Channel member` object private extension. +@interface PNChannelMember () -#pragma mark - Information - -/** - * @brief \c Metadata associated with \c UUID which is listed in \c channel's members list. - */ -@property (nonatomic, nullable, strong) PNUUIDMetadata *metadata; - -/** - * @brief Additional information from \c metadata which has been associated with \c UUID during - * \c channel \c member \c add requests. - */ -@property (nonatomic, nullable, strong) NSDictionary *custom; - -/** - * @brief \c Member data modification date. - */ -@property (nonatomic, strong) NSDate *updated; - -/** - * @brief \c Member object version identifier. - */ -@property (nonatomic, copy) NSString *eTag; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Initialize \c member data model. - * - * @param metadata \c Metadata which associated with specified \c UUID in context of \c channel. - * - * @return Initialized and ready to use \c member representation model. - */ -- (instancetype)initWithUUIDMetadata:(PNUUIDMetadata *)metadata; - #pragma mark - @@ -64,33 +24,32 @@ - (instancetype)initWithUUIDMetadata:(PNUUIDMetadata *)metadata; @implementation PNChannelMember -#pragma mark - Initialization & Configuration - -+ (instancetype)memberFromDictionary:(NSDictionary *)data { - NSDateFormatter *formatter = [NSDateFormatter pn_objectsDateFormatter]; - PNUUIDMetadata *uuidMetadata = [PNUUIDMetadata uuidMetadataFromDictionary:data[@"uuid"]]; - PNChannelMember *member = [PNChannelMember memberWithUUIDMetadata:uuidMetadata]; - member.custom = data[@"custom"]; - member.eTag = data[@"eTag"]; - - if (data[@"updated"]) { - member.updated = [formatter dateFromString:data[@"updated"]]; - } - - return member; +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ @"metadata": @"uuid" }; +} + ++ (NSArray *)ignoredKeys { + return @[@"uuid"]; } -+ (instancetype)memberWithUUIDMetadata:(PNUUIDMetadata *)metadata { - return [[self alloc] initWithUUIDMetadata:metadata]; +- (NSString *)uuid { + return self.metadata.uuid; } -- (instancetype)initWithUUIDMetadata:(PNUUIDMetadata *)metadata { - if ((self = [super init])) { - _uuid = [metadata.uuid copy]; - _metadata = metadata; - } - return self; +#pragma mark - Misc + +- (NSMutableDictionary *)dictionaryRepresentation { + NSMutableDictionary *dictionary = [super dictionaryRepresentation]; + dictionary[@"uuid"] = [self.metadata dictionaryRepresentation]; + + return dictionary; +} + +- (NSString *)debugDescription { + return [self dictionaryRepresentation].description; } #pragma mark - diff --git a/PubNub/Data/Models/PNChannelMetadata+Private.h b/PubNub/Data/Models/PNChannelMetadata+Private.h deleted file mode 100644 index 88c7b8f53..000000000 --- a/PubNub/Data/Models/PNChannelMetadata+Private.h +++ /dev/null @@ -1,69 +0,0 @@ -#import "PNChannelMetadata.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface declaration - -/** - * @brief Private \c channel \c metadata extension to provide ability to set data from service - * response. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNChannelMetadata (Private) - - -#pragma mark - Information - -/** - * @brief Description which should be stored in \c metadata associated with specified \c channel. - */ -@property (nonatomic, nullable, copy) NSString *information; - -/** - * @brief Additional / complex attributes which should be stored in \c metadata associated with - * specified \c channel. - */ -@property (nonatomic, nullable, strong) NSDictionary *custom; - -/** - * @brief Last \c metadata update date. - */ -@property (nonatomic, nullable, strong) NSDate *updated; - -/** - * @brief Name which should be stored in \c metadata associated with specified \c channel. - */ -@property (nonatomic, nullable, copy) NSString *name; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c channel \c metadata data model from dictionary. - * - * @param data Dictionary with information about \c channel \c metadata from Objects API. - * - * @return Configured and ready to use \c channel \c metadata representation model. - */ -+ (instancetype)channelMetadataFromDictionary:(NSDictionary *)data; - -/** - * @brief Create and configure \c channel \c metadata data model. - * - * @param channel Name of channel with which \c metadata associated. - * - * @return Configured and ready to use \c channel \c metadata representation model. - */ -+ (instancetype)metadataForChannel:(NSString *)channel; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Models/PNChannelMetadata.h b/PubNub/Data/Models/PNChannelMetadata.h index d0a417bc5..22761cd8a 100644 --- a/PubNub/Data/Models/PNChannelMetadata.h +++ b/PubNub/Data/Models/PNChannelMetadata.h @@ -1,53 +1,30 @@ -#import +#import NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief Object which is used to represent \c channel \c metadata. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNChannelMetadata : NSObject - - -#pragma mark - Information - -/** - * @brief Additional / complex attributes which should be stored in \c metadata associated with - * specified \c channel. - */ -@property (nonatomic, nullable, readonly, strong) NSDictionary *custom; - -/** - * @brief Description which should be stored in \c metadata associated with specified \c channel. - */ -@property (nonatomic, nullable, readonly, copy) NSString *information; - -/** - * @brief Name which should be stored in \c metadata associated with specified \c channel. - */ -@property (nonatomic, nullable, readonly, copy) NSString *name; - -/** - * @brief \c Channel name with which \c metadata has been associated. - */ -@property (nonatomic, readonly, copy) NSString *channel; - -/** - * @brief Last \c metadata update date. - */ -@property (nonatomic, readonly, strong) NSDate *updated; - -/** - * @brief \c Channel \c metadata object version identifier. - */ -@property (nonatomic, readonly, copy) NSString *eTag; +/// `Channel Metadata` object. +@interface PNChannelMetadata : PNBaseAppContextObject + + +#pragma mark - Properties + +/// Channel Description which should be stored in `metadata` associated with specified `channel`. +@property(copy, nullable, nonatomic, readonly) NSString *information; + +/// `Channel`'s object status. +@property(copy, nullable, nonatomic, readonly) NSString *status; + +/// Name which should be stored in `metadata` associated with specified `channel`. +@property(copy, nullable, nonatomic, readonly) NSString *name; + +/// `Channel`'s object type information. +@property(copy, nullable, nonatomic, readonly) NSString *type; + +/// `Channel` name with which `metadata` has been associated. +@property(copy, nonatomic, readonly) NSString *channel; #pragma mark - diff --git a/PubNub/Data/Models/PNChannelMetadata.m b/PubNub/Data/Models/PNChannelMetadata.m index 0c0927f89..9dee03730 100644 --- a/PubNub/Data/Models/PNChannelMetadata.m +++ b/PubNub/Data/Models/PNChannelMetadata.m @@ -1,73 +1,16 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "NSDateFormatter+PNCacheable.h" -#import "PNChannelMetadata+Private.h" +#import "PNChannelMetadata.h" +#import +#import "PNBaseAppContextObject+Private.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration -@interface PNChannelMetadata () +/// `Channel Metadata` object private extension. +@interface PNChannelMetadata () -#pragma mark - Information - -/** - * @brief Additional / complex attributes which should be stored in \c metadata associated with - * specified \c channel. - */ -@property (nonatomic, nullable, strong) NSDictionary *custom; - -/** - * @brief Description which should be stored in \c metadata associated with specified \c channel. - */ -@property (nonatomic, nullable, copy) NSString *information; - -/** - * @brief Last \c metadata update date. - */ -@property (nonatomic, nullable, strong) NSDate *updated; - -/** - * @brief \c Channel \c metadata object version identifier. - */ -@property (nonatomic, nullable, copy) NSString *eTag; - -/** - * @brief Name which should be stored in \c metadata associated with specified \c channel. - */ -@property (nonatomic, nullable, copy) NSString *name; - -/** - * @brief \c Channel name with which \c metadata has been associated. - */ -@property (nonatomic, copy) NSString *channel; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Initialize \c channel \c metadata data model. - * - * @param channel Name of channel with which \c metadata associated. - * - * @return Initialized and ready to use \c channel \c metadata representation model. - */ -- (instancetype)initWithChannel:(NSString *)channel; - - -#pragma mark - Misc - -/** - * @brief Translate \c channel \c metadata data model to dictionary. - */ -- (NSDictionary *)dictionaryRepresentation; - #pragma mark - @@ -81,48 +24,33 @@ - (NSDictionary *)dictionaryRepresentation; @implementation PNChannelMetadata -#pragma mark - Initialization & Configuration +#pragma mark - Properties -+ (instancetype)channelMetadataFromDictionary:(NSDictionary *)data { - PNChannelMetadata *metadata = [PNChannelMetadata metadataForChannel:data[@"id"]]; - metadata.information = data[@"description"]; - metadata.custom = data[@"custom"]; - metadata.eTag = data[@"eTag"]; - metadata.name = data[@"name"]; - - NSDateFormatter *formatter = [NSDateFormatter pn_objectsDateFormatter]; - - if (data[@"updated"]) { - metadata.updated = [formatter dateFromString:data[@"updated"]]; - } - - return metadata; ++ (NSDictionary *)codingKeys { + return @{ + @"name": @"name", + @"information": @"description", + @"status": @"status", + @"type": @"type", + @"channel": @"id", + }; } -+ (instancetype)metadataForChannel:(NSString *)channel { - return [[self alloc] initWithChannel:channel]; -} - -- (instancetype)initWithChannel:(NSString *)channel { - if ((self = [super init])) { - _channel = [channel copy]; - } - - return self; ++ (NSArray *)optionalKeys { + return @[@"name", @"information", @"status", @"type"]; } #pragma mark - Misc -- (NSDictionary *)dictionaryRepresentation { - NSMutableDictionary *dictionary = [@{ @"type": @"channel-metadata" } mutableCopy]; - - dictionary[@"information"] = self.information; - dictionary[@"updated"] = self.updated; +- (NSMutableDictionary *)dictionaryRepresentation { + NSMutableDictionary *dictionary = [super dictionaryRepresentation]; dictionary[@"channel"] = self.channel; - dictionary[@"custom"] = self.custom; - dictionary[@"name"] = self.name; - dictionary[@"eTag"] = self.eTag; + + if (self.information) dictionary[@"information"] = self.information; + if (self.status) dictionary[@"status"] = self.status; + if (self.type) dictionary[@"type"] = self.type; + if (self.name) dictionary[@"name"] = self.name; return dictionary; } diff --git a/PubNub/Data/Models/PNFile+Private.h b/PubNub/Data/Models/PNFile+Private.h index 53cb0f78d..07e8c5f6a 100644 --- a/PubNub/Data/Models/PNFile+Private.h +++ b/PubNub/Data/Models/PNFile+Private.h @@ -5,28 +5,14 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Private interface declaration -/** - * @brief Private \c uploaded \c file extension to provide ability to set data from service - * response. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Shared file` data object private extension. @interface PNFile (Private) -#pragma mark - Initialization & Configuration +#pragma mark - Properties -/** - * @brief Create and configure \c uploaded \c file data model from dictionary. - * - * @param data Dictionary with information about \c uploaded \c file from Files API. - * - * @return Configured and ready to use \c uploaded \c file representation model. - */ -+ (instancetype)fileFromDictionary:(NSDictionary *)data; +/// URL which can be used to download file. +@property(strong, nonatomic) NSURL *downloadURL; #pragma mark - diff --git a/PubNub/Data/Models/PNFile.h b/PubNub/Data/Models/PNFile.h index 454efbb08..5ba6e7aea 100644 --- a/PubNub/Data/Models/PNFile.h +++ b/PubNub/Data/Models/PNFile.h @@ -5,47 +5,30 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief Object which is used to represent \c uploaded \c file. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Shared file` data object. @interface PNFile : NSObject -#pragma mark - Information - -/** - * @brief URL which can be used to download file. - */ -@property (nonatomic, readonly, strong) NSURL *downloadURL; - -/** - * @brief Unique uploaded file identifier. - */ -@property (nonatomic, readonly, copy) NSString *identifier; - -/** - * @brief Date when file has been uploaded. - * - * @note This information is set only when file retrieved from history. - */ -@property (nonatomic, readonly, strong) NSDate *created; - -/** - * @brief Uploaded file size. - * - * @note This information is set only when file retrieved from history. - */ -@property (nonatomic, readonly, assign) NSUInteger size; - -/** - * @brief Name with which file has been uploaded. - */ -@property (nonatomic, readonly, copy) NSString *name; +#pragma mark - Properties + +/// Date when file has been uploaded. +/// +/// > Note: This information is set only when file retrieved from history. +@property(strong, nullable, nonatomic, readonly) NSDate *created; + +/// URL which can be used to download file. +@property(strong, nonatomic, readonly) NSURL *downloadURL; + +/// Unique uploaded file identifier. +@property(copy, nonatomic, readonly) NSString *identifier; + +/// Uploaded file size. +/// +/// > Note: This information is set only when file retrieved from history. +@property(assign, nonatomic, readonly) NSUInteger size; + +/// Name with which file has been uploaded. +@property(copy, nonatomic, readonly) NSString *name; #pragma mark - diff --git a/PubNub/Data/Models/PNFile.m b/PubNub/Data/Models/PNFile.m index 0274d71a4..5e321801c 100644 --- a/PubNub/Data/Models/PNFile.m +++ b/PubNub/Data/Models/PNFile.m @@ -1,59 +1,20 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "NSDateFormatter+PNCacheable.h" #import "PNFile+Private.h" +#import NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration -@interface PNFile () +/// `Shared file` data object private extension. +@interface PNFile () -#pragma mark - Information +#pragma mark - Properties -/** - * @brief URL which can be used to download file. - */ +/// URL which can be used to download file. @property (nonatomic, strong) NSURL *downloadURL; -/** - * @brief Unique uploaded file identifier. - */ -@property (nonatomic, copy) NSString *identifier; - -/** - * @brief Date when file has been uploaded. - */ -@property (nonatomic, strong) NSDate *created; - -/** - * @brief Uploaded file size. - */ -@property (nonatomic, assign) NSUInteger size; - -/** - * @brief Name with which file has been uploaded. - */ -@property (nonatomic, copy) NSString *name; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Initialize \c uploaded \c file data model from dictionary. - * - * @param data Dictionary with information about \c uploaded \c file from Files API. - * - * @return Initialized and ready to use \c uploaded \c file representation model. - */ -- (instancetype)initFromDictionary:(NSDictionary *)data; - #pragma mark - @@ -67,26 +28,19 @@ - (instancetype)initFromDictionary:(NSDictionary *)data; @implementation PNFile -#pragma mark - Initialization & Configuration +#pragma mark - Properties -+ (instancetype)fileFromDictionary:(NSDictionary *)data { - return [[self alloc] initFromDictionary:data]; ++ (NSDictionary *)codingKeys { + return @{ + @"name": @"name", + @"identifier": @"id", + @"size": @"size", + @"created": @"created" + }; } -- (instancetype)initFromDictionary:(NSDictionary *)data { - if ((self = [super init])) { - _size = ((NSNumber *)data[@"size"]).unsignedIntegerValue; - _downloadURL = [NSURL URLWithString:data[@"downloadURL"]]; - _identifier = [data[@"id"] copy]; - _name = [data[@"name"] copy]; - - if (data[@"created"]) { - NSDateFormatter *formatter = [NSDateFormatter pn_filesDateFormatter]; - _created = [formatter dateFromString:data[@"created"]]; - } - } - - return self; ++ (NSArray *)optionalKeys { + return @[@"created", @"downloadURL", @"size"]; } #pragma mark - diff --git a/PubNub/Data/Models/PNMembership+Private.h b/PubNub/Data/Models/PNMembership+Private.h deleted file mode 100644 index 7334ab1fa..000000000 --- a/PubNub/Data/Models/PNMembership+Private.h +++ /dev/null @@ -1,43 +0,0 @@ -#import "PNMembership.h" - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface declaration - -/** - * @brief Private \c membership extension to provide ability to set data from service response. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNMembership (Private) - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c membership data model from dictionary. - * - * @param data Dictionary with information about \c membership from Objects API. - * - * @return Configured and ready to use \c membership data model. - */ -+ (instancetype)membershipFromDictionary:(NSDictionary *)data; - -/** - * @brief Create and configure \c membership data model. - * - * @param metadata \c Metadata which associated with \c UUID in context of \c channel. - * - * @return Configured and ready to use \c membership representation model. - */ -+ (instancetype)membershipWithChannelMetadata:(PNChannelMetadata *)metadata; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Models/PNMembership.h b/PubNub/Data/Models/PNMembership.h index be947cbc7..a5ef96294 100644 --- a/PubNub/Data/Models/PNMembership.h +++ b/PubNub/Data/Models/PNMembership.h @@ -1,64 +1,29 @@ -#import - - -#pragma mark Class forward - -@class PNChannelMetadata; +#import +#import NS_ASSUME_NONNULL_BEGIN -#pragma mark - Interface declaration +#pragma mark Interface declaration -/** - * @brief Object which is used to represent \c UUID's membership in \c channel. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNMembership : NSObject +/// `UUID membership` object. +@interface PNMembership : PNBaseAppContextObject -#pragma mark - Information +#pragma mark - Properties -/** - * @brief \c Metadata associated with \c channel which is listed in \c UUID's memberships list. - * - * @note This property will be set only if \b PNMembershipChannelField has been added to - * \c includeFields list during request. - */ -@property (nonatomic, nullable, readonly, strong) PNChannelMetadata *metadata; +/// `Metadata` associated with `channel` which is listed in `UUID`'s memberships list. +/// +/// > Note: This property will be set only if **PNMembershipChannelField** has been added to `includeFields` list during +/// request. +@property(strong, nullable, nonatomic, readonly) PNChannelMetadata *metadata; -/** - * @brief Additional information from \c metadata which has been associated with \c UUID during - * \c UUID \c membership \c add requests. - */ -@property (nonatomic, nullable, readonly, strong) NSDictionary *custom; +/// UUID's for which membership has been created / removed. +@property(copy, nonatomic, nullable, readonly) NSString *uuid; -/** - * @brief \c UUID's for which membership has been created / removed. - * - * @note This value is set only when object received as one of subscription events. - */ -@property (nonatomic, nullable, readonly, copy) NSString *uuid; - -/** - * @brief Name of channel which is listed in \c UUID's memberships list. - */ +/// Name of channel which is listed in `UUID`'s memberships list. @property (nonatomic, readonly, copy) NSString *channel; -/** - * @brief \c Membership data modification date. - */ -@property (nonatomic, readonly, strong) NSDate *updated; - -/** - * @brief \c Membership object version identifier. - */ -@property (nonatomic, readonly, copy) NSString *eTag; - #pragma mark - diff --git a/PubNub/Data/Models/PNMembership.m b/PubNub/Data/Models/PNMembership.m index 62b846c15..b8c71587d 100644 --- a/PubNub/Data/Models/PNMembership.m +++ b/PubNub/Data/Models/PNMembership.m @@ -1,78 +1,25 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "NSDateFormatter+PNCacheable.h" -#import "PNChannelMetadata+Private.h" -#import "PNMembership+Private.h" +#import "PNMembership.h" +#import +#import +#import "PNBaseAppContextObject+Private.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration -@interface PNMembership () +/// `UUID membership` object private extension. +@interface PNMembership () -#pragma mark - Information +#pragma mark - Properties -/** - * @brief \c Metadata associated with \c channel which is listed in \c UUID's memberships list. - */ -@property (nonatomic, nullable, strong) PNChannelMetadata *metadata; - -/** - * @brief Additional information from \c metadata which has been associated with \c UUID during - * \c UUID \c membership \c add requests. - */ -@property (nonatomic, nullable, strong) NSDictionary *custom; - -/** - * @brief \c UUID's for which membership has been created / removed. - * - * @note This value is set only when object received as one of subscription events. - */ -@property (nonatomic, nullable, copy) NSString *uuid; - -/** - * @brief Name of channel which is listed in \c UUID's memberships list. - */ -@property (nonatomic, copy) NSString *channel; - -/** - * @brief \c Membership data modification date. - */ -@property (nonatomic, strong) NSDate *updated; - -/** - * @brief \c Membership object version identifier. - */ -@property (nonatomic, copy) NSString *eTag; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Initialize \c membership data model. - * - * @param metadata \c Metadata which associated with \c UUID in context of \c channel. - * - * @return Initialized and ready to use \c membership representation model. - */ -- (instancetype)initWithChannelMetadata:(PNChannelMetadata *)metadata; - - -#pragma mark - Misc - -/** - * @brief Translate \c channel \c metadata data model to dictionary. - */ -- (NSDictionary *)dictionaryRepresentation; +/// UUID's for which membership has been created / removed. +@property(strong, nonatomic, nullable) PNUUIDMetadata *uuidMetadataObject; #pragma mark - + @end NS_ASSUME_NONNULL_END @@ -83,50 +30,37 @@ - (NSDictionary *)dictionaryRepresentation; @implementation PNMembership -#pragma mark - Initialization & Configuration - -+ (instancetype)membershipFromDictionary:(NSDictionary *)data { - NSDateFormatter *formatter = [NSDateFormatter pn_objectsDateFormatter]; - PNChannelMetadata *channelMetadata = [PNChannelMetadata channelMetadataFromDictionary:data[@"channel"]]; - PNMembership *membership = [PNMembership membershipWithChannelMetadata:channelMetadata]; - membership.custom = data[@"custom"]; - membership.eTag = data[@"eTag"]; - - if (data[@"updated"]) { - membership.updated = [formatter dateFromString:data[@"updated"]]; - } - - if (data[@"uuid"]) { - membership.uuid = data[@"uuid"][@"id"]; - } - - return membership; +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ + @"metadata": @"channel", + @"uuidMetadataObject": @"_uuid" + }; } -+ (instancetype)membershipWithChannelMetadata:(PNChannelMetadata *)metadata { - return [[self alloc] initWithChannelMetadata:metadata]; ++ (NSArray *)optionalKeys { + return @[@"uuidMetadataObject"]; } -- (instancetype)initWithChannelMetadata:(PNChannelMetadata *)metadata { - if ((self = [super init])) { - _channel = [metadata.channel copy]; - _metadata = metadata; - } ++ (NSArray *)ignoredKeys { + return @[@"channel"]; +} + +- (NSString *)channel { + return self.metadata.channel; +} - return self; +- (NSString *)uuid { + return self.uuidMetadataObject.uuid; } #pragma mark - Misc -- (NSDictionary *)dictionaryRepresentation { - NSMutableDictionary *dictionary = [@{ @"type": @"membership" } mutableCopy]; - - dictionary[@"metadata"] = self.metadata.debugDescription; - dictionary[@"channel"] = self.channel; - dictionary[@"custom"] = self.custom; - dictionary[@"uuid"] = self.uuid; - dictionary[@"eTag"] = self.eTag; +- (NSMutableDictionary *)dictionaryRepresentation { + NSMutableDictionary *dictionary = [super dictionaryRepresentation]; + dictionary[@"channel"] = [self.metadata dictionaryRepresentation]; return dictionary; } diff --git a/PubNub/Data/Models/PNMessageAction+Private.h b/PubNub/Data/Models/PNMessageAction+Private.h deleted file mode 100644 index e4aee7b2c..000000000 --- a/PubNub/Data/Models/PNMessageAction+Private.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNMessageAction.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface declaration - -/** - * @brief Private \c message \c action extension to provide ability to set data from service - * response. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNMessageAction (Private) - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c message \c action data model from dictionary. - * - * @param data Dictionary with information about \c message \c action from 'Message Action' API. - * - * @return Configured and ready to use \c message \c action representation model. - */ -+ (instancetype)actionFromDictionary:(NSDictionary *)data; - -#pragma mark - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Models/PNMessageAction.h b/PubNub/Data/Models/PNMessageAction.h deleted file mode 100644 index c4ed86fd2..000000000 --- a/PubNub/Data/Models/PNMessageAction.h +++ /dev/null @@ -1,53 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief Object which is used to represent \c message \c action. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNMessageAction : NSObject - - -#pragma mark - Information - -/** - * @brief What feature this \c message \c action represents. - */ -@property (nonatomic, readonly, copy) NSString *type; - -/** - * @brief Timetoken (\b PubNub's high precision timestamp) of \c message for which \c action has - * been added. - */ -@property (nonatomic, readonly, strong) NSNumber *messageTimetoken; - -/** - * @brief \c Message \c action addition timetoken (\b PubNub's high precision timestamp). - */ -@property (nonatomic, readonly, strong) NSNumber *actionTimetoken; - -/** - * @brief \c Identifier of user which added this \c message \c action. - */ -@property (nonatomic, readonly, copy) NSString *uuid; - -/** - * @brief Value which has been added with \c message \c action \b type. - */ -@property (nonatomic, readonly, copy) NSString *value; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Models/PNMessageAction.m b/PubNub/Data/Models/PNMessageAction.m deleted file mode 100644 index 260df071e..000000000 --- a/PubNub/Data/Models/PNMessageAction.m +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNMessageAction+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interface declaration - -@interface PNMessageAction () - - -#pragma mark - Information - -/** - * @brief What feature this \c message \c action represents. - */ -@property (nonatomic, copy) NSString *type; - -/** - * @brief Timetoken (\b PubNub's high precision timestamp) of \c message for which \c action has - * been added. - */ -@property (nonatomic, strong) NSNumber *messageTimetoken; - -/** - * @brief \c Message \c action addition timetoken (\b PubNub's high precision timestamp). - */ -@property (nonatomic, strong) NSNumber *actionTimetoken; - -/** - * @brief \c Identifier of user which added this \c message \c action. - */ -@property (nonatomic, copy) NSString *uuid; - -/** - * @brief Value which has been added with \c message \c action \b type. - */ -@property (nonatomic, copy) NSString *value; - - -#pragma mark - Misc - -/** - * @brief Translate \c message \c action data model to dictionary. - */ -- (NSDictionary *)dictionaryRepresentation; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNMessageAction - - -#pragma mark - Initialization & Configuration - -+ (instancetype)actionFromDictionary:(NSDictionary *)data { - PNMessageAction *action = [self new]; - action.value = data[@"value"]; - action.uuid = data[@"uuid"]; - action.actionTimetoken = data[@"actionTimetoken"]; - action.messageTimetoken = data[@"messageTimetoken"]; - action.type = data[@"type"]; - - return action; -} - - -#pragma mark - Misc - -- (NSDictionary *)dictionaryRepresentation { - return @{ - @"type": self.type, - @"uuid": self.uuid, - @"actionTimetoken": self.actionTimetoken, - @"messageTimetoken": self.messageTimetoken, - @"value": self.value - }; -} - -- (NSString *)debugDescription { - return [[self dictionaryRepresentation] description]; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Models/PNPAMToken.m b/PubNub/Data/Models/PNPAMToken.m index af6f86289..3468fd390 100644 --- a/PubNub/Data/Models/PNPAMToken.m +++ b/PubNub/Data/Models/PNPAMToken.m @@ -6,8 +6,8 @@ */ #import "PNPAMToken+Private.h" #import "PNCBORDecoder.h" -#import "PNErrorCodes.h" #import "PNString.h" +#import "PNError.h" #pragma mark Types & Structures @@ -316,8 +316,8 @@ - (instancetype)initFromBase64String:(NSString *)string forUUID:(NSString *)uuid "current PubNub instance.", self.authorizedUUID, uuid] }; - self.error = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAuthPAMTokenWrongUUIDError + self.error = [NSError errorWithDomain:PNAPIErrorDomain + code:PNAuthErrorPAMTokenWrongUUID userInfo:userInfo]; } } @@ -341,8 +341,8 @@ - (void)processTokenData { NSLocalizedDescriptionKey: [NSString stringWithFormat:@"PAM token should be parsed as NSDictionary, but got %@", NSStringFromClass([value class])] }; - error = [NSError errorWithDomain:kPNCBORErrorDomain - code:kPNCBORUnexpectedDataTypeError + error = [NSError errorWithDomain:PNCBORErrorDomain + code:PNCBORErrorUnexpectedDataType userInfo:userInfo]; } @@ -360,8 +360,8 @@ - (void)processTokenData { NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Provided PAM token expired %@ seconds ago.", @(currentDate - tokenExpiration)] }; - error = [NSError errorWithDomain:kPNAuthErrorDomain - code:kPNAuthPAMTokenExpiredError + error = [NSError errorWithDomain:PNAuthErrorDomain + code:PNAuthErrorPAMTokenExpired userInfo:userInfo]; } diff --git a/PubNub/Data/Models/PNUUIDMetadata+Private.h b/PubNub/Data/Models/PNUUIDMetadata+Private.h deleted file mode 100644 index 2efbc7dec..000000000 --- a/PubNub/Data/Models/PNUUIDMetadata+Private.h +++ /dev/null @@ -1,78 +0,0 @@ -#import "PNUUIDMetadata.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface declaration - -/** - * @brief Private \c UUID \c metadata extension to provide ability to set data from service - * response. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNUUIDMetadata (Private) - - -#pragma mark - Information - -/** - * @brief Additional / complex attributes which should be associated with \c metadata. - */ -@property (nonatomic, nullable, strong) NSDictionary *custom; - -/** - * @brief Identifier from external service (database, auth service). - */ -@property (nonatomic, nullable, copy) NSString *externalId; - -/** - * @brief URL at which profile available. - */ -@property (nonatomic, nullable, copy) NSString *profileUrl; - -/** - * @brief Last \c metadata update date. - */ -@property (nonatomic, nullable, strong) NSDate *updated; - -/** - * @brief Email address. - */ -@property (nonatomic, nullable, copy) NSString *email; - -/** - * @brief Name which should be stored in \c metadata associated with specified \c uuid. - */ -@property (nonatomic, nullable, copy) NSString *name; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c UUID \c metadata data model from dictionary. - * - * @param data Dictionary with information about \c UUID \c metadata from Objects API. - * - * @return Configured and ready to use \c UUID \c metadata representation model. - */ -+ (instancetype)uuidMetadataFromDictionary:(NSDictionary *)data; - -/** - * @brief Create and configure \c UUID \c metadata data model. - * - * @param uuid Identifier with which \c metadata associated. - * - * @return Configured and ready to use \c UUID \c metadata representation model. - */ -+ (instancetype)metadataForUUID:(NSString *)uuid; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Models/PNUUIDMetadata.h b/PubNub/Data/Models/PNUUIDMetadata.h index 43033aad1..e914113bd 100644 --- a/PubNub/Data/Models/PNUUIDMetadata.h +++ b/PubNub/Data/Models/PNUUIDMetadata.h @@ -1,62 +1,36 @@ -#import +#import NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief Object which is used to represent \c UUID \c metadata. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNUUIDMetadata : NSObject - - -#pragma mark - Information - -/** - * @brief Additional / complex attributes which should be associated with \c metadata. - */ -@property (nonatomic, nullable, readonly, strong) NSDictionary *custom; - -/** - * @brief Identifier from external service (database, auth service). - */ -@property (nonatomic, nullable, readonly, copy) NSString *externalId; - -/** - * @brief URL at which profile available. - */ -@property (nonatomic, nullable, readonly, copy) NSString *profileUrl; - -/** - * @brief Email address. - */ -@property (nonatomic, nullable, readonly, copy) NSString *email; - -/** - * @brief Last \c metadata update date. - */ -@property (nonatomic, readonly, strong) NSDate *updated; - -/** - * @brief Name which should be stored in \c metadata associated with specified \c uuid. - */ -@property (nonatomic, readonly, copy) NSString *name; - -/** - * @brief \c UUID with which \c metadata has been associated. - */ -@property (nonatomic, readonly, copy) NSString *uuid; - -/** - * @brief \c UUID \c metadata object version identifier. - */ -@property (nonatomic, readonly, copy) NSString *eTag; +/// `UUID Metadata` object. +@interface PNUUIDMetadata : PNBaseAppContextObject + + +#pragma mark - Properties + +/// Identifier from external service (database, auth service). +@property(copy, nullable, nonatomic, readonly) NSString *externalId; + +/// URL at which profile available. +@property(copy, nullable, nonatomic, readonly) NSString *profileUrl; + +/// Email address. +@property(copy, nullable, nonatomic, readonly) NSString *email; + +/// `User`'s object status. +@property(copy, nullable, nonatomic, readonly) NSString *status; + +/// Name which should be stored in `metadata` associated with specified `uuid`. +@property(copy, nullable, nonatomic, readonly) NSString *name; + +/// `User`'s object type information. +@property(copy, nullable, nonatomic, readonly) NSString *type; + +/// `UUID` with which `metadata` has been associated. +@property(copy, nonatomic, readonly) NSString *uuid; #pragma mark - diff --git a/PubNub/Data/Models/PNUUIDMetadata.m b/PubNub/Data/Models/PNUUIDMetadata.m index 5f61d974f..dc404e794 100644 --- a/PubNub/Data/Models/PNUUIDMetadata.m +++ b/PubNub/Data/Models/PNUUIDMetadata.m @@ -1,82 +1,16 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "NSDateFormatter+PNCacheable.h" -#import "PNUUIDMetadata+Private.h" +#import "PNUUIDMetadata.h" +#import +#import "PNBaseAppContextObject+Private.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration -@interface PNUUIDMetadata () +/// `UUID Metadata` object private extension. +@interface PNUUIDMetadata () -#pragma mark - Information - -/** - * @brief Identifier from external service (database, auth service). - */ -@property (nonatomic, nullable, copy) NSString *externalId; - -/** - * @brief URL at which profile available. - */ -@property (nonatomic, nullable, copy) NSString *profileUrl; - -/** - * @brief Additional / complex attributes which should be associated with \c metadata. - */ -@property (nonatomic, nullable, strong) NSDictionary *custom; - -/** - * @brief Last \c metadata update date. - */ -@property (nonatomic, nullable, strong) NSDate *updated; - -/** - * @brief Email address. - */ -@property (nonatomic, nullable, copy) NSString *email; - -/** - * @brief \c UUID \c metadata object version identifier. - */ -@property (nonatomic, nullable, copy) NSString *eTag; - -/** - * @brief \c UUID with which \c metadata has been associated. - */ -@property (nonatomic, copy) NSString *uuid; - -/** - * @brief Name which should be stored in \c metadata associated with specified \c uuid. - */ -@property (nonatomic, copy) NSString *name; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Initialize \c UUID \c metadata data model. - * - * @param uuid Identifier with which \c metadata associated. - * - * @return Initialized and ready to use \c UUID \c metadata representation model. - */ -- (instancetype)initWithUUID:(NSString *)uuid; - - -#pragma mark - Misc - -/** - * @brief Translate \c UUID \c metadata data model to dictionary. - */ -- (NSDictionary *)dictionaryRepresentation; - #pragma mark - @@ -90,52 +24,37 @@ - (NSDictionary *)dictionaryRepresentation; @implementation PNUUIDMetadata -#pragma mark - Initialization & Configuration - -+ (instancetype)uuidMetadataFromDictionary:(NSDictionary *)data { - PNUUIDMetadata *metadata = [PNUUIDMetadata metadataForUUID:data[@"id"]]; - metadata.externalId = data[@"externalId"]; - metadata.profileUrl = data[@"profileUrl"]; - metadata.custom = data[@"custom"]; - metadata.email = data[@"email"]; - metadata.eTag = data[@"eTag"]; - metadata.name = data[@"name"]; - - NSDateFormatter *formatter = [NSDateFormatter pn_objectsDateFormatter]; +#pragma mark - Properties - if (data[@"updated"]) { - metadata.updated = [formatter dateFromString:data[@"updated"]]; - } - - return metadata; ++ (NSDictionary *)codingKeys { + return @{ + @"name": @"name", + @"email": @"email", + @"profileUrl": @"profileUrl", + @"externalId": @"externalId", + @"status": @"status", + @"type": @"type", + @"uuid": @"id", + }; } -+ (instancetype)metadataForUUID:(NSString *)uuid { - return [[self alloc] initWithUUID:uuid]; -} - -- (instancetype)initWithUUID:(NSString *)uuid { - if ((self = [super init])) { - _uuid = [uuid copy]; - } - - return self; ++ (NSArray *)optionalKeys { + return @[@"name", @"email", @"profileUrl", @"externalId", @"status", @"type"]; } #pragma mark - Misc -- (NSDictionary *)dictionaryRepresentation { - NSMutableDictionary *dictionary = [@{ @"type": @"uuid-metadata" } mutableCopy]; - - dictionary[@"externalId"] = self.externalId; - dictionary[@"profileUrl"] = self.profileUrl; - dictionary[@"updated"] = self.updated; - dictionary[@"custom"] = self.custom; - dictionary[@"email"] = self.email; - dictionary[@"name"] = self.name; +- (NSMutableDictionary *)dictionaryRepresentation { + NSMutableDictionary *dictionary = [super dictionaryRepresentation]; dictionary[@"uuid"] = self.uuid; - dictionary[@"eTag"] = self.eTag; + + if (self.externalId) dictionary[@"externalId"] = self.externalId; + if (self.profileUrl) dictionary[@"profileUrl"] = self.profileUrl; + if (self.email) dictionary[@"email"] = self.email; + if (self.name) dictionary[@"name"] = self.name; + if (self.status) dictionary[@"status"] = self.status; + if (self.type) dictionary[@"type"] = self.type; return dictionary; } diff --git a/PubNub/Data/PNAES.m b/PubNub/Data/PNAES.m index a36bbaa5c..045570fff 100644 --- a/PubNub/Data/PNAES.m +++ b/PubNub/Data/PNAES.m @@ -8,11 +8,11 @@ #import #import #import "PubNub+CorePrivate.h" -#import "PNErrorCodes.h" #import "PNConstants.h" #import "PNLogMacro.h" #import "PNLLogger.h" #import "PNHelpers.h" +#import "PNError.h" #pragma mark Static diff --git a/PubNub/Data/PNCBORDecoder.m b/PubNub/Data/PNCBORDecoder.m index f4bbd13dc..a58859ced 100644 --- a/PubNub/Data/PNCBORDecoder.m +++ b/PubNub/Data/PNCBORDecoder.m @@ -5,7 +5,7 @@ * @copyright © 2010-2021 PubNub, Inc. */ #import "PNCBORDecoder.h" -#import "PNErrorCodes.h" +#import "PNError.h" #pragma mark Struct & Types @@ -322,7 +322,7 @@ - (id)decodeWithError:(NSError **)error { NSLocalizedDescriptionKey: @"Data item in given data doesn't have 'head' byte with information about it." }; - *error = [NSError errorWithDomain:kPNCBORErrorDomain code:kPNCBORMalformedDataError userInfo:userInfo]; + *error = [NSError errorWithDomain:PNCBORErrorDomain code:PNCBORErrorMalformedData userInfo:userInfo]; } return value; @@ -403,8 +403,8 @@ - (id)decodeDataItemWithError:(NSError **)error { if (decodeDataItemError) { *error = decodeDataItemError; } else { - *error = [NSError errorWithDomain:kPNCBORErrorDomain - code:kPNCBORDataItemNotWellFormedError + *error = [NSError errorWithDomain:PNCBORErrorDomain + code:PNCBORErrorDataItemNotWellFormed userInfo:errorUserInfo]; } } @@ -530,8 +530,8 @@ - (NSData *)readCStringWithIndefiniteLength:(BOOL)isIndefiniteLength if (cStringReadError) { *error = cStringReadError; } else { - *error = [NSError errorWithDomain:kPNCBORErrorDomain - code:kPNCBORDataItemNotWellFormedError + *error = [NSError errorWithDomain:PNCBORErrorDomain + code:PNCBORErrorDataItemNotWellFormed userInfo:errorUserInfo]; } } @@ -600,8 +600,8 @@ - (NSString *)readStringWithIndefiniteLength:(BOOL)isIndefiniteLength if (stringReadError) { *error = stringReadError; } else { - *error = [NSError errorWithDomain:kPNCBORErrorDomain - code:kPNCBORDataItemNotWellFormedError + *error = [NSError errorWithDomain:PNCBORErrorDomain + code:PNCBORErrorDataItemNotWellFormed userInfo:errorUserInfo]; } } @@ -726,8 +726,8 @@ - (NSArray *)readArrayOfIndefiniteLength:(BOOL)isIndefiniteLength if (arrayReadError) { *error = arrayReadError; } else { - *error = [NSError errorWithDomain:kPNCBORErrorDomain - code:kPNCBORMissingDataItemError + *error = [NSError errorWithDomain:PNCBORErrorDomain + code:PNCBORErrorMissingDataItem userInfo:errorUserInfo]; } } @@ -799,8 +799,8 @@ - (NSDictionary *)readDictionaryOfIndefiniteLength:(BOOL)isIndefiniteLength if (dictionaryReadError) { *error = dictionaryReadError; } else { - *error = [NSError errorWithDomain:kPNCBORErrorDomain - code:kPNCBORMissingDataItemError + *error = [NSError errorWithDomain:PNCBORErrorDomain + code:PNCBORErrorMissingDataItem userInfo:errorUserInfo]; } } diff --git a/PubNub/Data/PNConfiguration+Private.h b/PubNub/Data/PNConfiguration+Private.h index c09806c2c..2d6d34a0a 100644 --- a/PubNub/Data/PNConfiguration+Private.h +++ b/PubNub/Data/PNConfiguration+Private.h @@ -11,6 +11,12 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Information +/// String representation of filtering expression which should be applied to decide which updates should reach client. +/// +/// > Warning: If your filter expression is malformed, ``PNEventsListener`` won't receive any messages and presence +/// events from service (only error status). +@property(copy, nullable, nonatomic) NSString *filterExpression; + /// Token which is used along with every request to **PubNub** service to identify client user. /// /// **PubNub** service provide **PAM** (PubNub Access Manager) functionality which allow to specify access rights to @@ -21,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN /// > Important: If `authToken` is set if till be used instead of `authKey`. /// /// This property not set by default. -@property (nonatomic, nullable, copy) NSString *authToken; +@property(copy, nullable, nonatomic) NSString *authToken; #pragma mark - diff --git a/PubNub/Data/PNConfiguration.h b/PubNub/Data/PNConfiguration.h index f3ff9e5aa..4abf37545 100644 --- a/PubNub/Data/PNConfiguration.h +++ b/PubNub/Data/PNConfiguration.h @@ -6,16 +6,8 @@ NS_ASSUME_NONNULL_BEGIN -/** - * @brief \b PubNub client configuration wrapper. - * - * @discussion Use this instance to provide values which should be by client to communicate with - * \b PubNub network. - * - * @author Sergey Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ +#pragma mark Interface declaration + /// **PubNub** client configuration wrapper. /// /// Use this instance to provide values which should be by client to communicate with **PubNub** network. @@ -25,34 +17,34 @@ NS_ASSUME_NONNULL_BEGIN @interface PNConfiguration : NSObject -#pragma mark Initialization and Configuration +#pragma mark - Properties /// Host name or IP address which should be used by client to get access to the **PubNub** network. /// /// This property is set to **ps.pndsn.com** by default. -@property (nonatomic, copy) NSString *origin; +@property(copy, nonatomic) NSString *origin; /// Key which is used to push data / state to the **PubNub** network. /// /// > Note: This key can be obtained on PubNub's [administration](https://admin.pubnub.com) portal after free /// registration -@property (nonatomic, copy) NSString *publishKey; +@property(copy, nonatomic) NSString *publishKey; /// Key which is used to fetch data / state from the **PubNub** network. /// /// > Note: This key can be obtained on PubNub's [administration](https://admin.pubnub.com) portal after free /// registration -@property (nonatomic, copy) NSString *subscribeKey; +@property(copy, nonatomic) NSString *subscribeKey; /// Key which is used along with every request to the **PubNub** network to identify client user. /// /// **PubNub** provides **PAM** (PubNub Access Manager) functionality which allow to specify access rights to access -/// **PubNub** network with provided `publishKey` and `subscribeKey` keys. +/// **PubNub** network with provided ``publishKey`` and ``subscribeKey`` keys. /// Access can be limited to concrete users. **PAM** system use this key to check whether client user has rights to /// access to required service or not. /// /// This property not set by default. -@property (nonatomic, nullable, copy) NSString *authKey; +@property(copy, nullable, nonatomic) NSString *authKey; /// Unique client identifier used to identify concrete client user from another which currently use **PubNub** services. /// @@ -62,25 +54,25 @@ NS_ASSUME_NONNULL_BEGIN /// > Warning: There can't be two same client identifiers online at the same time. /// /// - Throws: An exception in case if `uuid` is empty string. -@property (nonatomic, copy, setter = setUUID:) NSString *uuid +@property(copy, nonatomic, setter = setUUID:) NSString *uuid DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next major update. Please use `userID` " "instead."); /// Unique client identifier used to identify concrete client user from another which currently use **PubNub** services. /// -/// This value is different from `authKey` (which is used only by **PAM**) and represent concrete client across server. -/// This identifier is used for presence events to tell what some client joined or leaved live feed. +/// This value is different from ``authKey`` (which is used only by **PAM**) and represent concrete client across +/// server. This identifier is used for presence events to tell what some client joined or leaved live feed. /// /// > Warning: There can't be two same client identifiers online at the same time. /// /// - Throws: An exception in case if `userID` is empty string. -@property (nonatomic, copy, setter = setUserID:) NSString *userID; +@property(copy, nonatomic, setter = setUserID:) NSString *userID; /// Key for data _encryption_ and _decryption_. /// /// Key which is used to _encrypt_ messages pushed to the **PubNub** network and decrypt data received from live feeds /// on which client subscribed at this moment. -@property (nonatomic, nullable, copy) NSString *cipherKey +@property(copy, nullable, nonatomic) NSString *cipherKey DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next major update. Please use " "`cryptoModule` instead."); @@ -88,10 +80,12 @@ DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next /// /// **PubNub** client uses this instance to _encrypt_ and _decrypt_ data that has been sent and received from the /// **PubNub** network. -@property(nonatomic, strong) id cryptoModule; +@property(strong, nonatomic) id cryptoModule; /// Unique device identifier based on bundle identifier used by software vendor. -@property (nonatomic, readonly, copy) NSString *deviceID; +@property(copy, nonatomic, readonly) NSString *deviceID + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next major update. Unique value will " + "be generated for each PubNub client instance."); /// Maximum number of seconds which client should wait for events from live feed. /// @@ -99,7 +93,7 @@ DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next /// remote data objects with same time token (if configured). /// /// This property is set to **310** by default. -@property (nonatomic, assign) NSTimeInterval subscribeMaximumIdleTime; +@property(assign, nonatomic) NSTimeInterval subscribeMaximumIdleTime; /// Number of seconds which is used by client during non-subscription operations to check whether response potentially /// failed with `timeout` or not. @@ -107,29 +101,29 @@ DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next /// This is maximum time which client should wait fore response from **PubNub** network before reporting request error. /// /// This property is set to **10** by default. -@property (nonatomic, assign) NSTimeInterval nonSubscribeRequestTimeout; +@property(assign, nonatomic) NSTimeInterval nonSubscribeRequestTimeout; /// Number of seconds which is used by server to track whether client still subscribed on remote data objects live feed /// or not. /// /// This is time within which **PubNub** network expect to receive heartbeat request from this client. If heartbeat -/// request won't be called in time **PubNub** network will send to other subscribers `timeout` presence event for this \ +/// request won't be called in time **PubNub** network will send to other subscribers `timeout` presence event for this /// client. -@property (nonatomic, assign) NSInteger presenceHeartbeatValue; +@property(assign, nonatomic) NSInteger presenceHeartbeatValue; /// Number of seconds which is used by client to issue heartbeat requests to **PubNub** network. /// /// > Note: This value should be smaller than `presenceHeartbeatValue` for better presence control. /// /// This property not set by default. -@property (nonatomic, assign) NSInteger presenceHeartbeatInterval; +@property(assign, nonatomic) NSInteger presenceHeartbeatInterval; /// Bitfield which describe client's behaviour on which heartbeat request processing states delegate should be notified. /// /// This property is set to **PNHeartbeatNotifyFailure** by default to notify only about failed requests. /// /// - Since: 4.2.7 -@property (nonatomic, assign) PNHeartbeatNotificationOptions heartbeatNotificationOptions; +@property(assign, nonatomic) PNHeartbeatNotificationOptions heartbeatNotificationOptions; /// Whether client shouldn't send presence `leave` events during un-subscription process. /// @@ -137,7 +131,7 @@ DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next /// without notifying remote subscribers about leave. /// /// - Since: 4.7.3 -@property (nonatomic, assign, getter = shouldSuppressLeaveEvents) BOOL suppressLeaveEvents +@property(assign, nonatomic, getter = shouldSuppressLeaveEvents) BOOL suppressLeaveEvents NS_SWIFT_NAME(suppressLeaveEvents); /// Whether heartbeat list managed manually or not. @@ -147,18 +141,18 @@ DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next /// With manual management special methods can be used to add channels and/or groups to heartbeat list. /// /// - Since: 4.8.0 -@property (nonatomic, assign, getter = shouldManagePresenceListManually) BOOL managePresenceListManually +@property(assign, nonatomic, getter = shouldManagePresenceListManually) BOOL managePresenceListManually NS_SWIFT_NAME(managePresenceListManually); /// Whether client should communicate with **PubNub** network using secured connection or not. /// /// This property is set to **YES** by default. -@property (nonatomic, assign, getter = isTLSEnabled) BOOL TLSEnabled NS_SWIFT_NAME(TLSEnabled); +@property(assign, nonatomic, getter = isTLSEnabled) BOOL TLSEnabled NS_SWIFT_NAME(TLSEnabled); /// Whether client should keep previous time token when subscribe on new set of remote data objects live feeds. /// /// This property is set to **YES** by default. -@property (nonatomic, assign, getter = shouldKeepTimeTokenOnListChange) BOOL keepTimeTokenOnListChange +@property(assign, nonatomic, getter = shouldKeepTimeTokenOnListChange) BOOL keepTimeTokenOnListChange NS_SWIFT_NAME(keepTimeTokenOnListChange); /// Whether client should try to catch up for events which occurred on previously subscribed remote data objects feed @@ -173,7 +167,7 @@ DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next /// /// This property is set to **YES** by default to try catch up on missed messages (while client has been disconnected /// because of network issues). -@property (nonatomic, assign, getter = shouldTryCatchUpOnSubscriptionRestore) BOOL catchUpOnSubscriptionRestore +@property(assign, nonatomic, getter = shouldTryCatchUpOnSubscriptionRestore) BOOL catchUpOnSubscriptionRestore NS_SWIFT_NAME(catchUpOnSubscriptionRestore); /// Group identifier which is used to share request cache between application extension and it's containing application. @@ -198,8 +192,10 @@ DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next /// > Warning: Subscribe / unsubscribe API calls will be silently ignored. /// /// - Since: 4.5.4 -@property (nonatomic, copy) NSString *applicationExtensionSharedGroupIdentifier - NS_SWIFT_NAME(applicationExtensionSharedGroupIdentifier) NS_AVAILABLE(10_10, 8_0); +@property(copy, nonatomic) NSString *applicationExtensionSharedGroupIdentifier + NS_SWIFT_NAME(applicationExtensionSharedGroupIdentifier) NS_AVAILABLE(10_10, 8_0) + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. Data doesn't " + "need to be shared between the main app and the extension."); /// Number of maximum expected messages from **PubNub** network in single response. /// @@ -208,7 +204,7 @@ DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next /// triggered - this may mean what history request should be done. /// /// - Since: 4.5.4 -@property (nonatomic, assign) NSUInteger requestMessageCountThreshold +@property(assign, nonatomic) NSUInteger requestMessageCountThreshold NS_SWIFT_NAME(requestMessageCountThreshold); /** @@ -239,20 +235,21 @@ DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next /// This property is set to **100** by default. /// /// - Since: 4.5.8 -@property (nonatomic, assign) NSUInteger maximumMessagesCacheSize +@property(assign, nonatomic) NSUInteger maximumMessagesCacheSize NS_SWIFT_NAME(maximumMessagesCacheSize); -#if TARGET_OS_IOS +#if TARGET_OS_OSX || TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) /// Whether client should try complete all API call which is done before application will be completely suspended. /// /// > Note: This property ignored when SDK compiled for application with application extension. /// /// This property is set to **YES** by default to complete tasks which has been scheduled before `client` resign active. -/// -/// - Since: 4.5.0 -@property (nonatomic, assign, getter = shouldCompleteRequestsBeforeSuspension) BOOL completeRequestsBeforeSuspension - NS_SWIFT_NAME(completeRequestsBeforeSuspension); -#endif // TARGET_OS_IOS +@property(assign, nonatomic, getter = shouldCompleteRequestsBeforeSuspension) BOOL completeRequestsBeforeSuspension + NS_SWIFT_NAME(completeRequestsBeforeSuspension) + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. Every time the " + "application switches to a background execution context, PubNub SDK requests more " + "background time to complete ongoing requests."); +#endif // TARGET_OS_OSX || TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) /// Whether PNAES should use random initialization vector for each encrypted message. /// @@ -261,7 +258,7 @@ DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next /// This property is set to **NO** by default. /// /// - Since: 4.16.0 -@property (nonatomic, assign, getter = shouldUseRandomInitializationVector) BOOL useRandomInitializationVector +@property(assign, nonatomic, getter = shouldUseRandomInitializationVector) BOOL useRandomInitializationVector DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next major update. Please use " "`cryptoModule` instead."); @@ -272,7 +269,7 @@ DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next /// This property is set to **5** by default. /// /// - Since: 4.16.0 -@property (nonatomic, assign) NSUInteger fileMessagePublishRetryLimit; +@property(assign, nonatomic) NSUInteger fileMessagePublishRetryLimit; /// Request automatic retry configuration. /// @@ -287,10 +284,10 @@ DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next /// ``` /// /// - Since: 5.3.0 -@property (nonatomic, nullable, strong) PNRequestRetryConfiguration *requestRetry; +@property(strong, nullable, nonatomic) PNRequestRetryConfiguration *requestRetry; -#pragma mark - Initialization and configuration +#pragma mark - Initialization and Configuration /// Create **PubNub** configuration wrapper instance. /// diff --git a/PubNub/Data/PNConfiguration.m b/PubNub/Data/PNConfiguration.m index 65dbe9d02..4c4b1b424 100644 --- a/PubNub/Data/PNConfiguration.m +++ b/PubNub/Data/PNConfiguration.m @@ -1,43 +1,24 @@ +#import "PNConfiguration+Private.h" #import -#import #import "PNPrivateStructures.h" -#import "PNKeychain+Private.h" -#import "PNKeychainStorage.h" -#import "PNDataStorage.h" -#if TARGET_OS_IOS - #import -#elif TARGET_OS_OSX - #import - #include - #include - #include - #include -#endif // TARGET_OS_OSX -#import "PNConfiguration+Private.h" #import "PNConstants.h" -#pragma mark Static - -/// Device `"identifier"` store key in in-memory or Keychain storage. -NSString * const kPNConfigurationDeviceIDKey = @"PNConfigurationDeviceID"; - -/// Configured user `identifier` store key in in-memory or Keychain storage. -NSString * const kPNConfigurationUserIDKey = @"PNConfigurationUUID"; - - NS_ASSUME_NONNULL_BEGIN -#pragma mark - Protected interface declaration +#pragma mark Private interface declaration /// **PubNub** client configuration wrapper private extension. @interface PNConfiguration () -#pragma mark - Information +#pragma mark - Properties -@property (nonatomic, nullable, copy) NSString *authToken; -@property (nonatomic, copy) NSString *deviceID; +@property(copy, nullable, nonatomic) NSString *filterExpression; +@property(copy, nullable, nonatomic) NSString *authToken; +@property(copy, nonatomic) NSString *deviceID + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next major update. Unique value will " + "be generated for each PubNub client instance."); #pragma mark - Initialization and Configuration @@ -56,47 +37,6 @@ - (instancetype)initWithPublishKey:(NSString *)publishKey subscribeKey:(NSString *)subscribeKey userID:(NSString *)userID; - -#pragma mark - Storage - -/// Migrate previously stored client data in default storage to new one (identifier-based storage). -/// -/// - Parameter identifier: Unique identifier of storage to which information should be moved from default storage. -- (void)migrateDefaultToStorageWithIdentifier:(NSString *)identifier; - - -#pragma mark - Helpers - -/// Fetch unique device identifier from keychain or generate new one. -/// -/// - Returns: Unique device identifier which depends on platform for which client has been compiled. -/// -/// - Since: 4.0.2 -- (nullable NSString *)uniqueDeviceIdentifier; - -/// Extract unique identifier for current platform. -/// -/// - Returns: Unique device identifier which depends on platform for which client has been compiled. -/// -/// - Since: 4.1.1 -- (nullable NSString *)generateUniqueDeviceIdentifier; - -#if TARGET_OS_OSX -/// Try to fetch device serial number information. -/// -/// - Returns: Serial number or `nil` in case if it has been lost (there is way for hardware to loose it). -/// -/// - Since: 4.0.2 -- (nullable NSString *)serialNumber; - -/// Try to receive MAC address for any current interfaces. -/// -/// - Returns: Network interface MAC address. -/// -/// - Since: 4.0.2 -- (nullable NSString *)macAddress; -#endif // TARGET_OS_OSX - #pragma mark - @@ -110,7 +50,7 @@ - (nullable NSString *)macAddress; @implementation PNConfiguration -#pragma mark - Information +#pragma mark - Properties - (void)setPresenceHeartbeatValue:(NSInteger)presenceHeartbeatValue { _presenceHeartbeatValue = presenceHeartbeatValue < 20 ? 20 : MIN(presenceHeartbeatValue, 300); @@ -166,11 +106,8 @@ - (instancetype)initWithPublishKey:(NSString *)publishKey _publishKey = [publishKey copy]; _subscribeKey = [subscribeKey copy]; - // Call position important, because it migrate stored UUID and device identifier from older storage. - [self migrateDefaultToStorageWithIdentifier:publishKey ?: subscribeKey]; - self.userID = userID; - _deviceID = [[self uniqueDeviceIdentifier] copy]; + _deviceID = [NSUUID UUID].UUIDString; _subscribeMaximumIdleTime = kPNDefaultSubscribeMaximumIdleTime; _nonSubscribeRequestTimeout = kPNDefaultNonSubscribeRequestTimeout; _TLSEnabled = kPNDefaultIsTLSEnabled; @@ -184,7 +121,7 @@ - (instancetype)initWithPublishKey:(NSString *)publishKey _fileMessagePublishRetryLimit = kPNDefaultFileMessagePublishRetryLimit; _maximumMessagesCacheSize = kPNDefaultMaximumMessagesCacheSize; #if TARGET_OS_IOS - _completeRequestsBeforeSuspension = kPNDefaultShouldCompleteRequestsBeforeSuspension; + _completeRequestsBeforeSuspension = YES; #endif // TARGET_OS_IOS } @@ -193,7 +130,10 @@ - (instancetype)initWithPublishKey:(NSString *)publishKey - (id)copyWithZone:(NSZone *)zone { PNConfiguration *configuration = [[PNConfiguration allocWithZone:zone] init]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" configuration.deviceID = [self.deviceID copy]; +#pragma clang diagnostic pop configuration.origin = [self.origin copy]; configuration.publishKey = [self.publishKey copy]; configuration.subscribeKey = [self.subscribeKey copy]; @@ -201,6 +141,7 @@ - (id)copyWithZone:(NSZone *)zone { configuration.authToken = [self.authToken copy]; configuration.userID = [self.userID copy]; configuration.cryptoModule = self.cryptoModule; + configuration.filterExpression = [self.filterExpression copy]; configuration.subscribeMaximumIdleTime = self.subscribeMaximumIdleTime; configuration.nonSubscribeRequestTimeout = self.nonSubscribeRequestTimeout; configuration->_presenceHeartbeatValue = self.presenceHeartbeatValue; @@ -219,124 +160,16 @@ - (id)copyWithZone:(NSZone *)zone { #pragma clang diagnostic ignored "-Wdeprecated-declarations" configuration.cipherKey = self.cipherKey; configuration.useRandomInitializationVector = self.shouldUseRandomInitializationVector; -#pragma clang diagnostic pop - - if (@available(macOS 10.10, iOS 8.0, *)) { - configuration.applicationExtensionSharedGroupIdentifier = self.applicationExtensionSharedGroupIdentifier; - } - - configuration.requestMessageCountThreshold = self.requestMessageCountThreshold; - configuration.maximumMessagesCacheSize = self.maximumMessagesCacheSize; + configuration.applicationExtensionSharedGroupIdentifier = self.applicationExtensionSharedGroupIdentifier; #if TARGET_OS_IOS configuration.completeRequestsBeforeSuspension = self.shouldCompleteRequestsBeforeSuspension; #endif // TARGET_OS_IOS - - return configuration; -} - - -#pragma mark - Storage - -- (void)migrateDefaultToStorageWithIdentifier:(NSString *)identifier { - id storage = [PNDataStorage persistentClientDataWithIdentifier:identifier]; - PNKeychain *defaultKeychain = PNKeychain.defaultKeychain; - - NSString *previousUUID = [defaultKeychain valueForKey:kPNConfigurationUserIDKey]; - - if (previousUUID) { - [storage syncStoreValue:previousUUID forKey:kPNConfigurationUserIDKey]; - [defaultKeychain removeValueForKey:kPNConfigurationUserIDKey]; - - NSString *previousDeviceID = [defaultKeychain valueForKey:kPNConfigurationDeviceIDKey]; - [storage syncStoreValue:previousDeviceID forKey:kPNConfigurationDeviceIDKey]; - [defaultKeychain removeValueForKey:kPNConfigurationDeviceIDKey]; - } - - // Update access properties. - if ([storage isKindOfClass:[PNKeychainStorage class]]) { - PNKeychainStorage *keychainStorage = (PNKeychainStorage *)storage; - NSArray *entryNames = @[ - kPNConfigurationUserIDKey, - kPNConfigurationDeviceIDKey, - kPNPublishSequenceDataKey - ]; - - [keychainStorage updateEntries:entryNames accessibilityTo:kSecAttrAccessibleAfterFirstUnlock]; - } -} - - -#pragma mark - Helpers - -- (NSString *)uniqueDeviceIdentifier { - NSString *storageIdentifier = self.publishKey ?: self.subscribeKey; - id storage = [PNDataStorage persistentClientDataWithIdentifier:storageIdentifier]; - __block NSString *identifier = nil; - - [storage batchSyncAccessWithBlock:^{ - identifier = [storage valueForKey:kPNConfigurationDeviceIDKey]; - - if (!identifier) { - identifier = [self generateUniqueDeviceIdentifier]; - [storage storeValue:identifier forKey:kPNConfigurationDeviceIDKey]; - } - }]; - - return identifier; -} - -- (NSString *)generateUniqueDeviceIdentifier { - NSString *identifier = nil; -#if TARGET_OS_IOS - identifier = UIDevice.currentDevice.identifierForVendor.UUIDString; -#elif TARGET_OS_OSX - identifier = [self serialNumber] ?: [self macAddress]; -#endif // TARGET_OS_OSX - - return identifier ?: [[NSUUID UUID].UUIDString copy]; -} - -#if TARGET_OS_OSX -- (NSString *)serialNumber { - NSString *serialNumber = nil; - io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, - IOServiceMatching("IOPlatformExpertDevice")); - - if (service) { - CFTypeRef cfSerialNumber = IORegistryEntryCreateCFProperty(service, - CFSTR(kIOPlatformSerialNumberKey), - kCFAllocatorDefault, - 0); - - if (cfSerialNumber) { - serialNumber = [(__bridge NSString *)(cfSerialNumber) copy]; - } - - IOObjectRelease(service); - } - - return serialNumber; -} +#pragma clang diagnostic pop + configuration.requestMessageCountThreshold = self.requestMessageCountThreshold; + configuration.maximumMessagesCacheSize = self.maximumMessagesCacheSize; -- (NSString *)macAddress { - NSString *macAddress = nil; - size_t length = 0; - int mib[6] = {CTL_NET, AF_ROUTE, 0, AF_LINK, NET_RT_IFLIST, if_nametoindex("en0")}; - - if (mib[5] != 0 && sysctl(mib, 6, NULL, &length, NULL, 0) >= 0 && length > 0) { - NSMutableData *data = [NSMutableData dataWithLength:length]; - - if (sysctl(mib, 6, [data mutableBytes], &length, NULL, 0) >= 0) { - struct sockaddr_dl *address = ([data mutableBytes] + sizeof(struct if_msghdr)); - unsigned char *mac = (unsigned char *)LLADDR(address); - macAddress = [[NSString alloc] initWithFormat:@"%02X:%02X:%02X:%02X:%02X:%02X", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]]; - } - } - - return macAddress; + return configuration; } -#endif // TARGET_OS_OSX #pragma mark - diff --git a/PubNub/Data/PNError.h b/PubNub/Data/PNError.h new file mode 100644 index 000000000..c6899a49b --- /dev/null +++ b/PubNub/Data/PNError.h @@ -0,0 +1,368 @@ +#import + + +#ifndef PNErrorConstants_h +#define PNErrorConstants_h + +#pragma mark Error domains + +/// Transport error domain. +/// +/// This domain dedicated to the errors which happen when transport implementation handles transport request and error. +/// +/// > Note: Error instances may include additional information in `userInfo` for ``PNTransportRequestKey`` and +/// ``PNTransportResponseKey`` data keys. +static NSString * const PNTransportErrorDomain = @"PNTransportErrorDomain"; + +/// API error domain. +/// +/// This domain dedicated to the errors which happen during interaction with the public **PubNub** client interface. +static NSString * const PNAPIErrorDomain = @"PNAPIErrorDomain"; + +/// API error domain. +/// +/// This domain dedicated to the errors which happen during interaction with the public **PubNub** client interface. +static NSString * const kPNAPIErrorDomain + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNAPIErrorDomain' instead") = PNAPIErrorDomain; + +/// Auth error domain. +/// +/// This domain dedicated to the errors which happen during access token processing. +static NSString * const PNAuthErrorDomain = @"PNAuthErrorDomain"; + +/// Auth error domain. +/// +/// This domain dedicated to the errors which happen during access token processing. +static NSString * const kPNAuthErrorDomain + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNAuthErrorDomain' instead") = PNAuthErrorDomain; + +/// Crypto module error domain. +/// +/// This domain dedicated to the errors which happen during data encryption / decryption. +static NSString * const PNCryptorErrorDomain = @"PNCryptorErrorDomain"; + +/// Crypto module error domain. +/// +/// This domain dedicated to the errors which happen during data encryption / decryption. +static NSString * const kPNAESErrorDomain + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCryptorErrorDomain' instead") = PNCryptorErrorDomain; + +/// Crypto module error domain. +/// +/// This domain dedicated to the errors which happen during data encryption / decryption. +static NSString * const kPNCryptorErrorDomain + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCryptorErrorDomain' instead") = PNCryptorErrorDomain; + +/// File sharing error domain. +/// +/// This domain dedicated to the errors which happen during interaction with external files storage. +static NSString * const PNStorageErrorDomain = @"PNStorageErrorDomain"; + +/// File sharing error domain. +/// +/// This domain dedicated to the errors which happen during interaction with external files storage. +static NSString * const kPNStorageErrorDomain + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNStorageErrorDomain' instead") = PNStorageErrorDomain; + +/// CBOR module error domain. +/// +/// This domain dedicated to the errors which happen during access token parsing. +static NSString * const PNCBORErrorDomain = @"PNCBORErrorDomain"; + +/// CBOR module error domain. +/// +/// This domain dedicated to the errors which happen during access token parsing. +static NSString * const kPNCBORErrorDomain + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCBORErrorDomain' instead") = PNCBORErrorDomain; + +/// JSON serializer error domain. +/// +/// This domain dedicated to errors signalled by ``PubNub/PNJSONSerialization``. +static NSString * const PNJSONSerializationErrorDomain = @"PNJSONSerializationErrorDomain"; + +/// Object encoder error domain. +/// +/// This domain dedicated to errors signalled by `PNJSONEncoder`. +static NSString * const PNJSONEncoderErrorDomain = @"PNJSONEncoderErrorDomain"; + +/// Object decoder error domain. +/// +/// This domain dedicated to errors signalled by `PNJSONDecoder`. +static NSString * const PNJSONDecoderErrorDomain = @"PNJSONDecoderErrorDomain"; + + +#pragma mark - Error codes + +/// Not categorized error. +/// +/// **PubNub** client wasn't able to categorize the error, or it wasn't identified at the client release time. +static NSInteger const PNErrorUnknown = -1; + +/// Not categorized error. +/// +/// **PubNub** client wasn't able to categorize the error, or it wasn't identified at the client release time. +static NSInteger const kPNUnknownErrorCode + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNErrorUnknown' instead") = PNErrorUnknown; + + +#pragma mark - Transport error codes + +/// Request sending failed because of time out. +/// +/// Very slow connection when request doesn't have enough time to complete processing (send request body and receive +/// server response). +static NSInteger const PNTransportErrorRequestTimeout = 1000; + +/// Request has been cancelled before receiving response. +/// +/// Cancellation possible only for connection based operations (subscribe / leave). +static NSInteger const PNTransportErrorRequestCancelled = 1001; + +/// Request can't be processed because of network issues. +/// +/// Reasons could be: +/// - unable to connect to the remote origin +/// - DNS lookup issues +/// - TLS handshake issues +/// +/// > Note: Localized error reason description should provide more information about exact reason. +static NSInteger const PNTransportErrorNetworkIssues = 1002; + + +#pragma mark - API error codes + +/// Incomplete or unacceptable set of parameters. +/// +/// Unable to call endpoint because of incomplete or unacceptable parameters. +static NSInteger const PNAPIErrorUnacceptableParameters = 1100; + +/// Incomplete or unacceptable set of parameters. +/// +/// Unable to call endpoint because of incomplete or unacceptable parameters. +static NSInteger const kPNAPIUnacceptableParameters + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNAPIErrorUnacceptableParameters' instead") = PNAPIErrorUnacceptableParameters; + +/// API not enabled. +/// +/// Unable to access remote resource because feature not enabled. +static NSInteger const PNAPIErrorFeatureNotEnabled = 1101; + +/// Access denied to the remote resource. +/// +/// Remote resource may require additional request configuration to pass permissions' validation. +static NSInteger const PNAPIErrorAccessDenied = 1102; + +/// Remote origin unable to process request. +/// +/// Verify request arguments and payload content. +static NSInteger const PNAPIErrorBadRequest = 1103; + +/// Unable to send request because path is too long. +static NSInteger const PNAPIErrorRequestURITooLong = 1104; + +/// Malformed service response. +/// +/// Received unexpected service response. +static NSInteger const PNAPIErrorMalformedServiceResponse = 1105; + +/// Malformed subscribe filter expression. +static NSInteger const PNAPIErrorMalformedFilterExpression = 1106; + + +#pragma mark - Storage error codes + +/// Shared file storage access issue. +static NSInteger const PNStorageErrorAccess = 1200; + + + +#pragma mark - Auth error codes + +/// Auth token expired. +static NSInteger const PNAuthErrorPAMTokenExpired = 1300; + +/// Auth token expired. +static NSInteger const kPNAuthPAMTokenExpiredError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNAuthErrorPAMTokenExpired' instead") = PNAuthErrorPAMTokenExpired; + +/// Auth token's UUID doesn't match `uuid` used by **PubNub** instance. +static NSInteger const PNAuthErrorPAMTokenWrongUUID = 1301; + +/// Auth token's UUID doesn't match `uuid` used by **PubNub** instance. +static NSInteger const kPNAuthPAMTokenWrongUUIDError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNAuthErrorPAMTokenWrongUUID' instead") = PNAuthErrorPAMTokenWrongUUID; + + +#pragma mark - Publish error codes + +/// Attempt to publish empty message. +static NSInteger const kPNEmptyMessageError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNAPIErrorUnacceptableParameters' instead") = PNAPIErrorUnacceptableParameters; + + +#pragma mark - Crypto module error codes + +static NSInteger const kPNAESEmptyObjectError + DEPRECATED_MSG_ATTRIBUTE("Please use 'CryptoModule' instead") = 1400; + +/// Underlying cryptor module configuration error. +static NSInteger const PNCryptorErrorConfiguration = 1401; + +/// Underlying cryptor module configuration error. +static NSInteger const kPNAESConfigurationError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCryptorErrorConfiguration' instead") = PNCryptorErrorConfiguration; + +/// Underlying cryptor module configuration error. +static NSInteger const kPNCryptorConfigurationError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCryptorErrorConfiguration' instead") = PNCryptorErrorConfiguration; + +/// Not enough memory to complete cryptor operation. +static NSInteger const PNCryptorErrorInsufficientMemory = 1402; + +/// Not enough memory to complete cryptor operation. +static NSInteger const kPNAESInsufficientMemoryError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCryptorErrorInsufficientMemory' instead") = PNCryptorErrorInsufficientMemory; + +/// Not enough memory to complete cryptor operation. +static NSInteger const kPNCryptorInsufficientMemoryError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCryptorErrorInsufficientMemory' instead") = PNCryptorErrorInsufficientMemory; + +/// There were an error during data encryption process. +static NSInteger const PNCryptorErrorEncryption = 1403; + +/// There were an error during data encryption process. +static NSInteger const kPNAESEncryptionError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCryptorErrorEncryption' instead") = PNCryptorErrorEncryption; + +/// There were an error during data encryption process. +static NSInteger const kPNCryptorEncryptionError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCryptorErrorEncryption' instead") = PNCryptorErrorEncryption; + +/// There were an error during data decryption process. +static NSInteger const PNCryptorErrorDecryption = 1404; + +/// There were an error during data decryption process. +static NSInteger const kPNAESDecryptionError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCryptorErrorDecryption' instead") = PNCryptorErrorDecryption; + +/// There were an error during data decryption process. +static NSInteger const kPNCryptorDecryptionError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCryptorErrorDecryption' instead") = PNCryptorErrorDecryption; + +/// Unknown cryptor identifier error. +static NSInteger const PNCryptorErrorUnknownCryptor = 1405; + +/// Unknown cryptor identifier error. +static NSInteger const kPNCryptorUnknownCryptorError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCryptorErrorUnknownCryptor' instead") = PNCryptorErrorUnknownCryptor; + + +#pragma mark - CBOR module error codes + +/// Unexpected data type detected in CBOR data. +static NSInteger const PNCBORErrorUnexpectedDataType = 1500; + +/// Unexpected data type detected in CBOR data. +static NSInteger const kPNCBORUnexpectedDataTypeError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCBORErrorUnexpectedDataType' instead") = PNCBORErrorUnexpectedDataType; + +/// CBOR structure is malformed. +static NSInteger const PNCBORErrorMalformedData = 1501; + +/// CBOR structure is malformed. +static NSInteger const kPNCBORMalformedDataError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCBORErrorMalformedData' instead") = PNCBORErrorMalformedData; + +/// CBOR structure is malformed. +static NSInteger const PNCBORErrorDataItemNotWellFormed = 1502; + +/// CBOR structure is malformed. +static NSInteger const kPNCBORDataItemNotWellFormedError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCBORErrorDataItemNotWellFormed' instead") = PNCBORErrorDataItemNotWellFormed; + +/// Expected data item is missing from CBOR. +static NSInteger const PNCBORErrorMissingDataItem = 1503; + +/// Expected data item is missing from CBOR. +static NSInteger const kPNCBORMissingDataItemError + DEPRECATED_MSG_ATTRIBUTE("Please use 'PNCBORErrorMissingDataItem' instead") = PNCBORErrorMissingDataItem; + + +#pragma mark - JSON serializer error codes + +/// Unable to serialize object of unsupported data type. +static NSInteger const PNJSONSerializationErrorType = 1600; + +/// Unable to de-serialize object because of malformed JSON. +static NSInteger const PNJSONSerializationErrorMalformedJSON = 1601; + + +#pragma mark - JSON encoder / decoder error codes + +/// Unable to encode object because ``PNCodable/codingKeys`` map has property not from instance property list. +static NSInteger const PNJSONEncodingErrorPropertyNotFound = 1700; + +/// Unable encode object, because one of fields has unsupported data type. +static NSInteger const PNJSONEncodingErrorType = 1701; + +/// No associated data exception. +/// +/// The decoder tried to decode data for provided string `key`, but there was no data associated with it. +static NSInteger const PNJSONDecodingErrorKeyNotFound = 1702; + +/// Associated data is `nil`. +/// +/// The decoder tried to decode data for provided string `key`, but `nil` associated with it. +static NSInteger const PNJSONDecodingErrorValueNotFound = 1803; + +/// Unable to decode data as requested type. +/// +/// The decoder tries to decode data as specified type, but encoded data can't be restored to specified type. +static NSInteger const PNJSONDecodingErrorTypeMismatch = 1804; + +/// Requested decoding operation is invalid. +/// +/// Requested decoding operation is not valid in current context. +static NSInteger const PNJSONDecodingErrorInvalid = 1805; + +/// `nil` or empty `NSData` instance passed to decoder. +static NSInteger const PNJSONDecodingErrorEmptyData = 1806; + +/// Unable to decode object because of malformed or incomplete JSON data. +static NSInteger const PNJSONDecodingErrorMalformedJSONData = 1807; + +/// Unable to decode object because without data object (de-serialized JSON). +static NSInteger const PNJSONDecodingErrorMissingData = 1808; + + +#pragma mark - Data keys + +/// Response for failed `PNTransportRequest`. +/// +/// Key is used to store object which implements `PNTransportResponse` protocol and contain error details. +static NSString * const PNTransportResponseKey = @"PNTransportResponseKey"; + +/// Failed `PNTransportRequest`. +/// +/// Key is used to store `PNTransportRequest` object for which transport layer or remote origin returned error. +static NSString * const PNTransportRequestKey = @"PNTransportRequestKey"; +#endif // PNErrorConstants_h + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - Interface declaration + +/// Information about **PubNub** client error. +/// +/// **PubNub** client modules can signal an error by returning an `PNError` object by reference. Object will provide +/// additional information about the kind of error and underlying cause. +@interface PNError : NSError + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/PNError.m b/PubNub/Data/PNError.m new file mode 100644 index 000000000..25af38598 --- /dev/null +++ b/PubNub/Data/PNError.m @@ -0,0 +1,12 @@ +#import "PNError.h" + + +#pragma mark Interface implementation + +@implementation PNError + + +#pragma mark - + + +@end diff --git a/PubNub/Data/PNKeychain+Private.h b/PubNub/Data/PNKeychain+Private.h deleted file mode 100644 index 3e1c44e56..000000000 --- a/PubNub/Data/PNKeychain+Private.h +++ /dev/null @@ -1,123 +0,0 @@ -#import "PNKeychain.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface declaration - -/** - * @brief Keychain private extension which provides maintenance methods. - * - * @author Serhii Mamontov - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNKeychain (Private) - - -#pragma mark - Information - -/** - * @brief Shared \a Keychain resources access serialisation queue. - * - * @note Queue used only by \c defaultKeychain. - */ -@property (nonatomic, nullable, strong) dispatch_queue_t resourceAccessQueue; - -/** - * @brief Default keychain which use previous interface with storage detection and used with class methods. - * - * @since 4.15.3 - */ -@property (class, nonatomic, readonly, strong) PNKeychain *defaultKeychain; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \a Keychain access helper. - * - * @param identifier Unique identifier which will be used to scope data in different "keychains" (used as service identifier). - * - * @return Configured and ready to use \c Keychain access helper. - * - * @since 4.15.3 - */ -+ (instancetype)keychainWithIdentifier:(NSString *)identifier; - - -#pragma mark - Storage manipulation - -/** - * @brief Place passed \c value in Keychain under specified \c key. - * - * @note Asynchronous operation if required will be performed on secondary queue. - * - * @param value Object which should be placed into Keychain. - * @param key String which should be used for data storing and access. - * - * @return \c YES in case if value has been stored. - * - * @since 4.15.3 - */ -- (BOOL)storeValue:(id)value forKey:(NSString *)key; - -/** - * @brief Retrieve value stored under specified key in Keychain. - * - * @note Synchronous operation will be performed on same queue where call has been done. - * - * @param key String which should be used for data access. - * - * @return Data which has been stored before under specified \c key. - * - * @since 4.15.3 - */ -- (nullable id)valueForKey:(NSString *)key; - -/** - * @brief Remove any value from Keychain which is associated with specified \c key. - * - * @note Asynchronous operation if required will be performed on secondary queue. - * - * @param key String for which stored value should be removed from Keychain. - * - * @return \c YES in case if value under specified \c key has been removed. - * - * @since 4.15.3 - */ -- (BOOL)removeValueForKey:(NSString *)key; - -/** - * @brief Update accessibility for entries specified by list of keys. - * - * @param entryNames List of entry names for which current accessibility should be changed. - * @param accessibility Target entries accessibility mode. - */ -- (void)updateEntries:(NSArray *)entryNames accessibilityTo:(CFStringRef)accessibility; - - -#pragma mark - Misc - -/** - * @brief Check whether system is able to provide access to Keychain (even locked) or not. - * - * @return \c NO in case if client is used in milti-user macOS environment and user not authorised yet. - * - * @since 4.15.3 - */ -+ (BOOL)isKeychainAvailable; - -/** - * @brief Update accessibility for entries specified by list of keys. - * - * @param entryNames List of entry names for which current accessibility should be changed. - * @param accessibility Target entries accessibility mode. - */ -+ (void)updateEntries:(NSArray *)entryNames accessibilityTo:(CFStringRef)accessibility; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/PNKeychain.h b/PubNub/Data/PNKeychain.h deleted file mode 100644 index 17082cd83..000000000 --- a/PubNub/Data/PNKeychain.h +++ /dev/null @@ -1,63 +0,0 @@ -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Class provide simplified access to values manipulation inside of Keychain. - * - * @since 4.x.1 - * - * @author Serhii Mamontov - * @version 4.8.5 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNKeychain : NSObject - - -#pragma mark - Storage manipulation - -/** - * @brief Place passed \c value in Keychain under specified \c key. - * - * @note Asynchronous operation if required will be performed on secondary queue. - * - * @param value Object which should be placed into Keychain. - * @param key String which should be used for data storing and access. - * @param block GCD block / closure which will be called at the end of store operation. - * GCD block / closure pass only one argument - whether error occurred or not. - */ -+ (void)storeValue:(id)value - forKey:(NSString *)key - withCompletionBlock:(nullable void(^)(BOOL stored))block; - -/** - * @brief Retrieve value stored under specified key in Keychain. - * - * @note Synchronous operation will be performed on same queue where call has been done. - * - * @param key String which should be used for data access. - * @param block GCD block / closure which will be called at the end of store operation. - * GCD block / closure pass only one argument - fetched data. - */ -+ (void)valueForKey:(NSString *)key - withCompletionBlock:(nullable void(^)(id __nullable value))block; - -/** - * @brief Remove any value from Keychain which is associated with specified \c key. - * - * @note Asynchronous operation if required will be performed on secondary queue. - * - * @param key String for which stored value should be removed from Keychain. - * @param block GCD block / closure which will be called at the end of removal operation. - * GCD block / closure pass only one argument - whether error occurred or not. - */ -+ (void)removeValueForKey:(NSString *)key - withCompletionBlock:(nullable void(^)(BOOL))block; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/PNKeychain.m b/PubNub/Data/PNKeychain.m deleted file mode 100644 index 822cd8b5a..000000000 --- a/PubNub/Data/PNKeychain.m +++ /dev/null @@ -1,579 +0,0 @@ -/** - * @author Serhii Mamontov - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNKeychain+Private.h" -#import -#import "PNHelpers.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface declaration - -@interface PNKeychain () - - -#pragma mark - Information - -/** - * @brief Shared \a Keychain resources access serialisation queue. - * - * @note Queue used only by \c defaultKeychain. - * - * @since 4.15.3 - */ -@property (nonatomic, nullable, strong) dispatch_queue_t resourceAccessQueue; - -/** - * @brief Identifier which is used to scope stored data. - */ -@property (nonatomic, copy) NSString *serviceIdentifier; - - - -#pragma mark - Initialization & Configuration - -/** - * @brief Initialise \a Keychain access helper. - * - * @param identifier Unique identifier which will be used to scope data in different "keychains" (used as service identifier). - * - * @return Initialised and ready to use \c Keychain access helper. - * - * @since 4.15.3 - */ -- (instancetype)initWithIdentifier:(NSString *)identifier; - - -#pragma mark - Storage - -/** - * @brief Storage which is used for environment where Keychain access DB not available. - * - * @discussion In multi-user systems before user authorise system is unable to provide information about Keychain because it - * doesn't know for which user. Used only by macOS because iOS is always single user. - * - * @return \a NSDictionary which should be used as temporary in-memory Keychain access DB replacement. - * - * @since 4.6.2 - */ -- (NSMutableDictionary *)inMemoryStorage; - - -#pragma mark - Keychain query - -/** - * @brief Help to debug Keychain query error status. - * - * @param status One of \c OSStatus types. - */ -- (void)debugKeychainQueryStatus:(OSStatus)status; - -/** - * @brief Check whether item described with query already exist in Keychain or not. - * - * @param query \a NSDictionary which contain base item information which should be checked. - * - * @return \c YES in case if \a Keychain entry found with specified \c query. - */ -- (BOOL)checkExistingDataWithQuery:(NSMutableDictionary *)query; - -/** - * @brief Allow to search for item in Keychain and if requested will pull out values which it stores. - * - * @param query \a NSDictionary which contain base item information which should be found. - * @param shouldFetchData Flag which specify whether item's data should be returned or not. - * - * @return Array of two elements where first is value and second is boolean on whether request failed or not (request also failed in - * case if array contains only one boolean \b true value). - */ -- (NSArray *)searchWithQuery:(NSMutableDictionary *)query fetchData:(BOOL)shouldFetchData; - -/** - * @brief Update item value. - * - * @param value Value which should be stored for the item in Keychain. - * @param query \a NSDictionary which contain base item information which should be updated. - * - * @return \c YES in case if value update was successful. - */ -- (BOOL)update:(nullable id)value usingQuery:(NSMutableDictionary *)query; - - -#pragma mark - Keychain data archiving - -/** - * @brief Allow to pack passed value to bytes. - * - * @discussion This method is used to store values in Keychain which accept only binaries for value. - * - * @param data Object which should be packed to binary. - * - * @return Packed binary object. - */ -- (NSData *)packedData:(id)data; - -/** - * @brief Allow to unpack stored value to native objects. - * - * @discussion This method is used to extract data stored in Keychain and return native objects. - * - * @param data Binary object which should be unpacked. - * - * @return Unpacked foundation object. - */ -- (id)unpackedData:(NSData *)data; - - -#pragma mark - Misc - -/** - * @brief Location where Keychain replacement for macOS will be stored. - * - * @return Full path to the file. - * - * @since 4.8.1 - */ -- (NSString *)fileBasedStoragePath; - -/** - * @brief Construct dictionary which will describe item storage or access information. - * - * @param key Key under which item should be stored or searched. - * - * @return Prepared base item description. - */ -- (NSMutableDictionary *)baseInformationForItemWithKey:(NSString *)key; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNKeychain - - -#pragma mark - Information - -+ (PNKeychain *)defaultKeychain { - static PNKeychain *_sharedDefaultKeychain; - static dispatch_once_t onceToken; - - dispatch_once(&onceToken, ^{ - _sharedDefaultKeychain = [self keychainWithIdentifier:NSBundle.mainBundle.bundleIdentifier]; - }); - - return _sharedDefaultKeychain; -} - - -#pragma mark - Initialization & Configuration - -+ (instancetype)keychainWithIdentifier:(NSString *)identifier { - return [[self alloc] initWithIdentifier:identifier]; -} - -- (instancetype)initWithIdentifier:(NSString *)identifier { - if ((self = [super init])) { - _serviceIdentifier = [identifier copy]; - - if (NSClassFromString(@"XCTestExpectation")) { - _serviceIdentifier = @"com.pubnub.objc-tests"; - } - } - - return self; -} - - -#pragma mark - Storage - -- (NSMutableDictionary *)inMemoryStorage { - static NSMutableDictionary *_inMemoryStorage; - static dispatch_once_t onceToken; - - dispatch_once(&onceToken, ^{ -#if TARGET_OS_OSX - NSFileManager *fileManager = NSFileManager.defaultManager; - NSString *filePath = [self fileBasedStoragePath]; - NSString *workingDirectory = [filePath stringByDeletingLastPathComponent]; - - if (![fileManager fileExistsAtPath:workingDirectory isDirectory:NULL]) { - [fileManager createDirectoryAtPath:workingDirectory - withIntermediateDirectories:YES - attributes:nil - error:nil]; - } - - NSDictionary *storedData = [NSDictionary dictionaryWithContentsOfFile:filePath]; - _inMemoryStorage = [NSMutableDictionary dictionaryWithDictionary:storedData]; -#else - _inMemoryStorage = [NSMutableDictionary new]; -#endif // TARGET_OS_OSX - }); - - return _inMemoryStorage; -} - - -#pragma mark - Storage manipulation - -+ (void)storeValue:(id)value - forKey:(NSString *)key - withCompletionBlock:(void(^)(BOOL stored))block { - -#if !TARGET_OS_OSX - BOOL shouldWriteInMemory = ![self isKeychainAvailable]; -#else - BOOL shouldWriteInMemory = YES; -#endif // !TARGET_OS_OSX - PNKeychain *keychain = self.defaultKeychain; - - dispatch_barrier_async(keychain.resourceAccessQueue, ^{ - BOOL stored = NO; - - if (!shouldWriteInMemory) { - stored = [keychain storeValue:value forKey:key]; - } else { - [keychain inMemoryStorage][key] = value; -#if TARGET_OS_OSX - [[keychain inMemoryStorage] writeToFile:[keychain fileBasedStoragePath] atomically:YES]; -#endif // TARGET_OS_OSX - stored = YES; - } - - if (block) { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - block(stored); - }); - } - }); -} - -+ (void)valueForKey:(NSString *)key withCompletionBlock:(void(^)(id value))block { -#if !TARGET_OS_OSX - BOOL shouldReadFromMemory = ![self isKeychainAvailable]; -#else - BOOL shouldReadFromMemory = YES; -#endif // !TARGET_OS_OSX - PNKeychain *keychain = self.defaultKeychain; - - if (!block) { - return; - } - - dispatch_async(keychain.resourceAccessQueue, ^{ - id data = nil; - - if (!shouldReadFromMemory) { - NSArray *results = [keychain searchWithQuery:[keychain baseInformationForItemWithKey:key] - fetchData:YES]; - - data = results.count == 2 ? results.firstObject : nil; - } else { - data = [keychain inMemoryStorage][key]; - } - - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - block(data); - }); - }); -} - -+ (void)removeValueForKey:(NSString *)key withCompletionBlock:(void(^)(BOOL))block { -#if !TARGET_OS_OSX - BOOL shouldWriteInMemory = ![self isKeychainAvailable]; -#else - BOOL shouldWriteInMemory = YES; -#endif // !TARGET_OS_OSX - PNKeychain *keychain = self.defaultKeychain; - - dispatch_barrier_async(keychain.resourceAccessQueue, ^{ - BOOL removed = YES; - - if (!shouldWriteInMemory) { - removed = [keychain removeValueForKey:key]; - } else { - [[keychain inMemoryStorage] removeObjectForKey:key]; -#if TARGET_OS_OSX - [[keychain inMemoryStorage] writeToFile:[keychain fileBasedStoragePath] atomically:YES]; -#endif // TARGET_OS_OSX - removed = YES; - } - - if (block) { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - block(removed); - }); - } - }); -} - -- (BOOL)storeValue:(id)value forKey:(NSString *)key { - return [self update:value usingQuery:[self baseInformationForItemWithKey:key]]; -} - -- (id)valueForKey:(NSString *)key { - NSArray *results = [self searchWithQuery:[self baseInformationForItemWithKey:key] fetchData:YES]; - - return results.count == 2 ? results.firstObject : nil; -} - -- (BOOL)removeValueForKey:(NSString *)key { - BOOL removed = YES; - - if ([self checkExistingDataWithQuery:[self baseInformationForItemWithKey:key]]) { - removed = [self update:nil usingQuery:[self baseInformationForItemWithKey:key]]; - } - - return removed; -} - -- (void)updateEntries:(NSArray *)entryNames accessibilityTo:(CFStringRef)accessibility { - for (NSString *entryKey in entryNames) { - NSMutableDictionary *query = [self baseInformationForItemWithKey:entryKey]; - query[(__bridge id)kSecReturnAttributes] = (__bridge id)(kCFBooleanTrue); - query[(__bridge id)kSecReturnData] = (__bridge id)kCFBooleanTrue; - [query removeObjectForKey:(__bridge id)(kSecAttrAccessible)]; - CFDictionaryRef searchedItem = NULL; - id data = nil; - - OSStatus searchStatus = SecItemCopyMatching((__bridge CFDictionaryRef)query, - (CFTypeRef *)&searchedItem); - - if (searchedItem && searchStatus == errSecSuccess) { - NSDictionary *entryAttributes = (__bridge NSDictionary *)searchedItem; - NSString *itemAccessibility = entryAttributes[(__bridge id)(kSecAttrAccessible)]; - - if (![itemAccessibility isEqualToString:(__bridge id)accessibility]) { - if (CFDictionaryContainsKey(searchedItem, kSecValueData)) { - NSData *packedData = ((__bridge NSDictionary *)searchedItem)[(__bridge id)kSecValueData]; - data = [self unpackedData:packedData]; - } - - SecItemDelete((__bridge CFDictionaryRef)query); - } - - if (data) { - [self storeValue:data forKey:entryKey]; - } - } - - if (searchedItem) { - CFRelease(searchedItem); - } - } -} - - -#pragma mark - Keychain query - -- (void)debugKeychainQueryStatus:(OSStatus)status { -#ifdef DEBUG - switch (status) { - case errSecParam: - case errSecBadReq: - NSLog(@"Keychain: Wrong set of parameters has been used."); - break; - case errSecDuplicateItem: - NSLog(@"Keychain: Item already exist."); - break; - case errSecItemNotFound: - NSLog(@"Keychain: Item doesn't exist."); - break; - default: - break; - } -#endif -} - -- (BOOL)checkExistingDataWithQuery:(NSMutableDictionary *)query { - NSArray *result = [self searchWithQuery:query fetchData:NO]; - - return result.count == 2 || !((NSNumber *)result.lastObject).boolValue; -} - -- (NSArray *)searchWithQuery:(NSMutableDictionary *)query fetchData:(BOOL)shouldFetchData { - CFDictionaryRef searchedItem = NULL; - id data = nil; - - if (shouldFetchData) { - query[(__bridge id)kSecReturnData] = (__bridge id)kCFBooleanTrue; - query[(__bridge id)kSecReturnAttributes] = (__bridge id)kCFBooleanTrue; - } - - OSStatus searchStatus = SecItemCopyMatching((__bridge CFDictionaryRef)query, - (shouldFetchData ? (CFTypeRef *)&searchedItem - : NULL)); - [query removeObjectsForKeys:@[(__bridge id)kSecReturnData, (__bridge id)kSecReturnAttributes]]; - - if (searchStatus != errSecItemNotFound) { - [self debugKeychainQueryStatus:searchStatus]; - } - - if (searchedItem && searchStatus == errSecSuccess && - CFDictionaryContainsKey(searchedItem, kSecValueData)) { - - NSData *packedData = ((__bridge NSDictionary *)searchedItem)[(__bridge id)kSecValueData]; - data = [self unpackedData:packedData]; - } - - if (searchedItem) { - CFRelease(searchedItem); - } - - return data ? @[data, @(searchStatus != errSecSuccess)] : @[@(searchStatus != errSecSuccess)]; -} - -- (BOOL)update:(id)value usingQuery:(NSMutableDictionary *)query { - NSData *packedData = [self packedData:value]; - BOOL updated = NO; - - if (packedData) { - BOOL exist = [self checkExistingDataWithQuery:query]; - NSDictionary *data = @{ (__bridge id)(kSecValueData): packedData }; - OSStatus updateStatus = errSecParam; - - if (exist) { - updateStatus = SecItemUpdate((__bridge CFDictionaryRef)query, - (__bridge CFDictionaryRef)data); - } else { - [query addEntriesFromDictionary:data]; - - updateStatus = SecItemAdd((__bridge CFDictionaryRef)query, NULL); - [query removeObjectsForKeys:data.allKeys]; - } - - [self debugKeychainQueryStatus:updateStatus]; - updated = updateStatus == errSecSuccess; - } else if (value == nil) { - OSStatus deleteStatus = SecItemDelete((__bridge CFDictionaryRef)query); - - [self debugKeychainQueryStatus:deleteStatus]; - updated = deleteStatus == errSecSuccess; - } - - return updated; -} - - -#pragma mark - Keychain data archiving - -- (NSData *)packedData:(id)data { - NSData *packedData = nil; - NSError *error = nil; - - if (data) { - if ([data respondsToSelector:@selector(count)]) { - packedData = [NSJSONSerialization dataWithJSONObject:data - options:(NSJSONWritingOptions)0 - error:&error]; - } else if ([data isKindOfClass:NSData.class]) { - packedData = data; - } else { - packedData = [(NSString *)data dataUsingEncoding:NSUTF8StringEncoding]; - } - } - - return packedData; -} - -- (id)unpackedData:(NSData *)data { - NSError *error = nil; - id unpackedData = nil; - - if (data) { - unpackedData = [NSJSONSerialization JSONObjectWithData:data - options:(NSJSONReadingOptions)0 - error:&error]; - - if (error != nil) { - unpackedData = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - } - } - - return unpackedData ?: data; -} - - -#pragma mark - Misc - -+ (void)updateEntries:(NSArray *)entryNames accessibilityTo:(CFStringRef)accessibility { -#if !TARGET_OS_OSX - BOOL shouldWriteInMemory = ![self isKeychainAvailable]; -#else - BOOL shouldWriteInMemory = YES; -#endif // !TARGET_OS_OSX - - if (shouldWriteInMemory) { - return; - } - - PNKeychain *keychain = self.defaultKeychain; - - dispatch_barrier_async(keychain.resourceAccessQueue, ^{ - [keychain updateEntries:entryNames accessibilityTo:accessibility]; - }); -} - -- (NSString *)fileBasedStoragePath { - static NSString *_fileBasedStoragePath; - static dispatch_once_t onceToken; - - dispatch_once(&onceToken, ^{ - NSSearchPathDirectory searchPath = NSApplicationSupportDirectory; - NSProcessInfo *processInfo = NSProcessInfo.processInfo; - NSBundle *mainBundle = NSBundle.mainBundle; - NSArray *paths = NSSearchPathForDirectoriesInDomains(searchPath, NSUserDomainMask, YES); - - NSString *baseDirectory = (paths.count > 0 ? paths.firstObject : NSTemporaryDirectory()); - NSString *applicationName = processInfo.processName ?: mainBundle.bundleIdentifier; - - NSString *storeDirectory = [baseDirectory stringByAppendingPathComponent:applicationName]; - _fileBasedStoragePath = [storeDirectory stringByAppendingPathComponent:@"pnkc.db"]; - }); - - return _fileBasedStoragePath; -} - -+ (BOOL)isKeychainAvailable { - static dispatch_once_t onceToken; - static BOOL available; - - dispatch_once(&onceToken, ^{ -#if TARGET_OS_OSX - SecKeychainRef keychain; - available = SecKeychainCopyDefault(&keychain) == errSecSuccess; - - if(available) { - CFRelease(keychain); - } -#else - available = YES; -#endif - }); - - return available; -} - -- (NSMutableDictionary *)baseInformationForItemWithKey:(NSString *)key { - NSMutableDictionary *query = [NSMutableDictionary new]; - query[(__bridge id)(kSecClass)] = (__bridge id)(kSecClassGenericPassword); - query[(__bridge id)(kSecAttrSynchronizable)] = (__bridge id)(kCFBooleanFalse); - query[(__bridge id)(kSecAttrAccessible)] = (__bridge id)(kSecAttrAccessibleAfterFirstUnlock); - query[(__bridge id)(kSecAttrService)] = self.serviceIdentifier; - query[(__bridge id)(kSecAttrAccount)] = key; - - return query; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/App Context/PNFetchAllChannelsMetadataResult.h b/PubNub/Data/Service Objects/App Context/PNFetchAllChannelsMetadataResult.h new file mode 100644 index 000000000..a7d2ba7e8 --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNFetchAllChannelsMetadataResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch all channels metadata` request processing result. +@interface PNFetchAllChannelsMetadataResult : PNOperationResult + + +#pragma mark - Properties + +/// `Fetch all channels metadata` request processed information. +@property(strong, nonatomic, readonly) PNChannelMetadataFetchAllData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/App Context/PNFetchAllChannelsMetadataResult.m b/PubNub/Data/Service Objects/App Context/PNFetchAllChannelsMetadataResult.m new file mode 100644 index 000000000..6505bc1b7 --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNFetchAllChannelsMetadataResult.m @@ -0,0 +1,23 @@ +#import "PNFetchAllChannelsMetadataResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNFetchAllChannelsMetadataResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNChannelMetadataFetchAllData class]; +} + +- (PNChannelMetadataFetchAllData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/App Context/PNFetchAllUUIDMetadataResult.h b/PubNub/Data/Service Objects/App Context/PNFetchAllUUIDMetadataResult.h new file mode 100644 index 000000000..5d2858dca --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNFetchAllUUIDMetadataResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch all UUIDs metadata` request processing result. +@interface PNFetchAllUUIDMetadataResult : PNOperationResult + + +#pragma mark - Properties + +/// `Fetch all UUIDs metadata` request processed information. +@property(strong,nonatomic, readonly) PNUUIDMetadataFetchAllData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/App Context/PNFetchAllUUIDMetadataResult.m b/PubNub/Data/Service Objects/App Context/PNFetchAllUUIDMetadataResult.m new file mode 100644 index 000000000..ff2147acb --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNFetchAllUUIDMetadataResult.m @@ -0,0 +1,23 @@ +#import "PNFetchAllUUIDMetadataResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNFetchAllUUIDMetadataResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNUUIDMetadataFetchAllData class]; +} + +- (PNUUIDMetadataFetchAllData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/App Context/PNFetchChannelMembersResult.h b/PubNub/Data/Service Objects/App Context/PNFetchChannelMembersResult.h new file mode 100644 index 000000000..1a18aa297 --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNFetchChannelMembersResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch channel members` request processing result. +@interface PNFetchChannelMembersResult : PNOperationResult + + +#pragma mark - Properties + +/// `Fetch channel members` request processed information. +@property (nonatomic, readonly, strong) PNChannelMembersFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/App Context/PNFetchChannelMembersResult.m b/PubNub/Data/Service Objects/App Context/PNFetchChannelMembersResult.m new file mode 100644 index 000000000..173838d65 --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNFetchChannelMembersResult.m @@ -0,0 +1,23 @@ +#import "PNFetchChannelMembersResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNFetchChannelMembersResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNChannelMembersFetchData class]; +} + +- (PNChannelMembersFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/App Context/PNFetchChannelMetadataResult.h b/PubNub/Data/Service Objects/App Context/PNFetchChannelMetadataResult.h new file mode 100644 index 000000000..04b039570 --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNFetchChannelMetadataResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Fetch channel metadata` request processing result. +@interface PNFetchChannelMetadataResult : PNOperationResult + + +#pragma mark - Properties + +/// `Fetch channel metadata` request processed information. +@property(strong, nonatomic, readonly) PNChannelMetadataFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/App Context/PNFetchChannelMetadataResult.m b/PubNub/Data/Service Objects/App Context/PNFetchChannelMetadataResult.m new file mode 100644 index 000000000..64345d0bd --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNFetchChannelMetadataResult.m @@ -0,0 +1,23 @@ +#import "PNFetchChannelMetadataResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNFetchChannelMetadataResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNChannelMetadataFetchData class]; +} + +- (PNChannelMetadataFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/App Context/PNFetchMembershipsResult.h b/PubNub/Data/Service Objects/App Context/PNFetchMembershipsResult.h new file mode 100644 index 000000000..0192c6785 --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNFetchMembershipsResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch user meberships` request processing result. +@interface PNFetchMembershipsResult : PNOperationResult + + +#pragma mark - Properties + +/// `Fetch memberships` request processed information. +@property(strong, nonatomic, readonly) PNMembershipsFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/App Context/PNFetchMembershipsResult.m b/PubNub/Data/Service Objects/App Context/PNFetchMembershipsResult.m new file mode 100644 index 000000000..ce99a7270 --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNFetchMembershipsResult.m @@ -0,0 +1,23 @@ +#import "PNFetchMembershipsResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNFetchMembershipsResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNMembershipsFetchData class]; +} + +- (PNMembershipsFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/App Context/PNFetchUUIDMetadataResult.h b/PubNub/Data/Service Objects/App Context/PNFetchUUIDMetadataResult.h new file mode 100644 index 000000000..764911ac4 --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNFetchUUIDMetadataResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch UUID metadata` request processing result. +@interface PNFetchUUIDMetadataResult : PNOperationResult + + +#pragma mark - Properties + +/// `Fetch UUID metadata` request processed information. +@property(strong, nonatomic, readonly) PNUUIDMetadataFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/App Context/PNFetchUUIDMetadataResult.m b/PubNub/Data/Service Objects/App Context/PNFetchUUIDMetadataResult.m new file mode 100644 index 000000000..66ad322ef --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNFetchUUIDMetadataResult.m @@ -0,0 +1,23 @@ +#import "PNFetchUUIDMetadataResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNFetchUUIDMetadataResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNUUIDMetadataFetchData class]; +} + +- (PNUUIDMetadataFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/App Context/PNManageChannelMembersStatus.h b/PubNub/Data/Service Objects/App Context/PNManageChannelMembersStatus.h new file mode 100644 index 000000000..19a862c1b --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNManageChannelMembersStatus.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Manage members` request processing status. +@interface PNManageChannelMembersStatus : PNAcknowledgmentStatus + + +#pragma mark - Properties + +/// `Members` `set` / `remove` / `manage` request processed information. +@property(strong, nonatomic, readonly) PNChannelMembersManageData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/App Context/PNManageChannelMembersStatus.m b/PubNub/Data/Service Objects/App Context/PNManageChannelMembersStatus.m new file mode 100644 index 000000000..fabcd150b --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNManageChannelMembersStatus.m @@ -0,0 +1,24 @@ +#import "PNManageChannelMembersStatus.h" +#import "PNOperationResult+Private.h" +#import "PNStatus+Private.h" + + +#pragma mark Interface implementation + +@implementation PNManageChannelMembersStatus + + +#pragma mark - Properties + ++ (Class)statusDataClass { + return [PNChannelMembersManageData class]; +} + +- (PNChannelMembersManageData *)data { + return !self.isError ? self.responseData : nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/App Context/PNManageMembershipsStatus.h b/PubNub/Data/Service Objects/App Context/PNManageMembershipsStatus.h new file mode 100644 index 000000000..ba76aa2c3 --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNManageMembershipsStatus.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Manage memberships` request processing status. +@interface PNManageMembershipsStatus : PNAcknowledgmentStatus + + +#pragma mark - Properties + +/// `Memberships` `set` / `remove` / `manage` request processed information. +@property(strong, nonatomic, readonly) PNMembershipsManageData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/App Context/PNManageMembershipsStatus.m b/PubNub/Data/Service Objects/App Context/PNManageMembershipsStatus.m new file mode 100644 index 000000000..b5005d7cc --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNManageMembershipsStatus.m @@ -0,0 +1,24 @@ +#import "PNManageMembershipsStatus.h" +#import "PNOperationResult+Private.h" +#import "PNStatus+Private.h" + + +#pragma mark Interface implementation + +@implementation PNManageMembershipsStatus + + +#pragma mark - Properties + ++ (Class)statusDataClass { + return [PNMembershipsManageData class]; +} + +- (PNMembershipsManageData *)data { + return !self.isError ? self.responseData : nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/App Context/PNSetChannelMetadataStatus.h b/PubNub/Data/Service Objects/App Context/PNSetChannelMetadataStatus.h new file mode 100644 index 000000000..8fe5d6b0e --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNSetChannelMetadataStatus.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Set channel metadata` request processing status. +@interface PNSetChannelMetadataStatus : PNAcknowledgmentStatus + + +#pragma mark - Properties + +/// `Set channel metadata` request processed information. +@property(strong, nonatomic, readonly) PNChannelMetadataSetData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/App Context/PNSetChannelMetadataStatus.m b/PubNub/Data/Service Objects/App Context/PNSetChannelMetadataStatus.m new file mode 100644 index 000000000..3f76be898 --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNSetChannelMetadataStatus.m @@ -0,0 +1,24 @@ +#import "PNSetChannelMetadataStatus.h" +#import "PNOperationResult+Private.h" +#import "PNStatus+Private.h" + + +#pragma mark Interface implementation + +@implementation PNSetChannelMetadataStatus + + +#pragma mark - Properties + ++ (Class)statusDataClass { + return [PNChannelMetadataSetData class]; +} + +- (PNChannelMetadataSetData *)data { + return !self.isError ? self.responseData : nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/App Context/PNSetUUIDMetadataStatus.h b/PubNub/Data/Service Objects/App Context/PNSetUUIDMetadataStatus.h new file mode 100644 index 000000000..b2e51004b --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNSetUUIDMetadataStatus.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Set UUID metadata` request processing status. +@interface PNSetUUIDMetadataStatus : PNAcknowledgmentStatus + + +#pragma mark - Properties + +/// `Set UUID metadata` request processed information. +@property (nonatomic, readonly, strong) PNUUIDMetadataSetData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/App Context/PNSetUUIDMetadataStatus.m b/PubNub/Data/Service Objects/App Context/PNSetUUIDMetadataStatus.m new file mode 100644 index 000000000..ebd5fc61f --- /dev/null +++ b/PubNub/Data/Service Objects/App Context/PNSetUUIDMetadataStatus.m @@ -0,0 +1,24 @@ +#import "PNSetUUIDMetadataStatus.h" +#import "PNOperationResult+Private.h" +#import "PNStatus+Private.h" + + +#pragma mark Interface implementation + +@implementation PNSetUUIDMetadataStatus + + +#pragma mark - Properties + ++ (Class)statusDataClass { + return [PNUUIDMetadataSetData class]; +} + +- (PNUUIDMetadataSetData *)data { + return !self.isError ? self.responseData : nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Channel Groups/PNChannelGroupChannelsResult.h b/PubNub/Data/Service Objects/Channel Groups/PNChannelGroupChannelsResult.h new file mode 100644 index 000000000..b48f42689 --- /dev/null +++ b/PubNub/Data/Service Objects/Channel Groups/PNChannelGroupChannelsResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Fetch channel group channels request processing result. +@interface PNChannelGroupChannelsResult : PNOperationResult + + +#pragma mark - Properties + +/// Channel group channels request response from remote service. +@property (nonatomic, nonnull, readonly, strong) PNChannelGroupFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Channel Groups/PNChannelGroupChannelsResult.m b/PubNub/Data/Service Objects/Channel Groups/PNChannelGroupChannelsResult.m new file mode 100644 index 000000000..32412ddee --- /dev/null +++ b/PubNub/Data/Service Objects/Channel Groups/PNChannelGroupChannelsResult.m @@ -0,0 +1,23 @@ +#import "PNChannelGroupChannelsResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNChannelGroupChannelsResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNChannelGroupFetchData class]; +} + +- (PNChannelGroupFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Channel Groups/PNChannelGroupsResult.h b/PubNub/Data/Service Objects/Channel Groups/PNChannelGroupsResult.h new file mode 100644 index 000000000..1944d2239 --- /dev/null +++ b/PubNub/Data/Service Objects/Channel Groups/PNChannelGroupsResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Fetch channel groups request processing result. +@interface PNChannelGroupsResult : PNOperationResult + + +#pragma mark - Properties + +/// Channel group channels request response from remote service. +@property (nonatomic, nonnull, readonly, strong) PNChannelGroupFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Channel Groups/PNChannelGroupsResult.m b/PubNub/Data/Service Objects/Channel Groups/PNChannelGroupsResult.m new file mode 100644 index 000000000..fbe05ef55 --- /dev/null +++ b/PubNub/Data/Service Objects/Channel Groups/PNChannelGroupsResult.m @@ -0,0 +1,23 @@ +#import "PNChannelGroupsResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNChannelGroupsResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNChannelGroupFetchData class]; +} + +- (PNChannelGroupFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Error/PNErrorStatus+Private.h b/PubNub/Data/Service Objects/Error/PNErrorStatus+Private.h new file mode 100644 index 000000000..598e38a32 --- /dev/null +++ b/PubNub/Data/Service Objects/Error/PNErrorStatus+Private.h @@ -0,0 +1,25 @@ +#import "PNErrorStatus.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Operation error status object private extension. +@interface PNErrorStatus () + + +#pragma mark - Properties + +/// Additional error information. +/// +/// Additional information related to the context can be stored here. For example, source message will be stored here +/// if decryption will fail. +@property (nonatomic, nullable, strong) id associatedObject; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Error/PNErrorStatus.h b/PubNub/Data/Service Objects/Error/PNErrorStatus.h new file mode 100644 index 000000000..35576717a --- /dev/null +++ b/PubNub/Data/Service Objects/Error/PNErrorStatus.h @@ -0,0 +1,29 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface implementation + +/// Operation error status object. +@interface PNErrorStatus : PNStatus + + +#pragma mark - Properties + +/// Additional error information. +/// +/// Additional information related to the context can be stored here. For example, source message will be stored here +/// if decryption will fail. +@property (nonatomic, nullable, readonly, strong) id associatedObject; + +/// Error status object additional information. +@property (nonatomic, readonly, strong) PNErrorData *errorData; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Error/PNErrorStatus.m b/PubNub/Data/Service Objects/Error/PNErrorStatus.m new file mode 100644 index 000000000..8b5355ef3 --- /dev/null +++ b/PubNub/Data/Service Objects/Error/PNErrorStatus.m @@ -0,0 +1,65 @@ +#import "PNErrorStatus+Private.h" +#import "PNBaseOperationData+Private.h" +#import "PNOperationResult+Private.h" +#import "PNStatus+Private.h" + + +#pragma mark Interface implementation + +@implementation PNErrorStatus + + +#pragma mark - Properties + ++ (Class)statusDataClass { + return [PNErrorData class]; +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)objectWithOperation:(PNOperationType)operation category:(PNStatusCategory)category response:(id)response { + PNErrorStatus *status = [super objectWithOperation:operation category:category response:response]; + + if ([response isKindOfClass:[PNBaseOperationData class]]) { + PNStatusCategory category = ((PNBaseOperationData *)response).category; + if (category != PNUnknownCategory) status.category = category; + } + + if (!status.isError && status.category == PNUnknownCategory) status.category = PNAcknowledgmentCategory; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + if (status.isError && status.category == PNBadRequestCategory) status.statusCode = 400; + else if (status.isError && status.category == PNAccessDeniedCategory) status.statusCode = 403; + else if (status.isError && status.category == PNResourceNotFoundCategory) status.statusCode = 404; + else if (status.isError && status.category == PNMalformedResponseCategory) status.statusCode = 500; + else if (status.category == PNAcknowledgmentCategory || status.category == PNCancelledCategory) { + status.statusCode = 200; + } +#pragma clang diagnostic pop + + return status; +} + +- (id)copyWithZone:(NSZone *)zone { + PNErrorStatus *status = [super copyWithZone:zone]; + status.associatedObject = self.associatedObject; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + status.statusCode = self.statusCode; +#pragma clang diagnostic pop + + return status; +} + + +#pragma mark - Properties + +- (PNErrorData *)errorData { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/File Sharing/PNDownloadFileResult.h b/PubNub/Data/Service Objects/File Sharing/PNDownloadFileResult.h new file mode 100644 index 000000000..0aafe1adf --- /dev/null +++ b/PubNub/Data/Service Objects/File Sharing/PNDownloadFileResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interfaces declaration + +/// `Download file` request processing result. +@interface PNDownloadFileResult : PNOperationResult + + +#pragma mark - Properties + +/// `Download file` request processed information. +@property (nonatomic, readonly, strong) PNFileDownloadData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/File Sharing/PNDownloadFileResult.m b/PubNub/Data/Service Objects/File Sharing/PNDownloadFileResult.m new file mode 100644 index 000000000..e8dd9e7df --- /dev/null +++ b/PubNub/Data/Service Objects/File Sharing/PNDownloadFileResult.m @@ -0,0 +1,23 @@ +#import "PNDownloadFileResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNDownloadFileResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNFileDownloadData class]; +} + +- (PNFileDownloadData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/File Sharing/PNGenerateFileUploadURLStatus.h b/PubNub/Data/Service Objects/File Sharing/PNGenerateFileUploadURLStatus.h new file mode 100644 index 000000000..d8fbbf19b --- /dev/null +++ b/PubNub/Data/Service Objects/File Sharing/PNGenerateFileUploadURLStatus.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interfaces declaration + +/// `Generate file upload URL` request processing status. +@interface PNGenerateFileUploadURLStatus : PNAcknowledgmentStatus + + +#pragma mark - Properties + +/// `Generate file upload URL` request processed information. +@property(strong, nonatomic, readonly) PNFileGenerateUploadURLData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/File Sharing/PNGenerateFileUploadURLStatus.m b/PubNub/Data/Service Objects/File Sharing/PNGenerateFileUploadURLStatus.m new file mode 100644 index 000000000..aeafa73d2 --- /dev/null +++ b/PubNub/Data/Service Objects/File Sharing/PNGenerateFileUploadURLStatus.m @@ -0,0 +1,24 @@ +#import "PNGenerateFileUploadURLStatus.h" +#import "PNOperationResult+Private.h" +#import "PNStatus+Private.h" + + +#pragma mark Interfaces implementation + +@implementation PNGenerateFileUploadURLStatus + + +#pragma mark - Properties + ++ (Class)statusDataClass { + return [PNFileGenerateUploadURLData class]; +} + +- (PNFileGenerateUploadURLData *)data { + return !self.isError ? self.responseData : nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/File Sharing/PNListFilesResult.h b/PubNub/Data/Service Objects/File Sharing/PNListFilesResult.h new file mode 100644 index 000000000..cf5aeec7b --- /dev/null +++ b/PubNub/Data/Service Objects/File Sharing/PNListFilesResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interfaces declaration + +/// `List files` request processing result. +@interface PNListFilesResult : PNOperationResult + + +#pragma mark - Properties + +/// `List files` request processed information. +@property(strong, nonatomic, readonly) PNFileListFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/File Sharing/PNListFilesResult.m b/PubNub/Data/Service Objects/File Sharing/PNListFilesResult.m new file mode 100644 index 000000000..12614a038 --- /dev/null +++ b/PubNub/Data/Service Objects/File Sharing/PNListFilesResult.m @@ -0,0 +1,23 @@ +#import "PNListFilesResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interfaces implementation + +@implementation PNListFilesResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNFileListFetchData class]; +} + +- (PNFileListFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/File Sharing/PNSendFileStatus.h b/PubNub/Data/Service Objects/File Sharing/PNSendFileStatus.h new file mode 100644 index 000000000..06b91225c --- /dev/null +++ b/PubNub/Data/Service Objects/File Sharing/PNSendFileStatus.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Send file` request provessing status. +@interface PNSendFileStatus : PNAcknowledgmentStatus + + +#pragma mark - Information + +/// `Send file` request processed information. +@property(strong, nonatomic, readonly) PNFileSendData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/File Sharing/PNSendFileStatus.m b/PubNub/Data/Service Objects/File Sharing/PNSendFileStatus.m new file mode 100644 index 000000000..6793ec15d --- /dev/null +++ b/PubNub/Data/Service Objects/File Sharing/PNSendFileStatus.m @@ -0,0 +1,24 @@ +#import "PNSendFileStatus.h" +#import "PNOperationResult+Private.h" +#import "PNStatus+Private.h" + + +#pragma mark Interfaces implementation + +@implementation PNSendFileStatus + + +#pragma mark - Properties + ++ (Class)statusDataClass { + return [PNFileSendData class]; +} + +- (PNFileSendData *)data { + return !self.isError ? self.responseData : nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Message Persistence/PNHistoryResult.h b/PubNub/Data/Service Objects/Message Persistence/PNHistoryResult.h new file mode 100644 index 000000000..4f39b240e --- /dev/null +++ b/PubNub/Data/Service Objects/Message Persistence/PNHistoryResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch history` request processing result. +@interface PNHistoryResult : PNOperationResult + + +#pragma mark - Properties + +/// `Fetch history` request processed information. +@property(strong, nonatomic, readonly) PNHistoryFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Message Persistence/PNHistoryResult.m b/PubNub/Data/Service Objects/Message Persistence/PNHistoryResult.m new file mode 100644 index 000000000..f355d15e8 --- /dev/null +++ b/PubNub/Data/Service Objects/Message Persistence/PNHistoryResult.m @@ -0,0 +1,23 @@ +#import "PNHistoryResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interfaces implementation + +@implementation PNHistoryResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNHistoryFetchData class]; +} + +- (PNHistoryFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Message Persistence/PNMessageCountResult.h b/PubNub/Data/Service Objects/Message Persistence/PNMessageCountResult.h new file mode 100644 index 000000000..e9d9ed845 --- /dev/null +++ b/PubNub/Data/Service Objects/Message Persistence/PNMessageCountResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Channels message count` request processing result. +@interface PNMessageCountResult : PNOperationResult + + +#pragma mark - Properties + +/// Message count request processing information. +@property(strong, nonatomic, readonly) PNHistoryMessageCountData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Message Persistence/PNMessageCountResult.m b/PubNub/Data/Service Objects/Message Persistence/PNMessageCountResult.m new file mode 100644 index 000000000..460f785b8 --- /dev/null +++ b/PubNub/Data/Service Objects/Message Persistence/PNMessageCountResult.m @@ -0,0 +1,23 @@ +#import "PNMessageCountResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNMessageCountResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNHistoryMessageCountData class]; +} + +- (PNHistoryMessageCountData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Message Reaction/PNAddMessageActionStatus.h b/PubNub/Data/Service Objects/Message Reaction/PNAddMessageActionStatus.h new file mode 100644 index 000000000..1386c7c33 --- /dev/null +++ b/PubNub/Data/Service Objects/Message Reaction/PNAddMessageActionStatus.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Add message action` request status. +@interface PNAddMessageActionStatus : PNAcknowledgmentStatus + + +#pragma mark - Properties + +/// `Add message action` request processed information. +@property(strong, nonatomic, readonly) PNMessageActionFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Message Reaction/PNAddMessageActionStatus.m b/PubNub/Data/Service Objects/Message Reaction/PNAddMessageActionStatus.m new file mode 100644 index 000000000..ee4cd0356 --- /dev/null +++ b/PubNub/Data/Service Objects/Message Reaction/PNAddMessageActionStatus.m @@ -0,0 +1,25 @@ +#import "PNAddMessageActionStatus.h" +#import +#import "PNOperationResult+Private.h" +#import "PNStatus+Private.h" + + +#pragma mark Interface implementation + +@implementation PNAddMessageActionStatus + + +#pragma mark - Properties + ++ (Class)statusDataClass { + return [PNMessageActionFetchData class]; +} + +- (PNMessageActionFetchData *)data { + return !self.isError ? self.responseData : nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Message Reaction/PNFetchMessageActionsResult.h b/PubNub/Data/Service Objects/Message Reaction/PNFetchMessageActionsResult.h new file mode 100644 index 000000000..9a63abbd0 --- /dev/null +++ b/PubNub/Data/Service Objects/Message Reaction/PNFetchMessageActionsResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interfaces declaration + +/// `Fetch message actions` request processing result. +@interface PNFetchMessageActionsResult : PNOperationResult + + +#pragma mark - Properties + +/// `Fetch message actions` request processed data. +@property(strong, nonatomic, readonly) PNMessageActionsFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Message Reaction/PNFetchMessageActionsResult.m b/PubNub/Data/Service Objects/Message Reaction/PNFetchMessageActionsResult.m new file mode 100644 index 000000000..bc4cd2370 --- /dev/null +++ b/PubNub/Data/Service Objects/Message Reaction/PNFetchMessageActionsResult.m @@ -0,0 +1,23 @@ +#import "PNFetchMessageActionsResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNFetchMessageActionsResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNMessageActionsFetchData class]; +} + +- (PNMessageActionsFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/PNAPNSEnabledChannelsResult.h b/PubNub/Data/Service Objects/PNAPNSEnabledChannelsResult.h deleted file mode 100644 index 322c18548..000000000 --- a/PubNub/Data/Service Objects/PNAPNSEnabledChannelsResult.h +++ /dev/null @@ -1,60 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Class which allow to get access to APNS enabled channels processed result. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNAPNSEnabledChannelsData : PNServiceData - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Channels with active push notifications. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSArray *channels; - -#pragma mark - - - -@end - - -/** - @brief Class which is used to provide access to request processing results. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNAPNSEnabledChannelsResult : PNOperationResult - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Stores reference on APNS enabled channels audit request processing information. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) PNAPNSEnabledChannelsData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNAPNSEnabledChannelsResult.m b/PubNub/Data/Service Objects/PNAPNSEnabledChannelsResult.m deleted file mode 100644 index 71bc0e340..000000000 --- a/PubNub/Data/Service Objects/PNAPNSEnabledChannelsResult.m +++ /dev/null @@ -1,59 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNAPNSEnabledChannelsResult.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark Interface implementation - -@implementation PNAPNSEnabledChannelsData - -#pragma mark - Information - -- (NSArray *)channels { - - return (self.serviceData[@"channels"]?: @[]); -} - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNAPNSEnabledChannelsResult () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNAPNSEnabledChannelsData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNAPNSEnabledChannelsResult - - -#pragma mark - Information - -- (PNAPNSEnabledChannelsData *)data { - - if (!_data) { _data = [PNAPNSEnabledChannelsData dataWithServiceResponse:self.serviceData]; } - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNAcknowledgmentStatus.h b/PubNub/Data/Service Objects/PNAcknowledgmentStatus.h index f8a9ef6d0..ae9b023f6 100644 --- a/PubNub/Data/Service Objects/PNAcknowledgmentStatus.h +++ b/PubNub/Data/Service Objects/PNAcknowledgmentStatus.h @@ -1,14 +1,13 @@ #import -/** - @brief Class which is used to represent request processing status sent by server and mean what - changes pushed with that request has been accepted. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Request processing status. +/// +/// Status represent whether request has been acknowledged by remote service or not. @interface PNAcknowledgmentStatus : PNErrorStatus @@ -16,3 +15,5 @@ @end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNAcknowledgmentStatus.m b/PubNub/Data/Service Objects/PNAcknowledgmentStatus.m index 0c7ef2c00..b5d54d087 100644 --- a/PubNub/Data/Service Objects/PNAcknowledgmentStatus.m +++ b/PubNub/Data/Service Objects/PNAcknowledgmentStatus.m @@ -1,9 +1,5 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ #import "PNAcknowledgmentStatus.h" +#import "PNOperationResult+Private.h" #pragma mark Interface implementation diff --git a/PubNub/Data/Service Objects/PNAddMessageActionStatus.h b/PubNub/Data/Service Objects/PNAddMessageActionStatus.h deleted file mode 100644 index 5a165ad36..000000000 --- a/PubNub/Data/Service Objects/PNAddMessageActionStatus.h +++ /dev/null @@ -1,59 +0,0 @@ -#import -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent 'Message Actions' API response for \c add \c message - * \c action request. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNAddMessageActionData : PNServiceData - - -#pragma mark - Information - -/** - * @brief Added \c message \c action. - */ -@property (nonatomic, nullable, readonly, strong) PNMessageAction *action; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c add \c message \c action request - * results. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNAddMessageActionStatus : PNAcknowledgmentStatus - - -#pragma mark - Information - -/** - * @brief \c Add \c message \c action request processed information. - */ -@property (nonatomic, readonly, strong) PNAddMessageActionData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNAddMessageActionStatus.m b/PubNub/Data/Service Objects/PNAddMessageActionStatus.m deleted file mode 100644 index 40e28182d..000000000 --- a/PubNub/Data/Service Objects/PNAddMessageActionStatus.m +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNAddMessageActionStatus.h" -#import "PNOperationResult+Private.h" -#import "PNMessageAction+Private.h" -#import "PNServiceData+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNAddMessageActionStatus () - - -#pragma mark - Information - -@property (nonatomic, strong) PNAddMessageActionData *data; - -#pragma mark - - - -@end - - -@interface PNAddMessageActionData () - - -#pragma mark - Information - -@property (nonatomic, strong) PNMessageAction *action; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNAddMessageActionData - - -#pragma mark - Information - -- (PNMessageAction *)action { - if (!_action) { - _action = [PNMessageAction actionFromDictionary:self.serviceData[@"action"]]; - } - - return _action; -} - -#pragma mark - - - -@end - - -@implementation PNAddMessageActionStatus - - -#pragma mark - Information - -- (BOOL)isError { - return super.isError ?: ((NSNumber *)self.serviceData[@"isError"]).boolValue; -} - -- (PNAddMessageActionData *)data { - if (!_data) { - _data = [PNAddMessageActionData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNChannelClientStateResult.h b/PubNub/Data/Service Objects/PNChannelClientStateResult.h deleted file mode 100644 index 45c486fa6..000000000 --- a/PubNub/Data/Service Objects/PNChannelClientStateResult.h +++ /dev/null @@ -1,60 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Class which allow to get access to client state for channel processed result. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNChannelClientStateData : PNServiceData - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief User-provided client state information. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSDictionary *state; - -#pragma mark - - - -@end - - -/** - @brief Class which is used to provide access to request processing results. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNChannelClientStateResult : PNOperationResult - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Stores reference on client state for channel request processing information. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) PNChannelClientStateData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNChannelClientStateResult.m b/PubNub/Data/Service Objects/PNChannelClientStateResult.m deleted file mode 100644 index 4ab32770c..000000000 --- a/PubNub/Data/Service Objects/PNChannelClientStateResult.m +++ /dev/null @@ -1,60 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNChannelClientStateResult.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark - Interface implementation - -@implementation PNChannelClientStateData - - -#pragma mark - Information - -- (NSDictionary *)state { - - return (self.serviceData[@"state"]?: @{}); -} - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNChannelClientStateResult () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNChannelClientStateData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNChannelClientStateResult - - -#pragma mark - Information - -- (PNChannelClientStateData *)data { - - if (!_data) { _data = [PNChannelClientStateData dataWithServiceResponse:self.serviceData]; } - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNChannelGroupChannelsResult.h b/PubNub/Data/Service Objects/PNChannelGroupChannelsResult.h deleted file mode 100644 index 4418cb7f4..000000000 --- a/PubNub/Data/Service Objects/PNChannelGroupChannelsResult.h +++ /dev/null @@ -1,62 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Class which allow to get access to channel group's channels list audit processed result. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNChannelGroupChannelsData : PNServiceData - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Registered channels within channel group. - @note In case if status object represent error, this property may contain list of channels to which client - doesn't have access. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSArray *channels; - -#pragma mark - - - -@end - - -/** - @brief Class which is used to provide access to request processing results. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNChannelGroupChannelsResult : PNOperationResult - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Stores reference on channel group's channels list audit request processing information. - - @since 4.0 - */ -@property (nonatomic, nonnull, readonly, strong) PNChannelGroupChannelsData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNChannelGroupChannelsResult.m b/PubNub/Data/Service Objects/PNChannelGroupChannelsResult.m deleted file mode 100644 index fc3d8af4c..000000000 --- a/PubNub/Data/Service Objects/PNChannelGroupChannelsResult.m +++ /dev/null @@ -1,60 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNChannelGroupChannelsResult.h" -#import "PNServiceData+Private.h" -#import "PNOperationResult+Private.h" - - -#pragma mark - Interface implementation - -@implementation PNChannelGroupChannelsData - - -#pragma mark - Information - -- (NSArray *)channels { - - return (self.serviceData[@"channels"]?: @[]); -} - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNChannelGroupChannelsResult () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNChannelGroupChannelsData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNChannelGroupChannelsResult - - -#pragma mark - Information - -- (PNChannelGroupChannelsData *)data { - - if (!_data) { _data = [PNChannelGroupChannelsData dataWithServiceResponse:self.serviceData]; } - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNChannelGroupClientStateResult.h b/PubNub/Data/Service Objects/PNChannelGroupClientStateResult.h deleted file mode 100644 index 6a5ccd1ec..000000000 --- a/PubNub/Data/Service Objects/PNChannelGroupClientStateResult.h +++ /dev/null @@ -1,60 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Class which allow to get access to client state for channel group processed result. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNChannelGroupClientStateData : PNServiceData - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Multi channel client state information. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSDictionary *channels; - -#pragma mark - - - -@end - - -/** - @brief Class which is used to provide access to request processing results. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNChannelGroupClientStateResult : PNOperationResult - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Stores reference on client state for channel group request processing information. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) PNChannelGroupClientStateData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNChannelGroupClientStateResult.m b/PubNub/Data/Service Objects/PNChannelGroupClientStateResult.m deleted file mode 100644 index 39977eef8..000000000 --- a/PubNub/Data/Service Objects/PNChannelGroupClientStateResult.m +++ /dev/null @@ -1,60 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNChannelGroupClientStateResult.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark - Interface implementation - -@implementation PNChannelGroupClientStateData - - -#pragma mark - Information - -- (NSDictionary *)channels { - - return (self.serviceData[@"channels"]?: @{}); -} - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNChannelGroupClientStateResult () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNChannelGroupClientStateData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNChannelGroupClientStateResult - - -#pragma mark - Information - -- (PNChannelGroupClientStateData *)data { - - if (!_data) { _data = [PNChannelGroupClientStateData dataWithServiceResponse:self.serviceData]; } - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNChannelGroupsResult.h b/PubNub/Data/Service Objects/PNChannelGroupsResult.h deleted file mode 100644 index c32156035..000000000 --- a/PubNub/Data/Service Objects/PNChannelGroupsResult.h +++ /dev/null @@ -1,60 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Class which allow to get access to channel groups list audit processed result. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNChannelGroupsData : PNServiceData - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Registered and active channel groups. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSArray *groups; - -#pragma mark - - - -@end - - -/** - @brief Class which is used to provide access to request processing results. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNChannelGroupsResult : PNOperationResult - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Stores reference on channel groups list audit request processing information. - - @since 4.0 - */ -@property (nonatomic, nonnull, readonly, strong) PNChannelGroupsData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNChannelGroupsResult.m b/PubNub/Data/Service Objects/PNChannelGroupsResult.m deleted file mode 100644 index 524feeee1..000000000 --- a/PubNub/Data/Service Objects/PNChannelGroupsResult.m +++ /dev/null @@ -1,55 +0,0 @@ -#import "PNChannelGroupsResult.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark - Interface implementation - -@implementation PNChannelGroupsData - - -#pragma mark - Information - -- (NSArray *)groups { - - return (self.serviceData[@"groups"]?: @[]); -} - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNChannelGroupsResult () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNChannelGroupsData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNChannelGroupsResult - - -#pragma mark - Information - -- (PNChannelGroupsData *)data { - - if (!_data) { _data = [PNChannelGroupsData dataWithServiceResponse:self.serviceData]; } - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNClientStateGetResult.h b/PubNub/Data/Service Objects/PNClientStateGetResult.h deleted file mode 100644 index 06c52d510..000000000 --- a/PubNub/Data/Service Objects/PNClientStateGetResult.h +++ /dev/null @@ -1,52 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Class which allow to get access to client state for channel / groups processed result. - * - * @author Serhii Mamontov - * @since 4.8.3 - * @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNClientStateData : PNServiceData - - -#pragma mark Information - -/** - * @brief State information for each channel from requested channels / chanel groups channels. - */ -@property (nonatomic, readonly, strong) NSDictionary *channels; - -#pragma mark - - - -@end - - -/** - * @brief Class which is used to provide access to request processing results. - * - * @author Serhii Mamontov - * @since 4.8.3 - * @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNClientStateGetResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief Client state processing information for channels / chanel groups channels. - */ -@property (nonatomic, readonly, strong) PNClientStateData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNClientStateGetResult.m b/PubNub/Data/Service Objects/PNClientStateGetResult.m deleted file mode 100644 index df3b4c9c2..000000000 --- a/PubNub/Data/Service Objects/PNClientStateGetResult.m +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @author Serhii Mamontov - * @since 4.8.3 - * @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNClientStateGetResult.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark Interface implementation - -@implementation PNClientStateData - - -#pragma mark - Information - -- (NSDictionary *)channels { - - return (self.serviceData[@"channels"] ?: @{}); -} - -#pragma mark - - -@end - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - Private interface declaration - -@interface PNClientStateGetResult () - - -#pragma mark - Information - -@property (nonatomic, nonnull, strong) PNClientStateData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNClientStateGetResult - - -#pragma mark - Information - -- (PNClientStateData *)data { - - if (!_data) { - _data = [PNClientStateData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - -@end diff --git a/PubNub/Data/Service Objects/PNClientStateUpdateStatus.h b/PubNub/Data/Service Objects/PNClientStateUpdateStatus.h deleted file mode 100644 index fd826c24e..000000000 --- a/PubNub/Data/Service Objects/PNClientStateUpdateStatus.h +++ /dev/null @@ -1,45 +0,0 @@ -#import -#import - - -/** - @brief Class which allow to get access to used client state during state update process. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNClientStateUpdateData : PNChannelClientStateData - - -#pragma mark - - - -@end - - -/** - @brief Class which is used to provide access to request processing results. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNClientStateUpdateStatus : PNErrorStatus - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Stores reference on client state for channel request processing information. - - @since 4.0 - */ -@property (nonatomic, nonnull, readonly, strong) PNClientStateUpdateData *data; - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNClientStateUpdateStatus.m b/PubNub/Data/Service Objects/PNClientStateUpdateStatus.m deleted file mode 100644 index afeddcc05..000000000 --- a/PubNub/Data/Service Objects/PNClientStateUpdateStatus.m +++ /dev/null @@ -1,53 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNClientStateUpdateStatus.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark - Interface implementation - -@implementation PNClientStateUpdateData - - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNClientStateUpdateStatus () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNClientStateUpdateData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNClientStateUpdateStatus - - -#pragma mark - Information - -- (PNClientStateUpdateData *)data { - - if (!_data) { _data = [PNClientStateUpdateData dataWithServiceResponse:self.serviceData]; } - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNDownloadFileResult.h b/PubNub/Data/Service Objects/PNDownloadFileResult.h deleted file mode 100644 index afc7c6773..000000000 --- a/PubNub/Data/Service Objects/PNDownloadFileResult.h +++ /dev/null @@ -1,64 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent Files API response for \c download \c file request. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNDownloadFileData : PNServiceData - - -#pragma mark - Information - -/** - * @brief Whether file is temporary or not. - * - * @warning Temporary file will be removed as soon as completion block will exit. Make sure to move temporary files (w/o scheduling - * task on secondary thread) to persistent location. - */ -@property (nonatomic, readonly, assign, getter = isTemporary) BOOL temporary; - -/** - * @brief Location where downloaded file can be found. - */ -@property (nonatomic, readonly, nullable, readonly, strong) NSURL *location; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c download \c file request results. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNDownloadFileResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c Download \c file request processed information. - */ -@property (nonatomic, readonly, strong) PNDownloadFileData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNDownloadFileResult.m b/PubNub/Data/Service Objects/PNDownloadFileResult.m deleted file mode 100644 index 4b980a564..000000000 --- a/PubNub/Data/Service Objects/PNDownloadFileResult.m +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNServiceData+Private.h" -#import "PNOperationResult+Private.h" -#import "PNDownloadFileResult.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNDownloadFileResult () - - -#pragma mark - Information - -@property (nonatomic, strong) PNDownloadFileData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNDownloadFileData - - -#pragma mark - Information - -- (NSURL *)location { - return [NSURL URLWithString:self.serviceData[@"location"]]; -} - -- (BOOL)isTemporary { - return ((NSNumber *)self.serviceData[@"temporary"]).boolValue; -} - -#pragma mark - - - -@end - - -@implementation PNDownloadFileResult - - -#pragma mark - Information - -- (PNDownloadFileData *)data { - if (!_data) { - _data = [PNDownloadFileData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNErrorStatus+Private.h b/PubNub/Data/Service Objects/PNErrorStatus+Private.h deleted file mode 100644 index c241954bf..000000000 --- a/PubNub/Data/Service Objects/PNErrorStatus+Private.h +++ /dev/null @@ -1,26 +0,0 @@ -#import "PNErrorStatus.h" - - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Error status class extension to expose private information to subclasses. - - @since 4.0 - */ -@interface PNErrorStatus () - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -@property (nonatomic, nullable, strong) id associatedObject; -@property (nonatomic, strong) PNErrorData *errorData; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNErrorStatus.h b/PubNub/Data/Service Objects/PNErrorStatus.h deleted file mode 100644 index 17eb8463e..000000000 --- a/PubNub/Data/Service Objects/PNErrorStatus.h +++ /dev/null @@ -1,93 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Class which is used to provide access to additional data available to describe error status - object. - In most cases this object may represent information related to \b PAM error scope. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNErrorData : PNServiceData - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief List of channels for which error has been triggered. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSArray *channels; - -/** - @brief List of channel groups for which error has been triggered. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSArray *channelGroups; - -/** - @brief Service-provided information about error. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSString *information; - -/** - @brief Service-provided additional information about error. - - @since 4.0 - */ -@property (nonatomic, nullable, readonly, strong) id data; - -#pragma mark - - - -@end - - - -/** - @brief Class which is used to provide information about why request processing did fail. Status can be - returned by server or on local error event. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNErrorStatus : PNStatus - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Stores reference on additional information related to error status object. - @discussion If error status arrived from \b PubNub network in most cases it will be because of \b PAM errors. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) PNErrorData *errorData; - -/** - @brief Reference on data object which hold additional information about error and why it happened. - - @since 4.0.2 - */ -@property (nonatomic, nullable, readonly, strong) id associatedObject; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNErrorStatus.m b/PubNub/Data/Service Objects/PNErrorStatus.m deleted file mode 100644 index 382dc6cdd..000000000 --- a/PubNub/Data/Service Objects/PNErrorStatus.m +++ /dev/null @@ -1,63 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNErrorStatus+Private.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark Interface implementation - -@implementation PNErrorData - -- (NSArray *)channels { - - return (self.serviceData[@"channels"]?: @[]); -} - -- (NSArray *)channelGroups { - - return (self.serviceData[@"channelGroups"]?: @[]); -} - -- (NSString *)information { - - return (self.serviceData[@"information"]?: @"No Error Information"); -} - -- (id)data { - - return self.serviceData[@"data"]; -} - -#pragma mark - - - -@end - - -@implementation PNErrorStatus - - -#pragma mark - Information - -- (id)copyWithZone:(NSZone *)zone { - - PNErrorStatus *status = [super copyWithZone:zone]; - status.associatedObject = self.associatedObject; - - return status; -} - -- (PNErrorData *)errorData { - - if (!_errorData) { _errorData = [PNErrorData dataWithServiceResponse:self.serviceData]; } - return _errorData; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNFetchChannelMembersResult.h b/PubNub/Data/Service Objects/PNFetchChannelMembersResult.h deleted file mode 100644 index 44198d312..000000000 --- a/PubNub/Data/Service Objects/PNFetchChannelMembersResult.h +++ /dev/null @@ -1,75 +0,0 @@ -#import -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent Objects API response for \c fetch \c members request. - * - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchChannelMembersData : PNServiceData - - -#pragma mark - Information - -/** - * @brief List of fetched \c members. - */ -@property (nonatomic, readonly, strong) NSArray *members; - -/** - * @brief Cursor bookmark for fetching the next page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *next; - -/** - * @brief Cursor bookmark for fetching the previous page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *prev; - -/** - * @brief Total number of \c members in \c channel's members list. - * - * @note Value will be \c 0 in case if \c includeCount of \b PNFetchChannelMembersRequest is set to - * \c NO. - */ -@property (nonatomic, readonly, assign) NSUInteger totalCount; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c fetch \c members request results. - * - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchChannelMembersResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c Fetch \c members request processed information. - */ -@property (nonatomic, readonly, strong) PNFetchChannelMembersData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNFetchChannelMembersResult.m b/PubNub/Data/Service Objects/PNFetchChannelMembersResult.m deleted file mode 100644 index a869bf992..000000000 --- a/PubNub/Data/Service Objects/PNFetchChannelMembersResult.m +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNServiceData+Private.h" -#import "PNFetchChannelMembersResult.h" -#import "PNOperationResult+Private.h" -#import "PNChannelMember+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNFetchChannelMembersResult () - - -#pragma mark - Information - -@property (nonatomic, nonnull, strong) PNFetchChannelMembersData *data; - -#pragma mark - - - -@end - - -@interface PNFetchChannelMembersData () - - -#pragma mark - Information - -@property (nonatomic, strong) NSArray *members; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNFetchChannelMembersData - - -#pragma mark - Information - -- (NSArray *)members { - if (!_members) { - NSMutableArray *members = [NSMutableArray new]; - - for (NSDictionary *member in self.serviceData[@"members"]) { - [members addObject:[PNChannelMember memberFromDictionary:member]]; - } - - _members = [members copy]; - } - - return _members; -} - -- (NSUInteger)totalCount { - return ((NSNumber *)self.serviceData[@"totalCount"]).unsignedIntegerValue; -} - -- (NSString *)next { - return self.serviceData[@"next"]; -} - -- (NSString *)prev { - return self.serviceData[@"prev"]; -} - -#pragma mark - - - -@end - - -@implementation PNFetchChannelMembersResult - - -#pragma mark - Information - -- (PNFetchChannelMembersData *)data { - if (!_data) { - _data = [PNFetchChannelMembersData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNFetchChannelsMetadataResult.h b/PubNub/Data/Service Objects/PNFetchChannelsMetadataResult.h deleted file mode 100644 index 4febdf985..000000000 --- a/PubNub/Data/Service Objects/PNFetchChannelsMetadataResult.h +++ /dev/null @@ -1,127 +0,0 @@ -#import -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent Objects API response for \c fetch \c channel - * \c metadata request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchChannelMetadataData : PNServiceData - - -#pragma mark - Information - -/** - * @brief Requested \c channel \c metadata object. - */ -@property (nonatomic, nullable, readonly, strong) PNChannelMetadata *metadata; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to represent Objects API response for \c fetch \c all \c channels - * \c metadata request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchAllChannelsMetadataData : PNServiceData - - -#pragma mark - Information - -/** - * @brief List of \c channels \c metadata objects created for current subscribe key. - */ -@property (nonatomic, readonly, strong) NSArray *metadata; - -/** - * @brief Cursor bookmark for fetching the next page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *next; - -/** - * @brief Cursor bookmark for fetching the previous page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *prev; - -/** - * @brief Total number of objects created for current subscribe key. - * - * @note Value will be \c 0 in case if \b PNChannelTotalCountField not added to \c includeFields - * of \b PNFetchAllChannelsMetadataRequest. - */ -@property (nonatomic, readonly, assign) NSUInteger totalCount; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to \c fetch \c channel \c metadata request - * response. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchChannelMetadataResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c Fetch \c channel \c metadata request processed information. - */ -@property (nonatomic, readonly, strong) PNFetchChannelMetadataData *data; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to \c fetch \c all \c channels \c metadata request - * response. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchAllChannelsMetadataResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c Fetch \c all \c channels \c metadata request processed information. - */ -@property (nonatomic, readonly, strong) PNFetchAllChannelsMetadataData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNFetchChannelsMetadataResult.m b/PubNub/Data/Service Objects/PNFetchChannelsMetadataResult.m deleted file mode 100644 index 4890a81ba..000000000 --- a/PubNub/Data/Service Objects/PNFetchChannelsMetadataResult.m +++ /dev/null @@ -1,165 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNFetchChannelsMetadataResult.h" -#import "PNChannelMetadata+Private.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNFetchChannelMetadataResult () - - -#pragma mark - Information - -@property (nonatomic, nonnull, strong) PNFetchChannelMetadataData *data; - -#pragma mark - - - -@end - - -@interface PNFetchAllChannelsMetadataResult () - - -#pragma mark - Information - -@property (nonatomic, nonnull, strong) PNFetchAllChannelsMetadataData *data; - -#pragma mark - - - -@end - - - -@interface PNFetchChannelMetadataData () - - -#pragma mark - Information - -@property (nonatomic, nullable, strong) PNChannelMetadata *metadata; - -#pragma mark - - - -@end - - -@interface PNFetchAllChannelsMetadataData () - - -#pragma mark - Information - -@property (nonatomic, strong) NSArray *metadata; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNFetchChannelMetadataData - - -#pragma mark - Information - -- (PNChannelMetadata *)metadata { - if (!_metadata) { - _metadata = [PNChannelMetadata channelMetadataFromDictionary:self.serviceData[@"channel"]]; - } - - return _metadata; -} - -#pragma mark - - - -@end - - -@implementation PNFetchAllChannelsMetadataData - - -#pragma mark - Information - -- (NSUInteger)totalCount { - return ((NSNumber *)self.serviceData[@"totalCount"]).unsignedIntegerValue; -} - -- (NSArray *)metadata { - if (!_metadata) { - NSMutableArray *channelsMetadata = [NSMutableArray new]; - - for (NSDictionary *metadata in self.serviceData[@"channels"]) { - [channelsMetadata addObject:[PNChannelMetadata channelMetadataFromDictionary:metadata]]; - } - - _metadata = [channelsMetadata copy]; - } - - return _metadata; -} - -- (NSString *)next { - return self.serviceData[@"next"]; -} - -- (NSString *)prev { - return self.serviceData[@"prev"]; -} - -#pragma mark - - - -@end - - -@implementation PNFetchChannelMetadataResult - - -#pragma mark - Information - -- (PNFetchChannelMetadataData *)data { - if (!_data) { - _data = [PNFetchChannelMetadataData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end - - -@implementation PNFetchAllChannelsMetadataResult - - -#pragma mark - Information - -- (PNFetchAllChannelsMetadataData *)data { - if (!_data) { - _data = [PNFetchAllChannelsMetadataData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNFetchMembershipsResult.h b/PubNub/Data/Service Objects/PNFetchMembershipsResult.h deleted file mode 100644 index 3f6038012..000000000 --- a/PubNub/Data/Service Objects/PNFetchMembershipsResult.h +++ /dev/null @@ -1,77 +0,0 @@ -#import -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent Objects API response for \c fetch \c memberships - * request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchMembershipsData : PNServiceData - - -#pragma mark - Information - -/** - * @brief List of fetched \c memberships. - */ -@property (nonatomic, readonly, strong) NSArray *memberships; - -/** - * @brief Cursor bookmark for fetching the next page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *next; - -/** - * @brief Cursor bookmark for fetching the previous page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *prev; - -/** - * @brief Total number of \c memberships in which \c UUID participate. - * - * @note Value will be \c 0 in case if \c includeCount of \b PNFetchMembershipsRequest is set to - * \c NO. - */ -@property (nonatomic, readonly, assign) NSUInteger totalCount; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c fetch \c memberships request - * results. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchMembershipsResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c Fetch \c memberships request processed information. - */ -@property (nonatomic, readonly, strong) PNFetchMembershipsData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNFetchMembershipsResult.m b/PubNub/Data/Service Objects/PNFetchMembershipsResult.m deleted file mode 100644 index 909e7c285..000000000 --- a/PubNub/Data/Service Objects/PNFetchMembershipsResult.m +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNFetchMembershipsResult.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" -#import "PNMembership+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNFetchMembershipsResult () - - -#pragma mark - Information - -@property (nonatomic, strong) PNFetchMembershipsData *data; - -#pragma mark - - - -@end - - -@interface PNFetchMembershipsData () - - -#pragma mark - Information - -@property (nonatomic, strong) NSArray *memberships; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNFetchMembershipsData - - -#pragma mark - Information - -- (NSArray *)memberships { - if (!_memberships) { - NSMutableArray *memberships = [NSMutableArray new]; - - for (NSDictionary *membership in self.serviceData[@"memberships"]) { - [memberships addObject:[PNMembership membershipFromDictionary:membership]]; - } - - _memberships = [memberships copy]; - } - - return _memberships; -} - -- (NSUInteger)totalCount { - return ((NSNumber *)self.serviceData[@"totalCount"]).unsignedIntegerValue; -} - -- (NSString *)next { - return self.serviceData[@"next"]; -} - -- (NSString *)prev { - return self.serviceData[@"prev"]; -} - -#pragma mark - - - -@end - - -@implementation PNFetchMembershipsResult - - -#pragma mark - Information - -- (PNFetchMembershipsData *)data { - if (!_data) { - _data = [PNFetchMembershipsData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNFetchMessageActionsResult.h b/PubNub/Data/Service Objects/PNFetchMessageActionsResult.h deleted file mode 100644 index 58ec76e9b..000000000 --- a/PubNub/Data/Service Objects/PNFetchMessageActionsResult.h +++ /dev/null @@ -1,71 +0,0 @@ -#import -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent Message Action API response for \c fetch \c message - * \c actions request. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNFetchMessageActionsData : PNServiceData - - -#pragma mark - Information - -/** - * @brief List of fetched \c messages \c actions. - */ -@property (nonatomic, readonly, strong) NSArray *actions; - -/** - * @brief Fetched \c message \c actions time range start (oldest \c message \c action timetoken). - * - * @note This timetoken can be used as \c start value to fetch older \c message \c actions. - */ -@property (nonatomic, readonly, strong) NSNumber *start; - -/** - * @brief Fetched \c message \c actions time range end (newest \c action timetoken). - */ -@property (nonatomic, readonly, strong) NSNumber *end; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c fetch \c message \c actions - * request results. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNFetchMessageActionsResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c Fetch \c message \c actions request processed information. - */ -@property (nonatomic, readonly, strong) PNFetchMessageActionsData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNFetchMessageActionsResult.m b/PubNub/Data/Service Objects/PNFetchMessageActionsResult.m deleted file mode 100644 index 14dd9b019..000000000 --- a/PubNub/Data/Service Objects/PNFetchMessageActionsResult.m +++ /dev/null @@ -1,96 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNFetchMessageActionsResult.h" -#import "PNOperationResult+Private.h" -#import "PNMessageAction+Private.h" -#import "PNServiceData+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNFetchMessageActionsResult () - - -#pragma mark - Information - -@property (nonatomic, nonnull, strong) PNFetchMessageActionsData *data; - -#pragma mark - - - -@end - - -@interface PNFetchMessageActionsData () - - -#pragma mark - Information - -@property (nonatomic, strong) NSArray *actions; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNFetchMessageActionsData - - -#pragma mark - Information - -- (NSArray *)actions { - if (!_actions) { - NSMutableArray *actions = [NSMutableArray new]; - - for (NSDictionary *action in self.serviceData[@"actions"]) { - [actions addObject:[PNMessageAction actionFromDictionary:action]]; - } - - _actions = [actions copy]; - } - - return _actions; -} - -- (NSNumber *)start { - return self.serviceData[@"start"]; -} - -- (NSNumber *)end { - return self.serviceData[@"end"]; -} - -#pragma mark - - - -@end - - -@implementation PNFetchMessageActionsResult - - -#pragma mark - Information - -- (PNFetchMessageActionsData *)data { - if (!_data) { - _data = [PNFetchMessageActionsData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNFetchUUIDMetadataResult.h b/PubNub/Data/Service Objects/PNFetchUUIDMetadataResult.h deleted file mode 100644 index 7f3035fd2..000000000 --- a/PubNub/Data/Service Objects/PNFetchUUIDMetadataResult.h +++ /dev/null @@ -1,125 +0,0 @@ -#import -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent Objects API response for \c fetch \c UUID \c metadata - * request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchUUIDMetadataData : PNServiceData - - -#pragma mark - Information - -/** - * @brief Requested \c UUID \c metadata object. - */ -@property (nonatomic, nullable, readonly, strong) PNUUIDMetadata *metadata; - -#pragma mark - - - -@end - -/** - * @brief Object which is used to represent Objects API response for \c fetch \c all \c UUID - * \c metadata request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchAllUUIDMetadataData : PNServiceData - - -#pragma mark - Information - -/** - * @brief List of \c UUIDs \c metadata objects created for current subscribe key. - */ -@property (nonatomic, readonly, strong) NSArray *metadata; - -/** - * @brief Cursor bookmark for fetching the next page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *next; - -/** - * @brief Cursor bookmark for fetching the previous page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *prev; - -/** - * @brief Total number of objects created for current subscribe key. - * - * @note Value will be \c 0 in case if \b PNUUIDTotalCountField not added to \c includeFields - * of \b PNFetchAllUUIDMetadataRequest. - */ -@property (nonatomic, readonly, assign) NSUInteger totalCount; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to \c fetch \c UUID \c metadata request response. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchUUIDMetadataResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c Fetch \c UUID \c metadata request processed information. - */ -@property (nonatomic, readonly, strong) PNFetchUUIDMetadataData *data; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to \c fetch \c all \c UUIDs \c metadata request - * response. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchAllUUIDMetadataResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c Fetch \c all \c UUIDs \c metadata request processed information. - */ -@property (nonatomic, readonly, strong) PNFetchAllUUIDMetadataData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNFetchUUIDMetadataResult.m b/PubNub/Data/Service Objects/PNFetchUUIDMetadataResult.m deleted file mode 100644 index 4e706de37..000000000 --- a/PubNub/Data/Service Objects/PNFetchUUIDMetadataResult.m +++ /dev/null @@ -1,164 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNFetchUUIDMetadataResult.h" -#import "PNOperationResult+Private.h" -#import "PNUUIDMetadata+Private.h" -#import "PNServiceData+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNFetchUUIDMetadataResult () - - -#pragma mark - Information - -@property (nonatomic, nonnull, strong) PNFetchUUIDMetadataData *data; - -#pragma mark - - - -@end - - -@interface PNFetchAllUUIDMetadataResult () - - -#pragma mark - Information - -@property (nonatomic, nonnull, strong) PNFetchAllUUIDMetadataData *data; - -#pragma mark - - - -@end - - -@interface PNFetchUUIDMetadataData () - - -#pragma mark - Information - -@property (nonatomic, nullable, strong) PNUUIDMetadata *metadata; - -#pragma mark - - - -@end - - -@interface PNFetchAllUUIDMetadataData () - - -#pragma mark - Information - -@property (nonatomic, strong) NSArray *metadata; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNFetchUUIDMetadataData - - -#pragma mark - Information - -- (PNUUIDMetadata *)metadata { - if (!_metadata) { - _metadata = [PNUUIDMetadata uuidMetadataFromDictionary:self.serviceData[@"uuid"]]; - } - - return _metadata; -} - -#pragma mark - - - -@end - - -@implementation PNFetchAllUUIDMetadataData - - -#pragma mark - Information - -- (NSArray *)metadata { - if (!_metadata) { - NSMutableArray *uuidsMetadata = [NSMutableArray new]; - - for (NSDictionary *metadata in self.serviceData[@"uuids"]) { - [uuidsMetadata addObject:[PNUUIDMetadata uuidMetadataFromDictionary:metadata]]; - } - - _metadata = [uuidsMetadata copy]; - } - - return _metadata; -} - -- (NSUInteger)totalCount { - return ((NSNumber *)self.serviceData[@"totalCount"]).unsignedIntegerValue; -} - -- (NSString *)next { - return self.serviceData[@"next"]; -} - -- (NSString *)prev { - return self.serviceData[@"prev"]; -} - -#pragma mark - - - -@end - - -@implementation PNFetchUUIDMetadataResult - - -#pragma mark - Information - -- (PNFetchUUIDMetadataData *)data { - if (!_data) { - _data = [PNFetchUUIDMetadataData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end - - -@implementation PNFetchAllUUIDMetadataResult - - -#pragma mark - Information - -- (PNFetchAllUUIDMetadataData *)data { - if (!_data) { - _data = [PNFetchAllUUIDMetadataData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNGenerateFileUploadURLStatus.h b/PubNub/Data/Service Objects/PNGenerateFileUploadURLStatus.h deleted file mode 100644 index cdcad20c5..000000000 --- a/PubNub/Data/Service Objects/PNGenerateFileUploadURLStatus.h +++ /dev/null @@ -1,80 +0,0 @@ -#import "PNAcknowledgmentStatus.h" -#import "PNServiceData.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent Files API response for \c upload \c file \c URL - * request. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNGenerateFileUploadURLData : PNServiceData - - -#pragma mark - Information - -/** - * @brief List of form-fields which should be prepended to user data in request body. - * - * @note \c multipart/form-data Content-Type will be set in case if any fields is present in array. - */ -@property (nonatomic, nullable, readonly, strong) NSArray *formFields; - -/** - * @brief Unique file identifier. - */ -@property (nonatomic, nullable, readonly, strong) NSString *fileIdentifier; - -/** - * @brief HTTP method which should be used during file upload request. - */ -@property (nonatomic, nullable, readonly, strong) NSString *httpMethod; - -/** - * @brief Name which will be used to store user data on server. - */ -@property (nonatomic, nullable, readonly, strong) NSString *filename; - -/** - * @brief URL which should be used to upload user data. - */ -@property (nonatomic, nullable, readonly, strong) NSURL *requestURL; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c upload \c file \c URL request - * results. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNGenerateFileUploadURLStatus : PNAcknowledgmentStatus - - -#pragma mark - Information - -/** - * @brief \c Fetch \c members request processed information. - */ -@property (nonatomic, readonly, strong) PNGenerateFileUploadURLData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNGenerateFileUploadURLStatus.m b/PubNub/Data/Service Objects/PNGenerateFileUploadURLStatus.m deleted file mode 100644 index 63abb4ad5..000000000 --- a/PubNub/Data/Service Objects/PNGenerateFileUploadURLStatus.m +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNGenerateFileUploadURLStatus.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interface declaration - -@interface PNGenerateFileUploadURLStatus () - - -#pragma mark - Information - -@property (nonatomic, nonnull, strong) PNGenerateFileUploadURLData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNGenerateFileUploadURLData - - -#pragma mark - Information - -- (NSArray *)formFields { - return self.serviceData[@"request"][@"formFields"]; -} - -- (NSString *)fileIdentifier { - return self.serviceData[@"file"][@"identifier"]; -} - -- (NSString *)httpMethod { - return self.serviceData[@"request"][@"method"]; -} - -- (NSString *)filename { - return self.serviceData[@"file"][@"name"]; -} - -- (NSURL *)requestURL { - return [NSURL URLWithString:self.serviceData[@"request"][@"url"]]; -} - -#pragma mark - - - -@end - -@implementation PNGenerateFileUploadURLStatus - - -#pragma mark - Information - -- (PNGenerateFileUploadURLData *)data { - if (!_data) { - _data = [PNGenerateFileUploadURLData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNHistoryResult.h b/PubNub/Data/Service Objects/PNHistoryResult.h deleted file mode 100644 index cda2cf366..000000000 --- a/PubNub/Data/Service Objects/PNHistoryResult.h +++ /dev/null @@ -1,83 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent History API response for \c channel(s) request. - * - * @author Sergey Mamontov - * @version 4.11.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNHistoryData : PNServiceData - - -#pragma mark - Information - -/** - * @brief Channel history messages. - * - * @note Set only for \c PNHistoryOperation operation and will be \c empty array for other operation - * types. - */ -@property (nonatomic, readonly, strong) NSArray *messages; - -/** - * @brief Channels history. - * - * @discussion Each key represent name of \c channel for which messages has been received and values - * is list of messages from channel's storage. - * - * @note For \c PNHistoryOperation operation this property always will be \c empty dictionary. - * - * @since 4.5.6 - */ -@property (nonatomic, readonly, strong) NSDictionary *channels; - -/** - * @brief Fetched history time frame start time. - * - * @note Set only for \c PNHistoryOperation operation and will be \b 0 for other operation types. - */ -@property (nonatomic, readonly, strong) NSNumber *start; - -/** - * @brief Fetched history time frame end time. - * - * @note Set only for \c PNHistoryOperation operation and will be \b 0 for other operation types. - */ -@property (nonatomic, readonly, strong) NSNumber *end; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c fetch \c history request results. - * - * @author Serhii Mamontov - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNHistoryResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c Fetch \c history request processed information. - */ -@property (nonatomic, readonly, strong) PNHistoryData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNHistoryResult.m b/PubNub/Data/Service Objects/PNHistoryResult.m deleted file mode 100644 index 5a0009d8a..000000000 --- a/PubNub/Data/Service Objects/PNHistoryResult.m +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @author Serhii Mamontov - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNHistoryResult.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" -#import "PNStructures.h" - - -#pragma mark Private interface declaration - -@interface PNHistoryResult () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNHistoryData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interfaces implementation - -@implementation PNHistoryData - - -#pragma mark - Information - -- (NSArray *)messages { - return self.serviceData[@"messages"] ?: @[]; -} - -- (NSDictionary *)channels { - return self.serviceData[@"channels"] ?: @{}; -} - -- (NSNumber *)start { - return self.serviceData[@"start"] ?: @0; -} - -- (NSNumber *)end { - return self.serviceData[@"end"] ?: @0; -} - -#pragma mark - - - -@end - - -@implementation PNHistoryResult - - -#pragma mark - Information - -- (PNHistoryData *)data { - if (!_data) { - _data = [PNHistoryData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNListFilesResult.h b/PubNub/Data/Service Objects/PNListFilesResult.h deleted file mode 100644 index 159e034db..000000000 --- a/PubNub/Data/Service Objects/PNListFilesResult.h +++ /dev/null @@ -1,67 +0,0 @@ -#import -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent Files API response for \c list \c files request. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNListFilesData : PNServiceData - - -#pragma mark - Information - -/** - * @brief List of channel \c files. - */ -@property (nonatomic, nullable, readonly, strong) NSArray *files; - -/** - * @brief Cursor bookmark for fetching the next page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *next; - -/** - * @brief How many \c files has been returned. - */ -@property (nonatomic, readonly, assign) NSUInteger count; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c list \c files request results. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNListFilesResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c List \c files request processed information. - */ -@property (nonatomic, readonly, strong) PNListFilesData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNListFilesResult.m b/PubNub/Data/Service Objects/PNListFilesResult.m deleted file mode 100644 index 0dcd34e4c..000000000 --- a/PubNub/Data/Service Objects/PNListFilesResult.m +++ /dev/null @@ -1,96 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNServiceData+Private.h" -#import "PNOperationResult+Private.h" -#import "PNListFilesResult.h" -#import "PNFile+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNListFilesResult () - - -#pragma mark - Information - -@property (nonatomic, strong) PNListFilesData *data; - -#pragma mark - - - -@end - - -@interface PNListFilesData () - - -#pragma mark - Information - -@property (nonatomic, strong) NSArray *files; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNListFilesData - - -#pragma mark - Information - -- (NSArray *)files { - if (!_files) { - NSMutableArray *files = [NSMutableArray new]; - - for (NSDictionary *file in self.serviceData[@"files"]) { - [files addObject:[PNFile fileFromDictionary:file]]; - } - - _files = [files copy]; - } - - return _files; -} - -- (NSUInteger)count { - return ((NSNumber *)self.serviceData[@"count"]).unsignedIntegerValue; -} - -- (NSString *)next { - return self.serviceData[@"next"]; -} - -#pragma mark - - - -@end - - -@implementation PNListFilesResult - - -#pragma mark - Information - -- (PNListFilesData *)data { - if (!_data) { - _data = [PNListFilesData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNManageChannelMembersStatus.h b/PubNub/Data/Service Objects/PNManageChannelMembersStatus.h deleted file mode 100644 index fe80820d6..000000000 --- a/PubNub/Data/Service Objects/PNManageChannelMembersStatus.h +++ /dev/null @@ -1,78 +0,0 @@ -#import -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent Objects API response for \c members \c set / - * \c remove / \c manage request. - * - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNManageChannelMembersData : PNServiceData - - -#pragma mark - Information - -/** - * @brief List of existing \c members. - */ -@property (nonatomic, readonly, strong) NSArray *members; - -/** - * @brief Cursor bookmark for fetching the next page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *next; - -/** - * @brief Cursor bookmark for fetching the previous page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *prev; - -/** - * @brief Total number of existing objects. - * - * @note Value will be \c 0 in case if \b PNChannelMembersTotalCountField not added to - * \c includeFields of \b PNSetChannelMembersRequest / \b PNRemoveChannelMembersRequest / - * \b PNManageChannelMembersRequest or \b PNFetchChannelMembersRequest. - */ -@property (nonatomic, readonly, assign) NSUInteger totalCount; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c members \c set / - * \c remove / \c manage request results. - * - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNManageChannelMembersStatus : PNAcknowledgmentStatus - - -#pragma mark - Information - -/** - * @brief \c Members \c set / \c remove / \c manage request processed information. - */ -@property (nonatomic, readonly, strong) PNManageChannelMembersData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNManageChannelMembersStatus.m b/PubNub/Data/Service Objects/PNManageChannelMembersStatus.m deleted file mode 100644 index 7d3b019c6..000000000 --- a/PubNub/Data/Service Objects/PNManageChannelMembersStatus.m +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNManageChannelMembersStatus.h" -#import "PNOperationResult+Private.h" -#import "PNChannelMember+Private.h" -#import "PNServiceData+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNManageChannelMembersStatus () - - -#pragma mark - Information - -@property (nonatomic, nonnull, strong) PNManageChannelMembersData *data; - -#pragma mark - - - -@end - - -@interface PNManageChannelMembersData () - - -#pragma mark - Information - -@property (nonatomic, strong) NSArray *members; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNManageChannelMembersData - - -#pragma mark - Information - -- (NSArray *)members { - if (!_members) { - NSMutableArray *members = [NSMutableArray new]; - - for (NSDictionary *member in self.serviceData[@"members"]) { - [members addObject:[PNChannelMember memberFromDictionary:member]]; - } - - _members = [members copy]; - } - - return _members; -} - -- (NSUInteger)totalCount { - return ((NSNumber *)self.serviceData[@"totalCount"]).unsignedIntegerValue; -} - -- (NSString *)next { - return self.serviceData[@"next"]; -} - -- (NSString *)prev { - return self.serviceData[@"prev"]; -} - -#pragma mark - - - -@end - - -@implementation PNManageChannelMembersStatus - - -#pragma mark - Information - -- (PNManageChannelMembersData *)data { - if (!_data) { - _data = [PNManageChannelMembersData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNManageMembershipsStatus.h b/PubNub/Data/Service Objects/PNManageMembershipsStatus.h deleted file mode 100644 index a09c166a9..000000000 --- a/PubNub/Data/Service Objects/PNManageMembershipsStatus.h +++ /dev/null @@ -1,79 +0,0 @@ -#import -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent Objects API response for \c memberships - * \c set / \c remove / \c manage request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNManageMembershipsData : PNServiceData - - -#pragma mark - Information - -/** - * @brief List of existing \c memberships. - */ -@property (nonatomic, readonly, strong) NSArray *memberships; - -/** - * @brief Cursor bookmark for fetching the next page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *next; - -/** - * @brief Cursor bookmark for fetching the previous page. - */ -@property (nonatomic, nullable, readonly, strong) NSString *prev; - -/** - * @brief Total number of existing objects. - * - * @note Value will be \c 0 in case if \b PNMembershipsTotalCountField not added to \c includeFields - * of \b PNSetMembershipsRequest / \b PNRemoveMembershipsRequest / \b PNManageMembershipsRequest or - * \b PNFetchMembershipsRequest. - */ -@property (nonatomic, readonly, assign) NSUInteger totalCount; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c memberships - * \c set / \c remove / \c manage request - * results. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNManageMembershipsStatus : PNAcknowledgmentStatus - - -#pragma mark - Information - -/** - * @brief \c Memberships \c set / \c remove / \c manage request processed information. - */ -@property (nonatomic, readonly, strong) PNManageMembershipsData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNManageMembershipsStatus.m b/PubNub/Data/Service Objects/PNManageMembershipsStatus.m deleted file mode 100644 index 850a1c9db..000000000 --- a/PubNub/Data/Service Objects/PNManageMembershipsStatus.m +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNManageMembershipsStatus.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" -#import "PNMembership+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNManageMembershipsStatus () - - -#pragma mark - Information - -@property (nonatomic, nonnull, strong) PNManageMembershipsData *data; - -#pragma mark - - - -@end - - -@interface PNManageMembershipsData () - - -#pragma mark - Information - -@property (nonatomic, strong) NSArray *memberships; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNManageMembershipsData - - -#pragma mark - Information - -- (NSArray *)memberships { - if (!_memberships) { - NSMutableArray *memberships = [NSMutableArray new]; - - for (NSDictionary *membership in self.serviceData[@"memberships"]) { - [memberships addObject:[PNMembership membershipFromDictionary:membership]]; - } - - _memberships = [memberships copy]; - } - - return _memberships; -} - -- (NSUInteger)totalCount { - return ((NSNumber *)self.serviceData[@"totalCount"]).unsignedIntegerValue; -} - -- (NSString *)next { - return self.serviceData[@"next"]; -} - -- (NSString *)prev { - return self.serviceData[@"prev"]; -} - -#pragma mark - - - -@end - - -@implementation PNManageMembershipsStatus - - -#pragma mark - Information - -- (PNManageMembershipsData *)data { - if (!_data) { - _data = [PNManageMembershipsData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNMessageCountResult.h b/PubNub/Data/Service Objects/PNMessageCountResult.h deleted file mode 100644 index 0e288f5de..000000000 --- a/PubNub/Data/Service Objects/PNMessageCountResult.h +++ /dev/null @@ -1,60 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Class which allow to get access to channel history processed result. - * - * @since 4.8.4 - * - * @author Sergey Mamontov - * @version 4.8.3 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNMessageCountData : PNServiceData - - -#pragma mark Information - -/** - * @brief Dictionary where each key is name of channel and value is number of messages in it. - */ -@property (nonatomic, readonly, strong) NSDictionary *channels; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Get number of messages passed-in channels. - * - * @since 4.8.4 - * - * @author Sergey Mamontov - * @version 4.8.3 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNMessageCountResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief Message count request processing information. - */ -@property (nonatomic, readonly, strong) PNMessageCountData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNMessageCountResult.m b/PubNub/Data/Service Objects/PNMessageCountResult.m deleted file mode 100644 index c2ad0233b..000000000 --- a/PubNub/Data/Service Objects/PNMessageCountResult.m +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @since 4.8.4 - * - * @author Sergey Mamontov - * @version 4.8.3 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNMessageCountResult.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark Interface implementation - -@implementation PNMessageCountData - - -#pragma mark - Information - -- (NSDictionary *)channels { - - return (self.serviceData[@"channels"] ?: @{}); -} - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNMessageCountResult () - - -#pragma mark - Information - -@property (nonatomic, strong) PNMessageCountData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNMessageCountResult - - -#pragma mark - Information - -- (PNMessageCountData *)data { - - if (!_data) { - _data = [PNMessageCountData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNOperationResult+Private.h b/PubNub/Data/Service Objects/PNOperationResult+Private.h index 206cf0cc1..7f7c43c9a 100644 --- a/PubNub/Data/Service Objects/PNOperationResult+Private.h +++ b/PubNub/Data/Service Objects/PNOperationResult+Private.h @@ -1,4 +1,5 @@ #import "PNOperationResult.h" +#import #import "PNStructures.h" @@ -6,86 +7,89 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Private interface declaration -/// Service response representation object private extension. +/// General operation (request or client generated) result object private extension. @interface PNOperationResult (Private) -#pragma mark - Information +#pragma mark - Properties -@property (nonatomic, assign) NSInteger statusCode; -@property (nonatomic, assign) PNOperationType operation; -@property (nonatomic, assign, getter = isTLSEnabled) BOOL TLSEnabled; +/// Class which should be used to deserialize ``responseData``. +@property(class, strong, nonatomic, readonly) Class responseDataClass; -/// Whether unexpected service data has been passed from parsers. -@property (nonatomic, assign, getter = isUnexpectedServiceData) BOOL unexpectedServiceData; -@property (nonatomic, copy) NSString *uuid - DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next major update. Please use `userID` " - "instead."); -@property (nonatomic, copy) NSString *userID; -@property (nonatomic, nullable, copy) NSString *authKey; -@property (nonatomic, copy) NSString *origin; -@property (nonatomic, nullable, copy) NSURLRequest *clientRequest; +/// Processed service response data object. +@property(strong, nullable, nonatomic) id responseData; -/// Processed `response` which is ready to use by user. -/// -/// Content and format for this property different for API. Each method has description about expected fields and data -/// stored inside. -@property (nonatomic, nullable, copy) NSDictionary *serviceData; +/// Type of operation for which result object has been created. +@property(assign, nonatomic) PNOperationType operation; -#pragma mark - Initialization and configuration +#pragma mark - Properties (deprecated) -/// Create result instance in response to successful task completion. -/// -/// - Parameters: -/// - operation: One of the `PNOperationType` enum fields to describe what kind of operation has been processed. -/// - task: Reference on data task which has been used to communicate with **PubNub** network. -/// - processedData: Reference on data which has been loaded and pre-processed by corresponding parser. -/// - error: Reference on request processing error. -/// - Returns: Initialized service response instance. -+ (instancetype)objectForOperation:(PNOperationType)operation - completedWithTask:(nullable NSURLSessionDataTask *)task - processedData:(nullable NSDictionary *)processedData - processingError:(nullable NSError *)error; - -/// Initialize result instance in response to successful task completion. +/// Whether secured connection has been used to send request or not. +@property(assign, nonatomic, getter = isTLSEnabled) BOOL TLSEnabled + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); + +/// Copy of the original request which has been used to fetch or push data to **PubNub** network. /// -/// - Parameters: -/// - operation: One of the `PNOperationType` enum fields to describe what kind of operation has been processed. -/// - task: Reference on data task which has been used to communicate with **PubNub** network. -/// - processedData: Reference on data which has been loaded and pre-processed by corresponding parser. -/// - error: Reference on request processing error. -/// - Returns: Initialized service response instance. -- (instancetype)initForOperation:(PNOperationType)operation - completedWithTask:(nullable NSURLSessionDataTask *)task - processedData:(nullable NSDictionary *)processedData - processingError:(nullable NSError *)error; - -/// Make copy of current result object with mutated data which should be stored in it. +/// > Important: This information not available anymore because property has been deprecated. +@property (copy, nonatomic, nullable) NSURLRequest *clientRequest + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update."); + +/// Authorisation key / token which is used to get access to protected remote resources. /// -/// > Note: Method can be used to create sub-events (for example one for each message or presence event). +/// Some resources can be protected by **PAM** functionality and access done using this authorisation key. +@property (copy, nonatomic, nullable) NSString *authKey + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); + +/// **PubNub** network host name or IP address against which `request` has been called. +@property (copy, nullable, nonatomic) NSString *origin + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); + +/// UUID which is currently used by client to identify user in **PubNub** network. +@property(copy, nullable, nonatomic) NSString *userID + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); + +/// HTTP status code with which `request` completed processing with **PubNub** service. +@property(assign, nonatomic) NSInteger statusCode + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update."); + + +#pragma mark - Initialization and Configuration + +/// Create operation result object. /// -/// - Parameter data: Reference on data which should be stored within new instance. -/// - Returns: Copy of receiver with modified data. -- (instancetype)copyWithMutatedData:(nullable id)data; +/// - Parameters: +/// - operation: Type of operation for which result object has been created. +/// - response: Processed operation outcome data object. +/// - Returns: Ready to use operation result object. ++ (instancetype)objectWithOperation:(PNOperationType)operation response:(nullable id)response; -/// Update data stored for result object. +/// Initialized operation result object. /// -/// - Parameter data: New data which should be placed into result object. -- (void)updateData:(nullable id)data; +/// - Parameters: +/// - operation: Type of operation for which result object has been created. +/// - response: Processed operation outcome data object. +/// - Returns: Initialized operation result object. +- (instancetype)initWithOperation:(PNOperationType)operation response:(nullable id)response; -#pragma mark - Helpers +#pragma mark - Misc -/// Convert result object to dictionary which can be used to print out structured data. +/// Convert result object to dictionary which can be used to print out structured data /// -/// - Returns: Object in dictionary representation. -- (NSDictionary *)dictionaryRepresentation; +/// - Parameter serializer: Data object serializer. +/// - Returns: Dictionary object representation. +- (NSDictionary *)dictionaryRepresentationWithSerializer:(nullable id)serializer; -/// Convert result object to string which can be used to print out data +/// Convert result object into string which can be used to print out data. /// -/// - Returns: Stringified object representation. -- (NSString *)stringifiedRepresentation; +/// - Parameter serializer: Data object serializer. +/// - Returns: Stringified representation. +- (NSString *)stringifiedRepresentationWithSerializer:(nullable id)serializer; #pragma mark - diff --git a/PubNub/Data/Service Objects/PNOperationResult.h b/PubNub/Data/Service Objects/PNOperationResult.h index 8f46ae6f5..3b2259efe 100644 --- a/PubNub/Data/Service Objects/PNOperationResult.h +++ b/PubNub/Data/Service Objects/PNOperationResult.h @@ -6,51 +6,61 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/// Server response representation object. +/// General operation (request or client generated) result object. /// -/// This object contains response itself and also set of data which has been used to communicate with **PubNub** service -/// to get this response. -/// -/// - Since: 4.0.0 -/// - Copyright: 2010-2023 PubNub, Inc. +/// Object contain information about type of operation and its outcome (processed data object). @interface PNOperationResult: NSObject -#pragma mark - Information +#pragma mark - Properties -/// HTTP status code with which `request` completed processing with **PubNub** service. -@property (nonatomic, readonly, assign) NSInteger statusCode; +/// Stringify request operation type. +/// +/// Stringify request `operation` field (one of the `PNOperationType` enum). +@property(strong, nonatomic, readonly) NSString *stringifiedOperation; -/// Represent type of operation which has been issued to **PubNub** service and received response stored in `response` -/// and processed response in `data`. -@property (nonatomic, readonly, assign) PNOperationType operation; +/// Type of operation for which result object has been created. +@property(assign, nonatomic, readonly) PNOperationType operation; -/// Whether secured connection has been used to send request or not. -@property (nonatomic, readonly, assign, getter = isTLSEnabled) BOOL TLSEnabled; -/// UUID which is currently used by client to identify user in **PubNub** network. -@property (nonatomic, readonly, copy) NSString *uuid - DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next major update. Please use `userID` " - "instead."); +#pragma mark - Properties (deprecated) -/// UUID which is currently used by client to identify user in **PubNub** network. -@property (nonatomic, readonly, copy) NSString *userID; +/// Whether secured connection has been used to send request or not. +@property(assign, nonatomic, readonly, getter = isTLSEnabled) BOOL TLSEnabled + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); + +/// Copy of the original request which has been used to fetch or push data to **PubNub** network. +/// +/// > Important: This information not available anymore because property has been deprecated. +@property (copy, nonatomic, nullable, readonly) NSURLRequest *clientRequest + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update."); /// Authorisation key / token which is used to get access to protected remote resources. /// /// Some resources can be protected by **PAM** functionality and access done using this authorisation key. -@property (nonatomic, nullable, readonly, copy) NSString *authKey; +@property (copy, nonatomic, nullable, readonly) NSString *authKey + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); /// **PubNub** network host name or IP address against which `request` has been called. -@property (nonatomic, readonly, copy) NSString *origin; +@property (copy, nullable, nonatomic, readonly) NSString *origin + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); -/// Copy of the original request which has been used to fetch or push data to **PubNub** network. -@property (nonatomic, nullable, readonly, copy) NSURLRequest *clientRequest; +/// UUID which is currently used by client to identify user in **PubNub** network. +@property(copy, nullable, nonatomic, readonly) NSString *userID + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); -/// Stringify operation value. -/// -/// - Returns: Stringified representation for `operation` property which store value from the `PNOperationType` enum. -- (NSString *)stringifiedOperation; +/// UUID which is currently used by client to identify user in **PubNub** network. +@property(copy, nullable, nonatomic, readonly) NSString *uuid + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); + +/// HTTP status code with which `request` completed processing with **PubNub** service. +@property(assign, nonatomic, readonly) NSInteger statusCode + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. "); #pragma mark - diff --git a/PubNub/Data/Service Objects/PNOperationResult.m b/PubNub/Data/Service Objects/PNOperationResult.m index ca34a77b6..93c742d2d 100644 --- a/PubNub/Data/Service Objects/PNOperationResult.m +++ b/PubNub/Data/Service Objects/PNOperationResult.m @@ -1,50 +1,57 @@ #import "PNOperationResult+Private.h" #import "PNPrivateStructures.h" -#import "PNStatus.h" -#import "PNJSON.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration -/// Service response representation object private extension. -@interface PNOperationResult () +/// General operation (request or client generated) result object private extension. +@interface PNOperationResult () -#pragma mark - Information +#pragma mark - Properties -@property (nonatomic, assign) NSInteger statusCode; -@property (nonatomic, assign) PNOperationType operation; -@property (nonatomic, assign, getter = isTLSEnabled) BOOL TLSEnabled; -@property (nonatomic, assign, getter = isUnexpectedServiceData) BOOL unexpectedServiceData; -@property (nonatomic, copy) NSString *uuid - DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next major update. Please use `userID` " - "instead."); -@property (nonatomic, copy) NSString *userID; -@property (nonatomic, nullable, copy) NSString *authKey; -@property (nonatomic, copy) NSString *origin; -@property (nonatomic, nullable, copy) NSURLRequest *clientRequest; -@property (nonatomic, nullable, copy) NSDictionary *serviceData; +/// Processed operation outcome data object. +@property(strong, nullable, nonatomic) id responseData; +/// Type of operation for which result object has been created. +@property(assign, nonatomic) PNOperationType operation; -#pragma mark - Helpers -/// Create instance copy with additional adjustments on whether service data information should be copied or not. -/// -/// - Parameter shouldCopyServiceData: Whether service data should be passed to new copy or not. -/// - Returns: Receiver's new copy. -- (id)copyWithServiceData:(BOOL)shouldCopyServiceData; +#pragma mark - Properties (deprecated) + +/// Whether secured connection has been used to send request or not. +@property(assign, nonatomic, getter = isTLSEnabled) BOOL TLSEnabled + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); -/// Ensure what passed `serviceData` has required data type (dictionary). If `serviceData` has different data type, it -/// will be wrapped into dictionary. +/// Copy of the original request which has been used to fetch or push data to **PubNub** network. /// -/// If unexpected data type will be passes, object will set corresponding flag, so it will be processed and printed out -/// to log file for further investigation. +/// > Important: This information not available anymore because property has been deprecated. +@property(copy, nonatomic, nullable) NSURLRequest *clientRequest +DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update."); + +/// Authorisation key / token which is used to get access to protected remote resources. /// -/// - Parameter serviceData: Reference on data which should be verified and used for resulting object. -/// - Returns: `Normalized` service data dictionary. -- (NSDictionary *)normalizedServiceData:(nullable id)serviceData; +/// Some resources can be protected by **PAM** functionality and access done using this authorisation key. +@property(copy, nonatomic, nullable) NSString *authKey +DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); + +/// **PubNub** network host name or IP address against which `request` has been called. +@property(copy, nullable, nonatomic) NSString *origin + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); + +/// UUID which is currently used by client to identify user in **PubNub** network. +@property(copy, nullable, nonatomic) NSString *userID + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. The actual value" + " can be retrieved from the client configuration object (`PNConfiguration`)."); + +/// HTTP status code with which `request` completed processing with **PubNub** service. +@property(assign, nonatomic) NSInteger statusCode + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update."); #pragma mark - @@ -54,144 +61,96 @@ - (NSDictionary *)normalizedServiceData:(nullable id)serviceData; NS_ASSUME_NONNULL_END -#pragma mark Interface implementation +#pragma mark - Interface implementation @implementation PNOperationResult -#pragma mark - Information +#pragma mark - Properties - (NSString *)stringifiedOperation { return self.operation >= PNSubscribeOperation ? PNOperationTypeStrings[self.operation] : @"Unknown"; } +#pragma mark - Propeties (deprecated) + +- (NSString *)uuid { + return self.userID; +} + + #pragma mark - Initialization and Configuration -+ (instancetype)objectForOperation:(PNOperationType)operation - completedWithTask:(NSURLSessionDataTask *)task - processedData:(NSDictionary *)processedData - processingError:(NSError *)error { - return [[self alloc] initForOperation:operation - completedWithTask:task - processedData:processedData - processingError:error]; ++ (instancetype)objectWithOperation:(PNOperationType)operation response:(id)response { + return [[self alloc] initWithOperation:operation response:response]; } -- (instancetype)initForOperation:(PNOperationType)operation - completedWithTask:(NSURLSessionDataTask *)task - processedData:(NSDictionary *)processedData - processingError:(NSError *)__unused error { +- (instancetype)initWithOperation:(PNOperationType)operation response:(id)response { if ((self = [super init])) { - _statusCode = (task ? ((NSHTTPURLResponse *)task.response).statusCode : 200); + _responseData = response; _operation = operation; - _clientRequest = [task.currentRequest copy]; - - if ([processedData[@"status"] isKindOfClass:[NSNumber class]]) { - NSMutableDictionary *dataForUpdate = [processedData mutableCopy]; - NSNumber *statusCode = [dataForUpdate[@"status"] copy]; - [dataForUpdate removeObjectForKey:@"status"]; - processedData = [dataForUpdate copy]; - _statusCode = (([statusCode integerValue] > 200) ? [statusCode integerValue] : _statusCode); - } else if (processedData && ![processedData isKindOfClass:[NSDictionary class]]) { - _unexpectedServiceData = YES; - processedData = [self normalizedServiceData:processedData]; - } - _serviceData = [processedData copy]; } return self; } - (id)copyWithZone:(NSZone *)zone { - return [self copyWithServiceData:YES]; -} - -- (instancetype)copyWithMutatedData:(id)data { - PNOperationResult *result = [self copyWithServiceData:NO]; - [result updateData:data]; - - return result; -} - -- (void)updateData:(id)data { - _serviceData = [[self normalizedServiceData:data] copy]; - _unexpectedServiceData = ![_serviceData isEqual:data]; -} - - -#pragma mark - Helpers - -- (id)copyWithServiceData:(BOOL)shouldCopyServiceData { - PNOperationResult *result = [[self class] new]; - result.statusCode = self.statusCode; - result.operation = self.operation; - result.TLSEnabled = self.isTLSEnabled; + PNOperationResult *result = [[[self class] allocWithZone:zone] initWithOperation:self.operation + response:self.responseData]; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" - result.uuid = self.uuid; -#pragma clang diagnostic pop + result.statusCode = self.statusCode; + result.TLSEnabled = self.isTLSEnabled; result.userID = self.userID; result.authKey = self.authKey; result.origin = self.origin; result.clientRequest = self.clientRequest; - if (shouldCopyServiceData) { - - [result updateData:self.serviceData]; - } - - return result; -} +#pragma clang diagnostic pop -- (NSDictionary *)normalizedServiceData:(id)serviceData { - NSDictionary *normalizedServiceData = serviceData ?: @{}; - - if (serviceData && ![serviceData isKindOfClass:[NSDictionary class]]) { - normalizedServiceData = @{@"information": serviceData}; - } - - return normalizedServiceData; -} + return self; -- (NSMethodSignature *)methodSignatureForSelector:(SEL)__unused selector { - return [[self class] instanceMethodSignatureForSelector:@selector(doNothing)]; } -- (void)forwardInvocation:(NSInvocation *)__unused invocation { -} -- (void)doNothing { -} +#pragma mark - Misc -- (NSDictionary *)dictionaryRepresentation { - id processedData = ([self.serviceData mutableCopy]?: @"no data"); +- (NSDictionary *)dictionaryRepresentationWithSerializer:(id)serializer { + id processedData = self.responseData; - if (self.serviceData[@"envelope"]) { - processedData[@"envelope"] = [self.serviceData[@"envelope"] valueForKey:@"dictionaryRepresentation"]; + if (serializer) { + NSError *err; + NSData *serializedData = [serializer dataOfClass:[NSDictionary class] fromObject:processedData withError:&err]; + NSDictionary *serializedDictionary = [serializer.jsonSerializer JSONObjectWithData:serializedData error:&err]; + if (serializedDictionary) processedData = serializedDictionary; } - - NSMutableDictionary *response = [@{@"Status code": @(self.statusCode), - @"Processed data": processedData - } mutableCopy]; - if (_unexpectedServiceData) response[@"Unexpected"] = @(YES); - - return @{@"Operation": PNOperationTypeStrings[[self operation]], - @"Request": @{@"Method": (self.clientRequest.HTTPMethod ?: @"GET"), - @"URL": ([self.clientRequest.URL absoluteString] ?: @"null"), - @"POST Body size": [self.clientRequest valueForHTTPHeaderField:@"content-length"] ?: @0, - @"Secure": (self.isTLSEnabled ? @"YES" : @"NO"), - @"User ID": (self.userID?: @"unknown"), - @"Authorization": (self.authKey?: @"not set"), - @"Origin": (self.origin?: @"unknown")}, - @"Response": response}; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + NSMutableDictionary *response = [@{ + @"Status code": @(self.statusCode), + @"Processed data": processedData + } mutableCopy]; + + return @{@"Operation": PNOperationTypeStrings[self.operation], + @"Request": @{ + @"Method": self.clientRequest.HTTPMethod ?: @"GET", + @"URL": [self.clientRequest.URL absoluteString] ?: @"null", + @"POST Body size": [self.clientRequest valueForHTTPHeaderField:@"content-length"] ?: @0, + @"Secure": (self.isTLSEnabled ? @"YES" : @"NO"), + @"UUID": (self.uuid?: @"unknown"), + @"Authorization": (self.authKey?: @"not set"), + @"Origin": (self.origin?: @"unknown") + }, + @"Response": response + }; +#pragma clang diagnostic pop } -- (NSString *)stringifiedRepresentation { - return [PNJSON JSONStringFrom:[self dictionaryRepresentation] withError:NULL]; -} +- (NSString *)stringifiedRepresentationWithSerializer:(id)serializer { + NSDictionary *dictionary = [self dictionaryRepresentationWithSerializer:serializer]; + NSData *dictinaryData = [serializer.jsonSerializer dataWithJSONObject:dictionary error:nil]; -- (NSString *)debugDescription { - return [[self dictionaryRepresentation] description]; + return [[NSString alloc] initWithData:dictinaryData encoding:NSUTF8StringEncoding]; } #pragma mark - diff --git a/PubNub/Data/Service Objects/PNPresenceChannelGroupHereNowResult.h b/PubNub/Data/Service Objects/PNPresenceChannelGroupHereNowResult.h deleted file mode 100644 index 91e777fda..000000000 --- a/PubNub/Data/Service Objects/PNPresenceChannelGroupHereNowResult.h +++ /dev/null @@ -1,43 +0,0 @@ -#import - - -/** - * @brief Class which allow to get access to channel groups presence processed result. - * - * @author Serhii Mamontov - * @version 4.15.8 - * @since 4.0.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNPresenceChannelGroupHereNowData : PNPresenceGlobalHereNowData - - -#pragma mark - - - -@end - - -/** - * @brief Class which is used to provide access to request processing results. - * - * @author Serhii Mamontov - * @version 4.15.8 - * @since 4.0.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNPresenceChannelGroupHereNowResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief Stores reference on channel group presence request processing information. - */ -@property (nonatomic, nonnull, readonly, strong) PNPresenceChannelGroupHereNowData *data; - - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNPresenceChannelGroupHereNowResult.m b/PubNub/Data/Service Objects/PNPresenceChannelGroupHereNowResult.m deleted file mode 100644 index a077749f4..000000000 --- a/PubNub/Data/Service Objects/PNPresenceChannelGroupHereNowResult.m +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.8 - * @since 4.0.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNPresenceChannelGroupHereNowResult.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark Interface implementation - -@implementation PNPresenceChannelGroupHereNowData - - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNPresenceChannelGroupHereNowResult () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNPresenceChannelGroupHereNowData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNPresenceChannelGroupHereNowResult - - -#pragma mark - Information - -- (PNPresenceChannelGroupHereNowData *)data { - if (!_data) { - _data = [PNPresenceChannelGroupHereNowData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNPresenceChannelHereNowResult.h b/PubNub/Data/Service Objects/PNPresenceChannelHereNowResult.h deleted file mode 100644 index f1e49de72..000000000 --- a/PubNub/Data/Service Objects/PNPresenceChannelHereNowResult.h +++ /dev/null @@ -1,80 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Class which allow to get access to channel presence processed result. - * - * @author Serhii Mamontov - * @version 4.15.8 - * @since 4.0.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNPresenceChannelHereNowData : PNServiceData - - -#pragma mark - Information - -/** - * @brief Active channel subscribers unique identifiers. - * - * @note This object can be empty in case if only occupancy has been requested. - * @note This object can contain list of uuids or dictionary with uuids and client state information bound to them. - */ -@property (nonatomic, nullable, readonly, strong) id uuids; - -/** - * @brief Active channels list. - * - * @discussion Each dictionary key represent channel name and it's value is presence information for it. - * - * @since 4.15.8 - */ -@property (nonatomic, nullable, readonly, strong) NSDictionary *channels; - -/** - * @brief Total number of subscribers. - * - * @note Information available only when 'Here now' requested for list of channels and will be \b 0 in other case. - * - * @since 4.15.8 - */ -@property (nonatomic, readonly, strong) NSNumber *totalOccupancy; - -/** - * @brief Active subscribers count. - */ -@property (nonatomic, readonly, strong) NSNumber *occupancy; - -#pragma mark - - - -@end - - -/** - * @brief Class which is used to provide access to request processing results. - * - * @author Serhii Mamontov - * @version 4.15.8 - * @since 4.0.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNPresenceChannelHereNowResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief Channel(s) presence request processing information. - */ -@property (nonatomic, readonly, strong) PNPresenceChannelHereNowData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNPresenceChannelHereNowResult.m b/PubNub/Data/Service Objects/PNPresenceChannelHereNowResult.m deleted file mode 100644 index 293a25428..000000000 --- a/PubNub/Data/Service Objects/PNPresenceChannelHereNowResult.m +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.8 - * @since 4.0.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNPresenceChannelHereNowResult.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark Interface implementation - -@implementation PNPresenceChannelHereNowData - - -#pragma mark - Information - -- (id)uuids { - return self.channels.allValues.firstObject[@"uuids"]; -} - -- (NSDictionary *)channels { - return self.serviceData[@"channels"]; -} - -- (NSNumber *)totalOccupancy { - return self.serviceData[@"channels"] ? self.serviceData[@"totalOccupancy"] : @0; -} - -- (NSNumber *)occupancy { - return self.channels.allValues.firstObject[@"occupancy"] ?: @0; -} - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNPresenceChannelHereNowResult () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNPresenceChannelHereNowData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNPresenceChannelHereNowResult - - -#pragma mark - Information - -- (PNPresenceChannelHereNowData *)data { - if (!_data) { - _data = [PNPresenceChannelHereNowData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNPresenceGlobalHereNowResult.h b/PubNub/Data/Service Objects/PNPresenceGlobalHereNowResult.h deleted file mode 100644 index d3a02eb08..000000000 --- a/PubNub/Data/Service Objects/PNPresenceGlobalHereNowResult.h +++ /dev/null @@ -1,66 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Class which allow to get access to global presence processed result. - * - * @author Sergey Mamontov - * @version 4.15.8 - * @since 4.0.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNPresenceGlobalHereNowData : PNServiceData - - -#pragma mark - Information - -/** - * @brief Active channels list. - * - * @discussion Each dictionary key represent channel name and it's value is presence information for it. - */ -@property (nonatomic, readonly, strong) NSDictionary *channels; - -/** - * @brief Total number of active channels. - */ -@property (nonatomic, readonly, strong) NSNumber *totalChannels; - -/** - * @brief Total number of subscribers. - */ -@property (nonatomic, readonly, strong) NSNumber *totalOccupancy; - -#pragma mark - - - -@end - - -/** - * @brief Class which is used to provide access to request processing results. - * - * @author Serhii Mamontov - * @version 4.15.8 - * @since 4.0.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNPresenceGlobalHereNowResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief Stores reference on global presence request processing information. - */ -@property (nonatomic, readonly, strong) PNPresenceGlobalHereNowData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNPresenceGlobalHereNowResult.m b/PubNub/Data/Service Objects/PNPresenceGlobalHereNowResult.m deleted file mode 100644 index 12fb42088..000000000 --- a/PubNub/Data/Service Objects/PNPresenceGlobalHereNowResult.m +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.8 - * @since 4.0.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNPresenceGlobalHereNowResult.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark Interface implementation - -@implementation PNPresenceGlobalHereNowData - - -#pragma mark - Information - -- (NSDictionary *)channels { - return self.serviceData[@"channels"] ?: @{}; -} - -- (NSNumber *)totalChannels { - return self.serviceData[@"totalChannels"] ?: @0; -} - -- (NSNumber *)totalOccupancy { - return self.serviceData[@"totalOccupancy"] ?: @0; -} - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNPresenceGlobalHereNowResult () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNPresenceGlobalHereNowData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNPresenceGlobalHereNowResult - - -#pragma mark - Information - -- (PNPresenceGlobalHereNowData *)data { - if (!_data) { - _data = [PNPresenceGlobalHereNowData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNPresenceWhereNowResult.h b/PubNub/Data/Service Objects/PNPresenceWhereNowResult.h deleted file mode 100644 index 1381f4823..000000000 --- a/PubNub/Data/Service Objects/PNPresenceWhereNowResult.h +++ /dev/null @@ -1,60 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Class which allow to get access to client presence processed result. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNPresenceWhereNowData : PNServiceData - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief List of channels on which client subscribed. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSArray *channels; - -#pragma mark - - - -@end - - -/** - @brief Class which is used to provide access to request processing results. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNPresenceWhereNowResult : PNOperationResult - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Stores reference on client presence request processing information. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) PNPresenceWhereNowData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNPresenceWhereNowResult.m b/PubNub/Data/Service Objects/PNPresenceWhereNowResult.m deleted file mode 100644 index f64151afa..000000000 --- a/PubNub/Data/Service Objects/PNPresenceWhereNowResult.m +++ /dev/null @@ -1,60 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNOperationResult+Private.h" -#import "PNPresenceWhereNowResult.h" -#import "PNServiceData+Private.h" - - -#pragma mark Interface implementation - -@implementation PNPresenceWhereNowData - - -#pragma mark - Information - -- (NSArray *)channels { - - return (self.serviceData[@"channels"]?: @[]); -} - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNPresenceWhereNowResult () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNPresenceWhereNowData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNPresenceWhereNowResult - - -#pragma mark - Information - -- (PNPresenceWhereNowData *)data { - - if (!_data) { _data = [PNPresenceWhereNowData dataWithServiceResponse:self.serviceData]; } - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNPublishStatus.h b/PubNub/Data/Service Objects/PNPublishStatus.h deleted file mode 100644 index 5df8d6d2f..000000000 --- a/PubNub/Data/Service Objects/PNPublishStatus.h +++ /dev/null @@ -1,68 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Class which is used to provide access to additional data available to describe publish - status. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNPublishData : PNServiceData - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Service-provided time stamp at which message has been pushed to remote data object live feed. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSNumber *timetoken; - -/** - @brief Service-provide information about service response message. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSString *information; - -#pragma mark - - - -@end - - -/** - @brief Class which is used to provide information about request processing. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNPublishStatus : PNAcknowledgmentStatus - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Stores reference on publish request processing status information. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) PNPublishData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNPublishStatus.m b/PubNub/Data/Service Objects/PNPublishStatus.m deleted file mode 100644 index 166bff5b2..000000000 --- a/PubNub/Data/Service Objects/PNPublishStatus.m +++ /dev/null @@ -1,60 +0,0 @@ -#import "PNPublishStatus.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark Interface implementation - -@implementation PNPublishData - -#pragma mark - Information - -- (NSNumber *)timetoken { - - return (self.serviceData[@"timetoken"]?: @0); -} - -- (NSString *)information { - - return (self.serviceData[@"information"]?: @"No Information"); -} - -#pragma mark - - - -@end - - - -#pragma mark - Private interface declaration - -@interface PNPublishStatus () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNPublishData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNPublishStatus - - -#pragma mark - Information - -- (PNPublishData *)data { - - if (!_data) { _data = [PNPublishData dataWithServiceResponse:self.serviceData]; } - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNSendFileStatus+Private.h b/PubNub/Data/Service Objects/PNSendFileStatus+Private.h deleted file mode 100644 index e7c8b72ba..000000000 --- a/PubNub/Data/Service Objects/PNSendFileStatus+Private.h +++ /dev/null @@ -1,34 +0,0 @@ -#import "PNSendFileStatus.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interfaces declaration - -/** - * @brief \c Send \c file status data object extension to provide access to state setters. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNSendFileData (Private) - - -#pragma mark - Information - -/** - * @brief Whether file uploaded or not. - * - * @note This property should be used during error handling to identify whether send file request should be resend or only file message - * publish. - */ -@property (nonatomic, assign) BOOL fileUploaded; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNSendFileStatus.h b/PubNub/Data/Service Objects/PNSendFileStatus.h deleted file mode 100644 index c7de4d6ab..000000000 --- a/PubNub/Data/Service Objects/PNSendFileStatus.h +++ /dev/null @@ -1,75 +0,0 @@ -#import -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to provide access to additional data available to describe \c file \c upload status. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNSendFileData : PNServiceData - - -#pragma mark - Information - -/** - * @brief Unique identifier which has been assigned to file during upload. - */ -@property (nonatomic, nullable, readonly, strong) NSString *fileIdentifier; - -/** - * @brief Time token when the message with file information has been published. - */ -@property (nonatomic, nullable, readonly, strong) NSNumber *timetoken; - -/** - * @brief Name under which uploaded data has been stored. - */ -@property (nonatomic, nullable, readonly, strong) NSString *fileName; - -/** - * @brief Whether file uploaded or not. - * - * @note This property should be used during error handling to identify whether send file request should be resend or only file message - * publish. - */ -@property (nonatomic, readonly, assign) BOOL fileUploaded; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c send \c file request. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNSendFileStatus : PNAcknowledgmentStatus - - -#pragma mark - Information - -/** - * @brief \c Send \c file request processed information. - */ -@property (nonatomic, readonly, strong) PNSendFileData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNSendFileStatus.m b/PubNub/Data/Service Objects/PNSendFileStatus.m deleted file mode 100644 index 48dbdfafa..000000000 --- a/PubNub/Data/Service Objects/PNSendFileStatus.m +++ /dev/null @@ -1,84 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNOperationResult+Private.h" -#import "PNSendFileStatus+Private.h" -#import "PNServiceData+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNSendFileData () - - -#pragma mark - Information - -@property (nonatomic, assign) BOOL fileUploaded; - -#pragma mark - - - -@end - -@interface PNSendFileStatus () - - -#pragma mark - Information - -@property (nonatomic, strong) PNSendFileData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNSendFileData - - -#pragma mark - Information - -- (NSString *)fileIdentifier { - return self.serviceData[@"id"]; -} - -- (NSNumber *)timetoken { - return self.serviceData[@"timetoken"]; -} - -- (NSString *)fileName { - return self.serviceData[@"name"]; -} - -#pragma mark - - - -@end - - -@implementation PNSendFileStatus - - -#pragma mark - Information - -- (PNSendFileData *)data { - if (!_data) { - _data = [PNSendFileData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNSetChannelMetadataStatus.h b/PubNub/Data/Service Objects/PNSetChannelMetadataStatus.h deleted file mode 100644 index 5408d4fba..000000000 --- a/PubNub/Data/Service Objects/PNSetChannelMetadataStatus.h +++ /dev/null @@ -1,59 +0,0 @@ -#import -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent Objects API response for \c set \c channel \c metadata - * request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNSetChannelMetadataData : PNServiceData - - -#pragma mark - Information - -/** - * @brief Associated \c channel's \c metadata object. - */ -@property (nonatomic, nullable, readonly, strong) PNChannelMetadata *metadata; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c set \c channel \c metadata request - * results. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNSetChannelMetadataStatus : PNAcknowledgmentStatus - - -#pragma mark - Information - -/** - * @brief \c Set \c channel \c metadata request processed information. - */ -@property (nonatomic, readonly, strong) PNSetChannelMetadataData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNSetChannelMetadataStatus.m b/PubNub/Data/Service Objects/PNSetChannelMetadataStatus.m deleted file mode 100644 index da3d076d5..000000000 --- a/PubNub/Data/Service Objects/PNSetChannelMetadataStatus.m +++ /dev/null @@ -1,82 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNSetChannelMetadataStatus.h" -#import "PNChannelMetadata+Private.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNSetChannelMetadataStatus () - - -#pragma mark - Information - -@property (nonatomic, nonnull, strong) PNSetChannelMetadataData *data; - -#pragma mark - - - -@end - - -@interface PNSetChannelMetadataData () - - -#pragma mark - Information - -@property (nonatomic, nullable, strong) PNChannelMetadata *metadata; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNSetChannelMetadataData - - -#pragma mark - Information - -- (PNChannelMetadata *)metadata { - if (!_metadata) { - _metadata = [PNChannelMetadata channelMetadataFromDictionary:self.serviceData[@"channel"]]; - } - - return _metadata; -} - -#pragma mark - - - -@end - - -@implementation PNSetChannelMetadataStatus - - -#pragma mark - Information - -- (PNSetChannelMetadataData *)data { - if (!_data) { - _data = [PNSetChannelMetadataData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNSetUUIDMetadataStatus.h b/PubNub/Data/Service Objects/PNSetUUIDMetadataStatus.h deleted file mode 100644 index 9e9dd738d..000000000 --- a/PubNub/Data/Service Objects/PNSetUUIDMetadataStatus.h +++ /dev/null @@ -1,59 +0,0 @@ -#import -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Object which is used to represent Objects API response for \c set \c UUID \c metadata - * request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNSetUUIDMetadataData : PNServiceData - - -#pragma mark - Information - -/** - * @brief Updated \c UUID \c metadata object. - */ -@property (nonatomic, nullable, readonly, strong) PNUUIDMetadata *metadata; - -#pragma mark - - - -@end - - -/** - * @brief Object which is used to provide access to processed \c set \c UUID \c metadata request - * results. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNSetUUIDMetadataStatus : PNAcknowledgmentStatus - - -#pragma mark - Information - -/** - * @brief \c Set \c UUID \c metadata request processed information. - */ -@property (nonatomic, readonly, strong) PNSetUUIDMetadataData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNSetUUIDMetadataStatus.m b/PubNub/Data/Service Objects/PNSetUUIDMetadataStatus.m deleted file mode 100644 index 868679f4a..000000000 --- a/PubNub/Data/Service Objects/PNSetUUIDMetadataStatus.m +++ /dev/null @@ -1,82 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNOperationResult+Private.h" -#import "PNSetUUIDMetadataStatus.h" -#import "PNUUIDMetadata+Private.h" -#import "PNServiceData+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interfaces declaration - -@interface PNSetUUIDMetadataStatus () - - -#pragma mark - Information - -@property (nonatomic, nonnull, strong) PNSetUUIDMetadataData *data; - -#pragma mark - - - -@end - - -@interface PNSetUUIDMetadataData () - - -#pragma mark - Information - -@property (nonatomic, nullable, strong) PNUUIDMetadata *metadata; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interfaces implementation - -@implementation PNSetUUIDMetadataData - - -#pragma mark - Information - -- (PNUUIDMetadata *)metadata { - if (!_metadata) { - _metadata = [PNUUIDMetadata uuidMetadataFromDictionary:self.serviceData[@"uuid"]]; - } - - return _metadata; -} - -#pragma mark - - - -@end - - -@implementation PNSetUUIDMetadataStatus - - -#pragma mark - Information - -- (PNSetUUIDMetadataData *)data { - if (!_data) { - _data = [PNSetUUIDMetadataData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNSignalStatus.h b/PubNub/Data/Service Objects/PNSignalStatus.h deleted file mode 100644 index ef829ae5f..000000000 --- a/PubNub/Data/Service Objects/PNSignalStatus.h +++ /dev/null @@ -1,62 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Class which is used to provide access to additional data available to describe signal - * sending status. - * - * @author Serhii Mamontov - * @version 4.9.0 - * @since 4.9.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNSignalStatusData : PNServiceData - - -#pragma mark - Information - -/** - * @brief Service-provided time stamp at which signal has been sent to remote data object live feed. - */ -@property (nonatomic, readonly, strong) NSNumber *timetoken; - -/** - * @brief Service-provide information about service response message. - */ -@property (nonatomic, readonly, strong) NSString *information; - -#pragma mark - - - -@end - - -/** - * @brief Class which is used to provide information about request processing. - * - * @author Serhii Mamontov - * @version 4.9.0 - * @since 4.9.0 - * @copyright © 2010-2019 PubNub, Inc. - */ - -@interface PNSignalStatus : PNAcknowledgmentStatus - - -#pragma mark - Information - -/** - * @brief Stores reference on publish request processing status information. - */ -@property (nonatomic, readonly, strong) PNSignalStatusData *data; - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNSignalStatus.m b/PubNub/Data/Service Objects/PNSignalStatus.m deleted file mode 100644 index 83c5ba305..000000000 --- a/PubNub/Data/Service Objects/PNSignalStatus.m +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @author Serhii Mamontov - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNSignalStatus.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark Interface implementation - -@implementation PNSignalStatusData - - -#pragma mark - Information - -- (NSNumber *)timetoken { - - return (self.serviceData[@"timetoken"] ?: @0); -} - -- (NSString *)information { - - return (self.serviceData[@"information"] ?: @"No Information"); -} - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNSignalStatus () - - -#pragma mark - Properties - -@property (nonatomic, nonnull, strong) PNSignalStatusData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNSignalStatus - - -#pragma mark - Information - -- (PNSignalStatusData *)data { - - if (!_data) { - _data = [PNSignalStatusData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNStatus+Private.h b/PubNub/Data/Service Objects/PNStatus+Private.h index 8e1d441c6..2de5abc48 100644 --- a/PubNub/Data/Service Objects/PNStatus+Private.h +++ b/PubNub/Data/Service Objects/PNStatus+Private.h @@ -1,8 +1,3 @@ -/** - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2019 PubNub, Inc. - */ #import "PNStatus.h" @@ -10,110 +5,89 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Private interface declaration +/// General operation (request or client generated) status object private extension. @interface PNStatus () -#pragma mark - Information - -/** - * @brief One of \b PNStatusCategory fields which provide information about for which status this - * instance has been created. - */ -@property (nonatomic, assign) PNStatusCategory category; - -/** - * @brief Whether status object represent error or not. - */ -@property (nonatomic, assign, getter = isError) BOOL error; - -/** - * @brief Whether client will try to resent request associated with status or not. - * - * @discussion In most cases client will keep retry request sending till it won't be successful or - * canceled with \c -cancelAutomaticRetry method. - */ -@property (nonatomic, assign, getter = willAutomaticallyRetry) BOOL automaticallyRetry; - -/** - * @brief Whether request require network availability check or not. - * - * @since 4.8.10 - */ -@property (nonatomic, assign) BOOL requireNetworkAvailabilityCheck; - -/** - * @brief Time token which has been used to establish current subscription cycle. - */ -@property (nonatomic, strong) NSNumber *currentTimetoken; - -/** - * @brief Previous time token which has been used in subscription cycle to receive - * \c currentTimetoken along with other events. - */ -@property (nonatomic, strong) NSNumber *lastTimeToken; - -/** - * @brief \b PubNub server region identifier (which generated \c currentTimetoken value). - * - * @since 4.3.0 - */ -@property (nonatomic, strong) NSNumber *currentTimeTokenRegion; - -/** - * @brief Previous time token region which has been used in subscription cycle to receive - * \c currentTimeTokenRegion along with other events. - * - * @since 4.3.0 - */ -@property (nonatomic, strong) NSNumber *lastTimeTokenRegion; - -/** - * @brief List of channels on which client currently subscribed. - */ -@property (nonatomic, copy) NSArray *subscribedChannels; - -/** - * @brief Channel group names list on which client currently subscribed. - */ -@property (nonatomic, copy) NSArray *subscribedChannelGroups; - -/** - * @brief Block which can be used to retry request processing. - * - * @discussion This blocks provided only for requests which won't be auto-restarted by client. - */ -@property (nonatomic, nullable, copy) dispatch_block_t retryBlock; - -/** - * @brief Block which can be used to cancel automatic retry on requests. - * - * @discussion Usually requests resent by client \b 1 second late after failure and this is time - * when request can be canceled by user using \c -cancelAutomaticRetry method. - */ -@property (nonatomic, nullable, copy) dispatch_block_t retryCancelBlock; - - -#pragma mark - Initialization and configuration - -/** - * @brief Construct minimal object to describe state using operation type and status category - * information. - * - * @param operation Type of operation for which this status report. - * @param category Operation processing status category. - * - * @return Constructed and ready to use status object. - */ -+ (instancetype)statusForOperation:(PNOperationType)operation - category:(PNStatusCategory)category - withProcessingError:(nullable NSError *)error; - -/** - * @brief Alter status category. - * - * @param category One of \b PNStatusCategory enum fields which should be applied on status object - * \c category property. - */ +#pragma mark - Properties + +/// Channel group names list on which client currently subscribed. +@property(copy, nonatomic) NSArray *subscribedChannelGroups; + +/// Class which should be used to deserialize ``responseData``. +@property(class, strong, nonatomic, readonly) Class statusDataClass; + +/// List of channels on which client currently subscribed. +@property(copy, nonatomic) NSArray *subscribedChannels; + +/// Whether request require network availability check or not. +@property(assign, nonatomic) BOOL requireNetworkAvailabilityCheck; + +/// **PubNub** server region identifier (which generated `currentTimetoken` value). +@property(strong, nonatomic) NSNumber *currentTimeTokenRegion; + +/// Previous time token region which has been used in subscription cycle to receive `currentTimeTokenRegion` along with +/// other events. +@property(strong, nonatomic) NSNumber *lastTimeTokenRegion; + +/// Whether service returned error response or not. +@property(assign, nonatomic, getter = isError) BOOL error; + +/// Time token which has been used to establish current subscription cycle. +@property(strong, nonatomic) NSNumber *currentTimetoken; + +/// Represent request processing status object using `PNStatusCategory` enum fields. +@property(assign, nonatomic) PNStatusCategory category; + +/// Previous time token which has been used in subscription cycle to receive `currentTimetoken` along with other events. +@property(strong, nonatomic) NSNumber *lastTimeToken; + + +#pragma mark - Properties (deprecated) + +/// Request auto-retry configuration information. +/// +/// > Important: This property always will return `NO` because it is possible to set request retries configuration when +/// setup **PubNub** client instance. +@property(assign, nonatomic, getter = willAutomaticallyRetry) BOOL automaticallyRetry + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. Please call " + "endpoint with already created request instance or setup retry configuration during PubNub" + " instance configuration."); + +/// Block which can be used to cancel automatic retry on requests. +/// +/// > Important: This property won't be used by the client code anymore. +@property(copy, nullable, nonatomic) dispatch_block_t retryCancelBlock + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. Please call " + "endpoint with already created request instance or setup retry configuration during PubNub" + " instance configuration."); + +/// Block which can be used to retry request processing. +/// +/// > Important: This property won't be used by the client code anymore. +@property(copy, nullable, nonatomic) dispatch_block_t retryBlock + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. Please call " + "endpoint with already created request instance or setup retry configuration during PubNub" + " instance configuration."); + + +#pragma mark - Initialization and Configuration + +/// Create operation status object. +/// +/// - Parameters: +/// - operation: Type of operation for which status object has been created. +/// - category: Operation processing status category. +/// - response: Processed operation outcome data object. +/// - Returns: Ready to use operation status object. ++ (instancetype)objectWithOperation:(PNOperationType)operation + category:(PNStatusCategory)category + response:(nullable id)response; + +/// Change status category. +/// +/// - Parameter category: One of **PNStatusCategory** enum fields which should be applied on status object `category` +/// property. - (void)updateCategory:(PNStatusCategory)category; #pragma mark - diff --git a/PubNub/Data/Service Objects/PNStatus.h b/PubNub/Data/Service Objects/PNStatus.h index 9d53fb509..db562a6b2 100644 --- a/PubNub/Data/Service Objects/PNStatus.h +++ b/PubNub/Data/Service Objects/PNStatus.h @@ -2,76 +2,62 @@ #import - NS_ASSUME_NONNULL_BEGIN -/** - * @brief Class which is used to describe error response from server or any non-request related - * client state changes. - * - * @discussion In case of error this instance may contain service response in \c data. Also this - * object hold additional information about current client state. - * - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2019 PubNub, Inc. - */ +#pragma mark Interface declaration + +/// General operation (request or client generated) status object. +/// +/// This is a general object which is used to represent basic information about processing result. Additional +/// information about error or remote origin response on resource access or data push may be provided by its subclasses. @interface PNStatus : PNOperationResult -#pragma mark Information - -/** - * @brief One of \b PNStatusCategory fields which provide information about for which status this - * instance has been created. - * - * @return Processing status category. - */ -@property (nonatomic, readonly, assign) PNStatusCategory category; - -/** - * @brief Whether status object represent error or not. - * - * @return \c YES in case if status represent request processing error. - */ -@property (nonatomic, readonly, assign, getter = isError) BOOL error; - -/** - * @brief Auto-retry configuration information. - * - * @discussion In most cases client will keep retry request sending till it won't be successful or - * canceled with \c -cancelAutomaticRetry method. - * - * @return \c YES in case if request which represented with this failed status will be resent - * automatically or not. - */ -@property (nonatomic, readonly, assign, getter = willAutomaticallyRetry) BOOL automaticallyRetry; - -/** - * @brief Stringified \c category value. - * - * @return Stringified representation for \c category property which store value from - * \b PNStatusCategory. - */ -- (NSString *)stringifiedCategory; - - -#pragma mark - Recovery - -/** - * @brief Try to resent request associated with processing status object. - * - * @discussion Some operations which perform automatic retry attempts will ignore method call. - */ -- (void)retry; - -/** - * @brief For some requests client try to resent them to \b PubNub for processing. - * - * @discussion This method can be performed only on operations which respond with \c YES on - * \c willAutomaticallyRetry property. Other operation types will ignore method call. - */ -- (void)cancelAutomaticRetry; +#pragma mark - Properties + +/// Stringify request processing status. +/// +/// Stringify processing `category` field (one of the `PNStatusCategory` enum). +@property(strong, nonatomic, readonly) NSString *stringifiedCategory; + +/// Whether service returned error response or not. +@property(assign, nonatomic, readonly, getter = isError) BOOL error; + +/// Represent request processing status object using `PNStatusCategory` enum fields. +@property(assign, nonatomic, readonly) PNStatusCategory category; + + +#pragma mark - Properties (deprecated) + +/// Request auto-retry configuration information. +/// +/// > Important: This property always will return `NO` because it is possible to set request retries configuration when +/// setup **PubNub** client instance. +@property (nonatomic, readonly, assign, getter = willAutomaticallyRetry) BOOL automaticallyRetry + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with the next major update. Please call " + "endpoint with already created request instance or setup retry configuration during PubNub" + " instance configuration."); + + +#pragma mark - Recovery (deprecated) + +/// Try to resent request associated with processing status object. +/// +/// > Important: This method **won't resend the failed request**. Error status will be created only when all retry +/// attempts configured when **PubNub** client has been set up will be exhausted. Next retry can be done manually by +/// sending the same request object which has been used for the initial call. +- (void)retry + DEPRECATED_MSG_ATTRIBUTE("This method deprecated and will be removed with the next major update. Please call " + "endpoint with already created request instance or setup retry configuration during PubNub" + " instance configuration."); + +/// For some requests client try to resent them to **PubNub** for processing. +/// +/// > Important: This method **won't interrupt configured automatic retry**. Retry will stop when all configured retry +/// attempts will be exhausted. +- (void)cancelAutomaticRetry + DEPRECATED_MSG_ATTRIBUTE("This method deprecated and will be removed with the next major update. Retry will stop " + "when all configured retry attempts will be exhausted."); #pragma mark - diff --git a/PubNub/Data/Service Objects/PNStatus.m b/PubNub/Data/Service Objects/PNStatus.m index 12b47a405..4ec314f14 100644 --- a/PubNub/Data/Service Objects/PNStatus.m +++ b/PubNub/Data/Service Objects/PNStatus.m @@ -1,201 +1,96 @@ -/** - * @author Serhii Mamontov - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNNetworkResponseSerializer.h" #import "PNOperationResult+Private.h" #import "PNPrivateStructures.h" #import "PNStatus+Private.h" #import "PNDictionary.h" -#import "PNErrorCodes.h" +#import "PNFunctions.h" +#import "PNError.h" -#pragma mark Private interface +NS_ASSUME_NONNULL_BEGIN -@interface PNStatus () +#pragma mark Private interface declaration + +/// General operation (request or client generated) status object private extension. +@interface PNStatus (Private) #pragma mark - Initialization and configuration -/** - * @brief Initializr minimal object to describe state using operation type and status category - * information. - * - * @param operation Type of operation for which this status report. - * @param category Operation processing status category. - * @param error Processing error. - * - * @return Initialized and ready to use status object. - */ -- (instancetype)initForOperation:(PNOperationType)operation - category:(PNStatusCategory)category - withProcessingError:(NSError *)error; - -/** - * @brief Initialize result instance in response to successful task completion. - * - * @param operation One of \b PNOperationType enum fields to describe what kind of operation has - * been processed. - * @param task Data task which has been used to communicate with \b PubNub network. - * @param processedData Data which has been loaded and pre-processed by corresponding parser. - * @param error Processing error. - * - * @return Initialized and ready to use result instance. - */ -- (instancetype)initForOperation:(PNOperationType)operation - completedWithTask:(NSURLSessionDataTask *)task - processedData:(NSDictionary *)processedData - processingError:(NSError *)error; - - -#pragma mark - Interpretation - -/** - * @brief Try interpret response status code meaningful status object state. - * - * @param statusCode HTTP response status code which should be used during interpretation. - */ -- (PNStatusCategory)categoryTypeFromStatusCode:(NSInteger)statusCode; - -/** - * @brief Try retrieve status code from error object code. - * - * @param error Reference on error which should be used during interpretation. - * - * @since 4.15.0 - */ -- (NSInteger)statusCodeFromError:(NSError *)error; - -/** - * @brief Try interpret error object to meaningful status object state. - * - * @param error Reference on error which should be used during interpretation. - */ -- (PNStatusCategory)categoryTypeFromError:(NSError *)error; - -/** - * @brief Try extract useful data from error object (in case if service provided some feedback). - * - * @param error Reference on error from which data should be pulled out. - */ -- (NSDictionary *)dataFromError:(NSError *)error; +/// Initialize operation status object. +/// +/// - Parameters: +/// - operation: Type of operation for which status object has been created. +/// - category: Operation processing status category. +/// - response: Processed operation outcome data object. +/// - Returns: Initialized operation status object. +- (instancetype)initWithOperation:(PNOperationType)operation + category:(PNStatusCategory)category + response:(nullable id)response; #pragma mark - @end +NS_ASSUME_NONNULL_END + #pragma mark - Interface implementation @implementation PNStatus -#pragma mark - Information +#pragma mark - Properties + ++ (Class)statusDataClass { + @throw [NSException exceptionWithName:@"PNStatus statusDataClass" + reason:@"Not implemented by subclass" + userInfo:nil]; +} - (NSString *)stringifiedCategory { - return PNStatusCategoryStrings[self.category]; } -- (void)updateCategory:(PNStatusCategory)category; { - +- (void)updateCategory:(PNStatusCategory)category { self.category = category; } - (void)setCategory:(PNStatusCategory)category { - _category = category; - if (_category == PNDecryptionErrorCategory) { - self.error = YES; - } else if (_category == PNConnectedCategory || _category == PNReconnectedCategory || - _category == PNDisconnectedCategory || _category == PNUnexpectedDisconnectCategory) { + + if (_category == PNDecryptionErrorCategory || _category == PNBadRequestCategory) self.error = YES; + else if (_category == PNConnectedCategory || _category == PNReconnectedCategory || + _category == PNDisconnectedCategory || _category == PNUnexpectedDisconnectCategory) { self.error = NO; - } else if (_category == PNBadRequestCategory) { - self.statusCode = 400; } } -#pragma mark - Initialization and configuration +#pragma mark - Initialization and Configuration -+ (instancetype)statusForOperation:(PNOperationType)operation - category:(PNStatusCategory)category - withProcessingError:(NSError *)error { - - return [[self alloc] initForOperation:operation category:category withProcessingError:error]; ++ (instancetype)objectWithOperation:(PNOperationType)operation + category:(PNStatusCategory)category + response:(id)response { + return [[self alloc] initWithOperation:operation category:category response:response]; } -- (instancetype)initForOperation:(PNOperationType)operation - category:(PNStatusCategory)category - withProcessingError:(NSError *)error { - - // Check whether initialization was successful or not. - if ((self = [super initForOperation:operation - completedWithTask:nil - processedData:nil - processingError:error])) { - +- (instancetype)initWithOperation:(PNOperationType)operation category:(PNStatusCategory)category response:(id)response { + if ((self = [super initWithOperation:operation response:response])) { _category = category; if (_category == PNConnectedCategory || _category == PNReconnectedCategory || _category == PNDisconnectedCategory || _category == PNUnexpectedDisconnectCategory || _category == PNCancelledCategory || _category == PNAcknowledgmentCategory) { - _error = NO; - self.statusCode = 200; - } else if (_category != PNUnknownCategory) { - _error = YES; - self.statusCode = (_category == PNAccessDeniedCategory ? 403 : 400); - } + } else if (_category != PNUnknownCategory) _error = YES; } - - return self; -} -- (instancetype)initForOperation:(PNOperationType)operation - completedWithTask:(NSURLSessionDataTask *)task - processedData:(NSDictionary *)processedData - processingError:(NSError *)error { - - // Check whether initialization was successful or not. - if ((self = [super initForOperation:operation completedWithTask:task processedData:processedData - processingError:error])) { - - _error = (error != nil || self.statusCode >= 400); - - if (_error && ![self.serviceData count]) { - [self updateData:[self dataFromError:error]]; - } - - // Check whether status should represent acknowledgment or not. - if (self.statusCode < 400 && !_error) { - _category = PNAcknowledgmentCategory; - } else if (_category == PNUnknownCategory) { - // Try extract category basing on response status codes. - _category = [self categoryTypeFromStatusCode:self.statusCode]; - - if (_category == PNUnknownCategory && (self.statusCode == 200 || self.statusCode == 0)) { - self.statusCode = [self statusCodeFromError:error]; - } - - // Extract status category from passed error object. - _category = (_category == PNUnknownCategory ? [self categoryTypeFromError:error] : _category); - _category = (_category == PNUnknownCategory && self.statusCode == 400 ? - PNBadRequestCategory : _category); - } - - if (_category == PNCancelledCategory) { - _error = NO; - } - } - return self; } - (id)copyWithZone:(NSZone *)zone { - PNStatus *status = [super copyWithZone:zone]; status.requireNetworkAvailabilityCheck = self.requireNetworkAvailabilityCheck; status.category = self.category; @@ -206,234 +101,25 @@ - (id)copyWithZone:(NSZone *)zone { status.lastTimeToken = self.lastTimeToken; status.currentTimeTokenRegion = self.currentTimeTokenRegion; status.lastTimeTokenRegion = self.lastTimeTokenRegion; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" status.automaticallyRetry = self.willAutomaticallyRetry; status.retryBlock = self.retryBlock; status.retryCancelBlock = self.retryCancelBlock; - +#pragma clang diagnostic pop + return status; } -#pragma mark - Recovery +#pragma mark - Recovery (deprecated) - (void)retry { - - if (self.retryBlock) { - self.retryBlock(); - } + if (self.retryBlock) self.retryBlock(); } - (void)cancelAutomaticRetry { - - if (self.retryCancelBlock) { - self.retryCancelBlock(); - } -} - - -#pragma mark - Interpretation - -- (PNStatusCategory)categoryTypeFromStatusCode:(NSInteger)statusCode { - - PNStatusCategory category = PNUnknownCategory; - - if (statusCode == 403) { - category = PNAccessDeniedCategory; - } else if (statusCode == 411) { - category = PNBadRequestCategory; - } else if (statusCode == 414) { - category = PNRequestURITooLongCategory; - } else if (statusCode == 481) { - category = PNMalformedFilterExpressionCategory; - } - - return category; -} - -- (NSInteger)statusCodeFromError:(NSError *)error { - NSInteger statusCode = -1; - - if ([error.domain isEqualToString:NSURLErrorDomain]) { - switch (error.code) { - case NSURLErrorTimedOut: - statusCode = 408; - break; - case NSURLErrorCannotDecodeContentData: - case NSURLErrorBadServerResponse: - statusCode = 500; - break; - case NSURLErrorBadURL: - statusCode = 400; - break; - case NSURLErrorCancelled: - statusCode = 499; - break; - case NSURLErrorSecureConnectionFailed: - statusCode = 525; - break; - case NSURLErrorServerCertificateUntrusted: - statusCode = 526; - break; - default: - break; - } - } else if ([error.domain isEqualToString:kPNAPIErrorDomain]) { - switch (error.code) { - case kPNAPIUnacceptableParameters: - statusCode = 400; - break; - default: - break; - } - } else if ([error.domain isEqualToString:NSCocoaErrorDomain]) { - switch (error.code) { - case NSPropertyListReadCorruptError: - statusCode = 500; - break; - - default: - break; - } - } - - return statusCode; -} - -- (PNStatusCategory)categoryTypeFromError:(NSError *)error { - - PNStatusCategory category = PNUnknownCategory; - - if ([error.domain isEqualToString:NSURLErrorDomain] || - [error.domain isEqualToString:kPNStorageErrorDomain]) { - - switch (error.code) { - case NSURLErrorTimedOut: - category = PNTimeoutCategory; - break; - case NSURLErrorCannotFindHost: - case NSURLErrorCannotConnectToHost: - case NSURLErrorNetworkConnectionLost: - case NSURLErrorDNSLookupFailed: - case NSURLErrorNotConnectedToInternet: - category = PNNetworkIssuesCategory; - break; - case NSURLErrorCannotDecodeContentData: - case NSURLErrorBadServerResponse: - category = PNMalformedResponseCategory; - break; - case NSURLErrorBadURL: - category = PNBadRequestCategory; - break; - case NSURLErrorCancelled: - category = PNCancelledCategory; - break; - case NSURLErrorSecureConnectionFailed: - category = PNTLSConnectionFailedCategory; - break; - case NSURLErrorServerCertificateUntrusted: - category = PNTLSUntrustedCertificateCategory; - break; - default: - break; - } - } else if ([error.domain isEqualToString:kPNAPIErrorDomain] || - [error.domain isEqualToString:kPNStorageErrorDomain]) { - switch (error.code) { - case kPNAPIUnacceptableParameters: - category = PNBadRequestCategory; - break; - default: - break; - } - } else if ([error.domain isEqualToString:NSCocoaErrorDomain]) { - switch (error.code) { - case NSPropertyListReadCorruptError: - category = PNMalformedResponseCategory; - break; - - default: - break; - } - } - - return category; -} - -- (NSDictionary *)dataFromError:(NSError *)error { - - // Try to fetch server response if available. - id errorDetails = nil; - if (error.userInfo[kPNNetworkErrorResponseDataKey]) { - - // In most cases service provide JSON error response. Try de-serialize it. - NSError *deSerializationError; - NSData *errorData = error.userInfo[kPNNetworkErrorResponseDataKey]; - errorDetails = [NSJSONSerialization JSONObjectWithData:errorData - options:(NSJSONReadingOptions)0 - error:&deSerializationError]; - - // Check whether JSON de-serialization failed and try to pull regular string from response. - if (!errorDetails) { - errorDetails = [[NSString alloc] initWithData:errorData encoding:NSUTF8StringEncoding]; - } - - if (deSerializationError) { - error = deSerializationError; - } - } - - if (!errorDetails) { - NSString *information = error.userInfo[NSLocalizedDescriptionKey]; - - if (!information) { - information = error.userInfo[@"NSDebugDescription"]; - } - - if (information && error.userInfo[NSLocalizedFailureReasonErrorKey]) { - information = [NSString stringWithFormat:@"%@: %@", information, - error.userInfo[NSLocalizedFailureReasonErrorKey]]; - } else if (error.userInfo[NSLocalizedFailureReasonErrorKey]) { - information = error.userInfo[NSLocalizedFailureReasonErrorKey]; - } - - if (information) { - errorDetails = @{@"information": information}; - } - } - // Check whether error details represented with expected format or not. - else if (![errorDetails isKindOfClass:[NSDictionary class]]) { - errorDetails = @{@"information": errorDetails}; - } - - return errorDetails; -} - - -#pragma mark - Misc - -- (NSDictionary *)dictionaryRepresentation { - - NSMutableDictionary *status = [[super dictionaryRepresentation] mutableCopy]; - [status addEntriesFromDictionary:@{@"Category": PNStatusCategoryStrings[self.category], - @"Error": (self.isError ? @"YES" : @"NO")}]; - - if ([self.subscribedChannels count] || [self.subscribedChannelGroups count]) { - status[@"Time"] = @{@"Current": (self.currentTimetoken?: @(0)), - @"Previous": (self.lastTimeToken?: @(0))}; - status[@"Region"] = @{@"Current": (self.currentTimeTokenRegion?: @""), - @"Previous": (self.lastTimeTokenRegion?: @"")}; - status[@"Objects"] = [NSMutableDictionary new]; - - if ([self.subscribedChannels count]) { - status[@"Objects"][@"Channels"] = self.subscribedChannels; - } - - if ([self.subscribedChannelGroups count]) { - status[@"Objects"][@"Channel groups"] = self.subscribedChannelGroups; - } - } - - return [status copy]; + // Method deprecated. Do nothing. } #pragma mark - diff --git a/PubNub/Data/Service Objects/PNSubscribeStatus+Private.h b/PubNub/Data/Service Objects/PNSubscribeStatus+Private.h deleted file mode 100644 index 44ac108d6..000000000 --- a/PubNub/Data/Service Objects/PNSubscribeStatus+Private.h +++ /dev/null @@ -1,51 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNSubscribeStatus.h" -#import "PNEnvelopeInformation.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface declaration - -@interface PNSubscriberData () - - -#pragma mark - Properties - -/** - @brief Stores reference on \b PubNub server region identifier (which generated \c timetoken value). - - @since 4.3.0 - */ -@property (nonatomic, readonly) NSNumber *region; - -/** - @brief Stores reference on delivered message enevelop object (data which appended by \b PubNub service - mostly because of debug purposes). - - @since 4.5.6 - */ -@property (nonatomic, nullable, readonly) PNEnvelopeInformation *envelope; - -#pragma mark - - - -@end - - -#pragma mark Private interface declaration - -@interface PNSubscribeStatus () - -@property (nonatomic, strong) PNSubscriberData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNSubscribeStatus.h b/PubNub/Data/Service Objects/PNSubscribeStatus.h deleted file mode 100644 index bf58b0fe2..000000000 --- a/PubNub/Data/Service Objects/PNSubscribeStatus.h +++ /dev/null @@ -1,110 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Base class which allow to get access to general information about subscribe loop. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNSubscriberData : PNServiceData - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Name of channel for which subscriber received data. - - @since 4.5.2 - */ -@property (nonatomic, readonly, strong) NSString *channel; - -/** - @brief Name of \c channel or channel \c group (in case if not equal to \c channel). - - @since 4.5.2 - */ -@property (nonatomic, nullable, readonly, strong) NSString *subscription; - -/** - @brief Time at which event arrived. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSNumber *timetoken; - -/** - @brief Stores reference on metadata information which has been passed along with received event. - - @since 4.3.0 - */ -@property (nonatomic, nullable, readonly, strong) NSDictionary *userMetadata; - -#pragma mark - - - -@end - - -/** - @brief Class which is used to provide access to request processing results. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNSubscribeStatus : PNErrorStatus - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Time token which has been used to establish current subscription cycle. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSNumber *currentTimetoken; - -/** - @brief Stores reference on previous key which has been used in subscription cycle to receive - \c currentTimetoken along with other events. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSNumber *lastTimeToken; - -/** - @brief List of channels on which client currently subscribed. - - @since 4.0 - */ -@property (nonatomic, readonly, copy) NSArray *subscribedChannels; - -/** - @brief List of channel group names on which client currently subscribed. - - @since 4.0 - */ -@property (nonatomic, readonly, copy) NSArray *subscribedChannelGroups; - -/** - @brief Structured \b PNResult \c data field information. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) PNSubscriberData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNSubscribeStatus.m b/PubNub/Data/Service Objects/PNSubscribeStatus.m deleted file mode 100644 index 94d60d2b6..000000000 --- a/PubNub/Data/Service Objects/PNSubscribeStatus.m +++ /dev/null @@ -1,72 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNSubscribeStatus+Private.h" -#import "PNOperationResult+Private.h" -#import "PNEnvelopeInformation.h" -#import "PNServiceData+Private.h" - - -#pragma mark Interface implementation - -@implementation PNSubscriberData - - -#pragma mark - Information - -- (NSString *)channel { - - return self.serviceData[@"channel"]; -} - -- (NSString *)subscription { - - return self.serviceData[@"subscription"]; -} - -- (NSNumber *)timetoken { - - return (self.serviceData[@"timetoken"]?: @0); -} - -- (NSNumber *)region { - - return (self.serviceData[@"region"]?: @0); -} - -- (NSDictionary *)userMetadata { - - return self.envelope.metadata; -} - -- (PNEnvelopeInformation *)envelope { - - return self.serviceData[@"envelope"]; -} - -#pragma mark - - - -@end - - - -@implementation PNSubscribeStatus - -@dynamic currentTimetoken, lastTimeToken, subscribedChannels, subscribedChannelGroups; - - -#pragma mark - Information - -- (PNSubscriberData *)data { - - if (!_data) { _data = [PNSubscriberData dataWithServiceResponse:self.serviceData]; } - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/PNSubscriberResults.h b/PubNub/Data/Service Objects/PNSubscriberResults.h deleted file mode 100644 index 7068cb9b2..000000000 --- a/PubNub/Data/Service Objects/PNSubscriberResults.h +++ /dev/null @@ -1,441 +0,0 @@ -#import -#import -#import - - -#pragma mark Class forward - -@class PNChannelMetadata, PNMessageAction, PNUUIDMetadata, PNMembership, PNFile; - - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Class which allow to get access to detailed presence information which has been received - * on remote data object's live feed. - * - * @author Serhii Mamontov - * @version 4.9.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNPresenceDetailsData : PNSubscriberData - - -#pragma mark - Information - -/** - * @brief Time when presence event has been triggered. - * - * @return Number with unsigned long long timestamp. - */ -@property (nonatomic, readonly, strong) NSNumber *timetoken; - -/** - * @brief Unique user identifier for which event has been triggered. - * - * @return UUID string. - */ -@property (nonatomic, nullable, readonly, strong) NSString *uuid; - -/** - * @brief List of newly joined subscribers' UUID. - * - * @note Value set (if data available) only for \c interval presence events. - * - * @return List of UUIDs for subscribers which joined channel since last interval or regular - * presence event has been received. - * - * @since 4.5.16 - */ -@property (nonatomic, nullable, readonly, strong) NSArray *join; - -/** - * @brief List of recently leaved subscribers' UUID. - * - * @note Value set (if data available) only for \c interval presence events. - * - * @return List of UUIDs for subscribers which leaved channel since last interval or regular - * presence event has been received. - * - * @since 4.5.16 - */ -@property (nonatomic, nullable, readonly, strong) NSArray *leave; - -/** - * @brief List of recently UUID of subscribers which leaved by timeout. - * - * @note Value set (if data available) only for \c interval presence events. - * - * @return List of UUIDs for subscribers which leaved channel by timeout since last interval or - * regular presence event has been received. - * - * @since 4.5.16 - */ -@property (nonatomic, nullable, readonly, strong) NSArray *timeout; - -/** - * @brief Channel presence information. - * - * @return Number of subscribers which become after presence event has been triggered. - */ -@property (nonatomic, readonly, strong) NSNumber *occupancy; - -/** - * @brief User changed client state. - * - * @return In case of state change presence event will contain actual client state infotmation for - * \c -uuid. - */ -@property (nonatomic, nullable, readonly, strong) NSDictionary *state; - -#pragma mark - - - -@end - - -/** - * @brief Class which allow to get access to general presence information which has been received - * on remote data object's live feed. - * - * @author Serhii Mamontov - * @version 4.9.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNPresenceEventData : PNSubscriberData - - -#pragma mark - Information - -/** - * @brief Type of presence event. - * - * @return One of available presence event types. - */ -@property (nonatomic, readonly, strong) NSString *presenceEvent; - -/** - * @brief Additional presence information. - * - * @return Object which has additional information about arrived presence event. - */ -@property (nonatomic, readonly, strong) PNPresenceDetailsData *presence; - -#pragma mark - - - -@end - - -/** - * @brief Class which allow to get access to message body received from remote object live feed. - * - * @author Serhii Mamontov - * @version 4.9.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNMessageData : PNSubscriberData - - -#pragma mark - Information - -/** - * @brief Message sender identifier. - * - * @discussion Unique identifier of configured remote client which sent this \c message. - * - * @since 4.5.6 -*/ -@property (nonatomic, readonly, strong) NSString *publisher; - -/** - * @brief Message which has been delivered through data object live feed. - * - * @return De-serialized message object. - */ -@property (nonatomic, nullable, readonly, strong) id message; - -#pragma mark - - - -@end - - -/** - * @brief Class which allow to get access to signal body received from remote object live feed. - * - * @author Serhii Mamontov - * @version 4.9.0 - * @since 4.9.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNSignalData : PNMessageData - - -#pragma mark - - - -@end - - -/** - * @brief Class which allow to get access to \c action body received from remote object live feed. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNMessageActionData : PNSubscriberData - - -#pragma mark - Information - -/** - * @brief \c Action for which event has been received. - */ -@property (nonatomic, readonly, strong) PNMessageAction *action; - -/** - * @brief Name of action for which \c message \c action event has been sent. - */ -@property (nonatomic, readonly, copy) NSString *event; - -#pragma mark - - - -@end - - -/** - * @brief Class which allow to get access to \c objects event body received from remote object live - * feed. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNObjectEventData : PNSubscriberData - - -#pragma mark - Information - -/** - * @brief This property will be set only if event \c type is \c channel and represent \c channel - * \c metadata. - */ -@property (nonatomic, nullable, readonly, strong) PNChannelMetadata *channelMetadata; - -/** - * @brief This property will be set only if event \c type is \c uuid and represent \c uuid - * \c metadata. - */ -@property (nonatomic, nullable, readonly, strong) PNUUIDMetadata *uuidMetadata; - -/** - * @brief This property will be set only if event \c type is \c membership and represent - * \c uuid \c membership. - */ -@property (nonatomic, nullable, readonly, strong) PNMembership *membership; - -/** - * @brief Time when \c object event has been triggered. - * - * @return Number with unsigned long long timestamp. - */ -@property (nonatomic, readonly, strong) NSNumber *timestamp; - -/** - * @brief Name of action for which \c object event has been sent. - */ -@property (nonatomic, readonly, strong) NSString *event; - -/** - * @brief Type of \c object which has been changed and triggered event. - */ -@property (nonatomic, readonly, strong) NSString *type; - -#pragma mark - - - -@end - - -/** - * @brief Class which allow to get access to \c file event body received from remote object live feed. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFileEventData : PNSubscriberData - - -#pragma mark - Information - -/** - * @brief Information about file which has been uploaded to \c channel - */ -@property (nonatomic, nullable, readonly, strong) PNFile *file; - -/** - * @brief Message which has been sent along with uploaded \c file to \c channel. - */ -@property (nonatomic, nullable, readonly, strong) id message; - -#pragma mark - - - -@end - - -/** - * @brief Class which is used to provide access to request processing results. - * - * @author Serhii Mamontov - * @version 4.9.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNMessageResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief Stores reference on message object from live feed. - */ -@property (nonatomic, readonly, strong) PNMessageData *data; - -#pragma mark - - - -@end - - -/** - * @brief Class which is used to provide access to subscribe request processing results. - * - * @author Serhii Mamontov - * @version 4.9.0 - * @since 4.9.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNSignalResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief Signal object from live feed. - */ -@property (nonatomic, readonly, strong) PNSignalData *data; - -#pragma mark - - - -@end - - -/** - * @brief Class which is used to provide access to subscribe request processing results. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNMessageActionResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c Message \c action object from live feed. - */ -@property (nonatomic, readonly, strong) PNMessageActionData *data; - -#pragma mark - - - -@end - - -/** - * @brief Class which is used to provide access to request processing results. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNObjectEventResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c Object event object from live feed. - */ -@property (nonatomic, readonly, strong) PNObjectEventData *data; - -#pragma mark - - - -@end - - -/** - * @brief Class which is used to provide access to request processing results. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFileEventResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief \c File \c event object from live feed. - */ -@property (nonatomic, readonly, strong) PNFileEventData *data; - -#pragma mark - - - -@end - - -/** - * @brief Class which is used to provide access to request processing results. - * - * @author Serhii Mamontov - * @version 4.9.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNPresenceEventResult : PNOperationResult - - -#pragma mark - Information - -/** - * @brief Stores reference on presence event object from live feed. - */ -@property (nonatomic, readonly, strong) PNPresenceEventData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNSubscriberResults.m b/PubNub/Data/Service Objects/PNSubscriberResults.m deleted file mode 100644 index 3d327c8eb..000000000 --- a/PubNub/Data/Service Objects/PNSubscriberResults.m +++ /dev/null @@ -1,378 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.10.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "NSDateFormatter+PNCacheable.h" -#import "PNChannelMetadata+Private.h" -#import "PNSubscribeStatus+Private.h" -#import "PNOperationResult+Private.h" -#import "PNMessageAction+Private.h" -#import "PNUUIDMetadata+Private.h" -#import "PNServiceData+Private.h" -#import "PNMembership+Private.h" -#import "PNSubscriberResults.h" -#import "PNFile+Private.h" - -#pragma mark Protected interfaces declaration - -@interface PNMessageResult () - - -#pragma mark - Properties - -@property (nonatomic, strong) PNMessageData *data; - -#pragma mark - - - -@end - - -@interface PNSignalResult () - - -#pragma mark - Properties - -@property (nonatomic, strong) PNSignalData *data; - -#pragma mark - - - -@end - - -@interface PNMessageActionResult () - - -#pragma mark - Properties - -@property (nonatomic, strong) PNMessageActionData *data; - -#pragma mark - - - -@end - - -@interface PNPresenceEventResult () - - -#pragma mark - Properties - -@property (nonatomic, strong) PNPresenceEventData *data; - -#pragma mark - - - -@end - - -@interface PNObjectEventResult () - - -#pragma mark - Properties - -@property (nonatomic, strong) PNObjectEventData *data; - -#pragma mark - - - -@end - - -@interface PNFileEventResult () - - -#pragma mark - Properties - -@property (nonatomic, strong) PNFileEventData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interfaces implementation - -@implementation PNPresenceDetailsData - - -#pragma mark - Infogmration - -- (NSNumber *)timetoken { - return self.serviceData[@"timetoken"]; -} - -- (NSString *)uuid { - return self.serviceData[@"uuid"]; -} - -- (NSArray *)join { - return self.serviceData[@"join"]; -} - -- (NSArray *)leave { - return self.serviceData[@"leave"]; -} - -- (NSArray *)timeout { - return self.serviceData[@"timeout"]; -} - -- (NSNumber *)occupancy { - return self.serviceData[@"occupancy"]; -} - -- (NSDictionary *)state { - return self.serviceData[@"state"]; -} - -#pragma mark - - - -@end - - -@implementation PNPresenceEventData - - -#pragma mark - Information - -- (NSString *)presenceEvent { - return self.serviceData[@"presenceEvent"]; -} - -- (PNPresenceDetailsData *)presence { - return [PNPresenceDetailsData dataWithServiceResponse:self.serviceData[@"presence"]]; -} - -#pragma mark - - - -@end - - -@implementation PNMessageData - - -#pragma mark - Information - -- (NSString *)publisher { - return self.envelope.senderIdentifier; -} - -- (id)message { - return self.serviceData[@"message"]; -} - -#pragma mark - - - -@end - - -@implementation PNSignalData - -#pragma mark - - -@end - - -@implementation PNMessageActionData - - -#pragma mark - Information - -- (PNMessageAction *)action { - return [PNMessageAction actionFromDictionary:self.serviceData[@"action"]]; -} - -- (NSString *)event { - return self.serviceData[@"event"]; -} - -#pragma mark - - - -@end - - -@implementation PNObjectEventData - - -#pragma mark - Information - -- (PNChannelMetadata *)channelMetadata { - if (![self.type isEqualToString:@"channel"]) { - return nil; - } - - return [PNChannelMetadata channelMetadataFromDictionary:self.serviceData[@"channel"]]; -} - -- (PNUUIDMetadata *)uuidMetadata { - if (![self.type isEqualToString:@"uuid"]) { - return nil; - } - - return [PNUUIDMetadata uuidMetadataFromDictionary:self.serviceData[@"uuid"]]; -} - -- (PNMembership *)membership { - if (![self.type isEqualToString:@"membership"]) { - return nil; - } - - return [PNMembership membershipFromDictionary:self.serviceData[@"membership"]]; -} - -- (NSNumber *)timestamp { - return @(((NSNumber *)self.serviceData[@"timetoken"]).unsignedLongLongValue / 10000000); -} - -- (NSString *)event { - return self.serviceData[@"event"]; -} - -- (NSString *)type { - return self.serviceData[@"type"]; -} - -#pragma mark - - - -@end - - -@implementation PNFileEventData - - -#pragma mark - Information - -- (PNFile *)file { - return [PNFile fileFromDictionary:self.serviceData[@"file"]]; -} - -- (id)message { - return self.serviceData[@"message"]; -} - -#pragma mark - - - -@end - - -@implementation PNMessageResult - - -#pragma mark - Information - -- (PNMessageData *)data { - if (!_data) { - _data = [PNMessageData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end - - -@implementation PNSignalResult - - -#pragma mark - Information - -- (PNSignalData *)data { - if (!_data) { - _data = [PNSignalData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end - - -@implementation PNMessageActionResult - - -#pragma mark - Information - -- (PNMessageActionData *)data { - if (!_data) { - _data = [PNMessageActionData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end - - -@implementation PNPresenceEventResult - - -#pragma mark - Information - -- (PNPresenceEventData *)data { - if (!_data) { - _data = [PNPresenceEventData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - - -@end - - -@implementation PNObjectEventResult - - -#pragma mark - Information - -- (PNObjectEventData *)data { - if (!_data) { - _data = [PNObjectEventData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - -@end - - -@implementation PNFileEventResult - - -#pragma mark - Information - -- (PNFileEventData *)data { - if (!_data) { - _data = [PNFileEventData dataWithServiceResponse:self.serviceData]; - } - - return _data; -} - -#pragma mark - - -@end diff --git a/PubNub/Data/Service Objects/PNTimeResult.h b/PubNub/Data/Service Objects/PNTimeResult.h deleted file mode 100644 index e71daa93e..000000000 --- a/PubNub/Data/Service Objects/PNTimeResult.h +++ /dev/null @@ -1,60 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Class which allow to get access to time API processed result. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNTimeData : PNServiceData - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Current time on \b PubNub network servers. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) NSNumber *timetoken; - -#pragma mark - - - -@end - - -/** - @brief Class which is used to provide access to request processing results. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNTimeResult : PNOperationResult - - -///------------------------------------------------ -/// @name Information -///------------------------------------------------ - -/** - @brief Stores reference on time request processing information. - - @since 4.0 - */ -@property (nonatomic, readonly, strong) PNTimeData *data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/PNTimeResult.m b/PubNub/Data/Service Objects/PNTimeResult.m deleted file mode 100644 index 968d58f5f..000000000 --- a/PubNub/Data/Service Objects/PNTimeResult.m +++ /dev/null @@ -1,60 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNTimeResult.h" -#import "PNOperationResult+Private.h" -#import "PNServiceData+Private.h" - - -#pragma mark - Interface implementation - -@implementation PNTimeData - - -#pragma mark - Information - -- (NSNumber *)timetoken { - - return (self.serviceData[@"timetoken"]?: @0); -} - -#pragma mark - - - -@end - - -#pragma mark - Private interface declaration - -@interface PNTimeResult () - - -#pragma mark - Properties - -@property (nonatomic, strong) PNTimeData *data; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNTimeResult - - -#pragma mark - Information - -- (PNTimeData *)data { - - if (!_data) { _data = [PNTimeData dataWithServiceResponse:self.serviceData]; } - return _data; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Service Objects/Presence/PNChannelClientStateResult+Private.h b/PubNub/Data/Service Objects/Presence/PNChannelClientStateResult+Private.h new file mode 100644 index 000000000..62c07ad2c --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNChannelClientStateResult+Private.h @@ -0,0 +1,25 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +@interface PNChannelClientStateResult (Private) + + +#pragma mark - Initialization and Configuration + +/// Create backward-compatible here now result object. +/// +/// - Parameter presence: Here now result from request-based interface. +/// - Returns: Ready to use backward-compatible here now result object. ++ (instancetype)legacyPresenceFromPresence:(PNPresenceStateFetchResult *)presence; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNChannelClientStateResult.h b/PubNub/Data/Service Objects/Presence/PNChannelClientStateResult.h new file mode 100644 index 000000000..f517a7315 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNChannelClientStateResult.h @@ -0,0 +1,40 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `User presence state for channel` response. +@interface PNChannelClientStateData :NSObject + + +#pragma mark - Properties + +/// User presence state information for channel. +@property (nonatomic, readonly, strong) NSDictionary *state; + +#pragma mark - + + +@end + + +#pragma mark - Interface declaration + +/// `Fetch user presence state for channel` request processing result. +@interface PNChannelClientStateResult : PNOperationResult + + +#pragma mark - Properties + +/// `User presence state for channel` request processing information. +@property (nonatomic, readonly, strong) PNChannelClientStateData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNChannelClientStateResult.m b/PubNub/Data/Service Objects/Presence/PNChannelClientStateResult.m new file mode 100644 index 000000000..f03bca0ff --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNChannelClientStateResult.m @@ -0,0 +1,82 @@ +#import "PNChannelClientStateResult+Private.h" +#import "PNOperationResult+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `User presence state for channel` response. +@interface PNChannelClientStateData () + + +#pragma mark - Properties + +/// Channels presence information. +@property(strong, nonatomic, readonly) PNPresenceUserStateFetchData *presenceData; + + +#pragma mark - Initialization and Configuration + +/// Initialize global presence response object. +/// +/// - Parameter presenceData: Channels presence information. +/// - Returns: Initialized global presence response object. +- (instancetype)initWithPresenceData:(PNPresenceUserStateFetchData *)presenceData; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNChannelClientStateData + + +#pragma mark - Properties + +- (NSDictionary *)state { + return self.presenceData.state; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithPresenceData:(PNPresenceUserStateFetchData *)presenceData { + if ((self = [super init])) _presenceData = presenceData; + return self; +} + +#pragma mark - + + +@end + + +#pragma mark - Interface implementation + +@implementation PNChannelClientStateResult + + +#pragma mark - Initialization and Configuration + ++ (instancetype)legacyPresenceFromPresence:(PNPresenceStateFetchResult *)presence { + return [self objectWithOperation:PNStateForChannelOperation + response:[[PNChannelClientStateData alloc] initWithPresenceData:presence.responseData]]; +} + + +#pragma mark - Properties + +- (PNChannelClientStateData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Presence/PNChannelGroupClientStateResult+Private.h b/PubNub/Data/Service Objects/Presence/PNChannelGroupClientStateResult+Private.h new file mode 100644 index 000000000..5dcee6695 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNChannelGroupClientStateResult+Private.h @@ -0,0 +1,26 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Fetch user presence state for channel group` request processing result private extension. +@interface PNChannelGroupClientStateResult (Private) + + +#pragma mark - Initialization and Configuration + +/// Create backward-compatible here now result object. +/// +/// - Parameter presence: Here now result from request-based interface. +/// - Returns: Ready to use backward-compatible here now result object. ++ (instancetype)legacyPresenceFromPresence:(PNPresenceStateFetchResult *)presence; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNChannelGroupClientStateResult.h b/PubNub/Data/Service Objects/Presence/PNChannelGroupClientStateResult.h new file mode 100644 index 000000000..86aaa4869 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNChannelGroupClientStateResult.h @@ -0,0 +1,39 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `User presence state for channel group` response. +@interface PNChannelGroupClientStateData : NSObject + + +#pragma mark - Properties + +/// Multi channel client state information. +@property (nonatomic, readonly, strong) NSDictionary *channels; + +#pragma mark - + + +@end + + +#pragma mark - Interface implementation + +/// `Fetch user presence state for channel group` request processing result. +@interface PNChannelGroupClientStateResult : PNOperationResult + + +#pragma mark - Properties + +/// `User presence state for channel group` request processing information. +@property (nonatomic, readonly, strong) PNChannelGroupClientStateData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNChannelGroupClientStateResult.m b/PubNub/Data/Service Objects/Presence/PNChannelGroupClientStateResult.m new file mode 100644 index 000000000..7ee59a771 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNChannelGroupClientStateResult.m @@ -0,0 +1,79 @@ +#import "PNChannelGroupClientStateResult+Private.h" +#import "PNOperationResult+Private.h" +#import "PNServiceData+Private.h" + + + +#pragma mark - Private interface declaration + +/// `Fetch user presence state for channel group` request processing result . +@interface PNChannelGroupClientStateData () + + +#pragma mark - Properties + +/// Channels presence information. +@property(strong, nonatomic, readonly) PNPresenceUserStateFetchData *presenceData; + + +#pragma mark - Initialization and Configuration + +/// Initialize global presence response object. +/// +/// - Parameter presenceData: Channels presence information. +/// - Returns: Initialized global presence response object. +- (instancetype)initWithPresenceData:(PNPresenceUserStateFetchData *)presenceData; + +#pragma mark - + + +@end + + +#pragma mark - Interface implementation + +@implementation PNChannelGroupClientStateData + + +#pragma mark - Properties + +- (NSDictionary *)channels { + return self.presenceData.channels; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithPresenceData:(PNPresenceUserStateFetchData *)presenceData { + if ((self = [super init])) _presenceData = presenceData; + return self; +} + +#pragma mark - + + +@end + +#pragma mark - Interface implementation + +@implementation PNChannelGroupClientStateResult + + +#pragma mark - Initialization and Configuration + ++ (instancetype)legacyPresenceFromPresence:(PNPresenceStateFetchResult *)presence { + return [self objectWithOperation:PNStateForChannelGroupOperation + response:[[PNChannelGroupClientStateData alloc] initWithPresenceData:presence.responseData]]; +} + + +#pragma mark - Information + +- (PNChannelGroupClientStateData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Presence/PNClientStateGetResult+Private.h b/PubNub/Data/Service Objects/Presence/PNClientStateGetResult+Private.h new file mode 100644 index 000000000..6188d0265 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNClientStateGetResult+Private.h @@ -0,0 +1,25 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Fetch user presence for channels / channel groups` request processing result private extension. +@interface PNClientStateGetResult (Private) + + +#pragma mark - Initialization and Configuration + +/// Create backward-compatible fetch presence state result object. +/// +/// - Parameter state: Presence state result from request-based interface. +/// - Returns: Ready to use backward-compatible presence state result object. ++ (instancetype)legacyPresenceStateFromPresenceState:(PNPresenceStateFetchResult *)state; + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNClientStateGetResult.h b/PubNub/Data/Service Objects/Presence/PNClientStateGetResult.h new file mode 100644 index 000000000..1e7665023 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNClientStateGetResult.h @@ -0,0 +1,39 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaraion + +/// `Fetch user presence for channels / channel groups` response. +@interface PNClientStateData : NSObject + + +#pragma mark - Properties + +/// Per-channel user presence state information. +@property (nonatomic, readonly, strong) NSDictionary *channels; + +#pragma mark - + + +@end + + +#pragma mark - Interface declaraion + +/// `Fetch user presence for channels / channel groups` request processing result. +@interface PNClientStateGetResult : PNOperationResult + + +#pragma mark - Properties + +/// `Fetch user presence for channels / channel groups` request processed information. +@property (nonatomic, readonly, strong) PNClientStateData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNClientStateGetResult.m b/PubNub/Data/Service Objects/Presence/PNClientStateGetResult.m new file mode 100644 index 000000000..e345a16e1 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNClientStateGetResult.m @@ -0,0 +1,83 @@ +#import "PNClientStateGetResult+Private.h" +#import "PNPresenceUserStateFetchData+Private.h" +#import "PNOperationResult+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Fetch user presence for channels / channel groups` response private extension. +@interface PNClientStateData () + + +#pragma mark - Properties + +/// User presence state information. +@property(strong, nonnull, nonatomic) PNPresenceUserStateFetchData *stateData; + + +#pragma mark - Initialization and Configuration + +/// Initialize user presence state response object. +/// +/// - Parameter stateData: User presence state information. +/// - Returns: Initialized user presence state response object. +- (instancetype)initWithPresenceData:(PNPresenceUserStateFetchData *)stateData; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNClientStateData + + +#pragma mark - Properties + +- (NSDictionary *)channels { + if (self.stateData.channel) return @{ self.stateData.channel: self.stateData.state }; + return self.stateData.channels; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithPresenceData:(PNPresenceUserStateFetchData *)stateData { + if ((self = [super init])) _stateData = stateData; + return self; +} + +#pragma mark - + + +@end + + +#pragma mark - Interface implementation + +@implementation PNClientStateGetResult + + +#pragma mark - Initialization and Configuration + ++ (instancetype)legacyPresenceStateFromPresenceState:(PNPresenceStateFetchResult *)state { + return [self objectWithOperation:state.operation + response:[[PNClientStateData alloc] initWithPresenceData:state.responseData]]; +} + + +#pragma mark - Properties + +- (PNClientStateData *)data { + return self.responseData; +} + +#pragma mark - + +@end diff --git a/PubNub/Data/Service Objects/Presence/PNClientStateUpdateStatus.h b/PubNub/Data/Service Objects/Presence/PNClientStateUpdateStatus.h new file mode 100644 index 000000000..1c1fcc577 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNClientStateUpdateStatus.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `User presence state update` request processing status. +@interface PNClientStateUpdateStatus : PNErrorStatus + + +#pragma mark - Properties + +/// `User presence state update` processed information. +@property(strong, nonatomic, readonly, strong) PNPresenceUserStateSetData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNClientStateUpdateStatus.m b/PubNub/Data/Service Objects/Presence/PNClientStateUpdateStatus.m new file mode 100644 index 000000000..c808e1220 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNClientStateUpdateStatus.m @@ -0,0 +1,24 @@ +#import "PNClientStateUpdateStatus.h" +#import "PNOperationResult+Private.h" +#import "PNStatus+Private.h" + + +#pragma mark - Interface implementation + +@implementation PNClientStateUpdateStatus + + +#pragma mark - Information + ++ (Class)statusDataClass { + return [PNPresenceUserStateSetData class]; +} + +- (PNPresenceUserStateSetData *)data { + return !self.isError ? self.responseData : nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceChannelGroupHereNowResult+Private.h b/PubNub/Data/Service Objects/Presence/PNPresenceChannelGroupHereNowResult+Private.h new file mode 100644 index 000000000..7e4b47479 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceChannelGroupHereNowResult+Private.h @@ -0,0 +1,24 @@ +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Channel group presence response private extension. +@interface PNPresenceChannelGroupHereNowResult (Private) + + +#pragma mark - Initialization and Configuration + +/// Create backward-compatible here now result object. +/// +/// - Parameter presence: Here now result from request-based interface. +/// - Returns: Ready to use backward-compatible here now result object. ++ (instancetype)legacyPresenceFromPresence:(PNPresenceHereNowResult *)presence; + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceChannelGroupHereNowResult.h b/PubNub/Data/Service Objects/Presence/PNPresenceChannelGroupHereNowResult.h new file mode 100644 index 000000000..98befd31c --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceChannelGroupHereNowResult.h @@ -0,0 +1,34 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Channel group presence response. +@interface PNPresenceChannelGroupHereNowData : PNPresenceGlobalHereNowData + + +#pragma mark - + + +@end + + +#pragma mark - Interface declaration + +/// Channel group presence request result. +@interface PNPresenceChannelGroupHereNowResult : PNOperationResult + + +#pragma mark - Information + +/// Channel group presence request processing information. +@property (nonatomic, nonnull, readonly, strong) PNPresenceChannelGroupHereNowData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceChannelGroupHereNowResult.m b/PubNub/Data/Service Objects/Presence/PNPresenceChannelGroupHereNowResult.m new file mode 100644 index 000000000..39debbe88 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceChannelGroupHereNowResult.m @@ -0,0 +1,83 @@ +#import "PNPresenceChannelGroupHereNowResult+Private.h" +#import "PNPresenceHereNowFetchData+Private.h" +#import "PNOperationResult+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Channel group presence response private extension. +@interface PNPresenceChannelGroupHereNowData () + + +#pragma mark - Properties + +/// Channels presence information. +@property(strong, nonatomic, readonly) PNPresenceHereNowFetchData *presenceData; + + +#pragma mark - Initialization and Configuration + +/// Initialize channel group presence response object. +/// +/// - Parameter presenceData: Channels presence information. +/// - Returns: Initialized channel group presence response object. +- (instancetype)initWithPresenceData:(PNPresenceHereNowFetchData *)presenceData; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark Interface implementation + +@implementation PNPresenceChannelGroupHereNowData + + +#pragma mark - Properties + ++ (NSArray *)ignoredKeys { + return @[@"presenceData"]; +} + + +#pragma mark - Initialization and Condiguration + +- (instancetype)initWithPresenceData:(PNPresenceHereNowFetchData *)presenceData { + if ((self = [super init])) _presenceData = presenceData; + return self; +} + +#pragma mark - + + +@end + + +#pragma mark - Interface implementation + +@implementation PNPresenceChannelGroupHereNowResult + + +#pragma mark - Initialization and Configuration + ++ (instancetype)legacyPresenceFromPresence:(PNPresenceHereNowResult *)presence { + id response = [[PNPresenceChannelGroupHereNowData alloc] initWithPresenceData:presence.responseData]; + return [self objectWithOperation:presence.operation response:response]; +} + + +#pragma mark - Properties + +- (PNPresenceChannelGroupHereNowData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceChannelHereNowResult+Private.h b/PubNub/Data/Service Objects/Presence/PNPresenceChannelHereNowResult+Private.h new file mode 100644 index 000000000..43f62541f --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceChannelHereNowResult+Private.h @@ -0,0 +1,25 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Channel presence response private extension. +@interface PNPresenceChannelHereNowResult (Private) + + +#pragma mark - Initialization and Configuration + +/// Create backward-compatible here now result object. +/// +/// - Parameter presence: Here now result from request-based interface. +/// - Returns: Ready to use backward-compatible here now result object. ++ (instancetype)legacyPresenceFromPresence:(PNPresenceHereNowResult *)presence; + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceChannelHereNowResult.h b/PubNub/Data/Service Objects/Presence/PNPresenceChannelHereNowResult.h new file mode 100644 index 000000000..76e4212d6 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceChannelHereNowResult.h @@ -0,0 +1,53 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Channel presence response. +@interface PNPresenceChannelHereNowData : NSObject + + +#pragma mark - Properties + +/// Active channels list. +/// +/// Each dictionary key represent channel name and it's value is presence information for it. +@property(strong, nonatomic, nullable, readonly) NSDictionary *channels; + +/// Active channel subscribers unique identifiers. +@property(strong, nonatomic, nullable, readonly) id uuids; + + +/// Total number of subscribers. +/// +/// Information available only when 'Here now' requested for list of channels and will be **0** in other case. +@property (nonatomic, readonly, strong) NSNumber *totalOccupancy; + +/// Active subscribers count. +@property (nonatomic, readonly, strong) NSNumber *occupancy; + +#pragma mark - + + +@end + + +#pragma mark - Interface declaration + +/// Channel presence request result. +@interface PNPresenceChannelHereNowResult : PNOperationResult + + +#pragma mark - Properties + +/// Channel presence request processing information. +@property (nonatomic, readonly, strong) PNPresenceChannelHereNowData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceChannelHereNowResult.m b/PubNub/Data/Service Objects/Presence/PNPresenceChannelHereNowResult.m new file mode 100644 index 000000000..2dd0956b7 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceChannelHereNowResult.m @@ -0,0 +1,110 @@ +#import "PNPresenceChannelHereNowResult+Private.h" +#import "PNPresenceHereNowFetchData+Private.h" +#import "PNOperationResult+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Channel presence response private extension. +@interface PNPresenceChannelHereNowData () + + +#pragma mark - Properties + +/// Channels presence information. +@property(strong, nonatomic, readonly) PNPresenceHereNowFetchData *presenceData; + + +#pragma mark - Initialization and Configuration + +/// Initialize channel presence response object. +/// +/// - Parameter presenceData: Channels presence information. +/// - Returns: Initialized channel presence response object. +- (instancetype)initWithPresenceData:(PNPresenceHereNowFetchData *)presenceData; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark Interface implementation + +@implementation PNPresenceChannelHereNowData + + +#pragma mark - Properties + ++ (NSArray *)ignoredKeys { + return @[@"presenceData"]; +} + +- (id)uuids { + PNPresenceChannelData *channel = self.presenceData.channels.allValues.firstObject; + PNHereNowVerbosityLevel level = channel.verbosityLevel; + + if (level == PNHereNowUUID) return [channel.uuids valueForKey:@"uuid"]; + return [channel.uuids valueForKey:@"dictionaryRepresentation"]; +} + +- (NSDictionary *)channels { + NSMutableDictionary *channels = [NSMutableDictionary dictionaryWithCapacity:self.presenceData.channels.count]; + [self.presenceData.channels enumerateKeysAndObjectsUsingBlock:^(NSString *channel, + PNPresenceChannelData *data, + __unused BOOL * stop) { + channels[channel] = [data dictionaryRepresentation]; + }]; + + return channels; +} + +- (NSNumber *)totalOccupancy { + return self.presenceData.totalOccupancy; +} + +- (NSNumber *)occupancy { + return self.presenceData.totalOccupancy; +} + + +#pragma mark - Initialization and Condiguration + +- (instancetype)initWithPresenceData:(PNPresenceHereNowFetchData *)presenceData { + if ((self = [super init])) _presenceData = presenceData; + return self; +} + +#pragma mark - + + +@end + + +#pragma mark - Interface implementation + +@implementation PNPresenceChannelHereNowResult + + +#pragma mark - Initialization and Configuration + ++ (instancetype)legacyPresenceFromPresence:(PNPresenceHereNowResult *)presence { + return [self objectWithOperation:presence.operation + response:[[PNPresenceChannelHereNowData alloc] initWithPresenceData:presence.responseData]]; +} + + +#pragma mark - Properties + +- (PNPresenceChannelHereNowData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceGlobalHereNowResult+Private.h b/PubNub/Data/Service Objects/Presence/PNPresenceGlobalHereNowResult+Private.h new file mode 100644 index 000000000..bea07fdab --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceGlobalHereNowResult+Private.h @@ -0,0 +1,25 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Global presence response private extension. +@interface PNPresenceGlobalHereNowResult (Private) + + +#pragma mark - Initialization and Configuration + +/// Create backward-compatible here now result object. +/// +/// - Parameter presence: Here now result from request-based interface. +/// - Returns: Ready to use backward-compatible here now result object. ++ (instancetype)legacyPresenceFromPresence:(PNPresenceHereNowResult *)presence; + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceGlobalHereNowResult.h b/PubNub/Data/Service Objects/Presence/PNPresenceGlobalHereNowResult.h new file mode 100644 index 000000000..7676d79e5 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceGlobalHereNowResult.h @@ -0,0 +1,47 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Global presence response. +@interface PNPresenceGlobalHereNowData : NSObject + + +#pragma mark - Properties + +/// Active channels list. +/// +/// Each dictionary key represent channel name and it's value is presence information for it. +@property (nonatomic, readonly, strong) NSDictionary *channels; + +/// Total number of active channels. +@property (nonatomic, readonly, strong) NSNumber *totalChannels; + +/// Total number of subscribers. +@property (nonatomic, readonly, strong) NSNumber *totalOccupancy; + +#pragma mark - + + +@end + + +#pragma mark - Interface declaration + +/// Global channels presence request result. +@interface PNPresenceGlobalHereNowResult : PNOperationResult + + +#pragma mark - Properties + +/// Global presence request processing information. +@property (nonatomic, readonly, strong) PNPresenceGlobalHereNowData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceGlobalHereNowResult.m b/PubNub/Data/Service Objects/Presence/PNPresenceGlobalHereNowResult.m new file mode 100644 index 000000000..3a704115f --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceGlobalHereNowResult.m @@ -0,0 +1,102 @@ +#import "PNPresenceGlobalHereNowResult+Private.h" +#import "PNPresenceHereNowFetchData+Private.h" +#import "PNOperationResult+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Global presence response private extension. +@interface PNPresenceGlobalHereNowData () + + +#pragma mark - Properties + +/// Channels presence information. +@property(strong, nonatomic, readonly) PNPresenceHereNowFetchData *presenceData; + + +#pragma mark - Initialization and Configuration + +/// Initialize global presence response object. +/// +/// - Parameter presenceData: Channels presence information. +/// - Returns: Initialized global presence response object. +- (instancetype)initWithPresenceData:(PNPresenceHereNowFetchData *)presenceData; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNPresenceGlobalHereNowData + + +#pragma mark - Properties + ++ (NSArray *)ignoredKeys { + return @[@"presenceData"]; +} + +- (NSDictionary *)channels { + NSMutableDictionary *channels = [NSMutableDictionary dictionaryWithCapacity:self.presenceData.channels.count]; + [self.presenceData.channels enumerateKeysAndObjectsUsingBlock:^(NSString *channel, + PNPresenceChannelData *data, + __unused BOOL * stop) { + channels[channel] = [data dictionaryRepresentation]; + }]; + + return channels; +} + +- (NSNumber *)totalChannels { + return self.presenceData.totalChannels; +} + +- (NSNumber *)totalOccupancy { + return self.presenceData.totalOccupancy; +} + + +#pragma mark - Initialization and Condiguration + +- (instancetype)initWithPresenceData:(PNPresenceHereNowFetchData *)presenceData { + if ((self = [super init])) _presenceData = presenceData; + return self; +} + +#pragma mark - + + +@end + + +#pragma mark - Interface implementation + +@implementation PNPresenceGlobalHereNowResult + + +#pragma mark - Initialization and Configuration + ++ (instancetype)legacyPresenceFromPresence:(PNPresenceHereNowResult *)presence { + return [self objectWithOperation:presence.operation + response:[[PNPresenceGlobalHereNowData alloc] initWithPresenceData:presence.responseData]]; +} + + +#pragma mark - Properties + +- (PNPresenceGlobalHereNowData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceHereNowResult.h b/PubNub/Data/Service Objects/Presence/PNPresenceHereNowResult.h new file mode 100644 index 000000000..ca8158859 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceHereNowResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Channels presence` request result. +@interface PNPresenceHereNowResult : PNOperationResult + + +#pragma mark - Properties + +/// Processed channel presence information. +@property(strong, nonatomic, readonly) PNPresenceHereNowFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceHereNowResult.m b/PubNub/Data/Service Objects/Presence/PNPresenceHereNowResult.m new file mode 100644 index 000000000..767fe0080 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceHereNowResult.m @@ -0,0 +1,23 @@ +#import "PNPresenceHereNowResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNPresenceHereNowResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNPresenceHereNowFetchData class]; +} + +- (PNPresenceHereNowFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceStateFetchResult.h b/PubNub/Data/Service Objects/Presence/PNPresenceStateFetchResult.h new file mode 100644 index 000000000..762f911e7 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceStateFetchResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Fetch associated presence state request processing result. +@interface PNPresenceStateFetchResult : PNOperationResult + + +#pragma mark - Properties + +/// `Fetch user presence state` processed information. +@property(strong, nonatomic, readonly) PNPresenceUserStateFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceStateFetchResult.m b/PubNub/Data/Service Objects/Presence/PNPresenceStateFetchResult.m new file mode 100644 index 000000000..603ea5d87 --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceStateFetchResult.m @@ -0,0 +1,23 @@ +#import "PNPresenceStateFetchResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNPresenceStateFetchResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNPresenceUserStateFetchData class]; +} + +- (PNPresenceUserStateFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceWhereNowResult.h b/PubNub/Data/Service Objects/Presence/PNPresenceWhereNowResult.h new file mode 100644 index 000000000..3e39478df --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceWhereNowResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `User presence` request result. +@interface PNPresenceWhereNowResult : PNOperationResult + + +#pragma mark - Properties + +/// User presence request processing information. +@property (nonatomic, readonly, strong) PNPresenceWhereNowFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Presence/PNPresenceWhereNowResult.m b/PubNub/Data/Service Objects/Presence/PNPresenceWhereNowResult.m new file mode 100644 index 000000000..c02f5bcfb --- /dev/null +++ b/PubNub/Data/Service Objects/Presence/PNPresenceWhereNowResult.m @@ -0,0 +1,23 @@ +#import "PNPresenceWhereNowResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNPresenceWhereNowResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNPresenceWhereNowFetchData class]; +} + +- (PNPresenceWhereNowFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Publish/PNPublishStatus.h b/PubNub/Data/Service Objects/Publish/PNPublishStatus.h new file mode 100644 index 000000000..49208f246 --- /dev/null +++ b/PubNub/Data/Service Objects/Publish/PNPublishStatus.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Publish request processing status. +@interface PNPublishStatus : PNAcknowledgmentStatus + + +#pragma mark - Properties + +/// Publish request response from remote service. +@property(strong, nonatomic, readonly) PNPublishData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Publish/PNPublishStatus.m b/PubNub/Data/Service Objects/Publish/PNPublishStatus.m new file mode 100644 index 000000000..0b7a090d7 --- /dev/null +++ b/PubNub/Data/Service Objects/Publish/PNPublishStatus.m @@ -0,0 +1,24 @@ +#import "PNPublishStatus.h" +#import "PNOperationResult+Private.h" +#import "PNStatus+Private.h" + + +#pragma mark Interface implementation + +@implementation PNPublishStatus + + +#pragma mark - Properties + ++ (Class)statusDataClass { + return [PNPublishData class]; +} + +- (PNPublishData *)data { + return !self.isError ? self.responseData : nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Push Notification/PNAPNSEnabledChannelsResult.h b/PubNub/Data/Service Objects/Push Notification/PNAPNSEnabledChannelsResult.h new file mode 100644 index 000000000..8727da80c --- /dev/null +++ b/PubNub/Data/Service Objects/Push Notification/PNAPNSEnabledChannelsResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Fetch APNS enabled channels request processing result. +@interface PNAPNSEnabledChannelsResult : PNOperationResult + + +#pragma mark - Properties + +/// APNS enabled channels request response from remote service. +@property (nonatomic, readonly, strong) PNPushNotificationFetchData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Push Notification/PNAPNSEnabledChannelsResult.m b/PubNub/Data/Service Objects/Push Notification/PNAPNSEnabledChannelsResult.m new file mode 100644 index 000000000..ba0954b20 --- /dev/null +++ b/PubNub/Data/Service Objects/Push Notification/PNAPNSEnabledChannelsResult.m @@ -0,0 +1,23 @@ +#import "PNAPNSEnabledChannelsResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNAPNSEnabledChannelsResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNPushNotificationFetchData class]; +} + +- (PNPushNotificationFetchData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Signal/PNSignalStatus.h b/PubNub/Data/Service Objects/Signal/PNSignalStatus.h new file mode 100644 index 000000000..9d6f4c6cd --- /dev/null +++ b/PubNub/Data/Service Objects/Signal/PNSignalStatus.h @@ -0,0 +1,21 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +/// Signal request processing status. +@interface PNSignalStatus : PNAcknowledgmentStatus + + +#pragma mark - Properties + +/// Signal request response from remote service. +@property(strong, nonatomic, readonly) PNSignalData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Signal/PNSignalStatus.m b/PubNub/Data/Service Objects/Signal/PNSignalStatus.m new file mode 100644 index 000000000..574efa972 --- /dev/null +++ b/PubNub/Data/Service Objects/Signal/PNSignalStatus.m @@ -0,0 +1,24 @@ +#import "PNSignalStatus.h" +#import "PNOperationResult+Private.h" +#import "PNStatus+Private.h" + + +#pragma mark Interface implementation + +@implementation PNSignalStatus + + +#pragma mark - Properties + ++ (Class)statusDataClass { + return [PNSignalData class]; +} + +- (PNSignalData *)data { + return !self.isError ? self.responseData : nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Subscribe/PNFileEventResult.h b/PubNub/Data/Service Objects/Subscribe/PNFileEventResult.h new file mode 100644 index 000000000..92cd008bf --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNFileEventResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Subscribe request processing `file` result. +@interface PNFileEventResult : PNOperationResult + + +#pragma mark - Properties + +/// Processed `file event` information. +@property (nonatomic, readonly, strong) PNSubscribeFileEventData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Subscribe/PNFileEventResult.m b/PubNub/Data/Service Objects/Subscribe/PNFileEventResult.m new file mode 100644 index 000000000..ff232624f --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNFileEventResult.m @@ -0,0 +1,19 @@ +#import "PNFileEventResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNFileEventResult + + +#pragma mark - Properties + +- (PNSubscribeFileEventData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Subscribe/PNMessageActionResult.h b/PubNub/Data/Service Objects/Subscribe/PNMessageActionResult.h new file mode 100644 index 000000000..260b18db3 --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNMessageActionResult.h @@ -0,0 +1,24 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Subscribe request processing `message action` result. +@interface PNMessageActionResult : PNOperationResult + + +#pragma mark - Properties + +/// Processed `message action event` information. +@property (nonatomic, readonly, strong) PNSubscribeMessageActionEventData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + diff --git a/PubNub/Data/Service Objects/Subscribe/PNMessageActionResult.m b/PubNub/Data/Service Objects/Subscribe/PNMessageActionResult.m new file mode 100644 index 000000000..5c92f1de6 --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNMessageActionResult.m @@ -0,0 +1,19 @@ +#import "PNMessageActionResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNMessageActionResult + + +#pragma mark - Properties + +- (PNSubscribeMessageActionEventData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Subscribe/PNMessageResult.h b/PubNub/Data/Service Objects/Subscribe/PNMessageResult.h new file mode 100644 index 000000000..8bc71d249 --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNMessageResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Subscribe request processing `message` result. +@interface PNMessageResult : PNOperationResult + + +#pragma mark - Properties + +/// Processed `message event` information. +@property (nonatomic, readonly, strong) PNSubscribeMessageEventData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Subscribe/PNMessageResult.m b/PubNub/Data/Service Objects/Subscribe/PNMessageResult.m new file mode 100644 index 000000000..823b0db05 --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNMessageResult.m @@ -0,0 +1,19 @@ +#import "PNMessageResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNMessageResult + + +#pragma mark - Properties + +- (PNSubscribeMessageEventData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Subscribe/PNObjectEventResult.h b/PubNub/Data/Service Objects/Subscribe/PNObjectEventResult.h new file mode 100644 index 000000000..8f2c37b26 --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNObjectEventResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Subscribe request processing `app context` result. +@interface PNObjectEventResult : PNOperationResult + + +#pragma mark - Properties + +/// Processed `app context event` information. +@property (nonatomic, readonly, strong) PNSubscribeObjectEventData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Subscribe/PNObjectEventResult.m b/PubNub/Data/Service Objects/Subscribe/PNObjectEventResult.m new file mode 100644 index 000000000..36a9b97e2 --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNObjectEventResult.m @@ -0,0 +1,19 @@ +#import "PNObjectEventResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNObjectEventResult + + +#pragma mark - Properties + +- (PNSubscribeObjectEventData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Subscribe/PNPresenceEventResult.h b/PubNub/Data/Service Objects/Subscribe/PNPresenceEventResult.h new file mode 100644 index 000000000..98c74d1ba --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNPresenceEventResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Subscribe request processing `message action` result. +@interface PNPresenceEventResult : PNOperationResult + + +#pragma mark - Properties + +/// Processed `presence event` information. +@property (nonatomic, readonly, strong) PNSubscribePresenceEventData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Subscribe/PNPresenceEventResult.m b/PubNub/Data/Service Objects/Subscribe/PNPresenceEventResult.m new file mode 100644 index 000000000..63c25eecc --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNPresenceEventResult.m @@ -0,0 +1,19 @@ +#import "PNPresenceEventResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNPresenceEventResult + + +#pragma mark - Properties + +- (PNSubscribePresenceEventData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Subscribe/PNSignalResult.h b/PubNub/Data/Service Objects/Subscribe/PNSignalResult.h new file mode 100644 index 000000000..f5a010b51 --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNSignalResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Subscribe request processing `signal` result. +@interface PNSignalResult : PNOperationResult + + +#pragma mark - Properties + +/// Processed `signal event` information. +@property (nonatomic, readonly, strong) PNSubscribeSignalEventData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Subscribe/PNSignalResult.m b/PubNub/Data/Service Objects/Subscribe/PNSignalResult.m new file mode 100644 index 000000000..144dee2c5 --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNSignalResult.m @@ -0,0 +1,19 @@ +#import "PNSignalResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNSignalResult + + +#pragma mark - Properties + +- (PNSubscribeSignalEventData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Subscribe/PNSubscribeStatus+Private.h b/PubNub/Data/Service Objects/Subscribe/PNSubscribeStatus+Private.h new file mode 100644 index 000000000..553e57585 --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNSubscribeStatus+Private.h @@ -0,0 +1,25 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +@interface PNSubscribeStatus (Private) + + +#pragma mark - Properties + +/// Whether this is initial subscribe request processing status or not. +@property(assign, nonatomic, getter = isInitialSubscription) BOOL initialSubscription; + +/// Structured `PNResult` `data` field information. +@property (nonatomic, readonly, strong) PNSubscribeData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Subscribe/PNSubscribeStatus.h b/PubNub/Data/Service Objects/Subscribe/PNSubscribeStatus.h new file mode 100644 index 000000000..08a6385b8 --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNSubscribeStatus.h @@ -0,0 +1,32 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Subscribe` request response processing status. +@interface PNSubscribeStatus : PNErrorStatus + + +#pragma mark - Properties + +/// List of channel group names on which client currently subscribed. +@property(copy, nonatomic, readonly) NSArray *subscribedChannelGroups; + +/// List of channels on which client currently subscribed. +@property(copy, nonatomic, readonly) NSArray *subscribedChannels; + +/// Time token which has been used to establish current subscription cycle. +@property(strong, nonatomic, readonly) NSNumber *currentTimetoken; + +/// Stores reference on previous key which has been used in subscription cycle to receive `currentTimetoken` along +/// with other events. +@property(strong, nonatomic, readonly) NSNumber *lastTimeToken; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Subscribe/PNSubscribeStatus.m b/PubNub/Data/Service Objects/Subscribe/PNSubscribeStatus.m new file mode 100644 index 000000000..65740d357 --- /dev/null +++ b/PubNub/Data/Service Objects/Subscribe/PNSubscribeStatus.m @@ -0,0 +1,44 @@ +#import "PNSubscribeStatus+Private.h" +#import "PNOperationResult+Private.h" +#import "PNStatus+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +@interface PNSubscribeStatus () + +#pragma mark - Properties + +/// Whether this is initial subscribe request processing status or not. +@property(assign, nonatomic, getter = isInitialSubscription) BOOL initialSubscription; + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNSubscribeStatus + +@dynamic currentTimetoken, lastTimeToken, subscribedChannels, subscribedChannelGroups; + + +#pragma mark - Information + ++ (Class)statusDataClass { + return [PNSubscribeData class]; +} + +- (PNSubscribeData *)data { + return !self.isError ? self.responseData : nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Service Objects/Time/PNTimeResult.h b/PubNub/Data/Service Objects/Time/PNTimeResult.h new file mode 100644 index 000000000..81d151273 --- /dev/null +++ b/PubNub/Data/Service Objects/Time/PNTimeResult.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Time request processing result. +@interface PNTimeResult : PNOperationResult + + +#pragma mark - Properties + +/// Time request response from remote service. +@property(strong, nonatomic, readonly) PNTimeData *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Service Objects/Time/PNTimeResult.m b/PubNub/Data/Service Objects/Time/PNTimeResult.m new file mode 100644 index 000000000..74a1c3a47 --- /dev/null +++ b/PubNub/Data/Service Objects/Time/PNTimeResult.m @@ -0,0 +1,23 @@ +#import "PNTimeResult.h" +#import "PNOperationResult+Private.h" + + +#pragma mark Interface implementation + +@implementation PNTimeResult + + +#pragma mark - Properties + ++ (Class)responseDataClass { + return [PNTimeData class]; +} + +- (PNTimeData *)data { + return self.responseData; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Storage/PNDataStorage.h b/PubNub/Data/Storage/PNDataStorage.h deleted file mode 100644 index 2ad5be318..000000000 --- a/PubNub/Data/Storage/PNDataStorage.h +++ /dev/null @@ -1,48 +0,0 @@ -#import -#import "PNKeyValueStorage.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief \b PubNub client data storage provider. - * - * @author Serhii Mamontov - * @version 4.15.3 - * @since 4.15.3 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNDataStorage : NSObject - - -#pragma mark - Information - -/** - * @brief Storage which is suitable to store various client information which is related to \b PubNub client operation. - * - * @discussion Used to store: publish sequence number or latency information. - */ -@property (nonatomic, readonly, strong) id persistentClientData; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c key/value storage for \b PubNub client data. - * - * @discussion Used to store: publish sequence number or latency information. - * - * @param identifier Unique identifier under which data will be stored (usually portions of publish / subscribed keys). - * - * @return Configured and ready to use \c key/value storage for \b PubNub client data. - */ -+ (id)persistentClientDataWithIdentifier:(NSString *)identifier; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Storage/PNDataStorage.m b/PubNub/Data/Storage/PNDataStorage.m deleted file mode 100644 index 2786dcc1e..000000000 --- a/PubNub/Data/Storage/PNDataStorage.m +++ /dev/null @@ -1,147 +0,0 @@ -/** - * @brief \b PubNub client data storage provider. - * - * @author Serhii Mamontov - * @version 4.15.3 - * @since 4.15.3 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNDataStorage.h" -#import "PNKeychain+Private.h" -#import "PNKeychainStorage.h" -#import "PNInMemoryStorage.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - Protected interface declaration - -@interface PNDataStorage () - - -#pragma mark - Information - -/** - * @brief Queue which is used to synchronise access to shared resources. - * - * @note Queue used indirectly as target queue for storage components. - */ -@property (class, nonatomic, readonly, strong) dispatch_queue_t resourcesAccessQueue; - -/** - * @brief Dictionary which is used to store previously initialised storages. - */ -@property (class, nonatomic, readonly, strong) NSMutableDictionary *storages; - - -#pragma mark - Misc - -/** - * @brief Generate unique \c storage instance store identifier. - * - * @param identifier Unique identifier from which portion should be cut out to build new identifier. - * @param type Type of storage for which identifier should be created. - * - * @return Storage identifier. - */ -+ (NSString *)identifierFrom:(NSString *)identifier forStorageWithType:(NSString *)type; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNDataStorage - - -#pragma mark - Information - -+ (dispatch_queue_t)resourcesAccessQueue { - static dispatch_queue_t _sharedDataStorageAccessQueue; - static dispatch_once_t onceToken; - - dispatch_once(&onceToken, ^{ - const char *queueIdentifier = "com.pubnub.data-storage.in-memory"; - -#if !TARGET_OS_OSX - if ([PNKeychain isKeychainAvailable]) { - queueIdentifier = "com.pubnub.data-storage.keychain"; - } -#endif // TARGET_OS_OSX - _sharedDataStorageAccessQueue = dispatch_queue_create(queueIdentifier, - DISPATCH_QUEUE_CONCURRENT); - }); - - return _sharedDataStorageAccessQueue; -} - -+ (NSMutableDictionary *)storages { - static NSMutableDictionary *_sharedStorageInstances; - static dispatch_once_t onceToken; - - dispatch_once(&onceToken, ^{ - _sharedStorageInstances = [NSMutableDictionary new]; - }); - - return _sharedStorageInstances; -} - - -#pragma mark - Initialization and Configuration - -+ (id)persistentClientDataWithIdentifier:(NSString *)identifier { - NSString *storageIdentifier = [self identifierFrom:identifier forStorageWithType:@"clientData"]; - id storage = nil; - - @synchronized ([self storages]) { - storage = [self storages][storageIdentifier]; - - if (!storage) { -#if !TARGET_OS_OSX - if ([PNKeychain isKeychainAvailable]) { - storage = [PNKeychainStorage storageWithIdentifier:storageIdentifier - queue:self.resourcesAccessQueue]; - } else { - storage = [PNInMemoryStorage storageWithIdentifier:storageIdentifier - queue:self.resourcesAccessQueue]; - } -#else - storage = [PNInMemoryStorage storageWithIdentifier:storageIdentifier - queue:self.resourcesAccessQueue]; -#endif // !TARGET_OS_OSX - } - - [self storages][storageIdentifier] = storage; - } - - return storage; -} - - -#pragma mark - Misc - -+ (NSString *)identifierFrom:(NSString *)identifier forStorageWithType:(NSString *)type { - NSArray *identifiedComponents; - - if (identifier.length > 10) { - identifiedComponents = @[ - [identifier substringToIndex:7], - type, - [identifier substringFromIndex:(identifier.length - 4)] - ]; - } else { - identifiedComponents = @[type, identifier]; - } - - return [identifiedComponents componentsJoinedByString:@"-"]; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Storage/PNInMemoryStorage.h b/PubNub/Data/Storage/PNInMemoryStorage.h deleted file mode 100644 index ae9a10117..000000000 --- a/PubNub/Data/Storage/PNInMemoryStorage.h +++ /dev/null @@ -1,39 +0,0 @@ -#import -#import "PNKeyValueStorage.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief In-memory \c key/value storage. - * - * @note For macOS store commands write information to file in \c Application \c Support folder. - * - * @author Serhii Mamontov - * @version 4.15.3 - * @since 4.15.3 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNInMemoryStorage : NSObject - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c key/value in-memory storage. - * - * @param identifier Unique identifier with which managed values should be \c "linked". - * @param queue Resources access serialisation queue. - * - * @return Configured and ready to use \c key/value in-memory storage. - */ -+ (instancetype)storageWithIdentifier:(NSString *)identifier queue:(dispatch_queue_t)queue; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Storage/PNInMemoryStorage.m b/PubNub/Data/Storage/PNInMemoryStorage.m deleted file mode 100644 index fcdc4f5fd..000000000 --- a/PubNub/Data/Storage/PNInMemoryStorage.m +++ /dev/null @@ -1,251 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.4 - * @since 4.15.3 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNInMemoryStorage.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interface declaration - -@interface PNInMemoryStorage () - - -#pragma mark - Information - -/** - * @brief Dictionary which is used to keep values stored by multiple sessions of \b PubNub client. - * - * @since 4.15.4 - */ -@property (nonatomic, readonly, strong) NSMutableDictionary *sharedStorage; - -/** - * @brief Shared in-memory resources access queue. - */ -@property (nonatomic, strong) dispatch_queue_t resourcesAccessQueue; - -/** - * @brief Dictionary which is used to keep values stored during \b PubNub client usage. - */ -@property (nonatomic, strong) NSMutableDictionary *storage; - -/** - * @brief Unique identifier for storage which should be \c "linked" with managed values. - */ -@property (nonatomic, copy) NSString *storageIdentifier; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Initialise \c key/value in-memory storage. - * - * @param identifier Unique identifier with which managed values should be \c "linked". - * @param queue Resources access serialisation queue. - * - * @return Initialised and ready to use \c key/value in-memory storage. - */ -- (instancetype)initWithIdentifier:(NSString *)identifier queue:(dispatch_queue_t)queue; - - -#pragma mark - Misc - -/** - * @brief Location where macOS in-memory storage content should be stored / loaded to / from. - * - * @return Full path to the file. - */ -- (NSString *)storagePath; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNInMemoryStorage - - -#pragma mark - Information - -- (NSMutableDictionary *)sharedStorage { - static NSMutableDictionary *_sharedInMemoryStorage; - static dispatch_once_t onceToken; - - dispatch_once(&onceToken, ^{ -#if !TARGET_OS_OSX - _sharedInMemoryStorage = [NSMutableDictionary new]; -#else - NSFileManager *fileManager = NSFileManager.defaultManager; - NSString *filePath = [self storagePath]; - NSString *workingDirectory = [filePath stringByDeletingLastPathComponent]; - - if (![fileManager fileExistsAtPath:workingDirectory isDirectory:NULL]) { - [fileManager createDirectoryAtPath:workingDirectory - withIntermediateDirectories:YES - attributes:nil - error:nil]; - } - - NSDictionary *storedData = [NSDictionary dictionaryWithContentsOfFile:filePath]; - _sharedInMemoryStorage = [NSMutableDictionary dictionaryWithDictionary:storedData]; - - // Migrate previous - if (!((NSDictionary *)_sharedInMemoryStorage[self.storageIdentifier]).count && - !_sharedInMemoryStorage[@"pn_storage_migrated"]) { - - NSMutableDictionary *storage = [NSMutableDictionary new]; - - for (NSString *key in _sharedInMemoryStorage) { - storage[key] = _sharedInMemoryStorage[key]; - } - - [_sharedInMemoryStorage removeAllObjects]; - _sharedInMemoryStorage[self.storageIdentifier] = storage; - _sharedInMemoryStorage[@"pn_storage_migrated"] = @YES; - - [_sharedInMemoryStorage writeToFile:filePath atomically:YES]; - } -#endif - }); - - return _sharedInMemoryStorage; -} - - -#pragma mark - Initialization & Configuration - -+ (instancetype)storageWithIdentifier:(NSString *)identifier queue:(dispatch_queue_t)queue { - return [[self alloc] initWithIdentifier:identifier queue:queue]; -} - -- (instancetype)initWithIdentifier:(NSString *)identifier queue:(dispatch_queue_t)queue { - if ((self = [super init])) { - _storageIdentifier = [identifier copy]; - _storage = self.sharedStorage[_storageIdentifier]; - _resourcesAccessQueue = queue; - - if (!_storage) { - _storage = [NSMutableDictionary new]; - self.sharedStorage[_storageIdentifier] = _storage; - } - } - - return self; -} - - -#pragma mark - Batch - -- (void)batchSyncAccessWithBlock:(dispatch_block_t)block { - dispatch_barrier_sync(self.resourcesAccessQueue, block); -} - -- (void)batchAsyncAccessWithBlock:(void(^)(dispatch_block_t completion))block { - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - - dispatch_barrier_async(self.resourcesAccessQueue, ^{ - block(^{ - dispatch_semaphore_signal(semaphore); - }); - - dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)); - dispatch_semaphore_wait(semaphore, popTime); - }); -} - - -#pragma mark - Value store - -- (BOOL)storeValue:(id)value forKey:(NSString *)key { - if (value) { - self.storage[key] = value; - } else { - [self.storage removeObjectForKey:key]; - } - -#if TARGET_OS_OSX - [self.sharedStorage writeToFile:[self storagePath] atomically:YES]; -#endif // TARGET_OS_OSX - - return YES; -} - -- (BOOL)syncStoreValue:(id)value forKey:(NSString *)key { - __block BOOL updated = NO; - - dispatch_barrier_sync(self.resourcesAccessQueue, ^{ - updated = [self storeValue:value forKey:key]; - }); - - return updated; -} - -- (void)asyncStoreValue:(id)value forKey:(NSString *)key withCompletion:(void(^)(BOOL stored))block { - dispatch_barrier_async(self.resourcesAccessQueue, ^{ - BOOL updated = [self storeValue:value forKey:key]; - - if (block) { - block(updated); - } - }); -} - - -#pragma mark - Value read - -- (id)valueForKey:(NSString *)key { - return self.storage[key]; -} - -- (nullable id)syncValueForKey:(NSString *)key { - __block id value = nil; - - dispatch_sync(self.resourcesAccessQueue, ^{ - value = [self valueForKey:key]; - }); - - return value; -} - -- (void)asyncValueForKey:(NSString *)key withCompletion:(void(^)(id value))block { - dispatch_async(self.resourcesAccessQueue, ^{ - block([self valueForKey:key]); - }); -} - - -#pragma mark - Misc - -- (NSString *)storagePath { - static NSString *_inMemoryStoragePath; - static dispatch_once_t onceToken; - - dispatch_once(&onceToken, ^{ - NSSearchPathDirectory searchPath = NSApplicationSupportDirectory; - NSProcessInfo *processInfo = NSProcessInfo.processInfo; - NSBundle *mainBundle = NSBundle.mainBundle; - NSArray *paths = NSSearchPathForDirectoriesInDomains(searchPath, NSUserDomainMask, YES); - - NSString *baseDirectory = (paths.count > 0 ? paths.firstObject : NSTemporaryDirectory()); - NSString *applicationName = processInfo.processName ?: mainBundle.bundleIdentifier; - - NSString *storeDirectory = [baseDirectory stringByAppendingPathComponent:applicationName]; - _inMemoryStoragePath = [storeDirectory stringByAppendingPathComponent:@"pnkc.db"]; - }); - - return _inMemoryStoragePath; -} - -#pragma mark - - - -@end diff --git a/PubNub/Data/Storage/PNKeychainStorage.h b/PubNub/Data/Storage/PNKeychainStorage.h deleted file mode 100644 index d45e6797a..000000000 --- a/PubNub/Data/Storage/PNKeychainStorage.h +++ /dev/null @@ -1,48 +0,0 @@ -#import -#import "PNKeyValueStorage.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interfaces declaration - -/** - * @brief Keychain \c key/value storage. - * - * @author Serhii Mamontov - * @version 4.15.3 - * @since 4.15.3 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNKeychainStorage : NSObject - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c key/value Keychain storage. - * - * @param identifier Unique identifier with which managed values should be \c "linked". - * @param queue Resources access serialisation queue. - * - * @return Configured and ready to use \c key/value Keychain storage. - */ -+ (instancetype)storageWithIdentifier:(NSString *)identifier queue:(dispatch_queue_t)queue; - - -#pragma mark - Data storage - -/** - * @brief Update accessibility for entries specified by list of keys. - * - * @param entryNames List of entry names for which current accessibility should be changed. - * @param accessibility Target entries accessibility mode. - */ -- (void)updateEntries:(NSArray *)entryNames accessibilityTo:(CFStringRef)accessibility; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Storage/PNKeychainStorage.m b/PubNub/Data/Storage/PNKeychainStorage.m deleted file mode 100644 index 11f0f2635..000000000 --- a/PubNub/Data/Storage/PNKeychainStorage.m +++ /dev/null @@ -1,165 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.3 - * @since 4.15.3 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNKeychainStorage.h" -#import "PNKeychain+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interface declaration - -@interface PNKeychainStorage () - - -#pragma mark - Information - -/** - * @brief Shared Keychain resources access queue. - */ -@property (nonatomic, strong) dispatch_queue_t resourcesAccessQueue; - -/** - * @brief \a Keychain which is managed by this storage. - */ -@property (nonatomic, strong) PNKeychain *keychain; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Initialise \c key/value Keychain storage. - * - * @param identifier Unique identifier with which managed values should be \c "linked". - * @param queue Resources access serialisation queue. - * - * @return Initialised and ready to use \c key/value Keychain storage. - */ -- (instancetype)initWithIdentifier:(NSString *)identifier queue:(dispatch_queue_t)queue; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNKeychainStorage - - -#pragma mark - Initialization & Configuration - -+ (instancetype)storageWithIdentifier:(NSString *)identifier queue:(dispatch_queue_t)queue { - return [[self alloc] initWithIdentifier:identifier queue:queue]; -} - -- (instancetype)initWithIdentifier:(NSString *)identifier queue:(dispatch_queue_t)queue { - if ((self = [super init])) { - _keychain = [PNKeychain keychainWithIdentifier:identifier]; - _resourcesAccessQueue = queue; - - if (!PNKeychain.defaultKeychain.resourceAccessQueue) { - PNKeychain.defaultKeychain.resourceAccessQueue = queue; - } - } - - return self; -} - - -#pragma mark - Batch - -- (void)batchSyncAccessWithBlock:(dispatch_block_t)block { - dispatch_barrier_sync(self.resourcesAccessQueue, block); -} - -- (void)batchAsyncAccessWithBlock:(void(^)(dispatch_block_t completion))block { - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - - dispatch_barrier_async(self.resourcesAccessQueue, ^{ - block(^{ - dispatch_semaphore_signal(semaphore); - }); - - dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)); - dispatch_semaphore_wait(semaphore, popTime); - }); -} - - -#pragma mark - Value store - -- (BOOL)storeValue:(id)value forKey:(NSString *)key { - BOOL updated = NO; - - if (value) { - updated = [self.keychain storeValue:value forKey:key]; - } else { - updated = [self.keychain removeValueForKey:key]; - } - - return updated; -} - -- (BOOL)syncStoreValue:(id)value forKey:(NSString *)key { - __block BOOL updated = NO; - - dispatch_barrier_sync(self.resourcesAccessQueue, ^{ - updated = [self storeValue:value forKey:key]; - }); - - return updated; -} - -- (void)asyncStoreValue:(id)value forKey:(NSString *)key withCompletion:(void(^)(BOOL stored))block { - dispatch_barrier_async(self.resourcesAccessQueue, ^{ - BOOL updated = [self storeValue:value forKey:key]; - - if (block) { - block(updated); - } - }); -} - - -#pragma mark - Value read - -- (id)valueForKey:(NSString *)key { - return [self.keychain valueForKey:key]; -} - -- (id)syncValueForKey:(NSString *)key { - __block id value = nil; - - dispatch_sync(self.resourcesAccessQueue, ^{ - value = [self valueForKey:key]; - }); - - return value; -} - -- (void)asyncValueForKey:(NSString *)key withCompletion:(void(^)(id value))block { - dispatch_async(self.resourcesAccessQueue, ^{ - block([self valueForKey:key]); - }); -} - - -#pragma mark - Data storage - -- (void)updateEntries:(NSArray *)entryNames accessibilityTo:(CFStringRef)accessibility { - dispatch_barrier_async(self.resourcesAccessQueue, ^{ - [self.keychain updateEntries:entryNames accessibilityTo:accessibility]; - }); -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/PNRequestRetryConfiguration+Private.h b/PubNub/Data/Transport/PNRequestRetryConfiguration+Private.h similarity index 100% rename from PubNub/Network/PNRequestRetryConfiguration+Private.h rename to PubNub/Data/Transport/PNRequestRetryConfiguration+Private.h diff --git a/PubNub/Network/PNRequestRetryConfiguration.h b/PubNub/Data/Transport/PNRequestRetryConfiguration.h similarity index 100% rename from PubNub/Network/PNRequestRetryConfiguration.h rename to PubNub/Data/Transport/PNRequestRetryConfiguration.h diff --git a/PubNub/Network/PNRequestRetryConfiguration.m b/PubNub/Data/Transport/PNRequestRetryConfiguration.m similarity index 100% rename from PubNub/Network/PNRequestRetryConfiguration.m rename to PubNub/Data/Transport/PNRequestRetryConfiguration.m index 14247a9af..8cc40040e 100644 --- a/PubNub/Network/PNRequestRetryConfiguration.m +++ b/PubNub/Data/Transport/PNRequestRetryConfiguration.m @@ -172,10 +172,10 @@ - (instancetype)initWithPolicy:(PNRequestRetryPolicy)policy - (id)copyWithZone:(NSZone *)zone { PNRequestRetryConfiguration *configuration = [[PNRequestRetryConfiguration allocWithZone:zone] init]; - configuration.policy = self.policy; - configuration.minimumDelay = self.minimumDelay; configuration.maximumInterval = self.maximumInterval; + configuration.minimumDelay = self.minimumDelay; configuration.maximumRetry = self.maximumRetry; + configuration.policy = self.policy; return configuration; } diff --git a/PubNub/Data/Transport/PNTransportConfiguration+Private.h b/PubNub/Data/Transport/PNTransportConfiguration+Private.h new file mode 100644 index 000000000..f76160f4f --- /dev/null +++ b/PubNub/Data/Transport/PNTransportConfiguration+Private.h @@ -0,0 +1,32 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// General transport module configuration private extension. +@interface PNTransportConfiguration () + + +#pragma mark - Properties + +/// Request automatic retry configuration. +@property(strong, nullable, nonatomic) PNRequestRetryConfiguration *retryConfiguration; + +/// Maximum simultaneously connections which can be opened. +@property(assign, nonatomic) NSUInteger maximumConnections; + +#ifndef PUBNUB_DISABLE_LOGGER +/// `PubNub` client instance logger. +/// +/// Logger can be used to add additional logs into console and file (if enabled). +@property(strong, nonatomic) PNLLogger *logger; +#endif // PUBNUB_DISABLE_LOGGER + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Transport/PNTransportConfiguration.h b/PubNub/Data/Transport/PNTransportConfiguration.h new file mode 100644 index 000000000..b7b1d5ae1 --- /dev/null +++ b/PubNub/Data/Transport/PNTransportConfiguration.h @@ -0,0 +1,36 @@ +#import +#import +#ifndef PUBNUB_DISABLE_LOGGER +#import +#endif // PUBNUB_DISABLE_LOGGER + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// General transport module configuration. +@interface PNTransportConfiguration : NSObject + + +#pragma mark - Properties + +/// Request automatic retry configuration. +@property(strong, nullable, nonatomic, readonly) PNRequestRetryConfiguration *retryConfiguration; + +/// Maximum simultaneously connections which can be opened. +@property(assign, nonatomic, readonly) NSUInteger maximumConnections; + +#ifndef PUBNUB_DISABLE_LOGGER +/// `PubNub` client instance logger. +/// +/// Logger can be used to add additional logs into console and file (if enabled). +@property(strong, nonatomic, readonly) PNLLogger *logger; +#endif // PUBNUB_DISABLE_LOGGER + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Transport/PNTransportConfiguration.m b/PubNub/Data/Transport/PNTransportConfiguration.m new file mode 100644 index 000000000..ecad666d2 --- /dev/null +++ b/PubNub/Data/Transport/PNTransportConfiguration.m @@ -0,0 +1,26 @@ +#import "PNTransportConfiguration+Private.h" + + +#pragma mark Interface implementation + +@implementation PNTransportConfiguration + + +#pragma mark - Copying implementation + +- (id)copyWithZone:(NSZone *)zone { + PNTransportConfiguration *configuration = [[PNTransportConfiguration allocWithZone:zone] init]; + configuration.retryConfiguration = [self.retryConfiguration copy]; + configuration.maximumConnections = self.maximumConnections; + +#ifndef PUBNUB_DISABLE_LOGGER + configuration.logger = self.logger; +#endif // PUBNUB_DISABLE_LOGGER + + return configuration; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Transport/PNTransportMiddleware.h b/PubNub/Data/Transport/PNTransportMiddleware.h new file mode 100644 index 000000000..d0f47ff28 --- /dev/null +++ b/PubNub/Data/Transport/PNTransportMiddleware.h @@ -0,0 +1,29 @@ +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface implementation + +/// Transport middelware module. +/// +/// Middleware extend base transport module functionality with behaviour expected by the `PubNub` client. +@interface PNTransportMiddleware : NSObject + + +#pragma mark - Initialization and Configuration + +/// Create transport middleware with `configuration`. +/// +/// - Parameter configuration: Transport middleware module configuration object. +/// - Returns: Configured and ready to use transport middleware. ++ (instancetype)middlewareWithConfiguration:(PNTransportMiddlewareConfiguration *)configuration; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Transport/PNTransportMiddleware.m b/PubNub/Data/Transport/PNTransportMiddleware.m new file mode 100644 index 000000000..64f8e6866 --- /dev/null +++ b/PubNub/Data/Transport/PNTransportMiddleware.m @@ -0,0 +1,129 @@ +#import "PNTransportMiddleware.h" +#import "PNTransportRequest+Private.h" +#import "PNConfiguration+Private.h" +#import "PNConstants.h" +#import "PNFunctions.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Transport middelware module private extension. +@interface PNTransportMiddleware () + + +#pragma mark - Properties + +/// Transport middleware module configuration. +@property(copy, nonatomic) PNTransportMiddlewareConfiguration *configuration; + +/// SDK information query value. +@property(copy, nonatomic) NSString *pnsdk; + + +#pragma mark - Initialization and Configuration + +/// Initialize transport middleware with `configuration`. +/// +/// - Parameter configuration: Transport middleware module configuration object. +/// - Returns: Initialized transport middleware. +- (instancetype)initWithConfiguration:(PNTransportMiddlewareConfiguration *)configuration; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + + + +@implementation PNTransportMiddleware + + +#pragma mark - Initialization and Configuration + ++ (instancetype)middlewareWithConfiguration:(PNTransportMiddlewareConfiguration *)configuration { + return [[self alloc] initWithConfiguration:configuration]; +} + +- (instancetype)initWithConfiguration:(PNTransportMiddlewareConfiguration *)configuration { + if ((self = [super init])) { + _pnsdk = PNStringFormat(@"PubNub-%@/%@", kPNClientName, kPNLibraryVersion); + _configuration = configuration; + [_configuration.transport setupWithConfiguration:configuration.transportConfiguration]; + } + + return self; +} + +- (void)setupWithConfiguration:(PNTransportConfiguration *)configuration { + [self.configuration.transport setupWithConfiguration:configuration]; +} + + +#pragma mark - Information + +- (void)requestsWithBlock:(nonnull void (^)(NSArray *))block { + [self.configuration.transport requestsWithBlock:block]; +} + + +#pragma mark - Request processing + +- (void)sendRequest:(PNTransportRequest *)request withCompletionBlock:(PNRequestCompletionBlock)block { + [self.configuration.transport sendRequest:[self transportRequestFromTransportRequest:request] + withCompletionBlock:[block copy]]; +} + +- (void)sendDownloadRequest:(PNTransportRequest *)request withCompletionBlock:(PNDownloadRequestCompletionBlock)block { + [self.configuration.transport sendDownloadRequest:[self transportRequestFromTransportRequest:request] + withCompletionBlock:[block copy]]; +} + +- (PNTransportRequest *)transportRequestFromTransportRequest:(PNTransportRequest *)request { + request = [self.configuration.transport transportRequestFromTransportRequest:request]; + NSMutableDictionary *query = [NSMutableDictionary dictionaryWithDictionary:request.query ?: @{}]; + PNConfiguration *configuration = self.configuration.configuration; + + if (request.origin.length == 0) { + request.origin = PNStringFormat(@"http%@://%@", configuration.isTLSEnabled ? @"s" : @"", configuration.origin); + } else if ([request.origin rangeOfString:configuration.origin].location == NSNotFound) return request; + + if (!query[@"auth"]) { + if (configuration.authToken.length) query[@"auth"] = configuration.authToken; + else if (configuration.authKey.length) query[@"auth"] = configuration.authKey; + } + + if (!query[@"uuid"]) query[@"uuid"] = configuration.userID; + if (!query[@"instanceid"]) query[@"instanceid"] = self.configuration.clientInstanceId; + if (!query[@"requestid"]) query[@"requestid"] = request.identifier; + query[@"pnsdk"] = self.pnsdk; + + // Update query parameters list. + request.query = query; + + return request; +} + + +#pragma mark - State + +- (void)suspend { + [self.configuration.transport suspend]; +} + +- (void)resume { + [self.configuration.transport resume]; +} + +- (void)invalidate { + [self.configuration.transport invalidate]; +} + +#pragma mark - + + +@end diff --git a/PubNub/Data/Transport/PNTransportMiddlewareConfiguration.h b/PubNub/Data/Transport/PNTransportMiddlewareConfiguration.h new file mode 100644 index 000000000..8b7c55d18 --- /dev/null +++ b/PubNub/Data/Transport/PNTransportMiddlewareConfiguration.h @@ -0,0 +1,65 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Transport middleware module configuration. +@interface PNTransportMiddlewareConfiguration : NSObject + + +#pragma mark - Properties + +/// Transport module configuration object. +@property(strong, nonatomic, readonly) PNTransportConfiguration *transportConfiguration; + +/// Current `PubNub` instance configuration object. +@property(strong, nonatomic, readonly) PNConfiguration *configuration; + +/// Initialized and ready to use transport implementation. +@property(strong, nonatomic, readonly) id transport; + +/// Unique `PubNub` instance identifier. +@property(copy, nonatomic, readonly) NSString *clientInstanceId; + + +#pragma mark - Initialization and Configuration + +#ifdef PUBNUB_DISABLE_LOGGER +/// Create middleware configuration. +/// +/// - Parameters: +/// - configuration: `PubNub` client configuration object. +/// - clientInstanceId: Unique `PubNub` instance identifier. +/// - transport: Instantiated transport object. +/// - maximumConnections: Maximum simultaneously connections which can be opened. +/// - Returns: Configured and ready to use middleware configuration object. ++ (instancetype)configurationWithClientConfiguration:(PNConfiguration *)configuration + clientInstanceId:(NSString *)clientInstanceId + transport:(id)transport + maximumConnections:(NSUInteger)maximumConnections; +#else +/// Create middleware configuration. +/// +/// - Parameters: +/// - configuration: `PubNub` client configuration object. +/// - clientInstanceId: Unique `PubNub` instance identifier. +/// - transport: Instantiated transport object. +/// - maximumConnections: Maximum simultaneously connections which can be opened. +/// - logger: `PubNub` client instance logger. +/// - Returns: Configured and ready to use middleware configuration object. ++ (instancetype)configurationWithClientConfiguration:(PNConfiguration *)configuration + clientInstanceId:(NSString *)clientInstanceId + transport:(id)transport + maximumConnections:(NSUInteger)maximumConnections + logger:(PNLLogger *)logger; +#endif // PUBNUB_DISABLE_LOGGER + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Transport/PNTransportMiddlewareConfiguration.m b/PubNub/Data/Transport/PNTransportMiddlewareConfiguration.m new file mode 100644 index 000000000..7823cd3c3 --- /dev/null +++ b/PubNub/Data/Transport/PNTransportMiddlewareConfiguration.m @@ -0,0 +1,153 @@ +#import "PNTransportMiddlewareConfiguration.h" +#import "PNTransportConfiguration+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Transport middleware module configuration private extension. +@interface PNTransportMiddlewareConfiguration () + + +#pragma mark - Properties +/// Current `PubNub` instance configuration object. +@property(strong, nonatomic) PNConfiguration *configuration; + +/// Maximum simultaneously connections which can be opened. +@property(assign, nonatomic) NSUInteger maximumConnections; + + +/// Initialized and ready to use transport implementation. +@property(strong, nonatomic) id transport; + +/// Unique `PubNub` instance identifier. +@property(copy, nonatomic) NSString *clientInstanceId; + +#ifndef PUBNUB_DISABLE_LOGGER +/// `PubNub` client instance logger. +/// +/// Logger can be used to add additional logs into console and file (if enabled). +@property(strong, nonatomic) PNLLogger *logger; +#endif // PUBNUB_DISABLE_LOGGER + + +#pragma mark - Initialization and Configuration + +#ifdef PUBNUB_DISABLE_LOGGER +/// Initialize middleware configuration. +/// +/// - Parameters: +/// - configuration: `PubNub` client configuration object. +/// - clientInstanceId: Unique `PubNub` instance identifier. +/// - transport: Instantiated transport object. +/// - maximumConnections: Maximum simultaneously connections which can be opened. +/// - Returns: Initialized middleware configuration object. +- (instancetype)initWithClientConfiguration:(PNConfiguration *)configuration + clientInstanceId:(NSString *)clientInstanceId + transport:(id)transport + maximumConnections:(NSUInteger)maximumConnections; +#else +/// Initialize middleware configuration. +/// +/// - Parameters: +/// - configuration: `PubNub` client configuration object. +/// - clientInstanceId: Unique `PubNub` instance identifier. +/// - transport: Instantiated transport object. +/// - maximumConnections: Maximum simultaneously connections which can be opened. +/// - logger: `PubNub` client instance logger. +/// - Returns: Initialized middleware configuration object. +- (instancetype)initWithClientConfiguration:(PNConfiguration *)configuration + clientInstanceId:(NSString *)clientInstanceId + transport:(id)transport + maximumConnections:(NSUInteger)maximumConnections + logger:(PNLLogger *)logger; +#endif // PUBNUB_DISABLE_LOGGER + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNTransportMiddlewareConfiguration + +#pragma mark - Properties + +- (PNTransportConfiguration *)transportConfiguration { + PNTransportConfiguration *configurartion = [PNTransportConfiguration new]; + configurartion.retryConfiguration = self.configuration.requestRetry; + configurartion.maximumConnections = self.maximumConnections; +#ifndef PUBNUB_DISABLE_LOGGER + configurartion.logger = self.logger; +#endif // PUBNUB_DISABLE_LOGGER + + return configurartion; +} + + +#pragma mark - Initialization and Configuration + +#ifdef PUBNUB_DISABLE_LOGGER ++ (instancetype)configurationWithClientConfiguration:(PNConfiguration *)configuration + clientInstanceId:(NSString *)clientInstanceId + transport:(id)transport + maximumConnections:(NSUInteger)maximumConnections { + return [[self alloc] initWithClientConfiguration:configuration + clientInstanceId:clientInstanceId + transport:transport + maximumConnections:maximumConnections]; +} + + +- (instancetype)initWithClientConfiguration:(PNConfiguration *)configuration + clientInstanceId:(NSString *)clientInstanceId + transport:(id)transport + maximumConnections:(NSUInteger)maximumConnections { + if ((self = [super init])) { + _clientInstanceId = [clientInstanceId copy]; + _maximumConnections = maximumConnections; + _configuration = configuration; + _transport = transport; + } + + return self; +} +#else ++ (instancetype)configurationWithClientConfiguration:(PNConfiguration *)configuration + clientInstanceId:(NSString *)clientInstanceId + transport:(id)transport + maximumConnections:(NSUInteger)maximumConnections + logger:(PNLLogger *)logger { + return [[self alloc] initWithClientConfiguration:configuration + clientInstanceId:(NSString *)clientInstanceId + transport:transport + maximumConnections:maximumConnections + logger:logger]; +} + +- (instancetype)initWithClientConfiguration:(PNConfiguration *)configuration + clientInstanceId:(NSString *)clientInstanceId + transport:(id)transport + maximumConnections:(NSUInteger)maximumConnections + logger:(PNLLogger *)logger { + if ((self = [super init])) { + _clientInstanceId = [clientInstanceId copy]; + _maximumConnections = maximumConnections; + _configuration = configuration; + _transport = transport; + _logger = logger; + } + + return self; +} +#endif // PUBNUB_DISABLE_LOGGER + +#pragma mark - + + +@end diff --git a/PubNub/Data/Transport/PNTransportRequest+Private.h b/PubNub/Data/Transport/PNTransportRequest+Private.h new file mode 100644 index 000000000..3c7a221c8 --- /dev/null +++ b/PubNub/Data/Transport/PNTransportRequest+Private.h @@ -0,0 +1,87 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Private extension of the general remote endpoint request. +@interface PNTransportRequest () + + +#pragma mark - Properties + +/// Multipart form data fields. +/// +/// > Important: `Content-Type` header should be sent the `body` data type when `multipart/form-data` should request +/// should be sent. +@property(copy, nullable, nonatomic) NSDictionary *formData; + +/// Whether non-stream body should be compressed or not. +/// +/// > Note: By default set to `NO`. +@property(assign, nonatomic, getter=shouldCompressBody) BOOL compressBody; + +/// Service response body as stream. +@property(strong, nullable, nonatomic) NSInputStream *bodyStream; + +/// Headers to be sent with the request. +@property(copy, nullable, nonatomic) NSDictionary *headers; + +/// Unique request identifier. +@property(copy, nullable, nonatomic) NSString *identifier; + +/// Query parameters to be sent with the request. +@property(copy, nullable, nonatomic) NSDictionary *query; + +/// Whether request `body` available as bytes stream or not. +/// +/// > Note: By default set to `NO`. +@property(assign, nonatomic) BOOL bodyStreamAvailable; + +/// Current request retry attempt. +@property(assign, nonatomic) NSUInteger retryAttempt; + +/// For how long request should wait response from the server. +@property(assign, nonatomic) NSTimeInterval timeout; + +/// Transport HTTP request method. +@property(assign, nonatomic) TransportMethod method; + +/// Body to be sent with the request. +@property(strong, nullable, nonatomic) NSData *body; + +/// Whether the response should be available as a file. +/// +/// > Note: By default set to `NO`. +@property(assign, nonatomic) BOOL responseAsFile; + +/// Whether request can be cancelled or not. +/// +/// > Note: By default set to `NO`. +@property(assign, nonatomic) BOOL cancellable; + +/// Whether request can be retried automatically (if trabsport implementation support it) or not. +/// +/// > Note: By default set to `YES`. +@property(assign, nonatomic) BOOL retriable; + +/// Whether request has been cancelled or not. +/// +/// > Note: By default set to `NO`. +@property(assign, nonatomic) BOOL cancelled; + +/// Remote host name. +@property(copy, nonatomic) NSString *origin; + +/// Remote resource path. +@property (copy, nonatomic) NSString *path; + +/// Whether secured connection should be used or not. +/// +/// > Note: By default set to `YES`. +@property(assign, nonatomic) BOOL secure; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Transport/PNTransportRequest.h b/PubNub/Data/Transport/PNTransportRequest.h new file mode 100644 index 000000000..98f6a7531 --- /dev/null +++ b/PubNub/Data/Transport/PNTransportRequest.h @@ -0,0 +1,127 @@ +#import + + +#pragma mark Types + +/// Possible transport methods for HTTP requests. +typedef NS_ENUM(NSUInteger, TransportMethod) { + /// Request will be sent using `GET` method. + TransportGETMethod, + + /// Request will be sent using `POST` method. + TransportPOSTMethod, + + /// Request will be sent using `PATCH` method. + TransportPATCHMethod, + + /// Request will be sent using `DELETE` method. + TransportDELETEMethod, + + /// Local request. + /// + /// Request won't be sent to the service and probably used to compute URL. + TransportLOCALMethod, +}; + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - Interface declaration + +/// General remote endpoint request. +/// +/// Transport-independent request representation object. +/// All fields are representing certain parts of the request that can be used to prepare one. +@interface PNTransportRequest : NSObject + + +#pragma mark - Properties + +/// Multipart form data fields. +/// +/// > Important: `Content-Type` header should be sent the `body` data type when `multipart/form-data` should request +/// should be sent. +@property(copy, nullable, nonatomic, readonly) NSDictionary *formData; + +/// Whether non-stream body should be compressed or not. +/// +/// > Important: Request body compression is handled by the transport implementation when the request is passed to it. +/// > Note: By default set to `NO`. +@property(assign, nonatomic, readonly, getter=shouldCompressBody) BOOL compressBody; + +/// Stringified transport HTTP request method. +/// +/// > Important: Returns `nil` if unknown `method` value has been set. +@property(strong, nullable, nonatomic, readonly) NSString *stringifiedMethod; + +/// Service response body as stream. +@property(strong, nullable, nonatomic, readonly) NSInputStream *bodyStream; + +/// Headers to be sent with the request. +@property(copy, nullable, nonatomic, readonly) NSDictionary *headers; + +/// Unique request identifier. +@property(copy, nullable, nonatomic, readonly) NSString *identifier; + +/// Query parameters to be sent with the request. +@property(copy, nullable, nonatomic, readonly) NSDictionary *query; + +/// Whether request `body` available as bytes stream or not. +/// +/// > Note: By default set to `NO`. +@property(assign, nonatomic, readonly) BOOL bodyStreamAvailable; + +/// Transport HTTP request method. +/// +/// > Note: By default set to `TransportGETMethod`. +@property(assign, nonatomic, readonly) TransportMethod method; + +/// For how long request should wait response from the server. +@property(assign, nonatomic, readonly) NSTimeInterval timeout; + +/// Body to be sent with the request. +@property(strong, nullable, nonatomic, readonly) NSData *body; + +/// Request cancellation block. +/// +/// > Important: Transport layer is responsible for setting cancellation block if ``cancellable`` is set to `true` to +/// make it possible for the SDK client stop request. +@property(copy, nullable, nonatomic) dispatch_block_t cancel; + +/// Whether the response should be available as a file. +/// +/// > Note: By default set to `NO`. +@property(assign, nonatomic, readonly) BOOL responseAsFile; + +/// Whether request can be cancelled or not. +/// +/// > Note: By default set to `NO`. +@property(assign, nonatomic, readonly) BOOL cancellable; + +/// Whether request can be retried automatically (if trabsport implementation support it) or not. +/// +/// > Note: By default set to `YES`. +@property(assign, nonatomic, readonly) BOOL retriable; + +/// Whether request has been cancelled or not. +/// +/// > Note: By default set to `NO`. +@property(assign, nonatomic, readonly) BOOL cancelled; + +/// Remote host name. +@property(copy, nonatomic, readonly) NSString *origin; + +/// Remote resource path. +@property(copy, nonatomic, readonly) NSString *path; + +/// Whether secured connection should be used or not. +/// +/// > Note: By default set to `YES`. +@property(assign, nonatomic, readonly) BOOL secure; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Data/Transport/PNTransportRequest.m b/PubNub/Data/Transport/PNTransportRequest.m new file mode 100644 index 000000000..015e43128 --- /dev/null +++ b/PubNub/Data/Transport/PNTransportRequest.m @@ -0,0 +1,50 @@ +#import "PNTransportRequest+Private.h" + + +#pragma mark Interface implementation + +@implementation PNTransportRequest + + +#pragma mark - Initialization and Configuration + +- (instancetype)init { + if ((self = [super init])) { + _identifier = [NSUUID UUID].UUIDString; + _method = TransportGETMethod; + _retriable = YES; + _secure = YES; + } + return self; +} + + +#pragma mark - Properties + +- (NSString *)stringifiedMethod { + switch (self.method) { + case TransportGETMethod: + return @"GET"; + break; + case TransportPOSTMethod: + return @"POST"; + break; + case TransportPATCHMethod: + return @"PATCH"; + break; + case TransportDELETEMethod: + return @"DELETE"; + break; + case TransportLOCALMethod: + return @"LOCAL"; + break; + default: + return nil; + break; + } +} + +#pragma mark - + + +@end diff --git a/PubNub/Misc/Categories/NSError+PNTransport.h b/PubNub/Misc/Categories/NSError+PNTransport.h new file mode 100644 index 000000000..0bd526cd1 --- /dev/null +++ b/PubNub/Misc/Categories/NSError+PNTransport.h @@ -0,0 +1,34 @@ +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Extension interface declaration + +/// `NSError` extension for transport related errors. +@interface NSError (PNTransport) + + +#pragma mark - Initialization and Configuration + +/// Create error instance for processed `request`. +/// +/// Analyze remote response and create error instance to describe `request` processing issues. +/// +/// - Parameters: +/// - request: Object which contain all required information to perform request. +/// - response: Remote origin response with results of access to the resource. +/// - error: Request processing error from the transport implementation. +/// - Returns: Configured and ready to use error instance or `nil` in case if `response` doesn't represent error. ++ (nullable instancetype)pn_errorWithTransportRequest:(PNTransportRequest *)request + response:(nullable id)response + error:(nullable NSError *)error; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Misc/Categories/NSError+PNTransport.m b/PubNub/Misc/Categories/NSError+PNTransport.m new file mode 100644 index 000000000..2d2751c6b --- /dev/null +++ b/PubNub/Misc/Categories/NSError+PNTransport.m @@ -0,0 +1,316 @@ +#import "NSError+PNTransport.h" +#import "PNFunctions.h" +#import "PNError.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `NSError` private extension for transport related errors. +@interface NSError (PNTransportPrivate) + + +#pragma mark - Initialization and Configuration + +/// Create cancelled request error. +/// +/// - Parameters: +/// - request: Request object which has been cancelled before receiving a response from remote origin. +/// - error: Cancellation error. +/// - Returns: Configured and ready to use error instance. ++ (instancetype)pn_errorWithCancelledRequest:(PNTransportRequest *)request error:(nullable NSError *)error; + +/// Create error from JSON response. +/// +/// - Parameters: +/// - request: Request object for which remote origin returned processing error. +/// - response: Remote origin response with results of access to the resource. +/// - Returns: Configured and ready to use error instance. ++ (instancetype)pn_errorWithRequest:(PNTransportRequest *)request jsonResponse:(id)response; + +/// Create receiver's copy with additional fields in `userInfo`. +/// +/// Attach information to the error created by the transport implementation about the `request` which has been processed +/// and `response`. +/// +/// - Parameters: +/// - request: Request object for which remote origin returned processing error. +/// - response: Remote origin response with results of access to the resource. +/// - Returns: Configured and ready to use error instance. +- (instancetype)pn_errorWithRequest:(PNTransportRequest *)request response:(nullable id)response; + + +#pragma mark - Misc + +/// Identify error code from request processing status code. +/// +/// - Parameter statusCode: Status code returned by remote origin in response to remote resource access request. +/// - Returns: Known error code which correspond to the `statusCode`. ++ (NSInteger)pn_errorCodeFromStatusCode:(NSUInteger)statusCode; + +/// Human-readable meaning of the error code. +/// +/// - Parameter error: Identified error code. +/// - Returns: Human-readable error code description. ++ (NSString *)pn_errorDescriptionForErrorCode:(NSUInteger)error; + +/// Human-readable reason of the error. +/// +/// - Parameter error: Identified error code. +/// - Returns: Human-readable error reason by error code. ++ (nullable NSString *)pn_errorReasonForErrorCode:(NSUInteger)error; + +/// Human-readable error recovery suggestion. +/// +/// - Parameter error: Identified error code. +/// - Returns: Human-readable error recovery suggestion. ++ (nullable NSString *)pn_errorRecoveryForErrorCode:(NSUInteger)error; + +/// Compose full request url. +/// +/// - Parameter request: Request from which full URL should be retrieved. +/// - Returns: URL which has been composed from information available in `request`. ++ (NSString *)pn_fullURLFromRequest:(PNTransportRequest *)request; + +/// Check whether `response` contains JSON data or not. +/// +/// - Parameter response: Remote origin response with results of access to the resource. +/// - Returns: `YES` if content can be read as JSON data. ++ (BOOL)pn_isJSONResponse:(id)response; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation NSError (PNTransport) + + +#pragma mark - Initialization and Configuration + ++ (instancetype)pn_errorWithTransportRequest:(PNTransportRequest *)request + response:(id)response + error:(NSError *)error { + if (request.cancelled || error.code == NSURLErrorCancelled) { + return [self pn_errorWithCancelledRequest:request error:error]; + } else if (error) return error; + + if ([self pn_isJSONResponse:response]) return [self pn_errorWithRequest:request jsonResponse:response]; + return nil; +} + ++ (instancetype)pn_errorWithCancelledRequest:(PNTransportRequest *)request error:(NSError *)error { + NSInteger errorCode = PNTransportErrorRequestCancelled; + NSDictionary *userInfo = error.userInfo; + + if (!error) { + NSMutableDictionary *info = [PNErrorUserInfo([self pn_errorDescriptionForErrorCode:errorCode], + [self pn_errorReasonForErrorCode:errorCode], + [self pn_errorRecoveryForErrorCode:errorCode], + error) + mutableCopy]; + info[NSURLErrorFailingURLErrorKey] = [NSURL URLWithString:[self pn_fullURLFromRequest:request]]; + userInfo = info; + } + + return [self errorWithDomain:PNTransportErrorDomain code:errorCode userInfo:userInfo]; +} + ++ (instancetype)pn_errorWithRequest:(PNTransportRequest *)request jsonResponse:(id)response { + NSInteger errorCode = [self pn_errorCodeFromStatusCode:response.statusCode]; + NSURL *url = [NSURL URLWithString:[self pn_fullURLFromRequest:request]]; + NSData *body = response.body; + + if (body.length == 0) { + NSMutableDictionary *info = [NSMutableDictionary dictionaryWithDictionary:PNErrorUserInfo( + [self pn_errorDescriptionForErrorCode:errorCode], + [self pn_errorReasonForErrorCode:errorCode], + [self pn_errorRecoveryForErrorCode:errorCode], + nil + )]; + info[NSURLErrorFailingURLErrorKey] = url; + + return [NSError errorWithDomain:PNAPIErrorDomain code:errorCode userInfo:info]; + } + + NSError *jsonError = nil; + id payload = [NSJSONSerialization JSONObjectWithData:body options:(NSJSONReadingOptions)0 error:&jsonError]; + NSDictionary *additionalDetails = nil; + NSString *errorMessage = nil; + NSString *errorReason = nil; + + if([payload isKindOfClass:[NSArray class]]) { + NSArray *array = payload; + if (array.count == 3) { + if ([array[0] isKindOfClass:[NSString class]]) errorMessage = array[0]; + else if ([array[0] isKindOfClass:[NSNumber class]] && [array[1] isKindOfClass:[NSString class]]) { + if ([array[0] isEqual:@0]) errorMessage = array[1]; + } + } + } else if([payload isKindOfClass:[NSDictionary class]]) { + NSDictionary *dictionary = payload; + id description = dictionary[@"error"]; + + if ([description isKindOfClass:[NSString class]]) errorMessage = description; + else if (!description || ([description isKindOfClass:[NSNumber class]] && ((NSNumber *)description).boolValue && + dictionary[@"error_message"])) { + description = dictionary[@"error_message"]; + } + + if ([description isKindOfClass:[NSDictionary class]] && description[@"message"]) { + NSMutableArray *errorDetails = description[@"details"]; + errorReason = description[@"message"]; + + if (errorDetails.count) { + NSMutableArray *detailStrings = [NSMutableArray new]; + + for (NSDictionary *details in errorDetails) { + NSString *detailString = @""; + + if (details[@"message"]) detailString = [@"- " stringByAppendingString:details[@"message"]]; + if (details[@"location"]) { + detailString = [detailString stringByAppendingFormat:@"%@ Location: %@", + detailString.length ? @"" : @"-", details[@"location"]]; + } + + [detailStrings addObject:detailString]; + } + + if (detailStrings.count) { + errorReason = [errorReason stringByAppendingFormat:@" Details:\n%@", + [detailStrings componentsJoinedByString:@"\n"]]; + } + } + } + + if (errorReason || dictionary[@"message"]) errorMessage = dictionary[@"message"] ?: errorReason; + if ([dictionary[@"status"] isKindOfClass:[NSNumber class]]) { + errorCode = [self pn_errorCodeFromStatusCode:((NSNumber *)dictionary[@"status"]).integerValue]; + } + + if (dictionary[@"payload"]) { + NSMutableDictionary *details = [NSMutableDictionary dictionaryWithDictionary:@{ + @"channels": [dictionary valueForKeyPath:@"payload.channels"] ?: @[], + @"channelGroups": [dictionary valueForKeyPath:@"payload.channel-groups"] ?: @[], + }]; + + if (((NSArray *)details[@"channels"]).count == 0 && ((NSArray *)details[@"channelGroups"]).count == 0) { + [details removeAllObjects]; + details[@"data"] = dictionary[@"payload"]; + } + + additionalDetails = details; + } + } + + if ([errorMessage containsString:@"not enabled"]) errorCode = PNAPIErrorFeatureNotEnabled; + if (!payload && body.length) payload = [[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding]; + + NSMutableDictionary *info = [NSMutableDictionary dictionaryWithDictionary:PNErrorUserInfo( + [self pn_errorDescriptionForErrorCode:errorCode], + errorMessage ?: [self pn_errorReasonForErrorCode:errorCode], + [self pn_errorRecoveryForErrorCode:errorCode], + nil + )]; + + info[NSURLErrorFailingURLErrorKey] = url; + info[PNTransportResponseKey] = response; + info[PNTransportRequestKey] = request; + + return [self errorWithDomain:PNAPIErrorDomain code:errorCode userInfo:info]; +} + +- (instancetype)pn_errorWithRequest:(PNTransportRequest *)request response:(id)response { + NSMutableDictionary *userInfo = [(self.userInfo ?: @{}) mutableCopy]; + userInfo[PNTransportResponseKey] = response; + userInfo[PNTransportRequestKey] = request; + + return [[[self class] alloc] initWithDomain:self.domain code:self.code userInfo:userInfo]; +} + + +#pragma mark - Misc + ++ (NSInteger)pn_errorCodeFromStatusCode:(NSInteger)statusCode { + NSInteger errorCode = PNErrorUnknown; + + if (statusCode == 403) errorCode = PNAPIErrorAccessDenied; + else if (statusCode == 411) errorCode = PNAPIErrorBadRequest; + else if (statusCode == 414) errorCode = PNAPIErrorRequestURITooLong; + else if (statusCode == 481) errorCode = PNAPIErrorMalformedFilterExpression; + + return errorCode; +} + ++ (NSString *)pn_errorDescriptionForErrorCode:(NSUInteger)error { + if (error != PNErrorUnknown) return @"Request processing error."; + return @"Unkown request processing error."; +} + ++ (NSString *)pn_errorReasonForErrorCode:(NSUInteger)error { + if (error == PNAPIErrorFeatureNotEnabled) return @"Used feature not enabled for keys set."; + else if (error == PNTransportErrorRequestCancelled) return @"Request explicitly has been cancelled."; + else if (error == PNAPIErrorAccessDenied) return @"Insufficient permissions to access remote resource."; + else if (error == PNAPIErrorAccessDenied) return @"Insufficient permissions to access remote resource."; + else if (error == PNAPIErrorBadRequest) return @"Incomplete or malformed request path."; + else if (error == PNAPIErrorRequestURITooLong) return @"Request URI is too long."; + else if (error == PNAPIErrorMalformedFilterExpression) { + return @"Malformed or invalid filter experssion used with subscribe request."; + } + + return nil; +} + ++ (nullable NSString *)pn_errorRecoveryForErrorCode:(NSUInteger)error { + if (error == PNAPIErrorFeatureNotEnabled) { + return @"Enable feature in PubNub dashboard for keys set used to configurate PubNub client instance."; + } else if (error == PNAPIErrorAccessDenied) { + return @"Check request parameters to include 'auth' with key which has required permissions."; + } else if (error == PNAPIErrorRequestURITooLong) { + return @"Use POST body if possible or reduce number of channels and groups used in subscribe request."; + } else if (error == PNAPIErrorMalformedFilterExpression) { + return @"Check syntax which has been used in filter expression during PubNub client configuration."; + } + + return nil; +} + ++ (NSString *)pn_fullURLFromRequest:(PNTransportRequest *)request { + NSMutableArray *query = [NSMutableArray arrayWithCapacity:request.query.count]; + [request.query enumerateKeysAndObjectsUsingBlock:^(NSString *key, id value, BOOL *stop) { + [query addObject:PNStringFormat(@"%@=%@", key, value)]; + }]; + + NSString *queryString = query.count > 0 ? PNStringFormat(@"?%@", [query componentsJoinedByString:@"&"]) : @""; + NSString *schema = PNStringFormat(@"http%@://", request.secure ? @"s" : @""); + + return PNStringFormat(@"%@%@%@%@", schema, request.origin, request.path, queryString); +} + ++ (BOOL)pn_isJSONResponse:(id)response { + NSString *contentType = response.headers[@"content-type"]; + static NSArray *_jsonContentTypes; + static dispatch_once_t onceToken; + BOOL isJSONResponse = NO; + + dispatch_once(&onceToken, ^{ + _jsonContentTypes = @[@"application/json", @"text/json", @"text/javascript"]; + }); + + for (NSString *type in _jsonContentTypes) { + if ((isJSONResponse = [contentType containsString:type])) break; + } + + return isJSONResponse; +} + +#pragma mark - + + +@end diff --git a/PubNub/Misc/Helpers/PNDefines.h b/PubNub/Misc/Helpers/PNDefines.h index 37c4ef2bd..3badf4fb3 100644 --- a/PubNub/Misc/Helpers/PNDefines.h +++ b/PubNub/Misc/Helpers/PNDefines.h @@ -6,16 +6,6 @@ #ifndef PNDefines_h #define PNDefines_h -#if TARGET_OS_IOS - #define PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE_SINCE @"10.0.0" -#elif TARGET_OS_WATCH - #define PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE_SINCE @"3.0.0" -#elif TARGET_OS_TV - #define PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE_SINCE @"10.0.0" -#else - #define PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE_SINCE @"10.12.0" -#endif - // Whether iOS/tvOS 10.0, watchOS 3.0 and macOS 10.12 SDK API can be used (project's base SDK set to allow). #define PN_OS_VERSION_10_SDK_API_AVAILABLE 0 #if (TARGET_OS_IOS && __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000) || \ @@ -38,10 +28,8 @@ #endif #if PN_OS_VERSION_10_SDK_API_AVAILABLE - #define PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE 1 #define PN_OS_UNFAIR_LOCK_AVAILABLE 1 #else - #define PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE 0 #define PN_OS_UNFAIR_LOCK_AVAILABLE 0 #endif diff --git a/PubNub/Misc/Helpers/PNFunctions.h b/PubNub/Misc/Helpers/PNFunctions.h new file mode 100644 index 000000000..7af4918c1 --- /dev/null +++ b/PubNub/Misc/Helpers/PNFunctions.h @@ -0,0 +1,57 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#ifndef PNFunctions_h +#define PNFunctions_h + + +#pragma mark - Object + +/// Check whether `object` is kind of _any_ provided classes. +/// +/// - Parameters: +/// - object: Object which is checked. +/// - classes: List of classes against which check should be done. +/// - Returns: `YES` in case if `aClass` is kind of at least one passes class. +extern BOOL PNNSObjectIsKindOfAnyClass(id object, NSArray *classes); + +/// Check whether `aClass` is subclass of _any_ provided classes. +/// +/// - Parameters: +/// - object: Object which is checked. +/// - classes: List of classes against which check should be done. +/// - Returns: `YES` in case if `aClass` is subclass of at least one passes class. +extern BOOL PNNSObjectIsSubclassOfAnyClass(id object, NSArray *classes); + + +#pragma mark - String + +/// Construct `NSString` instance as formatted string. +/// +/// - Parameters: +/// - format: String with placeholders for values in variable arguments list. +/// - ...: List of values which will substitute placeholders in format. +/// - Returns: `NSString` instance with pre-formatted text. +extern NSString * PNStringFormat(NSString *format, ...) NS_FORMAT_FUNCTION(1,2); + + +#pragma mark - Errors + +/// Construct `userInfo` dictionary for error description. +/// +/// - Parameters: +/// - description: Short error description. +/// - reason: Insights on what may caused an error. +/// - recovery: Possible ways to recovery after reported error. +/// - error: Underlying error signalled by other sub-system. +/// - Returns: Dictionary with keys describing error. +extern NSDictionary * PNErrorUserInfo(NSString * _Nullable description, + NSString * _Nullable reason, + NSString * _Nullable recovery, + NSError * _Nullable error); + +#endif // PNFunctions_h + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Misc/Helpers/PNFunctions.m b/PubNub/Misc/Helpers/PNFunctions.m new file mode 100644 index 000000000..ac4854726 --- /dev/null +++ b/PubNub/Misc/Helpers/PNFunctions.m @@ -0,0 +1,48 @@ +#import "PNFunctions.h" + + +#pragma mark - Object + +BOOL PNNSObjectIsKindOfAnyClass(id object, NSArray *classes) { + for (Class cls in classes) { + if ([object isKindOfClass:cls]) return YES; + } + + return NO; +} + +BOOL PNNSObjectIsSubclassOfAnyClass(id object, NSArray *classes) { + Class aClass = [object class]; + + for (Class listedClass in classes) { + if ([aClass isSubclassOfClass:listedClass]) return YES; + } + + return NO; +} + + +#pragma mark - String + +NSString *PNStringFormat(NSString *format, ...) { + va_list args; + va_start (args, format); + NSString *string = [[NSString alloc] initWithFormat:format arguments:args]; + va_end(args); + + return string; +} + + +#pragma mark - Error + +NSDictionary * PNErrorUserInfo(NSString *description, NSString *reason, NSString *recovery, NSError *error) { + NSMutableDictionary *info = [NSMutableDictionary new]; + + info[NSLocalizedDescriptionKey] = description; + info[NSLocalizedFailureReasonErrorKey] = reason; + info[NSLocalizedRecoverySuggestionErrorKey] = recovery; + info[NSUnderlyingErrorKey] = error; + + return info; +} diff --git a/PubNub/Misc/Helpers/PNGZIP.h b/PubNub/Misc/Helpers/PNGZIP.h index 900b7153e..ca74cc8d7 100644 --- a/PubNub/Misc/Helpers/PNGZIP.h +++ b/PubNub/Misc/Helpers/PNGZIP.h @@ -3,29 +3,18 @@ NS_ASSUME_NONNULL_BEGIN -/** - @brief Useful methods collection to work with data compression/uncompression. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNGZIP : NSObject - +#pragma mark Interface implementation -///------------------------------------------------ -/// @name Compression -///------------------------------------------------ - -/** - @brief Allow to compress passed \c data. +/// Useful methods collection to work with data compression/uncompression. +@interface PNGZIP : NSObject - @param data Data which should be compressed with GZIP deflate algorithm. - @return Compressed \a NSData instance or \c nil in case if compression error occurred. +#pragma mark - Compression - @since 4.0 - */ +/// Allow to compress passed `data`. +/// +/// - Parameter data: Data which should be compressed with GZIP deflate algorithm. +/// - Returns: Compressed `NSData` instance or `nil` in case if compression error occurred. + (nullable NSData *)GZIPDeflatedData:(NSData *)data; #pragma mark - diff --git a/PubNub/Misc/Helpers/PNGZIP.m b/PubNub/Misc/Helpers/PNGZIP.m index 09455b28c..3ca43e5ad 100644 --- a/PubNub/Misc/Helpers/PNGZIP.m +++ b/PubNub/Misc/Helpers/PNGZIP.m @@ -1,8 +1,3 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ #import "PNGZIP.h" #import @@ -15,11 +10,10 @@ @implementation PNGZIP #pragma mark - Compression + (NSData *)GZIPDeflatedData:(NSData *)data { - NSMutableData *processedDataStorage = nil; NSUInteger window = 31; + if (data.length > 0) { - BOOL done = NO; int status; z_stream stream; @@ -33,17 +27,15 @@ + (NSData *)GZIPDeflatedData:(NSData *)data { status = deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, window, 8, Z_DEFAULT_STRATEGY); if (status == Z_OK) { - BOOL isOperationCompleted = NO; processedDataStorage = [[NSMutableData alloc] initWithLength:1024]; while (!isOperationCompleted) { - // Make sure we have enough room and reset the lengths. - if ((status == Z_BUF_ERROR) || stream.total_out >= processedDataStorage.length) { - + if ((status == Z_BUF_ERROR) || stream.total_out >= processedDataStorage.length) { [processedDataStorage increaseLengthBy:1024]; } + stream.next_out = (Bytef*)processedDataStorage.mutableBytes + stream.total_out; stream.avail_out = (uInt)(processedDataStorage.length - stream.total_out); @@ -56,17 +48,15 @@ + (NSData *)GZIPDeflatedData:(NSData *)data { done = (status == Z_OK || status == Z_STREAM_END); if (status == Z_OK) { - // Set real length. - if (done) { [processedDataStorage setLength:stream.total_out]; } + if (done) [processedDataStorage setLength:stream.total_out]; } } } - return (processedDataStorage.length ? processedDataStorage : nil); + return processedDataStorage.length ? processedDataStorage : nil; } - #pragma mark - diff --git a/PubNub/Misc/Helpers/PNLock.h b/PubNub/Misc/Helpers/PNLock.h new file mode 100644 index 000000000..76d6f325a --- /dev/null +++ b/PubNub/Misc/Helpers/PNLock.h @@ -0,0 +1,91 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Shared resources lock. +/// +/// GCD based lock to organise thread-safe access to shared resources. +@interface PNLock : NSObject + + +#pragma mark - Initialization and configuration + +/// Initialize lock with name. +/// +/// Lock allows protecting mutable resources, accessed from multiple thread on read and write. Lock +/// implemented as MRSW, which allows having multiple readers and single writer. +/// +/// > Note: Implementation of this lock allows avoiding threads starvation issue by targeting single +/// concurrent subsystem queue (as target of named queue). +/// +/// - Parameters: +/// - queueName: Name of shared resources isolation queue. +/// - queueIdentifier: Identifier of queue which used by subsystem. +/// - Returns: Shared resources lock. ++ (instancetype)lockWithIsolationQueueName:(NSString *)queueName + subsystemQueueIdentifier:(NSString *)queueIdentifier; + + +#pragma mark - Read / write locks + +/// Safe _synchronous_ `read` access to resources. +/// +/// > Note: This is shorthand method to ``syncReadAccessWithBlock:``. +/// +/// > Warning: This method should be used only for `read` or it may cause a runtime exception. If data should +/// be modified while accessed, it is better to user ``syncWriteAccessWithBlock:`` or +/// ``asyncWriteAccessWithBlock:``. +/// +/// - Parameter block: GCD block within which it is safe to read resources from other threads. +- (void)readAccessWithBlock:(dispatch_block_t)block; + +/// Safe _synchronous_ `write` access to resources. +/// +/// > Note: This is shorthand method to ``asyncWriteAccessWithBlock:``. +/// +/// - Parameter block: GCD block within which it is safe to modify resources from other threads. +- (void)writeAccessWithBlock:(dispatch_block_t)block; + + +#pragma mark - Synchronous read / write locks + +/// Safe _synchronous_ `read` access to resources. +/// +/// > Warning: This method should be used only for `read` or it may cause a runtime exception. If data should +/// be modified while accessed, it is better to user ``syncWriteAccessWithBlock:`` or +/// ``asyncWriteAccessWithBlock:``. +/// +/// - Parameter block: GCD block within which it is safe to read resources from other threads. +- (void)syncReadAccessWithBlock:(dispatch_block_t)block; + +/// Safe _synchronous_ `write` access to resources. +/// +/// - Parameter block: GCD block within which it is safe to modify resources from other threads. +- (void)syncWriteAccessWithBlock:(dispatch_block_t)block; + + +#pragma mark - Asynchronous read / write locks + +/// Safe _asynchronous_ `read` access to resources. +/// +/// > Warning: This method should be used only for `read` or it may cause a runtime exception. If data should +/// be modified while accessed, it is better to user ``syncWriteAccessWithBlock:`` or +/// ``asyncWriteAccessWithBlock:``. +/// +/// - Parameter block: GCD block within which it is safe to read resources from other threads. +- (void)asyncReadAccessWithBlock:(dispatch_block_t)block; + +/// Safe _asynchronous_ `write` access to resources. +/// +/// - Parameter block: GCD block within which it is safe to modify resources from other threads. +- (void)asyncWriteAccessWithBlock:(dispatch_block_t)block; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Misc/Helpers/PNLock.m b/PubNub/Misc/Helpers/PNLock.m new file mode 100644 index 000000000..34cbb7e39 --- /dev/null +++ b/PubNub/Misc/Helpers/PNLock.m @@ -0,0 +1,176 @@ +#import "PNLock.h" +#import "PNFunctions.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Protected interface declaration + +@interface PNLock () + + +#pragma mark - Properties + +/// Isolation queue to protect ``PNLock`` shared resources. +/// +/// ``PNLock`` track list of created subsystem queues, which is accessed from multiple thread when new lock +/// created. This queue allows making access safe to mutable map. +@property(class, strong, nonatomic, readonly) dispatch_queue_t sharedResourcesQueue; + +/// Resources isolation queue. +/// +/// Queue which is used to isolate resources accessed within GCD blocks provided by lock. +@property(strong, nonatomic) dispatch_queue_t queue; + +/// Synchronous write lock status. +/// +/// Stores whether currently synchronous write lock is active or not. +@property(assign, atomic, getter=isWriteLockAcquired) BOOL writeLockAcquired; + + +#pragma mark - Initialization and configuration + +/// Initialize lock with name. +/// +/// Lock allows protecting mutable resources, accessed from multiple thread on read and write. Lock +/// implemented as MRSW, which allows having multiple readers and single writer. +/// +/// > Note: Implementation of this lock allows avoiding threads starvation issue by targeting single +/// concurrent subsystem queue (as target of named queue). +/// +/// - Parameters: +/// - queueName: Name of shared resources isolation queue. +/// - queueIdentifier: Identifier of queue which used by subsystem. +/// - Returns: Shared resources lock. +- (instancetype)initWithIsolationQueueName:(NSString *)queueName + subsystemQueueIdentifier:(NSString *)queueIdentifier; + + +#pragma mark - Helpers + +/// Retrieve concurrent queue for subsystem resources isolation. +/// +/// - Parameter identifier: Identifier which is unique for an instance or set of instances in the subsystem. +/// - Returns: Concurrent isolation queue. ++ (dispatch_queue_t)subsystemQueueWithIdentifier:(NSString *)identifier; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNLock + + +#pragma mark - Properties + ++ (dispatch_queue_t)sharedResourcesQueue { + static dispatch_queue_t _sharedResourcesQueue; + static dispatch_once_t onceToken; + + dispatch_once(&onceToken, ^{ + _sharedResourcesQueue = dispatch_queue_create("com.pubnub.core.lock-shared", DISPATCH_QUEUE_SERIAL); + }); + + return _sharedResourcesQueue; +} + + +#pragma mark - Initialization and configuration + ++ (instancetype)lockWithIsolationQueueName:(NSString *)queueName + subsystemQueueIdentifier:(NSString *)queueIdentifier { + return [[self alloc] initWithIsolationQueueName:queueName subsystemQueueIdentifier:queueIdentifier]; +} + +- (instancetype)initWithIsolationQueueName:(NSString *)queueName + subsystemQueueIdentifier:(NSString *)queueIdentifier { + if ((self = [super init])) { + NSString *label = [NSString stringWithFormat:@"%@.%@", queueIdentifier, queueName]; + const char *queueLabel = [label cStringUsingEncoding:NSUTF8StringEncoding]; + dispatch_queue_t targetQueue = [[self class] subsystemQueueWithIdentifier:queueIdentifier]; + self.queue = dispatch_queue_create_with_target(queueLabel, DISPATCH_QUEUE_CONCURRENT, targetQueue); + } + + return self; +} + + +#pragma mark - Read / write locks + +- (void)readAccessWithBlock:(dispatch_block_t)block { + [self syncReadAccessWithBlock:block]; +} + +- (void)writeAccessWithBlock:(dispatch_block_t)block { + [self asyncWriteAccessWithBlock:block]; +} + + +#pragma mark - Synchronous read / write locks + +- (void)syncReadAccessWithBlock:(dispatch_block_t)block { + dispatch_sync(self.queue, block); +} + +- (void)syncWriteAccessWithBlock:(dispatch_block_t)block { + dispatch_barrier_sync(self.queue, ^{ + self.writeLockAcquired = YES; + block(); + self.writeLockAcquired = NO; + }); +} + + +#pragma mark - Asynchronous read / write locks + +- (void)asyncReadAccessWithBlock:(dispatch_block_t)block { + dispatch_async(self.queue, block); +} + +- (void)asyncWriteAccessWithBlock:(dispatch_block_t)block { + dispatch_barrier_async(self.queue, ^{ + self.writeLockAcquired = YES; + block(); + self.writeLockAcquired = NO; + }); +} + + +#pragma mark - Helpers + ++ (dispatch_queue_t)subsystemQueueWithIdentifier:(NSString *)identifier { + static NSMapTable * _subsystemQueues; + static dispatch_once_t onceToken; + __block dispatch_queue_t queue; + + dispatch_once(&onceToken, ^{ + // Creating map with weak objects to make it possible for queue to be removed from list, when last + // reference on lock which use this subsystem queue will be released. + // Because queues created with `dispatch_queue_create_with_target`, it will keep subsystem queue + // valid. + _subsystemQueues = [NSMapTable strongToWeakObjectsMapTable]; + }); + + dispatch_sync(self.sharedResourcesQueue, ^{ + queue = [_subsystemQueues objectForKey:identifier]; + + if (!queue) { + const char *queueIdentifier = [identifier cStringUsingEncoding:NSUTF8StringEncoding]; + queue = dispatch_queue_create(queueIdentifier, DISPATCH_QUEUE_CONCURRENT); + [_subsystemQueues setObject:queue forKey:identifier]; + } + }); + + return queue; +} + +#pragma mark - + + +@end diff --git a/PubNub/Misc/Logger/PNLogMacro.h b/PubNub/Misc/Logger/PNLogMacro.h index 0b93bf448..27e564bc3 100644 --- a/PubNub/Misc/Logger/PNLogMacro.h +++ b/PubNub/Misc/Logger/PNLogMacro.h @@ -1,25 +1,28 @@ -/** - @brief Define list of macro which used by clien't component to print out messages using - \b PNLLogger. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNLLogger.h" -#import "PNDefines.h" +/// Define list of macro which used by clien't component to print out messages using ``PNLLogger``. #pragma once +#ifndef PUBNUB_DISABLE_LOGGER +#import "PNLLogger.h" +#import "PNDefines.h" + #define PNLOG(logger, level, frmt, ...) [logger log:level format:frmt, ##__VA_ARGS__] #define PNLogClientInfo(logger, frmt, ...) PNLOG(logger, PNInfoLogLevel, frmt, ##__VA_ARGS__) #define PNLogReachability(logger, frmt, ...) PNLOG(logger, PNReachabilityLogLevel, frmt, ##__VA_ARGS__) #define PNLogRequest(logger, frmt, ...) PNLOG(logger, PNRequestLogLevel, frmt, ##__VA_ARGS__) -#if PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE - #define PNLogRequestMetrics(logger, frmt, ...) PNLOG(logger, PNRequestMetricsLogLevel, frmt, ##__VA_ARGS__) -#endif #define PNLogResult(logger, frmt, ...) PNLOG(logger, PNResultLogLevel, frmt, ##__VA_ARGS__) #define PNLogStatus(logger, frmt, ...) PNLOG(logger, PNStatusLogLevel, frmt, ##__VA_ARGS__) #define PNLogFailureStatus(logger, frmt, ...) PNLOG(logger, PNFailureStatusLogLevel, frmt, ##__VA_ARGS__) #define PNLogAESError(logger, frmt, ...) PNLOG(logger, PNAESErrorLogLevel, frmt, ##__VA_ARGS__) #define PNLogAPICall(logger, frmt, ...) PNLOG(logger, PNAPICallLogLevel, frmt, ##__VA_ARGS__) +#else +#define PNLOG(logger, level, frmt, ...) +#define PNLogClientInfo(logger, frmt, ...) +#define PNLogReachability(logger, frmt, ...) +#define PNLogRequest(logger, frmt, ...) +#define PNLogResult(logger, frmt, ...) +#define PNLogStatus(logger, frmt, ...) +#define PNLogFailureStatus(logger, frmt, ...) +#define PNLogAESError(logger, frmt, ...) +#define PNLogAPICall(logger, frmt, ...) +#endif // PUBNUB_DISABLE_LOGGER diff --git a/PubNub/Misc/PNConstants.h b/PubNub/Misc/PNConstants.h index ae077e297..058e136b0 100644 --- a/PubNub/Misc/PNConstants.h +++ b/PubNub/Misc/PNConstants.h @@ -15,7 +15,7 @@ #pragma mark General information constants // Stores client library version number -static NSString * const kPNLibraryVersion = @"5.5.0"; +static NSString * const kPNLibraryVersion = @"5.6.0"; // Stores information about SDK codebase static NSString * const kPNCommit = @"fd5c7ed678527fce07eaf7eb162935caf1bfd303"; @@ -56,8 +56,5 @@ static BOOL const kPNDefaultShouldKeepTimeTokenOnListChange = YES; static BOOL const kPNDefaultShouldTryCatchUpOnSubscriptionRestore = YES; static BOOL const kPNDefaultRequestMessageCountThreshold = 0; static NSUInteger const kPNDefaultMaximumMessagesCacheSize = 100; -#if TARGET_OS_IOS -static BOOL const kPNDefaultShouldCompleteRequestsBeforeSuspension = YES; -#endif // TARGET_OS_IOS #endif // PNConstants_h diff --git a/PubNub/Misc/PNErrorCodes.h b/PubNub/Misc/PNErrorCodes.h deleted file mode 100644 index a8b6bb85f..000000000 --- a/PubNub/Misc/PNErrorCodes.h +++ /dev/null @@ -1,84 +0,0 @@ -/** - * @brief Header for list of error domains and error codes constants. - * - * @author Serhii Mamontov - * @version 4.10.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import - - -#ifndef PNErrorCodes_h -#define PNErrorCodes_h - -#pragma mark - Error domains - -static NSString * const kPNStorageErrorDomain = @"PNStorageErrorDomain"; -static NSString * const kPNCBORErrorDomain = @"PNCBORErrorDomain"; -static NSString * const kPNAESErrorDomain = @"PNAESErrorDomain"; -static NSString * const kPNCryptorErrorDomain = @"PNCryptorErrorDomain"; -static NSString * const kPNAPIErrorDomain = @"PNAPIErrorDomain"; -static NSString * const kPNAuthErrorDomain = @"PNAuthErrorDomain"; - - -#pragma mark - General error codes - -static NSInteger const kPNUnknownErrorCode = -1; - -/** - * @brief Incomplete or unacceptable set of parameters. - */ -static NSInteger const kPNAPIUnacceptableParameters = 100; - - -#pragma mark - Auth - -/** - * @brief Auth token expired. - */ -static NSInteger const kPNAuthPAMTokenExpiredError = 3000; - -/** - * @brief Auth token's UUID doesn't match \c uuid used by \b PubNub instance. - */ -static NSInteger const kPNAuthPAMTokenWrongUUIDError = 3001; - - -#pragma mark - Publish - -static NSInteger const kPNEmptyMessageError = 4000; - - -#pragma mark - AES Error domain codes - -static NSInteger const kPNAESEmptyObjectError = 5000; -static NSInteger const kPNAESConfigurationError = 5001; -static NSInteger const kPNAESInsufficientMemoryError = 5002; -static NSInteger const kPNAESEncryptionError = 5003; -static NSInteger const kPNAESDecryptionError = 5004; - -/// Underlying cryptor module configuration error. -static NSInteger const kPNCryptorConfigurationError = kPNAESConfigurationError; - -/// Not enough memory to complete cryptor operation. -static NSInteger const kPNCryptorInsufficientMemoryError = kPNAESInsufficientMemoryError; - -/// There were an error during data encryption process. -static NSInteger const kPNCryptorEncryptionError = kPNAESEncryptionError; - -/// There were an error during data encryption process. -static NSInteger const kPNCryptorDecryptionError = kPNAESDecryptionError; - -/// Unknown cryptor identifier error. -static NSInteger const kPNCryptorUnknownCryptorError = 5005; - - -#pragma mark - CBOR Error domain codes - -static NSInteger const kPNCBORUnexpectedDataTypeError = 6005; -static NSInteger const kPNCBORMalformedDataError = 6006; -static NSInteger const kPNCBORDataItemNotWellFormedError = 6007; -static NSInteger const kPNCBORMissingDataItemError = 6008; - -#endif // PNErrorCodes_h diff --git a/PubNub/Misc/PNPrivateStructures.h b/PubNub/Misc/PNPrivateStructures.h index bf84a1d92..4c6351bbe 100644 --- a/PubNub/Misc/PNPrivateStructures.h +++ b/PubNub/Misc/PNPrivateStructures.h @@ -33,7 +33,12 @@ extern NSString * const kPNConfigurationUserIDKey; * * @since 4.9.0 */ -typedef NS_OPTIONS(NSUInteger, PNMessageType) { +typedef NS_OPTIONS(NSInteger, PNMessageType) { + /** + @brief Type which represent presence object. + */ + PNPresenceMessageType = -1, + /** @brief Type which represent regular message object. */ @@ -218,9 +223,10 @@ static NSString * const PNOperationStatusClasses[57] = { * * @since 4.0.0 */ -static NSString * const PNStatusCategoryStrings[21] = { +static NSString * const PNStatusCategoryStrings[22] = { [PNUnknownCategory] = @"Unknown", [PNAcknowledgmentCategory] = @"Acknowledgment", + [PNResourceNotFoundCategory] = @"Resource Not Found", [PNAccessDeniedCategory] = @"Access Denied", [PNTimeoutCategory] = @"Timeout", [PNNetworkIssuesCategory] = @"Network Issues", diff --git a/PubNub/Misc/PNStructures.h b/PubNub/Misc/PNStructures.h index 29eb1dbff..bf3e0f0c0 100644 --- a/PubNub/Misc/PNStructures.h +++ b/PubNub/Misc/PNStructures.h @@ -12,12 +12,15 @@ #pragma mark Class forward + +@class PNChannelGroupChannelsData, PNPresenceHereNowResult, PNPresenceStateFetchResult; + @class PNPresenceChannelGroupHereNowResult, PNChannelGroupClientStateResult; @class PNPresenceChannelHereNowResult, PNPresenceGlobalHereNowResult, PNAPNSEnabledChannelsResult; @class PNChannelGroupChannelsResult, PNPresenceWhereNowResult, PNChannelClientStateResult; @class PNClientStateGetResult, PNClientStateUpdateStatus, PNAcknowledgmentStatus; -@class PNChannelGroupsResult, PNMessageCountResult, PNHistoryResult, PNAPICallBuilder; -@class PNPublishStatus, PNSignalStatus, PNErrorStatus, PNTimeResult, PNOperationResult, PNStatus; +@class PNMessageCountResult, PNHistoryResult, PNAPICallBuilder; +@class PNPublishStatus, PNSignalStatus, PNErrorStatus, PNStatus, PNTimeResult, PNOperationResult; @class PNSetUUIDMetadataStatus, PNFetchUUIDMetadataResult, PNFetchAllUUIDMetadataResult; @class PNSetChannelMetadataStatus, PNFetchChannelMetadataResult, PNFetchAllChannelsMetadataResult; @class PNManageMembershipsStatus, PNFetchMembershipsResult, PNManageChannelMembersStatus, PNFetchChannelMembersResult; @@ -84,15 +87,6 @@ typedef void(^PNPushNotificationsStateAuditCompletionBlock)(PNAPNSEnabledChannel #pragma mark - Completion blocks :: Stream -/** - * @brief Channel groups list audition completion block. - * - * @param result Result object which describe service response on audition request. - * @param status Status instance which hold information about processing results. - */ -typedef void(^PNGroupAuditCompletionBlock)(PNChannelGroupsResult * _Nullable result, - PNErrorStatus * _Nullable status); - /** * @brief Channel group channels list audition completion block. * @@ -323,14 +317,22 @@ typedef void(^PNDeleteFileCompletionBlock)(PNAcknowledgmentStatus *status); #pragma mark - Completion blocks :: Presence +/// Here now completion block. +/// +/// - Parameters: +/// - result: Result object which describe service response on here now request. +/// - status: Status instance which hold information about processing results. +typedef void(^PNHereNowCompletionBlock)(PNPresenceHereNowResult * _Nullable result, + PNErrorStatus * _Nullable status); + /** * @brief Here now completion block. * * @param result Result object which describe service response on here now request. * @param status Status instance which hold information about processing results. */ -typedef void(^PNHereNowCompletionBlock)(PNPresenceChannelHereNowResult * _Nullable result, - PNErrorStatus * _Nullable status); +typedef void(^PNChannelHereNowCompletionBlock)(PNPresenceChannelHereNowResult * _Nullable result, + PNErrorStatus * _Nullable status); /** * @brief Global here now completion block. @@ -395,6 +397,14 @@ typedef void(^PNMessageSizeCalculationCompletionBlock)(NSInteger size); */ typedef void(^PNSetStateCompletionBlock)(PNClientStateUpdateStatus *status); +/// Associated state fetch completion block. +/// +/// - Parameters: +/// - result: Fetch associated presence state request processing result. +/// - status: Fetch associated presence state request error. +typedef void(^PNPresenceStateFetchCompletionBlock)(PNPresenceStateFetchResult * _Nullable result, + PNErrorStatus * _Nullable status); + /** * @brief Channels / channel groups channels state audition completion block. * @@ -522,146 +532,84 @@ typedef NS_ENUM(NSUInteger, PNAPNSEnvironment) { #pragma mark - Objects API options and enums -/** - * @brief Options with possible additional \c channel / \c membership fields which can be included - * to response. - * - * @since 4.14.0 - */ +/// Options with possible additional `channel` / `membership` fields which can be included to response. typedef NS_OPTIONS(NSUInteger, PNMembershipFields) { - /** - * @brief Include how many memberships \c UUID has. - */ + /// Include how many memberships `UUID` has. PNMembershipsTotalCountField = 1 << 4, - /** - * @brief Include field with additional information from \c metadata which has been associated - * with \c UUID during \c membership \c set requests. - */ + + /// Include field with additional information from `metadata` which has been associated with `UUID` during + /// `membership set` requests. PNMembershipCustomField = 1 << 5, - /** - * @brief Include \c channel's \c metadata into response (not only name). - */ + + /// Include `channel`'s `metadata` into response (not only name). PNMembershipChannelField = 1 << 6, - /** - * @brief Include \c channel's additional information which has been used during \c channel - * \c metadata \c set requests. - */ + + /// Include `channel`'s additional information which has been used during `channel` `metadata set` requests. PNMembershipChannelCustomField = 1 << 7 }; -/** - * @brief Options with possible additional \c UUID / \c member fields which can be included to - * response. - * - * @since 4.14.0 - */ +/// Options with possible additional `UUID` / `member` fields which can be included to response. typedef NS_OPTIONS(NSUInteger, PNChannelMemberFields) { - /** - * @brief Include how many members \c channel has. - */ + /// Include how many members `channel` has. PNChannelMembersTotalCountField = 1 << 8, - /** - * @brief Include field with additional information from \c metadata which has been associated - * with \c UUID during \c channel \c member \c set requests. - */ + + /// Include field with additional information from `metadata` which has been associated with `UUID` during `channel + /// member set` requests. PNChannelMemberCustomField = 1 << 9, - /** - * @brief Include \c UUID's \c metadata into response (not only identifier). - */ + + /// Include `UUID`'s `metadata` into response (not only identifier). PNChannelMemberUUIDField = 1 << 10, - /** - * @brief Include \c UUID's additional information which has been used during \c UUID - * \c metadata \c set requests. - */ + + /// Include `UUID`'s additional information which has been used during `UUID metadata set` requests. PNChannelMemberUUIDCustomField = 1 << 11 }; -/** - * @brief Options with possible additional \c channel fields which can be included to response. - * - * @since 4.14.0 - */ +/// Options with possible additional `channel` fields which can be included to response. typedef NS_OPTIONS(NSUInteger, PNChannelFields) { - /** - * @brief Include how many \c channels has been associated with \c metadata. - */ + /// Include how many `channels` has been associated with `metadata`. PNChannelTotalCountField = 1 << 0, - /** - * @brief Include field with additional information from \c metadata which has been used during - * \c channel \c metadata \c set requests. - */ + + /// Include field with additional information from `metadata` which has been used during `channel metadata set` + /// requests. PNChannelCustomField = 1 << 1 }; -/** - * @brief Options with possible additional \c UUID fields which can be included to response. - * - * @since 4.14.0 - */ +/// Options with possible additional `UUID` fields which can be included to response. typedef NS_OPTIONS(NSUInteger, PNUUIDFields) { - /** - * @brief Include how many \c UUID has been associated with \c metadata. - */ + /// Include how many `UUID` has been associated with `metadata`. PNUUIDTotalCountField = 1 << 2, - /** - * @brief Include field with additional information from \c metadata which has been used during - * \c UUID \c metadata \c set requests. - */ + + /// Include field with additional information from `metadata` which has been used during `UUID metadata set` + /// requests. PNUUIDCustomField = 1 << 3 }; -/** - * @brief Options describe possible heartbeat states on which delegate can be notified. - * - * @since 4.2.7 - */ +/// Options describe possible heartbeat states on which delegate can be notified. typedef NS_OPTIONS(NSUInteger, PNHeartbeatNotificationOptions) { - - /** - * @brief Delegate will be notified every time when heartbeat request will be successfully - * processed. - */ + /// Delegate will be notified every time when heartbeat request will be successfully processed. PNHeartbeatNotifySuccess = (1 << 0), - /** - * @brief Delegate will be notified every time when heartbeat request processing will fail. - */ + /// Delegate will be notified every time when heartbeat request processing will fail. PNHeartbeatNotifyFailure = (1 << 1), - /** - * @brief Delegate will be notified every time when heartbeat request processing will be - * successful or fail. - */ + /// Delegate will be notified every time when heartbeat request processing will be successful or fail. PNHeartbeatNotifyAll = (PNHeartbeatNotifySuccess | PNHeartbeatNotifyFailure), - /** - * @brief Delegate won't be notified about ant heartbeat request processing results. - */ + /// Delegate won't be notified about ant heartbeat request processing results. PNHeartbeatNotifyNone = (1 << 2) }; -/** - * @brief Enum which specify possible actions on objects. - * - * @discussion These fields allow to identify what kind of action has been performed on target - * object. - * - * @since 4.10.0 - */ +/// Enum which specify possible actions on objects. +/// +/// These fields allow to identify what kind of action has been performed on target object. typedef NS_ENUM(NSUInteger, PNObjectActionType) { - /** - * @brief New object entity has been created. - */ + /// New object entity has been created. PNCreateObjectAction, - /** - * @brief Object base or additional (custom field / membership) information has been modified. - */ + /// Object base or additional (custom field / membership) information has been modified. PNUpdateObjectAction, - /** - * @brief Object entity has been deleted. - */ + /// Object entity has been deleted. PNDeleteObjectAction, }; @@ -696,28 +644,16 @@ typedef NS_OPTIONS(NSUInteger, PNLogLevel){ */ PNRequestLogLevel = (1 << 3), -#if PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE - /** - * @brief \b PNLog level which allow to print out all API call requests' metrics. - * - * @discussion Starting from macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0) it is possible - * to gather metrics information about each request processed. - * - * @since 4.5.13 - */ - PNRequestMetricsLogLevel = (1 << 4), -#endif - /** * @brief \b PNLog level which allow to print out API execution results. */ - PNResultLogLevel = (1 << 5), + PNResultLogLevel = (1 << 4), /** * @brief \b PNLog level which allow to print out client state change status information and * API request processing errors. */ - PNStatusLogLevel = (1 << 6), + PNStatusLogLevel = (1 << 5), /** * @brief \b PNLog level which allow to print out every failure status information. @@ -725,7 +661,7 @@ typedef NS_OPTIONS(NSUInteger, PNLogLevel){ * @discussion Every API call may fail and this option allow to print out information about * processing status and current client state. */ - PNFailureStatusLogLevel = (1 << 7), + PNFailureStatusLogLevel = (1 << 6), /** * @brief \b PNLog level which allow to print out all API calls with passed parameters. @@ -733,20 +669,17 @@ typedef NS_OPTIONS(NSUInteger, PNLogLevel){ * @discussion This log level allow with debug to find out when API has been called and what * parameters should be passed. */ - PNAPICallLogLevel = (1 << 8), + PNAPICallLogLevel = (1 << 7), /** * @brief \b PNLog level which allow to print out all AES errors. */ - PNAESErrorLogLevel = (1 << 9), + PNAESErrorLogLevel = (1 << 8), /** * @brief Log every message from \b PubNub client. */ PNVerboseLogLevel = (PNInfoLogLevel|PNReachabilityLogLevel|PNRequestLogLevel| -#if PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE - PNRequestMetricsLogLevel| -#endif PNResultLogLevel|PNStatusLogLevel|PNFailureStatusLogLevel|PNAPICallLogLevel| PNAESErrorLogLevel) }; @@ -866,6 +799,13 @@ typedef NS_ENUM(NSInteger, PNStatusCategory) { */ PNAcknowledgmentCategory, + /** + * @brief \b PubNub resource not found. + * + * @discussion Requested resource / endpoint doesn't exists. + */ + PNResourceNotFoundCategory, + /** * @brief \b PubNub Access Manager forbidden access to particular API. * diff --git a/PubNub/Misc/Protocols/PNEventsListener.h b/PubNub/Misc/Protocols/PNEventsListener.h index e441dda46..0b9dcc3b6 100644 --- a/PubNub/Misc/Protocols/PNEventsListener.h +++ b/PubNub/Misc/Protocols/PNEventsListener.h @@ -1,5 +1,5 @@ #import -#import +#import #pragma mark Class forward @@ -10,15 +10,11 @@ NS_ASSUME_NONNULL_BEGIN -/** - * @brief Interface description for classes which would like to be registered for events from data - * object live feed. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +#pragma mark - Interface declaration + +/// Events handler protocol. +/// +/// Classes which would like to receive real-time updates from PubNub client should implement this protocol. @protocol PNEventsListener @@ -26,73 +22,59 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Message, Actions, Signals and Events handler callbacks -/** - * @brief Notify listener about new message which arrived from one of remote data object's live feed - * on which client subscribed at this moment. - * - * @param client \b PubNub client which triggered this callback method call. - * @param message Instance which store message information in \c data - * property. - */ +/// New real-time message callback. +/// +/// - Parameters: +/// - client: **PubNub** client which triggered this callback method call. +/// - message: Instance which store message information in `data` property. - (void)client:(PubNub *)client didReceiveMessage:(PNMessageResult *)message; -/** - * @brief Notify listener about new signal which arrived from one of remote data object's live feed - * on which client subscribed at this moment. - * - * @param client \b PubNub client which triggered this callback method call. - * @param signal Instance which store signal information in \c data property. - */ +/// New real-time signal callback. +/// +/// - Parameters: +/// - client: **PubNub** client which triggered this callback method call. +/// - signal: Instance which store signal information in `data` property. - (void)client:(PubNub *)client didReceiveSignal:(PNSignalResult *)signal; -/** - * @brief Notify listener about new \c action which arrived from one of remote data object's live - * feed on which client subscribed at this moment. - * - * @param client \b PubNub client which triggered this callback method call. - * @param action Instance which store \c action information in \c data property. - */ +/// New message reaction callback. +/// +/// - Parameters: +/// - client: **PubNub** client which triggered this callback method call. +/// - action: Instance which store `action` information in `data` property. - (void)client:(PubNub *)client didReceiveMessageAction:(PNMessageActionResult *)action; -/** - * @brief Notify listener about new presence events which arrived from one of remote data object's - * presence live feed on which client subscribed at this moment. - * - * @param client \b PubNub client which triggered this callback method call. - * @param event Instance which store presence event information in \c data property. - */ +/// Channels' presence change callback. +/// +/// - Parameters: +/// - client: **PubNub** client which triggered this callback method call. +/// - event: Instance which store presence event information in `data` property. - (void)client:(PubNub *)client didReceivePresenceEvent:(PNPresenceEventResult *)event; -/** - * @brief Notify listener about new \c object events which arrived from one of remote data object's - * live feed on which \c client subscribe at this moment. - * - * @param client \b PubNub client which triggered this callback method call. - * @param event Instance which store information about received event from Objects API use. - */ +/// App Context object state update callback. +/// +/// - Parameters: +/// - client: **PubNub** client which triggered this callback method call. +/// - event: Instance which store information about received event from Objects API use. - (void)client:(PubNub *)client didReceiveObjectEvent:(PNObjectEventResult *)event; -/** - * @brief Notify listener about new \c file events which arrived from one of remote data object's - * live feed on which \c client subscribe at this moment. - * - * @param client \b PubNub client which triggered this callback method call. - * @param event Instance which store information about received event from File API use. - */ +/// File sharing event callback. +/// +/// - Parameters: +/// - client: **PubNub** client which triggered this callback method call. +/// - event: Instance which store information about received event from File API use. - (void)client:(PubNub *)client didReceiveFileEvent:(PNFileEventResult *)event; #pragma mark - Status change handler. -/** - * @brief Notify listener about subscription state changes. - * - * @discussion This callback can fire when client tried to subscribe on channels for which it - * doesn't have access rights or when network went down and client unexpectedly disconnected. - * - * @param client Reference on \b PubNub client which triggered this callback method call. - * @param status Reference on \b PNStatus instance which store subscriber state information. - */ +/// Subscription state changes callback. +/// +/// This callback can fire when client tried to subscribe on channels for which it doesn't have access rights or when +/// network went down and client unexpectedly disconnected. +/// +/// - Parameters: +/// - client: Reference on **PubNub** client which triggered this callback method call. +/// - status: Reference on ``PNStatus`` instance which store subscriber state information. - (void)client:(PubNub *)client didReceiveStatus:(PNStatus *)status; #pragma mark - @@ -108,6 +90,7 @@ DEPRECATED_MSG_ATTRIBUTE("This protocol has been deprecated. Please use PNEvents #pragma mark - + @end NS_ASSUME_NONNULL_END diff --git a/PubNub/Misc/Protocols/Serializer/JSON/PNJSONSerializer.h b/PubNub/Misc/Protocols/Serializer/JSON/PNJSONSerializer.h new file mode 100644 index 000000000..5f7e020dd --- /dev/null +++ b/PubNub/Misc/Protocols/Serializer/JSON/PNJSONSerializer.h @@ -0,0 +1,68 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Types + +/// JSON object deserialization options. +typedef NS_OPTIONS(NSUInteger, PNJSONReadingOptions) { + /// Make all serialized collections mutable (`NSDictionary`, `NSArray`). + PNJSONReadingMutableCollections = (1UL << 0) +}; + +#pragma mark - Protocol interface declaration + +/// JSON serializer protocol. +/// +/// Protocol for module which will be used by **PubNub** client for sent and received JSON serialization. +@protocol PNJSONSerializer + + +#pragma mark - Serialization + +/// Serialize `object` to JSON data. +/// +/// - Throws: Implementation of JSON serializer may throw an exception if passed unsupported data. +/// +/// - Parameters: +/// - object: Object for serialization. +/// - error: If an error occurs, upon return contains an `PNError` object that describes the problem. +/// - Returns: `NSData` instance or `nil` in case of serialization error. +- (nullable NSData *)dataWithJSONObject:(id)object error:(PNError * _Nullable * _Nullable)error; + +/// Deserialize `object` from JSON `data`. +/// +/// - Parameters: +/// - data: JSON data with previously serialized `object`. +/// - error: If an error occurs, upon return contains an `PNError` object that describes the problem. +/// - Returns: Instance restored from JSON data or `nil` in case of deserialization error. +- (id)JSONObjectWithData:(NSData *)data error:(PNError * _Nullable * _Nullable)error; + +/// Deserialize `object` from JSON `data`. +/// +/// - Parameters: +/// - data: JSON data with previously serialized `object`. +/// - options: JSON data deserialization options. +/// - error: If an error occurs, upon return contains an `PNError` object that describes the problem. +/// - Returns: Instance restored from JSON data or `nil` in case of deserialization error. +- (id)JSONObjectWithData:(NSData *)data + options:(PNJSONReadingOptions)options + error:(PNError * _Nullable * _Nullable)error; + + +#pragma mark - Helpers + +/// Check `object` contains JSON-friendly data or not. +/// +/// - Parameter object: Object which should be checked. +/// - Returns: `YES` if `object` can be converted to JSON data. +- (BOOL)isValidJSONObject:(id)object; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Misc/Protocols/Serializer/Object/PNCodable.h b/PubNub/Misc/Protocols/Serializer/Object/PNCodable.h new file mode 100644 index 000000000..6a0a73cae --- /dev/null +++ b/PubNub/Misc/Protocols/Serializer/Object/PNCodable.h @@ -0,0 +1,84 @@ +#import +#import +#import + + +#pragma mark Classes forward + +@class PNJSONEncoder, PNJSONDecoder; + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - Protocol interface declaration + +/// Codable object protocol. +/// +/// If object adopt this protocol, it is able to specify what properties should be encoded / decoded +/// (including their mapping name in serialized object). +/// +/// With optional methods it is possible to customize how ``PubNub/PNEncoder`` and +/// ``PubNub/PNDecoder`` will handle object encoding / decoding. +@protocol PNCodable + + +#pragma mark - Properties + +@optional + +/// Map of object property names to name of keys in serialized object and vice-versa. +@property(class, strong, nullable, nonatomic, readonly) NSDictionary *codingKeys; + +/// List of object property names, which may have different type depending from processed payload for example. +@property(class, strong, nullable, nonatomic, readonly) NSArray *dynamicTypeKeys; + +/// List of object property names, which is optional and can be `nil` in encoded / decoded data. +/// +/// By default, decoders require that values for all properties to be present in provided data. Decoding error will be generated if value for property +/// not found in data. +@property(class, strong, nullable, nonatomic, readonly) NSArray *optionalKeys; + +/// List of object property names, which is not used in encoded / decoded data. +@property(class, strong, nullable, nonatomic, readonly) NSArray *ignoredKeys; + + +#pragma mark - Instance custom encoding / decoding + +/// Restores and returns instance using data provided by decoder. +/// +/// When default key / value mapping is not enough and more complex decoding required (for example +/// collection of custom objects) then this method will become in handy. +/// +/// This method should be used if previously instance has been encoded using ``encodeObjectWithCoder:``. +/// +/// - Parameter coder: Decoder instance with previously encoded information. +/// - Returns: Receiver's instance with data mapped from `coder` or `nil` in case of decoding error. +- (nullable instancetype)initObjectWithCoder:(id)coder; + +/// Encode receiver's data into encoder. +/// +/// With adoption of this protocol, it is possible to customize how an object will be serialized if default +/// key / value mapping is not enough. Also, it is possible to provide more complex serialization logic here +/// (for example, encode a list of objects). +/// +/// - Parameter coder: Decoder instance with previously encoded information. +- (void)encodeObjectWithCoder:(id)coder; + + +#pragma mark - Types + +/// Dynamic data type for `propertyName`. +/// +/// - Parameters: +/// - propertyName: Name of the propery in receiving class for which dynamic data type should be retrieved. +/// - decodedDictionary: Decoded object data. +/// - Returns: Class which should be used to decode object stored in as `propertyName` field. ++ (nullable Class)decodingClassForProperty:(NSString *)propertyName + inDecodedDictionary:(NSDictionary *)decodedDictionary; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Misc/Protocols/Serializer/Object/PNDecoder.h b/PubNub/Misc/Protocols/Serializer/Object/PNDecoder.h new file mode 100644 index 000000000..3b17a84c5 --- /dev/null +++ b/PubNub/Misc/Protocols/Serializer/Object/PNDecoder.h @@ -0,0 +1,425 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Protocol declaration + +/// Data decoder protocol. +/// +/// Decoders used to restore data object after it has been received from transition / storage. +/// This protocol describes general interface for communication between user-code and data +/// decoder / de-serializer. +/// +/// Decoders which conform to this protocol will be used by **PubNub** serialization module to de-serialize +/// **PubNub REST API** response to objects for proper response representation. +@protocol PNDecoder + + +#pragma mark - Properties + +/// Information about data processing error. +/// +/// It is expected that conforming class will stop any data processing in case if error has been signalled. +@property(strong, nullable, nonatomic, readonly) NSError *error; + +/// Additional information which can be used by `aClass` custom initializer. +@property(strong, nullable, nonatomic, readonly) NSDictionary *additionalData; + + +#pragma mark - Initialization and configuration + +/// Initialize decoder, which handles data from `binary` data. +/// +/// Use suitable deserializes to transform binary data to dictionary. +/// > Note: After initialization, check ``error`` before calling any other methods. +/// +/// - Parameter data: Binary serialized data object for processing. +/// - Returns: Ready to use `decoder` instance. +- (instancetype)initForReadingFromData:(NSData *)data; + +/// Initialize decoder, which handles data from `dictionary`. +/// +/// > Note: After initialization, check ``error`` before calling any other methods. +/// +/// - Parameter dictionary: Key / value representation of encoded data. +/// - Returns: Ready to use `decoder` instance. +- (instancetype)initForReadingFromDictionary:(NSDictionary *)dictionary; + + +#pragma mark - Decode Top-Level Objects + +/// Decodes and returns general `object` associated with string key. +/// +/// Implementation of this method can hold complicated logic to identify the best approach for data decoding +/// and can affect performance. +/// +/// An implementation, for example, may try to parse `NSString` instance as `NSData` by assuming that it is +/// Base64-encoded data string and if it fails, proceed and return `NSString` instance itself. +/// +/// > Important: Because of lossy encoding, not all objects can be decoded back automatically because of lack +/// of context. For example, if `NSDate` encoded into `NSNumber` it is hard to figure out without context +/// whether value should be decoded as `NSNumber` or `NSDate` instance. When potential data type confusion is +/// possible, use method dedicated for specific `object` type like: ``decodeNumberForKey:``, +/// ``decodeDataForKey:`` or ``decodeDateForKey:``. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data associated with `key`_. +/// +/// - Parameters: +/// - key: The key that decoded value is associated with. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Decoded object, or `nil` in case of decoding failure. +- (nullable id)decodeTopLevelObjectForKey:(NSString *)key error:(NSError * _Nullable *)error; + +/// Decodes and returns an `object` associated with string key as instance of `aClass`. +/// +/// Passed class may conform to ``PubNub/PNCodable`` protocol which provides assistance with information +/// about what should be decoded. Protocol also provide optional methods which let use custom decoding logic. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate `error` in case if +/// _there is no data associated with `key`_, or _it is `nil`_, or data associated with `key` _can't be +/// decoded as an instance of specified `class`_. +/// +/// - Parameters: +/// - aClass: Expected class of decoded object. +/// - key: The key that decoded value is associated with. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Decoded object, or `nil` in case of decoding failure. +- (nullable id)decodeTopLevelObjectOfClass:(Class)aClass + forKey:(NSString *)key + error:(NSError * _Nullable *)error; + +/// Decodes and returns an `object` associated with string key as instance of any suitable `classes`. +/// +/// Decoder will try instantiate instance from `classes` list one-by-one in same order as they declared and +/// stop if any of them initialized successfully. +/// +/// Passed classes may conform to ``PubNub/PNCodable`` protocol which provides assistance with +/// information about what should be decoded. Protocol also provide optional methods which let use custom +/// decoding logic. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate `error` in case if +/// _there is no data associated with `key`_, or _it is `nil`_, or data associated with `key` _can't be +/// decoded as any instance of specified `classes` list_. +/// +/// - Parameters: +/// - classes: List of expected classes of decoded object. +/// - key: The key that decoded value is associated with. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Decoded object, or `nil` in case of decoding failure. +- (nullable id)decodeTopLevelObjectOfClasses:(NSArray *)classes + forKey:(NSString *)key + error:(NSError * _Nullable *)error; + + +#pragma mark - Decoding General Data + +/// Nested data decoder associated with string key. +/// +/// > Important: It is possible, that nested ``PNDecoder`` can't be instantiated and decoder should generate +/// ``error`` in case if _there is no data associated with `key`_, or _it is `nil`_, or data associated with +/// `key` _is not an instance of `NSDictionary`_. +/// +/// - Parameter key: The key that nested data is associated with. +/// - Returns: Instance, which can be used to decode complex nested structures or `nil` in case of ``error``. +- (nullable id)nestedDecoderForKey:(NSString *)key; + +/// Decodes and returns general `object` which has been encoded as root object. +/// +/// Without information about decoded instance, only following data will be returned: +/// - `NSString` +/// - `NSNumber` +/// - `NSNull` +/// - `NSDictionary` +/// - `NSArray` +/// +/// > Important: Because of lossy encoding, not all objects can be decoded back automatically because of lack +/// of context. For example, if `NSDate` encoded into `NSNumber` it is hard to figure out without context +/// whether value should be decoded as `NSNumber` or `NSDate` instance. When potential data type confusion is +/// possible, use method dedicated for specific `object` type like: ``decodeNumber``, ``decodeData`` or +/// ``decodeDate``. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data passed to decoder_. +/// +/// - Returns: Decoded `object` instance. +- (nullable id)decodeObject; + +/// Decodes and returns a `NSString` instance which has been encoded as root object. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data passed to decoder_, or _data can't be decoded as a `NSString` instance_. +/// +/// - Returns: Decoded `NSString` instance or `nil` in case of ``error``. +- (nullable NSString *)decodeString; + +/// Decodes and returns a `NSNumber` instance which has been encoded as root object. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data passed to decoder_, or _data can't be decoded as a `NSNumber` instance_. +/// +/// - Returns: Decoded `NSNumber` instance or `nil` in case of ``error``. +- (nullable NSNumber *)decodeNumber; + +/// Decodes and returns a `NSData` instance which has been encoded as root object. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data passed to decoder_, or _data can't be decoded as a `NSData` instance_. +/// +/// - Returns: Decoded `NSData` instance or `nil` in case of ``error``. +- (nullable NSData *)decodeData; + +/// Decodes and returns a `NSDate` instance which has been encoded as root object. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data passed to decoder_, or _data can't be decoded as a `NSDate` instance_. +/// +/// - Returns: Decoded `NSDate` instance or `nil` in case of ``error``. +- (nullable NSDate *)decodeDate; + +/// Decodes and returns a root object as instance of `aClass`. +/// +/// Decode object as instance of specified class and fail if serialized object doesn't match it. +/// +/// - Parameter aClass: Expected class of decoded object. +/// - Returns: Decoded object, or `nil` in case of decoding failure. +- (nullable id)decodeObjectOfClass:(Class)aClass; + +/// Decodes and returns a root object as instance of any provided `classes`. +/// +/// Decoder will try instantiate instance from `classes` list one-by-one in same order as they declared and +/// stop if any of them initialized successfully. +/// +/// > Important: ``PNDecoder`` should generate ``error`` in case if _data can't be decoded as any of specified +/// class instances_. +/// +/// - Parameter classes: Expected classes of decoded object. +/// - Returns: Decoded object, or `nil` in case of decoding failure. +- (nullable id)decodeObjectOfClasses:(NSArray *)classes; + +/// Decodes and returns general `object` associated with string key. +/// +/// Implementation of this method can hold complicated logic to identify the best approach for data decoding +/// and can affect performance. +/// +/// An implementation, for example, may try to parse `NSString` instance as `NSData` by assuming that it is +/// Base64-encoded data string and if it fails, proceed and return `NSString` instance itself. +/// +/// > Important: Because of lossy encoding, not all objects can be decoded back automatically because of lack +/// of context. For example, if `NSDate` encoded into `NSNumber` it is hard to figure out without context +/// whether value should be decoded as `NSNumber` or `NSDate` instance. When potential data type confusion is +/// possible, use method dedicated for specific `object` type like: ``decodeNumberForKey:``, +/// ``decodeDataForKey:`` or ``decodeDateForKey:``. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data associated with `key`_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `object` instance or `nil` in case of ``error``. +- (nullable id)decodeObjectForKey:(NSString *)key; + +/// Decodes and returns general `object` associated with string key, if present. +/// +/// Implementation of this method can hold complicated logic to identify the best approach for data decoding +/// and can affect performance. +/// +/// An implementation, for example, may try to parse `NSString` instance as `NSData` by assuming that it is +/// Base64-encoded data string and if it fails, proceed and return `NSString` instance itself. +/// +/// > Important: Because of lossy encoding, not all objects can be decoded back automatically because of lack +/// of context. For example, if `NSDate` encoded into `NSNumber` it is hard to figure out without context +/// whether value should be decoded as `NSNumber` or `NSDate` instance. When potential data type confusion is +/// possible, use method dedicated for specific `object` type like: ``decodeNumberForKey:``, +/// ``decodeDataForKey:`` or ``decodeDateForKey:``. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `object` instance or `nil` in case of ``error``. +- (nullable id)decodeObjectIfPresentForKey:(NSString *)key; + +/// Decodes and returns an object associated with string key as instance of `aClass`. +/// +/// Decode object as instance of specified class and fail if serialized object doesn't match it. +/// +/// - Parameters: +/// - aClass: Expected class of decoded object. +/// - key: The key that decoded value is associated with. +/// - Returns: Decoded object, or `nil` in case of decoding failure. +- (nullable id)decodeObjectOfClass:(Class)aClass forKey:(NSString *)key; + +/// Decodes and returns an object associated with string key as instance of `aClass`, if present. +/// +/// Decode object as instance of specified class and fail if serialized object doesn't match it. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data associated with `key`_, or _it is `nil`_, or data associated with `key` _can't be +/// decoded as an `aClass` instance_. +/// +/// - Parameters: +/// - aClass: Expected class of decoded object. +/// - key: The key that decoded value is associated with. +/// - Returns: Decoded object, or `nil` in case of decoding failure. +- (nullable id)decodeObjectOfClass:(Class)aClass ifPresentForKey:(NSString *)key; + +/// Decodes and returns an object associated with string key as instance of any provided `classes`. +/// +/// Decoder will try instantiate instance from `classes` list one-by-one in same order as they declared and +/// stop if any of them initialized successfully. +/// +/// - Parameters: +/// - classes: Expected classes of decoded object. +/// - key: The key that decoded value is associated with. +/// - Returns: Decoded object, or `nil` in case of decoding failure. +- (nullable id)decodeObjectOfClasses:(NSArray *)classes forKey:(NSString *)key; + +/// Decodes and returns an object associated with string key as instance of any provided `classes`, if +/// present. +/// +/// Decoder will try instantiate instance from `classes` list one-by-one in same order as they declared and +/// stop if any of them initialized successfully. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data associated with `key`_, or _it is `nil`_, or data associated with `key` _data can't be +/// decoded as any of specified class instances_. +/// +/// - Parameters: +/// - classes: Expected classes of decoded object. +/// - key: The key that decoded value is associated with. +/// - Returns: Decoded object, or `nil` in case of decoding failure. +- (nullable id)decodeObjectOfClasses:(NSArray *)classes ifPresentForKey:(NSString *)key; + +/// Decodes and returns data associated with string key as `NSString` instance. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data associated with `key`_, or _it is `nil`_, or data associated with `key` _can't be +/// decoded as a `NSString` instance_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `NSString` instance or `nil` in case of ``error``. +- (nullable NSString *)decodeStringForKey:(NSString *)key; + +/// Decodes and returns data associated with string key as `NSString` instance, if present. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _data associated with `key` can't be decoded as a `NSString` instance_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `NSString` instance or `nil` in case of ``error``. +- (nullable NSString *)decodeStringIfPresentForKey:(NSString *)key; + +/// Decodes and returns data associated with string key as `NSNumber` instance. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data associated with `key`_, or _it is `nil`_, or data associated with `key` _can't be +/// decoded as a `NSNumber` instance_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `NSNumber` instance or `nil` in case of ``error``. +- (nullable NSNumber *)decodeNumberForKey:(NSString *)key; + +/// Decodes and returns data associated with string key as `NSNumber` instance, if present. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _data associated with `key` can't be decoded as a `NSNumber` instance_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `NSNumber` instance or `nil` in case of ``error``. +- (nullable NSNumber *)decodeNumberIfPresentForKey:(NSString *)key; + +/// Decodes and returns a `NSData` instance associated with string key. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data associated with `key`_, or _it is `nil`_, or data associated with `key` _can't be +/// decoded as a `NSData` instance_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `NSData` instance or `nil` in case of ``error``. +- (nullable NSData *)decodeDataForKey:(NSString *)key; + +/// Decodes and returns a `NSData` instance associated with string key, if present. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _data associated with `key` can't be decoded as a `NSData` instance_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `NSData` instance or `nil` in case of ``error``. +- (nullable NSData *)decodeDataIfPresentForKey:(NSString *)key; + +/// Decodes and returns a `NSDate` instance associated with string key. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data associated with `key`_, or _it is `nil`_, or data associated with `key` _can't be +/// decoded as a `NSDate` instance_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `NSDate` instance or `nil` in case of ``error``. +- (nullable NSDate *)decodeDateForKey:(NSString *)key; + +/// Decodes and returns a `NSDate` instance associated with string key, if present. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _data associated with `key` can't be decoded as a `NSDate` instance_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `NSDate` instance or `nil` in case of ``error``. +- (nullable NSDate *)decodeDateIfPresentForKey:(NSString *)key; + +/// Decodes and returns a `null` value associated with string key. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data associated with `key`_, or data associated with `key` _can't be decoded as `nil`_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `nil` or `nil` in case of ``error``. +- (nullable NSNull *)decodeNilForKey:(NSString *)key; + +/// Decodes and returns a `null` value associated with string key, if present. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _data associated with `key` can't be decoded as a `nil`_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `nil` or `nil` in case of ``error``. +- (nullable NSNull *)decodeNilIfPresentForKey:(NSString *)key; + +/// Decodes and returns a `bool` value associated with string key. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _there is no data associated with `key`_, or _it is `nil`_, or data associated with `key` _can't be +/// decoded as a `bool` value_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `bool` value or `NO` in case of ``error``. +- (BOOL)decodeBoolForKey:(NSString *)key; + +/// Decodes and returns a `bool` value associated with string key, if present. +/// +/// > Important: It is possible, that ``PNDecoder`` can't decode data and should generate ``error`` in case if +/// _data associated with `key` can't be decoded as a `bool` value_. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Decoded `bool` value or `NO` in case of ``error``. +- (BOOL)decodeBoolIfPresentForKey:(NSString *)key; + + +#pragma mark - Helpers + +/// List of encoded object keys. +/// +/// > Note: Available only if root object is `NSDictionary`. +/// +/// - Returns: List of encoded object keys or `nil` in case if root object is not `NSDictionary` instance. +- (nullable NSArray *)keys; + +/// Check if any data associated with `key`. +/// +/// - Parameter key: Key for which value should be checked. +/// - Returns: `YES` in case if there is encoded data associated with `key`. +- (BOOL)containsValueForKey:(NSString *)key; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Misc/Protocols/Serializer/Object/PNEncoder.h b/PubNub/Misc/Protocols/Serializer/Object/PNEncoder.h new file mode 100644 index 000000000..40d99a448 --- /dev/null +++ b/PubNub/Misc/Protocols/Serializer/Object/PNEncoder.h @@ -0,0 +1,175 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Protocol declaration + +/// Data encoder protocol. +/// +/// Encoders used to preserve data object information during object transition / storage. +/// This protocol describes general interface for communication between user-code and data +/// encoder / serializer. +/// +/// Encoders which conform to this protocol will be used by **PubNub** serialization module to serialize +/// objects before using them with **PubNub REST API**. +@protocol PNEncoder + + +#pragma mark - Properties + +/// Encoded object representation in string format. +@property(strong, nullable, nonatomic, readonly) NSString *encodedObjectString; + +/// Encoded object representation in binary format. +@property(strong, nullable, nonatomic, readonly) NSData *encodedObjectData; + +/// Information about data processing error. +/// +/// It is expected that conforming class will stop any data processing in case if error has been signalled. +@property(strong, nullable, nonatomic, readonly) NSError *error; + + +#pragma mark - Initialization and configuration + +/// Initialize data encoder. +/// +/// - Returns: Ready to use `encoder` instance. +- (instancetype)init; + + +#pragma mark - Encoding General Data + +/// Creates nested data encoder associated with string key. +/// +/// Use this encoder to encode complex nested structures. +/// +/// - Parameter key: The key to associated nested encoder with. +- (id)nestedEncoderForKey:(NSString *)key; + +/// Encodes general `object` as the only data. +/// +/// Implementation of this method can hold complicated logic to identify the best approach for data encoding. +/// For example, `NSData` instance can be Base64-encoded and `NSDate` encoded as time interval since 1970. +/// +/// Passed object instance may conform to ``PubNub/PNCodable`` protocol which provides assistance with +/// information about what should be encoded. Protocol also provide optional methods which let use custom +/// encoding logic. +/// +/// > Note: Implementation may require additional requirements to the type, depending from format into which +/// it will be encoded and may generate ``error`` in case if _`object` data type doesn't fit_. +/// For example, `PNJSONEncoder` will generate an error if the passed object is not an instance of +/// `NSDictionary` or `NSArray`, or custom object because the root object should be `NSDictionary` or +/// `NSArray`. +/// +/// - Parameter object: `Object` to encode. +- (void)encodeObject:(id)object; + +/// Encodes general `object` and associates it with string key. +/// +/// Implementation of this method can hold complicated logic to identify the best approach for data encoding. +/// For example, `NSData` instance can be Base64-encoded and `NSDate` encoded as time interval since 1970. +/// +/// Passed object instance may conform to ``PubNub/PNCodable`` protocol which provides assistance with +/// information about what should be encoded. Protocol also provide optional methods which let use custom +/// encoding logic. +/// +/// - Parameters: +/// - object: `Object` to encode. +/// - key: The key to associate the value with. +- (void)encodeObject:(id)object forKey:(NSString *)key; + +/// Encodes general `object` if not `nil` and associates it with string key. +/// +/// Implementation of this method can hold complicated logic to identify the best approach for data encoding. +/// For example, `NSData` instance can be Base64-encoded and `NSDate` encoded as time interval since 1970. +/// +/// Passed object instance may conform to ``PubNub/PNCodable`` protocol which provides assistance with +/// information about what should be encoded. Protocol also provide optional methods which let use custom +/// encoding logic. +/// +/// - Parameters: +/// - object: `Object` to encode. +/// - key: The key to associate the value with. +- (void)encodeIfPresentObject:(nullable id)object forKey:(NSString *)key; + +/// Encodes a `NSString` instance and associates it with string key. +/// +/// - Parameters: +/// - number: `NSString` instance to encode. +/// - key: The key to associate the value with. +- (void)encodeString:(NSString *)string forKey:(NSString *)key; + +/// Encodes a `NSString` instance if not `nil` and associates it with string key. +/// +/// - Parameters: +/// - number: `NSString` instance to encode. +/// - key: The key to associate the value with. +- (void)encodeIfPresentString:(nullable NSString *)string forKey:(NSString *)key; + +/// Encodes a `NSNumber` instance and associates it with string key. +/// +/// - Parameters: +/// - number: `NSNumber` instance to encode. +/// - key: The key to associate the value with. +- (void)encodeNumber:(NSNumber *)number forKey:(NSString *)key; + +/// Encodes a `NSNumber` instance if not `nil` and associates it with string key. +/// +/// - Parameters: +/// - number: `NSNumber` instance to encode. +/// - key: The key to associate the value with. +- (void)encodeIfPresentNumber:(nullable NSNumber *)number forKey:(NSString *)key; + +/// Encodes a `NSData` instance and associates it with string key. +/// +/// - Parameters: +/// - data: `NSData` instance to encode. +/// - key: The key to associate the value with. +- (void)encodeData:(NSData *)data forKey:(NSString *)key; + +/// Encodes a `NSData` instance if not `nil` and associates it with string key. +/// +/// - Parameters: +/// - data: `NSData` instance to encode. +/// - key: The key to associate the value with. +- (void)encodeIfPresentData:(nullable NSData *)data forKey:(NSString *)key; + +/// Encodes a `NSDate` instance and associates it with string key. +/// +/// - Parameters: +/// - date: `NSDate` instance to encode. +/// - key: The key to associate the value with. +- (void)encodeDate:(NSDate *)date forKey:(NSString *)key; + +/// Encodes a `NSDate` instance if not `nil` and associates it with string key. +/// +/// - Parameters: +/// - date: `NSDate` instance to encode. +/// - key: The key to associate the value with. +- (void)encodeIfPresentDate:(nullable NSDate *)date forKey:(NSString *)key; + +/// Encodes a `null` value and associates it with string key. +/// +/// - Parameter key: The key to associate the value with. +- (void)encodeNilForKey:(NSString *)key; + +/// Encodes a `bool` value and associates it with string key. +/// +/// - Parameters: +/// - value: `Bool` value to encode. +/// - key: The key to associate the value with. +- (void)encodeBool:(BOOL)value forKey:(NSString *)key; + + +#pragma mark - Encoding + +/// Finalyze encoded data. +- (void)finishEncoding; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Misc/Protocols/Serializer/Object/PNObjectSerializer.h b/PubNub/Misc/Protocols/Serializer/Object/PNObjectSerializer.h new file mode 100644 index 000000000..e9edc79fd --- /dev/null +++ b/PubNub/Misc/Protocols/Serializer/Object/PNObjectSerializer.h @@ -0,0 +1,65 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Protocol interface declaration + +/// Object serialization protocol. +@protocol PNObjectSerializer + + +@required + +#pragma mark - Properties + +/// Pre-configured JSON serializer. +@property(strong, nonatomic, readonly) id jsonSerializer; + + +#pragma mark - Data serialization + +/// Serialize `object` instance into different data type. +/// +/// - Parameters: +/// - aClass: Expected data type of serialized object data (allowed: `NSString` or `NSData`). +/// - object: Custom or native object which should be serialized. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Serialized `object` data. +- (nullable id)dataOfClass:(Class)aClass fromObject:(id)object withError:(NSError * _Nullable *)error; + + +@optional + +/// De-serialize `data` and populate it to instance of specified class. +/// +/// - Parameters: +/// - aClass: Expected class of de-serialized object. +/// - object: Custom or native object which should be serialized. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: De-serialized object, or `nil` in case of decoding failure. +- (nullable id)objectOfClass:(Class)aClass fromData:(id)data withError:(NSError * _Nullable *)error; + + +@required + +/// De-serialize `data` and populate it to instance of specified class. +/// +/// - Parameters: +/// - aClass: Expected class of de-serialized object. +/// - object: Custom or native object which should be serialized. +/// - additionalData: Additional information which can be used by `aClass` custom initializer. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: De-serialized object, or `nil` in case of decoding failure. +- (nullable id)objectOfClass:(Class)aClass + fromData:(id)data + withAdditional:(nullable NSDictionary *)additionalData + error:(NSError * _Nullable *)error; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Modules/Crypto/Cryptors/AES/PNAESCBCCryptor.m b/PubNub/Modules/Crypto/Cryptors/AES/PNAESCBCCryptor.m index b318ff85a..162707761 100644 --- a/PubNub/Modules/Crypto/Cryptors/AES/PNAESCBCCryptor.m +++ b/PubNub/Modules/Crypto/Cryptors/AES/PNAESCBCCryptor.m @@ -4,7 +4,7 @@ #import "PNCryptorInputStream+Private.h" #import "PNCCCryptorWrapper.h" #import "PNEncryptedStream.h" -#import "PNErrorCodes.h" +#import "PNError.h" #pragma mark Contants @@ -106,8 +106,8 @@ - (instancetype)initWithCipherKey:(NSString *)cipherKey randomInitializationVect - (PNResult *)encryptData:(NSData *)data { if (data.length == 0) { - NSError *error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorEncryptionError + NSError *error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorEncryption userInfo:@{ NSLocalizedDescriptionKey: @"Unable to encrypt empty data." }]; return [PNResult resultWithData:nil error:error]; } @@ -137,8 +137,8 @@ - (instancetype)initWithCipherKey:(NSString *)cipherKey randomInitializationVect initializationVector = [encryptedData subdataWithRange:NSMakeRange(0, kCCBlockSizeAES128)]; encryptedData = [encryptedData subdataWithRange:NSMakeRange(kCCBlockSizeAES128, encryptedDataLength)]; } else { - NSError *error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorDecryptionError + NSError *error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorDecryption userInfo:@{ NSLocalizedDescriptionKey: @"Insufficient amount of data to read cryptor-defined metadata." }]; @@ -148,8 +148,8 @@ - (instancetype)initWithCipherKey:(NSString *)cipherKey randomInitializationVect } if (encryptedData.length == 0) { - NSError *error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorDecryptionError + NSError *error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorDecryption userInfo:@{ NSLocalizedDescriptionKey: @"Unable to decrypt empty data." }]; return [PNResult resultWithData:nil error:error]; } @@ -166,8 +166,8 @@ - (instancetype)initWithCipherKey:(NSString *)cipherKey randomInitializationVect - (PNResult *)encryptStream:(NSInputStream *)stream dataLength:(NSUInteger)length { if (length == 0) { - NSError *error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorEncryptionError + NSError *error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorEncryption userInfo:@{ NSLocalizedDescriptionKey: @"Unable to encrypt empty stream." }]; return [PNResult resultWithData:nil error:error]; } @@ -199,8 +199,8 @@ - (instancetype)initWithCipherKey:(NSString *)cipherKey randomInitializationVect else if (initializationVector.length == 0 && length > kCCBlockSizeAES128) { initializationVector = [stream.stream readCryptorMetadataWithLength:kCCBlockSizeAES128].data; } else if (length < kCCBlockSizeAES128) { - NSError *error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorDecryptionError + NSError *error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorDecryption userInfo:@{ NSLocalizedDescriptionKey: @"Insufficient amount of data to read cryptor-defined metadata." }]; @@ -213,8 +213,8 @@ - (instancetype)initWithCipherKey:(NSString *)cipherKey randomInitializationVect if (wrapper.isError) return (PNResult *)wrapper; if (stream.stream.inputDataLength == 0) { - NSError *error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorDecryptionError + NSError *error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorDecryption userInfo:@{ NSLocalizedDescriptionKey: @"Unable to decrypt empty stream." }]; return [PNResult resultWithData:nil error:error]; } diff --git a/PubNub/Modules/Crypto/Cryptors/AES/PNCCCryptorWrapper.m b/PubNub/Modules/Crypto/Cryptors/AES/PNCCCryptorWrapper.m index b35c1bb56..87480e768 100644 --- a/PubNub/Modules/Crypto/Cryptors/AES/PNCCCryptorWrapper.m +++ b/PubNub/Modules/Crypto/Cryptors/AES/PNCCCryptorWrapper.m @@ -1,7 +1,7 @@ #import "PNCCCryptorWrapper.h" #import #import -#import "PNErrorCodes.h" +#import "PNError.h" NS_ASSUME_NONNULL_BEGIN @@ -181,36 +181,36 @@ - (NSUInteger)processedDataLength:(NSUInteger)length { } + (NSError *)errorFromCryptorStatus:(CCCryptorStatus)status andOperation:(CCOperation)operation { - NSInteger errorCode = kPNUnknownErrorCode; + NSInteger errorCode = PNErrorUnknown; NSString *description = @"Unknown error"; switch (status) { case kCCParamError: case kCCAlignmentError: description = @"Illegal parameter value has been used with AES configuration."; - errorCode = kPNCryptorConfigurationError; + errorCode = PNCryptorErrorConfiguration; break; case kCCBufferTooSmall: case kCCMemoryFailure: description = @"Unable to allocate required amount of memory to process data."; - errorCode = kPNCryptorInsufficientMemoryError; + errorCode = PNCryptorErrorInsufficientMemory; break; case kCCKeySizeError: case kCCInvalidKey: description = @"Unacceptable cipher key has been provided."; - errorCode = kPNCryptorConfigurationError; + errorCode = PNCryptorErrorConfiguration; break; case kCCDecodeError: case kCCOverflow: case kCCRNGFailure: description = @"Provided data can't be processed."; - errorCode = operation == kCCEncrypt ? kPNCryptorEncryptionError : kPNCryptorDecryptionError; + errorCode = operation == kCCEncrypt ? PNCryptorErrorEncryption : PNCryptorErrorDecryption; break; default: break; } - return [NSError errorWithDomain:kPNCryptorErrorDomain + return [NSError errorWithDomain:PNCryptorErrorDomain code:errorCode userInfo:@{ NSLocalizedDescriptionKey: description }]; } diff --git a/PubNub/Modules/Crypto/Data/PNCryptorInputStream.m b/PubNub/Modules/Crypto/Data/PNCryptorInputStream.m index 1ea65d5a2..2bb7ab3f9 100644 --- a/PubNub/Modules/Crypto/Data/PNCryptorInputStream.m +++ b/PubNub/Modules/Crypto/Data/PNCryptorInputStream.m @@ -1,6 +1,6 @@ #import "PNCryptorInputStream+Private.h" #import "PNCryptorHeader+Private.h" -#import "PNErrorCodes.h" +#import "PNError.h" NS_ASSUME_NONNULL_BEGIN @@ -324,8 +324,8 @@ - (BOOL)hasBytesAvailable { } while ([self canReadDataFromInputStream] && self.streamStatus != NSStreamStatusClosed && bytesToRead != 0); if (bytesToRead != 0) { - error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorDecryptionError + error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorDecryption userInfo:@{ NSLocalizedDescriptionKey: @"Insufficient amount of data to read cryptor-defined metadata." }]; diff --git a/PubNub/Modules/Crypto/Header/PNCryptorHeader.m b/PubNub/Modules/Crypto/Header/PNCryptorHeader.m index 856d25b2f..339bcc640 100644 --- a/PubNub/Modules/Crypto/Header/PNCryptorHeader.m +++ b/PubNub/Modules/Crypto/Header/PNCryptorHeader.m @@ -1,5 +1,5 @@ #import "PNCryptorHeader+Private.h" -#import "PNErrorCodes.h" +#import "PNError.h" #pragma mark Contants @@ -216,8 +216,8 @@ + (NSData *)sentinelFromData:(NSData *)data { NSError *error = nil; if (data.length < kPNCryptorHeaderIdentifierOffset) { - error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorDecryptionError + error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorDecryption userInfo:@{ NSLocalizedDescriptionKey: @"Decrypted data header is malformed." }]; return [PNResult resultWithData:version error:error]; @@ -231,8 +231,8 @@ + (NSData *)sentinelFromData:(NSData *)data { version = @(PNCryptorHeaderV1); break; default: - error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorUnknownCryptorError + error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorUnknownCryptor userInfo:@{ NSLocalizedDescriptionKey: @"Decrypting data created by unknown cryptor." }]; @@ -246,8 +246,8 @@ + (NSData *)sentinelFromData:(NSData *)data { NSError *error = nil; if (data.length < kPNCryptorHeaderSizeOffset) { - error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorDecryptionError + error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorDecryption userInfo:@{ NSLocalizedDescriptionKey: @"Decrypted data header is malformed." }]; } else { NSRange identifierRange = NSMakeRange(kPNCryptorHeaderIdentifierOffset, kPNCryptorHeaderIdentifierSize); diff --git a/PubNub/Modules/Crypto/PNCryptoModule.m b/PubNub/Modules/Crypto/PNCryptoModule.m index 6bfa4e968..bc0c3079b 100644 --- a/PubNub/Modules/Crypto/PNCryptoModule.m +++ b/PubNub/Modules/Crypto/PNCryptoModule.m @@ -5,8 +5,8 @@ #import "PNAESCBCCryptor.h" #import "PNLegacyCryptor.h" #import "PNCryptorHeader.h" -#import "PNErrorCodes.h" #import "PNResult.h" +#import "PNError.h" #pragma mark Extern @@ -144,8 +144,8 @@ - (instancetype)initWithDefaultCryptor:(id)cryptor - (PNResult *)decryptData:(NSData *)data { if (data.length == 0) { - NSError *error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorDecryptionError + NSError *error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorDecryption userInfo:@{ NSLocalizedDescriptionKey: @"Unable to encrypt empty data." }]; return [PNResult resultWithData:nil error:error]; } @@ -177,8 +177,8 @@ - (instancetype)initWithDefaultCryptor:(id)cryptor encoding:NSUTF8StringEncoding]; NSString *errorMessage = [NSString stringWithFormat:@"Decrypting data created by unknown cryptor. Please make "\ "sure to register '%@' or update the SDK.", identifier]; - error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorUnknownCryptorError + error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorUnknownCryptor userInfo:@{ NSLocalizedDescriptionKey: errorMessage }]; } @@ -220,8 +220,8 @@ - (instancetype)initWithDefaultCryptor:(id)cryptor - (PNResult *)decryptStream:(NSInputStream *)stream dataLength:(NSUInteger)length { if (length == 0) { - NSError *error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorDecryptionError + NSError *error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorDecryption userInfo:@{ NSLocalizedDescriptionKey: @"Unable to encrypt empty data." }]; return [PNResult resultWithData:nil error:error]; } @@ -251,8 +251,8 @@ - (instancetype)initWithDefaultCryptor:(id)cryptor encoding:NSUTF8StringEncoding]; NSString *errorMessage = [NSString stringWithFormat:@"Decrypting data created by unknown cryptor. Please make "\ "sure to register '%@' or update the SDK.", identifier]; - error = [NSError errorWithDomain:kPNCryptorErrorDomain - code:kPNCryptorUnknownCryptorError + error = [NSError errorWithDomain:PNCryptorErrorDomain + code:PNCryptorErrorUnknownCryptor userInfo:@{ NSLocalizedDescriptionKey: errorMessage }]; } diff --git a/PubNub/Modules/Serializer/JSON/PNJSONSerialization.h b/PubNub/Modules/Serializer/JSON/PNJSONSerialization.h new file mode 100644 index 000000000..67fa0c537 --- /dev/null +++ b/PubNub/Modules/Serializer/JSON/PNJSONSerialization.h @@ -0,0 +1,18 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Foundation objects serialization to JSON data and from vice-versa. +@interface PNJSONSerialization : NSObject + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Modules/Serializer/JSON/PNJSONSerialization.m b/PubNub/Modules/Serializer/JSON/PNJSONSerialization.m new file mode 100644 index 000000000..645d3512b --- /dev/null +++ b/PubNub/Modules/Serializer/JSON/PNJSONSerialization.m @@ -0,0 +1,64 @@ +#import "PNJSONSerialization.h" +#import + + +#pragma mark Interface implementation + +@implementation PNJSONSerialization + + +#pragma mark - Serialization + +- (NSData *)dataWithJSONObject:(id)object error:(PNError **)error { + NSError *eError; + NSData *data = [NSJSONSerialization dataWithJSONObject:object options:0 error:&eError]; + + if (error && eError) { + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable serialize object to JSON", + PNStringFormat(@"'%@' has unsupported type. Check underlying error for more information.", + NSStringFromClass([object class])), + nil, + eError + ); + *error = [PNError errorWithDomain:PNJSONSerializationErrorDomain + code:PNJSONSerializationErrorType + userInfo:userInfo]; + } + + return data; +} + +- (id)JSONObjectWithData:(NSData *)data error:(PNError **)error { + return [self JSONObjectWithData:data options:0 error:error]; +} + +- (id)JSONObjectWithData:(NSData *)data options:(PNJSONReadingOptions)options error:(PNError **)error { + NSError *dError; + id object = [NSJSONSerialization JSONObjectWithData:data + options:(NSJSONReadingOptions)options + error:&dError]; + + if (error && dError) { + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable de-serialize object to JSON", + @"Potentially malformed JSON data. Check underlying error for more information.", + nil, + dError + ); + *error = [PNError errorWithDomain:PNJSONSerializationErrorDomain + code:PNJSONSerializationErrorMalformedJSON + userInfo:userInfo]; + } + + return object; +} + +- (BOOL)isValidJSONObject:(id)object { + return [NSJSONSerialization isValidJSONObject:object]; +} + +#pragma mark - + + +@end diff --git a/PubNub/Modules/Serializer/Object/Categories/NSDateFormatter+PNJSONCodable.h b/PubNub/Modules/Serializer/Object/Categories/NSDateFormatter+PNJSONCodable.h new file mode 100644 index 000000000..960006b8e --- /dev/null +++ b/PubNub/Modules/Serializer/Object/Categories/NSDateFormatter+PNJSONCodable.h @@ -0,0 +1,24 @@ +#import + + +#pragma mark Category interface declaration + +/// `NSDateFormatter` support for codable instance support. +/// +/// Extension intended to be used with ``PNJSONEncoder`` / ``PNJSONDecoder`` to serialize / restore instance +/// to / from JSON data. +@interface NSDateFormatter (PNJSONCodable) + + +#pragma mark - Properties + +/// Pre-configured ISO8601 date formatter without milliseconds. +@property(class, strong, nonatomic, readonly) NSDateFormatter *pnjc_iso8601NoMillisecond; + +/// Pre-configured ISO8601 date formatter. +@property(class, strong, nonatomic, readonly) NSDateFormatter *pnjc_iso8601; + +#pragma mark - + + +@end diff --git a/PubNub/Modules/Serializer/Object/Categories/NSDateFormatter+PNJSONCodable.m b/PubNub/Modules/Serializer/Object/Categories/NSDateFormatter+PNJSONCodable.m new file mode 100644 index 000000000..d3c1a6d34 --- /dev/null +++ b/PubNub/Modules/Serializer/Object/Categories/NSDateFormatter+PNJSONCodable.m @@ -0,0 +1,42 @@ +#import "NSDateFormatter+PNJSONCodable.h" + + +#pragma mark Interface implementation + +@implementation NSDateFormatter (PNJSONCodable) + + +#pragma mark - Properties + ++ (NSDateFormatter *)pnjc_iso8601NoMillisecond { + static NSDateFormatter *_iso8601FormatterNoMs; + static dispatch_once_t onceToken; + + dispatch_once(&onceToken, ^{ + _iso8601FormatterNoMs = [NSDateFormatter new]; + _iso8601FormatterNoMs.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss'Z'"; + _iso8601FormatterNoMs.locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"]; + _iso8601FormatterNoMs.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; + }); + + return _iso8601FormatterNoMs; +} + ++ (NSDateFormatter *)pnjc_iso8601 { + static NSDateFormatter *_iso8601Formatter; + static dispatch_once_t onceToken; + + dispatch_once(&onceToken, ^{ + _iso8601Formatter = [NSDateFormatter new]; + _iso8601Formatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; + _iso8601Formatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"]; + _iso8601Formatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; + }); + + return _iso8601Formatter; +} + +#pragma mark - + + +@end diff --git a/PubNub/Modules/Serializer/Object/Categories/NSNumberFormatter+PNJSONCodable.h b/PubNub/Modules/Serializer/Object/Categories/NSNumberFormatter+PNJSONCodable.h new file mode 100644 index 000000000..dfeb12173 --- /dev/null +++ b/PubNub/Modules/Serializer/Object/Categories/NSNumberFormatter+PNJSONCodable.h @@ -0,0 +1,20 @@ +#import + + +#pragma mark Category interface declaration + +/// `NSDateFormatter` support for codable instance support. +/// +/// Extension intended to be used with ``PNJSONDecoder`` to restore instance from JSON data. +@interface NSNumberFormatter (PNJSONCodable) + + +#pragma mark - Properties + +/// Pre-configured number formatter compatible with JSON. +@property(class, strong, nonatomic, readonly) NSNumberFormatter *pnjc_number; + +#pragma mark - + + +@end diff --git a/PubNub/Modules/Serializer/Object/Categories/NSNumberFormatter+PNJSONCodable.m b/PubNub/Modules/Serializer/Object/Categories/NSNumberFormatter+PNJSONCodable.m new file mode 100644 index 000000000..8f9104ed6 --- /dev/null +++ b/PubNub/Modules/Serializer/Object/Categories/NSNumberFormatter+PNJSONCodable.m @@ -0,0 +1,28 @@ +#import "NSNumberFormatter+PNJSONCodable.h" + + +#pragma mark Interface implementation + +@implementation NSNumberFormatter (PNJSONCodable) + + +#pragma mark - Properties + ++ (NSNumberFormatter *)pnjc_number { + static NSNumberFormatter * _numberFormatter; + static dispatch_once_t onceToken; + + dispatch_once(&onceToken, ^{ + _numberFormatter = [NSNumberFormatter new]; + _numberFormatter.numberStyle = NSNumberFormatterDecimalStyle; + _numberFormatter.usesGroupingSeparator = NO; + _numberFormatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US"]; + }); + + return _numberFormatter; +} + +#pragma mark - + + +@end diff --git a/PubNub/Modules/Serializer/Object/Models/PNJSONCodableObjects.h b/PubNub/Modules/Serializer/Object/Models/PNJSONCodableObjects.h new file mode 100644 index 000000000..019eff004 --- /dev/null +++ b/PubNub/Modules/Serializer/Object/Models/PNJSONCodableObjects.h @@ -0,0 +1,109 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Codable objects manager. +/// +/// Manager allows to track instances which has been adopted and used with encode / decoder. +@interface PNJSONCodableObjects : NSObject + + +#pragma mark - Coding / decoding + +/// Make provider class codable. +/// +/// ``PNJSONCoder`` allows to process custom classes which doesn't conform to ``PNCodable`` protocol, which +/// requires for some implementations to be attached at runtime. +/// +/// - Parameter aClass: Custom object class which should be codable. ++ (void)makeCodableClass:(Class)aClass; + +/// Clean up all modified custom classes. +/// +/// Remove any information which has been attached by code at run-time for all custom classes. ++ (void)clearAllClasses; + + +#pragma mark - Helpers + +/// Check whether `aClass` has custom encoding. +/// +/// `aClass` can adopt ``PNCodable/encodeObjectWithCoder:`` method to has more control over object encoding +/// process. +/// +/// - Parameter aClass: Class for which check should be done. +/// - Returns: `YES` in case if `aClass` implements ``PNCodable/encodeObjectWithCoder:``. ++ (BOOL)hasCustomEncodingForClass:(Class)aClass; + +/// Check whether `aClass` has custom decoding. +/// +/// `aClass` can adopt ``PNCodable/initObjectWithCoder:`` method to has more control over object decoding +/// process. +/// +/// - Parameter aClass: Class for which check should be done. +/// - Returns: `YES` in case if `aClass` implements ``PNCodable/initObjectWithCoder:``. ++ (BOOL)hasCustomDecodingForClass:(Class)aClass; + +/// Retrieve class of property for `aClass`. +/// +/// - Parameters: +/// - propertyName: Name of property for which type is required. +/// - aClass: Class for which lookup should be done. +/// - customClass: Upon return can be set to `YES` if property represent custom type. +/// - dynamicClass: Upon return can be set to `YES` if property represent dynamic type (actual type will require +/// passing decoded object to the `aClass`. ++ (nullable Class)classOfProperty:(NSString *)propertyName + forClass:(Class)aClass + custom:(BOOL * _Nullable)customClass + dynamic:(BOOL * _Nullable)dynamicClass; + +/// Dynamic data type for `propertyName`. +/// +/// - Parameters: +/// - propertyName: Name of the propery in receiving class for which dynamic data type should be retrieved. +/// - aClass: Class for which lookup should be done. +/// - decodedDictionary: Decoded object data. +/// - Returns: Class which should be used to decode object stored in as `propertyName` field. ++ (nullable Class)decodingClassOfProperty:(NSString *)propertyName + forClass:(Class)aClass + inDecodedDictionary:(NSDictionary *)decodedDictionary; + +/// Property list of instance of `aClass` class. +/// +/// - Parameter aClass: Class for which list of properties should be created. +/// - Returns: List of `aClass` instance properties. ++ (NSSet *)propertyListForClass:(Class)aClass; + +/// Coding keys for custom class. +/// +/// Retrieve coding keys provided by `aClass` implementation or generated from properties list. +/// +/// - Parameter aClass: Class for which coding keys map should be retrieved. +/// - Returns: `aClass` coding keys map. ++ (NSDictionary *)codingKeysForClass:(Class)aClass; + +/// Dynamically typed keys for custom class. +/// +/// Retrieve properties provided by `aClass` which may have different type depending from root object type. +/// +/// - Parameter aClass: Class for which dynamic type keys list should be retrieved. +/// - Returns: `aClass` dynamic type keys list. ++ (NSArray *)dynamicTypeKeysForClass:(Class)aClass; + +/// Optional keys for custom class. +/// +/// Retrieve optional keys provided by `aClass` implementation or empty list. +/// +/// - Parameter aClass: Class for which optional keys list should be retrieved. +/// - Returns: `aClass` optional keys list. ++ (NSArray *)optionalKeysForClass:(Class)aClass; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Modules/Serializer/Object/Models/PNJSONCodableObjects.m b/PubNub/Modules/Serializer/Object/Models/PNJSONCodableObjects.m new file mode 100644 index 000000000..94a58fec4 --- /dev/null +++ b/PubNub/Modules/Serializer/Object/Models/PNJSONCodableObjects.m @@ -0,0 +1,414 @@ +#import "PNJSONCodableObjects.h" +#import +#import +#import +#import + + +#pragma mark Static + +/// Key, which is used to associate list of JSON-friendly properties for class. +static char kPNJSONCodableObjectFoundationProperties; + +/// Key, which is used to associate list of custom properties for class. +static char kPNJSONCodableObjectCustomProperties; + +/// Key, which is used to associate keys with dynamic type for class. +static char kPNJSONCodableObjectDynamicTypeKeys; + +/// Key, which is used to associate optional keys for class. +static char kPNJSONCodableObjectOptionalKeys; + +/// Key, which is used to associate coding keys for class. +static char kPNJSONCodableObjectCodingKeys; + +/// Key, which is used to associate list of known properties for class. +static char kPNJSONCodableProperties; + +/// Key, which is used to associate results of custom encoding check for class. +static char kPNJSONCodableHasCustomEncoding; + +/// Key, which is used to associate results of custom decoding check for class. +static char kPNJSONCodableHasCustomDecoding; + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - Protected interface declaration + +@interface PNJSONCodableObjects () + + +#pragma mark - Properties + +/// Shared codable objects manager. +@property(class, strong, nullable, nonatomic, readonly) PNJSONCodableObjects *sharedManager; + +/// List of `NSObject` own properties, so they will be excluded +@property(strong, nonatomic) NSSet *NSObjectProperties; + +/// List of `NSObject` own methods, so they will be excluded +@property(strong, nonatomic) NSSet *NSObjectMethods; + +/// List of classes which has been modified. +@property(strong, nonatomic) NSMutableSet *classes; + +/// Resources access lock. +@property(strong, nonatomic) PNLock *lock; + + +#pragma mark - Helpers + +/// Index instance properties list. +/// +/// - Parameter aClass: Class for which list of properties should be created. +/// - Returns: List of `aClass` instance properties. +- (NSSet *)propertyListForClass:(Class)aClass; + +/// Index class instance methods. +/// +/// This method allow to retrieve instance methods of passed class. If meta-class is passed, then static +/// methods will be indexed. +/// +/// - Parameter aClass: Class for which list of selectors (stringified) should be created. +/// - Returns: List of `aClass` instance methods. +- (NSSet *)methodsListForClass:(Class)aClass; + +/// Identify type of properties. +/// +/// Run through known `aClass` instance properties and separate them on properties which hold foundation and +/// custom objects. +/// Identifier properties will be attached to an `aClass` as associated objects and used later for coding. +/// +/// - Parameters: +/// - propertyList: List of `aClass` instance properties. +/// - aClass: Class for which properties should be identified. +- (void)identifyAndStoreProperties:(NSSet *)propertyList forClass:(Class)aClass; + +/// Ensure that `aClass` adopt ``PNCodable`` protocol. +/// +/// Missing implementations from ``PNCodable`` protocol will be stubbed with default implementation. +/// +/// - Parameters: +/// - aClass: Class which should conform to ``PNCodable`` protocol. +/// - propertyList: List of `aClass` instance properties. +- (void)ensureCodableClass:(Class)aClass withPropertyList:(NSSet *)propertyList; + +/// Clean up any data which has been associated with `aClass`. +/// +/// - Parameter aClass: Class for which should be removed associated objects. +- (void)resetInitialStateForClass:(Class)aClass; + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark Interface implementation + +@implementation PNJSONCodableObjects + + +#pragma mark - Properties + ++ (PNJSONCodableObjects *)sharedManager { + static PNJSONCodableObjects *_sharedManager; + static dispatch_once_t onceToken; + + dispatch_once(&onceToken, ^{ + _sharedManager = [PNJSONCodableObjects new]; + }); + + return _sharedManager; +} + + +#pragma mark - Initialization and configuration + +- (instancetype)init { + if ((self = [super init])) { + _NSObjectProperties = [self propertyListForClass:[NSObject class]]; + _NSObjectMethods = [self methodsListForClass:[NSObject class]]; + _classes = [NSMutableSet new]; + + _lock = [PNLock lockWithIsolationQueueName:@"objects" subsystemQueueIdentifier:@"com.pubnub.serializer"]; + } + + return self; +} + + +#pragma mark - Coding / decoding + ++ (void)makeCodableClass:(Class)aClass { + PNJSONCodableObjects *manager = self.sharedManager; + + [manager.lock syncWriteAccessWithBlock:^{ + // Early exit, if class already codable or from Foundation. + if ([manager.classes containsObject:aClass] || strncmp(class_getName(aClass), "NS", 2) == 0) return; + + [manager.classes addObject:aClass]; + NSSet *propertyList = [manager propertyListForClass:aClass]; + + [manager identifyAndStoreProperties:propertyList forClass:aClass]; + [manager ensureCodableClass:aClass withPropertyList:propertyList]; + }]; +} + ++ (void)clearAllClasses { + PNJSONCodableObjects *manager = self.sharedManager; + + [manager.lock syncWriteAccessWithBlock:^{ + for (Class aClass in manager.classes) [manager resetInitialStateForClass:aClass]; + [manager.classes removeAllObjects]; + }]; +} + + +#pragma mark - Helpers + ++ (BOOL)hasCustomEncodingForClass:(Class)aClass { + return ((NSNumber *)objc_getAssociatedObject(aClass, &kPNJSONCodableHasCustomEncoding)).boolValue; +} + ++ (BOOL)hasCustomDecodingForClass:(Class)aClass { + return ((NSNumber *)objc_getAssociatedObject(aClass, &kPNJSONCodableHasCustomDecoding)).boolValue; +} + ++ (Class)classOfProperty:(NSString *)propertyName forClass:(Class)aClass custom:(BOOL *)customClass dynamic:(BOOL *)dynamicClass; { + if (!aClass) return nil; + if (customClass) *customClass = NO; + + if ([[self dynamicTypeKeysForClass:aClass] containsObject:propertyName]) { + if (dynamicClass) *dynamicClass = YES; + return nil; + } + + Class sClass = objc_getAssociatedObject(aClass, &kPNJSONCodableObjectFoundationProperties)[propertyName]; + + if (!sClass) { + sClass = objc_getAssociatedObject(aClass, &kPNJSONCodableObjectCustomProperties)[propertyName]; + if (customClass) *customClass = sClass != nil; + } + + return sClass; +} + ++ (nullable Class)decodingClassOfProperty:(NSString *)propertyName + forClass:(Class)aClass + inDecodedDictionary:(NSDictionary *)decodedDictionary{ + return [(Class)aClass decodingClassForProperty:propertyName inDecodedDictionary:decodedDictionary]; +} + ++ (NSSet *)propertyListForClass:(Class)aClass { + return objc_getAssociatedObject(aClass, &kPNJSONCodableProperties); +} + ++ (NSDictionary *)codingKeysForClass:(Class)aClass { + return objc_getAssociatedObject(aClass, &kPNJSONCodableObjectCodingKeys); +} + ++ (NSArray *)dynamicTypeKeysForClass:(Class)aClass { + return objc_getAssociatedObject(aClass, &kPNJSONCodableObjectDynamicTypeKeys); +} + ++ (NSArray *)optionalKeysForClass:(Class)aClass { + return objc_getAssociatedObject(aClass, &kPNJSONCodableObjectOptionalKeys); +} + +- (NSSet *)propertyListForClass:(Class)aClass { + BOOL isNSObjectClass = aClass == [NSObject class]; + NSMutableSet *properties = [NSMutableSet new]; + NSArray *ignoredKeys; + unsigned int count; + + + if ([aClass respondsToSelector:@selector(ignoredKeys)]) { + ignoredKeys = [(Class)aClass ignoredKeys]; + } else ignoredKeys = @[]; + + objc_property_t *propertyList = class_copyPropertyList(aClass, &count); + + for (int i = 0; i < count; i++) { + const char *cName = property_getName(propertyList[i]); + NSString *propertyName = [NSString stringWithCString:cName encoding:NSUTF8StringEncoding]; + + if (!isNSObjectClass && [self.NSObjectProperties containsObject:propertyName]) continue; + [properties addObject:propertyName]; + } + + free(propertyList); + + if (!isNSObjectClass && strncmp(class_getName([aClass superclass]), "NS", 2) != 0) { + [properties unionSet:[self propertyListForClass:[aClass superclass]]]; + } + + if (ignoredKeys.count > 0 && properties.count > 0) { + [properties minusSet:[NSSet setWithArray:ignoredKeys]]; + } + + return properties; +} + +- (NSSet *)methodsListForClass:(Class)aClass { + BOOL isNSObjectClass = aClass == [NSObject class]; + NSMutableSet *methods = [NSMutableSet new]; + unsigned int count; + + Method *methodsList = class_copyMethodList(aClass, &count); + + for (int i = 0; i < count; i++) { + NSString *methodName = NSStringFromSelector(method_getName(methodsList[i])); + + if (!isNSObjectClass && [self.NSObjectMethods containsObject:methodName]) continue; + [methods addObject:methodName]; + } + + free(methodsList); + + // Gather static methods for NSObject. + if (isNSObjectClass) { + methodsList = class_copyMethodList(objc_getMetaClass(class_getName(aClass)), &count); + + for (int i = 0; i < count; i++) { + [methods addObject:NSStringFromSelector(method_getName(methodsList[i]))]; + } + + free(methodsList); + } + + if (aClass != [NSObject class] && strncmp(class_getName([aClass superclass]), "NS", 2) != 0) { + Class superClass = [aClass superclass]; + NSSet *superMethodsList = [self methodsListForClass:superClass]; + [methods unionSet:superMethodsList]; + } + + return methods; +} + +- (void)identifyAndStoreProperties:(NSSet *)propertyList forClass:(Class)aClass { + NSMutableDictionary *foundation = [NSMutableDictionary new]; + NSMutableDictionary *custom = [NSMutableDictionary new]; + + for (NSString *name in propertyList) { + objc_property_t property = class_getProperty(aClass, [name cStringUsingEncoding:NSUTF8StringEncoding]); + char *type = property_copyAttributeValue(property, "T"); + unsigned long typeLength = strlen(type); + BOOL isFoundationObject = YES; + char *className = NULL; + Class objectClass; + + if (type[0] == '@' && typeLength > 3) { + className = strndup(type + 2, typeLength - 3); + isFoundationObject = strncmp(className, "NS", 2) == 0; + objectClass = objc_lookUpClass(className); + free((void *)className); + } + + free(type); + + if (!objectClass) continue; + + if (!isFoundationObject) { + custom[name] = objectClass; + } else { + foundation[name] = objectClass; + } + } + objc_setAssociatedObject( + aClass, + &kPNJSONCodableObjectFoundationProperties, + foundation, + OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableObjectCustomProperties, custom, OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableProperties, propertyList, OBJC_ASSOCIATION_RETAIN); +} + +- (void)ensureCodableClass:(Class)aClass withPropertyList:(NSSet *)propertyList { + Class metaClass = objc_getMetaClass(class_getName(aClass)); + NSSet *methodsList = [self methodsListForClass:aClass]; + BOOL encoding = [methodsList containsObject:NSStringFromSelector(@selector(encodeObjectWithCoder:))]; + BOOL decoding = [methodsList containsObject:NSStringFromSelector(@selector(initObjectWithCoder:))]; + methodsList = [self methodsListForClass:metaClass]; + BOOL isNSObjectClass = aClass == [NSObject class]; + NSDictionary *codingKeys; + NSArray *dynamicTypeKeys; + NSArray *optionalKeys; + + if ([methodsList containsObject:NSStringFromSelector(@selector(codingKeys))]) { + codingKeys = [(Class)aClass codingKeys]; + } else { + NSMutableDictionary *propertyMap = [NSMutableDictionary new]; + + for (NSString *propertyName in propertyList) propertyMap[propertyName] = propertyName; + + codingKeys = propertyMap; + } + + if ([methodsList containsObject:NSStringFromSelector(@selector(optionalKeys))]) { + optionalKeys = [(Class)aClass optionalKeys]; + } else { + optionalKeys = @[]; + } + + if ([methodsList containsObject:NSStringFromSelector(@selector(dynamicTypeKeys))]) { + dynamicTypeKeys = [(Class)aClass dynamicTypeKeys]; + } else { + dynamicTypeKeys = @[]; + } + + if (!isNSObjectClass && strncmp(class_getName([aClass superclass]), "NS", 2) != 0) { + Class superClass = [aClass superclass]; + NSSet *superPropertyList = [self propertyListForClass:superClass]; + + // Process super class keys information. + [self ensureCodableClass:superClass withPropertyList:superPropertyList]; + NSDictionary *superCodingKeys = [[self class] codingKeysForClass:superClass]; + NSArray *superDynamicTypeKeys = [[self class] dynamicTypeKeysForClass:superClass]; + NSArray *superOptionalKeys = [[self class] optionalKeysForClass:superClass]; + + if (superCodingKeys.count) { + NSMutableDictionary *updatedCodingKeys = [codingKeys mutableCopy]; + [updatedCodingKeys addEntriesFromDictionary:superCodingKeys]; + codingKeys = updatedCodingKeys; + } + + if (superOptionalKeys.count) { + NSMutableSet *updatedOptionalKeys = [NSMutableSet setWithArray:optionalKeys]; + [updatedOptionalKeys addObjectsFromArray:superOptionalKeys]; + optionalKeys = updatedOptionalKeys.allObjects; + } + + if (superDynamicTypeKeys.count) { + NSMutableSet *updatedDynamicTypeKeys = [NSMutableSet setWithArray:dynamicTypeKeys]; + [updatedDynamicTypeKeys addObjectsFromArray:superDynamicTypeKeys]; + dynamicTypeKeys = updatedDynamicTypeKeys.allObjects; + } + } + + objc_setAssociatedObject(aClass, &kPNJSONCodableObjectDynamicTypeKeys, dynamicTypeKeys, OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableObjectOptionalKeys, optionalKeys, OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableHasCustomEncoding, @(encoding), OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableHasCustomDecoding, @(decoding), OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableObjectCodingKeys, codingKeys, OBJC_ASSOCIATION_RETAIN); +} + +- (void)resetInitialStateForClass:(Class)aClass { + objc_setAssociatedObject(aClass, &kPNJSONCodableObjectFoundationProperties, nil, OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableObjectCustomProperties, nil, OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableObjectDynamicTypeKeys, nil, OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableObjectOptionalKeys, nil, OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableHasCustomEncoding, nil, OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableHasCustomDecoding, nil, OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableObjectCodingKeys, nil, OBJC_ASSOCIATION_RETAIN); + objc_setAssociatedObject(aClass, &kPNJSONCodableProperties, nil, OBJC_ASSOCIATION_RETAIN); +} + +#pragma mark - + + +@end diff --git a/PubNub/Modules/Serializer/Object/PNJSONCoder.h b/PubNub/Modules/Serializer/Object/PNJSONCoder.h new file mode 100644 index 000000000..8db27c5d0 --- /dev/null +++ b/PubNub/Modules/Serializer/Object/PNJSONCoder.h @@ -0,0 +1,46 @@ +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Module for objects and data serialization to JSON and vice-versa. +/// +/// Default module for object / data serialization to JSON which is based ``PNJSONSerialization``. +@interface PNJSONCoder : NSObject + + +#pragma mark - Initialization and configuration + +/// Create and configure object `coder`. +/// +/// `Coder` instance able to `encode` / `decode` instance to / from JSON data. +/// +/// - Parameter serializer: Custom JSON serializer which conform to ``PNJSONSerializer`` protocol and can be +/// used to translate serialized object to JSON data . +/// - Returns: `Coder` instance for data processing. ++ (instancetype)coderWithJSONSerializer:(id)serializer; + +/// Initialization with convenient ``init`` is not allowed. +/// +/// - Throws: `PNInterfaceNotAvailable` (API not available) exception. +- (instancetype)init NS_UNAVAILABLE; + + +#pragma mark - Helpers + +/// Clean up resources used by coder. +/// +/// Coder associate additional resources with classes to make encoding / decoding faster. This method allow to +/// release most of resources. ++ (void)cleanUpResources; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Modules/Serializer/Object/PNJSONCoder.m b/PubNub/Modules/Serializer/Object/PNJSONCoder.m new file mode 100644 index 000000000..dff78b030 --- /dev/null +++ b/PubNub/Modules/Serializer/Object/PNJSONCoder.m @@ -0,0 +1,128 @@ +#import "PNJSONCoder.h" +#import "PNFunctions.h" +#import "PNJSONCodableObjects.h" +#import "PNJSONEncoder.h" +#import "PNJSONDecoder.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Protected interface declaration + +@interface PNJSONCoder () + + +#pragma mark - Properties + +/// Configured foundation object to JSON data serializer. +@property(strong, nonatomic) id serializer; + + +#pragma mark - Initialization and configuration + +/// Initialize objects `coder`. +/// +/// - Parameter serializer: Custom JSON serializer which conform to ``PNJSONSerializer`` protocol and can be +/// used to translate serialized object to JSON data . +/// - Returns: Initialized `coder` instance for data processing. +- (instancetype)initWithJSONSerializer:(id)serializer NS_DESIGNATED_INITIALIZER; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark Interface implementation + +@implementation PNJSONCoder + + +#pragma mark - Properties + +- (id)jsonSerializer { + return self.serializer; +} + + +#pragma mark - Initialization and configuration + ++ (instancetype)coderWithJSONSerializer:(id)serializer { + return [[self alloc] initWithJSONSerializer:serializer]; +} + +- (instancetype)init { + + @throw [NSException exceptionWithName:@"PNInterfaceNotAvailable" + reason:@"+new or -init methods unavailable." + userInfo:PNErrorUserInfo(nil, nil, @"Use provided builder constructor", nil)]; + + return nil; +} + +- (instancetype)initWithJSONSerializer:(id)serializer { + if ((self = [super init])) _serializer = serializer; + return self; +} + + +#pragma mark - Data serialization + +- (id)dataOfClass:(Class)cls fromObject:(id)object withError:(NSError **)error { + PNJSONEncoder *encoder = [[PNJSONEncoder alloc] initWithJSONSerializer:self.serializer]; + id data; + + [encoder encodeObject:object]; + [encoder finishEncoding]; + + if (encoder.error && error) { + *error = encoder.error; + } else if (!encoder.error) { + data = cls == [NSString class] ? encoder.encodedObjectString : encoder.encodedObjectData; + } + + return data; +} + +- (id)objectOfClass:(Class)aClass fromData:(id)data withError:(NSError **)error { + return [self objectOfClass:aClass fromData:data withAdditional:nil error:error]; +} + +- (id)objectOfClass:(Class)aClass + fromData:(id)data + withAdditional:(NSDictionary *)additionalData + error:(NSError **)error { + id decodedObject; + + // PNJSONDecoder requires 'data' to be instance of NSData. + if ([[(id)data class] isSubclassOfClass:[NSString class]]) { + data = [(NSString *)data dataUsingEncoding:NSUTF8StringEncoding]; + } else if([[(id)data class] isSubclassOfClass:[NSDictionary class]]) { + return [PNJSONDecoder decodedObjectOfClass:aClass + fromDictionary:data + withAdditionalData:additionalData + error:error]; + } + + decodedObject = [PNJSONDecoder decodedObjectOfClass:aClass + fromData:data + withSerializer:self.serializer + additionalData:additionalData + error:error]; + + return decodedObject; +} + + +#pragma mark - Helpers + ++ (void)cleanUpResources { + [PNJSONCodableObjects clearAllClasses]; +} + +#pragma mark - + + +@end diff --git a/PubNub/Modules/Serializer/Object/PNJSONDecoder+Private.h b/PubNub/Modules/Serializer/Object/PNJSONDecoder+Private.h new file mode 100644 index 000000000..181f36dc6 --- /dev/null +++ b/PubNub/Modules/Serializer/Object/PNJSONDecoder+Private.h @@ -0,0 +1,22 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// JSON deserializer private extension. +@interface PNJSONDecoder (Private) + + +#pragma mark - Properties + +/// Additional information which can be used by `aClass` custom initializer. +@property(strong, nullable, nonatomic) NSDictionary *additionalData; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Modules/Serializer/Object/PNJSONDecoder.h b/PubNub/Modules/Serializer/Object/PNJSONDecoder.h new file mode 100644 index 000000000..d51491d23 --- /dev/null +++ b/PubNub/Modules/Serializer/Object/PNJSONDecoder.h @@ -0,0 +1,175 @@ +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// A decoder that restores from JSON. +/// +/// ``PubNub Core`` is bundled with set of modules to provide minimal support for rest of modules. +/// This `JSON` decoder rely on ``PNJSONSerialization`` for JSON data de-serialization. +@interface PNJSONDecoder : NSObject + + +#pragma mark - Properties + +/// Additional information which can be used by `aClass` custom initializer. +@property(strong, nullable, nonatomic, readonly) NSDictionary *additionalData; + +/// Data decoding error. +@property(strong, nullable, nonatomic, readonly) NSError *error; + + +#pragma mark - Initialization and configuration + +/// Create and configure decoder to work with data for specified class. +/// +/// Decoder will be configured with `NSJSONSerialization` serializer by-default. +/// +/// - Parameters: +/// - aClass: Expected class of decoded object. +/// - dictionary: Dictionary with encoded object. +/// - serializer: JSON serializer which conform to ``PNJSONSerializer`` protocol and can be used to parse +/// JSON binary data. Will fallback to `NSJSONSerialization` if set to `nil`. +/// - Returns: Ready to use decoder instance. ++ (instancetype)decoderForClass:(Class)aClass fromDictionary:(NSDictionary *)dictionary; + +/// Create and configure decoder to work with data for specified class. +/// +/// - Parameters: +/// - aClass: Expected class of decoded object. +/// - dictionary: Dictionary with encoded object. +/// - serializer: JSON serializer which conform to ``PNJSONSerializer`` protocol and can be used to parse +/// JSON binary data. Will fallback to `NSJSONSerialization` if set to `nil`. +/// - Returns: Ready to use decoder instance. ++ (instancetype)decoderForClass:(Class)aClass + fromDictionary:(NSDictionary *)dictionary + withSerializer:(nullable id)serializer; + +/// Initialization with convenient ``init`` is not allowed. +/// +/// - Throws: `PNInterfaceNotAvailable` (API not available) exception. +- (instancetype)init NS_UNAVAILABLE; + + +#pragma mark - Decode Top-Level Objects + +/// Decodes and returns an `object` from JSON data. +/// +/// Decode object from JSON data using `NSJSONSerialization` by-default. +/// +/// Without information about decoded instance, only following data will be returned: +/// - `NSString` +/// - `NSNumber` +/// - `NSNull` +/// - `NSDictionary` +/// - `NSArray` +/// +/// - Parameters: +/// - data: JSON data with encoded object. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Decoded object, or `nil` in case of decoding failure. ++ (nullable id)decodedObjectFromData:(NSData *)data error:(NSError * _Nullable *)error; + +/// Decodes and returns an `object` as instance of `aClass` from JSON data. +/// +/// Decode object from JSON data using `NSJSONSerialization` by-default. +/// +/// Passed class may conform to ``PubNub Core/PNCodable`` protocol which provides assistance with information +/// about what should be decoded. Protocol also provide optional methods which let use custom decoding logic. +/// +/// - Parameters: +/// - aClass: Expected class of decoded object. +/// - data: JSON data with encoded object. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Decoded object, or `nil` in case of decoding failure. ++ (nullable id)decodedObjectOfClass:(Class)aClass fromData:(NSData *)data error:(NSError * _Nullable *)error; + +/// Decodes and returns an `object` as instance of `aClass` from JSON data. +/// +/// Passed class may conform to ``PubNub Core/PNCodable`` protocol which provides assistance with information +/// about what should be decoded. Protocol also provide optional methods which let use custom decoding logic. +/// +/// - Parameters: +/// - aClass: Expected class of decoded object. +/// - data: JSON data with encoded object. +/// - serializer: JSON serializer which conform to ``PNJSONSerializer`` protocol and can be used to parse +/// JSON binary data. Will fallback to `NSJSONSerialization` if set to `nil`. +/// - additionalData: Additional information which can be used by `aClass` custom initializer. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Decoded object, or `nil` in case of decoding failure. ++ (nullable id)decodedObjectOfClass:(Class)aClass + fromData:(NSData *)data + withSerializer:(nullable id)serializer + additionalData:(nullable NSDictionary *)additionalData + error:(NSError * _Nullable *)error; + +/// Decodes and returns an `object` as instance of `aClass` from dictionary. +/// +/// Passed class may conform to ``PubNub Core/PNCodable`` protocol which provides assistance with information +/// about what should be decoded. Protocol also provide optional methods which let use custom decoding logic. +/// +/// - Parameters: +/// - aClass: Expected class of decoded object. +/// - dictionary: Dictionary with encoded object. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Decoded object, or `nil` in case of decoding failure. ++ (nullable id)decodedObjectOfClass:(Class)aClass + fromDictionary:(NSDictionary *)dictionary + withError:(NSError * _Nullable *)error; + +/// Decodes and returns an `object` as instance of `aClass` from dictionary. +/// +/// Passed class may conform to ``PubNub Core/PNCodable`` protocol which provides assistance with information +/// about what should be decoded. Protocol also provide optional methods which let use custom decoding logic. +/// +/// - Parameters: +/// - aClass: Expected class of decoded object. +/// - dictionary: Dictionary with encoded object. +/// - additionalData: Additional information which can be used by `aClass` custom initializer. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Decoded object, or `nil` in case of decoding failure. ++ (nullable id)decodedObjectOfClass:(Class)aClass + fromDictionary:(NSDictionary *)dictionary + withAdditionalData:(nullable NSDictionary *)additionalData + error:(NSError * _Nullable *)error; + +/// Decodes and returns a list with `objects` of `aClass` class from array. +/// +/// Passed class may conform to ``PubNub Core/PNCodable`` protocol which provides assistance with information +/// about what should be decoded. Protocol also provide optional methods which let use custom decoding logic. +/// +/// - Parameters: +/// - cls: Expected class of decoded object in array. +/// - array: Array with encoded objects. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: List of decoded objects, or `nil` in case of decoding failure. ++ (nullable NSArray *)decodedObjectsOfClass:(Class)aClass + fromArray:(NSArray *)array + withError:(NSError * _Nullable *)error; + +/// Decodes and returns a list with `objects` of `aClass` class from array. +/// +/// Passed class may conform to ``PubNub Core/PNCodable`` protocol which provides assistance with information +/// about what should be decoded. Protocol also provide optional methods which let use custom decoding logic. +/// +/// - Parameters: +/// - cls: Expected class of decoded object in array. +/// - array: Array with encoded objects. +/// - additionalData: Additional information which can be used by `aClass` custom initializer. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: List of decoded objects, or `nil` in case of decoding failure. ++ (nullable NSArray *)decodedObjectsOfClass:(Class)aClass + fromArray:(NSArray *)array + withAdditionalData:(nullable NSDictionary *)additionalData + error:(NSError * _Nullable *)error; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Modules/Serializer/Object/PNJSONDecoder.m b/PubNub/Modules/Serializer/Object/PNJSONDecoder.m new file mode 100644 index 000000000..b7f12a78f --- /dev/null +++ b/PubNub/Modules/Serializer/Object/PNJSONDecoder.m @@ -0,0 +1,1094 @@ +#import "PNJSONDecoder+Private.h" +#import +#import +#import +#import +#import "NSNumberFormatter+PNJSONCodable.h" +#import "NSDateFormatter+PNJSONCodable.h" +#import "PNJSONCodableObjects.h" + + +#pragma mark Static + + +static Class _decMutableDictionaryClass, _decMutableArrayClass, _decMutableSetClass, _decMutableStringClass; +static Class _decMutableDataClass, _decDictionaryClass, _decArrayClass, _decSetClass, _decStringClass; +static Class _decNumberClass, _decNullClass, _decDataClass, _decDateClass; + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - Private interface declaration + +@interface PNJSONDecoder () + + +#pragma mark - Properties + +/// Block, which is used for `NSDate` decoding from JSON data. +@property(class, strong, nonatomic, readonly) NSDate * _Nullable (^dateDecodingStrategy)(NSString *date); + +/// Block, which is used for `NSData` decoding from JSON data. +@property(class, strong, nonatomic, readonly) NSData * (^dataDecodingStrategy)(NSString *data, BOOL mutable); + +/// Map of serialized property name to actual property name in specified class. +@property(strong, nullable, nonatomic) NSDictionary *codingKeys; + +/// List of object property names, which is optional and can be `nil` in encoded / decoded data. +@property(strong, nullable, nonatomic) NSArray *optionalKeys; + +/// Configured foundation object to JSON data deserializer. +@property(strong, nullable, nonatomic) id serializer; + +/// Additional information which can be used by `aClass` custom initializer. +@property(strong, nullable, nonatomic) NSDictionary *additionalData; + +/// Object decoding error. +@property(strong, nullable, nonatomic) NSError *decodingError; + +/// Class of instance, which should be decoded from provided data. +@property(strong, nullable, nonatomic) Class instanceClass; + +/// Object, which stores JSON deserialized object used for data decoding. +@property(strong, nullable, nonatomic) id decodableValue; + + +#pragma mark - Initialization and configuration + +/// Initialize decoder with JSON data object. +/// +/// Decode object of `aClass` type from provided JSON data object. +/// It is possible that passed `data` object is serialized `NSArray`, but in this case, it is **required** from +/// `cClass` to adopt ``PNCodable`` protocol and implement ``PNCodable/initObjectWithCoder:`` method. +/// +/// - Parameters: +/// - aClass: Expected class of decoded object. +/// - data: JSON data with encoded object. +/// - serializer: JSON serializer which conform to ``PNJSONSerializer`` protocol and can be used to parse +/// JSON binary data. Will fallback to `NSJSONSerialization` if set to `nil`. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Initialized decoder for JSON data processing. +- (instancetype)initForReadingObjectOfClass:(nullable Class)aClass + fromData:(NSData *)data + withSerializer:(nullable id)serializer + error:(NSError * _Nullable *)error; + +/// Initialize decoder with JSON object. +/// +/// Decode object of `aClass` type from provided JSON object. +/// It is possible that passed `object` is an instance of `NSArray`, but in this case, it is **required** from +/// `cClass` to adopt ``PNCodable`` protocol and implement ``PNCodable/initObjectWithCoder:`` method. +/// +/// - Parameters: +/// - aClass: Expected class of decoded object. +/// - object: One of `NSDictionary` or `NSArray` instances (later possible only with custom decoding). +/// - serializer: JSON serializer which conform to ``PNJSONSerializer`` protocol and can be used to parse +/// JSON binary data. Will fallback to `NSJSONSerialization` if set to `nil`. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Initialized decoder for JSON data processing. +- (instancetype)initForReadingObjectOfClass:(nullable Class)aClass + fromObject:(id)object + withSerializer:(nullable id)serializer + error:(NSError * _Nullable *)error; + + +#pragma mark - Helpers + +/// Retrieve data associated with string key. +/// +/// - Parameter key: The key that decoded value is associated with. +/// - Returns: Encoded object, or `nil` in case if there is no associated data. +- (nullable id)objectForKey:(NSString *)key; + +/// Check whether specified key is present in provided data. +/// +/// - Parameter key: Key for which presence in data should be checked. +/// - Returns: `YES` if key is present in encoded data. +- (BOOL)hasKey:(NSString *)key; + +/// Check whether value associated with string key is _optional_. +/// +/// - Parameter key: Key for which _optional_ value should be checked. +/// - Returns: `YES` if key represent _optional_ value. +- (BOOL)isOptionalKey:(NSString *)key; + +/// Deserialize encoded object from JSON data. +/// +/// - Parameters: +/// - jsonData: JSON data object for deserialization. +/// - serializer: JSON serializer which conform to ``PNJSONSerializer`` protocol and can be used to parse +/// JSON binary data. Will fallback to `NSJSONSerialization` if set to `nil`. +/// - mutableCollections: Whether all collections within `data` should be initialized as mutable or not. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Deserialized object, or `nil` in case of deserialization error. +- (nullable id)objectFromData:(NSData *)jsonData + withSerializer:(nullable id)serializer + mutable:(BOOL)mutableCollections + error:(PNError **)error; + + +#pragma mark - Errors + +/// The decoder is unable to process empty / non- JSON data. +/// +/// - Returns: Empty JSON data error. +- (PNError *)decodingErrorEmptyData; + +/// The decoder is unable to process malformed JSON data. +/// +/// - Parameter error: Error instance from underlying libraries which deserialize JSON object. +/// - Returns: Malformed JSON data error. +- (PNError *)decodingErrorMalformedDataWithError:(NSError *)error; + +/// The decoder is unable to process data because initialized with empty object. +/// +/// - Returns: Empty data object error. +- (PNError *)decodingErrorMissingData; + +/// The decoder is unable to initialize with unexpected data type. +/// +/// The decoder requires that the root element should be an instance of `NSDictionary`. +/// +/// - Parameter aClass: Class of instance which has been passed to +/// ``PNDecoder/initForReadingFromDictionary:``. +/// - Returns: Unexpected root object error. +- (PNError *)decodingErrorWrongRootObjectClass:(Class)aClass; + +/// The decoder is unable to perform the requested operation. +/// +/// - Parameter operation: Name of method which has been called and not supported in current context. +/// - Returns: Unsupported operation error. +- (PNError *)decodingErrorInvalidOperation:(NSString *)operation; + +/// The decoder is unable to decode the object as an instance of specified class. +/// +/// - Parameters: +/// - value: Object which should be decoded. +/// - aClass: Expected class of decoded object. +/// - Returns: Unable to decode error. +- (PNError *)decodingErrorUnableDecodeValue:(id)value asInstanceOfClass:(nullable Class)aClass; + +/// The decoder is unable to decode the object as an instance of any specified classes. +/// +/// - Parameters: +/// - value: Object which should be decoded. +/// - classes: Expected classes of decoded object. +/// - Returns: Unable to decode error. +- (PNError *)decodingErrorUnableDecodeValue:(id)value asInstanceOfAnyClass:(NSArray *)classes; + +/// The decoder is unable to decode the object because of type mismatch. +/// +/// - Parameters: +/// - objectType: Expected type to which value should be decoded. +/// - unexpectedType: Type of data associated with string key which can't be decoded into expected type. +/// - key: The key that the decoded value is associated with. +/// - Returns: Type mismatch error. +- (PNError *)decodingErrorObjectOfType:(NSString *)objectType + forUnexpectedType:(NSString *)unexpectedType + key:(nullable NSString *)key; + +/// The decoder is unable to decode error because the value associated with string key is `nil`. +/// +/// Error, which signalled when `nil` associated with string `key`. +/// +/// - Parameters: +/// - objectType: Data type which is expected to be associated with string key. +/// - key: The key that the decoded value is associated with. +/// - Returns: Missing value error. +- (PNError *)decodingErrorForMissingValueOfType:(NSString *)objectType forKey:(NSString *)key; + +/// The decoder is unable to decode error because key is missing. +/// +/// Error, which signalled when specified `key` not found in provided data. +/// +/// - Parameters: +/// - objectType: Data type which is expected to be associated with string key. +/// - key: The key that the decoded value is associated with. +/// - Returns: Missing key error. +- (PNError *)decodingErrorObjectOfType:(nullable NSString *)objectType forMissingKey:(NSString *)key; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNJSONDecoder + + +#pragma mark - Properties + ++ (NSData * (^)(NSString *, BOOL))dataDecodingStrategy { + static NSData * (^_dataDecodingStrategy)(NSString *, BOOL); + static dispatch_once_t onceToken; + + dispatch_once(&onceToken, ^{ + _dataDecodingStrategy = ^NSData * (NSString *data, BOOL mutable) { + Class dataClass = !mutable ? _decDataClass : _decMutableDataClass; + return [[dataClass alloc] initWithBase64EncodedString:data options:0]; + }; + }); + + return _dataDecodingStrategy; +} + ++ (NSDate * (^)(NSString *))dateDecodingStrategy { + static NSDate * (^_dateDecodingStrategy)(id); + static dispatch_once_t onceToken; + + dispatch_once(&onceToken, ^{ + _dateDecodingStrategy = ^NSDate * (id date) { + NSDate *parsed; + + if ([[date class] isSubclassOfClass:_decNumberClass]) { + parsed = [NSDate dateWithTimeIntervalSince1970:((NSNumber *)date).doubleValue]; + } else if ([(NSString *)date rangeOfString:@"-"].location != NSNotFound) { + parsed = [NSDateFormatter.pnjc_iso8601 dateFromString:(NSString *)date]; + if (!parsed) parsed = [NSDateFormatter.pnjc_iso8601NoMillisecond dateFromString:(NSString *)date]; + } else { + NSNumber *timestamp = [NSNumberFormatter.pnjc_number numberFromString:(NSString *)date]; + if (timestamp != nil) parsed = [NSDate dateWithTimeIntervalSince1970:timestamp.doubleValue]; + } + + return parsed; + }; + }); + + return _dateDecodingStrategy; +} + +- (NSError *)error { + return self.decodingError; +} + + +#pragma mark - Initialization and Configuration + ++ (void)load { + _decMutableDictionaryClass = [NSMutableDictionary class]; + _decMutableStringClass = [NSMutableString class]; + _decMutableArrayClass = [NSMutableArray class]; + _decMutableDataClass = [NSMutableData class]; + _decMutableSetClass = [NSMutableSet class]; + _decDictionaryClass = [NSDictionary class]; + _decStringClass = [NSString class]; + _decNumberClass = [NSNumber class]; + _decArrayClass = [NSArray class]; + _decNullClass = [NSNull class]; + _decDataClass = [NSData class]; + _decDateClass = [NSDate class]; + _decSetClass = [NSSet class]; +} + ++ (instancetype)decoderForClass:(Class)aClass fromDictionary:(NSDictionary *)dictionary { + return [self decoderForClass:aClass fromDictionary:dictionary withSerializer:nil]; +} + ++ (instancetype)decoderForClass:(Class)aClass + fromDictionary:(NSDictionary *)dictionary + withSerializer:(id)serializer { + return [[self alloc] initForReadingObjectOfClass:aClass + fromObject:dictionary + withSerializer:serializer + error:nil]; +} + +- (instancetype)init { + @throw [NSException exceptionWithName:@"PNInterfaceNotAvailable" + reason:@"+new or -init methods unavailable." + userInfo:PNErrorUserInfo(nil, nil, @"Use proper -init* method.", nil)]; + + return nil; +} + +- (instancetype)initForReadingFromData:(NSData *)data { + if ((self = [super init])) { + NSError *error; + _decodableValue = [self objectFromData:data withSerializer:nil mutable:NO error:&error]; + + if (error) { + _decodingError = error; + } else if ([[_decodableValue class] isSubclassOfClass:_decDictionaryClass]) { + NSMutableDictionary *keys = [NSMutableDictionary new]; + + for (NSString *property in ((NSDictionary *)_decodableValue).allKeys) keys[property] = property; + _codingKeys = keys; + } + } + + return self; +} + +- (instancetype)initForReadingFromDictionary:(NSDictionary *)dictionary { + if ((self = [super init])) { + if (![[dictionary class] isSubclassOfClass:_decDictionaryClass]) { + _decodingError = [self decodingErrorWrongRootObjectClass:[dictionary class]]; + } else { + NSMutableDictionary *keys = [NSMutableDictionary new]; + _decodableValue = dictionary; + + for (NSString *property in dictionary.allKeys) keys[property] = property; + _codingKeys = keys; + } + } + + return self; +} + +- (instancetype)initForReadingObjectOfClass:(Class)aClass + fromData:(NSData *)data + withSerializer:(id)serializer + error:(NSError **)error { + NSError *jsonError; + id object = [self objectFromData:data withSerializer:serializer mutable:NO error:&jsonError]; + + if ((self = [self initForReadingObjectOfClass:aClass + fromObject:object + withSerializer:serializer + error:&jsonError])) { + if (error) *error = jsonError; + } + + return self; +} + +- (instancetype)initForReadingObjectOfClass:(Class)aClass + fromObject:(id)object + withSerializer:(nullable id)serializer + error:(NSError **)error { + if ((self = [super init])) { + NSError *initError = error ? *error : nil; + _decodableValue = object; + _instanceClass = aClass; + + if (!initError && !object) initError = [self decodingErrorMissingData]; + _decodingError = initError; + + if (!initError) { + [PNJSONCodableObjects makeCodableClass:aClass]; + + _optionalKeys = [PNJSONCodableObjects optionalKeysForClass:aClass]; + _codingKeys = [PNJSONCodableObjects codingKeysForClass:aClass]; + _serializer = serializer; + } else if (error) { + *error = initError; + } + } + + return self; +} + + +#pragma mark - Decode Top-Level Objects + ++ (id)decodedObjectFromData:(NSData *)data error:(NSError **)error { + return [[[self alloc] initForReadingObjectOfClass:nil + fromData:data + withSerializer:nil + error:error] decodeObject]; +} + ++ (id)decodedObjectOfClass:(Class)aClass fromData:(NSData *)data error:(NSError **)error { + return [self decodedObjectOfClass:aClass fromData:data withSerializer:nil additionalData:nil error:error]; +} + ++ (id)decodedObjectOfClass:(Class)aClass + fromData:(NSData *)data + withSerializer:(id)serializer + additionalData:(NSDictionary *)additionalData + error:(NSError **)error { + PNJSONDecoder *decoder = [[self alloc] initForReadingObjectOfClass:aClass + fromData:data + withSerializer:serializer + error:error]; + decoder.additionalData = additionalData; + + id decodedObject = [decoder decodeObject]; + if (decoder.error && error) *error = decoder.error; + + return decodedObject; +} + ++ (nullable id)decodedObjectOfClass:(Class)aClass fromDictionary:(NSDictionary *)dictionary withError:(NSError **)error { + return [self decodedObjectOfClass:aClass fromDictionary:dictionary withAdditionalData:nil error:error]; +} + ++ (id)decodedObjectOfClass:(Class)aClass + fromDictionary:(NSDictionary *)dictionary + withAdditionalData:(NSDictionary *)additionalData + error:(NSError **)error { + PNJSONDecoder *decoder = [[self alloc] initForReadingObjectOfClass:aClass + fromObject:dictionary + withSerializer:nil + error:error]; + decoder.additionalData = additionalData; + + id decodedObject = [decoder decodeObject]; + if (decoder.error && error) *error = decoder.error; + + return decodedObject; +} + ++ (NSArray *)decodedObjectsOfClass:(Class)aClass fromArray:(NSArray *)array withError:(NSError **)error { + return [self decodedObjectsOfClass:aClass fromArray:array withAdditionalData:nil error:error]; +} + ++ (NSArray *)decodedObjectsOfClass:(Class)aClass + fromArray:(NSArray *)array + withAdditionalData:(NSDictionary *)additionalData + error:(NSError **)error { + NSMutableArray *objects = [NSMutableArray arrayWithCapacity:array.count]; + NSError *decodingError; + + for (id object in array) { + id decodedObject = [self decodedObjectOfClass:aClass + fromDictionary:object + withAdditionalData:additionalData + error:&decodingError]; + + if (decodedObject && !decodingError) { + [objects addObject:decodedObject]; + } else { + objects = nil; + break; + } + } + + if (decodingError && error) *error = decodingError; + + return objects; +} + +- (id)decodeTopLevelObjectOfClass:(Class)aClass forKey:(NSString *)key error:(NSError **)error { + id decodedObject = [self decodeObjectOfClass:aClass forKey:key]; + + if (self.decodingError && error) { + *error = self.decodingError; + self.decodingError = nil; + }; + + return decodedObject; +} + +- (id)decodeTopLevelObjectOfClasses:(NSArray *)classes forKey:(NSString *)key error:(NSError **)error { + id decodedObject = [self decodeObjectOfClasses:classes forKey:key]; + + if (self.decodingError && error) { + *error = self.decodingError; + self.decodingError = nil; + } + + return decodedObject; +} + +- (id)decodeTopLevelObjectForKey:(NSString *)key error:(NSError **)error { + id decodedObject = [self decodeObjectForKey:key]; + + if (self.decodingError && error) { + *error = self.decodingError; + self.decodingError = nil; + } + + return decodedObject; +} + + +#pragma mark - Decoding General Data + +- (id)nestedDecoderForKey:(NSString *)key { + id value = [self objectForKey:key]; + PNJSONDecoder *decoder; + NSError *error; + + if ([[value class] isSubclassOfClass:_decDictionaryClass]) { + decoder = [[PNJSONDecoder alloc] initForReadingFromDictionary:value]; + decoder.additionalData = self.additionalData; + } else if (!value && [self hasKey:key] ) { + error = [self decodingErrorObjectOfType:@"PNJSONDecoder" forMissingKey:key]; + } else if (!value) { + error = [self decodingErrorForMissingValueOfType:@"PNJSONDecoder" forKey:key]; + } + + if (error && ![self isOptionalKey:key]) self.decodingError = error; + + return decoder; +} + +- (id)decodeObject { + return !self.decodingError ? [self decodeObjectOfClass:self.instanceClass] : nil; +} + +- (NSString *)decodeString { + self.decodingError = [self decodingErrorInvalidOperation:@"-decodeString"]; + return nil; +} + +- (NSNumber *)decodeNumber { + self.decodingError = [self decodingErrorInvalidOperation:@"-decodeNumber"]; + return nil; +} + +- (NSData *)decodeData { + self.decodingError = [self decodingErrorInvalidOperation:@"-decodeData"]; + return nil; +} + +- (NSDate *)decodeDate { + self.decodingError = [self decodingErrorInvalidOperation:@"-decodeDate"]; + return nil; +} + +- (id)decodeObjectForKey:(NSString *)key { + id decodableObject = [self objectForKey:key]; + + NSError *error; + + if (!decodableObject && ![self hasKey:key]) { + error = [self decodingErrorObjectOfType:nil forMissingKey:key]; + } else if (!decodableObject) { + error = [self decodingErrorForMissingValueOfType:@"object" forKey:key]; + } + + if (error && ![self isOptionalKey:key]) { + self.decodingError = error; + return nil; + } + + if (!self.instanceClass) return decodableObject; + BOOL isDynamic = NO; + Class aClass = [PNJSONCodableObjects classOfProperty:key forClass:self.instanceClass custom:nil dynamic:&isDynamic]; + + if (!aClass && isDynamic) { + aClass = [PNJSONCodableObjects decodingClassOfProperty:key + forClass:self.instanceClass + inDecodedDictionary:decodableObject]; + } + + return [self decodedObject:decodableObject ofClass:aClass withError:YES]; +} + +- (id)decodeObjectIfPresentForKey:(NSString *)key { + id decodedObject = nil; + if ([self hasKey:key]) decodedObject = [self decodeObjectForKey:key]; + + return decodedObject; +} + +- (NSString *)decodeStringForKey:(NSString *)key { + return [self decodeObjectOfClass:_decStringClass forKey:key]; +} + +- (NSString *)decodeStringIfPresentForKey:(NSString *)key { + id decodedObject = nil; + if ([self hasKey:key]) decodedObject = [self decodeStringForKey:key]; + + return decodedObject; +} + +- (NSNumber *)decodeNumberForKey:(NSString *)key { + return [self decodeObjectOfClass:_decNumberClass forKey:key]; +} + +- (NSNumber *)decodeNumberIfPresentForKey:(NSString *)key { + id decodedObject = nil; + if ([self hasKey:key]) decodedObject = [self decodeNumberForKey:key]; + + return decodedObject; +} + +- (NSData *)decodeDataForKey:(NSString *)key { + return [self decodeObjectOfClass:_decDataClass forKey:key]; +} + +- (NSData *)decodeDataIfPresentForKey:(NSString *)key { + id decodedObject = nil; + if ([self hasKey:key]) decodedObject = [self decodeDataForKey:key]; + + return decodedObject; +} + +- (NSDate *)decodeDateForKey:(NSString *)key { + return [self decodeObjectOfClass:_decDateClass forKey:key]; +} + +- (NSDate *)decodeDateIfPresentForKey:(NSString *)key { + id decodedObject = nil; + if ([self hasKey:key]) decodedObject = [self decodeDateForKey:key]; + + return decodedObject; +} + +- (NSNull *)decodeNilForKey:(NSString *)key { + return [self decodeObjectOfClass:_decNullClass forKey:key]; +} + +- (NSNull *)decodeNilIfPresentForKey:(NSString *)key { + id decodedObject = nil; + if ([self hasKey:key]) decodedObject = [self decodeNilForKey:key]; + + return decodedObject; +} + +- (BOOL)decodeBoolForKey:(NSString *)key { + id value = [self objectForKey:key]; + NSError *error; + + if (!value && ![self hasKey:key]) { + error = [self decodingErrorObjectOfType:@"BOOL" forMissingKey:key]; + } else if (!value) { + error = [self decodingErrorForMissingValueOfType:@"BOOL" forKey:key]; + } else if (![(id)value isKindOfClass:_decNumberClass]) { + error = [self decodingErrorObjectOfType:@"BOOL" + forUnexpectedType:NSStringFromClass([value class]) + key:key]; + } + + if (error && ![self isOptionalKey:key]) self.decodingError = error; + + return self.decodingError == nil ? ((NSNumber *)value).boolValue : NO; +} + +- (BOOL)decodeBoolIfPresentForKey:(NSString *)key { + BOOL decodedObject = NO; + if ([self hasKey:key]) decodedObject = [self decodeBoolForKey:key]; + + return decodedObject; +} + +- (id)decodeObjectOfClass:(Class)aClass { + return [self decodedObject:self.decodableValue ofClass:aClass withError:YES]; +} + +- (id)decodeObjectOfClass:(Class)aClass forKey:(NSString *)key { + id value = [self objectForKey:key]; + NSError *error; + + if (!value && ![self hasKey:key]) { + error = [self decodingErrorObjectOfType:NSStringFromClass(aClass) forMissingKey:key]; + } else if (!value) { + error = [self decodingErrorForMissingValueOfType:NSStringFromClass(aClass) forKey:key]; + } + + if (error && ![self isOptionalKey:key]) self.decodingError = error; + + return !error ? [self decodedObject:value ofClass:aClass withError:YES] : nil; +} + +- (id)decodeObjectOfClass:(Class)aClass ifPresentForKey:(NSString *)key { + id decodedObject = nil; + if ([self hasKey:key]) decodedObject = [self decodeObjectOfClass:aClass forKey:key]; + + return decodedObject; +} + +- (id)decodeObjectOfClasses:(NSArray *)classes { + id decodedObject; + + for (Class aClass in classes) { + decodedObject = [self decodedObject:self.decodableValue ofClass:aClass withError:NO]; + if (decodedObject) break; + } + + if (!decodedObject) { + self.decodingError = [self decodingErrorUnableDecodeValue:self.decodableValue + asInstanceOfAnyClass:classes]; + } + + return decodedObject; +} + +- (id)decodeObjectOfClasses:(NSArray *)classes forKey:(NSString *)key { + id value = [self objectForKey:key]; + id decodedObject; + NSError *error; + + if (value != nil) { + for (Class aClass in classes) { + decodedObject = [self decodedObject:value ofClass:aClass withError:NO]; + if (decodedObject) break; + } + + if (!decodedObject) { + error = [self decodingErrorUnableDecodeValue:self.decodableValue asInstanceOfAnyClass:classes]; + } + } else if (!value && ![self hasKey:key]) { + error = [self decodingErrorObjectOfType:classes.description forMissingKey:key]; + } else if (!value) { + error = [self decodingErrorForMissingValueOfType:classes.description forKey:key]; + } + + if (error && ![self isOptionalKey:key]) self.decodingError = error; + + return decodedObject; +} + +- (id)decodeObjectOfClasses:(NSArray *)classes ifPresentForKey:(NSString *)key { + id decodedObject = nil; + if ([self hasKey:key]) decodedObject = [self decodeObjectOfClasses:classes forKey:key]; + + return decodedObject; +} + + +#pragma mark - Decoding + +- (id)decodedObject:(id)object ofClass:(Class)aClass withError:(BOOL)generateError { + if (!aClass) return object; + + id decodedObject; + + if ([object isKindOfClass:_decNullClass]) { + return nil; + } else if ([aClass isSubclassOfClass:_decStringClass]) { + BOOL mutableString = [aClass isSubclassOfClass:_decMutableStringClass]; + decodedObject = [self decodedAsMutableNSString:mutableString fromValue:object]; + } else if ([aClass isSubclassOfClass:_decNumberClass]) { + decodedObject = [self decodedAsNSNumber:object]; + } else if ([aClass isSubclassOfClass:_decNullClass]) { + decodedObject = [self decodedAsNSNull:object]; + } else if ([aClass isSubclassOfClass:_decDictionaryClass]) { + BOOL mutableDictionary = [aClass isSubclassOfClass:_decMutableDictionaryClass]; + decodedObject = [self decodedAsMutableNSDictionary:mutableDictionary fromValue:object]; + } else if ([aClass isSubclassOfClass:_decArrayClass]) { + BOOL mutableArray = [aClass isSubclassOfClass:_decMutableArrayClass]; + decodedObject = [self decodedAsMutableNSArray:mutableArray fromValue:object]; + } else if ([aClass isSubclassOfClass:_decSetClass]) { + BOOL mutableSet = [aClass isSubclassOfClass:_decMutableSetClass]; + Class setClass = !mutableSet ? _decSetClass : _decMutableSetClass; + decodedObject = [setClass setWithArray:[self decodedAsMutableNSArray:NO fromValue:object]]; + } else if ([aClass isSubclassOfClass:_decDataClass]) { + BOOL mutableData = [aClass isSubclassOfClass:_decMutableDataClass]; + decodedObject = [self decodedAsMutableNSData:mutableData fromValue:object]; + } else if ([aClass isSubclassOfClass:_decDateClass]) { + decodedObject = [self decodedAsNSDate:object]; + } else if (strncmp(class_getName(aClass), "NS", 2) != 0) { + decodedObject = [self decodedCustomObject:object asInstanceOfClass:aClass]; + } + + if (!decodedObject && generateError && !self.decodingError) { + self.decodingError = [self decodingErrorUnableDecodeValue:object asInstanceOfClass:aClass]; + } + + return decodedObject; +} + +- (nullable id)decodedAsMutableNSString:(BOOL)mutable fromValue:(id)value { + if (![[value class] isSubclassOfClass:_decStringClass]) return nil; + return !mutable ? value : [value mutableCopy]; +} + +- (nullable NSNumber *)decodedAsNSNumber:(id)object { + if ([[object class] isSubclassOfClass:_decNumberClass]) return object; + if (![[object class] isSubclassOfClass:_decStringClass]) return nil; + return [NSNumberFormatter.pnjc_number numberFromString:object]; +} + +- (nullable NSNull *)decodedAsNSNull:(id)object { + if ([object isKindOfClass:_decNullClass]) return object; + if (![[object class] isSubclassOfClass:_decStringClass]) return nil; + return [object isEqual:@"null"] ? [NSNull null] : nil; +} + +- (nullable id)decodedAsMutableNSData:(BOOL)mutable fromValue:(id)value { + if (![[value class] isSubclassOfClass:_decStringClass]) return nil; + return [self class].dataDecodingStrategy(value, mutable); +} + +- (nullable NSDate *)decodedAsNSDate:(id)object { + if (![object isKindOfClass:_decNumberClass] && ![object isKindOfClass:_decStringClass]) return nil; + return [self class].dateDecodingStrategy(object); +} + +- (nullable id)decodedAsMutableNSDictionary:(BOOL)mutable fromValue:(id)value { + if (![[value class] isSubclassOfClass:_decDictionaryClass]) return nil; + return !mutable ? value : [value mutableCopy]; +} + +- (nullable id)decodedAsMutableNSArray:(BOOL)mutable fromValue:(id)value { + if (![[value class] isSubclassOfClass:_decArrayClass]) return nil; + return !mutable ? value : [value mutableCopy]; +} + +- (id)decodedCustomObject:(id)value asInstanceOfClass:(Class)aClass { + [PNJSONCodableObjects makeCodableClass:aClass]; + BOOL hasCustomDecoding = [PNJSONCodableObjects hasCustomDecodingForClass:aClass]; + __block id decodedObject = nil; + + if (!hasCustomDecoding && ![[value class] isSubclassOfClass:_decDictionaryClass]) { + self.decodingError = [self decodingErrorObjectOfType:@"NSDictionary" + forUnexpectedType:NSStringFromClass([value class]) + key:nil]; + return nil; + } + + if (hasCustomDecoding) { + NSError *decodeError; + PNJSONDecoder *decoder = [[PNJSONDecoder alloc] initForReadingObjectOfClass:aClass + fromObject:value + withSerializer:self.serializer + error:&decodeError]; + decoder.additionalData = self.additionalData; + decodedObject = [(id)[aClass alloc] initObjectWithCoder:decoder]; + } else { + NSDictionary *dictionaryValue = (NSDictionary *)value; + NSDictionary *codingKeys = self.codingKeys; + NSArray *optionalKeys = self.optionalKeys; + __block id instance = [aClass new]; + + if (aClass != self.instanceClass) { + optionalKeys = [PNJSONCodableObjects optionalKeysForClass:aClass]; + codingKeys = [PNJSONCodableObjects codingKeysForClass:aClass]; + } + + // Early exit in case if passed class can't be instantiated. + if (!instance) return nil; + + [codingKeys enumerateKeysAndObjectsUsingBlock:^(NSString *name, NSString *mName, BOOL *stop) { + BOOL isDynamic = NO; + BOOL customClass; + Class class = [PNJSONCodableObjects classOfProperty:name + forClass:aClass + custom:&customClass + dynamic:&isDynamic]; + if (!class && isDynamic) { + class = [PNJSONCodableObjects decodingClassOfProperty:mName + forClass:aClass + inDecodedDictionary:dictionaryValue]; + } + + BOOL optional = [optionalKeys containsObject:name]; + id encodedObject = dictionaryValue[mName]; + + if (encodedObject) { + id property; + + if (customClass) { + property = [self decodedCustomObject:encodedObject asInstanceOfClass:class]; + } else { + property = [self decodedObject:encodedObject ofClass:class withError:YES]; + } + + if (property) { + [instance setValue:property forKey:name]; + } else if (self.decodingError) { + instance = nil; + *stop = YES; + } + } else if (!optional) { + NSString *className = class ? NSStringFromClass(class) : @"unknown"; + self.decodingError = [self decodingErrorObjectOfType:className forMissingKey:name]; + instance = nil; + *stop = YES; + } + }]; + + decodedObject = instance; + } + + return decodedObject; +} + + +#pragma mark - Helpers + +- (NSArray *)keys { + if (![self.decodableValue isKindOfClass:_decDictionaryClass]) return nil; + return ((NSDictionary *)self.decodableValue).allKeys; +} + +- (BOOL)containsValueForKey:(NSString *)key { + return [self hasKey:key] && [self objectForKey:key] != nil; +} + +- (id)objectForKey:(NSString *)key { + NSString *mappedName = self.codingKeys[key]; + return mappedName ? self.decodableValue[mappedName] : nil; +} + +- (BOOL)hasKey:(NSString *)key { + return self.codingKeys[key] != nil; +} + +- (BOOL)isOptionalKey:(NSString *)key { + return [self.optionalKeys containsObject:key]; +} + +- (id)objectFromData:(NSData *)jsonData + withSerializer:(id)serializer + mutable:(BOOL)mutableCollections + error:(PNError **)error { + if (!jsonData || ![[jsonData class] isSubclassOfClass:_decDataClass] || jsonData.length == 0) { + *error = [self decodingErrorEmptyData]; + } + + // Early exit in case if data object is missing or empty. + if (error && *error) return nil; + + PNJSONReadingOptions options = mutableCollections ? PNJSONReadingMutableCollections : 0; + id data = serializer ? [serializer JSONObjectWithData:jsonData options:options error:error] + : [NSJSONSerialization JSONObjectWithData:jsonData + options:(NSJSONReadingOptions)options + error:error]; + + if (!data && error) { + NSError *jsonError = *error; + *error = [self decodingErrorMalformedDataWithError:jsonError]; + } + + return data; +} + + +#pragma mark - Errors + +- (PNError *)decodingErrorEmptyData { + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable to decode an object from empty data.", + @"'nil' or empty NSData instance has been passed to the decoder.", + @"Ensure that proper value passed to the decoder.", + nil + ); + + return [PNError errorWithDomain:PNJSONDecoderErrorDomain + code:PNJSONDecodingErrorEmptyData + userInfo:userInfo]; +} + +- (PNError *)decodingErrorMalformedDataWithError:(NSError *)error { + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable to decode object from malformed data.", + @"Malformed JSON data has been passed to the decoder.", + @"Ensure that the passed data object contains a proper and complete JSON object. The root object " + "should be an instance of NSDictionary or NSArray.", + error + ); + return [PNError errorWithDomain:PNJSONDecoderErrorDomain + code:PNJSONDecodingErrorMalformedJSONData + userInfo:userInfo]; +} + +- (PNError *)decodingErrorMissingData { + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable to decode 'nil' object.", + @"'nil' object has been passed to the decoder.", + @"Ensure that an object properly deserialized before passing it.", + nil + ); + + return [PNError errorWithDomain:PNJSONDecoderErrorDomain + code:PNJSONDecodingErrorMissingData + userInfo:userInfo]; +} + +- (PNError *)decodingErrorWrongRootObjectClass:(Class)aClass { + NSString *clsName = NSStringFromClass(aClass); + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable initialize decoder.", + PNStringFormat(@"Decoder should be initialized with 'NSDictionary' instance, but got '%@' instead.", + clsName), + @"Ensure that decoder initialized with proper data type.", + nil + ); + + return [PNError errorWithDomain:PNJSONDecoderErrorDomain + code:PNJSONDecodingErrorTypeMismatch + userInfo:userInfo]; +} + +- (PNError *)decodingErrorInvalidOperation:(NSString *)operation { + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable to decode an object.", + PNStringFormat(@"'%@' can't be used to decode object.", operation), + @"Requested operation maybe not be supported in current context.", + nil + ); + + return [PNError errorWithDomain:PNJSONDecoderErrorDomain + code:PNJSONDecodingErrorInvalid + userInfo:userInfo]; +} + +- (NSError *)decodingErrorUnableDecodeValue:(id)value asInstanceOfClass:(Class)aClass { + NSString *clsName = aClass ? NSStringFromClass(aClass) : nil; + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable to decode an object from JSON.", + PNStringFormat(@"Unable to decode an object%@: %@", + clsName ? PNStringFormat(@" of '%@' class", clsName) : @"", value), + @"Check whether target class properly implemented PNCodable protocol or whether data in source " + "object correspond to object structure.", + nil + ); + + return [PNError errorWithDomain:PNJSONDecoderErrorDomain + code:PNJSONDecodingErrorTypeMismatch + userInfo:userInfo]; +} + +- (PNError *)decodingErrorUnableDecodeValue:(id)value asInstanceOfAnyClass:(NSArray *)classes { + NSMutableArray *classNames = [NSMutableArray new]; + for (Class aClass in classes) [classNames addObject:NSStringFromClass(aClass)]; + + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable to decode an object from JSON.", + PNStringFormat(@"Unable to decode an object as an instance any of %@: %@", + [classNames componentsJoinedByString:@", "], value), + @"Check suitable classes and / or encoded data passed to the decoder.", + nil + ); + + return [PNError errorWithDomain:PNJSONDecoderErrorDomain + code:PNJSONDecodingErrorTypeMismatch + userInfo:userInfo]; +} + +- (PNError *)decodingErrorObjectOfType:(NSString *)objectType + forUnexpectedType:(NSString *)unexpectedType + key:(NSString *)key { + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable to decode an object from JSON.", + PNStringFormat(@"Unable to decode and object associated with '%@' as %@ (got '%@' instead)", + key ? key : @"some key", objectType, unexpectedType), + @"Make sure to use proper methods to decode object associated with specified key.", + nil + ); + + return [PNError errorWithDomain:PNJSONDecoderErrorDomain + code:PNJSONDecodingErrorTypeMismatch + userInfo:userInfo]; +} + +- (PNError *)decodingErrorForMissingValueOfType:(NSString *)objectType forKey:(NSString *)key { + NSDictionary *userInfo = PNErrorUserInfo( + PNStringFormat(@"Unable decode %@ from JSON.", objectType), + PNStringFormat(@"%@ can't be decoded from 'nil' associated with '%@' key.", objectType, key), + @"Ensure that the value associated with the specified key is not specified as optional.", + nil + ); + + return [PNError errorWithDomain:PNJSONDecoderErrorDomain + code:PNJSONDecodingErrorValueNotFound + userInfo:userInfo]; +} + +- (PNError *)decodingErrorObjectOfType:(NSString *)objectType forMissingKey:(NSString *)key { + NSDictionary *userInfo = PNErrorUserInfo( + PNStringFormat(@"Unable decode %@ from JSON.", objectType ? objectType : @"value"), + PNStringFormat(@"Encoded object doesn't have %@ associated with '%@' key.", + objectType ? objectType : @"any value", key), + @"Check name of key which used to decode value from JSON.", + nil + ); + + return [PNError errorWithDomain:PNJSONDecoderErrorDomain + code:PNJSONDecodingErrorKeyNotFound + userInfo:userInfo]; +} + +#pragma mark - + + +@end diff --git a/PubNub/Modules/Serializer/Object/PNJSONEncoder.h b/PubNub/Modules/Serializer/Object/PNJSONEncoder.h new file mode 100644 index 000000000..c16f70c39 --- /dev/null +++ b/PubNub/Modules/Serializer/Object/PNJSONEncoder.h @@ -0,0 +1,33 @@ +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// A encoder that stores an object's data to an JSON. +/// +/// ``PubNub Core`` is bundled with set of modules to provide minimal support for rest of modules. +/// This `JSON` decoder rely on ``PNJSONSerialization`` for JSON data de-serialization. +/// +/// Default module for object / data serialization to JSON which is based on +/// ``PubNub Core/PNJSONSerialization``. +@interface PNJSONEncoder : NSObject + + +#pragma mark - Initialization and configuration + +/// Initialize JSON encoder. +/// +/// - Parameter serializer: JSON serializer which should be used for JSON data generation. +/// - Returns: Ready to use object encoder. +- (instancetype)initWithJSONSerializer:(nullable id)serializer NS_DESIGNATED_INITIALIZER; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Modules/Serializer/Object/PNJSONEncoder.m b/PubNub/Modules/Serializer/Object/PNJSONEncoder.m new file mode 100644 index 000000000..923c702a2 --- /dev/null +++ b/PubNub/Modules/Serializer/Object/PNJSONEncoder.m @@ -0,0 +1,515 @@ +#import "PNJSONEncoder.h" +#import +#import +#import +#import +#import "PNJSONCodableObjects.h" + + +#pragma mark Static + +static Class _encDictionaryClass, _encEncoderClass, _encStringClass, _encNumberClass, _encArrayClass; +static Class _encSetClass, _encDataClass, _encNullClass, _encDateClass; + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - Private interface declaration + +@interface PNJSONEncoder () + + +#pragma mark - Properties + +/// Block which is used for `NSData` encoding to JSON-friendly data type. +@property (class, strong, readonly, nonatomic) NSString * (^dataEncodingStrategy)(NSData *data); + +/// Block which is used for `NSDate` encoding to JSON-friendly data type. +@property (class, strong, readonly, nonatomic) NSNumber * (^dateEncodingStrategy)(NSDate *date); + +/// Reference on encoder and it's location in encoded hierarchy. +/// +/// Map used for performance optimisation during nested ``PNJSONEncoder`` encoding. +@property(strong, nullable, nonatomic) NSMutableArray *encodersMap; + +/// Configured foundation object to JSON data serializer. +@property(strong, nullable, nonatomic) id serializer; + +/// Object encoding error. +@property(strong, nullable, nonatomic) NSError *encodingError; + +/// JSON-encodable representation of encoded object. +/// +/// > Important: After ``finishEncoding`` method call all non-encodable values will be replaced with encodable +/// (if possible). +@property (strong, nullable, nonatomic) id encodableValue; + + +#pragma mark - Encoding + +/// Encodes and returns JSON-friendly data type for `value`. +/// +/// - Parameter value: Data which should be encoded into JSON-friendly data type. +/// - Returns: JSON-friendly data or `nil` if passed `value` can't be converted to JSON-friendly data type. +- (nullable id)encodableObjectFrom:(id)value; + +/// Encodes provided `value` as `NSDictionary`. +/// +/// Recursively pre-process all values of provided dictionary to be encoded into JSON-friendly data type. +/// +/// - Parameter value: Dictionary who's values should be encoded into JSON-friendly data types. +/// - Returns: Dictionary where all values encoded into JSON-friendly data types or `nil` if passed `value` +/// can't be converted to JSON-friendly data type. +- (nullable NSMutableDictionary *)encodedNSDictionary:(NSDictionary *)value; + +/// Encodes provided `value` and associates with string `key` in `storage`. +/// +/// - Parameters: +/// - value: Data which should be encoded. +/// - key: Key with which encoded value should be associated. +/// - storage: Store in which encoded data will be stored. +- (void)encodeObject:(id)value forKey:(NSString *)key in:(NSMutableDictionary *)storage; + +/// Encodes provided `value` as `NSArray`. +/// +/// Recursively pre-process all elements of provided array to be encoded into JSON-friendly data type. +/// +/// - Parameter value: Array who's elements should be encoded into JSON-friendly data types. +/// - Returns: Array where all elements encoded into JSON-friendly data types or `nil` if passed `value` can't +/// be converted to JSON-friendly data type. +- (nullable NSMutableArray *)encodedNSArray:(NSArray *)value; + +/// Encodes provided `value` as custom object. +/// +/// With default implementation custom object will be encoded into `NSDictionary` instance, but if it conforms +/// to ``PNCodable`` protocol, then it is possible to specify custom encoding algorithm, which should be used +/// to decode object later. +/// +/// Pre-process custom object with it's properties to be encoded into JSON-friendly data type. +/// +/// - Parameter value: Array who's elements should be encoded into JSON-friendly data types. +/// - Returns: Encoded custom object in preferred data type of `nil` if passed `value` can't be converted to +/// JSON-friendly data type. +- (nullable id)encodedCustomObject:(id)value; + + +#pragma mark - Serialization + +/// Serialize encoded object into JSON data. +/// +/// - Parameter serializer: JSON serializer which should be used to handle encoded object. +/// - Returns: `NSData` with JSON data or `nil` in case of serialization error. +- (nullable NSData *)jsonDataWithJSONSerializer:(nullable id)serializer; + +/// Serialize encoded object into JSON string. +/// +/// - Parameter serializer: JSON serializer which should be used to handle encoded object. +/// - Returns: `NSString` with JSON or `nil` in case of serialization error. +- (nullable NSString *)jsonStringWithJSONSerializer:(nullable id)serializer; + + +#pragma mark - Errors + +/// Unable to encode property error. +/// +/// Error which signalled when specified `name` from `codingKeys` is missing in a `aClass` interface. +/// +/// - Parameters: +/// - name: Name of property from `codingKeys`. +/// - aClass: Class for which property encoding failed. +/// - Returns: Missing property error. +- (PNError *)encodingErrorForMissingProperty:(NSString *)name inClass:(Class)aClass; + +/// Unable to encode value error. +/// +/// Encoder wasn't able to handle provider `value`. Error may happen, when encoder doesn't have implementation +/// to handle specific type of data. +/// +/// - Parameters: +/// - value: Object which wasn't encoded. +/// - key: Name of property with encoded value. +/// - Returns: Value encoding error. +- (PNError *)encodingErrorUnsupportedTypeOfValue:(id)value forKey:(nullable NSString *)key; + +/// Unable to serialize encoded object to JSON. +/// +/// Error which signalled when resulting object has unexpected root object or any it's nested values has +/// unsupported data type. +/// +/// - Parameter error: Error instance from underlying libraries which serialize JSON object. +/// - Returns: Encoded object serialization error. +- (PNError *)encodingErrorForJSONSerializationWithError:(nullable NSError *)error; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNJSONEncoder + + +#pragma mark - Properties + ++ (NSString * (^)(NSData *))dataEncodingStrategy { + static NSString * (^_dataEncodingStrategy)(NSData *); + static dispatch_once_t onceToken; + + dispatch_once(&onceToken, ^{ + _dataEncodingStrategy = ^NSString *(NSData *data) { + return [data base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)0]; + }; + }); + + return _dataEncodingStrategy; +} + ++ (NSNumber * (^)(NSDate *))dateEncodingStrategy { + static NSNumber * (^_dateEncodingStrategy)(NSDate *); + static dispatch_once_t onceToken; + + dispatch_once(&onceToken, ^{ + _dateEncodingStrategy = ^NSNumber *(NSDate *date) { + return [NSNumber numberWithDouble:date.timeIntervalSince1970]; + }; + }); + + return _dateEncodingStrategy; +} + +- (NSError *)error { + return self.encodingError; +} + +- (NSData *)encodedObjectData { + return [self jsonDataWithJSONSerializer:self.serializer]; +} + +- (NSString *)encodedObjectString { + return [self jsonStringWithJSONSerializer:self.serializer]; +} + + +#pragma mark - Initialization and Configuration + ++ (void)load { + _encDictionaryClass = [NSDictionary class]; + _encEncoderClass = [PNJSONEncoder class]; + _encStringClass = [NSString class]; + _encNumberClass = [NSNumber class]; + _encArrayClass = [NSArray class]; + _encDateClass = [NSDate class]; + _encDataClass = [NSData class]; + _encNullClass = [NSNull class]; + _encSetClass = [NSSet class]; +} + +- (instancetype)init { + return [self initWithJSONSerializer:nil]; +} + +- (instancetype)initWithJSONSerializer:(id)serializer { + if ((self = [super init])) { + _encodableValue = [NSMutableDictionary new]; + _encodersMap = [NSMutableArray new]; + _serializer = serializer; + } + + return self; +} + + +#pragma mark - Encoding General Data + +- (id)nestedEncoderForKey:(NSString *)key { + PNJSONEncoder *encoder = [[PNJSONEncoder alloc] initWithJSONSerializer:self.serializer]; + [self.encodersMap addObject:@[encoder, key, self.encodableValue]]; + + return encoder; +} + +- (void)encodeObject:(id)object { + id encodableObject = [self encodableObjectFrom:object]; + + if (!encodableObject) { + self.encodableValue = nil; + return; + } + + if (!PNNSObjectIsKindOfAnyClass(encodableObject, @[_encDictionaryClass, _encArrayClass])) { + self.encodingError = [self encodingErrorForJSONSerializationWithError:nil]; + self.encodableValue = nil; + } else { + self.encodableValue = encodableObject; + } +} + +- (void)encodeObject:(id)object forKey:(NSString *)key { + id encodedObject = [self encodableObjectFrom:object]; + + if (encodedObject) { + [self encodeObject:encodedObject forKey:key in:self.encodableValue]; + } else if (!self.encodingError) { + self.encodingError = [self encodingErrorUnsupportedTypeOfValue:object forKey:key]; + } +} + +- (void)encodeIfPresentObject:(id)object forKey:(NSString *)key { + if (object) [self encodeObject:object forKey:key]; +} + +- (void)encodeString:(NSString *)string forKey:(NSString *)key { + if (string) { + self.encodableValue[key] = string; + } else { + self.encodingError = [self encodingErrorUnsupportedTypeOfValue:@"NSString" forKey:key]; + } +} + +- (void)encodeIfPresentString:(NSString *)string forKey:(NSString *)key { + if (string != nil) [self encodeString:string forKey:key]; +} + +- (void)encodeNumber:(NSNumber *)number forKey:(NSString *)key { + if (number != nil) { + self.encodableValue[key] = number; + } else { + self.encodingError = [self encodingErrorUnsupportedTypeOfValue:@"NSNumber" forKey:key]; + } +} + +- (void)encodeIfPresentNumber:(NSNumber *)number forKey:(NSString *)key { + if (number != nil) [self encodeNumber:number forKey:key]; +} + +- (void)encodeData:(NSData *)data forKey:(NSString *)key { + id encodedObject = [self encodableObjectFrom:data]; + + if (encodedObject) { + self.encodableValue[key] = encodedObject; + } else if (!self.encodingError) { + self.encodingError = [self encodingErrorUnsupportedTypeOfValue:data forKey:key]; + } +} + +- (void)encodeIfPresentData:(NSData *)data forKey:(NSString *)key { + if (data) [self encodeData:data forKey:key]; +} + +- (void)encodeDate:(NSDate *)date forKey:(NSString *)key { + id encodedObject = [self encodableObjectFrom:date]; + + if (encodedObject) { + self.encodableValue[key] = encodedObject; + } else if (!self.encodingError) { + self.encodingError = [self encodingErrorUnsupportedTypeOfValue:date forKey:key]; + } +} + +- (void)encodeIfPresentDate:(NSDate *)date forKey:(NSString *)key { + if (date) [self encodeDate:date forKey:key]; +} + +- (void)encodeNilForKey:(NSString *)key { + self.encodableValue[key] = [NSNull null]; +} + +- (void)encodeBool:(BOOL)value forKey:(NSString *)key { + NSNumber *boolValue = [NSNumber numberWithBool:value]; + self.encodableValue[key] = boolValue; +} + + +#pragma mark - Encoding + +- (id)encodableObjectFrom:(id)value { + if (value == nil) return nil; + + Class aClass = [value class]; + id encodableObject = nil; + + if (PNNSObjectIsSubclassOfAnyClass(value, @[_encStringClass, _encNumberClass, _encNullClass])) { + encodableObject = value; + } else if ([aClass isSubclassOfClass:_encDictionaryClass]) { + encodableObject = [self encodedNSDictionary:(id)value]; + } else if ([aClass isSubclassOfClass:_encArrayClass]) { + encodableObject = [self encodedNSArray:(id)value]; + } else if ([aClass isSubclassOfClass:_encSetClass]) { + encodableObject = [self encodedNSArray:((NSSet *)value).allObjects]; + } else if ([aClass isSubclassOfClass:_encEncoderClass]) { + [(PNJSONEncoder *)value finishEncoding]; + encodableObject = ((PNJSONEncoder *)value).encodableValue; + } else if ([aClass isSubclassOfClass:_encDataClass]) { + encodableObject = PNJSONEncoder.dataEncodingStrategy((id)value); + } else if ([aClass isSubclassOfClass:_encDateClass]) { + encodableObject = PNJSONEncoder.dateEncodingStrategy((id)value); + } else if (strncmp(class_getName(aClass), "NS", 2) != 0) { + encodableObject = [self encodedCustomObject:(id)value]; + } + + return encodableObject; +} + +- (NSMutableDictionary *)encodedNSDictionary:(NSDictionary *)value { + NSMutableDictionary *storage = [NSMutableDictionary new]; + __block BOOL encodingFailed = NO; + + [value enumerateKeysAndObjectsUsingBlock:^(NSString *key, id obj, BOOL *stop) { + [self encodeObject:obj forKey:key in:storage]; + + encodingFailed = self.encodingError != nil; + *stop = encodingFailed; + }]; + + return !encodingFailed ? storage : nil; +} + +- (void)encodeObject:(id)value forKey:(NSString *)key in:(NSMutableDictionary *)storage { + id encodedObject = [self encodableObjectFrom:value]; + + if (encodedObject) { + storage[key] = encodedObject; + } else if (!self.encodingError) { + self.encodingError = [self encodingErrorUnsupportedTypeOfValue:value forKey:key]; + } +} + +- (NSMutableArray *)encodedNSArray:(NSArray *)value { + NSMutableArray *storage = [NSMutableArray new]; + __block BOOL encodingFailed = NO; + + [value enumerateObjectsUsingBlock:^(id obj, NSUInteger __unused idx, BOOL *stop) { + id encodedObject = [self encodableObjectFrom:obj]; + + if (encodedObject) { + [storage addObject:encodedObject]; + } else if (!self.encodingError) { + self.encodingError = [self encodingErrorUnsupportedTypeOfValue:obj forKey:nil]; + } + + encodingFailed = self.encodingError != nil; + *stop = encodingFailed; + }]; + + return !encodingFailed ? storage : nil; +} + +- (id)encodedCustomObject:(id)value { + Class objectClass = [value class]; + __block BOOL encodingFailed = NO; + id encodedObject = nil; + + [PNJSONCodableObjects makeCodableClass:objectClass]; + + if ([PNJSONCodableObjects hasCustomEncodingForClass:objectClass]) { + PNJSONEncoder *encoder = [[PNJSONEncoder alloc] initWithJSONSerializer:self.serializer]; + [(id)value encodeObjectWithCoder:encoder]; + [encoder finishEncoding]; + + encodedObject = encoder.encodableValue; + } else { + NSSet *properties = [PNJSONCodableObjects propertyListForClass:objectClass]; + NSDictionary *codingKeyMap = [PNJSONCodableObjects codingKeysForClass:objectClass]; + NSMutableDictionary *storage = [NSMutableDictionary new]; + + [codingKeyMap enumerateKeysAndObjectsUsingBlock:^(NSString *name, NSString *map, BOOL *stop) { + if ([properties containsObject:name]) { + id object = [(id)value valueForKey:name]; + // Runtime can't detect optional properties, so encode them if they are present. + if (object) [self encodeObject:object forKey:map in:storage]; + } else { + self.encodingError = [self encodingErrorForMissingProperty:name inClass:objectClass]; + } + + encodingFailed = self.encodingError != nil; + *stop = encodingFailed; + }]; + + if (!self.encodingError) encodedObject = storage; + } + + return encodedObject; +} + +- (NSData *)jsonDataWithJSONSerializer:(id)serializer { + // Early exit if encoding error already generated. + if (self.encodingError) return nil; + + return serializer ? [serializer dataWithJSONObject:self.encodableValue error:nil] + : [NSJSONSerialization dataWithJSONObject:self.encodableValue options:0 error:nil]; +} + +- (NSString *)jsonStringWithJSONSerializer:(id)serializer { + // Early exit if encoding error already generated. + if (self.encodingError) return nil; + + NSString *json; + NSData *jsonData = [self jsonDataWithJSONSerializer:serializer]; + if (jsonData) json = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + + return json; +} + +- (void)finishEncoding { + for (NSArray *encodersMap in self.encodersMap) { + PNJSONEncoder *nestedEncoder = encodersMap[0]; + [nestedEncoder finishEncoding]; + encodersMap[2][encodersMap[1]] = nestedEncoder.encodableValue; + } + + self.encodersMap = nil; +} + + +#pragma mark - Errors + +- (PNError *)encodingErrorForMissingProperty:(NSString *)name inClass:(Class)aClass { + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable to encode object to JSON.", + PNStringFormat(@"'%@' property not found in %@ class.", name, NSStringFromClass(aClass)), + @"Ensure that property name is not miss-typed in -codingKeys method.", + nil + ); + + return [PNError errorWithDomain:PNJSONEncoderErrorDomain + code:PNJSONEncodingErrorPropertyNotFound + userInfo:userInfo]; +} + +- (PNError *)encodingErrorUnsupportedTypeOfValue:(id)value forKey:(NSString *)key { + NSCharacterSet *trimmingCharset = [NSCharacterSet punctuationCharacterSet]; + NSString *type = [NSStringFromClass([value class]) stringByTrimmingCharactersInSet:trimmingCharset]; + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable to encode object to JSON.", + PNStringFormat(@"Unable encode object%@: %@ (%@)", key ? PNStringFormat(@" for '%@' key", key) : @"", value, + type), + @"Make sure that object or it's properties has supported data type (NSNumber, NSString, NSData, " + "NSDate, NSDictionary, NSArray, NSSet, custom object) or exclude it by adopting PNCodable and " + "instructing on fields for encoding with `-codingKeys`.", + nil + ); + + return [PNError errorWithDomain:PNJSONEncoderErrorDomain code:PNJSONEncodingErrorType userInfo:userInfo]; +} + +- (PNError *)encodingErrorForJSONSerializationWithError:(NSError *)error { + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable to encode object to JSON.", + @"One of few properties of encoded object has unsupported data type.", + @"Make sure that all properties has supported data types (NSNumber, NSString, NSData, NSDate, " + "NSDictionary, NSArray) or exclude fields by adopting PNCodable and instructing on fields for " + "encoding with `-codingKeys`.", + error + ); + + return [PNError errorWithDomain:PNJSONEncoderErrorDomain code:PNJSONEncodingErrorType userInfo:userInfo]; +} + +#pragma mark - + + +@end diff --git a/PubNub/Misc/Categories/NSURLSessionConfiguration+PNConfiguration.h b/PubNub/Modules/Transport/Categories/NSURLSessionConfiguration+PNConfiguration.h similarity index 100% rename from PubNub/Misc/Categories/NSURLSessionConfiguration+PNConfiguration.h rename to PubNub/Modules/Transport/Categories/NSURLSessionConfiguration+PNConfiguration.h diff --git a/PubNub/Misc/Categories/NSURLSessionConfiguration+PNConfiguration.m b/PubNub/Modules/Transport/Categories/NSURLSessionConfiguration+PNConfiguration.m similarity index 100% rename from PubNub/Misc/Categories/NSURLSessionConfiguration+PNConfiguration.m rename to PubNub/Modules/Transport/Categories/NSURLSessionConfiguration+PNConfiguration.m diff --git a/PubNub/Misc/Categories/NSURLSessionConfiguration+PNConfigurationPrivate.h b/PubNub/Modules/Transport/Categories/NSURLSessionConfiguration+PNConfigurationPrivate.h similarity index 100% rename from PubNub/Misc/Categories/NSURLSessionConfiguration+PNConfigurationPrivate.h rename to PubNub/Modules/Transport/Categories/NSURLSessionConfiguration+PNConfigurationPrivate.h diff --git a/PubNub/Modules/Transport/PNURLSessionTransport.h b/PubNub/Modules/Transport/PNURLSessionTransport.h new file mode 100644 index 000000000..702889bd7 --- /dev/null +++ b/PubNub/Modules/Transport/PNURLSessionTransport.h @@ -0,0 +1,16 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +/// `NSURLSession`-based transport module. +/// +/// Transport module utilize `NSURLSession` to make network calls to the remote origin. +@interface PNURLSessionTransport : NSObject + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Modules/Transport/PNURLSessionTransport.m b/PubNub/Modules/Transport/PNURLSessionTransport.m new file mode 100644 index 000000000..92bf0b844 --- /dev/null +++ b/PubNub/Modules/Transport/PNURLSessionTransport.m @@ -0,0 +1,496 @@ +#import "PNURLSessionTransport.h" +#if TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) +#import +#endif // TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) +#import +#import +#import +#import +#import +#import +#import +#import + +#import "NSURLSessionConfiguration+PNConfigurationPrivate.h" +#import "PNURLSessionTransportResponse.h" + + +#pragma mark Static + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `NSURLSession`-based transport module private extension. +@interface PNURLSessionTransport () + + +#pragma mark - Properties + +#if TARGET_OS_OSX +/// Identifier which has been used to request from system more time to complete pending tasks when client resign +/// active. +@property(strong, nullable, nonatomic) id tasksCompletionIdentifier; +#endif // TARGET_OS_OSX +#if TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) +/// Identifier which has been used to request from system more time to complete pending tasks when client resign +/// active. +@property(assign, nonatomic) UIBackgroundTaskIdentifier tasksCompletionIdentifier; +#endif // TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) + +/// List of the currently active requests. +@property(strong, nonatomic) NSMutableArray *requests; + +/// Transport module configuration. +@property(copy, nonatomic) PNTransportConfiguration *configuration; + +/// Default request caching policy. +@property(assign, nonatomic) NSURLRequestCachePolicy cachePolicy; + +/// List of headers which should be added to each request. +@property(copy, nonatomic) NSDictionary *HTTPAdditionalHeaders; + +/// Session which should be used to create requests to remote origin endpoints. +@property(strong, nullable, nonatomic) NSURLSession *session; + +/// Cancelled requests filter predicate. +@property(strong, nonatomic) NSPredicate *cancelledPredicate; + +/// Unique `PubNub` transport instance identifier. +@property(strong, nonatomic) NSString *identifier; + +/// Resources access lock. +@property(strong, nonatomic) PNLock *lock; + + +#pragma mark - URL Session + +/// Configure transport's URL session for requests processing. +- (void)setupURLSession; + +/// Retrieve platform-specific `NSURLSession` instance configuration. +/// +/// - Returns: Suitable `NSURLSessionConfiguration` instance. +- (NSURLSessionConfiguration *)urlSessionConfiguration; + + +#pragma mark - Request + +/// Create `NSURLRequest` from transport-independent request object. +/// +/// - Parameter transportRequest: Request object with all required information to send it using `NSURLSession`. +/// - Returns: Configured and ready to use `request` instance. +- (NSURLRequest *)requestFromTransportRequest:(PNTransportRequest *)transportRequest; + +/// Handle `NSURLRequest` processing results. +/// +/// - Parameters: +/// - request: Transport request object which has been used to create `NSURLSessionTask`. +/// - task: Processed `NSURLSession` task (data or download). +/// - response: Remote service response information object. +/// - data: Remote service response payload. +/// - Returns: Pre-processed transport-independent service response object. +- (id)handleRequest:(PNTransportRequest *)request + taskCompletion:(NSURLSessionTask *)task + withResponse:(nullable NSURLResponse *)response + data:(nullable NSData *)data; + + +#pragma mark - State + +/// Complere background task (if any). +/// +/// Free up system resources when background execution context not rrquired anymore. +- (void)endBackgroundTasksCompletionIfRequired; + + +#pragma mark - Misc + +/// Create request porcessing error (if required). +/// +/// - Parameters: +/// - request: Transport request object which has been used to create `NSURLSessionTask`. +/// - requestUrl: Final URL which has been used to access resource on remote origin. +/// - transportError: Error generated by NSURLSession task while processed `request`. +- (nullable PNError *)errorForRequest:(PNTransportRequest *)request + withURL:(nullable NSURL *)requestUrl + error:(nullable NSError *)transportError; + +#ifndef PUBNUB_DISABLE_LOGGER +/// Print out any session configuration instance customizations which have been done by developer. +- (void)printIfRequiredSessionCustomizationInformation; +#endif // PUBNUB_DISABLE_LOGGER + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNURLSessionTransport + + +#pragma mark - Initialization and Configuration + +- (void)setupWithConfiguration:(PNTransportConfiguration *)configuration { + self.configuration = configuration; + + _cancelledPredicate = [NSPredicate predicateWithBlock:^BOOL(PNTransportRequest *request, __unused id bindings) { + return !request.cancelled; + }]; + +#if TARGET_OS_IOS + _tasksCompletionIdentifier = UIBackgroundTaskInvalid; +#endif // TARGET_OS_IOS + + _lock = [PNLock lockWithIsolationQueueName:@"transport" subsystemQueueIdentifier:@"com.pubnub.transport"]; + _configuration = [configuration copy]; + _requests = [NSMutableArray new]; + + // Finalyze transport configuration. + [self setupURLSession]; + +#ifndef PUBNUB_DISABLE_LOGGER + [self printIfRequiredSessionCustomizationInformation]; +#endif // PUBNUB_DISABLE_LOGGER +} + + +#pragma mark - Information + +- (void)requestsWithBlock:(void (^)(NSArray *))block { + if (!block) return; + + [self.lock syncWriteAccessWithBlock:^{ + block(self.requests); + // Filter out potentially cancelled requests after block has been called. + [self.requests filterUsingPredicate:self.cancelledPredicate]; + }]; +} + + +#pragma mark - Request processing + +- (void)sendRequest:(PNTransportRequest *)request withCompletionBlock:(PNRequestCompletionBlock)block { + NSURLRequest *urlRequest = [self requestFromTransportRequest:request]; + block = [block copy]; + + PNWeakify(self); + __block NSURLSessionTask *task; + task = [self.session dataTaskWithRequest:urlRequest + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + PNStrongify(self); + BOOL retriableError = error && error.code != NSURLErrorCancelled; + NSInteger statusCode = ((NSHTTPURLResponse *)response).statusCode; + BOOL retriableStatusCode = statusCode >= 400 && statusCode != 403; + NSTimeInterval delay = 0.f; + + if ((retriableError || retriableStatusCode) && request.retriable) { + PNRequestRetryConfiguration *retry = self.configuration.retryConfiguration; + NSUInteger retryAttempt = request.retryAttempt + 1; + delay = [retry retryDelayForFailedRequest:urlRequest withResponse:response retryAttempt:retryAttempt]; + } + + if (delay > 0.f) { + request.retryAttempt += 1; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), + dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [self sendRequest:request withCompletionBlock:block]; + }); + } else { + block(request, + [self handleRequest:request taskCompletion:task withResponse:response data:data], + [self errorForRequest:request withURL:task.originalRequest.URL error:error] + ); + } + }]; + + [self sendRequest:request withSessionTask:task]; +} + +- (void)sendDownloadRequest:(PNTransportRequest *)request withCompletionBlock:(PNDownloadRequestCompletionBlock)block { + NSURLRequest *urlRequest = [self requestFromTransportRequest:request]; + block = [block copy]; + + PNWeakify(self); + __block NSURLSessionTask *task; + task = [self.session downloadTaskWithRequest:urlRequest + completionHandler:^(NSURL *location, NSURLResponse *response, NSError *error) { + PNStrongify(self); + BOOL retriableError = error && error.code != NSURLErrorCancelled; + NSInteger statusCode = ((NSHTTPURLResponse *)response).statusCode; + BOOL retriableStatusCode = statusCode >= 400 && statusCode != 403; + NSTimeInterval delay = 0.f; + + if ((retriableError || retriableStatusCode) && request.retriable) { + PNRequestRetryConfiguration *retry = self.configuration.retryConfiguration; + NSUInteger retryAttempt = request.retryAttempt + 1; + delay = [retry retryDelayForFailedRequest:urlRequest withResponse:response retryAttempt:retryAttempt]; + } + + if (delay > 0.f) { + request.retryAttempt += 1; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), + dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [self sendDownloadRequest:request withCompletionBlock:block]; + }); + } else { + block(request, + [self handleRequest:request taskCompletion:task withResponse:nil data:nil], + location, + [self errorForRequest:request withURL:task.originalRequest.URL error:error] + ); + } + }]; + + [self sendRequest:request withSessionTask:task]; +} + +- (void)sendRequest:(PNTransportRequest *)request withSessionTask:(NSURLSessionTask *)task { + [self.lock asyncWriteAccessWithBlock:^{ + [self.requests addObject:request]; + + PNLogRequest(self.configuration.logger, @" %@ %@", + request.stringifiedMethod, task.originalRequest.URL.absoluteString); + + if (request.cancellable) { + __weak __typeof(request) weakRequest = request; + PNWeakify(self); + + request.cancel = ^{ + PNStrongify(self); + + weakRequest.cancelled = YES; + weakRequest.cancel = nil; + [task cancel]; + + [self.lock asyncWriteAccessWithBlock:^{ + [self.requests removeObject:weakRequest]; + }]; + }; + } + + [task resume]; + }]; +} + +- (PNTransportRequest *)transportRequestFromTransportRequest:(PNTransportRequest *)request { + // Usually pre-defined origins set for non-REST API endpoints (outside of PubNub network). + if (request.origin.length > 0) return request; + + NSMutableDictionary *headers = [(self.HTTPAdditionalHeaders ?: @{}) mutableCopy]; + [headers addEntriesFromDictionary:request.headers]; + + if ((request.method == TransportPOSTMethod || request.method == TransportPATCHMethod) && + !request.bodyStreamAvailable && request.shouldCompressBody) { + request.body = [PNGZIP GZIPDeflatedData:request.body] ?: [NSData new]; + headers[@"content-encoding"] = @"gzip"; + headers[@"content-length"] = @(request.body.length).stringValue; + } + + request.headers = headers; + + return request; +} + +- (id)handleRequest:(PNTransportRequest *)request + taskCompletion:(NSURLSessionTask *)task + withResponse:(NSURLResponse *)response + data:(NSData *)data { + [self.lock syncWriteAccessWithBlock:^{ + request.cancel = nil; + [self.requests removeObject:request]; + NSUInteger activeRequestsCount = self.requests.count; + + if (activeRequestsCount == 0) [self endBackgroundTasksCompletionIfRequired]; + }]; + + return [PNURLSessionTransportResponse responseWithNSURLResponse:response data:data]; +} + + +#pragma mark - State + +- (void)suspend { + [self.lock syncWriteAccessWithBlock:^{ + if (self.requests.count == 0) return; +#if TARGET_OS_OSX + if (self.tasksCompletionIdentifier != nil) return; + + NSProcessInfo *processInfo = [NSProcessInfo processInfo]; + NSActivityOptions options = NSActivityIdleSystemSleepDisabled | NSActivityBackground; + self.tasksCompletionIdentifier = [processInfo beginActivityWithOptions:options reason:@"Finish requests"]; +#endif // TARGET_OS_OSX +#if TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) + if (self.tasksCompletionIdentifier != UIBackgroundTaskInvalid) return; + + __weak __typeof__(self) weakSelf = self; + UIApplication *application = [UIApplication performSelector:NSSelectorFromString(@"sharedApplication")]; + self.tasksCompletionIdentifier = [application beginBackgroundTaskWithExpirationHandler:^{ + [self.lock syncWriteAccessWithBlock:^{ + [weakSelf endBackgroundTasksCompletionIfRequired]; + }]; + }]; +#endif // TARGET_OS_IOS && !defined(TARGET_IS_EXTENSION) + }]; +} + +- (void)resume { + [self endBackgroundTasksCompletionIfRequired]; +} + +- (void)endBackgroundTasksCompletionIfRequired { +#if TARGET_OS_OSX + if (self.tasksCompletionIdentifier == nil) return; + + NSProcessInfo *processInfo = [NSProcessInfo processInfo]; + [processInfo endActivity:self.tasksCompletionIdentifier]; + self.tasksCompletionIdentifier = nil; +#endif // TARGET_OS_OSX +#if TARGET_OS_IOS && !TARGET_IS_EXTENSION + if (self.tasksCompletionIdentifier == UIBackgroundTaskInvalid) return; + + UIApplication *application = [UIApplication performSelector:NSSelectorFromString(@"sharedApplication")]; + [application endBackgroundTask:self.tasksCompletionIdentifier]; + self.tasksCompletionIdentifier = UIBackgroundTaskInvalid; +#endif // TARGET_OS_IOS && !TARGET_IS_EXTENSION +} + +- (void)invalidate { + [self.lock syncWriteAccessWithBlock:^{ + [self endBackgroundTasksCompletionIfRequired]; + [self.session invalidateAndCancel]; + self->_session = nil; + }]; +} + + +#pragma mark - URL Session + +- (void)setupURLSession { + NSURLSessionConfiguration *configuration = [self urlSessionConfiguration]; + NSOperationQueue *queue = [NSOperationQueue new]; + queue.maxConcurrentOperationCount = configuration.HTTPMaximumConnectionsPerHost; + self.session = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:queue]; +} + +- (NSURLSessionConfiguration *)urlSessionConfiguration { + NSString *identifier = [NSString stringWithFormat:@"com.pubnub.network.%p", self]; + NSURLSessionConfiguration *configuration = nil; + + configuration = [NSURLSessionConfiguration pn_ephemeralSessionConfigurationWithIdentifier:identifier]; + configuration.HTTPMaximumConnectionsPerHost = self.configuration.maximumConnections; + _HTTPAdditionalHeaders = [configuration.HTTPAdditionalHeaders copy]; + _cachePolicy = configuration.requestCachePolicy; + + return configuration; +} + +- (void)URLSession:(NSURLSession *)session didBecomeInvalidWithError:(NSError *)error { + if (!error) return; + + [self.lock syncWriteAccessWithBlock:^{ + [self setupURLSession]; + }]; +} + + +#pragma mark - Request + +- (NSURLRequest *)requestFromTransportRequest:(PNTransportRequest *)transportRequest { + NSDictionary *query = transportRequest.query; + NSString *path = transportRequest.path; + + if (query.count > 0) { + NSMutableArray *keyValuePairs = [NSMutableArray arrayWithCapacity:query.count]; + [query enumerateKeysAndObjectsUsingBlock:^(NSString *key, id value, __unused BOOL *stop) { + value = [value isKindOfClass:[NSString class]] ? [PNString percentEscapedString:value] : value; + [keyValuePairs addObject:PNStringFormat(@"%@=%@", key, value)]; + }]; + + path = PNStringFormat(@"%@?%@", path, [keyValuePairs componentsJoinedByString:@"&"]); + } + + NSURL *url = [NSURL URLWithString:path relativeToURL:[NSURL URLWithString:transportRequest.origin]]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + request.HTTPMethod = transportRequest.stringifiedMethod; + request.timeoutInterval = transportRequest.timeout; + request.cachePolicy = self.cachePolicy; + + if (transportRequest.method == TransportPOSTMethod || transportRequest.method == TransportPATCHMethod) { + if (transportRequest.bodyStreamAvailable) request.HTTPBodyStream = transportRequest.bodyStream; + else request.HTTPBody = transportRequest.body; + } + + request.allHTTPHeaderFields = transportRequest.headers; + + return request; +} + + +#pragma mark - Misc + +- (PNError *)errorForRequest:(PNTransportRequest *)request withURL:(NSURL *)requestUrl error:(NSError *)transportError { + PNError *error = nil; + + if (request.cancelled || transportError.code == NSURLErrorCancelled) { + NSMutableDictionary *userInfo = [PNErrorUserInfo(@"The request has been cancelled.", + @"Request explicitly has been cancelled.", + nil, + transportError) + mutableCopy]; + userInfo[NSURLErrorFailingURLErrorKey] = [requestUrl copy]; + error = [PNError errorWithDomain:PNTransportErrorDomain code:PNTransportErrorRequestCancelled userInfo:userInfo]; + } else if (transportError.code == NSURLErrorTimedOut) { + NSMutableDictionary *userInfo = [PNErrorUserInfo(@"The request time out.", + @"The server didn't respond with data in time.", + @"Check network status or change request timeout parameter.", + transportError) + mutableCopy]; + userInfo[NSURLErrorFailingURLErrorKey] = [requestUrl copy]; + error = [PNError errorWithDomain:PNTransportErrorDomain code:PNTransportErrorRequestTimeout userInfo:userInfo]; + } + + return error; +} + +#ifndef PUBNUB_DISABLE_LOGGER +- (void)printIfRequiredSessionCustomizationInformation { + PNLLogger *logger = self.configuration.logger; + + if ([NSURLSessionConfiguration pn_HTTPAdditionalHeaders].count) { + PNLogClientInfo(logger, @" Custom HTTP headers is set by user: %@", + [NSURLSessionConfiguration pn_HTTPAdditionalHeaders]); + } + + if ([NSURLSessionConfiguration pn_networkServiceType] != NSURLNetworkServiceTypeDefault) { + PNLogClientInfo(logger, @" Custom network service type is set by user: %@", + @([NSURLSessionConfiguration pn_networkServiceType])); + } + + if (![NSURLSessionConfiguration pn_allowsCellularAccess]) { + PNLogClientInfo(logger, @" User limited access to cellular data and only WiFi connection can " + "be used."); + } + + if ([NSURLSessionConfiguration pn_protocolClasses].count) { + PNLogClientInfo(logger, @" Extra requests handling protocols defined by user: %@", + [NSURLSessionConfiguration pn_protocolClasses]); + } + + if ([NSURLSessionConfiguration pn_connectionProxyDictionary].count) { + PNLogClientInfo(logger, @" Connection proxy has been set by user: %@", + [NSURLSessionConfiguration pn_connectionProxyDictionary]); + } +} +#endif // PUBNUB_DISABLE_LOGGER + +#pragma mark - + + +@end diff --git a/PubNub/Modules/Transport/PNURLSessionTransportResponse.h b/PubNub/Modules/Transport/PNURLSessionTransportResponse.h new file mode 100644 index 000000000..cc402fa31 --- /dev/null +++ b/PubNub/Modules/Transport/PNURLSessionTransportResponse.h @@ -0,0 +1,24 @@ +#import +#import + + +#pragma mark Interface declaration + +/// `NSURLSession`-based transport response module. +@interface PNURLSessionTransportResponse : NSObject + + +#pragma mark - Initialization and Configuration + +/// Create transport response object from `NSURLResponse`. +/// +/// - Parameters: +/// - response: Remote resource request response. +/// - data: Remote resource request response data. +/// - Returns: Initialized and ready to use transport response object. ++ (nonnull instancetype)responseWithNSURLResponse:(nullable NSURLResponse *)response data:(nullable NSData *)data; + +#pragma mark - + + +@end diff --git a/PubNub/Modules/Transport/PNURLSessionTransportResponse.m b/PubNub/Modules/Transport/PNURLSessionTransportResponse.m new file mode 100644 index 000000000..8571db431 --- /dev/null +++ b/PubNub/Modules/Transport/PNURLSessionTransportResponse.m @@ -0,0 +1,98 @@ +#import "PNURLSessionTransportResponse.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `NSURLSession`-based transport response module private extension. +@interface PNURLSessionTransportResponse () + + +#pragma mark - Properties + +/// Service response headers. +/// +/// > Important: Header names are in lowercase. +@property(strong, nullable, nonatomic) NSDictionary *headers; + +/// Remote resource request response. +@property(strong, nullable, nonatomic) NSHTTPURLResponse *response; + +/// Remote resource request response data. +@property(strong, nullable, nonatomic) NSData *data; + + +#pragma mark - Initialization and Configuration + +/// Initialize transport response object from `NSURLResponse`. +/// +/// - Parameters: +/// - response: Remote resource request response. +/// - data: Remote resource request response data. +/// - Returns: Initialized transport response object. +- (instancetype)initWithNSURLResponse:(nullable NSURLResponse *)response data:(nullable NSData *)data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNURLSessionTransportResponse + + +#pragma mark - Properties + +- (NSInputStream *)bodyStream { + return nil; +} + +- (BOOL)bodyStreamAvailable { + return NO; +} + +- (NSUInteger)statusCode { + return self.response.statusCode; +} + +- (NSString *)MIMEType { + return self.response.MIMEType; +} + +- (NSString *)url { + return self.response.URL.absoluteString; +} + +- (NSData *)body { + return self.data; +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)responseWithNSURLResponse:(NSURLResponse *)response data:(NSData *)data { + return [[self alloc] initWithNSURLResponse:response data:data]; +} + +- (instancetype)initWithNSURLResponse:(NSURLResponse *)response data:(NSData *)data { + if ((self = [super init])) { + _response = (NSHTTPURLResponse *)response; + _data = data; + + NSDictionary *responseHeaders = _response.allHeaderFields; + NSMutableDictionary *headers = [NSMutableDictionary dictionaryWithCapacity:responseHeaders.count]; + for (NSString *header in responseHeaders.allKeys) headers[header.lowercaseString] = responseHeaders[header]; + _headers = headers; + } + + return self; +} + +#pragma mark - + +@end diff --git a/PubNub/Network/PNNetwork.h b/PubNub/Network/PNNetwork.h deleted file mode 100644 index 757593492..000000000 --- a/PubNub/Network/PNNetwork.h +++ /dev/null @@ -1,131 +0,0 @@ -#import -#import "PNStructures.h" - - -#pragma mark Class forward - -@class PNRequestParameters, PubNub; - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Class which translate \b PubNub operations to request for \b PubNub network. - * - * @discussion Intermediate layer between \b PubNub client operations and networking which is used - * to send network request to \b PubNub service. - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNNetwork : NSObject - - -#pragma mark - Initialization and Configuration - -/** - * @brief Create and configure \b PubNub network manager with predefined options. - * - * @param client \b {PubNub} client for which this network manager will be created. - * @param timeout Maximum time which manager should wait for response on request. - * @param maximumConnections Maximum simultaneously connections (requests) which can be opened. - * @param longPollEnabled Whether \b PubNub network manager should be configured for long-poll - * requests or not. This option affect the way how network manager handle reset. - * - * @return Constructed and ready to use \b PubNub network manager. - */ -+ (instancetype)networkForClient:(PubNub *)client - requestTimeout:(NSTimeInterval)timeout - maximumConnections:(NSInteger)maximumConnections - longPoll:(BOOL)longPollEnabled; - - -#pragma mark - Request processing - -/** - * @brief Process passed operation using set of parameters. - * - * @discussion Translate client operation to actual request to \b PubNub network. - * - * @param operationType One of \b {operation PNOperationType} enumerator fields which describe what - * kind of operation should be executed by client. - * @param parameters Request parameters representation object. - * @param data Binary data which should be pushed to \b PubNub network along with request. - * @param block Depending on operation type it can be \b {result PNResultBlock}, - * \b {status PNStatusBlock} or \b {completion PNCompletionBlock} blocks.` - */ -- (void)processOperation:(PNOperationType)operationType - withParameters:(PNRequestParameters *)parameters - data:(nullable NSData *)data - completionBlock:(id)block; - -/** - * @brief Fetch list of active requests (filtered by API path prefix if passed) and cancel their - * processing. - * - * @param prefix String which represent specific API endpoint path prefix. If passed, all data tasks - * which is created against such API endpoint will be cancelled. - * - * @since 4.6.2 - */ -- (void)cancelAllOperationsWithURLPrefix:(nullable NSString *)prefix; - -/** - * @brief Invalidate network communication layer. - * - * @since 4.1.1 - */ -- (void)invalidate; - - -#pragma mark - Handlers - -#if TARGET_OS_IOS -/** - * @brief Handle \b {PubNub} client transition to inactive state. - * - * @discussion Depending from network manager configuration it may request from system more time to - * complete already scheduled data tasks. - * - * @since 4.5.0 - */ -- (void)handleClientWillResignActive; - -/** - * @brief Handle \b {PubNub} client transition to active state. - * - * @discussion If network manager requested from system more time to complete tasks processing it - * will cancel this request. - * - * @since 4.5.0 - */ -- (void)handleClientDidBecomeActive; - -#endif // TARGET_OS_IOS - - -#pragma mark - Operation information - -/** - * @brief Calculate actual size of packet for passed \c operationType which will be sent to - * \b PubNub network. - * - * @param operationType One of \b {operation PNOperationType} enum fields which specify for what - * kind of operation packet size should be calculated. - * @param parameters List of passed parameters which should be passed to URL builder. - * @param data Data which can be pushed along with request to \b PubNub network if required. - * - * @return Size of the packet which include request string, host, headers and HTTP post body. - */ -- (NSInteger)packetSizeForOperation:(PNOperationType)operationType - withParameters:(PNRequestParameters *)parameters - data:(NSData *)data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/PNNetwork.m b/PubNub/Network/PNNetwork.m deleted file mode 100644 index 605e6515b..000000000 --- a/PubNub/Network/PNNetwork.m +++ /dev/null @@ -1,1566 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNNetwork.h" -#import "NSURLSessionConfiguration+PNConfigurationPrivate.h" -#import "PNRequestRetryConfiguration+Private.h" -#import "PNNetworkResponseSerializer.h" -#import "PNOperationResult+Private.h" -#import "PNRequestParameters.h" -#import "PNPrivateStructures.h" -#import "PubNub+CorePrivate.h" -#import "PNStatus+Private.h" -#import "PNConfiguration.h" -#import "PNErrorStatus.h" -#import "PNErrorParser.h" -#import "PNURLBuilder.h" -#if TARGET_OS_IOS - #import -#endif // TARGET_OS_IOS -#import "PNConstants.h" -#import "PNLogMacro.h" -#import "PNHelpers.h" -#import "PNAPICallBuilder.h" - - -#pragma mark Types - -/** - * @brief Definition for block which is used as NSURLSessionDataTask completion handler (passed - * during task creation. - * - * @param data Actual raw data which has been received from \b PubNub service in response. - * @param response HTTP response instance which hold metadata about response. - * @param error Error instance in case of any processing issues. - * - * @since 4.0.2 - */ -typedef void(^NSURLSessionDataTaskCompletion)(NSData * _Nullable data, - NSURLResponse * _Nullable response, - NSError * _Nullable error); - -/** - * @brief Definition for block which is used by \b PubNub SDK to process successfully completed - * request with pre-processed response. - * - * @param task Reference on data load task which has been used to communicate with \b PubNub - * network. - * @param responseObject Serialized \b PubNub service response. - * - * @since 4.0.2 - */ -typedef void(^NSURLSessionDataTaskSuccess)(NSURLSessionDataTask * _Nullable task, - id _Nullable responseObject); - -/** - * @brief Definition for block which is used by \b PubNub SDK to process failed request. - * - * @param task Reference on data load task which has been used to communicate with \b PubNub - * network. - * @param error Reference on error instance in case of any processing issues. - * - * @since 4.0.2 - */ -typedef void(^NSURLSessionDataTaskFailure)(NSURLSessionDataTask * _Nullable task, - NSError * _Nullable error); - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - Protected interface declaration - -@interface PNNetwork () - - -#pragma mark - Information - -/** - * @brief Client for which this network manager provide functionality. - */ -@property (nonatomic, weak) PubNub *client; - -/** - * @brief Configuration which define network manager behavior. - */ -@property (nonatomic, strong) PNConfiguration *configuration; - -/** - * @brief Unique \b {PubNub} network manager instance identifier. - * - * @since 4.4.1 - */ -@property (nonatomic, copy) NSString *identifier; - -/** - * @brief Whether \b PubNub network manager configured for long-poll request processing or not. - * - * @discussion This property taken into account when manager need to invalidate underlying - * \a NSURLSession and dictate whether all scheduled requests should be completed or terminated. - */ -@property (nonatomic, assign) BOOL forLongPollRequests; - -/** - * @brief Session's request timeout interval. - * - * @since 4.0.2 - */ -@property (nonatomic, assign) NSTimeInterval requestTimeout; - -/** - * @brief Maximum simultaneous requests. - * - * @since 4.0.2 - */ -@property (nonatomic, assign) NSInteger maximumConnections; - -/** - * @brief Session which is used to send network requests. - * - * @since 4.0.2 - */ -@property (nonatomic, strong, nullable) NSURLSession *session; - -/** - * @brief Unique session identifier which is used by telemetry. - * - * @since 4.6.1 - */ -@property (nonatomic, copy) NSString *sessionIdentifier; - -/** - * @brief Data task completion block which should be used to notify caller about task completion. - * - * @discussion Used along with background session in application extension execution context. - * - * @since 4.5.4 - */ -@property (nonatomic, nullable, copy) NSURLSessionDataTaskCompletion previousDataTaskCompletionHandler; - -/** - * @brief Object which is able to store received service response. - * - * @discussion Used along with background session in application extension execution context. - * - * @since 4.5.4 - */ -@property (nonatomic, nullable, strong) NSMutableData *fetchedData; - -/** - * @brief Base URL which should be appended with resources path to perform network request. - * - * @since 4.0.2 - */ -@property (nonatomic, strong) NSURL *baseURL; - -/** - * @brief Serializer used to pre-process service responses. - * - * @since 4.0.2 - */ -@property (nonatomic, strong) PNNetworkResponseSerializer *serializer; - -/** - * @brief Set of key/value pairs which is used in API endpoint path and common for all endpoints. - * - * @since 4.5.4 - */ -@property (nonatomic, strong) NSDictionary *defaultPathComponents; - -/** - * @brief Set of key/value pairs which is used in API endpoint query and common for all endpoints. - * - * @since 4.5.4 - */ -@property (nonatomic, strong) NSDictionary *defaultQueryComponents; - -/** - * @brief List of headers which should be added to each request. - * - * @since 4.16.1 - */ -@property (nonatomic, nullable, copy) NSDictionary *HTTPAdditionalHeaders; - -/** - * @brief Default request caching policy (basing on current session settings). - * - * @since 4.16.1 - */ -@property (nonatomic, assign) NSURLRequestCachePolicy requestCachePolicy; - -#if PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE -/** - * @brief Linkage of scheduled data task and it's operation type. - * - * @discussion \a NSURLSession metrics arrive through callbacks and there is no information about - * type of operation which has been processed by task. This map allow to link tasks to API operation - * type. - * - @since 4.6.2 - */ -@property (nonatomic, strong) NSMutableDictionary *dataTaskToOperationMap; -#endif - -/** - * @brief Whether system version for which client is running doesn't support native metrics - * information gathering or not. - * - * @since 4.7.5 - */ -@property (nonatomic, assign, getter = isMetricsNotSupportByOS) BOOL metricsNotSupportedByOS; - -#if TARGET_OS_IOS - -/** - * @brief Stores reference on list of currently scheduled data tasks. - * - * @discussion List allow to get information about active data task synchronously at any moment - * (when \a NSURLSession allow to get this information only from block which will be scheduled on - * processing queue). - * - * @since 4.5.0 - */ -@property (nonatomic, nullable, strong) NSMutableArray *scheduledDataTasks; - -/** - * @brief Identifier which has been used to request from system more time to complete pending tasks - * when client resign active. - * - * @since 4.5.0 - */ -@property (nonatomic, assign) UIBackgroundTaskIdentifier tasksCompletionIdentifier; - -#endif // TARGET_OS_IOS - -/** - * @brief Queue which should be used by session to call callbacks and completion blocks on - * \b {PNNetwork} instance. - * - * @since 4.0.2 - */ -@property (nonatomic, strong) NSOperationQueue *delegateQueue; - -/** - * @brief Queue which is used to call \b {PNNetwork} response processing on another queue. - * - * @discussion Response processing involves data parsing which is most time consuming - * operation. Dispatching response processing on side queue allow to keep requests sending - * unaffected by processing delays. - * - * @since 4.0.2 - */ -@property (nonatomic, strong) dispatch_queue_t processingQueue; - -/** - * @brief pthread mutex is used to protect access to session instance which can be changed at any - * moment (invalidated instances can't be used and SDK should instantiate new instance). - * - * @since 4.16.1 - */ -@property (nonatomic, assign) pthread_mutex_t lock; - - -#pragma mark - Initialization and Configuration - -/** - * @brief Initialize \b PubNub network manager with predefined options. - * - * @param client Client for which this network manager is creating. - * @param timeout Maximum time which manager should wait for response on request. - * @param maximumConnections Maximum simultaneously connections (requests) which can be opened. - * @param longPollEnabled Whether \b PubNub network manager should be configured for long-poll - * requests or not. This option affect the way how network manager handle reset. - * - * @since Initialized and ready to use \b PubNub network manager. - */ -- (instancetype)initForClient:(PubNub *)client - requestTimeout:(NSTimeInterval)timeout - maximumConnections:(NSInteger)maximumConnections - longPoll:(BOOL)longPollEnabled; - - -#pragma mark - Request helper - -/** - * @brief Append additional parameters general for all requests. - * - * @param parameters Parameters which should be updated with required set of parameters. - */ -- (void)appendRequiredParametersTo:(PNRequestParameters *)parameters; - -/** - * @brief Construct URL request suitable to send POST request (if required). - * - * @param requestURL Reference on complete remote resource URL which should be used for request. - * @param method Reference on string with HTTP method which should be used to send request. - * @param postData Reference on data which should be sent as POST body (if passed). - * @param isDataCompressed Whether POST body has been compressed or not. - * - * @return Constructed and ready to use request object. - */ -- (NSURLRequest *)requestWithURL:(NSURL *)requestURL - method:(NSString *)method - data:(NSData *)postData - compressed:(BOOL)isDataCompressed; - -/** - * @brief Construct data task which should be used to process provided request. - * - * @param request Request which should be issued with data task to NSURL session. - * @param operationType One of \b {operation PNOperationType} enumerator fields which describe what - * kind of operation will be performed by passed \c request. - * @param success Data task success handling block which will be called by network manager. - * @param failure Data task processing failure handling block which will be called by network - * manager. - * - * @return Constructed and ready to use data task. - */ -- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request - forOperation:(PNOperationType)operationType - success:(NSURLSessionDataTaskSuccess)success - failure:(NSURLSessionDataTaskFailure)failure; - - -#pragma mark - Request processing - -/** - * @brief Check whether specified operation is expecting result object or not. - * - * @param operation Operation type against which check should be performed. - * - * @return \c YES in case if this type of operation is expecting to receive in result object. - */ -- (BOOL)operationExpectResult:(PNOperationType)operation; - -/** - * @brief Retrieve parser class which can be used to process received data for \c operation - * - * @param operation Operation type for which suitable parser should be found. - * - * @return Parser class which conforms to \b {PNParser} protocol. - */ -- (nullable Class )parserForOperation:(PNOperationType)operation; - -/** - * @brief Retrieve class which can be used to represent request processing results. - * - * @param operation Type of operation which is expecting response from \b PubNub network. - * - * @return Target class which should be used instead of \b {PNResult} (if non will be found - * \b {PNResult}). - */ -- (Class)resultClassForOperation:(PNOperationType)operation; - -/** - * @brief Retrieve class which can be used to represent request processing status. - * - * @param operation Type of operation which is expecting status from \b PubNub network. - * - * @return Target class which should be used instead of \b {PNStatus} (if non will be found - * \b {PNStatus}). - */ -- (Class)statusClassForOperation:(PNOperationType)operation; - -/// Process passed operation using set of parameters. -/// -/// Translate client operation to actual request to \b PubNub network. -/// -/// - Parameters: -/// - operationType: One of `PNOperationType` enumerator fields which describe what kind of operation should be -/// executed by client. -/// - parameters: Request parameters representation object. -/// - retryAttempt: Current request retry attempt. -/// - data: Binary data which should be pushed to **PubNub** network along with request. -/// - block: Depending on operation type it can be `PNResultBlock`, `PNStatusBlock` or `PNCompletionBlock` blocks. -/// - Since: 5.3.0 -- (void)processOperation:(PNOperationType)operationType - withParameters:(PNRequestParameters *)parameters - data:(nullable NSData *)data - retryAttempt:(NSUInteger)retryAttempt - completionBlock:(id)block; - -/** - * @brief Try process \c data using parser suitable for operation for which data has been received. - * - * @param data Data which has been received from \b PubNub network in response for operation. - * @param task Task which provided \c data for processing. - * @param parser Class which should be used to parse data. - * @param block Block which should be called back at the end of parsing process. - */ -- (void)parseData:(nullable id)data - fromDataTask:(NSURLSessionDataTask *)task - withParser:(Class )parser - completion:(void(^)(NSDictionary * _Nullable parsedData, BOOL parseError))block; - -#if TARGET_OS_IOS - -/** - * @brief Complete processing of tasks which has been scheduled but not completely processed before - * \b PubNub client resign active state. - * - * @param dataTasks List of \a NSURLSession data tasks which didn't completed before \b {PubNub} - * client resign active state. - * @param onCompletion Whether list processed after another data task completed or right \b {PubNub} - * after client resign active state. - */ -- (void)processIncompleteBeforeClientResignActiveTasks:(NSArray *)dataTasks - onDataTaskCompletion:(BOOL)onCompletion; - -#endif // TARGET_OS_IOS - - -#pragma mark - Session constructor - -/** - * @brief Complete \a NSURLSession instantiation and configuration. - * - * @param timeout Maximum time which manager should wait for response on request. - * @param maximumConnections Maximum simultaneously connections (requests) which can be opened. - */ -- (void)prepareSessionWithRequestTimeout:(NSTimeInterval)timeout - maximumConnections:(NSInteger)maximumConnections; - -/** - * @brief Construct base \a NSURL session configuration. - * - * @param timeout Maximum time which manager should wait for response on request. - * @param maximumConnections Maximum simultaneously connections (requests) which can be opened. - * - * @return Constructed and ready to use session configuration. - */ -- (NSURLSessionConfiguration *)configurationWithRequestTimeout:(NSTimeInterval)timeout - maximumConnections:(NSInteger)maximumConnections; - -/** - * @brief Construct queue on which session will call delegate callbacks and completion blocks. - * - * @param configuration Session configuration which should be used to complete queue configuration. - * - * @return Initialized and ready to use operation queue. - * - * @since 4.0.2 - */ -- (NSOperationQueue *)operationQueueWithConfiguration:(NSURLSessionConfiguration *)configuration; - -/** - * @brief Construct \a NSURL session manager used to communicate with \b PubNub network. - * - * @param configuration Complete configuration which should be applied to \a NSURL session. - * - * @return Constructed and ready to use \a NSURL session manager instance. - */ -- (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration; - -/** - * @brief Allow to construct base URL basing on network configuration. - * - * @return Ready to use service URL. - * - * @since 4.0.2 - */ -- (NSURL *)requestBaseURL; - - -#pragma mark - Handlers - -/** - * @brief Serialize service response or handle error. - * - * @discussion Depending on received metadata and data code will call passed success or failure - * blocks after serialization process completion on secondary queue. - * - * @param data RAW data received from service. - * @param task Data task which has been used to communicate with \b PubNub network. - * @param requestError Data / request processing error. - * @param success Data task success handling block which will be called by network manager. - * @param failure Data task processing failure handling block which will be called by network - * manager. - */ -- (void)handleData:(nullable NSData *)data - loadedWithTask:(nullable NSURLSessionDataTask *)task - error:(nullable NSError *)requestError - usingSuccess:(NSURLSessionDataTaskSuccess)success - failure:(NSURLSessionDataTaskFailure)failure; - -/** - * @brief Handle successful operation processing completion. - * - * @discussion Called when request for \b PubNub network successfully completed processing. - * - * @param operation Operation type for which actual network request has been sent to \b PubNub - * network. - * @param task Data task which has been used to deliver operation to \b PubNub network. - * @param responseObject Reference on pre-processed \b PubNub network response (de-serialized JSON). - * @param block Depending on operation type it can be \b {PNResultBlock}, \b {PNStatusBlock} or - * \b {PNCompletionBlock} blocks. - */ -- (void)handleOperation:(PNOperationType)operation - taskDidComplete:(nullable NSURLSessionDataTask *)task - withData:(nullable id)responseObject - completionBlock:(id)block; - -/** - * @brief Handle operation failure. - * - * @discussion Called when request for \b PubNub network did fail to process or service respond with - * error. - * - * @param operation Operation type for which actual network request has been sent to \b PubNub - * network. - * @param task Data task which has been used to deliver operation to \b PubNub network. - * @param error \a NSError which describe what exactly went wrong during operation processing. - * @param block Depending on operation type it can be \b {PNResultBlock}, \b {PNStatusBlock} or - * \b {PNCompletionBlock} blocks. - */ -- (void)handleOperation:(PNOperationType)operation - taskDidFail:(nullable NSURLSessionDataTask *)task - withError:(nullable NSError *)error - completionBlock:(id)block; - -/** - * @brief Pre-processed service response handler. - * - * @discussion This method actually build result and status objects basing on pre-processed service - * response. - * - * @param data Pre-processed data, using parser. - * @param task Data task which has been used to communicate with \b PubNub network. - * @param operation One of \b {operation PNOperationType} enum fields which clarify what kind of - * request has been done to \b PubNub network and for which response has been processed. - * @param isError Whether pre-processed data represent error or not. - * @param error Data / request processing error. - * @param block Block which should be called at the end of pre-processed data wrapping into objects. - */ -- (void)handleParsedData:(nullable NSDictionary *)data - loadedWithTask:(nullable NSURLSessionDataTask *)task - forOperation:(PNOperationType)operation - parsedAsError:(BOOL)isError - processingError:(nullable NSError *)error - completionBlock:(id)block; - -/** - * @brief Used to handle prepared objects and pass them to the code. - * - * @param operation One of \b {operation PNOperationType} enum fields which clarify for what kind of - * operation objects has been created. - * @param result Object which stores useful server response. - * @param status Request processing result (can be error or ACK response). - * @param block Block which should be called at the end of pre-processed data wrapping into objects. - */ -- (void)handleOperation:(PNOperationType)operation - processingCompletedWithResult:(nullable PNOperationResult *)result - status:(nullable PNStatus *)status - completionBlock:(id)block; - - -#pragma mark - Misc - -#if TARGET_OS_IOS - -/** - * @brief Check whether there \c operation is in the list of passed \c tasks. - * - * @param operation One of \b {operation PNOperationType} enum fields which is used during search. - * @param tasks List of currently scheduled and pending / executing data tasks among which should be - * found reference on \c operation. - * - * @return \c YES in case if \c operation has been found in list of passed \c tasks. - * - * @since 4.5.0 - */ -- (BOOL)hasOperation:(PNOperationType)operation - inDataTasks:(NSArray *)tasks; - -/** - * @brief Depending on current network manager state it may require to complete currently active - * tasks completion from background execution context. - * - * @since 4.5.0 - */ -- (void)endBackgroundTasksCompletionIfRequired; - -#endif // TARGET_OS_IOS - -#if PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE -/** - * @brief Compose string with important request metrics. - * - * @param transaction Object which contain useful metrics which can be used in debug purposes. - * @param isRedirection Whether metrics data has been provided for non-original request. - * - * @return String with request metrics which can be printed into PubNub's log file / Xcode console. - * - * @since 4.5.13 - */ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpartial-availability" -- (NSMutableString *)formattedMetricsDataFrom:(NSURLSessionTaskTransactionMetrics *)transaction - redirection:(BOOL)isRedirection; -#pragma clang diagnostic pop -#endif - -/** - * @brief Print out any session configuration instance customizations which has been done by - * developer. - * - * @since 4.4.0 - */ -- (void)printIfRequiredSessionCustomizationInformation; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNNetwork - - -#pragma mark - Initialization and Configuration - -+ (instancetype)networkForClient:(PubNub *)client - requestTimeout:(NSTimeInterval)timeout - maximumConnections:(NSInteger)maximumConnections - longPoll:(BOOL)longPollEnabled { - - return [[self alloc] initForClient:client - requestTimeout:timeout - maximumConnections:maximumConnections - longPoll:longPollEnabled]; -} - -- (instancetype)initForClient:(PubNub *)client - requestTimeout:(NSTimeInterval)timeout - maximumConnections:(NSInteger)maximumConnections - longPoll:(BOOL)longPollEnabled { - - if ((self = [super init])) { - _client = client; - NSString *metricsMinVersion = PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE_SINCE; - _metricsNotSupportedByOS = pn_operating_system_version_is_lower_than(metricsMinVersion); - _configuration = client.configuration; - _forLongPollRequests = longPollEnabled; -#if TARGET_OS_IOS - _tasksCompletionIdentifier = UIBackgroundTaskInvalid; - _scheduledDataTasks = [NSMutableArray new]; -#endif // TARGET_OS_IOS - _identifier = [[NSString stringWithFormat:@"com.pubnub.network.%p", self] copy]; - _processingQueue = dispatch_queue_create([_identifier UTF8String], DISPATCH_QUEUE_CONCURRENT); - - if (@available(macOS 10.10, iOS 8.0, *)) { - if (_configuration.applicationExtensionSharedGroupIdentifier) { - _processingQueue = dispatch_get_main_queue(); - } - } - -#if PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE - _dataTaskToOperationMap = [NSMutableDictionary new]; -#endif // PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE - _serializer = [PNNetworkResponseSerializer new]; - _baseURL = [self requestBaseURL]; - pthread_mutex_init(&_lock, nil); - -#ifndef PUBNUB_DISABLE_LOGGER - [_client.logger enableLogLevel:(PNRequestLogLevel | PNInfoLogLevel)]; -#endif // PUBNUB_DISABLE_LOGGER - _defaultQueryComponents = [client.defaultQueryComponents copy]; - _defaultPathComponents = [client.defaultPathComponents copy]; - [self prepareSessionWithRequestTimeout:timeout maximumConnections:maximumConnections]; - } - - return self; -} - - -#pragma mark - Request helper - -- (void)appendRequiredParametersTo:(PNRequestParameters *)parameters { - [parameters addPathComponents:self.defaultPathComponents]; - [parameters addQueryParameters:self.defaultQueryComponents]; - - if (parameters.shouldIncludeTelemetry) { - [parameters addQueryParameters:[self.client.telemetryManager operationsLatencyForRequest]]; - } - - [parameters addQueryParameter:[NSUUID UUID].UUIDString forFieldName:@"requestid"]; -} - -- (NSURLRequest *)requestWithURL:(NSURL *)requestURL - method:(NSString *)method - data:(NSData *)postData - compressed:(BOOL)isDataCompressed { - - NSURL *fullURL = [NSURL URLWithString:requestURL.absoluteString relativeToURL:self.baseURL]; - NSMutableURLRequest *httpRequest = [NSMutableURLRequest requestWithURL:fullURL]; - httpRequest.HTTPMethod = method; - httpRequest.allHTTPHeaderFields = self.HTTPAdditionalHeaders; - httpRequest.cachePolicy = self.requestCachePolicy; - - if (postData) { - NSMutableDictionary *allHeaders = [httpRequest.allHTTPHeaderFields mutableCopy]; - [allHeaders addEntriesFromDictionary: @{ - @"Content-Type": @"application/json;charset=UTF-8", - @"Content-Length": @(postData.length).stringValue - }]; - - if (isDataCompressed) { - allHeaders[@"Content-Encoding"] = @"gzip"; - } - - httpRequest.allHTTPHeaderFields = allHeaders; - [httpRequest setHTTPBody:postData]; - } - - return [httpRequest copy]; -} - -- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request - forOperation:(PNOperationType)operationType - success:(NSURLSessionDataTaskSuccess)success - failure:(NSURLSessionDataTaskFailure)failure { - - NSString *sessionIdentifier = self.sessionIdentifier; - NSURLSessionDataTaskCompletion handler = nil; - __block NSURLSessionDataTask *task = nil; - __weak __typeof(self) weakSelf = self; - BOOL isApplicationExtension = NO; - - handler = ^(NSData *data, NSURLResponse *response, NSError *error) { - if (self.isMetricsNotSupportByOS) { - NSString *taskIdentifier = @(task.taskIdentifier).stringValue; - NSString *identifier = [sessionIdentifier stringByAppendingString:taskIdentifier]; - - [weakSelf.client.telemetryManager stopLatencyMeasureFor:operationType withIdentifier:identifier]; - } - - [weakSelf handleData:data - loadedWithTask:task - error:(error ?: task.error) - usingSuccess:success - failure:failure]; - }; - - if (@available(macOS 10.10, iOS 8.0, *)) { - isApplicationExtension = self->_configuration.applicationExtensionSharedGroupIdentifier != nil; - } - - pn_lock(&_lock, ^{ - if (isApplicationExtension) { - self.previousDataTaskCompletionHandler = handler; - self.fetchedData = [NSMutableData new]; - task = [self.session dataTaskWithRequest:request]; - } else { - task = [self.session dataTaskWithRequest:request completionHandler:[handler copy]]; - } - -#if TARGET_OS_IOS - if (self.configuration.applicationExtensionSharedGroupIdentifier == nil && - self.configuration.shouldCompleteRequestsBeforeSuspension) { - - [self.scheduledDataTasks addObject:task]; - } -#endif // TARGET_OS_IOS - }); - - return task; -} - - -#pragma mark - Request processing - -- (BOOL)operationExpectResult:(PNOperationType)operation { - static NSArray *_resultExpectingOperations; - static dispatch_once_t onceToken; - - dispatch_once(&onceToken, ^{ - _resultExpectingOperations = @[ - @(PNHistoryOperation), @(PNHistoryForChannelsOperation), - @(PNHistoryWithActionsOperation), @(PNMessageCountOperation), - @(PNWhereNowOperation), @(PNHereNowGlobalOperation), - @(PNHereNowForChannelOperation), @(PNHereNowForChannelGroupOperation), - @(PNGetStateOperation), @(PNStateForChannelOperation), - @(PNStateForChannelGroupOperation), @(PNChannelGroupsOperation), - @(PNChannelsForGroupOperation), @(PNPushNotificationEnabledChannelsOperation), - @(PNPushNotificationEnabledChannelsV2Operation), @(PNTimeOperation), - @(PNFetchMessagesActionsOperation), @(PNFetchMembershipsOperation), - @(PNFetchChannelMetadataOperation), @(PNFetchAllChannelsMetadataOperation), - @(PNFetchUUIDMetadataOperation), @(PNFetchAllUUIDMetadataOperation), - @(PNFetchChannelMembersOperation), @(PNListFilesOperation) - ]; - }); - - return [_resultExpectingOperations containsObject:@(operation)]; -} - -- (Class )parserForOperation:(PNOperationType)operation { - static NSDictionary *_parsers; - static dispatch_once_t onceToken; - - dispatch_once(&onceToken, ^{ - NSArray *parserNames = @[ - @"PNChannelGroupAuditionParser", @"PNChannelGroupModificationParser", - @"PNClientStateParser", @"PNErrorParser", @"PNHeartbeatParser", @"PNHistoryParser", - @"PNMessageCountParser", @"PNMessageDeleteParser", @"PNLeaveParser", - @"PNMessagePublishParser", @"PNPresenceHereNowParser", @"PNPresenceWhereNowParser", - @"PNPushNotificationsAuditParser", @"PNPushNotificationsStateModificationParser", - @"PNSubscribeParser",@"PNTimeParser", @"PNChannelMetadataChangeParser", - @"PNUUIDMetadataChangeParser", @"PNObjectsRemoveParser", @"PNMembershipsParser", - @"PNFetchChannelsMetadataParser", @"PNFetchUUIDMetadataParser", @"PNChannelMembersParser", - @"PNAddMessageActionParser", @"PNRemoveMessageActionParser", - @"PNFetchMessagesActionsParser", @"PNGenerateFileUploadURLParser", - @"PNDeleteFileParser", @"PNListFilesParser"]; - NSMutableDictionary *parsers = [NSMutableDictionary new]; - - for (NSString *className in parserNames) { - Class class = NSClassFromString(className); - NSArray *operations = [class operations]; - - for (NSNumber *operationType in operations) { - parsers[operationType] = class; - } - } - - _parsers = [parsers copy]; - }); - - return _parsers[@(operation)]; -} - -- (Class)resultClassForOperation:(PNOperationType)operation { - Class class = [PNOperationResult class]; - - if (PNOperationResultClasses[operation]) { - class = NSClassFromString(PNOperationResultClasses[operation]); - } - - return class; -} - -- (Class)statusClassForOperation:(PNOperationType)operation { - Class class = [PNStatus class]; - - if (PNOperationStatusClasses[operation]) { - class = NSClassFromString(PNOperationStatusClasses[operation]); - } - - return class; -} - -- (void)processOperation:(PNOperationType)operationType - withParameters:(PNRequestParameters *)parameters - data:(NSData *)data - completionBlock:(id)block { - [self processOperation:operationType withParameters:parameters data:data retryAttempt:0 completionBlock:block]; -} - -- (void)processOperation:(PNOperationType)operationType - withParameters:(PNRequestParameters *)parameters - data:(nullable NSData *)data - retryAttempt:(NSUInteger)retryAttempt - completionBlock:(id)block { - [self appendRequiredParametersTo:parameters]; - NSURL *requestURL = [PNURLBuilder URLForOperation:operationType withParameters:parameters]; - - if (requestURL) { - PNLogRequest(self.client.logger, @" %@ %@", parameters.HTTPMethod, requestURL.absoluteString); - - __weak __typeof(self) weakSelf = self; - NSURLRequest *request = [self requestWithURL:requestURL - method:parameters.HTTPMethod - data:data - compressed:parameters.isPOSTBodyCompressed]; - NSURLSessionDataTask *task = [self dataTaskWithRequest:request - forOperation:operationType - success:^(NSURLSessionDataTask *completedTask, id response) { - [weakSelf handleOperation:operationType - taskDidComplete:completedTask - withData:response - completionBlock:block]; - } - failure:^(NSURLSessionDataTask *failedTask, id error) { - PNRequestRetryConfiguration *retry = weakSelf.configuration.requestRetry; - NSTimeInterval delay = [retry retryDelayForFailedRequest:request - withResponse:failedTask.response - retryAttempt:retryAttempt + 1]; - - if (delay > 0.f) { - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), - dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - [weakSelf processOperation:operationType - withParameters:parameters - data:data - retryAttempt:retryAttempt + 1 - completionBlock:block]; - }); - } else { - [weakSelf handleOperation:operationType - taskDidFail:failedTask - withError:error - completionBlock:block]; - } - }]; - - NSString *taskIdentifier = @(task.taskIdentifier).stringValue; - NSString *identifier = [self.sessionIdentifier stringByAppendingString:taskIdentifier]; - - if (self.isMetricsNotSupportByOS) { - [self.client.telemetryManager startLatencyMeasureFor:operationType - withIdentifier:identifier]; - } else { -#if PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE - pn_lock(&_lock, ^{ - self.dataTaskToOperationMap[identifier] = @(operationType); - }); -#endif - } - - [task resume]; - } else { - PNErrorStatus *badRequestStatus = [PNErrorStatus statusForOperation:operationType - category:PNBadRequestCategory - withProcessingError:nil]; - [self.client appendClientInformation:badRequestStatus]; - - if (block) { - if ([self operationExpectResult:operationType]) { - ((PNCompletionBlock)block)(nil, badRequestStatus); - } else { - ((PNStatusBlock)block)(badRequestStatus); - } - } - } -} - -- (void)parseData:(id)data - fromDataTask:(NSURLSessionDataTask *)task - withParser:(Class )parser - completion:(void(^)(NSDictionary *parsedData, BOOL parseError))block { - - __weak __typeof(self) weakSelf = self; - void(^parseCompletion)(NSDictionary *) = ^(NSDictionary *processedData){ - if (processedData || parser == [PNErrorParser class]) { - block(processedData, (parser == [PNErrorParser class])); - } else { - [weakSelf parseData:data - fromDataTask:task - withParser:[PNErrorParser class] - completion:[block copy]]; - } - }; - - if (![parser requireAdditionalData]) { - parseCompletion(data ? [parser parsedServiceResponse:data] : nil); - } else { - NSMutableDictionary *additionalData = [NSMutableDictionary new]; - additionalData[@"url"] = task.response.URL ?: task.currentRequest.URL; - - if (self.configuration.cryptoModule) additionalData[@"cryptoModule"] = self.configuration.cryptoModule; - - /** - * If additional data required client should assume what potentially additional calculations - * may be required and should temporarily shift to background queue. - */ - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - NSDictionary *parsedData = [parser parsedServiceResponse:data withData:additionalData]; - - pn_dispatch_async(self.processingQueue, ^{ - parseCompletion(parsedData); - }); - }); - } -} - -#if TARGET_OS_IOS - -- (void)processIncompleteBeforeClientResignActiveTasks:(NSArray *)dataTasks - onDataTaskCompletion:(BOOL)onCompletion { - - NSUInteger incompleteTasksCount = dataTasks.count; - - if (incompleteTasksCount > 0 && self.forLongPollRequests) { - if (![self hasOperation:PNUnsubscribeOperation inDataTasks:dataTasks]) { - incompleteTasksCount = 0; - } - } - - if (incompleteTasksCount == 0) { - PNLogRequest(self.client.logger, @" All tasks completed. There is no need " - "in additional execution time in background context."); - [self endBackgroundTasksCompletionIfRequired]; - } else if (!onCompletion) { - PNLogRequest(self.client.logger, @" There is %lu incomplete tasks. " - "Required additional execution time in background context.", - (unsigned long)incompleteTasksCount); - } -} -#endif // TARGET_OS_IOS - -- (void)cancelAllOperationsWithURLPrefix:(NSString *)prefix { -#if TARGET_OS_IOS - if (self.configuration.applicationExtensionSharedGroupIdentifier == nil && - self.configuration.shouldCompleteRequestsBeforeSuspension) { - - pn_lock(&_lock, ^{ - [self.scheduledDataTasks removeAllObjects]; - }); - } -#endif // TARGET_OS_IOS - - pn_lock_async(&_lock, ^(dispatch_block_t complete) { - [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, - NSArray *downloadTasks) { - - if (prefix) { - for (NSURLSessionDataTask *dataTask in dataTasks) { - if ([dataTask.originalRequest.URL.path hasPrefix:prefix]) { - [dataTask cancel]; - } - } - } else { - [dataTasks makeObjectsPerformSelector:@selector(cancel)]; - } - - complete(); - }]; - }); -} - -- (void)invalidate { - pn_lock(&_lock, ^{ - [self->_session invalidateAndCancel]; - self->_session = nil; - }); -} - - -#pragma mark - Operation information - -- (NSInteger)packetSizeForOperation:(PNOperationType)operationType - withParameters:(PNRequestParameters *)parameters - data:(NSData *)data { - - NSInteger size = -1; - [self appendRequiredParametersTo:parameters]; - NSURL *requestURL = [PNURLBuilder URLForOperation:operationType withParameters:parameters]; - - if (requestURL) { - NSURLRequest *request = [self requestWithURL:requestURL - method:parameters.HTTPMethod - data:data - compressed:parameters.isPOSTBodyCompressed]; - size = [PNURLRequest packetSizeForRequest:request]; - } - - return size; -} - - -#pragma mark - Session constructor - -- (void)prepareSessionWithRequestTimeout:(NSTimeInterval)timeout - maximumConnections:(NSInteger)maximumConnections { - - _requestTimeout = timeout; - _maximumConnections = maximumConnections; - NSURLSessionConfiguration *config = [self configurationWithRequestTimeout:timeout - maximumConnections:maximumConnections]; - _delegateQueue = [self operationQueueWithConfiguration:config]; - _session = [self sessionWithConfiguration:config]; - _sessionIdentifier = [[NSUUID UUID] UUIDString]; - - _HTTPAdditionalHeaders = [_session.configuration.HTTPAdditionalHeaders copy]; - _requestCachePolicy = _session.configuration.requestCachePolicy; - - [self printIfRequiredSessionCustomizationInformation]; -} - -- (NSURLSessionConfiguration *)configurationWithRequestTimeout:(NSTimeInterval)timeout - maximumConnections:(NSInteger)maximumConnections { - - NSURLSessionConfiguration *configuration = nil; - configuration = [NSURLSessionConfiguration pn_ephemeralSessionConfigurationWithIdentifier:self.identifier]; - - if (@available(macOS 10.10, iOS 8.0, *)) { - if (self.configuration.applicationExtensionSharedGroupIdentifier) { - configuration = [NSURLSessionConfiguration pn_backgroundSessionConfigurationWithIdentifier:self.identifier]; - configuration.sharedContainerIdentifier = _configuration.applicationExtensionSharedGroupIdentifier; - } - } - - configuration.timeoutIntervalForRequest = timeout; - configuration.HTTPMaximumConnectionsPerHost = maximumConnections; - - return configuration; -} - -- (NSOperationQueue *)operationQueueWithConfiguration:(NSURLSessionConfiguration *)configuration { - NSOperationQueue *queue = [NSOperationQueue new]; - queue.maxConcurrentOperationCount = configuration.HTTPMaximumConnectionsPerHost; - - return queue; -} - -- (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration { - return [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:_delegateQueue]; -} - -- (NSURL *)requestBaseURL { - return [NSURL URLWithString:[NSString stringWithFormat:@"http%@://%@", - (_configuration.TLSEnabled ? @"s" : @""), _configuration.origin]]; -} - - -#pragma mark - Handlers - -#if TARGET_OS_IOS -- (void)handleClientWillResignActive { - if (self.configuration.applicationExtensionSharedGroupIdentifier == nil) { - UIApplication *application = [UIApplication performSelector:NSSelectorFromString(@"sharedApplication")]; - __block BOOL backgroundTaskStarted = NO; - - if (self.tasksCompletionIdentifier == UIBackgroundTaskInvalid) { - __weak __typeof__(self) weakSelf = self; - backgroundTaskStarted = YES; - - self.tasksCompletionIdentifier = [application beginBackgroundTaskWithExpirationHandler:^{ - [weakSelf endBackgroundTasksCompletionIfRequired]; - }]; - } - - if (backgroundTaskStarted) { - PNWeakify(self); - - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3f * NSEC_PER_SEC)), - dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - PNStrongify(self); - - if (self.tasksCompletionIdentifier != UIBackgroundTaskInvalid) { - __block NSArray *scheduledDataTasks; - - pn_lock(&self->_lock, ^{ - scheduledDataTasks = [self.scheduledDataTasks copy]; - }); - - [self processIncompleteBeforeClientResignActiveTasks:scheduledDataTasks - onDataTaskCompletion:NO]; - } - }); - } - } -} - -- (void)handleClientDidBecomeActive { - [self endBackgroundTasksCompletionIfRequired]; -} - -#endif // TARGET_OS_IOS - - --(void)URLSession:(NSURLSession *)session didBecomeInvalidWithError:(NSError *)error { - if (error) { -#if TARGET_OS_IOS - if (self.configuration.applicationExtensionSharedGroupIdentifier == nil && - self.configuration.shouldCompleteRequestsBeforeSuspension) { - - self.scheduledDataTasks = nil; - } -#endif // TARGET_OS_IOS - - pn_lock(&_lock, ^{ - [self prepareSessionWithRequestTimeout:self.requestTimeout - maximumConnections:self.maximumConnections]; -#if TARGET_OS_IOS - self.scheduledDataTasks = [NSMutableArray new]; -#endif // TARGET_OS_IOS - }); - } -} - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task - didCompleteWithError:(NSError *)error { - - BOOL isApplicationExtension = NO; - BOOL isBackgroundProcessingError = NO; - - if (@available(macOS 10.10, iOS 8.0, *)) { - isApplicationExtension = self.configuration.applicationExtensionSharedGroupIdentifier != nil; - isBackgroundProcessingError = (error && [error.domain isEqualToString:NSURLErrorDomain] && - error.code == NSURLErrorBackgroundSessionRequiresSharedContainer); - } - - if (isApplicationExtension || isBackgroundProcessingError) { - if (isBackgroundProcessingError) { - NSString *message = [NSString stringWithFormat:@" NSURLSession " - "activity in the background requires you to set " - "`applicationExtensionSharedGroupIdentifier` in PNConfiguration."]; - - [self.client.logger log:0 message:message]; - } - - if (self.previousDataTaskCompletionHandler) { - NSData *fetchedData = [self.fetchedData copy]; - self.fetchedData = nil; - - dispatch_async(dispatch_get_main_queue(), ^{ - self.previousDataTaskCompletionHandler(fetchedData, task.response, error); - }); - } - } -} - -- (void)URLSession:(NSURLSession *)__unused session - dataTask:(NSURLSessionDataTask *)__unused dataTask - didReceiveData:(NSData *)data { - - if (@available(macOS 10.10, iOS 8.0, *)) { - if (self.configuration.applicationExtensionSharedGroupIdentifier != nil && data.length) { - [self.fetchedData appendData:data]; - } - } -} - -- (void)handleData:(NSData *)data - loadedWithTask:(NSURLSessionDataTask *)task - error:(NSError *)requestError - usingSuccess:(NSURLSessionDataTaskSuccess)success - failure:(NSURLSessionDataTaskFailure)failure { - - dispatch_async(self.processingQueue, ^{ - NSError *serializationError = nil; - id processedObject = [self.serializer serializedResponse:(NSHTTPURLResponse *)task.response - withData:data - error:&serializationError]; - NSError *error = requestError ?: serializationError; - - (!error ? success : failure)(task, (error ?: processedObject)); - }); -} - -- (void)handleOperation:(PNOperationType)operation - taskDidComplete:(NSURLSessionDataTask *)task - withData:(id)responseObject - completionBlock:(id)block { - - __weak __typeof(self) weakSelf = self; - - [self parseData:responseObject - fromDataTask:task - withParser:[self parserForOperation:operation] - completion:^(NSDictionary *parsedData, BOOL parseError) { - - [weakSelf handleParsedData:parsedData - loadedWithTask:task - forOperation:operation - parsedAsError:parseError - processingError:task.error - completionBlock:[block copy]]; - }]; -} - -- (void)handleOperation:(PNOperationType)operation - taskDidFail:(NSURLSessionDataTask *)task - withError:(NSError *)error - completionBlock:(id)block { - - if (error.code == NSURLErrorCancelled) { - [self handleOperation:operation taskDidComplete:task withData:nil completionBlock:block]; - } else { - id errorDetails = nil; - NSData *errorData = (error ?: task.error).userInfo[kPNNetworkErrorResponseDataKey]; - - if (errorData) { - errorDetails = [NSJSONSerialization JSONObjectWithData:errorData - options:NSJSONReadingMutableContainers - error:NULL]; - } - - [self parseData:errorDetails - fromDataTask:task - withParser:[PNErrorParser class] - completion:^(NSDictionary *parsedData, __unused BOOL parseError) { - - [self handleParsedData:parsedData - loadedWithTask:task - forOperation:operation - parsedAsError:YES - processingError:(error ?: task.error) - completionBlock:[block copy]]; - }]; - } -} - -- (void)handleParsedData:(NSDictionary *)data - loadedWithTask:(NSURLSessionDataTask *)task - forOperation:(PNOperationType)operation - parsedAsError:(BOOL)isError - processingError:(NSError *)error - completionBlock:(id)block { - - PNOperationResult *result = nil; - PNStatus *status = nil; - - if (task && ((NSHTTPURLResponse *)task.response).statusCode == 0 && - error && error.code == NSURLErrorBadServerResponse) { - - isError = YES; - error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled userInfo:error.userInfo]; - } - - if ([self operationExpectResult:operation] && !isError) { - result = [[self resultClassForOperation:operation] objectForOperation:operation - completedWithTask:task - processedData:data - processingError:error]; - } - - if (isError || !data || ![self operationExpectResult:operation]){ - Class statusClass = (isError ? [PNErrorStatus class] - : [self statusClassForOperation:operation]); - status = (PNStatus *)[statusClass objectForOperation:operation - completedWithTask:task - processedData:data - processingError:error]; - } - - if (result || status) { - [self handleOperation:operation - processingCompletedWithResult:result - status:status - completionBlock:block]; - } - -#if TARGET_OS_IOS - if (self.configuration.applicationExtensionSharedGroupIdentifier == nil && - self.configuration.shouldCompleteRequestsBeforeSuspension) { - __block NSArray *scheduledDataTasks; - - pn_lock(&_lock, ^{ - [self.scheduledDataTasks removeObject:task]; - scheduledDataTasks = self.scheduledDataTasks; - }); - - if (self.tasksCompletionIdentifier != UIBackgroundTaskInvalid) { - [self processIncompleteBeforeClientResignActiveTasks:scheduledDataTasks - onDataTaskCompletion:YES]; - } - } -#endif // TARGET_OS_IOS -} - -- (void)handleOperation:(PNOperationType)operation - processingCompletedWithResult:(PNOperationResult *)result - status:(PNStatus *)status - completionBlock:(id)block { - - if (result) { - [self.client appendClientInformation:result]; - } - - if (status) { - [self.client appendClientInformation:status]; - } - - if (block) { - if ([self operationExpectResult:operation]) { - ((PNCompletionBlock)block)(result, status); - } else { - ((void(^)(id))block)(result ?: status); - } - } -} - -#if PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpartial-availability" -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task - didFinishCollectingMetrics:(NSURLSessionTaskMetrics *)metrics { - - NSArray *transactions = metrics.transactionMetrics; - NSMutableArray *redirections = transactions.count > 1 ? [NSMutableArray new] : nil; - __block NSMutableString *metricsData = nil; - - [transactions enumerateObjectsUsingBlock:^(NSURLSessionTaskTransactionMetrics *transaction, - NSUInteger transactionIdx, - BOOL *transactionsEnumeratorStop) { - - if (self.client.logger.logLevel & PNRequestMetricsLogLevel) { - if (transactionIdx == 0) { - metricsData = [self formattedMetricsDataFrom:transaction redirection:NO]; - } else { - NSString *redirection = [self formattedMetricsDataFrom:transaction redirection:YES]; - [redirections addObject:redirection]; - } - } - - NSTimeInterval responseStartDate = [transaction.requestStartDate timeIntervalSince1970]; - NSTimeInterval responseEndDate = [transaction.responseEndDate timeIntervalSince1970]; - NSTimeInterval latency = responseEndDate - responseStartDate; - - if (latency > 0.f) { - NSString *taskID = @(task.taskIdentifier).stringValue; - NSString *identifier = [self.sessionIdentifier stringByAppendingString:taskID]; - - pn_lock(&self->_lock, ^{ - NSNumber *operationNumber = self.dataTaskToOperationMap[identifier]; - - if (identifier && operationNumber) { - PNOperationType operationType = (PNOperationType)operationNumber.integerValue; - - [self.dataTaskToOperationMap removeObjectForKey:identifier]; - [self.client.telemetryManager setLatency:latency forOperation:operationType]; - } - }); - } - }]; - - if (redirections.count && metricsData) { - [metricsData appendFormat:@"\nWARNING: Request redirections has been noticed:\n\t%@", - [redirections componentsJoinedByString:@"\n\t"]]; - } - - PNLogRequestMetrics(self.client.logger, @"%@", metricsData); -} -#pragma clang diagnostic pop -#endif - - -#pragma mark - Misc - -#if TARGET_OS_IOS -- (BOOL)hasOperation:(PNOperationType)operation inDataTasks:(NSArray *)tasks { - BOOL hasOperation = NO; - - for (NSURLSessionDataTask *dataTask in tasks) { - if ([PNURLBuilder isURL:dataTask.originalRequest.URL forOperation:operation]) { - hasOperation = YES; - break; - } - } - - return hasOperation; -} - -- (void)endBackgroundTasksCompletionIfRequired { - if (self.configuration.applicationExtensionSharedGroupIdentifier == nil) { - UIApplication *application = [UIApplication performSelector:NSSelectorFromString(@"sharedApplication")]; - - if (self.tasksCompletionIdentifier != UIBackgroundTaskInvalid) { - [application endBackgroundTask:self.tasksCompletionIdentifier]; - self.tasksCompletionIdentifier = UIBackgroundTaskInvalid; - } - } -} - -#endif // TARGET_OS_IOS - -#if PN_URLSESSION_TRANSACTION_METRICS_AVAILABLE -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpartial-availability" -- (NSMutableString *)formattedMetricsDataFrom:(NSURLSessionTaskTransactionMetrics *)transaction - redirection:(BOOL)isRedirection { - - NSURLRequest *request = transaction.request; - NSMutableString *metricsData = [NSMutableString stringWithFormat:@" %@ ", - request.HTTPMethod]; - - if (!isRedirection) { - NSString *query = [request.URL.query stringByReplacingOccurrencesOfString:@"%2F" - withString:@"/"]; - - [metricsData appendFormat:@"%@?%@", request.URL.relativePath, query]; - } else { - NSString *uri = [request.URL.absoluteString stringByReplacingOccurrencesOfString:@"%2F" - withString:@"/"]; - - [metricsData appendString:uri]; - } - - [metricsData appendFormat:@" (%@; ", transaction.networkProtocolName?: @""]; - [metricsData appendFormat:@"persistent: %@; ", transaction.isReusedConnection ? @"YES": @"NO"]; - [metricsData appendFormat:@"proxy: %@; ", transaction.isProxyConnection ? @"YES": @"NO"]; - - // Add request duration. - NSDate *fetchStartDate = transaction.fetchStartDate; - NSDate *fetchEndDate = transaction.responseEndDate; - NSTimeInterval fetchDuration = [fetchEndDate timeIntervalSinceDate:(fetchStartDate ?: fetchEndDate)]; - [metricsData appendFormat:@"fetch: %@ (%fs); ", fetchStartDate, fetchDuration]; - - // Add DNS lookup duration. - NSDate *lookupStartDate = transaction.domainLookupStartDate; - NSDate *lookupEndDate = transaction.domainLookupEndDate; - NSTimeInterval lookupDuration = [lookupEndDate timeIntervalSinceDate:(lookupStartDate ?: lookupEndDate)]; - [metricsData appendFormat:@"lookup: %@ (%fs); ", lookupStartDate.description ?: @"", - lookupDuration]; - - // Add connection establish duration. - NSDate *connectStartDate = transaction.connectStartDate; - NSDate *connectEndDate = transaction.connectEndDate; - NSTimeInterval connectDuration = [connectEndDate timeIntervalSinceDate:(connectStartDate ?: connectEndDate)]; - [metricsData appendFormat:@"connect: %@ (%fs); ", connectStartDate.description ?: @"", - connectDuration]; - - // Add secure connection establish duration. - NSDate *secureStartDate = transaction.secureConnectionStartDate; - NSDate *secureEndDate = transaction.secureConnectionEndDate; - NSTimeInterval secureDuration = [secureEndDate timeIntervalSinceDate:(secureStartDate ?: secureEndDate)]; - [metricsData appendFormat:@"secure: %@ (%fs); ", secureStartDate.description ?: @"", - secureDuration]; - - // Add request sending duration. - NSDate *requestStartDate = transaction.requestStartDate; - NSDate *requestEndDate = transaction.requestEndDate; - NSTimeInterval requestDuration = [requestEndDate timeIntervalSinceDate:(requestStartDate ?: requestEndDate)]; - [metricsData appendFormat:@"request: %@ (%fs); ", requestStartDate.description ?: @"", - requestDuration]; - - // Add response loading duration. - NSDate *responseStartDate = transaction.responseStartDate; - NSDate *responseEndDate = transaction.responseEndDate; - NSTimeInterval responseDuration = [responseEndDate timeIntervalSinceDate:(responseStartDate ?: responseEndDate)]; - [metricsData appendFormat:@"response: %@ (%fs))", responseStartDate.description ?: @"", - responseDuration]; - - return metricsData; -} -#pragma clang diagnostic pop -#endif - -- (void)printIfRequiredSessionCustomizationInformation { - if ([NSURLSessionConfiguration pn_HTTPAdditionalHeaders].count) { - PNLogClientInfo(self.client.logger, @" Custom HTTP headers is set by " - "user: %@", [NSURLSessionConfiguration pn_HTTPAdditionalHeaders]); - } - - if ([NSURLSessionConfiguration pn_networkServiceType] != NSURLNetworkServiceTypeDefault) { - PNLogClientInfo(self.client.logger, @" Custom network service type is set " - "by user: %@", @([NSURLSessionConfiguration pn_networkServiceType])); - } - - if (![NSURLSessionConfiguration pn_allowsCellularAccess]) { - PNLogClientInfo(self.client.logger, @" User limited access to cellular " - "data and only WiFi connection can be used."); - } - - if ([NSURLSessionConfiguration pn_protocolClasses].count) { - PNLogClientInfo(self.client.logger, @" Extra requests handling protocols " - "defined by user: %@", [NSURLSessionConfiguration pn_protocolClasses]); - } - - if ([NSURLSessionConfiguration pn_connectionProxyDictionary].count) { - PNLogClientInfo(self.client.logger, @" Connection proxy has been set by " - "user: %@", [NSURLSessionConfiguration pn_connectionProxyDictionary]); - } -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/PNNetworkResponseSerializer.h b/PubNub/Network/PNNetworkResponseSerializer.h deleted file mode 100644 index e16e8ad7a..000000000 --- a/PubNub/Network/PNNetworkResponseSerializer.h +++ /dev/null @@ -1,49 +0,0 @@ -#import - - -#pragma mark Externs - -/** - * @brief Key used to store service response in case of request processing error. - */ -extern NSString * _Nonnull const kPNNetworkErrorResponseDataKey; - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Class which is used by network manager to serialise responses from \b PubNub Network. - * - * @author Serhii Mamontov - * @version 4.15.6 - * @since 4.0.2 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNNetworkResponseSerializer : NSObject - - -#pragma mark - Serialisation - -/** - * @brief Serialise service response taking into account metadata. - * - * @discussion This method used to extract Foundation object from service response if possible. In other cases - * error will be passed. - * - * @param response Reference on HTTP response object which has metadata which should be used in - * pre-processing to identify whether body should be processed or not. - * @param data Binary information which has been provided by service. - * @param serializationError Pointer to variable which will store service response serialisation error. - * - * @return Serialised service response (parsed JSON). - */ -- (id)serializedResponse:(NSHTTPURLResponse *)response - withData:(NSData *)data - error:(NSError *__autoreleasing *)serializationError; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/PNNetworkResponseSerializer.m b/PubNub/Network/PNNetworkResponseSerializer.m deleted file mode 100644 index 8eaf2240a..000000000 --- a/PubNub/Network/PNNetworkResponseSerializer.m +++ /dev/null @@ -1,237 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.6 - * @since 4.0.2 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNNetworkResponseSerializer.h" - - -#pragma mark Externs - -NSString * const kPNNetworkErrorResponseDataKey = @"PNNetworkErrorResponseDataKey"; - - -#pragma mark - Private interface declaration - -@interface PNNetworkResponseSerializer () - - -#pragma mark - Properties - -/** - * @brief Stores reference on list of expected MIME types which can be handled by serialiser. - */ -@property (nonatomic) NSArray *expectedMIMETypes; - - -#pragma mark - Serialisation - -/** - * @brief Try fix serialised response if required. - * - * @discussion Server may send malformed response, which may cause troubles in JSON parser, - * so binary data should be fixed before sending to JSON parser. - * - * @param response Reference on HTTP response object which has metadata which should be used in - * pre-processing to identify whether body should be processed or not. - * @param serialisedResponse Output of initial response serialisation code. - * @param data Server response binary data which should be adjusted if required. - * @param serialisationError Error which has been generated during initial response - * serialisation code call. - * @param error Pointer to error which should be passed to caller for further parse issues - * handling. - * - * @return Serialised response after service response binary data has been adjusted. - * - * @since 4.15.6 - */ -- (id)fixedSerialisedResponse:(nullable id)serialisedResponse - forHTTPResponse:(nullable NSHTTPURLResponse *)response - fromData:(NSData *)data - withSerialisationError:(nullable NSError *)serialisationError - processingError:(NSError **)error; - - -#pragma mark - Misc - -/** - * @brief Verify response metadata and construct error object in case if data can't be handled. - * - * @discussion Depending on few fields stored within HTTP response serialised will determine whether - * response can be serialised or not. - * - * @param error Reference on storage for generated error. - * @param response Reference on HTTP response instance with metadata information against which - * check should be performed. - * @param responseData Reference on downloaded response data. - * - * @return \c YES in case if error occurred. - */ -- (BOOL)getProcessingError:(NSError **)error - ifUnableToHandleResponse:(NSHTTPURLResponse *)response - withData:(NSData *)responseData; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNNetworkResponseSerializer - - -#pragma mark - Initialization and configuration - -- (instancetype)init { - if ((self = [super init])) { - _expectedMIMETypes = [@[@"application/json", @"text/json", @"text/javascript"] copy]; - } - - return self; -} - - -#pragma mark - Serialisation - -- (id)serializedResponse:(NSHTTPURLResponse *)response - withData:(NSData *)data - error:(NSError *__autoreleasing *)serialisationError { - - id serialisedResponse = nil; - NSError *unexpectedResponseError = nil; - - if (![self getProcessingError:&unexpectedResponseError - ifUnableToHandleResponse:response - withData:data]) { - - if (data.length) { - @autoreleasepool { - NSError *JSONSerializationError = nil; - serialisedResponse = [NSJSONSerialization JSONObjectWithData:data - options:NSJSONReadingMutableContainers - error:&JSONSerializationError]; - - serialisedResponse = [self fixedSerialisedResponse:serialisedResponse - forHTTPResponse:response - fromData:data - withSerialisationError:JSONSerializationError - processingError:&unexpectedResponseError]; - } - } - } - - if (unexpectedResponseError) { - *serialisationError = unexpectedResponseError; - } - - return serialisedResponse; -} - -- (id)fixedSerialisedResponse:(id)serialisedResponse - forHTTPResponse:(NSHTTPURLResponse *)response - fromData:(NSData *)data - withSerialisationError:(NSError *)serialisationError - processingError:(NSError **)error { - - id fixedSerialisedResponse = serialisedResponse; - - if (serialisationError && [serialisationError.domain isEqualToString:NSCocoaErrorDomain] && - serialisationError.code == NSPropertyListReadCorruptError) { - - NSData *nulByte = [[NSData alloc] initWithBytes:(char[]){0xFF} length:1]; - NSRange nulByteRange = [data rangeOfData:nulByte - options:(NSDataSearchOptions)0 - range:NSMakeRange(0, data.length)]; - - if (nulByteRange.location != NSNotFound) { - NSMutableData *mutableData = [data mutableCopy]; - - while (nulByteRange.location != NSNotFound) { - [mutableData replaceBytesInRange:nulByteRange withBytes:NULL length:0]; - nulByteRange = [mutableData rangeOfData:nulByte - options:(NSDataSearchOptions)0 - range:NSMakeRange(0, mutableData.length)]; - } - - fixedSerialisedResponse = [self serializedResponse:response - withData:[mutableData copy] - error:error]; - - if (!fixedSerialisedResponse && error) { - NSMutableDictionary *userInfo = [NSMutableDictionary new]; - userInfo[NSLocalizedDescriptionKey] = @"Request completed, but received data" - "corrupt and can't be decoded properly."; - - if (response.URL) { - userInfo[NSURLErrorFailingURLErrorKey] = response.URL; - } - - if (mutableData.length) { - userInfo[kPNNetworkErrorResponseDataKey] = [mutableData copy]; - } - - if (error) { - *error = [NSError errorWithDomain:NSURLErrorDomain - code:NSURLErrorBadServerResponse - userInfo:userInfo]; - } - } - } - } - - return fixedSerialisedResponse; -} - - -#pragma mark - Misc - -- (BOOL)getProcessingError:(NSError **)error - ifUnableToHandleResponse:(NSHTTPURLResponse *)response - withData:(NSData *)responseData { - - NSMutableDictionary *userInfo = [NSMutableDictionary new]; - NSInteger statusCode = NSURLErrorUnknown; - - if (response) { - NSString *description = nil; - - if (![self.expectedMIMETypes containsObject:response.MIMEType]) { - description = [NSString stringWithFormat:@"Request completed but unexpected data type " - "received in response: %@", response.MIMEType]; - statusCode = NSURLErrorCannotDecodeContentData; - } else if (response.statusCode >= 400) { - description = [NSString stringWithFormat:@"Request failed: %@ (%ld)", - [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], - (long)response.statusCode]; - statusCode = NSURLErrorBadServerResponse; - } - - if (description) { - userInfo[NSLocalizedDescriptionKey] = description; - } - } - - if (userInfo.count) { - if (response.URL) { - userInfo[NSURLErrorFailingURLErrorKey] = response.URL; - } - - if (responseData.length) { - userInfo[kPNNetworkErrorResponseDataKey] = responseData; - } - - if (error) { - *error = [NSError errorWithDomain:NSURLErrorDomain code:statusCode userInfo:userInfo]; - } - } - - return statusCode != NSURLErrorUnknown; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/PNReachability.m b/PubNub/Network/PNReachability.m index 95dd50cd8..fac027049 100644 --- a/PubNub/Network/PNReachability.m +++ b/PubNub/Network/PNReachability.m @@ -141,10 +141,12 @@ - (void)startServicePing { self.pingRemoteService = YES; // Try to request 'time' API to ensure what network really available. __weak __typeof(self) weakSelf = self; - +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [self.client timeWithCompletion:^(PNTimeResult *result, __unused PNErrorStatus *status) { [weakSelf handleServicePingResult:result]; }]; +#pragma clang diagnostic pop } } @@ -159,7 +161,7 @@ - (void)stopServicePing { - (void)handleServicePingResult:(PNTimeResult *)result { BOOL successfulPing = result.data != nil; - + if (self.reachable && !successfulPing) { PNLogReachability(self.client.logger, @" Connection went down."); } @@ -167,7 +169,7 @@ - (void)handleServicePingResult:(PNTimeResult *)result { if (!self.reachable && successfulPing) { PNLogReachability(self.client.logger, @" Connection restored."); } - + if (self.pingCompleteBlock) { self.pingCompleteBlock(successfulPing); } diff --git a/PubNub/Network/PNRequestParameters.h b/PubNub/Network/PNRequestParameters.h deleted file mode 100644 index de5c05dce..000000000 --- a/PubNub/Network/PNRequestParameters.h +++ /dev/null @@ -1,151 +0,0 @@ -#import - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Wrapper class around parameters which should be applied on resource path and query string. - * - * @discussion Used to help builder identify what parameters related to resource path components and - * what should be used with request query composition. - * - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNRequestParameters : NSObject - - -#pragma mark Information - -/** - * @brief URL which should be used ignoring operation type and URL builder. - * - * @since 4.15.0 - */ -@property (nonatomic, nullable, strong) NSURL *url; - -/** - * @brief Stores reference on expected HTTP method for request. - * - * @since 4.7.0 - */ -@property (nonatomic, copy) NSString *HTTPMethod; - -/** - * @brief SKey/value pairs which should be expanded in remote resource path. - */ -@property (nonatomic, nullable, readonly) NSDictionary *pathComponents; - -/** - * @brief Whether telemetry data should be appended to request or not. - * - * @since 4.9.0 - */ -@property (nonatomic, readonly, assign, getter = shouldIncludeTelemetry) BOOL includeTelemetry; - -/** - * @brief Key/value pairs which should be expanded in query string. - */ -@property (nonatomic, nullable, readonly) NSDictionary *query; - -/** - * @brief Whether passed request parameters represent compressed POST body or not. - * - * @since 4.13.0 - */ -@property (nonatomic, assign, getter=isPOSTBodyCompressed) BOOL POSTBodyCompressed; - - -#pragma mark - Path components manipulation - -/** - * @brief Add resource path component for placeholder. - * - * @discussion Placeholder will be placed in request template with specified value. - * - * @param component Path component value. - * @param componentPlaceholder Name of placeholder instead of which value should be placed. - */ -- (void)addPathComponent:(NSString *)component forPlaceholder:(NSString *)componentPlaceholder; - -/** - * @brief Remove resource path component. - * - * @discusssion Clean placeholder value. This method useful in case if basing on further - * computations code need to remove/unset previously stored value. - * - * @since 4.0.2 - */ -- (void)removePathComponentForPlaceholder:(NSString *)componentPlaceholder; - -/** - * @brief Add resource path components in placeholder/value format with dictionary. - * - * @discussion Corresponding placeholder will be placed in request template with specified value. - * - * @param components Dictionary with placeholder name / value pairs. - */ -- (void)addPathComponents:(NSDictionary *)components; - -/** - * @brief Remove set of values which has been set earlier for placeholders. - * - * @discussion Corresponding placeholders will be cleared from request computation. - * - * @param components List of placeholer names which should be unset. - * - * @since 4.0.2 - */ -- (void)removePathComponents:(NSArray *)components; - - -#pragma mark - Query fields manipulation - -/** - * @brief Add query parameter value for specified name. - * - * @param parameter Query parameter value. - * @param parameterFieldName Query parameter field name. - */ -- (void)addQueryParameter:(NSString *)parameter forFieldName:(NSString *)parameterFieldName; - -/** - * @brief Remove query parameter with it's value. - * - * @param parameterFieldName Name of query parameter which should be removed from request - * computation. - * - * @since 4.0.2 - */ -- (void)removeQueryParameterWithFieldName:(NSString *)parameterFieldName; - -/** - * @brief Add query parameters in field name / value format with dictionary. - * - * @param parameters Dictionary with field name / value pairs. - */ -- (void)addQueryParameters:(NSDictionary *)parameters; - -/** - * @brief Remove set of query parameter with their value. - * - * @param parameters List of query parameter names which should be removed from request computation. - * - * @since 4.0.2 - */ -- (void)removeQueryParameters:(NSArray *)parameters; - -/** - * @brief Exclude telemetry parameters from request query. - * - * @since 4.9.0 - */ -- (void)disableTelemetry; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/PNRequestParameters.m b/PubNub/Network/PNRequestParameters.m deleted file mode 100644 index 40f42f27e..000000000 --- a/PubNub/Network/PNRequestParameters.m +++ /dev/null @@ -1,144 +0,0 @@ -/** - * @author Serhii Mamontov - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNRequestParameters.h" - - -#pragma mark Protected interface declaration - -@interface PNRequestParameters () - - -#pragma mark - Properties - -/** - * @brief Stores reference on key/value pairs which should be expanded in remote resource path. - */ -@property (nonatomic, strong) NSMutableDictionary *resourcePathComponents; - -/** - * @brief Stores reference on key/value pairs which should be expanded in query string. - */ -@property (nonatomic, strong) NSMutableDictionary *queryFields; - -/** - * @brief Whether telemetry data should be appended to request or not. - * - * @since 4.9.0 - */ -@property (nonatomic, assign, getter = shouldIncludeTelemetry) BOOL includeTelemetry; - -#pragma mark - - - -@end - - -#pragma mark - Interface implementation - -@implementation PNRequestParameters - - -#pragma mark - Information - -- (void)setHTTPMethod:(NSString *)method { - - static NSArray *_allowedHTTPMethods; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ _allowedHTTPMethods = @[@"GET", @"POST", @"PATCH", @"DELETE"]; }); - if (method && [_allowedHTTPMethods indexOfObjectIdenticalTo:method] != NSNotFound) { - _HTTPMethod = [method copy]; - } -} - -- (NSDictionary *)pathComponents { - - return (self.resourcePathComponents.count ? [self.resourcePathComponents copy] : nil); -} - -- (NSDictionary *)query { - - return (self.queryFields.count ? [self.queryFields copy] : nil); -} - - -#pragma mark - Initialization and Configuration - -- (instancetype)init { - - // Check whether initialization was successful or not. - if ((self = [super init])) { - - _resourcePathComponents = [NSMutableDictionary new]; - _queryFields = [NSMutableDictionary new]; - _HTTPMethod = @"GET"; - } - - return self; -} - - -#pragma mark - Path components manipulation - -- (void)addPathComponent:(NSString *)component forPlaceholder:(NSString *)componentPlaceholder { - - NSParameterAssert(component); - NSParameterAssert(componentPlaceholder); - [self.resourcePathComponents setValue:component forKey:componentPlaceholder]; -} - -- (void)removePathComponentForPlaceholder:(NSString *)componentPlaceholder { - - NSParameterAssert(componentPlaceholder); - [self.resourcePathComponents removeObjectForKey:componentPlaceholder]; -} - -- (void)addPathComponents:(NSDictionary *)components { - - NSParameterAssert(components); - [self.resourcePathComponents addEntriesFromDictionary:components]; -} - -- (void)removePathComponents:(NSArray *)components { - - NSParameterAssert(components); - [self.resourcePathComponents removeObjectsForKeys:components]; -} - - -#pragma mark - Query fields manipulation - -- (void)addQueryParameter:(NSString *)parameter forFieldName:(NSString *)parameterFieldName { - - NSParameterAssert(parameter); - NSParameterAssert(parameterFieldName); - [self.queryFields setValue:parameter forKey:parameterFieldName]; -} - -- (void)removeQueryParameterWithFieldName:(NSString *)parameterFieldName { - - NSParameterAssert(parameterFieldName); - [self.queryFields removeObjectForKey:parameterFieldName]; -} - -- (void)addQueryParameters:(NSDictionary *)parameters { - - [self.queryFields addEntriesFromDictionary:parameters]; -} - -- (void)removeQueryParameters:(NSArray *)parameters { - - NSParameterAssert(parameters); - [self.queryFields removeObjectsForKeys:parameters]; -} - -- (void)disableTelemetry { - - self.includeTelemetry = NO; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/PNURLBuilder.h b/PubNub/Network/PNURLBuilder.h deleted file mode 100644 index 3458a3f0d..000000000 --- a/PubNub/Network/PNURLBuilder.h +++ /dev/null @@ -1,62 +0,0 @@ -#import -#import "PNStructures.h" - - -#pragma mark Class forward - -@class PNRequestParameters; - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief \b PubNub API URL builder. - * - * @discussion Instance allow to translate operation type and parameters to valid URL which should - * be used with request to \b PubNub network. - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNURLBuilder : NSObject - - -#pragma mark API URL constructor - -/** - * @brief Construct request URL basing on operation type and list of request parameters. - * - * @param operation One of \b PNOperationType fields which describes operation type (to choose - * correct API endpoint). - * @param parameters Object which represent set of parameters which should be used during path - * composition. - * - * @return URL to perform required by \c operation API call. - */ -+ (nullable NSURL *)URLForOperation:(PNOperationType)operation - withParameters:(PNRequestParameters *)parameters; - - -#pragma mark - API URL verificator - -/** - * @brief Check whether passed URL represent call to API described by passed \c operation. - * - * @param url Previously generated API call URL which should be used during verification. - * @param operation One of \b PNOperationType fields which describes operation type against which - * verification will be done. - * - * @return \c YES in case if passed \c url is for API which described by \c operation. - * - * @since 4.5.0 - */ -+ (BOOL)isURL:(NSURL *)url forOperation:(PNOperationType)operation; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/PNURLBuilder.m b/PubNub/Network/PNURLBuilder.m deleted file mode 100644 index 5022806ea..000000000 --- a/PubNub/Network/PNURLBuilder.m +++ /dev/null @@ -1,134 +0,0 @@ -/** - * @author Sergey Mamontov - * @version 4.12.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNURLBuilder.h" -#import "PNRequestParameters.h" -#import "PNDictionary.h" - - -#pragma mark Static - -/** - * @brief API endpoints description basing on operation type. - */ -static NSString * const PNOperationRequestTemplate[57] = { - [PNSubscribeOperation] = @"/v2/subscribe/{sub-key}/{channels}/0", - [PNUnsubscribeOperation] = @"/v2/presence/sub_key/{sub-key}/channel/{channels}/leave", - [PNPublishOperation] = @"/publish/{pub-key}/{sub-key}/0/{channel}/0/{message}", - [PNSignalOperation] = @"/signal/{pub-key}/{sub-key}/0/{channel}/0/{message}", - [PNAddMessageActionOperation] = @"/v1/message-actions/{sub-key}/channel/{channel}/message/{message-timetoken}", - [PNRemoveMessageActionOperation] = @"/v1/message-actions/{sub-key}/channel/{channel}/message/{message-timetoken}/action/{action-timetoken}", - [PNFetchMessagesActionsOperation] = @"/v1/message-actions/{sub-key}/channel/{channel}", - [PNHistoryOperation] = @"/v2/history/sub-key/{sub-key}/channel/{channel}", - [PNHistoryForChannelsOperation] = @"/v3/history/sub-key/{sub-key}/channel/{channels}", - [PNHistoryWithActionsOperation] = @"/v3/history-with-actions/sub-key/{sub-key}/channel/{channel}", - [PNDeleteMessageOperation] = @"/v3/history/sub-key/{sub-key}/channel/{channel}", - [PNMessageCountOperation] = @"/v3/history/sub-key/{sub-key}/message-counts/{channels}", - [PNWhereNowOperation] = @"/v2/presence/sub-key/{sub-key}/uuid/{uuid}", - [PNHereNowGlobalOperation] = @"/v2/presence/sub-key/{sub-key}", - [PNHereNowForChannelOperation] = @"/v2/presence/sub-key/{sub-key}/channel/{channel}", - [PNHereNowForChannelGroupOperation] = @"/v2/presence/sub-key/{sub-key}/channel/{channel}", - [PNHeartbeatOperation] = @"/v2/presence/sub-key/{sub-key}/channel/{channels}/heartbeat", - [PNSetStateOperation] = @"/v2/presence/sub-key/{sub-key}/channel/{channel}/uuid/{uuid}/data", - [PNGetStateOperation] = @"/v2/presence/sub-key/{sub-key}/channel/{channel}/uuid/{uuid}", - [PNStateForChannelOperation] = @"/v2/presence/sub-key/{sub-key}/channel/{channel}/uuid/{uuid}", - [PNStateForChannelGroupOperation] = @"/v2/presence/sub-key/{sub-key}/channel/{channel}/uuid/{uuid}", - [PNAddChannelsToGroupOperation] = @"/v1/channel-registration/sub-key/{sub-key}/channel-group/{channel-group}", - [PNRemoveChannelsFromGroupOperation] = @"/v1/channel-registration/sub-key/{sub-key}/channel-group/{channel-group}", - [PNChannelGroupsOperation] = @"/v1/channel-registration/sub-key/{sub-key}/channel-group", - [PNRemoveGroupOperation] = @"/v1/channel-registration/sub-key/{sub-key}/channel-group/{channel-group}/remove", - [PNChannelsForGroupOperation] = @"/v1/channel-registration/sub-key/{sub-key}/channel-group/{channel-group}", - [PNPushNotificationEnabledChannelsOperation] = @"/v1/push/sub-key/{sub-key}/devices/{token}", - [PNAddPushNotificationsOnChannelsOperation] = @"/v1/push/sub-key/{sub-key}/devices/{token}", - [PNRemovePushNotificationsFromChannelsOperation] = @"/v1/push/sub-key/{sub-key}/devices/{token}", - [PNRemoveAllPushNotificationsOperation] = @"/v1/push/sub-key/{sub-key}/devices/{token}/remove", - [PNPushNotificationEnabledChannelsV2Operation] = @"/v2/push/sub-key/{sub-key}/devices-apns2/{token}", - [PNAddPushNotificationsOnChannelsV2Operation] = @"/v2/push/sub-key/{sub-key}/devices-apns2/{token}", - [PNRemovePushNotificationsFromChannelsV2Operation] = @"/v2/push/sub-key/{sub-key}/devices-apns2/{token}", - [PNRemoveAllPushNotificationsV2Operation] = @"/v2/push/sub-key/{sub-key}/devices-apns2/{token}/remove", - [PNSetUUIDMetadataOperation] = @"/v2/objects/{sub-key}/uuids/{uuid}", - [PNRemoveUUIDMetadataOperation] = @"/v2/objects/{sub-key}/uuids/{uuid}", - [PNFetchUUIDMetadataOperation] = @"/v2/objects/{sub-key}/uuids/{uuid}", - [PNFetchAllUUIDMetadataOperation] = @"/v2/objects/{sub-key}/uuids", - [PNSetChannelMetadataOperation] = @"/v2/objects/{sub-key}/channels/{channel}", - [PNRemoveChannelMetadataOperation] = @"/v2/objects/{sub-key}/channels/{channel}", - [PNFetchChannelMetadataOperation] = @"/v2/objects/{sub-key}/channels/{channel}", - [PNFetchAllChannelsMetadataOperation] = @"/v2/objects/{sub-key}/channels", - [PNSetMembershipsOperation] = @"/v2/objects/{sub-key}/uuids/{uuid}/channels", - [PNRemoveMembershipsOperation] = @"/v2/objects/{sub-key}/uuids/{uuid}/channels", - [PNManageMembershipsOperation] = @"/v2/objects/{sub-key}/uuids/{uuid}/channels", - [PNFetchMembershipsOperation] = @"/v2/objects/{sub-key}/uuids/{uuid}/channels", - [PNSetChannelMembersOperation] = @"/v2/objects/{sub-key}/channels/{channel}/uuids", - [PNRemoveChannelMembersOperation] = @"/v2/objects/{sub-key}/channels/{channel}/uuids", - [PNManageChannelMembersOperation] = @"/v2/objects/{sub-key}/channels/{channel}/uuids", - [PNFetchChannelMembersOperation] = @"/v2/objects/{sub-key}/channels/{channel}/uuids", - [PNGenerateFileUploadURLOperation] = @"/v1/files/{sub-key}/channels/{channel}/generate-upload-url", - [PNPublishFileMessageOperation] = @"/v1/files/publish-file/{pub-key}/{sub-key}/0/{channel}/0/{message}", - [PNListFilesOperation] = @"/v1/files/{sub-key}/channels/{channel}/files", - [PNDownloadFileOperation] = @"/v1/files/{sub-key}/channels/{channel}/files/{id}/{name}", - [PNDeleteFileOperation] = @"/v1/files/{sub-key}/channels/{channel}/files/{id}/{name}", - [PNTimeOperation] = @"/time/0" -}; - - -#pragma mark - Interface implementation - -@implementation PNURLBuilder - - -#pragma mark - API URL constructor - -+ (NSURL *)URLForOperation:(PNOperationType)operation withParameters:(PNRequestParameters *)parameters { - if (parameters.url) { - return parameters.url; - } - - NSURL *requestURL = nil; - NSMutableString *requestURLString = [PNOperationRequestTemplate[operation] mutableCopy]; - [parameters.pathComponents enumerateKeysAndObjectsUsingBlock:^(NSString *placeholder, NSString *component, - __unused BOOL *componentsEnumeratorStop) { - - [requestURLString replaceOccurrencesOfString:placeholder withString:component - options:NSCaseInsensitiveSearch - range:NSMakeRange(0, requestURLString.length)]; - }]; - - if ([requestURLString rangeOfString:@"{"].location == NSNotFound) { - if ([requestURLString hasSuffix:@"/"]) { - NSRange lastSlashRange = NSMakeRange(requestURLString.length - 2, 2); - [requestURLString replaceOccurrencesOfString:@"/" withString:@"" options:NSBackwardsSearch - range:lastSlashRange]; - } - - if (parameters.query.count) { - [requestURLString appendFormat:@"?%@", [PNDictionary queryStringFrom:parameters.query]]; - } - - requestURL = [NSURL URLWithString:requestURLString]; - } - - return requestURL; -} - - -#pragma mark - API URL verificator - -+ (BOOL)isURL:(NSURL *)url forOperation:(PNOperationType)operation { - - BOOL result = NO; - - if (url) { - NSString *requestURLPrefixString = [PNOperationRequestTemplate[operation] componentsSeparatedByString:@"{"].firstObject; - result = ([url.absoluteString rangeOfString:requestURLPrefixString].location != NSNotFound); - } - - return result; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/Actions/Message/PNAddMessageActionParser.h b/PubNub/Network/Parsers/Actions/Message/PNAddMessageActionParser.h deleted file mode 100644 index c43068467..000000000 --- a/PubNub/Network/Parsers/Actions/Message/PNAddMessageActionParser.h +++ /dev/null @@ -1,24 +0,0 @@ -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c add \c message \c action requests. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNAddMessageActionParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Actions/Message/PNAddMessageActionParser.m b/PubNub/Network/Parsers/Actions/Message/PNAddMessageActionParser.m deleted file mode 100644 index 838b17faa..000000000 --- a/PubNub/Network/Parsers/Actions/Message/PNAddMessageActionParser.m +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNAddMessageActionParser.h" - - -#pragma mark Interface implementation - -@implementation PNAddMessageActionParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[@(PNAddMessageActionOperation)]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSDictionary class]] && response[@"data"] && - ((NSNumber *)response[@"status"]).integerValue < 400) { - NSMutableDictionary *action = response[@"data"]; - NSMutableDictionary *actionInformation = [@{ @"action": action } mutableCopy]; - - action[@"messageTimetoken"] = @(((NSString *)action[@"messageTimetoken"]).longLongValue); - action[@"actionTimetoken"] = @(((NSString *)action[@"actionTimetoken"]).longLongValue); - - if ([response[@"error"] isKindOfClass:[NSDictionary class]]) { - actionInformation[@"information"] = response[@"error"][@"message"]; - actionInformation[@"isError"] = @YES; - } - - processedResponse = actionInformation; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/Actions/Message/PNFetchMessagesActionsParser.h b/PubNub/Network/Parsers/Actions/Message/PNFetchMessagesActionsParser.h deleted file mode 100644 index 84ed6e168..000000000 --- a/PubNub/Network/Parsers/Actions/Message/PNFetchMessagesActionsParser.h +++ /dev/null @@ -1,24 +0,0 @@ -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c fetch \c messages \c actions requests. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNFetchMessagesActionsParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Actions/Message/PNFetchMessagesActionsParser.m b/PubNub/Network/Parsers/Actions/Message/PNFetchMessagesActionsParser.m deleted file mode 100644 index cc3379920..000000000 --- a/PubNub/Network/Parsers/Actions/Message/PNFetchMessagesActionsParser.m +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNFetchMessagesActionsParser.h" - - -#pragma mark Interface implementation - -@implementation PNFetchMessagesActionsParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[@(PNFetchMessagesActionsOperation)]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSDictionary class]] && response[@"data"] && - ((NSNumber *)response[@"status"]).integerValue == 200) { - - NSMutableArray *actions = response[@"data"]; - - for (NSMutableDictionary *action in actions) { - action[@"messageTimetoken"] = @(((NSString *)action[@"messageTimetoken"]).longLongValue); - action[@"actionTimetoken"] = @(((NSString *)action[@"actionTimetoken"]).longLongValue); - } - - processedResponse = @{ - @"actions": actions, - @"start": actions.count ? actions.firstObject[@"actionTimetoken"] : @(0), - @"end": actions.count ? actions.lastObject[@"actionTimetoken"] : @(0) - }; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/Actions/Message/PNRemoveMessageActionParser.h b/PubNub/Network/Parsers/Actions/Message/PNRemoveMessageActionParser.h deleted file mode 100644 index 34761fa91..000000000 --- a/PubNub/Network/Parsers/Actions/Message/PNRemoveMessageActionParser.h +++ /dev/null @@ -1,24 +0,0 @@ -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c remove \c message \c action requests. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNRemoveMessageActionParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Actions/Message/PNRemoveMessageActionParser.m b/PubNub/Network/Parsers/Actions/Message/PNRemoveMessageActionParser.m deleted file mode 100644 index 2a4079c9d..000000000 --- a/PubNub/Network/Parsers/Actions/Message/PNRemoveMessageActionParser.m +++ /dev/null @@ -1,43 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNRemoveMessageActionParser.h" - - -#pragma mark Interface implementation - -@implementation PNRemoveMessageActionParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[@(PNRemoveMessageActionOperation)]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSDictionary class]] && response[@"data"] && - ((NSNumber *)response[@"status"]).integerValue == 200) { - - processedResponse = @{ }; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/Files/PNDeleteFileParser.h b/PubNub/Network/Parsers/Files/PNDeleteFileParser.h deleted file mode 100644 index d347e57b5..000000000 --- a/PubNub/Network/Parsers/Files/PNDeleteFileParser.h +++ /dev/null @@ -1,24 +0,0 @@ -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c delete \c file request. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNDeleteFileParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Files/PNDeleteFileParser.m b/PubNub/Network/Parsers/Files/PNDeleteFileParser.m deleted file mode 100644 index 440c758e9..000000000 --- a/PubNub/Network/Parsers/Files/PNDeleteFileParser.m +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNDeleteFileParser.h" - - -#pragma mark Interface implementation - -@implementation PNDeleteFileParser - -+ (NSArray *)operations { - return @[@(PNDeleteFileOperation)]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - NSDictionary *processedResponse = nil; - - if (((NSNumber *)response[@"status"]).integerValue != 200 || - ![response isKindOfClass:[NSDictionary class]]) { - - return processedResponse; - } - - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/Files/PNGenerateFileUploadURLParser.h b/PubNub/Network/Parsers/Files/PNGenerateFileUploadURLParser.h deleted file mode 100644 index 1ba26d1fe..000000000 --- a/PubNub/Network/Parsers/Files/PNGenerateFileUploadURLParser.h +++ /dev/null @@ -1,24 +0,0 @@ -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c file \c upload \c url request. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNGenerateFileUploadURLParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Files/PNGenerateFileUploadURLParser.m b/PubNub/Network/Parsers/Files/PNGenerateFileUploadURLParser.m deleted file mode 100644 index bbdc02277..000000000 --- a/PubNub/Network/Parsers/Files/PNGenerateFileUploadURLParser.m +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNGenerateFileUploadURLParser.h" - - -#pragma mark Interface implementation - -@implementation PNGenerateFileUploadURLParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[@(PNGenerateFileUploadURLOperation)]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - NSDictionary *processedResponse = nil; - - if (((NSNumber *)response[@"status"]).integerValue != 200 || - ![response isKindOfClass:[NSDictionary class]]) { - - return processedResponse; - } - - NSMutableDictionary *uploadMetadata = [NSMutableDictionary new]; - - if ([response valueForKeyPath:@"data.id"]) { - uploadMetadata[@"file"] = @{ - @"identifier": response[@"data"][@"id"], - @"name": response[@"data"][@"name"] - }; - } - - if ([response valueForKeyPath:@"file_upload_request.url"]) { - NSDictionary *requestMetadata = response[@"file_upload_request"]; - uploadMetadata[@"request"] = [NSMutableDictionary new]; - - uploadMetadata[@"request"][@"url"] = requestMetadata[@"url"]; - uploadMetadata[@"request"][@"method"] = requestMetadata[@"method"]; - uploadMetadata[@"request"][@"formFields"] = requestMetadata[@"form_fields"]; - } - - if (uploadMetadata.count == 2) { - processedResponse = [uploadMetadata copy]; - } - - return processedResponse; -} - -#pragma mark - - -@end diff --git a/PubNub/Network/Parsers/Files/PNListFilesParser.h b/PubNub/Network/Parsers/Files/PNListFilesParser.h deleted file mode 100644 index 20c642241..000000000 --- a/PubNub/Network/Parsers/Files/PNListFilesParser.h +++ /dev/null @@ -1,24 +0,0 @@ -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c list \c files request. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNListFilesParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Files/PNListFilesParser.m b/PubNub/Network/Parsers/Files/PNListFilesParser.m deleted file mode 100644 index f6e00469b..000000000 --- a/PubNub/Network/Parsers/Files/PNListFilesParser.m +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNListFilesParser.h" - - -#pragma mark Interface implementation - -@implementation PNListFilesParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[@(PNListFilesOperation)]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - if (((NSNumber *)response[@"status"]).integerValue != 200 || - ![response isKindOfClass:[NSDictionary class]] || !response[@"data"]) { - - return nil; - } - - NSMutableDictionary *uploadedFiles = [@{ @"files": response[@"data"] } mutableCopy]; - uploadedFiles[@"count"] = response[@"count"] ?: @(0); - uploadedFiles[@"next"] = response[@"next"]; - - return [uploadedFiles copy]; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/Objects/PNChannelMembersParser.h b/PubNub/Network/Parsers/Objects/PNChannelMembersParser.h deleted file mode 100644 index 2fb6271ef..000000000 --- a/PubNub/Network/Parsers/Objects/PNChannelMembersParser.h +++ /dev/null @@ -1,25 +0,0 @@ -#import -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c channel's members request. - * - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNChannelMembersParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Objects/PNChannelMembersParser.m b/PubNub/Network/Parsers/Objects/PNChannelMembersParser.m deleted file mode 100644 index 9e69f408b..000000000 --- a/PubNub/Network/Parsers/Objects/PNChannelMembersParser.m +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNChannelMembersParser.h" - - -#pragma mark Interface implementation - -@implementation PNChannelMembersParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[ - @(PNSetChannelMembersOperation), - @(PNRemoveChannelMembersOperation), - @(PNManageChannelMembersOperation), - @(PNFetchChannelMembersOperation) - ]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSDictionary class]] && response[@"data"] && - ((NSNumber *)response[@"status"]).integerValue == 200) { - NSMutableDictionary *paginatedResponse = [@{ @"members": response[@"data"] } mutableCopy]; - - if (response[@"totalCount"]) { - paginatedResponse[@"totalCount"] = response[@"totalCount"]; - } - - if (response[@"next"]) { - paginatedResponse[@"next"] = response[@"next"]; - } - - if (response[@"prev"]) { - paginatedResponse[@"prev"] = response[@"prev"]; - } - - processedResponse = [paginatedResponse copy]; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/Objects/PNChannelMetadataChangeParser.h b/PubNub/Network/Parsers/Objects/PNChannelMetadataChangeParser.h deleted file mode 100644 index e33c0db74..000000000 --- a/PubNub/Network/Parsers/Objects/PNChannelMetadataChangeParser.h +++ /dev/null @@ -1,25 +0,0 @@ -#import -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c update \c channel \c metadata requests. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNChannelMetadataChangeParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Objects/PNChannelMetadataChangeParser.m b/PubNub/Network/Parsers/Objects/PNChannelMetadataChangeParser.m deleted file mode 100644 index 9acf2b585..000000000 --- a/PubNub/Network/Parsers/Objects/PNChannelMetadataChangeParser.m +++ /dev/null @@ -1,43 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNChannelMetadataChangeParser.h" - - -#pragma mark Interface implementation - -@implementation PNChannelMetadataChangeParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[@(PNSetChannelMetadataOperation)]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSDictionary class]] && response[@"data"] && - ((NSNumber *)response[@"status"]).integerValue == 200) { - - processedResponse = @{ @"channel": response[@"data"] }; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/Objects/PNFetchChannelsMetadataParser.h b/PubNub/Network/Parsers/Objects/PNFetchChannelsMetadataParser.h deleted file mode 100644 index 673da9402..000000000 --- a/PubNub/Network/Parsers/Objects/PNFetchChannelsMetadataParser.h +++ /dev/null @@ -1,25 +0,0 @@ -#import -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c fetch \c channel(s) \c metadata requests. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchChannelsMetadataParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Objects/PNFetchChannelsMetadataParser.m b/PubNub/Network/Parsers/Objects/PNFetchChannelsMetadataParser.m deleted file mode 100644 index f257066d9..000000000 --- a/PubNub/Network/Parsers/Objects/PNFetchChannelsMetadataParser.m +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNFetchChannelsMetadataParser.h" - - -#pragma mark Interface implementation - -@implementation PNFetchChannelsMetadataParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[@(PNFetchChannelMetadataOperation), @(PNFetchAllChannelsMetadataOperation)]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSDictionary class]] && response[@"data"] && - ((NSNumber *)response[@"status"]).integerValue == 200) { - - if ([response[@"data"] isKindOfClass:[NSDictionary class]]) { - processedResponse = @{ @"channel": response[@"data"] }; - } else if ([response[@"data"] isKindOfClass:[NSArray class]]) { - NSMutableDictionary *paginatedResponse = [@{ @"channels": response[@"data"] } mutableCopy]; - - if (response[@"totalCount"]) { - paginatedResponse[@"totalCount"] = response[@"totalCount"]; - } - - if (response[@"next"]) { - paginatedResponse[@"next"] = response[@"next"]; - } - - if (response[@"prev"]) { - paginatedResponse[@"prev"] = response[@"prev"]; - } - - processedResponse = [paginatedResponse copy]; - } - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/Objects/PNFetchUUIDMetadataParser.h b/PubNub/Network/Parsers/Objects/PNFetchUUIDMetadataParser.h deleted file mode 100644 index cb4cd8fcb..000000000 --- a/PubNub/Network/Parsers/Objects/PNFetchUUIDMetadataParser.h +++ /dev/null @@ -1,25 +0,0 @@ -#import -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c fetch \c UUID(s) \c metadata requests. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNFetchUUIDMetadataParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Objects/PNFetchUUIDMetadataParser.m b/PubNub/Network/Parsers/Objects/PNFetchUUIDMetadataParser.m deleted file mode 100644 index 6bb29a721..000000000 --- a/PubNub/Network/Parsers/Objects/PNFetchUUIDMetadataParser.m +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNFetchUUIDMetadataParser.h" - - -#pragma mark Interface implementation - -@implementation PNFetchUUIDMetadataParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[@(PNFetchUUIDMetadataOperation), @(PNFetchAllUUIDMetadataOperation)]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSDictionary class]] && response[@"data"] && - ((NSNumber *)response[@"status"]).integerValue == 200) { - - if ([response[@"data"] isKindOfClass:[NSDictionary class]]) { - processedResponse = @{ @"uuid": response[@"data"] }; - } else if ([response[@"data"] isKindOfClass:[NSArray class]]) { - NSMutableDictionary *paginatedResponse = [@{ @"uuids": response[@"data"] } mutableCopy]; - - if (response[@"totalCount"]) { - paginatedResponse[@"totalCount"] = response[@"totalCount"]; - } - - if (response[@"next"]) { - paginatedResponse[@"next"] = response[@"next"]; - } - - if (response[@"prev"]) { - paginatedResponse[@"prev"] = response[@"prev"]; - } - - processedResponse = [paginatedResponse copy]; - } - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/Objects/PNMembershipsParser.h b/PubNub/Network/Parsers/Objects/PNMembershipsParser.h deleted file mode 100644 index c5c39f7f2..000000000 --- a/PubNub/Network/Parsers/Objects/PNMembershipsParser.h +++ /dev/null @@ -1,25 +0,0 @@ -#import -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c UUID's memberships request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNMembershipsParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Objects/PNMembershipsParser.m b/PubNub/Network/Parsers/Objects/PNMembershipsParser.m deleted file mode 100644 index 60d7b29ed..000000000 --- a/PubNub/Network/Parsers/Objects/PNMembershipsParser.m +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNMembershipsParser.h" - - -#pragma mark Interface implementation - -@implementation PNMembershipsParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[ - @(PNSetMembershipsOperation), - @(PNRemoveMembershipsOperation), - @(PNManageMembershipsOperation), - @(PNFetchMembershipsOperation) - ]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSDictionary class]] && response[@"data"] && - ((NSNumber *)response[@"status"]).integerValue == 200) { - NSMutableDictionary *paginatedResponse = [@{ @"memberships": response[@"data"] } mutableCopy]; - - if (response[@"totalCount"]) { - paginatedResponse[@"totalCount"] = response[@"totalCount"]; - } - - if (response[@"next"]) { - paginatedResponse[@"next"] = response[@"next"]; - } - - if (response[@"prev"]) { - paginatedResponse[@"prev"] = response[@"prev"]; - } - - processedResponse = [paginatedResponse copy]; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/Objects/PNObjectsRemoveParser.h b/PubNub/Network/Parsers/Objects/PNObjectsRemoveParser.h deleted file mode 100644 index 8003ea826..000000000 --- a/PubNub/Network/Parsers/Objects/PNObjectsRemoveParser.h +++ /dev/null @@ -1,25 +0,0 @@ -#import -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c object \c remove request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNObjectsRemoveParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Objects/PNObjectsRemoveParser.m b/PubNub/Network/Parsers/Objects/PNObjectsRemoveParser.m deleted file mode 100644 index 23dfd7ee7..000000000 --- a/PubNub/Network/Parsers/Objects/PNObjectsRemoveParser.m +++ /dev/null @@ -1,43 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNObjectsRemoveParser.h" - - -#pragma mark Interface implementation - -@implementation PNObjectsRemoveParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[@(PNRemoveUUIDMetadataOperation), @(PNRemoveChannelMetadataOperation)]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSDictionary class]] && - ((NSNumber *)response[@"status"]).integerValue == 200) { - - processedResponse = @{}; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/Objects/PNUUIDMetadataChangeParser.h b/PubNub/Network/Parsers/Objects/PNUUIDMetadataChangeParser.h deleted file mode 100644 index 9e18fe617..000000000 --- a/PubNub/Network/Parsers/Objects/PNUUIDMetadataChangeParser.h +++ /dev/null @@ -1,25 +0,0 @@ -#import -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \b PubNub service response parser for \c update \c UUID \c metadata requests. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNUUIDMetadataChangeParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/Objects/PNUUIDMetadataChangeParser.m b/PubNub/Network/Parsers/Objects/PNUUIDMetadataChangeParser.m deleted file mode 100644 index 214efb61b..000000000 --- a/PubNub/Network/Parsers/Objects/PNUUIDMetadataChangeParser.m +++ /dev/null @@ -1,43 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNUUIDMetadataChangeParser.h" - - -#pragma mark Interface implementation - -@implementation PNUUIDMetadataChangeParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[@(PNSetUUIDMetadataOperation)]; -} - -+ (BOOL)requireAdditionalData { - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSDictionary class]] && response[@"data"] && - ((NSNumber *)response[@"status"]).integerValue == 200) { - - processedResponse = @{ @"uuid": response[@"data"] }; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNChannelGroupAuditionParser.h b/PubNub/Network/Parsers/PNChannelGroupAuditionParser.h deleted file mode 100644 index 57ba93721..000000000 --- a/PubNub/Network/Parsers/PNChannelGroupAuditionParser.h +++ /dev/null @@ -1,40 +0,0 @@ -#import -#import "PNParser.h" - - -/** - @brief Class suitable to handle and process \b PubNub service response on channels for group and channel - groups list audit request. - @discussion Handle and pre-process provided server data to fetch operation result from it. - @discussion Expected input for channel groups list audit: - - @code -{ - "channel-groups": [ - NSString, - ... - ] -} - @endcode - @discussion Expected input for group channels list audit: - - @code -{ - "channels": [ - NSString, - ... - ] -} - @endcode - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNChannelGroupAuditionParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNChannelGroupAuditionParser.m b/PubNub/Network/Parsers/PNChannelGroupAuditionParser.m deleted file mode 100644 index 18d545da6..000000000 --- a/PubNub/Network/Parsers/PNChannelGroupAuditionParser.m +++ /dev/null @@ -1,49 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNChannelGroupAuditionParser.h" -#import "PNDictionary.h" - - -#pragma mark Interface implementation - -@implementation PNChannelGroupAuditionParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(PNChannelGroupsOperation), @(PNChannelsForGroupOperation)]; -} - -+ (BOOL)requireAdditionalData { - - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - - // To handle case when response is unexpected for this type of operation processed value sent through - // 'nil' initialized local variable. - NSDictionary *processedResponse = nil; - - // Dictionary is valid response type for channel group audition response. - if ([response isKindOfClass:[NSDictionary class]] && response[@"payload"]) { - - processedResponse = @{@"channels": (response[@"payload"][@"channels"]?: @[]), - @"groups": (response[@"payload"][@"groups"]?: @[])}; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNChannelGroupModificationParser.h b/PubNub/Network/Parsers/PNChannelGroupModificationParser.h deleted file mode 100644 index ca7003e77..000000000 --- a/PubNub/Network/Parsers/PNChannelGroupModificationParser.h +++ /dev/null @@ -1,29 +0,0 @@ -#import -#import "PNParser.h" - - -/** - @brief Class suitable to handle and process \b PubNub service response on channel group and channel - group channels manipulation request. - @discussion Handle and pre-process provided server data to fetch operation status from it. - @discussion Expected input: - - @code -{ - "error": @BOOL, - "status": @BOOL, - "information": NSString -} - @endcode - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNChannelGroupModificationParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNChannelGroupModificationParser.m b/PubNub/Network/Parsers/PNChannelGroupModificationParser.m deleted file mode 100644 index f4993b104..000000000 --- a/PubNub/Network/Parsers/PNChannelGroupModificationParser.m +++ /dev/null @@ -1,48 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNChannelGroupModificationParser.h" - - -#pragma mark Interface implementation - -@implementation PNChannelGroupModificationParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(PNAddChannelsToGroupOperation), @(PNRemoveChannelsFromGroupOperation), - @(PNRemoveGroupOperation)]; -} - -+ (BOOL)requireAdditionalData { - - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - - // To handle case when response is unexpected for this type of operation processed value sent through - // 'nil' initialized local variable. - NSDictionary *processedResponse = nil; - - // Dictionary is valid response type for channel group modification response. - if ([response isKindOfClass:[NSDictionary class]] && response[@"message"] && response[@"error"]) { - - processedResponse = @{}; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNClientStateParser.h b/PubNub/Network/Parsers/PNClientStateParser.h deleted file mode 100644 index 424373a7c..000000000 --- a/PubNub/Network/Parsers/PNClientStateParser.h +++ /dev/null @@ -1,21 +0,0 @@ -#import "PNParser.h" - - -/** - * @brief Class suitable to handle and process \b PubNub service response on client state - * modification and audit request. - * - * @discussion Handle and pre-process provided server data to fetch operation result from it. - * - * - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNClientStateParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNClientStateParser.m b/PubNub/Network/Parsers/PNClientStateParser.m deleted file mode 100644 index 079d216ee..000000000 --- a/PubNub/Network/Parsers/PNClientStateParser.m +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNClientStateParser.h" - - -#pragma mark Interface implementation - -@implementation PNClientStateParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(PNSetStateOperation), @(PNGetStateOperation), @(PNStateForChannelOperation), - @(PNStateForChannelGroupOperation)]; -} - -+ (BOOL)requireAdditionalData { - - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - - NSMutableDictionary *processedResponse = nil; - - // Dictionary is valid response type for state update / audit. - if ([response isKindOfClass:[NSDictionary class]] && - ((NSNumber *)response[@"status"]).integerValue == 200){ - - processedResponse = [@{ @"state": (response[@"payload"] ?: @{}) } mutableCopy]; - NSDictionary *channelsState = response[@"payload"][@"channels"] ?: @{}; - - if (response[@"channel"]) { - channelsState = @{ response[@"channel"]: processedResponse[@"state"] }; - } - - processedResponse[@"channels"] = channelsState; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNErrorParser.h b/PubNub/Network/Parsers/PNErrorParser.h deleted file mode 100644 index 17a53f365..000000000 --- a/PubNub/Network/Parsers/PNErrorParser.h +++ /dev/null @@ -1,27 +0,0 @@ -#import -#import "PNParser.h" - - -/** - @brief Class suitable to handle and process \b PubNub service error response for one of - operation requests. - @discussion Handle and pre-process provided server data to fetch time token from it. - @discussion Expected input: - - @code -{ - "tt": NSNumber -} - @endcode - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNErrorParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNErrorParser.m b/PubNub/Network/Parsers/PNErrorParser.m deleted file mode 100644 index 23b289025..000000000 --- a/PubNub/Network/Parsers/PNErrorParser.m +++ /dev/null @@ -1,108 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNErrorParser.h" -#import "PNDictionary.h" - - -#pragma mark Interface implementation - -@implementation PNErrorParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(-1)]; -} - -+ (BOOL)requireAdditionalData { - - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - // To handle case when response is unexpected for this type of operation processed value sent through - // 'nil' initialized local variable. - NSDictionary *processedResponse = nil; - - // Dictionary is valid response type for operation error. - if ([response isKindOfClass:[NSDictionary class]]) { - NSMutableDictionary *errorData = [NSMutableDictionary new]; - - if (response[@"message"] || response[@"error"]) { - id errorDescription = response[@"error"]; - - if (!errorDescription || - ([errorDescription isKindOfClass:[NSNumber class]] && response[@"error_message"])) { - - errorDescription = response[@"error_message"]; - } - - if ([errorDescription isKindOfClass:[NSDictionary class]] && - errorDescription[@"message"]) { - NSMutableArray *errorDetails = errorDescription[@"details"]; - errorDescription = errorDescription[@"message"]; - - if (errorDetails.count) { - NSMutableArray *detailStrings = [NSMutableArray new]; - - for (NSDictionary *details in errorDetails) { - NSString *detailString = @""; - - if (details[@"message"]) { - detailString = [@"- " stringByAppendingString:details[@"message"]]; - } - - if (details[@"location"]) { - detailString = [detailString stringByAppendingFormat:@"%@ Location: %@", - detailString.length ? @"" : @"-", details[@"location"]]; - } - - [detailStrings addObject:detailString]; - } - - if (detailStrings.count) { - errorDescription = [errorDescription stringByAppendingFormat:@" Details:\n%@", - [detailStrings componentsJoinedByString:@"\n"]]; - } - } - } - - errorData[@"information"] = response[@"message"] ?: errorDescription; - } - - if (response[@"payload"]) { - errorData[@"channels"] = response[@"payload"][@"channels"] ?: @[]; - errorData[@"channelGroups"] = response[@"payload"][@"channel-groups"] ?: @[]; - - if (!response[@"payload"][@"channels"] && !response[@"payload"][@"channel-groups"]) { - errorData[@"data"] = response[@"payload"]; - } - } - - if ([response[@"status"] isKindOfClass:[NSNumber class]]) { - errorData[@"status"] = response[@"status"]; - } - - processedResponse = errorData; - } else if ([response isKindOfClass:[NSArray class]]) { - // Signals API error handling. - if (((NSArray *)response).count == 3) { - processedResponse = @{ @"information": (NSArray *)response[1] }; - } - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNHeartbeatParser.h b/PubNub/Network/Parsers/PNHeartbeatParser.h deleted file mode 100644 index c38ebf475..000000000 --- a/PubNub/Network/Parsers/PNHeartbeatParser.h +++ /dev/null @@ -1,18 +0,0 @@ -#import -#import "PNParser.h" - -/** - @brief Class suitable to handle and process \b PubNub service response on heartbeat request. - @discussion Handle and pre-process provided server data to fetch operation result from it. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNHeartbeatParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNHeartbeatParser.m b/PubNub/Network/Parsers/PNHeartbeatParser.m deleted file mode 100644 index 4f15db681..000000000 --- a/PubNub/Network/Parsers/PNHeartbeatParser.m +++ /dev/null @@ -1,47 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNHeartbeatParser.h" - - -#pragma mark Interface implementation - -@implementation PNHeartbeatParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(PNHeartbeatOperation)]; -} - -+ (BOOL)requireAdditionalData { - - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - - // To handle case when response is unexpected for this type of operation processed value sent through - // 'nil' initialized local variable. - NSDictionary *processedResponse = nil; - - // Dictionary is valid response type for heartbeat request. - if ([response isKindOfClass:[NSDictionary class]] && response[@"status"] && response[@"service"] && - [response[@"status"] isEqual: @200] && [response[@"service"] isEqualToString:@"Presence"]) { - - processedResponse = @{}; - } - - return processedResponse; -} - -#pragma mark - - -@end diff --git a/PubNub/Network/Parsers/PNHistoryParser.h b/PubNub/Network/Parsers/PNHistoryParser.h deleted file mode 100644 index 16e142042..000000000 --- a/PubNub/Network/Parsers/PNHistoryParser.h +++ /dev/null @@ -1,27 +0,0 @@ -#import -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief Class suitable to handle and process \b PubNub service response on channel history request. - * - * @discussion Handle and pre-process provided server data to fetch operation result from it. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNHistoryParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/PNHistoryParser.m b/PubNub/Network/Parsers/PNHistoryParser.m deleted file mode 100644 index 4b15bcd8b..000000000 --- a/PubNub/Network/Parsers/PNHistoryParser.m +++ /dev/null @@ -1,272 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.9.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNHistoryParser.h" -#import "PubNub+CorePrivate.h" -#import "PNCryptoProvider.h" -#import "PNConstants.h" -#import "PNLogMacro.h" -#import "PNLLogger.h" -#import "PNHelpers.h" -#import "PNAES.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface declaration - -@interface PNHistoryParser () - -/** - * @brief Process list of messages. - * - * @discussion Processing may include message decryption and mobile payload format restore. - * - * @param messages List of messages which should be processed. - * @param additionalData Dictionary which may contain additional data which maybe required during - * messages processing. - * - * @return Parsed message / event entries from history. - * - * @since 4.5.6 - */ -+ (NSMutableDictionary *)processedMessagesFrom:(nullable NSArray *)messages - withData:(nullable NSDictionary *)additionalData; - - -#pragma mark - Misc - -/** - * @brief Iterate through action senders and replace \a NSString \c actionTimetoken with \a NSNumber - * value. - * - * @param actionsForTypes List contains set of values for various \c action type (\c receip, - * \c reaction and \c custom). - * - * @since 4.11.0 - */ -+ (void)normalizeActionTimetokens:(NSArray *)actionsForTypes; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNHistoryParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[ - @(PNHistoryOperation), - @(PNHistoryForChannelsOperation), - @(PNHistoryWithActionsOperation) - ]; -} - -+ (BOOL)requireAdditionalData { - return YES; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response - withData:(NSDictionary *)additionalData { - - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSArray class]] && ((NSArray *)response).count == 3) { - NSArray *messages = (NSArray *)response[0]; - NSMutableDictionary *data = [@{ - @"start": (NSArray *)response[1], - @"end": (NSArray *)response[2], - @"messages": [NSMutableArray new] - } mutableCopy]; - - if ([messages isKindOfClass:[NSArray class]]) { - NSMutableDictionary *processedMessages = [self processedMessagesFrom:messages - withData:additionalData]; - - if (processedMessages[@"messages"]) { - data[@"messages"] = processedMessages[@"messages"]; - } - - if (processedMessages[@"decryptError"]) { - data[@"decryptError"] = @YES; - } - } else if ([messages isKindOfClass:[NSString class]]) { - data = [@{ @"status": @(403), @"information": messages, @"error": @YES } mutableCopy]; - data[@"apiError"] = @YES; - } - - processedResponse = data; - } else if ([response isKindOfClass:[NSDictionary class]] && - response[@"channels"] && response[@"status"]) { - - NSMutableDictionary *data = [@{@"channels": [NSMutableDictionary new]} mutableCopy]; - NSDictionary *channels = response[@"channels"]; - - [channels enumerateKeysAndObjectsUsingBlock:^(NSString *channel, NSArray *messages, - __unused BOOL *stop) { - - NSMutableDictionary *processedMessages = [self processedMessagesFrom:messages - withData:additionalData]; - data[@"channels"][channel] = processedMessages[@"messages"] ?: @[]; - - if (processedMessages[@"decryptError"]) { - data[@"decryptError"] = @YES; - } - }]; - - processedResponse = data; - } - - return processedResponse; -} - -+ (NSMutableDictionary *)processedMessagesFrom:(NSArray *)messages - withData:(NSDictionary *)additionalData { - - NSMutableDictionary *data = [@{@"messages": [NSMutableArray new]} mutableCopy]; - [messages enumerateObjectsUsingBlock:^(id messageObject, __unused NSUInteger messageObjectIdx, - __unused BOOL *messageObjectEnumeratorStop) { - - NSArray *actions = nil; - NSDictionary *metadata = nil; - NSNumber *messageType = nil; - NSString *senderUUID = nil; - id message = messageObject; - NSNumber *timeToken = nil; - - if ([messageObject isKindOfClass:[NSDictionary class]] && messageObject[@"message"] && - (messageObject[@"timetoken"] || messageObject[@"meta"] || messageObject[@"actions"] || - messageObject[@"message_type"] || messageObject[@"uuid"])) { - - messageType = messageObject[@"message_type"]; - timeToken = messageObject[@"timetoken"]; - message = messageObject[@"message"]; - actions = messageObject[@"actions"]; - senderUUID = messageObject[@"uuid"]; - metadata = messageObject[@"meta"]; - messageObject = message; - - if (![metadata isKindOfClass:[NSDictionary class]]) { - metadata = nil; - } - - timeToken = timeToken ? @(((NSString *)timeToken).longLongValue) : nil; - [self normalizeActionTimetokens:((NSDictionary *)actions).allValues]; - } - - if (additionalData[@"cryptoModule"]) { - id cryptoModule = additionalData[@"cryptoModule"]; - BOOL isDictionary = [message isKindOfClass:[NSDictionary class]]; - NSError *decryptionError; - id decryptedMessage = nil; - id encryptedData = isDictionary ? ((NSDictionary *)message)[@"pn_other"] : message; - - if ([encryptedData isKindOfClass:[NSString class]]) { - NSCharacterSet *trimCharSet = [NSCharacterSet characterSetWithCharactersInString:@"\""]; - encryptedData = [PNString base64DataFrom:[encryptedData stringByTrimmingCharactersInSet:trimCharSet]]; - PNResult *decryptResult = [cryptoModule decryptData:encryptedData]; - NSString *decryptedEventData = nil; - - if (decryptResult.isError) decryptionError = decryptResult.error; - else decryptedEventData = [[NSString alloc] initWithData:decryptResult.data encoding:NSUTF8StringEncoding]; - - // In case if decrypted message (because of error suppression) is equal to original - // message, there is no need to retry JSON de-serialization. - if (decryptedEventData && ![decryptedEventData isEqualToString:encryptedData]) { - decryptedMessage = [PNJSON JSONObjectFrom:decryptedEventData withError:nil]; - } - } - - if (decryptionError || !decryptedMessage) { - PNLLogger *logger = [PNLLogger loggerWithIdentifier:kPNClientIdentifier]; -#ifndef PUBNUB_DISABLE_LOGGER - [logger enableLogLevel:PNAESErrorLogLevel]; -#endif // PUBNUB_DISABLE_LOGGER - PNLogAESError(logger, @" History entry decryption error: %@", - decryptionError); - data[@"decryptError"] = @YES; - - // Restore message to original form. - message = messageObject; - } else { - if (isDictionary) { - NSMutableDictionary *mutableMessage = [(NSDictionary *)message mutableCopy]; - [mutableMessage removeObjectForKey:@"pn_other"]; - - if (![decryptedMessage isKindOfClass:[NSDictionary class]]) { - mutableMessage[@"pn_other"] = decryptedMessage; - } else { - [mutableMessage addEntriesFromDictionary:decryptedMessage]; - } - - decryptedMessage = [mutableMessage copy]; - } - - message = decryptedMessage; - } - } - - if (message) { - if (timeToken || metadata || actions || messageType || senderUUID) { - NSMutableDictionary *messageWithInfo = [@{ @"message": message } mutableCopy]; - - if ([messageType isKindOfClass:[NSNumber class]]) { - messageWithInfo[@"messageType"] = messageType; - } - - if (timeToken) { - messageWithInfo[@"timetoken"] = timeToken; - } - - if (metadata) { - messageWithInfo[@"metadata"] = metadata; - } - - if (actions) { - messageWithInfo[@"actions"] = actions; - } - - if (senderUUID.length) { - messageWithInfo[@"uuid"] = senderUUID; - } - - message = messageWithInfo; - } - - [data[@"messages"] addObject:message]; - } - }]; - - return data; -} - -#pragma mark - Misc - -+ (void)normalizeActionTimetokens:(NSArray *)actionsForTypes { - for (NSMutableDictionary *actionValues in actionsForTypes) { - for (NSString *actionValue in actionValues) { - for (NSMutableDictionary *action in actionValues[actionValue]) { - action[@"actionTimetoken"] = @(((NSString *)action[@"actionTimetoken"]).longLongValue); - } - } - } -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNLeaveParser.h b/PubNub/Network/Parsers/PNLeaveParser.h deleted file mode 100644 index 7ee890603..000000000 --- a/PubNub/Network/Parsers/PNLeaveParser.h +++ /dev/null @@ -1,18 +0,0 @@ -#import -#import "PNParser.h" - -/** - @brief Class suitable to handle and process \b PubNub service response on presence leave request. - @discussion Handle and pre-process provided server data to fetch operation result from it. - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNLeaveParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNLeaveParser.m b/PubNub/Network/Parsers/PNLeaveParser.m deleted file mode 100644 index af473bd70..000000000 --- a/PubNub/Network/Parsers/PNLeaveParser.m +++ /dev/null @@ -1,44 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNLeaveParser.h" - - -#pragma mark Interface implementation - -@implementation PNLeaveParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(PNUnsubscribeOperation)]; -} - -+ (BOOL)requireAdditionalData { - - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - - // To handle case when response is unexpected for this type of operation processed value sent - // through 'nil' initialized local variable. - NSDictionary *processedResponse = nil; - - // Dictionary is valid response type for presence leave request. - if ([response isKindOfClass:[NSDictionary class]]) { processedResponse = @{}; } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNMessageCountParser.h b/PubNub/Network/Parsers/PNMessageCountParser.h deleted file mode 100644 index 58bac4af8..000000000 --- a/PubNub/Network/Parsers/PNMessageCountParser.h +++ /dev/null @@ -1,25 +0,0 @@ -#import -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief Class suitable to handle and process \b PubNub service response on channel history request. - * @discussion Handle and pre-process provided server data to fetch operation result from it. - * - * @since 4.8.4 - * - * @author Sergey Mamontov - * @version 4.8.3 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNMessageCountParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/PNMessageCountParser.m b/PubNub/Network/Parsers/PNMessageCountParser.m deleted file mode 100644 index a9785daa7..000000000 --- a/PubNub/Network/Parsers/PNMessageCountParser.m +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @since 4.8.4 - * - * @author Sergey Mamontov - * @version 4.8.3 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNMessageCountParser.h" - - -#pragma mark Interface implementation - -@implementation PNMessageCountParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(PNMessageCountOperation)]; -} - -+ (BOOL)requireAdditionalData { - - return YES; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response - withData:(id)__unused data { - - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSDictionary class]] && response[@"channels"] && - response[@"status"]) { - - processedResponse = @{ @"channels": response[@"channels"] }; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNMessageDeleteParser.h b/PubNub/Network/Parsers/PNMessageDeleteParser.h deleted file mode 100644 index 1e65ca4c3..000000000 --- a/PubNub/Network/Parsers/PNMessageDeleteParser.h +++ /dev/null @@ -1,18 +0,0 @@ -#import -#import "PNParser.h" - -/** - @brief Class suitable to handle and process \b PubNub service response on messages deletion request. - @discussion Handle and pre-process provided server data to fetch operation result from it. - - @author Sergey Mamontov - @since 4.7.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNMessageDeleteParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNMessageDeleteParser.m b/PubNub/Network/Parsers/PNMessageDeleteParser.m deleted file mode 100644 index dbda2fde7..000000000 --- a/PubNub/Network/Parsers/PNMessageDeleteParser.m +++ /dev/null @@ -1,44 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.7.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNMessageDeleteParser.h" - - -#pragma mark Interface implementation - -@implementation PNMessageDeleteParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(PNDeleteMessageOperation)]; -} - -+ (BOOL)requireAdditionalData { - - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - - // To handle case when response is unexpected for this type of operation processed value sent - // through 'nil' initialized local variable. - NSDictionary *processedResponse = nil; - - // Dictionary is valid response type for message delete request. - if ([response isKindOfClass:[NSDictionary class]]) { processedResponse = @{}; } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNMessagePublishParser.h b/PubNub/Network/Parsers/PNMessagePublishParser.h deleted file mode 100644 index d460cbd8e..000000000 --- a/PubNub/Network/Parsers/PNMessagePublishParser.h +++ /dev/null @@ -1,30 +0,0 @@ -#import -#import "PNParser.h" - - -/** - * @brief Class suitable to handle and process \b PubNub service response on message publish - * request. - * - * @discussion Handle and pre-process provided server data to fetch operation result from it. - * Expected input: - * - * @code - * { - * "status": @BOOL, - * "information": NSString, - * "timetoken": NSNumber - * } - * @endcode - * - * @author Serhii Mamontov - * @since 4.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNMessagePublishParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNMessagePublishParser.m b/PubNub/Network/Parsers/PNMessagePublishParser.m deleted file mode 100644 index ff6b39ea1..000000000 --- a/PubNub/Network/Parsers/PNMessagePublishParser.m +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @author Serhii Mamontov - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNMessagePublishParser.h" -#import "PNDictionary.h" - - -@implementation PNMessagePublishParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(PNPublishFileMessageOperation), @(PNPublishOperation), @(PNSignalOperation)]; -} - -+ (BOOL)requireAdditionalData { - - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - - /** - * To handle case when response is unexpected for this type of operation processed value sent - * through 'nil' initialized local variable. - */ - NSDictionary *processedResponse = nil; - - /** - * Response in form of array arrive in two cases: publish successful and failed. - * In case if no valid Foundation object has been passed it is possible what service returned - * HTML and it should be treated as data publish error. - */ - if ([response isKindOfClass:[NSArray class]] || !response) { - NSString *information = @"Message Not Published"; - NSNumber *timeToken = nil; - - if (((NSArray *)response).count == 3) { - information = response[1]; - - if ([response[2] isKindOfClass:[NSString class]]) { - const char *token = [(NSString *)response[2] cStringUsingEncoding:NSUTF8StringEncoding]; - timeToken = @(strtoull(token, NULL, 0)); - } else { - timeToken = response[2]; - } - } else { - timeToken = @((unsigned long long)([[NSDate date] timeIntervalSince1970] * 10000000)); - } - - processedResponse = @{@"information": information, @"timetoken": timeToken}; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNPresenceHereNowParser.h b/PubNub/Network/Parsers/PNPresenceHereNowParser.h deleted file mode 100644 index ef4512856..000000000 --- a/PubNub/Network/Parsers/PNPresenceHereNowParser.h +++ /dev/null @@ -1,21 +0,0 @@ -#import -#import "PNParser.h" - - -/** - * @brief Class suitable to handle and process \b PubNub service response on here now global and here now channel request. - * - * @discussion Handle and pre-process provided server data to fetch operation result from it. - * - * @author Serhii Mamontov - * @version 4.15.8 - * @since 4.0.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNPresenceHereNowParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNPresenceHereNowParser.m b/PubNub/Network/Parsers/PNPresenceHereNowParser.m deleted file mode 100644 index 2b2d29cf6..000000000 --- a/PubNub/Network/Parsers/PNPresenceHereNowParser.m +++ /dev/null @@ -1,161 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.15.8 - * @since 4.0.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNPresenceHereNowParser.h" -#import "PNDictionary.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface - -@interface PNPresenceHereNowParser () - - -#pragma mark - Misc - -/** - * @brief Extract uuids information from \c service response data. - * - * @param serviceData Reference on response which contains information about channel's participants. - * - * @return Parsed UUIDs data. - */ -+ (NSArray *)uuidsData:(NSArray *)serviceData; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNPresenceHereNowParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[@(PNHereNowGlobalOperation), @(PNHereNowForChannelOperation), - @(PNHereNowForChannelGroupOperation)]; -} - -+ (BOOL)requireAdditionalData { - return YES; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response withData:(NSDictionary *)data { - NSDictionary *processedResponse = nil; - - if ([response isKindOfClass:[NSDictionary class]]) { - NSDictionary *hereNowData = nil; - NSString *channel = nil; - - if (response[@"uuids"] || response[@"occupancy"]) { - NSString *requestURLString = ((NSURL *)data[@"url"]).absoluteString; - - if (requestURLString) { - NSString *pattern = @"channel\\/(.*)\\?"; - NSRegularExpressionOptions options = NSRegularExpressionCaseInsensitive; - NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern - options:options - error:nil]; - - NSRange matchRange = NSMakeRange(0, requestURLString.length); - NSArray *matches = [regex matchesInString:requestURLString - options:(NSMatchingOptions)0 - range:matchRange]; - - if (matches.count > 0 && matches.firstObject.numberOfRanges > 1) { - NSRange matchedRange = [matches.firstObject rangeAtIndex:1]; - channel = [requestURLString substringWithRange:matchedRange]; - } - } - } - - if (response[@"payload"][@"channels"]) { - NSMutableDictionary *data = [@{ - @"totalChannels": response[@"payload"][@"total_channels"], - @"totalOccupancy": response[@"payload"][@"total_occupancy"], - @"channels": [NSMutableDictionary new] - } mutableCopy]; - - for (NSString *channelName in response[@"payload"][@"channels"]) { - NSDictionary *channelData = response[@"payload"][@"channels"][channelName]; - NSMutableDictionary *parsedChannelData = [@{ - @"occupancy": channelData[@"occupancy"] - } mutableCopy]; - - if (channelData[@"uuids"]) { - parsedChannelData[@"uuids"] = [self uuidsData:channelData[@"uuids"]]; - } - - data[@"channels"][channelName] = parsedChannelData; - } - - hereNowData = data; - } else if (response[@"uuids"]) { - hereNowData = @{ - @"occupancy": response[@"occupancy"], - @"uuids": [self uuidsData:response[@"uuids"]] - }; - - if (channel) { - hereNowData = @{ - @"channels": @{ channel: hereNowData } - }; - } - } else if (response[@"occupancy"]) { - hereNowData = @{ @"occupancy": response[@"occupancy"] }; - - if (channel) { - hereNowData = @{ - @"channels": @{ channel: hereNowData } - }; - } - } - - processedResponse = hereNowData; - } - - return processedResponse; -} - - -#pragma mark - Misc - -+ (NSArray *)uuidsData:(NSArray *)serviceData { - NSMutableArray *parsedUUIDData = [NSMutableArray new]; - - for (id uuidData in serviceData) { - id parsedData = uuidData; - - if ([uuidData respondsToSelector:@selector(count)]) { - NSMutableDictionary *data = [@{@"uuid":uuidData[@"uuid"]} mutableCopy]; - - if (uuidData[@"state"]) { - data[@"state"] = uuidData[@"state"]; - } - - parsedData = data; - } - - [parsedUUIDData addObject:parsedData]; - } - - return [parsedUUIDData copy]; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNPresenceWhereNowParser.h b/PubNub/Network/Parsers/PNPresenceWhereNowParser.h deleted file mode 100644 index 8f4778127..000000000 --- a/PubNub/Network/Parsers/PNPresenceWhereNowParser.h +++ /dev/null @@ -1,29 +0,0 @@ -#import -#import "PNParser.h" - - -/** - @brief Class suitable to handle and process \b PubNub service response on where now presence request. - @discussion Handle and pre-process provided server data to fetch operation result from it. - @discussion Expected input: - - @code -{ - "channels": [ - NSString, - ... - ] -} - @endcode - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNPresenceWhereNowParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNPresenceWhereNowParser.m b/PubNub/Network/Parsers/PNPresenceWhereNowParser.m deleted file mode 100644 index e5441e4ff..000000000 --- a/PubNub/Network/Parsers/PNPresenceWhereNowParser.m +++ /dev/null @@ -1,48 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNPresenceWhereNowParser.h" -#import "PNDictionary.h" - - -#pragma mark Interface implementation - -@implementation PNPresenceWhereNowParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(PNWhereNowOperation)]; -} - -+ (BOOL)requireAdditionalData { - - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - - // To handle case when response is unexpected for this type of operation processed value sent through - // 'nil' initialized local variable. - NSDictionary *processedResponse = nil; - - // Dictionary is valid response type for where now response. - if ([response isKindOfClass:[NSDictionary class]] && response[@"payload"][@"channels"]) { - - processedResponse = @{@"channels": response[@"payload"][@"channels"]}; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNPushNotificationsAuditParser.h b/PubNub/Network/Parsers/PNPushNotificationsAuditParser.h deleted file mode 100644 index abe4977ea..000000000 --- a/PubNub/Network/Parsers/PNPushNotificationsAuditParser.h +++ /dev/null @@ -1,32 +0,0 @@ -#import -#import "PNParser.h" - - -/** - * @brief Class suitable to handle and process \b PubNub service response on push notification - * enabled channgels list audit request. - * - * @discussion Handle and pre-process provided server data to fetch operation result from it. - * @discussion Expected input: - * - * @code - * { - * "channels": [ - * NSString, - * ... - * ] - * } - * @endcode - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNPushNotificationsAuditParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNPushNotificationsAuditParser.m b/PubNub/Network/Parsers/PNPushNotificationsAuditParser.m deleted file mode 100644 index 6e2af2ebd..000000000 --- a/PubNub/Network/Parsers/PNPushNotificationsAuditParser.m +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNPushNotificationsAuditParser.h" -#import "PNDictionary.h" - - -#pragma mark Interface implementation - -@implementation PNPushNotificationsAuditParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(PNPushNotificationEnabledChannelsOperation), - @(PNPushNotificationEnabledChannelsV2Operation)]; -} - -+ (BOOL)requireAdditionalData { - - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - - // To handle case when response is unexpected for this type of operation processed value sent through - // 'nil' initialized local variable. - NSDictionary *processedResponse = nil; - - // Array is valid response type for device removal from APNS request. - if ([response isKindOfClass:[NSArray class]]) { - - processedResponse = @{@"channels": (response?: @[])}; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNPushNotificationsStateModificationParser.h b/PubNub/Network/Parsers/PNPushNotificationsStateModificationParser.h deleted file mode 100644 index 7b333d3ec..000000000 --- a/PubNub/Network/Parsers/PNPushNotificationsStateModificationParser.h +++ /dev/null @@ -1,30 +0,0 @@ -#import -#import "PNParser.h" - - -/** - * @brief Class suitable to handle and process \b PubNub service response on push notifications - * state manipulation request. - * - * @discussion Handle and pre-process provided server data to fetch operation status from it. - * @discussion Expected input: - * - * @code - * { - * "status": @BOOL, - * "information": NSString - * } - * @endcode - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNPushNotificationsStateModificationParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNPushNotificationsStateModificationParser.m b/PubNub/Network/Parsers/PNPushNotificationsStateModificationParser.m deleted file mode 100644 index 1bf9f227e..000000000 --- a/PubNub/Network/Parsers/PNPushNotificationsStateModificationParser.m +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNPushNotificationsStateModificationParser.h" - - -#pragma mark Interface implementation - -@implementation PNPushNotificationsStateModificationParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(PNAddPushNotificationsOnChannelsOperation), - @(PNRemovePushNotificationsFromChannelsOperation), - @(PNRemoveAllPushNotificationsOperation), - @(PNAddPushNotificationsOnChannelsV2Operation), - @(PNRemovePushNotificationsFromChannelsV2Operation), - @(PNRemoveAllPushNotificationsV2Operation)]; -} - -+ (BOOL)requireAdditionalData { - - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - - // To handle case when response is unexpected for this type of operation processed value sent through - // 'nil' initialized local variable. - NSDictionary *processedResponse = nil; - - // Array is valid response type for device removal from APNS request. - if ([response isKindOfClass:[NSArray class]] && ((NSArray *)response).count == 2) { - - processedResponse = @{}; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNSubscribeParser.h b/PubNub/Network/Parsers/PNSubscribeParser.h deleted file mode 100644 index 371590149..000000000 --- a/PubNub/Network/Parsers/PNSubscribeParser.h +++ /dev/null @@ -1,27 +0,0 @@ -#import -#import "PNParser.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief Class suitable to handle and process \b PubNub service response on subscribe request. - * - * @discussion Handle and pre-process provided server data to fetch operation result from it. - * - * @author Serhii Mamontov - * @version 4.9.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNSubscribeParser : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Parsers/PNSubscribeParser.m b/PubNub/Network/Parsers/PNSubscribeParser.m deleted file mode 100644 index 087d85270..000000000 --- a/PubNub/Network/Parsers/PNSubscribeParser.m +++ /dev/null @@ -1,637 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.9.0 - * @since 4.0.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNSubscribeParser.h" -#import "PNEnvelopeInformation.h" -#import "PubNub+CorePrivate.h" -#import "PNCryptoProvider.h" -#import "PNConstants.h" -#import "PNLogMacro.h" -#import "PNLLogger.h" -#import "PNHelpers.h" -#import "PNAES.h" - - -#pragma mark Static - -/** - * @brief Key under which request status is stored. - */ -static NSString * const kPNResponseStatusKey = @"s"; - -/** - * @brief Key under which service advisory information stored. - */ -static NSString * const kPNResponseAdvisoryKey = @"a"; - -/** - * @brief Key under which stored information about when event has been triggered by server and from - * which region. - */ -static NSString * const kPNResponseEventTimeKey = @"t"; - -/** - * @brief Key under which list of events is stored. - */ -static NSString * const kPNResponseEventsListKey = @"m"; - - -#pragma mark - Structures - -/** - * @brief Structure with keys under which stored information about when event has been triggered and - * in which region (to which region client subscribed at this moment). - */ -struct PNEventTimeTokenStructure { - /** - * @brief Key under which stored high precision time token (on linuxtimestamp in case of - * presence events) on when event has been triggered. - */ - __unsafe_unretained NSString *timeToken; - - /** - * @brief Key under which stored numeric region identifier. - */ - __unsafe_unretained NSString *region; -} PNEventTimeToken = { - .timeToken = @"t", - .region = @"r" -}; - -/** - * @brief Structure with keys under which stored information about newly uploaded file. - * - * @since 4.15.0 - */ -struct PNFileMessageDataStructure { - /** - * @brief Key under which stored unique file identifier - */ - __unsafe_unretained NSString *identifier; - - /** - * @brief Key under which stored name under which file has been stored remotely. - */ - __unsafe_unretained NSString *filename; -} PNFileMessageData = { - .identifier = @"id", - .filename = @"name" -}; - -/** - * @brief Overall real-time event format. - */ -struct PNEventEnvelopeStructure { - /** - * @brief Describes structure to represent local time token (unixtimestamp casted to high - * precision). - */ - struct { - /** - * @brief Key under which sender time token information is stored. - */ - __unsafe_unretained NSString *key; - - /** - * @brief Time token information. - */ - struct PNEventTimeTokenStructure token; - } senderTimeToken; - - /** - * @brief Represent time when message has been received by \b PubNub service and passed to - * subscribers. - */ - struct { - /** - * @brief Key under which publish time token information is stored. - */ - __unsafe_unretained NSString *key; - - /** - * @brief Time token information. - */ - struct PNEventTimeTokenStructure token; - } publishTimeToken; - - /** - * @brief Key under which actual channel name on which event has been triggered. - */ - __unsafe_unretained NSString *channel; - - /** - * @brief Key under which stored name of the object on which client subscribed at this moment - * (can be: \c channel, \c group or \c wildcard). - */ - __unsafe_unretained NSString *subscriptionMatch; - - /** - * @brief Key under which stored event object data (can be user message for publish message or - * presence dictionary with information about event). - */ - __unsafe_unretained NSString *payload; - - struct { - /** - * @brief Key under which stored information about presence event type. - */ - __unsafe_unretained NSString *action; - - /** - * @brief Key under which stores information about client state on channel which triggered - * presence event. - */ - __unsafe_unretained NSString *data; - - /** - * @brief Key under which stored information about occupancy in channel which triggered - * event. - */ - __unsafe_unretained NSString *occupancy; - - /** - * @brief Key under which stored event triggering time token (unixtimestamp). - */ - __unsafe_unretained NSString *timestamp; - - /** - * @brief Unique client identifier which caused presence event triggering. - */ - __unsafe_unretained NSString *uuid; - - /** - * @brief Key under which stored difference in active subscribers (UUIDs) since last - * presence event has been triggered. - * - * @discussion Presence service after specified number of channel participants will send - * presence events at configured intervals and provide list of subscribers which joined - * since last interval or regular presence event has been sent. - * - * @since 4.5.16 - */ - __unsafe_unretained NSString *joined; - - /** - * @brief Key under which stored difference in active subscribers (UUIDs) since last - * presence event has been triggered. - * - * @discussion Presence service after specified number of channel participants will send - * presence events at configured intervals and provide list of subscribers which leaved - * since last interval or regular presence event has been sent. - * - * @since 4.5.16 - */ - __unsafe_unretained NSString *leaved; - - /** - * @brief Key under which stored difference in active subscribers (UUIDs) since last - * presence event has been triggered. - * - * @discussion Presence service after specified number of channel participants will send - * presence events at configured intervals and provide list of subscribers which leaved by - * timeout since last interval or regular presence event has been sent. - * - * @since 4.5.16 - */ - __unsafe_unretained NSString *timeouted; - } presence; - - struct { - /** - * @brief Key under which stored object event (\c create / \c update / \c delete). - */ - __unsafe_unretained NSString *event; - /** - * @brief Key under which stored event source name (service which triggered event). - */ - __unsafe_unretained NSString *source; - - /** - * @brief Key under which stored type of object for which \c action has been triggered - * (\c uuid / \c channel / \c membership). - */ - __unsafe_unretained NSString *type; - /** - * @brief Key under which version of service which triggered event. - */ - __unsafe_unretained NSString *version; - - /** - * @brief Key under which stored object's event data. - */ - __unsafe_unretained NSString *data; - } object; - - struct { - /** - * @brief Key under which stored message which has been sent along with file. - * - * @since 4.15.0 - */ - __unsafe_unretained NSString *message; - - /** - * @brief Uploaded file information. - * - * @since 4.15.0 - */ - struct PNFileMessageDataStructure file; - } file; -} PNEventEnvelope = { - .senderTimeToken = { .key = @"o" }, - .publishTimeToken = { .key = @"p" }, - .channel = @"c", - .subscriptionMatch = @"b", - .payload = @"d", - .presence = { .action = @"action", .data = @"data", .occupancy = @"occupancy", - .timestamp = @"timestamp", .uuid = @"uuid", .joined = @"join", .leaved = @"leave", - .timeouted = @"timeout" - }, - .object = { - .event = @"event", - .source = @"source", - .type = @"type", - .version = @"version", - .data = @"data" - }, - .file = { - .message = @"message", - .file = @"file" - } -}; - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - Protected interface - -@interface PNSubscribeParser () - - -#pragma mark - Events processing - -/** - * @brief Parse real-time event received from data object live feed. - * - * @param data Service-provided data about event. - * @param additionalData Additional information provided by client to complete parsing. - * - * @return Pre-processed event information (depending on stored data). - * - * @since 4.3.0 - */ -+ (NSMutableDictionary *)eventFromData:(NSDictionary *)data - withAdditionalParserData:(nullable NSDictionary *)additionalData; - -/** - * @brief Parse provided data as new message event. - * - * @param data Data which should be parsed to required 'message' object format. - * @param additionalData Additional information provided by client to complete parsing. - * - * @return Processed and parsed 'message' object. - */ -+ (NSMutableDictionary *)messageFromData:(id)data - withAdditionalParserData:(nullable NSDictionary *)additionalData; - -/** - * @brief Parse provided data as \c object event. - * - * @param data Data which should be parsed to required 'object event' object format. - * - * @return Processed and parsed 'object event' object. - * - * @since 4.10.0 - */ -+ (NSMutableDictionary *)objectFromData:(NSDictionary *)data; - -/** - * @brief Parse provided data as \c file event. - * - * @param data Data which should be parsed to required 'file event' object format. - * @param additionalData Additional information provided by client to complete parsing. - * - * @return Processed and parsed 'file event' object. - * - * @since 4.15.0 - */ -+ (NSMutableDictionary *)fileFromData:(NSDictionary *)data - withAdditionalParserData:(NSDictionary *)additionalData; - -/** - * @brief Parse provided data as \c action event. - * - * @param data Data which should be parsed to required 'action event' object format. - * @param envelope Object with additional information about parsed \c data. - * - * @return Processed and parsed 'action event' object. - * - * @since 4.11.0 - */ -+ (NSMutableDictionary *)actionFromData:(NSDictionary *)data - withEnvelope:(PNEnvelopeInformation *)envelope; - -/** - * @brief Parse provided data as presence event. - * - * @param data Data which should be parsed to required 'presence event' object format. - * - * @return Processed and parsed 'presence event' object. - */ -+ (NSMutableDictionary *)presenceFromData:(NSDictionary *)data; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNSubscribeParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - return @[ @(PNSubscribeOperation) ]; -} - -+ (BOOL)requireAdditionalData { - return YES; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response - withData:(NSDictionary *)additionalData { - - NSDictionary *processedResponse = nil; - if ([response isKindOfClass:[NSDictionary class]]) { - NSDictionary *timeTokenDictionary = response[kPNResponseEventTimeKey]; - NSNumber *timeToken = @(timeTokenDictionary[PNEventTimeToken.timeToken].longLongValue); - NSNumber *region = @(timeTokenDictionary[PNEventTimeToken.region].longLongValue); - NSArray *feedEvents = response[kPNResponseEventsListKey]; - - if (feedEvents.count) { - NSMutableArray *events = [[NSMutableArray alloc] initWithCapacity:feedEvents.count]; - - for (NSUInteger eventIdx = 0; eventIdx < [feedEvents count]; eventIdx++) { - NSMutableDictionary *event = [self eventFromData:feedEvents[eventIdx] - withAdditionalParserData:additionalData]; - - if (!event[@"timetoken"]) { - event[@"timetoken"] = timeToken; - } - - [events addObject:event]; - } - - feedEvents = [events copy]; - } - - processedResponse = @{ @"events": feedEvents, @"timetoken": timeToken, @"region": region }; - } - - return processedResponse; -} - - -#pragma mark - Events processing - -+ (NSMutableDictionary *)eventFromData:(NSDictionary *)data - withAdditionalParserData:(NSDictionary *)additionalData { - - NSMutableDictionary *event = [NSMutableDictionary new]; - NSString *channel = data[PNEventEnvelope.channel]; - NSString *subscriptionMatch = data[PNEventEnvelope.subscriptionMatch]; - - if ([channel isEqualToString:subscriptionMatch]) { - subscriptionMatch = nil; - } - - event[@"envelope"] = [PNEnvelopeInformation envelopeInformationWithPayload:data]; - - event[@"subscription"] = (subscriptionMatch ?: channel); - event[@"channel"] = channel; - PNMessageType messageType = ((PNEnvelopeInformation *)event[@"envelope"]).messageType; - BOOL isEncryptionSupported = messageType == PNRegularMessageType || - messageType == PNFileMessageType; - - id timeTokenData = (data[PNEventEnvelope.senderTimeToken.key] ?: - data[PNEventEnvelope.publishTimeToken.key]); - - if ([timeTokenData isKindOfClass:[NSDictionary class]]) { - NSDictionary *timeToken = timeTokenData; - event[@"timetoken"] = @(timeToken[PNEventTimeToken.timeToken].longLongValue); - event[@"region"] = @(timeToken[PNEventTimeToken.region].longLongValue); - } - - if ([PNChannel isPresenceObject:event[@"subscription"]] || - [PNChannel isPresenceObject:event[@"channel"]]) { - - [event addEntriesFromDictionary:[self presenceFromData:data[PNEventEnvelope.payload]]]; - event[@"subscription"] = [PNChannel channelForPresence:event[@"subscription"]]; - event[@"channel"] = [PNChannel channelForPresence:event[@"channel"]]; - } else if (messageType == PNObjectMessageType) { - NSDictionary *objectData = [self objectFromData:data[PNEventEnvelope.payload]]; - - if (objectData.count) { - [event addEntriesFromDictionary:objectData]; - } - } else if (messageType == PNMessageActionType) { - NSDictionary *action = [self actionFromData:data[PNEventEnvelope.payload] - withEnvelope:event[@"envelope"]]; - - [event addEntriesFromDictionary:action]; - } else if (messageType == PNFileMessageType) { - NSDictionary *parserData = isEncryptionSupported ? additionalData : nil; - NSDictionary *fileMessage = [self fileFromData:data[PNEventEnvelope.payload] - withAdditionalParserData:parserData]; - - if (fileMessage.count) { - [event addEntriesFromDictionary:fileMessage]; - } - } else { - NSDictionary *parserData = isEncryptionSupported ? additionalData : nil; - - [event addEntriesFromDictionary:[self messageFromData:data[PNEventEnvelope.payload] - withAdditionalParserData:parserData]]; - } - - return event; -} - -+ (NSMutableDictionary *)messageFromData:(id)data - withAdditionalParserData:(NSDictionary *)additionalData { - - NSMutableDictionary *message = nil; - - if (additionalData[@"cryptoModule"]) { - id cryptoModule = additionalData[@"cryptoModule"]; - BOOL isDictionary = [data isKindOfClass:[NSDictionary class]]; - NSError *decryptionError; - id decryptedEvent = nil; - message = [NSMutableDictionary new]; - id encryptedData = isDictionary ? ((NSDictionary *)data)[@"pn_other"] : data; - - if ([encryptedData isKindOfClass:[NSString class]]) { - NSCharacterSet *trimCharSet = [NSCharacterSet characterSetWithCharactersInString:@"\""]; - encryptedData = [PNString base64DataFrom:[encryptedData stringByTrimmingCharactersInSet:trimCharSet]]; - PNResult *decryptResult = [cryptoModule decryptData:encryptedData]; - NSString *decryptedEventData = nil; - - if (decryptResult.isError) decryptionError = decryptResult.error; - else decryptedEventData = [[NSString alloc] initWithData:decryptResult.data encoding:NSUTF8StringEncoding]; - - if (decryptedEventData && ![decryptedEventData isEqualToString:encryptedData]) { - decryptedEvent = [PNJSON JSONObjectFrom:decryptedEventData withError:nil]; - } - } - - if (decryptionError || !decryptedEvent) { - PNLLogger *logger = [PNLLogger loggerWithIdentifier:kPNClientIdentifier]; -#ifndef PUBNUB_DISABLE_LOGGER - [logger enableLogLevel:PNAESErrorLogLevel]; -#endif // PUBNUB_DISABLE_LOGGER - PNLogAESError(logger, @" Message decryption error: %@", decryptionError); - message[@"decryptError"] = @YES; - message[@"message"] = isDictionary ? ((NSDictionary *)data)[@"pn_other"] : data; - } else { - if (isDictionary) { - NSMutableDictionary *mutableData = [(NSDictionary *)data mutableCopy]; - [mutableData removeObjectForKey:@"pn_other"]; - - if (![decryptedEvent isKindOfClass:[NSDictionary class]]) { - mutableData[@"pn_other"] = decryptedEvent; - } else { - [mutableData addEntriesFromDictionary:decryptedEvent]; - } - - decryptedEvent = [mutableData copy]; - } - - message[@"message"] = decryptedEvent; - } - } else { - message = [@{ @"message": data } mutableCopy]; - } - - return message; -} - -+ (NSMutableDictionary *)objectFromData:(NSDictionary *)data { - NSString *sourceVersion = data[PNEventEnvelope.object.version]; - NSMutableDictionary *object = [NSMutableDictionary new]; - - if (![data[PNEventEnvelope.object.source] isEqualToString:@"objects"]) { - return object; - } - - // Check whether minimum supported event source version is present (at moment of release - 2). - if ([sourceVersion componentsSeparatedByString:@"."].firstObject.integerValue != 2) { - return object; - } - - NSArray *eventKeys = @[ - PNEventEnvelope.object.event, - PNEventEnvelope.object.source, - PNEventEnvelope.object.type, - PNEventEnvelope.object.version - ]; - [object addEntriesFromDictionary:[data dictionaryWithValuesForKeys:eventKeys]]; - - if ([data[PNEventEnvelope.object.type] isEqualToString:@"membership"]) { - object[@"membership"] = data[@"data"]; - } - - if ([data[PNEventEnvelope.object.type] isEqualToString:@"uuid"]) { - object[@"uuid"] = data[@"data"]; - } - - if ([data[PNEventEnvelope.object.type] isEqualToString:@"channel"]) { - object[@"channel"] = data[@"data"]; - } - - return object; -} - -+ (NSMutableDictionary *)fileFromData:(NSDictionary *)data - withAdditionalParserData:(NSDictionary *)additionalData { - - NSMutableDictionary *fileMessage = [NSMutableDictionary new]; - NSDictionary *messagePayload = [self messageFromData:data - withAdditionalParserData:additionalData]; - - if (!((NSNumber *)messagePayload[@"decryptError"]).boolValue) { - fileMessage[@"message"] = [messagePayload valueForKeyPath:@"message.message"]; - fileMessage[@"file"] = [messagePayload valueForKeyPath:@"message.file"]; - } else { - fileMessage = [messagePayload mutableCopy]; - } - - return fileMessage; -} - -+ (NSMutableDictionary *)actionFromData:(NSDictionary *)data - withEnvelope:(PNEnvelopeInformation *)envelope { - - NSMutableDictionary *action = [@{ @"action": data[@"data"] } mutableCopy]; - NSString *messageTimetoken = action[@"action"][@"messageTimetoken"]; - NSString *actionTimetoken = action[@"action"][@"actionTimetoken"]; - - action[@"action"][@"messageTimetoken"] = @(messageTimetoken.longLongValue); - action[@"action"][@"actionTimetoken"] = @(actionTimetoken.longLongValue); - action[@"action"][@"uuid"] = envelope.senderIdentifier; - - NSArray *eventKeys = @[@"event", @"source", @"version"]; - [action addEntriesFromDictionary:[data dictionaryWithValuesForKeys:eventKeys]]; - - return action; -} - -+ (NSMutableDictionary *)presenceFromData:(NSDictionary *)data { - NSMutableDictionary *presence = [NSMutableDictionary new]; - - // Processing common for all presence events data. - presence[@"presenceEvent"] = (data[PNEventEnvelope.presence.action] ?: @"interval"); - presence[@"presence"] = [NSMutableDictionary new]; - presence[@"presence"][@"timetoken"] = data[PNEventEnvelope.presence.timestamp]; - - if (data[@"uuid"]) { - presence[@"presence"][@"uuid"] = data[PNEventEnvelope.presence.uuid]; - } - - presence[@"presence"][@"occupancy"] = (data[PNEventEnvelope.presence.occupancy] ?: @0); - - if (data[PNEventEnvelope.presence.data]) { - presence[@"presence"][@"state"] = data[PNEventEnvelope.presence.data]; - } - - if ([presence[@"presenceEvent"] isEqualToString:@"interval"]) { - if (data[PNEventEnvelope.presence.joined]) { - presence[@"presence"][@"join"] = data[PNEventEnvelope.presence.joined]; - } - - if (data[PNEventEnvelope.presence.leaved]) { - presence[@"presence"][@"leave"] = data[PNEventEnvelope.presence.leaved]; - } - - if (data[PNEventEnvelope.presence.timeouted]) { - presence[@"presence"][@"timeout"] = data[PNEventEnvelope.presence.timeouted]; - } - } - - return presence; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNTimeParser.h b/PubNub/Network/Parsers/PNTimeParser.h deleted file mode 100644 index 4e9e1abb1..000000000 --- a/PubNub/Network/Parsers/PNTimeParser.h +++ /dev/null @@ -1,26 +0,0 @@ -#import -#import "PNParser.h" - - -/** - @brief Class suitable to handle and process \b PubNub service response on time token request. - @discussion Handle and pre-process provided server data to fetch time token from it. - @discussion Expected input: - - @code -{ - "tt": NSNumber -} - @endcode - - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -@interface PNTimeParser : NSObject - - -#pragma mark - - - -@end diff --git a/PubNub/Network/Parsers/PNTimeParser.m b/PubNub/Network/Parsers/PNTimeParser.m deleted file mode 100644 index 12ea51c52..000000000 --- a/PubNub/Network/Parsers/PNTimeParser.m +++ /dev/null @@ -1,48 +0,0 @@ -/** - @author Sergey Mamontov - @since 4.0 - @copyright © 2010-2018 PubNub, Inc. - */ -#import "PNTimeParser.h" -#import "PNDictionary.h" - - -#pragma mark Interface implementation - -@implementation PNTimeParser - - -#pragma mark - Identification - -+ (NSArray *)operations { - - return @[@(PNTimeOperation)]; -} - -+ (BOOL)requireAdditionalData { - - return NO; -} - - -#pragma mark - Parsing - -+ (NSDictionary *)parsedServiceResponse:(id)response { - - // To handle case when response is unexpected for this type of operation processed value sent through - // 'nil' initialized local variable. - NSDictionary *processedResponse = nil; - - // Array is valid response type for time request. - if ([response isKindOfClass:[NSArray class]] && ((NSArray *)response).count == 1) { - - processedResponse = @{@"timetoken": (NSArray *)response[0]}; - } - - return processedResponse; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Requests/Actions/Message/PNAddMessageActionRequest.h b/PubNub/Network/Requests/Actions/Message/PNAddMessageActionRequest.h deleted file mode 100644 index cf8a45924..000000000 --- a/PubNub/Network/Requests/Actions/Message/PNAddMessageActionRequest.h +++ /dev/null @@ -1,63 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \c Add \c message \c action request. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNAddMessageActionRequest : PNBaseMessageActionRequest - - -#pragma mark - Information - -/** - * @brief What feature this \c message \c action represents. - * - * @note Maximum \b 15 characters. - */ -@property (nonatomic, copy) NSString *type; - -/** - * @brief Value which should be added with \c message \c action \b type. - */ -@property (nonatomic, copy) NSString *value; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c add \c message \c action request. - * - * @param channel Name of channel which store \c message for which \c action should be added. - * @param messageTimetoken Timetoken (\b PubNub's high precision timestamp) of \c message to which - * \c action should be added. - * - * @return Configured and ready to use \c add \c message \c action request. - */ -+ (instancetype)requestWithChannel:(NSString *)channel messageTimetoken:(NSNumber *)messageTimetoken - NS_SWIFT_NAME(init(channel:messageTimetoken:)); - -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ -- (instancetype)init NS_UNAVAILABLE; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Actions/Message/PNAddMessageActionRequest.m b/PubNub/Network/Requests/Actions/Message/PNAddMessageActionRequest.m deleted file mode 100644 index ac5b3bf22..000000000 --- a/PubNub/Network/Requests/Actions/Message/PNAddMessageActionRequest.m +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNBaseMessageActionRequest+Private.h" -#import "PNAddMessageActionRequest.h" -#import "PNRequest+Private.h" -#import "PNErrorCodes.h" - - -#pragma mark Interface implementation - -@implementation PNAddMessageActionRequest - - -#pragma mark - Information - -- (PNOperationType)operation { - return PNAddMessageActionOperation; -} - -- (NSString *)httpMethod { - return @"POST"; -} - - -#pragma mark - Information - -- (NSData *)bodyData { - if (!self.type || ([self.type isKindOfClass:[NSString class]] && !self.type.length)) { - self.parametersError = [self missingParameterError:@"type" - forObjectRequest:@"Message action"]; - } else if (self.type.length > 15) { - self.parametersError = [self valueTooLongErrorForParameter:@"type" - ofObjectRequest:@"Message action" - withLength:self.type.length - maximumLength:15]; - } else if (!self.value || ([self.value isKindOfClass:[NSString class]] && !self.value.length)) { - self.parametersError = [self missingParameterError:@"value" - forObjectRequest:@"Message action"]; - } - - if (self.parametersError) { - return nil; - } - - NSDictionary *actionData = @{ @"type": self.type, @"value": self.value }; - NSError *error = nil; - NSData *data = nil; - - if ([NSJSONSerialization isValidJSONObject:actionData]) { - data = [NSJSONSerialization dataWithJSONObject:actionData - options:(NSJSONWritingOptions)0 - error:&error]; - } else { - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Unable to serialize to JSON string", - NSLocalizedFailureReasonErrorKey: @"Provided 'value' has unexpected data type." - }; - - error = [NSError errorWithDomain:NSCocoaErrorDomain - code:NSPropertyListWriteInvalidError - userInfo:errorInformation]; - } - - if (error) { - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Message action data serialization did fail", - NSUnderlyingErrorKey: error - }; - - self.parametersError = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:errorInformation]; - } - - return data; -} - - -#pragma mark - Initialization & Configuration - -+ (instancetype)requestWithChannel:(NSString *)channel - messageTimetoken:(NSNumber *)messageTimetoken { - - return [[self alloc] initWithChannel:channel messageTimetoken:messageTimetoken]; -} - -- (instancetype)init { - [self throwUnavailableInitInterface]; - - return nil; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Requests/Actions/Message/PNBaseMessageActionRequest+Private.h b/PubNub/Network/Requests/Actions/Message/PNBaseMessageActionRequest+Private.h deleted file mode 100644 index 073741637..000000000 --- a/PubNub/Network/Requests/Actions/Message/PNBaseMessageActionRequest+Private.h +++ /dev/null @@ -1,50 +0,0 @@ -#import "PNBaseMessageActionRequest.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface declaration - -/** - * @brief Private \c base request extension to provide access to initializer. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNBaseMessageActionRequest (Private) - - -#pragma mark - Information - -/** - * @brief Name of channel in which target \c message is stored. - */ -@property (nonatomic, readonly, copy) NSString *channel; - -/** - * @brief Timetoken (\b PubNub's high precision timestamp) of \c message for which \c action should - * be managed. - */ -@property (nonatomic, readonly, strong) NSNumber *messageTimetoken; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Initialize \c base request. - * - * @param channel Name of channel in which target \c message is stored. - * @param messageTimetoken Timetoken of \c message for which action should be managed. - * - * @return Initialized and ready to use \c request. - */ -- (instancetype)initWithChannel:(NSString *)channel messageTimetoken:(NSNumber *)messageTimetoken; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Actions/Message/PNBaseMessageActionRequest.h b/PubNub/Network/Requests/Actions/Message/PNBaseMessageActionRequest.h deleted file mode 100644 index 24efe43db..000000000 --- a/PubNub/Network/Requests/Actions/Message/PNBaseMessageActionRequest.h +++ /dev/null @@ -1,25 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief Base class for all 'Message Action' API endpoints which has shared query options. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNBaseMessageActionRequest : PNRequest - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Actions/Message/PNBaseMessageActionRequest.m b/PubNub/Network/Requests/Actions/Message/PNBaseMessageActionRequest.m deleted file mode 100644 index 8e72fa659..000000000 --- a/PubNub/Network/Requests/Actions/Message/PNBaseMessageActionRequest.m +++ /dev/null @@ -1,84 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNBaseMessageActionRequest+Private.h" -#import "PNRequest+Private.h" -#import "PNErrorCodes.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interface declaration - -@interface PNBaseMessageActionRequest () - - -#pragma mark - Information - -/** - * @brief Name of channel in which target \c message is stored. - */ -@property (nonatomic, copy) NSString *channel; - -/** - * @brief Timetoken (\b PubNub's high precision timestamp) of \c message for which \c action should - * be managed. - */ -@property (nonatomic, strong) NSNumber *messageTimetoken; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNBaseMessageActionRequest - - -#pragma mark - Information - -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; - - if (self.parametersError) { - return parameters; - } - - [parameters addPathComponent:self.channel forPlaceholder:@"{channel}"]; - [parameters addPathComponent:self.messageTimetoken.stringValue - forPlaceholder:@"{message-timetoken}"]; - - return parameters; -} - - -#pragma mark - Initialization & Configuration - -- (instancetype)initWithChannel:(NSString *)channel messageTimetoken:(NSNumber *)messageTimetoken { - if ((self = [super init])) { - _messageTimetoken = messageTimetoken; - _channel = [channel copy]; - - if (!channel.length) { - self.parametersError = [self missingParameterError:@"channel" - forObjectRequest:@"Message action"]; - } else if (messageTimetoken.unsignedIntegerValue == 0) { - self.parametersError = [self missingParameterError:@"messageTimetoken" - forObjectRequest:@"Message action"]; - } - } - - return self; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Requests/Actions/Message/PNFetchMessageActionsRequest.h b/PubNub/Network/Requests/Actions/Message/PNFetchMessageActionsRequest.h deleted file mode 100644 index 3ceaa59d0..000000000 --- a/PubNub/Network/Requests/Actions/Message/PNFetchMessageActionsRequest.h +++ /dev/null @@ -1,67 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \c Fetch \c message \c actions request. - * - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNFetchMessageActionsRequest : PNRequest - - -#pragma mark - Information - -/** - * @brief \c Message \c action timetoken denoting the start of the range requested. - * - * @note Return values will be less than start. - */ -@property (nonatomic, nullable, copy) NSNumber *start; - -/** - * @brief \c Message \c action timetoken denoting the end of the range requested. - * - * @note Return values will be greater than or equal to end. - */ -@property (nonatomic, nullable, copy) NSNumber *end; - -/** - * @brief Number of \c message \c actions to return in response. - */ -@property (nonatomic, assign) NSUInteger limit; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c fetch \c message \c actions request. - * - * @param channel Name of channel from which list of \c message \c actions should be retrieved. - * - * @return Configured and ready to use \c fetch \c messages \c actions request. - */ -+ (instancetype)requestWithChannel:(NSString *)channel; - -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ -- (instancetype)init NS_UNAVAILABLE; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Actions/Message/PNFetchMessageActionsRequest.m b/PubNub/Network/Requests/Actions/Message/PNFetchMessageActionsRequest.m deleted file mode 100644 index 331adf1f4..000000000 --- a/PubNub/Network/Requests/Actions/Message/PNFetchMessageActionsRequest.m +++ /dev/null @@ -1,113 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.11.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNFetchMessageActionsRequest.h" -#import "PNRequest+Private.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interface declaration - -@interface PNFetchMessageActionsRequest () - - -#pragma mark - Information - -/** - * @brief Name of channel from which list of \c message \c actions should be retrieved. - */ -@property (nonatomic, copy) NSString *channel; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Initialize \c fetch \c message \c actions request. - * - * @param channel Name of channel from which list of \c message \c actions should be retrieved. - * - * @return Initialized and ready to use \c fetch \c message \c actions request. - */ -- (instancetype)initWithChannel:(NSString *)channel; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNFetchMessageActionsRequest - - -#pragma mark - Information - -- (PNOperationType)operation { - return PNFetchMessagesActionsOperation; -} - -- (NSString *)httpMethod { - return @"GET"; -} - -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; - - if (self.parametersError) { - return parameters; - } - - [parameters addPathComponent:self.channel forPlaceholder:@"{channel}"]; - - if (self.limit > 0) { - [parameters addQueryParameter:@(self.limit).stringValue forFieldName:@"limit"]; - } - - if (self.start) { - [parameters addQueryParameter:self.start.stringValue forFieldName:@"start"]; - } - - if (self.end) { - [parameters addQueryParameter:self.end.stringValue forFieldName:@"end"]; - } - - return parameters; -} - - -#pragma mark - Initialization & Configuration - -+ (instancetype)requestWithChannel:(NSString *)channel { - return [[self alloc] initWithChannel:channel]; -} - -- (instancetype)initWithChannel:(NSString *)channel { - if ((self = [super init])) { - _channel = [channel copy]; - - if (!channel.length) { - self.parametersError = [self missingParameterError:@"channel" - forObjectRequest:@"Message action"]; - } - } - - return self; -} - -- (instancetype)init { - [self throwUnavailableInitInterface]; - - return nil; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Requests/Actions/Message/PNRemoveMessageActionRequest.h b/PubNub/Network/Requests/Actions/Message/PNRemoveMessageActionRequest.h deleted file mode 100644 index d2e79a053..000000000 --- a/PubNub/Network/Requests/Actions/Message/PNRemoveMessageActionRequest.h +++ /dev/null @@ -1,56 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \c Remove \c message \c action request. - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNRemoveMessageActionRequest : PNBaseMessageActionRequest - - -#pragma mark - Information - -/** - * @brief \c Message \c action addition timetoken (\b PubNub's high precision timestamp). - */ -@property (nonatomic, strong) NSNumber *actionTimetoken; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c remove \c message \c action request. - * - * @param channel Name of channel which store \c message for which \c action should be removed. - * @param messageTimetoken Timetoken (\b PubNub's high precision timestamp) of \c message from which - * \c action should be removed. - * - * @return Configured and ready to use \c remove \c message \c action request. - */ -+ (instancetype)requestWithChannel:(NSString *)channel messageTimetoken:(NSNumber *)messageTimetoken - NS_SWIFT_NAME(init(channel:messageTimetoken:)); - -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ -- (instancetype)init NS_UNAVAILABLE; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Actions/Message/PNRemoveMessageActionRequest.m b/PubNub/Network/Requests/Actions/Message/PNRemoveMessageActionRequest.m deleted file mode 100644 index c29901634..000000000 --- a/PubNub/Network/Requests/Actions/Message/PNRemoveMessageActionRequest.m +++ /dev/null @@ -1,63 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.11.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNBaseMessageActionRequest+Private.h" -#import "PNRemoveMessageActionRequest.h" -#import "PNRequest+Private.h" - - -#pragma nark Interface implementation - -@implementation PNRemoveMessageActionRequest - - -#pragma mark - Information - -- (PNOperationType)operation { - return PNRemoveMessageActionOperation; -} - -- (NSString *)httpMethod { - return @"DELETE"; -} - -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; - - if (self.actionTimetoken.unsignedIntegerValue == 0) { - self.parametersError = [self missingParameterError:@"actionTimetoken" - forObjectRequest:@"Message action"]; - } - - if (self.parametersError) { - return parameters; - } - - [parameters addPathComponent:self.actionTimetoken.stringValue - forPlaceholder:@"{action-timetoken}"]; - - return parameters; -} - - -#pragma mark - Initialization & Configuration - -+ (instancetype)requestWithChannel:(NSString *)channel - messageTimetoken:(NSNumber *)messageTimetoken { - - return [[self alloc] initWithChannel:channel messageTimetoken:messageTimetoken]; -} - -- (instancetype)init { - [self throwUnavailableInitInterface]; - - return nil; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Requests/Channel Groups/PNChannelGroupFetchRequest.h b/PubNub/Network/Requests/Channel Groups/PNChannelGroupFetchRequest.h new file mode 100644 index 000000000..05b3f2356 --- /dev/null +++ b/PubNub/Network/Requests/Channel Groups/PNChannelGroupFetchRequest.h @@ -0,0 +1,47 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `List channel group channels` request. +/// +/// The **PubNub** client will retrieve a list of channels which have been registered for the specified channel group. +@interface PNChannelGroupFetchRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// Name of the channel group for which list of registered channels should be retrieved. +@property(copy, nullable, nonatomic, readonly) NSString *channelGroup; + + +#pragma mark - Initialization and Configuration + +/// Create `list all channel groups` request. +/// +/// - Returns: Ready to use `list all channel groups` request. ++ (instancetype)requestChannelGroups; + +/// Create `list channel group channels` request. +/// +/// - Parameter channelGroup: Name of the channel group for which list of registered channels should be retrieved. +/// - Returns: Ready to use `list channel group channels` request. ++ (instancetype)requestWithChannelGroup:(NSString *)channelGroup; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Channel Groups/PNChannelGroupFetchRequest.m b/PubNub/Network/Requests/Channel Groups/PNChannelGroupFetchRequest.m new file mode 100644 index 000000000..01accd541 --- /dev/null +++ b/PubNub/Network/Requests/Channel Groups/PNChannelGroupFetchRequest.m @@ -0,0 +1,95 @@ +#import "PNChannelGroupFetchRequest.h" +#import "PNTransportRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `List channel group channels` request private extension. +@interface PNChannelGroupFetchRequest () + + +#pragma mark - Properties + +/// Name of the channel group for which list of registered channels should be retrieved. +@property(copy, nullable, nonatomic) NSString *channelGroup; + +/// Type of channel group audit operation. +@property(assign, nonatomic) PNOperationType operation; + + +#pragma mark - Initialization and Configuration + +/// Initialize `list channel group channels` request. +/// +/// - Parameters: +/// - channelGroup: Name of the channel group for which list of registered channels should be retrieved. +/// - operation: Type of channel group audit operation. +/// - Returns: Initialized `list channel group channels` request. +- (instancetype)initWithChannelGroup:(nullable NSString *)channelGroup operation:(PNOperationType)operation; + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNChannelGroupFetchRequest + + +#pragma mark - Properties + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + + if (self.arbitraryQueryParameters) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query.count ? query : nil; +} + +- (NSString *)path { + return PNStringFormat(@"/v1/channel-registration/sub-key/%@/channel-group%@", + self.subscribeKey, self.channelGroup.length ? PNStringFormat(@"/%@", self.channelGroup) : @""); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestChannelGroups { + return [[self alloc] initWithChannelGroup:nil operation:PNChannelGroupsOperation]; +} + ++ (instancetype)requestWithChannelGroup:(NSString *)channelGroup { + return [[self alloc] initWithChannelGroup:channelGroup operation:PNChannelsForGroupOperation]; +} + +- (instancetype)initWithChannelGroup:(NSString *)channelGroup operation:(PNOperationType)operation { + if ((self = [super init])) { + _channelGroup = [channelGroup copy]; + _operation = operation; + } + + return self; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.channelGroup.length == 0 && self.operation != PNChannelGroupsOperation) { + return [self missingParameterError:@"channelGroup" forObjectRequest:@"PNChannelGroupListRequest"]; + } + + return nil; +} + +#pragma mark - + +@end diff --git a/PubNub/Network/Requests/Channel Groups/PNChannelGroupManageRequest.h b/PubNub/Network/Requests/Channel Groups/PNChannelGroupManageRequest.h new file mode 100644 index 000000000..547d7de9c --- /dev/null +++ b/PubNub/Network/Requests/Channel Groups/PNChannelGroupManageRequest.h @@ -0,0 +1,60 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Channel group manage` request. +@interface PNChannelGroupManageRequest : PNBaseRequest + + +#pragma mark - Properties + +/// List of channels which can be used to manage channel group channels list. +@property(strong, nullable, nonatomic, readonly) NSArray *channels; + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// Name of channel group for which manage will be done. +@property(strong, nullable, nonatomic, readonly) NSString *channelGroup; + + +#pragma mark - Initialization and Configuration + +/// Create `channel group channels addition` request. +/// +/// - Parameters: +/// - channels: List of channels which should be added to the channel group. +/// - channelGroup: Name of the channel group into which channels should be added. +/// - Returns: Ready to use `manage channel group` request. ++ (instancetype)requestToAddChannels:(NSArray *)channels toChannelGroup:(NSString *)channelGroup; + +/// Create `channel group channels removal` request. +/// +/// - Parameters: +/// - channels: List of channels which should be removed from the channel group. +/// - channelGroup: Name of the channel group from which channels should be removed. +/// - Returns: Ready to use `manage channel group` request. ++ (instancetype)requestToRemoveChannels:(NSArray *)channels fromChannelGroup:(NSString *)channelGroup; + +/// Create `channel group removal` request. +/// +/// - Parameter channelGroup: Name of the channel group which should be removed. +/// - Returns: Ready to use `manage channel group` request. ++ (instancetype)requestToRemoveChannelGroup:(NSString *)channelGroup; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + diff --git a/PubNub/Network/Requests/Channel Groups/PNChannelGroupManageRequest.m b/PubNub/Network/Requests/Channel Groups/PNChannelGroupManageRequest.m new file mode 100644 index 000000000..9b6b2af74 --- /dev/null +++ b/PubNub/Network/Requests/Channel Groups/PNChannelGroupManageRequest.m @@ -0,0 +1,130 @@ +#import "PNChannelGroupManageRequest.h" +#import "PNTransportRequest+Private.h" +#import "PNBaseRequest+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Channel group manage` request private extension. +@interface PNChannelGroupManageRequest () + + +#pragma mark - Properties + +/// Whether list of `channels` should be removed during manage or not. +@property(assign, nonatomic, getter = shouldRemoveChannels) BOOL removeChannels; + +/// List of channels which can be used to manage channel group channels list. +@property(strong, nullable, nonatomic) NSArray *channels; + +/// Name of channel group for which manage will be done. +@property(strong, nullable, nonatomic) NSString *channelGroup; + + +#pragma mark - Initialization and Configuration + +/// Channel group channels addition request. +/// +/// - Parameters: +/// - channelGroup: Name of the channel group into which channels should be added. +/// - add: `YES` if list of passed `channels` should be added into `channelGroup` or not. +/// - channels: List of channels which should be used during manage request call. +/// - Returns: Ready to use `manage channel group` request. +- (instancetype)initForChannelGroup:(NSString *)channelGroup + toAdd:(BOOL)add + channels:(nullable NSArray *)channels; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNChannelGroupManageRequest + + +#pragma mark - Properties + +- (PNOperationType)operation { + if (self.channels.count) { + if (!self.removeChannels) return PNAddChannelsToGroupOperation; + else return PNRemoveChannelsFromGroupOperation; + } + + return PNRemoveGroupOperation; +} + +- (NSString *)path { + if (self.operation == PNRemoveGroupOperation) { + return PNStringFormat(@"/v1/channel-registration/sub-key/%@/channel-group/%@/remove", + self.subscribeKey, self.channelGroup); + } + + return PNStringFormat(@"/v1/channel-registration/sub-key/%@/channel-group/%@", + self.subscribeKey, self.channelGroup); +} + +- (NSDictionary *)query { + if (self.operation == PNRemoveGroupOperation) return self.arbitraryQueryParameters; + + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + [query addEntriesFromDictionary:@{ + (!self.removeChannels ? @"add": @"remove"): [self.channels componentsJoinedByString:@","] + }]; + + if (self.arbitraryQueryParameters) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query; +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestToAddChannels:(NSArray *)channels toChannelGroup:(NSString *)channelGroup { + return [[self alloc] initForChannelGroup:channelGroup toAdd:YES channels:channels]; +} + ++ (instancetype)requestToRemoveChannels:(NSArray *)channels fromChannelGroup:(NSString *)channelGroup { + return [[self alloc] initForChannelGroup:channelGroup toAdd:NO channels:channels]; +} + ++ (instancetype)requestToRemoveChannelGroup:(NSString *)channelGroup { + return [[self alloc] initForChannelGroup:channelGroup toAdd:NO channels:nil]; +} + +- (instancetype)initForChannelGroup:(NSString *)channelGroup toAdd:(BOOL)add channels:(NSArray *)channels { + if ((self = [super init])) { + _channelGroup = [channelGroup copy]; + _channels = [channels copy]; + _removeChannels = !add; + } + + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.channelGroup.length == 0) { + return [self missingParameterError:@"channelGroup" forObjectRequest:@"PNChannelGroupManageRequest"]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Files/PNDeleteFileRequest.h b/PubNub/Network/Requests/Files/PNDeleteFileRequest.h index 3f78b5080..4b840c010 100644 --- a/PubNub/Network/Requests/Files/PNDeleteFileRequest.h +++ b/PubNub/Network/Requests/Files/PNDeleteFileRequest.h @@ -1,52 +1,35 @@ -#import -#import +#import NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Delete \c file request. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNDeleteFileRequest : PNRequest - - -#pragma mark - Information - -/** - * @brief Arbitrary percent encoded query parameters which should be sent along with original API call. - */ -@property (nonatomic, nullable, strong) NSDictionary *arbitraryQueryParameters; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c delete \c file request. - * - * @param channel Name of channel from which \c file with \c name should be \c deleted. - * @param identifier Unique \c file identifier which has been assigned during \c file upload. - * @param name Name under which uploaded \c file is stored for \c channel. - * - * @return Configured and ready to use \c delete \c file request. - */ -+ (instancetype)requestWithChannel:(NSString *)channel - identifier:(NSString *)identifier - name:(NSString *)name; - -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// `Delete file` request. +@interface PNDeleteFileRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + + +#pragma mark - Initialization and Configuration + +/// Create `Delete file` request. +/// +/// - Parameters: +/// - channel: Name of channel from which `file` with `name` should be `deleted`. +/// - identifier Unique `file` identifier which has been assigned during `file` upload. +/// - name Name under which uploaded `file` is stored for `channel`. +/// - Returns: Ready to use `delete file` request. ++ (instancetype)requestWithChannel:(NSString *)channel identifier:(NSString *)identifier name:(NSString *)name; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Files/PNDeleteFileRequest.m b/PubNub/Network/Requests/Files/PNDeleteFileRequest.m index 9845e787b..611b26534 100644 --- a/PubNub/Network/Requests/Files/PNDeleteFileRequest.m +++ b/PubNub/Network/Requests/Files/PNDeleteFileRequest.m @@ -5,49 +5,42 @@ * @copyright © 2010-2020 PubNub, Inc. */ #import "PNDeleteFileRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" +#import "PNFunctions.h" #import "PNHelpers.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// `Delete file` request private extension. @interface PNDeleteFileRequest () -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Unique \c file identifier which has been assigned during \c file upload. - */ -@property (nonatomic, copy) NSString *identifier; +/// Unique `file` identifier which has been assigned during `file` upload. +@property(copy, nonatomic) NSString *identifier; -/** - * @brief Name of channel from which \c file with \c name should be \c deleted. - */ -@property (nonatomic, copy) NSString *channel; +/// Name of channel from which `file` with `name` should be `deleted`. +@property(copy, nonatomic) NSString *channel; -/** - * @brief Name under which uploaded \c file is stored for \c channel. - */ -@property (nonatomic, copy) NSString *name; +/// Name under which uploaded `file` is stored for `channel`. +@property(copy, nonatomic) NSString *name; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Initialize \c delete \c file request. - * - * @param channel Name of channel from which \c file with \c name should be \c deleted. - * @param identifier Unique \c file identifier which has been assigned during \c file upload. - * @param name Name under which uploaded \c file is stored for \c channel. - * - * @return Initialized and ready to use \c delete \c file request. - */ -- (instancetype)initWithChannel:(NSString *)channel - identifier:(NSString *)identifier - name:(NSString *)name; +/// Initialize `Delete file` request. +/// +/// - Parameters: +/// - channel: Name of channel from which `file` with `name` should be `deleted`. +/// - identifier Unique `file` identifier which has been assigned during `file` upload. +/// - name Name under which uploaded `file` is stored for `channel`. +/// - Returns: Initialized `delete file` request. +- (instancetype)initWithChannel:(NSString *)channel identifier:(NSString *)identifier name:(NSString *)name; #pragma mark - @@ -68,54 +61,34 @@ - (PNOperationType)operation { return PNDeleteFileOperation; } -- (NSString *)httpMethod { - return @"DELETE"; +- (TransportMethod)httpMethod { + return TransportDELETEMethod; } -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; - - if (self.parametersError) { - return parameters; - } - - if (self.channel.length) { - [parameters addPathComponent:[PNString percentEscapedString:self.channel] - forPlaceholder:@"{channel}"]; - } else { - self.parametersError = [self missingParameterError:@"channel" forObjectRequest:@"Request"]; - } +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; - if (self.identifier.length) { - [parameters addPathComponent:self.identifier forPlaceholder:@"{id}"]; - } else { - self.parametersError = [self missingParameterError:@"identifier" forObjectRequest:@"Request"]; - } + if (self.arbitraryQueryParameters.count) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; - if (self.name.length) { - [parameters addPathComponent:[PNString percentEscapedString:self.name] - forPlaceholder:@"{name}"]; - } else { - self.parametersError = [self missingParameterError:@"name" forObjectRequest:@"Request"]; - } + return query.count ? query : nil; +} - return parameters; +- (NSString *)path { + return PNStringFormat(@"/v1/files/%@/channels/%@/files/%@/%@", + self.subscribeKey, + [PNString percentEscapedString:self.channel], + self.identifier, + [PNString percentEscapedString:self.name]); } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -+ (instancetype)requestWithChannel:(NSString *)channel - identifier:(NSString *)identifier - name:(NSString *)name { - ++ (instancetype)requestWithChannel:(NSString *)channel identifier:(NSString *)identifier name:(NSString *)name { return [[self alloc] initWithChannel:channel identifier:identifier name:name]; } -- (instancetype)initWithChannel:(NSString *)channel - identifier:(NSString *)identifier - name:(NSString *)name { - +- (instancetype)initWithChannel:(NSString *)channel identifier:(NSString *)identifier name:(NSString *)name { if ((self = [super init])) { _identifier = [identifier copy]; _channel = [channel copy]; @@ -131,6 +104,17 @@ - (instancetype)init { return nil; } + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.identifier.length == 0) return [self missingParameterError:@"identifier" forObjectRequest:@"Request"]; + if (self.channel.length == 0) return [self missingParameterError:@"channel" forObjectRequest:@"Request"]; + if (self.name.length == 0) return [self missingParameterError:@"name" forObjectRequest:@"Request"]; + + return nil; +} + #pragma mark - diff --git a/PubNub/Network/Requests/Files/PNDownloadFileRequest+Private.h b/PubNub/Network/Requests/Files/PNDownloadFileRequest+Private.h index d1998b0e4..b433506f4 100644 --- a/PubNub/Network/Requests/Files/PNDownloadFileRequest+Private.h +++ b/PubNub/Network/Requests/Files/PNDownloadFileRequest+Private.h @@ -9,22 +9,22 @@ NS_ASSUME_NONNULL_BEGIN @interface PNDownloadFileRequest (Private) -#pragma mark - Information +#pragma mark - Properties /// Crypto module which should be used for uploaded data _encryption_. /// /// This property allows setting up data _encryption_ using a different crypto module than the one set during **PubNub** /// client instance configuration. -@property(nonatomic, nullable, strong) id cryptoModule; +@property(strong, nullable, nonatomic) id cryptoModule; /// Unique `file` identifier which has been assigned during `file` upload. -@property (nonatomic, readonly, copy) NSString *identifier; +@property(copy, nonatomic, readonly) NSString *identifier; /// Name of channel from which `file` with `name` should be downloaded. -@property (nonatomic, readonly, copy) NSString *channel; +@property(copy, nonatomic, readonly) NSString *channel; /// Name under which uploaded `file` is stored for `channel`. -@property (nonatomic, readonly, copy) NSString *name; +@property(copy, nonatomic, readonly) NSString *name; #pragma mark - diff --git a/PubNub/Network/Requests/Files/PNDownloadFileRequest.h b/PubNub/Network/Requests/Files/PNDownloadFileRequest.h index 17c4230e8..70b4326d3 100644 --- a/PubNub/Network/Requests/Files/PNDownloadFileRequest.h +++ b/PubNub/Network/Requests/Files/PNDownloadFileRequest.h @@ -1,5 +1,4 @@ -#import -#import +#import #pragma mark Protocols forwarding @@ -12,25 +11,19 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Interface declaration /// `Download file` request. -/// -/// The **PubNub** client will use information from the provided request object to _download_ files from the remote -/// storage. -/// -/// - Since: 4.15.0 -/// - Copyright: 2010-2023 PubNub, Inc. -@interface PNDownloadFileRequest : PNRequest +@interface PNDownloadFileRequest : PNBaseRequest -#pragma mark - Information +#pragma mark - Properties /// Arbitrary percent encoded query parameters which should be sent along with original API call. -@property (nonatomic, nullable, strong) NSDictionary *arbitraryQueryParameters; +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; /// Key which should be used for downloaded data _decryption_. /// /// This property allows setting up data _decryption_ using a different cipher key than the one set during **PubNub** /// client instance configuration. -@property (nonatomic, nullable, copy) NSString *cipherKey; +@property(copy, nullable, nonatomic) NSString *cipherKey; /// File store url. /// @@ -38,21 +31,19 @@ NS_ASSUME_NONNULL_BEGIN /// /// > Note: The file will be downloaded to a temporary location if the value is not set. The location will be passed /// to the completion block, and the file will be removed on completion block exit. -@property (nonatomic, nullable, strong) NSURL *targetURL; +@property(strong, nullable, nonatomic) NSURL *targetURL; #pragma mark - Initialization and configuration -/// Create `file download` request instance. +/// Create `File download` request instance. /// /// - Parameters: /// - channel: Name of channel from which `file` with `name` should be downloaded. /// - identifier: Unique `file` identifier which has been assigned during `file` upload. /// - name: Name under which uploaded `file` is stored for `channel`. -/// - Returns: Initialized `file download` request. -+ (instancetype)requestWithChannel:(NSString *)channel - identifier:(NSString *)identifier - name:(NSString *)name; +/// - Returns: Ready to use `file download` request. ++ (instancetype)requestWithChannel:(NSString *)channel identifier:(NSString *)identifier name:(NSString *)name; /// Forbids request initialization. /// diff --git a/PubNub/Network/Requests/Files/PNDownloadFileRequest.m b/PubNub/Network/Requests/Files/PNDownloadFileRequest.m index 918bc6c5d..a4bc9ca9c 100644 --- a/PubNub/Network/Requests/Files/PNDownloadFileRequest.m +++ b/PubNub/Network/Requests/Files/PNDownloadFileRequest.m @@ -1,5 +1,7 @@ #import "PNDownloadFileRequest+Private.h" -#import "PNRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" +#import "PNFunctions.h" #import "PNHelpers.h" @@ -11,22 +13,22 @@ @interface PNDownloadFileRequest () -#pragma mark - Information +#pragma mark - Properties /// Crypto module which should be used for downloaded data _decryption_. /// /// This property allows setting up data _decryption_ using a different crypto module than the one set during **PubNub** /// client instance configuration. -@property(nonatomic, nullable, strong) id cryptoModule; +@property(strong, nullable, nonatomic) id cryptoModule; /// Unique `file` identifier which has been assigned during `file` upload. -@property (nonatomic, copy) NSString *identifier; +@property(copy, nonatomic) NSString *identifier; /// Name of channel from which `file` with `name` should be downloaded. -@property (nonatomic, copy) NSString *channel; +@property(copy, nonatomic) NSString *channel; /// Name under which uploaded `file` is stored for `channel`. -@property (nonatomic, copy) NSString *name; +@property(copy, nonatomic) NSString *name; #pragma mark - Initialization and configuration @@ -38,9 +40,7 @@ @interface PNDownloadFileRequest () /// - identifier: Unique `file` identifier which has been assigned during `file` upload. /// - name: Name under which uploaded `file` is stored for `channel`. /// - Returns: Initialized `file download` request. -- (instancetype)initWithChannel:(NSString *)channel - identifier:(NSString *)identifier - name:(NSString *)name; +- (instancetype)initWithChannel:(NSString *)channel identifier:(NSString *)identifier name:(NSString *)name; #pragma mark - @@ -55,33 +55,30 @@ - (instancetype)initWithChannel:(NSString *)channel @implementation PNDownloadFileRequest -#pragma mark - Information +#pragma mark - Properties - (PNOperationType)operation { return PNDownloadFileOperation; } -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; - - if (self.parametersError) return parameters; - - if (self.channel.length) { - [parameters addPathComponent:[PNString percentEscapedString:self.channel] forPlaceholder:@"{channel}"]; - } else { - self.parametersError = [self missingParameterError:@"channel" forObjectRequest:@"Request"]; - } - - if (self.identifier.length) [parameters addPathComponent:self.identifier forPlaceholder:@"{id}"]; - else self.parametersError = [self missingParameterError:@"identifier" forObjectRequest:@"Request"]; +- (NSDictionary *)query { + NSMutableDictionary *query = [NSMutableDictionary new]; + + if (self.arbitraryQueryParameters.count) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query.count ? query : nil; +} - if (self.name.length) { - [parameters addPathComponent:[PNString percentEscapedString:self.name] forPlaceholder:@"{name}"]; - } else { - self.parametersError = [self missingParameterError:@"name" forObjectRequest:@"Request"]; - } +- (BOOL)responseAsFile { + return YES; +} - return parameters; +- (NSString *)path { + return PNStringFormat(@"/v1/files/%@/channels/%@/files/%@/%@", + self.subscribeKey, + [PNString percentEscapedString:self.channel], + self.identifier, + [PNString percentEscapedString:self.name]); } @@ -107,6 +104,17 @@ - (instancetype)init { return nil; } + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.channel.length == 0) return [self missingParameterError:@"channel" forObjectRequest:@"Request"]; + if (self.identifier.length == 0) return [self missingParameterError:@"identifier" forObjectRequest:@"Request"]; + if (self.name.length == 0) return [self missingParameterError:@"name" forObjectRequest:@"Request"]; + + return nil; +} + #pragma mark - diff --git a/PubNub/Network/Requests/Files/PNFileUploadRequest.h b/PubNub/Network/Requests/Files/PNFileUploadRequest.h new file mode 100644 index 000000000..90e9a7078 --- /dev/null +++ b/PubNub/Network/Requests/Files/PNFileUploadRequest.h @@ -0,0 +1,45 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +/// `File data upload` request. +@interface PNFileUploadRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Crypto module which should be used for uploaded data `encryption`. +/// +/// This property allows setting up data `encryption` using a different crypto module than the one set during **PubNub** +/// client instance configuration. +@property(strong, nullable, nonatomic) id cryptoModule; + +/// Stream with data which should be uploaded. +@property(strong, nonatomic) NSInputStream *bodyStream; + +/// Actual size of uploaded data (passes by user only for stream-based uploads). +@property(assign, nonatomic) NSUInteger dataSize; + +/// Name with which uploaded file should be stored. +@property(strong, nonatomic) NSString *filename; + + +#pragma mark - Initialization and Configuration + +/// Create `File Upload` request. +/// +/// - Parameters: +/// - url: File upload URL (with origin and path). +/// - method: HTTP method which should be used to put file to remote storage. +/// - formData: List of fields which should be sent as `multipart/form-data` fields. +/// - Returns: Ready to use `File Upload` request. ++ (instancetype)requestWithURL:(NSURL *)url httpMethod:(NSString *)method formData:(NSArray *)formData; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Files/PNFileUploadRequest.m b/PubNub/Network/Requests/Files/PNFileUploadRequest.m new file mode 100644 index 000000000..8680b73ad --- /dev/null +++ b/PubNub/Network/Requests/Files/PNFileUploadRequest.m @@ -0,0 +1,329 @@ +#import "PNFileUploadRequest.h" +#import "PNTransportRequest+Private.h" +#import "NSInputStream+PNCrypto.h" +#import "PNSequenceInputStream.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" + +#if __has_include() +#import +#endif // __has_include() + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `File data upload` request private extension. +@interface PNFileUploadRequest () + + +#pragma mark - Properties + +/// Dictionary with default header values override. +@property(strong, nonatomic) NSMutableDictionary *headersOverride; + +/// Pre-processed body input stream. +@property(strong, nonatomic) NSInputStream *httpBodyInputStream; + +/// List of fields which should be sent as `multipart/form-data` fields. +@property(strong, nonatomic) NSArray *formData; + +/// HTTP method which should be used to put file to remote storage. +@property(strong, nonatomic) NSString *method; + +/// File upload URL (with origin and path). +@property(strong, nonatomic) NSURL *url; + + +#pragma mark - Initialization and Configuration + +/// Initialize `File Upload` request. +/// +/// - Parameters: +/// - url: File upload URL (with origin and path). +/// - method: HTTP method which should be used to put file to remote storage. +/// - formData: List of fields which should be sent as `multipart/form-data` fields. +/// - Returns: Initialized `File Upload` request. +- (instancetype)initWithURL:(NSURL *)url httpMethod:(NSString *)method formData:(NSArray *)formData; + + +#pragma mark - Helpers + +/// Create input stream with `multipart/form-data` stream-based data. +/// +/// - Parameters: +/// - boundary: Boundary which should be used to separate `multipart/form-data` fields in POST body. +/// - stream: Input stream with data which should be uploaded. +/// - filename: Name which should be used to store uploaded data. +/// - cryptoModule: Crypto module for data _encryption_. +/// - fields: List of multipart/form-data fields which should be processed. +/// - streamsTotalSize: Pointer which is used to store overall input streams size. +/// - Returns: Initialized input stream with `multipart/form-data` stream-based data. +- (nullable NSInputStream *)multipartFormDataStreamWithBoundary:(NSString *)boundary + dataInputStream:(NSInputStream *)stream + filename:(NSString *)filename + cryptoModule:(nullable id)cryptoModule + fromFields:(NSArray *)fields + streamsSize:(NSUInteger *)streamsTotalSize; + +/// Prepare provided multipart/form-data fields to be sent with request POST body. +/// +/// - Parameters: +/// - boundary: Separator for key/value pairs. +/// - fields: List of multipart/form-data fields which should be processed. +/// - Returns: Data object which can be sent with request post body or \c nil in case if there is no `fields` provided. +- (nullable NSData *)multipartFormDataWithBoundary:(NSString *)boundary fromFields:(NSArray *)fields; + +/// Prepare multipart/form-data file data to be sent with request POST body. +/// +/// - Parameters: +/// - filename: Name under which uploaded data should be stored. +/// - boundary: Separator for key/value pairs. +/// - Returns: Data object which can be sent with request post body. +- (NSData *)multipartFormFile:(NSString *)filename dataWithBoundary:(NSString *)boundary; + +/// Multipart form data end data. +/// +/// - Parameter boundary: Separator for key/value pairs. +/// - Returns: Data object which should be send at the end of multipart/form-data HTTP body stream. +- (NSData *)multipartFormEndDataWithBoundary:(NSString *)boundary; + +/// Identify file MIME type using file extension. +/// +/// - Parameter filename: Name from which extension should be examined. +/// - Returns: Actual file MIME type or `application/octet-stream` if type can't be identified. +- (NSString *)mimeTypeFromFilename:(NSString *)filename; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNFileUploadRequest + + +#pragma mark - Properties + +- (PNOperationType)operation { + return PNSendFileOperation; +} + +- (PNTransportRequest *)request { + PNTransportRequest *request = super.request; + request.timeout = self.subscribeMaximumIdleTime; + + return request; +} + +- (NSInputStream *)bodyStream { + return self.httpBodyInputStream ?: _bodyStream; +} + +- (TransportMethod)httpMethod { + return [self.method.lowercaseString isEqualToString:@"post"] ? TransportPOSTMethod : TransportPATCHMethod; +} + +- (BOOL)bodyStreamAvailable { + return YES; +} + +- (BOOL)shouldCompressBody { + return NO; +} + +- (NSDictionary *)headers { + if (self.headersOverride.count == 0) return [super headers]; + + NSMutableDictionary *headers = [([super headers] ?: @{}) mutableCopy]; + [headers addEntriesFromDictionary:self.headersOverride]; + + return headers; +} + +- (NSString *)origin { + return PNStringFormat(@"%@://%@", self.url.scheme, self.url.host); +} + +- (NSString *)path { + return self.url.path; +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestWithURL:(NSURL *)url httpMethod:(NSString *)method formData:(NSArray *)formData { + return [[self alloc] initWithURL:url httpMethod:method formData:formData]; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithURL:(NSURL *)url httpMethod:(NSString *)method formData:(NSArray *)formData { + if ((self = [super init])) { + _formData = formData; + _method = method; + _url = url; + + } + + return self; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.formData.count && [self bodyStreamAvailable]) { + NSString *boundary = [[NSUUID UUID].UUIDString stringByReplacingOccurrencesOfString:@"-" withString:@""]; + NSUInteger dataSize = self.dataSize; + + self.httpBodyInputStream = [self multipartFormDataStreamWithBoundary:boundary + dataInputStream:_bodyStream + filename:self.filename + cryptoModule:self.cryptoModule + fromFields:self.formData + streamsSize:&dataSize]; + + if (!self.httpBodyInputStream) { + NSDictionary *userInfo = PNErrorUserInfo( + @"Unable to create HTTP body stream", + @"Provided data streams opened or file is missing", + nil, + nil + ); + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } else { + NSMutableDictionary *headers = [NSMutableDictionary new]; + headers[@"content-type"] = [@"multipart/form-data; boundary=" stringByAppendingString:boundary]; + headers[@"content-length"] = @(dataSize).stringValue; + self.headersOverride = headers; + } + } else if ([self bodyStreamAvailable]) self.httpBodyInputStream = _bodyStream; + + return nil; +} + + +#pragma mark - Helpers + +- (NSInputStream *)multipartFormDataStreamWithBoundary:(NSString *)boundary + dataInputStream:(NSInputStream *)stream + filename:(NSString *)filename + cryptoModule:(id)cryptoModule + fromFields:(NSArray *)fields + streamsSize:(NSUInteger *)streamsTotalSize { + NSString *fileMIMEType = [self mimeTypeFromFilename:filename]; + + if (fileMIMEType.length) { + NSMutableArray *mutableFields = [fields mutableCopy]; + + for (NSUInteger fieldIdx = 0; fieldIdx < fields.count; fieldIdx++) { + if (![fields[fieldIdx][@"key"] isEqualToString:@"Content-Type"]) continue; + NSMutableDictionary *mutableField = [fields[fieldIdx] mutableCopy]; + NSString *fieldValue = mutableField[@"value"]; + + if (fieldValue.length == 0 || [fieldValue rangeOfString:@"octet-stream"].location != NSNotFound) { + mutableField[@"value"] = fileMIMEType; + mutableFields[fieldIdx] = mutableField; + fields = [mutableFields copy]; + } + + break; + } + } + + NSData *multipartFormData = [self multipartFormDataWithBoundary:boundary fromFields:fields]; + NSData *fileFormData = [self multipartFormFile:filename dataWithBoundary:boundary]; + NSMutableArray *inputStreams = [NSMutableArray new]; + NSMutableArray *streamLengths = [NSMutableArray new]; + NSInputStream *formDataStream = nil; + + if (multipartFormData) { + [streamLengths addObject:@(multipartFormData.length)]; + [inputStreams addObject:[NSInputStream inputStreamWithData:multipartFormData]]; + } + + if (fileFormData) { + [streamLengths addObject:@(fileFormData.length)]; + [inputStreams addObject:[NSInputStream inputStreamWithData:fileFormData]]; + } + + NSNumber *fileStreamSize = @(*streamsTotalSize); + if (cryptoModule) { + PNResult *encryptResult = [cryptoModule encryptStream:stream dataLength:*streamsTotalSize]; + if (!encryptResult.isError) { + stream = encryptResult.data; + fileStreamSize = @(stream.pn_dataLength); + } + } + [streamLengths addObject:fileStreamSize]; + [inputStreams addObject:stream]; + + NSData *multipartFormEndData = [self multipartFormEndDataWithBoundary:boundary]; + [streamLengths addObject:@(multipartFormEndData.length)]; + [inputStreams addObject:[NSInputStream inputStreamWithData:multipartFormEndData]]; + + if (inputStreams.count == 4) { + formDataStream = [PNSequenceInputStream inputStreamWithInputStreams:inputStreams lengths:streamLengths]; + *streamsTotalSize = ((PNSequenceInputStream *)formDataStream).length; + } else { + *streamsTotalSize = 0; + } + + return formDataStream; +} + +- (NSData *)multipartFormDataWithBoundary:(NSString *)boundary fromFields:(NSArray *)fields { + NSMutableData *multipartFormData = [NSMutableData new]; + + [fields enumerateObjectsUsingBlock:^(NSDictionary *fieldData, NSUInteger fieldDataIdx, BOOL *stop) { + NSString *fieldValue = fieldData[@"value"]; + NSString *fieldName = fieldData[@"key"]; + + [multipartFormData appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] + dataUsingEncoding:NSUTF8StringEncoding]]; + [multipartFormData appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n", + fieldName] + dataUsingEncoding:NSUTF8StringEncoding]]; + [multipartFormData appendData:[[NSString stringWithFormat:@"%@\r\n", fieldValue] + dataUsingEncoding:NSUTF8StringEncoding]]; + }]; + + return multipartFormData; +} + +- (NSData *)multipartFormFile:(NSString *)filename dataWithBoundary:(NSString *)boundary { + NSString *disposition = PNStringFormat(@"Content-Disposition: form-data; name=\"file\"; filename=\"%@\"\r\n\r\n", + filename); + NSMutableData *multipartFormFileData = [NSMutableData new]; + + [multipartFormFileData appendData:[PNStringFormat(@"--%@\r\n", boundary) dataUsingEncoding:NSUTF8StringEncoding]]; + [multipartFormFileData appendData:[disposition dataUsingEncoding:NSUTF8StringEncoding]]; + + return multipartFormFileData; +} + +- (NSData *)multipartFormEndDataWithBoundary:(NSString *)boundary { + return [[NSString stringWithFormat:@"\r\n--%@--\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]; +} + +- (NSString *)mimeTypeFromFilename:(NSString *)filename { +#if __has_include() + UTType *type = [UTType typeWithTag:filename.pathExtension tagClass:UTTagClassFilenameExtension conformingToType:nil]; + return type.preferredMIMEType ?: @"application/octet-stream"; +#else + return @"application/octet-stream"; +#endif // __has_include() +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Files/PNGenerateFileDownloadURLRequest.h b/PubNub/Network/Requests/Files/PNGenerateFileDownloadURLRequest.h new file mode 100644 index 000000000..41117f97d --- /dev/null +++ b/PubNub/Network/Requests/Files/PNGenerateFileDownloadURLRequest.h @@ -0,0 +1,28 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `File download URL generate` request. +@interface PNGenerateFileDownloadURLRequest : PNBaseRequest + + +#pragma mark - Initialization and Configuration + +/// Create `File download URL generate` request. +/// +/// - Parameters: +/// - channel: Name of the channel where file with ``fileIdentifier`` ID has been shared. +/// - fileId: Unique file identifier. +/// - fileName: Name which will be used to store user data on server. +/// - Returns: Ready to use `File download URL generate` request. ++ (instancetype)requestWithChannel:(NSString *)channel fileIdentifier:(NSString *)fileId fileName:(NSString *)fileName; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Files/PNGenerateFileDownloadURLRequest.m b/PubNub/Network/Requests/Files/PNGenerateFileDownloadURLRequest.m new file mode 100644 index 000000000..1df6c2f29 --- /dev/null +++ b/PubNub/Network/Requests/Files/PNGenerateFileDownloadURLRequest.m @@ -0,0 +1,98 @@ +#import "PNGenerateFileDownloadURLRequest.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `File upload URL` request private extension. +@interface PNGenerateFileDownloadURLRequest () + + +#pragma mark - Properties + +/// Unique file identifier. +@property(strong, nullable, nonatomic, readonly) NSString *fileIdentifier; + +/// Name which will be used to store user data on server. +@property(strong, nullable, nonatomic, readonly) NSString *filename; + +/// Name of the channel where file with ``fileIdentifier`` ID has been shared. +@property(strong, nullable, nonatomic, readonly) NSString *channel; + + +#pragma mark - Initialization and Configuration + +/// Initialize `File download URL generate` request. +/// +/// - Parameters: +/// - channel: Name of the channel where file with ``fileIdentifier`` ID has been shared. +/// - fileId: Unique file identifier. +/// - fileName: Name which will be used to store user data on server. +/// - Returns: Initialized `File download URL generate` request. +- (instancetype)initWithChannel:(NSString *)channel fileIdentifier:(NSString *)fileId fileName:(NSString *)fileName; + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNGenerateFileDownloadURLRequest + + +#pragma mark - Propeties + +- (TransportMethod)httpMethod { + return TransportLOCALMethod; +} + +- (NSString *)path { + return PNStringFormat(@"/v1/files/%@/channels/%@/files/%@/%@", + self.subscribeKey, + [PNString percentEscapedString:self.channel], + self.fileIdentifier, + [PNString percentEscapedString:self.filename]); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestWithChannel:(NSString *)channel fileIdentifier:(NSString *)fileId fileName:(NSString *)fileName { + return [[self alloc] initWithChannel:channel fileIdentifier:fileId fileName:fileName]; +} + +- (instancetype)initWithChannel:(NSString *)channel fileIdentifier:(NSString *)fileId fileName:(NSString *)fileName { + if ((self = [super init])) { + _fileIdentifier = [fileId copy]; + _filename = [fileName copy]; + _channel = [channel copy]; + } + + return self; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.fileIdentifier.length == 0) { + return [self missingParameterError:@"fileIdentifier" forObjectRequest:@"PNGenerateFileDownloadURLRequest"]; + } else if (self.channel.length == 0) { + return [self missingParameterError:@"channel" forObjectRequest:@"PNGenerateFileDownloadURLRequest"]; + } else if (self.filename.length == 0) { + return [self missingParameterError:@"filename" forObjectRequest:@"PNGenerateFileDownloadURLRequest"]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Files/PNGenerateFileUploadURLRequest.h b/PubNub/Network/Requests/Files/PNGenerateFileUploadURLRequest.h index a346f52e8..af6028864 100644 --- a/PubNub/Network/Requests/Files/PNGenerateFileUploadURLRequest.h +++ b/PubNub/Network/Requests/Files/PNGenerateFileUploadURLRequest.h @@ -1,54 +1,37 @@ -#import "PNStructures.h" -#import "PNRequest.h" +#import NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c File \c upload \c URL request. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNGenerateFileUploadURLRequest : PNRequest +/// `File upload URL` request. +@interface PNGenerateFileUploadURLRequest : PNBaseRequest -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Arbitrary percent encoded query parameters which should be sent along with original API call. - */ -@property (nonatomic, nullable, strong) NSDictionary *arbitraryQueryParameters; +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; -/** - * @brief Name which should be used to store uploaded data. - */ -@property (nonatomic, copy) NSString *filename; +/// Name which should be used to store uploaded data. +@property(copy, nonatomic) NSString *filename; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Create and configure \c upload \c data \c URL \c generation request. - * - * @param channel Name of channel to which \c data should be uploaded. - * @param name File name which will be used to store uploaded \c data. - * - * @return Configured and ready to use \c upload \c data \c URL \c generation request. - */ +/// Create `Upload data URL generation` request. +/// +/// - Parameters: +/// - channel: Name of channel to which `data` should be uploaded. +/// - name File name which will be used to store uploaded `data`. +/// - Returns: Ready to use `upload data URL generation` request. + (instancetype)requestWithChannel:(NSString *)channel filename:(NSString *)name; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Files/PNGenerateFileUploadURLRequest.m b/PubNub/Network/Requests/Files/PNGenerateFileUploadURLRequest.m index b22a85332..74d9c08fb 100644 --- a/PubNub/Network/Requests/Files/PNGenerateFileUploadURLRequest.m +++ b/PubNub/Network/Requests/Files/PNGenerateFileUploadURLRequest.m @@ -1,40 +1,36 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ #import "PNGenerateFileUploadURLRequest.h" -#import "PNRequest+Private.h" -#import "PNErrorCodes.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" +#import "PNFunctions.h" #import "PNHelpers.h" +#import "PNError.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// `File upload URL` request private extension. @interface PNGenerateFileUploadURLRequest () -#pragma mark - Information +#pragma mark - Properties + +/// Request post body. +@property(strong, nullable, nonatomic) NSData *body; -/** - * @brief Name of channel to which \c data should be uploaded. - */ +/// Name of channel to which \c data should be uploaded. @property (nonatomic, copy) NSString *channel; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Initialize \c upload \c data \c URL \c generation request. - * - * @param channel Name of channel to which \c data should be uploaded. - * @param name File name which will be used to store uploaded \c data. - * - * @return Initialized and ready to use \c upload \c data \c URL \c generation request. - */ +/// Initialize `Upload data URL generation` request. +/// +/// - Parameters: +/// - channel: Name of channel to which `data` should be uploaded. +/// - name File name which will be used to store uploaded `data`. +/// - Returns: Initialized `upload data URL generation` request. - (instancetype)initWithChannel:(NSString *)channel filename:(NSString *)name; #pragma mark - @@ -56,74 +52,31 @@ - (PNOperationType)operation { return PNGenerateFileUploadURLOperation; } -- (NSString *)httpMethod { - return @"POST"; +- (TransportMethod)httpMethod { + return TransportPOSTMethod; } -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; - - if (self.parametersError) { - return parameters; - } - - if (self.channel.length) { - [parameters addPathComponent:[PNString percentEscapedString:self.channel] - forPlaceholder:@"{channel}"]; - } else { - self.parametersError = [self missingParameterError:@"channel" forObjectRequest:@"Request"]; - } - - return parameters; +- (NSDictionary *)query { + NSMutableDictionary *query = [NSMutableDictionary new]; + + if (self.arbitraryQueryParameters.count) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query.count ? query : nil; } -- (NSData *)bodyData { - if (self.parametersError) { - return nil; - } - - NSMutableDictionary *info = [NSMutableDictionary new]; - NSError *error = nil; - NSData *data = nil; - - if (self.filename) { - info[@"name"] = [PNString percentEscapedString:self.filename]; - } else { - self.parametersError = [self missingParameterError:@"filename" forObjectRequest:@"Request"]; - return nil; - } - - if ([NSJSONSerialization isValidJSONObject:info]) { - data = [NSJSONSerialization dataWithJSONObject:info - options:(NSJSONWritingOptions)0 - error:&error]; - } else { - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Unable to serialize to JSON string", - NSLocalizedFailureReasonErrorKey: @"Provided object contains unsupported data type instances." - }; - - error = [NSError errorWithDomain:NSCocoaErrorDomain - code:NSPropertyListWriteInvalidError - userInfo:errorInformation]; - } - - if (error) { - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"File information serialization did fail", - NSUnderlyingErrorKey: error - }; - - self.parametersError = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:errorInformation]; - } +- (NSDictionary *)headers { + NSMutableDictionary *headers =[([super headers] ?: @{}) mutableCopy]; + headers[@"Content-Type"] = @"application/json"; + + return headers; +} - return data; +- (NSString *)path { + return PNStringFormat(@"/v1/files/%@/channels/%@/generate-upload-url", self.subscribeKey, self.channel); } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)requestWithChannel:(NSString *)channel filename:(NSString *)name { return [[self alloc] initWithChannel:channel filename:name]; @@ -144,6 +97,42 @@ - (instancetype)init { return nil; } + +#pragma mark - Prepare + +- (PNError *)validate { + NSDictionary *payload = nil; + NSError *error = nil; + + if (self.channel.length == 0) return [self missingParameterError:@"channel" forObjectRequest:@"Request"]; + if (!self.filename) return [self missingParameterError:@"filename" forObjectRequest:@"Request"]; + else payload = @{ @"name": [PNString percentEscapedString:self.filename] }; + + if ([NSJSONSerialization isValidJSONObject:payload]) { + self.body = [NSJSONSerialization dataWithJSONObject:payload options:(NSJSONWritingOptions)0 error:&error]; + } else { + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: @"Unable to serialize to JSON string", + NSLocalizedFailureReasonErrorKey: @"Provided object contains unsupported data type instances." + }; + + error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSPropertyListWriteInvalidError userInfo:userInfo]; + } + + if (error) { + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: @"File information serialization did fail", + NSUnderlyingErrorKey: error + }; + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } + + + + return nil; +} + #pragma mark - diff --git a/PubNub/Network/Requests/Files/PNListFilesRequest.h b/PubNub/Network/Requests/Files/PNListFilesRequest.h index b9c57b93a..a0799d3f7 100644 --- a/PubNub/Network/Requests/Files/PNListFilesRequest.h +++ b/PubNub/Network/Requests/Files/PNListFilesRequest.h @@ -1,57 +1,45 @@ -#import +#import NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c List \c files request. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNListFilesRequest : PNRequest - - -#pragma mark - Information - -/** - * @brief Arbitrary percent encoded query parameters which should be sent along with original API call. - */ -@property (nonatomic, nullable, strong) NSDictionary *arbitraryQueryParameters; - -/** - * @brief Name of channel for which list of files should be fetched. - */ -@property (nonatomic, readonly, copy) NSString *channel; - -/** - * @brief Previously-returned cursor bookmark for fetching the next page. - */ -@property (nonatomic, nullable, copy) NSString *next; - -/** - * @brief Number of files to return in response. - * - * @note Will be set to \c 100 (which is also maximum value) if not specified. - */ -@property (nonatomic, assign) NSUInteger limit; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c list \c files request. - * - * @param channel Name of channel for which files list should be retrieved. - * - * @return Configured and ready to use \c list \c files request. - */ +/// `List files` request. +@interface PNListFilesRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// Name of channel for which list of files should be fetched. +@property(copy, nonatomic, readonly) NSString *channel; + +/// Previously-returned cursor bookmark for fetching the next page. +@property(copy, nullable, nonatomic) NSString *next; + +/// Number of files to return in response. +/// +/// > Note: Will be set to `100` (which is also maximum value) if not specified. +@property(assign, nonatomic) NSUInteger limit; + + +#pragma mark - Initialization and Configuration + +/// Create `List files` request. +/// +/// - Parameter channel: Name of channel for which files list should be retrieved. +/// - Returns: Ready to use `list files` request. + (instancetype)requestWithChannel:(NSString *)channel; +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + #pragma mark - diff --git a/PubNub/Network/Requests/Files/PNListFilesRequest.m b/PubNub/Network/Requests/Files/PNListFilesRequest.m index e4793849a..552c33cb7 100644 --- a/PubNub/Network/Requests/Files/PNListFilesRequest.m +++ b/PubNub/Network/Requests/Files/PNListFilesRequest.m @@ -1,41 +1,32 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ #import "PNListFilesRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" +#import "PNFunctions.h" #import "PNHelpers.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// `List files` request private extension. @interface PNListFilesRequest () -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Name of channel for which list of files should be fetched. - */ -@property (nonatomic, copy) NSString *channel; +/// Name of channel for which list of files should be fetched. +@property(copy, nonatomic) NSString *channel; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Configure \c list \c files request. - * - * @param channel Name of channel for which files list should be retrieved. - * - * @return Configured and ready to use \c list \c files request. - */ +/// Initialize `List files` request. +/// +/// - Parameter channel: Name of channel for which files list should be retrieved. +/// - Returns: Initialized `list files` request. - (instancetype)initWithChannel:(NSString *)channel; - #pragma mark - @@ -55,44 +46,32 @@ - (PNOperationType)operation { return PNListFilesOperation; } -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; - - if (self.parametersError) { - return parameters; - } +- (NSDictionary *)query { + NSMutableDictionary *query = [NSMutableDictionary new]; - if (self.channel.length) { - [parameters addPathComponent:[PNString percentEscapedString:self.channel] - forPlaceholder:@"{channel}"]; - } else { - self.parametersError = [self missingParameterError:@"channel" forObjectRequest:@"Request"]; - } - - if (self.limit > 0) { - [parameters addQueryParameter:@(MIN(self.limit, 100)).stringValue forFieldName:@"limit"]; - } - - if (self.next.length) { - [parameters addQueryParameter:[PNString percentEscapedString:self.next] - forFieldName:@"next"]; - } + if (self.next.length) query[@"next"] = [PNString percentEscapedString:self.next]; + if (self.limit > 0) query[@"limit"] = @(MIN(self.limit, 100)).stringValue; - return parameters; + if (self.arbitraryQueryParameters.count) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query.count ? query : nil; +} + +- (NSString *)path { + return PNStringFormat(@"/v1/files/%@/channels/%@/files", + self.subscribeKey, + [PNString percentEscapedString:self.channel]); } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)requestWithChannel:(NSString *)channel { return [[self alloc] initWithChannel:channel]; } - (instancetype)initWithChannel:(NSString *)channel { - if ((self = [super init])) { - _channel = [channel copy]; - } - + if ((self = [super init])) _channel = [channel copy]; return self; } @@ -102,6 +81,14 @@ - (instancetype)init { return nil; } + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.channel.length == 0) return [self missingParameterError:@"channel" forObjectRequest:@"Request"]; + return nil; +} + #pragma mark - diff --git a/PubNub/Network/Requests/Files/PNSendFileRequest+Private.h b/PubNub/Network/Requests/Files/PNSendFileRequest+Private.h index 02ae16a38..066ec527a 100644 --- a/PubNub/Network/Requests/Files/PNSendFileRequest+Private.h +++ b/PubNub/Network/Requests/Files/PNSendFileRequest+Private.h @@ -9,19 +9,19 @@ NS_ASSUME_NONNULL_BEGIN @interface PNSendFileRequest (Private) -#pragma mark - Information +#pragma mark - Properties /// Crypto module which should be used for uploaded data _encryption_. /// /// This property allows setting up data _encryption_ using a different crypto module than the one set during **PubNub** /// client instance configuration. -@property(nonatomic, nullable, strong) id cryptoModule; +@property(strong, nullable, nonatomic) id cryptoModule; /// Input stream with data which should be uploaded to remote storage server / service. -@property (nonatomic, readonly, strong) NSInputStream *stream; +@property(strong, nonatomic, readonly) NSInputStream *stream; /// Size of data which can be read from `stream`. -@property (nonatomic, readonly, assign) NSUInteger size; +@property(assign, nonatomic, readonly) NSUInteger size; #pragma mark - diff --git a/PubNub/Network/Requests/Files/PNSendFileRequest.h b/PubNub/Network/Requests/Files/PNSendFileRequest.h index 293b78992..9a6b8fa8b 100644 --- a/PubNub/Network/Requests/Files/PNSendFileRequest.h +++ b/PubNub/Network/Requests/Files/PNSendFileRequest.h @@ -1,5 +1,4 @@ -#import -#import +#import #pragma mark Protocols forwarding @@ -12,49 +11,43 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Interface declaration /// `Upload file` request. -/// -/// The **PubNub** client will use information from the provided request object to _upload_ files or data to the remote -/// storage. -/// -/// - Since: 4.15.0 -/// - Copyright: 2010-2023 PubNub, Inc. -@interface PNSendFileRequest : PNRequest +@interface PNSendFileRequest : PNBaseRequest -#pragma mark - Information +#pragma mark - Properties /// Arbitrary percent encoded query parameters which should be sent along with original API call. -@property (nonatomic, nullable, strong) NSDictionary *arbitraryQueryParameters; +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; /// `NSDictionary` with values which should be used by **PubNub** service to filter `file messages`. -@property (nonatomic, nullable, strong) NSDictionary *fileMessageMetadata; +@property(strong, nullable, nonatomic) NSDictionary *fileMessageMetadata; -/// Key which should be used for uploaded data _encryption_. +/// Key which should be used for uploaded data `encryption`. /// /// This property allows setting up data _encryption_ using a different cipher key than the one set during **PubNub** /// client instance configuration. -@property (nonatomic, nullable, copy) NSString *cipherKey; +@property(copy, nullable, nonatomic) NSString *cipherKey; /// How long message should be stored in channel's storage. /// /// > Note: Pass `0` store message according to retention. -@property (nonatomic, assign) NSUInteger fileMessageTTL; +@property(assign, nonatomic) NSUInteger fileMessageTTL; /// Name of channel to which `data` should be uploaded. -@property (nonatomic, readonly, copy) NSString *channel; +@property(copy, readonly, nonatomic) NSString *channel; /// Whether **PubNub** published `file message` should be stored in `channel` history. -@property (nonatomic, assign) BOOL fileMessageStore; +@property(assign, nonatomic) BOOL fileMessageStore; /// Message which should be sent along with file to specified `channel`. /// /// Provided object will be serialized into JSON string before pushing to the **PubNub** network. /// /// > Note: If client has been configured with cipher key message will be encrypted as well. -@property (nonatomic, nullable, strong) id message; +@property(strong, nullable, nonatomic) id message; /// Name which should be used to store uploaded data. -@property (nonatomic, copy) NSString *filename; +@property(copy, nonatomic) NSString *filename; #pragma mark - Initialization and configuration @@ -66,7 +59,7 @@ NS_ASSUME_NONNULL_BEGIN /// - Parameters: /// - channel: Name of channel to which file at `url` should be uploaded. /// - url: URL of file which should be uploaded (on the file system). -/// - Returns: Initialized `file upload` request. +/// - Returns: Ready to use `file upload` request. + (instancetype)requestWithChannel:(NSString *)channel fileURL:(NSURL *)url; /// Create `data upload` request instance. @@ -77,10 +70,8 @@ NS_ASSUME_NONNULL_BEGIN /// - channel: Name of channel to which `data` should be uploaded. /// - name: File name which will be used to store uploaded `data`. /// - data: Binary data which should be uploaded. -/// - Returns: Initialized `data upload` request. -+ (instancetype)requestWithChannel:(NSString *)channel - fileName:(NSString *)name - data:(NSData *)data; +/// - Returns: Ready to use `data upload` request. ++ (instancetype)requestWithChannel:(NSString *)channel fileName:(NSString *)name data:(NSData *)data; /// Create `stream data upload` request instance. /// diff --git a/PubNub/Network/Requests/Files/PNSendFileRequest.m b/PubNub/Network/Requests/Files/PNSendFileRequest.m index f99f68d61..b68800ea5 100644 --- a/PubNub/Network/Requests/Files/PNSendFileRequest.m +++ b/PubNub/Network/Requests/Files/PNSendFileRequest.m @@ -1,6 +1,7 @@ #import "PNSendFileRequest+Private.h" -#import "PNRequest+Private.h" -#import "PNErrorCodes.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" +#import "PNError.h" NS_ASSUME_NONNULL_BEGIN @@ -11,22 +12,25 @@ @interface PNSendFileRequest () -#pragma mark - Information +#pragma mark - Properties /// Crypto module which should be used for uploaded data _encryption_. /// /// This property allows setting up data _encryption_ using a different crypto module than the one set during **PubNub** /// client instance configuration. -@property(nonatomic, nullable, strong) id cryptoModule; +@property(strong, nullable, nonatomic) id cryptoModule; + +/// Request configuration error. +@property(strong, nullable, nonatomic) PNError *parametersError; /// Input stream with data which should be uploaded to remote storage server / service. -@property (nonatomic, strong) NSInputStream *stream; +@property(strong, nonatomic) NSInputStream *stream; /// Size of data which can be read from `stream`. -@property (nonatomic, assign) NSUInteger size; +@property(assign, nonatomic) NSUInteger size; /// Name of channel to which `data` should be uploaded. -@property (nonatomic, copy) NSString *channel; +@property(copy, nonatomic) NSString *channel; #pragma mark - Initialization and configuration @@ -46,7 +50,7 @@ - (instancetype)initWithChannel:(NSString *)channel fileName:(NSString *)name stream:(nullable NSInputStream *)stream size:(NSUInteger)size - error:(nullable NSError *)error; + error:(nullable PNError *)error; #pragma mark - @@ -61,18 +65,34 @@ - (instancetype)initWithChannel:(NSString *)channel @implementation PNSendFileRequest -#pragma mark - Information +#pragma mark - Properties - (PNOperationType)operation { return PNSendFileOperation; } -- (NSString *)httpMethod { - return @"POST"; +- (TransportMethod)httpMethod { + return TransportPOSTMethod; +} + +- (BOOL)bodyStreamAvailable { + return self.stream != nil; +} + +- (NSInputStream *)bodyStream { + return self.stream; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [NSMutableDictionary new]; + + if (self.arbitraryQueryParameters.count) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query.count ? query : nil; } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)requestWithChannel:(NSString *)channel fileURL:(NSURL *)url { NSURL *fileURL = url.isFileURL ? url : [NSURL fileURLWithPath:url.path]; @@ -82,13 +102,13 @@ + (instancetype)requestWithChannel:(NSString *)channel fileURL:(NSURL *)url { NSString *filePath = url.path; NSUInteger fileSize = 0; BOOL isDirectory = NO; - NSError *error = nil; - + PNError *error = nil; + if (!filePath || ![fileManager fileExistsAtPath:filePath isDirectory:&isDirectory] || isDirectory) { NSString *reason = isDirectory ? @"URL points to directory" : @"Target file not found"; filePath = filePath ?: @"path is missing"; - error = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters + error = [PNError errorWithDomain:PNAPIErrorDomain + code:PNAPIErrorUnacceptableParameters userInfo:@{ NSLocalizedDescriptionKey: @"Unable to send file", NSLocalizedFailureReasonErrorKey: reason, @@ -106,13 +126,13 @@ + (instancetype)requestWithChannel:(NSString *)channel fileURL:(NSURL *)url { + (instancetype)requestWithChannel:(NSString *)channel fileName:(NSString *)name data:(NSData *)data { NSInputStream *inputStream = nil; - NSError *error = nil; + PNError *error = nil; if (data.length != 0) inputStream = [NSInputStream inputStreamWithData:data]; else { NSString *reason = @"Data object is empty"; - error = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters + error = [PNError errorWithDomain:PNAPIErrorDomain + code:PNAPIErrorUnacceptableParameters userInfo:@{ NSLocalizedDescriptionKey: @"Unable to send binary", NSLocalizedFailureReasonErrorKey: reason @@ -126,20 +146,20 @@ + (instancetype)requestWithChannel:(NSString *)channel fileName:(NSString *)name stream:(NSInputStream *)stream size:(NSUInteger)size { - NSError *error = nil; - + PNError *error = nil; + if (stream.streamStatus != NSStreamStatusNotOpen) { NSString *reason = @"Stream should be closed."; - error = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters + error = [PNError errorWithDomain:PNAPIErrorDomain + code:PNAPIErrorUnacceptableParameters userInfo:@{ NSLocalizedDescriptionKey: @"Unable to send data from stream", NSLocalizedFailureReasonErrorKey: reason }]; } else if (size == 0) { NSString *reason = @"Unable to send empty data object."; - error = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters + error = [PNError errorWithDomain:PNAPIErrorDomain + code:PNAPIErrorUnacceptableParameters userInfo:@{ NSLocalizedDescriptionKey: @"Unable to send data from stream", NSLocalizedFailureReasonErrorKey: reason @@ -153,7 +173,7 @@ - (instancetype)initWithChannel:(NSString *)channel fileName:(NSString *)name stream:(NSInputStream *)stream size:(NSUInteger)size - error:(NSError *)error { + error:(PNError *)error { if ((self = [super init])) { self.parametersError = error; _channel = [channel copy]; @@ -172,6 +192,13 @@ - (instancetype)init { return nil; } + +#pragma mark - Prepare + +- (PNError *)validate { + return self.parametersError; +} + #pragma mark - diff --git a/PubNub/Network/Requests/Message Persistence/PNHistoryFetchRequest+Private.h b/PubNub/Network/Requests/Message Persistence/PNHistoryFetchRequest+Private.h new file mode 100644 index 000000000..45d0cad95 --- /dev/null +++ b/PubNub/Network/Requests/Message Persistence/PNHistoryFetchRequest+Private.h @@ -0,0 +1,23 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Fetch history` request private extension. +@interface PNHistoryFetchRequest (Private) + + +#pragma mark - Properties + +/// Whether request has been created to fetch history for multiple channels or not. +/// +/// > Important: If set to `YES` requst will use `v3` `Message Persistence` REST API. +@property(assign, nonatomic, readonly) BOOL multipleChannels; + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Message Persistence/PNHistoryFetchRequest.h b/PubNub/Network/Requests/Message Persistence/PNHistoryFetchRequest.h new file mode 100644 index 000000000..2fbbc9b18 --- /dev/null +++ b/PubNub/Network/Requests/Message Persistence/PNHistoryFetchRequest.h @@ -0,0 +1,111 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface implementation + +/// `Fetch history` request. +@interface PNHistoryFetchRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// List of channel names for which events should be pulled out from storage. +/// +/// > Notes: Maximum 500 channels. +@property(copy, nonatomic, readonly) NSArray *channels; + +/// Include events' actions presence flag. +/// +/// Each fetched entry will contain published data under `message` key and added `message actions` will be available +/// under `actions` key. +/// +/// > Important: This option can't be used if `channels` contains multiple entries. +@property(assign, nonatomic) BOOL includeMessageActions; + +/// Search interval start timetoken. +/// +/// Timetoken for the oldest event starting from which next should be returned events. +/// +/// > Note: Value will be converted to required precision internally. +@property(strong, nullable, nonatomic) NSNumber *start; + +/// Search interval end timetoken. +/// +/// Timetoken for latest event till which events should be pulled out. +/// +/// > Note: Value will be converted to required precision internally. +@property(strong, nullable, nonatomic) NSNumber *end; + +/// Include events' type presence flag. +/// +/// Each fetched entry will contain published data under `message` key and published message `message type` will be +/// available under `messageType` key. +/// +/// > Note: By default set to `YES`. +@property(assign, nonatomic) BOOL includeMessageType; + +/// Include events' timetoken flag. +/// +/// Each fetched entry will contain published data under `message` key and added `publish time` will be available +/// under `timetoken` key. +/// +/// > Important: This option can't be used if `channels` contains multiple entries. +@property(assign, nonatomic) BOOL includeTimeToken; + +/// Include events' metadata presence flag. +/// +/// Each fetched entry will contain published data under `message` key and published message `meta` will be available +/// under `metadata` key. +@property(assign, nonatomic) BOOL includeMetadata; + +/// Include events' publisher user ID presence flag. +/// +/// Each fetched entry will contain published data under `message` key and published message `message publisher` will be +/// available under `uuid` key. +/// +/// > Note: By default set to `YES`. +@property(assign, nonatomic) BOOL includeUUID; + +/// Maximum number of events. +/// +/// Maximum number of events which should be returned in response. +/// +/// > Note: Maximum `100` if `channels` contains only one name or `25` if `channels` contains multiple names or +/// `includeMessageActions` is set to `YES`. +@property(assign, nonatomic) NSUInteger limit; + +/// Whether events order in response should be reversed or not. +@property(assign, nonatomic) BOOL reverse; + + +#pragma mark - Initialization and Constructor + +/// Create `Fetch history` request. +/// +/// - Parameter channel: Channel for which events should be pulled out from storage. +/// - Returns: Ready to use `Fetch history` request. ++ (instancetype)requestWithChannel:(NSString *)channel; + +/// Create `Fetch history` request. +/// +/// - Parameter channels: List of channel names for which events should be pulled out from storage. Maximum 500 channels. +/// - Returns: Ready to use `Fetch history` request. ++ (instancetype)requestWithChannels:(NSArray *)channels; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Message Persistence/PNHistoryFetchRequest.m b/PubNub/Network/Requests/Message Persistence/PNHistoryFetchRequest.m new file mode 100644 index 000000000..2e2b5686e --- /dev/null +++ b/PubNub/Network/Requests/Message Persistence/PNHistoryFetchRequest.m @@ -0,0 +1,170 @@ +#import "PNHistoryFetchRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportResponse.h" +#import "PNFunctions.h" +#import "PNHelpers.h" +#import "PNError.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Fetch history` request private extension. +@interface PNHistoryFetchRequest () + +#pragma mark - Properties + +/// List of channel names for which events should be pulled out from storage. +/// +/// > Notes: Maximum 500 channels. +@property(copy, nonatomic) NSArray *channels; + +/// Whether request has been created to fetch history for multiple channels or not. +/// +/// > Important: If set to `YES` requst will use `v3` `Message Persistence` REST API. +@property(assign, nonatomic) BOOL multipleChannels; + + +#pragma mark - Initialization and Constructor + +/// Initialize `Fetch history` request. +/// +/// - Parameter channels: List of channel names for which events should be pulled out from storage. Maximum 500 channels. +/// - Returns: Initialized `Fetch history` request. +- (instancetype)initWithChannels:(NSArray *)channels; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNHistoryFetchRequest + + +#pragma mark - Properies + +- (PNOperationType)operation { + if (self.multipleChannels) return PNHistoryForChannelsOperation; + return self.includeMessageActions ? PNHistoryWithActionsOperation : PNHistoryOperation; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + PNOperationType operation = self.operation; + + NSNumber *startDate = self.start; + NSNumber *endDate = self.end; + + if (startDate && endDate && [startDate compare:endDate] == NSOrderedDescending) { + NSNumber *_startDate = startDate; + startDate = endDate; + endDate = _startDate; + } + + NSString *limitQueryKeyName = self.multipleChannels ? @"max" : @"count"; + NSUInteger defaultLimit = self.multipleChannels ? 25 : 100; + + if (operation == PNHistoryForChannelsOperation && self.channels.count == 1) defaultLimit = 100; + NSUInteger limitValue = defaultLimit; + + if (self.limit > 0) limitValue = MIN(self.limit, defaultLimit); + + if (operation == PNHistoryWithActionsOperation) { + limitValue = self.limit; + limitQueryKeyName = @"max"; + } + + if (self.multipleChannels) { + if (self.limit > 0 || (operation != PNHistoryWithActionsOperation && self.channels.count == 1)) { + query[limitQueryKeyName] = @(limitValue).stringValue; + } + } else if (self.limit > 0) query[limitQueryKeyName] = @(limitValue).stringValue; + + + if (startDate) query[@"start"] = [PNNumber timeTokenFromNumber:startDate].stringValue; + if (endDate) query[@"end"] = [PNNumber timeTokenFromNumber:endDate].stringValue; + if (operation == PNHistoryOperation && self.reverse) query[@"reverse"] = @"true"; + if (self.includeMetadata) query[@"include_meta"] = @"true"; + + if (self.multipleChannels || operation == PNHistoryWithActionsOperation) { + query[@"include_message_type"] = self.includeMessageType ? @"true" : @"false"; + query[@"include_uuid"] = self.includeUUID ? @"true" : @"false"; + } + + if (!self.multipleChannels && self.includeTimeToken) query[@"include_token"] = @"true"; + if (self.arbitraryQueryParameters) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query; +} + +- (NSString *)path { + return PNStringFormat(@"/%@/history%@/sub-key/%@/channel/%@", + self.operation == PNHistoryOperation ? @"v2" : @"v3", + self.includeMessageActions ? @"-with-actions" : @"", + self.subscribeKey, + [PNChannel namesForRequest:self.channels]); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestWithChannel:(NSString *)channel { + PNHistoryFetchRequest *request = [self requestWithChannels:(channel ? @[channel] : @[])]; + request.multipleChannels = NO; + + return request; +} + ++ (instancetype)requestWithChannels:(NSArray *)channels { + return [[self alloc] initWithChannels:channels]; +} + +- (instancetype)initWithChannels:(NSArray *)channels { + if ((self = [super init])){ + _channels = [channels copy]; + _includeMessageType = YES; + _multipleChannels = YES; + _includeUUID = YES; + } + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.multipleChannels && self.includeMessageActions) { + NSDictionary *userInfo = PNErrorUserInfo( + @"Request parameters error", + @"PNHistoryFetchRequest's 'includeMessageActions' can't be used with multiple channels.", + @"Use +requestWithChannel: or disable 'includeMessageActions'.", + nil + ); + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } else if (!self.multipleChannels && self.channels.count == 0) { + return [self missingParameterError:@"channel" forObjectRequest:@"PNHistoryFetchRequest"]; + } else if (self.multipleChannels && self.channels.count == 0) { + return [self missingParameterError:@"channels" forObjectRequest:@"PNHistoryFetchRequest"]; + } + + return nil; +} + + + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Message Persistence/PNHistoryMessagesCountRequest.h b/PubNub/Network/Requests/Message Persistence/PNHistoryMessagesCountRequest.h new file mode 100644 index 000000000..ba5faa95b --- /dev/null +++ b/PubNub/Network/Requests/Message Persistence/PNHistoryMessagesCountRequest.h @@ -0,0 +1,47 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +/// `Fetch messages count` request. +@interface PNHistoryMessagesCountRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// List of channel names for which persist messages count should be fetched. +@property(copy, nonatomic, readonly) NSArray *channels; + +/// List with single or multiple timetokens, where each timetoken position in correspond to target `channel` location +/// in channel names list. +/// +/// > Importnat: Count of `timetokens` should match number of `channels`. +@property(copy, nonatomic, readonly) NSArray *timetokens; + + +#pragma mark - Initialization and Configuration + +/// Create `Fetch messages count` request. +/// +/// - Parameters: +/// - channels: List of channel names for which persist messages count should be fetched. +/// - timetokens: List with single or multiple timetokens, where each timetoken position in correspond to target +/// `channel` location in channel names list. +/// - Returns: Ready to use `Fetch messages count` request. ++ (instancetype)requestWithChannels:(NSArray *)channels timetokens:(NSArray *)timetokens; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Message Persistence/PNHistoryMessagesCountRequest.m b/PubNub/Network/Requests/Message Persistence/PNHistoryMessagesCountRequest.m new file mode 100644 index 000000000..0015b7025 --- /dev/null +++ b/PubNub/Network/Requests/Message Persistence/PNHistoryMessagesCountRequest.m @@ -0,0 +1,117 @@ +#import "PNHistoryMessagesCountRequest.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" +#import "PNFunctions.h" +#import "PNHelpers.h" +#import "PNError.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +@interface PNHistoryMessagesCountRequest () + + +#pragma mark - Properties + + +#pragma mark - Initialization and Configuration + +/// Initialize `Fetch messages count` request. +/// +/// - Parameters: +/// - channels: List of channel names for which persist messages count should be fetched. +/// - timetokens: List with single or multiple timetokens, where each timetoken position in correspond to target +/// `channel` location in channel names list. +/// - Returns: Initialized `Fetch messages count` request. +- (instancetype)initWithChannels:(NSArray *)channels timetokens:(NSArray *)timetokens; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNHistoryMessagesCountRequest + + +#pragma mark - Propeperties + +- (PNOperationType)operation { + return PNMessageCountOperation; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + + if (self.timetokens.count == 1) { + query[@"timetoken"] = [PNNumber timeTokenFromNumber:self.timetokens.firstObject].stringValue; + } else if (self.timetokens.count > 1) { + NSMutableArray *pubNubTimetokens = [NSMutableArray arrayWithCapacity:self.timetokens.count]; + + for (NSNumber *timetoken in self.timetokens) { + [pubNubTimetokens addObject:[PNNumber timeTokenFromNumber:timetoken].stringValue]; + } + + query[@"channelsTimetoken"] = [pubNubTimetokens componentsJoinedByString:@","]; + } + + return query; +} + +- (NSString *)path { + return PNStringFormat(@"/v3/history/sub-key/%@/message-counts/%@", + self.subscribeKey, [PNChannel namesForRequest:self.channels]); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestWithChannels:(NSArray *)channels timetokens:(NSArray *)timetokens { + return [[self alloc] initWithChannels:channels timetokens:timetokens]; +} + +- (instancetype)initWithChannels:(NSArray *)channels timetokens:(NSArray *)timetokens { + if ((self = [super init])) { + _timetokens = [timetokens copy]; + _channels = [channels copy]; + } + + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.channels.count == 0) return [self missingParameterError:@"channels" forObjectRequest:@"Messages count"]; + if (self.timetokens.count == 0) return [self missingParameterError:@"timetokens" forObjectRequest:@"Messages count"]; + if ((self.channels.count == 1 && self.timetokens.count > 1) || + (self.channels.count > 1 && self.timetokens.count > 1 && self.channels.count != self.timetokens.count)) { + NSDictionary *userInfo = PNErrorUserInfo(@"Parameters validation error", + PNStringFormat(@"Number of channels (%@) doesn't match number of " + "timetokens (%@)", @(self.channels.count), @(self.timetokens.count)), + @"Make sure to pass proper number of elements into each array.", + nil); + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Message Persistence/PNHistoryMessagesDeleteRequest.h b/PubNub/Network/Requests/Message Persistence/PNHistoryMessagesDeleteRequest.h new file mode 100644 index 000000000..fab33db7c --- /dev/null +++ b/PubNub/Network/Requests/Message Persistence/PNHistoryMessagesDeleteRequest.h @@ -0,0 +1,54 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface implementation + +/// `Delete messages` request. +@interface PNHistoryMessagesDeleteRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// Name of the channel from which events should be removed. +@property(copy, nonatomic, readonly) NSString *channel; + +/// Removed interval start timetoken. +/// +/// Timetoken for oldest event starting from which events should be removed. +/// Value will be converted to required precision internally. If no `end` value provided, will be removed all events +/// till specified `start` date (not inclusive). +@property(strong, nullable, nonatomic) NSNumber *start; + +/// Removed interval end timetoken +/// +/// Timetoken for latest event till which events should be removed. +/// Value will be converted to required precision internally. If no `start` value provided, will be removed all events +/// starting from specified `end` date (inclusive). +@property(strong, nullable, nonatomic) NSNumber *end; + + +#pragma mark - Initialization and Constructor + +/// Create `Delete messages` request. +/// +/// - Parameter channel: Name of the channel from which events should be removed. +/// - Returns: Ready to use `Delete messages` request. ++ (instancetype)requestWithChannel:(NSString *)channels; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Message Persistence/PNHistoryMessagesDeleteRequest.m b/PubNub/Network/Requests/Message Persistence/PNHistoryMessagesDeleteRequest.m new file mode 100644 index 000000000..fe830df81 --- /dev/null +++ b/PubNub/Network/Requests/Message Persistence/PNHistoryMessagesDeleteRequest.m @@ -0,0 +1,104 @@ +#import "PNHistoryMessagesDeleteRequest.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Delete messages` request private extension. +@interface PNHistoryMessagesDeleteRequest () + +#pragma mark - Properties + +/// Name of the channel from which events should be removed. +@property(copy, nonatomic) NSString *channel; + + +#pragma mark - Initialization and Constructor + +/// Initialize `Delete messages` request. +/// +/// - Parameter channel: Name of the channel from which events should be removed. +/// - Returns: Initialized `Delete messages` request. +- (instancetype)initWithChannel:(NSString *)channel; + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNHistoryMessagesDeleteRequest + + +#pragma mark - Parameters + +- (TransportMethod)httpMethod { + return TransportDELETEMethod; +} + +- (PNOperationType)operation { + return PNDeleteMessageOperation; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + NSNumber *startDate = self.start; + NSNumber *endDate = self.end; + + if (startDate && endDate && [startDate compare:endDate] == NSOrderedDescending) { + NSNumber *_startDate = startDate; + startDate = endDate; + endDate = _startDate; + } + + if (startDate) query[@"start"] = [PNNumber timeTokenFromNumber:startDate].stringValue; + if (endDate) query[@"end"] = [PNNumber timeTokenFromNumber:endDate].stringValue; + + return query; +} + +- (NSString *)path { + return PNStringFormat(@"/v3/history/sub-key/%@/channel/%@", + self.subscribeKey, [PNString percentEscapedString:self.channel]); +} + + +#pragma mark - Initialization and Constructor + ++ (instancetype)requestWithChannel:(NSString *)channels { + return [[self alloc] initWithChannel:channels]; +} + +- (instancetype)initWithChannel:(NSString *)channel { + if ((self = [super init])) _channel = [channel copy]; + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.channel.length == 0) return [self missingParameterError:@"channel" forObjectRequest:@"Delete messages"]; + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Message Reaction/Message/PNAddMessageActionRequest.h b/PubNub/Network/Requests/Message Reaction/Message/PNAddMessageActionRequest.h new file mode 100644 index 000000000..9fba0726d --- /dev/null +++ b/PubNub/Network/Requests/Message Reaction/Message/PNAddMessageActionRequest.h @@ -0,0 +1,42 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Add message action` request. +/// +/// Attach message reaction to the target message identified by its timetoken. +@interface PNAddMessageActionRequest : PNBaseMessageActionRequest + + +#pragma mark - Properties + +/// Value which should be added with `message action` ``type``. +@property(copy, nonatomic) NSString *value; + +/// What feature this `message action` represents. +/// +/// > Important: Maximum **15** characters. +@property(copy, nonatomic) NSString *type; + + +#pragma mark - Initialization and Configuration + +/// Create `add message action` request. +/// +/// - Parameters: +/// - channel: Name of channel which store `message` for which `action` should be added. +/// - messageTimetoken: Timetoken (**PubNub**'s high precision timestamp) of `message` to which `action` should be +/// added. +/// - Returns: Ready to use `add message action` request. ++ (instancetype)requestWithChannel:(NSString *)channel messageTimetoken:(NSNumber *)messageTimetoken + NS_SWIFT_NAME(init(channel:messageTimetoken:)); + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Message Reaction/Message/PNAddMessageActionRequest.m b/PubNub/Network/Requests/Message Reaction/Message/PNAddMessageActionRequest.m new file mode 100644 index 000000000..37fd88560 --- /dev/null +++ b/PubNub/Network/Requests/Message Reaction/Message/PNAddMessageActionRequest.m @@ -0,0 +1,108 @@ +#import "PNAddMessageActionRequest.h" +#import "PNBaseMessageActionRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" +#import "PNHelpers.h" +#import "PNError.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Add message action` request private extension. +@interface PNAddMessageActionRequest () + + +#pragma mark - Properties + +/// Request post body. +@property(strong, nullable, nonatomic) NSData *body; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNAddMessageActionRequest + + +#pragma mark - Properties + +- (PNOperationType)operation { + return PNAddMessageActionOperation; +} + +- (TransportMethod)httpMethod { + return TransportPOSTMethod; +} + +- (NSDictionary *)headers { + NSMutableDictionary *headers =[([super headers] ?: @{}) mutableCopy]; + headers[@"Content-Type"] = @"application/json"; + + return headers; +} + +- (NSString *)path { + return PNStringFormat(@"/v1/message-actions/%@/channel/%@/message/%@", + self.subscribeKey, [PNString percentEscapedString:self.channel], self.messageTimetoken); +} + + +#pragma mark - Initialization & Configuration + ++ (instancetype)requestWithChannel:(NSString *)channel messageTimetoken:(NSNumber *)messageTimetoken { + return [[self alloc] initWithChannel:channel messageTimetoken:messageTimetoken]; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + PNError *error = [super validate]; + if (error) return error; + + if (!self.type || ([self.type isKindOfClass:[NSString class]] && !self.type.length)) { + return [self missingParameterError:@"type" forObjectRequest:@"PNAddMessageActionRequest"]; + } else if (self.type.length > 15) { + return [self valueTooLongErrorForParameter:@"type" + ofObjectRequest:@"PNAddMessageActionRequest" + withLength:self.type.length + maximumLength:15]; + } else if (!self.value || ([self.value isKindOfClass:[NSString class]] && !self.value.length)) { + return [self missingParameterError:@"value" forObjectRequest:@"PNAddMessageActionRequest"]; + } + + NSDictionary *actionData = @{ @"type": self.type, @"value": self.value }; + + if ([NSJSONSerialization isValidJSONObject:actionData]) { + self.body = [NSJSONSerialization dataWithJSONObject:actionData options:(NSJSONWritingOptions)0 error:&error]; + } else { + NSDictionary *info = PNErrorUserInfo( + @"Unable to serialize to JSON string", + @"Provided 'value' has unexpected data type.", + nil, + nil + ); + + error = [PNError errorWithDomain:NSCocoaErrorDomain code:NSPropertyListWriteInvalidError userInfo:info]; + } + + if (error) { + NSDictionary *info = PNErrorUserInfo(@"Message action data serialization did fail", nil, nil, error); + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:info]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Message Reaction/Message/PNBaseMessageActionRequest+Private.h b/PubNub/Network/Requests/Message Reaction/Message/PNBaseMessageActionRequest+Private.h new file mode 100644 index 000000000..227bed303 --- /dev/null +++ b/PubNub/Network/Requests/Message Reaction/Message/PNBaseMessageActionRequest+Private.h @@ -0,0 +1,37 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// General request for all `Message Action` API endpoints private extension. +@interface PNBaseMessageActionRequest (Private) + + +#pragma mark - Properties + +/// Timetoken (**PubNub**'s high precision timestamp) of `message` for which `action` should be managed. +@property(strong, nonatomic, readonly) NSNumber *messageTimetoken; + +/// Name of channel in which target `message` is stored. +@property(copy, nonatomic, readonly) NSString *channel; + + +#pragma mark - Initialization & Configuration + +/// Initialize general `Message Action` request. +/// +/// - Parameters: +/// - channel: Name of channel in which target `message` is stored. +/// - messageTimetoken: Timetoken of `message` for which action should be managed. +/// - Returns: Initialized general `Message Action` request. +- (instancetype)initWithChannel:(NSString *)channel messageTimetoken:(NSNumber *)messageTimetoken; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Message Reaction/Message/PNBaseMessageActionRequest.h b/PubNub/Network/Requests/Message Reaction/Message/PNBaseMessageActionRequest.h new file mode 100644 index 000000000..e69b2251d --- /dev/null +++ b/PubNub/Network/Requests/Message Reaction/Message/PNBaseMessageActionRequest.h @@ -0,0 +1,25 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// General request for all `Message Action` API endpoints. +@interface PNBaseMessageActionRequest : PNBaseRequest + + +#pragma mark - Initialization and Configuration + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Message Reaction/Message/PNBaseMessageActionRequest.m b/PubNub/Network/Requests/Message Reaction/Message/PNBaseMessageActionRequest.m new file mode 100644 index 000000000..7013a90b6 --- /dev/null +++ b/PubNub/Network/Requests/Message Reaction/Message/PNBaseMessageActionRequest.m @@ -0,0 +1,76 @@ +#import "PNBaseMessageActionRequest+Private.h" +#import "PNTransportRequest+Private.h" +#import "PNBaseRequest+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// General request for all `Message Action` API endpoints private extension. +@interface PNBaseMessageActionRequest () + + +#pragma mark - Properties + +/// Timetoken (**PubNub**'s high precision timestamp) of `message` for which `action` should be managed. +@property (nonatomic, strong) NSNumber *messageTimetoken; + +/// Name of channel in which target `message` is stored. +@property (copy, nonatomic) NSString *channel; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNBaseMessageActionRequest + + +#pragma mark - Properties + +- (PNOperationType)operation { + @throw [NSException exceptionWithName:@"PNNotImplemented" + reason:@"'operation' not implemented by subclass." + userInfo:nil]; +} + + +#pragma mark - Initialization & Configuration + +- (instancetype)initWithChannel:(NSString *)channel messageTimetoken:(NSNumber *)messageTimetoken { + if ((self = [super init])) { + _messageTimetoken = messageTimetoken; + _channel = [channel copy]; + } + + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.channel.length == 0) { + return [self missingParameterError:@"channel" forObjectRequest:NSStringFromClass([self class])]; + } else if (self.messageTimetoken.unsignedIntegerValue == 0) { + return [self missingParameterError:@"messageTimetoken" forObjectRequest:NSStringFromClass([self class])]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Message Reaction/Message/PNFetchMessageActionsRequest.h b/PubNub/Network/Requests/Message Reaction/Message/PNFetchMessageActionsRequest.h new file mode 100644 index 000000000..8c1750433 --- /dev/null +++ b/PubNub/Network/Requests/Message Reaction/Message/PNFetchMessageActionsRequest.h @@ -0,0 +1,49 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch message actions` request. +/// +/// Retrieve list of reactions attached to the message identifier by its timetoken. +@interface PNFetchMessageActionsRequest : PNBaseRequest + + +#pragma mark - Properties + +/// `Message action` timetoken denoting the start of the range requested. +/// +/// > Note: Returned values will be less than start. +@property (nonatomic, nullable, copy) NSNumber *start; + +/// `Message action` timetoken denoting the end of the range requested. +/// +/// > Note: Returned values will be greater than or equal to end. +@property (nonatomic, nullable, copy) NSNumber *end; + +/// Number of `message actions` to return in response. +@property (nonatomic, assign) NSUInteger limit; + + +#pragma mark - Initialization and Configuration + +/// Create `fetch message actions` request. +/// +/// - Parameter channel: Name of channel from which list of `message actions` should be retrieved. +/// - Returns: Ready to use `fetch messages actions` request. ++ (instancetype)requestWithChannel:(NSString *)channel; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Message Reaction/Message/PNFetchMessageActionsRequest.m b/PubNub/Network/Requests/Message Reaction/Message/PNFetchMessageActionsRequest.m new file mode 100644 index 000000000..d40e0df6c --- /dev/null +++ b/PubNub/Network/Requests/Message Reaction/Message/PNFetchMessageActionsRequest.m @@ -0,0 +1,98 @@ +#import "PNFetchMessageActionsRequest.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Fetch message actions` request private extension. +@interface PNFetchMessageActionsRequest () + + +#pragma mark - Properties + +/// Name of channel from which list of `message actions` should be retrieved. +@property(copy, nonatomic) NSString *channel; + + +#pragma mark - Initialization and Configuration + +/// Initialize `Fetch message actions` request. +/// +/// - Parameter channel: Name of channel from which list of `message actions` should be retrieved. +/// - Returns: Initialized `fetch messages actions` request. +- (instancetype)initWithChannel:(NSString *)channel; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNFetchMessageActionsRequest + + +#pragma mark - Properties + +- (PNOperationType)operation { + return PNFetchMessagesActionsOperation; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [NSMutableDictionary new]; + + if (self.limit > 0) query[@"limit"] = @(self.limit); + if (self.start) query[@"start"] = self.start; + if (self.end) query[@"end"] = self.end; + + return query.count ? query : nil; +} + +- (NSString *)path { + return PNStringFormat(@"/v1/message-actions/%@/channel/%@", + self.subscribeKey, [PNString percentEscapedString:self.channel]); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestWithChannel:(NSString *)channel { + return [[self alloc] initWithChannel:channel]; +} + +- (instancetype)initWithChannel:(NSString *)channel { + if ((self = [super init])) { + _channel = [channel copy]; + _limit = 100; + } + + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.channel.length == 0) { + return [self missingParameterError:@"channel" forObjectRequest:@"PNFetchMessageActionsRequest"]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Message Reaction/Message/PNRemoveMessageActionRequest+Private.h b/PubNub/Network/Requests/Message Reaction/Message/PNRemoveMessageActionRequest+Private.h new file mode 100644 index 000000000..bccaa153e --- /dev/null +++ b/PubNub/Network/Requests/Message Reaction/Message/PNRemoveMessageActionRequest+Private.h @@ -0,0 +1,19 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +/// `Remove message action` request private extension. +@interface PNRemoveMessageActionRequest (Private) + + +#pragma mark - Properties + +/// `Message action` addition timetoken (**PubNub**'s high precision timestamp). +@property(strong, nonatomic, readonly) NSNumber *messageActionTimetoken; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Message Reaction/Message/PNRemoveMessageActionRequest.h b/PubNub/Network/Requests/Message Reaction/Message/PNRemoveMessageActionRequest.h new file mode 100644 index 000000000..076d3bd71 --- /dev/null +++ b/PubNub/Network/Requests/Message Reaction/Message/PNRemoveMessageActionRequest.h @@ -0,0 +1,54 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Remove message action` request. +/// +/// Removes message reaction from the message identified by its and reaction timetokens. +@interface PNRemoveMessageActionRequest : PNBaseMessageActionRequest + + +#pragma mark - Properties + +/// `Message action` addition timetoken (**PubNub**'s high precision timestamp). +@property(strong, nonatomic) NSNumber *actionTimetoken + DEPRECATED_MSG_ATTRIBUTE("This property deprecated and will be removed with next major update. Instead please use " + "PNRemoveMessageActionRequest constructor with 'actionTimetoken' argument."); + + +#pragma mark - Initialization and Configuration + +/// Create `remove message action` request. +/// +/// - Parameters: +/// - channel: Name of channel which store `message` for which `action` should be removed. +/// - messageTimetoken: Timetoken (**PubNub**'s high precision timestamp) of `message` from which `action` should be +/// removed. +/// - Returns: Ready to use `remove message action` request. ++ (instancetype)requestWithChannel:(NSString *)channel messageTimetoken:(NSNumber *)messageTimetoken + NS_SWIFT_NAME(init(channel:messageTimetoken:)) + DEPRECATED_MSG_ATTRIBUTE("This method deprecated and will be removed with next major update. Instead please use " + "PNRemoveMessageActionRequest constructor with 'actionTimetoken' argument."); + +/// Create `remove message action` request. +/// +/// - Parameters: +/// - channel: Name of channel which store `message` for which `action` should be removed. +/// - messageTimetoken: Timetoken (**PubNub**'s high precision timestamp) of `message` from which `action` should be +/// removed. +/// - actionTimetoken: Message action addition timetoken (**PubNub**'s high precision timestamp). +/// - Returns: Ready to use `remove message action` request. ++ (instancetype)requestWithChannel:(NSString *)channel + messageTimetoken:(NSNumber *)messageTimetoken + actionTimetoken:(NSNumber *)actionTimetoken + NS_SWIFT_NAME(init(channel:messageTimetoken:actionTimetoken:)); + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Message Reaction/Message/PNRemoveMessageActionRequest.m b/PubNub/Network/Requests/Message Reaction/Message/PNRemoveMessageActionRequest.m new file mode 100644 index 000000000..3dd4d0e9d --- /dev/null +++ b/PubNub/Network/Requests/Message Reaction/Message/PNRemoveMessageActionRequest.m @@ -0,0 +1,88 @@ +#import "PNRemoveMessageActionRequest+Private.h" +#import "PNBaseMessageActionRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Remove message action` request private extension. +@interface PNRemoveMessageActionRequest () + + +#pragma mark - Properties + +/// `Message action` addition timetoken (**PubNub**'s high precision timestamp). +@property(strong, nonatomic) NSNumber *messageActionTimetoken; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNRemoveMessageActionRequest + + +#pragma mark - Properties + +- (PNOperationType)operation { + return PNRemoveMessageActionOperation; +} + +- (TransportMethod)httpMethod { + return TransportDELETEMethod; +} + +- (NSString *)path { + return PNStringFormat(@"/v1/message-actions/%@/channel/%@/message/%@/action/%@", + self.subscribeKey, + [PNString percentEscapedString:self.channel], + self.messageTimetoken, + self.messageActionTimetoken); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestWithChannel:(NSString *)channel messageTimetoken:(NSNumber *)messageTimetoken { + return [[self alloc] initWithChannel:channel messageTimetoken:messageTimetoken]; +} + ++ (instancetype)requestWithChannel:(NSString *)channel + messageTimetoken:(NSNumber *)messageTimetoken + actionTimetoken:(NSNumber *)actionTimetoken { + PNRemoveMessageActionRequest *request = [[self alloc] initWithChannel:channel messageTimetoken:messageTimetoken]; + request.messageActionTimetoken = actionTimetoken; + + return request; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + PNError *error = [super validate]; + if (error) return error; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + if (self.actionTimetoken.unsignedIntegerValue == 0 && self.messageActionTimetoken.unsignedIntegerValue == 0) { + return [self missingParameterError:@"actionTimetoken" forObjectRequest:@"PNRemoveMessageActionRequest"]; + } +#pragma clang diagnostic pop + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Objects/Channel/PNFetchAllChannelsMetadataRequest.h b/PubNub/Network/Requests/Objects/Channel/PNFetchAllChannelsMetadataRequest.h index f189d5881..58b4d84d5 100644 --- a/PubNub/Network/Requests/Objects/Channel/PNFetchAllChannelsMetadataRequest.h +++ b/PubNub/Network/Requests/Objects/Channel/PNFetchAllChannelsMetadataRequest.h @@ -5,26 +5,17 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Fetch \c all \c channels \c metadata request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Fetch all channels metadata` request. @interface PNFetchAllChannelsMetadataRequest : PNObjectsPaginatedRequest -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNChannelFields enum. - * @note Default value (\B PNChannelTotalCountField) can be reset by setting 0. - */ -@property (nonatomic, assign) PNChannelFields includeFields; +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNChannelFields** enum. +/// > Note: Default value (**PNChannelTotalCountField**) can be reset by setting 0. +@property(assign, nonatomic) PNChannelFields includeFields; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Channel/PNFetchAllChannelsMetadataRequest.m b/PubNub/Network/Requests/Objects/Channel/PNFetchAllChannelsMetadataRequest.m index 443d9ce02..75bd5a7fa 100644 --- a/PubNub/Network/Requests/Objects/Channel/PNFetchAllChannelsMetadataRequest.m +++ b/PubNub/Network/Requests/Objects/Channel/PNFetchAllChannelsMetadataRequest.m @@ -1,11 +1,7 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ #import "PNFetchAllChannelsMetadataRequest.h" #import "PNBaseObjectsRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" #pragma mark Interface implementation @@ -13,7 +9,7 @@ @implementation PNFetchAllChannelsMetadataRequest -#pragma mark - Information +#pragma mark - Properties @dynamic includeFields; @@ -27,14 +23,13 @@ - (BOOL)isIdentifierRequired { } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -- (instancetype)init { - if ((self = [super init])) { - self.includeFields = PNChannelTotalCountField; - } - - return self; ++ (instancetype)new { + PNFetchAllChannelsMetadataRequest *request = [[self alloc] initWithObject:@"Channel" identifier:nil]; + request.includeFields = PNChannelTotalCountField; + + return request; } #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Channel/PNFetchChannelMetadataRequest.h b/PubNub/Network/Requests/Objects/Channel/PNFetchChannelMetadataRequest.h index f3a95c28a..010ebb88c 100644 --- a/PubNub/Network/Requests/Objects/Channel/PNFetchChannelMetadataRequest.h +++ b/PubNub/Network/Requests/Objects/Channel/PNFetchChannelMetadataRequest.h @@ -5,46 +5,31 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Fetch \c channel \c metadata request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Fetch channel metadata` request. @interface PNFetchChannelMetadataRequest : PNBaseObjectsRequest -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNChannelFields enum. - * @note Default value (\B PNChannelCustomField) can be reset by setting 0. - */ -@property (nonatomic, assign) PNChannelFields includeFields; +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNChannelFields** enum. +/// > Note: Default value (**PNChannelCustomField**) can be reset by setting 0. +@property(assign, nonatomic) PNChannelFields includeFields; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Create and configure \c fetch \c channel \c metadata request. - * - * @param channel Name of channel for which \c metadata should be fetched. - * - * @return Configured and ready to use \c fetch \c channel \c metadata request. - */ +/// Create `Fetch channel metadata` request. +/// +/// - Parameter channel: Name of channel for which `metadata` should be fetched. +/// - Returns: Ready to use `fetch channel metadata` request. + (instancetype)requestWithChannel:(NSString *)channel; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Channel/PNFetchChannelMetadataRequest.m b/PubNub/Network/Requests/Objects/Channel/PNFetchChannelMetadataRequest.m index 01408c708..5941a5480 100644 --- a/PubNub/Network/Requests/Objects/Channel/PNFetchChannelMetadataRequest.m +++ b/PubNub/Network/Requests/Objects/Channel/PNFetchChannelMetadataRequest.m @@ -1,12 +1,7 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNBaseObjectsRequest+Private.h" #import "PNFetchChannelMetadataRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseObjectsRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" #pragma mark Interface implementation @@ -14,7 +9,7 @@ @implementation PNFetchChannelMetadataRequest -#pragma mark - Information +#pragma mark - Properties @dynamic includeFields; @@ -24,17 +19,14 @@ - (PNOperationType)operation { } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)requestWithChannel:(NSString *)channel { return [[self alloc] initWithObject:@"Channel" identifier:channel]; } - (instancetype)initWithObject:(NSString *)objectType identifier:(NSString *)identifier { - if ((self = [super initWithObject:objectType identifier:identifier])) { - self.includeFields = PNChannelCustomField; - } - + if ((self = [super initWithObject:objectType identifier:identifier])) self.includeFields = PNChannelCustomField; return self; } diff --git a/PubNub/Network/Requests/Objects/Channel/PNRemoveChannelMetadataRequest.h b/PubNub/Network/Requests/Objects/Channel/PNRemoveChannelMetadataRequest.h index 7168c4d1d..3989ae2da 100644 --- a/PubNub/Network/Requests/Objects/Channel/PNRemoveChannelMetadataRequest.h +++ b/PubNub/Network/Requests/Objects/Channel/PNRemoveChannelMetadataRequest.h @@ -5,35 +5,22 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Remove \c channel \c metadata request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Remove channel metadata` request. @interface PNRemoveChannelMetadataRequest : PNBaseObjectsRequest -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Create and configure \c remove \c channel \c metadata request. - * - * @param channel Name of channel for which \c metadata should be removed. - * - * @return Configured and ready to use \c remove \c channel \c metadata request. - */ +/// Create `Remove channel metadata` request. +/// +/// - Parameter channel: Name of channel for which `metadata` should be removed. +/// - Returns: Ready to use `remove channel metadata` request. + (instancetype)requestWithChannel:(NSString *)channel; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Channel/PNRemoveChannelMetadataRequest.m b/PubNub/Network/Requests/Objects/Channel/PNRemoveChannelMetadataRequest.m index 4757fca84..875e7b0f8 100644 --- a/PubNub/Network/Requests/Objects/Channel/PNRemoveChannelMetadataRequest.m +++ b/PubNub/Network/Requests/Objects/Channel/PNRemoveChannelMetadataRequest.m @@ -1,12 +1,7 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNBaseObjectsRequest+Private.h" #import "PNRemoveChannelMetadataRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseObjectsRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" #pragma mark Interface implementation @@ -14,18 +9,18 @@ @implementation PNRemoveChannelMetadataRequest -#pragma mark - Information +#pragma mark - Properties - (PNOperationType)operation { return PNRemoveChannelMetadataOperation; } -- (NSString *)httpMethod { - return @"DELETE"; +- (TransportMethod)httpMethod { + return TransportDELETEMethod; } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)requestWithChannel:(NSString *)channel { return [[self alloc] initWithObject:@"Channel" identifier:channel]; diff --git a/PubNub/Network/Requests/Objects/Channel/PNSetChannelMetadataRequest.h b/PubNub/Network/Requests/Objects/Channel/PNSetChannelMetadataRequest.h index f8e49ee75..762aa0408 100644 --- a/PubNub/Network/Requests/Objects/Channel/PNSetChannelMetadataRequest.h +++ b/PubNub/Network/Requests/Objects/Channel/PNSetChannelMetadataRequest.h @@ -5,62 +5,40 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Set \c channel \c metadata request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Set channel metadata` request. @interface PNSetChannelMetadataRequest : PNBaseObjectsRequest -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Additional / complex attributes which should be stored in \c metadata associated with - * specified \c channel. - */ -@property (nonatomic, nullable, strong) NSDictionary *custom; +/// Additional / complex attributes which should be stored in `metadata` associated with specified `channel`. +@property(nonatomic, nullable, strong) NSDictionary *custom; -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNChannelFields enum. - * @note Default value (\b PNChannelCustomField ) can be reset by setting \c 0. - */ -@property (nonatomic, assign) PNChannelFields includeFields; +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNChannelFields** enum. +/// > Note: Default value (**PNChannelCustomField**) can be reset by setting `0`. +@property(assign, nonatomic) PNChannelFields includeFields; -/** - * @brief Description which should be stored in \c metadata associated with specified \c channel. - */ -@property (nonatomic, nullable, copy) NSString *information; +/// Description which should be stored in `metadata` associated with specified `channel`. +@property(copy, nullable, nonatomic) NSString *information; -/** - * @brief Name which should be stored in \c metadata associated with specified \c channel. - */ -@property (nonatomic, copy) NSString *name; +/// Name which should be stored in `metadata` associated with specified `channel`. +@property(copy, nonatomic) NSString *name; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Create and configure \c set \c channel \c metadata request. - * - * @param channel Name of channel for which \c metadata should be set. - * - * @return Configured and ready to use \c set \c channel \c metadata request. - */ +/// Create `Set channel metadata` request. +/// +/// - Parameter channel: Name of channel for which `metadata` should be set. +/// - Returns: Ready to use `set channel metadata` request. + (instancetype)requestWithChannel:(NSString *)channel; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Channel/PNSetChannelMetadataRequest.m b/PubNub/Network/Requests/Objects/Channel/PNSetChannelMetadataRequest.m index 40e9efe68..0ca8a3593 100644 --- a/PubNub/Network/Requests/Objects/Channel/PNSetChannelMetadataRequest.m +++ b/PubNub/Network/Requests/Objects/Channel/PNSetChannelMetadataRequest.m @@ -1,110 +1,63 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNBaseObjectsRequest+Private.h" #import "PNSetChannelMetadataRequest.h" -#import "PNRequest+Private.h" -#import "PNErrorCodes.h" +#import "PNBaseObjectsRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" #import "PNDictionary.h" +#import "PNFunctions.h" +#import "PNError.h" -#pragma mark Interface implementation +NS_ASSUME_NONNULL_BEGIN -@implementation PNSetChannelMetadataRequest +#pragma mark Private interface declaration +@interface PNSetChannelMetadataRequest () -#pragma mark - Information -- (PNOperationType)operation { - return PNSetChannelMetadataOperation; -} +#pragma mark - Properties -- (NSString *)httpMethod { - return @"PATCH"; -} +/// Request post body. +@property(strong, nullable, nonatomic) NSData *body; -- (NSData *)bodyData { - NSArray *clss = @[[NSString class], [NSNumber class]]; +#pragma mark - - if (self.custom.count && ![PNDictionary isDictionary:self.custom containValueOfClasses:clss]) { - NSString *reason = [NSString stringWithFormat:@"'custom' object for '%@' channel metadata " - "contain not allowed data types (only NSString and NSNumber allowed).", - self.identifier]; - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Channel metadata additional information serialization " - "did fail", - NSLocalizedFailureReasonErrorKey: reason, - }; +@end - self.parametersError = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:errorInformation]; - } - if (self.parametersError) { - return nil; - } +NS_ASSUME_NONNULL_END - NSMutableDictionary *info = [NSMutableDictionary new]; - NSError *error = nil; - NSData *data = nil; - if (self.name) { - info[@"name"] = self.name; - } - - if (self.information.length) { - info[@"description"] = self.information; - } +#pragma mark - Interface implementation - if (self.custom.count) { - info[@"custom"] = self.custom; - } +@implementation PNSetChannelMetadataRequest - if ([NSJSONSerialization isValidJSONObject:info]) { - data = [NSJSONSerialization dataWithJSONObject:info - options:(NSJSONWritingOptions)0 - error:&error]; - } else { - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Unable to serialize to JSON string", - NSLocalizedFailureReasonErrorKey: @"Provided object contains unsupported data type instances." - }; - error = [NSError errorWithDomain:NSCocoaErrorDomain - code:NSPropertyListWriteInvalidError - userInfo:errorInformation]; - } +#pragma mark - Properties - if (error) { - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Channel metadata information serialization did fail", - NSUnderlyingErrorKey: error - }; +- (PNOperationType)operation { + return PNSetChannelMetadataOperation; +} - self.parametersError = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:errorInformation]; - } +- (TransportMethod)httpMethod { + return TransportPATCHMethod; +} - return data; +- (NSDictionary *)headers { + NSMutableDictionary *headers =[([super headers] ?: @{}) mutableCopy]; + headers[@"Content-Type"] = @"application/json"; + + return headers; } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)requestWithChannel:(NSString *)channel { return [[self alloc] initWithObject:@"Channel" identifier:channel]; } - (instancetype)initWithObject:(NSString *)objectType identifier:(NSString *)identifier { - if ((self = [super initWithObject:objectType identifier:identifier])) { - _includeFields = PNChannelCustomField; - } - + if ((self = [super initWithObject:objectType identifier:identifier])) _includeFields = PNChannelCustomField; return self; } @@ -114,6 +67,55 @@ - (instancetype)init { return nil; } + +#pragma mark - Prepare + +- (PNError *)validate { + PNError *error = [super validate]; + if (error) return error; + + NSArray *clss = @[[NSString class], [NSNumber class]]; + + if (self.custom.count && ![PNDictionary isDictionary:self.custom containValueOfClasses:clss]) { + NSString *reason = PNStringFormat(@"'custom' object for '%@' channel metadata contain not allowed data types " + "(only NSString and NSNumber allowed).", self.identifier); + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: @"Channel metadata additional information serialization did fail", + NSLocalizedFailureReasonErrorKey: reason, + }; + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } + + NSMutableDictionary *info = [NSMutableDictionary new]; + + if (self.name) info[@"name"] = self.name; + if (self.information.length) info[@"description"] = self.information; + if (self.custom.count) info[@"custom"] = self.custom; + + if ([NSJSONSerialization isValidJSONObject:info]) { + self.body = [NSJSONSerialization dataWithJSONObject:info options:(NSJSONWritingOptions)0 error:&error]; + } else { + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: @"Unable to serialize to JSON string", + NSLocalizedFailureReasonErrorKey: @"Provided object contains unsupported data type instances." + }; + + error = [PNError errorWithDomain:NSCocoaErrorDomain code:NSPropertyListWriteInvalidError userInfo:userInfo]; + } + + if (error) { + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: @"Channel metadata information serialization did fail", + NSUnderlyingErrorKey: error + }; + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } + + return nil; +} + #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest+Private.h b/PubNub/Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest+Private.h index 1ce6b69eb..a25d2e4a5 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest+Private.h +++ b/PubNub/Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest+Private.h @@ -5,15 +5,7 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Private interface declaration -/** - * @brief Private \c base request extension to provide access to identifiable instance - * initialization. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// General request for all `App Context Membership / Members` API endpoints private extension. @interface PNBaseObjectsMembershipRequest (Private) diff --git a/PubNub/Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest.h b/PubNub/Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest.h index 7be11b386..b862c00d2 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest.h +++ b/PubNub/Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest.h @@ -5,14 +5,7 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief Base class for Membership / Members Object API endpoints which has shared query options. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// General request for all `App Context Membership / Members` API endpoints. @interface PNBaseObjectsMembershipRequest : PNObjectsPaginatedRequest diff --git a/PubNub/Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest.m b/PubNub/Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest.m index a319e0bd0..ed36a40b1 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest.m +++ b/PubNub/Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest.m @@ -6,24 +6,31 @@ */ #import "PNBaseObjectsMembershipRequest+Private.h" #import "PNBaseObjectsRequest+Private.h" -#import "PNRequest+Private.h" -#import "PNErrorCodes.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" #import "PNDictionary.h" +#import "PNFunctions.h" +#import "PNError.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// General request for all `App Context Membership / Members` API endpoints. @interface PNBaseObjectsMembershipRequest () -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Dictionary which is used to manage memberships / members. - */ -@property (nonatomic, strong) NSMutableDictionary *membershipBodyPayload; +/// Dictionary which is used to manage memberships / members. +@property(strong, nonatomic) NSMutableDictionary *membershipBodyPayload; + +/// Error which has been identified during request configuration. +@property(strong, nullable, nonatomic) PNError *parametersError; + +/// Request post body. +@property(strong, nullable, nonatomic) NSData *body; #pragma mark - @@ -38,61 +45,14 @@ @interface PNBaseObjectsMembershipRequest () @implementation PNBaseObjectsMembershipRequest -#pragma mark - Information - -- (NSString *)httpMethod { - return @"PATCH"; -} +#pragma mark - Properties -- (NSData *)bodyData { - if (self.parametersError) { - return nil; - } - - NSMutableDictionary *update = [NSMutableDictionary new]; - NSError *error = nil; - NSData *data = nil; - - if (self.membershipBodyPayload[@"set"].count) { - update[@"set"] = self.membershipBodyPayload[@"set"].allObjects; - } - - if (self.membershipBodyPayload[@"delete"].count) { - update[@"delete"] = self.membershipBodyPayload[@"delete"].allObjects; - } - - if ([NSJSONSerialization isValidJSONObject:update]) { - data = [NSJSONSerialization dataWithJSONObject:update - options:(NSJSONWritingOptions)0 - error:&error]; - } else { - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Unable to serialize to JSON string", - NSLocalizedFailureReasonErrorKey: @"Provided object contains unsupported data type " - "instances." - }; - - error = [NSError errorWithDomain:NSCocoaErrorDomain - code:NSPropertyListWriteInvalidError - userInfo:errorInformation]; - } - - if (error) { - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Update information serialization did fail", - NSUnderlyingErrorKey: error - }; - - self.parametersError = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:errorInformation]; - } - - return data; +- (TransportMethod)httpMethod { + return TransportPATCHMethod; } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration - (instancetype)initWithObject:(NSString *)objectType identifier:(NSString *)identifier { if ((self = [super initWithObject:objectType identifier:identifier])) { @@ -108,25 +68,54 @@ - (instancetype)initWithObject:(NSString *)objectType identifier:(NSString *)ide - (void)setRelationToObjects:(NSArray *)objects ofType:(NSString *)objectType { NSArray *serializedObjects = [self serializedObjectType:objectType fromArray:objects]; - if (!self.membershipBodyPayload[@"set"]) { - self.membershipBodyPayload[@"set"] = [NSMutableSet new]; - } - + if (!self.membershipBodyPayload[@"set"]) self.membershipBodyPayload[@"set"] = [NSMutableSet new]; [self.membershipBodyPayload[@"set"] addObjectsFromArray:serializedObjects]; } - (void)removeRelationToObjects:(NSArray *)objects ofType:(NSString *)objectType { NSMutableArray *removeObjects = [NSMutableArray new]; - if (!self.membershipBodyPayload[@"delete"]) { - self.membershipBodyPayload[@"delete"] = [NSMutableSet new]; + if (!self.membershipBodyPayload[@"delete"]) self.membershipBodyPayload[@"delete"] = [NSMutableSet new]; + for (NSString *object in objects) [removeObjects addObject:@{ objectType: @{ @"id": object } }]; + + [self.membershipBodyPayload[@"delete"] addObjectsFromArray:removeObjects]; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + PNError *error = [super validate] ?: self.parametersError; + if (error) return error; + + NSMutableDictionary *update = [NSMutableDictionary new]; + + if (self.membershipBodyPayload[@"set"].count) update[@"set"] = self.membershipBodyPayload[@"set"].allObjects; + if (self.membershipBodyPayload[@"delete"].count) { + update[@"delete"] = self.membershipBodyPayload[@"delete"].allObjects; } - for (NSString *object in objects) { - [removeObjects addObject:@{ objectType: @{ @"id": object } }]; + if ([NSJSONSerialization isValidJSONObject:update]) { + self.body = [NSJSONSerialization dataWithJSONObject:update options:(NSJSONWritingOptions)0 error:&error]; + } else { + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: @"Unable to serialize to JSON string", + NSLocalizedFailureReasonErrorKey: @"Provided object contains unsupported data type instances." + }; + + error = [PNError errorWithDomain:NSCocoaErrorDomain code:NSPropertyListWriteInvalidError userInfo:userInfo]; } - [self.membershipBodyPayload[@"delete"] addObjectsFromArray:removeObjects]; + if (error) { + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: @"Update information serialization did fail", + NSUnderlyingErrorKey: error + }; + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } + + return nil; } @@ -137,9 +126,7 @@ - (NSArray *)serializedObjectType:(NSString *)type fromArray:(NSArray Note: Supported keys specified in **PNChannelMemberFields** enum. +/// > Note: Default value (**PNChannelMembersTotalCountField**) can be reset by setting 0. +@property(assign, nonatomic) PNChannelMemberFields includeFields; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Create and configure \c fetch \c channel's members request. - * - * @param channel Name of channel for which members list should be fetched. - * - * @return Configured and ready to use \c fetch \c channel's members request. - */ +/// Create `Fetch channel's members` request. +/// +/// - Parameter channel: Name of channel for which members list should be fetched. +/// - Returns: Ready to use `fetch channel's members` request. + (instancetype)requestWithChannel:(NSString *)channel; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Membership/PNFetchChannelMembersRequest.m b/PubNub/Network/Requests/Objects/Membership/PNFetchChannelMembersRequest.m index 966c22073..e2370a106 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNFetchChannelMembersRequest.m +++ b/PubNub/Network/Requests/Objects/Membership/PNFetchChannelMembersRequest.m @@ -1,22 +1,18 @@ -/** - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNBaseObjectsRequest+Private.h" #import "PNFetchChannelMembersRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseObjectsRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// `Fetch channel's members` request private extension. @interface PNFetchChannelMembersRequest () -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration /** * @brief Initialize \c fetch \c channel's members request. @@ -40,7 +36,7 @@ - (instancetype)initWithChannel:(NSString *)channel; @implementation PNFetchChannelMembersRequest -#pragma mark - Information +#pragma mark - Properties @dynamic includeFields; @@ -50,7 +46,7 @@ - (PNOperationType)operation { } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)requestWithChannel:(NSString *)channel { return [[self alloc] initWithChannel:channel]; diff --git a/PubNub/Network/Requests/Objects/Membership/PNFetchMembershipsRequest.h b/PubNub/Network/Requests/Objects/Membership/PNFetchMembershipsRequest.h index 556ca833b..43b36c163 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNFetchMembershipsRequest.h +++ b/PubNub/Network/Requests/Objects/Membership/PNFetchMembershipsRequest.h @@ -5,47 +5,32 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Fetch \c UUID memberships request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Fetch UUID memberships` request. @interface PNFetchMembershipsRequest : PNObjectsPaginatedRequest -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNMembershipFields enum. - * @note Default value (\B PNMembershipsTotalCountField) can be reset by setting 0. - */ -@property (nonatomic, assign) PNMembershipFields includeFields; +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNMembershipFields** enum. +/// > Note: Default value (**PNMembershipsTotalCountField**) can be reset by setting 0. +@property(assign, nonatomic) PNMembershipFields includeFields; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Create and configure \c fetch \c UUID's memberships request. - * - * @param uuid Identifier for which memberships in \c channels should be fetched. - * Will be set to current \b PubNub configuration \c uuid if \a nil is set. - * - * @return Configured and ready to use \c fetch \c UUID's memberships request. - */ +/// Create `Fetch UUID's memberships` request. +/// +/// - Parameter uuid: Identifier for which memberships in `channels` should be fetched. Will be set to current +/// **PubNub** configuration `uuid` if `nil` is set. +/// - Returns: Ready to use `fetch UUID's memberships` request. + (instancetype)requestWithUUID:(nullable NSString *)uuid; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Membership/PNFetchMembershipsRequest.m b/PubNub/Network/Requests/Objects/Membership/PNFetchMembershipsRequest.m index 1962ac4ff..fb1d4f91b 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNFetchMembershipsRequest.m +++ b/PubNub/Network/Requests/Objects/Membership/PNFetchMembershipsRequest.m @@ -1,31 +1,24 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNBaseObjectsRequest+Private.h" #import "PNFetchMembershipsRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseObjectsRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" NS_ASSUME_NONNULL_BEGIN #pragma mark Protected interface declaration +/// `Fetch UUID memberships` request private extension. @interface PNFetchMembershipsRequest () -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Initialize \c fetch \c UUID's memberships request. - * - * @param uuid Identifier for which memberships in \c channels should be fetched. - * Will be set to current \b PubNub configuration \c uuid if \a nil is set. - * - * @return Initialized and ready to use \c fetch \c UUID's memberships request. - */ +///Initialize `Fetch UUID's memberships` request. +/// +/// - Parameter uuid: Identifier for which memberships in `channels` should be fetched. Will be set to current +/// **PubNub** configuration `uuid` if `nil` is set. +/// - Returns: Initialized `fetch UUID's memberships` request. - (instancetype)initWithUUID:(nullable NSString *)uuid; #pragma mark - @@ -41,7 +34,7 @@ - (instancetype)initWithUUID:(nullable NSString *)uuid; @implementation PNFetchMembershipsRequest -#pragma mark - Information +#pragma mark - Properties @dynamic includeFields; @@ -51,7 +44,7 @@ - (PNOperationType)operation { } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)requestWithUUID:(NSString *)uuid { return [[self alloc] initWithUUID:uuid]; diff --git a/PubNub/Network/Requests/Objects/Membership/PNManageChannelMembersRequest.h b/PubNub/Network/Requests/Objects/Membership/PNManageChannelMembersRequest.h index 295553cb8..635b6934b 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNManageChannelMembersRequest.h +++ b/PubNub/Network/Requests/Objects/Membership/PNManageChannelMembersRequest.h @@ -5,63 +5,43 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Manage \c channel's members request. - * - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Manage channel's memebers` request. @interface PNManageChannelMembersRequest : PNBaseObjectsMembershipRequest -#pragma mark - Information - -/** - * @brief List of \c UUIDs which should be added to \c channel's \c members list. - * - * @discussion With this specified, request will update \c channel's members list by addition of - * specified list of \c UUIDs and associate \c metadata with \c UUID in context of \c channel - * (if \c custom field is set). - * - * @note Each entry is dictionary with \c uuid and \b optional \c custom fields. \c custom should - * be dictionary with simple objects: \a NSString and \a NSNumber. - */ -@property (nonatomic, nullable, strong) NSArray *setMembers; - -/** - * @brief List of \c UUIDs which should be removed from \c channel's list. - */ -@property (nonatomic, nullable, strong) NSArray *removeMembers; - -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNChannelMemberFields enum. - * @note Default value (\B PNChannelMembersTotalCountField) can be reset by setting 0. - */ +#pragma mark - Properties + +/// List of `UUIDs` which should be added to `channel's members` list. +/// +/// With this specified, request will update `channel's` members list by addition of specified list of `UUIDs` and +/// associate `metadata` with `UUID` in context of `channel` (if `custom` field is set). +/// +/// > Note: Each entry is dictionary with `uuid` and **optional** `custom` fields. `custom` should be dictionary with +/// simple objects: `NSString` and `NSNumber`. +@property(strong, nullable, nonatomic) NSArray *setMembers; + +/// List of `UUIDs` which should be removed from `channel's` list. +@property(strong, nullable, nonatomic) NSArray *removeMembers; + +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNChannelMemberFields** enum. +/// > Note: Default value (**PNChannelMembersTotalCountField**) can be reset by setting 0. @property (nonatomic, assign) PNChannelMemberFields includeFields; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Create and configure \c manage \c channel's members request. - * - * @param channel Name of channel for which members list should be updated. - * - * @return Configured and ready to use \c manage \c channel's members request. - */ +/// Create `Manage channel's members` request. +/// +/// - Parameter channel: Name of channel for which members list should be updated. +/// - Returns: Ready to use `manage channel's` members request. + (instancetype)requestWithChannel:(NSString *)channel; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Membership/PNManageChannelMembersRequest.m b/PubNub/Network/Requests/Objects/Membership/PNManageChannelMembersRequest.m index a05cc6fc9..a31924cfb 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNManageChannelMembersRequest.m +++ b/PubNub/Network/Requests/Objects/Membership/PNManageChannelMembersRequest.m @@ -1,31 +1,24 @@ -/** - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ +#import "PNManageChannelMembersRequest.h" #import "PNBaseObjectsMembershipRequest+Private.h" #import "PNBaseObjectsRequest+Private.h" -#import "PNManageChannelMembersRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// `Manage channel's memebers` request private extension. @interface PNManageChannelMembersRequest () -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Initialize \c manage \c channel's members request. - * - * @param channel Name of channel for which members list should be updated. - * - * @return Initialized and ready to use \c manage \c channel's members request. - */ +/// Initialize `Manage channel's members` request. +/// +/// - Parameter channel: Name of channel for which members list should be updated. +/// - Returns: Initialized `manage channel's members` request. - (instancetype)initWithChannel:(NSString *)channel; #pragma mark - @@ -41,7 +34,7 @@ - (instancetype)initWithChannel:(NSString *)channel; @implementation PNManageChannelMembersRequest -#pragma mark - Information +#pragma mark - Properties @dynamic includeFields; @@ -52,18 +45,16 @@ - (PNOperationType)operation { - (void)setSetMembers:(NSArray *)setMembers { _setMembers = setMembers; - [self setRelationToObjects:setMembers ofType:@"uuid"]; } - (void)setRemoveMembers:(NSArray *)removeMembers { _removeMembers = removeMembers; - [self removeRelationToObjects:removeMembers ofType:@"uuid"]; } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)requestWithChannel:(NSString *)channel { return [[self alloc] initWithChannel:channel]; diff --git a/PubNub/Network/Requests/Objects/Membership/PNManageMembershipsRequest.h b/PubNub/Network/Requests/Objects/Membership/PNManageMembershipsRequest.h index 3eda0de9f..d6ef7ad6d 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNManageMembershipsRequest.h +++ b/PubNub/Network/Requests/Objects/Membership/PNManageMembershipsRequest.h @@ -5,64 +5,44 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Manage \c UUID's memberships request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Manage UUID's memberships` request. @interface PNManageMembershipsRequest : PNBaseObjectsMembershipRequest -#pragma mark - Information - -/** - * @brief List of \c channels within which \c UUID should be \c set as \c member. - * - * @discussion With this specified, request will set \c UUID's membership in specified list of - * \c channels and associate \c metadata with \c UUID in context of specified \c channel - * (if \c custom field is set). - * - * @note Each entry is dictionary with \c channel and \b optional \c custom fields. \c custom should - * be dictionary with simple objects: \a NSString and \a NSNumber. - */ -@property (nonatomic, nullable, strong) NSArray *setChannels; - -/** - * @brief List of \c channels from which \c UUID should be removed as \c member. - */ -@property (nonatomic, nullable, strong) NSArray *removeChannels; - -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNMembershipFields enum. - * @note Default value (\B PNMembershipsTotalCountField) can be reset by setting 0. - */ -@property (nonatomic, assign) PNMembershipFields includeFields; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c manage \c UUID's memberships request. - * - * @param uuid Identifier for which memberships should be managed. - * Will be set to current \b PubNub configuration \c uuid if \a nil is set. - * - * @return Configured and ready to use \c manage \c UUID's memberships request. - */ +#pragma mark - Properties + +/// List of `channels` within which `UUID` should be `set` as `member`. +/// +/// With this specified, request will set `UUID's` membership in specified list of channels and associate `metadata` +/// with `UUID` in context of specified `channel` (if `custom` field is set). +/// +/// > Note: Each entry is dictionary with `channel` and **optional** `custom` fields. `custom` should be dictionary with +/// simple objects: `NSString` and `NSNumber`. +@property(strong, nullable, nonatomic) NSArray *setChannels; + +/// List of `channels` from which `UUID` should be removed as `member`. +@property(strong, nullable, nonatomic) NSArray *removeChannels; + +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNMembershipFields** enum. +/// > Note: Default value (**PNMembershipsTotalCountField**) can be reset by setting 0. +@property(assign, nonatomic) PNMembershipFields includeFields; + + +#pragma mark - Initialization and Configuration + +/// Create `Manage UUID's memberships` request. +/// +/// - Parameter uuid: Identifier for which memberships should be managed. Will be set to current **PubNub** +/// configuration `uuid` if `nil` is set. +/// - Returns: Ready to use `manage UUID's memberships` request. + (instancetype)requestWithUUID:(nullable NSString *)uuid; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Membership/PNManageMembershipsRequest.m b/PubNub/Network/Requests/Objects/Membership/PNManageMembershipsRequest.m index 7ab91f5a6..bad0f69d7 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNManageMembershipsRequest.m +++ b/PubNub/Network/Requests/Objects/Membership/PNManageMembershipsRequest.m @@ -1,32 +1,25 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +#import "PNManageMembershipsRequest.h" #import "PNBaseObjectsMembershipRequest+Private.h" #import "PNBaseObjectsRequest+Private.h" -#import "PNManageMembershipsRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// `Manage UUID's memberships` request private extension. @interface PNManageMembershipsRequest () -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Initialize \c manage \c UUID's memberships request. - * - * @param uuid Identifier for which memberships should be managed. - * Will be set to current \b PubNub configuration \c uuid if \a nil is set. - * - * @return Initialized and ready to use \c manage \c UUID's memberships request. - */ +/// Initialize `Manage UUID's memberships` request. + /// + /// - Parameter uuid: Identifier for which memberships should be managed. Will be set to current **PubNub** + /// configuration `uuid` if `nil` is set. +/// - Returns: Initialized `manage UUID's memberships` request. - (instancetype)initWithUUID:(nullable NSString *)uuid; #pragma mark - @@ -42,7 +35,7 @@ - (instancetype)initWithUUID:(nullable NSString *)uuid; @implementation PNManageMembershipsRequest -#pragma mark - Information +#pragma mark - Properties @dynamic includeFields; @@ -53,18 +46,16 @@ - (PNOperationType)operation { - (void)setSetChannels:(NSArray *)setChannels { _setChannels = setChannels; - [self setRelationToObjects:setChannels ofType:@"channel"]; } - (void)setRemoveChannels:(NSArray *)removeChannels { _removeChannels = removeChannels; - [self removeRelationToObjects:removeChannels ofType:@"channel"]; } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)requestWithUUID:(NSString *)uuid { return [[self alloc] initWithUUID:uuid]; diff --git a/PubNub/Network/Requests/Objects/Membership/PNRemoveChannelMembersRequest.h b/PubNub/Network/Requests/Objects/Membership/PNRemoveChannelMembersRequest.h index ce4740338..3f38d6074 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNRemoveChannelMembersRequest.h +++ b/PubNub/Network/Requests/Objects/Membership/PNRemoveChannelMembersRequest.h @@ -5,47 +5,33 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Remove \c channel's members request. - * - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Remove channel's members` request. @interface PNRemoveChannelMembersRequest : PNBaseObjectsMembershipRequest #pragma mark - Information -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNChannelMemberFields enum. - * @note Default value (\B PNChannelMembersTotalCountField) can be reset by setting 0. - */ -@property (nonatomic, assign) PNChannelMemberFields includeFields; +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNChannelMemberFields** enum. +/// > Note: Default value (**PNChannelMembersTotalCountField) can be reset by setting 0. +@property(assign, nonatomic) PNChannelMemberFields includeFields; #pragma mark - Initialization & Configuration -/** - * @brief Create and configure \c remove \c channel's members request. - * - * @param channel Name of channel from which members should be removed. - * @param uuids List of \c UUIDs which should be removed from \c channel's list. - * - * @return Configured and ready to use \c remove \c channel's members request. - */ +/// Create `Remove channel's members` request. +/// +/// - Parameters: +/// - channel: Name of channel from which members should be removed. +/// - uuids: List of `UUIDs` which should be removed from `channel's` list. +/// - Returns: Ready to use `remove channel's members` request. + (instancetype)requestWithChannel:(NSString *)channel uuids:(NSArray *)uuids; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Membership/PNRemoveChannelMembersRequest.m b/PubNub/Network/Requests/Objects/Membership/PNRemoveChannelMembersRequest.m index 3d90391f1..c54c4afc9 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNRemoveChannelMembersRequest.m +++ b/PubNub/Network/Requests/Objects/Membership/PNRemoveChannelMembersRequest.m @@ -1,32 +1,26 @@ -/** - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ +#import "PNRemoveChannelMembersRequest.h" #import "PNBaseObjectsMembershipRequest+Private.h" #import "PNBaseObjectsRequest+Private.h" -#import "PNRemoveChannelMembersRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// `Remove channel's members` request private extension. @interface PNRemoveChannelMembersRequest () -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Initialize \c remove \c channel's members request. - * - * @param channel Name of channel for which members should be added. - * @param uuids List of \c UUIDs which should be removed from \c channel's list. - * - * @return Initialized and ready to use \c remove \c channel's members request. - */ +/// Initialize `Remove channel's members` request. +/// +/// - Parameters: +/// - channel: Name of channel from which members should be removed. +/// - uuids: List of `UUIDs` which should be removed from `channel's` list. +/// - Returns: Initialized `remove channel's members` request. - (instancetype)initWithChannel:(NSString *)channel uuids:(NSArray *)uuids; #pragma mark - @@ -42,7 +36,7 @@ - (instancetype)initWithChannel:(NSString *)channel uuids:(NSArray * @implementation PNRemoveChannelMembersRequest -#pragma mark - Information +#pragma mark - Properties @dynamic includeFields; @@ -52,7 +46,7 @@ - (PNOperationType)operation { } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)requestWithChannel:(NSString *)channel uuids:(NSArray *)uuids { return [[self alloc] initWithChannel:channel uuids:uuids]; diff --git a/PubNub/Network/Requests/Objects/Membership/PNRemoveMembershipsRequest.h b/PubNub/Network/Requests/Objects/Membership/PNRemoveMembershipsRequest.h index 2ee9a73f0..ad221363c 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNRemoveMembershipsRequest.h +++ b/PubNub/Network/Requests/Objects/Membership/PNRemoveMembershipsRequest.h @@ -5,48 +5,34 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Remove \c UUID's memberships request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Remove UUID's memberships` request. @interface PNRemoveMembershipsRequest : PNBaseObjectsMembershipRequest -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNMembershipFields enum. - * @note Default value (\B PNMembershipsTotalCountField) can be reset by setting 0. - */ -@property (nonatomic, assign) PNMembershipFields includeFields; +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNMembershipFields** enum. +/// > Note: Default value (**PNMembershipsTotalCountField**) can be reset by setting 0. +@property(assign, nonatomic) PNMembershipFields includeFields; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Create and configure \c remove \c UUID's memberships request. - * - * @param uuid Identifier for which memberships information should be removed. - * Will be set to current \b PubNub configuration \c uuid if \a nil is set. - * @param channels List of \c channels from which \c UUID should be removed as \c member. - * - * @return Configured and ready to use \c remove \c UUID's memberships request. - */ +/// Create `Remove UUID's memberships` request. +/// +/// - Parameters: +/// - uuid: Identifier for which memberships information should be removed. Will be set to current **PubNub** +/// configuration `uuid` if `nil` is set. +/// - channels: List of`channels` from which `UUID` should be removed as `member`. +/// - Returns: Ready to use `remove UUID's memberships` request. + (instancetype)requestWithUUID:(nullable NSString *)uuid channels:(NSArray *)channels; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Membership/PNRemoveMembershipsRequest.m b/PubNub/Network/Requests/Objects/Membership/PNRemoveMembershipsRequest.m index 80e4c6350..bbd89cc7d 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNRemoveMembershipsRequest.m +++ b/PubNub/Network/Requests/Objects/Membership/PNRemoveMembershipsRequest.m @@ -1,33 +1,27 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +#import "PNRemoveMembershipsRequest.h" #import "PNBaseObjectsMembershipRequest+Private.h" #import "PNBaseObjectsRequest+Private.h" -#import "PNRemoveMembershipsRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// `Remove UUID's memberships` request private extension. @interface PNRemoveMembershipsRequest () -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Initialize \c remove \c UUID's memberships request. - * - * @param uuid Identifier for which memberships information should be removed. - * Will be set to current \b PubNub configuration \c uuid if \a nil is set. - * @param channels List of \c channels from which \c UUID should be removed as \c member. - * - * @return Initialized and ready to use \c remove \c UUID's memberships request. - */ +/// Initialize `Remove UUID's memberships` request. +/// +/// - Parameters: +/// - uuid: Identifier for which memberships information should be removed. Will be set to current **PubNub** +/// configuration `uuid` if `nil` is set. +/// - channels: List of`channels` from which `UUID` should be removed as `member`. +/// - Returns: Initialized `remove UUID's memberships` request. - (instancetype)initWithUUID:(nullable NSString *)uuid channels:(NSArray *)channels; #pragma mark - @@ -43,7 +37,7 @@ - (instancetype)initWithUUID:(nullable NSString *)uuid channels:(NSArray *)channels { return [[self alloc] initWithUUID:uuid channels:channels]; diff --git a/PubNub/Network/Requests/Objects/Membership/PNSetChannelMembersRequest.h b/PubNub/Network/Requests/Objects/Membership/PNSetChannelMembersRequest.h index a7b0cd6b3..8eb59831c 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNSetChannelMembersRequest.h +++ b/PubNub/Network/Requests/Objects/Membership/PNSetChannelMembersRequest.h @@ -5,52 +5,37 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Set \c channel's members request. - * - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Set channel's members` request. @interface PNSetChannelMembersRequest : PNBaseObjectsMembershipRequest -#pragma mark - Information - -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNChannelMemberFields enum. - * @note Default value (\B PNChannelMembersTotalCountField) can be reset by setting 0. - */ -@property (nonatomic, assign) PNChannelMemberFields includeFields; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c set \c channel's members request. - * - * @discussion Request will set \c UUID's \c metadata associated with it in context of \c channel. - * - * @param channel Name of channel for which members \c metadata should be set. - * @param uuids List of \c UUIDs for which \c metadata associated with each of them in context of - * \c channel should be set. - * Each entry is dictionary with \c uuid and \b optional \c custom fields. \c custom should - * be dictionary with simple objects: \a NSString and \a NSNumber. - * - * @return Configured and ready to use \c set \c channel's members request. - */ +#pragma mark - Properties + +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNChannelMemberFields** enum. +/// > Note: Default value (**PNChannelMembersTotalCountField**) can be reset by setting 0. +@property(assign, nonatomic) PNChannelMemberFields includeFields; + + +#pragma mark - Initialization and Configuration + +/// Create `Set channel's members` request. +/// +/// Request will set `UUID's metadata` associated with it in context of `channel`. +/// +/// - Parameters: +/// - channel: Name of channel for which members `metadata` should be set. +/// - uuids: List of `UUIDs` for which `metadata` associated with each of them in context of `channel` should be set. +/// Each entry is dictionary with `uuid` and **optional** `custom` fields. `custom` should be dictionary with simple +/// objects: `NSString` and `NSNumber`. +/// - Returns: Ready to use `set channel's members` request. + (instancetype)requestWithChannel:(NSString *)channel uuids:(NSArray *)uuids; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Membership/PNSetChannelMembersRequest.m b/PubNub/Network/Requests/Objects/Membership/PNSetChannelMembersRequest.m index b4d601b92..3185fc8e3 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNSetChannelMembersRequest.m +++ b/PubNub/Network/Requests/Objects/Membership/PNSetChannelMembersRequest.m @@ -1,37 +1,30 @@ -/** - * @author Serhii Mamontov - * @version 4.14.1 - * @since 4.14.1 - * @copyright © 2010-2020 PubNub, Inc. - */ +#import "PNSetChannelMembersRequest.h" #import "PNBaseObjectsMembershipRequest+Private.h" #import "PNBaseObjectsRequest+Private.h" -#import "PNSetChannelMembersRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// `Set channel's members` request private extension. @interface PNSetChannelMembersRequest () -#pragma mark - Initialization & Configuration - -/** - * @brief Initialize \c set \c channel's members request. - * - * @discussion Request will set \c UUID's \c metadata associated with it in context of \c channel. - * - * @param channel Name of channel for which members should be added. - * @param uuids List of \c UUIDs for which \c metadata associated with each of them in context of - * \c channel should be set. - * Each entry is dictionary with \c channel and \b optional \c custom fields. \c custom should - * be dictionary with simple objects: \a NSString and \a NSNumber. - * - * @return Initialized and ready to use \c set \c channel's members request. - */ +#pragma mark - Initialization and Configuration + +/// Initialize `Set channel's members` request. +/// +///Request will set `UUID's metadata` associated with it in context of `channel`. +/// +/// - Parameters: +/// - channel: Name of channel for which members `metadata` should be set. +/// - uuids: List of `UUIDs` for which `metadata` associated with each of them in context of `channel` should be set. +/// Each entry is dictionary with `uuid` and **optional** `custom` fields. `custom` should be dictionary with simple +/// objects: `NSString` and `NSNumber`. +/// - Returns: Initialized `set channel's members` request. - (instancetype)initWithChannel:(NSString *)channel uuids:(NSArray *)uuids; #pragma mark - @@ -47,7 +40,7 @@ - (instancetype)initWithChannel:(NSString *)channel uuids:(NSArray *)uuids { return [[self alloc] initWithChannel:channel uuids:uuids]; diff --git a/PubNub/Network/Requests/Objects/Membership/PNSetMembershipsRequest.h b/PubNub/Network/Requests/Objects/Membership/PNSetMembershipsRequest.h index 0a867a24c..f82cc46cf 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNSetMembershipsRequest.h +++ b/PubNub/Network/Requests/Objects/Membership/PNSetMembershipsRequest.h @@ -5,53 +5,38 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Set \c UUID's memberships request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Set UUID's memberships` request. @interface PNSetMembershipsRequest : PNBaseObjectsMembershipRequest -#pragma mark - Information - -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNMembershipFields enum. - * @note Default value (\B PNMembershipsTotalCountField) can be reset by setting 0. - */ -@property (nonatomic, assign) PNMembershipFields includeFields; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c set \c UUID's memberships request. - * - * @discussion Request will set \c UUID's \c metadata associated with membership. - * - * @param uuid Identifier for which memberships \c metadata should be set. - * Will be set to current \b PubNub configuration \c uuid if \a nil is set. - * @param channels List of \c channels for which \c metadata associated with \c UUID should be set. - * Each entry is dictionary with \c channel and \b optional \c custom fields. \c custom should - * be dictionary with simple objects: \a NSString and \a NSNumber. - * - * @return Configured and ready to use \c set \c UUID's memberships request. - */ -+ (instancetype)requestWithUUID:(nullable NSString *)uuid - channels:(NSArray *)channels; - -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +#pragma mark - Properties + +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNMembershipFields** enum. +/// > Note: Default value (**PNMembershipsTotalCountField**) can be reset by setting 0. +@property(assign, nonatomic) PNMembershipFields includeFields; + + +#pragma mark - Initialization and Configuration + +/// Create `Set UUID's memberships` request. +/// +/// Request will set `UUID's metadata` associated with membership. +/// +/// - Parameters: +/// - uuid: Identifier for which memberships `metadata` should be set. Will be set to current **PubNub** configuration +/// `uuid` if `nil` is set. +/// - channels: List of `channels` for which `metadata` associated with `UUID` should be set. Each entry is dictionary +/// with `channel` and **optional** `custom` fields. `custom` should be dictionary with simple objects: `NSString` and +/// `NSNumber` +/// - Returns: Ready to use `set UUID's memberships` request. ++ (instancetype)requestWithUUID:(nullable NSString *)uuid channels:(NSArray *)channels; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/Membership/PNSetMembershipsRequest.m b/PubNub/Network/Requests/Objects/Membership/PNSetMembershipsRequest.m index 5ac30dba9..e522d2984 100644 --- a/PubNub/Network/Requests/Objects/Membership/PNSetMembershipsRequest.m +++ b/PubNub/Network/Requests/Objects/Membership/PNSetMembershipsRequest.m @@ -1,37 +1,31 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +#import "PNSetMembershipsRequest.h" #import "PNBaseObjectsMembershipRequest+Private.h" #import "PNBaseObjectsRequest+Private.h" -#import "PNSetMembershipsRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// `Set UUID's memberships` request private extension. @interface PNSetMembershipsRequest () -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Initialize \c set \c UUID's memberships request. - * - * @discussion Request will set \c UUID's \c metadata associated with membership. - * - * @param uuid Identifier for which memberships information should be managed. - * Will be set to current \b PubNub configuration \c uuid if \a nil is set. - * @param channels List of \c channels for which \c metadata associated with \c UUID should be set. - * Each entry is dictionary with \c channel and \b optional \c custom fields. \c custom should - * be dictionary with simple objects: \a NSString and \a NSNumber. - * - * @return Initialized and ready to use \c set \c UUID's memberships request. - */ +/// Initialize `Set UUID's memberships` request. +/// +/// Request will set \c UUID's \c metadata associated with membership. +/// +/// - Parameters: +/// - uuid: Identifier for which memberships `metadata` should be set. Will be set to current **PubNub** configuration +/// `uuid` if `nil` is set. +/// - channels: List of `channels` for which `metadata` associated with `UUID` should be set. Each entry is dictionary +/// with `channel` and **optional** `custom` fields. `custom` should be dictionary with simple objects: `NSString` and +/// `NSNumber` +/// - Returns: Initialized `set UUID's memberships` request. - (instancetype)initWithUUID:(nullable NSString *)uuid channels:(NSArray *)channels; #pragma mark - @@ -47,7 +41,7 @@ - (instancetype)initWithUUID:(nullable NSString *)uuid channels:(NSArray Note: Available values depends from object type for which request created. So far following helper `types` +/// available: **PNMembershipFields**, **PNChannelMemberFields**, **PNChannelFields**, and **PNUUIDFields**. +@property(assign, nonatomic) NSUInteger includeFields; + + +#pragma mark - Initialization and Configuration + +/// Initialize general `App Context` request for identifiable object. +/// +/// - Parameters: +/// - objectType: Name of object type (so far known: `UUID` and `Channel`). +/// - identifier: Identifier of `object` for which request created. +/// - Returns: Initialized general `App Context` request. - (instancetype)initWithObject:(NSString *)objectType identifier:(nullable NSString *)identifier; #pragma mark - Misc -/** - * @brief Add another data field to 'include' query fields set. - * - * @param fields List of names of data fields which should be added to 'include' list. - * @param requestParameters Request's parameters object which is used to build actual network - * request. - */ -- (void)addIncludedFields:(NSArray *)fields - toRequest:(PNRequestParameters *)requestParameters; +/// Add another data field to `include` query fields set. +/// +/// - Parameters: +/// - fields: List of names of data fields which should be added to `include` list. +/// - query: Request's query object which is used to build actual network request. +- (void)addIncludedFields:(NSArray *)fields toQuery:(NSMutableDictionary *)query; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/PNBaseObjectsRequest.h b/PubNub/Network/Requests/Objects/PNBaseObjectsRequest.h index 2b662dd17..b1e250925 100644 --- a/PubNub/Network/Requests/Objects/PNBaseObjectsRequest.h +++ b/PubNub/Network/Requests/Objects/PNBaseObjectsRequest.h @@ -1,29 +1,19 @@ +#import #import -#import NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief Base class for all Object API endpoints which has shared query options. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -@interface PNBaseObjectsRequest : PNRequest +/// General request for all `App Contentx` API endpoints. +@interface PNBaseObjectsRequest : PNBaseRequest -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Arbitrary percent encoded query parameters which should be sent along with original API - * call. - */ -@property (nonatomic, nullable, strong) NSDictionary *arbitraryQueryParameters; +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/PNBaseObjectsRequest.m b/PubNub/Network/Requests/Objects/PNBaseObjectsRequest.m index 881f89a39..b037414e8 100644 --- a/PubNub/Network/Requests/Objects/PNBaseObjectsRequest.m +++ b/PubNub/Network/Requests/Objects/PNBaseObjectsRequest.m @@ -1,50 +1,36 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ #import "PNBaseObjectsRequest+Private.h" -#import "PNRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// General request for all `App Contentx` API endpoints private extension. @interface PNBaseObjectsRequest () -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Available values depends from object type for which request created. So far following - * helper \a types available: \b PNMembershipFields, \b PNChannelMemberFields, - * \b PNChannelFields, \b PNUUIDFields. - * @note Default value can be reset by setting 0. - */ -@property (nonatomic, assign) NSUInteger includeFields; +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Available values depends from object type for which request created. So far following helper `types` +/// available: **PNMembershipFields**, **PNChannelMemberFields**, **PNChannelFields**, and **PNUUIDFields**. +@property(assign, nonatomic) NSUInteger includeFields; -/** - * @brief Unique \c object identifier. - */ -@property (nonatomic, copy) NSString *identifier; +/// Unique `object` identifier. +@property(copy, nonatomic) NSString *identifier; -/** - * @brief Type of \c object. - */ -@property (nonatomic, copy) NSString *objectType; +/// Type of `object`. +@property(copy, nonatomic) NSString *objectType; #pragma mark - Misc -/** - * @brief Translate value of \c includeFields bitfield to actual \c include field names. - * - * @return List of names for \c include query parameter. - */ +/// Translate value of `includeFields` bitfield to actual `include` field names. +/// +/// - Returns: List of names for `include` query parameter. - (NSArray *)includeFieldNames; #pragma mark - @@ -60,43 +46,41 @@ @interface PNBaseObjectsRequest () @implementation PNBaseObjectsRequest -#pragma mark - Information +#pragma mark - Properties -- (BOOL)isIdentifierRequired { - return YES; +- (NSDictionary *)query { + NSMutableDictionary *query = [NSMutableDictionary new]; + + if (self.includeFields > 0) [self addIncludedFields:[self includeFieldNames] toQuery:query]; + if (self.arbitraryQueryParameters.count) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query.count ? query : nil; } -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; - - if (self.parametersError) { - return parameters; +- (NSString *)path { + NSMutableString *path = [PNStringFormat(@"/v2/objects/%@/%@s", self.subscribeKey, self.objectType) mutableCopy]; + PNOperationType operation = self.operation; + + if (self.isIdentifierRequired) [path appendFormat:@"/%@", self.identifier]; + if (operation == PNFetchAllUUIDMetadataOperation || operation == PNFetchAllChannelsMetadataOperation) return path; + if (operation == PNSetMembershipsOperation || operation == PNRemoveMembershipsOperation || + operation == PNManageMembershipsOperation || operation == PNFetchMembershipsOperation) { + [path appendString:@"/channels"]; } - - if (self.includeFields > 0) { - [self addIncludedFields:[self includeFieldNames] toRequest:parameters]; + if (operation == PNSetChannelMembersOperation || operation == PNRemoveChannelMembersOperation || + operation == PNManageChannelMembersOperation || operation == PNFetchChannelMembersOperation) { + [path appendString:@"/uuids"]; } - if (self.identifier) { - if (self.identifier.length > 92) { - self.parametersError = [self valueTooLongErrorForParameter:self.objectType - ofObjectRequest:self.objectType - withLength:self.identifier.length - maximumLength:92]; - } else { - NSString *placeholder = [@[@"{", self.objectType, @"}"] componentsJoinedByString:@""]; - [parameters addPathComponent:self.identifier forPlaceholder:placeholder]; - } - } else if (self.isIdentifierRequired) { - self.parametersError = [self missingParameterError:@"identifier" - forObjectRequest:self.objectType]; - } + return path; +} - return parameters; +- (BOOL)isIdentifierRequired { + return YES; } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration - (instancetype)initWithObject:(NSString *)objectType identifier:(NSString *)identifier { if ((self = [super init])) { @@ -146,19 +130,33 @@ - (instancetype)initWithObject:(NSString *)objectType identifier:(NSString *)ide } -#pragma mark - Misc +#pragma mark - Prepare -- (void)addIncludedFields:(NSArray *)fields - toRequest:(PNRequestParameters *)requestParameters { +- (PNError *)validate { + if (self.identifier) { + if (self.identifier.length > 92) { + return [self valueTooLongErrorForParameter:self.objectType + ofObjectRequest:self.objectType + withLength:self.identifier.length + maximumLength:92]; + } + } else if (self.isIdentifierRequired) { + return [self missingParameterError:@"identifier" forObjectRequest:self.objectType]; + } - NSString *include = [requestParameters query][@"include"]; - NSArray *existingFields = [include componentsSeparatedByString:@","] ?: @[]; + return nil; +} + + +#pragma mark - Misc + +- (void)addIncludedFields:(NSArray *)fields toQuery:(NSMutableDictionary *)query { + NSArray *existingFields = [query[@"include"] componentsSeparatedByString:@","] ?: @[]; NSMutableSet *includeFields = [NSMutableSet setWithArray:existingFields]; [includeFields addObjectsFromArray:fields]; - [requestParameters removeQueryParameterWithFieldName:@"include"]; - [requestParameters addQueryParameter:[includeFields.allObjects componentsJoinedByString:@","] - forFieldName:@"include"]; +// if (includeFields.count) + query[@"include"] = [includeFields.allObjects componentsJoinedByString:@","]; } #pragma mark - diff --git a/PubNub/Network/Requests/Objects/PNObjectsPaginatedRequest.h b/PubNub/Network/Requests/Objects/PNObjectsPaginatedRequest.h index 5d3395b68..1e964ed5a 100644 --- a/PubNub/Network/Requests/Objects/PNObjectsPaginatedRequest.h +++ b/PubNub/Network/Requests/Objects/PNObjectsPaginatedRequest.h @@ -5,51 +5,33 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief Base class for Object API endpoints which return list of items and allow to navigate - * between pages. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// General request for all paginated `App Context` API endpoints. @interface PNObjectsPaginatedRequest : PNBaseObjectsRequest -#pragma mark - Information - -/** - * @brief Results sorting order. - * - * @discussion List of criteria (name of field) which should be used for sorting in ascending order. - * To change sorting order, append \c :asc (for ascending) or \c :desc (descending) to field name. - */ -@property (nonatomic, nullable, strong) NSArray *sort; - -/** - * @brief Expression to filter out results basing on specified criteria. - */ -@property (nonatomic, nullable, copy) NSString *filter; - -/** - * @brief Previously-returned cursor bookmark for fetching the next page. - */ -@property (nonatomic, nullable, copy) NSString *start; - -/** - * @brief Previously-returned cursor bookmark for fetching the previous page. - * - * @note Ignored if you also supply the \c start parameter. - */ -@property (nonatomic, nullable, copy) NSString *end; - -/** - * @brief Number of objects to return in response. - * - * @note Will be set to \c 100 (which is also maximum value) if not specified. - */ -@property (nonatomic, assign) NSUInteger limit; +#pragma mark - Properties + +/// Response results sorting order. +/// +/// List of criteria (name of the field) which will be used for sorting in ascending order (by default). +/// To change sorting order, append `:asc` (for ascending) or `:desc` (descending) to field name. +@property(strong, nullable, nonatomic) NSArray *sort; + +/// Expression to filter out results basing on specified criteria. +@property(copy, nullable, nonatomic) NSString *filter; + +/// Previously-returned cursor bookmark for fetching the next page. +@property(copy, nullable, nonatomic) NSString *start; + +/// Previously-returned cursor bookmark for fetching the previous page. +/// +/// > Note: Ignored if you also supply the `start` parameter. +@property(copy, nullable, nonatomic) NSString *end; + +/// Number of objects to return in response.. +/// +/// > Note: Will be set to `100` (which is also maximum value) if not specified. +@property(assign, nonatomic) NSUInteger limit; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/PNObjectsPaginatedRequest.m b/PubNub/Network/Requests/Objects/PNObjectsPaginatedRequest.m index 8a7f8f1a7..8f4f81107 100644 --- a/PubNub/Network/Requests/Objects/PNObjectsPaginatedRequest.m +++ b/PubNub/Network/Requests/Objects/PNObjectsPaginatedRequest.m @@ -1,13 +1,6 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNBaseObjectsRequest+Private.h" #import "PNObjectsPaginatedRequest.h" -#import "PNRequest+Private.h" -#import "PNHelpers.h" +#import "PNBaseObjectsRequest+Private.h" +#import "PNBaseRequest+Private.h" #pragma mark Interface implementation @@ -15,52 +8,32 @@ @implementation PNObjectsPaginatedRequest -#pragma mark - Information +#pragma mark - Properties -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; - - if (self.parametersError) { - return parameters; - } +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; if ((self.includeFields & PNChannelTotalCountField) == PNChannelTotalCountField || (self.includeFields & PNUUIDTotalCountField) == PNUUIDTotalCountField || (self.includeFields & PNMembershipsTotalCountField) == PNMembershipsTotalCountField || (self.includeFields & PNChannelMembersTotalCountField) == PNChannelMembersTotalCountField) { - - [parameters addQueryParameter:@"1" forFieldName:@"count"]; - } - - if (self.limit > 0) { - [parameters addQueryParameter:@(self.limit).stringValue forFieldName:@"limit"]; + query[@"count"] = @"1"; } - if (self.sort.count > 0) { - NSMutableArray *percentEncodedSort = [NSMutableArray new]; - - for (NSString *criteria in self.sort) { - [percentEncodedSort addObject:[PNString percentEscapedString:criteria]]; - } - - [parameters addQueryParameter:[percentEncodedSort componentsJoinedByString:@","] - forFieldName:@"sort"]; - } - - if (self.filter.length > 0) { - [parameters addQueryParameter:[PNString percentEscapedString:self.filter] - forFieldName:@"filter"]; - } - - if (self.start.length) { - [parameters addQueryParameter:self.start forFieldName:@"start"]; - } + if (self.sort.count > 0) query[@"sort"] = [self.sort componentsJoinedByString:@","]; + if (self.limit > 0) query[@"limit"] = @(self.limit).stringValue; + if (self.filter.length > 0) query[@"filter"] = self.filter; + if (self.start.length) query[@"start"] = self.start; + if (self.end.length) query[@"end"] = self.end; + + return query.count ? query : nil; +} - if (self.end.length) { - [parameters addQueryParameter:self.end forFieldName:@"end"]; - } +#pragma mark - Initialization and Configuration - return parameters; +- (instancetype)initWithObject:(NSString *)objectType identifier:(NSString *)identifier { + if ((self = [super initWithObject:objectType identifier:identifier])) _limit = 100; + return self; } #pragma mark - diff --git a/PubNub/Network/Requests/Objects/UUID/PNFetchAllUUIDMetadataRequest.h b/PubNub/Network/Requests/Objects/UUID/PNFetchAllUUIDMetadataRequest.h index 68256cf6b..2377f7943 100644 --- a/PubNub/Network/Requests/Objects/UUID/PNFetchAllUUIDMetadataRequest.h +++ b/PubNub/Network/Requests/Objects/UUID/PNFetchAllUUIDMetadataRequest.h @@ -5,26 +5,17 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Fetch \c all \c metadata request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Fetch all metadata` request. @interface PNFetchAllUUIDMetadataRequest : PNObjectsPaginatedRequest -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNUUIDFields enum. - * @note Default value (\B PNChannelCustomField) can be reset by setting 0. - */ -@property (nonatomic, assign) PNUUIDFields includeFields; +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNUUIDFields** enum. +/// > Note: Default value (**PNChannelCustomField**) can be reset by setting 0. +@property(assign, nonatomic) PNUUIDFields includeFields; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/UUID/PNFetchAllUUIDMetadataRequest.m b/PubNub/Network/Requests/Objects/UUID/PNFetchAllUUIDMetadataRequest.m index 8ce6b253a..9eb6c88c0 100644 --- a/PubNub/Network/Requests/Objects/UUID/PNFetchAllUUIDMetadataRequest.m +++ b/PubNub/Network/Requests/Objects/UUID/PNFetchAllUUIDMetadataRequest.m @@ -1,10 +1,7 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ #import "PNFetchAllUUIDMetadataRequest.h" +#import "PNBaseObjectsRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" #pragma mark Interface implementation @@ -12,7 +9,7 @@ @implementation PNFetchAllUUIDMetadataRequest -#pragma mark - Information +#pragma mark - Properties @dynamic includeFields; @@ -26,14 +23,13 @@ - (BOOL)isIdentifierRequired { } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -- (instancetype)init { - if ((self = [super init])) { - self.includeFields = PNUUIDTotalCountField; - } - - return self; ++ (instancetype)new { + PNFetchAllUUIDMetadataRequest *request = [[self alloc] initWithObject:@"UUID" identifier:nil]; + request.includeFields = PNUUIDTotalCountField; + + return request; } #pragma mark - diff --git a/PubNub/Network/Requests/Objects/UUID/PNFetchUUIDMetadataRequest.h b/PubNub/Network/Requests/Objects/UUID/PNFetchUUIDMetadataRequest.h index 2d08fbb25..e788e7343 100644 --- a/PubNub/Network/Requests/Objects/UUID/PNFetchUUIDMetadataRequest.h +++ b/PubNub/Network/Requests/Objects/UUID/PNFetchUUIDMetadataRequest.h @@ -5,47 +5,32 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Fetch \c UUID \c metadata request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Fetch UUID metadata` request. @interface PNFetchUUIDMetadataRequest : PNBaseObjectsRequest -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNUUIDFields enum. - * @note Default value (\b PNUUIDCustomField) can be reset by setting 0. - */ -@property (nonatomic, assign) PNUUIDFields includeFields; +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNUUIDFields** enum. +/// > Note: Default value (**PNUUIDCustomField**) can be reset by setting 0. +@property(assign, nonatomic) PNUUIDFields includeFields; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Create and configure \c fetch \c UUID \c metadata request. - * - * @param uuid Identifier for \c metadata should be fetched. - * Will be set to current \b PubNub configuration \c uuid if \a nil is set. - * - * @return Configured and ready to use \c fetch \c UUID \c metadata request. - */ +/// Create `Fetch UUID metadata` request. +/// +/// - Parameter uuid: Identifier for `metadata` should be fetched. Will be set to current **PubNub** configuration +/// `uuid` if `nil` is set. +/// - Returns: Ready to use `fetch UUID metadata` request. + (instancetype)requestWithUUID:(nullable NSString *)uuid; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/UUID/PNFetchUUIDMetadataRequest.m b/PubNub/Network/Requests/Objects/UUID/PNFetchUUIDMetadataRequest.m index 6fa7ccda4..eb92f16e9 100644 --- a/PubNub/Network/Requests/Objects/UUID/PNFetchUUIDMetadataRequest.m +++ b/PubNub/Network/Requests/Objects/UUID/PNFetchUUIDMetadataRequest.m @@ -1,12 +1,7 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNBaseObjectsRequest+Private.h" #import "PNFetchUUIDMetadataRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseObjectsRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" #pragma mark Interface implementation @@ -14,7 +9,7 @@ @implementation PNFetchUUIDMetadataRequest -#pragma mark - Information +#pragma mark - Properties @dynamic includeFields; @@ -24,7 +19,7 @@ - (PNOperationType)operation { } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)new { return [self requestWithUUID:nil]; @@ -35,10 +30,7 @@ + (instancetype)requestWithUUID:(NSString *)uuid { } - (instancetype)initWithObject:(NSString *)objectType identifier:(NSString *)identifier { - if ((self = [super initWithObject:objectType identifier:identifier])) { - self.includeFields = PNUUIDCustomField; - } - + if ((self = [super initWithObject:objectType identifier:identifier])) self.includeFields = PNUUIDCustomField; return self; } diff --git a/PubNub/Network/Requests/Objects/UUID/PNRemoveUUIDMetadataRequest.h b/PubNub/Network/Requests/Objects/UUID/PNRemoveUUIDMetadataRequest.h index 90604d8d8..2a3304cc4 100644 --- a/PubNub/Network/Requests/Objects/UUID/PNRemoveUUIDMetadataRequest.h +++ b/PubNub/Network/Requests/Objects/UUID/PNRemoveUUIDMetadataRequest.h @@ -5,36 +5,23 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Remove \c UUID \c metadata request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Remove UUID metadata` request. @interface PNRemoveUUIDMetadataRequest : PNBaseObjectsRequest -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Create and configure \c remove \c UUID \c metadata request. - * - * @param uuid Identifier for which \c metadata should be removed. - * Will be set to current \b PubNub configuration \c uuid if \a nil is set. - * - * @return Configured and ready to use \c remove \c UUID \c metadata request. - */ +/// Create `Remove UUID metadata` request. +/// +/// - Parameter uuid: Identifier for which `metadata` should be removed. Will be set to current **PubNub** configuration +/// `uuid` if `nil` is set. +/// - Returns: Ready to use `remove UUID metadata` request. + (instancetype)requestWithUUID:(nullable NSString *)uuid; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/UUID/PNRemoveUUIDMetadataRequest.m b/PubNub/Network/Requests/Objects/UUID/PNRemoveUUIDMetadataRequest.m index da2f54982..221f8ed24 100644 --- a/PubNub/Network/Requests/Objects/UUID/PNRemoveUUIDMetadataRequest.m +++ b/PubNub/Network/Requests/Objects/UUID/PNRemoveUUIDMetadataRequest.m @@ -1,12 +1,7 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNBaseObjectsRequest+Private.h" #import "PNRemoveUUIDMetadataRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseObjectsRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" #pragma mark Interface implementation @@ -14,18 +9,18 @@ @implementation PNRemoveUUIDMetadataRequest -#pragma mark - Information +#pragma mark - Properties - (PNOperationType)operation { return PNRemoveUUIDMetadataOperation; } -- (NSString *)httpMethod { - return @"DELETE"; +- (TransportMethod)httpMethod { + return TransportDELETEMethod; } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)new { return [self requestWithUUID:nil]; diff --git a/PubNub/Network/Requests/Objects/UUID/PNSetUUIDMetadataRequest.h b/PubNub/Network/Requests/Objects/UUID/PNSetUUIDMetadataRequest.h index e13edc6f8..884c952eb 100644 --- a/PubNub/Network/Requests/Objects/UUID/PNSetUUIDMetadataRequest.h +++ b/PubNub/Network/Requests/Objects/UUID/PNSetUUIDMetadataRequest.h @@ -5,72 +5,47 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Set \c UUID \c metadata request. - * - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Set UUID metadata` request. @interface PNSetUUIDMetadataRequest : PNBaseObjectsRequest -#pragma mark - Information - -/** - * @brief Additional / complex attributes which should be associated with \c metadata. - */ -@property (nonatomic, nullable, strong) NSDictionary *custom; - -/** - * @brief Identifier from external service (database, auth service). - */ -@property (nonatomic, nullable, copy) NSString *externalId; - -/** - * @brief URL at which profile available. - */ -@property (nonatomic, nullable, copy) NSString *profileUrl; - -/** - * @brief Bitfield set to fields which should be returned with response. - * - * @note Supported keys specified in \b PNUUIDFields enum. - * @note Default value (\b PNUUIDCustomField ) can be reset by setting \c 0. - */ -@property (nonatomic, assign) PNUUIDFields includeFields; - -/** - * @brief Email address. - */ -@property (nonatomic, nullable, copy) NSString *email; - -/** - * @brief Name which should be stored in \c metadata associated with specified \c identifier. - */ -@property (nonatomic, nullable, copy) NSString *name; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c set \c UUID \c metadata request. - * - * @param uuid Identifier with which \c metadata is linked. - * Will be set to current \b PubNub configuration \c uuid if \a nil is set. - * - * @return Configured and ready to use \c set \c UUID \c metadata request. - */ +#pragma mark - Properties + +/// Additional / complex attributes which should be associated with `metadata`. +@property(strong, nullable, nonatomic) NSDictionary *custom; + +/// Identifier from external service (database, auth service). +@property(copy, nullable, nonatomic) NSString *externalId; + +/// URL at which profile available. +@property(copy, nullable, nonatomic) NSString *profileUrl; + +/// Bitfield set to fields which should be returned with response. +/// +/// > Note: Supported keys specified in **PNUUIDFields** enum. +/// > Note: Default value (**PNUUIDCustomField** ) can be reset by setting `0`. +@property(assign, nonatomic) PNUUIDFields includeFields; + +/// Email address. +@property(copy, nullable, nonatomic) NSString *email; + +/// Name which should be stored in `metadata` associated with specified `identifier`. +@property(copy, nullable, nonatomic) NSString *name; + + +#pragma mark - Initialization and Configuration + +/// Create `Set UUID metadata` request. +/// +/// - Parameter uuid: Identifier with which `metadata` is linked. Will be set to current **PubNub** configuration +/// `uuid` if `nil` is set. +/// - Resturns: Ready to use `set UUID metadata` request. + (instancetype)requestWithUUID:(nullable NSString *)uuid; -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Objects/UUID/PNSetUUIDMetadataRequest.m b/PubNub/Network/Requests/Objects/UUID/PNSetUUIDMetadataRequest.m index 40a8f9e21..10e65a016 100644 --- a/PubNub/Network/Requests/Objects/UUID/PNSetUUIDMetadataRequest.m +++ b/PubNub/Network/Requests/Objects/UUID/PNSetUUIDMetadataRequest.m @@ -1,107 +1,57 @@ -/** - * @author Serhii Mamontov - * @version 4.14.0 - * @since 4.14.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNBaseObjectsRequest+Private.h" #import "PNSetUUIDMetadataRequest.h" -#import "PNRequest+Private.h" +#import "PNBaseObjectsRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" #import "PNDictionary.h" -#import "PNErrorCodes.h" +#import "PNFunctions.h" +#import "PNError.h" -#pragma mark Interface implementation +NS_ASSUME_NONNULL_BEGIN -@implementation PNSetUUIDMetadataRequest +#pragma mark Private interface declaration +/// `Set UUID metadata` request private extension. +@interface PNSetUUIDMetadataRequest () -#pragma mark - Information - -- (PNOperationType)operation { - return PNSetUUIDMetadataOperation; -} -- (NSString *)httpMethod { - return @"PATCH"; -} +#pragma mark - Properties -- (NSData *)bodyData { - NSArray *clss = @[[NSString class], [NSNumber class]]; +/// Request post body. +@property(strong, nullable, nonatomic) NSData *body; - if (self.custom.count && ![PNDictionary isDictionary:self.custom containValueOfClasses:clss]) { - NSString *reason = [NSString stringWithFormat:@"'custom' object for '%@' contain not " - "allowed data types (only NSString and NSNumber allowed).", - self.identifier]; - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Metadata additional information serialization did fail", - NSLocalizedFailureReasonErrorKey: reason, - }; - - self.parametersError = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:errorInformation]; - } - - if (self.parametersError) { - return nil; - } +#pragma mark - - NSMutableDictionary *info = [NSMutableDictionary new]; - NSError *error = nil; - NSData *data = nil; - if (self.name) { - info[@"name"] = self.name; - } +@end - if (self.externalId.length) { - info[@"externalId"] = self.externalId; - } +NS_ASSUME_NONNULL_END - if (self.profileUrl.length) { - info[@"profileUrl"] = self.profileUrl; - } - if (self.email.length) { - info[@"email"] = self.email; - } +#pragma mark - Interface implementation - if (self.custom.count) { - info[@"custom"] = self.custom; - } +@implementation PNSetUUIDMetadataRequest - if ([NSJSONSerialization isValidJSONObject:info]) { - data = [NSJSONSerialization dataWithJSONObject:info - options:(NSJSONWritingOptions)0 - error:&error]; - } else { - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Unable to serialize to JSON string", - NSLocalizedFailureReasonErrorKey: @"Provided object contains unsupported data type instances." - }; - error = [NSError errorWithDomain:NSCocoaErrorDomain - code:NSPropertyListWriteInvalidError - userInfo:errorInformation]; - } +#pragma mark - Properties - if (error) { - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Metadata information serialization did fail", - NSUnderlyingErrorKey: error - }; +- (PNOperationType)operation { + return PNSetUUIDMetadataOperation; +} - self.parametersError = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:errorInformation]; - } +- (TransportMethod)httpMethod { + return TransportPATCHMethod; +} - return data; +- (NSDictionary *)headers { + NSMutableDictionary *headers =[([super headers] ?: @{}) mutableCopy]; + headers[@"Content-Type"] = @"application/json"; + + return headers; } -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration + (instancetype)new { return [self requestWithUUID:nil]; @@ -112,10 +62,7 @@ + (instancetype)requestWithUUID:(NSString *)uuid { } - (instancetype)initWithObject:(NSString *)objectType identifier:(NSString *)identifier { - if ((self = [super initWithObject:objectType identifier:identifier])) { - _includeFields = PNUUIDCustomField; - } - + if ((self = [super initWithObject:objectType identifier:identifier])) _includeFields = PNUUIDCustomField; return self; } @@ -125,6 +72,57 @@ - (instancetype)init { return nil; } + +#pragma mark - Prepare + +- (PNError *)validate { + PNError *error = [super validate]; + if (error) return error; + + NSArray *clss = @[[NSString class], [NSNumber class]]; + + if (self.custom.count && ![PNDictionary isDictionary:self.custom containValueOfClasses:clss]) { + NSString *reason = PNStringFormat(@"'custom' object for '%@' contain not allowed data types (only NSString and " + "NSNumber allowed).", self.identifier); + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: @"Metadata additional information serialization did fail", + NSLocalizedFailureReasonErrorKey: reason, + }; + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } + + NSMutableDictionary *info = [NSMutableDictionary new]; + + if (self.name) info[@"name"] = self.name; + if (self.externalId.length) info[@"externalId"] = self.externalId; + if (self.profileUrl.length) info[@"profileUrl"] = self.profileUrl; + if (self.email.length) info[@"email"] = self.email; + if (self.custom.count) info[@"custom"] = self.custom; + + if ([NSJSONSerialization isValidJSONObject:info]) { + self.body = [NSJSONSerialization dataWithJSONObject:info options:(NSJSONWritingOptions)0 error:&error]; + } else { + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: @"Unable to serialize to JSON string", + NSLocalizedFailureReasonErrorKey: @"Provided object contains unsupported data type instances." + }; + + error = [PNError errorWithDomain:NSCocoaErrorDomain code:NSPropertyListWriteInvalidError userInfo:userInfo]; + } + + if (error) { + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: @"Metadata information serialization did fail", + NSUnderlyingErrorKey: error + }; + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } + + return nil; +} + #pragma mark - diff --git a/PubNub/Network/Requests/PNBaseRequest+Private.h b/PubNub/Network/Requests/PNBaseRequest+Private.h new file mode 100644 index 000000000..99c112ef3 --- /dev/null +++ b/PubNub/Network/Requests/PNBaseRequest+Private.h @@ -0,0 +1,125 @@ +#import "PNBaseRequest.h" +#import +#import +#import +#import "PNTransportRequest+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// General request private extension. +@interface PNBaseRequest (Protected) + + +#pragma mark - Properties + +/// Whether non-stream body should be compressed or not. +@property(assign, nonatomic, readonly, getter=shouldCompressBody) BOOL compressBody; + +/// Crypto module for data encryption / decryption. +@property(strong, nullable, nonatomic, readonly) id cryptoModule; + +/// Number of seconds which is used by client during non-subscription operations to check whether response potentially +/// failed with `timeout` or not. +@property (assign, nonatomic, readonly) NSTimeInterval nonSubscribeRequestTimeout; + +/// Maximum number of seconds which client should wait for events from live feed. +@property (assign, nonatomic, readonly) NSTimeInterval subscribeMaximumIdleTime; + +/// Service response body as stream. +@property(strong, nullable, nonatomic, readonly) NSInputStream *bodyStream; + +/// Number of seconds which is used by server to track whether client still subscribed on remote data objects live feed +/// or not. +@property(assign, nonatomic, readonly) NSInteger presenceHeartbeatValue; + +/// Key which is used to push data / state to the **PubNub** network. +@property(strong, nullable, nonatomic, readonly) NSString *publishKey; + +/// Headers to be sent with the request. +@property(copy, nullable, nonatomic, readonly) NSDictionary *headers; + +/// Query parameters to be sent with the request. +@property(copy, nullable, nonatomic, readonly) NSDictionary *query; + +/// Remote host name. +@property(strong, nullable, nonatomic, readonly) NSString *origin; + +/// HTTP method which should be used to send request. +@property(assign, nonatomic, readonly) TransportMethod httpMethod; + +/// Whether request `body` available as bytes stream or not. +@property(assign, nonatomic, readonly) BOOL bodyStreamAvailable; + +/// Key which is used to fetch data / state from the **PubNub** network. +@property(strong, nonatomic, readonly) NSString *subscribeKey; + +/// Body to be sent with the request. +@property(strong, nullable, nonatomic, readonly) NSData *body; + +/// Whether the response should be available as a file. +/// +/// > Note: By default set to `NO`. +@property(assign, nonatomic, readonly) BOOL responseAsFile; + +/// Remote resource path. +@property(strong, nonatomic, readonly) NSString *path; + + +#pragma mark - Initialization and Configuration + +/// Complete request configuration. +/// +/// - Parameter configuration: Current PubNub client configuration with keysey and active client user information. +- (void)setupWithClientConfiguration:(PNConfiguration *)configuration; + + +#pragma mark - Helpers + +/// Create error which will provide information about missing required request parameter. +/// +/// - Parameters: +/// - parameter: Name of missed of empty parameter. +/// - type: Name of object type. +/// - Returns: Error with information about missing parameter. +- (PNError *)missingParameterError:(NSString *)parameter forObjectRequest:(NSString *)type; + +/// Create error which will provide information about that one of request parameter values is too short. +/// +/// - Parameters: +/// - parameter: Name of parameter who's length smaller than minimum value. +/// - type: Name of object type. +/// - actualLength: Actual value length. +/// - minimumLength: Minimum allowed value length. +/// - Returns: Error with information about short parameter. +- (PNError *)valueTooShortErrorForParameter:(NSString *)parameter + ofObjectRequest:(NSString *)type + withLength:(NSUInteger)actualLength + minimumLength:(NSUInteger)minimumLength; + +/// Create error which will provide information about that one of request parameter values is +/// +/// - Parameters: +/// - parameter: Name of parameter who's length exceed maximum value. +/// - type: Name of object type. +/// - actualLength: Actual value length. +/// - maximumLength: Maximum allowed value length. +/// - Returns: Error with information about long parameter. +- (PNError *)valueTooLongErrorForParameter:(NSString *)parameter + ofObjectRequest:(NSString *)type + withLength:(NSUInteger)actualLength + maximumLength:(NSUInteger)maximumLength; + +/// Helper method to throw exception in case if request instance require constructor usage but has been called with `-init` or `+new`. +/// +/// - Throws: `PNInterfaceNotAvailable` exception. +- (void)throwUnavailableInitInterface; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/PNBaseRequest.h b/PubNub/Network/Requests/PNBaseRequest.h new file mode 100644 index 000000000..73d0c3b0f --- /dev/null +++ b/PubNub/Network/Requests/PNBaseRequest.h @@ -0,0 +1,20 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// General request implementatoin. +/// +/// Base class for all request objects. +@interface PNBaseRequest : NSObject + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/PNBaseRequest.m b/PubNub/Network/Requests/PNBaseRequest.m new file mode 100644 index 000000000..0e8708628 --- /dev/null +++ b/PubNub/Network/Requests/PNBaseRequest.m @@ -0,0 +1,206 @@ +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest+Private.h" +#import "PNFunctions.h" +#import "PNError.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// General request private extension. +@interface PNBaseRequest () + + +#pragma mark - Properties + +/// Current PubNub client configuration with keysey and active client user information. +@property(strong, nonatomic) PNConfiguration *configuration; + + +#pragma mark - Helpers + +/// Whether request expexted to have data to push to the remote service or not. +- (BOOL)shouldHaveBody; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNBaseRequest + + +#pragma mark - Properties + +- (NSTimeInterval)nonSubscribeRequestTimeout { + return self.configuration.nonSubscribeRequestTimeout; +} + +- (NSTimeInterval)subscribeMaximumIdleTime { + return self.configuration.subscribeMaximumIdleTime; +} + +- (id)cryptoModule { + return self.configuration.cryptoModule; +} + +- (NSInteger)presenceHeartbeatValue { + return self.configuration.presenceHeartbeatValue; +} + +- (PNTransportRequest *)request { + NSMutableDictionary *headers = [(self.headers ?: @{}) mutableCopy]; + PNTransportRequest *request = [PNTransportRequest new]; + request.bodyStreamAvailable = self.bodyStreamAvailable; + request.timeout = self.nonSubscribeRequestTimeout; + request.compressBody = self.shouldCompressBody; + request.responseAsFile = self.responseAsFile; + request.method = self.httpMethod; + request.origin = self.origin; + request.query = self.query; + request.path = self.path; + + if ([self shouldHaveBody]) { + if (!self.bodyStreamAvailable) { + request.body = self.body; + headers[@"content-length"] = @(request.body.length).stringValue; + } else request.bodyStream = self.bodyStream; + } + + request.headers = headers; + + return request; +} + +- (NSInputStream *)bodyStream { + return nil; +} + +- (TransportMethod)httpMethod { + return TransportGETMethod; +} + +- (BOOL)bodyStreamAvailable { + return NO; +} + +- (BOOL)shouldCompressBody { + return NO; +} + +- (NSString *)subscribeKey { + return self.configuration.subscribeKey; +} + +- (NSDictionary *)headers { + return nil; +} + +- (NSString *)publishKey { + return self.configuration.publishKey; +} + +- (NSDictionary *)query { + return nil; +} + +- (BOOL)responseAsFile { + return NO; +} + +- (NSString *)origin { + return nil; +} + +- (NSString *)path { + @throw [NSException exceptionWithName:@"PNNotImplemented" + reason:@"'path' not implemented by subclass" + userInfo:nil]; +} + +- (NSData *)body { + return nil; +} + +- (PNOperationType)operation { + @throw [NSException exceptionWithName:@"PNNotImplemented" + reason:@"'operation' not implemented by subclass" + userInfo:nil]; +} + + + +#pragma mark - Initialization and Configuration + +- (void)setupWithClientConfiguration:(PNConfiguration *)configuration { + _configuration = configuration; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + @throw [NSException exceptionWithName:@"PNRequestValidation" + reason:@"Not implemented by subclass" + userInfo:nil]; +} + + +#pragma mark - Helpers + +- (BOOL)shouldHaveBody { + return self.httpMethod == TransportPOSTMethod || self.httpMethod == TransportPATCHMethod; +} + +- (PNError *)missingParameterError:(NSString *)parameter forObjectRequest:(NSString *)type { + NSString *reason = PNStringFormat(@"%@'s '%@' parameter is missing or empty.", type.capitalizedString, parameter); + + return [PNError errorWithDomain:PNAPIErrorDomain + code:PNAPIErrorUnacceptableParameters + userInfo:PNErrorUserInfo(@"Request parameters error", reason, nil, nil)]; +} + +- (PNError *)valueTooShortErrorForParameter:(NSString *)parameter + ofObjectRequest:(NSString *)type + withLength:(NSUInteger)actualLength + minimumLength:(NSUInteger)minimumLength { + + NSString *reason = PNStringFormat(@"%@'s '%@' parameter is too shorty (%@ when %@ minimum allowed).", + type.capitalizedString, parameter, @(actualLength), @(minimumLength)); + + return [PNError errorWithDomain:PNAPIErrorDomain + code:PNAPIErrorUnacceptableParameters + userInfo:PNErrorUserInfo(@"Request parameters error", reason, nil, nil)]; +} + +- (PNError *)valueTooLongErrorForParameter:(NSString *)parameter + ofObjectRequest:(NSString *)type + withLength:(NSUInteger)actualLength + maximumLength:(NSUInteger)maximumLength { + + NSString *reason = PNStringFormat(@"%@'s '%@' parameter is too long (%@ when %@ maximum allowed).", + type.capitalizedString, parameter, @(actualLength), @(maximumLength)); + + return [PNError errorWithDomain:PNAPIErrorDomain + code:PNAPIErrorUnacceptableParameters + userInfo:PNErrorUserInfo(@"Request parameters error", reason, nil, nil)]; +} + +- (void)throwUnavailableInitInterface { + NSDictionary *errorInformation = @{ NSLocalizedRecoverySuggestionErrorKey: @"Use provided request constructor" }; + + @throw [NSException exceptionWithName:@"PNInterfaceNotAvailable" + reason:@"+new or -init methods unavailable." + userInfo:errorInformation]; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/PNRequest+Private.h b/PubNub/Network/Requests/PNRequest+Private.h deleted file mode 100644 index 7749e7d1d..000000000 --- a/PubNub/Network/Requests/PNRequest+Private.h +++ /dev/null @@ -1,118 +0,0 @@ -#import "PNRequestParameters.h" -#import "PNStructures.h" -#import "PNRequest.h" - - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Private interface declaration - -/** - * @brief Private extension of base class for request based API interface. - * - * @discussion Extension with additional information which can be used by older SDK infrastructure. - * - * @author Serhii Mamontov - * @version 4.10.0 - * @since 4.10.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNRequest (Private) - - -#pragma mark - Information - -/** - * @brief Object with information which should be used for request URI composition. - */ -@property (nonatomic, readonly, strong) PNRequestParameters *requestParameters; - -/** - * @brief Binary payload which should be sent with request. - */ -@property (nonatomic, nullable, readonly, strong) NSData *bodyData; - -/** - * @brief Type of operation performed with use of request object. - */ -@property (nonatomic, readonly, assign) PNOperationType operation; - -/** - * @brief Error which represent any request parameters error. - */ -@property (nonatomic, nullable, strong) NSError *parametersError; - -/** - * @brief HTTP method which should be used to perform target request. - * - * @note Will be set to \c GET if not implemented. - */ -@property (nonatomic, readonly, strong) NSString *httpMethod; - -/** - * @brief Whether request is expected to return service response (with data) or not. - * - * @since 4.12.0 - */ -@property (nonatomic, readonly, assign) BOOL returnsResponse; - - -#pragma mark - Misc - -/** - * @brief Create error which will provide information about missing required request parameter. - * - * @param parameter Name of missed of empty parameter. - * @param objectType Name of object type. - * - * @return Error with information about missing parameter. - */ -- (NSError *)missingParameterError:(NSString *)parameter forObjectRequest:(NSString *)objectType; - -/** - * @brief Create error which will provide information about that one of request parameter values is - * too short. - * - * @param parameter Name of parameter who's length smaller than minimum value. - * @param objectType Name of object type. - * @param actualLength Actual value length. - * @param minimumLength Minimum allowed value length. - * - * @return Error with information about short parameter. - */ -- (NSError *)valueTooShortErrorForParameter:(NSString *)parameter - ofObjectRequest:(NSString *)objectType - withLength:(NSUInteger)actualLength - minimumLength:(NSUInteger)minimumLength; - -/** - * @brief Create error which will provide information about that one of request parameter values is - * too long. - * - * @param parameter Name of parameter who's length exceed maximum value. - * @param objectType Name of object type. - * @param actualLength Actual value length. - * @param maximumLength Maximum allowed value length. - * - * @return Error with information about long parameter. - */ -- (NSError *)valueTooLongErrorForParameter:(NSString *)parameter - ofObjectRequest:(NSString *)objectType - withLength:(NSUInteger)actualLength - maximumLength:(NSUInteger)maximumLength; - -/** - * @brief Helper method to throw exception in case if request instance require constructor usage but - * has been called with \c -init or \c +new. - * - * @throws \c PNInterfaceNotAvailable exception. - */ -- (void)throwUnavailableInitInterface; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/PNRequest.h b/PubNub/Network/Requests/PNRequest.h deleted file mode 100644 index 92c1dc967..000000000 --- a/PubNub/Network/Requests/PNRequest.h +++ /dev/null @@ -1,27 +0,0 @@ -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief Base class for request based API interface. - * - * @discussion Interface allow to make request object with required properties and tramslate it to - * real network request. - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.10.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNRequest : NSObject - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/PNRequest.m b/PubNub/Network/Requests/PNRequest.m deleted file mode 100644 index 17a2e00ad..000000000 --- a/PubNub/Network/Requests/PNRequest.m +++ /dev/null @@ -1,140 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.10.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNRequest+Private.h" -#import "PNErrorCodes.h" - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Protected interface declaration - -@interface PNRequest () - -#pragma mark - Information - -/** - * @brief Object with information which should be used for request URI composition. - * - * @since 4.12.0 - */ -@property (nonatomic, strong) PNRequestParameters *requestParameters; - -/** - * @brief Error which represent any request parameters error. - */ -@property (nonatomic, nullable, strong) NSError *parametersError; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END - - -#pragma mark - Interface implementation - -@implementation PNRequest - - -#pragma mark - Information - -- (NSString *)httpMethod { - return @"GET"; -} - -- (BOOL)returnsResponse { - return [self.httpMethod.uppercaseString isEqualToString:@"GET"]; -} - -- (void)setParametersError:(NSError *)parametersError { - if (!_parametersError) { - _parametersError = parametersError; - } -} - -- (PNRequestParameters *)requestParameters { - if (!_requestParameters) { - _requestParameters = [PNRequestParameters new]; - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wundeclared-selector" - if ([self respondsToSelector:@selector(arbitraryQueryParameters)]) { - NSDictionary *queryParameters = [self valueForKey:@"arbitraryQueryParameters"]; - [_requestParameters addQueryParameters:queryParameters]; - } - #pragma clang diagnostic pop - } - - return _requestParameters; -} - - -#pragma mark - Misc - -- (NSError *)missingParameterError:(NSString *)parameter forObjectRequest:(NSString *)objectType { - NSString *reason = [NSString stringWithFormat:@"%@'s '%@' parameter is missing or empty.", - objectType.capitalizedString, parameter]; - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Request parameters error", - NSLocalizedFailureReasonErrorKey: reason - }; - - return [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:errorInformation]; -} - -- (NSError *)valueTooShortErrorForParameter:(NSString *)parameter - ofObjectRequest:(NSString *)objectType - withLength:(NSUInteger)actualLength - minimumLength:(NSUInteger)minimumLength { - - NSString *reason = [NSString stringWithFormat:@"%@'s '%@' parameter is too shorty (%@ when %@ " - "minimum allowed).", objectType.capitalizedString, parameter, - @(actualLength), @(minimumLength)]; - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Request parameters error", - NSLocalizedFailureReasonErrorKey: reason - }; - - return [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:errorInformation]; -} - -- (NSError *)valueTooLongErrorForParameter:(NSString *)parameter - ofObjectRequest:(NSString *)objectType - withLength:(NSUInteger)actualLength - maximumLength:(NSUInteger)maximumLength { - - NSString *reason = [NSString stringWithFormat:@"%@'s '%@' parameter is too long (%@ when %@ " - "maximum allowed).", objectType.capitalizedString, parameter, - @(actualLength), @(maximumLength)]; - NSDictionary *errorInformation = @{ - NSLocalizedDescriptionKey: @"Request parameters error", - NSLocalizedFailureReasonErrorKey: reason - }; - - return [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:errorInformation]; -} - -- (void)throwUnavailableInitInterface { - NSDictionary *errorInformation = @{ - NSLocalizedRecoverySuggestionErrorKey: @"Use provided request constructor" - }; - - @throw [NSException exceptionWithName:@"PNInterfaceNotAvailable" - reason:@"+new or -init methods unavailable." - userInfo:errorInformation]; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Requests/Presence/PNHereNowRequest.h b/PubNub/Network/Requests/Presence/PNHereNowRequest.h new file mode 100644 index 000000000..e29e492c6 --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNHereNowRequest.h @@ -0,0 +1,60 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Presence` request. +@interface PNHereNowRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// List of channel groups for which here now information should be received. +@property(copy, nonatomic, readonly) NSArray *channelGroups; + +/// One of **PNHereNowVerbosityLevel** fields to instruct what exactly data it expected in response. +@property(assign, nonatomic) PNHereNowVerbosityLevel verbosityLevel; + +/// List of channels for which here now information should be received. +@property(copy, nonatomic, readonly) NSArray *channels; + + +#pragma mark - Initialization and Configuration + +/// Create `Channel presence` request. +/// +/// - Parameter channelGroups: List of channel group for which here now information should be received. +/// - Returns: Ready to use `Channel group presence` request. ++ (instancetype)requestForChannelGroups:(NSArray *)channelGroups; + +/// Create `Channel presence` request. +/// +/// - Parameter channels: List of channel for which presence information should be received. +/// - Returns: Ready to use `Channel presence` request. ++ (instancetype)requestForChannels:(NSArray *)channels; + +/// Create `Global presence` request. +/// +/// Global presence checks presence on subscription key level. +/// +/// - Returns: Ready to use `Global presence` request. ++ (instancetype)requestGlobal; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Presence/PNHereNowRequest.m b/PubNub/Network/Requests/Presence/PNHereNowRequest.m new file mode 100644 index 000000000..abf14b484 --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNHereNowRequest.m @@ -0,0 +1,134 @@ +#import "PNHereNowRequest.h" +#import "PNTransportRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Presence` request private extension. +@interface PNHereNowRequest () + + +#pragma mark - Properties + + +/// List of channel groups for which here now information should be received. +@property(copy, nonatomic) NSArray *channelGroups; + +/// List of channels for which here now information should be received. +@property(copy, nonatomic) NSArray *channels; + +/// Type of request operation. +/// +/// One of PubNub REST API endpoints or third-party endpoint. +@property (assign, nonatomic) PNOperationType operation; + + +#pragma mark - Initialization and Configuration + +/// Initialize `Presence` request of specific operation type. +/// +/// - Parameter operation: Type of presence request which should be performed. +/// - Returns: Initialized `Presence` request. +- (instancetype)initWithOperation:(PNOperationType)operation; + +#pragma - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNHereNowRequest + + +#pragma mark - Properties + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + query[@"disable_uuids"] = @"1"; + query[@"state"] = @"0"; + + if (self.verbosityLevel == PNHereNowUUID || self.verbosityLevel == PNHereNowState) { + if (self.verbosityLevel == PNHereNowState) query[@"state"] = @"1"; + query[@"disable_uuids"] = @"0"; + } + + if (self.operation == PNHereNowForChannelGroupOperation) { + query[@"channel-group"] = [self.channelGroups componentsJoinedByString:@","]; + } + + if (self.arbitraryQueryParameters) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query; +} + +- (NSString *)path { + if (self.operation == PNHereNowGlobalOperation) return PNStringFormat(@"/v2/presence/sub-key/%@", self.subscribeKey); + + return PNStringFormat(@"/v2/presence/sub-key/%@/channel/%@", + self.subscribeKey, + [PNChannel namesForRequest:self.channels defaultString:@","]); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestForChannelGroups:(NSArray *)channelGroups { + PNHereNowRequest *request = [[self alloc] initWithOperation:PNHereNowForChannelGroupOperation]; + request.verbosityLevel = PNHereNowState; + request.channelGroups = [channelGroups copy]; + + return request; +} + ++ (instancetype)requestForChannels:(NSArray *)channels { + PNHereNowRequest *request = [[self alloc] initWithOperation:PNHereNowForChannelOperation]; + request.verbosityLevel = PNHereNowState; + request.channels = [channels copy]; + + return request; +} + ++ (instancetype)requestGlobal { + PNHereNowRequest *request = [[self alloc] initWithOperation:PNHereNowGlobalOperation]; + request.verbosityLevel = PNHereNowState; + + return request; +} + +- (instancetype)initWithOperation:(PNOperationType)operation { + if ((self = [super init])) _operation = operation; + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.operation == PNHereNowGlobalOperation) return nil; + else if (self.operation == PNHereNowForChannelOperation && self.channels.count == 0) { + return [self missingParameterError:@"channels" forObjectRequest:@"Channel presence"]; + } else if (self.operation == PNHereNowForChannelGroupOperation && self.channelGroups.count == 0) { + return [self missingParameterError:@"channelGroup" forObjectRequest:@"Channel group presence"]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Presence/PNPresenceHeartbeatRequest.h b/PubNub/Network/Requests/Presence/PNPresenceHeartbeatRequest.h new file mode 100644 index 000000000..4954b9bce --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNPresenceHeartbeatRequest.h @@ -0,0 +1,51 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface implementation + +/// `Heartbeat` request. +@interface PNPresenceHeartbeatRequest : PNBaseRequest + + +#pragma mark - Properties + +/// List of channel group names from which client should try to unsubscribe. +@property(copy, nullable, nonatomic, readonly) NSArray *channelGroups; + +/// List of channel names from which client should try to unsubscribe. +@property(copy, nullable, nonatomic, readonly) NSArray *channels; + +/// User presence timeout interval. +@property(assign, nonatomic, readonly) NSInteger presenceHeartbeatValue; + +/// `NSDictionary` with key-value pairs based on channel / group names and value which should be associated to it. +@property(copy, nullable, nonatomic) NSDictionary *state; + + +#pragma mark - Initialization and Configuration + +/// Create `Heartbeat` request. +/// +/// - Parameters: +/// - heartbeat: User presence timeout interval. +/// - channels: List of channel names for which user's presence should be announced. +/// - channelGroups: List of channel group names for which user's presence should be announced. +/// - Returns: Ready to use `Heartbeat` request. ++ (instancetype)requestWithHeartbeat:(NSInteger)heartbeat + channels:(nullable NSArray *)channels + channelGroups:(nullable NSArray *)channelGroups; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Presence/PNPresenceHeartbeatRequest.m b/PubNub/Network/Requests/Presence/PNPresenceHeartbeatRequest.m new file mode 100644 index 000000000..f09246bac --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNPresenceHeartbeatRequest.m @@ -0,0 +1,117 @@ +#import "PNPresenceHeartbeatRequest.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Heartbeat` request private extension. +@interface PNPresenceHeartbeatRequest () + + +#pragma mark - Properties + +/// List of channel group names from which client should try to unsubscribe. +@property(copy, nullable, nonatomic) NSArray *channelGroups; + +/// List of channel names from which client should try to unsubscribe. +@property(copy, nullable, nonatomic) NSArray *channels; + +/// User presence timeout interval. +@property(assign, nonatomic) NSInteger presenceHeartbeatValue; + + +#pragma mark - Initialization and Configuration + +/// Initialize `Heartbeat` request. +/// +/// - Parameters: +/// - heartbeat: User presence timeout interval. +/// - channels: List of channel names for which user's presence should be announced. +/// - channelGroups: List of channel group names for which user's presence should be announced. +/// - Returns: Initialized `Heartbeat` request. +- (instancetype)initWithHeartbeat:(NSInteger)heartbeat + channels:(nullable NSArray *)channels + channelGroups:(nullable NSArray *)channelGroups; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNPresenceHeartbeatRequest + + +#pragma mark - Properties + +- (PNOperationType)operation { + return PNHeartbeatOperation; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + + query[@"heartbeat"] = @(self.presenceHeartbeatValue).stringValue; + NSString *state = [PNJSON JSONStringFrom:self.state withError:NULL]; + if (state.length > 0) query[@"state"] = state; + + if (self.channelGroups.count) query[@"channel-group"] = [self.channelGroups componentsJoinedByString:@","]; + + return query; +} + +- (NSString *)path { + return PNStringFormat(@"/v2/presence/sub-key/%@/channel/%@/heartbeat", + self.subscribeKey, + [PNChannel namesForRequest:self.channels defaultString:@","]); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestWithHeartbeat:(NSInteger)heartbeat + channels:(NSArray *)channels + channelGroups:(NSArray *)channelGroups { + return [[self alloc] initWithHeartbeat:heartbeat channels:channels channelGroups:channelGroups]; +} + +- (instancetype)initWithHeartbeat:(NSInteger)heartbeat + channels:(NSArray *)channels + channelGroups:(NSArray *)channelGroups { + if ((self = [super init])) { + _channelGroups = [channelGroups copy]; + _presenceHeartbeatValue = heartbeat; + _channels = [channels copy]; + } + + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.channels.count == 0 && self.channelGroups.count == 0) { + return [self missingParameterError:@"channels" forObjectRequest:@"Heartbeat request"]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Presence/PNPresenceLeaveRequest+Private.h b/PubNub/Network/Requests/Presence/PNPresenceLeaveRequest+Private.h new file mode 100644 index 000000000..1c3db02f5 --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNPresenceLeaveRequest+Private.h @@ -0,0 +1,24 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface implementation + +/// `Leave` request private extension. +@interface PNPresenceLeaveRequest (Private) + + +#pragma mark - Properties + +/// Whether presence change should be done only for presence channels or not. +/// +/// > Note: Actual `leave` won't be triggered, and only the list of active channels will be modified if set to `NO`. +@property(assign, nonatomic, readonly) BOOL presenceOnly; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Presence/PNPresenceLeaveRequest.h b/PubNub/Network/Requests/Presence/PNPresenceLeaveRequest.h new file mode 100644 index 000000000..a4e0eee86 --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNPresenceLeaveRequest.h @@ -0,0 +1,58 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface implementation + +/// `Leave` request. +@interface PNPresenceLeaveRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Whether presence observation should be enabled for `channels` and `channelGroups` or not. +@property(assign, nonatomic, getter = shouldObservePresence) BOOL observePresence; + +/// List of channel group names from which client should try to unsubscribe. +@property(copy, nullable, nonatomic, readonly) NSArray *channelGroups; + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// List of channel names from which client should try to unsubscribe. +@property(copy, nullable, nonatomic, readonly) NSArray *channels; + + +#pragma mark - Initialization and Configuration + +/// Create `Leave` request. +/// +/// - Parameters: +/// - channels: List of channel names from which client should try to unsubscribe. +/// - channelGroups: List of channel group names from which client should try to unsubscribe. +/// - Returns: Ready to use `Leave` request. ++ (instancetype)requestWithChannels:(nullable NSArray *)channels + channelGroups:(nullable NSArray *)channelGroups; + +/// Create `Leave` request. +/// +/// - Parameters: +/// - channels: List of channel names from which client should stop receiving presence updates. +/// - channelGroups: List of channel group names from which client should stop receiving presence updates. +/// - Returns: Ready to use `Leave` request. ++ (instancetype)requestWithPresenceChannels:(nullable NSArray *)channels + channelGroups:(nullable NSArray *)channelGroups; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Presence/PNPresenceLeaveRequest.m b/PubNub/Network/Requests/Presence/PNPresenceLeaveRequest.m new file mode 100644 index 000000000..9251c1a5a --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNPresenceLeaveRequest.m @@ -0,0 +1,148 @@ +#import "PNPresenceLeaveRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Leave` request private extension. +@interface PNPresenceLeaveRequest () + + +#pragma mark - Properties + +/// List of channel group names from which client should try to unsubscribe. +@property(copy, nullable, nonatomic) NSArray *channelGroups; + +/// List of channel names from which client should try to unsubscribe. +@property(copy, nullable, nonatomic) NSArray *channels; + +/// Whether presence change should be done only for presence channels or not. +/// +/// > Note: Actual `leave` won't be triggered, and only the list of active channels will be modified if set to `NO`. +@property(assign, nonatomic) BOOL presenceOnly; + + +#pragma mark - Initialization and Configuration + +/// Initialize `Leave` request. +/// +/// - Parameters: +/// - channels: List of channel names from which client should try to unsubscribe. +/// - channelGroups: List of channel group names from which client should try to unsubscribe. +/// - presenceOnly: Whether request change should be done only for presence channels or not. +/// - Returns: Initialized `Leave` request. +- (instancetype)initWithChannels:(nullable NSArray *)channels + channelGroups:(nullable NSArray *)channelGroups + presenceOnly:(BOOL)presenceOnly; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNPresenceLeaveRequest + + +#pragma mark - Properties + +- (PNTransportRequest *)request { + PNTransportRequest *request = super.request; + request.retriable = NO; + + return request; +} + +- (PNOperationType)operation { + return PNUnsubscribeOperation; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + + if (self.channelGroups.count) query[@"channel-group"] = [self.channelGroups componentsJoinedByString:@","]; + if (self.arbitraryQueryParameters) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query.count ? query : nil; +} + +- (NSString *)path { + return PNStringFormat(@"/v2/presence/sub_key/%@/channel/%@/leave", + self.subscribeKey, + [PNChannel namesForRequest:self.channels defaultString:@","]); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestWithChannels:(NSArray *)channels channelGroups:(NSArray *)channelGroups { + return [[self alloc] initWithChannels:channels channelGroups:channelGroups presenceOnly:NO]; +} + ++ (instancetype)requestWithPresenceChannels:(NSArray *)channels + channelGroups:(NSArray *)channelGroups { + NSMutableArray *presenceChannelGroups = nil; + NSMutableArray *presenceChannels = nil; + + if (channels.count) { + presenceChannels = [NSMutableArray arrayWithCapacity:channels.count]; + for(NSString *name in channels) { + if ([name hasSuffix:@"-pnpres"]) [presenceChannels addObject:name]; + else [presenceChannels addObject:[name stringByAppendingString:@"-pnpres"]]; + } + } + + if (channelGroups.count) { + presenceChannelGroups = [NSMutableArray arrayWithCapacity:channelGroups.count]; + for(NSString *name in channelGroups) { + if ([name hasSuffix:@"-pnpres"]) [presenceChannelGroups addObject:name]; + else [presenceChannelGroups addObject:[name stringByAppendingString:@"-pnpres"]]; + } + } + + return [[self alloc] initWithChannels:presenceChannels channelGroups:presenceChannelGroups presenceOnly:YES]; +} + +- (instancetype)initWithChannels:(NSArray *)channels + channelGroups:(NSArray *)channelGroups + presenceOnly:(BOOL)presenceOnly { + if ((self = [super init])) { + _channelGroups = [channelGroups copy]; + _observePresence = presenceOnly; + _presenceOnly = presenceOnly; + _channels = [channels copy]; + } + + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.channels.count == 0 && self.channelGroups.count == 0) { + return [self missingParameterError:@"channels" forObjectRequest:@"Presence leave request"]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Presence/PNPresenceStateFetchRequest.h b/PubNub/Network/Requests/Presence/PNPresenceStateFetchRequest.h new file mode 100644 index 000000000..dfdf495e6 --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNPresenceStateFetchRequest.h @@ -0,0 +1,46 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch presence state` request. +@interface PNPresenceStateFetchRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// List of channel groups which will store provided state information for `userId`. +@property(copy, nullable, nonatomic) NSArray *channelGroups; + +/// List of channels which will store provided state information for `userId`. +@property(copy, nullable, nonatomic) NSArray *channels; + +/// Unique identifier of the user with which `state` should be associated. +@property(copy, nonatomic, readonly) NSString *userId; + + +#pragma mark - Initialization and Configuration + +/// Create `Fetch presence state` request. +/// +/// - Parameter userId: Unique identifier of the user for which associated state should be retrieved. +/// - Returns: Ready to use `Fetch presence state` request. ++ (instancetype)requestWithUserId:(NSString *)userId; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Presence/PNPresenceStateFetchRequest.m b/PubNub/Network/Requests/Presence/PNPresenceStateFetchRequest.m new file mode 100644 index 000000000..8668b919b --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNPresenceStateFetchRequest.m @@ -0,0 +1,98 @@ +#import "PNPresenceStateFetchRequest.h" +#import "PNTransportRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Fetch presence state` request private extension. +@interface PNPresenceStateFetchRequest () + + +#pragma mark - Properties + +/// Unique identifier of the user for which associated state should be retrieved. +@property(copy, nonatomic) NSString *userId; + + +#pragma mark - Initialization and Configuration + +/// Initialize `Fetch presence state` request. +/// +/// - Parameter userId: Unique identifier of the user for which associated state should be retrieved. +/// - Returns: Initialized `Fetch presence state` request. +- (instancetype)initWithUserId:(NSString *)userId; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + + +#pragma mark - Interface implementation + +@implementation PNPresenceStateFetchRequest + + +#pragma mark - Properties + +- (PNOperationType)operation { + return PNGetStateOperation; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + + if (self.channelGroups.count) query[@"channel-group"] = [self.channelGroups componentsJoinedByString:@","]; + if (self.arbitraryQueryParameters) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query; +} + +- (NSString *)path { + return PNStringFormat(@"/v2/presence/sub-key/%@/channel/%@/uuid/%@", + self.subscribeKey, + [PNChannel namesForRequest:self.channels defaultString:@","], + [PNString percentEscapedString:self.userId]); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestWithUserId:(NSString *)userId { + return [[self alloc] initWithUserId:userId]; +} + +- (instancetype)initWithUserId:(NSString *)userId { + if ((self = [super init])) _userId = [userId copy]; + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.userId.length == 0) return [self missingParameterError:@"userId" forObjectRequest:@"Set presence state"]; + if (self.channels.count == 0 && self.channelGroups.count == 0) { + return [self missingParameterError:@"channels" forObjectRequest:@"Set presence state"]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Presence/PNPresenceStateSetRequest.h b/PubNub/Network/Requests/Presence/PNPresenceStateSetRequest.h new file mode 100644 index 000000000..7d1ad26ab --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNPresenceStateSetRequest.h @@ -0,0 +1,51 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Set presence state` request. +@interface PNPresenceStateSetRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// List of channel groups which will store provided state information for `userId`. +@property(copy, nullable, nonatomic) NSArray *channelGroups; + +/// List of channels which will store provided state information for `userId`. +@property(copy, nullable, nonatomic) NSArray *channels; + +/// `NSDictionary` with data which should be associated with `uuidId` on `channel`. +/// +/// > Note: Data will be removed if `state` not set. +@property(copy, nullable, nonatomic) NSDictionary *state; + +/// Unique identifier of the user with which `state` should be associated. +@property(copy, nonatomic, readonly) NSString *userId; + + +#pragma mark - Initialization and Configuration + +/// Create `Set presence state` request. +/// +/// - Parameter userId: Unique identifier of the user with which `state` should be associated. +/// - Returns: Ready to use `Set presence state` request. ++ (instancetype)requestWithUserId:(NSString *)userId; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Presence/PNPresenceStateSetRequest.m b/PubNub/Network/Requests/Presence/PNPresenceStateSetRequest.m new file mode 100644 index 000000000..31dc16f43 --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNPresenceStateSetRequest.m @@ -0,0 +1,100 @@ +#import "PNPresenceStateSetRequest.h" +#import "PNTransportRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Set presence state` request private extension. +@interface PNPresenceStateSetRequest () + + +#pragma mark - Properties + +/// Unique identifier of the user with which `state` should be associated. +@property(copy, nonatomic) NSString *userId; + + +#pragma mark - Initialization and Configuration + +/// Initialize `Set presence state` request. +/// +/// - Parameter userId: Unique identifier of the user with which `state` should be associated. +/// - Returns: Initialized `Set presence state` request. +- (instancetype)initWithUserId:(NSString *)userId; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNPresenceStateSetRequest + + +#pragma mark - Properties + +- (PNOperationType)operation { + return PNSetStateOperation; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + + query[@"state"] = [PNJSON JSONStringFrom:self.state withError:NULL] ?: @"{}"; + + if (self.channelGroups.count) query[@"channel-group"] = [self.channelGroups componentsJoinedByString:@","]; + if (self.arbitraryQueryParameters) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query; +} + + +- (NSString *)path { + return PNStringFormat(@"/v2/presence/sub-key/%@/channel/%@/uuid/%@/data", + self.subscribeKey, + [PNChannel namesForRequest:self.channels defaultString:@","], + [PNString percentEscapedString:self.userId]); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestWithUserId:(NSString *)userId{ + return [[self alloc] initWithUserId:userId]; +} + +- (instancetype)initWithUserId:(NSString *)userId { + if ((self = [super init])) _userId = [userId copy]; + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.userId.length == 0) return [self missingParameterError:@"userId" forObjectRequest:@"Set presence state"]; + if (self.channels.count == 0 && self.channelGroups.count == 0) { + return [self missingParameterError:@"channels" forObjectRequest:@"Set presence state"]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Presence/PNWhereNowRequest.h b/PubNub/Network/Requests/Presence/PNWhereNowRequest.h new file mode 100644 index 000000000..c0dcd4bb0 --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNWhereNowRequest.h @@ -0,0 +1,41 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `User presence` request. +@interface PNWhereNowRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// Unique identifer of the user for which presence information should be retrieved. +@property(copy, nonatomic, readonly) NSString *userId; + + +#pragma mark - Initialization and Configuration + +/// Create `User presence` request. +/// +/// - Parameter userId: Unique identifer of the user for which presence information should be retrieved. +/// - Returns: Ready to use `User presence` request. ++ (instancetype)requestForUserId:(NSString *)userId; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Presence/PNWhereNowRequest.m b/PubNub/Network/Requests/Presence/PNWhereNowRequest.m new file mode 100644 index 000000000..a1a32204f --- /dev/null +++ b/PubNub/Network/Requests/Presence/PNWhereNowRequest.m @@ -0,0 +1,90 @@ +#import "PNWhereNowRequest.h" +#import "PNTransportRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `User presence` request private extension. +@interface PNWhereNowRequest () + + +#pragma mark - Properties + +/// Unique identifer of the user for which presence information should be retrieved. +@property(copy, nonatomic) NSString *userId; + + +#pragma mark - Initialization and Configuration + +/// Initialize `User presence` request. +/// +/// - Parameter userId: Unique identifer of the user for which presence information should be retrieved. +/// - Returns: Initialized `User presence` request. +- (instancetype)initForUserId:(NSString *)userId; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNWhereNowRequest + + +#pragma mark - Properties + +- (PNOperationType)operation { + return PNWhereNowOperation; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + + if (self.arbitraryQueryParameters) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query; +} + +- (NSString *)path { + return PNStringFormat(@"/v2/presence/sub-key/%@/uuid/%@", + self.subscribeKey, [PNString percentEscapedString:self.userId]); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestForUserId:(NSString *)userId { + return [[self alloc] initForUserId:userId]; +} + +- (instancetype)initForUserId:(NSString *)userId { + if ((self = [super init])) _userId = [userId copy]; + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.userId.length == 0) return [self missingParameterError:@"userId" forObjectRequest:@"User presence"]; + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Publish/PNBasePublishRequest+Private.h b/PubNub/Network/Requests/Publish/PNBasePublishRequest+Private.h index 54b76517c..55463fe99 100644 --- a/PubNub/Network/Requests/Publish/PNBasePublishRequest+Private.h +++ b/PubNub/Network/Requests/Publish/PNBasePublishRequest+Private.h @@ -6,38 +6,40 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Private interface declaration -/// Base `publish` request private extension. -/// -/// - Since: 4.15.0 -/// - Copyright: 2010-2023 PubNub, Inc. +/// General request for all `Publish` API endpoints private extension. @interface PNBasePublishRequest (Private) -#pragma mark - Information +#pragma mark - Properties -/// Pre-process message content basing on request's requirements. -@property (nonatomic, nullable, readonly, strong) id preFormattedMessage; +/// Message which has been prepared for publish. +/// +/// Depending from request configuration this object may store encrypted message with mobile push payloads. +@property(strong, nullable, nonatomic, readonly) NSString *preparedMessage; /// Crypto module for data processing. /// /// **PubNub** client uses this instance to _encrypt_ and _decrypt_ data that has been sent and received from the /// **PubNub** network. -@property(nonatomic, nullable, strong) id cryptoModule; +@property(strong, nullable, nonatomic) id cryptoModule; + +/// Pre-process message content basing on request's requirements. +@property(strong, nullable, nonatomic, readonly) id preFormattedMessage; /// Whether message should be compressed before sending or not. -@property (nonatomic, assign, getter = shouldCompress) BOOL compress; +@property(assign, nonatomic, getter = shouldCompress) BOOL compress; /// Dictionary with payloads for different vendors (Apple with `'apns'` key and Google with `'gcm'`). -@property (nonatomic, nullable, strong) NSDictionary *payloads; +@property(strong, nullable, nonatomic) NSDictionary *payloads; /// Publish request sequence number. -@property (nonatomic, assign) NSUInteger sequenceNumber; +@property(assign, nonatomic) NSUInteger sequenceNumber; /// Whether request is repeatedly sent to retry after recent failure. -@property (nonatomic, assign) BOOL retried; +@property(assign, nonatomic) BOOL retried; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration /// Initialize `publish` request. /// @@ -48,14 +50,6 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Helpers -/// Create JSON objects which should be published to specified `channel`. -/// -/// - Parameters: -/// - message: User-provided message which should be sent to channel and available for rest subscribers. -/// - payloads: Mobile notification payloads which should be merged with original `message`. -/// - Returns: JSON string (encrypted if required) which will be published to specified `channel`. -- (NSString *)JSONFromMessage:(id)message withPushNotificationsPayload:(NSDictionary *)payloads; - /// Merge user-specified message with push payloads into single message which will be processed on the **PubNub** /// service. /// @@ -76,8 +70,7 @@ NS_ASSUME_NONNULL_BEGIN /// - message: Data which crypto module should try to encrypt. /// - error: Pointer into which data encryption error will be passed. /// - Returns: Encrypted Base64-encoded string or original message. -- (nullable NSString *)encryptedMessage:(NSString *)message - error:(NSError **)error; +- (nullable NSString *)encryptedMessage:(NSString *)message error:(NSError **)error; #pragma mark - diff --git a/PubNub/Network/Requests/Publish/PNBasePublishRequest.h b/PubNub/Network/Requests/Publish/PNBasePublishRequest.h index 04f513827..baf5107c5 100644 --- a/PubNub/Network/Requests/Publish/PNBasePublishRequest.h +++ b/PubNub/Network/Requests/Publish/PNBasePublishRequest.h @@ -1,46 +1,49 @@ -#import -#import +#import NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/// Base class for `publish`-based API endpoints. -/// -/// - Since: 4.15.0 -/// - Copyright: 2010-2023 PubNub, Inc. -@interface PNBasePublishRequest : PNRequest +/// General request for all `Publish` API endpoints. +@interface PNBasePublishRequest : PNBaseRequest -#pragma mark - Information +#pragma mark - Properties /// Arbitrary percent encoded query parameters which should be sent along with original API call. -@property (nonatomic, nullable, strong) NSDictionary *arbitraryQueryParameters; +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// Serialized `NSDictionary` with values which should be used by **PubNub** service to filter messages. +@property(strong, nullable, nonatomic, readonly) NSString *preparedMetadata; + +/// Whether message should be replicated across the PubNub Real-Time Network and sent simultaneously to all subscribed +///clients on a channel. +@property(assign, nonatomic, getter = shouldReplicate) BOOL replicate; /// Whether `published` data should be stored and available with history API or not. -@property (nonatomic, assign, getter = shouldStore) BOOL store; +@property(assign, nonatomic, getter = shouldStore) BOOL store; /// `NSDictionary` with values which should be used by **PubNub** service to filter messages. -@property (nonatomic, nullable, strong) NSDictionary *metadata; +@property(strong, nullable, nonatomic) NSDictionary *metadata; /// Name of channel to which message should be published. -@property (nonatomic, readonly, copy) NSString *channel; +@property(copy, nonatomic, readonly) NSString *channel; /// Message which will be published. /// /// Provided object will be serialized into JSON (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) string before /// pushing to the **PubNub** network. If client has been configured with cipher key message will be encrypted as well. -@property (nonatomic, nullable, strong) id message; +@property(strong, nullable, nonatomic) id message; /// How long message should be stored in channel's storage. Pass \b 0 store message according to retention. -@property (nonatomic, assign) NSUInteger ttl; +@property(assign, nonatomic) NSUInteger ttl; /// Whether request is repeatedly sent to retry after recent failure. -@property (nonatomic, assign) BOOL retried; +@property(assign, nonatomic) BOOL retried; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration /// Forbids request initialization. /// diff --git a/PubNub/Network/Requests/Publish/PNBasePublishRequest.m b/PubNub/Network/Requests/Publish/PNBasePublishRequest.m index 68e3f21f4..f329f910e 100644 --- a/PubNub/Network/Requests/Publish/PNBasePublishRequest.m +++ b/PubNub/Network/Requests/Publish/PNBasePublishRequest.m @@ -1,45 +1,49 @@ #import "PNBasePublishRequest+Private.h" -#import "PNRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" #import "PNHelpers.h" +#import "PNError.h" #import "PNAES.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration -/// Base `publish` request private extension. +/// General request for all `Publish` API endpoints private extension. @interface PNBasePublishRequest () -#pragma mark - Information +#pragma mark - Properties /// Crypto module for data processing. /// /// **PubNub** client uses this instance to _encrypt_ and _decrypt_ data that has been sent and received from the /// **PubNub** network. -@property(nonatomic, nullable, strong) id cryptoModule; - -/// Whether message should be replicated across the PubNub Real-Time Network and sent simultaneously to all subscribed -///clients on a channel. -@property (nonatomic, assign, getter = shouldReplicate) BOOL replicate; +@property(strong, nullable, nonatomic) id cryptoModule; /// Whether message should be compressed before sending or not. -@property (nonatomic, assign, getter = shouldCompress) BOOL compress; +@property(assign, nonatomic, getter = shouldCompress) BOOL compress; + +/// Serialized `NSDictionary` with values which should be used by **PubNub** service to filter messages. +@property(strong, nullable, nonatomic) NSString *preparedMetadata; /// Dictionary with payloads for different vendors (Apple with `'apns'` key and Google with `'gcm'`). -@property (nonatomic, nullable, strong) NSDictionary *payloads; +@property(strong, nullable, nonatomic) NSDictionary *payloads; /// Message which has been prepared for publish. /// /// Depending from request configuration this object may store encrypted message with mobile push payloads. -@property (nonatomic, nullable, strong) id preparedMessage; +@property(strong, nullable, nonatomic) NSString *preparedMessage; /// Publish request sequence number. -@property (nonatomic, assign) NSUInteger sequenceNumber; +@property(assign, nonatomic) NSUInteger sequenceNumber; + +/// Request post body. +@property(strong, nullable, nonatomic) NSData *body; /// Name of channel to which message should be published. -@property (nonatomic, copy) NSString *channel; +@property(copy, nonatomic) NSString *channel; #pragma mark - @@ -54,73 +58,44 @@ @interface PNBasePublishRequest () @implementation PNBasePublishRequest -#pragma mark - Information +#pragma mark - Properties -- (BOOL)returnsResponse { - return NO; +- (TransportMethod)httpMethod { + return self.shouldCompress ? TransportPOSTMethod : TransportGETMethod; } -- (NSString *)httpMethod { - return self.shouldCompress ? @"POST" : @"GET"; +- (BOOL)shouldCompressBody { + return self.shouldCompress; } -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; - if (self.parametersError) return parameters; - - if (self.channel.length) { - [parameters addPathComponent:[PNString percentEscapedString:self.channel] forPlaceholder:@"{channel}"]; - } else { - self.parametersError = [self missingParameterError:@"channel" forObjectRequest:@"Request"]; - } +- (NSDictionary *)headers { + NSMutableDictionary *headers = [([super headers] ?: @{}) mutableCopy]; + if (self.httpMethod == TransportPOSTMethod) headers[@"Content-Type"] = @"application/json"; - if (!self.shouldStore) [parameters addQueryParameter:@"0" forFieldName:@"store"]; - if (self.ttl > 0) [parameters addQueryParameter:@(self.ttl).stringValue forFieldName:@"ttl"]; - if (!self.shouldReplicate) [parameters addQueryParameter:@"true" forFieldName:@"norep"]; - - parameters.POSTBodyCompressed = self.shouldCompress; - - NSString *messageForPublish = @""; - messageForPublish = [self JSONFromMessage:self.preFormattedMessage withPushNotificationsPayload:self.payloads]; - - if (!self.parametersError && !messageForPublish.length) { - self.parametersError = [self missingParameterError:@"message" forObjectRequest:@"Request"]; - } + return headers; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [NSMutableDictionary new]; - if (!self.parametersError) { - if (!self.shouldCompress) messageForPublish = [PNString percentEscapedString:messageForPublish]; - else messageForPublish = @""; - - [parameters addPathComponent:messageForPublish forPlaceholder:@"{message}"]; - } + if (self.preparedMetadata.length) query[@"meta"] = self.preparedMetadata; + if (self.ttl > 0) query[@"ttl"] = @(self.ttl).stringValue; + if (!self.shouldReplicate) query[@"norep"] = @"true"; + if (!self.shouldStore) query[@"store"] = @"0"; + query[@"seqn"] = @(self.sequenceNumber); - if (self.metadata) { - NSError *parametersError = nil; - NSString *metadataForPublish = [PNJSON JSONStringFrom:self.metadata withError:¶metersError]; - - if (!parametersError && metadataForPublish.length) { - [parameters addQueryParameter:[PNString percentEscapedString:metadataForPublish] forFieldName:@"meta"]; - } else if (parametersError) { - self.parametersError = parametersError; - } - } + if (self.arbitraryQueryParameters.count) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; - [parameters addQueryParameter:@(self.sequenceNumber).stringValue forFieldName:@"seqn"]; - - return parameters; + return query.count ? query : nil; } -- (NSData *)bodyData { - NSString *messageForPublish = [self JSONFromMessage:self.preFormattedMessage - withPushNotificationsPayload:self.payloads]; - if (self.parametersError) return nil; - - NSData *messageData = [messageForPublish dataUsingEncoding:NSUTF8StringEncoding]; - - return [PNGZIP GZIPDeflatedData:messageData] ?: [@"" dataUsingEncoding:NSUTF8StringEncoding]; +- (NSData *)body { + if (self.httpMethod == TransportPOSTMethod) return [self.preparedMessage dataUsingEncoding:NSUTF8StringEncoding]; + return nil; } + - (id)preFormattedMessage { return self.message; } @@ -131,8 +106,8 @@ - (id)preFormattedMessage { - (instancetype)initWithChannel:(NSString *)channel { if ((self = [super init])) { _channel = [channel copy]; - self.replicate = YES; - self.store = YES; + _replicate = YES; + _store = YES; } return self; @@ -145,40 +120,88 @@ - (instancetype)init { } -#pragma mark - Misc +#pragma mark - Prepare -- (NSString *)JSONFromMessage:(id)message withPushNotificationsPayload:(NSDictionary *)payloads { - if (self.preparedMessage) return self.preparedMessage; +- (PNError *)validate { + if (self.channel.length == 0) return [self missingParameterError:@"channel" forObjectRequest:@"Request"]; - NSError *parametersError = nil; - NSString *messageForPublish = [PNJSON JSONStringFrom:message withError:¶metersError]; + NSString *preFormattedMessage = self.preFormattedMessage; + NSString *messageForPublish = @""; + NSError *error = nil; + + messageForPublish = [PNJSON JSONStringFrom:preFormattedMessage withError:&error]; BOOL isMessageEncrypted = NO; - if (!parametersError && self.cryptoModule) { - NSString *encryptedMessage = [self encryptedMessage:messageForPublish error:¶metersError]; + if (error) { + NSDictionary *userInfo = PNErrorUserInfo( + @"Request parameters error", + @"Message serialization did fail", + @"Ensure that only JSON-compatible values used in 'message'.", + error + ); - if (!parametersError) { + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } + + if (self.cryptoModule) { + NSString *encryptedMessage = [self encryptedMessage:messageForPublish error:&error]; + + if (!error) { messageForPublish = [encryptedMessage copy]; isMessageEncrypted = YES; - } else { - messageForPublish = nil; + } else if (error) { + NSDictionary *userInfo = PNErrorUserInfo( + @"Request parameters error", + @"Message encryption did fail.", + nil, + error + ); + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; } } - if (!parametersError && payloads.count) { - id targetMessage = isMessageEncrypted ? messageForPublish : message; - NSDictionary *mergedData = [self mergedMessage:targetMessage withMobilePushPayload:payloads]; - messageForPublish = [PNJSON JSONStringFrom:mergedData withError:¶metersError]; + if (self.payloads.count) { + id targetMessage = isMessageEncrypted ? messageForPublish : preFormattedMessage; + NSDictionary *mergedData = [self mergedMessage:targetMessage withMobilePushPayload:self.payloads]; + messageForPublish = [PNJSON JSONStringFrom:mergedData withError:&error]; + + if (error) { + NSDictionary *userInfo = PNErrorUserInfo( + @"Request parameters error", + @"Message merge with push notification payload did fail", + @"Ensure that only JSON-compatible values used in message.", + error + ); + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } } - if (parametersError) self.parametersError = parametersError; - - self.preparedMessage = messageForPublish; - - return messageForPublish; + if (messageForPublish.length == 0) return [self missingParameterError:@"message" forObjectRequest:@"Request"]; + else self.preparedMessage = messageForPublish; + + if (self.metadata) { + NSString *metadataForPublish = [PNJSON JSONStringFrom:self.metadata withError:&error]; + if (!error && metadataForPublish.length) self.preparedMetadata = [metadataForPublish copy]; + else if (error) { + NSDictionary *userInfo = PNErrorUserInfo( + @"Request parameters error", + @"Metadata serialization did fail", + @"Ensure that only JSON-compatible values used in 'metadata'.", + error + ); + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } + } + + return nil; } +#pragma mark - Misc + - (NSDictionary *)mergedMessage:(id)message withMobilePushPayload:(NSDictionary *)payloads { NSDictionary *originalMessage = message ?: @{}; diff --git a/PubNub/Network/Requests/Publish/PNPublishFileMessageRequest.h b/PubNub/Network/Requests/Publish/PNPublishFileMessageRequest.h index 38d2e00e0..7f450e51d 100644 --- a/PubNub/Network/Requests/Publish/PNPublishFileMessageRequest.h +++ b/PubNub/Network/Requests/Publish/PNPublishFileMessageRequest.h @@ -5,44 +5,29 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Publish \c file \c message request. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Publish file message` request. @interface PNPublishFileMessageRequest : PNBasePublishRequest -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Unique identifier provided during file upload. - */ -@property (nonatomic, readonly, copy) NSString *identifier; +/// Unique identifier provided during file upload. +@property(copy, nonatomic, readonly) NSString *identifier; -/** - * @brief Name with which uploaded data has been stored. - */ -@property (nonatomic, readonly, copy) NSString *filename; +/// Name with which uploaded data has been stored. +@property(copy, nonatomic, readonly) NSString *filename; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Create and configure \c file \c message \c publish request. - * - * @param channel Name of channel to which \c file \c message should be published. - * @param identifier Unique identifier provided during file upload. - * @param filename Name with which uploaded data has been stored. - * - * @return Configured and ready to use \c publish \c message request. - */ -+ (instancetype)requestWithChannel:(NSString *)channel - fileIdentifier:(NSString *)identifier - name:(NSString *)filename; +/// Create `File message publish` request. +/// +/// - Parameters: +/// - channel: Name of channel to which `file message` should be published. +/// - identifier: Unique identifier provided during file upload. +/// - filename Name with which uploaded data has been stored. +/// - Returns: Ready to use `publish message` request. ++ (instancetype)requestWithChannel:(NSString *)channel fileIdentifier:(NSString *)identifier name:(NSString *)filename; #pragma mark - diff --git a/PubNub/Network/Requests/Publish/PNPublishFileMessageRequest.m b/PubNub/Network/Requests/Publish/PNPublishFileMessageRequest.m index a228f9375..68ed83506 100644 --- a/PubNub/Network/Requests/Publish/PNPublishFileMessageRequest.m +++ b/PubNub/Network/Requests/Publish/PNPublishFileMessageRequest.m @@ -1,22 +1,19 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNBasePublishRequest+Private.h" #import "PNPublishFileMessageRequest.h" -#import "PNRequest+Private.h" +#import "PNBasePublishRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" +#import "PNHelpers.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// `Publish file message` request private. @interface PNPublishFileMessageRequest () -#pragma mark - Information +#pragma mark - Properties /// Crypto module for data processing. /// @@ -35,20 +32,16 @@ @interface PNPublishFileMessageRequest () @property (nonatomic, copy) NSString *filename; -#pragma mark - Initialization & Configuration +#pragma mark - Initialization and Configuration -/** - * @brief Initialize \c file \c message \c publish request. - * - * @param channel Name of channel to which \c file \c message should be published. - * @param identifier Unique identifier provided during file upload. - * @param filename Name with which uploaded data has been stored. - * - * @return Initialized and ready to use \c publish \c message request. - */ -- (instancetype)initWithChannel:(NSString *)channel - fileIdentifier:(NSString *)identifier - name:(NSString *)filename; +/// Initialize `File message publish` request. +/// +/// - Parameters: +/// - channel: Name of channel to which `file message` should be published. +/// - identifier: Unique identifier provided during file upload. +/// - filename Name with which uploaded data has been stored. +/// - Returns: Initialized `publish message` request. +- (instancetype)initWithChannel:(NSString *)channel fileIdentifier:(NSString *)identifier name:(NSString *)filename; #pragma mark - @@ -63,49 +56,45 @@ - (instancetype)initWithChannel:(NSString *)channel @implementation PNPublishFileMessageRequest -#pragma mark - Information +#pragma mark - Properties - (PNOperationType)operation { return PNPublishFileMessageOperation; } -- (id)preFormattedMessage { - NSMutableDictionary *message = [NSMutableDictionary new]; +- (NSDictionary *)headers { + NSMutableDictionary *headers =[([super headers] ?: @{}) mutableCopy]; + headers[@"Content-Type"] = @"application/json"; - if (self.message) { - message[@"message"] = self.message; - } + return headers; +} + +- (id)preFormattedMessage { + NSMutableDictionary *message = [NSMutableDictionary dictionaryWithDictionary:@{ + @"file": @{ @"id": self.identifier, @"name": self.filename } + }]; - if (self.identifier.length && self.filename.length) { - message[@"file"] = @{ - @"id": self.identifier, - @"name": self.filename - }; - } else if (!self.identifier.length) { - self.parametersError = [self missingParameterError:@"identifier" - forObjectRequest:@"Request"]; - } else if (!self.filename.length) { - self.parametersError = [self missingParameterError:@"filename" - forObjectRequest:@"Request"]; - } + if (self.message) message[@"message"] = self.message; - return !self.parametersError ? message : nil; + return message; +} + +- (NSString *)path { + return PNStringFormat(@"/v1/files/publish-file/%@/%@/0/%@/0/%@", + self.publishKey, + self.subscribeKey, + [PNString percentEscapedString:self.channel], + self.httpMethod == TransportPOSTMethod ? @"" : [PNString percentEscapedString:self.preparedMessage]); } #pragma mark - Initialization & Configuration -+ (instancetype)requestWithChannel:(NSString *)channel - fileIdentifier:(NSString *)identifier - name:(NSString *)filename { - ++ (instancetype)requestWithChannel:(NSString *)channel fileIdentifier:(NSString *)identifier name:(NSString *)filename { return [[self alloc] initWithChannel:channel fileIdentifier:identifier name:filename]; } -- (instancetype)initWithChannel:(NSString *)channel - fileIdentifier:(NSString *)identifier - name:(NSString *)filename { - +- (instancetype)initWithChannel:(NSString *)channel fileIdentifier:(NSString *)identifier name:(NSString *)filename { if ((self = [super initWithChannel:channel])) { _identifier = [identifier copy]; _filename = [filename copy]; @@ -114,6 +103,19 @@ - (instancetype)initWithChannel:(NSString *)channel return self; } + +#pragma mark - Prepare + +- (PNError *)validate { + PNError *error = [super validate]; + if (error) return error; + + if (self.identifier.length == 0) return [self missingParameterError:@"identifier" forObjectRequest:@"Request"]; + if (self.filename.length == 0) return [self missingParameterError:@"filename" forObjectRequest:@"Request"]; + + return nil; +} + #pragma mark - @end diff --git a/PubNub/Network/Requests/Publish/PNPublishRequest.h b/PubNub/Network/Requests/Publish/PNPublishRequest.h index ca2cb17d0..dc6f5bc59 100644 --- a/PubNub/Network/Requests/Publish/PNPublishRequest.h +++ b/PubNub/Network/Requests/Publish/PNPublishRequest.h @@ -5,45 +5,25 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief \c Publish \c message request. - * - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ +/// `Publish data` request. @interface PNPublishRequest : PNBasePublishRequest -#pragma mark - Information +#pragma mark - Properties -/** - * @brief Whether message should be replicated across the PubNub Real-Time Network and sent simultaneously to all subscribed - * clients on a channel. - */ -@property (nonatomic, assign, getter = shouldReplicate) BOOL replicate; +/// Whether message should be compressed before sending or not. +@property(assign, nonatomic, getter = shouldCompress) BOOL compress; -/** - * @brief Whether message should be compressed before sending or not. - */ -@property (nonatomic, assign, getter = shouldCompress) BOOL compress; +/// Dictionary with payloads for different vendors (Apple with "apns" key and Google with "gcm"). +@property(strong, nullable, nonatomic) NSDictionary *payloads; -/** - * @brief Dictionary with payloads for different vendors (Apple with "apns" key and Google with "gcm"). - */ -@property (nonatomic, nullable, strong) NSDictionary *payloads; +#pragma mark - Initialization and Configuration -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c publish \c message request. - * - * @param channel Name of channel to which message should be published. - * - * @return Configured and ready to use \c publish \c message request. - */ +/// Create `Publish data` request. +/// +/// - Parameter channel: Name of channel to which message should be published. +/// - Returns: Ready to use `publish message` request. + (instancetype)requestWithChannel:(NSString *)channel; #pragma mark - diff --git a/PubNub/Network/Requests/Publish/PNPublishRequest.m b/PubNub/Network/Requests/Publish/PNPublishRequest.m index cba73d452..b22861453 100644 --- a/PubNub/Network/Requests/Publish/PNPublishRequest.m +++ b/PubNub/Network/Requests/Publish/PNPublishRequest.m @@ -1,24 +1,33 @@ -/** - * @author Serhii Mamontov - * @version 4.15.0 - * @since 4.15.0 - * @copyright © 2010-2020 PubNub, Inc. - */ -#import "PNBasePublishRequest+Private.h" #import "PNPublishRequest.h" +#import "PNBasePublishRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" +#import "PNHelpers.h" -#pragma mark - Interface implementation +#pragma mark Interface implementation @implementation PNPublishRequest -#pragma mark - Information +#pragma mark - Properties - (PNOperationType)operation { return PNPublishOperation; } +- (BOOL)shouldCompressBody { + return self.shouldCompress; +} + +- (NSString *)path { + return PNStringFormat(@"/publish/%@/%@/0/%@/0/%@", + self.publishKey, + self.subscribeKey, + [PNString percentEscapedString:self.channel], + self.httpMethod == TransportPOSTMethod ? @"" : [PNString percentEscapedString:self.preparedMessage]); +} + #pragma mark - Initialization & Configuration diff --git a/PubNub/Network/Requests/Push Notifications/PNAddPushNotificationsRequest.h b/PubNub/Network/Requests/Push Notifications/PNAddPushNotificationsRequest.h deleted file mode 100644 index de115ee67..000000000 --- a/PubNub/Network/Requests/Push Notifications/PNAddPushNotificationsRequest.h +++ /dev/null @@ -1,32 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \c Add \c notifications \c for \c channels request. - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.12.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNAddPushNotificationsRequest : PNBasePushNotificationsRequest - - -#pragma mark - Information - -/** - * @brief List of channel names for which push notifications should be enabled. - */ -@property (nonatomic, copy) NSArray *channels; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Push Notifications/PNAddPushNotificationsRequest.m b/PubNub/Network/Requests/Push Notifications/PNAddPushNotificationsRequest.m deleted file mode 100644 index 3ea81019c..000000000 --- a/PubNub/Network/Requests/Push Notifications/PNAddPushNotificationsRequest.m +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.12.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNAddPushNotificationsRequest.h" -#import "PNRequest+Private.h" -#import "PNHelpers.h" - - -#pragma nark Interface implementation - -@implementation PNAddPushNotificationsRequest - - -#pragma mark - Information - -- (PNOperationType)operation { - return self.pushType == PNAPNS2Push ? PNAddPushNotificationsOnChannelsV2Operation - : PNAddPushNotificationsOnChannelsOperation; -} - -- (BOOL)returnsResponse { - return NO; -} - -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; - - if (self.channels.count == 0) { - self.parametersError = [self missingParameterError:@"channels" forObjectRequest:@"Request"]; - } - - if (self.parametersError) { - [parameters removePathComponentForPlaceholder:@"{token}"]; - - return parameters; - } - - [parameters addQueryParameter:[PNChannel namesForRequest:self.channels] forFieldName:@"add"]; - - return parameters; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Requests/Push Notifications/PNAuditPushNotificationsRequest.h b/PubNub/Network/Requests/Push Notifications/PNAuditPushNotificationsRequest.h deleted file mode 100644 index 68f239b9e..000000000 --- a/PubNub/Network/Requests/Push Notifications/PNAuditPushNotificationsRequest.h +++ /dev/null @@ -1,25 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \c Audit \c notifications \c enabled \c channels request. - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.12.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNAuditPushNotificationsRequest : PNBasePushNotificationsRequest - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Push Notifications/PNAuditPushNotificationsRequest.m b/PubNub/Network/Requests/Push Notifications/PNAuditPushNotificationsRequest.m deleted file mode 100644 index 02aaccff1..000000000 --- a/PubNub/Network/Requests/Push Notifications/PNAuditPushNotificationsRequest.m +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.12.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNAuditPushNotificationsRequest.h" -#import "PNRequest+Private.h" - - -#pragma nark Interface implementation - -@implementation PNAuditPushNotificationsRequest - - -#pragma mark - Information - -- (PNOperationType)operation { - return self.pushType == PNAPNS2Push ? PNPushNotificationEnabledChannelsV2Operation - : PNPushNotificationEnabledChannelsOperation; -} - -- (BOOL)returnsResponse { - return YES; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Requests/Push Notifications/PNBasePushNotificationsRequest+Private.h b/PubNub/Network/Requests/Push Notifications/PNBasePushNotificationsRequest+Private.h new file mode 100644 index 000000000..f05ca888f --- /dev/null +++ b/PubNub/Network/Requests/Push Notifications/PNBasePushNotificationsRequest+Private.h @@ -0,0 +1,29 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// General request for all `Push Notifications` API endpoints private extension. +@interface PNBasePushNotificationsRequest (Private) + + +#pragma mark - Initialization and Configuration + +/// Create general `Push notifications` API access request. +/// +/// - Parameters: +/// - pushToken: Device token / identifier which depending from passed `pushType` should be `NSData` (for +/// **PNAPNS2Push** and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `pushToken`. +/// - Returns: Ready to use `push notifications` API access request. ++ (instancetype)requestWithDevicePushToken:(id)pushToken pushType:(PNPushType)pushType; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Push Notifications/PNBasePushNotificationsRequest.h b/PubNub/Network/Requests/Push Notifications/PNBasePushNotificationsRequest.h index 79a1c7323..e0ef3d4e9 100644 --- a/PubNub/Network/Requests/Push Notifications/PNBasePushNotificationsRequest.h +++ b/PubNub/Network/Requests/Push Notifications/PNBasePushNotificationsRequest.h @@ -1,80 +1,46 @@ +#import #import -#import NS_ASSUME_NONNULL_BEGIN #pragma mark Interface declaration -/** - * @brief Base class for all 'Push Notifications' API endpoints which has shared query options. - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.12.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNBasePushNotificationsRequest : PNRequest - - -#pragma mark - Information - -/** - * @brief One of \b PNPushType fields which specify service to manage notifications for device - * specified with \c pushToken. - */ -@property (nonatomic, readonly, assign) PNPushType pushType; - -/** - * @brief One of \b PNAPNSEnvironment fields which specify environment within which device should - * manage list of channels with enabled notifications. - * - * @note This field works only if request initialized with \c pushType set to \b PNAPNS2Push - * (by default set to \b PNAPNSDevelopment). - */ -@property (nonatomic, assign) PNAPNSEnvironment environment; - -/** - * @brief Notifications topic name (usually it is application's bundle identifier). - * - * @note This field works only if request initialized with \c pushType set to \b PNAPNS2Push - * (by default set to \b NSBundle.mainBundle.bundleIdentifier). - */ -@property (nonatomic, nullable, copy) NSString *topic; - -/** - * @brief OS/library-provided device push token. - */ -@property (nonatomic, readonly, copy) id pushToken; - -/** - * @brief Arbitrary percent encoded query parameters which should be sent along with original API - * call. - */ -@property (nonatomic, nullable, strong) NSDictionary *arbitraryQueryParameters; - - -#pragma mark - Initialization & Configuration - -/** - * @brief Create and configure \c push \c notifications API access request. - * - * @param pushToken Device token / identifier which depending from passed \c pushType should be - * \a NSData (for \b PNAPNS2Push and \b PNAPNSPush) or \a NSString for other. - * @param pushType One of \b PNPushType fields which specify service to manage notifications for - * device specified with \c pushToken. - * - * @return Configured and ready to use \c push \c notifications API access request. - */ -+ (instancetype)requestWithDevicePushToken:(id)pushToken pushType:(PNPushType)pushType; - -/** - * @brief Forbids request initialization. - * - * @throws Interface not available exception and requirement to use provided constructor method. - * - * @return Initialized request. - */ +/// General request for all `Push Notifications` API endpoints. +@interface PNBasePushNotificationsRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// One of **PNPushType** fields which specify service to manage notifications for device specified with `pushToken`. +@property(assign, nonatomic, readonly) PNPushType pushType; + +/// One of **PNAPNSEnvironment** fields which specify environment within which device should manage list of channels +/// with enabled notifications. +/// +/// > Note: This field works only if request initialized with `pushType` set to **PNAPNS2Push** (by default set to +/// **PNAPNSDevelopment**). +@property(assign, nonatomic) PNAPNSEnvironment environment; + +/// Notifications topic name (usually it is application's bundle identifier). +/// +/// > Note: This field works only if request initialized with `pushType` set to **PNAPNS2Push** (by default set to +/// **NSBundle.mainBundle.bundleIdentifier**). +@property(copy, nullable, nonatomic) NSString *topic; + +/// OS/library-provided device push token. +@property(copy, nonatomic, readonly) id pushToken; + + +#pragma mark - Initialization and Configuration + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. - (instancetype)init NS_UNAVAILABLE; #pragma mark - diff --git a/PubNub/Network/Requests/Push Notifications/PNBasePushNotificationsRequest.m b/PubNub/Network/Requests/Push Notifications/PNBasePushNotificationsRequest.m index 8ad9a1f3c..876462795 100644 --- a/PubNub/Network/Requests/Push Notifications/PNBasePushNotificationsRequest.m +++ b/PubNub/Network/Requests/Push Notifications/PNBasePushNotificationsRequest.m @@ -1,48 +1,40 @@ -/** - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.12.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNBasePushNotificationsRequest.h" -#import "PNRequest+Private.h" -#import "PNErrorCodes.h" +#import "PNBasePushNotificationsRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" #import "PNHelpers.h" +#import "PNError.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark Protected interface declaration +#pragma mark Private interface declaration +/// General request for all `Push Notifications` API endpoints private extension. @interface PNBasePushNotificationsRequest () -#pragma mark - Information +#pragma mark - Properties -/** - * @brief OS/library-provided device push token. - */ -@property (nonatomic, copy) id pushToken; +/// Normalized OS / library-provided device push token. +@property(copy, nonatomic) NSString *preparedPushToken; -/** - * @brief One of \b PNPushType fields which specify provider to manage notifications for device - * specified with \c pushToken. - */ -@property (nonatomic, assign) PNPushType pushType; +/// One of **PNPushType** fields which specify provider to manage notifications for device specified with `pushToken`. +@property(assign, nonatomic) PNPushType pushType; +/// OS / library-provided device push token. +@property(copy, nonatomic) id pushToken; -#pragma mark - Initialization & Configuration -/** - * @brief Initialize \c push \c notifications API access request. - * - * @param pushToken Depending from passed \c pushType should be \a NSData (for \b PNAPNS2Push and - * \b PNAPNSPush) or \a NSString for other. - * @param pushType One of \b PNPushType fields which specify spervide to manage notifications for - * device specified with \c pushToken. - * - * @return Initialized and ready to use \c push \c notifications API access request. - */ +#pragma mark - Initialization and Configuration + +/// Initialize general `Push notifications` API access request. +/// +/// - Parameters: +/// - pushToken: Device token / identifier which depending from passed `pushType` should be `NSData` (for +/// **PNAPNS2Push** and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `pushToken`. +/// - Returns: Initialized `push notifications` API access request. - (instancetype)initWithDevicePushToken:(id)pushToken pushType:(PNPushType)pushType; #pragma mark - @@ -58,40 +50,43 @@ - (instancetype)initWithDevicePushToken:(id)pushToken pushType:(PNPushType)pushT @implementation PNBasePushNotificationsRequest -#pragma mark - Information +#pragma mark - Properties -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; +- (NSString *)path { + NSString *path = PNStringFormat(@"/%@/push/sub-key/%@/devices%@/%@", + self.pushType != PNAPNS2Push ? @"v1" : @"v2", + self.subscribeKey, + self.pushType != PNAPNS2Push ? @"" : @"-apns2", + self.preparedPushToken); - if (self.parametersError) { - return parameters; + if (self.operation == PNRemoveAllPushNotificationsOperation || + self.operation == PNRemoveAllPushNotificationsV2Operation) { + return [path stringByAppendingString:@"/remove"]; } - NSString *token = self.pushToken; + return path; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [NSMutableDictionary new]; NSString *tokenType = @"apns"; - if (self.pushType == PNAPNSPush || self.pushType == PNAPNS2Push) { - token = [PNData HEXFromDevicePushToken:self.pushToken].lowercaseString; - } - - if (self.pushType == PNFCMPush) { - tokenType = @"gcm"; - } else if (self.pushType == PNMPNSPush) { - tokenType = @"mpns"; - } + if (self.pushType == PNFCMPush) tokenType = @"gcm"; + else if (self.pushType == PNMPNSPush) tokenType = @"mpns"; if (self.pushType == PNAPNS2Push) { NSString *environment = self.environment == PNAPNSDevelopment ? @"development" : @"production"; NSString *topic = self.topic.length ? self.topic : NSBundle.mainBundle.bundleIdentifier; - [parameters addQueryParameter:environment forFieldName:@"environment"]; - [parameters addQueryParameter:topic forFieldName:@"topic"]; + query[@"environment"] = environment; + query[@"topic"] = topic; } - [parameters addPathComponent:[PNString percentEscapedString:token] forPlaceholder:@"{token}"]; - [parameters addQueryParameter:tokenType forFieldName:@"type"]; + query[@"type"] = tokenType; + + if (self.arbitraryQueryParameters.count) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; - return parameters; + return query; } @@ -103,47 +98,12 @@ + (instancetype)requestWithDevicePushToken:(id)pushToken pushType:(PNPushType)pu - (instancetype)initWithDevicePushToken:(id)pushToken pushType:(PNPushType)pushType { if ((self = [super init])) { + if ([pushToken isKindOfClass:[NSData class]] && (pushType == PNAPNSPush || pushType == PNAPNS2Push)) { + _preparedPushToken = [PNData HEXFromDevicePushToken:pushToken].lowercaseString; + } else _preparedPushToken = [pushToken copy]; + _pushToken = [pushToken copy]; _pushType = pushType; - - NSDictionary *errorInformation = nil; - - if (!pushToken || - ([pushToken isKindOfClass:[NSData class]] && !((NSData *)pushToken).length) || - ([pushToken isKindOfClass:[NSString class]] && !((NSString *)pushToken).length)) { - - errorInformation = @{ - NSLocalizedDescriptionKey: @"Push Notifications API access request configuration error", - NSLocalizedFailureReasonErrorKey: @"Device token / identifier is missing or empty" - }; - } else if ((pushType == PNAPNSPush || pushType == PNAPNS2Push) && - ![pushToken isKindOfClass:[NSData class]]) { - NSString *serviceName = pushType == PNAPNSPush ? @"APNS" : @"APNS over HTTP/2"; - - errorInformation = @{ - NSLocalizedDescriptionKey: @"Push Notifications API access request configuration error", - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"%@ expects device " - "token / identifier to be instance of NSData, " - "but got: %@", - serviceName, - NSStringFromClass([pushToken class])] - }; - } else if (pushType != PNAPNSPush && pushType != PNAPNS2Push && - ![pushToken isKindOfClass:[NSString class]]) { - errorInformation = @{ - NSLocalizedDescriptionKey: @"Push Notifications API access request configuration error", - NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"FCM / GCM / MPNS expects " - "device token / identifier to be instance of " - "NSString, but got: %@", - NSStringFromClass([pushToken class])] - }; - } - - if (errorInformation) { - self.parametersError = [NSError errorWithDomain:kPNAPIErrorDomain - code:kPNAPIUnacceptableParameters - userInfo:errorInformation]; - } } return self; @@ -155,6 +115,50 @@ - (instancetype)init { return nil; } + +#pragma mark - Prepare + +- (PNError *)validate { + NSDictionary *userInfo = nil; + + if (!self.pushToken || + ([self.pushToken isKindOfClass:[NSData class]] && !((NSData *)self.pushToken).length) || + ([self.pushToken isKindOfClass:[NSString class]] && !((NSString *)self.pushToken).length)) { + + userInfo = @{ + NSLocalizedDescriptionKey: @"Push Notifications API access request configuration error", + NSLocalizedFailureReasonErrorKey: @"Device token / identifier is missing or empty" + }; + } else if ((self.pushType == PNAPNSPush || self.pushType == PNAPNS2Push) && + ![self.pushToken isKindOfClass:[NSData class]]) { + NSString *serviceName = self.pushType == PNAPNSPush ? @"APNS" : @"APNS over HTTP/2"; + + userInfo = @{ + NSLocalizedDescriptionKey: @"Push Notifications API access request configuration error", + NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"%@ expects device " + "token / identifier to be instance of NSData, " + "but got: %@", + serviceName, + NSStringFromClass([self.pushToken class])] + }; + } else if (self.pushType != PNAPNSPush && self.pushType != PNAPNS2Push && + ![self.pushToken isKindOfClass:[NSString class]]) { + userInfo = @{ + NSLocalizedDescriptionKey: @"Push Notifications API access request configuration error", + NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"FCM / GCM / MPNS expects " + "device token / identifier to be instance of " + "NSString, but got: %@", + NSStringFromClass([self.pushToken class])] + }; + } + + if (userInfo) { + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } + + return nil; +} + #pragma mark - diff --git a/PubNub/Network/Requests/Push Notifications/PNPushNotificationFetchRequest.h b/PubNub/Network/Requests/Push Notifications/PNPushNotificationFetchRequest.h new file mode 100644 index 000000000..c093db47b --- /dev/null +++ b/PubNub/Network/Requests/Push Notifications/PNPushNotificationFetchRequest.h @@ -0,0 +1,17 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `List` notification enabled channels` request. +@interface PNPushNotificationFetchRequest : PNBasePushNotificationsRequest + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Push Notifications/PNPushNotificationFetchRequest.m b/PubNub/Network/Requests/Push Notifications/PNPushNotificationFetchRequest.m new file mode 100644 index 000000000..8b5468cb8 --- /dev/null +++ b/PubNub/Network/Requests/Push Notifications/PNPushNotificationFetchRequest.m @@ -0,0 +1,21 @@ +#import "PNPushNotificationFetchRequest.h" +#import "PNBaseRequest+Private.h" +#import "PNFunctions.h" + + +#pragma nark Interface implementation + +@implementation PNPushNotificationFetchRequest + + +#pragma mark - Properties + +- (PNOperationType)operation { + return self.pushType == PNAPNS2Push ? PNPushNotificationEnabledChannelsV2Operation + : PNPushNotificationEnabledChannelsOperation; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Push Notifications/PNPushNotificationManageRequest.h b/PubNub/Network/Requests/Push Notifications/PNPushNotificationManageRequest.h new file mode 100644 index 000000000..fdea8223f --- /dev/null +++ b/PubNub/Network/Requests/Push Notifications/PNPushNotificationManageRequest.h @@ -0,0 +1,61 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Iinterface declaration + +/// `Push Notifications Manage` request. +@interface PNPushNotificationManageRequest : PNBasePushNotificationsRequest + + +#pragma mark - Properties + +/// List of channel names for which push notifications should be managed. +@property(strong, nullable, nonatomic, readonly) NSArray *channels; + + +#pragma mark - Initialization and Configuration + +/// Create `Add notifications for channels` request. +/// +/// - Parameters: +/// - channels: List of channel names for which push notifications should be enabled. +/// - token: Device token / identifier which depending from passed `pushType` should be `NSData` (for **PNAPNS2Push** +/// and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `token`. +/// - Returns: Ready to use `add notifications for channels` request. ++ (instancetype)requestToAddChannels:(NSArray *)channels + toDeviceWithToken:(id)token + pushType:(PNPushType)pushType; + +/// Create `Remove notifications for channels` request. +/// +/// - Parameters: +/// - channels: List of channel names for which push notifications should be disabled. +/// - token: Device token / identifier which depending from passed `pushType` should be `NSData` (for **PNAPNS2Push** +/// and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `token`. +/// - Returns: Ready to use `remove notifications for channels` request. ++ (instancetype)requestToRemoveChannels:(NSArray *)channels + fromDeviceWithToken:(id)token + pushType:(PNPushType)pushType; + +/// Create `Remove device notifications` request. +/// +/// - Parameters: +/// - token: Device token / identifier which depending from passed `pushType` should be `NSData` (for **PNAPNS2Push** +/// and **PNAPNSPush**) or `NSString` for other. +/// - pushType: One of **PNPushType** fields which specify service to manage notifications for device specified with +/// `token`. +/// - Returns: Ready to use `remove device notifications` request. ++ (instancetype)requestToRemoveDeviceWithToken:(id)token pushType:(PNPushType)pushType; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Push Notifications/PNPushNotificationManageRequest.m b/PubNub/Network/Requests/Push Notifications/PNPushNotificationManageRequest.m new file mode 100644 index 000000000..edf8e2858 --- /dev/null +++ b/PubNub/Network/Requests/Push Notifications/PNPushNotificationManageRequest.m @@ -0,0 +1,119 @@ +#import "PNPushNotificationManageRequest.h" +#import "PNBasePushNotificationsRequest+Private.h" +#import "PNBaseRequest+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Push Notifications Manage` request private extension. +@interface PNPushNotificationManageRequest () + + +#pragma mark - Properties + +/// List of channel names for which push notifications should be managed. +@property(strong, nullable, nonatomic) NSArray *channels; + +/// Type of request operation. +/// +/// One of PubNub REST API endpoints or third-party endpoint. +@property (assign, nonatomic) PNOperationType operation; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNPushNotificationManageRequest + + +#pragma mark - Properties + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + PNOperationType operation = self.operation; + NSString *manageType; + + if (operation == PNAddPushNotificationsOnChannelsOperation || + operation == PNAddPushNotificationsOnChannelsV2Operation) { + manageType = @"add"; + } else if (operation == PNRemovePushNotificationsFromChannelsOperation || + operation == PNRemovePushNotificationsFromChannelsV2Operation) { + manageType = @"remove"; + } + + if (manageType) query[manageType] = [self.channels componentsJoinedByString:@","]; + + return query; +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestToAddChannels:(NSArray *)channels + toDeviceWithToken:(id)token + pushType:(PNPushType)pushType { + PNPushNotificationManageRequest *request = [self requestWithDevicePushToken:token pushType:pushType]; + request.channels = channels; + + if (pushType == PNAPNS2Push) request.operation = PNAddPushNotificationsOnChannelsV2Operation; + else request.operation = PNAddPushNotificationsOnChannelsOperation; + + return request; +} + + ++ (instancetype)requestToRemoveChannels:(NSArray *)channels + fromDeviceWithToken:(id)token + pushType:(PNPushType)pushType { + PNPushNotificationManageRequest *request = [self requestWithDevicePushToken:token pushType:pushType]; + request.channels = channels; + + if (pushType == PNAPNS2Push) request.operation = PNRemovePushNotificationsFromChannelsV2Operation; + else request.operation = PNRemovePushNotificationsFromChannelsOperation; + + return request; +} + ++ (instancetype)requestToRemoveDeviceWithToken:(id)token pushType:(PNPushType)pushType { + PNPushNotificationManageRequest *request = [self requestWithDevicePushToken:token pushType:pushType]; + + if (pushType == PNAPNS2Push) request.operation = PNRemoveAllPushNotificationsV2Operation; + else request.operation = PNRemoveAllPushNotificationsOperation; + + + return request; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + PNError *error = [super validate]; + if (error) return error; + + PNOperationType operation = self.operation; + + if (self.channels.count == 0 && + (operation != PNRemoveAllPushNotificationsOperation && operation != PNRemoveAllPushNotificationsV2Operation)) { + return [self missingParameterError:@"channels" forObjectRequest:@"Request"]; + } + + if (self.pushType == PNAPNS2Push && self.topic.length == 0) { + return [self missingParameterError:@"topic" forObjectRequest:@"Request"]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Push Notifications/PNRemoveAllPushNotificationsRequest.h b/PubNub/Network/Requests/Push Notifications/PNRemoveAllPushNotificationsRequest.h deleted file mode 100644 index 136dbf490..000000000 --- a/PubNub/Network/Requests/Push Notifications/PNRemoveAllPushNotificationsRequest.h +++ /dev/null @@ -1,25 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \c Remove \c all \c notifications request. - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.12.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNRemoveAllPushNotificationsRequest : PNBasePushNotificationsRequest - - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Push Notifications/PNRemoveAllPushNotificationsRequest.m b/PubNub/Network/Requests/Push Notifications/PNRemoveAllPushNotificationsRequest.m deleted file mode 100644 index 33820f2cd..000000000 --- a/PubNub/Network/Requests/Push Notifications/PNRemoveAllPushNotificationsRequest.m +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.12.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNRemoveAllPushNotificationsRequest.h" -#import "PNRequest+Private.h" - - -#pragma nark Interface implementation - -@implementation PNRemoveAllPushNotificationsRequest - - -#pragma mark - Information - -- (PNOperationType)operation { - return self.pushType == PNAPNS2Push ? PNRemoveAllPushNotificationsV2Operation - : PNRemoveAllPushNotificationsOperation; -} - -- (BOOL)returnsResponse { - return NO; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Requests/Push Notifications/PNRemovePushNotificationsRequest.h b/PubNub/Network/Requests/Push Notifications/PNRemovePushNotificationsRequest.h deleted file mode 100644 index bd125d3ae..000000000 --- a/PubNub/Network/Requests/Push Notifications/PNRemovePushNotificationsRequest.h +++ /dev/null @@ -1,32 +0,0 @@ -#import -#import - - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark Interface declaration - -/** - * @brief \c Remove \c notifications \c from \c channels request. - * - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.12.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -@interface PNRemovePushNotificationsRequest : PNBasePushNotificationsRequest - - -#pragma mark - Information - -/** - * @brief List of channel names for which push notifications should be disabled. - */ -@property (nonatomic, copy) NSArray *channels; - -#pragma mark - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Push Notifications/PNRemovePushNotificationsRequest.m b/PubNub/Network/Requests/Push Notifications/PNRemovePushNotificationsRequest.m deleted file mode 100644 index e8257a8e9..000000000 --- a/PubNub/Network/Requests/Push Notifications/PNRemovePushNotificationsRequest.m +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @author Serhii Mamontov - * @version 4.12.0 - * @since 4.12.0 - * @copyright © 2010-2019 PubNub, Inc. - */ -#import "PNRemovePushNotificationsRequest.h" -#import "PNRequest+Private.h" -#import "PNHelpers.h" - - -#pragma nark Interface implementation - -@implementation PNRemovePushNotificationsRequest - - -#pragma mark - Information - -- (PNOperationType)operation { - return self.pushType == PNAPNS2Push ? PNRemovePushNotificationsFromChannelsV2Operation - : PNRemovePushNotificationsFromChannelsOperation; -} - -- (BOOL)returnsResponse { - return NO; -} - -- (PNRequestParameters *)requestParameters { - PNRequestParameters *parameters = [super requestParameters]; - - if (self.channels.count == 0) { - self.parametersError = [self missingParameterError:@"channels" forObjectRequest:@"Request"]; - } - - if (self.parametersError) { - [parameters removePathComponentForPlaceholder:@"{token}"]; - - return parameters; - } - - [parameters addQueryParameter:[PNChannel namesForRequest:self.channels] forFieldName:@"remove"]; - - return parameters; -} - -#pragma mark - - - -@end diff --git a/PubNub/Network/Requests/Signal/PNSignalRequest.h b/PubNub/Network/Requests/Signal/PNSignalRequest.h new file mode 100644 index 000000000..ca15ea52e --- /dev/null +++ b/PubNub/Network/Requests/Signal/PNSignalRequest.h @@ -0,0 +1,44 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface implementation + +/// `Signal data` request. +/// +/// `Signal` is small chunk of data which can be sent by sensors to update their status. +@interface PNSignalRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// Name of channel to which signal should be send. +@property(copy, nonatomic, readonly) NSString *channel; + + +#pragma mark - Initialization and Configuration + +/// Create `Signal data` request. +/// +/// - Parameters: +/// - channel: Name of channel to which signal should be sent. +/// - signalData: Signal payload data. +/// - Returns: Ready to use `signal data` request. ++ (instancetype)requestWithChannel:(NSString *)channel signal:(id)signalData; + +/// Forbids request initialization. +/// +/// - Throws: Interface not available exception and requirement to use provided constructor method. +/// - Returns: Initialized request. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Signal/PNSignalRequest.m b/PubNub/Network/Requests/Signal/PNSignalRequest.m new file mode 100644 index 000000000..9c52a54ec --- /dev/null +++ b/PubNub/Network/Requests/Signal/PNSignalRequest.m @@ -0,0 +1,119 @@ +#import "PNSignalRequest.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Signal data` request private extension. +@interface PNSignalRequest () + + +#pragma mark - Properties + +/// Data which has been prepared for signal. +@property(strong, nullable, nonatomic) NSString *preparedMessage; + +/// Message which will be published. +/// +/// Provided object will be serialized into JSON (`NSString`, `NSNumber`, `NSArray`, `NSDictionary`) string before +/// pushing to the **PubNub** network. If client has been configured with cipher key message will be encrypted as well. +@property(strong, nullable, nonatomic) id message; + +/// Name of channel to which message should be published. +@property(copy, nonatomic) NSString *channel; + + +#pragma mark - Initialization and Configuration + +/// Initialize `Signal data` request. +/// +/// - Parameters: +/// - channel: Name of channel to which signal should be sent. +/// - signalData: Signal payload data. +/// - Returns: Initializded `signal data` request. +- (instancetype)initWithChannel:(NSString *)channel signal:(id)signalData; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNSignalRequest + + +#pragma mark - Properties + +- (PNOperationType)operation { + return PNSignalOperation; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [NSMutableDictionary new]; + + if (self.arbitraryQueryParameters.count) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query.count ? query : nil; +} + +- (NSString *)path { + return PNStringFormat(@"/signal/%@/%@/0/%@/0/%@", + self.publishKey, + self.subscribeKey, + [PNString percentEscapedString:self.channel], + [PNString percentEscapedString:self.preparedMessage]); +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)requestWithChannel:(NSString *)channel signal:(id)signalData { + return [[self alloc] initWithChannel:channel signal:signalData]; +} + +- (instancetype)initWithChannel:(NSString *)channel signal:(id)signalData { + if ((self = [super init])) { + _channel = [channel copy]; + _message = signalData; + } + + return self; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + PNError *error = nil; + NSString *messageForPublish = [PNJSON JSONStringFrom:self.message withError:&error]; + + if (!error && messageForPublish.length == 0) { + return [self missingParameterError:@"message" forObjectRequest:@"Request"]; + } else if (error) { + NSDictionary *userInfo = PNErrorUserInfo( + @"Request parameters error", + @"Message serialization did fail", + @"Ensure that only JSON-compatible values used in 'message'.", + error + ); + + return [PNError errorWithDomain:PNAPIErrorDomain code:PNAPIErrorUnacceptableParameters userInfo:userInfo]; + } + + self.preparedMessage = messageForPublish; + + return nil; +} + +#pragma mark - + +@end diff --git a/PubNub/Network/Requests/Subscribe/PNSubscribeRequest+Private.h b/PubNub/Network/Requests/Subscribe/PNSubscribeRequest+Private.h new file mode 100644 index 000000000..76dea16b2 --- /dev/null +++ b/PubNub/Network/Requests/Subscribe/PNSubscribeRequest+Private.h @@ -0,0 +1,29 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private extension declaration + +/// `Subscribe` request private extension. +@interface PNSubscribeRequest (Private) + + +#pragma mark - Properties + +/// String representation of filtering expression which should be applied to decide which updates should reach client. +@property(strong, nullable, nonatomic) NSString *filterExpression; + +/// Number of seconds which is used by server to track whether client still subscribed on remote data objects live feed +/// or not. +@property(assign, nonatomic) NSInteger presenceHeartbeatValue; + +/// Whether real-time updates should be received for both regular and presence events or only for presence. +@property(assign, nonatomic, readonly) BOOL presenceOnly; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Subscribe/PNSubscribeRequest.h b/PubNub/Network/Requests/Subscribe/PNSubscribeRequest.h new file mode 100644 index 000000000..7273108ed --- /dev/null +++ b/PubNub/Network/Requests/Subscribe/PNSubscribeRequest.h @@ -0,0 +1,66 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Subscribe` request. +@interface PNSubscribeRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Whether presence observation should be enabled for `channels` and `channelGroups` or not. +@property(assign, nonatomic, getter = shouldObservePresence) BOOL observePresence; + +/// List of channel group names on which client should try to subscribe. +@property(copy, nullable, nonatomic, readonly) NSArray *channelGroups; + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +/// List of channel names on which client should try to subscribe. +@property(copy, nullable, nonatomic, readonly) NSArray *channels; + +/// `NSDictionary` with key-value pairs based on channel / group names and value which should be associated to it. +@property(copy, nullable, nonatomic) NSDictionary *state; + +/// Time from which client should try to catch up on messages. +@property(copy, nullable, nonatomic) NSNumber *timetoken; + +/// ///Stores reference on **PubNub** server region identifier (which generated `timetoken` value). +@property(copy, nullable, nonatomic) NSNumber *region; + + +#pragma mark - Initialization and Configuration + +/// Create `Subscribe` request. +/// +/// - Parameters: +/// - channels: List of channel names on which client should try to subscribe. +/// - channelGroups: List of channel group names on which client should try to subscribe. +/// - Returns: Ready to use `Subscribe` request. ++ (instancetype)requestWithChannels:(nullable NSArray *)channels + channelGroups:(nullable NSArray *)channelGroups; + +/// Create `Subscribe` request. +/// +/// - Parameters: +/// - channels: List of channel names from which client should try to listen for presence updates. +/// - channelGroups: List of channel group names from which client should try to listen for presence updates. +/// - Returns: Ready to use `Subscribe` request. ++ (instancetype)requestWithPresenceChannels:(nullable NSArray *)channels + channelGroups:(nullable NSArray *)channelGroups; + +/// Forbids request initialization. +/// +/// - Returns: Initialized request. +/// - Throws: Interface not available exception and requirement to use provided constructor method. +- (instancetype)init NS_UNAVAILABLE; + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Subscribe/PNSubscribeRequest.m b/PubNub/Network/Requests/Subscribe/PNSubscribeRequest.m new file mode 100644 index 000000000..b8fdc7ee0 --- /dev/null +++ b/PubNub/Network/Requests/Subscribe/PNSubscribeRequest.m @@ -0,0 +1,160 @@ +#import "PNSubscribeRequest+Private.h" +#import "PNBaseRequest+Private.h" +#import "PNTransportRequest.h" +#import "PNFunctions.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private extension declaration + +/// `Subscribe` request private extension. +@interface PNSubscribeRequest () + + +#pragma mark - Properties + +/// List of channel group names on which client should try to subscribe. +@property(copy, nullable, nonatomic) NSArray *channelGroups; + +/// List of channel names on which client should try to subscribe. +@property(copy, nullable, nonatomic) NSArray *channels; + +/// String representation of filtering expression which should be applied to decide which updates should reach client. +@property(strong, nullable, nonatomic) NSString *filterExpression; + +/// Number of seconds which is used by server to track whether client still subscribed on remote data objects live feed +/// or not. +@property(assign, nonatomic) NSInteger presenceHeartbeatValue; + +/// Whether real-time updates should be received for both regular and presence events or only for presence. +@property(assign, nonatomic) BOOL presenceOnly; + + +#pragma mark - Initialization and Configuratioun + +/// Initialize `Subscribe` request. +/// +/// - Parameters: +/// - channels: List of channel names on which client should try to subscribe. +/// - channelGroups: List of channel group names on which client should try to subscribe. +/// - presenceOnly: hether real-time updates should be received for both regular and presence events or only for +/// presence. +/// - Returns: Initialized `Subscribe` request. +- (instancetype)initWithChannels:(nullable NSArray *)channels + channelGroups:(nullable NSArray *)channelGroups + presenceOnly:(BOOL)presenceOnly; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + + +#pragma mark - Interface implementation + +@implementation PNSubscribeRequest + + +#pragma mark - Properties + +- (PNTransportRequest *)request { + PNTransportRequest *request = super.request; + request.cancellable = YES; + request.retriable = NO; + + return request; +} + +- (PNOperationType)operation { + return PNSubscribeOperation; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + + if (self.channelGroups.count) query[@"channel-group"] = [self.channelGroups componentsJoinedByString:@","]; + if (self.state.count) query[@"state"] = [PNJSON JSONStringFrom:self.state withError:nil]; + if (self.filterExpression.length) query[@"filter-expr"] = self.filterExpression; + if (self.presenceHeartbeatValue > 0) query[@"heartbeat"] = @(self.presenceHeartbeatValue).stringValue; + if (self.timetoken) query[@"tt"] = self.timetoken.stringValue; + if (self.region) query[@"tr"] = self.region.stringValue; + + return query; +} + +- (NSString *)path { + return PNStringFormat(@"/v2/subscribe/%@/%@/0", + self.subscribeKey, + [PNChannel namesForRequest:self.channels defaultString:@","]); +} + + +#pragma mark - Initialization and Configurtion + ++ (instancetype)requestWithChannels:(NSArray *)channels channelGroups:(NSArray *)channelGroups { + return [[self alloc] initWithChannels:channels channelGroups:channelGroups presenceOnly:NO]; +} + ++ (instancetype)requestWithPresenceChannels:(NSArray *)channels + channelGroups:(NSArray *)channelGroups { + NSMutableArray *presenceChannelGroups = nil; + NSMutableArray *presenceChannels = nil; + + if (channels.count) { + presenceChannels = [NSMutableArray arrayWithCapacity:channels.count]; + for(NSString *name in channels) { + if ([name hasSuffix:@"-pnpres"]) [presenceChannels addObject:name]; + else [presenceChannels addObject:[name stringByAppendingString:@"-pnpres"]]; + } + } + + if (channelGroups.count) { + presenceChannelGroups = [NSMutableArray arrayWithCapacity:channelGroups.count]; + for(NSString *name in channelGroups) { + if ([name hasSuffix:@"-pnpres"]) [presenceChannelGroups addObject:name]; + else [presenceChannelGroups addObject:[name stringByAppendingString:@"-pnpres"]]; + } + } + + return [[self alloc] initWithChannels:presenceChannels channelGroups:presenceChannelGroups presenceOnly:YES]; +} + +- (instancetype)initWithChannels:(NSArray *)channels + channelGroups:(NSArray *)channelGroups + presenceOnly:(BOOL)presenceOnly { + if ((self = [super init])) { + _channelGroups = [channelGroups copy]; + _observePresence = presenceOnly; + _presenceOnly = presenceOnly; + _channels = [channels copy]; + } + + return self; +} + +- (instancetype)init { + [self throwUnavailableInitInterface]; + + return nil; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + if (self.channels.count == 0 && self.channelGroups.count == 0) { + return [self missingParameterError:@"channels" forObjectRequest:@"Subscribe request"]; + } + + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Requests/Time/PNTimeRequest.h b/PubNub/Network/Requests/Time/PNTimeRequest.h new file mode 100644 index 000000000..22e43995a --- /dev/null +++ b/PubNub/Network/Requests/Time/PNTimeRequest.h @@ -0,0 +1,23 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + + +#pragma mark Interface implementation + +/// `PubNub high-precision time` request. +@interface PNTimeRequest : PNBaseRequest + + +#pragma mark - Properties + +/// Arbitrary percent encoded query parameters which should be sent along with original API call. +@property(strong, nullable, nonatomic) NSDictionary *arbitraryQueryParameters; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Requests/Time/PNTimeRequest.m b/PubNub/Network/Requests/Time/PNTimeRequest.m new file mode 100644 index 000000000..d088bb4c9 --- /dev/null +++ b/PubNub/Network/Requests/Time/PNTimeRequest.m @@ -0,0 +1,38 @@ +#import "PNTimeRequest.h" +#import "PNBaseRequest+Private.h" + + +#pragma mark Interface implementation + +@implementation PNTimeRequest + + +#pragma mark - Parameters + +- (PNOperationType)operation { + return PNTimeOperation; +} + +- (NSDictionary *)query { + NSMutableDictionary *query = [([super query] ?: @{}) mutableCopy]; + + if (self.arbitraryQueryParameters.count) [query addEntriesFromDictionary:self.arbitraryQueryParameters]; + + return query.count ? query : nil; +} + +- (NSString *)path { + return @"/time/0"; +} + + +#pragma mark - Prepare + +- (PNError *)validate { + return nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/App Context/PNChannelMembersFetchData.h b/PubNub/Network/Responses/App Context/PNChannelMembersFetchData.h new file mode 100644 index 000000000..759d2a00c --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNChannelMembersFetchData.h @@ -0,0 +1,28 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch channel members` request response. +@interface PNChannelMembersFetchData : PNPagedAppContextData + + +#pragma mark - Properties + +/// List of fetched `members`. +@property(strong, nonatomic, readonly) NSArray *members; + +/// Total number of `members` in `channel`'s members list. +/// +/// > Note: Value will be `0` in case if `includeCount` of ``PubNub/PNFetchChannelMembersRequest`` is set to `NO`. +@property(assign, nonatomic, readonly) NSUInteger totalCount; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/App Context/PNChannelMembersFetchData.m b/PubNub/Network/Responses/App Context/PNChannelMembersFetchData.m new file mode 100644 index 000000000..12d72dcb7 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNChannelMembersFetchData.m @@ -0,0 +1,27 @@ +#import "PNChannelMembersFetchData.h" +#import "PNPagedAppContextData+Private.h" + + +#pragma mark Interface implementation + +@implementation PNChannelMembersFetchData + + +#pragma mark - Properties + ++ (Class)appContextObjectClass { + return [PNChannelMember class]; +} + +- (NSArray *)members { + return (NSArray *)self.objects; +} + +- (NSUInteger)totalCount { + return super.totalCount; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/App Context/PNChannelMembersManageData.h b/PubNub/Network/Responses/App Context/PNChannelMembersManageData.h new file mode 100644 index 000000000..676b380db --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNChannelMembersManageData.h @@ -0,0 +1,30 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Channel members manage` request response. +@interface PNChannelMembersManageData : PNPagedAppContextData + + +#pragma mark - Properties + +/// List of existing `members`. +@property(strong, nonatomic, readonly) NSArray *members; + +/// Total number of existing objects. +/// +/// > Note: Value will be `0` in case if ``PNChannelMemberFields/PNChannelMembersTotalCountField`` not added to +/// `includeFields` of: ``PubNub/PNSetChannelMembersRequest``, ``PubNub/PNRemoveChannelMembersRequest``, +/// ``PubNub/PNManageChannelMembersRequest`` or ``PNFetchChannelMembersRequest``. +@property(assign, nonatomic, readonly) NSUInteger totalCount; + + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/App Context/PNChannelMembersManageData.m b/PubNub/Network/Responses/App Context/PNChannelMembersManageData.m new file mode 100644 index 000000000..d0ef35c3c --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNChannelMembersManageData.m @@ -0,0 +1,27 @@ +#import "PNChannelMembersManageData.h" +#import "PNPagedAppContextData+Private.h" + + +#pragma mark Interface implementation + +@implementation PNChannelMembersManageData + + +#pragma mark - Properties + ++ (Class)appContextObjectClass { + return [PNChannelMember class]; +} + +- (NSArray *)members { + return (NSArray *)self.objects; +} + +- (NSUInteger)totalCount { + return super.totalCount; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/App Context/PNChannelMetadataFetchAllData.h b/PubNub/Network/Responses/App Context/PNChannelMetadataFetchAllData.h new file mode 100644 index 000000000..1ff19bfcb --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNChannelMetadataFetchAllData.h @@ -0,0 +1,29 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch all channels` request response. +@interface PNChannelMetadataFetchAllData : PNPagedAppContextData + + +#pragma mark - Properties + +/// List of `channels metadata` objects created for current subscribe key. +@property(strong, nonatomic, readonly) NSArray *metadata; + +/// Total number of objects created for current subscribe key. +/// +/// > Note: Value will be `0` in case if ``PNChannelFields/PNChannelTotalCountField`` not added to `includeFields` of +/// ``PubNub/PNFetchAllChannelsMetadataRequest``. +@property(assign, nonatomic, readonly) NSUInteger totalCount; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/App Context/PNChannelMetadataFetchAllData.m b/PubNub/Network/Responses/App Context/PNChannelMetadataFetchAllData.m new file mode 100644 index 000000000..a1410f5f7 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNChannelMetadataFetchAllData.m @@ -0,0 +1,28 @@ +#import "PNChannelMetadataFetchAllData.h" +#import "PNPagedAppContextData+Private.h" + + +#pragma mark Interface implementation + +@implementation PNChannelMetadataFetchAllData + + +#pragma mark - Properties + ++ (Class)appContextObjectClass { + return [PNChannelMetadata class]; +} + +- (NSArray *)metadata { + return (NSArray *)self.objects; +} + +- (NSUInteger)totalCount { + return super.totalCount; +} + +#pragma mark - + + +@end + diff --git a/PubNub/Network/Responses/App Context/PNChannelMetadataFetchData.h b/PubNub/Network/Responses/App Context/PNChannelMetadataFetchData.h new file mode 100644 index 000000000..e6fec843a --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNChannelMetadataFetchData.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interfaces declaration + +/// `Fetch channel metadata` request response. +@interface PNChannelMetadataFetchData : PNBaseOperationData + + +#pragma mark - Properties + +/// `Fetch channel metadata` request processed information. +@property(strong, nonatomic, readonly) PNChannelMetadata *metadata; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/App Context/PNChannelMetadataFetchData.m b/PubNub/Network/Responses/App Context/PNChannelMetadataFetchData.m new file mode 100644 index 000000000..ebc64273e --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNChannelMetadataFetchData.m @@ -0,0 +1,35 @@ +#import "PNChannelMetadataFetchData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Fetch channel metadata` request response private extension. +@interface PNChannelMetadataFetchData () + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNChannelMetadataFetchData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ @"metadata": @"data" }; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/App Context/PNChannelMetadataSetData.h b/PubNub/Network/Responses/App Context/PNChannelMetadataSetData.h new file mode 100644 index 000000000..c19c7556e --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNChannelMetadataSetData.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interfaces declaration + +/// `Set Channel metadata` request response. +@interface PNChannelMetadataSetData : PNBaseOperationData + + +#pragma mark - Information + +/// Associated `channel's metadata` object. +@property(strong, nullable, nonatomic, readonly) PNChannelMetadata *metadata; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/App Context/PNChannelMetadataSetData.m b/PubNub/Network/Responses/App Context/PNChannelMetadataSetData.m new file mode 100644 index 000000000..eb72a04a9 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNChannelMetadataSetData.m @@ -0,0 +1,35 @@ +#import "PNChannelMetadataSetData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Set Channel metadata` request response private extension. +@interface PNChannelMetadataSetData () + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNChannelMetadataSetData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ @"metadata": @"data" }; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/App Context/PNMembershipsFetchData.h b/PubNub/Network/Responses/App Context/PNMembershipsFetchData.h new file mode 100644 index 000000000..8148bf911 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNMembershipsFetchData.h @@ -0,0 +1,28 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch user membership` request response. +@interface PNMembershipsFetchData : PNPagedAppContextData + + +#pragma mark - Properties + +/// List of fetched `memberships`. +@property(strong, nonatomic, readonly) NSArray *memberships; + +/// Total number of `memberships` in which `UUID` participate. +/// +/// > Note: Value will be `0` in case if `includeCount` of ``PubNub/PNFetchMembershipsRequest`` is set to `NO`. +@property(assign, nonatomic, readonly) NSUInteger totalCount; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/App Context/PNMembershipsFetchData.m b/PubNub/Network/Responses/App Context/PNMembershipsFetchData.m new file mode 100644 index 000000000..80305b2f9 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNMembershipsFetchData.m @@ -0,0 +1,27 @@ +#import "PNMembershipsFetchData.h" +#import "PNPagedAppContextData+Private.h" + + +#pragma mark Interface implementation + +@implementation PNMembershipsFetchData + + +#pragma mark - Properties + ++ (Class)appContextObjectClass { + return [PNMembership class]; +} + +- (NSArray *)memberships { + return (NSArray *)self.objects; +} + +- (NSUInteger)totalCount { + return super.totalCount; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/App Context/PNMembershipsManageData.h b/PubNub/Network/Responses/App Context/PNMembershipsManageData.h new file mode 100644 index 000000000..d1151ca32 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNMembershipsManageData.h @@ -0,0 +1,30 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `User membership manage` request response. +@interface PNMembershipsManageData : PNPagedAppContextData + + +#pragma mark - Properties + +/// List of existing `memberships`. +@property(strong, nonatomic, readonly) NSArray *memberships; + +/// Total number of existing objects. +/// +/// > Note: Value will be `0` in case if ``PNMembershipFields/PNMembershipsTotalCountField`` not added to +/// `includeFields` of ``PubNub/PNSetMembershipsRequest``, ``PubNub/PNRemoveMembershipsRequest``, +/// ``PubNub/PNManageMembershipsRequest`` or ``PubNub/PNFetchMembershipsRequest``. +@property(assign, nonatomic, readonly) NSUInteger totalCount; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/App Context/PNMembershipsManageData.m b/PubNub/Network/Responses/App Context/PNMembershipsManageData.m new file mode 100644 index 000000000..1efb19186 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNMembershipsManageData.m @@ -0,0 +1,27 @@ +#import "PNMembershipsManageData.h" +#import "PNPagedAppContextData+Private.h" + + +#pragma mark Interface implementation + +@implementation PNMembershipsManageData + + +#pragma mark - Properties + ++ (Class)appContextObjectClass { + return [PNMembership class]; +} + +- (NSArray *)memberships { + return (NSArray *)self.objects; +} + +- (NSUInteger)totalCount { + return super.totalCount; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/App Context/PNPagedAppContextData+Private.h b/PubNub/Network/Responses/App Context/PNPagedAppContextData+Private.h new file mode 100644 index 000000000..a53120a29 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNPagedAppContextData+Private.h @@ -0,0 +1,29 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Multipage App Context` request response private extensino. +@interface PNPagedAppContextData (Private) + + +#pragma mark - Properties + +/// List of the fetched `App Context` objects. +@property(strong, nonatomic, readonly) NSArray *objects; + +/// Total number of the `App Context` objects. +@property(assign, nonatomic, readonly) NSUInteger totalCount; + +/// Class of the object which should be instantiated for ``objects`` array. +@property(class, strong, nonatomic, readonly) Class appContextObjectClass; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/App Context/PNPagedAppContextData.h b/PubNub/Network/Responses/App Context/PNPagedAppContextData.h new file mode 100644 index 000000000..9a588de18 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNPagedAppContextData.h @@ -0,0 +1,27 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Multipage App Context` request response. +/// +/// Data object represent response for multipage app context REST API response. +@interface PNPagedAppContextData : PNBaseOperationData + + +#pragma mark - Properties + +/// Cursor bookmark for fetching the next page. +@property(strong, nullable, nonatomic, readonly) NSString *next; + +/// Cursor bookmark for fetching the previous page. +@property(strong, nullable, nonatomic, readonly) NSString *prev; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/App Context/PNPagedAppContextData.m b/PubNub/Network/Responses/App Context/PNPagedAppContextData.m new file mode 100644 index 000000000..566274108 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNPagedAppContextData.m @@ -0,0 +1,92 @@ +#import "PNPagedAppContextData+Private.h" +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Multipage App Context` request response private extensino. +@interface PNPagedAppContextData () + + +#pragma mark - Properties + +/// List of the fetched `App Context` objects. +@property(strong, nonatomic) NSArray *objects; + +/// Cursor bookmark for fetching the next page. +@property(strong, nullable, nonatomic) NSString *next; + +/// Cursor bookmark for fetching the previous page. +@property(strong, nullable, nonatomic) NSString *prev; + +/// Total number of the `App Context` objects. +@property(assign, nonatomic) NSUInteger totalCount; + + +#pragma mark - Initialization and Configuration + +/// Initialize multipage `App Context` response object. +/// +/// - Parameter objects: List of the `App Context` objects. +/// - Returns: Initialized multipage `App Context` response object. +- (instancetype)initWithObjects:(NSArray *)objects; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + + +#pragma mark - Interface implementation + +@implementation PNPagedAppContextData + + +#pragma mark - Properties + ++ (NSArray *)optionalKeys { + return @[@"prev", @"next"]; +} + ++ (NSArray *)ignoredKeys { + return @[@"objects"]; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithObjects:(NSArray *)objects { + if ((self = [super init])) _objects = objects; + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + NSDictionary *payload = [coder decodeObjectOfClass:[NSDictionary class]]; + + if (![payload isKindOfClass:[NSDictionary class]] || !payload[@"data"]) return nil; + if (![payload[@"data"] isKindOfClass:[NSArray class]]) return nil; + + NSError *error; + NSArray *objects = [PNJSONDecoder decodedObjectsOfClass:[self class].appContextObjectClass + fromArray:payload[@"data"] + withError:&error]; + if (error) return nil; + + PNPagedAppContextData *data = [self initWithObjects:objects]; + data.totalCount = ((NSNumber *)payload[@"totalCount"]).unsignedIntegerValue; + data.prev = payload[@"prev"]; + data.next = payload[@"next"]; + + return data; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/App Context/PNUUIDMetadataFetchAllData.h b/PubNub/Network/Responses/App Context/PNUUIDMetadataFetchAllData.h new file mode 100644 index 000000000..8c76c5374 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNUUIDMetadataFetchAllData.h @@ -0,0 +1,29 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch all users` request response. +@interface PNUUIDMetadataFetchAllData : PNPagedAppContextData + + +#pragma mark - Properties + +/// List of `UUIDs metadata` objects created for current subscribe key. +@property(strong, nonatomic, readonly) NSArray *metadata; + +/// Total number of objects created for current subscribe key. +/// +/// > Note: Value will be `0` in case if ``PNUUIDFields/PNUUIDTotalCountField`` not added to `includeFields` of +/// ``PubNub/PNFetchAllUUIDMetadataRequest``. +@property(assign, nonatomic, readonly) NSUInteger totalCount; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/App Context/PNUUIDMetadataFetchAllData.m b/PubNub/Network/Responses/App Context/PNUUIDMetadataFetchAllData.m new file mode 100644 index 000000000..94be55f66 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNUUIDMetadataFetchAllData.m @@ -0,0 +1,35 @@ +#import "PNUUIDMetadataFetchAllData.h" +#import "PNPagedAppContextData+Private.h" +#import "PNBaseOperationData+Private.h" + + +#pragma mark Interface implementation + +@implementation PNUUIDMetadataFetchAllData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ + @"metadata": @"data", + @"totalCount": @"totalCount" + }; +} + ++ (Class)appContextObjectClass { + return [PNUUIDMetadata class]; +} + +- (NSArray *)metadata { + return (NSArray *)self.objects; +} + +- (NSUInteger)totalCount { + return super.totalCount; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/App Context/PNUUIDMetadataFetchData.h b/PubNub/Network/Responses/App Context/PNUUIDMetadataFetchData.h new file mode 100644 index 000000000..c0f39dd48 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNUUIDMetadataFetchData.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interfaces declaration + +/// `Fetch UUID metadata` request response. +@interface PNUUIDMetadataFetchData : PNBaseOperationData + + +#pragma mark - Properties + +/// Requested `UUID metadata` object. +@property(strong, nullable, nonatomic, readonly) PNUUIDMetadata *metadata; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/App Context/PNUUIDMetadataFetchData.m b/PubNub/Network/Responses/App Context/PNUUIDMetadataFetchData.m new file mode 100644 index 000000000..dd29a6c13 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNUUIDMetadataFetchData.m @@ -0,0 +1,35 @@ +#import "PNUUIDMetadataFetchData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Fetch UUID metadata` request response private extension. +@interface PNUUIDMetadataFetchData () + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interfaces implementation + +@implementation PNUUIDMetadataFetchData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ @"metadata": @"data" }; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/App Context/PNUUIDMetadataSetData.h b/PubNub/Network/Responses/App Context/PNUUIDMetadataSetData.h new file mode 100644 index 000000000..7c1a5f0f7 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNUUIDMetadataSetData.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interfaces declaration + +/// `Set UUID metadata` request response. +@interface PNUUIDMetadataSetData : PNBaseOperationData + + +#pragma mark - Properties + +/// Updated `UUID metadata` object. +@property(strong, nullable, nonatomic, readonly) PNUUIDMetadata *metadata; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/App Context/PNUUIDMetadataSetData.m b/PubNub/Network/Responses/App Context/PNUUIDMetadataSetData.m new file mode 100644 index 000000000..7a9f80f37 --- /dev/null +++ b/PubNub/Network/Responses/App Context/PNUUIDMetadataSetData.m @@ -0,0 +1,35 @@ +#import "PNUUIDMetadataSetData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Set UUID metadata` request response privatre extension. +@interface PNUUIDMetadataSetData () + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNUUIDMetadataSetData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ @"metadata": @"data" }; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Channel Groups/PNChannelGroupFetchData.h b/PubNub/Network/Responses/Channel Groups/PNChannelGroupFetchData.h new file mode 100644 index 000000000..5138af7ef --- /dev/null +++ b/PubNub/Network/Responses/Channel Groups/PNChannelGroupFetchData.h @@ -0,0 +1,36 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// List channel group channels request response. +@interface PNChannelGroupFetchData : PNBaseOperationData + + +#pragma mark - Properties + +/// Registered channels within channel group. +/// +/// > Note: In case if status object represent error, this property may contain list of channels to which client +/// doesn't have access. +/// > Note: Value will be `nil` if list of channel groups has been requested. +@property(strong, nullable, nonatomic, readonly) NSArray *channels; + +/// Channel groups for subscription key. +/// +/// > Note: Value will be `nil` if channel group channels has been requested. +@property(strong, nullable, nonatomic, readonly) NSArray *groups; + +/// Name of the channel group for which request has been made. +/// +/// > Note: Value will be `nil` if list of channel groups has been requested. +@property(strong, nullable, nonatomic, readonly) NSString *channelGroup; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Channel Groups/PNChannelGroupFetchData.m b/PubNub/Network/Responses/Channel Groups/PNChannelGroupFetchData.m new file mode 100644 index 000000000..03f904d51 --- /dev/null +++ b/PubNub/Network/Responses/Channel Groups/PNChannelGroupFetchData.m @@ -0,0 +1,117 @@ +#import "PNChannelGroupFetchData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + + +/// Response `payload` object. +@interface PNChannelGroupChannelsPayload : NSObject + + +#pragma mark - Properties + +/// Channel groups for subscription key. +/// +/// > Note: Value will be `nil` if channel group channels has been requested. +@property(strong, nullable, nonatomic, readonly) NSArray *groups; + +/// Registered channels within channel group. +/// +/// > Note: In case if status object represent error, this property may contain list of channels to which client +/// doesn't have access. +/// > Note: Value will be `nil` if list of channel groups has been requested. +@property (strong, nonatomic, readonly) NSArray *channels; + +/// Name of the channel group for which request has been made. +/// +/// > Note: Value will be `nil` if list of channel groups has been requested. +@property(strong, nonatomic, readonly) NSString *channelGroup; + +#pragma mark - + + +@end + + +@interface PNChannelGroupFetchData () + + +#pragma mark - Properties + +/// Payload with service-provided in response on request. +@property(strong, nonatomic, readonly) PNChannelGroupChannelsPayload *payload; + +/// List channel group channels human-readable result. +@property(strong, nonatomic, readonly) NSString *message; + +/// Name of the service which provided response. +@property(strong, nonatomic, readonly) NSString *service; + +/// Request result status code. +@property(strong, nonatomic, readonly) NSNumber *status; + +/// Whether response represent service error or not. +@property(assign, nonatomic, readonly) BOOL error; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNChannelGroupChannelsPayload + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ + @"channelGroup": @"group", + @"channels": @"channels", + @"groups": @"groups", + }; +} + ++ (NSArray *)optionalKeys { + return @[@"channelGroup", @"channels", @"groups"]; +} + +#pragma mark - + + +@end + + +@implementation PNChannelGroupFetchData + + +#pragma mark - Properties + ++ (NSArray *)optionalKeys { + // 'channelGroup' and 'channels' excluded because they are getters to the payload object. + return @[@"channelGroup", @"channels", @"payload", @"message", @"groups"]; +} + +- (NSArray *)channels { + return self.payload.channels; +} + +- (NSArray *)groups { + return self.payload.groups; +} + +- (NSString *)channelGroup { + return self.payload.channelGroup; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Error/PNErrorData+Private.h b/PubNub/Network/Responses/Error/PNErrorData+Private.h new file mode 100644 index 000000000..df9b60eec --- /dev/null +++ b/PubNub/Network/Responses/Error/PNErrorData+Private.h @@ -0,0 +1,24 @@ +#import "PNErrorData.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Error status object additional information private extension. +@interface PNErrorData (Private) + + +#pragma mark - Initialization and Configuration + +/// Create error status data from error. +/// +/// - Parameter error: Transport or parser error object. +/// - Returns: Ready to use error status data object. ++ (instancetype)dataWithError:(NSError *)error; + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Error/PNErrorData.h b/PubNub/Network/Responses/Error/PNErrorData.h new file mode 100644 index 000000000..9a39b342c --- /dev/null +++ b/PubNub/Network/Responses/Error/PNErrorData.h @@ -0,0 +1,31 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface implementaation + +/// Error status object additional information. +@interface PNErrorData : PNBaseOperationData + + +#pragma mark - Properties + +/// List of channel groups for which error has been triggered. +@property(strong, nullable, nonatomic, readonly) NSArray *channelGroups; + +/// List of channels for which error has been triggered. +@property(strong, nullable, nonatomic, readonly) NSArray *channels; + +/// Service-provided information about error. +@property(strong, nonatomic, readonly) NSString *information; + +/// Service-provided additional information about error. +@property(strong, nullable, nonatomic, readonly) id data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Error/PNErrorData.m b/PubNub/Network/Responses/Error/PNErrorData.m new file mode 100644 index 000000000..2447e569d --- /dev/null +++ b/PubNub/Network/Responses/Error/PNErrorData.m @@ -0,0 +1,197 @@ +#import "PNErrorData+Private.h" +#import "PNBaseOperationData+Private.h" +#import "PNCodable.h" +#import "PNError.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Error status object additional information private extension. +@interface PNErrorData () + + +#pragma mark - Properties + +/// List of channel groups for which error has been triggered. +@property(strong, nullable, nonatomic) NSArray *channelGroups; + +/// List of channels for which error has been triggered. +@property(strong, nullable, nonatomic) NSArray *channels; + +/// Service-provided information about error. +@property(strong, nonatomic) NSString *information; + +/// Service-provided additional information about error. +@property(strong, nullable, nonatomic) id data; + + +#pragma mark - Initialization and Configuration + +/// Initialize error status data from error. +/// +/// - Parameter error: Transport or parser error object. +/// - Returns: Initialized error status data object. +- (instancetype)initWithError:(NSError *)error; + + +#pragma mark - Parse error information + +/// Process error information received from transport implementation or parsers. +/// +/// - Parameter error: Transport or parser error object. +- (void)parseFromError:(NSError *)error; + +/// Process error information received from remote service. +/// +/// - Parameter payload: JSON response with error information. +- (void)parseFromPayload:(id)payload; + +#pragma mark - + + +@end + + +NS_ASSUME_NONNULL_END + +#pragma mark - Interface implementation + +@implementation PNErrorData + + +#pragma mark - Properties + ++ (NSArray *)optionalKeys { + return @[@"channelGroups", @"channels", @"information", @"error", @"data"]; +} + + +#pragma mark - Initialization and Configuration + ++ (instancetype)dataWithError:(NSError *)error { + return [[self alloc] initWithError:error]; +} + +- (instancetype)initWithError:(NSError *)error { + if ((self = [super init])) [self parseFromError:error]; + + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + if ((self = [super init])) { + [self parseFromPayload:[coder decodeObjectOfClasses:@[[NSDictionary class], [NSArray class]]]]; + } + + return self; +} + + +#pragma mark - Parse error information + +- (void)parseFromError:(NSError *)error { + self.category = PNUnknownCategory; + + if ([error.domain isEqualToString:PNStorageErrorDomain]) { + self.category = PNDownloadErrorCategory; + } else if (error.code == PNTransportErrorRequestTimeout) self.category = PNTimeoutCategory; + else if (error.code == PNTransportErrorRequestCancelled) self.category = PNCancelledCategory; + else if (error.code == PNTransportErrorNetworkIssues) self.category = PNNetworkIssuesCategory; + else if (error.code == PNAPIErrorUnacceptableParameters || error.code == PNAPIErrorBadRequest) { + self.category = PNBadRequestCategory; + } else if (error.code == PNAPIErrorFeatureNotEnabled || error.code == PNAPIErrorAccessDenied) { + self.category = PNAccessDeniedCategory; + } else if (error.code == PNAPIErrorRequestURITooLong) self.category = PNRequestURITooLongCategory; + else if(error.code == PNAPIErrorMalformedServiceResponse) self.category = PNMalformedResponseCategory; + else if(error.code == PNAPIErrorMalformedFilterExpression) self.category = PNMalformedFilterExpressionCategory; + else if(error.code == PNCryptorErrorInsufficientMemory || error.code == PNCryptorErrorDecryption) { + self.category = PNDecryptionErrorCategory; + } + + self.information = [error.localizedFailureReason copy]; +} + +- (void)parseFromPayload:(id)payload { + if ([payload isKindOfClass:[NSArray class]]) { + NSArray *array = payload; + + if (array.count == 2) { + if ([array[0] isKindOfClass:[NSNumber class]] && [array[0] isEqual:@0]) { + _information = array[1]; + self.category = PNBadRequestCategory; + } + } else if (array.count == 3 && [array[0] isKindOfClass:[NSNumber class]] && [array[0] isEqual:@0]) { + if ([array[1] isKindOfClass:[NSString class]]) { + _information = array[1]; + self.category = PNBadRequestCategory; + } + } + } else if ([payload isKindOfClass:[NSDictionary class]]) { + NSDictionary *dictionary = payload; + id description = dictionary[@"error"]; + + if ([description isKindOfClass:[NSString class]]) _information = description; + else if (!description || ([description isKindOfClass:[NSNumber class]] && ((NSNumber *)description).boolValue && + dictionary[@"error_message"])) { + description = dictionary[@"error_message"]; + } + + if ([description isKindOfClass:[NSDictionary class]] && description[@"message"]) { + NSMutableArray *errorDetails = description[@"details"]; + _information = description[@"message"]; + + if (errorDetails.count) { + NSMutableArray *detailStrings = [NSMutableArray new]; + + for (NSDictionary *details in errorDetails) { + NSString *detailString = @""; + + if (details[@"message"]) detailString = [@"- " stringByAppendingString:details[@"message"]]; + if (details[@"location"]) { + detailString = [detailString stringByAppendingFormat:@"%@ Location: %@", + detailString.length ? @"" : @"-", details[@"location"]]; + } + + [detailStrings addObject:detailString]; + } + + if (detailStrings.count) { + _information = [_information stringByAppendingFormat:@" Details:\n%@", + [detailStrings componentsJoinedByString:@"\n"]]; + } + } + } + + if (_information || dictionary[@"message"]) _information = dictionary[@"message"] ?: _information; + if ([dictionary[@"status"] isKindOfClass:[NSNumber class]]) { + NSUInteger statusCode = ((NSNumber *)dictionary[@"status"]).unsignedIntegerValue; + self.category = PNUnknownCategory; + + if (statusCode == 400) self.category = PNBadRequestCategory; + else if (statusCode == 403) self.category = PNAccessDeniedCategory; + else if (statusCode == 404) self.category = PNResourceNotFoundCategory; + else if (statusCode == 411) self.category = PNBadRequestCategory; + else if (statusCode == 414) self.category = PNRequestURITooLongCategory; + else if (statusCode == 481) self.category = PNMalformedFilterExpressionCategory; + } + + if (dictionary[@"payload"]) { + _channelGroups = [dictionary valueForKeyPath:@"payload.channel-groups"] ?: @[]; + _channels = [dictionary valueForKeyPath:@"payload.channels"] ?: @[]; + + if (_channels.count == 0 && _channels.count == 0) _data = dictionary[@"payload"]; + } + + if ([_information containsString:@"not enabled"]) self.category = PNAccessDeniedCategory; + } else { + _information = @"Malformed service response."; + self.category = PNMalformedResponseCategory; + } +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/File Sharing/PNFileDownloadData+Private.h b/PubNub/Network/Responses/File Sharing/PNFileDownloadData+Private.h new file mode 100644 index 000000000..f1f8d7bd4 --- /dev/null +++ b/PubNub/Network/Responses/File Sharing/PNFileDownloadData+Private.h @@ -0,0 +1,27 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Download file` request response private extension. +@interface PNFileDownloadData (Private) + + +#pragma mark - Initialization and Configuration + +/// Create `Download file` request response. +/// +/// - Parameters: +/// - location: Location where downloaded file can be found. +/// - temporarily: Whether file is temporary or not. +/// - Returns: Ready to use `Download File` request response. ++ (instancetype)dataForFileAtLocation:(NSURL *)location temporarily:(BOOL)temporarily; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/File Sharing/PNFileDownloadData.h b/PubNub/Network/Responses/File Sharing/PNFileDownloadData.h new file mode 100644 index 000000000..b8f885347 --- /dev/null +++ b/PubNub/Network/Responses/File Sharing/PNFileDownloadData.h @@ -0,0 +1,28 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Download file` request response. +@interface PNFileDownloadData : PNBaseOperationData + + +#pragma mark - Properties + +/// Whether file is temporary or not. +/// +/// > Warning: Temporary file will be removed as soon as completion block will exit. Make sure to move temporary files +/// (w/o scheduling task on secondary thread) to persistent location. +@property(assign, nonatomic, readonly, getter = isTemporary) BOOL temporary; + +/// Location where downloaded file can be found. +@property(strong, nullable, nonatomic, readonly) NSURL *location; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/File Sharing/PNFileDownloadData.m b/PubNub/Network/Responses/File Sharing/PNFileDownloadData.m new file mode 100644 index 000000000..56997a2d7 --- /dev/null +++ b/PubNub/Network/Responses/File Sharing/PNFileDownloadData.m @@ -0,0 +1,65 @@ +#import "PNFileDownloadData+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration +/// `Download file` request response private extension. +@interface PNFileDownloadData () + + +#pragma mark - Properties + +/// Whether file is temporary or not. +/// +/// > Warning: Temporary file will be removed as soon as completion block will exit. Make sure to move temporary files +/// (w/o scheduling task on secondary thread) to persistent location. +@property(assign, nonatomic, getter = isTemporary) BOOL temporary; + +/// Location where downloaded file can be found. +@property(strong, nullable, nonatomic) NSURL *location; + + +#pragma mark - Initialization and Configuration + +/// Initialize `Download file` request response. +/// +/// - Parameters: +/// - location: Location where downloaded file can be found. +/// - temporarily: Whether file is temporary or not. +/// - Returns: Initialized `Download File` request response. +- (instancetype)initForFileAtLocation:(NSURL *)location temporarily:(BOOL)temporarily; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNFileDownloadData + + +#pragma mark - Initialization and Configuration + ++ (instancetype)dataForFileAtLocation:(NSURL *)location temporarily:(BOOL)temporarily { + return [[self alloc] initForFileAtLocation:location temporarily:temporarily]; +} + +- (instancetype)initForFileAtLocation:(NSURL *)location temporarily:(BOOL)temporarily { + if ((self = [super init])) { + _temporary = temporarily; + _location = location; + } + + return self; +} + + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/File Sharing/PNFileGenerateUploadURLData.h b/PubNub/Network/Responses/File Sharing/PNFileGenerateUploadURLData.h new file mode 100644 index 000000000..789e5637d --- /dev/null +++ b/PubNub/Network/Responses/File Sharing/PNFileGenerateUploadURLData.h @@ -0,0 +1,36 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Generate file upload URL` request response. +@interface PNFileGenerateUploadURLData : PNBaseOperationData + + +#pragma mark - Properties + +/// List of form-fields which should be prepended to user data in request body. +/// +/// > Note: `multipart/form-data` `Content-Type` will be set in case if any fields is present in array. +@property(strong, nullable, nonatomic, readonly) NSArray *formFields; + +/// Unique file identifier. +@property(strong, nullable, nonatomic, readonly) NSString *fileIdentifier; + +/// HTTP method which should be used during file upload request. +@property(strong, nullable, nonatomic, readonly) NSString *httpMethod; + +/// Name which will be used to store user data on server. +@property(strong, nullable, nonatomic, readonly) NSString *filename; + +/// URL which should be used to upload user data. +@property(strong, nullable, nonatomic, readonly) NSURL *requestURL; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/File Sharing/PNFileGenerateUploadURLData.m b/PubNub/Network/Responses/File Sharing/PNFileGenerateUploadURLData.m new file mode 100644 index 000000000..de57155a8 --- /dev/null +++ b/PubNub/Network/Responses/File Sharing/PNFileGenerateUploadURLData.m @@ -0,0 +1,90 @@ +#import "PNFileGenerateUploadURLData.h" +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Generate file upload URL` request response private extension. +@interface PNFileGenerateUploadURLData () + + +#pragma mark - Properties + +/// List of form-fields which should be prepended to user data in request body. +/// +/// > Note: `multipart/form-data` `Content-Type` will be set in case if any fields is present in array. +@property(strong, nullable, nonatomic) NSArray *formFields; + +/// Unique file identifier. +@property(strong, nullable, nonatomic) NSString *fileIdentifier; + +/// HTTP method which should be used during file upload request. +@property(strong, nullable, nonatomic) NSString *httpMethod; + +/// Name which will be used to store user data on server. +@property(strong, nullable, nonatomic) NSString *filename; + +/// URL which should be used to upload user data. +@property(strong, nullable, nonatomic) NSURL *requestURL; + + +#pragma mark - Initialization and Configuration + +/// Initialize `Generate file upload URL` data object. +/// +/// - Parameters: +/// - fileId: Unique file identifier. +/// - fileName: Actual file name under which file has been stored. +/// - Returns: Initialized `Generate file upload URL` data object. +- (instancetype)initWithId:(NSString *)fileId name:(NSString *)fileName; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNFileGenerateUploadURLData + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithId:(NSString *)fileId name:(NSString *)fileName { + if ((self = [super init])) { + _fileIdentifier = [fileId copy]; + _filename = [fileName copy]; + } + + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + NSDictionary *payload = [coder decodeObjectOfClass:[NSDictionary class]]; + if (![payload isKindOfClass:[NSDictionary class]] || !payload[@"data"] || !payload[@"file_upload_request"]) { + return nil; + } + + NSDictionary *requestData = payload[@"file_upload_request"]; + NSDictionary *fileData = payload[@"data"]; + + if (![fileData isKindOfClass:[NSDictionary class]] || ![requestData isKindOfClass:[NSDictionary class]]) return nil; + + PNFileGenerateUploadURLData *data = [self initWithId:fileData[@"id"] name:fileData[@"name"]]; + data.httpMethod = ((NSString *)requestData[@"method"]).lowercaseString; + data.requestURL = [NSURL URLWithString:requestData[@"url"]]; + data.formFields = requestData[@"form_fields"]; + + return data; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/File Sharing/PNFileListFetchData+Private.h b/PubNub/Network/Responses/File Sharing/PNFileListFetchData+Private.h new file mode 100644 index 000000000..40c6d8913 --- /dev/null +++ b/PubNub/Network/Responses/File Sharing/PNFileListFetchData+Private.h @@ -0,0 +1,23 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `List files` request response private extension. +@interface PNFileListFetchData (Private) + + +#pragma mark - Helpers + +/// Compute file download URL for each of ``files`` entry. +/// +/// - Parameter block: File download URL generator block; +- (void)setFilesDownloadURLWithBlock:(NSURL *(^)(NSString *identifier, NSString *name))block; + +#pragma mark - + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/File Sharing/PNFileListFetchData.h b/PubNub/Network/Responses/File Sharing/PNFileListFetchData.h new file mode 100644 index 000000000..4f05e1e67 --- /dev/null +++ b/PubNub/Network/Responses/File Sharing/PNFileListFetchData.h @@ -0,0 +1,29 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interfaces declaration + +/// `List files` request response. +@interface PNFileListFetchData : PNBaseOperationData + + +#pragma mark - Properties + +/// List of channel `files`. +@property(strong, nullable, nonatomic, readonly) NSArray *files; + +/// Cursor bookmark for fetching the next page. +@property(strong, nullable, nonatomic, readonly) NSString *next; + +/// How many `files` has been returned. +@property(assign, nonatomic, readonly) NSUInteger count; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/File Sharing/PNFileListFetchData.m b/PubNub/Network/Responses/File Sharing/PNFileListFetchData.m new file mode 100644 index 000000000..a6f87e2cd --- /dev/null +++ b/PubNub/Network/Responses/File Sharing/PNFileListFetchData.m @@ -0,0 +1,79 @@ +#import "PNFileListFetchData+Private.h" +#import +#import +#import "PNFile+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `List files` request response private extension. +@interface PNFileListFetchData () + + +#pragma mark - Properties + +/// List of channel `files`. +@property(strong, nullable, nonatomic) NSArray *files; + +/// Cursor bookmark for fetching the next page. +@property(strong, nullable, nonatomic) NSString *next; + +/// How many `files` has been returned. +@property(assign, nonatomic) NSUInteger count; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNFileListFetchData + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithFiles:(NSArray *)files count:(NSUInteger)count next:(NSString *)next { + if ((self = [super init])) { + _files = files; + _count = count; + _next = next; + } + + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + NSDictionary *payload = [coder decodeObjectOfClass:[NSDictionary class]]; + if (![payload isKindOfClass:[NSDictionary class]] || !payload[@"data"]) return nil; + + + NSUInteger count = ((NSNumber *)payload[@"count"]).unsignedIntegerValue; + NSString *next = ![payload[@"next"] isEqual:[NSNull null]] ? payload[@"next"] : nil; + NSError *error; + NSArray *files = [PNJSONDecoder decodedObjectsOfClass:[PNFile class] + fromArray:payload[@"data"] + withError:&error]; + if (error) return nil; + + return [self initWithFiles:files count:count next:next]; +} + + +#pragma mark - Helpers + +- (void)setFilesDownloadURLWithBlock:(NSURL *(^)(NSString *dentifier, NSString *name))block { + [self.files enumerateObjectsUsingBlock:^(PNFile *file, __unused NSUInteger fileIdx, __unused BOOL *stop) { + file.downloadURL = block(file.identifier, file.name); + }]; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/File Sharing/PNFileSendData+Private.h b/PubNub/Network/Responses/File Sharing/PNFileSendData+Private.h new file mode 100644 index 000000000..02f6026e1 --- /dev/null +++ b/PubNub/Network/Responses/File Sharing/PNFileSendData+Private.h @@ -0,0 +1,39 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `File Upload` request response private extension. +@interface PNFileSendData (Private) + + +#pragma mark - Properties + +/// Time token when the message with file information has been published. +@property(strong, nullable, nonatomic) NSNumber *timetoken; + +/// Whether file uploaded or not. +/// +/// > Note: This property should be used during error handling to identify whether send file request should be resend or +/// only file message publish. +@property(assign, nonatomic) BOOL fileUploaded; + + +#pragma mark - Initialization and Configuration + +/// Create send file response data. +/// +/// - Parameters: +/// - fileId: Unique identifier which has been assigned to file during upload. +/// - fileName: Name under which uploaded data has been stored. +/// - Returns: Ready to use send file response data. ++ (instancetype)fileDataWithId:(NSString *)fileId name:(NSString *)fileName; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/File Sharing/PNFileSendData.h b/PubNub/Network/Responses/File Sharing/PNFileSendData.h new file mode 100644 index 000000000..7ef83c9c9 --- /dev/null +++ b/PubNub/Network/Responses/File Sharing/PNFileSendData.h @@ -0,0 +1,34 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `File Upload` request response. +@interface PNFileSendData : PNBaseOperationData + + +#pragma mark - Properties + +/// Unique identifier which has been assigned to file during upload. +@property(strong, nullable, nonatomic, readonly) NSString *fileIdentifier; + +/// Time token when the message with file information has been published. +@property(strong, nullable, nonatomic, readonly) NSNumber *timetoken; + +/// Name under which uploaded data has been stored. +@property(strong, nullable, nonatomic, readonly) NSString *fileName; + +/// Whether file uploaded or not. +/// +/// > Note: This property should be used during error handling to identify whether send file request should be resend or +/// only file message publish. +@property(assign, nonatomic, readonly) BOOL fileUploaded; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/File Sharing/PNFileSendData.m b/PubNub/Network/Responses/File Sharing/PNFileSendData.m new file mode 100644 index 000000000..cb2bce7aa --- /dev/null +++ b/PubNub/Network/Responses/File Sharing/PNFileSendData.m @@ -0,0 +1,74 @@ +// +// PNSendFileData.m +// PubNub Framework +// +// Created by Sergey Mamontov on 19.06.2024. +// Copyright © 2024 PubNub. All rights reserved. +// + +#import "PNFileSendData+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `File Upload` request response private extension. +@interface PNFileSendData () + + +#pragma mark - Properties + +/// Time token when the message with file information has been published. +@property(strong, nullable, nonatomic) NSNumber *timetoken; + +/// Whether file uploaded or not. +/// +/// > Note: This property should be used during error handling to identify whether send file request should be resend or +/// only file message publish. +@property(assign, nonatomic) BOOL fileUploaded; + + +#pragma mark - Initialization and Configuration + +/// Initialize send file response data. +/// +/// - Parameters: +/// - fileId: Unique identifier which has been assigned to file during upload. +/// - fileName: Name under which uploaded data has been stored. +/// - Returns: Initialized send file response data. +- (instancetype)initWithId:(NSString *)fileId name:(NSString *)fileName; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNFileSendData + + +#pragma mark - Initialization and Configuration + ++ (instancetype)fileDataWithId:(NSString *)fileId name:(NSString *)fileName { + return [[self alloc] initWithId:fileId name:fileName]; +} + +- (instancetype)initWithId:(NSString *)fileId name:(NSString *)fileName { + if ((self = [super init])) { + _fileIdentifier = [fileId copy]; + _fileName = [fileName copy]; + } + + return self; +} + +#pragma mark - + + +@end + diff --git a/PubNub/Network/Responses/Message Persistence/PNHistoryFetchData+Private.h b/PubNub/Network/Responses/Message Persistence/PNHistoryFetchData+Private.h new file mode 100644 index 000000000..21136f5ca --- /dev/null +++ b/PubNub/Network/Responses/Message Persistence/PNHistoryFetchData+Private.h @@ -0,0 +1,31 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Fetch history request response data private extension. +@interface PNHistoryFetchData (Private) + + +#pragma mark - Properties + +/// Whether there were decryption error or not. +@property(assign, nonatomic, readonly) BOOL decryptError; + + +#pragma mark - Helpers + +/// Set name of the channel for messages fetched not for multiple channels (using `v2` `Message Persistence` REST API). +/// +/// - Parameter channel: Name of the channel which should be single root key in processed messages. +- (void)setSingleChannelName:(NSString *)channel; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Message Persistence/PNHistoryFetchData.h b/PubNub/Network/Responses/Message Persistence/PNHistoryFetchData.h new file mode 100644 index 000000000..750385f16 --- /dev/null +++ b/PubNub/Network/Responses/Message Persistence/PNHistoryFetchData.h @@ -0,0 +1,41 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Fetch history request response data. +@interface PNHistoryFetchData : PNBaseOperationData + + +#pragma mark - Properties + +/// List of messages received for single channel. +/// +/// > Note: Property will be set if history has been requested for single channel. +@property(strong, nonatomic, readonly) NSArray *messages; + +/// Batch messages fetch. +/// +/// Each key represent name of the channel and value is list of messages for that channel. +/// +/// > Note: Property will be set if history has been requested for multiple single channel. +@property (nonatomic, readonly, strong) NSDictionary *> *channels; + +/// Fetched messages timeframe start. +/// +/// > Note: Property will be set if history has been requested for single channel. +@property(strong, nullable, nonatomic, readonly) NSNumber *start; + +/// Fetched messages timeframe emd. +/// +/// > Note: Property will be set if history has been requested for single channel. +@property(strong, nullable, nonatomic, readonly) NSNumber *end; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Message Persistence/PNHistoryFetchData.m b/PubNub/Network/Responses/Message Persistence/PNHistoryFetchData.m new file mode 100644 index 000000000..590ea85f4 --- /dev/null +++ b/PubNub/Network/Responses/Message Persistence/PNHistoryFetchData.m @@ -0,0 +1,318 @@ +#import "PNHistoryFetchData+Private.h" +#import +#import +#ifndef PUBNUB_DISABLE_LOGGER +#import +#import "PNConstants.h" +#import "PNLogMacro.h" +#endif // PUBNUB_DISABLE_LOGGER +#import "PNHelpers.h" +#import "PNError.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Fetch history request response data private extension. +@interface PNHistoryFetchData () + +#pragma mark - Properties + + +/// Batch messages fetch. +/// +/// Each key represent name of the channel and value is list of messages for that channel. +/// +/// > Note: Property will be set if history has been requested for multiple single channel. +/// > Note: Kept mutable reference to make it possible to decrypt data. +@property(strong, nonatomic, readonly) NSMutableDictionary *> *channelsUpdates; + +/// Fetched messages timeframe start. +/// +/// > Note: Property will be set if history has been requested for single channel. +@property(strong, nullable, nonatomic) NSNumber *start; + +/// Fetched messages timeframe emd. +/// +/// > Note: Property will be set if history has been requested for single channel. +@property(strong, nullable, nonatomic) NSNumber *end; + +/// Whether there were decryption error or not. +@property(assign, nonatomic) BOOL decryptError; + + +#pragma mark - Initialization and Configuration + +/// Initialize history data object with processed updates. +/// +/// - Parameters: +/// - updates: Pre-processed messages payloads for each received channel. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Initialized history data object. +- (instancetype)initWithChannelUpdates:(NSMutableDictionary *> *)updates + error:(NSError *)error; + + +#pragma mark - Helpers + +/// Re-format source ``updates`` into expected structure. +/// +/// - Parameters: +/// - updates: List of updates which should be pre-processed restructured. +/// - cryptoModule: Configured crypto module which should be used to decrypt original payloads. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: List of updates with expected structure. +- (NSMutableArray *)formattedUpdatesFromArray:(NSArray *)updates + withCryptoModule:(nullable id)cryptoModule + error:(NSError **)error; + +/// Decrypt payload. +/// +/// - Parameters: +/// - data: Previously encrypted data. +/// - cryptoModule: cryptor which should be used to decrypt data. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Decrypted payload or original `data` if `cryptoModule` not set. +- (id)decryptedMessageFromData:(id)data + withCryptoModule:(nullable id)cryptoModule + error:(NSError **)error; + +/// Convert action timetokens into `NSNumber`. +/// +/// - Parameter actions: Message reactions by type. +/// - Returns: New dictionary with reactions where message action timetoken sotred as `NSNumber` instance. +- (NSMutableDictionary *)normalizeActionTimetokens:(NSDictionary *)actions; + +#pragma mark - + + +@end + +/// History message data. +@interface PNMessageData : NSObject + + +#pragma mark - Properties + +/// Previously published message object. +@property(strong, nonatomic, readonly) id message; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNHistoryFetchData + + +#pragma mark - Properties + +- (NSDictionary *> *)channels { + return self.channelsUpdates; +} + +- (NSArray *)messages { + if (self.channelsUpdates.count > 1) return nil; + if (self.channelsUpdates.count == 0) return @[]; + return self.channelsUpdates[self.channelsUpdates.allKeys.firstObject]; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithChannelUpdates:(NSMutableDictionary *> *)updates + error:(NSError *)error { + if ((self = [super init])) { + _decryptError = error != nil; + _channelsUpdates = updates; + } + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + id cryptoModule = coder.additionalData[@"cryptoModule"]; + NSDictionary *payload = [coder decodeObjectOfClass:[NSDictionary class]]; + NSMutableDictionary *channelMessages = [NSMutableDictionary new]; + __block NSError *decryptionError; + NSNumber *start; + NSNumber *end; + + if (payload) { + if (![payload isKindOfClass:[NSDictionary class]] || !payload[@"channels"]) return nil; + NSDictionary *channels = payload[@"channels"]; + + [channels enumerateKeysAndObjectsUsingBlock:^(NSString *channel, NSArray *messages, BOOL *stop) { + NSError *error; + channelMessages[channel] = [self formattedUpdatesFromArray:messages withCryptoModule:cryptoModule error:&error]; + + if (!decryptionError) decryptionError = error; + }]; + } else { + NSArray *payload = [coder decodeObjectOfClass:[NSArray class]]; + if (![payload isKindOfClass:[NSArray class]] || ((NSArray *)payload).count != 3 || + ![((NSArray *)payload).firstObject isKindOfClass:[NSArray class]]) return nil; + + channelMessages[@""] = [self formattedUpdatesFromArray:((NSArray *)payload)[0] + withCryptoModule:cryptoModule + error:&decryptionError]; + start = ((NSArray *)payload)[1]; + end = ((NSArray *)payload)[2]; + } + + PNHistoryFetchData *data = [self initWithChannelUpdates:channelMessages error:decryptionError]; + data.start = start; + data.end = end; + + return data; +} + + +#pragma mark - Helpers + +- (void)setSingleChannelName:(NSString *)channel { + if (self.channelsUpdates.count == 1 && [self.channelsUpdates.allKeys.firstObject isEqualToString:@""]) { + self.channelsUpdates[channel] = self.channelsUpdates[@""]; + [self.channelsUpdates removeObjectForKey:@""]; + } +} + +- (NSMutableArray *)formattedUpdatesFromArray:(NSArray *)updates + withCryptoModule:(id)cryptoModule + error:(NSError **)processingError { + NSMutableArray *processed = [NSMutableArray arrayWithCapacity:updates.count]; + __block NSError *decError; + + [updates enumerateObjectsUsingBlock:^(id entry, __unused NSUInteger entryIdx, __unused BOOL *stop) { + NSDictionary *actions = nil; + NSDictionary *metadata = nil; + NSNumber *messageType = nil; + NSString *senderUUID = nil; + NSNumber *timeToken = nil; + id message = entry; + + if ([entry isKindOfClass:[NSDictionary class]] && entry[@"message"] && + (entry[@"timetoken"] || entry[@"meta"] || entry[@"actions"] || entry[@"message_type"] || entry[@"uuid"])) { + + messageType = entry[@"message_type"]; + timeToken = entry[@"timetoken"]; + message = entry[@"message"]; + actions = entry[@"actions"]; + senderUUID = entry[@"uuid"]; + metadata = entry[@"meta"]; + + if (![metadata isKindOfClass:[NSDictionary class]]) metadata = nil; + + timeToken = timeToken ? @(((NSString *)timeToken).longLongValue) : nil; + actions = [self normalizeActionTimetokens:actions]; + } + + NSError *error; + message = [self decryptedMessageFromData:message withCryptoModule:cryptoModule error:&error]; + + if (message) { + if (timeToken || metadata || actions || messageType || senderUUID) { + NSMutableDictionary *messageWithInfo = [@{ @"message": message } mutableCopy]; + if ([messageType isKindOfClass:[NSNumber class]]) messageWithInfo[@"messageType"] = messageType; + if (timeToken) messageWithInfo[@"timetoken"] = timeToken; + if (metadata) messageWithInfo[@"metadata"] = metadata; + if (actions) messageWithInfo[@"actions"] = actions; + if (senderUUID.length) messageWithInfo[@"uuid"] = senderUUID; + + message = messageWithInfo; + } + + [processed addObject:message]; + } + + if (!decError && error) decError = error; + }]; + + if (decError) *processingError = decError; + + return processed; +} + +- (id)decryptedMessageFromData:(id)data withCryptoModule:(id)cryptoModule error:(NSError **)error { + if (!cryptoModule) return data; + + BOOL isDictionary = [data isKindOfClass:[NSDictionary class]]; + NSError *decryptionError; + id decryptedMessage = nil; + id encryptedData = isDictionary ? ((NSDictionary *)data)[@"pn_other"] : data; + + if ([encryptedData isKindOfClass:[NSString class]]) { + NSCharacterSet *trimCharSet = [NSCharacterSet characterSetWithCharactersInString:@"\""]; + encryptedData = [PNString base64DataFrom:[encryptedData stringByTrimmingCharactersInSet:trimCharSet]]; + PNResult *decryptResult = [cryptoModule decryptData:encryptedData]; + NSString *decryptedEventData = nil; + + if (decryptResult.isError) decryptionError = decryptResult.error; + else decryptedEventData = [[NSString alloc] initWithData:decryptResult.data encoding:NSUTF8StringEncoding]; + + if (decryptedEventData && ![decryptedEventData isEqualToString:encryptedData]) { + decryptedMessage = [PNJSON JSONObjectFrom:decryptedEventData withError:nil]; + } + } + + if (decryptionError || !decryptedMessage) { + if (!decryptionError) { + decryptionError = [NSError errorWithDomain:PNCryptorErrorDomain code:PNCryptorErrorDecryption userInfo:nil]; + } +#ifndef PUBNUB_DISABLE_LOGGER + PNLLogger *logger = [PNLLogger loggerWithIdentifier:kPNClientIdentifier]; + [logger enableLogLevel:PNAESErrorLogLevel]; + PNLogAESError(logger, @" History entry decryption error: %@", decryptionError); +#endif // PUBNUB_DISABLE_LOGGER + *error = decryptionError; + + return isDictionary ? ((NSDictionary *)data)[@"pn_other"] : data; + } else if (isDictionary) { + NSMutableDictionary *mutableMessage = [(NSDictionary *)data mutableCopy]; + [mutableMessage removeObjectForKey:@"pn_other"]; + + if (![decryptedMessage isKindOfClass:[NSDictionary class]]) mutableMessage[@"pn_other"] = decryptedMessage; + else [mutableMessage addEntriesFromDictionary:decryptedMessage]; + + decryptedMessage = [mutableMessage copy]; + } + + return decryptedMessage; +} + +- (NSMutableDictionary *)normalizeActionTimetokens:(NSDictionary *)actions { + if (actions.count == 0) return nil; + + NSMutableDictionary *updatedActions = [NSMutableDictionary dictionaryWithCapacity:actions.count]; + for (NSString *type in actions) { + NSDictionary *actionValues = actions[type]; + NSMutableDictionary *updatedActionValues = [NSMutableDictionary dictionaryWithCapacity:actionValues.count]; + + for (NSString *value in actionValues) { + NSArray *senders = actionValues[value]; + NSMutableArray *updatedSenders = [NSMutableArray arrayWithCapacity:senders.count]; + + for(NSDictionary *sender in senders) { + NSMutableDictionary *updatedSender = [sender mutableCopy]; + updatedSender[@"actionTimetoken"] = @(((NSString *)sender[@"actionTimetoken"]).longLongValue); + [updatedSenders addObject:updatedSender]; + } + + updatedActionValues[value] = updatedSenders; + } + + updatedActions[type] = updatedActionValues; + } + + return updatedActions; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Message Persistence/PNHistoryMessageCountData.h b/PubNub/Network/Responses/Message Persistence/PNHistoryMessageCountData.h new file mode 100644 index 000000000..ed6d73dc4 --- /dev/null +++ b/PubNub/Network/Responses/Message Persistence/PNHistoryMessageCountData.h @@ -0,0 +1,22 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Channels messages count` request response. +@interface PNHistoryMessageCountData : PNBaseOperationData + + +#pragma mark - Properties + +/// Dictionary with channel as keys and number of messages as value. +@property(strong, nonatomic, readonly) NSDictionary *channels; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Message Persistence/PNHistoryMessageCountData.m b/PubNub/Network/Responses/Message Persistence/PNHistoryMessageCountData.m new file mode 100644 index 000000000..4df7406d7 --- /dev/null +++ b/PubNub/Network/Responses/Message Persistence/PNHistoryMessageCountData.m @@ -0,0 +1,29 @@ +#import "PNHistoryMessageCountData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Channels messages count` request response. +@interface PNHistoryMessageCountData () + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNHistoryMessageCountData + + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Message Reaction/PNMessageAction.h b/PubNub/Network/Responses/Message Reaction/PNMessageAction.h new file mode 100644 index 000000000..8885c1fd4 --- /dev/null +++ b/PubNub/Network/Responses/Message Reaction/PNMessageAction.h @@ -0,0 +1,34 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Message action object. +@interface PNMessageAction : NSObject + + +#pragma mark - Properties + +/// What feature this `message action` represents. +@property(copy, nonatomic, readonly) NSString *type; + +/// Timetoken (**PubNub**'s high precision timestamp) of `message` for which `action has been added. +@property(strong, nonatomic, readonly) NSNumber *messageTimetoken; + +/// `Message action` addition timetoken (**PubNub**'s high precision timestamp). +@property(strong, nonatomic, readonly) NSNumber *actionTimetoken; + +/// `Identifier` of user which added this `message action`. +@property(copy, nonatomic, readonly) NSString *uuid; + +/// Value which has been added with `message action type`. +@property(copy, nonatomic, readonly) NSString *value; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Message Reaction/PNMessageAction.m b/PubNub/Network/Responses/Message Reaction/PNMessageAction.m new file mode 100644 index 000000000..a69b376cf --- /dev/null +++ b/PubNub/Network/Responses/Message Reaction/PNMessageAction.m @@ -0,0 +1,51 @@ +#import "PNMessageAction.h" +#import "PNCodable.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +@interface PNMessageAction () + + +#pragma mark - Misc + +/// Translate `message action` data model to dictionary. +/// +/// - Returns: Dictionary `message action` representation. +- (NSDictionary *)dictionaryRepresentation; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNMessageAction + + +#pragma mark - Misc + +- (NSDictionary *)dictionaryRepresentation { + return @{ + @"type": self.type, + @"uuid": self.uuid, + @"actionTimetoken": self.actionTimetoken, + @"messageTimetoken": self.messageTimetoken, + @"value": self.value + }; +} + +- (NSString *)debugDescription { + return [[self dictionaryRepresentation] description]; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Message Reaction/PNMessageActionFetchData.h b/PubNub/Network/Responses/Message Reaction/PNMessageActionFetchData.h new file mode 100644 index 000000000..195e9a6b4 --- /dev/null +++ b/PubNub/Network/Responses/Message Reaction/PNMessageActionFetchData.h @@ -0,0 +1,23 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Add message action request response data. +@interface PNMessageActionFetchData : PNBaseOperationData + + +#pragma mark - Properties + +/// Added `messages action`. +@property(strong, nonatomic, readonly) PNMessageAction *action; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Message Reaction/PNMessageActionFetchData.m b/PubNub/Network/Responses/Message Reaction/PNMessageActionFetchData.m new file mode 100644 index 000000000..4f4fda318 --- /dev/null +++ b/PubNub/Network/Responses/Message Reaction/PNMessageActionFetchData.m @@ -0,0 +1,35 @@ +#import "PNMessageActionFetchData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Add message action request response data private extension. +@interface PNMessageActionFetchData () + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + + +#pragma mark - Interface implementation + +@implementation PNMessageActionFetchData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ @"action": @"data" }; +} + +#pragma mark - + +@end diff --git a/PubNub/Network/Responses/Message Reaction/PNMessageActionsFetchData.h b/PubNub/Network/Responses/Message Reaction/PNMessageActionsFetchData.h new file mode 100644 index 000000000..d231c498f --- /dev/null +++ b/PubNub/Network/Responses/Message Reaction/PNMessageActionsFetchData.h @@ -0,0 +1,31 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Fetch message actions request response data. +@interface PNMessageActionsFetchData : PNBaseOperationData + + +#pragma mark - Properties + +/// List of fetched `messages actions`. +@property(strong, nonatomic, readonly) NSArray *actions; + +/// Fetched `message actions` time range start (oldest `message action` timetoken). +/// +/// > Note: This timetoken can be used as `start` value to fetch older `message actions`. +@property (strong, nonatomic, readonly) NSNumber *start; + +/// Fetched `message actions` time range end (newest `action` timetoken). +@property (strong, nonatomic, readonly) NSNumber *end; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Message Reaction/PNMessageActionsFetchData.m b/PubNub/Network/Responses/Message Reaction/PNMessageActionsFetchData.m new file mode 100644 index 000000000..537e7be25 --- /dev/null +++ b/PubNub/Network/Responses/Message Reaction/PNMessageActionsFetchData.m @@ -0,0 +1,81 @@ +#import "PNMessageActionsFetchData.h" +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Fetch message actions request response data private extension. +@interface PNMessageActionsFetchData () + + +#pragma mark - Properties + +/// List of fetched `messages actions`. +@property(strong, nonatomic) NSArray *actions; + + +#pragma mark - Initialization and Configuration + +/// Initialize actions data object +/// +/// - Parameter actions: List of message actions which has been fetched for specific message. +/// - Returns: Initialized actions data object. +- (instancetype)initWithActions:(NSArray *)actions; + +#pragma mark - + + +@end + + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNMessageActionsFetchData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ + @"actions": @"data" + }; +} + ++ (NSArray *)optionalKeys { + return @[@"start", @"end"]; +} + +- (NSNumber *)start { + return self.actions.count > 0 ? self.actions.firstObject.actionTimetoken : @0; +} + +- (NSNumber *)end { + return self.actions.count > 0 ? self.actions.lastObject.actionTimetoken : @0; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithActions:(NSArray *)actions { + if ((self = [super init])) _actions = actions; + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + NSArray *actions = [PNJSONDecoder decodedObjectsOfClass:[PNMessageAction class] + fromArray:[coder decodeObjectForKey:@"actions"] + withError:nil]; + + return actions ? [self initWithActions:actions] : nil; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/PNBaseOperationData+Private.h b/PubNub/Network/Responses/PNBaseOperationData+Private.h new file mode 100644 index 000000000..8257215ee --- /dev/null +++ b/PubNub/Network/Responses/PNBaseOperationData+Private.h @@ -0,0 +1,27 @@ +#import "PNBaseOperationData.h" +#import "PNStructures.h" +#import "PNCodable.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// General operation outcome data object private extension. +@interface PNBaseOperationData () + + +#pragma mark - Properties + +/// Whether service returned error response or not. +@property(assign, nonatomic, getter = isError) BOOL error; + +/// Represent request processing status object using `PNStatusCategory` enum fields. +@property(assign, nonatomic) PNStatusCategory category; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/PNBaseOperationData.h b/PubNub/Network/Responses/PNBaseOperationData.h new file mode 100644 index 000000000..a491cb2ad --- /dev/null +++ b/PubNub/Network/Responses/PNBaseOperationData.h @@ -0,0 +1,17 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// General operation outcome data object. +@interface PNBaseOperationData : NSObject + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/PNBaseOperationData.m b/PubNub/Network/Responses/PNBaseOperationData.m new file mode 100644 index 000000000..afc76db62 --- /dev/null +++ b/PubNub/Network/Responses/PNBaseOperationData.m @@ -0,0 +1,26 @@ +#import "PNBaseOperationData+Private.h" + + +#pragma mark Interface implementation + +@implementation PNBaseOperationData + + +#pragma mark - Properties + ++ (NSArray *)ignoredKeys { + return @[@"category", @"error"]; +} + +- (void)setCategory:(PNStatusCategory)category { + _category = category; + + _error = category != PNAcknowledgmentCategory && category != PNConnectedCategory && + category != PNReconnectedCategory && category == PNDisconnectedCategory && + category != PNUnexpectedDisconnectCategory && category != PNCancelledCategory; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/PNOperationDataParser.h b/PubNub/Network/Responses/PNOperationDataParser.h new file mode 100644 index 000000000..8a3795587 --- /dev/null +++ b/PubNub/Network/Responses/PNOperationDataParser.h @@ -0,0 +1,85 @@ +#import +#import +#import +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Parsed remote service response. +@interface PNOperationDataParseResult : NSObject + + +#pragma mark - Properties + +/// API request processing result with de-serialized response data object. +/// +/// If there is no error and it is expected to have result data which object will be parsed from the service response. +@property(strong, nullable, nonatomic, readonly) ResultType result; + +/// API request processing status with de-serialized request status data. +/// +/// In case of error or non-fetching requests which object may contain request processing status data. +@property(strong, nullable, nonatomic, readonly) StatusType status; + +#pragma mark - + + +@end + + +/// Remote service response parser. +/// +/// Object used to process and represent result or status data. +@interface PNOperationDataParser : NSObject + + +#pragma mark - Properties + +/// Whether only error response should be processed or not. +@property(assign, nonatomic) BOOL errorOnly; + + +#pragma mark - Initialization and Configuration + +/// Create operation data parser. +/// +/// - Parameters: +/// - serializer: Service response data serializer to map response to the data model. +/// - resultClass: Class of object which represents API result (for data fetching requests). +/// - statusClass: Class of object which represents API request processing status (for non-data fetching requests) or +/// error status data. +/// - additionalData: Additional information which can be used by `aClass` custom initializer. +/// - Returns: Ready to use operation data parser. ++ (instancetype)parserWithSerializer:(id)serializer + result:(nullable Class)resultClass + status:(nullable Class)statusClass + withAdditionalData:(nullable NSDictionary *)additionalData; + +#pragma mark - Processing + +/// Parse service response. +/// +/// - Parameters: +/// - operation: Type of request operation. +/// - request: Actual request which has been used to access remote origin resource. +/// - response: Remote origin response with results of access to the resource. +/// - data: Response data provided by service. +/// - error: Transport-related request processing error (network issues, cancelled or timeout request, and etc.). +/// - Returns: Data object with service response parse results. +- (PNOperationDataParseResult *)parseOperation:(PNOperationType)operation + withRequest:(PNTransportRequest *)request + response:(nullable id)response + data:(nullable NSData *)data + error:(nullable PNError *)error; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/PNOperationDataParser.m b/PubNub/Network/Responses/PNOperationDataParser.m new file mode 100644 index 000000000..50d20725d --- /dev/null +++ b/PubNub/Network/Responses/PNOperationDataParser.m @@ -0,0 +1,339 @@ +#import "PNOperationDataParser.h" +#import +#import "PNBaseOperationData+Private.h" +#import "PNOperationResult+Private.h" +#import "PNErrorData+Private.h" +#import "PNStatus+Private.h" +#import "PNFunctions.h" +#import "PNXMLParser.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +@interface PNOperationDataParseResult () + + +#pragma mark - Properties + +/// API request processing result with de-serialized response data object. +/// +/// If there is no error and it is expected to have result data which object will be parsed from the service response. +@property(strong, nullable, nonatomic) ResultType result; + +/// API request processing status with de-serialized request status data. +/// +/// In case of error or non-fetching requests which object may contain request processing status data. +@property(strong, nullable, nonatomic) StatusType status; + + +#pragma mark - Initialization and Configuration + +/// Initialize parse result object. +/// +/// - Parameters: +/// - result: API request processing result with de-serialized response data object. +/// - status: API request processing status with de-serialized request status data. +/// - Returns: Initialized parse result object. +- (instancetype)initWithResult:(ResultType)result status:(StatusType)status; + +#pragma mark - + + +@end + +/// Remote service response parser private extension. +@interface PNOperationDataParser () + + +#pragma mark - Properties + +/// Service response data serializer to map response to the data model. +@property(strong, nonatomic, readonly) id serializer; + +/// Additional information which can be used by `aClass` custom initializer. +@property(strong, nullable, nonatomic) NSDictionary *additionalData; + +/// Class of object which represents API result (for data fetching requests). +@property(strong, nonatomic, readonly) Class resultClass; + +/// Class of object which represents API request processing status (for non-data fetching requests) or error status data. +@property(strong, nonatomic, readonly) Class statusClass; + + +#pragma mark - Initialization and Configuration + +/// Initialize operation data parser. +/// +/// - Parameters: +/// - serializer: Service response data serializer to map response to the data model. +/// - resultClass: Class of object which represents API result (for data fetching requests). +/// - statusClass: Class of object which represents API request processing status (for non-data fetching requests) or +/// error status data. +/// - additionalData: Additional information which can be used by `aClass` custom initializer. +/// - Returns: Initialized operation data parser. +- (instancetype)initWithSerializer:(id)serializer + result:(nullable Class)resultClass + status:(nullable Class)statusClass + withAdditionalData:(nullable NSDictionary *)additionalData; + + +#pragma mark - Helpers + +/// Create unexpected content type error data object. +/// +/// - Parameter error: Transport-related request processing error (network issues, cancelled or timeout request, and +/// etc.). +/// - Returns: Ready to use unexpected content type error data object. +- (PNErrorData *)errorDataWithUnexpectedServiceResponseError:(nullable PNError *)error; + +/// Create malformed service response error data. +/// +/// Parser wasn't able to map response to any of provided data classes. +/// +/// - Parameter error: Response de-serialization error. +/// - Returns: Ready to use malformed service response error data object. +- (PNErrorData *)errorDataWithMalformedServiceResponseError:(nullable PNError *)error; + +/// Create malformed service response error data. +/// +/// Parser wasn't able to map response to any of provided data classes. +/// +/// - Parameters: +/// - data: Service binary response in with XML data. +/// - error: Transport-related request processing error (network issues, cancelled or timeout request, and etc.). +/// - Returns: Ready to use malformed service response error data object. +- (PNErrorData *)errorDataWithXMLResponse:(NSData *)data error:(nullable PNError *)error; + +/// Check whether `response` contains JSON data or not. +/// +/// - Parameter response: Remote origin response with results of access to the resource. +/// - Returns: `YES` if content can be read as JSON data. +- (BOOL)isJSONResponse:(id)response; + +/// Check whether `response` contains XML data or not. +/// +/// - Parameter response: Remote origin response with results of access to the resource. +/// - Returns: `YES` if content can be read as XML data. +- (BOOL)isXMLResponse:(id)response; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNOperationDataParseResult + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithResult:(id)result status:(id)status { + if ((self = [super init])) { + _result = result; + _status = status; + } + + return self; +} + +#pragma mark - + + +@end + + +@implementation PNOperationDataParser + + +#pragma mark - Properties + +#pragma mark - Initialization and Configuration + ++ (instancetype)parserWithSerializer:(id)serializer + result:(Class)resultClass + status:(Class)statusClass + withAdditionalData:(nullable NSDictionary *)additionalData { + return [[self alloc] initWithSerializer:serializer + result:resultClass + status:statusClass + withAdditionalData:additionalData]; +} + +- (instancetype)initWithSerializer:(id)serializer + result:(Class)resultClass + status:(Class)statusClass + withAdditionalData:(NSDictionary *)additionalData { + if ((self = [super init])) { + _additionalData = additionalData; + _resultClass = resultClass; + _statusClass = statusClass; + _serializer = serializer; + } + + return self; +} + + +#pragma mark - Processing + +- (PNOperationDataParseResult *)parseOperation:(PNOperationType)operation + withRequest:(PNTransportRequest *)request + response:(nullable id)response + data:(nullable NSData *)data + error:(nullable PNError *)error { + BOOL ignoreBody = self.errorOnly && response.statusCode < 400; + NSDictionary *additional = self.additionalData; + BOOL expectingResult = self.resultClass != nil; + BOOL isJSON = [self isJSONResponse:response]; + BOOL isXML = !isJSON && [self isXMLResponse:response]; + BOOL malformedResponse = NO; + id resultData; + id statusData; + id result; + id status; + + if (error) statusData = [PNErrorData dataWithError:error]; + else if (!isJSON && !isXML && !ignoreBody) statusData = [self errorDataWithUnexpectedServiceResponseError:error]; + else if (isJSON && response.statusCode >= 400) { + statusData = [self.serializer objectOfClass:[PNErrorData class] + fromData:data + withAdditional:additional + error:&error]; + } else if (isJSON) { + error = nil; + + if (expectingResult) { + Class dataClass = [self.resultClass responseDataClass]; + resultData = [self.serializer objectOfClass:dataClass fromData:data withAdditional:additional error:&error]; + } + + if (error || (!expectingResult && !resultData)) { + Class dataClass = [self.statusClass statusDataClass]; + statusData = [self.serializer objectOfClass:dataClass fromData:data withAdditional:additional error:&error]; + if (error) malformedResponse = YES; + } + + // Fallback for case when only status expected but it can't be deserialized to the provided data class object. + if (error && !expectingResult) { + Class dataClass = [PNErrorData class]; + statusData = [self.serializer objectOfClass:dataClass fromData:data withAdditional:additional error:&error]; + if (malformedResponse) ((PNErrorData *)statusData).category = PNMalformedResponseCategory; + } + + if (!resultData && !statusData) statusData = [self errorDataWithMalformedServiceResponseError:error]; + } else if (response.statusCode >= 400 && isXML) { + statusData = [self errorDataWithXMLResponse:data error:error]; + } else if (!ignoreBody) statusData = [self errorDataWithMalformedServiceResponseError:error]; + + if (ignoreBody && !expectingResult && !statusData) { + statusData = [PNErrorData new]; + ((PNErrorData *)statusData).category = PNAcknowledgmentCategory; + } + + if (resultData) result = [self.resultClass objectWithOperation:operation response:resultData]; + else if (statusData) { + PNStatusCategory category = ((PNBaseOperationData *)statusData).category; + status = [self.statusClass objectWithOperation:operation category:category response:statusData]; + } + + return [[PNOperationDataParseResult alloc] initWithResult:result status:status]; +} + + +#pragma mark - Helpers + +- (PNErrorData *)errorDataWithUnexpectedServiceResponseError:(nullable PNError *)error { + NSDictionary *userInfo = PNErrorUserInfo( + @"Unexpected response data type.", + @"Received data with unexpected content type.", + @"Check response status code, request parameters and service status.", + error + ); + + return [PNErrorData dataWithError:[PNError errorWithDomain:PNAPIErrorDomain + code:PNAPIErrorMalformedServiceResponse + userInfo:userInfo]]; +} + +- (PNErrorData *)errorDataWithMalformedServiceResponseError:(PNError *)error { + NSMutableArray *types = [NSMutableArray new]; + + if ([self.resultClass responseDataClass]) [types addObject:NSStringFromClass([self.resultClass responseDataClass])]; + if ([self.statusClass statusDataClass]) [types addObject:NSStringFromClass([self.statusClass statusDataClass])]; + + NSDictionary *userInfo = PNErrorUserInfo( + @"Malformed service response.", + PNStringFormat(@"Received content can't be deserialized as: %@", [types componentsJoinedByString:@", "]), + @"Ensure that provided data type match to the used service.", + error + ); + + return [PNErrorData dataWithError:[PNError errorWithDomain:PNAPIErrorDomain + code:PNAPIErrorMalformedServiceResponse + userInfo:userInfo]]; +} + +- (PNErrorData *)errorDataWithXMLResponse:(NSData *)data error:(nullable PNError *)error { + PNXMLParser *parser = [PNXMLParser parserWithData:data]; + PNXML *parsedXML = [parser parse]; + NSString *errorMessage = [parsedXML valueForKeyPath:@"Error.Message"]; + NSString *failureReason = nil; + + if (errorMessage) failureReason = errorMessage; + else failureReason = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + + NSDictionary *userInfo = PNErrorUserInfo( + @"Shared file storage error.", + failureReason, + @"Ensure that provided data type match to the used service.", + error + ); + + return [PNErrorData dataWithError:[PNError errorWithDomain:PNStorageErrorDomain + code:PNStorageErrorAccess + userInfo:userInfo]]; +} + +- (BOOL)isJSONResponse:(id)response { + NSString *contentType = response.headers[@"content-type"]; + static NSArray *_jsonContentTypes; + static dispatch_once_t onceToken; + BOOL isJSONResponse = NO; + + dispatch_once(&onceToken, ^{ + _jsonContentTypes = @[@"application/json", @"text/json", @"text/javascript"]; + }); + + for (NSString *type in _jsonContentTypes) { + if ((isJSONResponse = [contentType containsString:type])) break; + } + + return isJSONResponse; +} + +- (BOOL)isXMLResponse:(id)response { + NSString *contentType = response.headers[@"content-type"]; + static NSArray *_xmlContentTypes; + static dispatch_once_t onceToken; + BOOL isXMLResponse = NO; + + dispatch_once(&onceToken, ^{ + _xmlContentTypes = @[@"application/xml", @"text/xml"]; + }); + + for (NSString *type in _xmlContentTypes) { + if ((isXMLResponse = [contentType containsString:type])) break; + } + + return isXMLResponse; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Presence/PNPresenceHereNowFetchData+Private.h b/PubNub/Network/Responses/Presence/PNPresenceHereNowFetchData+Private.h new file mode 100644 index 000000000..c12d3581b --- /dev/null +++ b/PubNub/Network/Responses/Presence/PNPresenceHereNowFetchData+Private.h @@ -0,0 +1,61 @@ +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Channel presence information private extension. +@interface PNPresenceChannelData (Private) + + +#pragma mark - Helpers + +/// Presence information details level. +@property(assign, nonatomic, readonly) PNHereNowVerbosityLevel verbosityLevel; + +/// Represent presence information as dictionary. +/// +/// - Returns: Dictionary representation which depends from presence information details level. +- (NSDictionary *)dictionaryRepresentation; + +#pragma mark - + + +@end + + +#pragma mark - Private interface declaration + +/// Here now presence request response private extensino. +@interface PNPresenceHereNowFetchData (Private) + + +#pragma mark - Properies + +/// Presence information details level. +@property(assign, nonatomic, readonly) PNHereNowVerbosityLevel verbosityLevel; + + +#pragma mark - Helpers + +/// Update channels presence. +/// +/// Server response for single channel doesn't contain channel name. This method unify response by setting name. +/// +/// - Parameter channelName: Name of the channel for which presence information has been received. +- (void)setPresenceChannel:(NSString *)channelName; + +/// Represent presence information as dictionary. +/// +/// - Returns: Dictionary representation which depends from presence information details level. +- (NSDictionary *)dictionaryRepresentation; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Presence/PNPresenceHereNowFetchData.h b/PubNub/Network/Responses/Presence/PNPresenceHereNowFetchData.h new file mode 100644 index 000000000..65e059076 --- /dev/null +++ b/PubNub/Network/Responses/Presence/PNPresenceHereNowFetchData.h @@ -0,0 +1,70 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// User presence information. +@interface PNPresenceUUIDData : NSObject + + +#pragma mark - Properties + +/// State which has been associated with user while he is active in specific channel. +@property(strong, nonatomic, nullable, readonly) id state; + +/// Unique user identifier. +@property(strong, nonatomic, readonly) NSString *uuid; + +#pragma mark - + + +@end + + +#pragma mark - Interface declaration + +/// Channel presence information. +@interface PNPresenceChannelData : NSObject + + +#pragma mark - Properties + +/// List of active users. +@property(strong, nonatomic, nullable, readonly) NSArray *uuids; + +/// Number of active users in channel. +@property(strong, nonatomic, readonly) NSNumber *occupancy; + +#pragma mark - + + +@end + + +#pragma mark - Interface declaration + +/// Here now presence request response. +@interface PNPresenceHereNowFetchData : PNBaseOperationData + + +#pragma mark - Properties + +/// Active channels list. +/// +/// Each dictionary key represent channel name and it's value is presence information for it. +@property(strong, nonatomic, readonly) NSDictionary *channels; + +/// Total number of subscribers. +@property(strong, nonatomic, readonly) NSNumber *totalOccupancy; + +/// Total number of active channels. +@property(strong, nonatomic, readonly) NSNumber *totalChannels; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Presence/PNPresenceHereNowFetchData.m b/PubNub/Network/Responses/Presence/PNPresenceHereNowFetchData.m new file mode 100644 index 000000000..62efb725d --- /dev/null +++ b/PubNub/Network/Responses/Presence/PNPresenceHereNowFetchData.m @@ -0,0 +1,353 @@ +#import "PNPresenceHereNowFetchData+Private.h" +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// User presence information private extension. +@interface PNPresenceUUIDData () + + +#pragma mark - Properties + +/// Presence information details level. +@property(assign, nonatomic) PNHereNowVerbosityLevel verbosityLevel; + +/// State which has been associated with user while he is active in specific channel. +@property(strong, nonatomic, nullable) id state; + +/// Unique user identifier. +@property(strong, nonatomic) NSString *uuid; + + +#pragma mark - Initialization and Configuration + +/// Initialize user presence information object. +/// +/// - Parameters: +/// - uuid: Unique user identifier. +/// - state: State associated with user at channel. +/// - Returns: Initialized user presence information object. +- (instancetype)initWithUUID:(NSString *)uuid state:(nullable id)state; + + +#pragma mark - Helpers + +/// Represent presence information as dictionary. +/// +/// - Returns: Dictionary representation which depends from presence information details level. +- (NSDictionary *)dictionaryRepresentation; + +#pragma mark - + + +@end + + +#pragma mark - Private interface declaration + +/// Channel presence information private extension. +@interface PNPresenceChannelData () + + +#pragma mark - Properties + +/// List of active users. +@property(strong, nonatomic, nullable) NSArray *uuids; + +/// Presence information details level. +@property(assign, nonatomic) PNHereNowVerbosityLevel verbosityLevel; + +/// Number of active users in channel. +@property(strong, nonatomic) NSNumber *occupancy; + + +#pragma mark - Initialization and Configuration + +/// Initialize channel presence information object. +/// +/// - Parameters: +/// - uuids: Active channel users presence information. +/// - occupancy: Number of active users. +/// - Returns: Initialized channel presence information object. +- (instancetype)initWithUsers:(nullable NSArray *)uuids occupancy:(NSNumber *)occupancy; + +#pragma mark - + + +@end + + +#pragma mark - Private interface declaration + +/// Here now presence request response private extension. +@interface PNPresenceHereNowFetchData () + + +#pragma mark - Properties + +/// Active channels list. +/// +/// Each dictionary key represent channel name and it's value is presence information for it. +@property(strong, nonatomic) NSDictionary *channels; + +/// Presence information details level. +@property(assign, nonatomic) PNHereNowVerbosityLevel verbosityLevel; + +/// Total number of subscribers. +@property(strong, nonatomic) NSNumber *totalOccupancy; + +/// Total number of active channels. +@property(strong, nonatomic) NSNumber *totalChannels; + + +#pragma mark - Initialization and Configuration + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNPresenceUUIDData + + +#pragma mark - Properties + ++ (NSArray *)ignoredKeys { + return @[@"verbosityLevel"]; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithUUID:(NSString *)uuid state:(id)state { + if ((self = [super init])) { + _verbosityLevel = PNHereNowUUID; + _uuid = [uuid copy]; + _state = state; + } + + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + NSDictionary *responseWithState = [coder decodeObjectOfClass:[NSDictionary class]]; + PNHereNowVerbosityLevel level = PNHereNowUUID; + NSString *uuid; + id state; + + if (responseWithState) { + state = responseWithState[@"state"]; + uuid = responseWithState[@"uuid"]; + level = PNHereNowState; + } else uuid = [coder decodeObjectOfClass:[NSString class]]; + + if (!uuid) return nil; + + PNPresenceUUIDData *data = [self initWithUUID:uuid state:state]; + data.verbosityLevel = level; + + return data; +} + + +#pragma mark - Helpers + +- (NSDictionary *)dictionaryRepresentation { + NSMutableDictionary *dictionary = [@{ @"uuid": self.uuid } mutableCopy]; + if (self.state) dictionary[@"state"] = self.state; + + return dictionary; +} + +#pragma mark - + + +@end + + +#pragma mark - Interface implementation + +@implementation PNPresenceChannelData + + +#pragma mark - Properties + ++ (NSArray *)ignoredKeys { + return @[@"verbosityLevel"]; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithUsers:(nullable NSArray *)uuids occupancy:(NSNumber *)occupancy { + if ((self = [super init])) { + _uuids = uuids.count ? uuids : nil; + _occupancy = occupancy; + } + + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + __block NSMutableArray *usersPresence = [NSMutableArray new]; + NSDictionary *response = [coder decodeObjectOfClass:[NSDictionary class]]; + __block PNHereNowVerbosityLevel level = PNHereNowOccupancy; + NSNumber *occupancy = response[@"occupancy"]; + + if (response[@"uuids"]) { + NSArray *array = response[@"uuids"]; + if (![array isKindOfClass:[NSArray class]]) return nil; + + [array enumerateObjectsUsingBlock:^(id data, __unused NSUInteger idx, BOOL *stop) { + PNPresenceUUIDData *userPresence = [PNJSONDecoder decodedObjectOfClass:[PNPresenceUUIDData class] + fromDictionary:data + withError:nil]; + + if (userPresence) { + [usersPresence addObject:userPresence]; + level = userPresence.verbosityLevel; + } else usersPresence = nil; + *stop = usersPresence == nil; + }]; + } + + if (!usersPresence) return nil; + + PNPresenceChannelData *channelPresence = [self initWithUsers:usersPresence occupancy:occupancy]; + channelPresence.verbosityLevel = level; + + return channelPresence; +} + + +#pragma mark - Helpers + +- (NSDictionary *)dictionaryRepresentation { + NSMutableDictionary *dictionary = [@{ @"occupancy": self.occupancy } mutableCopy]; + + if (self.uuids.count) { + if (self.verbosityLevel == PNHereNowUUID) dictionary[@"uuids"] = [self.uuids valueForKey:@"uuid"]; + else dictionary[@"uuids"] = [self.uuids valueForKey:@"dictionaryRepresentation"]; + } + + return dictionary; +} + +#pragma mark - + + +@end + + +#pragma mark - Interface implementation + +@implementation PNPresenceHereNowFetchData + + +#pragma mark - Properties + ++ (NSArray *)ignoredKeys { + return @[@"verbosityLevel"]; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithChannels:(NSDictionary *)channels totalOccupancy:(NSNumber *)totalOccupancy totalChannels:(NSNumber *)totalChannels { + if ((self = [super init])) { + _channels = channels.count ? channels : nil; + _totalOccupancy = totalOccupancy; + _totalChannels = totalChannels; + } + + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + NSDictionary *response = [coder decodeObjectOfClass:[NSDictionary class]]; + if (!response) return nil; + + __block NSMutableDictionary *channelsPresence = [NSMutableDictionary new]; + __block PNHereNowVerbosityLevel level = PNHereNowOccupancy; + NSArray *keys = [coder keys]; + NSNumber *totalOccupancy; + NSNumber *totalChannels; + + if ([keys containsObject:@"payload"]) { + NSDictionary *dictionary = response[@"payload"]; + if (![dictionary isKindOfClass:[NSDictionary class]] || !dictionary[@"channels"]) return nil; + + NSDictionary *channels = dictionary[@"channels"]; + totalOccupancy = dictionary[@"total_occupancy"]; + totalChannels = dictionary[@"total_channels"]; + + if (![channels isKindOfClass:[NSDictionary class]]) return nil; + + [channels enumerateKeysAndObjectsUsingBlock:^(NSString *channel, NSDictionary *data, BOOL *stop) { + PNPresenceChannelData *channelPresence = [PNJSONDecoder decodedObjectOfClass:[PNPresenceChannelData class] + fromDictionary:data + withError:nil]; + if (channelPresence) { + channelsPresence[channel] = channelPresence; + level = channelPresence.verbosityLevel; + } else channelsPresence = nil; + *stop = channelsPresence == nil; + }]; + } else if ([keys containsObject:@"uuids"] || [keys containsObject:@"occupancy"]) { + PNPresenceChannelData *channelPresence = [PNJSONDecoder decodedObjectOfClass:[PNPresenceChannelData class] + fromDictionary:response + withError:nil]; + if (channelPresence){ + totalOccupancy = channelPresence.occupancy; + channelsPresence[@""] = channelPresence; + totalChannels = @1; + } else channelsPresence = nil; + } + + if (!channelsPresence) return nil; + + PNPresenceHereNowFetchData *presence = [self initWithChannels:channelsPresence + totalOccupancy:totalOccupancy + totalChannels:totalChannels]; + presence.verbosityLevel = level; + + return presence; +} + + +#pragma mark - Helpers + +- (void)setPresenceChannel:(NSString *)channelName { + if (self.channels[@""]) self.channels = @{ channelName: self.channels[@""] }; +} + +- (NSDictionary *)dictionaryRepresentation { + NSMutableDictionary *dictionary = [@{ + @"totalOccupancy": self.totalOccupancy, @"totalChannels": self.totalChannels + } mutableCopy]; + + if (self.channels.count) { + NSMutableDictionary *channels = [NSMutableDictionary dictionaryWithCapacity:self.channels.count]; + [self.channels enumerateKeysAndObjectsUsingBlock:^(NSString *channel, PNPresenceChannelData *data, BOOL *stop) { + channels[channel] = [data dictionaryRepresentation]; + }]; + dictionary[@"channels"] = channels; + } + + return dictionary; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Presence/PNPresenceUserStateFetchData+Private.h b/PubNub/Network/Responses/Presence/PNPresenceUserStateFetchData+Private.h new file mode 100644 index 000000000..039ea1f77 --- /dev/null +++ b/PubNub/Network/Responses/Presence/PNPresenceUserStateFetchData+Private.h @@ -0,0 +1,24 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Fetch user presence state` request response private extension. +@interface PNPresenceUserStateFetchData (Private) + + +#pragma mark - Properties + +/// Name of the channel for which user's state has been requested. +/// +/// > Note: This value will be `nil` if state requested for multiple channels / channel group. +@property(strong, nullable, nonatomic, readonly) NSString *channel; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Presence/PNPresenceUserStateFetchData.h b/PubNub/Network/Responses/Presence/PNPresenceUserStateFetchData.h new file mode 100644 index 000000000..7f8839422 --- /dev/null +++ b/PubNub/Network/Responses/Presence/PNPresenceUserStateFetchData.h @@ -0,0 +1,30 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Fetch user presence state` request response. +@interface PNPresenceUserStateFetchData : PNBaseOperationData + + +#pragma mark - Properties + +/// Per-channel user presence state information. +/// +/// > Note: Each key is the name of channel and value is `state` associated with user on channel. +/// > Important: Value will be set to `nil` in case if presence state requested for single channel. +@property(strong, nullable, nonatomic, readonly) NSDictionary *channels; + +/// User presence state information for specific channel. +/// +/// > Note: Each key is the name of channel and value is `state` associated with user on channel. +/// > Important: Value will be set to `nil` in case if presence state requested for multiple channels / channel groups. +@property(strong, nullable, nonatomic, readonly) NSDictionary *state; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Presence/PNPresenceUserStateFetchData.m b/PubNub/Network/Responses/Presence/PNPresenceUserStateFetchData.m new file mode 100644 index 000000000..6dbc461f0 --- /dev/null +++ b/PubNub/Network/Responses/Presence/PNPresenceUserStateFetchData.m @@ -0,0 +1,79 @@ +#import "PNPresenceUserStateFetchData+Private.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Fetch user presence state` request response private extension. +@interface PNPresenceUserStateFetchData () + + +#pragma mark - Properties + +/// Per-channel or single channel presence state information. +@property(strong, nullable, nonatomic) NSDictionary *presenceState; + +/// Name of the channel for which user's state has been requested. +/// +/// > Note: This value will be `nil` if state requested for multiple channels / channel group. +@property(strong, nullable, nonatomic) NSString *channel; + + +#pragma mark - Initialization and Configuration + +/// Initialize user's presence information object. +/// +/// - Parameters: +/// - state: Per-channel or single channel user's presence state. +/// - channel: Name of the channel for which user's state has been requested. +/// - Returns: Initialized user's presence information object. +- (instancetype)initWithPresenceState:(NSDictionary *)state forChannel:(nullable NSString *)channel; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNPresenceUserStateFetchData + + +#pragma mark - Properties + +- (NSDictionary *)state { + return self.channel ? self.presenceState : nil; +} + +- (NSDictionary *)channels { + return !self.channel ? self.presenceState : nil; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithPresenceState:(NSDictionary *)state forChannel:(nullable NSString *)channel { + if ((self = [super init])) { + _presenceState = state; + _channel = channel; + } + + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + NSDictionary *payload = [coder decodeObjectOfClass:[NSDictionary class]]; + if (![payload isKindOfClass:[NSDictionary class]] || !payload[@"payload"]) return nil; + + return [self initWithPresenceState:!payload[@"channel"] ? payload[@"payload"][@"channels"] : payload[@"payload"] + forChannel:payload[@"channel"]]; +} + +#pragma mark - + +@end diff --git a/PubNub/Network/Responses/Presence/PNPresenceUserStateSetData.h b/PubNub/Network/Responses/Presence/PNPresenceUserStateSetData.h new file mode 100644 index 000000000..92affc486 --- /dev/null +++ b/PubNub/Network/Responses/Presence/PNPresenceUserStateSetData.h @@ -0,0 +1,22 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `User presence state update` request response. +@interface PNPresenceUserStateSetData : PNBaseOperationData + + +#pragma mark - Properties + +/// Presence state which has been associated with user. +@property(strong, nullable, nonatomic, readonly) NSDictionary *state; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Presence/PNPresenceUserStateSetData.m b/PubNub/Network/Responses/Presence/PNPresenceUserStateSetData.m new file mode 100644 index 000000000..b70bf4d9b --- /dev/null +++ b/PubNub/Network/Responses/Presence/PNPresenceUserStateSetData.m @@ -0,0 +1,35 @@ +#import "PNPresenceUserStateSetData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `User presence state update` request response private extension. +@interface PNPresenceUserStateSetData () + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNPresenceUserStateSetData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ @"state": @"payload" }; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Presence/PNPresenceWhereNowFetchData.h b/PubNub/Network/Responses/Presence/PNPresenceWhereNowFetchData.h new file mode 100644 index 000000000..325e5c792 --- /dev/null +++ b/PubNub/Network/Responses/Presence/PNPresenceWhereNowFetchData.h @@ -0,0 +1,22 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Here now presence request response. +@interface PNPresenceWhereNowFetchData : PNBaseOperationData + + +#pragma mark - Properties + +/// List of channels where requested user is present. +@property(strong, nonatomic, readonly) NSArray *channels; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Presence/PNPresenceWhereNowFetchData.m b/PubNub/Network/Responses/Presence/PNPresenceWhereNowFetchData.m new file mode 100644 index 000000000..a0d3c08fd --- /dev/null +++ b/PubNub/Network/Responses/Presence/PNPresenceWhereNowFetchData.m @@ -0,0 +1,69 @@ +#import "PNPresenceWhereNowFetchData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Response `payload` object. +@interface PNPresenceWhereNowPayload: NSObject + + +#pragma mark - Properties + +/// List of channels where requested user is present. +@property(strong, nonatomic, readonly) NSArray *channels; + +#pragma mark - + + +@end + + +/// Here now presence request response private extension. +@interface PNPresenceWhereNowFetchData () + + +#pragma mark - Properties + +/// Payload with service-provided in response on request. +@property(strong, nonatomic, readonly) PNPresenceWhereNowPayload *payload; + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNPresenceWhereNowPayload + + +#pragma mark - + + +@end + + +@implementation PNPresenceWhereNowFetchData + + +#pragma mark - Properties + ++ (NSArray *)ignoredKeys { + return @[@"channels"]; +} + +- (NSArray *)channels { + return self.payload.channels; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Publish/PNPublishData.h b/PubNub/Network/Responses/Publish/PNPublishData.h new file mode 100644 index 000000000..f08790078 --- /dev/null +++ b/PubNub/Network/Responses/Publish/PNPublishData.h @@ -0,0 +1,22 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface implementation + +/// Data publish request response. +@interface PNPublishData : PNBaseOperationData + + +#pragma mark - Properties + +/// High-precision **PubNub** time token of published data. +@property(strong, nonatomic, readonly) NSNumber *timetoken; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Publish/PNPublishData.m b/PubNub/Network/Responses/Publish/PNPublishData.m new file mode 100644 index 000000000..fb53f1a33 --- /dev/null +++ b/PubNub/Network/Responses/Publish/PNPublishData.m @@ -0,0 +1,75 @@ +#import "PNPublishData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Data publish request response private extension. +@interface PNPublishData () + + +#pragma mark - Properties + +/// High-precision **PubNub** time token of published data. +@property(strong, nonatomic) NSNumber *timetoken; + + +#pragma mark - Initialization and Configuration + +/// Initialize publish request response object. +/// +/// - Parameter timetoken: High-precision **PubNub** time token of published data. +/// - Returns: Initialized publish data object. +- (instancetype)initWithTimetoken:(NSNumber *)timetoken; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNPublishData + + +#pragma mark - Properties + ++ (NSArray *)optionalKeys { + return @[@"timetoken"]; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithTimetoken:(NSNumber *)timetoken { + if ((self = [super init])) _timetoken = timetoken; + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + id payload = [coder decodeObjectOfClass:[NSArray class]]; + NSNumber *timeToken = @(-1); + + if ([payload isKindOfClass:[NSArray class]]) { + NSArray *array = payload; + + if(array.count == 3 && [array[0] isEqual:@1] && [array[2] isKindOfClass:[NSString class]]) { + const char *token = [array[2] cStringUsingEncoding:NSUTF8StringEncoding]; + timeToken = @(strtoull(token, NULL, 0)); + } + } + + if ([timeToken isEqual:@(-1)]) return nil; + + return [self initWithTimetoken:timeToken]; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Push Notification/PNPushNotificationFetchData.h b/PubNub/Network/Responses/Push Notification/PNPushNotificationFetchData.h new file mode 100644 index 000000000..e9e36b7d5 --- /dev/null +++ b/PubNub/Network/Responses/Push Notification/PNPushNotificationFetchData.h @@ -0,0 +1,22 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Fetch time request response data. +@interface PNPushNotificationFetchData : PNBaseOperationData + + +#pragma mark - Properties + +/// Channels with active push notifications. +@property(strong, nonatomic, readonly) NSArray *channels; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Push Notification/PNPushNotificationFetchData.m b/PubNub/Network/Responses/Push Notification/PNPushNotificationFetchData.m new file mode 100644 index 000000000..251e8d856 --- /dev/null +++ b/PubNub/Network/Responses/Push Notification/PNPushNotificationFetchData.m @@ -0,0 +1,67 @@ +#import "PNPushNotificationFetchData.h" +#import "PNCodable.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Fetch time request response data private extension. +@interface PNPushNotificationFetchData () + + +#pragma mark - Properties + +/// Channels with active push notifications. +@property(strong, nonatomic) NSArray *channels; + + +#pragma mark - Initialization and Configuration + +/// Initialize APNS enabled channels request response object. +/// +/// - Parameter channels: List of APNS enabled channels +/// - Returns: Initialized APNS enabled channels data object. +- (instancetype)initWithChannels:(NSArray *)channels; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNPushNotificationFetchData + + +#pragma mark - Properties + ++ (NSArray *)optionalKeys { + return @[@"channels"]; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithChannels:(NSArray *)channels { + if ((self = [super init])) { + _channels = channels; + } + + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + id payload = [coder decodeObjectOfClass:[NSArray class]]; + + if (![payload isKindOfClass:[NSArray class]]) return nil; + return [self initWithChannels:payload]; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Signal/PNSignalData.h b/PubNub/Network/Responses/Signal/PNSignalData.h new file mode 100644 index 000000000..3fdebe5e1 --- /dev/null +++ b/PubNub/Network/Responses/Signal/PNSignalData.h @@ -0,0 +1,17 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Data signal request response. +@interface PNSignalData : PNPublishData + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Signal/PNSignalData.m b/PubNub/Network/Responses/Signal/PNSignalData.m new file mode 100644 index 000000000..ce3f6803c --- /dev/null +++ b/PubNub/Network/Responses/Signal/PNSignalData.m @@ -0,0 +1,12 @@ +#import "PNSignalData.h" + + +#pragma mark Interface implementation + +@implementation PNSignalData + + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeCursorData.h b/PubNub/Network/Responses/Subscribe/PNSubscribeCursorData.h new file mode 100644 index 000000000..294c64f13 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeCursorData.h @@ -0,0 +1,27 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Subscribe request time cursor response. +/// +/// Object used to represent subscription cursor information. +@interface PNSubscribeCursorData : PNBaseOperationData + + +#pragma mark - Properties + +/// High-precision **PubNub** time token of published data. +@property(strong, nonatomic, readonly) NSNumber *timetoken; + +/// Data center region for which `timetoken` has been generated. +@property(strong, nonatomic, readonly) NSNumber *region; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeCursorData.m b/PubNub/Network/Responses/Subscribe/PNSubscribeCursorData.m new file mode 100644 index 000000000..6a6024068 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeCursorData.m @@ -0,0 +1,38 @@ +#import "PNSubscribeCursorData.h" +#import "PNCodable.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Subscribe request time cursor response private extension. +@interface PNSubscribeCursorData () + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNSubscribeCursorData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ + @"timetoken": @"t", + @"region": @"r" + }; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeData.h b/PubNub/Network/Responses/Subscribe/PNSubscribeData.h new file mode 100644 index 000000000..3b8bd761c --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeData.h @@ -0,0 +1,29 @@ +#import +#import +#import "PNSubscribeCursorData.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Subscribe request response. +@interface PNSubscribeData : PNBaseOperationData + + +#pragma mark - Properties + +/// List with received real-time updates. +@property(strong, nonatomic, readonly) NSArray *updates; + +/// Next subscription cursor. +/// +/// The cursor contains information about the start of the next real-time update timeframe. +@property(strong, nonatomic, readonly) PNSubscribeCursorData *cursor; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeData.m b/PubNub/Network/Responses/Subscribe/PNSubscribeData.m new file mode 100644 index 000000000..c93ef1549 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeData.m @@ -0,0 +1,245 @@ +#import "PNSubscribeData.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import +#ifndef PUBNUB_DISABLE_LOGGER +#import +#import "PNLogMacro.h" +#endif // PUBNUB_DISABLE_LOGGER +#import "PNSubscribeMessageEventData+Private.h" +#import "PNSubscribeFileEventData+Private.h" +#import "PNSubscribeEventData+Private.h" +#import "PNPrivateStructures.h" +#import "PNConstants.h" +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Subscribe request response private extenson. +@interface PNSubscribeData () + + +#pragma mark - Properties + +/// List with received real-time updates. +@property(strong, nonatomic) NSArray *updates; + +/// Next subscription cursor. +/// +/// The cursor contains information about the start of the next real-time update timeframe. +@property(strong, nonatomic) PNSubscribeCursorData *cursor; + + +#pragma mark - Initialization and Configuration + +/// Initialize `Subscribe` data object. +/// +/// - Parameters: +/// - updates: Received real-time updates. +/// - cursor: Next subscription cursor. +/// - Returns: Initialized `Subscribe` data object. +- (instancetype)initWithUpdates:(NSArray *)updates cursor:(PNSubscribeCursorData *)cursor; + + +#pragma mark - Helpers + +/// Decrypt payload. +/// +/// - Parameters: +/// - data: Previously encrypted data. +/// - cryptoModule: cryptor which should be used to decrypt data. +/// - error: If an error occurs, upon return contains an `NSError` object that describes the problem. +/// - Returns: Decrypted payload or original `data` if `cryptoModule` not set. +- (id)decryptedMessageFromData:(id)data + withCryptoModule:(nullable id)cryptoModule + error:(NSError **)error; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNSubscribeData + + +#pragma mark - Initialization and Configuration + +- (instancetype)initWithUpdates:(NSArray *)updates cursor:(PNSubscribeCursorData *)cursor { + if ((self = [super init])) { + _updates = updates; + _cursor = cursor; + } + + return self; +} + +- (instancetype)initObjectWithCoder:(id)coder { + id cryptoModule = coder.additionalData[@"cryptoModule"]; + NSDictionary *payload = [coder decodeObjectOfClass:[NSDictionary class]]; + if (![payload isKindOfClass:[NSDictionary class]] || !payload[@"t"] || !payload[@"m"]) return nil; + + __block NSError *error; + PNSubscribeCursorData *cursor = [PNJSONDecoder decodedObjectOfClass:[PNSubscribeCursorData class] + fromDictionary:payload[@"t"] + withError:&error]; + if (error) return nil; + + NSArray *receivedUpdates = payload[@"m"]; + NSMutableArray *updates = [NSMutableArray arrayWithCapacity:receivedUpdates.count]; + + [receivedUpdates enumerateObjectsUsingBlock:^(NSDictionary *update, __unused NSUInteger idx, __unused BOOL *stop) { + PNMessageType messageType = ((NSNumber *)update[@"e"]).unsignedIntegerValue; + NSMutableDictionary *patchedUpdate = [update mutableCopy]; + NSString *channel = update[@"c"]; + id updatePayload = update[@"d"]; + PNSubscribeEventData *data; + NSError *decryptionError; + Class dataClass; + + [patchedUpdate removeObjectForKey:@"d"]; + if (messageType == PNRegularMessageType && [PNChannel isPresenceObject:channel]) { + NSMutableDictionary *presenceData = [updatePayload mutableCopy]; + dataClass = [PNSubscribePresenceEventData class]; + messageType = PNPresenceMessageType; + + if (presenceData[@"data"]) presenceData[@"state"] = presenceData[@"data"]; + + // Rearrange for deserialization model. + [patchedUpdate addEntriesFromDictionary:@{ + @"action": updatePayload[@"action"], + @"presence": presenceData + }]; + } else if (!update[@"e"] || messageType == PNRegularMessageType || messageType == PNSignalMessageType) { + if (!update[@"e"]) messageType = PNRegularMessageType; + dataClass = messageType == PNRegularMessageType ? [PNSubscribeMessageEventData class] + : [PNSubscribeSignalEventData class]; + + if (messageType == PNRegularMessageType) { + updatePayload = [self decryptedMessageFromData:updatePayload + withCryptoModule:cryptoModule + error:&decryptionError]; + } + + // Rearrange for deserialization model. + [patchedUpdate addEntriesFromDictionary:@{ @"message": updatePayload }]; + } else if (messageType == PNObjectMessageType) { + NSMutableDictionary *membershipData = [updatePayload mutableCopy]; + dataClass = [PNSubscribeObjectEventData class]; + + // Rearrange for deserialization model. + if (membershipData[@"data"][@"uuid"]) { + NSMutableDictionary *data = [membershipData[@"data"] mutableCopy]; + data[@"_uuid"] = data[@"uuid"]; + [data removeObjectForKey:@"uuid"]; + membershipData[@"data"] = data; + } + + // Rearrange for deserialization model. + [patchedUpdate addEntriesFromDictionary:membershipData]; + } else if (messageType == PNMessageActionType) { + dataClass = [PNSubscribeMessageActionEventData class]; + + // Rearrange for deserialization model. + NSMutableDictionary *actionEventData = [updatePayload mutableCopy]; + NSMutableDictionary *actionData = [actionEventData[@"data"] mutableCopy]; + actionData[@"uuid"] = update[@"i"]; + actionEventData[@"data"] = actionData; + + [patchedUpdate addEntriesFromDictionary:actionEventData]; + } else if (messageType == PNFileMessageType) { + dataClass = [PNSubscribeFileEventData class]; + updatePayload = [self decryptedMessageFromData:updatePayload + withCryptoModule:cryptoModule + error:&decryptionError]; + + // Rearrange for deserialization model. + [patchedUpdate addEntriesFromDictionary:updatePayload]; + } + + data = [PNJSONDecoder decodedObjectOfClass:dataClass fromDictionary:patchedUpdate withError:&error]; + + if (data && !error) { + data.messageType = @(messageType); + + if (decryptionError) { + if (messageType == PNFileMessageType) ((PNSubscribeFileEventData *)data).decryptionError = YES; + ((PNSubscribeMessageEventData *)data).decryptionError = YES; + } + + [updates addObject:data]; + } + else if (error) *stop = YES; + }]; + + return !error ? [self initWithUpdates:updates cursor:cursor] : nil; +} + + +#pragma mark - Helpers + +- (id)decryptedMessageFromData:(id)data withCryptoModule:(id)cryptoModule error:(NSError **)error { + if (!cryptoModule) return data; + + BOOL isDictionary = [data isKindOfClass:[NSDictionary class]]; + NSError *decryptionError; + id decryptedEvent = nil; + id encryptedData = isDictionary ? ((NSDictionary *)data)[@"pn_other"] : data; + + if ([encryptedData isKindOfClass:[NSString class]]) { + NSCharacterSet *trimCharSet = [NSCharacterSet characterSetWithCharactersInString:@"\""]; + encryptedData = [PNString base64DataFrom:[encryptedData stringByTrimmingCharactersInSet:trimCharSet]]; + PNResult *decryptResult = [cryptoModule decryptData:encryptedData]; + NSString *decryptedEventData = nil; + + if (decryptResult.isError) decryptionError = decryptResult.error; + else decryptedEventData = [[NSString alloc] initWithData:decryptResult.data encoding:NSUTF8StringEncoding]; + + if (decryptedEventData && ![decryptedEventData isEqualToString:encryptedData]) { + decryptedEvent = [PNJSON JSONObjectFrom:decryptedEventData withError:nil]; + } + } + + if (decryptionError || !decryptedEvent) { + if (!decryptionError) { + decryptionError = [NSError errorWithDomain:PNCryptorErrorDomain code:PNCryptorErrorDecryption userInfo:nil]; + } + +#ifndef PUBNUB_DISABLE_LOGGER + PNLLogger *logger = [PNLLogger loggerWithIdentifier:kPNClientIdentifier]; + [logger enableLogLevel:PNAESErrorLogLevel]; + PNLogAESError(logger, @" Message decryption error: %@", decryptionError); +#endif // PUBNUB_DISABLE_LOGGER + *error = decryptionError; + + return isDictionary ? ((NSDictionary *)data)[@"pn_other"] : data; + } else if (isDictionary) { + NSMutableDictionary *mutableData = [(NSDictionary *)data mutableCopy]; + [mutableData removeObjectForKey:@"pn_other"]; + + if (![decryptedEvent isKindOfClass:[NSDictionary class]]) mutableData[@"pn_other"] = decryptedEvent; + else [mutableData addEntriesFromDictionary:decryptedEvent]; + + decryptedEvent = [mutableData copy]; + } + + return decryptedEvent; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeEventData+Private.h b/PubNub/Network/Responses/Subscribe/PNSubscribeEventData+Private.h new file mode 100644 index 000000000..9b9728f58 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeEventData+Private.h @@ -0,0 +1,46 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// General real-time subscription update private extension. +@interface PNSubscribeEventData () + + +#pragma mark - Properties + +/// User-defined (local) `publish` time. +@property(strong, nullable, nonatomic, readonly) PNSubscribeCursorData *userTimetoken; + +/// Event `publish` time. +/// +/// This is the time when message has been received by **PubNub** network. +@property(strong, nonatomic, readonly) PNSubscribeCursorData *publishTimetoken; + +/// Identifier of client which sent message (set only for publish). +@property(strong, nullable, nonatomic, readonly) NSString *senderIdentifier; + +/// Sequence nubmer of published messages (clients keep track of their own value locally). +@property(strong, nullable, nonatomic, readonly) NSNumber *sequenceNumber; + +/// Shard number on which the event has been stored. +@property(strong, nonatomic, readonly) NSString *shardIdentifier; + +/// PubNub defined event type. +@property(strong, nullable, nonatomic) NSNumber *messageType; + +/// A numeric representation of enabled debug flags. +@property(strong, nonatomic, readonly) NSNumber *debugFlags; + +/// Stores reference on **PubNub** server region identifier (which generated `timetoken` value). +@property (nonatomic, readonly) NSNumber *region; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeEventData.h b/PubNub/Network/Responses/Subscribe/PNSubscribeEventData.h new file mode 100644 index 000000000..21c4ed4d8 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeEventData.h @@ -0,0 +1,39 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// General real-time subscription update. +/// +/// Object conatins general information which is common for every entry in subscription request response. +@interface PNSubscribeEventData : PNBaseOperationData + + +#pragma mark - Properties + +/// User provided message type (set only when `publish` called with `meta`). +@property (nonatomic, nullable, readonly, strong) NSDictionary *userMetadata; + +/// Actual name of subscription through which event has been delivered. +/// +/// Actual name of subscription through which event has been delivered.PubNub client can be used to subscribe to the +/// group of channels to receive updates and (group name will be set for field). With this approach there will be no +/// need to separately add *N* number of channels to `subscribe` method call. +@property(strong, nonatomic, readonly) NSString *subscription; + +/// Event "publish" time. +/// +/// This is the time when data has been received / generated by **PubNub** network. +@property(strong, nonatomic, readonly) NSNumber *timetoken; + +/// Name of channel where update received. +@property(strong, nonatomic, readonly) NSString *channel; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeEventData.m b/PubNub/Network/Responses/Subscribe/PNSubscribeEventData.m new file mode 100644 index 000000000..88aed2be1 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeEventData.m @@ -0,0 +1,90 @@ +#import "PNSubscribeEventData+Private.h" +#import +#import "PNHelpers.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// General real-time subscription update private extension. +@interface PNSubscribeEventData () + + +#pragma mark - Properties + +/// Actual name of subscription through which event has been delivered. +/// +/// Actual name of subscription through which event has been delivered.PubNub client can be used to subscribe to the +/// group of channels to receive updates and (group name will be set for field). With this approach there will be no +/// need to separately add *N* number of channels to `subscribe` method call. +@property(strong, nonatomic) NSString *subscription; + +/// Name of channel where update received. +@property(strong, nonatomic) NSString *channel; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNSubscribeEventData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ + @"shardIdentifier": @"a", + @"debugFlags": @"f", + @"messageType": @"e", + @"senderIdentifier": @"i", + @"sequenceNumber": @"s", + @"publishTimetoken": @"p", + @"userTimetoken": @"o", + @"channel": @"c", + @"subscription": @"b", + @"userMetadata": @"u", + }; +} + ++ (NSArray *)optionalKeys { + return @[ + @"messageType", + @"senderIdentifier", + @"sequenceNumber", + @"userTimetoken", + @"subscription", + @"userMetadata" + ]; +} + ++ (NSArray *)ignoredKeys { + return @[@"timetoken"]; +} + +- (NSString *)subscription { + return _subscription ? [PNChannel channelForPresence:_subscription] : self.channel; +} + +- (NSNumber *)timetoken { + return self.publishTimetoken.timetoken; +} + +- (NSString *)channel { + return [PNChannel channelForPresence:_channel]; +} + +- (NSNumber *)region { + return self.publishTimetoken.region; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeFileEventData+Private.h b/PubNub/Network/Responses/Subscribe/PNSubscribeFileEventData+Private.h new file mode 100644 index 000000000..9ec17c61c --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeFileEventData+Private.h @@ -0,0 +1,22 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `File event` data private extension. +@interface PNSubscribeFileEventData (Private) + + +#pragma mark - Properties + +/// Whether decryption error happened during data processing or not. +@property(assign, nonatomic) BOOL decryptionError; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeFileEventData.h b/PubNub/Network/Responses/Subscribe/PNSubscribeFileEventData.h new file mode 100644 index 000000000..83d16d7f8 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeFileEventData.h @@ -0,0 +1,26 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `File event` data. +@interface PNSubscribeFileEventData : PNSubscribeEventData + + +#pragma mark - Properties + +/// Information about file which has been uploaded to `channel`. +@property (nonatomic, nullable, readonly, strong) PNFile *file; + +/// Message which has been sent along with uploaded `file` to `channel`. +@property (nonatomic, nullable, readonly, strong) id message; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeFileEventData.m b/PubNub/Network/Responses/Subscribe/PNSubscribeFileEventData.m new file mode 100644 index 000000000..1d37c55fe --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeFileEventData.m @@ -0,0 +1,51 @@ +#import "PNSubscribeFileEventData+Private.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private nterface declaration + +/// `File event` data private extension. +@interface PNSubscribeFileEventData () + + +#pragma mark - Properties + +/// Whether decryption error happened during data processing or not. +@property(assign, nonatomic) BOOL decryptionError; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNSubscribeFileEventData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ + @"message": @"message", + @"file": @"file" + }; +} + ++ (NSArray *)optionalKeys { + return @[@"message"]; +} + ++ (NSArray *)ignoredKeys { + return @[@"decryptionError"]; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeMessageActionEventData.h b/PubNub/Network/Responses/Subscribe/PNSubscribeMessageActionEventData.h new file mode 100644 index 000000000..b36e6bd9e --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeMessageActionEventData.h @@ -0,0 +1,26 @@ +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Message action event` data. +@interface PNSubscribeMessageActionEventData : PNSubscribeEventData + + +#pragma mark - Properties + +/// `Action` for which event has been received. +@property(strong, nonatomic, readonly) PNMessageAction *action; + +/// Name of action for which `message action` event has been sent. +@property(copy, nonatomic, readonly) NSString *event; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeMessageActionEventData.m b/PubNub/Network/Responses/Subscribe/PNSubscribeMessageActionEventData.m new file mode 100644 index 000000000..d369287ac --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeMessageActionEventData.m @@ -0,0 +1,38 @@ +#import "PNSubscribeMessageActionEventData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Message action event` data private extension. +@interface PNSubscribeMessageActionEventData () + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNSubscribeMessageActionEventData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ + @"event": @"event", + @"action": @"data" + }; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeMessageEventData+Private.h b/PubNub/Network/Responses/Subscribe/PNSubscribeMessageEventData+Private.h new file mode 100644 index 000000000..e4d7295a4 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeMessageEventData+Private.h @@ -0,0 +1,22 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Message event` data private extension +@interface PNSubscribeMessageEventData (Private) + + +#pragma mark - Properties + +/// Whether decryption error happened during data processing or not. +@property(assign, nonatomic) BOOL decryptionError; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeMessageEventData.h b/PubNub/Network/Responses/Subscribe/PNSubscribeMessageEventData.h new file mode 100644 index 000000000..b295ac67b --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeMessageEventData.h @@ -0,0 +1,27 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Message event` data. +@interface PNSubscribeMessageEventData : PNSubscribeEventData + + +#pragma mark - Properties + +/// Message which has been delivered through data object live feed. +@property(strong, nullable, nonatomic, readonly) id message; + +/// Message sender identifier. +/// +/// Unique identifier of configured remote client which sent this ``message``. +@property(strong, nonatomic, readonly) NSString *publisher; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeMessageEventData.m b/PubNub/Network/Responses/Subscribe/PNSubscribeMessageEventData.m new file mode 100644 index 000000000..ad1bebafd --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeMessageEventData.m @@ -0,0 +1,49 @@ +#import "PNSubscribeMessageEventData+Private.h" +#import +#import "PNSubscribeEventData+Private.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Message event` data private extension. +@interface PNSubscribeMessageEventData () + + +#pragma mark - Properties + +/// Whether decryption error happened during data processing or not. +@property(assign, nonatomic) BOOL decryptionError; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNSubscribeMessageEventData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ @"message": @"message" }; +} + ++ (NSArray *)ignoredKeys { + return @[@"publisher", @"decryptionError"]; +} + +- (NSString *)publisher { + return self.senderIdentifier; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeObjectEventData.h b/PubNub/Network/Responses/Subscribe/PNSubscribeObjectEventData.h new file mode 100644 index 000000000..8fa578169 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeObjectEventData.h @@ -0,0 +1,40 @@ +#import +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `App Context event` data. +@interface PNSubscribeObjectEventData : PNSubscribeEventData + + +#pragma mark - Properties + +/// This property will be set only if event `type` is `channel` and represent `channel metadata`. +@property(strong, nullable, nonatomic, readonly) PNChannelMetadata *channelMetadata; + +/// This property will be set only if event `type` is `uuid` and represent `uuid metadata`. +@property(strong, nullable, nonatomic, readonly) PNUUIDMetadata *uuidMetadata; + +/// This property will be set only if event `type` is `membership` and represent `uuid membership`. +@property(strong, nullable, nonatomic, readonly) PNMembership *membership; + +/// Time when `object` event has been triggered. +@property(strong, nonatomic, readonly) NSNumber *timestamp; + +/// Name of action for which `object` event has been sent. +@property(strong, nonatomic, readonly) NSString *event; + +/// Type of `object` which has been changed and triggered event. +@property(strong, nonatomic, readonly) NSString *type; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeObjectEventData.m b/PubNub/Network/Responses/Subscribe/PNSubscribeObjectEventData.m new file mode 100644 index 000000000..13d31d2c8 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeObjectEventData.m @@ -0,0 +1,78 @@ +#import "PNSubscribeObjectEventData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `App Context event` data private extension. +@interface PNSubscribeObjectEventData () + + +#pragma mark - Properties + +/// Actual `App Context` object information. +@property(strong, nonatomic, readonly) PNBaseAppContextObject *data; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + + +#pragma mark - Interface implementation + +@implementation PNSubscribeObjectEventData + + +#pragma mark - Properties + ++ (Class)decodingClassForProperty:(NSString *)propertyName inDecodedDictionary:(NSDictionary *)decodedDictionary { + if (![propertyName isEqualToString:@"data"]) return nil; + + if ([decodedDictionary[@"type"] isEqual:@"uuid"]) return [PNUUIDMetadata class]; + else if ([decodedDictionary[@"type"] isEqual:@"channel"]) return [PNChannelMetadata class]; + + return [PNMembership class]; +} + ++ (NSDictionary *)codingKeys { + return @{ + @"event": @"event", + @"type": @"type", + @"data": @"data" + }; +} + ++ (NSArray *)optionalKeys { + return @[@"channelMetadata", @"uuidMetadata", @"membership"]; +} + ++ (NSArray *)dynamicTypeKeys { + return @[@"data"]; +} + +- (PNChannelMetadata *)channelMetadata { + return [self.type isEqualToString:@"channel"] ? (PNChannelMetadata *)self.data : nil; +} + +- (PNUUIDMetadata *)uuidMetadata { + return [self.type isEqualToString:@"uuid"] ? (PNUUIDMetadata *)self.data : nil; +} + +- (PNMembership *)membership { + return [self.type isEqualToString:@"membership"] ? (PNMembership *)self.data : nil; +} + +- (NSNumber *)timestamp { + return self.timetoken; +} + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribePresenceEventData.h b/PubNub/Network/Responses/Subscribe/PNSubscribePresenceEventData.h new file mode 100644 index 000000000..5df197a21 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribePresenceEventData.h @@ -0,0 +1,77 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Presence event` details. +@interface PNSubscribePresenceEventDetails : NSObject + + +#pragma mark - Properties + +/// Time when presence event has been triggered. +@property (nonatomic, readonly, strong) NSNumber *timetoken; + +/// Unique user identifier for which event has been triggered. +@property (nonatomic, nullable, readonly, strong) NSString *uuid; + +/// List of newly joined subscribers' UUID. +/// +/// List of UUIDs for subscribers which joined channel since last interval or regular presence event has been received. +/// +/// > Note: Value set (if data available) only for `interval` presence events. +@property (nonatomic, nullable, readonly, strong) NSArray *join; + +/// List of recently leaved subscribers' UUID. +/// +/// List of UUIDs for subscribers which leaved channel since last interval or regular presence event has been received. +/// +/// > Note: Value set (if data available) only for `interval` presence events. +@property (nonatomic, nullable, readonly, strong) NSArray *leave; + +/// List of recently UUID of subscribers which leaved by timeout. +/// +/// List of UUIDs for subscribers which leaved channel by timeout since last interval or regular presence event has been +/// received. +/// +/// > Note: Value set (if data available) only for `interval` presence events. +@property (nonatomic, nullable, readonly, strong) NSArray *timeout; + +/// Channel presence information. +/// +/// Number of subscribers which become after presence event has been triggered. +@property (nonatomic, readonly, strong) NSNumber *occupancy; + +/// User changed client state. +/// +/// In case of state change presence event will contain actual client state infotmation for ``uuid``. +@property (nonatomic, nullable, readonly, strong) NSDictionary *state; + +#pragma mark - + + +@end + + +#pragma mark - Interface implementation + +/// `Presence event` data. +@interface PNSubscribePresenceEventData : PNSubscribeEventData + + +#pragma mark - Properties + +/// Additional presence information. +@property(strong, nonatomic, readonly) PNSubscribePresenceEventDetails *presence; + +///Type of presence event. +@property(strong, nonatomic, readonly) NSString *presenceEvent; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribePresenceEventData.m b/PubNub/Network/Responses/Subscribe/PNSubscribePresenceEventData.m new file mode 100644 index 000000000..50099c168 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribePresenceEventData.m @@ -0,0 +1,75 @@ +#import "PNSubscribePresenceEventData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Presence event` details private extension. +@interface PNSubscribePresenceEventDetails () + + +#pragma mark - + + +@end + + +#pragma mark - Private interface implementation + +/// `Presence event` data private extension. +@interface PNSubscribePresenceEventData () + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNSubscribePresenceEventDetails + + +#pragma mark - Properies + ++ (NSDictionary *)codingKeys { + return @{ + @"timetoken": @"timestamp", + @"uuid": @"uuid", + @"join": @"join", + @"leave": @"leave", + @"timeout": @"timeout", + @"occupancy": @"occupancy", + @"state": @"state", + }; +} + ++ (NSArray *)optionalKeys { + return @[@"uuid", @"join", @"leave", @"timeout", @"state"]; +} + +#pragma mark - + + +@end + + +#pragma mark - Interface implementation + +@implementation PNSubscribePresenceEventData + + +#pragma mark - Properties + ++ (NSDictionary *)codingKeys { + return @{ @"presenceEvent":@"action", @"presence":@"presence" }; +} + +#pragma mark - + +@end diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeSignalEventData.h b/PubNub/Network/Responses/Subscribe/PNSubscribeSignalEventData.h new file mode 100644 index 000000000..3da88479f --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeSignalEventData.h @@ -0,0 +1,17 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// `Signal event` data. +@interface PNSubscribeSignalEventData : PNSubscribeMessageEventData + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Subscribe/PNSubscribeSignalEventData.m b/PubNub/Network/Responses/Subscribe/PNSubscribeSignalEventData.m new file mode 100644 index 000000000..3d6604c93 --- /dev/null +++ b/PubNub/Network/Responses/Subscribe/PNSubscribeSignalEventData.m @@ -0,0 +1,29 @@ +#import "PNSubscribeSignalEventData.h" +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// `Signal event` data. +@interface PNSubscribeSignalEventData () + + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNSubscribeSignalEventData + + +#pragma mark - + + +@end diff --git a/PubNub/Network/Responses/Time/PNTimeData.h b/PubNub/Network/Responses/Time/PNTimeData.h new file mode 100644 index 000000000..21ce242c1 --- /dev/null +++ b/PubNub/Network/Responses/Time/PNTimeData.h @@ -0,0 +1,22 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Interface declaration + +/// Fetch time request response data. +@interface PNTimeData : PNBaseOperationData + + +#pragma mark - Properties + +/// High-precision **PubNub** time token. +@property(strong, nonatomic, readonly) NSNumber *timetoken; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Network/Responses/Time/PNTimeData.m b/PubNub/Network/Responses/Time/PNTimeData.m new file mode 100644 index 000000000..0b438591f --- /dev/null +++ b/PubNub/Network/Responses/Time/PNTimeData.m @@ -0,0 +1,67 @@ +#import "PNTimeData.h" +#import "PNCodable.h" + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Private interface declaration + +/// Fetch time request response data private extension. +@interface PNTimeData () + + +#pragma mark - Properties + +/// High-precision **PubNub** time token. +@property(strong, nonatomic) NSNumber *timetoken; + + +#pragma mark - Initialization and Configuration + +/// Initialize time request response object. +/// +/// - Parameter timetoken: High-precision **PubNub** time token. +/// - Returns: Initialized time data object. +- (instancetype)initWithTimetoken:(NSNumber *)timetoken; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END + + +#pragma mark - Interface implementation + +@implementation PNTimeData + + +#pragma mark - Properties + ++ (NSArray *)optionalKeys { + return @[@"timetoken"]; +} + + +#pragma mark - Initialization and Configuration + +- (instancetype)initObjectWithCoder:(id)coder { + id payload = [coder decodeObjectOfClass:[NSArray class]]; + NSNumber *timeToken = @(-1); + + if ([payload isKindOfClass:[NSArray class]] && ((NSArray *)payload).count == 1) timeToken = ((NSArray *)payload)[0]; + if ([timeToken isEqual:@(-1)]) return nil; + + return [self initWithTimetoken:timeToken]; +} + +- (instancetype)initWithTimetoken:(NSNumber *)timetoken { + if ((self = [super init])) _timetoken = timetoken; + return self; +} + +#pragma mark - + + +@end diff --git a/PubNub/Protocols/Transport/PNRequest.h b/PubNub/Protocols/Transport/PNRequest.h new file mode 100644 index 000000000..e3b760d28 --- /dev/null +++ b/PubNub/Protocols/Transport/PNRequest.h @@ -0,0 +1,40 @@ +#import +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +/// Generic request interface. +@protocol PNRequest + + +@required + +#pragma mark - Properties + +/// Transport-independent request. +/// +/// Object with all required information needed to use remote origin endpoint. +@property (strong, nonatomic, nullable, readonly) PNTransportRequest *request; + +/// Type of request operation. +/// +/// One of PubNub REST API endpoints or third-party endpoint. +@property (assign, nonatomic, readonly) PNOperationType operation; + + +#pragma mark - Prepare + +/// Validate provided request parameters. +/// +/// - Returns: Error message if request can't be sent without missing or malformed parameters. +- (nullable PNError *)validate; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Protocols/Transport/PNTransport.h b/PubNub/Protocols/Transport/PNTransport.h new file mode 100644 index 000000000..c988f9299 --- /dev/null +++ b/PubNub/Protocols/Transport/PNTransport.h @@ -0,0 +1,116 @@ +#import +#import +#import +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Structures + +/// Regular request completion block. +/// +/// > Note: Use error domains and codes suggested in `PNError` header. Using designated error codes helps the PubNub SDK +/// client pick the right error handling path. +/// +/// - Parameters: +/// - request: Actual request which has been used to access remote origin resource. +/// - response: Remote origin response with results of access to the resource. +/// - error: Transport-related request processing error (network issues, cancelled or timeout request, and etc.). +typedef void(^PNRequestCompletionBlock)(PNTransportRequest *request, + id _Nullable response, + PNError * _Nullable error); + +/// Download request completion block. +/// +/// Download requests are different from regular ones because fetched data stored in temporarily folder. +/// +/// > Note: Use error domains and codes suggested in `PNError` header. Using designated error codes helps the PubNub SDK +/// client pick the right error handling path. +/// +/// - Parameters: +/// - request: Actual request which has been used to download remote resource. +/// - response: Remote origin response with results of access to the resource. +/// - path: Path to the temporarily downloaded file location. +/// - error: Transport-related request processing error (network issues, cancelled or timeout request, and etc.). +typedef void(^PNDownloadRequestCompletionBlock)(PNTransportRequest *request, + id _Nullable response, + NSURL * _Nullable path, + PNError * _Nullable error); + +#pragma mark - Interface declaration + +@protocol PNTransport + + +#pragma mark - Initialization and Configuration + +/// Complete transport module configuration. +/// +/// - Parameter configuration: Base transport module configuration object. +- (void)setupWithConfiguration:(PNTransportConfiguration *)configuration; + + +#pragma mark - Information + +/// Thread-safe active requests list access. +/// +/// - Parameter block: The transport module returns a list of currently active requests in a thread-safe way to avoid +/// any potential race of conditions if in `block` some of them are cancelled. +- (void)requestsWithBlock:(void(^)(NSArray *))block; + + +#pragma mark - Request processing + +/// Process provided request. +/// +/// - Parameters: +/// - request: The transport request to be processed. +/// - block: Request prociessing completion handler block. +- (void)sendRequest:(PNTransportRequest *)request withCompletionBlock:(PNRequestCompletionBlock)block; + +/// Download remote resource using provided request. +/// +/// - Parameters: +/// - request: The transport download request to be processed. +/// - block: Request prociessing completion handler block. +- (void)sendDownloadRequest:(PNTransportRequest *)request withCompletionBlock:(PNDownloadRequestCompletionBlock)block; + +/// Pre-processed transport request. +/// +/// > Note: Transport implementations can use this method to adjust general request information for the needs of the +/// implementation. +/// +/// - Parameter request: Source transport request object with general information. +/// - Returns: Transport request object with adjusted information (if needed). +- (PNTransportRequest *)transportRequestFromTransportRequest:(PNTransportRequest *)request; + + +#pragma mark - State + +/// Temporarily suspension of transport operation. +/// +/// This method will be used by SDK client in cases when further requests processing is impossible (like transition to +/// inactive state). +- (void)suspend; + +/// Resume of transport operation +/// +/// This method will be used by SDK client in cases when it becomes possible to continue requests processing (like +/// transition to the active state). +- (void)resume; + +/// Stop transport operation. +/// +/// This method will be used by the SDK during client instance destruction or transport module re-configuration. +/// +/// > Important: Transport implementation should use this as opportunity to clean up resources used after instantiation. +- (void)invalidate; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/Protocols/Transport/PNTransportResponse.h b/PubNub/Protocols/Transport/PNTransportResponse.h new file mode 100644 index 000000000..bf4681775 --- /dev/null +++ b/PubNub/Protocols/Transport/PNTransportResponse.h @@ -0,0 +1,44 @@ +#import + + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark Protocol declaration + +/// General transport response interface. +/// +/// Transport module is responsible for providing implementation for this protocol. +@protocol PNTransportResponse + + +#pragma mark - Properties + +/// Service response headers. +/// +/// > Important: Header names are in lowercase. +@property(strong, nullable, nonatomic, readonly) NSDictionary *headers; + +/// Service response body as stream. +@property(strong, nullable, nonatomic, readonly) NSInputStream *bodyStream; + +/// Response content MIME type. +@property(strong, nullable, nonatomic, readonly) NSString *MIMEType; + +/// Whether response `body` available as bytes stream or not. +@property(assign, nonatomic, readonly) BOOL bodyStreamAvailable; + +/// Service response body. +@property(strong, nullable, nonatomic, readonly) NSData *body; + +/// Service response status code. +@property(assign, nonatomic, readonly) NSUInteger statusCode; + +/// Full remote resource URL used to retrieve response. +@property(strong, nonatomic, readonly) NSString *url; + +#pragma mark - + + +@end + +NS_ASSUME_NONNULL_END diff --git a/PubNub/PubNub.h b/PubNub/PubNub.h index c331d8676..61f9ed12b 100644 --- a/PubNub/PubNub.h +++ b/PubNub/PubNub.h @@ -1,49 +1,33 @@ #ifndef PubNub_h #define PubNub_h -// Protocols -#import "PNEventsListener.h" + +#pragma mark - Categories // Categories #import "NSURLSessionConfiguration+PNConfiguration.h" -// Data objects -#import "PNPresenceChannelGroupHereNowResult.h" -#import "PNChannelGroupClientStateResult.h" -#import "PNPresenceChannelHereNowResult.h" -#import "PNPresenceGlobalHereNowResult.h" -#import "PNFetchChannelsMetadataResult.h" -#import "PNChannelGroupChannelsResult.h" -#import "PNFetchMessageActionsResult.h" -#import "PNAPNSEnabledChannelsResult.h" -#import "PNSetChannelMetadataStatus.h" -#import "PNChannelClientStateResult.h" -#import "PNManageMembershipsStatus.h" -#import "PNClientStateUpdateStatus.h" -#import "PNFetchUUIDMetadataResult.h" -#import "PNPresenceWhereNowResult.h" -#import "PNAddMessageActionStatus.h" -#import "PNAcknowledgmentStatus.h" -#import "PNClientStateGetResult.h" -#import "PNChannelGroupsResult.h" -#import "PNMessageCountResult.h" -#import "PNClientInformation.h" -#import "PNSubscriberResults.h" -#import "PNSubscribeStatus.h" -#import "PNOperationResult.h" -#import "PNPublishStatus.h" -#import "PNHistoryResult.h" -#import "PNSignalStatus.h" -#import "PNServiceData.h" -#import "PNErrorStatus.h" -#import "PNTimeResult.h" -#import "PNKeychain.h" -#import "PNPAMToken.h" -#import "PNResult.h" -#import "PNStatus.h" + +#pragma mark - Data types #import "PNRequestRetryConfiguration.h" #import "PNConfiguration.h" +#import "PNFunctions.h" +#import "PNLock.h" + + +#pragma mark - Base modules + +#import "PNJSONSerialization.h" +#import "PNJSONCoder.h" + + +#pragma mark - Transport module + +#import "PNTransportConfiguration.h" +#import "PNBaseOperationData.h" +#import "PNBaseRequest.h" + #pragma mark - Cryptor module @@ -62,6 +46,21 @@ #import "PNCryptoModule.h" +#pragma mark - Shared protocols + +#import "PNTransportResponse.h" +#import "PNObjectSerializer.h" +#import "PNTransportRequest.h" +#import "PNEventsListener.h" +#import "PNJSONSerializer.h" +#import "PNCryptoProvider.h" +#import "PNTransport.h" +#import "PNCryptor.h" +#import "PNEncoder.h" +#import "PNDecoder.h" +#import "PNCodable.h" + + #pragma mark - API #import "PubNub+Core.h" @@ -74,12 +73,17 @@ #import "PubNub+Objects.h" #import "PubNub+Files.h" #import "PubNub+State.h" -#import "PNErrorCodes.h" #import "PNStructures.h" #import "PubNub+APNS.h" #import "PubNub+Time.h" #import "PubNub+PAM.h" #import "PNLLogger.h" +#import "PNError.h" #import "PNAES.h" + +#pragma mark - Errors + +#import "PNError.h" + #endif diff --git a/PubNub/include/NSArray+PNMap.h b/PubNub/include/NSArray+PNMap.h deleted file mode 120000 index 75fe968f4..000000000 --- a/PubNub/include/NSArray+PNMap.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Categories/NSArray+PNMap.h \ No newline at end of file diff --git a/PubNub/include/NSDateFormatter+PNCacheable.h b/PubNub/include/NSDateFormatter+PNCacheable.h deleted file mode 120000 index 8997985e5..000000000 --- a/PubNub/include/NSDateFormatter+PNCacheable.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Categories/NSDateFormatter+PNCacheable.h \ No newline at end of file diff --git a/PubNub/include/NSInputStream+PNCrypto.h b/PubNub/include/NSInputStream+PNCrypto.h deleted file mode 120000 index fde1f585e..000000000 --- a/PubNub/include/NSInputStream+PNCrypto.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Categories/NSInputStream+PNCrypto.h \ No newline at end of file diff --git a/PubNub/include/NSInputStream+PNURL.h b/PubNub/include/NSInputStream+PNURL.h deleted file mode 120000 index 426369276..000000000 --- a/PubNub/include/NSInputStream+PNURL.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Categories/NSInputStream+PNURL.h \ No newline at end of file diff --git a/PubNub/include/NSURLSessionConfiguration+PNConfiguration.h b/PubNub/include/NSURLSessionConfiguration+PNConfiguration.h deleted file mode 120000 index a45b4c6f7..000000000 --- a/PubNub/include/NSURLSessionConfiguration+PNConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Categories/NSURLSessionConfiguration+PNConfiguration.h \ No newline at end of file diff --git a/PubNub/include/NSURLSessionConfiguration+PNConfigurationPrivate.h b/PubNub/include/NSURLSessionConfiguration+PNConfigurationPrivate.h deleted file mode 120000 index 2a0493928..000000000 --- a/PubNub/include/NSURLSessionConfiguration+PNConfigurationPrivate.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Categories/NSURLSessionConfiguration+PNConfigurationPrivate.h \ No newline at end of file diff --git a/PubNub/include/PNAES+Private.h b/PubNub/include/PNAES+Private.h deleted file mode 120000 index 2490f9774..000000000 --- a/PubNub/include/PNAES+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/PNAES+Private.h \ No newline at end of file diff --git a/PubNub/include/PNAES.h b/PubNub/include/PNAES.h deleted file mode 120000 index 3d2b5a29a..000000000 --- a/PubNub/include/PNAES.h +++ /dev/null @@ -1 +0,0 @@ -../Data/PNAES.h \ No newline at end of file diff --git a/PubNub/include/PNAESCBCCryptor+Private.h b/PubNub/include/PNAESCBCCryptor+Private.h deleted file mode 120000 index f0679c420..000000000 --- a/PubNub/include/PNAESCBCCryptor+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Modules/Crypto/Cryptors/AES/PNAESCBCCryptor+Private.h \ No newline at end of file diff --git a/PubNub/include/PNAESCBCCryptor.h b/PubNub/include/PNAESCBCCryptor.h deleted file mode 120000 index 303319d73..000000000 --- a/PubNub/include/PNAESCBCCryptor.h +++ /dev/null @@ -1 +0,0 @@ -../Modules/Crypto/Cryptors/AES/PNAESCBCCryptor.h \ No newline at end of file diff --git a/PubNub/include/PNAPICallBuilder+Private.h b/PubNub/include/PNAPICallBuilder+Private.h deleted file mode 120000 index dac7309fd..000000000 --- a/PubNub/include/PNAPICallBuilder+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/PNAPICallBuilder+Private.h \ No newline at end of file diff --git a/PubNub/include/PNAPICallBuilder.h b/PubNub/include/PNAPICallBuilder.h deleted file mode 120000 index a1b49ee61..000000000 --- a/PubNub/include/PNAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/PNAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNAPNSAPICallBuilder.h b/PubNub/include/PNAPNSAPICallBuilder.h deleted file mode 120000 index 2a71c1298..000000000 --- a/PubNub/include/PNAPNSAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/APNS/PNAPNSAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNAPNSAuditAPICallBuilder.h b/PubNub/include/PNAPNSAuditAPICallBuilder.h deleted file mode 120000 index 077a42ea6..000000000 --- a/PubNub/include/PNAPNSAuditAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/APNS/PNAPNSAuditAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNAPNSEnabledChannelsResult.h b/PubNub/include/PNAPNSEnabledChannelsResult.h deleted file mode 120000 index 0319744e5..000000000 --- a/PubNub/include/PNAPNSEnabledChannelsResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNAPNSEnabledChannelsResult.h \ No newline at end of file diff --git a/PubNub/include/PNAPNSModificationAPICallBuilder.h b/PubNub/include/PNAPNSModificationAPICallBuilder.h deleted file mode 120000 index 7e9706a4a..000000000 --- a/PubNub/include/PNAPNSModificationAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/APNS/PNAPNSModificationAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNAPNSNotificationConfiguration+Private.h b/PubNub/include/PNAPNSNotificationConfiguration+Private.h deleted file mode 120000 index 9ac90a9ef..000000000 --- a/PubNub/include/PNAPNSNotificationConfiguration+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/Notifications Payload/APNS/PNAPNSNotificationConfiguration+Private.h \ No newline at end of file diff --git a/PubNub/include/PNAPNSNotificationConfiguration.h b/PubNub/include/PNAPNSNotificationConfiguration.h deleted file mode 120000 index 558070503..000000000 --- a/PubNub/include/PNAPNSNotificationConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/Notifications Payload/APNS/PNAPNSNotificationConfiguration.h \ No newline at end of file diff --git a/PubNub/include/PNAPNSNotificationPayload+Private.h b/PubNub/include/PNAPNSNotificationPayload+Private.h deleted file mode 120000 index ff39c02dc..000000000 --- a/PubNub/include/PNAPNSNotificationPayload+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/Notifications Payload/APNS/PNAPNSNotificationPayload+Private.h \ No newline at end of file diff --git a/PubNub/include/PNAPNSNotificationPayload.h b/PubNub/include/PNAPNSNotificationPayload.h deleted file mode 120000 index 3193aff76..000000000 --- a/PubNub/include/PNAPNSNotificationPayload.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/Notifications Payload/APNS/PNAPNSNotificationPayload.h \ No newline at end of file diff --git a/PubNub/include/PNAPNSNotificationTarget+Private.h b/PubNub/include/PNAPNSNotificationTarget+Private.h deleted file mode 120000 index a5b4a781f..000000000 --- a/PubNub/include/PNAPNSNotificationTarget+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/Notifications Payload/APNS/PNAPNSNotificationTarget+Private.h \ No newline at end of file diff --git a/PubNub/include/PNAPNSNotificationTarget.h b/PubNub/include/PNAPNSNotificationTarget.h deleted file mode 120000 index 6d1f0695d..000000000 --- a/PubNub/include/PNAPNSNotificationTarget.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/Notifications Payload/APNS/PNAPNSNotificationTarget.h \ No newline at end of file diff --git a/PubNub/include/PNAcknowledgmentStatus.h b/PubNub/include/PNAcknowledgmentStatus.h deleted file mode 120000 index 54dc16665..000000000 --- a/PubNub/include/PNAcknowledgmentStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNAcknowledgmentStatus.h \ No newline at end of file diff --git a/PubNub/include/PNAddMessageActionAPICallBuilder.h b/PubNub/include/PNAddMessageActionAPICallBuilder.h deleted file mode 120000 index 97329ee91..000000000 --- a/PubNub/include/PNAddMessageActionAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Actions/Message/PNAddMessageActionAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNAddMessageActionParser.h b/PubNub/include/PNAddMessageActionParser.h deleted file mode 120000 index c1ed05805..000000000 --- a/PubNub/include/PNAddMessageActionParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Actions/Message/PNAddMessageActionParser.h \ No newline at end of file diff --git a/PubNub/include/PNAddMessageActionRequest.h b/PubNub/include/PNAddMessageActionRequest.h deleted file mode 120000 index a39d8bd2a..000000000 --- a/PubNub/include/PNAddMessageActionRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Actions/Message/PNAddMessageActionRequest.h \ No newline at end of file diff --git a/PubNub/include/PNAddMessageActionStatus.h b/PubNub/include/PNAddMessageActionStatus.h deleted file mode 120000 index 1da96dcf6..000000000 --- a/PubNub/include/PNAddMessageActionStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNAddMessageActionStatus.h \ No newline at end of file diff --git a/PubNub/include/PNAddPushNotificationsRequest.h b/PubNub/include/PNAddPushNotificationsRequest.h deleted file mode 120000 index a6a43a03b..000000000 --- a/PubNub/include/PNAddPushNotificationsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Push Notifications/PNAddPushNotificationsRequest.h \ No newline at end of file diff --git a/PubNub/include/PNArray.h b/PubNub/include/PNArray.h deleted file mode 120000 index f5072f0e5..000000000 --- a/PubNub/include/PNArray.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNArray.h \ No newline at end of file diff --git a/PubNub/include/PNAuditPushNotificationsRequest.h b/PubNub/include/PNAuditPushNotificationsRequest.h deleted file mode 120000 index 3bfbbe0c9..000000000 --- a/PubNub/include/PNAuditPushNotificationsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Push Notifications/PNAuditPushNotificationsRequest.h \ No newline at end of file diff --git a/PubNub/include/PNBaseMessageActionRequest+Private.h b/PubNub/include/PNBaseMessageActionRequest+Private.h deleted file mode 120000 index f4ef969d3..000000000 --- a/PubNub/include/PNBaseMessageActionRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Actions/Message/PNBaseMessageActionRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PNBaseMessageActionRequest.h b/PubNub/include/PNBaseMessageActionRequest.h deleted file mode 120000 index 7ba27bc1b..000000000 --- a/PubNub/include/PNBaseMessageActionRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Actions/Message/PNBaseMessageActionRequest.h \ No newline at end of file diff --git a/PubNub/include/PNBaseNotificationPayload+Private.h b/PubNub/include/PNBaseNotificationPayload+Private.h deleted file mode 120000 index b7fa2472e..000000000 --- a/PubNub/include/PNBaseNotificationPayload+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/Notifications Payload/PNBaseNotificationPayload+Private.h \ No newline at end of file diff --git a/PubNub/include/PNBaseNotificationPayload.h b/PubNub/include/PNBaseNotificationPayload.h deleted file mode 120000 index 9e4a47f04..000000000 --- a/PubNub/include/PNBaseNotificationPayload.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/Notifications Payload/PNBaseNotificationPayload.h \ No newline at end of file diff --git a/PubNub/include/PNBaseObjectsMembershipRequest+Private.h b/PubNub/include/PNBaseObjectsMembershipRequest+Private.h deleted file mode 120000 index de36ce601..000000000 --- a/PubNub/include/PNBaseObjectsMembershipRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PNBaseObjectsMembershipRequest.h b/PubNub/include/PNBaseObjectsMembershipRequest.h deleted file mode 120000 index 6e360a7a9..000000000 --- a/PubNub/include/PNBaseObjectsMembershipRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest.h \ No newline at end of file diff --git a/PubNub/include/PNBaseObjectsRequest+Private.h b/PubNub/include/PNBaseObjectsRequest+Private.h deleted file mode 120000 index c3b04fd28..000000000 --- a/PubNub/include/PNBaseObjectsRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/PNBaseObjectsRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PNBaseObjectsRequest.h b/PubNub/include/PNBaseObjectsRequest.h deleted file mode 120000 index d0d11068e..000000000 --- a/PubNub/include/PNBaseObjectsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/PNBaseObjectsRequest.h \ No newline at end of file diff --git a/PubNub/include/PNBasePublishRequest+Private.h b/PubNub/include/PNBasePublishRequest+Private.h deleted file mode 120000 index fe054d90d..000000000 --- a/PubNub/include/PNBasePublishRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Publish/PNBasePublishRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PNBasePublishRequest.h b/PubNub/include/PNBasePublishRequest.h deleted file mode 120000 index d97af6fc1..000000000 --- a/PubNub/include/PNBasePublishRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Publish/PNBasePublishRequest.h \ No newline at end of file diff --git a/PubNub/include/PNBasePushNotificationsRequest.h b/PubNub/include/PNBasePushNotificationsRequest.h deleted file mode 120000 index 22c902775..000000000 --- a/PubNub/include/PNBasePushNotificationsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Push Notifications/PNBasePushNotificationsRequest.h \ No newline at end of file diff --git a/PubNub/include/PNCBORDecoder.h b/PubNub/include/PNCBORDecoder.h deleted file mode 120000 index cf2b31724..000000000 --- a/PubNub/include/PNCBORDecoder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/PNCBORDecoder.h \ No newline at end of file diff --git a/PubNub/include/PNCCCryptorWrapper.h b/PubNub/include/PNCCCryptorWrapper.h deleted file mode 120000 index 80f4ae9a7..000000000 --- a/PubNub/include/PNCCCryptorWrapper.h +++ /dev/null @@ -1 +0,0 @@ -../Modules/Crypto/Cryptors/AES/PNCCCryptorWrapper.h \ No newline at end of file diff --git a/PubNub/include/PNChannel.h b/PubNub/include/PNChannel.h deleted file mode 120000 index d146ccc7b..000000000 --- a/PubNub/include/PNChannel.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNChannel.h \ No newline at end of file diff --git a/PubNub/include/PNChannelClientStateResult.h b/PubNub/include/PNChannelClientStateResult.h deleted file mode 120000 index 7575f19c7..000000000 --- a/PubNub/include/PNChannelClientStateResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNChannelClientStateResult.h \ No newline at end of file diff --git a/PubNub/include/PNChannelGroupAuditionParser.h b/PubNub/include/PNChannelGroupAuditionParser.h deleted file mode 120000 index ac706d847..000000000 --- a/PubNub/include/PNChannelGroupAuditionParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNChannelGroupAuditionParser.h \ No newline at end of file diff --git a/PubNub/include/PNChannelGroupChannelsResult.h b/PubNub/include/PNChannelGroupChannelsResult.h deleted file mode 120000 index f5e18bdf3..000000000 --- a/PubNub/include/PNChannelGroupChannelsResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNChannelGroupChannelsResult.h \ No newline at end of file diff --git a/PubNub/include/PNChannelGroupClientStateResult.h b/PubNub/include/PNChannelGroupClientStateResult.h deleted file mode 120000 index 72e8eb8a6..000000000 --- a/PubNub/include/PNChannelGroupClientStateResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNChannelGroupClientStateResult.h \ No newline at end of file diff --git a/PubNub/include/PNChannelGroupModificationParser.h b/PubNub/include/PNChannelGroupModificationParser.h deleted file mode 120000 index 287ef22a3..000000000 --- a/PubNub/include/PNChannelGroupModificationParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNChannelGroupModificationParser.h \ No newline at end of file diff --git a/PubNub/include/PNChannelGroupsResult.h b/PubNub/include/PNChannelGroupsResult.h deleted file mode 120000 index fe018d971..000000000 --- a/PubNub/include/PNChannelGroupsResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNChannelGroupsResult.h \ No newline at end of file diff --git a/PubNub/include/PNChannelMember+Private.h b/PubNub/include/PNChannelMember+Private.h deleted file mode 120000 index 0283af6c4..000000000 --- a/PubNub/include/PNChannelMember+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNChannelMember+Private.h \ No newline at end of file diff --git a/PubNub/include/PNChannelMember.h b/PubNub/include/PNChannelMember.h deleted file mode 120000 index db76a775c..000000000 --- a/PubNub/include/PNChannelMember.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNChannelMember.h \ No newline at end of file diff --git a/PubNub/include/PNChannelMembersParser.h b/PubNub/include/PNChannelMembersParser.h deleted file mode 120000 index 57de71395..000000000 --- a/PubNub/include/PNChannelMembersParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Objects/PNChannelMembersParser.h \ No newline at end of file diff --git a/PubNub/include/PNChannelMetadata+Private.h b/PubNub/include/PNChannelMetadata+Private.h deleted file mode 120000 index 5f6e85c2b..000000000 --- a/PubNub/include/PNChannelMetadata+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNChannelMetadata+Private.h \ No newline at end of file diff --git a/PubNub/include/PNChannelMetadata.h b/PubNub/include/PNChannelMetadata.h deleted file mode 120000 index c0174410b..000000000 --- a/PubNub/include/PNChannelMetadata.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNChannelMetadata.h \ No newline at end of file diff --git a/PubNub/include/PNChannelMetadataChangeParser.h b/PubNub/include/PNChannelMetadataChangeParser.h deleted file mode 120000 index fa7e35042..000000000 --- a/PubNub/include/PNChannelMetadataChangeParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Objects/PNChannelMetadataChangeParser.h \ No newline at end of file diff --git a/PubNub/include/PNClientInformation.h b/PubNub/include/PNClientInformation.h deleted file mode 120000 index 8bd1b00c0..000000000 --- a/PubNub/include/PNClientInformation.h +++ /dev/null @@ -1 +0,0 @@ -../Data/PNClientInformation.h \ No newline at end of file diff --git a/PubNub/include/PNClientState.h b/PubNub/include/PNClientState.h deleted file mode 120000 index 0907b3d7e..000000000 --- a/PubNub/include/PNClientState.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Managers/PNClientState.h \ No newline at end of file diff --git a/PubNub/include/PNClientStateGetResult.h b/PubNub/include/PNClientStateGetResult.h deleted file mode 120000 index 48cca72bc..000000000 --- a/PubNub/include/PNClientStateGetResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNClientStateGetResult.h \ No newline at end of file diff --git a/PubNub/include/PNClientStateParser.h b/PubNub/include/PNClientStateParser.h deleted file mode 120000 index b78fa3ad0..000000000 --- a/PubNub/include/PNClientStateParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNClientStateParser.h \ No newline at end of file diff --git a/PubNub/include/PNClientStateUpdateStatus.h b/PubNub/include/PNClientStateUpdateStatus.h deleted file mode 120000 index ef0e51203..000000000 --- a/PubNub/include/PNClientStateUpdateStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNClientStateUpdateStatus.h \ No newline at end of file diff --git a/PubNub/include/PNConfiguration+Private.h b/PubNub/include/PNConfiguration+Private.h deleted file mode 120000 index fa36c88fa..000000000 --- a/PubNub/include/PNConfiguration+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/PNConfiguration+Private.h \ No newline at end of file diff --git a/PubNub/include/PNConfiguration.h b/PubNub/include/PNConfiguration.h deleted file mode 120000 index 21ec1bb23..000000000 --- a/PubNub/include/PNConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -../Data/PNConfiguration.h \ No newline at end of file diff --git a/PubNub/include/PNConstants.h b/PubNub/include/PNConstants.h deleted file mode 120000 index 8f392575b..000000000 --- a/PubNub/include/PNConstants.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/PNConstants.h \ No newline at end of file diff --git a/PubNub/include/PNCryptoModule.h b/PubNub/include/PNCryptoModule.h deleted file mode 120000 index 7949380d7..000000000 --- a/PubNub/include/PNCryptoModule.h +++ /dev/null @@ -1 +0,0 @@ -../Modules/Crypto/PNCryptoModule.h \ No newline at end of file diff --git a/PubNub/include/PNCryptoProvider.h b/PubNub/include/PNCryptoProvider.h deleted file mode 120000 index d1525f220..000000000 --- a/PubNub/include/PNCryptoProvider.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Protocols/PNCryptoProvider.h \ No newline at end of file diff --git a/PubNub/include/PNCryptor.h b/PubNub/include/PNCryptor.h deleted file mode 120000 index 2219c4aba..000000000 --- a/PubNub/include/PNCryptor.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Protocols/PNCryptor.h \ No newline at end of file diff --git a/PubNub/include/PNCryptorHeader+Private.h b/PubNub/include/PNCryptorHeader+Private.h deleted file mode 120000 index be07d963c..000000000 --- a/PubNub/include/PNCryptorHeader+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Modules/Crypto/Header/PNCryptorHeader+Private.h \ No newline at end of file diff --git a/PubNub/include/PNCryptorHeader.h b/PubNub/include/PNCryptorHeader.h deleted file mode 120000 index 18439ddfa..000000000 --- a/PubNub/include/PNCryptorHeader.h +++ /dev/null @@ -1 +0,0 @@ -../Modules/Crypto/Header/PNCryptorHeader.h \ No newline at end of file diff --git a/PubNub/include/PNCryptorHeaderV1Data.h b/PubNub/include/PNCryptorHeaderV1Data.h deleted file mode 120000 index d0b86df12..000000000 --- a/PubNub/include/PNCryptorHeaderV1Data.h +++ /dev/null @@ -1 +0,0 @@ -../Modules/Crypto/Header/PNCryptorHeaderV1Data.h \ No newline at end of file diff --git a/PubNub/include/PNCryptorInputStream+Private.h b/PubNub/include/PNCryptorInputStream+Private.h deleted file mode 120000 index a05696411..000000000 --- a/PubNub/include/PNCryptorInputStream+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Modules/Crypto/Data/PNCryptorInputStream+Private.h \ No newline at end of file diff --git a/PubNub/include/PNCryptorInputStream.h b/PubNub/include/PNCryptorInputStream.h deleted file mode 120000 index 3703353e5..000000000 --- a/PubNub/include/PNCryptorInputStream.h +++ /dev/null @@ -1 +0,0 @@ -../Modules/Crypto/Data/PNCryptorInputStream.h \ No newline at end of file diff --git a/PubNub/include/PNData.h b/PubNub/include/PNData.h deleted file mode 120000 index 6ff1ae658..000000000 --- a/PubNub/include/PNData.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNData.h \ No newline at end of file diff --git a/PubNub/include/PNDataStorage.h b/PubNub/include/PNDataStorage.h deleted file mode 120000 index 5a6aa04e4..000000000 --- a/PubNub/include/PNDataStorage.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Storage/PNDataStorage.h \ No newline at end of file diff --git a/PubNub/include/PNDate.h b/PubNub/include/PNDate.h deleted file mode 120000 index a63fe5c5f..000000000 --- a/PubNub/include/PNDate.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNDate.h \ No newline at end of file diff --git a/PubNub/include/PNDefines.h b/PubNub/include/PNDefines.h deleted file mode 120000 index 8618f5f5a..000000000 --- a/PubNub/include/PNDefines.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNDefines.h \ No newline at end of file diff --git a/PubNub/include/PNDeleteFileAPICallBuilder.h b/PubNub/include/PNDeleteFileAPICallBuilder.h deleted file mode 120000 index 416b19758..000000000 --- a/PubNub/include/PNDeleteFileAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Files/PNDeleteFileAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNDeleteFileParser.h b/PubNub/include/PNDeleteFileParser.h deleted file mode 120000 index 39ebb583e..000000000 --- a/PubNub/include/PNDeleteFileParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Files/PNDeleteFileParser.h \ No newline at end of file diff --git a/PubNub/include/PNDeleteFileRequest.h b/PubNub/include/PNDeleteFileRequest.h deleted file mode 120000 index 354c79c42..000000000 --- a/PubNub/include/PNDeleteFileRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Files/PNDeleteFileRequest.h \ No newline at end of file diff --git a/PubNub/include/PNDeleteMessageAPICallBuilder.h b/PubNub/include/PNDeleteMessageAPICallBuilder.h deleted file mode 120000 index 49e661215..000000000 --- a/PubNub/include/PNDeleteMessageAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/History/PNDeleteMessageAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNDictionary.h b/PubNub/include/PNDictionary.h deleted file mode 120000 index 1ca9b5745..000000000 --- a/PubNub/include/PNDictionary.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNDictionary.h \ No newline at end of file diff --git a/PubNub/include/PNDownloadFileAPICallBuilder.h b/PubNub/include/PNDownloadFileAPICallBuilder.h deleted file mode 120000 index d8f28eb55..000000000 --- a/PubNub/include/PNDownloadFileAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Files/PNDownloadFileAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNDownloadFileRequest+Private.h b/PubNub/include/PNDownloadFileRequest+Private.h deleted file mode 120000 index 725586008..000000000 --- a/PubNub/include/PNDownloadFileRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Files/PNDownloadFileRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PNDownloadFileRequest.h b/PubNub/include/PNDownloadFileRequest.h deleted file mode 120000 index 65e91d367..000000000 --- a/PubNub/include/PNDownloadFileRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Files/PNDownloadFileRequest.h \ No newline at end of file diff --git a/PubNub/include/PNDownloadFileResult.h b/PubNub/include/PNDownloadFileResult.h deleted file mode 120000 index ab6db37e2..000000000 --- a/PubNub/include/PNDownloadFileResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNDownloadFileResult.h \ No newline at end of file diff --git a/PubNub/include/PNEncryptedData.h b/PubNub/include/PNEncryptedData.h deleted file mode 120000 index 6da39bfa1..000000000 --- a/PubNub/include/PNEncryptedData.h +++ /dev/null @@ -1 +0,0 @@ -../Modules/Crypto/Data/PNEncryptedData.h \ No newline at end of file diff --git a/PubNub/include/PNEncryptedStream.h b/PubNub/include/PNEncryptedStream.h deleted file mode 120000 index 4f752e207..000000000 --- a/PubNub/include/PNEncryptedStream.h +++ /dev/null @@ -1 +0,0 @@ -../Modules/Crypto/Data/PNEncryptedStream.h \ No newline at end of file diff --git a/PubNub/include/PNEnvelopeInformation.h b/PubNub/include/PNEnvelopeInformation.h deleted file mode 120000 index bfdc2328e..000000000 --- a/PubNub/include/PNEnvelopeInformation.h +++ /dev/null @@ -1 +0,0 @@ -../Data/PNEnvelopeInformation.h \ No newline at end of file diff --git a/PubNub/include/PNErrorCodes.h b/PubNub/include/PNErrorCodes.h deleted file mode 120000 index 8bf1577df..000000000 --- a/PubNub/include/PNErrorCodes.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/PNErrorCodes.h \ No newline at end of file diff --git a/PubNub/include/PNErrorParser.h b/PubNub/include/PNErrorParser.h deleted file mode 120000 index cbebbcab0..000000000 --- a/PubNub/include/PNErrorParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNErrorParser.h \ No newline at end of file diff --git a/PubNub/include/PNErrorStatus+Private.h b/PubNub/include/PNErrorStatus+Private.h deleted file mode 120000 index 6a0870e0b..000000000 --- a/PubNub/include/PNErrorStatus+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNErrorStatus+Private.h \ No newline at end of file diff --git a/PubNub/include/PNErrorStatus.h b/PubNub/include/PNErrorStatus.h deleted file mode 120000 index 4c1194c59..000000000 --- a/PubNub/include/PNErrorStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNErrorStatus.h \ No newline at end of file diff --git a/PubNub/include/PNEventsListener.h b/PubNub/include/PNEventsListener.h deleted file mode 120000 index 78e0d921b..000000000 --- a/PubNub/include/PNEventsListener.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Protocols/PNEventsListener.h \ No newline at end of file diff --git a/PubNub/include/PNFCMNotificationPayload.h b/PubNub/include/PNFCMNotificationPayload.h deleted file mode 120000 index 06bd56776..000000000 --- a/PubNub/include/PNFCMNotificationPayload.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/Notifications Payload/PNFCMNotificationPayload.h \ No newline at end of file diff --git a/PubNub/include/PNFetchAllChannelsMetadataAPICallBuilder.h b/PubNub/include/PNFetchAllChannelsMetadataAPICallBuilder.h deleted file mode 120000 index 7bea1ee72..000000000 --- a/PubNub/include/PNFetchAllChannelsMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/Channel/PNFetchAllChannelsMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNFetchAllChannelsMetadataRequest.h b/PubNub/include/PNFetchAllChannelsMetadataRequest.h deleted file mode 120000 index 601a1b9da..000000000 --- a/PubNub/include/PNFetchAllChannelsMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Channel/PNFetchAllChannelsMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PNFetchAllUUIDMetadataAPICallBuilder.h b/PubNub/include/PNFetchAllUUIDMetadataAPICallBuilder.h deleted file mode 120000 index 9a67b0ff6..000000000 --- a/PubNub/include/PNFetchAllUUIDMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/UUID/PNFetchAllUUIDMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNFetchAllUUIDMetadataRequest.h b/PubNub/include/PNFetchAllUUIDMetadataRequest.h deleted file mode 120000 index 8f3d9c3e8..000000000 --- a/PubNub/include/PNFetchAllUUIDMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/UUID/PNFetchAllUUIDMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PNFetchChannelMembersAPICallBuilder.h b/PubNub/include/PNFetchChannelMembersAPICallBuilder.h deleted file mode 120000 index a9f12b4d9..000000000 --- a/PubNub/include/PNFetchChannelMembersAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/Membership/PNFetchChannelMembersAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNFetchChannelMembersRequest.h b/PubNub/include/PNFetchChannelMembersRequest.h deleted file mode 120000 index cbb41af79..000000000 --- a/PubNub/include/PNFetchChannelMembersRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Membership/PNFetchChannelMembersRequest.h \ No newline at end of file diff --git a/PubNub/include/PNFetchChannelMembersResult.h b/PubNub/include/PNFetchChannelMembersResult.h deleted file mode 120000 index f99008aa9..000000000 --- a/PubNub/include/PNFetchChannelMembersResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNFetchChannelMembersResult.h \ No newline at end of file diff --git a/PubNub/include/PNFetchChannelMetadataAPICallBuilder.h b/PubNub/include/PNFetchChannelMetadataAPICallBuilder.h deleted file mode 120000 index e92ff25af..000000000 --- a/PubNub/include/PNFetchChannelMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/Channel/PNFetchChannelMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNFetchChannelMetadataRequest.h b/PubNub/include/PNFetchChannelMetadataRequest.h deleted file mode 120000 index 88ca39cda..000000000 --- a/PubNub/include/PNFetchChannelMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Channel/PNFetchChannelMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PNFetchChannelsMetadataParser.h b/PubNub/include/PNFetchChannelsMetadataParser.h deleted file mode 120000 index d580ea640..000000000 --- a/PubNub/include/PNFetchChannelsMetadataParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Objects/PNFetchChannelsMetadataParser.h \ No newline at end of file diff --git a/PubNub/include/PNFetchChannelsMetadataResult.h b/PubNub/include/PNFetchChannelsMetadataResult.h deleted file mode 120000 index 166d9c40b..000000000 --- a/PubNub/include/PNFetchChannelsMetadataResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNFetchChannelsMetadataResult.h \ No newline at end of file diff --git a/PubNub/include/PNFetchMembershipsAPICallBuilder.h b/PubNub/include/PNFetchMembershipsAPICallBuilder.h deleted file mode 120000 index 1d8b6c420..000000000 --- a/PubNub/include/PNFetchMembershipsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/Membership/PNFetchMembershipsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNFetchMembershipsRequest.h b/PubNub/include/PNFetchMembershipsRequest.h deleted file mode 120000 index f82358dbe..000000000 --- a/PubNub/include/PNFetchMembershipsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Membership/PNFetchMembershipsRequest.h \ No newline at end of file diff --git a/PubNub/include/PNFetchMembershipsResult.h b/PubNub/include/PNFetchMembershipsResult.h deleted file mode 120000 index 6d38204ce..000000000 --- a/PubNub/include/PNFetchMembershipsResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNFetchMembershipsResult.h \ No newline at end of file diff --git a/PubNub/include/PNFetchMessageActionsRequest.h b/PubNub/include/PNFetchMessageActionsRequest.h deleted file mode 120000 index e9fd9df17..000000000 --- a/PubNub/include/PNFetchMessageActionsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Actions/Message/PNFetchMessageActionsRequest.h \ No newline at end of file diff --git a/PubNub/include/PNFetchMessageActionsResult.h b/PubNub/include/PNFetchMessageActionsResult.h deleted file mode 120000 index 0d9267ad6..000000000 --- a/PubNub/include/PNFetchMessageActionsResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNFetchMessageActionsResult.h \ No newline at end of file diff --git a/PubNub/include/PNFetchMessagesActionsAPICallBuilder.h b/PubNub/include/PNFetchMessagesActionsAPICallBuilder.h deleted file mode 120000 index f2ea46058..000000000 --- a/PubNub/include/PNFetchMessagesActionsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Actions/Message/PNFetchMessagesActionsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNFetchMessagesActionsParser.h b/PubNub/include/PNFetchMessagesActionsParser.h deleted file mode 120000 index 9e252c0d2..000000000 --- a/PubNub/include/PNFetchMessagesActionsParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Actions/Message/PNFetchMessagesActionsParser.h \ No newline at end of file diff --git a/PubNub/include/PNFetchUUIDMetadataAPICallBuilder.h b/PubNub/include/PNFetchUUIDMetadataAPICallBuilder.h deleted file mode 120000 index e64624f83..000000000 --- a/PubNub/include/PNFetchUUIDMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/UUID/PNFetchUUIDMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNFetchUUIDMetadataParser.h b/PubNub/include/PNFetchUUIDMetadataParser.h deleted file mode 120000 index a3a9d9491..000000000 --- a/PubNub/include/PNFetchUUIDMetadataParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Objects/PNFetchUUIDMetadataParser.h \ No newline at end of file diff --git a/PubNub/include/PNFetchUUIDMetadataRequest.h b/PubNub/include/PNFetchUUIDMetadataRequest.h deleted file mode 120000 index 155e2a11d..000000000 --- a/PubNub/include/PNFetchUUIDMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/UUID/PNFetchUUIDMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PNFetchUUIDMetadataResult.h b/PubNub/include/PNFetchUUIDMetadataResult.h deleted file mode 120000 index aadcac7d8..000000000 --- a/PubNub/include/PNFetchUUIDMetadataResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNFetchUUIDMetadataResult.h \ No newline at end of file diff --git a/PubNub/include/PNFile+Private.h b/PubNub/include/PNFile+Private.h deleted file mode 120000 index 47628e68b..000000000 --- a/PubNub/include/PNFile+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNFile+Private.h \ No newline at end of file diff --git a/PubNub/include/PNFile.h b/PubNub/include/PNFile.h deleted file mode 120000 index 318212553..000000000 --- a/PubNub/include/PNFile.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNFile.h \ No newline at end of file diff --git a/PubNub/include/PNFileDownloadURLAPICallBuilder.h b/PubNub/include/PNFileDownloadURLAPICallBuilder.h deleted file mode 120000 index dabbde5cc..000000000 --- a/PubNub/include/PNFileDownloadURLAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Files/PNFileDownloadURLAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNFilesAPICallBuilder.h b/PubNub/include/PNFilesAPICallBuilder.h deleted file mode 120000 index 19236710b..000000000 --- a/PubNub/include/PNFilesAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Files/PNFilesAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNFilesManager.h b/PubNub/include/PNFilesManager.h deleted file mode 120000 index 172bc88d6..000000000 --- a/PubNub/include/PNFilesManager.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Managers/PNFilesManager.h \ No newline at end of file diff --git a/PubNub/include/PNGZIP.h b/PubNub/include/PNGZIP.h deleted file mode 120000 index e144510ee..000000000 --- a/PubNub/include/PNGZIP.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNGZIP.h \ No newline at end of file diff --git a/PubNub/include/PNGenerateFileUploadURLParser.h b/PubNub/include/PNGenerateFileUploadURLParser.h deleted file mode 120000 index 474ebafd6..000000000 --- a/PubNub/include/PNGenerateFileUploadURLParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Files/PNGenerateFileUploadURLParser.h \ No newline at end of file diff --git a/PubNub/include/PNGenerateFileUploadURLRequest.h b/PubNub/include/PNGenerateFileUploadURLRequest.h deleted file mode 120000 index feaec6311..000000000 --- a/PubNub/include/PNGenerateFileUploadURLRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Files/PNGenerateFileUploadURLRequest.h \ No newline at end of file diff --git a/PubNub/include/PNGenerateFileUploadURLStatus.h b/PubNub/include/PNGenerateFileUploadURLStatus.h deleted file mode 120000 index f111442c0..000000000 --- a/PubNub/include/PNGenerateFileUploadURLStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNGenerateFileUploadURLStatus.h \ No newline at end of file diff --git a/PubNub/include/PNHeartbeat.h b/PubNub/include/PNHeartbeat.h deleted file mode 120000 index 37eb750c1..000000000 --- a/PubNub/include/PNHeartbeat.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Managers/PNHeartbeat.h \ No newline at end of file diff --git a/PubNub/include/PNHeartbeatParser.h b/PubNub/include/PNHeartbeatParser.h deleted file mode 120000 index 77478a42f..000000000 --- a/PubNub/include/PNHeartbeatParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNHeartbeatParser.h \ No newline at end of file diff --git a/PubNub/include/PNHelpers.h b/PubNub/include/PNHelpers.h deleted file mode 120000 index 5ca0104ee..000000000 --- a/PubNub/include/PNHelpers.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNHelpers.h \ No newline at end of file diff --git a/PubNub/include/PNHistoryAPICallBuilder.h b/PubNub/include/PNHistoryAPICallBuilder.h deleted file mode 120000 index 46643c3d0..000000000 --- a/PubNub/include/PNHistoryAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/History/PNHistoryAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNHistoryParser.h b/PubNub/include/PNHistoryParser.h deleted file mode 120000 index 5caab9dca..000000000 --- a/PubNub/include/PNHistoryParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNHistoryParser.h \ No newline at end of file diff --git a/PubNub/include/PNHistoryResult.h b/PubNub/include/PNHistoryResult.h deleted file mode 120000 index eac515108..000000000 --- a/PubNub/include/PNHistoryResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNHistoryResult.h \ No newline at end of file diff --git a/PubNub/include/PNInMemoryStorage.h b/PubNub/include/PNInMemoryStorage.h deleted file mode 120000 index 201ab4d04..000000000 --- a/PubNub/include/PNInMemoryStorage.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Storage/PNInMemoryStorage.h \ No newline at end of file diff --git a/PubNub/include/PNJSON.h b/PubNub/include/PNJSON.h deleted file mode 120000 index acb1f06d3..000000000 --- a/PubNub/include/PNJSON.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNJSON.h \ No newline at end of file diff --git a/PubNub/include/PNKeyValueStorage.h b/PubNub/include/PNKeyValueStorage.h deleted file mode 120000 index dc9c4e0c3..000000000 --- a/PubNub/include/PNKeyValueStorage.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Protocols/PNKeyValueStorage.h \ No newline at end of file diff --git a/PubNub/include/PNKeychain+Private.h b/PubNub/include/PNKeychain+Private.h deleted file mode 120000 index 777ce9553..000000000 --- a/PubNub/include/PNKeychain+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/PNKeychain+Private.h \ No newline at end of file diff --git a/PubNub/include/PNKeychain.h b/PubNub/include/PNKeychain.h deleted file mode 120000 index 2a6e5febb..000000000 --- a/PubNub/include/PNKeychain.h +++ /dev/null @@ -1 +0,0 @@ -../Data/PNKeychain.h \ No newline at end of file diff --git a/PubNub/include/PNKeychainStorage.h b/PubNub/include/PNKeychainStorage.h deleted file mode 120000 index 07e4b08ba..000000000 --- a/PubNub/include/PNKeychainStorage.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Storage/PNKeychainStorage.h \ No newline at end of file diff --git a/PubNub/include/PNLLogFileInformation.h b/PubNub/include/PNLLogFileInformation.h deleted file mode 120000 index ba7ab925a..000000000 --- a/PubNub/include/PNLLogFileInformation.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Logger/Data/PNLLogFileInformation.h \ No newline at end of file diff --git a/PubNub/include/PNLLogger.h b/PubNub/include/PNLLogger.h deleted file mode 120000 index 01c85a668..000000000 --- a/PubNub/include/PNLLogger.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Logger/Core/PNLLogger.h \ No newline at end of file diff --git a/PubNub/include/PNLeaveParser.h b/PubNub/include/PNLeaveParser.h deleted file mode 120000 index 938c47d2c..000000000 --- a/PubNub/include/PNLeaveParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNLeaveParser.h \ No newline at end of file diff --git a/PubNub/include/PNLegacyCryptor.h b/PubNub/include/PNLegacyCryptor.h deleted file mode 120000 index 7d136102d..000000000 --- a/PubNub/include/PNLegacyCryptor.h +++ /dev/null @@ -1 +0,0 @@ -../Modules/Crypto/Cryptors/AES/PNLegacyCryptor.h \ No newline at end of file diff --git a/PubNub/include/PNListFilesAPICallBuilder.h b/PubNub/include/PNListFilesAPICallBuilder.h deleted file mode 120000 index 2f2f25b7b..000000000 --- a/PubNub/include/PNListFilesAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Files/PNListFilesAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNListFilesParser.h b/PubNub/include/PNListFilesParser.h deleted file mode 120000 index ce8e26768..000000000 --- a/PubNub/include/PNListFilesParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Files/PNListFilesParser.h \ No newline at end of file diff --git a/PubNub/include/PNListFilesRequest.h b/PubNub/include/PNListFilesRequest.h deleted file mode 120000 index def5dd979..000000000 --- a/PubNub/include/PNListFilesRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Files/PNListFilesRequest.h \ No newline at end of file diff --git a/PubNub/include/PNListFilesResult.h b/PubNub/include/PNListFilesResult.h deleted file mode 120000 index 1fba9b338..000000000 --- a/PubNub/include/PNListFilesResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNListFilesResult.h \ No newline at end of file diff --git a/PubNub/include/PNLockSupport.h b/PubNub/include/PNLockSupport.h deleted file mode 120000 index 721d8acb0..000000000 --- a/PubNub/include/PNLockSupport.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNLockSupport.h \ No newline at end of file diff --git a/PubNub/include/PNLogMacro.h b/PubNub/include/PNLogMacro.h deleted file mode 120000 index f05ea9d33..000000000 --- a/PubNub/include/PNLogMacro.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Logger/PNLogMacro.h \ No newline at end of file diff --git a/PubNub/include/PNMPNSNotificationPayload.h b/PubNub/include/PNMPNSNotificationPayload.h deleted file mode 120000 index d9c382673..000000000 --- a/PubNub/include/PNMPNSNotificationPayload.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/Notifications Payload/PNMPNSNotificationPayload.h \ No newline at end of file diff --git a/PubNub/include/PNManageChannelMembersAPICallBuilder.h b/PubNub/include/PNManageChannelMembersAPICallBuilder.h deleted file mode 120000 index ae9a11bff..000000000 --- a/PubNub/include/PNManageChannelMembersAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/Membership/PNManageChannelMembersAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNManageChannelMembersRequest.h b/PubNub/include/PNManageChannelMembersRequest.h deleted file mode 120000 index b8acbd3b9..000000000 --- a/PubNub/include/PNManageChannelMembersRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Membership/PNManageChannelMembersRequest.h \ No newline at end of file diff --git a/PubNub/include/PNManageChannelMembersStatus.h b/PubNub/include/PNManageChannelMembersStatus.h deleted file mode 120000 index 90bcd430a..000000000 --- a/PubNub/include/PNManageChannelMembersStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNManageChannelMembersStatus.h \ No newline at end of file diff --git a/PubNub/include/PNManageMembershipsAPICallBuilder.h b/PubNub/include/PNManageMembershipsAPICallBuilder.h deleted file mode 120000 index ea615a583..000000000 --- a/PubNub/include/PNManageMembershipsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/Membership/PNManageMembershipsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNManageMembershipsRequest.h b/PubNub/include/PNManageMembershipsRequest.h deleted file mode 120000 index c1ec27829..000000000 --- a/PubNub/include/PNManageMembershipsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Membership/PNManageMembershipsRequest.h \ No newline at end of file diff --git a/PubNub/include/PNManageMembershipsStatus.h b/PubNub/include/PNManageMembershipsStatus.h deleted file mode 120000 index ad1e207c5..000000000 --- a/PubNub/include/PNManageMembershipsStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNManageMembershipsStatus.h \ No newline at end of file diff --git a/PubNub/include/PNMembership+Private.h b/PubNub/include/PNMembership+Private.h deleted file mode 120000 index d15ca64e0..000000000 --- a/PubNub/include/PNMembership+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNMembership+Private.h \ No newline at end of file diff --git a/PubNub/include/PNMembership.h b/PubNub/include/PNMembership.h deleted file mode 120000 index 6ced0c882..000000000 --- a/PubNub/include/PNMembership.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNMembership.h \ No newline at end of file diff --git a/PubNub/include/PNMembershipsParser.h b/PubNub/include/PNMembershipsParser.h deleted file mode 120000 index 3665e1c00..000000000 --- a/PubNub/include/PNMembershipsParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Objects/PNMembershipsParser.h \ No newline at end of file diff --git a/PubNub/include/PNMessageAction+Private.h b/PubNub/include/PNMessageAction+Private.h deleted file mode 120000 index 45ae5c075..000000000 --- a/PubNub/include/PNMessageAction+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNMessageAction+Private.h \ No newline at end of file diff --git a/PubNub/include/PNMessageAction.h b/PubNub/include/PNMessageAction.h deleted file mode 120000 index 421452a57..000000000 --- a/PubNub/include/PNMessageAction.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNMessageAction.h \ No newline at end of file diff --git a/PubNub/include/PNMessageCountAPICallBuilder.h b/PubNub/include/PNMessageCountAPICallBuilder.h deleted file mode 120000 index 796690ddc..000000000 --- a/PubNub/include/PNMessageCountAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/History/PNMessageCountAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNMessageCountParser.h b/PubNub/include/PNMessageCountParser.h deleted file mode 120000 index c9f340ffa..000000000 --- a/PubNub/include/PNMessageCountParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNMessageCountParser.h \ No newline at end of file diff --git a/PubNub/include/PNMessageCountResult.h b/PubNub/include/PNMessageCountResult.h deleted file mode 120000 index 74b603fce..000000000 --- a/PubNub/include/PNMessageCountResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNMessageCountResult.h \ No newline at end of file diff --git a/PubNub/include/PNMessageDeleteParser.h b/PubNub/include/PNMessageDeleteParser.h deleted file mode 120000 index 3c25e7a6c..000000000 --- a/PubNub/include/PNMessageDeleteParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNMessageDeleteParser.h \ No newline at end of file diff --git a/PubNub/include/PNMessagePublishParser.h b/PubNub/include/PNMessagePublishParser.h deleted file mode 120000 index 55b312df8..000000000 --- a/PubNub/include/PNMessagePublishParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNMessagePublishParser.h \ No newline at end of file diff --git a/PubNub/include/PNNetwork.h b/PubNub/include/PNNetwork.h deleted file mode 120000 index 353a3b315..000000000 --- a/PubNub/include/PNNetwork.h +++ /dev/null @@ -1 +0,0 @@ -../Network/PNNetwork.h \ No newline at end of file diff --git a/PubNub/include/PNNetworkResponseSerializer.h b/PubNub/include/PNNetworkResponseSerializer.h deleted file mode 120000 index b2bbb93d4..000000000 --- a/PubNub/include/PNNetworkResponseSerializer.h +++ /dev/null @@ -1 +0,0 @@ -../Network/PNNetworkResponseSerializer.h \ No newline at end of file diff --git a/PubNub/include/PNNotificationsPayload.h b/PubNub/include/PNNotificationsPayload.h deleted file mode 120000 index 89b155bee..000000000 --- a/PubNub/include/PNNotificationsPayload.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/Notifications Payload/PNNotificationsPayload.h \ No newline at end of file diff --git a/PubNub/include/PNNumber.h b/PubNub/include/PNNumber.h deleted file mode 120000 index 696b25824..000000000 --- a/PubNub/include/PNNumber.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNNumber.h \ No newline at end of file diff --git a/PubNub/include/PNObjectsAPICallBuilder.h b/PubNub/include/PNObjectsAPICallBuilder.h deleted file mode 120000 index 763a4b4e5..000000000 --- a/PubNub/include/PNObjectsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/PNObjectsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNObjectsPaginatedRequest.h b/PubNub/include/PNObjectsPaginatedRequest.h deleted file mode 120000 index 4ceccbc5b..000000000 --- a/PubNub/include/PNObjectsPaginatedRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/PNObjectsPaginatedRequest.h \ No newline at end of file diff --git a/PubNub/include/PNObjectsRemoveParser.h b/PubNub/include/PNObjectsRemoveParser.h deleted file mode 120000 index d86380145..000000000 --- a/PubNub/include/PNObjectsRemoveParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Objects/PNObjectsRemoveParser.h \ No newline at end of file diff --git a/PubNub/include/PNOperationResult+Private.h b/PubNub/include/PNOperationResult+Private.h deleted file mode 120000 index 1c4a0f166..000000000 --- a/PubNub/include/PNOperationResult+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNOperationResult+Private.h \ No newline at end of file diff --git a/PubNub/include/PNOperationResult.h b/PubNub/include/PNOperationResult.h deleted file mode 120000 index 4453adf4e..000000000 --- a/PubNub/include/PNOperationResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNOperationResult.h \ No newline at end of file diff --git a/PubNub/include/PNPAMToken+Private.h b/PubNub/include/PNPAMToken+Private.h deleted file mode 120000 index ed66a7970..000000000 --- a/PubNub/include/PNPAMToken+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNPAMToken+Private.h \ No newline at end of file diff --git a/PubNub/include/PNPAMToken.h b/PubNub/include/PNPAMToken.h deleted file mode 120000 index 76c921778..000000000 --- a/PubNub/include/PNPAMToken.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNPAMToken.h \ No newline at end of file diff --git a/PubNub/include/PNParser.h b/PubNub/include/PNParser.h deleted file mode 120000 index c0e532784..000000000 --- a/PubNub/include/PNParser.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Protocols/PNParser.h \ No newline at end of file diff --git a/PubNub/include/PNPresenceAPICallBuilder.h b/PubNub/include/PNPresenceAPICallBuilder.h deleted file mode 120000 index 362c9c3c1..000000000 --- a/PubNub/include/PNPresenceAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Presence/PNPresenceAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNPresenceChannelGroupHereNowAPICallBuilder.h b/PubNub/include/PNPresenceChannelGroupHereNowAPICallBuilder.h deleted file mode 120000 index 64d5a8607..000000000 --- a/PubNub/include/PNPresenceChannelGroupHereNowAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Presence/PNPresenceChannelGroupHereNowAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNPresenceChannelGroupHereNowResult.h b/PubNub/include/PNPresenceChannelGroupHereNowResult.h deleted file mode 120000 index 682069715..000000000 --- a/PubNub/include/PNPresenceChannelGroupHereNowResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNPresenceChannelGroupHereNowResult.h \ No newline at end of file diff --git a/PubNub/include/PNPresenceChannelHereNowAPICallBuilder.h b/PubNub/include/PNPresenceChannelHereNowAPICallBuilder.h deleted file mode 120000 index 37b12f0b2..000000000 --- a/PubNub/include/PNPresenceChannelHereNowAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Presence/PNPresenceChannelHereNowAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNPresenceChannelHereNowResult.h b/PubNub/include/PNPresenceChannelHereNowResult.h deleted file mode 120000 index 09d2a1404..000000000 --- a/PubNub/include/PNPresenceChannelHereNowResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNPresenceChannelHereNowResult.h \ No newline at end of file diff --git a/PubNub/include/PNPresenceGlobalHereNowResult.h b/PubNub/include/PNPresenceGlobalHereNowResult.h deleted file mode 120000 index cb605b11d..000000000 --- a/PubNub/include/PNPresenceGlobalHereNowResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNPresenceGlobalHereNowResult.h \ No newline at end of file diff --git a/PubNub/include/PNPresenceHeartbeatAPICallBuilder.h b/PubNub/include/PNPresenceHeartbeatAPICallBuilder.h deleted file mode 120000 index d58394416..000000000 --- a/PubNub/include/PNPresenceHeartbeatAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Presence/PNPresenceHeartbeatAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNPresenceHereNowAPICallBuilder.h b/PubNub/include/PNPresenceHereNowAPICallBuilder.h deleted file mode 120000 index 8103976c1..000000000 --- a/PubNub/include/PNPresenceHereNowAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Presence/PNPresenceHereNowAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNPresenceHereNowParser.h b/PubNub/include/PNPresenceHereNowParser.h deleted file mode 120000 index 3f398b643..000000000 --- a/PubNub/include/PNPresenceHereNowParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNPresenceHereNowParser.h \ No newline at end of file diff --git a/PubNub/include/PNPresenceWhereNowAPICallBuilder.h b/PubNub/include/PNPresenceWhereNowAPICallBuilder.h deleted file mode 120000 index e9662d822..000000000 --- a/PubNub/include/PNPresenceWhereNowAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Presence/PNPresenceWhereNowAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNPresenceWhereNowParser.h b/PubNub/include/PNPresenceWhereNowParser.h deleted file mode 120000 index ca80c5509..000000000 --- a/PubNub/include/PNPresenceWhereNowParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNPresenceWhereNowParser.h \ No newline at end of file diff --git a/PubNub/include/PNPresenceWhereNowResult.h b/PubNub/include/PNPresenceWhereNowResult.h deleted file mode 120000 index 5420caf83..000000000 --- a/PubNub/include/PNPresenceWhereNowResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNPresenceWhereNowResult.h \ No newline at end of file diff --git a/PubNub/include/PNPrivateStructures.h b/PubNub/include/PNPrivateStructures.h deleted file mode 120000 index 7c8094ab5..000000000 --- a/PubNub/include/PNPrivateStructures.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/PNPrivateStructures.h \ No newline at end of file diff --git a/PubNub/include/PNPublishAPICallBuilder.h b/PubNub/include/PNPublishAPICallBuilder.h deleted file mode 120000 index cef367147..000000000 --- a/PubNub/include/PNPublishAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Publish/PNPublishAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNPublishFileMessageAPICallBuilder.h b/PubNub/include/PNPublishFileMessageAPICallBuilder.h deleted file mode 120000 index c26cad5e2..000000000 --- a/PubNub/include/PNPublishFileMessageAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Publish/PNPublishFileMessageAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNPublishFileMessageRequest.h b/PubNub/include/PNPublishFileMessageRequest.h deleted file mode 120000 index 67a304e01..000000000 --- a/PubNub/include/PNPublishFileMessageRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Publish/PNPublishFileMessageRequest.h \ No newline at end of file diff --git a/PubNub/include/PNPublishRequest.h b/PubNub/include/PNPublishRequest.h deleted file mode 120000 index 735d20403..000000000 --- a/PubNub/include/PNPublishRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Publish/PNPublishRequest.h \ No newline at end of file diff --git a/PubNub/include/PNPublishSequence.h b/PubNub/include/PNPublishSequence.h deleted file mode 120000 index 1e92f9583..000000000 --- a/PubNub/include/PNPublishSequence.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Managers/PNPublishSequence.h \ No newline at end of file diff --git a/PubNub/include/PNPublishSizeAPICallBuilder.h b/PubNub/include/PNPublishSizeAPICallBuilder.h deleted file mode 120000 index c17ff76dd..000000000 --- a/PubNub/include/PNPublishSizeAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Publish/PNPublishSizeAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNPublishStatus.h b/PubNub/include/PNPublishStatus.h deleted file mode 120000 index db6ff7759..000000000 --- a/PubNub/include/PNPublishStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNPublishStatus.h \ No newline at end of file diff --git a/PubNub/include/PNPushNotificationsAuditParser.h b/PubNub/include/PNPushNotificationsAuditParser.h deleted file mode 120000 index eded58a39..000000000 --- a/PubNub/include/PNPushNotificationsAuditParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNPushNotificationsAuditParser.h \ No newline at end of file diff --git a/PubNub/include/PNPushNotificationsStateModificationParser.h b/PubNub/include/PNPushNotificationsStateModificationParser.h deleted file mode 120000 index 39cc6e377..000000000 --- a/PubNub/include/PNPushNotificationsStateModificationParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNPushNotificationsStateModificationParser.h \ No newline at end of file diff --git a/PubNub/include/PNReachability.h b/PubNub/include/PNReachability.h deleted file mode 120000 index 69b982a10..000000000 --- a/PubNub/include/PNReachability.h +++ /dev/null @@ -1 +0,0 @@ -../Network/PNReachability.h \ No newline at end of file diff --git a/PubNub/include/PNRemoveAllPushNotificationsRequest.h b/PubNub/include/PNRemoveAllPushNotificationsRequest.h deleted file mode 120000 index 764052c59..000000000 --- a/PubNub/include/PNRemoveAllPushNotificationsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Push Notifications/PNRemoveAllPushNotificationsRequest.h \ No newline at end of file diff --git a/PubNub/include/PNRemoveChannelMembersAPICallBuilder.h b/PubNub/include/PNRemoveChannelMembersAPICallBuilder.h deleted file mode 120000 index 77e6f40c7..000000000 --- a/PubNub/include/PNRemoveChannelMembersAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/Membership/PNRemoveChannelMembersAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNRemoveChannelMembersRequest.h b/PubNub/include/PNRemoveChannelMembersRequest.h deleted file mode 120000 index ba73c1714..000000000 --- a/PubNub/include/PNRemoveChannelMembersRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Membership/PNRemoveChannelMembersRequest.h \ No newline at end of file diff --git a/PubNub/include/PNRemoveChannelMetadataAPICallBuilder.h b/PubNub/include/PNRemoveChannelMetadataAPICallBuilder.h deleted file mode 120000 index 053418628..000000000 --- a/PubNub/include/PNRemoveChannelMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/Channel/PNRemoveChannelMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNRemoveChannelMetadataRequest.h b/PubNub/include/PNRemoveChannelMetadataRequest.h deleted file mode 120000 index d95745ef6..000000000 --- a/PubNub/include/PNRemoveChannelMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Channel/PNRemoveChannelMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PNRemoveMembershipsAPICallBuilder.h b/PubNub/include/PNRemoveMembershipsAPICallBuilder.h deleted file mode 120000 index 676c694d6..000000000 --- a/PubNub/include/PNRemoveMembershipsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/Membership/PNRemoveMembershipsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNRemoveMembershipsRequest.h b/PubNub/include/PNRemoveMembershipsRequest.h deleted file mode 120000 index 83b594d08..000000000 --- a/PubNub/include/PNRemoveMembershipsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Membership/PNRemoveMembershipsRequest.h \ No newline at end of file diff --git a/PubNub/include/PNRemoveMessageActionAPICallBuilder.h b/PubNub/include/PNRemoveMessageActionAPICallBuilder.h deleted file mode 120000 index 3bdf84ffb..000000000 --- a/PubNub/include/PNRemoveMessageActionAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Actions/Message/PNRemoveMessageActionAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNRemoveMessageActionParser.h b/PubNub/include/PNRemoveMessageActionParser.h deleted file mode 120000 index ab806be9a..000000000 --- a/PubNub/include/PNRemoveMessageActionParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Actions/Message/PNRemoveMessageActionParser.h \ No newline at end of file diff --git a/PubNub/include/PNRemoveMessageActionRequest.h b/PubNub/include/PNRemoveMessageActionRequest.h deleted file mode 120000 index 70fcc8067..000000000 --- a/PubNub/include/PNRemoveMessageActionRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Actions/Message/PNRemoveMessageActionRequest.h \ No newline at end of file diff --git a/PubNub/include/PNRemovePushNotificationsRequest.h b/PubNub/include/PNRemovePushNotificationsRequest.h deleted file mode 120000 index 1e6877dff..000000000 --- a/PubNub/include/PNRemovePushNotificationsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Push Notifications/PNRemovePushNotificationsRequest.h \ No newline at end of file diff --git a/PubNub/include/PNRemoveUUIDMetadataAPICallBuilder.h b/PubNub/include/PNRemoveUUIDMetadataAPICallBuilder.h deleted file mode 120000 index ad65507fe..000000000 --- a/PubNub/include/PNRemoveUUIDMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/UUID/PNRemoveUUIDMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNRemoveUUIDMetadataRequest.h b/PubNub/include/PNRemoveUUIDMetadataRequest.h deleted file mode 120000 index d3c9bacb1..000000000 --- a/PubNub/include/PNRemoveUUIDMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/UUID/PNRemoveUUIDMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PNRequest+Private.h b/PubNub/include/PNRequest+Private.h deleted file mode 120000 index 7c82dcd1e..000000000 --- a/PubNub/include/PNRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/PNRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PNRequest.h b/PubNub/include/PNRequest.h deleted file mode 120000 index f0c8dd5a5..000000000 --- a/PubNub/include/PNRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/PNRequest.h \ No newline at end of file diff --git a/PubNub/include/PNRequestParameters.h b/PubNub/include/PNRequestParameters.h deleted file mode 120000 index eaa0346ac..000000000 --- a/PubNub/include/PNRequestParameters.h +++ /dev/null @@ -1 +0,0 @@ -../Network/PNRequestParameters.h \ No newline at end of file diff --git a/PubNub/include/PNRequestRetryConfiguration+Private.h b/PubNub/include/PNRequestRetryConfiguration+Private.h deleted file mode 120000 index 3e5314154..000000000 --- a/PubNub/include/PNRequestRetryConfiguration+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Network/PNRequestRetryConfiguration+Private.h \ No newline at end of file diff --git a/PubNub/include/PNRequestRetryConfiguration.h b/PubNub/include/PNRequestRetryConfiguration.h deleted file mode 120000 index d2375ef33..000000000 --- a/PubNub/include/PNRequestRetryConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -../Network/PNRequestRetryConfiguration.h \ No newline at end of file diff --git a/PubNub/include/PNResult.h b/PubNub/include/PNResult.h deleted file mode 120000 index fa3de3c61..000000000 --- a/PubNub/include/PNResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/PNResult.h \ No newline at end of file diff --git a/PubNub/include/PNSendFileAPICallBuilder.h b/PubNub/include/PNSendFileAPICallBuilder.h deleted file mode 120000 index 8b9a3d383..000000000 --- a/PubNub/include/PNSendFileAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Files/PNSendFileAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNSendFileRequest+Private.h b/PubNub/include/PNSendFileRequest+Private.h deleted file mode 120000 index 4da07c2d1..000000000 --- a/PubNub/include/PNSendFileRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Files/PNSendFileRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PNSendFileRequest.h b/PubNub/include/PNSendFileRequest.h deleted file mode 120000 index edc91f916..000000000 --- a/PubNub/include/PNSendFileRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Files/PNSendFileRequest.h \ No newline at end of file diff --git a/PubNub/include/PNSendFileStatus+Private.h b/PubNub/include/PNSendFileStatus+Private.h deleted file mode 120000 index aaa440f0b..000000000 --- a/PubNub/include/PNSendFileStatus+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNSendFileStatus+Private.h \ No newline at end of file diff --git a/PubNub/include/PNSendFileStatus.h b/PubNub/include/PNSendFileStatus.h deleted file mode 120000 index b2669383a..000000000 --- a/PubNub/include/PNSendFileStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNSendFileStatus.h \ No newline at end of file diff --git a/PubNub/include/PNSequenceInputStream.h b/PubNub/include/PNSequenceInputStream.h deleted file mode 120000 index 780a26da7..000000000 --- a/PubNub/include/PNSequenceInputStream.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Streams/PNSequenceInputStream.h \ No newline at end of file diff --git a/PubNub/include/PNServiceData+Private.h b/PubNub/include/PNServiceData+Private.h deleted file mode 120000 index 471b416eb..000000000 --- a/PubNub/include/PNServiceData+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNServiceData+Private.h \ No newline at end of file diff --git a/PubNub/include/PNServiceData.h b/PubNub/include/PNServiceData.h deleted file mode 120000 index 1b7e42c50..000000000 --- a/PubNub/include/PNServiceData.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNServiceData.h \ No newline at end of file diff --git a/PubNub/include/PNSetChannelMembersAPICallBuilder.h b/PubNub/include/PNSetChannelMembersAPICallBuilder.h deleted file mode 120000 index 36a22880b..000000000 --- a/PubNub/include/PNSetChannelMembersAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/Membership/PNSetChannelMembersAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNSetChannelMembersRequest.h b/PubNub/include/PNSetChannelMembersRequest.h deleted file mode 120000 index cb9073b7a..000000000 --- a/PubNub/include/PNSetChannelMembersRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Membership/PNSetChannelMembersRequest.h \ No newline at end of file diff --git a/PubNub/include/PNSetChannelMetadataAPICallBuilder.h b/PubNub/include/PNSetChannelMetadataAPICallBuilder.h deleted file mode 120000 index 761ed236f..000000000 --- a/PubNub/include/PNSetChannelMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/Channel/PNSetChannelMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNSetChannelMetadataRequest.h b/PubNub/include/PNSetChannelMetadataRequest.h deleted file mode 120000 index 89a5831fc..000000000 --- a/PubNub/include/PNSetChannelMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Channel/PNSetChannelMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PNSetChannelMetadataStatus.h b/PubNub/include/PNSetChannelMetadataStatus.h deleted file mode 120000 index 16a5dee22..000000000 --- a/PubNub/include/PNSetChannelMetadataStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNSetChannelMetadataStatus.h \ No newline at end of file diff --git a/PubNub/include/PNSetMembershipsAPICallBuilder.h b/PubNub/include/PNSetMembershipsAPICallBuilder.h deleted file mode 120000 index 7550f7dfa..000000000 --- a/PubNub/include/PNSetMembershipsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/Membership/PNSetMembershipsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNSetMembershipsRequest.h b/PubNub/include/PNSetMembershipsRequest.h deleted file mode 120000 index a01ad3183..000000000 --- a/PubNub/include/PNSetMembershipsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/Membership/PNSetMembershipsRequest.h \ No newline at end of file diff --git a/PubNub/include/PNSetUUIDMetadataAPICallBuilder.h b/PubNub/include/PNSetUUIDMetadataAPICallBuilder.h deleted file mode 120000 index 92fe2814c..000000000 --- a/PubNub/include/PNSetUUIDMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Objects/UUID/PNSetUUIDMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNSetUUIDMetadataRequest.h b/PubNub/include/PNSetUUIDMetadataRequest.h deleted file mode 120000 index 3a2dbe06c..000000000 --- a/PubNub/include/PNSetUUIDMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Requests/Objects/UUID/PNSetUUIDMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PNSetUUIDMetadataStatus.h b/PubNub/include/PNSetUUIDMetadataStatus.h deleted file mode 120000 index e5469da33..000000000 --- a/PubNub/include/PNSetUUIDMetadataStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNSetUUIDMetadataStatus.h \ No newline at end of file diff --git a/PubNub/include/PNSignalAPICallBuilder.h b/PubNub/include/PNSignalAPICallBuilder.h deleted file mode 120000 index 816125579..000000000 --- a/PubNub/include/PNSignalAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Publish/PNSignalAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNSignalStatus.h b/PubNub/include/PNSignalStatus.h deleted file mode 120000 index 40207c8db..000000000 --- a/PubNub/include/PNSignalStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNSignalStatus.h \ No newline at end of file diff --git a/PubNub/include/PNStateAPICallBuilder.h b/PubNub/include/PNStateAPICallBuilder.h deleted file mode 120000 index 398497f1d..000000000 --- a/PubNub/include/PNStateAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/State/PNStateAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNStateAuditAPICallBuilder.h b/PubNub/include/PNStateAuditAPICallBuilder.h deleted file mode 120000 index 6523c66ba..000000000 --- a/PubNub/include/PNStateAuditAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/State/PNStateAuditAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNStateListener.h b/PubNub/include/PNStateListener.h deleted file mode 120000 index fb59b8ca0..000000000 --- a/PubNub/include/PNStateListener.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Managers/PNStateListener.h \ No newline at end of file diff --git a/PubNub/include/PNStateModificationAPICallBuilder.h b/PubNub/include/PNStateModificationAPICallBuilder.h deleted file mode 120000 index ba13525ff..000000000 --- a/PubNub/include/PNStateModificationAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/State/PNStateModificationAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNStatus+Private.h b/PubNub/include/PNStatus+Private.h deleted file mode 120000 index 01aa96d9e..000000000 --- a/PubNub/include/PNStatus+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNStatus+Private.h \ No newline at end of file diff --git a/PubNub/include/PNStatus.h b/PubNub/include/PNStatus.h deleted file mode 120000 index e703dd3ae..000000000 --- a/PubNub/include/PNStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNStatus.h \ No newline at end of file diff --git a/PubNub/include/PNStreamAPICallBuilder.h b/PubNub/include/PNStreamAPICallBuilder.h deleted file mode 120000 index 9b3563819..000000000 --- a/PubNub/include/PNStreamAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Stream/PNStreamAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNStreamAuditAPICallBuilder.h b/PubNub/include/PNStreamAuditAPICallBuilder.h deleted file mode 120000 index 64b64c8ab..000000000 --- a/PubNub/include/PNStreamAuditAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Stream/PNStreamAuditAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNStreamModificationAPICallBuilder.h b/PubNub/include/PNStreamModificationAPICallBuilder.h deleted file mode 120000 index b2bee91a9..000000000 --- a/PubNub/include/PNStreamModificationAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Stream/PNStreamModificationAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNString.h b/PubNub/include/PNString.h deleted file mode 120000 index ed394fa5c..000000000 --- a/PubNub/include/PNString.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNString.h \ No newline at end of file diff --git a/PubNub/include/PNStructures.h b/PubNub/include/PNStructures.h deleted file mode 120000 index 6c04265d3..000000000 --- a/PubNub/include/PNStructures.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/PNStructures.h \ No newline at end of file diff --git a/PubNub/include/PNSubscribeAPIBuilder.h b/PubNub/include/PNSubscribeAPIBuilder.h deleted file mode 120000 index 18aadbdca..000000000 --- a/PubNub/include/PNSubscribeAPIBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Subscribe/PNSubscribeAPIBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNSubscribeChannelsOrGroupsAPIBuilder.h b/PubNub/include/PNSubscribeChannelsOrGroupsAPIBuilder.h deleted file mode 120000 index 36c182079..000000000 --- a/PubNub/include/PNSubscribeChannelsOrGroupsAPIBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Subscribe/PNSubscribeChannelsOrGroupsAPIBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNSubscribeParser.h b/PubNub/include/PNSubscribeParser.h deleted file mode 120000 index 990e773ba..000000000 --- a/PubNub/include/PNSubscribeParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNSubscribeParser.h \ No newline at end of file diff --git a/PubNub/include/PNSubscribeStatus+Private.h b/PubNub/include/PNSubscribeStatus+Private.h deleted file mode 120000 index 5e30bc361..000000000 --- a/PubNub/include/PNSubscribeStatus+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNSubscribeStatus+Private.h \ No newline at end of file diff --git a/PubNub/include/PNSubscribeStatus.h b/PubNub/include/PNSubscribeStatus.h deleted file mode 120000 index 97ff41227..000000000 --- a/PubNub/include/PNSubscribeStatus.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNSubscribeStatus.h \ No newline at end of file diff --git a/PubNub/include/PNSubscriber.h b/PubNub/include/PNSubscriber.h deleted file mode 120000 index eece54464..000000000 --- a/PubNub/include/PNSubscriber.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Managers/PNSubscriber.h \ No newline at end of file diff --git a/PubNub/include/PNSubscriberResults.h b/PubNub/include/PNSubscriberResults.h deleted file mode 120000 index d9c8d5ada..000000000 --- a/PubNub/include/PNSubscriberResults.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNSubscriberResults.h \ No newline at end of file diff --git a/PubNub/include/PNTelemetry.h b/PubNub/include/PNTelemetry.h deleted file mode 120000 index 8327fe372..000000000 --- a/PubNub/include/PNTelemetry.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Managers/PNTelemetry.h \ No newline at end of file diff --git a/PubNub/include/PNTimeAPICallBuilder.h b/PubNub/include/PNTimeAPICallBuilder.h deleted file mode 120000 index e319a3e35..000000000 --- a/PubNub/include/PNTimeAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Time/PNTimeAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNTimeParser.h b/PubNub/include/PNTimeParser.h deleted file mode 120000 index b5191dc6f..000000000 --- a/PubNub/include/PNTimeParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNTimeParser.h \ No newline at end of file diff --git a/PubNub/include/PNTimeResult.h b/PubNub/include/PNTimeResult.h deleted file mode 120000 index 31d5b7609..000000000 --- a/PubNub/include/PNTimeResult.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Service Objects/PNTimeResult.h \ No newline at end of file diff --git a/PubNub/include/PNURLBuilder.h b/PubNub/include/PNURLBuilder.h deleted file mode 120000 index 72cea1a3a..000000000 --- a/PubNub/include/PNURLBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Network/PNURLBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNURLRequest.h b/PubNub/include/PNURLRequest.h deleted file mode 120000 index 45cb96ad9..000000000 --- a/PubNub/include/PNURLRequest.h +++ /dev/null @@ -1 +0,0 @@ -../Misc/Helpers/PNURLRequest.h \ No newline at end of file diff --git a/PubNub/include/PNUUIDMetadata+Private.h b/PubNub/include/PNUUIDMetadata+Private.h deleted file mode 120000 index 1984cfded..000000000 --- a/PubNub/include/PNUUIDMetadata+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNUUIDMetadata+Private.h \ No newline at end of file diff --git a/PubNub/include/PNUUIDMetadata.h b/PubNub/include/PNUUIDMetadata.h deleted file mode 120000 index ea7183188..000000000 --- a/PubNub/include/PNUUIDMetadata.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNUUIDMetadata.h \ No newline at end of file diff --git a/PubNub/include/PNUUIDMetadataChangeParser.h b/PubNub/include/PNUUIDMetadataChangeParser.h deleted file mode 120000 index efd9f3476..000000000 --- a/PubNub/include/PNUUIDMetadataChangeParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/Objects/PNUUIDMetadataChangeParser.h \ No newline at end of file diff --git a/PubNub/include/PNUnsubscribeAPICallBuilder.h b/PubNub/include/PNUnsubscribeAPICallBuilder.h deleted file mode 120000 index 5abdd606e..000000000 --- a/PubNub/include/PNUnsubscribeAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Subscribe/PNUnsubscribeAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNUnsubscribeChannelsOrGroupsAPICallBuilder.h b/PubNub/include/PNUnsubscribeChannelsOrGroupsAPICallBuilder.h deleted file mode 120000 index 67b7a5a6a..000000000 --- a/PubNub/include/PNUnsubscribeChannelsOrGroupsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Builders/API Call/Subscribe/PNUnsubscribeChannelsOrGroupsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PNXML+Private.h b/PubNub/include/PNXML+Private.h deleted file mode 120000 index c20a45177..000000000 --- a/PubNub/include/PNXML+Private.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNXML+Private.h \ No newline at end of file diff --git a/PubNub/include/PNXML.h b/PubNub/include/PNXML.h deleted file mode 120000 index 033177687..000000000 --- a/PubNub/include/PNXML.h +++ /dev/null @@ -1 +0,0 @@ -../Data/Models/PNXML.h \ No newline at end of file diff --git a/PubNub/include/PNXMLParser.h b/PubNub/include/PNXMLParser.h deleted file mode 120000 index f898e6a86..000000000 --- a/PubNub/include/PNXMLParser.h +++ /dev/null @@ -1 +0,0 @@ -../Network/Parsers/PNXMLParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub+APNS.h b/PubNub/include/PubNub+APNS.h deleted file mode 120000 index 9f77ea9d6..000000000 --- a/PubNub/include/PubNub+APNS.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+APNS.h \ No newline at end of file diff --git a/PubNub/include/PubNub+ChannelGroup.h b/PubNub/include/PubNub+ChannelGroup.h deleted file mode 120000 index 822cbeccc..000000000 --- a/PubNub/include/PubNub+ChannelGroup.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+ChannelGroup.h \ No newline at end of file diff --git a/PubNub/include/PubNub+Core.h b/PubNub/include/PubNub+Core.h deleted file mode 120000 index ac53940b7..000000000 --- a/PubNub/include/PubNub+Core.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+Core.h \ No newline at end of file diff --git a/PubNub/include/PubNub+CorePrivate.h b/PubNub/include/PubNub+CorePrivate.h deleted file mode 120000 index b626f0fdd..000000000 --- a/PubNub/include/PubNub+CorePrivate.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+CorePrivate.h \ No newline at end of file diff --git a/PubNub/include/PubNub+Files.h b/PubNub/include/PubNub+Files.h deleted file mode 120000 index aaf0034f7..000000000 --- a/PubNub/include/PubNub+Files.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+Files.h \ No newline at end of file diff --git a/PubNub/include/PubNub+History.h b/PubNub/include/PubNub+History.h deleted file mode 120000 index 4575558f7..000000000 --- a/PubNub/include/PubNub+History.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+History.h \ No newline at end of file diff --git a/PubNub/include/PubNub+MessageActions.h b/PubNub/include/PubNub+MessageActions.h deleted file mode 120000 index 2797bf421..000000000 --- a/PubNub/include/PubNub+MessageActions.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+MessageActions.h \ No newline at end of file diff --git a/PubNub/include/PubNub+Objects.h b/PubNub/include/PubNub+Objects.h deleted file mode 120000 index 346fa11e3..000000000 --- a/PubNub/include/PubNub+Objects.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+Objects.h \ No newline at end of file diff --git a/PubNub/include/PubNub+PAM.h b/PubNub/include/PubNub+PAM.h deleted file mode 120000 index a86c9ed23..000000000 --- a/PubNub/include/PubNub+PAM.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+PAM.h \ No newline at end of file diff --git a/PubNub/include/PubNub+PAMPrivate.h b/PubNub/include/PubNub+PAMPrivate.h deleted file mode 120000 index f30ac4663..000000000 --- a/PubNub/include/PubNub+PAMPrivate.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+PAMPrivate.h \ No newline at end of file diff --git a/PubNub/include/PubNub+Presence.h b/PubNub/include/PubNub+Presence.h deleted file mode 120000 index 23325f163..000000000 --- a/PubNub/include/PubNub+Presence.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+Presence.h \ No newline at end of file diff --git a/PubNub/include/PubNub+PresencePrivate.h b/PubNub/include/PubNub+PresencePrivate.h deleted file mode 120000 index a2ddc2173..000000000 --- a/PubNub/include/PubNub+PresencePrivate.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+PresencePrivate.h \ No newline at end of file diff --git a/PubNub/include/PubNub+Publish.h b/PubNub/include/PubNub+Publish.h deleted file mode 120000 index 61d2615f2..000000000 --- a/PubNub/include/PubNub+Publish.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+Publish.h \ No newline at end of file diff --git a/PubNub/include/PubNub+State.h b/PubNub/include/PubNub+State.h deleted file mode 120000 index ae2242cf0..000000000 --- a/PubNub/include/PubNub+State.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+State.h \ No newline at end of file diff --git a/PubNub/include/PubNub+Subscribe.h b/PubNub/include/PubNub+Subscribe.h deleted file mode 120000 index 32483b5df..000000000 --- a/PubNub/include/PubNub+Subscribe.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+Subscribe.h \ No newline at end of file diff --git a/PubNub/include/PubNub+SubscribePrivate.h b/PubNub/include/PubNub+SubscribePrivate.h deleted file mode 120000 index 454a0e14a..000000000 --- a/PubNub/include/PubNub+SubscribePrivate.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+SubscribePrivate.h \ No newline at end of file diff --git a/PubNub/include/PubNub+Time.h b/PubNub/include/PubNub+Time.h deleted file mode 120000 index 5fbf0dead..000000000 --- a/PubNub/include/PubNub+Time.h +++ /dev/null @@ -1 +0,0 @@ -../Core/PubNub+Time.h \ No newline at end of file diff --git a/PubNub/include/PubNub/NSArray+PNMap.h b/PubNub/include/PubNub/NSArray+PNMap.h deleted file mode 120000 index 240b108fe..000000000 --- a/PubNub/include/PubNub/NSArray+PNMap.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Categories/NSArray+PNMap.h \ No newline at end of file diff --git a/PubNub/include/PubNub/NSDateFormatter+PNCacheable.h b/PubNub/include/PubNub/NSDateFormatter+PNCacheable.h deleted file mode 120000 index c802dd651..000000000 --- a/PubNub/include/PubNub/NSDateFormatter+PNCacheable.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Categories/NSDateFormatter+PNCacheable.h \ No newline at end of file diff --git a/PubNub/include/PubNub/NSInputStream+PNCrypto.h b/PubNub/include/PubNub/NSInputStream+PNCrypto.h deleted file mode 120000 index cb4c473a6..000000000 --- a/PubNub/include/PubNub/NSInputStream+PNCrypto.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Categories/NSInputStream+PNCrypto.h \ No newline at end of file diff --git a/PubNub/include/PubNub/NSInputStream+PNURL.h b/PubNub/include/PubNub/NSInputStream+PNURL.h deleted file mode 120000 index da54cb9c6..000000000 --- a/PubNub/include/PubNub/NSInputStream+PNURL.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Categories/NSInputStream+PNURL.h \ No newline at end of file diff --git a/PubNub/include/PubNub/NSURLSessionConfiguration+PNConfiguration.h b/PubNub/include/PubNub/NSURLSessionConfiguration+PNConfiguration.h deleted file mode 120000 index 5515b12b7..000000000 --- a/PubNub/include/PubNub/NSURLSessionConfiguration+PNConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Categories/NSURLSessionConfiguration+PNConfiguration.h \ No newline at end of file diff --git a/PubNub/include/PubNub/NSURLSessionConfiguration+PNConfigurationPrivate.h b/PubNub/include/PubNub/NSURLSessionConfiguration+PNConfigurationPrivate.h deleted file mode 120000 index 3dc5948bf..000000000 --- a/PubNub/include/PubNub/NSURLSessionConfiguration+PNConfigurationPrivate.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Categories/NSURLSessionConfiguration+PNConfigurationPrivate.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAES+Private.h b/PubNub/include/PubNub/PNAES+Private.h deleted file mode 120000 index d94b9765f..000000000 --- a/PubNub/include/PubNub/PNAES+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/PNAES+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAES.h b/PubNub/include/PubNub/PNAES.h deleted file mode 120000 index fba662d37..000000000 --- a/PubNub/include/PubNub/PNAES.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/PNAES.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAESCBCCryptor+Private.h b/PubNub/include/PubNub/PNAESCBCCryptor+Private.h deleted file mode 120000 index 326993960..000000000 --- a/PubNub/include/PubNub/PNAESCBCCryptor+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Modules/Crypto/Cryptors/AES/PNAESCBCCryptor+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAESCBCCryptor.h b/PubNub/include/PubNub/PNAESCBCCryptor.h deleted file mode 120000 index 7ca1c71cf..000000000 --- a/PubNub/include/PubNub/PNAESCBCCryptor.h +++ /dev/null @@ -1 +0,0 @@ -../../Modules/Crypto/Cryptors/AES/PNAESCBCCryptor.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAPICallBuilder+Private.h b/PubNub/include/PubNub/PNAPICallBuilder+Private.h deleted file mode 120000 index 0d12342ed..000000000 --- a/PubNub/include/PubNub/PNAPICallBuilder+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/PNAPICallBuilder+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAPICallBuilder.h b/PubNub/include/PubNub/PNAPICallBuilder.h deleted file mode 120000 index f891f0b97..000000000 --- a/PubNub/include/PubNub/PNAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/PNAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAPNSAPICallBuilder.h b/PubNub/include/PubNub/PNAPNSAPICallBuilder.h deleted file mode 120000 index a0ba98ba6..000000000 --- a/PubNub/include/PubNub/PNAPNSAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/APNS/PNAPNSAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAPNSAuditAPICallBuilder.h b/PubNub/include/PubNub/PNAPNSAuditAPICallBuilder.h deleted file mode 120000 index 4c3147e9c..000000000 --- a/PubNub/include/PubNub/PNAPNSAuditAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/APNS/PNAPNSAuditAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAPNSEnabledChannelsResult.h b/PubNub/include/PubNub/PNAPNSEnabledChannelsResult.h deleted file mode 120000 index 2e3c3adbd..000000000 --- a/PubNub/include/PubNub/PNAPNSEnabledChannelsResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNAPNSEnabledChannelsResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAPNSModificationAPICallBuilder.h b/PubNub/include/PubNub/PNAPNSModificationAPICallBuilder.h deleted file mode 120000 index 93009830a..000000000 --- a/PubNub/include/PubNub/PNAPNSModificationAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/APNS/PNAPNSModificationAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAPNSNotificationConfiguration+Private.h b/PubNub/include/PubNub/PNAPNSNotificationConfiguration+Private.h deleted file mode 120000 index 0cbcbd3f3..000000000 --- a/PubNub/include/PubNub/PNAPNSNotificationConfiguration+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/Notifications Payload/APNS/PNAPNSNotificationConfiguration+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAPNSNotificationConfiguration.h b/PubNub/include/PubNub/PNAPNSNotificationConfiguration.h deleted file mode 120000 index 5fa908a78..000000000 --- a/PubNub/include/PubNub/PNAPNSNotificationConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/Notifications Payload/APNS/PNAPNSNotificationConfiguration.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAPNSNotificationPayload+Private.h b/PubNub/include/PubNub/PNAPNSNotificationPayload+Private.h deleted file mode 120000 index fbaf6ff80..000000000 --- a/PubNub/include/PubNub/PNAPNSNotificationPayload+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/Notifications Payload/APNS/PNAPNSNotificationPayload+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAPNSNotificationPayload.h b/PubNub/include/PubNub/PNAPNSNotificationPayload.h deleted file mode 120000 index d7be06f4d..000000000 --- a/PubNub/include/PubNub/PNAPNSNotificationPayload.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/Notifications Payload/APNS/PNAPNSNotificationPayload.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAPNSNotificationTarget+Private.h b/PubNub/include/PubNub/PNAPNSNotificationTarget+Private.h deleted file mode 120000 index 3d8d96f39..000000000 --- a/PubNub/include/PubNub/PNAPNSNotificationTarget+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/Notifications Payload/APNS/PNAPNSNotificationTarget+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAPNSNotificationTarget.h b/PubNub/include/PubNub/PNAPNSNotificationTarget.h deleted file mode 120000 index 78f2d93c5..000000000 --- a/PubNub/include/PubNub/PNAPNSNotificationTarget.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/Notifications Payload/APNS/PNAPNSNotificationTarget.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAcknowledgmentStatus.h b/PubNub/include/PubNub/PNAcknowledgmentStatus.h deleted file mode 120000 index 2f1a4bc0e..000000000 --- a/PubNub/include/PubNub/PNAcknowledgmentStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNAcknowledgmentStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAddMessageActionAPICallBuilder.h b/PubNub/include/PubNub/PNAddMessageActionAPICallBuilder.h deleted file mode 120000 index 8b4cb14c4..000000000 --- a/PubNub/include/PubNub/PNAddMessageActionAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Actions/Message/PNAddMessageActionAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAddMessageActionParser.h b/PubNub/include/PubNub/PNAddMessageActionParser.h deleted file mode 120000 index 3d5ac05c0..000000000 --- a/PubNub/include/PubNub/PNAddMessageActionParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Actions/Message/PNAddMessageActionParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAddMessageActionRequest.h b/PubNub/include/PubNub/PNAddMessageActionRequest.h deleted file mode 120000 index 95249ad8e..000000000 --- a/PubNub/include/PubNub/PNAddMessageActionRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Actions/Message/PNAddMessageActionRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAddMessageActionStatus.h b/PubNub/include/PubNub/PNAddMessageActionStatus.h deleted file mode 120000 index e69f223a7..000000000 --- a/PubNub/include/PubNub/PNAddMessageActionStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNAddMessageActionStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAddPushNotificationsRequest.h b/PubNub/include/PubNub/PNAddPushNotificationsRequest.h deleted file mode 120000 index 6e442f74c..000000000 --- a/PubNub/include/PubNub/PNAddPushNotificationsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Push Notifications/PNAddPushNotificationsRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNArray.h b/PubNub/include/PubNub/PNArray.h deleted file mode 120000 index ac1ea9a92..000000000 --- a/PubNub/include/PubNub/PNArray.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNArray.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNAuditPushNotificationsRequest.h b/PubNub/include/PubNub/PNAuditPushNotificationsRequest.h deleted file mode 120000 index 4bcbe0be4..000000000 --- a/PubNub/include/PubNub/PNAuditPushNotificationsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Push Notifications/PNAuditPushNotificationsRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNBaseMessageActionRequest+Private.h b/PubNub/include/PubNub/PNBaseMessageActionRequest+Private.h deleted file mode 120000 index 0941c28bf..000000000 --- a/PubNub/include/PubNub/PNBaseMessageActionRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Actions/Message/PNBaseMessageActionRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNBaseMessageActionRequest.h b/PubNub/include/PubNub/PNBaseMessageActionRequest.h deleted file mode 120000 index c7e570077..000000000 --- a/PubNub/include/PubNub/PNBaseMessageActionRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Actions/Message/PNBaseMessageActionRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNBaseNotificationPayload+Private.h b/PubNub/include/PubNub/PNBaseNotificationPayload+Private.h deleted file mode 120000 index b1313fba7..000000000 --- a/PubNub/include/PubNub/PNBaseNotificationPayload+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/Notifications Payload/PNBaseNotificationPayload+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNBaseNotificationPayload.h b/PubNub/include/PubNub/PNBaseNotificationPayload.h deleted file mode 120000 index 96a335eff..000000000 --- a/PubNub/include/PubNub/PNBaseNotificationPayload.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/Notifications Payload/PNBaseNotificationPayload.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNBaseObjectsMembershipRequest+Private.h b/PubNub/include/PubNub/PNBaseObjectsMembershipRequest+Private.h deleted file mode 120000 index 2f8f0f018..000000000 --- a/PubNub/include/PubNub/PNBaseObjectsMembershipRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNBaseObjectsMembershipRequest.h b/PubNub/include/PubNub/PNBaseObjectsMembershipRequest.h deleted file mode 120000 index f34266958..000000000 --- a/PubNub/include/PubNub/PNBaseObjectsMembershipRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Membership/PNBaseObjectsMembershipRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNBaseObjectsRequest+Private.h b/PubNub/include/PubNub/PNBaseObjectsRequest+Private.h deleted file mode 120000 index 10daabe3e..000000000 --- a/PubNub/include/PubNub/PNBaseObjectsRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/PNBaseObjectsRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNBaseObjectsRequest.h b/PubNub/include/PubNub/PNBaseObjectsRequest.h deleted file mode 120000 index 5c7c32ce7..000000000 --- a/PubNub/include/PubNub/PNBaseObjectsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/PNBaseObjectsRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNBasePublishRequest+Private.h b/PubNub/include/PubNub/PNBasePublishRequest+Private.h deleted file mode 120000 index d9f613bfb..000000000 --- a/PubNub/include/PubNub/PNBasePublishRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Publish/PNBasePublishRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNBasePublishRequest.h b/PubNub/include/PubNub/PNBasePublishRequest.h deleted file mode 120000 index 1cd9fd659..000000000 --- a/PubNub/include/PubNub/PNBasePublishRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Publish/PNBasePublishRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNBasePushNotificationsRequest.h b/PubNub/include/PubNub/PNBasePushNotificationsRequest.h deleted file mode 120000 index 74e46b92e..000000000 --- a/PubNub/include/PubNub/PNBasePushNotificationsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Push Notifications/PNBasePushNotificationsRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNCBORDecoder.h b/PubNub/include/PubNub/PNCBORDecoder.h deleted file mode 120000 index 88ad0ee83..000000000 --- a/PubNub/include/PubNub/PNCBORDecoder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/PNCBORDecoder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNCCCryptorWrapper.h b/PubNub/include/PubNub/PNCCCryptorWrapper.h deleted file mode 120000 index acead6b06..000000000 --- a/PubNub/include/PubNub/PNCCCryptorWrapper.h +++ /dev/null @@ -1 +0,0 @@ -../../Modules/Crypto/Cryptors/AES/PNCCCryptorWrapper.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannel.h b/PubNub/include/PubNub/PNChannel.h deleted file mode 120000 index f576ad172..000000000 --- a/PubNub/include/PubNub/PNChannel.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNChannel.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannelClientStateResult.h b/PubNub/include/PubNub/PNChannelClientStateResult.h deleted file mode 120000 index 7e1475d48..000000000 --- a/PubNub/include/PubNub/PNChannelClientStateResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNChannelClientStateResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannelGroupAuditionParser.h b/PubNub/include/PubNub/PNChannelGroupAuditionParser.h deleted file mode 120000 index e93436f59..000000000 --- a/PubNub/include/PubNub/PNChannelGroupAuditionParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNChannelGroupAuditionParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannelGroupChannelsResult.h b/PubNub/include/PubNub/PNChannelGroupChannelsResult.h deleted file mode 120000 index 710aaff2e..000000000 --- a/PubNub/include/PubNub/PNChannelGroupChannelsResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNChannelGroupChannelsResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannelGroupClientStateResult.h b/PubNub/include/PubNub/PNChannelGroupClientStateResult.h deleted file mode 120000 index 9dd24be82..000000000 --- a/PubNub/include/PubNub/PNChannelGroupClientStateResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNChannelGroupClientStateResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannelGroupModificationParser.h b/PubNub/include/PubNub/PNChannelGroupModificationParser.h deleted file mode 120000 index 3c1c6c776..000000000 --- a/PubNub/include/PubNub/PNChannelGroupModificationParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNChannelGroupModificationParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannelGroupsResult.h b/PubNub/include/PubNub/PNChannelGroupsResult.h deleted file mode 120000 index cd6881967..000000000 --- a/PubNub/include/PubNub/PNChannelGroupsResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNChannelGroupsResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannelMember+Private.h b/PubNub/include/PubNub/PNChannelMember+Private.h deleted file mode 120000 index caee3e1e5..000000000 --- a/PubNub/include/PubNub/PNChannelMember+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNChannelMember+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannelMember.h b/PubNub/include/PubNub/PNChannelMember.h deleted file mode 120000 index bbc2ea293..000000000 --- a/PubNub/include/PubNub/PNChannelMember.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNChannelMember.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannelMembersParser.h b/PubNub/include/PubNub/PNChannelMembersParser.h deleted file mode 120000 index 89c1f25cb..000000000 --- a/PubNub/include/PubNub/PNChannelMembersParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Objects/PNChannelMembersParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannelMetadata+Private.h b/PubNub/include/PubNub/PNChannelMetadata+Private.h deleted file mode 120000 index 79b05d8a4..000000000 --- a/PubNub/include/PubNub/PNChannelMetadata+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNChannelMetadata+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannelMetadata.h b/PubNub/include/PubNub/PNChannelMetadata.h deleted file mode 120000 index b7faca299..000000000 --- a/PubNub/include/PubNub/PNChannelMetadata.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNChannelMetadata.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNChannelMetadataChangeParser.h b/PubNub/include/PubNub/PNChannelMetadataChangeParser.h deleted file mode 120000 index 84ae8fccd..000000000 --- a/PubNub/include/PubNub/PNChannelMetadataChangeParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Objects/PNChannelMetadataChangeParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNClientInformation.h b/PubNub/include/PubNub/PNClientInformation.h deleted file mode 120000 index ba18050bd..000000000 --- a/PubNub/include/PubNub/PNClientInformation.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/PNClientInformation.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNClientState.h b/PubNub/include/PubNub/PNClientState.h deleted file mode 120000 index a639d82a9..000000000 --- a/PubNub/include/PubNub/PNClientState.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Managers/PNClientState.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNClientStateGetResult.h b/PubNub/include/PubNub/PNClientStateGetResult.h deleted file mode 120000 index e3c4e7421..000000000 --- a/PubNub/include/PubNub/PNClientStateGetResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNClientStateGetResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNClientStateParser.h b/PubNub/include/PubNub/PNClientStateParser.h deleted file mode 120000 index 5c374d4a7..000000000 --- a/PubNub/include/PubNub/PNClientStateParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNClientStateParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNClientStateUpdateStatus.h b/PubNub/include/PubNub/PNClientStateUpdateStatus.h deleted file mode 120000 index 3553f44c9..000000000 --- a/PubNub/include/PubNub/PNClientStateUpdateStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNClientStateUpdateStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNConfiguration+Private.h b/PubNub/include/PubNub/PNConfiguration+Private.h deleted file mode 120000 index 52ca5e983..000000000 --- a/PubNub/include/PubNub/PNConfiguration+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/PNConfiguration+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNConfiguration.h b/PubNub/include/PubNub/PNConfiguration.h deleted file mode 120000 index 2bb48094a..000000000 --- a/PubNub/include/PubNub/PNConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/PNConfiguration.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNConstants.h b/PubNub/include/PubNub/PNConstants.h deleted file mode 120000 index 881797255..000000000 --- a/PubNub/include/PubNub/PNConstants.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/PNConstants.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNCryptoModule.h b/PubNub/include/PubNub/PNCryptoModule.h deleted file mode 120000 index a74a4fdd8..000000000 --- a/PubNub/include/PubNub/PNCryptoModule.h +++ /dev/null @@ -1 +0,0 @@ -../../Modules/Crypto/PNCryptoModule.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNCryptoProvider.h b/PubNub/include/PubNub/PNCryptoProvider.h deleted file mode 120000 index 8c9324e15..000000000 --- a/PubNub/include/PubNub/PNCryptoProvider.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Protocols/PNCryptoProvider.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNCryptor.h b/PubNub/include/PubNub/PNCryptor.h deleted file mode 120000 index 93a2c6995..000000000 --- a/PubNub/include/PubNub/PNCryptor.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Protocols/PNCryptor.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNCryptorHeader+Private.h b/PubNub/include/PubNub/PNCryptorHeader+Private.h deleted file mode 120000 index 27576a49a..000000000 --- a/PubNub/include/PubNub/PNCryptorHeader+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Modules/Crypto/Header/PNCryptorHeader+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNCryptorHeader.h b/PubNub/include/PubNub/PNCryptorHeader.h deleted file mode 120000 index 1f28b1360..000000000 --- a/PubNub/include/PubNub/PNCryptorHeader.h +++ /dev/null @@ -1 +0,0 @@ -../../Modules/Crypto/Header/PNCryptorHeader.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNCryptorHeaderV1Data.h b/PubNub/include/PubNub/PNCryptorHeaderV1Data.h deleted file mode 120000 index f1df6d424..000000000 --- a/PubNub/include/PubNub/PNCryptorHeaderV1Data.h +++ /dev/null @@ -1 +0,0 @@ -../../Modules/Crypto/Header/PNCryptorHeaderV1Data.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNCryptorInputStream+Private.h b/PubNub/include/PubNub/PNCryptorInputStream+Private.h deleted file mode 120000 index 2afc703ef..000000000 --- a/PubNub/include/PubNub/PNCryptorInputStream+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Modules/Crypto/Data/PNCryptorInputStream+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNCryptorInputStream.h b/PubNub/include/PubNub/PNCryptorInputStream.h deleted file mode 120000 index 336ecd6d0..000000000 --- a/PubNub/include/PubNub/PNCryptorInputStream.h +++ /dev/null @@ -1 +0,0 @@ -../../Modules/Crypto/Data/PNCryptorInputStream.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNData.h b/PubNub/include/PubNub/PNData.h deleted file mode 120000 index d125b8cf5..000000000 --- a/PubNub/include/PubNub/PNData.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNData.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNDataStorage.h b/PubNub/include/PubNub/PNDataStorage.h deleted file mode 120000 index 3f3f1d40f..000000000 --- a/PubNub/include/PubNub/PNDataStorage.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Storage/PNDataStorage.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNDate.h b/PubNub/include/PubNub/PNDate.h deleted file mode 120000 index 56f246f18..000000000 --- a/PubNub/include/PubNub/PNDate.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNDate.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNDefines.h b/PubNub/include/PubNub/PNDefines.h deleted file mode 120000 index 09e3dc8d5..000000000 --- a/PubNub/include/PubNub/PNDefines.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNDefines.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNDeleteFileAPICallBuilder.h b/PubNub/include/PubNub/PNDeleteFileAPICallBuilder.h deleted file mode 120000 index 671894086..000000000 --- a/PubNub/include/PubNub/PNDeleteFileAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Files/PNDeleteFileAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNDeleteFileParser.h b/PubNub/include/PubNub/PNDeleteFileParser.h deleted file mode 120000 index 615c52ca4..000000000 --- a/PubNub/include/PubNub/PNDeleteFileParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Files/PNDeleteFileParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNDeleteFileRequest.h b/PubNub/include/PubNub/PNDeleteFileRequest.h deleted file mode 120000 index d974706da..000000000 --- a/PubNub/include/PubNub/PNDeleteFileRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Files/PNDeleteFileRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNDeleteMessageAPICallBuilder.h b/PubNub/include/PubNub/PNDeleteMessageAPICallBuilder.h deleted file mode 120000 index 8ad09f525..000000000 --- a/PubNub/include/PubNub/PNDeleteMessageAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/History/PNDeleteMessageAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNDictionary.h b/PubNub/include/PubNub/PNDictionary.h deleted file mode 120000 index c4fd1c2c3..000000000 --- a/PubNub/include/PubNub/PNDictionary.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNDictionary.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNDownloadFileAPICallBuilder.h b/PubNub/include/PubNub/PNDownloadFileAPICallBuilder.h deleted file mode 120000 index caa12ee3f..000000000 --- a/PubNub/include/PubNub/PNDownloadFileAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Files/PNDownloadFileAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNDownloadFileRequest+Private.h b/PubNub/include/PubNub/PNDownloadFileRequest+Private.h deleted file mode 120000 index 16ec5e5b4..000000000 --- a/PubNub/include/PubNub/PNDownloadFileRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Files/PNDownloadFileRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNDownloadFileRequest.h b/PubNub/include/PubNub/PNDownloadFileRequest.h deleted file mode 120000 index 7a0cffc7f..000000000 --- a/PubNub/include/PubNub/PNDownloadFileRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Files/PNDownloadFileRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNDownloadFileResult.h b/PubNub/include/PubNub/PNDownloadFileResult.h deleted file mode 120000 index 24e3a31cc..000000000 --- a/PubNub/include/PubNub/PNDownloadFileResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNDownloadFileResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNEncryptedData.h b/PubNub/include/PubNub/PNEncryptedData.h deleted file mode 120000 index e76ffc0d8..000000000 --- a/PubNub/include/PubNub/PNEncryptedData.h +++ /dev/null @@ -1 +0,0 @@ -../../Modules/Crypto/Data/PNEncryptedData.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNEncryptedStream.h b/PubNub/include/PubNub/PNEncryptedStream.h deleted file mode 120000 index 59955131d..000000000 --- a/PubNub/include/PubNub/PNEncryptedStream.h +++ /dev/null @@ -1 +0,0 @@ -../../Modules/Crypto/Data/PNEncryptedStream.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNEnvelopeInformation.h b/PubNub/include/PubNub/PNEnvelopeInformation.h deleted file mode 120000 index 98b631069..000000000 --- a/PubNub/include/PubNub/PNEnvelopeInformation.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/PNEnvelopeInformation.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNErrorCodes.h b/PubNub/include/PubNub/PNErrorCodes.h deleted file mode 120000 index c5feaac87..000000000 --- a/PubNub/include/PubNub/PNErrorCodes.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/PNErrorCodes.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNErrorParser.h b/PubNub/include/PubNub/PNErrorParser.h deleted file mode 120000 index 5ee4dc014..000000000 --- a/PubNub/include/PubNub/PNErrorParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNErrorParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNErrorStatus+Private.h b/PubNub/include/PubNub/PNErrorStatus+Private.h deleted file mode 120000 index d98d074d8..000000000 --- a/PubNub/include/PubNub/PNErrorStatus+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNErrorStatus+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNErrorStatus.h b/PubNub/include/PubNub/PNErrorStatus.h deleted file mode 120000 index 3f4c92348..000000000 --- a/PubNub/include/PubNub/PNErrorStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNErrorStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNEventsListener.h b/PubNub/include/PubNub/PNEventsListener.h deleted file mode 120000 index eeb0f0f8f..000000000 --- a/PubNub/include/PubNub/PNEventsListener.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Protocols/PNEventsListener.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFCMNotificationPayload.h b/PubNub/include/PubNub/PNFCMNotificationPayload.h deleted file mode 120000 index 9462a90c4..000000000 --- a/PubNub/include/PubNub/PNFCMNotificationPayload.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/Notifications Payload/PNFCMNotificationPayload.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchAllChannelsMetadataAPICallBuilder.h b/PubNub/include/PubNub/PNFetchAllChannelsMetadataAPICallBuilder.h deleted file mode 120000 index 89b1765c6..000000000 --- a/PubNub/include/PubNub/PNFetchAllChannelsMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/Channel/PNFetchAllChannelsMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchAllChannelsMetadataRequest.h b/PubNub/include/PubNub/PNFetchAllChannelsMetadataRequest.h deleted file mode 120000 index 770753835..000000000 --- a/PubNub/include/PubNub/PNFetchAllChannelsMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Channel/PNFetchAllChannelsMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchAllUUIDMetadataAPICallBuilder.h b/PubNub/include/PubNub/PNFetchAllUUIDMetadataAPICallBuilder.h deleted file mode 120000 index 38251aa8d..000000000 --- a/PubNub/include/PubNub/PNFetchAllUUIDMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/UUID/PNFetchAllUUIDMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchAllUUIDMetadataRequest.h b/PubNub/include/PubNub/PNFetchAllUUIDMetadataRequest.h deleted file mode 120000 index 2288a5ec9..000000000 --- a/PubNub/include/PubNub/PNFetchAllUUIDMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/UUID/PNFetchAllUUIDMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchChannelMembersAPICallBuilder.h b/PubNub/include/PubNub/PNFetchChannelMembersAPICallBuilder.h deleted file mode 120000 index 39920b0ac..000000000 --- a/PubNub/include/PubNub/PNFetchChannelMembersAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/Membership/PNFetchChannelMembersAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchChannelMembersRequest.h b/PubNub/include/PubNub/PNFetchChannelMembersRequest.h deleted file mode 120000 index 20760cf6a..000000000 --- a/PubNub/include/PubNub/PNFetchChannelMembersRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Membership/PNFetchChannelMembersRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchChannelMembersResult.h b/PubNub/include/PubNub/PNFetchChannelMembersResult.h deleted file mode 120000 index 0642cbcba..000000000 --- a/PubNub/include/PubNub/PNFetchChannelMembersResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNFetchChannelMembersResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchChannelMetadataAPICallBuilder.h b/PubNub/include/PubNub/PNFetchChannelMetadataAPICallBuilder.h deleted file mode 120000 index 448f8ddb5..000000000 --- a/PubNub/include/PubNub/PNFetchChannelMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/Channel/PNFetchChannelMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchChannelMetadataRequest.h b/PubNub/include/PubNub/PNFetchChannelMetadataRequest.h deleted file mode 120000 index fb6961a4e..000000000 --- a/PubNub/include/PubNub/PNFetchChannelMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Channel/PNFetchChannelMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchChannelsMetadataParser.h b/PubNub/include/PubNub/PNFetchChannelsMetadataParser.h deleted file mode 120000 index 844f7566e..000000000 --- a/PubNub/include/PubNub/PNFetchChannelsMetadataParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Objects/PNFetchChannelsMetadataParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchChannelsMetadataResult.h b/PubNub/include/PubNub/PNFetchChannelsMetadataResult.h deleted file mode 120000 index e5ee6f0b4..000000000 --- a/PubNub/include/PubNub/PNFetchChannelsMetadataResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNFetchChannelsMetadataResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchMembershipsAPICallBuilder.h b/PubNub/include/PubNub/PNFetchMembershipsAPICallBuilder.h deleted file mode 120000 index 72a1ae34b..000000000 --- a/PubNub/include/PubNub/PNFetchMembershipsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/Membership/PNFetchMembershipsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchMembershipsRequest.h b/PubNub/include/PubNub/PNFetchMembershipsRequest.h deleted file mode 120000 index 1bccf0cde..000000000 --- a/PubNub/include/PubNub/PNFetchMembershipsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Membership/PNFetchMembershipsRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchMembershipsResult.h b/PubNub/include/PubNub/PNFetchMembershipsResult.h deleted file mode 120000 index 8d4b73040..000000000 --- a/PubNub/include/PubNub/PNFetchMembershipsResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNFetchMembershipsResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchMessageActionsRequest.h b/PubNub/include/PubNub/PNFetchMessageActionsRequest.h deleted file mode 120000 index ef59dfeed..000000000 --- a/PubNub/include/PubNub/PNFetchMessageActionsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Actions/Message/PNFetchMessageActionsRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchMessageActionsResult.h b/PubNub/include/PubNub/PNFetchMessageActionsResult.h deleted file mode 120000 index fcff747f4..000000000 --- a/PubNub/include/PubNub/PNFetchMessageActionsResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNFetchMessageActionsResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchMessagesActionsAPICallBuilder.h b/PubNub/include/PubNub/PNFetchMessagesActionsAPICallBuilder.h deleted file mode 120000 index e11d5be75..000000000 --- a/PubNub/include/PubNub/PNFetchMessagesActionsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Actions/Message/PNFetchMessagesActionsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchMessagesActionsParser.h b/PubNub/include/PubNub/PNFetchMessagesActionsParser.h deleted file mode 120000 index cac5dc5d1..000000000 --- a/PubNub/include/PubNub/PNFetchMessagesActionsParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Actions/Message/PNFetchMessagesActionsParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchUUIDMetadataAPICallBuilder.h b/PubNub/include/PubNub/PNFetchUUIDMetadataAPICallBuilder.h deleted file mode 120000 index 10f17091c..000000000 --- a/PubNub/include/PubNub/PNFetchUUIDMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/UUID/PNFetchUUIDMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchUUIDMetadataParser.h b/PubNub/include/PubNub/PNFetchUUIDMetadataParser.h deleted file mode 120000 index fc02603d7..000000000 --- a/PubNub/include/PubNub/PNFetchUUIDMetadataParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Objects/PNFetchUUIDMetadataParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchUUIDMetadataRequest.h b/PubNub/include/PubNub/PNFetchUUIDMetadataRequest.h deleted file mode 120000 index aefc9e1fc..000000000 --- a/PubNub/include/PubNub/PNFetchUUIDMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/UUID/PNFetchUUIDMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFetchUUIDMetadataResult.h b/PubNub/include/PubNub/PNFetchUUIDMetadataResult.h deleted file mode 120000 index 2b73971c3..000000000 --- a/PubNub/include/PubNub/PNFetchUUIDMetadataResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNFetchUUIDMetadataResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFile+Private.h b/PubNub/include/PubNub/PNFile+Private.h deleted file mode 120000 index 7a07940b2..000000000 --- a/PubNub/include/PubNub/PNFile+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNFile+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFile.h b/PubNub/include/PubNub/PNFile.h deleted file mode 120000 index 96aa3465b..000000000 --- a/PubNub/include/PubNub/PNFile.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNFile.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFileDownloadURLAPICallBuilder.h b/PubNub/include/PubNub/PNFileDownloadURLAPICallBuilder.h deleted file mode 120000 index 4e4a1a09a..000000000 --- a/PubNub/include/PubNub/PNFileDownloadURLAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Files/PNFileDownloadURLAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFilesAPICallBuilder.h b/PubNub/include/PubNub/PNFilesAPICallBuilder.h deleted file mode 120000 index 9caa42f1b..000000000 --- a/PubNub/include/PubNub/PNFilesAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Files/PNFilesAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNFilesManager.h b/PubNub/include/PubNub/PNFilesManager.h deleted file mode 120000 index 1267bcc07..000000000 --- a/PubNub/include/PubNub/PNFilesManager.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Managers/PNFilesManager.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNGZIP.h b/PubNub/include/PubNub/PNGZIP.h deleted file mode 120000 index d6db5a085..000000000 --- a/PubNub/include/PubNub/PNGZIP.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNGZIP.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNGenerateFileUploadURLParser.h b/PubNub/include/PubNub/PNGenerateFileUploadURLParser.h deleted file mode 120000 index c44d1f20f..000000000 --- a/PubNub/include/PubNub/PNGenerateFileUploadURLParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Files/PNGenerateFileUploadURLParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNGenerateFileUploadURLRequest.h b/PubNub/include/PubNub/PNGenerateFileUploadURLRequest.h deleted file mode 120000 index 23ff0e67b..000000000 --- a/PubNub/include/PubNub/PNGenerateFileUploadURLRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Files/PNGenerateFileUploadURLRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNGenerateFileUploadURLStatus.h b/PubNub/include/PubNub/PNGenerateFileUploadURLStatus.h deleted file mode 120000 index 69221f467..000000000 --- a/PubNub/include/PubNub/PNGenerateFileUploadURLStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNGenerateFileUploadURLStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNHeartbeat.h b/PubNub/include/PubNub/PNHeartbeat.h deleted file mode 120000 index 904860c57..000000000 --- a/PubNub/include/PubNub/PNHeartbeat.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Managers/PNHeartbeat.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNHeartbeatParser.h b/PubNub/include/PubNub/PNHeartbeatParser.h deleted file mode 120000 index cef2072bc..000000000 --- a/PubNub/include/PubNub/PNHeartbeatParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNHeartbeatParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNHelpers.h b/PubNub/include/PubNub/PNHelpers.h deleted file mode 120000 index e2b4516dc..000000000 --- a/PubNub/include/PubNub/PNHelpers.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNHelpers.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNHistoryAPICallBuilder.h b/PubNub/include/PubNub/PNHistoryAPICallBuilder.h deleted file mode 120000 index 4574d4566..000000000 --- a/PubNub/include/PubNub/PNHistoryAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/History/PNHistoryAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNHistoryParser.h b/PubNub/include/PubNub/PNHistoryParser.h deleted file mode 120000 index 9114e49f2..000000000 --- a/PubNub/include/PubNub/PNHistoryParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNHistoryParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNHistoryResult.h b/PubNub/include/PubNub/PNHistoryResult.h deleted file mode 120000 index e12c8b41b..000000000 --- a/PubNub/include/PubNub/PNHistoryResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNHistoryResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNInMemoryStorage.h b/PubNub/include/PubNub/PNInMemoryStorage.h deleted file mode 120000 index 4eef73b93..000000000 --- a/PubNub/include/PubNub/PNInMemoryStorage.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Storage/PNInMemoryStorage.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNJSON.h b/PubNub/include/PubNub/PNJSON.h deleted file mode 120000 index 27de96f03..000000000 --- a/PubNub/include/PubNub/PNJSON.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNJSON.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNKeyValueStorage.h b/PubNub/include/PubNub/PNKeyValueStorage.h deleted file mode 120000 index 16502d4e7..000000000 --- a/PubNub/include/PubNub/PNKeyValueStorage.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Protocols/PNKeyValueStorage.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNKeychain+Private.h b/PubNub/include/PubNub/PNKeychain+Private.h deleted file mode 120000 index de6587454..000000000 --- a/PubNub/include/PubNub/PNKeychain+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/PNKeychain+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNKeychain.h b/PubNub/include/PubNub/PNKeychain.h deleted file mode 120000 index c4565d08f..000000000 --- a/PubNub/include/PubNub/PNKeychain.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/PNKeychain.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNKeychainStorage.h b/PubNub/include/PubNub/PNKeychainStorage.h deleted file mode 120000 index a938c49c7..000000000 --- a/PubNub/include/PubNub/PNKeychainStorage.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Storage/PNKeychainStorage.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNLLogFileInformation.h b/PubNub/include/PubNub/PNLLogFileInformation.h deleted file mode 120000 index f70aeb6f0..000000000 --- a/PubNub/include/PubNub/PNLLogFileInformation.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Logger/Data/PNLLogFileInformation.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNLLogger.h b/PubNub/include/PubNub/PNLLogger.h deleted file mode 120000 index 5b649ae7f..000000000 --- a/PubNub/include/PubNub/PNLLogger.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Logger/Core/PNLLogger.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNLeaveParser.h b/PubNub/include/PubNub/PNLeaveParser.h deleted file mode 120000 index 40f78e76b..000000000 --- a/PubNub/include/PubNub/PNLeaveParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNLeaveParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNLegacyCryptor.h b/PubNub/include/PubNub/PNLegacyCryptor.h deleted file mode 120000 index ee7312183..000000000 --- a/PubNub/include/PubNub/PNLegacyCryptor.h +++ /dev/null @@ -1 +0,0 @@ -../../Modules/Crypto/Cryptors/AES/PNLegacyCryptor.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNListFilesAPICallBuilder.h b/PubNub/include/PubNub/PNListFilesAPICallBuilder.h deleted file mode 120000 index 2c2b6bb5d..000000000 --- a/PubNub/include/PubNub/PNListFilesAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Files/PNListFilesAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNListFilesParser.h b/PubNub/include/PubNub/PNListFilesParser.h deleted file mode 120000 index bc4097ea0..000000000 --- a/PubNub/include/PubNub/PNListFilesParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Files/PNListFilesParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNListFilesRequest.h b/PubNub/include/PubNub/PNListFilesRequest.h deleted file mode 120000 index 4ce32e744..000000000 --- a/PubNub/include/PubNub/PNListFilesRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Files/PNListFilesRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNListFilesResult.h b/PubNub/include/PubNub/PNListFilesResult.h deleted file mode 120000 index 8f45cc860..000000000 --- a/PubNub/include/PubNub/PNListFilesResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNListFilesResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNLockSupport.h b/PubNub/include/PubNub/PNLockSupport.h deleted file mode 120000 index e6ebef3af..000000000 --- a/PubNub/include/PubNub/PNLockSupport.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNLockSupport.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNLogMacro.h b/PubNub/include/PubNub/PNLogMacro.h deleted file mode 120000 index ad40e072f..000000000 --- a/PubNub/include/PubNub/PNLogMacro.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Logger/PNLogMacro.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNMPNSNotificationPayload.h b/PubNub/include/PubNub/PNMPNSNotificationPayload.h deleted file mode 120000 index dc7c7ec41..000000000 --- a/PubNub/include/PubNub/PNMPNSNotificationPayload.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/Notifications Payload/PNMPNSNotificationPayload.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNManageChannelMembersAPICallBuilder.h b/PubNub/include/PubNub/PNManageChannelMembersAPICallBuilder.h deleted file mode 120000 index 4d2d3ed11..000000000 --- a/PubNub/include/PubNub/PNManageChannelMembersAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/Membership/PNManageChannelMembersAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNManageChannelMembersRequest.h b/PubNub/include/PubNub/PNManageChannelMembersRequest.h deleted file mode 120000 index 8f6c458fe..000000000 --- a/PubNub/include/PubNub/PNManageChannelMembersRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Membership/PNManageChannelMembersRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNManageChannelMembersStatus.h b/PubNub/include/PubNub/PNManageChannelMembersStatus.h deleted file mode 120000 index c8c08507b..000000000 --- a/PubNub/include/PubNub/PNManageChannelMembersStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNManageChannelMembersStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNManageMembershipsAPICallBuilder.h b/PubNub/include/PubNub/PNManageMembershipsAPICallBuilder.h deleted file mode 120000 index b4ca9afba..000000000 --- a/PubNub/include/PubNub/PNManageMembershipsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/Membership/PNManageMembershipsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNManageMembershipsRequest.h b/PubNub/include/PubNub/PNManageMembershipsRequest.h deleted file mode 120000 index cd9a0dc33..000000000 --- a/PubNub/include/PubNub/PNManageMembershipsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Membership/PNManageMembershipsRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNManageMembershipsStatus.h b/PubNub/include/PubNub/PNManageMembershipsStatus.h deleted file mode 120000 index ffeea4f5d..000000000 --- a/PubNub/include/PubNub/PNManageMembershipsStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNManageMembershipsStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNMembership+Private.h b/PubNub/include/PubNub/PNMembership+Private.h deleted file mode 120000 index 1c2db0da2..000000000 --- a/PubNub/include/PubNub/PNMembership+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNMembership+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNMembership.h b/PubNub/include/PubNub/PNMembership.h deleted file mode 120000 index 7c3029f14..000000000 --- a/PubNub/include/PubNub/PNMembership.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNMembership.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNMembershipsParser.h b/PubNub/include/PubNub/PNMembershipsParser.h deleted file mode 120000 index 18778cefa..000000000 --- a/PubNub/include/PubNub/PNMembershipsParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Objects/PNMembershipsParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNMessageAction+Private.h b/PubNub/include/PubNub/PNMessageAction+Private.h deleted file mode 120000 index e542dadd8..000000000 --- a/PubNub/include/PubNub/PNMessageAction+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNMessageAction+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNMessageAction.h b/PubNub/include/PubNub/PNMessageAction.h deleted file mode 120000 index 0ced8ce20..000000000 --- a/PubNub/include/PubNub/PNMessageAction.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNMessageAction.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNMessageCountAPICallBuilder.h b/PubNub/include/PubNub/PNMessageCountAPICallBuilder.h deleted file mode 120000 index a324ddddb..000000000 --- a/PubNub/include/PubNub/PNMessageCountAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/History/PNMessageCountAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNMessageCountParser.h b/PubNub/include/PubNub/PNMessageCountParser.h deleted file mode 120000 index 5de7a2965..000000000 --- a/PubNub/include/PubNub/PNMessageCountParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNMessageCountParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNMessageCountResult.h b/PubNub/include/PubNub/PNMessageCountResult.h deleted file mode 120000 index 653181b7f..000000000 --- a/PubNub/include/PubNub/PNMessageCountResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNMessageCountResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNMessageDeleteParser.h b/PubNub/include/PubNub/PNMessageDeleteParser.h deleted file mode 120000 index 15f5fc224..000000000 --- a/PubNub/include/PubNub/PNMessageDeleteParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNMessageDeleteParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNMessagePublishParser.h b/PubNub/include/PubNub/PNMessagePublishParser.h deleted file mode 120000 index bd79ae8fa..000000000 --- a/PubNub/include/PubNub/PNMessagePublishParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNMessagePublishParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNNetwork.h b/PubNub/include/PubNub/PNNetwork.h deleted file mode 120000 index 7107f6a74..000000000 --- a/PubNub/include/PubNub/PNNetwork.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/PNNetwork.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNNetworkResponseSerializer.h b/PubNub/include/PubNub/PNNetworkResponseSerializer.h deleted file mode 120000 index 4ee123057..000000000 --- a/PubNub/include/PubNub/PNNetworkResponseSerializer.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/PNNetworkResponseSerializer.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNNotificationsPayload.h b/PubNub/include/PubNub/PNNotificationsPayload.h deleted file mode 120000 index 5ca0c39fd..000000000 --- a/PubNub/include/PubNub/PNNotificationsPayload.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/Notifications Payload/PNNotificationsPayload.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNNumber.h b/PubNub/include/PubNub/PNNumber.h deleted file mode 120000 index 88f000c8f..000000000 --- a/PubNub/include/PubNub/PNNumber.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNNumber.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNObjectsAPICallBuilder.h b/PubNub/include/PubNub/PNObjectsAPICallBuilder.h deleted file mode 120000 index 39f69477a..000000000 --- a/PubNub/include/PubNub/PNObjectsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/PNObjectsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNObjectsPaginatedRequest.h b/PubNub/include/PubNub/PNObjectsPaginatedRequest.h deleted file mode 120000 index c1acd9fdf..000000000 --- a/PubNub/include/PubNub/PNObjectsPaginatedRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/PNObjectsPaginatedRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNObjectsRemoveParser.h b/PubNub/include/PubNub/PNObjectsRemoveParser.h deleted file mode 120000 index 99c8a2ceb..000000000 --- a/PubNub/include/PubNub/PNObjectsRemoveParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Objects/PNObjectsRemoveParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNOperationResult+Private.h b/PubNub/include/PubNub/PNOperationResult+Private.h deleted file mode 120000 index dd8ba0d1e..000000000 --- a/PubNub/include/PubNub/PNOperationResult+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNOperationResult+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNOperationResult.h b/PubNub/include/PubNub/PNOperationResult.h deleted file mode 120000 index 1d1dcc9fb..000000000 --- a/PubNub/include/PubNub/PNOperationResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNOperationResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPAMToken+Private.h b/PubNub/include/PubNub/PNPAMToken+Private.h deleted file mode 120000 index 1b0663f2d..000000000 --- a/PubNub/include/PubNub/PNPAMToken+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNPAMToken+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPAMToken.h b/PubNub/include/PubNub/PNPAMToken.h deleted file mode 120000 index 04cb56ab8..000000000 --- a/PubNub/include/PubNub/PNPAMToken.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNPAMToken.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNParser.h b/PubNub/include/PubNub/PNParser.h deleted file mode 120000 index b47d23fff..000000000 --- a/PubNub/include/PubNub/PNParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Protocols/PNParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPresenceAPICallBuilder.h b/PubNub/include/PubNub/PNPresenceAPICallBuilder.h deleted file mode 120000 index 10a32854d..000000000 --- a/PubNub/include/PubNub/PNPresenceAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Presence/PNPresenceAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPresenceChannelGroupHereNowAPICallBuilder.h b/PubNub/include/PubNub/PNPresenceChannelGroupHereNowAPICallBuilder.h deleted file mode 120000 index 77d77c913..000000000 --- a/PubNub/include/PubNub/PNPresenceChannelGroupHereNowAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Presence/PNPresenceChannelGroupHereNowAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPresenceChannelGroupHereNowResult.h b/PubNub/include/PubNub/PNPresenceChannelGroupHereNowResult.h deleted file mode 120000 index 404d10c7f..000000000 --- a/PubNub/include/PubNub/PNPresenceChannelGroupHereNowResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNPresenceChannelGroupHereNowResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPresenceChannelHereNowAPICallBuilder.h b/PubNub/include/PubNub/PNPresenceChannelHereNowAPICallBuilder.h deleted file mode 120000 index 36954fa50..000000000 --- a/PubNub/include/PubNub/PNPresenceChannelHereNowAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Presence/PNPresenceChannelHereNowAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPresenceChannelHereNowResult.h b/PubNub/include/PubNub/PNPresenceChannelHereNowResult.h deleted file mode 120000 index f6cd728c0..000000000 --- a/PubNub/include/PubNub/PNPresenceChannelHereNowResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNPresenceChannelHereNowResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPresenceGlobalHereNowResult.h b/PubNub/include/PubNub/PNPresenceGlobalHereNowResult.h deleted file mode 120000 index 588865159..000000000 --- a/PubNub/include/PubNub/PNPresenceGlobalHereNowResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNPresenceGlobalHereNowResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPresenceHeartbeatAPICallBuilder.h b/PubNub/include/PubNub/PNPresenceHeartbeatAPICallBuilder.h deleted file mode 120000 index 0adcf109c..000000000 --- a/PubNub/include/PubNub/PNPresenceHeartbeatAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Presence/PNPresenceHeartbeatAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPresenceHereNowAPICallBuilder.h b/PubNub/include/PubNub/PNPresenceHereNowAPICallBuilder.h deleted file mode 120000 index fd90c6461..000000000 --- a/PubNub/include/PubNub/PNPresenceHereNowAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Presence/PNPresenceHereNowAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPresenceHereNowParser.h b/PubNub/include/PubNub/PNPresenceHereNowParser.h deleted file mode 120000 index 9d5b9141c..000000000 --- a/PubNub/include/PubNub/PNPresenceHereNowParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNPresenceHereNowParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPresenceWhereNowAPICallBuilder.h b/PubNub/include/PubNub/PNPresenceWhereNowAPICallBuilder.h deleted file mode 120000 index c63e42212..000000000 --- a/PubNub/include/PubNub/PNPresenceWhereNowAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Presence/PNPresenceWhereNowAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPresenceWhereNowParser.h b/PubNub/include/PubNub/PNPresenceWhereNowParser.h deleted file mode 120000 index 4ed9b6771..000000000 --- a/PubNub/include/PubNub/PNPresenceWhereNowParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNPresenceWhereNowParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPresenceWhereNowResult.h b/PubNub/include/PubNub/PNPresenceWhereNowResult.h deleted file mode 120000 index 2cf199cb5..000000000 --- a/PubNub/include/PubNub/PNPresenceWhereNowResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNPresenceWhereNowResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPrivateStructures.h b/PubNub/include/PubNub/PNPrivateStructures.h deleted file mode 120000 index b069a496c..000000000 --- a/PubNub/include/PubNub/PNPrivateStructures.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/PNPrivateStructures.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPublishAPICallBuilder.h b/PubNub/include/PubNub/PNPublishAPICallBuilder.h deleted file mode 120000 index 7ef4dab6d..000000000 --- a/PubNub/include/PubNub/PNPublishAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Publish/PNPublishAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPublishFileMessageAPICallBuilder.h b/PubNub/include/PubNub/PNPublishFileMessageAPICallBuilder.h deleted file mode 120000 index 0db99fbae..000000000 --- a/PubNub/include/PubNub/PNPublishFileMessageAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Publish/PNPublishFileMessageAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPublishFileMessageRequest.h b/PubNub/include/PubNub/PNPublishFileMessageRequest.h deleted file mode 120000 index 2b65367bc..000000000 --- a/PubNub/include/PubNub/PNPublishFileMessageRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Publish/PNPublishFileMessageRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPublishRequest.h b/PubNub/include/PubNub/PNPublishRequest.h deleted file mode 120000 index b16409abb..000000000 --- a/PubNub/include/PubNub/PNPublishRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Publish/PNPublishRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPublishSequence.h b/PubNub/include/PubNub/PNPublishSequence.h deleted file mode 120000 index 78f55ad27..000000000 --- a/PubNub/include/PubNub/PNPublishSequence.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Managers/PNPublishSequence.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPublishSizeAPICallBuilder.h b/PubNub/include/PubNub/PNPublishSizeAPICallBuilder.h deleted file mode 120000 index d168ee932..000000000 --- a/PubNub/include/PubNub/PNPublishSizeAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Publish/PNPublishSizeAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPublishStatus.h b/PubNub/include/PubNub/PNPublishStatus.h deleted file mode 120000 index af82df7e7..000000000 --- a/PubNub/include/PubNub/PNPublishStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNPublishStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPushNotificationsAuditParser.h b/PubNub/include/PubNub/PNPushNotificationsAuditParser.h deleted file mode 120000 index 4a9edda20..000000000 --- a/PubNub/include/PubNub/PNPushNotificationsAuditParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNPushNotificationsAuditParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNPushNotificationsStateModificationParser.h b/PubNub/include/PubNub/PNPushNotificationsStateModificationParser.h deleted file mode 120000 index 5625f565c..000000000 --- a/PubNub/include/PubNub/PNPushNotificationsStateModificationParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNPushNotificationsStateModificationParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNReachability.h b/PubNub/include/PubNub/PNReachability.h deleted file mode 120000 index 38dd93fd1..000000000 --- a/PubNub/include/PubNub/PNReachability.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/PNReachability.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemoveAllPushNotificationsRequest.h b/PubNub/include/PubNub/PNRemoveAllPushNotificationsRequest.h deleted file mode 120000 index 6b1a72923..000000000 --- a/PubNub/include/PubNub/PNRemoveAllPushNotificationsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Push Notifications/PNRemoveAllPushNotificationsRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemoveChannelMembersAPICallBuilder.h b/PubNub/include/PubNub/PNRemoveChannelMembersAPICallBuilder.h deleted file mode 120000 index 3f53a99a2..000000000 --- a/PubNub/include/PubNub/PNRemoveChannelMembersAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/Membership/PNRemoveChannelMembersAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemoveChannelMembersRequest.h b/PubNub/include/PubNub/PNRemoveChannelMembersRequest.h deleted file mode 120000 index e1d7f9042..000000000 --- a/PubNub/include/PubNub/PNRemoveChannelMembersRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Membership/PNRemoveChannelMembersRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemoveChannelMetadataAPICallBuilder.h b/PubNub/include/PubNub/PNRemoveChannelMetadataAPICallBuilder.h deleted file mode 120000 index 2dc5ea75f..000000000 --- a/PubNub/include/PubNub/PNRemoveChannelMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/Channel/PNRemoveChannelMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemoveChannelMetadataRequest.h b/PubNub/include/PubNub/PNRemoveChannelMetadataRequest.h deleted file mode 120000 index 7c2093bee..000000000 --- a/PubNub/include/PubNub/PNRemoveChannelMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Channel/PNRemoveChannelMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemoveMembershipsAPICallBuilder.h b/PubNub/include/PubNub/PNRemoveMembershipsAPICallBuilder.h deleted file mode 120000 index 72c1cbadb..000000000 --- a/PubNub/include/PubNub/PNRemoveMembershipsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/Membership/PNRemoveMembershipsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemoveMembershipsRequest.h b/PubNub/include/PubNub/PNRemoveMembershipsRequest.h deleted file mode 120000 index e9963761a..000000000 --- a/PubNub/include/PubNub/PNRemoveMembershipsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Membership/PNRemoveMembershipsRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemoveMessageActionAPICallBuilder.h b/PubNub/include/PubNub/PNRemoveMessageActionAPICallBuilder.h deleted file mode 120000 index 2f23c089b..000000000 --- a/PubNub/include/PubNub/PNRemoveMessageActionAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Actions/Message/PNRemoveMessageActionAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemoveMessageActionParser.h b/PubNub/include/PubNub/PNRemoveMessageActionParser.h deleted file mode 120000 index e35b0de8a..000000000 --- a/PubNub/include/PubNub/PNRemoveMessageActionParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Actions/Message/PNRemoveMessageActionParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemoveMessageActionRequest.h b/PubNub/include/PubNub/PNRemoveMessageActionRequest.h deleted file mode 120000 index d35fa4584..000000000 --- a/PubNub/include/PubNub/PNRemoveMessageActionRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Actions/Message/PNRemoveMessageActionRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemovePushNotificationsRequest.h b/PubNub/include/PubNub/PNRemovePushNotificationsRequest.h deleted file mode 120000 index c183e040a..000000000 --- a/PubNub/include/PubNub/PNRemovePushNotificationsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Push Notifications/PNRemovePushNotificationsRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemoveUUIDMetadataAPICallBuilder.h b/PubNub/include/PubNub/PNRemoveUUIDMetadataAPICallBuilder.h deleted file mode 120000 index 45daf5e93..000000000 --- a/PubNub/include/PubNub/PNRemoveUUIDMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/UUID/PNRemoveUUIDMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRemoveUUIDMetadataRequest.h b/PubNub/include/PubNub/PNRemoveUUIDMetadataRequest.h deleted file mode 120000 index 4f27ef722..000000000 --- a/PubNub/include/PubNub/PNRemoveUUIDMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/UUID/PNRemoveUUIDMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRequest+Private.h b/PubNub/include/PubNub/PNRequest+Private.h deleted file mode 120000 index a70d94efc..000000000 --- a/PubNub/include/PubNub/PNRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/PNRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRequest.h b/PubNub/include/PubNub/PNRequest.h deleted file mode 120000 index 4c9ce9e33..000000000 --- a/PubNub/include/PubNub/PNRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/PNRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRequestParameters.h b/PubNub/include/PubNub/PNRequestParameters.h deleted file mode 120000 index 00ded7ea7..000000000 --- a/PubNub/include/PubNub/PNRequestParameters.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/PNRequestParameters.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRequestRetryConfiguration+Private.h b/PubNub/include/PubNub/PNRequestRetryConfiguration+Private.h deleted file mode 120000 index d9afa231a..000000000 --- a/PubNub/include/PubNub/PNRequestRetryConfiguration+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/PNRequestRetryConfiguration+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNRequestRetryConfiguration.h b/PubNub/include/PubNub/PNRequestRetryConfiguration.h deleted file mode 120000 index c20e89533..000000000 --- a/PubNub/include/PubNub/PNRequestRetryConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/PNRequestRetryConfiguration.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNResult.h b/PubNub/include/PubNub/PNResult.h deleted file mode 120000 index f48168936..000000000 --- a/PubNub/include/PubNub/PNResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/PNResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSendFileAPICallBuilder.h b/PubNub/include/PubNub/PNSendFileAPICallBuilder.h deleted file mode 120000 index 3c7feab0b..000000000 --- a/PubNub/include/PubNub/PNSendFileAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Files/PNSendFileAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSendFileRequest+Private.h b/PubNub/include/PubNub/PNSendFileRequest+Private.h deleted file mode 120000 index 197c2970e..000000000 --- a/PubNub/include/PubNub/PNSendFileRequest+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Files/PNSendFileRequest+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSendFileRequest.h b/PubNub/include/PubNub/PNSendFileRequest.h deleted file mode 120000 index 44e990332..000000000 --- a/PubNub/include/PubNub/PNSendFileRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Files/PNSendFileRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSendFileStatus+Private.h b/PubNub/include/PubNub/PNSendFileStatus+Private.h deleted file mode 120000 index 5cb1649c9..000000000 --- a/PubNub/include/PubNub/PNSendFileStatus+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNSendFileStatus+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSendFileStatus.h b/PubNub/include/PubNub/PNSendFileStatus.h deleted file mode 120000 index 227f7497b..000000000 --- a/PubNub/include/PubNub/PNSendFileStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNSendFileStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSequenceInputStream.h b/PubNub/include/PubNub/PNSequenceInputStream.h deleted file mode 120000 index 90d3110a7..000000000 --- a/PubNub/include/PubNub/PNSequenceInputStream.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Streams/PNSequenceInputStream.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNServiceData+Private.h b/PubNub/include/PubNub/PNServiceData+Private.h deleted file mode 120000 index ed5356bcb..000000000 --- a/PubNub/include/PubNub/PNServiceData+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNServiceData+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNServiceData.h b/PubNub/include/PubNub/PNServiceData.h deleted file mode 120000 index 4156d9218..000000000 --- a/PubNub/include/PubNub/PNServiceData.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNServiceData.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSetChannelMembersAPICallBuilder.h b/PubNub/include/PubNub/PNSetChannelMembersAPICallBuilder.h deleted file mode 120000 index 7389af564..000000000 --- a/PubNub/include/PubNub/PNSetChannelMembersAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/Membership/PNSetChannelMembersAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSetChannelMembersRequest.h b/PubNub/include/PubNub/PNSetChannelMembersRequest.h deleted file mode 120000 index c216bed80..000000000 --- a/PubNub/include/PubNub/PNSetChannelMembersRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Membership/PNSetChannelMembersRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSetChannelMetadataAPICallBuilder.h b/PubNub/include/PubNub/PNSetChannelMetadataAPICallBuilder.h deleted file mode 120000 index 92d027a0c..000000000 --- a/PubNub/include/PubNub/PNSetChannelMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/Channel/PNSetChannelMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSetChannelMetadataRequest.h b/PubNub/include/PubNub/PNSetChannelMetadataRequest.h deleted file mode 120000 index ee84afb24..000000000 --- a/PubNub/include/PubNub/PNSetChannelMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Channel/PNSetChannelMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSetChannelMetadataStatus.h b/PubNub/include/PubNub/PNSetChannelMetadataStatus.h deleted file mode 120000 index 631231a2d..000000000 --- a/PubNub/include/PubNub/PNSetChannelMetadataStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNSetChannelMetadataStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSetMembershipsAPICallBuilder.h b/PubNub/include/PubNub/PNSetMembershipsAPICallBuilder.h deleted file mode 120000 index 14d839b2b..000000000 --- a/PubNub/include/PubNub/PNSetMembershipsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/Membership/PNSetMembershipsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSetMembershipsRequest.h b/PubNub/include/PubNub/PNSetMembershipsRequest.h deleted file mode 120000 index 6c7bef73d..000000000 --- a/PubNub/include/PubNub/PNSetMembershipsRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/Membership/PNSetMembershipsRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSetUUIDMetadataAPICallBuilder.h b/PubNub/include/PubNub/PNSetUUIDMetadataAPICallBuilder.h deleted file mode 120000 index 08c1feb06..000000000 --- a/PubNub/include/PubNub/PNSetUUIDMetadataAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Objects/UUID/PNSetUUIDMetadataAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSetUUIDMetadataRequest.h b/PubNub/include/PubNub/PNSetUUIDMetadataRequest.h deleted file mode 120000 index 86ffab054..000000000 --- a/PubNub/include/PubNub/PNSetUUIDMetadataRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Requests/Objects/UUID/PNSetUUIDMetadataRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSetUUIDMetadataStatus.h b/PubNub/include/PubNub/PNSetUUIDMetadataStatus.h deleted file mode 120000 index f9d163f25..000000000 --- a/PubNub/include/PubNub/PNSetUUIDMetadataStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNSetUUIDMetadataStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSignalAPICallBuilder.h b/PubNub/include/PubNub/PNSignalAPICallBuilder.h deleted file mode 120000 index 75540dc68..000000000 --- a/PubNub/include/PubNub/PNSignalAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Publish/PNSignalAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSignalStatus.h b/PubNub/include/PubNub/PNSignalStatus.h deleted file mode 120000 index 213c43247..000000000 --- a/PubNub/include/PubNub/PNSignalStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNSignalStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNStateAPICallBuilder.h b/PubNub/include/PubNub/PNStateAPICallBuilder.h deleted file mode 120000 index 428d7a383..000000000 --- a/PubNub/include/PubNub/PNStateAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/State/PNStateAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNStateAuditAPICallBuilder.h b/PubNub/include/PubNub/PNStateAuditAPICallBuilder.h deleted file mode 120000 index 30ae004f4..000000000 --- a/PubNub/include/PubNub/PNStateAuditAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/State/PNStateAuditAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNStateListener.h b/PubNub/include/PubNub/PNStateListener.h deleted file mode 120000 index 5b424932c..000000000 --- a/PubNub/include/PubNub/PNStateListener.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Managers/PNStateListener.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNStateModificationAPICallBuilder.h b/PubNub/include/PubNub/PNStateModificationAPICallBuilder.h deleted file mode 120000 index 737c0a9d8..000000000 --- a/PubNub/include/PubNub/PNStateModificationAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/State/PNStateModificationAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNStatus+Private.h b/PubNub/include/PubNub/PNStatus+Private.h deleted file mode 120000 index bf6f0ef21..000000000 --- a/PubNub/include/PubNub/PNStatus+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNStatus+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNStatus.h b/PubNub/include/PubNub/PNStatus.h deleted file mode 120000 index 705ae1b87..000000000 --- a/PubNub/include/PubNub/PNStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNStreamAPICallBuilder.h b/PubNub/include/PubNub/PNStreamAPICallBuilder.h deleted file mode 120000 index 951cd4675..000000000 --- a/PubNub/include/PubNub/PNStreamAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Stream/PNStreamAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNStreamAuditAPICallBuilder.h b/PubNub/include/PubNub/PNStreamAuditAPICallBuilder.h deleted file mode 120000 index 97d2dfb95..000000000 --- a/PubNub/include/PubNub/PNStreamAuditAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Stream/PNStreamAuditAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNStreamModificationAPICallBuilder.h b/PubNub/include/PubNub/PNStreamModificationAPICallBuilder.h deleted file mode 120000 index 37d7cb52b..000000000 --- a/PubNub/include/PubNub/PNStreamModificationAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Stream/PNStreamModificationAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNString.h b/PubNub/include/PubNub/PNString.h deleted file mode 120000 index 57dd76605..000000000 --- a/PubNub/include/PubNub/PNString.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNString.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNStructures.h b/PubNub/include/PubNub/PNStructures.h deleted file mode 120000 index b2a1bae17..000000000 --- a/PubNub/include/PubNub/PNStructures.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/PNStructures.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSubscribeAPIBuilder.h b/PubNub/include/PubNub/PNSubscribeAPIBuilder.h deleted file mode 120000 index 804c4e986..000000000 --- a/PubNub/include/PubNub/PNSubscribeAPIBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Subscribe/PNSubscribeAPIBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSubscribeChannelsOrGroupsAPIBuilder.h b/PubNub/include/PubNub/PNSubscribeChannelsOrGroupsAPIBuilder.h deleted file mode 120000 index fd872f91f..000000000 --- a/PubNub/include/PubNub/PNSubscribeChannelsOrGroupsAPIBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Subscribe/PNSubscribeChannelsOrGroupsAPIBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSubscribeParser.h b/PubNub/include/PubNub/PNSubscribeParser.h deleted file mode 120000 index a099474f6..000000000 --- a/PubNub/include/PubNub/PNSubscribeParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNSubscribeParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSubscribeStatus+Private.h b/PubNub/include/PubNub/PNSubscribeStatus+Private.h deleted file mode 120000 index bafd58cd0..000000000 --- a/PubNub/include/PubNub/PNSubscribeStatus+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNSubscribeStatus+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSubscribeStatus.h b/PubNub/include/PubNub/PNSubscribeStatus.h deleted file mode 120000 index b316188bc..000000000 --- a/PubNub/include/PubNub/PNSubscribeStatus.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNSubscribeStatus.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSubscriber.h b/PubNub/include/PubNub/PNSubscriber.h deleted file mode 120000 index 30052db40..000000000 --- a/PubNub/include/PubNub/PNSubscriber.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Managers/PNSubscriber.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNSubscriberResults.h b/PubNub/include/PubNub/PNSubscriberResults.h deleted file mode 120000 index 7e622808b..000000000 --- a/PubNub/include/PubNub/PNSubscriberResults.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNSubscriberResults.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNTelemetry.h b/PubNub/include/PubNub/PNTelemetry.h deleted file mode 120000 index 7f59a62cf..000000000 --- a/PubNub/include/PubNub/PNTelemetry.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Managers/PNTelemetry.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNTimeAPICallBuilder.h b/PubNub/include/PubNub/PNTimeAPICallBuilder.h deleted file mode 120000 index e1862698f..000000000 --- a/PubNub/include/PubNub/PNTimeAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Time/PNTimeAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNTimeParser.h b/PubNub/include/PubNub/PNTimeParser.h deleted file mode 120000 index 48577f855..000000000 --- a/PubNub/include/PubNub/PNTimeParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNTimeParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNTimeResult.h b/PubNub/include/PubNub/PNTimeResult.h deleted file mode 120000 index e9b8f9474..000000000 --- a/PubNub/include/PubNub/PNTimeResult.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Service Objects/PNTimeResult.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNURLBuilder.h b/PubNub/include/PubNub/PNURLBuilder.h deleted file mode 120000 index e73bdbdf6..000000000 --- a/PubNub/include/PubNub/PNURLBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/PNURLBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNURLRequest.h b/PubNub/include/PubNub/PNURLRequest.h deleted file mode 120000 index 036b66a92..000000000 --- a/PubNub/include/PubNub/PNURLRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../Misc/Helpers/PNURLRequest.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNUUIDMetadata+Private.h b/PubNub/include/PubNub/PNUUIDMetadata+Private.h deleted file mode 120000 index 37203a69d..000000000 --- a/PubNub/include/PubNub/PNUUIDMetadata+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNUUIDMetadata+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNUUIDMetadata.h b/PubNub/include/PubNub/PNUUIDMetadata.h deleted file mode 120000 index 514b6a68c..000000000 --- a/PubNub/include/PubNub/PNUUIDMetadata.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNUUIDMetadata.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNUUIDMetadataChangeParser.h b/PubNub/include/PubNub/PNUUIDMetadataChangeParser.h deleted file mode 120000 index 48fe11a76..000000000 --- a/PubNub/include/PubNub/PNUUIDMetadataChangeParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/Objects/PNUUIDMetadataChangeParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNUnsubscribeAPICallBuilder.h b/PubNub/include/PubNub/PNUnsubscribeAPICallBuilder.h deleted file mode 120000 index be816ad81..000000000 --- a/PubNub/include/PubNub/PNUnsubscribeAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Subscribe/PNUnsubscribeAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNUnsubscribeChannelsOrGroupsAPICallBuilder.h b/PubNub/include/PubNub/PNUnsubscribeChannelsOrGroupsAPICallBuilder.h deleted file mode 120000 index ebd68b80c..000000000 --- a/PubNub/include/PubNub/PNUnsubscribeChannelsOrGroupsAPICallBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Builders/API Call/Subscribe/PNUnsubscribeChannelsOrGroupsAPICallBuilder.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNXML+Private.h b/PubNub/include/PubNub/PNXML+Private.h deleted file mode 120000 index 77e16dc02..000000000 --- a/PubNub/include/PubNub/PNXML+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNXML+Private.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNXML.h b/PubNub/include/PubNub/PNXML.h deleted file mode 120000 index e35167191..000000000 --- a/PubNub/include/PubNub/PNXML.h +++ /dev/null @@ -1 +0,0 @@ -../../Data/Models/PNXML.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PNXMLParser.h b/PubNub/include/PubNub/PNXMLParser.h deleted file mode 120000 index e5723dcf4..000000000 --- a/PubNub/include/PubNub/PNXMLParser.h +++ /dev/null @@ -1 +0,0 @@ -../../Network/Parsers/PNXMLParser.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+APNS.h b/PubNub/include/PubNub/PubNub+APNS.h deleted file mode 120000 index ae9d0a2f8..000000000 --- a/PubNub/include/PubNub/PubNub+APNS.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+APNS.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+ChannelGroup.h b/PubNub/include/PubNub/PubNub+ChannelGroup.h deleted file mode 120000 index aa7f8c26e..000000000 --- a/PubNub/include/PubNub/PubNub+ChannelGroup.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+ChannelGroup.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+Core.h b/PubNub/include/PubNub/PubNub+Core.h deleted file mode 120000 index c67854cc6..000000000 --- a/PubNub/include/PubNub/PubNub+Core.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+Core.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+CorePrivate.h b/PubNub/include/PubNub/PubNub+CorePrivate.h deleted file mode 120000 index 4ece7a398..000000000 --- a/PubNub/include/PubNub/PubNub+CorePrivate.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+CorePrivate.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+Files.h b/PubNub/include/PubNub/PubNub+Files.h deleted file mode 120000 index c6bbe1f80..000000000 --- a/PubNub/include/PubNub/PubNub+Files.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+Files.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+History.h b/PubNub/include/PubNub/PubNub+History.h deleted file mode 120000 index c23bd37b7..000000000 --- a/PubNub/include/PubNub/PubNub+History.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+History.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+MessageActions.h b/PubNub/include/PubNub/PubNub+MessageActions.h deleted file mode 120000 index 803692dbf..000000000 --- a/PubNub/include/PubNub/PubNub+MessageActions.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+MessageActions.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+Objects.h b/PubNub/include/PubNub/PubNub+Objects.h deleted file mode 120000 index 17ea5f1fa..000000000 --- a/PubNub/include/PubNub/PubNub+Objects.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+Objects.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+PAM.h b/PubNub/include/PubNub/PubNub+PAM.h deleted file mode 120000 index 64baf55b8..000000000 --- a/PubNub/include/PubNub/PubNub+PAM.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+PAM.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+PAMPrivate.h b/PubNub/include/PubNub/PubNub+PAMPrivate.h deleted file mode 120000 index 34c9b16f4..000000000 --- a/PubNub/include/PubNub/PubNub+PAMPrivate.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+PAMPrivate.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+Presence.h b/PubNub/include/PubNub/PubNub+Presence.h deleted file mode 120000 index c5681ae25..000000000 --- a/PubNub/include/PubNub/PubNub+Presence.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+Presence.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+PresencePrivate.h b/PubNub/include/PubNub/PubNub+PresencePrivate.h deleted file mode 120000 index d6bb55080..000000000 --- a/PubNub/include/PubNub/PubNub+PresencePrivate.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+PresencePrivate.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+Publish.h b/PubNub/include/PubNub/PubNub+Publish.h deleted file mode 120000 index 693919d65..000000000 --- a/PubNub/include/PubNub/PubNub+Publish.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+Publish.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+State.h b/PubNub/include/PubNub/PubNub+State.h deleted file mode 120000 index a702f6120..000000000 --- a/PubNub/include/PubNub/PubNub+State.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+State.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+Subscribe.h b/PubNub/include/PubNub/PubNub+Subscribe.h deleted file mode 120000 index 84405d08b..000000000 --- a/PubNub/include/PubNub/PubNub+Subscribe.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+Subscribe.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+SubscribePrivate.h b/PubNub/include/PubNub/PubNub+SubscribePrivate.h deleted file mode 120000 index 21fe0c1b3..000000000 --- a/PubNub/include/PubNub/PubNub+SubscribePrivate.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+SubscribePrivate.h \ No newline at end of file diff --git a/PubNub/include/PubNub/PubNub+Time.h b/PubNub/include/PubNub/PubNub+Time.h deleted file mode 120000 index d9f4f4936..000000000 --- a/PubNub/include/PubNub/PubNub+Time.h +++ /dev/null @@ -1 +0,0 @@ -../../Core/PubNub+Time.h \ No newline at end of file diff --git a/README.md b/README.md index b1b25b5c0..59a595e8a 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ -# PubNub 5.5.0 for iOS 9+ +# PubNub 5.6.0 for iOS 9+ [![Twitter](https://img.shields.io/badge/twitter-%40PubNub-blue.svg?style=flat)](https://twitter.com/PubNub) [![Twitter Releases](https://img.shields.io/badge/twitter-%40PubNubRelease-blue.svg?style=flat)](https://twitter.com/PubNubRelease) [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/PubNub.svg?style=flat)](https://img.shields.io/cocoapods/v/PubNub.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Platform](https://img.shields.io/cocoapods/p/PubNub.svg?style=flat)](https://img.shields.io/cocoapods/p/PubNub.svg) [![Docs Coverage](https://img.shields.io/cocoapods/metrics/doc-percent/PubNub.svg?style=flat)](https://img.shields.io/cocoapods/metrics/doc-percent/PubNub.svg) -[![Build Status](https://travis-ci.com/pubnub/objective-c.svg?branch=master)](https://travis-ci.com/pubnub/objective-c) This is the official PubNub Objective-C SDK repository. @@ -202,4 +201,4 @@ If you **need help** or have a **general question**, contact support@pubnub.com. The PubNub Swift SDK is released under the `PubNub Software Development Kit License`. -[See LICENSE](https://github.com/pubnub/objective-c/blob/master/LICENSE) for details. \ No newline at end of file +[See LICENSE](https://github.com/pubnub/objective-c/blob/master/LICENSE) for details. diff --git a/Tests/Podfile.lock b/Tests/Podfile.lock index e11f1c764..ef40d5456 100644 --- a/Tests/Podfile.lock +++ b/Tests/Podfile.lock @@ -1,9 +1,9 @@ PODS: - Cucumberish (1.4.0) - OCMock (3.6) - - PubNub (5.4.1): - - PubNub/Core (= 5.4.1) - - PubNub/Core (5.4.1) + - PubNub (5.5.0): + - PubNub/Core (= 5.5.0) + - PubNub/Core (5.5.0) - YAHTTPVCR (1.5.0) DEPENDENCIES: @@ -32,7 +32,7 @@ CHECKOUT OPTIONS: SPEC CHECKSUMS: Cucumberish: 6cbd0c1f50306b369acebfe7d9f514c9c287d26c OCMock: 5ea90566be239f179ba766fd9fbae5885040b992 - PubNub: b853b45e6e25ecc0d667608035cfec304c956008 + PubNub: 17b22578c960a206863289c3662d0ccc803c71f7 YAHTTPVCR: cb7a710d4289ee9b038fd708d2fb8df4e6521bc0 PODFILE CHECKSUM: fb38a10e9ab7ec6c9e4fe43e6a3b6ffc35154550 diff --git a/Tests/Support Files/Fixtures/PNChannelGroupIntegrationTests.bundle/ItShouldAuditChannelGroupChannelsAndReceiveResultWithExpectedOperationAndCategory.json b/Tests/Support Files/Fixtures/PNChannelGroupIntegrationTests.bundle/ItShouldAuditChannelGroupChannelsAndReceiveResultWithExpectedOperationAndCategory.json index 295997598..2a8ba65fd 100644 --- a/Tests/Support Files/Fixtures/PNChannelGroupIntegrationTests.bundle/ItShouldAuditChannelGroupChannelsAndReceiveResultWithExpectedOperationAndCategory.json +++ b/Tests/Support Files/Fixtures/PNChannelGroupIntegrationTests.bundle/ItShouldAuditChannelGroupChannelsAndReceiveResultWithExpectedOperationAndCategory.json @@ -77,12 +77,12 @@ { "id" : "816E1B2D-556B-4254-8B1C-1E6823A2ED85", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v1\/channel-registration\/sub-key\/demo\/channel-group\/test-channel-group?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", - "Content-Type" : "text\/javascript; charset=\"UTF-8\"", + "Content-Type" : "text\/html; charset=\"UTF-8\"", "Server" : "Pubnub", "Access-Control-Allow-Origin" : "*", "Age" : "0", diff --git a/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldFetchMembersAndReceiveResultWithExpectedOperation.json b/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldFetchMembersAndReceiveResultWithExpectedOperation.json index c41b8e637..bfe95b6c6 100644 --- a/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldFetchMembersAndReceiveResultWithExpectedOperation.json +++ b/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldFetchMembersAndReceiveResultWithExpectedOperation.json @@ -587,12 +587,12 @@ { "id" : "A9BF764B-ABCC-4191-90C3-E9BB6061E426", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/channels\/Chanted-channel-identifier\/uuids?uuid=Serhii&limit=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Credentials" : "true", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Access-Control-Allow-Origin" : "*", "Vary" : "Accept-Encoding", "Transfer-Encoding" : "Identity", diff --git a/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldRemoveMembersAndReceiveStatusWithExpectedOperationAndCategory.json b/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldRemoveMembersAndReceiveStatusWithExpectedOperationAndCategory.json index 84e605e3b..479f43e93 100644 --- a/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldRemoveMembersAndReceiveStatusWithExpectedOperationAndCategory.json +++ b/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldRemoveMembersAndReceiveStatusWithExpectedOperationAndCategory.json @@ -361,13 +361,13 @@ { "id" : "17514F4A-D49A-4476-B04A-02558BFD341D", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/channels\/Chanted-channel-identifier\/uuids?uuid=Serhii&include=custom&limit=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Credentials" : "true", "Date" : "Thu, 04 Jun 2020 19:24:25 GMT", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Content-Length" : "165", "Connection" : "keep-alive", "Access-Control-Allow-Origin" : "*" diff --git a/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldRemoveMembersUsingManageAndReceiveStatusWithExpectedOperationAndCategory.json b/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldRemoveMembersUsingManageAndReceiveStatusWithExpectedOperationAndCategory.json index 11014cfcd..f2447dba0 100644 --- a/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldRemoveMembersUsingManageAndReceiveStatusWithExpectedOperationAndCategory.json +++ b/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldRemoveMembersUsingManageAndReceiveStatusWithExpectedOperationAndCategory.json @@ -361,13 +361,13 @@ { "id" : "EDD7CE2F-196B-45C3-9272-86100C4F01B2", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/channels\/Chanted-channel-identifier\/uuids?uuid=Serhii&include=custom&limit=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Credentials" : "true", "Date" : "Thu, 04 Jun 2020 19:25:10 GMT", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Content-Length" : "165", "Connection" : "keep-alive", "Access-Control-Allow-Origin" : "*" diff --git a/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldSetMembersAndReturnFilteredMembersInformationWhenFilterIsSet.json b/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldSetMembersAndReturnFilteredMembersInformationWhenFilterIsSet.json index 3c1e671e5..7fc906a92 100644 --- a/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldSetMembersAndReturnFilteredMembersInformationWhenFilterIsSet.json +++ b/Tests/Support Files/Fixtures/PNChannelMemberIntegrationTest.bundle/ItShouldSetMembersAndReturnFilteredMembersInformationWhenFilterIsSet.json @@ -303,12 +303,12 @@ { "id" : "CCA2B04E-23BA-4F66-B329-5AA9DBAF4D67", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/channels\/Chanted-channel-identifier\/uuids?filter=uuid.name%20like%20'K*'&count=1&limit=100&pnsdk=PubNub-ObjC-iOS\/4.x.x&include=uuid.custom,uuid&uuid=Serhii", "headers" : { "Access-Control-Allow-Credentials" : "true", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Access-Control-Allow-Origin" : "*", "Vary" : "Accept-Encoding", "Transfer-Encoding" : "Identity", diff --git a/Tests/Support Files/Fixtures/PNChannelMetadataIntegrationTest.bundle/ItShouldFetchAllChannelsMetadataAndReceiveResultWithExpectedOperation.json b/Tests/Support Files/Fixtures/PNChannelMetadataIntegrationTest.bundle/ItShouldFetchAllChannelsMetadataAndReceiveResultWithExpectedOperation.json index aa58a2b0f..592d466dc 100644 --- a/Tests/Support Files/Fixtures/PNChannelMetadataIntegrationTest.bundle/ItShouldFetchAllChannelsMetadataAndReceiveResultWithExpectedOperation.json +++ b/Tests/Support Files/Fixtures/PNChannelMetadataIntegrationTest.bundle/ItShouldFetchAllChannelsMetadataAndReceiveResultWithExpectedOperation.json @@ -469,12 +469,12 @@ { "id" : "22692757-E959-43D2-89BD-9DBDC61DF98F", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/channels?uuid=Serhii&limit=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Credentials" : "true", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Access-Control-Allow-Origin" : "*", "Vary" : "Accept-Encoding", "Transfer-Encoding" : "Identity", diff --git a/Tests/Support Files/Fixtures/PNChannelMetadataIntegrationTest.bundle/ItShouldRemoveChannelMetadataAndReceiveStatusWithExpectedOperationAndCategory.json b/Tests/Support Files/Fixtures/PNChannelMetadataIntegrationTest.bundle/ItShouldRemoveChannelMetadataAndReceiveStatusWithExpectedOperationAndCategory.json index b93826a54..ac3b9213b 100644 --- a/Tests/Support Files/Fixtures/PNChannelMetadataIntegrationTest.bundle/ItShouldRemoveChannelMetadataAndReceiveStatusWithExpectedOperationAndCategory.json +++ b/Tests/Support Files/Fixtures/PNChannelMetadataIntegrationTest.bundle/ItShouldRemoveChannelMetadataAndReceiveStatusWithExpectedOperationAndCategory.json @@ -239,13 +239,13 @@ { "id" : "BFD3E3A1-5429-427D-8F32-603356D2A68A", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/channels\/Chanted-channel-identifier?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Credentials" : "true", "Date" : "Thu, 04 Jun 2020 19:39:46 GMT", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Content-Length" : "26", "Connection" : "keep-alive", "Access-Control-Allow-Origin" : "*" diff --git a/Tests/Support Files/Fixtures/PNChannelMetadataIntegrationTest.bundle/ItShouldSetChannelMetadataWhenAdditionalInformationIsSet.json b/Tests/Support Files/Fixtures/PNChannelMetadataIntegrationTest.bundle/ItShouldSetChannelMetadataWhenAdditionalInformationIsSet.json index a54b43160..549548678 100644 --- a/Tests/Support Files/Fixtures/PNChannelMetadataIntegrationTest.bundle/ItShouldSetChannelMetadataWhenAdditionalInformationIsSet.json +++ b/Tests/Support Files/Fixtures/PNChannelMetadataIntegrationTest.bundle/ItShouldSetChannelMetadataWhenAdditionalInformationIsSet.json @@ -129,12 +129,12 @@ { "id" : "16774386-4A1F-4E2E-A62F-CA6DDBC87DC4", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/channels\/test-channel?uuid=Serhii&include=custom&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Credentials" : "true", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Access-Control-Allow-Origin" : "*", "Vary" : "Accept-Encoding", "Transfer-Encoding" : "Identity", diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelAndNotCrashWhenCompletionBlockIsNil.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelAndNotCrashWhenCompletionBlockIsNil.json index 6ff7822e2..a0fec2fae 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelAndNotCrashWhenCompletionBlockIsNil.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelAndNotCrashWhenCompletionBlockIsNil.json @@ -1,27 +1,27 @@ [ { - "id" : "58A62118-4EB5-48E3-B334-B247C6A66834", + "id" : "80382F2A-BD75-40B8-B6BF-974B62BD5506", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "58A62118-4EB5-48E3-B334-B247C6A66834", + "id" : "80382F2A-BD75-40B8-B6BF-974B62BD5506", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Fri, 04 Jun 2021 19:51:19 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:26 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "58A62118-4EB5-48E3-B334-B247C6A66834", + "id" : "80382F2A-BD75-40B8-B6BF-974B62BD5506", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNjIyODM2Mjc5ODU2MjkxNyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODI2MTI3MzEyOCJd" }, "type" : 2 }, { - "id" : "58A62118-4EB5-48E3-B334-B247C6A66834", + "id" : "80382F2A-BD75-40B8-B6BF-974B62BD5506", "type" : 4 }, { - "id" : "F315E7E1-A324-479A-9C4F-2F73744F16E4", + "id" : "AE09F5A8-CDEE-4D1A-A0A6-5EC1CB5BA9E3", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "F315E7E1-A324-479A-9C4F-2F73744F16E4", + "id" : "AE09F5A8-CDEE-4D1A-A0A6-5EC1CB5BA9E3", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Fri, 04 Jun 2021 19:51:20 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:26 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "F315E7E1-A324-479A-9C4F-2F73744F16E4", + "id" : "AE09F5A8-CDEE-4D1A-A0A6-5EC1CB5BA9E3", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNjIyODM2MjgwNDQ4NDU3OCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODI2NzQ3ODEwNCJd" }, "type" : 2 }, { - "id" : "F315E7E1-A324-479A-9C4F-2F73744F16E4", + "id" : "AE09F5A8-CDEE-4D1A-A0A6-5EC1CB5BA9E3", "type" : 4 }, { - "id" : "3C00C417-8DDA-4374-A6AD-9A75338E1745", + "id" : "8F4B3889-698E-4602-BD0E-2E31D6155B21", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "3C00C417-8DDA-4374-A6AD-9A75338E1745", + "id" : "8F4B3889-698E-4602-BD0E-2E31D6155B21", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Fri, 04 Jun 2021 19:51:21 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:27 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "3C00C417-8DDA-4374-A6AD-9A75338E1745", + "id" : "8F4B3889-698E-4602-BD0E-2E31D6155B21", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNjIyODM2MjgxMDAyMzQxNiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODI3MzQ1ODQxMyJd" }, "type" : 2 }, { - "id" : "3C00C417-8DDA-4374-A6AD-9A75338E1745", + "id" : "8F4B3889-698E-4602-BD0E-2E31D6155B21", "type" : 4 }, { - "id" : "2A07A119-DDA5-4C04-A5AC-157467F6DD70", + "id" : "A4E6A277-9A01-4A9F-8977-1AEDA82D23B7", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "2A07A119-DDA5-4C04-A5AC-157467F6DD70", + "id" : "A4E6A277-9A01-4A9F-8977-1AEDA82D23B7", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Fri, 04 Jun 2021 19:51:21 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:27 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,40 +192,40 @@ "type" : 1 }, { - "id" : "2A07A119-DDA5-4C04-A5AC-157467F6DD70", + "id" : "A4E6A277-9A01-4A9F-8977-1AEDA82D23B7", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNjIyODM2MjgxNTYwOTgxMyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODI3OTQzMDMzNiJd" }, "type" : 2 }, { - "id" : "2A07A119-DDA5-4C04-A5AC-157467F6DD70", + "id" : "A4E6A277-9A01-4A9F-8977-1AEDA82D23B7", "type" : 4 }, { - "id" : "37E491BF-DD95-4D95-ACBD-D226D0D1235F", + "id" : "2DCAB27C-0F59-467A-82C8-BB6EC8316A99", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?meta=%7B%22time%22:1577918416%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918416%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "37E491BF-DD95-4D95-ACBD-D226D0D1235F", + "id" : "2DCAB27C-0F59-467A-82C8-BB6EC8316A99", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -234,7 +234,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Fri, 04 Jun 2021 19:51:22 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:28 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -243,49 +243,49 @@ "type" : 1 }, { - "id" : "37E491BF-DD95-4D95-ACBD-D226D0D1235F", + "id" : "2DCAB27C-0F59-467A-82C8-BB6EC8316A99", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNjIyODM2MjgyMTE3MjAzNSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODI4NTQ4OTIzNSJd" }, "type" : 2 }, { - "id" : "37E491BF-DD95-4D95-ACBD-D226D0D1235F", + "id" : "2DCAB27C-0F59-467A-82C8-BB6EC8316A99", "type" : 4 }, { - "id" : "3B9902F4-48C9-4A42-947A-94E462FC6903", + "id" : "96F5633F-45FE-4434-ACA4-1A66DFE286A8", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "3B9902F4-48C9-4A42-947A-94E462FC6903", + "id" : "96F5633F-45FE-4434-ACA4-1A66DFE286A8", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Fri, 04 Jun 2021 19:51:22 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:29 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -294,40 +294,40 @@ "type" : 1 }, { - "id" : "3B9902F4-48C9-4A42-947A-94E462FC6903", + "id" : "96F5633F-45FE-4434-ACA4-1A66DFE286A8", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNjIyODM2MjgyNjc3Njk0OSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODI5MTU1OTUxMiJd" }, "type" : 2 }, { - "id" : "3B9902F4-48C9-4A42-947A-94E462FC6903", + "id" : "96F5633F-45FE-4434-ACA4-1A66DFE286A8", "type" : 4 }, { - "id" : "EBB6F5C0-2CE4-4ABD-91E9-7848A263837A", + "id" : "8EAABB45-678A-4735-9007-A8739D8FEC5F", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?meta=%7B%22time%22:1577918418%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918418%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "EBB6F5C0-2CE4-4ABD-91E9-7848A263837A", + "id" : "8EAABB45-678A-4735-9007-A8739D8FEC5F", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -336,7 +336,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Fri, 04 Jun 2021 19:51:23 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:29 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -345,49 +345,49 @@ "type" : 1 }, { - "id" : "EBB6F5C0-2CE4-4ABD-91E9-7848A263837A", + "id" : "8EAABB45-678A-4735-9007-A8739D8FEC5F", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNjIyODM2MjgzMjI4ODM3NiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODI5NzUwMDc5MyJd" }, "type" : 2 }, { - "id" : "EBB6F5C0-2CE4-4ABD-91E9-7848A263837A", + "id" : "8EAABB45-678A-4735-9007-A8739D8FEC5F", "type" : 4 }, { - "id" : "E0569C9A-57ED-49C7-A897-4A1DD84D875A", + "id" : "EAC91DAB-49D6-4E70-8884-9438E237BDAF", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "E0569C9A-57ED-49C7-A897-4A1DD84D875A", + "id" : "EAC91DAB-49D6-4E70-8884-9438E237BDAF", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Fri, 04 Jun 2021 19:51:23 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:30 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -396,40 +396,40 @@ "type" : 1 }, { - "id" : "E0569C9A-57ED-49C7-A897-4A1DD84D875A", + "id" : "EAC91DAB-49D6-4E70-8884-9438E237BDAF", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNjIyODM2MjgzNzg4NDcyOCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODMwMzQ4Mzg2MSJd" }, "type" : 2 }, { - "id" : "E0569C9A-57ED-49C7-A897-4A1DD84D875A", + "id" : "EAC91DAB-49D6-4E70-8884-9438E237BDAF", "type" : 4 }, { - "id" : "6FEF4E29-5D20-435E-86AF-A155902AC265", + "id" : "F5148860-E1C8-47A0-9B50-965973448102", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?meta=%7B%22time%22:1577918420%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918420%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "6FEF4E29-5D20-435E-86AF-A155902AC265", + "id" : "F5148860-E1C8-47A0-9B50-965973448102", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -438,7 +438,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Fri, 04 Jun 2021 19:51:24 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:30 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -447,49 +447,49 @@ "type" : 1 }, { - "id" : "6FEF4E29-5D20-435E-86AF-A155902AC265", + "id" : "F5148860-E1C8-47A0-9B50-965973448102", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNjIyODM2Mjg0MzM3NTEwOSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODMwOTQ4MDg2MiJd" }, "type" : 2 }, { - "id" : "6FEF4E29-5D20-435E-86AF-A155902AC265", + "id" : "F5148860-E1C8-47A0-9B50-965973448102", "type" : 4 }, { - "id" : "96E82DC5-6752-4244-AEE6-245BF6CDE7A1", + "id" : "E47026ED-23D8-4C7A-8C09-4FBB267662C5", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "96E82DC5-6752-4244-AEE6-245BF6CDE7A1", + "id" : "E47026ED-23D8-4C7A-8C09-4FBB267662C5", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Fri, 04 Jun 2021 19:51:24 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:31 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -498,28 +498,28 @@ "type" : 1 }, { - "id" : "96E82DC5-6752-4244-AEE6-245BF6CDE7A1", + "id" : "E47026ED-23D8-4C7A-8C09-4FBB267662C5", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNjIyODM2Mjg0ODgxODU3MyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODMxNTQ2OTI3MyJd" }, "type" : 2 }, { - "id" : "96E82DC5-6752-4244-AEE6-245BF6CDE7A1", + "id" : "E47026ED-23D8-4C7A-8C09-4FBB267662C5", "type" : 4 }, { - "id" : "E70B31F0-9BD1-44B4-A585-8E5BD117AC6F", + "id" : "874FAB9F-FC43-4113-89E1-9A021A0BDE5F", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -531,7 +531,7 @@ "type" : 0 }, { - "id" : "E70B31F0-9BD1-44B4-A585-8E5BD117AC6F", + "id" : "874FAB9F-FC43-4113-89E1-9A021A0BDE5F", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -539,10 +539,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Fri, 04 Jun 2021 19:51:28 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:35 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -552,7 +552,7 @@ "type" : 1 }, { - "id" : "E70B31F0-9BD1-44B4-A585-8E5BD117AC6F", + "id" : "874FAB9F-FC43-4113-89E1-9A021A0BDE5F", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -560,43 +560,43 @@ "type" : 2 }, { - "id" : "E70B31F0-9BD1-44B4-A585-8E5BD117AC6F", + "id" : "874FAB9F-FC43-4113-89E1-9A021A0BDE5F", "type" : 4 }, { - "id" : "F59BDF13-E80C-472B-8A16-ED10107E3DCC", + "id" : "CAAA4024-8325-4FAC-896F-EF6609E250E9", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "F59BDF13-E80C-472B-8A16-ED10107E3DCC", + "id" : "CAAA4024-8325-4FAC-896F-EF6609E250E9", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Fri, 04 Jun 2021 19:51:43 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:50 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "8", "Cache-Control" : "no-cache", @@ -606,7 +606,7 @@ "type" : 1 }, { - "id" : "F59BDF13-E80C-472B-8A16-ED10107E3DCC", + "id" : "CAAA4024-8325-4FAC-896F-EF6609E250E9", "data" : { "cls" : "NSData", "base64" : "W1tdLDAsMF0=" @@ -614,20 +614,20 @@ "type" : 2 }, { - "id" : "F59BDF13-E80C-472B-8A16-ED10107E3DCC", + "id" : "CAAA4024-8325-4FAC-896F-EF6609E250E9", "type" : 4 }, { - "id" : "4F84858C-8C8F-4153-AC35-B84894B02938", + "id" : "FCDB3DA5-1688-40B0-811E-763E21AAB785", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.4.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -639,7 +639,7 @@ "type" : 0 }, { - "id" : "4F84858C-8C8F-4153-AC35-B84894B02938", + "id" : "FCDB3DA5-1688-40B0-811E-763E21AAB785", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -647,10 +647,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Fri, 04 Jun 2021 19:51:44 GMT", + "Date" : "Wed, 26 Jun 2024 18:50:50 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -660,7 +660,7 @@ "type" : 1 }, { - "id" : "4F84858C-8C8F-4153-AC35-B84894B02938", + "id" : "FCDB3DA5-1688-40B0-811E-763E21AAB785", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -668,7 +668,7 @@ "type" : 2 }, { - "id" : "4F84858C-8C8F-4153-AC35-B84894B02938", + "id" : "FCDB3DA5-1688-40B0-811E-763E21AAB785", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelAndReceiveStatusWithExpectedOperationAndCategory.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelAndReceiveStatusWithExpectedOperationAndCategory.json index 0159a89d4..bd1106e25 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelAndReceiveStatusWithExpectedOperationAndCategory.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelAndReceiveStatusWithExpectedOperationAndCategory.json @@ -1,27 +1,27 @@ [ { - "id" : "A10DB94F-3AFA-4E23-AD7A-AC9F7BBAA32D", + "id" : "62C3A3E7-42B7-4DC9-8410-AAED7F717536", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "A10DB94F-3AFA-4E23-AD7A-AC9F7BBAA32D", + "id" : "62C3A3E7-42B7-4DC9-8410-AAED7F717536", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:23:47 GMT", + "Date" : "Wed, 26 Jun 2024 18:48:53 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "A10DB94F-3AFA-4E23-AD7A-AC9F7BBAA32D", + "id" : "62C3A3E7-42B7-4DC9-8410-AAED7F717536", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDI3MTM2OTI4NiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3NzMzMjk2OTQwMiJd" }, "type" : 2 }, { - "id" : "A10DB94F-3AFA-4E23-AD7A-AC9F7BBAA32D", + "id" : "62C3A3E7-42B7-4DC9-8410-AAED7F717536", "type" : 4 }, { - "id" : "2518C177-E6D0-4057-A9E7-D27D2C75C3A5", + "id" : "E19D6DDD-E8BD-4FE6-89FE-670E18874E9B", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "2518C177-E6D0-4057-A9E7-D27D2C75C3A5", + "id" : "E19D6DDD-E8BD-4FE6-89FE-670E18874E9B", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:23:47 GMT", + "Date" : "Wed, 26 Jun 2024 18:48:53 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "2518C177-E6D0-4057-A9E7-D27D2C75C3A5", + "id" : "E19D6DDD-E8BD-4FE6-89FE-670E18874E9B", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDI3NzM0MDY3OSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3NzMzOTA1ODQ1NyJd" }, "type" : 2 }, { - "id" : "2518C177-E6D0-4057-A9E7-D27D2C75C3A5", + "id" : "E19D6DDD-E8BD-4FE6-89FE-670E18874E9B", "type" : 4 }, { - "id" : "65CAD60C-AAFF-4F44-B671-71EC6999B686", + "id" : "1EF549B2-6678-4D7F-8653-E75DF85AEE55", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "65CAD60C-AAFF-4F44-B671-71EC6999B686", + "id" : "1EF549B2-6678-4D7F-8653-E75DF85AEE55", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:23:48 GMT", + "Date" : "Wed, 26 Jun 2024 18:48:54 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "65CAD60C-AAFF-4F44-B671-71EC6999B686", + "id" : "1EF549B2-6678-4D7F-8653-E75DF85AEE55", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDI4Mjg5MzY1OSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3NzM0NDk5NTA3NiJd" }, "type" : 2 }, { - "id" : "65CAD60C-AAFF-4F44-B671-71EC6999B686", + "id" : "1EF549B2-6678-4D7F-8653-E75DF85AEE55", "type" : 4 }, { - "id" : "A9A063BC-463E-4039-9744-2CD25E577447", + "id" : "CB085539-226B-4AAA-A08F-09E2E658A68F", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "A9A063BC-463E-4039-9744-2CD25E577447", + "id" : "CB085539-226B-4AAA-A08F-09E2E658A68F", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:23:48 GMT", + "Date" : "Wed, 26 Jun 2024 18:48:55 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,40 +192,40 @@ "type" : 1 }, { - "id" : "A9A063BC-463E-4039-9744-2CD25E577447", + "id" : "CB085539-226B-4AAA-A08F-09E2E658A68F", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDI4ODQzODA4MCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3NzM1MDk4OTQ4OSJd" }, "type" : 2 }, { - "id" : "A9A063BC-463E-4039-9744-2CD25E577447", + "id" : "CB085539-226B-4AAA-A08F-09E2E658A68F", "type" : 4 }, { - "id" : "EBA49A34-DD6A-4D28-98DB-DFA11988C860", + "id" : "1BE241C6-4B89-4BA7-AF5F-405BD5F7B0A4", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?meta=%7B%22time%22:1577918416%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918416%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "EBA49A34-DD6A-4D28-98DB-DFA11988C860", + "id" : "1BE241C6-4B89-4BA7-AF5F-405BD5F7B0A4", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -234,7 +234,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:23:49 GMT", + "Date" : "Wed, 26 Jun 2024 18:48:55 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -243,49 +243,49 @@ "type" : 1 }, { - "id" : "EBA49A34-DD6A-4D28-98DB-DFA11988C860", + "id" : "1BE241C6-4B89-4BA7-AF5F-405BD5F7B0A4", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDI5Mzk0NTc3MyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3NzM1Njk1ODQwNyJd" }, "type" : 2 }, { - "id" : "EBA49A34-DD6A-4D28-98DB-DFA11988C860", + "id" : "1BE241C6-4B89-4BA7-AF5F-405BD5F7B0A4", "type" : 4 }, { - "id" : "B0DA169B-E2C2-4B09-A5A4-B4BD3908201B", + "id" : "7B80137C-1C95-4D80-B1F6-1E670F67C4C9", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "B0DA169B-E2C2-4B09-A5A4-B4BD3908201B", + "id" : "7B80137C-1C95-4D80-B1F6-1E670F67C4C9", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:23:49 GMT", + "Date" : "Wed, 26 Jun 2024 18:48:56 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -294,40 +294,40 @@ "type" : 1 }, { - "id" : "B0DA169B-E2C2-4B09-A5A4-B4BD3908201B", + "id" : "7B80137C-1C95-4D80-B1F6-1E670F67C4C9", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDI5OTU2MDQ3NyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3NzM2MjkxNTEwNyJd" }, "type" : 2 }, { - "id" : "B0DA169B-E2C2-4B09-A5A4-B4BD3908201B", + "id" : "7B80137C-1C95-4D80-B1F6-1E670F67C4C9", "type" : 4 }, { - "id" : "FF69803E-F257-432F-8C83-DED15B958237", + "id" : "CB938F1C-59D5-4197-9F8C-E7A2A425FD57", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?meta=%7B%22time%22:1577918418%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918418%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "FF69803E-F257-432F-8C83-DED15B958237", + "id" : "CB938F1C-59D5-4197-9F8C-E7A2A425FD57", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -336,7 +336,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:23:50 GMT", + "Date" : "Wed, 26 Jun 2024 18:48:56 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -345,49 +345,49 @@ "type" : 1 }, { - "id" : "FF69803E-F257-432F-8C83-DED15B958237", + "id" : "CB938F1C-59D5-4197-9F8C-E7A2A425FD57", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDMwNTAzODQyOCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3NzM2ODk0NDgzOCJd" }, "type" : 2 }, { - "id" : "FF69803E-F257-432F-8C83-DED15B958237", + "id" : "CB938F1C-59D5-4197-9F8C-E7A2A425FD57", "type" : 4 }, { - "id" : "01D7F6F7-1F05-4487-85B7-937A1E1D725A", + "id" : "26DF1D88-B67C-4DBC-A331-55F6BCB34E5E", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "01D7F6F7-1F05-4487-85B7-937A1E1D725A", + "id" : "26DF1D88-B67C-4DBC-A331-55F6BCB34E5E", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:23:51 GMT", + "Date" : "Wed, 26 Jun 2024 18:48:57 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -396,40 +396,40 @@ "type" : 1 }, { - "id" : "01D7F6F7-1F05-4487-85B7-937A1E1D725A", + "id" : "26DF1D88-B67C-4DBC-A331-55F6BCB34E5E", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDMxMDYwOTExNiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3NzM3NDkxNjgyOCJd" }, "type" : 2 }, { - "id" : "01D7F6F7-1F05-4487-85B7-937A1E1D725A", + "id" : "26DF1D88-B67C-4DBC-A331-55F6BCB34E5E", "type" : 4 }, { - "id" : "695003DC-0BCE-4A7C-8DC2-18A7C605E49B", + "id" : "E8104FED-138F-4BC7-8A56-FAD5E206CD6F", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?meta=%7B%22time%22:1577918420%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918420%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "695003DC-0BCE-4A7C-8DC2-18A7C605E49B", + "id" : "E8104FED-138F-4BC7-8A56-FAD5E206CD6F", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -438,7 +438,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:23:51 GMT", + "Date" : "Wed, 26 Jun 2024 18:48:58 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -447,49 +447,49 @@ "type" : 1 }, { - "id" : "695003DC-0BCE-4A7C-8DC2-18A7C605E49B", + "id" : "E8104FED-138F-4BC7-8A56-FAD5E206CD6F", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDMxNjE0NjQyMyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3NzM4MDg2NDY3MSJd" }, "type" : 2 }, { - "id" : "695003DC-0BCE-4A7C-8DC2-18A7C605E49B", + "id" : "E8104FED-138F-4BC7-8A56-FAD5E206CD6F", "type" : 4 }, { - "id" : "80F30757-2A2B-476A-BC43-D18C8828F96B", + "id" : "9AADFFC1-EAE1-4E0B-9A58-415C4C05A4E0", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "80F30757-2A2B-476A-BC43-D18C8828F96B", + "id" : "9AADFFC1-EAE1-4E0B-9A58-415C4C05A4E0", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:23:52 GMT", + "Date" : "Wed, 26 Jun 2024 18:48:58 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -498,28 +498,28 @@ "type" : 1 }, { - "id" : "80F30757-2A2B-476A-BC43-D18C8828F96B", + "id" : "9AADFFC1-EAE1-4E0B-9A58-415C4C05A4E0", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDMyMTc2ODEyNCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3NzM4NjkxNjk0NSJd" }, "type" : 2 }, { - "id" : "80F30757-2A2B-476A-BC43-D18C8828F96B", + "id" : "9AADFFC1-EAE1-4E0B-9A58-415C4C05A4E0", "type" : 4 }, { - "id" : "6296F8FA-245F-416A-8DC6-CE61ADA56D16", + "id" : "EEF96031-E4A8-4F1B-B74B-77C0C39DDA21", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -531,7 +531,7 @@ "type" : 0 }, { - "id" : "6296F8FA-245F-416A-8DC6-CE61ADA56D16", + "id" : "EEF96031-E4A8-4F1B-B74B-77C0C39DDA21", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -539,10 +539,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:23:55 GMT", + "Date" : "Wed, 26 Jun 2024 18:49:02 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -552,7 +552,7 @@ "type" : 1 }, { - "id" : "6296F8FA-245F-416A-8DC6-CE61ADA56D16", + "id" : "EEF96031-E4A8-4F1B-B74B-77C0C39DDA21", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -560,43 +560,43 @@ "type" : 2 }, { - "id" : "6296F8FA-245F-416A-8DC6-CE61ADA56D16", + "id" : "EEF96031-E4A8-4F1B-B74B-77C0C39DDA21", "type" : 4 }, { - "id" : "B502D622-6EFD-47C7-B628-66BA813DCA0E", + "id" : "427BDD5D-7153-47F5-8C5A-FBCFBC24AA38", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "B502D622-6EFD-47C7-B628-66BA813DCA0E", + "id" : "427BDD5D-7153-47F5-8C5A-FBCFBC24AA38", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:23:55 GMT", + "Date" : "Wed, 26 Jun 2024 18:49:02 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "8", "Cache-Control" : "no-cache", @@ -606,7 +606,7 @@ "type" : 1 }, { - "id" : "B502D622-6EFD-47C7-B628-66BA813DCA0E", + "id" : "427BDD5D-7153-47F5-8C5A-FBCFBC24AA38", "data" : { "cls" : "NSData", "base64" : "W1tdLDAsMF0=" @@ -614,20 +614,20 @@ "type" : 2 }, { - "id" : "B502D622-6EFD-47C7-B628-66BA813DCA0E", + "id" : "427BDD5D-7153-47F5-8C5A-FBCFBC24AA38", "type" : 4 }, { - "id" : "DB36979F-7650-4E4E-9349-BEA89E5E1310", + "id" : "EE1F5B9F-DCDA-489F-A0FD-80CA50DC7D16", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -639,7 +639,7 @@ "type" : 0 }, { - "id" : "DB36979F-7650-4E4E-9349-BEA89E5E1310", + "id" : "EE1F5B9F-DCDA-489F-A0FD-80CA50DC7D16", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -647,10 +647,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:23:55 GMT", + "Date" : "Wed, 26 Jun 2024 18:49:02 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -660,7 +660,7 @@ "type" : 1 }, { - "id" : "DB36979F-7650-4E4E-9349-BEA89E5E1310", + "id" : "EE1F5B9F-DCDA-489F-A0FD-80CA50DC7D16", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -668,7 +668,7 @@ "type" : 2 }, { - "id" : "DB36979F-7650-4E4E-9349-BEA89E5E1310", + "id" : "EE1F5B9F-DCDA-489F-A0FD-80CA50DC7D16", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelExcludingSpecifiedStartAndIncludingEndTimetokenWhenStartAndEndIsSet.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelExcludingSpecifiedStartAndIncludingEndTimetokenWhenStartAndEndIsSet.json index 9d484d2da..bb0b8be39 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelExcludingSpecifiedStartAndIncludingEndTimetokenWhenStartAndEndIsSet.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelExcludingSpecifiedStartAndIncludingEndTimetokenWhenStartAndEndIsSet.json @@ -1,27 +1,27 @@ [ { - "id" : "F35FEDB7-645C-4ECF-BFEF-8132E59AFCF2", + "id" : "3713BF3B-AE18-4302-B05D-4C760AE364F5", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "F35FEDB7-645C-4ECF-BFEF-8132E59AFCF2", + "id" : "3713BF3B-AE18-4302-B05D-4C760AE364F5", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:23:59 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:51 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "F35FEDB7-645C-4ECF-BFEF-8132E59AFCF2", + "id" : "3713BF3B-AE18-4302-B05D-4C760AE364F5", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDM5NzI1MjU5MiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTcxNzA0MDc1NCJd" }, "type" : 2 }, { - "id" : "F35FEDB7-645C-4ECF-BFEF-8132E59AFCF2", + "id" : "3713BF3B-AE18-4302-B05D-4C760AE364F5", "type" : 4 }, { - "id" : "EAF2AE3F-4A87-4337-BADA-275DC73EA21D", + "id" : "9FD36532-8612-42E7-9E90-F4E858F52CF0", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "EAF2AE3F-4A87-4337-BADA-275DC73EA21D", + "id" : "9FD36532-8612-42E7-9E90-F4E858F52CF0", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:00 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:52 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "EAF2AE3F-4A87-4337-BADA-275DC73EA21D", + "id" : "9FD36532-8612-42E7-9E90-F4E858F52CF0", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDQwMzE3MzAyMiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTcyMzA4NzMyMiJd" }, "type" : 2 }, { - "id" : "EAF2AE3F-4A87-4337-BADA-275DC73EA21D", + "id" : "9FD36532-8612-42E7-9E90-F4E858F52CF0", "type" : 4 }, { - "id" : "6B9A6B1F-4805-4E5E-8511-1239A84A9C4C", + "id" : "74BCF968-3A75-4B3E-8A14-F98EEDEDDCDF", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "6B9A6B1F-4805-4E5E-8511-1239A84A9C4C", + "id" : "74BCF968-3A75-4B3E-8A14-F98EEDEDDCDF", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:00 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:52 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "6B9A6B1F-4805-4E5E-8511-1239A84A9C4C", + "id" : "74BCF968-3A75-4B3E-8A14-F98EEDEDDCDF", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDQwODY3OTg5OSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTcyOTA0NjYyMiJd" }, "type" : 2 }, { - "id" : "6B9A6B1F-4805-4E5E-8511-1239A84A9C4C", + "id" : "74BCF968-3A75-4B3E-8A14-F98EEDEDDCDF", "type" : 4 }, { - "id" : "D1210C34-7DC5-4E43-B123-D491488DF5C7", + "id" : "5BBA1B0D-EC85-4267-B5A7-3904DDA22D65", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "D1210C34-7DC5-4E43-B123-D491488DF5C7", + "id" : "5BBA1B0D-EC85-4267-B5A7-3904DDA22D65", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:01 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:53 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,40 +192,40 @@ "type" : 1 }, { - "id" : "D1210C34-7DC5-4E43-B123-D491488DF5C7", + "id" : "5BBA1B0D-EC85-4267-B5A7-3904DDA22D65", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDQxNDE5MTEyOCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTczNDk5NjM0NSJd" }, "type" : 2 }, { - "id" : "D1210C34-7DC5-4E43-B123-D491488DF5C7", + "id" : "5BBA1B0D-EC85-4267-B5A7-3904DDA22D65", "type" : 4 }, { - "id" : "925EB475-BD75-42F8-A347-5A18E3ED3C57", + "id" : "A752331C-7895-419E-A093-3D68F7F2E56C", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?meta=%7B%22time%22:1577918416%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918416%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "925EB475-BD75-42F8-A347-5A18E3ED3C57", + "id" : "A752331C-7895-419E-A093-3D68F7F2E56C", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -234,7 +234,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:01 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:54 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -243,49 +243,49 @@ "type" : 1 }, { - "id" : "925EB475-BD75-42F8-A347-5A18E3ED3C57", + "id" : "A752331C-7895-419E-A093-3D68F7F2E56C", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDQxOTcwNjg3NCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTc0MDkxMzU3NCJd" }, "type" : 2 }, { - "id" : "925EB475-BD75-42F8-A347-5A18E3ED3C57", + "id" : "A752331C-7895-419E-A093-3D68F7F2E56C", "type" : 4 }, { - "id" : "7A4D4E83-E6DD-4355-824A-6C9C2B1123D3", + "id" : "436EF764-EC85-453B-A133-804B56153B90", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "7A4D4E83-E6DD-4355-824A-6C9C2B1123D3", + "id" : "436EF764-EC85-453B-A133-804B56153B90", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:02 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:56 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -294,40 +294,40 @@ "type" : 1 }, { - "id" : "7A4D4E83-E6DD-4355-824A-6C9C2B1123D3", + "id" : "436EF764-EC85-453B-A133-804B56153B90", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDQyNTIwMDg0NiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTc2MTE4NzI3OSJd" }, "type" : 2 }, { - "id" : "7A4D4E83-E6DD-4355-824A-6C9C2B1123D3", + "id" : "436EF764-EC85-453B-A133-804B56153B90", "type" : 4 }, { - "id" : "CFC16EFC-840E-4FB3-A478-938AF7790002", + "id" : "9AF78C4F-8720-4D45-8037-5086F16C0C01", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?meta=%7B%22time%22:1577918418%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918418%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "CFC16EFC-840E-4FB3-A478-938AF7790002", + "id" : "9AF78C4F-8720-4D45-8037-5086F16C0C01", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -336,7 +336,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:03 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:56 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -345,49 +345,49 @@ "type" : 1 }, { - "id" : "CFC16EFC-840E-4FB3-A478-938AF7790002", + "id" : "9AF78C4F-8720-4D45-8037-5086F16C0C01", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDQzMDczNzc4MiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTc2NzA3Nzk2NyJd" }, "type" : 2 }, { - "id" : "CFC16EFC-840E-4FB3-A478-938AF7790002", + "id" : "9AF78C4F-8720-4D45-8037-5086F16C0C01", "type" : 4 }, { - "id" : "43C6CF8F-6C41-4523-856B-537FC0958366", + "id" : "D8DE8A2D-9DDB-41BC-AEF7-698031A44C78", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "43C6CF8F-6C41-4523-856B-537FC0958366", + "id" : "D8DE8A2D-9DDB-41BC-AEF7-698031A44C78", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:03 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:57 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -396,40 +396,40 @@ "type" : 1 }, { - "id" : "43C6CF8F-6C41-4523-856B-537FC0958366", + "id" : "D8DE8A2D-9DDB-41BC-AEF7-698031A44C78", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDQzNjIyOTk2NyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTc3MzAxODIwMyJd" }, "type" : 2 }, { - "id" : "43C6CF8F-6C41-4523-856B-537FC0958366", + "id" : "D8DE8A2D-9DDB-41BC-AEF7-698031A44C78", "type" : 4 }, { - "id" : "92026200-EEC9-41F1-8DF8-02161EC3E2CE", + "id" : "BFA5D675-2E71-403F-A8AD-5D7AC252993B", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?meta=%7B%22time%22:1577918420%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918420%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "92026200-EEC9-41F1-8DF8-02161EC3E2CE", + "id" : "BFA5D675-2E71-403F-A8AD-5D7AC252993B", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -438,7 +438,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:04 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:57 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -447,49 +447,49 @@ "type" : 1 }, { - "id" : "92026200-EEC9-41F1-8DF8-02161EC3E2CE", + "id" : "BFA5D675-2E71-403F-A8AD-5D7AC252993B", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDQ0MTc1OTU0MiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTc3ODkyNjU4NSJd" }, "type" : 2 }, { - "id" : "92026200-EEC9-41F1-8DF8-02161EC3E2CE", + "id" : "BFA5D675-2E71-403F-A8AD-5D7AC252993B", "type" : 4 }, { - "id" : "F5E2FDB3-E44B-4DEB-92C6-3D1375A55B36", + "id" : "60CCC97C-342E-4955-98BD-25274F509B65", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "F5E2FDB3-E44B-4DEB-92C6-3D1375A55B36", + "id" : "60CCC97C-342E-4955-98BD-25274F509B65", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:04 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:58 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -498,51 +498,51 @@ "type" : 1 }, { - "id" : "F5E2FDB3-E44B-4DEB-92C6-3D1375A55B36", + "id" : "60CCC97C-342E-4955-98BD-25274F509B65", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDQ0NzI5MjM5NSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTc4NDg4OTI5OCJd" }, "type" : 2 }, { - "id" : "F5E2FDB3-E44B-4DEB-92C6-3D1375A55B36", + "id" : "60CCC97C-342E-4955-98BD-25274F509B65", "type" : 4 }, { - "id" : "DD093D7F-649B-4AA6-946D-0511D8E74671", + "id" : "980778F3-8010-48F9-81F7-0E1FC6C59B41", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v3\/history\/sub-key\/demo\/channel\/test-channel?end=15970910441759542&start=15970910397252592&uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x" + "url" : "https:\/\/ps.pndsn.com\/v3\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&end=17194279778926585&pnsdk=PubNub-ObjC-iOS\/4.x.x&start=17194279717040754" }, "type" : 0 }, { - "id" : "DD093D7F-649B-4AA6-946D-0511D8E74671", + "id" : "980778F3-8010-48F9-81F7-0E1FC6C59B41", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v3\/history\/sub-key\/demo\/channel\/test-channel?end=15970910441759542&start=15970910397252592&uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x", + "url" : "https:\/\/ps.pndsn.com\/v3\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&end=17194279778926585&pnsdk=PubNub-ObjC-iOS\/4.x.x&start=17194279717040754", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:24:08 GMT", + "Date" : "Wed, 26 Jun 2024 18:53:02 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -552,7 +552,7 @@ "type" : 1 }, { - "id" : "DD093D7F-649B-4AA6-946D-0511D8E74671", + "id" : "980778F3-8010-48F9-81F7-0E1FC6C59B41", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -560,45 +560,45 @@ "type" : 2 }, { - "id" : "DD093D7F-649B-4AA6-946D-0511D8E74671", + "id" : "980778F3-8010-48F9-81F7-0E1FC6C59B41", "type" : 4 }, { - "id" : "C559C778-1975-42BF-86A8-FD7CCEAF3CDB", + "id" : "1D7D2435-FB3A-4DC6-93B6-07CB06D8C7B7", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "C559C778-1975-42BF-86A8-FD7CCEAF3CDB", + "id" : "1D7D2435-FB3A-4DC6-93B6-07CB06D8C7B7", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:24:08 GMT", + "Date" : "Wed, 26 Jun 2024 18:53:02 GMT", "Accept-Ranges" : "bytes", - "Content-Length" : "138", + "Content-Length" : "131", "Cache-Control" : "no-cache", "Connection" : "keep-alive" } @@ -606,28 +606,28 @@ "type" : 1 }, { - "id" : "C559C778-1975-42BF-86A8-FD7CCEAF3CDB", + "id" : "1D7D2435-FB3A-4DC6-93B6-07CB06D8C7B7", "data" : { "cls" : "NSData", - "base64" : "W1t7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMCIsICJ0aW1lIjogMTU3NzkxODQxMn0sIHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiA5IiwgInRpbWUiOiAxNTc3OTE4NDIxfV0sMTU5NzA5MTAzOTcyNTI1OTIsMTU5NzA5MTA0NDcyOTIzOTVd" + "base64" : "W1t7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiAwIiwidGltZSI6MTU3NzkxODQxMn0seyJtZXNzYWdlSWR4IjoibWVzc2FnZTogOSIsInRpbWUiOjE1Nzc5MTg0MjF9XSwxNzE5NDI3OTcxNzA0MDc1NCwxNzE5NDI3OTc4NDg4OTI5OF0=" }, "type" : 2 }, { - "id" : "C559C778-1975-42BF-86A8-FD7CCEAF3CDB", + "id" : "1D7D2435-FB3A-4DC6-93B6-07CB06D8C7B7", "type" : 4 }, { - "id" : "1444D6EA-029F-406F-A582-CBC6E166C22B", + "id" : "0C5A405F-4615-4244-96CC-255BAA7022CA", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -639,7 +639,7 @@ "type" : 0 }, { - "id" : "1444D6EA-029F-406F-A582-CBC6E166C22B", + "id" : "0C5A405F-4615-4244-96CC-255BAA7022CA", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -647,10 +647,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:24:09 GMT", + "Date" : "Wed, 26 Jun 2024 18:53:02 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -660,7 +660,7 @@ "type" : 1 }, { - "id" : "1444D6EA-029F-406F-A582-CBC6E166C22B", + "id" : "0C5A405F-4615-4244-96CC-255BAA7022CA", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -668,7 +668,7 @@ "type" : 2 }, { - "id" : "1444D6EA-029F-406F-A582-CBC6E166C22B", + "id" : "0C5A405F-4615-4244-96CC-255BAA7022CA", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelExcludingSpecifiedTimetokenAndOlderWhenStartIsSet.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelExcludingSpecifiedTimetokenAndOlderWhenStartIsSet.json index 9d88a70c8..48aa78142 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelExcludingSpecifiedTimetokenAndOlderWhenStartIsSet.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelExcludingSpecifiedTimetokenAndOlderWhenStartIsSet.json @@ -1,27 +1,27 @@ [ { - "id" : "5D525DF1-D227-449E-BAC4-4702F3D70588", + "id" : "3EC68030-A582-4750-84AA-15DB8E1EFA9A", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "5D525DF1-D227-449E-BAC4-4702F3D70588", + "id" : "3EC68030-A582-4750-84AA-15DB8E1EFA9A", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:12 GMT", + "Date" : "Wed, 26 Jun 2024 18:51:36 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "5D525DF1-D227-449E-BAC4-4702F3D70588", + "id" : "3EC68030-A582-4750-84AA-15DB8E1EFA9A", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDUyOTEyMzU4NSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODk2MjQ3ODA2MyJd" }, "type" : 2 }, { - "id" : "5D525DF1-D227-449E-BAC4-4702F3D70588", + "id" : "3EC68030-A582-4750-84AA-15DB8E1EFA9A", "type" : 4 }, { - "id" : "44544A5F-C3D8-4668-850D-E3AC9AB9AE53", + "id" : "4B1CEF95-0290-4E33-967A-9A20E84463A1", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "44544A5F-C3D8-4668-850D-E3AC9AB9AE53", + "id" : "4B1CEF95-0290-4E33-967A-9A20E84463A1", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:13 GMT", + "Date" : "Wed, 26 Jun 2024 18:51:36 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "44544A5F-C3D8-4668-850D-E3AC9AB9AE53", + "id" : "4B1CEF95-0290-4E33-967A-9A20E84463A1", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDUzNDg2ODY2OCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODk2ODUwODE5MSJd" }, "type" : 2 }, { - "id" : "44544A5F-C3D8-4668-850D-E3AC9AB9AE53", + "id" : "4B1CEF95-0290-4E33-967A-9A20E84463A1", "type" : 4 }, { - "id" : "9FAA34E8-2BD1-4B8F-8ABD-77953C012334", + "id" : "917999CB-A09D-4D72-BEE8-5E68F185C9B4", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "9FAA34E8-2BD1-4B8F-8ABD-77953C012334", + "id" : "917999CB-A09D-4D72-BEE8-5E68F185C9B4", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:14 GMT", + "Date" : "Wed, 26 Jun 2024 18:51:37 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "9FAA34E8-2BD1-4B8F-8ABD-77953C012334", + "id" : "917999CB-A09D-4D72-BEE8-5E68F185C9B4", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDU0MDQzMjc0OSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODk3NDUyNzM5MyJd" }, "type" : 2 }, { - "id" : "9FAA34E8-2BD1-4B8F-8ABD-77953C012334", + "id" : "917999CB-A09D-4D72-BEE8-5E68F185C9B4", "type" : 4 }, { - "id" : "5D72A345-8A5A-4992-AA89-686A106A369D", + "id" : "603C0094-ED86-404E-A5BC-B5DC6CA73568", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "5D72A345-8A5A-4992-AA89-686A106A369D", + "id" : "603C0094-ED86-404E-A5BC-B5DC6CA73568", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:14 GMT", + "Date" : "Wed, 26 Jun 2024 18:51:38 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,40 +192,40 @@ "type" : 1 }, { - "id" : "5D72A345-8A5A-4992-AA89-686A106A369D", + "id" : "603C0094-ED86-404E-A5BC-B5DC6CA73568", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDU0NTg2NjIzMyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODk4MDU0NjI5MyJd" }, "type" : 2 }, { - "id" : "5D72A345-8A5A-4992-AA89-686A106A369D", + "id" : "603C0094-ED86-404E-A5BC-B5DC6CA73568", "type" : 4 }, { - "id" : "A7B6A850-2F6F-49E7-A5D6-FEFC5EFD1CC7", + "id" : "5231F326-B018-4CA5-9F6F-582D89B26523", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?meta=%7B%22time%22:1577918416%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918416%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "A7B6A850-2F6F-49E7-A5D6-FEFC5EFD1CC7", + "id" : "5231F326-B018-4CA5-9F6F-582D89B26523", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -234,7 +234,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:15 GMT", + "Date" : "Wed, 26 Jun 2024 18:51:38 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -243,49 +243,49 @@ "type" : 1 }, { - "id" : "A7B6A850-2F6F-49E7-A5D6-FEFC5EFD1CC7", + "id" : "5231F326-B018-4CA5-9F6F-582D89B26523", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDU1MTM5MDQzMSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODk4NjQ5ODQwMyJd" }, "type" : 2 }, { - "id" : "A7B6A850-2F6F-49E7-A5D6-FEFC5EFD1CC7", + "id" : "5231F326-B018-4CA5-9F6F-582D89B26523", "type" : 4 }, { - "id" : "70B04D82-8CE0-43FE-8802-189726AB104C", + "id" : "1E585E9C-3810-4C9F-88FA-CD6AA2B1440C", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "70B04D82-8CE0-43FE-8802-189726AB104C", + "id" : "1E585E9C-3810-4C9F-88FA-CD6AA2B1440C", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:15 GMT", + "Date" : "Wed, 26 Jun 2024 18:51:39 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -294,40 +294,40 @@ "type" : 1 }, { - "id" : "70B04D82-8CE0-43FE-8802-189726AB104C", + "id" : "1E585E9C-3810-4C9F-88FA-CD6AA2B1440C", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDU1NjkyNjkwNCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODk5MjUwNzA0NyJd" }, "type" : 2 }, { - "id" : "70B04D82-8CE0-43FE-8802-189726AB104C", + "id" : "1E585E9C-3810-4C9F-88FA-CD6AA2B1440C", "type" : 4 }, { - "id" : "8EE262AE-8FD8-489C-8D4C-0555B5874EE5", + "id" : "D74A4B70-6780-4569-8612-49D1C4C120B6", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?meta=%7B%22time%22:1577918418%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918418%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "8EE262AE-8FD8-489C-8D4C-0555B5874EE5", + "id" : "D74A4B70-6780-4569-8612-49D1C4C120B6", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -336,7 +336,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:16 GMT", + "Date" : "Wed, 26 Jun 2024 18:51:39 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -345,49 +345,49 @@ "type" : 1 }, { - "id" : "8EE262AE-8FD8-489C-8D4C-0555B5874EE5", + "id" : "D74A4B70-6780-4569-8612-49D1C4C120B6", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDU2MjQ1MzY5MyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3ODk5ODUxNjM1MSJd" }, "type" : 2 }, { - "id" : "8EE262AE-8FD8-489C-8D4C-0555B5874EE5", + "id" : "D74A4B70-6780-4569-8612-49D1C4C120B6", "type" : 4 }, { - "id" : "36956BA2-9DEE-4404-B855-0DCE22E6F02C", + "id" : "13F041E4-98E8-421D-9B97-21E8843D56F2", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "36956BA2-9DEE-4404-B855-0DCE22E6F02C", + "id" : "13F041E4-98E8-421D-9B97-21E8843D56F2", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:16 GMT", + "Date" : "Wed, 26 Jun 2024 18:51:40 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -396,40 +396,40 @@ "type" : 1 }, { - "id" : "36956BA2-9DEE-4404-B855-0DCE22E6F02C", + "id" : "13F041E4-98E8-421D-9B97-21E8843D56F2", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDU2Nzk5Mzk3MSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTAwNDQ5NjI1NiJd" }, "type" : 2 }, { - "id" : "36956BA2-9DEE-4404-B855-0DCE22E6F02C", + "id" : "13F041E4-98E8-421D-9B97-21E8843D56F2", "type" : 4 }, { - "id" : "0CC48C97-9D3C-4439-95AF-4FFC618F0749", + "id" : "3400FCC1-3BB9-4D30-A267-60DBB55F2F50", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?meta=%7B%22time%22:1577918420%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918420%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "0CC48C97-9D3C-4439-95AF-4FFC618F0749", + "id" : "3400FCC1-3BB9-4D30-A267-60DBB55F2F50", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -438,7 +438,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:17 GMT", + "Date" : "Wed, 26 Jun 2024 18:51:41 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -447,49 +447,49 @@ "type" : 1 }, { - "id" : "0CC48C97-9D3C-4439-95AF-4FFC618F0749", + "id" : "3400FCC1-3BB9-4D30-A267-60DBB55F2F50", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDU3MzUzNTk1OCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTAxMDQ0OTMzMCJd" }, "type" : 2 }, { - "id" : "0CC48C97-9D3C-4439-95AF-4FFC618F0749", + "id" : "3400FCC1-3BB9-4D30-A267-60DBB55F2F50", "type" : 4 }, { - "id" : "3C887D2E-36B2-4B74-8CE7-49E390E7F27C", + "id" : "0CDBFE8E-2313-4355-82DC-991008735964", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "3C887D2E-36B2-4B74-8CE7-49E390E7F27C", + "id" : "0CDBFE8E-2313-4355-82DC-991008735964", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:17 GMT", + "Date" : "Wed, 26 Jun 2024 18:51:43 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -498,51 +498,51 @@ "type" : 1 }, { - "id" : "3C887D2E-36B2-4B74-8CE7-49E390E7F27C", + "id" : "0CDBFE8E-2313-4355-82DC-991008735964", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDU3OTA2NjY3OSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTAzNTg1NTg2NSJd" }, "type" : 2 }, { - "id" : "3C887D2E-36B2-4B74-8CE7-49E390E7F27C", + "id" : "0CDBFE8E-2313-4355-82DC-991008735964", "type" : 4 }, { - "id" : "3D578DA6-5E16-457B-B246-7632A7DDB25C", + "id" : "41B48A67-DC61-490D-953D-370C45927D1D", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v3\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&start=15970910556926904&pnsdk=PubNub-ObjC-iOS\/4.x.x" + "url" : "https:\/\/ps.pndsn.com\/v3\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&start=17194278992507047" }, "type" : 0 }, { - "id" : "3D578DA6-5E16-457B-B246-7632A7DDB25C", + "id" : "41B48A67-DC61-490D-953D-370C45927D1D", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v3\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&start=15970910556926904&pnsdk=PubNub-ObjC-iOS\/4.x.x", + "url" : "https:\/\/ps.pndsn.com\/v3\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&start=17194278992507047", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:24:21 GMT", + "Date" : "Wed, 26 Jun 2024 18:51:47 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -552,7 +552,7 @@ "type" : 1 }, { - "id" : "3D578DA6-5E16-457B-B246-7632A7DDB25C", + "id" : "41B48A67-DC61-490D-953D-370C45927D1D", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -560,74 +560,74 @@ "type" : 2 }, { - "id" : "3D578DA6-5E16-457B-B246-7632A7DDB25C", + "id" : "41B48A67-DC61-490D-953D-370C45927D1D", "type" : 4 }, { - "id" : "C8F4F9F1-FB98-47C2-97C5-516D50516D42", + "id" : "F47D70CD-76F8-414F-88A6-4EB96DAD385B", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "C8F4F9F1-FB98-47C2-97C5-516D50516D42", + "id" : "F47D70CD-76F8-414F-88A6-4EB96DAD385B", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", - "Access-Control-Allow-Origin" : "*", + "Server" : "Pubnub Storage", + "Connection" : "keep-alive", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:24:21 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "288", + "Transfer-Encoding" : "Identity", + "Date" : "Wed, 26 Jun 2024 18:51:47 GMT", + "Content-Encoding" : "gzip", "Cache-Control" : "no-cache", - "Connection" : "keep-alive" + "Access-Control-Allow-Origin" : "*" } }, "type" : 1 }, { - "id" : "C8F4F9F1-FB98-47C2-97C5-516D50516D42", + "id" : "F47D70CD-76F8-414F-88A6-4EB96DAD385B", "data" : { "cls" : "NSData", - "base64" : "W1t7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogNSIsICJ0aW1lIjogMTU3NzkxODQxN30sIHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiA2IiwgInRpbWUiOiAxNTc3OTE4NDE4fSwgeyJtZXNzYWdlSWR4IjogIm1lc3NhZ2U6IDciLCAidGltZSI6IDE1Nzc5MTg0MTl9LCB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogOCIsICJ0aW1lIjogMTU3NzkxODQyMH0sIHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiA5IiwgInRpbWUiOiAxNTc3OTE4NDIxfV0sMTU5NzA5MTA1NTY5MjY5MDQsMTU5NzA5MTA1NzkwNjY2Nzld" + "base64" : "W1t7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiA1IiwidGltZSI6MTU3NzkxODQxN30seyJtZXNzYWdlSWR4IjoibWVzc2FnZTogNiIsInRpbWUiOjE1Nzc5MTg0MTh9LHsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDciLCJ0aW1lIjoxNTc3OTE4NDE5fSx7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiA4IiwidGltZSI6MTU3NzkxODQyMH0seyJtZXNzYWdlSWR4IjoibWVzc2FnZTogOSIsInRpbWUiOjE1Nzc5MTg0MjF9XSwxNzE5NDI3ODk5MjUwNzA0NywxNzE5NDI3OTAzNTg1NTg2NV0=" }, "type" : 2 }, { - "id" : "C8F4F9F1-FB98-47C2-97C5-516D50516D42", + "id" : "F47D70CD-76F8-414F-88A6-4EB96DAD385B", "type" : 4 }, { - "id" : "602AD283-367A-4B79-8AFC-EF914AAB9810", + "id" : "D841F8E8-FBF6-44CD-B9F6-97D60CFEC0E6", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -639,7 +639,7 @@ "type" : 0 }, { - "id" : "602AD283-367A-4B79-8AFC-EF914AAB9810", + "id" : "D841F8E8-FBF6-44CD-B9F6-97D60CFEC0E6", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -647,10 +647,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:24:21 GMT", + "Date" : "Wed, 26 Jun 2024 18:51:47 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -660,7 +660,7 @@ "type" : 1 }, { - "id" : "602AD283-367A-4B79-8AFC-EF914AAB9810", + "id" : "D841F8E8-FBF6-44CD-B9F6-97D60CFEC0E6", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -668,7 +668,7 @@ "type" : 2 }, { - "id" : "602AD283-367A-4B79-8AFC-EF914AAB9810", + "id" : "D841F8E8-FBF6-44CD-B9F6-97D60CFEC0E6", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelIncludingSpecifiedTimetokenAndNewerWhenEndIsSet.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelIncludingSpecifiedTimetokenAndNewerWhenEndIsSet.json index a2620bf79..a2441ebac 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelIncludingSpecifiedTimetokenAndNewerWhenEndIsSet.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelIncludingSpecifiedTimetokenAndNewerWhenEndIsSet.json @@ -1,27 +1,27 @@ [ { - "id" : "F679280E-BA8C-4E6E-977E-E9137C7460E0", + "id" : "855DF48F-9C55-4529-98B4-0A72206068A6", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "F679280E-BA8C-4E6E-977E-E9137C7460E0", + "id" : "855DF48F-9C55-4529-98B4-0A72206068A6", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:25 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:25 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "F679280E-BA8C-4E6E-977E-E9137C7460E0", + "id" : "855DF48F-9C55-4529-98B4-0A72206068A6", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDY1NDUyNjA1NCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTQ1MjQ5NDU4MCJd" }, "type" : 2 }, { - "id" : "F679280E-BA8C-4E6E-977E-E9137C7460E0", + "id" : "855DF48F-9C55-4529-98B4-0A72206068A6", "type" : 4 }, { - "id" : "529E363D-C2EE-4FF3-90FE-2DBCA8432A1A", + "id" : "D1A2EB60-BD74-43F9-8690-B13F87752F51", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "529E363D-C2EE-4FF3-90FE-2DBCA8432A1A", + "id" : "D1A2EB60-BD74-43F9-8690-B13F87752F51", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:26 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:26 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "529E363D-C2EE-4FF3-90FE-2DBCA8432A1A", + "id" : "D1A2EB60-BD74-43F9-8690-B13F87752F51", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDY2MDA5MTk0MiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTQ2ODgzMDMwMCJd" }, "type" : 2 }, { - "id" : "529E363D-C2EE-4FF3-90FE-2DBCA8432A1A", + "id" : "D1A2EB60-BD74-43F9-8690-B13F87752F51", "type" : 4 }, { - "id" : "1F241B62-983B-40EF-9529-B273F9E78614", + "id" : "A84DEA16-E7F0-4CB8-940D-A63869212045", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "1F241B62-983B-40EF-9529-B273F9E78614", + "id" : "A84DEA16-E7F0-4CB8-940D-A63869212045", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:26 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:27 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "1F241B62-983B-40EF-9529-B273F9E78614", + "id" : "A84DEA16-E7F0-4CB8-940D-A63869212045", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDY2NTcyNjk0OSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTQ3NDg1NDQwMyJd" }, "type" : 2 }, { - "id" : "1F241B62-983B-40EF-9529-B273F9E78614", + "id" : "A84DEA16-E7F0-4CB8-940D-A63869212045", "type" : 4 }, { - "id" : "157E8066-2F14-4277-AF20-358D226C9A69", + "id" : "D457CB98-737B-476B-B96E-31A2BC700C97", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "157E8066-2F14-4277-AF20-358D226C9A69", + "id" : "D457CB98-737B-476B-B96E-31A2BC700C97", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:27 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:28 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,40 +192,40 @@ "type" : 1 }, { - "id" : "157E8066-2F14-4277-AF20-358D226C9A69", + "id" : "D457CB98-737B-476B-B96E-31A2BC700C97", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDY3MTI5MzQ2MiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTQ4MDgzNDM4NiJd" }, "type" : 2 }, { - "id" : "157E8066-2F14-4277-AF20-358D226C9A69", + "id" : "D457CB98-737B-476B-B96E-31A2BC700C97", "type" : 4 }, { - "id" : "D09879E9-960E-42ED-8B6D-91E1212C1CBD", + "id" : "C8C63337-9E0F-4679-8799-E60BAEC8CA86", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?meta=%7B%22time%22:1577918416%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918416%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "D09879E9-960E-42ED-8B6D-91E1212C1CBD", + "id" : "C8C63337-9E0F-4679-8799-E60BAEC8CA86", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -234,7 +234,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:27 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:28 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -243,49 +243,49 @@ "type" : 1 }, { - "id" : "D09879E9-960E-42ED-8B6D-91E1212C1CBD", + "id" : "C8C63337-9E0F-4679-8799-E60BAEC8CA86", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDY3Njk1NTM3NiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTQ4NjkxMjc3OSJd" }, "type" : 2 }, { - "id" : "D09879E9-960E-42ED-8B6D-91E1212C1CBD", + "id" : "C8C63337-9E0F-4679-8799-E60BAEC8CA86", "type" : 4 }, { - "id" : "4058B71E-D6D8-422E-BE42-03B8AC00D3E8", + "id" : "8EF9AA59-1B6B-407B-A30D-C730B2DB50C9", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "4058B71E-D6D8-422E-BE42-03B8AC00D3E8", + "id" : "8EF9AA59-1B6B-407B-A30D-C730B2DB50C9", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:28 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:29 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -294,40 +294,40 @@ "type" : 1 }, { - "id" : "4058B71E-D6D8-422E-BE42-03B8AC00D3E8", + "id" : "8EF9AA59-1B6B-407B-A30D-C730B2DB50C9", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDY4MjU1OTA0MSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTQ5MjkxMjQ2MSJd" }, "type" : 2 }, { - "id" : "4058B71E-D6D8-422E-BE42-03B8AC00D3E8", + "id" : "8EF9AA59-1B6B-407B-A30D-C730B2DB50C9", "type" : 4 }, { - "id" : "C27A9127-7CAC-475E-95E8-B0D043851D76", + "id" : "356B0FE5-8B76-4AA2-8B90-B04C6A755A6D", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?meta=%7B%22time%22:1577918418%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918418%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "C27A9127-7CAC-475E-95E8-B0D043851D76", + "id" : "356B0FE5-8B76-4AA2-8B90-B04C6A755A6D", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -336,7 +336,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:28 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:29 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -345,49 +345,49 @@ "type" : 1 }, { - "id" : "C27A9127-7CAC-475E-95E8-B0D043851D76", + "id" : "356B0FE5-8B76-4AA2-8B90-B04C6A755A6D", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDY4ODE3NTc0MCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTQ5ODk2MzUxMiJd" }, "type" : 2 }, { - "id" : "C27A9127-7CAC-475E-95E8-B0D043851D76", + "id" : "356B0FE5-8B76-4AA2-8B90-B04C6A755A6D", "type" : 4 }, { - "id" : "4709964D-DBC7-4814-8B1D-F8F3F1C83555", + "id" : "91663100-3C15-4F0E-BA55-054C4BB2BBC4", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "4709964D-DBC7-4814-8B1D-F8F3F1C83555", + "id" : "91663100-3C15-4F0E-BA55-054C4BB2BBC4", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:29 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:30 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -396,40 +396,40 @@ "type" : 1 }, { - "id" : "4709964D-DBC7-4814-8B1D-F8F3F1C83555", + "id" : "91663100-3C15-4F0E-BA55-054C4BB2BBC4", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDY5MzgzNjg5NCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTUwNTI3NDQ0MSJd" }, "type" : 2 }, { - "id" : "4709964D-DBC7-4814-8B1D-F8F3F1C83555", + "id" : "91663100-3C15-4F0E-BA55-054C4BB2BBC4", "type" : 4 }, { - "id" : "BFF1EC18-4E40-4CB6-9678-5C65D9F59DE0", + "id" : "F35B29C2-8480-466C-A6AD-E0A4B5BB3D27", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?meta=%7B%22time%22:1577918420%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918420%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "BFF1EC18-4E40-4CB6-9678-5C65D9F59DE0", + "id" : "F35B29C2-8480-466C-A6AD-E0A4B5BB3D27", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -438,7 +438,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:29 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:31 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -447,49 +447,49 @@ "type" : 1 }, { - "id" : "BFF1EC18-4E40-4CB6-9678-5C65D9F59DE0", + "id" : "F35B29C2-8480-466C-A6AD-E0A4B5BB3D27", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDY5OTM3MzgxNiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTUxMjc1Mjk5OSJd" }, "type" : 2 }, { - "id" : "BFF1EC18-4E40-4CB6-9678-5C65D9F59DE0", + "id" : "F35B29C2-8480-466C-A6AD-E0A4B5BB3D27", "type" : 4 }, { - "id" : "517C9BA5-8F43-42F0-9388-4D8D58247156", + "id" : "448CB354-8621-4BD1-887B-98D0BC45E3E6", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "517C9BA5-8F43-42F0-9388-4D8D58247156", + "id" : "448CB354-8621-4BD1-887B-98D0BC45E3E6", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:30 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:31 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -498,51 +498,51 @@ "type" : 1 }, { - "id" : "517C9BA5-8F43-42F0-9388-4D8D58247156", + "id" : "448CB354-8621-4BD1-887B-98D0BC45E3E6", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDcwNDk0ODg5MCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI3OTUxODc2MzQ3NCJd" }, "type" : 2 }, { - "id" : "517C9BA5-8F43-42F0-9388-4D8D58247156", + "id" : "448CB354-8621-4BD1-887B-98D0BC45E3E6", "type" : 4 }, { - "id" : "46DA5C4D-5154-49C9-92BA-8E5CA3AF1FDD", + "id" : "AF408A28-2BC9-4B2C-8FCA-FAC13B3CC795", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v3\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&end=15970910682559041&pnsdk=PubNub-ObjC-iOS\/4.x.x" + "url" : "https:\/\/ps.pndsn.com\/v3\/history\/sub-key\/demo\/channel\/test-channel?pnsdk=PubNub-ObjC-iOS\/4.x.x&end=17194279492912461&uuid=Serhii" }, "type" : 0 }, { - "id" : "46DA5C4D-5154-49C9-92BA-8E5CA3AF1FDD", + "id" : "AF408A28-2BC9-4B2C-8FCA-FAC13B3CC795", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v3\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&end=15970910682559041&pnsdk=PubNub-ObjC-iOS\/4.x.x", + "url" : "https:\/\/ps.pndsn.com\/v3\/history\/sub-key\/demo\/channel\/test-channel?pnsdk=PubNub-ObjC-iOS\/4.x.x&end=17194279492912461&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:24:34 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:35 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -552,7 +552,7 @@ "type" : 1 }, { - "id" : "46DA5C4D-5154-49C9-92BA-8E5CA3AF1FDD", + "id" : "AF408A28-2BC9-4B2C-8FCA-FAC13B3CC795", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -560,74 +560,74 @@ "type" : 2 }, { - "id" : "46DA5C4D-5154-49C9-92BA-8E5CA3AF1FDD", + "id" : "AF408A28-2BC9-4B2C-8FCA-FAC13B3CC795", "type" : 4 }, { - "id" : "96BD2D12-DFA5-4000-98E2-0A5FC6653161", + "id" : "6B91EE59-098C-44C2-A6EF-9D147B7931DD", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "96BD2D12-DFA5-4000-98E2-0A5FC6653161", + "id" : "6B91EE59-098C-44C2-A6EF-9D147B7931DD", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", - "Access-Control-Allow-Origin" : "*", + "Server" : "Pubnub Storage", + "Connection" : "keep-alive", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:24:34 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "288", + "Transfer-Encoding" : "Identity", + "Date" : "Wed, 26 Jun 2024 18:52:35 GMT", + "Content-Encoding" : "gzip", "Cache-Control" : "no-cache", - "Connection" : "keep-alive" + "Access-Control-Allow-Origin" : "*" } }, "type" : 1 }, { - "id" : "96BD2D12-DFA5-4000-98E2-0A5FC6653161", + "id" : "6B91EE59-098C-44C2-A6EF-9D147B7931DD", "data" : { "cls" : "NSData", - "base64" : "W1t7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMCIsICJ0aW1lIjogMTU3NzkxODQxMn0sIHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiAxIiwgInRpbWUiOiAxNTc3OTE4NDEzfSwgeyJtZXNzYWdlSWR4IjogIm1lc3NhZ2U6IDIiLCAidGltZSI6IDE1Nzc5MTg0MTR9LCB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMyIsICJ0aW1lIjogMTU3NzkxODQxNX0sIHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiA0IiwgInRpbWUiOiAxNTc3OTE4NDE2fV0sMTU5NzA5MTA2NTQ1MjYwNTQsMTU5NzA5MTA2NzY5NTUzNzZd" + "base64" : "W1t7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiAwIiwidGltZSI6MTU3NzkxODQxMn0seyJtZXNzYWdlSWR4IjoibWVzc2FnZTogMSIsInRpbWUiOjE1Nzc5MTg0MTN9LHsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDIiLCJ0aW1lIjoxNTc3OTE4NDE0fSx7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiAzIiwidGltZSI6MTU3NzkxODQxNX0seyJtZXNzYWdlSWR4IjoibWVzc2FnZTogNCIsInRpbWUiOjE1Nzc5MTg0MTZ9XSwxNzE5NDI3OTQ1MjQ5NDU4MCwxNzE5NDI3OTQ4NjkxMjc3OV0=" }, "type" : 2 }, { - "id" : "96BD2D12-DFA5-4000-98E2-0A5FC6653161", + "id" : "6B91EE59-098C-44C2-A6EF-9D147B7931DD", "type" : 4 }, { - "id" : "4210B9BD-7165-46BA-AB90-193533611568", + "id" : "4347C3A4-3E69-4ECF-96CD-4744AE6123B9", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -639,7 +639,7 @@ "type" : 0 }, { - "id" : "4210B9BD-7165-46BA-AB90-193533611568", + "id" : "4347C3A4-3E69-4ECF-96CD-4744AE6123B9", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -647,10 +647,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:24:34 GMT", + "Date" : "Wed, 26 Jun 2024 18:52:35 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -660,7 +660,7 @@ "type" : 1 }, { - "id" : "4210B9BD-7165-46BA-AB90-193533611568", + "id" : "4347C3A4-3E69-4ECF-96CD-4744AE6123B9", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -668,7 +668,7 @@ "type" : 2 }, { - "id" : "4210B9BD-7165-46BA-AB90-193533611568", + "id" : "4347C3A4-3E69-4ECF-96CD-4744AE6123B9", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelUsingBuilderPatternInterface.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelUsingBuilderPatternInterface.json index 8e1c3dc46..f3201f9d4 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelUsingBuilderPatternInterface.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldDeleteMessagesForChannelUsingBuilderPatternInterface.json @@ -1,27 +1,27 @@ [ { - "id" : "EF8F472F-3F3D-4324-868E-5AC5593F361F", + "id" : "A1CBD4AE-8F9B-4789-A246-C26197D38306", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "EF8F472F-3F3D-4324-868E-5AC5593F361F", + "id" : "A1CBD4AE-8F9B-4789-A246-C26197D38306", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:38 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:35 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "EF8F472F-3F3D-4324-868E-5AC5593F361F", + "id" : "A1CBD4AE-8F9B-4789-A246-C26197D38306", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDc4MDQ5MjU1OSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDc1MjUyNzYzMyJd" }, "type" : 2 }, { - "id" : "EF8F472F-3F3D-4324-868E-5AC5593F361F", + "id" : "A1CBD4AE-8F9B-4789-A246-C26197D38306", "type" : 4 }, { - "id" : "AAEC5BAA-C5A9-453C-ACCE-59A515E4DC70", + "id" : "2D6E700C-7F26-483D-82FB-4E211EC96CCE", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "AAEC5BAA-C5A9-453C-ACCE-59A515E4DC70", + "id" : "2D6E700C-7F26-483D-82FB-4E211EC96CCE", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:38 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:35 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "AAEC5BAA-C5A9-453C-ACCE-59A515E4DC70", + "id" : "2D6E700C-7F26-483D-82FB-4E211EC96CCE", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDc4NjM2ODYwNSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDc1ODU1NjIxMyJd" }, "type" : 2 }, { - "id" : "AAEC5BAA-C5A9-453C-ACCE-59A515E4DC70", + "id" : "2D6E700C-7F26-483D-82FB-4E211EC96CCE", "type" : 4 }, { - "id" : "A1AA7EC1-75BC-403D-9CD0-DCD6CBC3CC30", + "id" : "235571E7-F193-4B61-B7D4-3E90E844044E", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "A1AA7EC1-75BC-403D-9CD0-DCD6CBC3CC30", + "id" : "235571E7-F193-4B61-B7D4-3E90E844044E", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:39 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:36 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "A1AA7EC1-75BC-403D-9CD0-DCD6CBC3CC30", + "id" : "235571E7-F193-4B61-B7D4-3E90E844044E", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDc5MTkyNzI5MiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDc2NDQ5NzU2NCJd" }, "type" : 2 }, { - "id" : "A1AA7EC1-75BC-403D-9CD0-DCD6CBC3CC30", + "id" : "235571E7-F193-4B61-B7D4-3E90E844044E", "type" : 4 }, { - "id" : "E00BEF4C-3B85-4447-94EE-4A3D02F08869", + "id" : "D041E90A-DD5B-4597-B7CF-B76E395BB82C", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "E00BEF4C-3B85-4447-94EE-4A3D02F08869", + "id" : "D041E90A-DD5B-4597-B7CF-B76E395BB82C", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:39 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:37 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,40 +192,40 @@ "type" : 1 }, { - "id" : "E00BEF4C-3B85-4447-94EE-4A3D02F08869", + "id" : "D041E90A-DD5B-4597-B7CF-B76E395BB82C", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDc5NzM5NzU4OCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDc3MDQ1NTU2MCJd" }, "type" : 2 }, { - "id" : "E00BEF4C-3B85-4447-94EE-4A3D02F08869", + "id" : "D041E90A-DD5B-4597-B7CF-B76E395BB82C", "type" : 4 }, { - "id" : "0AAE02AC-C336-47A4-AB96-FCB469B2C1D7", + "id" : "AF3E6712-A70C-45F8-9F44-78AE6BDB44AB", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?meta=%7B%22time%22:1577918416%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918416%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "0AAE02AC-C336-47A4-AB96-FCB469B2C1D7", + "id" : "AF3E6712-A70C-45F8-9F44-78AE6BDB44AB", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -234,7 +234,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:40 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:37 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -243,49 +243,49 @@ "type" : 1 }, { - "id" : "0AAE02AC-C336-47A4-AB96-FCB469B2C1D7", + "id" : "AF3E6712-A70C-45F8-9F44-78AE6BDB44AB", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDgwMjkxNjU3MCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDc3NjQzNTExNyJd" }, "type" : 2 }, { - "id" : "0AAE02AC-C336-47A4-AB96-FCB469B2C1D7", + "id" : "AF3E6712-A70C-45F8-9F44-78AE6BDB44AB", "type" : 4 }, { - "id" : "91B7A98A-E387-4405-886C-2EFC3840C59B", + "id" : "F2D037EF-002B-44C9-9D0E-8943B068B0CD", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "91B7A98A-E387-4405-886C-2EFC3840C59B", + "id" : "F2D037EF-002B-44C9-9D0E-8943B068B0CD", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:40 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:38 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -294,40 +294,40 @@ "type" : 1 }, { - "id" : "91B7A98A-E387-4405-886C-2EFC3840C59B", + "id" : "F2D037EF-002B-44C9-9D0E-8943B068B0CD", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDgwODM5MjI5MSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDc4MjM4Mjg1MiJd" }, "type" : 2 }, { - "id" : "91B7A98A-E387-4405-886C-2EFC3840C59B", + "id" : "F2D037EF-002B-44C9-9D0E-8943B068B0CD", "type" : 4 }, { - "id" : "3B9D6BD7-E6C9-4FDD-AC87-A857AA67BF90", + "id" : "B7010C45-D104-46DC-8F67-9B453A94486A", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?meta=%7B%22time%22:1577918418%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918418%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "3B9D6BD7-E6C9-4FDD-AC87-A857AA67BF90", + "id" : "B7010C45-D104-46DC-8F67-9B453A94486A", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -336,7 +336,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:41 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:38 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -345,49 +345,49 @@ "type" : 1 }, { - "id" : "3B9D6BD7-E6C9-4FDD-AC87-A857AA67BF90", + "id" : "B7010C45-D104-46DC-8F67-9B453A94486A", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDgxMzkwMDMzOSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDc4ODMzNTAyNyJd" }, "type" : 2 }, { - "id" : "3B9D6BD7-E6C9-4FDD-AC87-A857AA67BF90", + "id" : "B7010C45-D104-46DC-8F67-9B453A94486A", "type" : 4 }, { - "id" : "03049BA7-CF4C-44FE-869B-BCE097339A48", + "id" : "7F7D162F-9714-4C50-8467-7F7CBAAE6819", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "03049BA7-CF4C-44FE-869B-BCE097339A48", + "id" : "7F7D162F-9714-4C50-8467-7F7CBAAE6819", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:41 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:39 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -396,40 +396,40 @@ "type" : 1 }, { - "id" : "03049BA7-CF4C-44FE-869B-BCE097339A48", + "id" : "7F7D162F-9714-4C50-8467-7F7CBAAE6819", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDgxOTQwMzUwMiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDc5NDMzNjMxMyJd" }, "type" : 2 }, { - "id" : "03049BA7-CF4C-44FE-869B-BCE097339A48", + "id" : "7F7D162F-9714-4C50-8467-7F7CBAAE6819", "type" : 4 }, { - "id" : "3DE11D5B-5CDC-455C-B0FA-12519BF16145", + "id" : "78483FF2-22B5-4C64-AA8A-432104E30049", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?meta=%7B%22time%22:1577918420%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918420%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "3DE11D5B-5CDC-455C-B0FA-12519BF16145", + "id" : "78483FF2-22B5-4C64-AA8A-432104E30049", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -438,7 +438,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:42 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:40 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -447,49 +447,49 @@ "type" : 1 }, { - "id" : "3DE11D5B-5CDC-455C-B0FA-12519BF16145", + "id" : "78483FF2-22B5-4C64-AA8A-432104E30049", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDgyNDg5NDMyMyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDgwMDMzNzE1MCJd" }, "type" : 2 }, { - "id" : "3DE11D5B-5CDC-455C-B0FA-12519BF16145", + "id" : "78483FF2-22B5-4C64-AA8A-432104E30049", "type" : 4 }, { - "id" : "33CCAC29-275D-4C2E-9073-D5361A83F6A9", + "id" : "E902AAF7-06F3-44C9-882B-E34A2049903F", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "33CCAC29-275D-4C2E-9073-D5361A83F6A9", + "id" : "E902AAF7-06F3-44C9-882B-E34A2049903F", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:24:43 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:40 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -498,28 +498,28 @@ "type" : 1 }, { - "id" : "33CCAC29-275D-4C2E-9073-D5361A83F6A9", + "id" : "E902AAF7-06F3-44C9-882B-E34A2049903F", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMDgzMDM0NDUzNiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDgwNjM0NzI4NSJd" }, "type" : 2 }, { - "id" : "33CCAC29-275D-4C2E-9073-D5361A83F6A9", + "id" : "E902AAF7-06F3-44C9-882B-E34A2049903F", "type" : 4 }, { - "id" : "7079D5E9-9857-4A57-8C7A-11C257B0AE58", + "id" : "3B16EB8A-A0AB-401C-B71D-00938E396863", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -531,7 +531,7 @@ "type" : 0 }, { - "id" : "7079D5E9-9857-4A57-8C7A-11C257B0AE58", + "id" : "3B16EB8A-A0AB-401C-B71D-00938E396863", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -539,10 +539,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:24:46 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:44 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -552,7 +552,7 @@ "type" : 1 }, { - "id" : "7079D5E9-9857-4A57-8C7A-11C257B0AE58", + "id" : "3B16EB8A-A0AB-401C-B71D-00938E396863", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -560,43 +560,43 @@ "type" : 2 }, { - "id" : "7079D5E9-9857-4A57-8C7A-11C257B0AE58", + "id" : "3B16EB8A-A0AB-401C-B71D-00938E396863", "type" : 4 }, { - "id" : "311FB6A3-EA08-4360-9BDF-09BEEB6AB6B1", + "id" : "2FED5899-80A9-45A1-BEC3-43EE0D03AB77", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "311FB6A3-EA08-4360-9BDF-09BEEB6AB6B1", + "id" : "2FED5899-80A9-45A1-BEC3-43EE0D03AB77", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:24:46 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:44 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "8", "Cache-Control" : "no-cache", @@ -606,7 +606,7 @@ "type" : 1 }, { - "id" : "311FB6A3-EA08-4360-9BDF-09BEEB6AB6B1", + "id" : "2FED5899-80A9-45A1-BEC3-43EE0D03AB77", "data" : { "cls" : "NSData", "base64" : "W1tdLDAsMF0=" @@ -614,20 +614,20 @@ "type" : 2 }, { - "id" : "311FB6A3-EA08-4360-9BDF-09BEEB6AB6B1", + "id" : "2FED5899-80A9-45A1-BEC3-43EE0D03AB77", "type" : 4 }, { - "id" : "9E5B90E7-7F63-4402-AB38-77DF7DAACAA5", + "id" : "25B71988-C808-40D0-9DBE-E8CB71CDD2EC", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -639,7 +639,7 @@ "type" : 0 }, { - "id" : "9E5B90E7-7F63-4402-AB38-77DF7DAACAA5", + "id" : "25B71988-C808-40D0-9DBE-E8CB71CDD2EC", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -647,10 +647,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:24:46 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:44 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -660,7 +660,7 @@ "type" : 1 }, { - "id" : "9E5B90E7-7F63-4402-AB38-77DF7DAACAA5", + "id" : "25B71988-C808-40D0-9DBE-E8CB71CDD2EC", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -668,7 +668,7 @@ "type" : 2 }, { - "id" : "9E5B90E7-7F63-4402-AB38-77DF7DAACAA5", + "id" : "25B71988-C808-40D0-9DBE-E8CB71CDD2EC", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelUsingBuilderPatternInterface.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelUsingBuilderPatternInterface.json index 6932666e8..4f9efc275 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelUsingBuilderPatternInterface.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelUsingBuilderPatternInterface.json @@ -1,27 +1,27 @@ [ { - "id" : "63380BC6-ACA4-4963-BAC8-33D8FFA090A8", + "id" : "19CD0386-4CA8-40C5-839F-D73A00E714C7", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "63380BC6-ACA4-4963-BAC8-33D8FFA090A8", + "id" : "19CD0386-4CA8-40C5-839F-D73A00E714C7", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:25:09 GMT", + "Date" : "Wed, 26 Jun 2024 18:30:46 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "63380BC6-ACA4-4963-BAC8-33D8FFA090A8", + "id" : "19CD0386-4CA8-40C5-839F-D73A00E714C7", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTA5NDU1ODkwMCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NjQ2NzY4MDQ3MyJd" }, "type" : 2 }, { - "id" : "63380BC6-ACA4-4963-BAC8-33D8FFA090A8", + "id" : "19CD0386-4CA8-40C5-839F-D73A00E714C7", "type" : 4 }, { - "id" : "007F712E-CB85-4C2A-9F93-17657E964503", + "id" : "426B99A2-F6A2-4D63-8E4C-DA4950B0A98F", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "007F712E-CB85-4C2A-9F93-17657E964503", + "id" : "426B99A2-F6A2-4D63-8E4C-DA4950B0A98F", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:25:10 GMT", + "Date" : "Wed, 26 Jun 2024 18:30:47 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "007F712E-CB85-4C2A-9F93-17657E964503", + "id" : "426B99A2-F6A2-4D63-8E4C-DA4950B0A98F", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTEwMDEyMDg4NyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NjQ3MzY2NTY0MSJd" }, "type" : 2 }, { - "id" : "007F712E-CB85-4C2A-9F93-17657E964503", + "id" : "426B99A2-F6A2-4D63-8E4C-DA4950B0A98F", "type" : 4 }, { - "id" : "7815C9D2-9A54-4465-A7AB-1083CD91548D", + "id" : "24BD365C-C2AC-4BF5-B6CA-CCFBFCCA3854", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "7815C9D2-9A54-4465-A7AB-1083CD91548D", + "id" : "24BD365C-C2AC-4BF5-B6CA-CCFBFCCA3854", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:25:10 GMT", + "Date" : "Wed, 26 Jun 2024 18:30:47 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "7815C9D2-9A54-4465-A7AB-1083CD91548D", + "id" : "24BD365C-C2AC-4BF5-B6CA-CCFBFCCA3854", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTEwNTYzNzM3MSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NjQ3OTY3MTg3OCJd" }, "type" : 2 }, { - "id" : "7815C9D2-9A54-4465-A7AB-1083CD91548D", + "id" : "24BD365C-C2AC-4BF5-B6CA-CCFBFCCA3854", "type" : 4 }, { - "id" : "7A277643-80F5-4681-B8C6-BD5E19784EA0", + "id" : "9F7BC69C-4676-468F-9E3E-B6051E181DD0", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "7A277643-80F5-4681-B8C6-BD5E19784EA0", + "id" : "9F7BC69C-4676-468F-9E3E-B6051E181DD0", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:25:11 GMT", + "Date" : "Wed, 26 Jun 2024 18:30:48 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,28 +192,28 @@ "type" : 1 }, { - "id" : "7A277643-80F5-4681-B8C6-BD5E19784EA0", + "id" : "9F7BC69C-4676-468F-9E3E-B6051E181DD0", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTExMTIwMzYwMiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NjQ4NTYzMDY1MSJd" }, "type" : 2 }, { - "id" : "7A277643-80F5-4681-B8C6-BD5E19784EA0", + "id" : "9F7BC69C-4676-468F-9E3E-B6051E181DD0", "type" : 4 }, { - "id" : "518A0134-472C-4364-AB6E-D98ACD9872D2", + "id" : "9EEB48A8-3B0E-43B1-B316-00D910FD9027", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -225,7 +225,7 @@ "type" : 0 }, { - "id" : "518A0134-472C-4364-AB6E-D98ACD9872D2", + "id" : "9EEB48A8-3B0E-43B1-B316-00D910FD9027", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -233,41 +233,41 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", - "Access-Control-Allow-Origin" : "*", + "Server" : "Pubnub Storage", + "Connection" : "keep-alive", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:25:14 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "238", + "Transfer-Encoding" : "Identity", + "Date" : "Wed, 26 Jun 2024 18:30:52 GMT", + "Content-Encoding" : "gzip", "Cache-Control" : "no-cache", - "Connection" : "keep-alive" + "Access-Control-Allow-Origin" : "*" } }, "type" : 1 }, { - "id" : "518A0134-472C-4364-AB6E-D98ACD9872D2", + "id" : "9EEB48A8-3B0E-43B1-B316-00D910FD9027", "data" : { "cls" : "NSData", - "base64" : "W1t7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMCIsICJ0aW1lIjogMTU3NzkxODQxMn0sIHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiAxIiwgInRpbWUiOiAxNTc3OTE4NDEzfSwgeyJtZXNzYWdlSWR4IjogIm1lc3NhZ2U6IDIiLCAidGltZSI6IDE1Nzc5MTg0MTR9LCB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMyIsICJ0aW1lIjogMTU3NzkxODQxNX1dLDE1OTcwOTExMDk0NTU4OTAwLDE1OTcwOTExMTExMjAzNjAyXQ==" + "base64" : "W1t7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiAwIiwidGltZSI6MTU3NzkxODQxMn0seyJtZXNzYWdlSWR4IjoibWVzc2FnZTogMSIsInRpbWUiOjE1Nzc5MTg0MTN9LHsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDIiLCJ0aW1lIjoxNTc3OTE4NDE0fSx7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiAzIiwidGltZSI6MTU3NzkxODQxNX1dLDE3MTk0MjY2NDY3NjgwNDczLDE3MTk0MjY2NDg1NjMwNjUxXQ==" }, "type" : 2 }, { - "id" : "518A0134-472C-4364-AB6E-D98ACD9872D2", + "id" : "9EEB48A8-3B0E-43B1-B316-00D910FD9027", "type" : 4 }, { - "id" : "78101E51-777A-42FB-A817-A0163B63B764", + "id" : "277BA8B0-98C9-4A03-96CB-669BA350BBEC", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -279,7 +279,7 @@ "type" : 0 }, { - "id" : "78101E51-777A-42FB-A817-A0163B63B764", + "id" : "277BA8B0-98C9-4A03-96CB-669BA350BBEC", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -287,10 +287,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:25:14 GMT", + "Date" : "Wed, 26 Jun 2024 18:30:52 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -300,7 +300,7 @@ "type" : 1 }, { - "id" : "78101E51-777A-42FB-A817-A0163B63B764", + "id" : "277BA8B0-98C9-4A03-96CB-669BA350BBEC", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -308,7 +308,7 @@ "type" : 2 }, { - "id" : "78101E51-777A-42FB-A817-A0163B63B764", + "id" : "277BA8B0-98C9-4A03-96CB-669BA350BBEC", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithActionsAndReceiveResultWithExpectedOperation.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithActionsAndReceiveResultWithExpectedOperation.json index cd78bd66e..dfed5045d 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithActionsAndReceiveResultWithExpectedOperation.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithActionsAndReceiveResultWithExpectedOperation.json @@ -689,4 +689,4 @@ "id" : "7F4AC768-102F-4C2F-998F-ED5AF035E9FA", "type" : 4 } -] \ No newline at end of file +] diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithEncryptedMessagesAndDecrypt.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithEncryptedMessagesAndDecrypt.json index 8634ea412..d5f20a157 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithEncryptedMessagesAndDecrypt.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithEncryptedMessagesAndDecrypt.json @@ -1,27 +1,27 @@ [ { - "id" : "DAB94B3A-418D-48E1-B7A0-C4157C2FBD07", + "id" : "65EA3405-5351-4AD8-AB2B-8F52F14EFCA0", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22z+B2MpQJ7ri4gAOIFdNBFU1BE127LyyL0MVTE9pfJlCu4sDLpC87FvEQjGAk3Hl+%22?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22z+B2MpQJ7ri4gAOIFdNBFU1BE127LyyL0MVTE9pfJlCu4sDLpC87FvEQjGAk3Hl+%22?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "DAB94B3A-418D-48E1-B7A0-C4157C2FBD07", + "id" : "65EA3405-5351-4AD8-AB2B-8F52F14EFCA0", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:25:34 GMT", + "Date" : "Wed, 26 Jun 2024 18:08:30 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "DAB94B3A-418D-48E1-B7A0-C4157C2FBD07", + "id" : "65EA3405-5351-4AD8-AB2B-8F52F14EFCA0", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTM0MjYwODU0MiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI1MzEwMjk0NzgwNSJd" }, "type" : 2 }, { - "id" : "DAB94B3A-418D-48E1-B7A0-C4157C2FBD07", + "id" : "65EA3405-5351-4AD8-AB2B-8F52F14EFCA0", "type" : 4 }, { - "id" : "DE48EB3F-50B4-4312-883A-56CF0A45489E", + "id" : "62979E88-C628-4232-991E-CA3B1F575A83", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22z+B2MpQJ7ri4gAOIFdNBFT+DtesWEPfNq1tLjm+7k2Sn4\/teQlTqjYfaTOoRbRFW%22?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22z+B2MpQJ7ri4gAOIFdNBFT+DtesWEPfNq1tLjm+7k2Sn4\/teQlTqjYfaTOoRbRFW%22?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "DE48EB3F-50B4-4312-883A-56CF0A45489E", + "id" : "62979E88-C628-4232-991E-CA3B1F575A83", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22z+B2MpQJ7ri4gAOIFdNBFT+DtesWEPfNq1tLjm+7k2Sn4\/teQlTqjYfaTOoRbRFW%22?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22z+B2MpQJ7ri4gAOIFdNBFT+DtesWEPfNq1tLjm+7k2Sn4\/teQlTqjYfaTOoRbRFW%22?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:25:34 GMT", + "Date" : "Wed, 26 Jun 2024 18:08:31 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "DE48EB3F-50B4-4312-883A-56CF0A45489E", + "id" : "62979E88-C628-4232-991E-CA3B1F575A83", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTM0ODM3MzQyNCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI1MzExMzcyNTg5NiJd" }, "type" : 2 }, { - "id" : "DE48EB3F-50B4-4312-883A-56CF0A45489E", + "id" : "62979E88-C628-4232-991E-CA3B1F575A83", "type" : 4 }, { - "id" : "44FCB4D0-B0B8-422F-B97B-2523CA701A9F", + "id" : "421AC68B-B853-4AF6-A5E2-D538E0927F79", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22z+B2MpQJ7ri4gAOIFdNBFfiXTRlO\/N\/KSRO8BFTB0J8zlClpBZDVf94+klPiuFxK%22?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22z+B2MpQJ7ri4gAOIFdNBFfiXTRlO\/N\/KSRO8BFTB0J8zlClpBZDVf94+klPiuFxK%22?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "44FCB4D0-B0B8-422F-B97B-2523CA701A9F", + "id" : "421AC68B-B853-4AF6-A5E2-D538E0927F79", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:25:35 GMT", + "Date" : "Wed, 26 Jun 2024 18:08:31 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "44FCB4D0-B0B8-422F-B97B-2523CA701A9F", + "id" : "421AC68B-B853-4AF6-A5E2-D538E0927F79", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTM1Mzg2MzE4NiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI1MzExOTU1ODI2MSJd" }, "type" : 2 }, { - "id" : "44FCB4D0-B0B8-422F-B97B-2523CA701A9F", + "id" : "421AC68B-B853-4AF6-A5E2-D538E0927F79", "type" : 4 }, { - "id" : "757FABD4-AE35-4B19-820E-9CE3F6B0AB0A", + "id" : "B071A8F9-C189-4B18-957A-C4E132804326", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22z+B2MpQJ7ri4gAOIFdNBFSebUNbHSxAy3NB1UerqW9PdFPQMgZIooB9P814XfP\/Q%22?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22z+B2MpQJ7ri4gAOIFdNBFSebUNbHSxAy3NB1UerqW9PdFPQMgZIooB9P814XfP\/Q%22?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "757FABD4-AE35-4B19-820E-9CE3F6B0AB0A", + "id" : "B071A8F9-C189-4B18-957A-C4E132804326", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22z+B2MpQJ7ri4gAOIFdNBFSebUNbHSxAy3NB1UerqW9PdFPQMgZIooB9P814XfP\/Q%22?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22z+B2MpQJ7ri4gAOIFdNBFSebUNbHSxAy3NB1UerqW9PdFPQMgZIooB9P814XfP\/Q%22?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:25:35 GMT", + "Date" : "Wed, 26 Jun 2024 18:08:32 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,82 +192,82 @@ "type" : 1 }, { - "id" : "757FABD4-AE35-4B19-820E-9CE3F6B0AB0A", + "id" : "B071A8F9-C189-4B18-957A-C4E132804326", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTM1OTM3OTA3MCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI1MzEyNTQyNjQwMyJd" }, "type" : 2 }, { - "id" : "757FABD4-AE35-4B19-820E-9CE3F6B0AB0A", + "id" : "B071A8F9-C189-4B18-957A-C4E132804326", "type" : 4 }, { - "id" : "E7B3731C-3C99-48C4-A82C-98AB6192DFD4", + "id" : "A55CAE44-F184-4150-BA35-B7F29CBD156B", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?include_meta=1&uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?include_meta=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii" }, "type" : 0 }, { - "id" : "E7B3731C-3C99-48C4-A82C-98AB6192DFD4", + "id" : "A55CAE44-F184-4150-BA35-B7F29CBD156B", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?include_meta=1&uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?include_meta=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", - "Access-Control-Allow-Origin" : "*", + "Server" : "Pubnub Storage", + "Connection" : "keep-alive", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:25:39 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "574", + "Transfer-Encoding" : "Identity", + "Date" : "Wed, 26 Jun 2024 18:08:36 GMT", + "Content-Encoding" : "gzip", "Cache-Control" : "no-cache", - "Connection" : "keep-alive" + "Access-Control-Allow-Origin" : "*" } }, "type" : 1 }, { - "id" : "E7B3731C-3C99-48C4-A82C-98AB6192DFD4", + "id" : "A55CAE44-F184-4150-BA35-B7F29CBD156B", "data" : { "cls" : "NSData", - "base64" : "W1t7Im1lc3NhZ2UiOiAieitCMk1wUUo3cmk0Z0FPSUZkTkJGVTFCRTEyN0x5eUwwTVZURTlwZkpsQ3U0c0RMcEM4N0Z2RVFqR0FrM0hsKyIsICJ0aW1ldG9rZW4iOiAxNTk3MDkxMTM0MjYwODU0MiwgIm1ldGEiOiB7InRpbWUiOiAxNTc3OTE4NDEyfX0sIHsibWVzc2FnZSI6ICJ6K0IyTXBRSjdyaTRnQU9JRmROQkZUK0R0ZXNXRVBmTnExdExqbSs3azJTbjQvdGVRbFRxallmYVRPb1JiUkZXIiwgInRpbWV0b2tlbiI6IDE1OTcwOTExMzQ4MzczNDI0LCAibWV0YSI6ICIifSwgeyJtZXNzYWdlIjogInorQjJNcFFKN3JpNGdBT0lGZE5CRmZpWFRSbE8vTi9LU1JPOEJGVEIwSjh6bENscEJaRFZmOTQra2xQaXVGeEsiLCAidGltZXRva2VuIjogMTU5NzA5MTEzNTM4NjMxODYsICJtZXRhIjogeyJ0aW1lIjogMTU3NzkxODQxNH19LCB7Im1lc3NhZ2UiOiAieitCMk1wUUo3cmk0Z0FPSUZkTkJGU2ViVU5iSFN4QXkzTkIxVWVycVc5UGRGUFFNZ1pJb29COVA4MTRYZlAvUSIsICJ0aW1ldG9rZW4iOiAxNTk3MDkxMTM1OTM3OTA3MCwgIm1ldGEiOiAiIn1dLDE1OTcwOTExMzQyNjA4NTQyLDE1OTcwOTExMzU5Mzc5MDcwXQ==" + "base64" : "W1t7Im1lc3NhZ2UiOiJ6K0IyTXBRSjdyaTRnQU9JRmROQkZVMUJFMTI3THl5TDBNVlRFOXBmSmxDdTRzRExwQzg3RnZFUWpHQWszSGwrIiwibWV0YSI6eyJ0aW1lIjoxNTc3OTE4NDEyfX0seyJtZXNzYWdlIjoieitCMk1wUUo3cmk0Z0FPSUZkTkJGVCtEdGVzV0VQZk5xMXRMam0rN2syU240L3RlUWxUcWpZZmFUT29SYlJGVyIsIm1ldGEiOiIifSx7Im1lc3NhZ2UiOiJ6K0IyTXBRSjdyaTRnQU9JRmROQkZmaVhUUmxPL04vS1NSTzhCRlRCMEo4emxDbHBCWkRWZjk0K2tsUGl1RnhLIiwibWV0YSI6eyJ0aW1lIjoxNTc3OTE4NDE0fX0seyJtZXNzYWdlIjoieitCMk1wUUo3cmk0Z0FPSUZkTkJGU2ViVU5iSFN4QXkzTkIxVWVycVc5UGRGUFFNZ1pJb29COVA4MTRYZlAvUSIsIm1ldGEiOiIifV0sMTcxOTQyNTMxMDI5NDc4MDUsMTcxOTQyNTMxMjU0MjY0MDNd" }, "type" : 2 }, { - "id" : "E7B3731C-3C99-48C4-A82C-98AB6192DFD4", + "id" : "A55CAE44-F184-4150-BA35-B7F29CBD156B", "type" : 4 }, { - "id" : "06D2B94B-487C-4DE2-9D79-82E4AB3170AA", + "id" : "719235D3-B7D4-4F95-89B8-EACA93571F2C", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -279,7 +279,7 @@ "type" : 0 }, { - "id" : "06D2B94B-487C-4DE2-9D79-82E4AB3170AA", + "id" : "719235D3-B7D4-4F95-89B8-EACA93571F2C", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -287,10 +287,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:25:39 GMT", + "Date" : "Wed, 26 Jun 2024 18:08:48 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -300,7 +300,7 @@ "type" : 1 }, { - "id" : "06D2B94B-487C-4DE2-9D79-82E4AB3170AA", + "id" : "719235D3-B7D4-4F95-89B8-EACA93571F2C", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -308,7 +308,7 @@ "type" : 2 }, { - "id" : "06D2B94B-487C-4DE2-9D79-82E4AB3170AA", + "id" : "719235D3-B7D4-4F95-89B8-EACA93571F2C", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithEncryptedMessagesAndFailToDecryptWhenDifferentCipherKeyIsSet.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithEncryptedMessagesAndFailToDecryptWhenDifferentCipherKeyIsSet.json index c370ef887..d6563e4c7 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithEncryptedMessagesAndFailToDecryptWhenDifferentCipherKeyIsSet.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithEncryptedMessagesAndFailToDecryptWhenDifferentCipherKeyIsSet.json @@ -311,4 +311,4 @@ "id" : "268F0D38-2C56-4628-87FA-DDCB4360EE22", "type" : 4 } -] \ No newline at end of file +] diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithMetadataWhenFlagIsSet.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithMetadataWhenFlagIsSet.json index e2f1c802d..9552c402d 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithMetadataWhenFlagIsSet.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithMetadataWhenFlagIsSet.json @@ -1,27 +1,27 @@ [ { - "id" : "F14873D8-0527-4587-B396-FEA899ABCB4D", + "id" : "0C740A2F-06AC-456E-A716-ACF788F5F7A8", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "F14873D8-0527-4587-B396-FEA899ABCB4D", + "id" : "0C740A2F-06AC-456E-A716-ACF788F5F7A8", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:25:53 GMT", + "Date" : "Wed, 26 Jun 2024 18:06:53 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "F14873D8-0527-4587-B396-FEA899ABCB4D", + "id" : "0C740A2F-06AC-456E-A716-ACF788F5F7A8", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTUzMzg0MjUyNCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI1MjEzNDQ1NDQxMiJd" }, "type" : 2 }, { - "id" : "F14873D8-0527-4587-B396-FEA899ABCB4D", + "id" : "0C740A2F-06AC-456E-A716-ACF788F5F7A8", "type" : 4 }, { - "id" : "A74FC785-5560-4C0B-8CB2-31D04CF71790", + "id" : "D5967794-E17A-44B5-806F-5907795F89E5", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "A74FC785-5560-4C0B-8CB2-31D04CF71790", + "id" : "D5967794-E17A-44B5-806F-5907795F89E5", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:25:53 GMT", + "Date" : "Wed, 26 Jun 2024 18:06:54 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "A74FC785-5560-4C0B-8CB2-31D04CF71790", + "id" : "D5967794-E17A-44B5-806F-5907795F89E5", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTUzOTM2ODE5OCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI1MjE0MDYwOTg0OSJd" }, "type" : 2 }, { - "id" : "A74FC785-5560-4C0B-8CB2-31D04CF71790", + "id" : "D5967794-E17A-44B5-806F-5907795F89E5", "type" : 4 }, { - "id" : "ACFB0C05-D0DB-4D7A-88D7-689B95535968", + "id" : "DA9E3A89-A09B-4BB3-87FE-FA6E4B817729", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "ACFB0C05-D0DB-4D7A-88D7-689B95535968", + "id" : "DA9E3A89-A09B-4BB3-87FE-FA6E4B817729", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:25:54 GMT", + "Date" : "Wed, 26 Jun 2024 18:06:54 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "ACFB0C05-D0DB-4D7A-88D7-689B95535968", + "id" : "DA9E3A89-A09B-4BB3-87FE-FA6E4B817729", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTU0NDk2Mjc2MyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI1MjE0NjU0MTE4NCJd" }, "type" : 2 }, { - "id" : "ACFB0C05-D0DB-4D7A-88D7-689B95535968", + "id" : "DA9E3A89-A09B-4BB3-87FE-FA6E4B817729", "type" : 4 }, { - "id" : "99F59B20-0A1D-468E-9E43-F99E46FF5205", + "id" : "89B24753-FC7D-41D9-B4F2-15C025C505D1", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "99F59B20-0A1D-468E-9E43-F99E46FF5205", + "id" : "89B24753-FC7D-41D9-B4F2-15C025C505D1", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:25:55 GMT", + "Date" : "Wed, 26 Jun 2024 18:06:55 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,82 +192,82 @@ "type" : 1 }, { - "id" : "99F59B20-0A1D-468E-9E43-F99E46FF5205", + "id" : "89B24753-FC7D-41D9-B4F2-15C025C505D1", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTU1MDQ5NDAzOCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI1MjE1MjQ0MTA2NCJd" }, "type" : 2 }, { - "id" : "99F59B20-0A1D-468E-9E43-F99E46FF5205", + "id" : "89B24753-FC7D-41D9-B4F2-15C025C505D1", "type" : 4 }, { - "id" : "3FECB72B-EE47-451C-B4DD-6C014B101941", + "id" : "4D016B34-E7D8-4862-84E8-3EE6506AF96C", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?include_meta=1&uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?include_meta=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii" }, "type" : 0 }, { - "id" : "3FECB72B-EE47-451C-B4DD-6C014B101941", + "id" : "4D016B34-E7D8-4862-84E8-3EE6506AF96C", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?include_meta=1&uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?include_meta=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", - "Access-Control-Allow-Origin" : "*", + "Server" : "Pubnub Storage", + "Connection" : "keep-alive", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:25:58 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "502", + "Transfer-Encoding" : "Identity", + "Date" : "Wed, 26 Jun 2024 18:06:58 GMT", + "Content-Encoding" : "gzip", "Cache-Control" : "no-cache", - "Connection" : "keep-alive" + "Access-Control-Allow-Origin" : "*" } }, "type" : 1 }, { - "id" : "3FECB72B-EE47-451C-B4DD-6C014B101941", + "id" : "4D016B34-E7D8-4862-84E8-3EE6506AF96C", "data" : { "cls" : "NSData", - "base64" : "W1t7Im1lc3NhZ2UiOiB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMCIsICJ0aW1lIjogMTU3NzkxODQxMn0sICJ0aW1ldG9rZW4iOiAxNTk3MDkxMTUzMzg0MjUyNCwgIm1ldGEiOiB7InRpbWUiOiAxNTc3OTE4NDEyfX0sIHsibWVzc2FnZSI6IHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiAxIiwgInRpbWUiOiAxNTc3OTE4NDEzfSwgInRpbWV0b2tlbiI6IDE1OTcwOTExNTM5MzY4MTk4LCAibWV0YSI6ICIifSwgeyJtZXNzYWdlIjogeyJtZXNzYWdlSWR4IjogIm1lc3NhZ2U6IDIiLCAidGltZSI6IDE1Nzc5MTg0MTR9LCAidGltZXRva2VuIjogMTU5NzA5MTE1NDQ5NjI3NjMsICJtZXRhIjogeyJ0aW1lIjogMTU3NzkxODQxNH19LCB7Im1lc3NhZ2UiOiB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMyIsICJ0aW1lIjogMTU3NzkxODQxNX0sICJ0aW1ldG9rZW4iOiAxNTk3MDkxMTU1MDQ5NDAzOCwgIm1ldGEiOiAiIn1dLDE1OTcwOTExNTMzODQyNTI0LDE1OTcwOTExNTUwNDk0MDM4XQ==" + "base64" : "W1t7Im1lc3NhZ2UiOnsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDAiLCJ0aW1lIjoxNTc3OTE4NDEyfSwibWV0YSI6eyJ0aW1lIjoxNTc3OTE4NDEyfX0seyJtZXNzYWdlIjp7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiAxIiwidGltZSI6MTU3NzkxODQxM30sIm1ldGEiOiIifSx7Im1lc3NhZ2UiOnsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDIiLCJ0aW1lIjoxNTc3OTE4NDE0fSwibWV0YSI6eyJ0aW1lIjoxNTc3OTE4NDE0fX0seyJtZXNzYWdlIjp7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiAzIiwidGltZSI6MTU3NzkxODQxNX0sIm1ldGEiOiIifV0sMTcxOTQyNTIxMzQ0NTQ0MTIsMTcxOTQyNTIxNTI0NDEwNjRd" }, "type" : 2 }, { - "id" : "3FECB72B-EE47-451C-B4DD-6C014B101941", + "id" : "4D016B34-E7D8-4862-84E8-3EE6506AF96C", "type" : 4 }, { - "id" : "2E771AB3-4B2C-4C5D-B81E-6687815D90FF", + "id" : "BDF6B11C-ACF0-4AFA-A6AB-1844048FB5FA", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -279,7 +279,7 @@ "type" : 0 }, { - "id" : "2E771AB3-4B2C-4C5D-B81E-6687815D90FF", + "id" : "BDF6B11C-ACF0-4AFA-A6AB-1844048FB5FA", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -287,10 +287,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:25:58 GMT", + "Date" : "Wed, 26 Jun 2024 18:06:59 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -300,7 +300,7 @@ "type" : 1 }, { - "id" : "2E771AB3-4B2C-4C5D-B81E-6687815D90FF", + "id" : "BDF6B11C-ACF0-4AFA-A6AB-1844048FB5FA", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -308,7 +308,7 @@ "type" : 2 }, { - "id" : "2E771AB3-4B2C-4C5D-B81E-6687815D90FF", + "id" : "BDF6B11C-ACF0-4AFA-A6AB-1844048FB5FA", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithTimetokenWhenFlagItSet.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithTimetokenWhenFlagItSet.json index 8d92695c0..6b5bb5509 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithTimetokenWhenFlagItSet.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchHistoryForChannelWithTimetokenWhenFlagItSet.json @@ -1,27 +1,27 @@ [ { - "id" : "A6D9E625-E3EA-4462-B4D4-F1872CABDDA3", + "id" : "2ED3005B-6D28-4B38-9574-408ADA27EA15", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "A6D9E625-E3EA-4462-B4D4-F1872CABDDA3", + "id" : "2ED3005B-6D28-4B38-9574-408ADA27EA15", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:26:02 GMT", + "Date" : "Wed, 26 Jun 2024 18:06:08 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "A6D9E625-E3EA-4462-B4D4-F1872CABDDA3", + "id" : "2ED3005B-6D28-4B38-9574-408ADA27EA15", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTYyNTA0MDE4NCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI1MTY4NTc4MzQ4MiJd" }, "type" : 2 }, { - "id" : "A6D9E625-E3EA-4462-B4D4-F1872CABDDA3", + "id" : "2ED3005B-6D28-4B38-9574-408ADA27EA15", "type" : 4 }, { - "id" : "C97F0342-49C8-4FB0-A89D-4B6BD16BF186", + "id" : "D2EFC473-47A8-42EB-8211-50E07DF69A7C", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "C97F0342-49C8-4FB0-A89D-4B6BD16BF186", + "id" : "D2EFC473-47A8-42EB-8211-50E07DF69A7C", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:26:03 GMT", + "Date" : "Wed, 26 Jun 2024 18:06:09 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "C97F0342-49C8-4FB0-A89D-4B6BD16BF186", + "id" : "D2EFC473-47A8-42EB-8211-50E07DF69A7C", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTYzMDk1Mjk4NyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI1MTY5MTg2ODQyNSJd" }, "type" : 2 }, { - "id" : "C97F0342-49C8-4FB0-A89D-4B6BD16BF186", + "id" : "D2EFC473-47A8-42EB-8211-50E07DF69A7C", "type" : 4 }, { - "id" : "6ADAFAE1-C27E-452F-9F0D-D61DCF52AC62", + "id" : "7929812A-FC73-4DC9-8127-468A159EB604", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "6ADAFAE1-C27E-452F-9F0D-D61DCF52AC62", + "id" : "7929812A-FC73-4DC9-8127-468A159EB604", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:26:03 GMT", + "Date" : "Wed, 26 Jun 2024 18:06:09 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "6ADAFAE1-C27E-452F-9F0D-D61DCF52AC62", + "id" : "7929812A-FC73-4DC9-8127-468A159EB604", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTYzNjM4NzIwNSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI1MTY5Nzc4ODc0NyJd" }, "type" : 2 }, { - "id" : "6ADAFAE1-C27E-452F-9F0D-D61DCF52AC62", + "id" : "7929812A-FC73-4DC9-8127-468A159EB604", "type" : 4 }, { - "id" : "2B73A84E-0A07-461B-AF77-7D4668FA6398", + "id" : "5D7DB750-1E50-4C4C-B7DB-7D279F9256F2", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "2B73A84E-0A07-461B-AF77-7D4668FA6398", + "id" : "5D7DB750-1E50-4C4C-B7DB-7D279F9256F2", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:26:04 GMT", + "Date" : "Wed, 26 Jun 2024 18:06:10 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,82 +192,82 @@ "type" : 1 }, { - "id" : "2B73A84E-0A07-461B-AF77-7D4668FA6398", + "id" : "5D7DB750-1E50-4C4C-B7DB-7D279F9256F2", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMTY0MTk3MzAyMSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI1MTcwMzYzODM1NCJd" }, "type" : 2 }, { - "id" : "2B73A84E-0A07-461B-AF77-7D4668FA6398", + "id" : "5D7DB750-1E50-4C4C-B7DB-7D279F9256F2", "type" : 4 }, { - "id" : "0DADD24C-612F-4C5B-80A3-98A535BBB169", + "id" : "8A7FE5D5-D24B-4692-BA15-BA7F5716A105", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1&count=100&uuid=Serhii" }, "type" : 0 }, { - "id" : "0DADD24C-612F-4C5B-80A3-98A535BBB169", + "id" : "8A7FE5D5-D24B-4692-BA15-BA7F5716A105", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1&count=100&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", - "Access-Control-Allow-Origin" : "*", + "Server" : "Pubnub Storage", + "Connection" : "keep-alive", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:26:07 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "418", + "Transfer-Encoding" : "Identity", + "Date" : "Wed, 26 Jun 2024 18:06:13 GMT", + "Content-Encoding" : "gzip", "Cache-Control" : "no-cache", - "Connection" : "keep-alive" + "Access-Control-Allow-Origin" : "*" } }, "type" : 1 }, { - "id" : "0DADD24C-612F-4C5B-80A3-98A535BBB169", + "id" : "8A7FE5D5-D24B-4692-BA15-BA7F5716A105", "data" : { "cls" : "NSData", - "base64" : "W1t7Im1lc3NhZ2UiOiB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMCIsICJ0aW1lIjogMTU3NzkxODQxMn0sICJ0aW1ldG9rZW4iOiAxNTk3MDkxMTYyNTA0MDE4NH0sIHsibWVzc2FnZSI6IHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiAxIiwgInRpbWUiOiAxNTc3OTE4NDEzfSwgInRpbWV0b2tlbiI6IDE1OTcwOTExNjMwOTUyOTg3fSwgeyJtZXNzYWdlIjogeyJtZXNzYWdlSWR4IjogIm1lc3NhZ2U6IDIiLCAidGltZSI6IDE1Nzc5MTg0MTR9LCAidGltZXRva2VuIjogMTU5NzA5MTE2MzYzODcyMDV9LCB7Im1lc3NhZ2UiOiB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMyIsICJ0aW1lIjogMTU3NzkxODQxNX0sICJ0aW1ldG9rZW4iOiAxNTk3MDkxMTY0MTk3MzAyMX1dLDE1OTcwOTExNjI1MDQwMTg0LDE1OTcwOTExNjQxOTczMDIxXQ==" + "base64" : "W1t7Im1lc3NhZ2UiOnsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDAiLCJ0aW1lIjoxNTc3OTE4NDEyfSwidGltZXRva2VuIjoxNzE5NDI1MTY4NTc4MzQ4Mn0seyJtZXNzYWdlIjp7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiAxIiwidGltZSI6MTU3NzkxODQxM30sInRpbWV0b2tlbiI6MTcxOTQyNTE2OTE4Njg0MjV9LHsibWVzc2FnZSI6eyJtZXNzYWdlSWR4IjoibWVzc2FnZTogMiIsInRpbWUiOjE1Nzc5MTg0MTR9LCJ0aW1ldG9rZW4iOjE3MTk0MjUxNjk3Nzg4NzQ3fSx7Im1lc3NhZ2UiOnsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDMiLCJ0aW1lIjoxNTc3OTE4NDE1fSwidGltZXRva2VuIjoxNzE5NDI1MTcwMzYzODM1NH1dLDE3MTk0MjUxNjg1NzgzNDgyLDE3MTk0MjUxNzAzNjM4MzU0XQ==" }, "type" : 2 }, { - "id" : "0DADD24C-612F-4C5B-80A3-98A535BBB169", + "id" : "8A7FE5D5-D24B-4692-BA15-BA7F5716A105", "type" : 4 }, { - "id" : "4F7302C5-F779-428F-A822-76D40D2AE922", + "id" : "4CC28205-42D5-4B5F-B239-52E8BBA863EB", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -279,7 +279,7 @@ "type" : 0 }, { - "id" : "4F7302C5-F779-428F-A822-76D40D2AE922", + "id" : "4CC28205-42D5-4B5F-B239-52E8BBA863EB", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -287,10 +287,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:26:07 GMT", + "Date" : "Wed, 26 Jun 2024 18:06:14 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -300,7 +300,7 @@ "type" : 1 }, { - "id" : "4F7302C5-F779-428F-A822-76D40D2AE922", + "id" : "4CC28205-42D5-4B5F-B239-52E8BBA863EB", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -308,7 +308,7 @@ "type" : 2 }, { - "id" : "4F7302C5-F779-428F-A822-76D40D2AE922", + "id" : "4CC28205-42D5-4B5F-B239-52E8BBA863EB", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchNewerChannelHistoryPageWhenCalledWithLimitAndStart.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchNewerChannelHistoryPageWhenCalledWithLimitAndStart.json index 199cb8194..45c0f84d1 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchNewerChannelHistoryPageWhenCalledWithLimitAndStart.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchNewerChannelHistoryPageWhenCalledWithLimitAndStart.json @@ -1,27 +1,27 @@ [ { - "id" : "3004BD64-5383-45C1-96FA-AB514448F488", + "id" : "6A54E7B2-EF5C-49A3-B5C4-6A640981FAAF", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "3004BD64-5383-45C1-96FA-AB514448F488", + "id" : "6A54E7B2-EF5C-49A3-B5C4-6A640981FAAF", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:26:57 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:31 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "3004BD64-5383-45C1-96FA-AB514448F488", + "id" : "6A54E7B2-EF5C-49A3-B5C4-6A640981FAAF", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjE3NzY2Mjk5MiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTcxMzg1MDQxMiJd" }, "type" : 2 }, { - "id" : "3004BD64-5383-45C1-96FA-AB514448F488", + "id" : "6A54E7B2-EF5C-49A3-B5C4-6A640981FAAF", "type" : 4 }, { - "id" : "66A0F9E4-1655-4334-9EE1-1CB911BDA3ED", + "id" : "6086427F-BC98-4A85-9599-E91C13586D40", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "66A0F9E4-1655-4334-9EE1-1CB911BDA3ED", + "id" : "6086427F-BC98-4A85-9599-E91C13586D40", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:26:58 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:31 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "66A0F9E4-1655-4334-9EE1-1CB911BDA3ED", + "id" : "6086427F-BC98-4A85-9599-E91C13586D40", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjE4MzYwMjQwMiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTcxOTg1Njk3NCJd" }, "type" : 2 }, { - "id" : "66A0F9E4-1655-4334-9EE1-1CB911BDA3ED", + "id" : "6086427F-BC98-4A85-9599-E91C13586D40", "type" : 4 }, { - "id" : "192BBB33-77DB-4AC4-8A6A-7E47A538BB83", + "id" : "6A3A3C3E-7354-4974-8307-C698D4E9B470", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "192BBB33-77DB-4AC4-8A6A-7E47A538BB83", + "id" : "6A3A3C3E-7354-4974-8307-C698D4E9B470", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:26:58 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:32 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "192BBB33-77DB-4AC4-8A6A-7E47A538BB83", + "id" : "6A3A3C3E-7354-4974-8307-C698D4E9B470", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjE4OTExOTY1MyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTcyNTc4NjQ3MSJd" }, "type" : 2 }, { - "id" : "192BBB33-77DB-4AC4-8A6A-7E47A538BB83", + "id" : "6A3A3C3E-7354-4974-8307-C698D4E9B470", "type" : 4 }, { - "id" : "9D3C9277-70A2-4DAF-AB95-E7ACD06C8807", + "id" : "13BD5CBF-8E5D-4A59-A6D8-07D4EF838AD4", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "9D3C9277-70A2-4DAF-AB95-E7ACD06C8807", + "id" : "13BD5CBF-8E5D-4A59-A6D8-07D4EF838AD4", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:26:59 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:33 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,40 +192,40 @@ "type" : 1 }, { - "id" : "9D3C9277-70A2-4DAF-AB95-E7ACD06C8807", + "id" : "13BD5CBF-8E5D-4A59-A6D8-07D4EF838AD4", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjE5NDYyNDc5MiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTczMTY5MjQ3NiJd" }, "type" : 2 }, { - "id" : "9D3C9277-70A2-4DAF-AB95-E7ACD06C8807", + "id" : "13BD5CBF-8E5D-4A59-A6D8-07D4EF838AD4", "type" : 4 }, { - "id" : "9DF4EC17-63DE-48A9-B5BC-4100FA89CB73", + "id" : "9514624E-AE0B-47C6-861A-3AF9C6EB5A3E", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?meta=%7B%22time%22:1577918416%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918416%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "9DF4EC17-63DE-48A9-B5BC-4100FA89CB73", + "id" : "9514624E-AE0B-47C6-861A-3AF9C6EB5A3E", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -234,7 +234,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:00 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:33 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -243,49 +243,49 @@ "type" : 1 }, { - "id" : "9DF4EC17-63DE-48A9-B5BC-4100FA89CB73", + "id" : "9514624E-AE0B-47C6-861A-3AF9C6EB5A3E", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjIwMDEwNzcxMiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTczNzY4MTIyMCJd" }, "type" : 2 }, { - "id" : "9DF4EC17-63DE-48A9-B5BC-4100FA89CB73", + "id" : "9514624E-AE0B-47C6-861A-3AF9C6EB5A3E", "type" : 4 }, { - "id" : "49D69210-D34F-44CB-8D96-66BDB32876F1", + "id" : "CCDD37B6-EFEB-438D-B3D7-ED6689011E68", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "49D69210-D34F-44CB-8D96-66BDB32876F1", + "id" : "CCDD37B6-EFEB-438D-B3D7-ED6689011E68", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:00 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:34 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -294,40 +294,40 @@ "type" : 1 }, { - "id" : "49D69210-D34F-44CB-8D96-66BDB32876F1", + "id" : "CCDD37B6-EFEB-438D-B3D7-ED6689011E68", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjIwNTU5MTM3MiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTc0MzcxNzQ1NyJd" }, "type" : 2 }, { - "id" : "49D69210-D34F-44CB-8D96-66BDB32876F1", + "id" : "CCDD37B6-EFEB-438D-B3D7-ED6689011E68", "type" : 4 }, { - "id" : "70CFA702-541F-4EA8-BBB5-E622E4C0DC4E", + "id" : "D85E124D-1982-453B-A9EC-0A4429315026", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?meta=%7B%22time%22:1577918418%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918418%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "70CFA702-541F-4EA8-BBB5-E622E4C0DC4E", + "id" : "D85E124D-1982-453B-A9EC-0A4429315026", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -336,7 +336,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:01 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:34 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -345,49 +345,49 @@ "type" : 1 }, { - "id" : "70CFA702-541F-4EA8-BBB5-E622E4C0DC4E", + "id" : "D85E124D-1982-453B-A9EC-0A4429315026", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjIxMTA3NzAwNCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTc0OTcxODQ5NCJd" }, "type" : 2 }, { - "id" : "70CFA702-541F-4EA8-BBB5-E622E4C0DC4E", + "id" : "D85E124D-1982-453B-A9EC-0A4429315026", "type" : 4 }, { - "id" : "CA90D155-3B71-4CB3-B1A8-AF1858DA1ACE", + "id" : "3EAFD5F8-737F-43C9-AC99-EB90B0C56F23", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "CA90D155-3B71-4CB3-B1A8-AF1858DA1ACE", + "id" : "3EAFD5F8-737F-43C9-AC99-EB90B0C56F23", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:01 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:35 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -396,40 +396,40 @@ "type" : 1 }, { - "id" : "CA90D155-3B71-4CB3-B1A8-AF1858DA1ACE", + "id" : "3EAFD5F8-737F-43C9-AC99-EB90B0C56F23", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjIxNjUzNTYzNSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTc1NTcyNjA3OCJd" }, "type" : 2 }, { - "id" : "CA90D155-3B71-4CB3-B1A8-AF1858DA1ACE", + "id" : "3EAFD5F8-737F-43C9-AC99-EB90B0C56F23", "type" : 4 }, { - "id" : "A5F6A3B6-A482-4BB4-9A35-3EEA6E021BC4", + "id" : "C4A45383-C360-41FD-B84A-A6DCF99E28FB", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?meta=%7B%22time%22:1577918420%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918420%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "A5F6A3B6-A482-4BB4-9A35-3EEA6E021BC4", + "id" : "C4A45383-C360-41FD-B84A-A6DCF99E28FB", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -438,7 +438,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:02 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:36 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -447,49 +447,49 @@ "type" : 1 }, { - "id" : "A5F6A3B6-A482-4BB4-9A35-3EEA6E021BC4", + "id" : "C4A45383-C360-41FD-B84A-A6DCF99E28FB", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjIyMjA3MTYyNSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTc2MTY2NjQyNSJd" }, "type" : 2 }, { - "id" : "A5F6A3B6-A482-4BB4-9A35-3EEA6E021BC4", + "id" : "C4A45383-C360-41FD-B84A-A6DCF99E28FB", "type" : 4 }, { - "id" : "876C2DC8-D145-445C-9E04-8CA78FC7B433", + "id" : "EE8C7EDD-77DC-4D23-88B2-F1E158174542", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "876C2DC8-D145-445C-9E04-8CA78FC7B433", + "id" : "EE8C7EDD-77DC-4D23-88B2-F1E158174542", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:02 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:36 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -498,136 +498,136 @@ "type" : 1 }, { - "id" : "876C2DC8-D145-445C-9E04-8CA78FC7B433", + "id" : "EE8C7EDD-77DC-4D23-88B2-F1E158174542", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjIyNzU4ODU0MCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTc2NzczNzAyMyJd" }, "type" : 2 }, { - "id" : "876C2DC8-D145-445C-9E04-8CA78FC7B433", + "id" : "EE8C7EDD-77DC-4D23-88B2-F1E158174542", "type" : 4 }, { - "id" : "7525F37B-9F0B-4837-89E3-095B74789790", + "id" : "4890CB32-0690-474B-A0AB-B71E1CC2B8E5", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?reverse=1&count=5&pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?reverse=1&count=5&uuid=Serhii&include_token=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "7525F37B-9F0B-4837-89E3-095B74789790", + "id" : "4890CB32-0690-474B-A0AB-B71E1CC2B8E5", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?reverse=1&count=5&pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?reverse=1&count=5&uuid=Serhii&include_token=1&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", - "Access-Control-Allow-Origin" : "*", + "Server" : "Pubnub Storage", + "Connection" : "keep-alive", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:27:06 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "513", + "Transfer-Encoding" : "Identity", + "Date" : "Wed, 26 Jun 2024 18:29:40 GMT", + "Content-Encoding" : "gzip", "Cache-Control" : "no-cache", - "Connection" : "keep-alive" + "Access-Control-Allow-Origin" : "*" } }, "type" : 1 }, { - "id" : "7525F37B-9F0B-4837-89E3-095B74789790", + "id" : "4890CB32-0690-474B-A0AB-B71E1CC2B8E5", "data" : { "cls" : "NSData", - "base64" : "W1t7Im1lc3NhZ2UiOiB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMCIsICJ0aW1lIjogMTU3NzkxODQxMn0sICJ0aW1ldG9rZW4iOiAxNTk3MDkxMjE3NzY2Mjk5Mn0sIHsibWVzc2FnZSI6IHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiAxIiwgInRpbWUiOiAxNTc3OTE4NDEzfSwgInRpbWV0b2tlbiI6IDE1OTcwOTEyMTgzNjAyNDAyfSwgeyJtZXNzYWdlIjogeyJtZXNzYWdlSWR4IjogIm1lc3NhZ2U6IDIiLCAidGltZSI6IDE1Nzc5MTg0MTR9LCAidGltZXRva2VuIjogMTU5NzA5MTIxODkxMTk2NTN9LCB7Im1lc3NhZ2UiOiB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMyIsICJ0aW1lIjogMTU3NzkxODQxNX0sICJ0aW1ldG9rZW4iOiAxNTk3MDkxMjE5NDYyNDc5Mn0sIHsibWVzc2FnZSI6IHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiA0IiwgInRpbWUiOiAxNTc3OTE4NDE2fSwgInRpbWV0b2tlbiI6IDE1OTcwOTEyMjAwMTA3NzEyfV0sMTU5NzA5MTIxNzc2NjI5OTIsMTU5NzA5MTIyMDAxMDc3MTJd" + "base64" : "W1t7Im1lc3NhZ2UiOnsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDAiLCJ0aW1lIjoxNTc3OTE4NDEyfSwidGltZXRva2VuIjoxNzE5NDI2NTcxMzg1MDQxMn0seyJtZXNzYWdlIjp7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiAxIiwidGltZSI6MTU3NzkxODQxM30sInRpbWV0b2tlbiI6MTcxOTQyNjU3MTk4NTY5NzR9LHsibWVzc2FnZSI6eyJtZXNzYWdlSWR4IjoibWVzc2FnZTogMiIsInRpbWUiOjE1Nzc5MTg0MTR9LCJ0aW1ldG9rZW4iOjE3MTk0MjY1NzI1Nzg2NDcxfSx7Im1lc3NhZ2UiOnsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDMiLCJ0aW1lIjoxNTc3OTE4NDE1fSwidGltZXRva2VuIjoxNzE5NDI2NTczMTY5MjQ3Nn0seyJtZXNzYWdlIjp7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiA0IiwidGltZSI6MTU3NzkxODQxNn0sInRpbWV0b2tlbiI6MTcxOTQyNjU3Mzc2ODEyMjB9XSwxNzE5NDI2NTcxMzg1MDQxMiwxNzE5NDI2NTczNzY4MTIyMF0=" }, "type" : 2 }, { - "id" : "7525F37B-9F0B-4837-89E3-095B74789790", + "id" : "4890CB32-0690-474B-A0AB-B71E1CC2B8E5", "type" : 4 }, { - "id" : "E101AE7D-F1CA-4D66-AE6C-C4C7243256EF", + "id" : "091A2201-BE82-4DD7-BB93-0C8EFEBDCA1A", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?start=15970912200107712&reverse=1&count=5&uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?start=17194265737681220&reverse=1&count=5&uuid=Serhii&include_token=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "E101AE7D-F1CA-4D66-AE6C-C4C7243256EF", + "id" : "091A2201-BE82-4DD7-BB93-0C8EFEBDCA1A", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?start=15970912200107712&reverse=1&count=5&uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?start=17194265737681220&reverse=1&count=5&uuid=Serhii&include_token=1&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", - "Access-Control-Allow-Origin" : "*", + "Server" : "Pubnub Storage", + "Connection" : "keep-alive", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:27:06 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "513", + "Transfer-Encoding" : "Identity", + "Date" : "Wed, 26 Jun 2024 18:29:40 GMT", + "Content-Encoding" : "gzip", "Cache-Control" : "no-cache", - "Connection" : "keep-alive" + "Access-Control-Allow-Origin" : "*" } }, "type" : 1 }, { - "id" : "E101AE7D-F1CA-4D66-AE6C-C4C7243256EF", + "id" : "091A2201-BE82-4DD7-BB93-0C8EFEBDCA1A", "data" : { "cls" : "NSData", - "base64" : "W1t7Im1lc3NhZ2UiOiB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogNSIsICJ0aW1lIjogMTU3NzkxODQxN30sICJ0aW1ldG9rZW4iOiAxNTk3MDkxMjIwNTU5MTM3Mn0sIHsibWVzc2FnZSI6IHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiA2IiwgInRpbWUiOiAxNTc3OTE4NDE4fSwgInRpbWV0b2tlbiI6IDE1OTcwOTEyMjExMDc3MDA0fSwgeyJtZXNzYWdlIjogeyJtZXNzYWdlSWR4IjogIm1lc3NhZ2U6IDciLCAidGltZSI6IDE1Nzc5MTg0MTl9LCAidGltZXRva2VuIjogMTU5NzA5MTIyMTY1MzU2MzV9LCB7Im1lc3NhZ2UiOiB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogOCIsICJ0aW1lIjogMTU3NzkxODQyMH0sICJ0aW1ldG9rZW4iOiAxNTk3MDkxMjIyMjA3MTYyNX0sIHsibWVzc2FnZSI6IHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiA5IiwgInRpbWUiOiAxNTc3OTE4NDIxfSwgInRpbWV0b2tlbiI6IDE1OTcwOTEyMjI3NTg4NTQwfV0sMTU5NzA5MTIyMDU1OTEzNzIsMTU5NzA5MTIyMjc1ODg1NDBd" + "base64" : "W1t7Im1lc3NhZ2UiOnsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDUiLCJ0aW1lIjoxNTc3OTE4NDE3fSwidGltZXRva2VuIjoxNzE5NDI2NTc0MzcxNzQ1N30seyJtZXNzYWdlIjp7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiA2IiwidGltZSI6MTU3NzkxODQxOH0sInRpbWV0b2tlbiI6MTcxOTQyNjU3NDk3MTg0OTR9LHsibWVzc2FnZSI6eyJtZXNzYWdlSWR4IjoibWVzc2FnZTogNyIsInRpbWUiOjE1Nzc5MTg0MTl9LCJ0aW1ldG9rZW4iOjE3MTk0MjY1NzU1NzI2MDc4fSx7Im1lc3NhZ2UiOnsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDgiLCJ0aW1lIjoxNTc3OTE4NDIwfSwidGltZXRva2VuIjoxNzE5NDI2NTc2MTY2NjQyNX0seyJtZXNzYWdlIjp7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiA5IiwidGltZSI6MTU3NzkxODQyMX0sInRpbWV0b2tlbiI6MTcxOTQyNjU3Njc3MzcwMjN9XSwxNzE5NDI2NTc0MzcxNzQ1NywxNzE5NDI2NTc2NzczNzAyM10=" }, "type" : 2 }, { - "id" : "E101AE7D-F1CA-4D66-AE6C-C4C7243256EF", + "id" : "091A2201-BE82-4DD7-BB93-0C8EFEBDCA1A", "type" : 4 }, { - "id" : "3FB28189-AFAF-44CC-8293-13A14D2F605C", + "id" : "AE2A7365-062E-4F6A-AB75-019BA2F23550", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -639,7 +639,7 @@ "type" : 0 }, { - "id" : "3FB28189-AFAF-44CC-8293-13A14D2F605C", + "id" : "AE2A7365-062E-4F6A-AB75-019BA2F23550", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -647,10 +647,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:27:06 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:40 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -660,7 +660,7 @@ "type" : 1 }, { - "id" : "3FB28189-AFAF-44CC-8293-13A14D2F605C", + "id" : "AE2A7365-062E-4F6A-AB75-019BA2F23550", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -668,7 +668,7 @@ "type" : 2 }, { - "id" : "3FB28189-AFAF-44CC-8293-13A14D2F605C", + "id" : "AE2A7365-062E-4F6A-AB75-019BA2F23550", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchOlderChannelHistoryPageWhenCalledWithLimitAndStartAndReceiveResultWithExpectedOperation.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchOlderChannelHistoryPageWhenCalledWithLimitAndStartAndReceiveResultWithExpectedOperation.json index 9a0735631..3c4bf3e0d 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchOlderChannelHistoryPageWhenCalledWithLimitAndStartAndReceiveResultWithExpectedOperation.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchOlderChannelHistoryPageWhenCalledWithLimitAndStartAndReceiveResultWithExpectedOperation.json @@ -1,27 +1,27 @@ [ { - "id" : "2A3C4BCC-F531-4B1E-A5C2-B27B0158FCAD", + "id" : "913B27C2-E1F9-4F31-91D7-6030A19A04B4", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "2A3C4BCC-F531-4B1E-A5C2-B27B0158FCAD", + "id" : "913B27C2-E1F9-4F31-91D7-6030A19A04B4", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:10 GMT", + "Date" : "Wed, 26 Jun 2024 18:28:59 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "2A3C4BCC-F531-4B1E-A5C2-B27B0158FCAD", + "id" : "913B27C2-E1F9-4F31-91D7-6030A19A04B4", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjMwMzc0MTg1NSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTM5MjQ0MDE2OSJd" }, "type" : 2 }, { - "id" : "2A3C4BCC-F531-4B1E-A5C2-B27B0158FCAD", + "id" : "913B27C2-E1F9-4F31-91D7-6030A19A04B4", "type" : 4 }, { - "id" : "6DADDC42-8401-4E79-B369-C9F81578EAF4", + "id" : "13513805-4490-450F-A1A8-21CE9CF94795", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "6DADDC42-8401-4E79-B369-C9F81578EAF4", + "id" : "13513805-4490-450F-A1A8-21CE9CF94795", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:10 GMT", + "Date" : "Wed, 26 Jun 2024 18:28:59 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "6DADDC42-8401-4E79-B369-C9F81578EAF4", + "id" : "13513805-4490-450F-A1A8-21CE9CF94795", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjMwOTI4NjQzNSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTM5ODQyMDY0MSJd" }, "type" : 2 }, { - "id" : "6DADDC42-8401-4E79-B369-C9F81578EAF4", + "id" : "13513805-4490-450F-A1A8-21CE9CF94795", "type" : 4 }, { - "id" : "82ED7009-8387-49D6-A7C4-16CC8B47C1F5", + "id" : "DF18AA81-35BA-4930-86A4-D325A4248318", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "82ED7009-8387-49D6-A7C4-16CC8B47C1F5", + "id" : "DF18AA81-35BA-4930-86A4-D325A4248318", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:11 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:00 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "82ED7009-8387-49D6-A7C4-16CC8B47C1F5", + "id" : "DF18AA81-35BA-4930-86A4-D325A4248318", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjMxNDgzNzA4MSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTQwNDM0Mjg5NSJd" }, "type" : 2 }, { - "id" : "82ED7009-8387-49D6-A7C4-16CC8B47C1F5", + "id" : "DF18AA81-35BA-4930-86A4-D325A4248318", "type" : 4 }, { - "id" : "ADD678DD-C611-4111-93DA-7E0B48F4573E", + "id" : "D70A5E5D-8D47-4E02-B2A0-3C4883510917", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "ADD678DD-C611-4111-93DA-7E0B48F4573E", + "id" : "D70A5E5D-8D47-4E02-B2A0-3C4883510917", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:12 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:01 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,40 +192,40 @@ "type" : 1 }, { - "id" : "ADD678DD-C611-4111-93DA-7E0B48F4573E", + "id" : "D70A5E5D-8D47-4E02-B2A0-3C4883510917", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjMyMDM5NzkxOCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTQxMDM0ODI1NyJd" }, "type" : 2 }, { - "id" : "ADD678DD-C611-4111-93DA-7E0B48F4573E", + "id" : "D70A5E5D-8D47-4E02-B2A0-3C4883510917", "type" : 4 }, { - "id" : "D765D16C-128A-4467-85B8-04A018AF34BA", + "id" : "94199D7F-98FA-41E4-BEAA-F550DFA827E1", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?meta=%7B%22time%22:1577918416%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%204%22,%22time%22:1577918416%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918416%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "D765D16C-128A-4467-85B8-04A018AF34BA", + "id" : "94199D7F-98FA-41E4-BEAA-F550DFA827E1", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -234,7 +234,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:12 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:01 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -243,49 +243,49 @@ "type" : 1 }, { - "id" : "D765D16C-128A-4467-85B8-04A018AF34BA", + "id" : "94199D7F-98FA-41E4-BEAA-F550DFA827E1", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjMyNTk1MjA1MCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTQxNjQwNjYyNSJd" }, "type" : 2 }, { - "id" : "D765D16C-128A-4467-85B8-04A018AF34BA", + "id" : "94199D7F-98FA-41E4-BEAA-F550DFA827E1", "type" : 4 }, { - "id" : "B1E2E45D-357A-4994-81C2-D6CE12152508", + "id" : "49414638-2496-47A2-BC5C-94755FE05A3C", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "B1E2E45D-357A-4994-81C2-D6CE12152508", + "id" : "49414638-2496-47A2-BC5C-94755FE05A3C", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%205%22,%22time%22:1577918417%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:13 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:02 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -294,40 +294,40 @@ "type" : 1 }, { - "id" : "B1E2E45D-357A-4994-81C2-D6CE12152508", + "id" : "49414638-2496-47A2-BC5C-94755FE05A3C", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjMzMTQ4ODQ2OSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTQyMjM5MDE1NSJd" }, "type" : 2 }, { - "id" : "B1E2E45D-357A-4994-81C2-D6CE12152508", + "id" : "49414638-2496-47A2-BC5C-94755FE05A3C", "type" : 4 }, { - "id" : "ECB82BC9-83F4-45E0-BDA8-45315CBDA796", + "id" : "16CEDA8A-FD31-4B70-BCB7-F8AC35C71CE1", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?meta=%7B%22time%22:1577918418%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%206%22,%22time%22:1577918418%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918418%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "ECB82BC9-83F4-45E0-BDA8-45315CBDA796", + "id" : "16CEDA8A-FD31-4B70-BCB7-F8AC35C71CE1", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -336,7 +336,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:13 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:02 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -345,49 +345,49 @@ "type" : 1 }, { - "id" : "ECB82BC9-83F4-45E0-BDA8-45315CBDA796", + "id" : "16CEDA8A-FD31-4B70-BCB7-F8AC35C71CE1", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjMzNjk4NzIxMiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTQyODM5NzEyNSJd" }, "type" : 2 }, { - "id" : "ECB82BC9-83F4-45E0-BDA8-45315CBDA796", + "id" : "16CEDA8A-FD31-4B70-BCB7-F8AC35C71CE1", "type" : 4 }, { - "id" : "05607269-EA95-43DC-8A12-F35B1BD85E5C", + "id" : "09A40C74-4F99-425B-B174-6F210D6E8D86", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "05607269-EA95-43DC-8A12-F35B1BD85E5C", + "id" : "09A40C74-4F99-425B-B174-6F210D6E8D86", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%207%22,%22time%22:1577918419%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:14 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:03 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -396,40 +396,40 @@ "type" : 1 }, { - "id" : "05607269-EA95-43DC-8A12-F35B1BD85E5C", + "id" : "09A40C74-4F99-425B-B174-6F210D6E8D86", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjM0MjQ5MzQ2MCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTQzNDM1NzQzMSJd" }, "type" : 2 }, { - "id" : "05607269-EA95-43DC-8A12-F35B1BD85E5C", + "id" : "09A40C74-4F99-425B-B174-6F210D6E8D86", "type" : 4 }, { - "id" : "E1474B63-2F00-4EF3-8CE5-29449980F833", + "id" : "56D2A372-3F44-4FAB-9D12-6BD0A9E42FD7", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?meta=%7B%22time%22:1577918420%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%208%22,%22time%22:1577918420%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918420%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "E1474B63-2F00-4EF3-8CE5-29449980F833", + "id" : "56D2A372-3F44-4FAB-9D12-6BD0A9E42FD7", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -438,7 +438,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:14 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:04 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -447,49 +447,49 @@ "type" : 1 }, { - "id" : "E1474B63-2F00-4EF3-8CE5-29449980F833", + "id" : "56D2A372-3F44-4FAB-9D12-6BD0A9E42FD7", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjM0ODA5NzI2NCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTQ0MDQ1NzMwMiJd" }, "type" : 2 }, { - "id" : "E1474B63-2F00-4EF3-8CE5-29449980F833", + "id" : "56D2A372-3F44-4FAB-9D12-6BD0A9E42FD7", "type" : 4 }, { - "id" : "EF75BBB7-2995-4B03-915D-DFEC415F79A4", + "id" : "A482295A-2248-400C-B904-56394391FD23", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "EF75BBB7-2995-4B03-915D-DFEC415F79A4", + "id" : "A482295A-2248-400C-B904-56394391FD23", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%209%22,%22time%22:1577918421%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:15 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:06 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -498,136 +498,136 @@ "type" : 1 }, { - "id" : "EF75BBB7-2995-4B03-915D-DFEC415F79A4", + "id" : "A482295A-2248-400C-B904-56394391FD23", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjM1MzYyOTA4MSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI2NTQ2MDIxNDU1MCJd" }, "type" : 2 }, { - "id" : "EF75BBB7-2995-4B03-915D-DFEC415F79A4", + "id" : "A482295A-2248-400C-B904-56394391FD23", "type" : 4 }, { - "id" : "E6FFDEED-15CE-4EA8-8EBE-2D24F9357F17", + "id" : "5CB9E355-A7ED-4DC8-96E2-6CC991592A33", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?count=5&pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1&count=5&uuid=Serhii" }, "type" : 0 }, { - "id" : "E6FFDEED-15CE-4EA8-8EBE-2D24F9357F17", + "id" : "5CB9E355-A7ED-4DC8-96E2-6CC991592A33", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?count=5&pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1&count=5&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", - "Access-Control-Allow-Origin" : "*", + "Server" : "Pubnub Storage", + "Connection" : "keep-alive", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:27:18 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "513", + "Transfer-Encoding" : "Identity", + "Date" : "Wed, 26 Jun 2024 18:29:09 GMT", + "Content-Encoding" : "gzip", "Cache-Control" : "no-cache", - "Connection" : "keep-alive" + "Access-Control-Allow-Origin" : "*" } }, "type" : 1 }, { - "id" : "E6FFDEED-15CE-4EA8-8EBE-2D24F9357F17", + "id" : "5CB9E355-A7ED-4DC8-96E2-6CC991592A33", "data" : { "cls" : "NSData", - "base64" : "W1t7Im1lc3NhZ2UiOiB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogNSIsICJ0aW1lIjogMTU3NzkxODQxN30sICJ0aW1ldG9rZW4iOiAxNTk3MDkxMjMzMTQ4ODQ2OX0sIHsibWVzc2FnZSI6IHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiA2IiwgInRpbWUiOiAxNTc3OTE4NDE4fSwgInRpbWV0b2tlbiI6IDE1OTcwOTEyMzM2OTg3MjEyfSwgeyJtZXNzYWdlIjogeyJtZXNzYWdlSWR4IjogIm1lc3NhZ2U6IDciLCAidGltZSI6IDE1Nzc5MTg0MTl9LCAidGltZXRva2VuIjogMTU5NzA5MTIzNDI0OTM0NjB9LCB7Im1lc3NhZ2UiOiB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogOCIsICJ0aW1lIjogMTU3NzkxODQyMH0sICJ0aW1ldG9rZW4iOiAxNTk3MDkxMjM0ODA5NzI2NH0sIHsibWVzc2FnZSI6IHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiA5IiwgInRpbWUiOiAxNTc3OTE4NDIxfSwgInRpbWV0b2tlbiI6IDE1OTcwOTEyMzUzNjI5MDgxfV0sMTU5NzA5MTIzMzE0ODg0NjksMTU5NzA5MTIzNTM2MjkwODFd" + "base64" : "W1t7Im1lc3NhZ2UiOnsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDUiLCJ0aW1lIjoxNTc3OTE4NDE3fSwidGltZXRva2VuIjoxNzE5NDI2NTQyMjM5MDE1NX0seyJtZXNzYWdlIjp7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiA2IiwidGltZSI6MTU3NzkxODQxOH0sInRpbWV0b2tlbiI6MTcxOTQyNjU0MjgzOTcxMjV9LHsibWVzc2FnZSI6eyJtZXNzYWdlSWR4IjoibWVzc2FnZTogNyIsInRpbWUiOjE1Nzc5MTg0MTl9LCJ0aW1ldG9rZW4iOjE3MTk0MjY1NDM0MzU3NDMxfSx7Im1lc3NhZ2UiOnsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDgiLCJ0aW1lIjoxNTc3OTE4NDIwfSwidGltZXRva2VuIjoxNzE5NDI2NTQ0MDQ1NzMwMn0seyJtZXNzYWdlIjp7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiA5IiwidGltZSI6MTU3NzkxODQyMX0sInRpbWV0b2tlbiI6MTcxOTQyNjU0NjAyMTQ1NTB9XSwxNzE5NDI2NTQyMjM5MDE1NSwxNzE5NDI2NTQ2MDIxNDU1MF0=" }, "type" : 2 }, { - "id" : "E6FFDEED-15CE-4EA8-8EBE-2D24F9357F17", + "id" : "5CB9E355-A7ED-4DC8-96E2-6CC991592A33", "type" : 4 }, { - "id" : "8B525929-96F8-4C68-B180-CE082E005A45", + "id" : "EFBA2A12-54E9-445A-AF07-03626B2932D5", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?start=15970912331488469&count=5&uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?start=17194265422390155&count=5&uuid=Serhii&include_token=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "8B525929-96F8-4C68-B180-CE082E005A45", + "id" : "EFBA2A12-54E9-445A-AF07-03626B2932D5", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?start=15970912331488469&count=5&uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&include_token=1", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?start=17194265422390155&count=5&uuid=Serhii&include_token=1&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", - "Access-Control-Allow-Origin" : "*", + "Server" : "Pubnub Storage", + "Connection" : "keep-alive", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:27:19 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "513", + "Transfer-Encoding" : "Identity", + "Date" : "Wed, 26 Jun 2024 18:29:09 GMT", + "Content-Encoding" : "gzip", "Cache-Control" : "no-cache", - "Connection" : "keep-alive" + "Access-Control-Allow-Origin" : "*" } }, "type" : 1 }, { - "id" : "8B525929-96F8-4C68-B180-CE082E005A45", + "id" : "EFBA2A12-54E9-445A-AF07-03626B2932D5", "data" : { "cls" : "NSData", - "base64" : "W1t7Im1lc3NhZ2UiOiB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMCIsICJ0aW1lIjogMTU3NzkxODQxMn0sICJ0aW1ldG9rZW4iOiAxNTk3MDkxMjMwMzc0MTg1NX0sIHsibWVzc2FnZSI6IHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiAxIiwgInRpbWUiOiAxNTc3OTE4NDEzfSwgInRpbWV0b2tlbiI6IDE1OTcwOTEyMzA5Mjg2NDM1fSwgeyJtZXNzYWdlIjogeyJtZXNzYWdlSWR4IjogIm1lc3NhZ2U6IDIiLCAidGltZSI6IDE1Nzc5MTg0MTR9LCAidGltZXRva2VuIjogMTU5NzA5MTIzMTQ4MzcwODF9LCB7Im1lc3NhZ2UiOiB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMyIsICJ0aW1lIjogMTU3NzkxODQxNX0sICJ0aW1ldG9rZW4iOiAxNTk3MDkxMjMyMDM5NzkxOH0sIHsibWVzc2FnZSI6IHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiA0IiwgInRpbWUiOiAxNTc3OTE4NDE2fSwgInRpbWV0b2tlbiI6IDE1OTcwOTEyMzI1OTUyMDUwfV0sMTU5NzA5MTIzMDM3NDE4NTUsMTU5NzA5MTIzMjU5NTIwNTBd" + "base64" : "W1t7Im1lc3NhZ2UiOnsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDAiLCJ0aW1lIjoxNTc3OTE4NDEyfSwidGltZXRva2VuIjoxNzE5NDI2NTM5MjQ0MDE2OX0seyJtZXNzYWdlIjp7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiAxIiwidGltZSI6MTU3NzkxODQxM30sInRpbWV0b2tlbiI6MTcxOTQyNjUzOTg0MjA2NDF9LHsibWVzc2FnZSI6eyJtZXNzYWdlSWR4IjoibWVzc2FnZTogMiIsInRpbWUiOjE1Nzc5MTg0MTR9LCJ0aW1ldG9rZW4iOjE3MTk0MjY1NDA0MzQyODk1fSx7Im1lc3NhZ2UiOnsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDMiLCJ0aW1lIjoxNTc3OTE4NDE1fSwidGltZXRva2VuIjoxNzE5NDI2NTQxMDM0ODI1N30seyJtZXNzYWdlIjp7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiA0IiwidGltZSI6MTU3NzkxODQxNn0sInRpbWV0b2tlbiI6MTcxOTQyNjU0MTY0MDY2MjV9XSwxNzE5NDI2NTM5MjQ0MDE2OSwxNzE5NDI2NTQxNjQwNjYyNV0=" }, "type" : 2 }, { - "id" : "8B525929-96F8-4C68-B180-CE082E005A45", + "id" : "EFBA2A12-54E9-445A-AF07-03626B2932D5", "type" : 4 }, { - "id" : "3CBDEB92-709A-4E11-B657-D189CC868EC0", + "id" : "E38B4D67-DFF8-4D97-B50B-05295568E901", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -639,7 +639,7 @@ "type" : 0 }, { - "id" : "3CBDEB92-709A-4E11-B657-D189CC868EC0", + "id" : "E38B4D67-DFF8-4D97-B50B-05295568E901", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -647,10 +647,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:27:19 GMT", + "Date" : "Wed, 26 Jun 2024 18:29:09 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -660,7 +660,7 @@ "type" : 1 }, { - "id" : "3CBDEB92-709A-4E11-B657-D189CC868EC0", + "id" : "E38B4D67-DFF8-4D97-B50B-05295568E901", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -668,7 +668,7 @@ "type" : 2 }, { - "id" : "3CBDEB92-709A-4E11-B657-D189CC868EC0", + "id" : "E38B4D67-DFF8-4D97-B50B-05295568E901", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchOneMessageForEachChannelUsingBuilderPatternInterfaceAndReceiveResultWithExpectedOperation.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchOneMessageForEachChannelUsingBuilderPatternInterfaceAndReceiveResultWithExpectedOperation.json index 0427af5b2..839e5f6ea 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchOneMessageForEachChannelUsingBuilderPatternInterfaceAndReceiveResultWithExpectedOperation.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldFetchOneMessageForEachChannelUsingBuilderPatternInterfaceAndReceiveResultWithExpectedOperation.json @@ -569,4 +569,4 @@ "id" : "F619DD49-DEA7-4B53-B066-072B83029FA2", "type" : 4 } -] \ No newline at end of file +] diff --git a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldNotDeleteMessagesForChannelAndReceiveBadRequestStatusWhenChannelIsNil.json b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldNotDeleteMessagesForChannelAndReceiveBadRequestStatusWhenChannelIsNil.json index 9f44da976..31e2902fb 100644 --- a/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldNotDeleteMessagesForChannelAndReceiveBadRequestStatusWhenChannelIsNil.json +++ b/Tests/Support Files/Fixtures/PNHistoryIntegrationTests.bundle/ItShouldNotDeleteMessagesForChannelAndReceiveBadRequestStatusWhenChannelIsNil.json @@ -1,27 +1,27 @@ [ { - "id" : "D6FFC94A-9EB0-4971-B67A-B1E397EFBEDE", + "id" : "56080281-0095-4BDB-A665-FC991E1DB4DD", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?meta=%7B%22time%22:1577918412%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%200%22,%22time%22:1577918412%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918412%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "D6FFC94A-9EB0-4971-B67A-B1E397EFBEDE", + "id" : "56080281-0095-4BDB-A665-FC991E1DB4DD", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:23 GMT", + "Date" : "Wed, 26 Jun 2024 18:53:58 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,49 +39,49 @@ "type" : 1 }, { - "id" : "D6FFC94A-9EB0-4971-B67A-B1E397EFBEDE", + "id" : "56080281-0095-4BDB-A665-FC991E1DB4DD", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjQzMDgwNjUxNCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDM4ODQ4MjA1OSJd" }, "type" : 2 }, { - "id" : "D6FFC94A-9EB0-4971-B67A-B1E397EFBEDE", + "id" : "56080281-0095-4BDB-A665-FC991E1DB4DD", "type" : 4 }, { - "id" : "C3CFCAE4-81D4-4C99-A410-005FA74A7944", + "id" : "276DC4CA-1C06-43FC-B3B0-4D1E1782DC4F", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "C3CFCAE4-81D4-4C99-A410-005FA74A7944", + "id" : "276DC4CA-1C06-43FC-B3B0-4D1E1782DC4F", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%201%22,%22time%22:1577918413%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:23 GMT", + "Date" : "Wed, 26 Jun 2024 18:53:59 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -90,40 +90,40 @@ "type" : 1 }, { - "id" : "C3CFCAE4-81D4-4C99-A410-005FA74A7944", + "id" : "276DC4CA-1C06-43FC-B3B0-4D1E1782DC4F", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjQzNjY5NTU0MSJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDM5NDU0MzUzNiJd" }, "type" : 2 }, { - "id" : "C3CFCAE4-81D4-4C99-A410-005FA74A7944", + "id" : "276DC4CA-1C06-43FC-B3B0-4D1E1782DC4F", "type" : 4 }, { - "id" : "6D2F2331-535E-467F-8419-B27A8D0DFB60", + "id" : "6FF305B5-E267-4F1F-8D56-324D6B207F27", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?meta=%7B%22time%22:1577918414%7D&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%202%22,%22time%22:1577918414%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&meta=%7B%22time%22:1577918414%7D&uuid=Serhii&seqn=1" }, "type" : 0 }, { - "id" : "6D2F2331-535E-467F-8419-B27A8D0DFB60", + "id" : "6FF305B5-E267-4F1F-8D56-324D6B207F27", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -132,7 +132,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:24 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:00 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -141,49 +141,49 @@ "type" : 1 }, { - "id" : "6D2F2331-535E-467F-8419-B27A8D0DFB60", + "id" : "6FF305B5-E267-4F1F-8D56-324D6B207F27", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjQ0MjIzMTk0NiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDQwMDUxMzk1NyJd" }, "type" : 2 }, { - "id" : "6D2F2331-535E-467F-8419-B27A8D0DFB60", + "id" : "6FF305B5-E267-4F1F-8D56-324D6B207F27", "type" : 4 }, { - "id" : "57DE400F-98C5-4912-9CF8-9F55B5C3DFF6", + "id" : "DFBC3C18-5F22-4AB6-9DA5-D2E1273F4ADE", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?uuid=Serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "57DE400F-98C5-4912-9CF8-9F55B5C3DFF6", + "id" : "DFBC3C18-5F22-4AB6-9DA5-D2E1273F4ADE", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22messageIdx%22:%22message:%203%22,%22time%22:1577918415%7D?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 10 Aug 2020 20:27:24 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:00 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -192,82 +192,82 @@ "type" : 1 }, { - "id" : "57DE400F-98C5-4912-9CF8-9F55B5C3DFF6", + "id" : "DFBC3C18-5F22-4AB6-9DA5-D2E1273F4ADE", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTk3MDkxMjQ0NzY5OTM3MyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI4MDQwNjUwMzQxNSJd" }, "type" : 2 }, { - "id" : "57DE400F-98C5-4912-9CF8-9F55B5C3DFF6", + "id" : "DFBC3C18-5F22-4AB6-9DA5-D2E1273F4ADE", "type" : 4 }, { - "id" : "1A5F2C8F-A768-4530-9DAF-DFD210907363", + "id" : "9333EEFB-7EC2-4972-AB88-2571745DA479", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "1A5F2C8F-A768-4530-9DAF-DFD210907363", + "id" : "9333EEFB-7EC2-4972-AB88-2571745DA479", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=Serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", - "Access-Control-Allow-Origin" : "*", + "Server" : "Pubnub Storage", + "Connection" : "keep-alive", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:27:28 GMT", - "Accept-Ranges" : "bytes", - "Content-Length" : "238", + "Transfer-Encoding" : "Identity", + "Date" : "Wed, 26 Jun 2024 18:54:04 GMT", + "Content-Encoding" : "gzip", "Cache-Control" : "no-cache", - "Connection" : "keep-alive" + "Access-Control-Allow-Origin" : "*" } }, "type" : 1 }, { - "id" : "1A5F2C8F-A768-4530-9DAF-DFD210907363", + "id" : "9333EEFB-7EC2-4972-AB88-2571745DA479", "data" : { "cls" : "NSData", - "base64" : "W1t7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMCIsICJ0aW1lIjogMTU3NzkxODQxMn0sIHsibWVzc2FnZUlkeCI6ICJtZXNzYWdlOiAxIiwgInRpbWUiOiAxNTc3OTE4NDEzfSwgeyJtZXNzYWdlSWR4IjogIm1lc3NhZ2U6IDIiLCAidGltZSI6IDE1Nzc5MTg0MTR9LCB7Im1lc3NhZ2VJZHgiOiAibWVzc2FnZTogMyIsICJ0aW1lIjogMTU3NzkxODQxNX1dLDE1OTcwOTEyNDMwODA2NTE0LDE1OTcwOTEyNDQ3Njk5MzczXQ==" + "base64" : "W1t7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiAwIiwidGltZSI6MTU3NzkxODQxMn0seyJtZXNzYWdlSWR4IjoibWVzc2FnZTogMSIsInRpbWUiOjE1Nzc5MTg0MTN9LHsibWVzc2FnZUlkeCI6Im1lc3NhZ2U6IDIiLCJ0aW1lIjoxNTc3OTE4NDE0fSx7Im1lc3NhZ2VJZHgiOiJtZXNzYWdlOiAzIiwidGltZSI6MTU3NzkxODQxNX1dLDE3MTk0MjgwMzg4NDgyMDU5LDE3MTk0MjgwNDA2NTAzNDE1XQ==" }, "type" : 2 }, { - "id" : "1A5F2C8F-A768-4530-9DAF-DFD210907363", + "id" : "9333EEFB-7EC2-4972-AB88-2571745DA479", "type" : 4 }, { - "id" : "5FE07C98-515B-46DE-B4F0-0DF0758736B3", + "id" : "548FD2AD-6F8F-4DF9-A270-15AE4BEE5C96", "data" : { "method" : "delete", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" @@ -279,7 +279,7 @@ "type" : 0 }, { - "id" : "5FE07C98-515B-46DE-B4F0-0DF0758736B3", + "id" : "548FD2AD-6F8F-4DF9-A270-15AE4BEE5C96", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -287,10 +287,10 @@ "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 10 Aug 2020 20:27:28 GMT", + "Date" : "Wed, 26 Jun 2024 18:54:04 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "52", "Cache-Control" : "no-cache", @@ -300,7 +300,7 @@ "type" : 1 }, { - "id" : "5FE07C98-515B-46DE-B4F0-0DF0758736B3", + "id" : "548FD2AD-6F8F-4DF9-A270-15AE4BEE5C96", "data" : { "cls" : "NSData", "base64" : "eyJzdGF0dXMiOiAyMDAsICJlcnJvciI6IGZhbHNlLCAiZXJyb3JfbWVzc2FnZSI6ICIifQ==" @@ -308,7 +308,7 @@ "type" : 2 }, { - "id" : "5FE07C98-515B-46DE-B4F0-0DF0758736B3", + "id" : "548FD2AD-6F8F-4DF9-A270-15AE4BEE5C96", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldFetchMembershipsAndReceiveResultWithExpectedOperation.json b/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldFetchMembershipsAndReceiveResultWithExpectedOperation.json index e47f716f7..2b2511f07 100644 --- a/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldFetchMembershipsAndReceiveResultWithExpectedOperation.json +++ b/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldFetchMembershipsAndReceiveResultWithExpectedOperation.json @@ -585,12 +585,12 @@ { "id" : "C4E017B7-751F-4553-9EFA-FE169782B5D5", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/uuids\/Serhii-uuid-identifier\/channels?uuid=Serhii&limit=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Credentials" : "true", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Access-Control-Allow-Origin" : "*", "Vary" : "Accept-Encoding", "Transfer-Encoding" : "Identity", diff --git a/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldRemoveMembershipAndReceiveStatusWithExpectedOperationAndCategory.json b/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldRemoveMembershipAndReceiveStatusWithExpectedOperationAndCategory.json index 5ad3a0e41..70a8e5a9e 100644 --- a/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldRemoveMembershipAndReceiveStatusWithExpectedOperationAndCategory.json +++ b/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldRemoveMembershipAndReceiveStatusWithExpectedOperationAndCategory.json @@ -361,13 +361,13 @@ { "id" : "06FDD6B4-F18E-4B5E-95C5-10FD251FA6D4", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/uuids\/Serhii-uuid-identifier\/channels?uuid=Serhii&include=custom&limit=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Credentials" : "true", "Date" : "Thu, 04 Jun 2020 19:43:58 GMT", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Content-Length" : "175", "Connection" : "keep-alive", "Access-Control-Allow-Origin" : "*" diff --git a/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldRemoveMembershipUsingManageAndReceiveStatusWithExpectedOperationAndCategory.json b/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldRemoveMembershipUsingManageAndReceiveStatusWithExpectedOperationAndCategory.json index abeb76ebb..c4a5bee06 100644 --- a/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldRemoveMembershipUsingManageAndReceiveStatusWithExpectedOperationAndCategory.json +++ b/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldRemoveMembershipUsingManageAndReceiveStatusWithExpectedOperationAndCategory.json @@ -361,13 +361,13 @@ { "id" : "4B014FCF-6400-4772-A2B4-74023AE960B2", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/uuids\/Serhii-uuid-identifier\/channels?uuid=Serhii&include=custom&limit=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Credentials" : "true", "Date" : "Thu, 04 Jun 2020 19:44:42 GMT", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Content-Length" : "175", "Connection" : "keep-alive", "Access-Control-Allow-Origin" : "*" diff --git a/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldSetMembershipAndReturnSortedMembershipsInformationWhenSortIsSet.json b/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldSetMembershipAndReturnSortedMembershipsInformationWhenSortIsSet.json index 13aecfb76..11b9c129e 100644 --- a/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldSetMembershipAndReturnSortedMembershipsInformationWhenSortIsSet.json +++ b/Tests/Support Files/Fixtures/PNMembershipIntegrationTest.bundle/ItShouldSetMembershipAndReturnSortedMembershipsInformationWhenSortIsSet.json @@ -303,12 +303,12 @@ { "id" : "550EAA37-053F-4A30-BB34-C345DF2A5D6D", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/uuids\/Serhii-uuid-identifier\/channels?sort=channel.name:desc&count=1&limit=100&pnsdk=PubNub-ObjC-iOS\/4.x.x&include=channel,channel.custom&uuid=Serhii", "headers" : { "Access-Control-Allow-Credentials" : "true", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Access-Control-Allow-Origin" : "*", "Vary" : "Accept-Encoding", "Transfer-Encoding" : "Identity", diff --git a/Tests/Support Files/Fixtures/PNPresenceIntegrationTest.bundle/ItShouldFetchGlobalHereNowWithParticipantsOccupancyWhenOccupancyVerbosityIsSet.json b/Tests/Support Files/Fixtures/PNPresenceIntegrationTest.bundle/ItShouldFetchGlobalHereNowWithParticipantsOccupancyWhenOccupancyVerbosityIsSet.json index 6af771312..fe896b94b 100644 --- a/Tests/Support Files/Fixtures/PNPresenceIntegrationTest.bundle/ItShouldFetchGlobalHereNowWithParticipantsOccupancyWhenOccupancyVerbosityIsSet.json +++ b/Tests/Support Files/Fixtures/PNPresenceIntegrationTest.bundle/ItShouldFetchGlobalHereNowWithParticipantsOccupancyWhenOccupancyVerbosityIsSet.json @@ -239,12 +239,12 @@ { "id" : "F23A083F-AD68-4452-B42D-B4270B91E696", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/presence\/sub-key\/demo?disable_uuids=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=Serhii&state=0", "headers" : { "Access-Control-Allow-Methods" : "OPTIONS, GET, POST", - "Content-Type" : "text\/javascript; charset=\"UTF-8\"", + "Content-Type" : "text\/html; charset=\"UTF-8\"", "Server" : "Pubnub Presence", "Access-Control-Allow-Origin" : "*", "Age" : "0", diff --git a/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldFireMessageAndFetchEmptyHistory.json b/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldFireMessageAndFetchEmptyHistory.json index 2ceab653e..7bcbeee4e 100644 --- a/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldFireMessageAndFetchEmptyHistory.json +++ b/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldFireMessageAndFetchEmptyHistory.json @@ -1,36 +1,36 @@ [ { - "id" : "E046F8F1-84F7-4C6E-ACAE-D453359491EF", + "id" : "A47B43C3-82DC-4808-8E38-563442A883A0", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.2.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22hello%22:%5B%22there%22,%7B%22general%22:%22kenobi%22%7D%5D%7D?norep=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=serhii&store=0" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22hello%22:%5B%22there%22,%7B%22general%22:%22kenobi%22%7D%5D%7D?norep=1&uuid=serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&store=0" }, "type" : 0 }, { - "id" : "E046F8F1-84F7-4C6E-ACAE-D453359491EF", + "id" : "A47B43C3-82DC-4808-8E38-563442A883A0", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22hello%22:%5B%22there%22,%7B%22general%22:%22kenobi%22%7D%5D%7D?uuid=serhii&store=0&norep=1&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22hello%22:%5B%22there%22,%7B%22general%22:%22kenobi%22%7D%5D%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&store=0&norep=1&seqn=1&uuid=serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 06 Jan 2020 00:23:47 GMT", + "Date" : "Wed, 26 Jun 2024 19:23:10 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,51 +39,51 @@ "type" : 1 }, { - "id" : "E046F8F1-84F7-4C6E-ACAE-D453359491EF", + "id" : "A47B43C3-82DC-4808-8E38-563442A883A0", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTc4MjcwMjI3OTc0MzQwNiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI5NzkwMzYzNDU3OSJd" }, "type" : 2 }, { - "id" : "E046F8F1-84F7-4C6E-ACAE-D453359491EF", + "id" : "A47B43C3-82DC-4808-8E38-563442A883A0", "type" : 4 }, { - "id" : "78D85E6C-C37E-4F70-9C88-4E3D62428F92", + "id" : "E9D3F526-9395-40CA-AA77-96C2F2310E77", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.2.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "78D85E6C-C37E-4F70-9C88-4E3D62428F92", + "id" : "E9D3F526-9395-40CA-AA77-96C2F2310E77", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 06 Jan 2020 00:23:54 GMT", + "Date" : "Wed, 26 Jun 2024 19:23:16 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "8", "Cache-Control" : "no-cache", @@ -93,7 +93,7 @@ "type" : 1 }, { - "id" : "78D85E6C-C37E-4F70-9C88-4E3D62428F92", + "id" : "E9D3F526-9395-40CA-AA77-96C2F2310E77", "data" : { "cls" : "NSData", "base64" : "W1tdLDAsMF0=" @@ -101,7 +101,7 @@ "type" : 2 }, { - "id" : "78D85E6C-C37E-4F70-9C88-4E3D62428F92", + "id" : "E9D3F526-9395-40CA-AA77-96C2F2310E77", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishAndFetchEmptyHistoryWhenStoreInHistoryDisabled.json b/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishAndFetchEmptyHistoryWhenStoreInHistoryDisabled.json index a5eac2c34..332207ecc 100644 --- a/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishAndFetchEmptyHistoryWhenStoreInHistoryDisabled.json +++ b/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishAndFetchEmptyHistoryWhenStoreInHistoryDisabled.json @@ -1,27 +1,27 @@ [ { - "id" : "80D418AE-1B71-4429-8358-E07D297865E0", + "id" : "0D3D4DC1-AF6F-4430-8DD0-BAA1AF0B654A", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.2.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22Hello%20there%22?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=serhii&store=0" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22Hello%20there%22?pnsdk=PubNub-ObjC-iOS\/4.x.x&store=0&uuid=serhii&seqn=1" }, "type" : 0 }, { - "id" : "80D418AE-1B71-4429-8358-E07D297865E0", + "id" : "0D3D4DC1-AF6F-4430-8DD0-BAA1AF0B654A", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 06 Jan 2020 00:24:00 GMT", + "Date" : "Wed, 26 Jun 2024 19:18:10 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,51 +39,51 @@ "type" : 1 }, { - "id" : "80D418AE-1B71-4429-8358-E07D297865E0", + "id" : "0D3D4DC1-AF6F-4430-8DD0-BAA1AF0B654A", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTc4MjcwMjQwOTMyMDY4NCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI5NDkwNjAxMDE4OSJd" }, "type" : 2 }, { - "id" : "80D418AE-1B71-4429-8358-E07D297865E0", + "id" : "0D3D4DC1-AF6F-4430-8DD0-BAA1AF0B654A", "type" : 4 }, { - "id" : "7054DB9D-82C1-4009-9C9A-FB4DB14A3DB5", + "id" : "15672DF8-2A4D-4F7E-9F6E-E64098DF71E6", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.2.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "7054DB9D-82C1-4009-9C9A-FB4DB14A3DB5", + "id" : "15672DF8-2A4D-4F7E-9F6E-E64098DF71E6", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 06 Jan 2020 00:24:07 GMT", + "Date" : "Wed, 26 Jun 2024 19:18:16 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "8", "Cache-Control" : "no-cache", @@ -93,7 +93,7 @@ "type" : 1 }, { - "id" : "7054DB9D-82C1-4009-9C9A-FB4DB14A3DB5", + "id" : "15672DF8-2A4D-4F7E-9F6E-E64098DF71E6", "data" : { "cls" : "NSData", "base64" : "W1tdLDAsMF0=" @@ -101,7 +101,7 @@ "type" : 2 }, { - "id" : "7054DB9D-82C1-4009-9C9A-FB4DB14A3DB5", + "id" : "15672DF8-2A4D-4F7E-9F6E-E64098DF71E6", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishAndFetchMessageFromHistory.json b/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishAndFetchMessageFromHistory.json index d1efeecd2..0e7b3a540 100644 --- a/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishAndFetchMessageFromHistory.json +++ b/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishAndFetchMessageFromHistory.json @@ -1,36 +1,36 @@ [ { - "id" : "B212552D-628F-47CC-9BF9-AEFE3CA10F38", + "id" : "E4F7D29F-7EE0-49D9-B293-20352A64C4A6", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.2.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22Hello%20there%22?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22Hello%20there%22?uuid=serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "B212552D-628F-47CC-9BF9-AEFE3CA10F38", + "id" : "E4F7D29F-7EE0-49D9-B293-20352A64C4A6", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22Hello%20there%22?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22Hello%20there%22?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 06 Jan 2020 00:24:07 GMT", + "Date" : "Wed, 26 Jun 2024 19:16:58 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,51 +39,51 @@ "type" : 1 }, { - "id" : "B212552D-628F-47CC-9BF9-AEFE3CA10F38", + "id" : "E4F7D29F-7EE0-49D9-B293-20352A64C4A6", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTc4MjcwMjQ3Nzk5MTUxNiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI5NDE4MjMxNzQxMCJd" }, "type" : 2 }, { - "id" : "B212552D-628F-47CC-9BF9-AEFE3CA10F38", + "id" : "E4F7D29F-7EE0-49D9-B293-20352A64C4A6", "type" : 4 }, { - "id" : "228BAEFA-8F97-400F-856D-AE955258636B", + "id" : "8FA7FA86-1FBB-4F29-A077-E2BB7DB626B4", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.2.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "228BAEFA-8F97-400F-856D-AE955258636B", + "id" : "8FA7FA86-1FBB-4F29-A077-E2BB7DB626B4", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 06 Jan 2020 00:24:13 GMT", + "Date" : "Wed, 26 Jun 2024 19:17:04 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "53", "Cache-Control" : "no-cache", @@ -93,15 +93,15 @@ "type" : 1 }, { - "id" : "228BAEFA-8F97-400F-856D-AE955258636B", + "id" : "8FA7FA86-1FBB-4F29-A077-E2BB7DB626B4", "data" : { "cls" : "NSData", - "base64" : "W1siSGVsbG8gdGhlcmUiXSwxNTc4MjcwMjQ3Nzk5MTUxNiwxNTc4MjcwMjQ3Nzk5MTUxNl0=" + "base64" : "W1siSGVsbG8gdGhlcmUiXSwxNzE5NDI5NDE4MjMxNzQxMCwxNzE5NDI5NDE4MjMxNzQxMF0=" }, "type" : 2 }, { - "id" : "228BAEFA-8F97-400F-856D-AE955258636B", + "id" : "8FA7FA86-1FBB-4F29-A077-E2BB7DB626B4", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishCompressedAndFetchEmptyHistoryWhenStoreInHistoryDisabled.json b/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishCompressedAndFetchEmptyHistoryWhenStoreInHistoryDisabled.json index 95be4a875..07f5d02ca 100644 --- a/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishCompressedAndFetchEmptyHistoryWhenStoreInHistoryDisabled.json +++ b/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishCompressedAndFetchEmptyHistoryWhenStoreInHistoryDisabled.json @@ -1,19 +1,19 @@ [ { - "id" : "D3BE83EF-CCEA-458C-9AA8-AB9ECBE2A0BD", + "id" : "63B40961-F809-4175-8FC8-228253BC2DF8", "data" : { "method" : "post", "cls" : "NSURLRequest", "cellular" : true, "network" : 0, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { "Accept" : "*\/*", - "Content-Type" : "application\/json;charset=UTF-8", + "Content-Type" : "application\/json", "Content-Encoding" : "gzip", - "User-Agent" : "iPhone; CPU iPhone OS 12.2.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Content-Length" : "33", "Accept-Encoding" : "gzip,deflate", "Connection" : "keep-alive" @@ -23,12 +23,12 @@ "base64" : "H4sIAAAAAAAAE1PySM3JyVcoyUgtSlUCAN9I1tMNAAAA" }, "pipeline" : false, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=serhii&store=0" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0?pnsdk=PubNub-ObjC-iOS\/4.x.x&store=0&uuid=serhii&seqn=1" }, "type" : 0 }, { - "id" : "D3BE83EF-CCEA-458C-9AA8-AB9ECBE2A0BD", + "id" : "63B40961-F809-4175-8FC8-228253BC2DF8", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -37,7 +37,7 @@ "Access-Control-Allow-Credentials" : "true", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Methods" : "POST", - "Date" : "Mon, 06 Jan 2020 00:24:16 GMT", + "Date" : "Wed, 26 Jun 2024 19:22:26 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -46,51 +46,51 @@ "type" : 1 }, { - "id" : "D3BE83EF-CCEA-458C-9AA8-AB9ECBE2A0BD", + "id" : "63B40961-F809-4175-8FC8-228253BC2DF8", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTc4MjcwMjU2MjQ2NzM5MyJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI5NzQ2MTk4ODczMyJd" }, "type" : 2 }, { - "id" : "D3BE83EF-CCEA-458C-9AA8-AB9ECBE2A0BD", + "id" : "63B40961-F809-4175-8FC8-228253BC2DF8", "type" : 4 }, { - "id" : "C41B2E60-BE1A-4706-8628-1698207E8408", + "id" : "9CE6F64E-C25F-41BE-960F-F6E212B9B52B", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.2.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "C41B2E60-BE1A-4706-8628-1698207E8408", + "id" : "9CE6F64E-C25F-41BE-960F-F6E212B9B52B", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 06 Jan 2020 00:24:22 GMT", + "Date" : "Wed, 26 Jun 2024 19:22:32 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "8", "Cache-Control" : "no-cache", @@ -100,7 +100,7 @@ "type" : 1 }, { - "id" : "C41B2E60-BE1A-4706-8628-1698207E8408", + "id" : "9CE6F64E-C25F-41BE-960F-F6E212B9B52B", "data" : { "cls" : "NSData", "base64" : "W1tdLDAsMF0=" @@ -108,7 +108,7 @@ "type" : 2 }, { - "id" : "C41B2E60-BE1A-4706-8628-1698207E8408", + "id" : "9CE6F64E-C25F-41BE-960F-F6E212B9B52B", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishCompressedMessageWithMobilePayloadAndFetchMessageFromHistory.json b/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishCompressedMessageWithMobilePayloadAndFetchMessageFromHistory.json index ee31e6016..82b61bcf7 100644 --- a/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishCompressedMessageWithMobilePayloadAndFetchMessageFromHistory.json +++ b/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishCompressedMessageWithMobilePayloadAndFetchMessageFromHistory.json @@ -1,19 +1,19 @@ [ { - "id" : "95E5F23A-1DE2-494C-B764-85DFCC4E6011", + "id" : "710401E0-8E1A-4F57-8004-67D4DCE6A2EC", "data" : { "method" : "post", "cls" : "NSURLRequest", "cellular" : true, "network" : 0, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { "Accept" : "*\/*", - "Content-Type" : "application\/json;charset=UTF-8", + "Content-Type" : "application\/json", "Content-Encoding" : "gzip", - "User-Agent" : "iPhone; CPU iPhone OS 12.2.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Content-Length" : "90", "Accept-Encoding" : "gzip,deflate", "Connection" : "keep-alive" @@ -23,21 +23,21 @@ "base64" : "H4sIAAAAAAAAE6tWykjNyclXsopWKslILUpV0qlWSk\/NSy1KzFGyUspOzctPylSqjdVRKsiLTyzIK1ayqlZKLIBQOalFJUBFHiADFCC6a2trAXOelERSAAAA" }, "pipeline" : false, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0?uuid=serhii&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "95E5F23A-1DE2-494C-B764-85DFCC4E6011", + "id" : "710401E0-8E1A-4F57-8004-67D4DCE6A2EC", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=serhii", + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0?seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&uuid=serhii", "headers" : { "Access-Control-Allow-Credentials" : "true", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Methods" : "POST", - "Date" : "Mon, 06 Jan 2020 00:24:25 GMT", + "Date" : "Wed, 26 Jun 2024 19:21:15 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -46,51 +46,51 @@ "type" : 1 }, { - "id" : "95E5F23A-1DE2-494C-B764-85DFCC4E6011", + "id" : "710401E0-8E1A-4F57-8004-67D4DCE6A2EC", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTc4MjcwMjY1MTk5Njc0NCJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI5Njc1NTMwMTQ2NiJd" }, "type" : 2 }, { - "id" : "95E5F23A-1DE2-494C-B764-85DFCC4E6011", + "id" : "710401E0-8E1A-4F57-8004-67D4DCE6A2EC", "type" : 4 }, { - "id" : "636E0172-22F1-419B-ADFC-0712783D8313", + "id" : "541B2B81-23D5-477C-B1B7-A16C0EB267F8", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.2.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "636E0172-22F1-419B-ADFC-0712783D8313", + "id" : "541B2B81-23D5-477C-B1B7-A16C0EB267F8", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 06 Jan 2020 00:24:31 GMT", + "Date" : "Wed, 26 Jun 2024 19:21:21 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "122", "Cache-Control" : "no-cache", @@ -100,15 +100,15 @@ "type" : 1 }, { - "id" : "636E0172-22F1-419B-ADFC-0712783D8313", + "id" : "541B2B81-23D5-477C-B1B7-A16C0EB267F8", "data" : { "cls" : "NSData", - "base64" : "W1t7ImhlbGxvIjpbInRoZXJlIix7ImdlbmVyYWwiOiJrZW5vYmkifV0sInBuX2FwbnMiOnsiYXBzIjp7ImFsZXJ0IjoiSGVsbG8gdGhlcmUifX19XSwxNTc4MjcwMjY1MTk5Njc0NCwxNTc4MjcwMjY1MTk5Njc0NF0=" + "base64" : "W1t7InBuX2FwbnMiOnsiYXBzIjp7ImFsZXJ0IjoiSGVsbG8gdGhlcmUifX0sImhlbGxvIjpbInRoZXJlIix7ImdlbmVyYWwiOiJrZW5vYmkifV19XSwxNzE5NDI5Njc1NTMwMTQ2NiwxNzE5NDI5Njc1NTMwMTQ2Nl0=" }, "type" : 2 }, { - "id" : "636E0172-22F1-419B-ADFC-0712783D8313", + "id" : "541B2B81-23D5-477C-B1B7-A16C0EB267F8", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishMessageWithMobilePayloadAndFetchEmptyHistoryWhenStoreInHistoryDisabled.json b/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishMessageWithMobilePayloadAndFetchEmptyHistoryWhenStoreInHistoryDisabled.json index 2ba7e3f2c..ca9ef2b08 100644 --- a/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishMessageWithMobilePayloadAndFetchEmptyHistoryWhenStoreInHistoryDisabled.json +++ b/Tests/Support Files/Fixtures/PNPublishIntegrationTests.bundle/ItShouldPublishMessageWithMobilePayloadAndFetchEmptyHistoryWhenStoreInHistoryDisabled.json @@ -1,27 +1,27 @@ [ { - "id" : "7C031112-1B53-4F23-9B49-0F66E8CED1D5", + "id" : "55CCFD89-C092-4F87-A418-47D7E0554485", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.2.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22hello%22:%5B%22there%22,%7B%22general%22:%22kenobi%22%7D%5D,%22pn_apns%22:%7B%22aps%22:%7B%22alert%22:%22Hello%20there%22%7D%7D%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=serhii&store=0" + "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%7B%22hello%22:%5B%22there%22,%7B%22general%22:%22kenobi%22%7D%5D,%22pn_apns%22:%7B%22aps%22:%7B%22alert%22:%22Hello%20there%22%7D%7D%7D?pnsdk=PubNub-ObjC-iOS\/4.x.x&store=0&uuid=serhii&seqn=1" }, "type" : 0 }, { - "id" : "7C031112-1B53-4F23-9B49-0F66E8CED1D5", + "id" : "55CCFD89-C092-4F87-A418-47D7E0554485", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", @@ -30,7 +30,7 @@ "Access-Control-Allow-Methods" : "GET", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", - "Date" : "Mon, 06 Jan 2020 00:24:34 GMT", + "Date" : "Wed, 26 Jun 2024 19:20:30 GMT", "Content-Length" : "30", "Cache-Control" : "no-cache", "Connection" : "keep-alive" @@ -39,51 +39,51 @@ "type" : 1 }, { - "id" : "7C031112-1B53-4F23-9B49-0F66E8CED1D5", + "id" : "55CCFD89-C092-4F87-A418-47D7E0554485", "data" : { "cls" : "NSData", - "base64" : "WzEsIlNlbnQiLCIxNTc4MjcwMjc0NzMwNDYxNiJd" + "base64" : "WzEsIlNlbnQiLCIxNzE5NDI5NjMwMTUzNTYwMSJd" }, "type" : 2 }, { - "id" : "7C031112-1B53-4F23-9B49-0F66E8CED1D5", + "id" : "55CCFD89-C092-4F87-A418-47D7E0554485", "type" : 4 }, { - "id" : "F1FCAB6B-CBA4-41B9-B3A5-7E81B141BABC", + "id" : "2DCD3D36-A5A3-4449-910E-00C52ACD4A6A", "data" : { "method" : "get", "cls" : "NSURLRequest", "cellular" : true, "cache" : 1, - "timeout" : 60, + "timeout" : 10, "cookies" : true, "headers" : { - "User-Agent" : "iPhone; CPU iPhone OS 12.2.0 Version", + "User-Agent" : "xctest\/22720 (iPhone; iOS 17.5.0; arm64) PubNub-ObjC\/5.4.1", "Accept" : "*\/*", "Connection" : "keep-alive", "Accept-Encoding" : "gzip,deflate" }, "pipeline" : false, "network" : 0, - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100" + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x" }, "type" : 0 }, { - "id" : "F1FCAB6B-CBA4-41B9-B3A5-7E81B141BABC", + "id" : "2DCD3D36-A5A3-4449-910E-00C52ACD4A6A", "data" : { "status" : 200, "cls" : "NSHTTPURLResponse", - "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x&count=100", + "url" : "https:\/\/ps.pndsn.com\/v2\/history\/sub-key\/demo\/channel\/test-channel?uuid=serhii&count=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Methods" : "GET, POST, DELETE, OPTIONS", "Content-Type" : "text\/javascript; charset=\"UTF-8\"", - "Server" : "Pubnub", + "Server" : "Pubnub Storage", "Access-Control-Allow-Origin" : "*", "Age" : "0", - "Date" : "Mon, 06 Jan 2020 00:24:40 GMT", + "Date" : "Wed, 26 Jun 2024 19:20:36 GMT", "Accept-Ranges" : "bytes", "Content-Length" : "8", "Cache-Control" : "no-cache", @@ -93,7 +93,7 @@ "type" : 1 }, { - "id" : "F1FCAB6B-CBA4-41B9-B3A5-7E81B141BABC", + "id" : "2DCD3D36-A5A3-4449-910E-00C52ACD4A6A", "data" : { "cls" : "NSData", "base64" : "W1tdLDAsMF0=" @@ -101,7 +101,7 @@ "type" : 2 }, { - "id" : "F1FCAB6B-CBA4-41B9-B3A5-7E81B141BABC", + "id" : "2DCD3D36-A5A3-4449-910E-00C52ACD4A6A", "type" : 4 } ] \ No newline at end of file diff --git a/Tests/Support Files/Fixtures/PNRequestRetryConfigurationIntegrationTest.bundle/ItShouldRetryRequestTwiceWithLinearPolicy.json b/Tests/Support Files/Fixtures/PNRequestRetryConfigurationIntegrationTest.bundle/ItShouldRetryRequestTwiceWithLinearPolicy.json index 2457a8505..b552a8c0f 100644 --- a/Tests/Support Files/Fixtures/PNRequestRetryConfigurationIntegrationTest.bundle/ItShouldRetryRequestTwiceWithLinearPolicy.json +++ b/Tests/Support Files/Fixtures/PNRequestRetryConfigurationIntegrationTest.bundle/ItShouldRetryRequestTwiceWithLinearPolicy.json @@ -28,7 +28,7 @@ "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22hello-world%22?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", - "Content-Type" : "text\/javascript; charset=\"UTF-8\"", + "Content-Type" : "text\/html; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", "Date" : "Mon, 18 Dec 2023 08:15:25 GMT", "Content-Length" : "160", @@ -79,7 +79,7 @@ "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22hello-world%22?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", - "Content-Type" : "text\/javascript; charset=\"UTF-8\"", + "Content-Type" : "text\/html; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", "Date" : "Mon, 18 Dec 2023 08:15:25 GMT", "Content-Length" : "160", @@ -130,7 +130,7 @@ "url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22hello-world%22?pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=Serhii", "headers" : { "Access-Control-Allow-Methods" : "GET", - "Content-Type" : "text\/javascript; charset=\"UTF-8\"", + "Content-Type" : "text\/html; charset=\"UTF-8\"", "Access-Control-Allow-Origin" : "*", "Date" : "Mon, 18 Dec 2023 08:15:25 GMT", "Content-Length" : "160", diff --git a/Tests/Support Files/Fixtures/PNTimeIntegrationTest.bundle/ItShouldFetchPubNubTimeAfterRetry.json b/Tests/Support Files/Fixtures/PNTimeIntegrationTest.bundle/ItShouldFetchPubNubTimeAfterRetry.json index 2fe1939aa..61a6eb24d 100644 --- a/Tests/Support Files/Fixtures/PNTimeIntegrationTest.bundle/ItShouldFetchPubNubTimeAfterRetry.json +++ b/Tests/Support Files/Fixtures/PNTimeIntegrationTest.bundle/ItShouldFetchPubNubTimeAfterRetry.json @@ -23,12 +23,12 @@ { "id" : "583E20C1-589F-4FEB-9E83-37EEF32FD2B7", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/time\/0?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Date" : "Sun, 26 Jan 2020 21:10:20 GMT", - "Content-Type" : "text\/javascript; charset=\"UTF-8\"", + "Content-Type" : "text\/html; charset=\"UTF-8\"", "Connection" : "keep-alive", "Cache-Control" : "no-cache", "Content-Length" : "19" @@ -97,4 +97,4 @@ "id" : "583E20C1-589F-4FEB-9E83-37EEF32FD2B8", "type" : 4 } -] \ No newline at end of file +] diff --git a/Tests/Support Files/Fixtures/PNUUIDMetadataIntegrationTest.bundle/ItShouldFetchAllUUIDMetadataAndReceiveResultWithExpectedOperation.json b/Tests/Support Files/Fixtures/PNUUIDMetadataIntegrationTest.bundle/ItShouldFetchAllUUIDMetadataAndReceiveResultWithExpectedOperation.json index eaed96fa4..92ff45f88 100644 --- a/Tests/Support Files/Fixtures/PNUUIDMetadataIntegrationTest.bundle/ItShouldFetchAllUUIDMetadataAndReceiveResultWithExpectedOperation.json +++ b/Tests/Support Files/Fixtures/PNUUIDMetadataIntegrationTest.bundle/ItShouldFetchAllUUIDMetadataAndReceiveResultWithExpectedOperation.json @@ -471,12 +471,12 @@ { "id" : "9CF0E593-CBF7-432A-89FD-27090CBE0037", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/uuids?uuid=Serhii&limit=100&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Credentials" : "true", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Access-Control-Allow-Origin" : "*", "Vary" : "Accept-Encoding", "Transfer-Encoding" : "Identity", diff --git a/Tests/Support Files/Fixtures/PNUUIDMetadataIntegrationTest.bundle/ItShouldRemoveUUIDMetadataAndReceiveStatusWithExpectedOperationAndCategory.json b/Tests/Support Files/Fixtures/PNUUIDMetadataIntegrationTest.bundle/ItShouldRemoveUUIDMetadataAndReceiveStatusWithExpectedOperationAndCategory.json index f623f1674..7226d0c7d 100644 --- a/Tests/Support Files/Fixtures/PNUUIDMetadataIntegrationTest.bundle/ItShouldRemoveUUIDMetadataAndReceiveStatusWithExpectedOperationAndCategory.json +++ b/Tests/Support Files/Fixtures/PNUUIDMetadataIntegrationTest.bundle/ItShouldRemoveUUIDMetadataAndReceiveStatusWithExpectedOperationAndCategory.json @@ -239,13 +239,13 @@ { "id" : "2B58734A-B474-4FF8-85B2-192E08FBB511", "data" : { - "status" : 404, + "status" : 200, "cls" : "NSHTTPURLResponse", "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/uuids\/Serhii-uuid-identifier?uuid=Serhii&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Credentials" : "true", "Date" : "Thu, 04 Jun 2020 19:57:02 GMT", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Content-Length" : "26", "Connection" : "keep-alive", "Access-Control-Allow-Origin" : "*" diff --git a/Tests/Support Files/Fixtures/PNUUIDMetadataIntegrationTest.bundle/ItShouldSetUUIDMetadataWhenAdditionalInformationIsSet.json b/Tests/Support Files/Fixtures/PNUUIDMetadataIntegrationTest.bundle/ItShouldSetUUIDMetadataWhenAdditionalInformationIsSet.json index 83335e34c..48b1e1d6a 100644 --- a/Tests/Support Files/Fixtures/PNUUIDMetadataIntegrationTest.bundle/ItShouldSetUUIDMetadataWhenAdditionalInformationIsSet.json +++ b/Tests/Support Files/Fixtures/PNUUIDMetadataIntegrationTest.bundle/ItShouldSetUUIDMetadataWhenAdditionalInformationIsSet.json @@ -134,7 +134,7 @@ "url" : "https:\/\/ps.pndsn.com\/v2\/objects\/demo\/uuids\/test-uuid?uuid=Serhii&include=custom&pnsdk=PubNub-ObjC-iOS\/4.x.x", "headers" : { "Access-Control-Allow-Credentials" : "true", - "Content-Type" : "application\/json", + "Content-Type" : "text\/html", "Access-Control-Allow-Origin" : "*", "Vary" : "Accept-Encoding", "Transfer-Encoding" : "Identity", diff --git a/Tests/Tests/Helpers/PNRecordableTestCase.m b/Tests/Tests/Helpers/PNRecordableTestCase.m index 659956a90..b616f2d25 100644 --- a/Tests/Tests/Helpers/PNRecordableTestCase.m +++ b/Tests/Tests/Helpers/PNRecordableTestCase.m @@ -13,6 +13,7 @@ #define WRITING_CASSETTES 0 #define PUBNUB_LOGGER_ENABLED NO +#define PUBNUB_DISABLE_LOGGER #pragma mark - Types and structures @@ -283,6 +284,9 @@ - (void)loadTestsConfiguration; @implementation PNRecordableTestCase +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #pragma mark - Information @@ -784,10 +788,12 @@ - (PubNub *)createPubNubForUser:(NSString *)user withConfiguration:(PNConfigurat configuration.userID = [self uuidForUser:user]; PubNub *client = [PubNub clientWithConfiguration:configuration callbackQueue:callbackQueue]; +#ifndef PUBNUB_DISABLE_LOGGER client.logger.enabled = PUBNUB_LOGGER_ENABLED; client.logger.logLevel = PUBNUB_LOGGER_ENABLED ? PNVerboseLogLevel : PNSilentLogLevel; client.logger.writeToConsole = PUBNUB_LOGGER_ENABLED; client.logger.writeToFile = PUBNUB_LOGGER_ENABLED; +#endif // PUBNUB_DISABLE_LOGGER [client addListener:self]; if (!self.clients[user]) { @@ -1458,12 +1464,14 @@ - (void)removeUUID:(NSString *)uuid membershipForChannels:(NSArray * .uuid(uuid) .channels(channels) .performWithCompletion(^(PNManageMembershipsStatus *status) { - XCTAssertFalse(status.isError); - - if (status.isError) { - NSLog(@"'%@' UUID MEMBERSHIP REMOVE ERROR: %@\n%@", - uuid, status.errorData.information, - [status valueForKey:@"clientRequest"]); + if (YHVVCR.cassette.isNewCassette) { + XCTAssertFalse(status.isError, @"Error reason: %@", status.errorData.information); + + if (status.isError) { + NSLog(@"'%@' UUID MEMBERSHIP REMOVE ERROR: %@\n%@", + uuid, status.errorData.information, + [status valueForKey:@"clientRequest"]); + } } handler(); @@ -1495,14 +1503,16 @@ - (void)removeUUIDsMetadata:(NSArray *)uuids usingClient:(nullable P client.objects().removeUUIDMetadata() .uuid(uuid) .performWithCompletion(^(PNAcknowledgmentStatus *status) { - XCTAssertFalse(status.isError); - - if (status.isError) { - NSLog(@"'%@' UUID METADATA REMOVE ERROR: %@\n%@", - uuid, status.errorData.information, - [status valueForKey:@"clientRequest"]); + if (YHVVCR.cassette.isNewCassette) { + XCTAssertFalse(status.isError, @"Error reason: %@", status.errorData.information); + + if (status.isError) { + NSLog(@"'%@' UUID METADATA REMOVE ERROR: %@\n%@", + uuid, status.errorData.information, + [status valueForKey:@"clientRequest"]); + } } - + handler(); }); }]; @@ -1752,14 +1762,16 @@ - (void)removeChannelsMetadata:(NSArray *)channels usingClient:(null for (NSString *channel in channels) { [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { client.objects().removeChannelMetadata(channel).performWithCompletion(^(PNAcknowledgmentStatus *status) { - XCTAssertFalse(status.isError); - - if (status.isError) { - NSLog(@"'%@' CHANNEL METADATA REMOVE ERROR: %@\n%@", - channel, status.errorData.information, - [status valueForKey:@"clientRequest"]); + if (YHVVCR.cassette.isNewCassette) { + XCTAssertFalse(status.isError, @"Error reason: %@", status.errorData.information); + + if (status.isError) { + NSLog(@"'%@' CHANNEL METADATA REMOVE ERROR: %@\n%@", + channel, status.errorData.information, + [status valueForKey:@"clientRequest"]); + } } - + handler(); }); }]; @@ -2089,7 +2101,7 @@ - (void)waitToCompleteIn:(NSTimeInterval)delay - (void)waitToCompleteIn:(NSTimeInterval)delay codeBlock:(void(^)(dispatch_block_t handler))codeBlock afterBlock:(void(^)(void))initialBlock { - + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); __block BOOL handlerCalled = NO; @@ -2099,15 +2111,15 @@ - (void)waitToCompleteIn:(NSTimeInterval)delay dispatch_semaphore_signal(semaphore); } }); - + if (initialBlock) { initialBlock(); } - + dispatch_time_t timeout = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)); dispatch_semaphore_wait(semaphore, timeout); - + XCTAssertTrue(handlerCalled); } @@ -2372,5 +2384,7 @@ - (void)loadTestsConfiguration { #pragma mark - +#pragma clang diagnostic pop + @end diff --git a/Tests/Tests/Integration/Actions/PNMessageActionsIntegrationTest.m b/Tests/Tests/Integration/Actions/PNMessageActionsIntegrationTest.m index c2c91c02a..3e08f647a 100644 --- a/Tests/Tests/Integration/Actions/PNMessageActionsIntegrationTest.m +++ b/Tests/Tests/Integration/Actions/PNMessageActionsIntegrationTest.m @@ -25,6 +25,7 @@ @implementation PNMessageActionsIntegrationTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down diff --git a/Tests/Tests/Integration/Files/PNFilesIntegrationTests.m b/Tests/Tests/Integration/Files/PNFilesIntegrationTests.m index 0b496a32a..680ab2d70 100644 --- a/Tests/Tests/Integration/Files/PNFilesIntegrationTests.m +++ b/Tests/Tests/Integration/Files/PNFilesIntegrationTests.m @@ -46,6 +46,7 @@ @implementation PNFilesIntegrationTests #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down @@ -166,7 +167,7 @@ - (void)testItShouldSendFileFromDataAndReceiveFromHistory { self.client.history() .channels(@[self.channel]) .performWithCompletion(^(PNHistoryResult *result, PNErrorStatus *status) { - NSArray *messages = result.data.channels[self.channel]; + NSArray *messages = result.data.messages; XCTAssertFalse(status.isError); XCTAssertNotNil(messages); XCTAssertEqual(messages.count, 1); @@ -623,7 +624,7 @@ - (void)testItShouldFetchNextMembershipPageWhenStartAndLimitIsSet { XCTAssertFalse(status.isError); XCTAssertEqual(result.data.files.count, limit); XCTAssertEqual(result.data.count, limit); - XCTAssertNotNil(result.data.next); + XCTAssertNil(result.data.next); for (PNFile *file in files) { XCTAssertFalse([fetchedFilesIdentifiers containsObject:file.identifier]); diff --git a/Tests/Tests/Integration/Objects/PNChannelMemberIntegrationTest.m b/Tests/Tests/Integration/Objects/PNChannelMemberIntegrationTest.m index 9970d001a..9a01c7f1a 100644 --- a/Tests/Tests/Integration/Objects/PNChannelMemberIntegrationTest.m +++ b/Tests/Tests/Integration/Objects/PNChannelMemberIntegrationTest.m @@ -50,6 +50,7 @@ @implementation PNChannelMemberIntegrationTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down @@ -326,9 +327,7 @@ - (void)testItShouldSetMembersAndTriggerSetEventOnChannel { [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [self addObjectHandlerForClient:client2 - withBlock:^(PubNub *client, PNObjectEventResult *event, BOOL *remove) { - + [self addObjectHandlerForClient:client2 withBlock:^(PubNub *client, PNObjectEventResult *event, BOOL *remove) { XCTAssertEqualObjects(event.data.event, @"set"); XCTAssertEqualObjects(event.data.type, @"membership"); XCTAssertNotNil(event.data.membership.updated); @@ -554,7 +553,7 @@ - (void)testItShouldSetMembersUsingManageAndReturnFilteredMembersInformationWhen - (void)testItShouldSetMembersUsingManageAndReturnSortedMembersInformationWhenSortIsSet { NSArray *channelsMetadata = [self setChannelsMetadata:1 usingClient:nil]; NSArray *uuidsMetadata = [self setUUIDMetadata:4 usingClient:nil]; - NSString *expectedSort = @"uuid.name%3Adesc,updated"; + NSString *expectedSort = @"uuid.name%3Adesc%2Cupdated"; NSArray *membershipCustom = @[ @{ @"uuid-member-custom": [@[uuidsMetadata[0].uuid, @"custom", @"data", @"1"] componentsJoinedByString:@"-"] }, @{ @"uuid-member-custom": [@[uuidsMetadata[1].uuid, @"custom", @"data", @"2"] componentsJoinedByString:@"-"] } @@ -767,7 +766,7 @@ - (void)testItShouldSetMembersUsingManageAndTriggerSetEventOnUUIDChannel { * 'ItShouldRemoveMembersAndReceiveStatusWithExpectedOperationAndCategory.json' should * be modified after cassette recording. Find first mention of member remove and copy paste * 4 entries which belong to it. For new entries change 'id' field to be different from source. For - * original response entry change status code to 404. + * original response entry `Content-Type` code to `text/html`. */ - (void)testItShouldRemoveMembersAndReceiveStatusWithExpectedOperationAndCategory { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { @@ -895,7 +894,7 @@ - (void)testItShouldRemoveMembersAndReturnFilteredMembersInformationWhenFilterIs - (void)testItShouldRemoveMembersAndReturnSortedMembersInformationWhenSortIsSet { NSArray *channelsMetadata = [self setChannelsMetadata:1 usingClient:nil]; NSArray *uuidsMetadata = [self setUUIDMetadata:5 usingClient:nil]; - NSString *expectedSort = @"uuid.name%3Adesc,updated"; + NSString *expectedSort = @"uuid.name%3Adesc%2Cupdated"; NSMutableArray *members = [[self addMembers:[uuidsMetadata valueForKey:@"uuid"] toChannels:[channelsMetadata valueForKey:@"channel"] @@ -1075,7 +1074,7 @@ - (void)testItShouldRemoveMembersAndTriggerDeleteEventOnUUIDChannel { * 'ItShouldRemoveMembersUsingManageAndReceiveStatusWithExpectedOperationAndCategory.json' should * be modified after cassette recording. Find first mention of member remove and copy paste * 4 entries which belong to it. For new entries change 'id' field to be different from source. For - * original response entry change status code to 404. + * original response entry change `Content-Type` to `text/html`. */ - (void)testItShouldRemoveMembersUsingManageAndReceiveStatusWithExpectedOperationAndCategory { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { @@ -1203,7 +1202,7 @@ - (void)testItShouldRemoveMembersUsingManageAndReturnFilteredMembersInformationW - (void)testItShouldRemoveMembersUsingManageAndReturnSortedMembersInformationWhenSortIsSet { NSArray *channelsMetadata = [self setChannelsMetadata:1 usingClient:nil]; NSArray *uuidsMetadata = [self setUUIDMetadata:5 usingClient:nil]; - NSString *expectedSort = @"uuid.name%3Adesc,updated"; + NSString *expectedSort = @"uuid.name%3Adesc%2Cupdated"; NSMutableArray *members = [[self addMembers:[uuidsMetadata valueForKey:@"uuid"] toChannels:[channelsMetadata valueForKey:@"channel"] @@ -1383,7 +1382,7 @@ - (void)testItShouldRemoveMembersUsingManageAndTriggerDeleteEventOnUUIDChannel { * 'ItShouldFetchMembersAndReceiveResultWithExpectedOperation.json' should * be modified after cassette recording. Find first mention of members fetch and copy paste * 4 entries which belong to it. For new entries change 'id' field to be different from source. For - * original response entry change status code to 404. + * original response entry change `Content-Type` to `text/html`. */ - (void)testItShouldFetchMembersAndReceiveResultWithExpectedOperation { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { @@ -1472,7 +1471,7 @@ - (void)testItShouldFetchFilteredMembersWhenFilterIsSet { - (void)testItShouldFetchOrderedMembersWhenOrderIsSet { NSArray *channelsMetadata = [self setChannelsMetadata:1 usingClient:nil]; NSArray *uuidsMetadata = [self setUUIDMetadata:6 usingClient:nil]; - NSString *expectedSort = @"uuid.name%3Adesc,updated"; + NSString *expectedSort = @"uuid.name%3Adesc%2Cupdated"; NSArray *members = [self addMembers:[uuidsMetadata valueForKey:@"uuid"] toChannels:[channelsMetadata valueForKey:@"channel"] diff --git a/Tests/Tests/Integration/Objects/PNChannelMetadataIntegrationTest.m b/Tests/Tests/Integration/Objects/PNChannelMetadataIntegrationTest.m index fa98a7e11..c4a3bd899 100644 --- a/Tests/Tests/Integration/Objects/PNChannelMetadataIntegrationTest.m +++ b/Tests/Tests/Integration/Objects/PNChannelMetadataIntegrationTest.m @@ -28,6 +28,7 @@ @implementation PNChannelMetadataIntegrationTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down @@ -53,7 +54,7 @@ - (void)testItShouldSetChannelMetadataAndReceiveStatusWithExpectedOperationAndCa PNChannelMetadata *metadata = status.data.metadata; XCTAssertFalse(status.isError); XCTAssertNotNil(metadata); - XCTAssertEqualObjects(metadata.custom, [NSNull null]); + XCTAssertNil(metadata.custom); XCTAssertEqualObjects(metadata.channel, identifier); XCTAssertNotNil(metadata.updated); XCTAssertNotNil(metadata.eTag); @@ -91,7 +92,7 @@ - (void)testItShouldSetChannelMetadataAndNotCrashWhenCompletionBlockIsNil { * 'ItShouldSetChannelMetadataWhenAdditionalInformationIsSet.json' should * be modified after cassette recording. Find first mention of channel metadata set and copy paste 4 entries * which belong to it. For new entries change 'id' field to be different from source. For original - * response entry change status code to 404. + * response entry change `Content-Type` to `text/html`. */ - (void)testItShouldSetChannelMetadataWhenAdditionalInformationIsSet { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { @@ -145,7 +146,7 @@ - (void)testItShouldSetChannelMetadataWhenAdditionalInformationIsSet { * 'ItShouldRemoveChannelMetadataAndReceiveStatusWithExpectedOperationAndCategory.json' should * be modified after cassette recording. Find first mention of channel metadata remove and copy paste 4 entries * which belong to it. For new entries change 'id' field to be different from source. For original - * response entry change status code to 404. + * response entry change `Content-Type` to `text/html`. */ - (void)testItShouldRemoveChannelMetadataAndReceiveStatusWithExpectedOperationAndCategory { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { @@ -303,7 +304,7 @@ - (void)testItShouldNotFetchChannelMetadataWhenTargetChannelDoesNotHaveMetadata * 'ItShouldFetchAllChannelsMetadataAndReceiveResultWithExpectedOperation.json' should * be modified after cassette recording. Find first mention of channels metadata fetch and copy paste 4 entries * which belong to it. For new entries change 'id' field to be different from source. For original - * response entry change status code to 404. + * response entry change `Content-Type` to `text/html`. */ - (void)testItShouldFetchAllChannelsMetadataAndReceiveResultWithExpectedOperation { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { @@ -374,7 +375,7 @@ - (void)testItShouldFetchFilteredChannelsMetadataWhenFilterIsSet { - (void)testItShouldFetchSortedChannelsMetadataWhenSortIsSet { NSArray *channels = [self setChannelsMetadata:6 usingClient:nil]; - NSString *expectedSort = @"name%3Adesc,updated"; + NSString *expectedSort = @"name%3Adesc%2Cupdated"; NSArray *expectedChannelsOrder = [channels sortedArrayUsingDescriptors:@[ [NSSortDescriptor sortDescriptorWithKey:@"name" ascending:NO], [NSSortDescriptor sortDescriptorWithKey:@"updated" ascending:YES] diff --git a/Tests/Tests/Integration/Objects/PNMembershipIntegrationTest.m b/Tests/Tests/Integration/Objects/PNMembershipIntegrationTest.m index 92e73b0c1..aa7dea006 100644 --- a/Tests/Tests/Integration/Objects/PNMembershipIntegrationTest.m +++ b/Tests/Tests/Integration/Objects/PNMembershipIntegrationTest.m @@ -49,6 +49,7 @@ @implementation PNMembershipIntegrationTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down @@ -198,7 +199,7 @@ - (void)testItShouldSetMembershipAndReturnFilteredMembershipsInformationWhenFilt * 'ItShouldSetMembershipAndReturnSortedMembershipsInformationWhenSortIsSet.json' should * be modified after cassette recording. Find first mention of membership set and copy paste * 4 entries which belong to it. For new entries change 'id' field to be different from source. For - * original response entry change status code to 404. + * original response entry change `Content-Type` to `text/html`. */ - (void)testItShouldSetMembershipAndReturnSortedMembershipsInformationWhenSortIsSet { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { @@ -404,7 +405,7 @@ - (void)testItShouldSetMembershipAndTriggerSetEventOnChannel { .performWithCompletion(^(PNManageMembershipsStatus *status) { memberships = status.data.memberships; XCTAssertFalse(status.isError); - + if (shouldCallCompletionHandler) { handler(); } @@ -760,7 +761,7 @@ - (void)testItShouldSetMembershipUsingManageAndTriggerSetEventOnChannel { * 'ItShouldRemoveMembershipAndReceiveStatusWithExpectedOperationAndCategory.json' should * be modified after cassette recording. Find first mention of membership remove and copy paste * 4 entries which belong to it. For new entries change 'id' field to be different from source. For - * original response entry change status code to 404. + * original response entry change `Content-Type` to `text/html`. */ - (void)testItShouldRemoveMembershipAndReceiveStatusWithExpectedOperationAndCategory { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { @@ -892,7 +893,7 @@ - (void)testItShouldRemoveMembershipAndReturnFilteredMembershipsInformationWhenF - (void)testItShouldRemoveMembershipAndReturnSortedMembershipsInformationWhenSortedIsSet { NSArray *channelsMetadata = [self setChannelsMetadata:5 usingClient:nil]; NSArray *uuidsMetadata = [self setUUIDMetadata:1 usingClient:nil]; - NSString *expectedSort = @"channel.name%3Adesc,updated"; + NSString *expectedSort = @"channel.name%3Adesc%2Cupdated"; NSMutableArray *memberships = [[self createUUIDsMembership:[uuidsMetadata valueForKey:@"uuid"] inChannels:[channelsMetadata valueForKey:@"channel"] @@ -1078,7 +1079,7 @@ - (void)testItShouldRemoveMembershipAndTriggerDeleteEventOnChannel { * 'ItShouldRemoveMembershipUsingManageAndReceiveStatusWithExpectedOperationAndCategory.json' should * be modified after cassette recording. Find first mention of membership remove and copy paste * 4 entries which belong to it. For new entries change 'id' field to be different from source. For - * original response entry change status code to 404. + * original response entry change `Content-Type` to `text/html`. */ - (void)testItShouldRemoveMembershipUsingManageAndReceiveStatusWithExpectedOperationAndCategory { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { @@ -1210,7 +1211,7 @@ - (void)testItShouldRemoveMembershipUsingManageAndReturnFilteredMembershipsInfor - (void)testItShouldRemoveMembershipUsingManageAndReturnSortedMembershipsInformationWhenSortedIsSet { NSArray *channelsMetadata = [self setChannelsMetadata:5 usingClient:nil]; NSArray *uuidsMetadata = [self setUUIDMetadata:1 usingClient:nil]; - NSString *expectedSort = @"channel.name%3Adesc,updated"; + NSString *expectedSort = @"channel.name%3Adesc%2Cupdated"; NSMutableArray *memberships = [[self createUUIDsMembership:[uuidsMetadata valueForKey:@"uuid"] inChannels:[channelsMetadata valueForKey:@"channel"] @@ -1396,7 +1397,7 @@ - (void)testItShouldRemoveMembershipUsingManageAndTriggerDeleteEventOnChannel { * 'ItShouldFetchMembershipsAndReceiveResultWithExpectedOperation.json' should * be modified after cassette recording. Find first mention of memberships fetch and copy paste 4 entries * which belong to it. For new entries change 'id' field to be different from source. For original - * response entry change status code to 404. + * response entry change `Content-Type` to `text/html`. */ - (void)testItShouldFetchMembershipsAndReceiveResultWithExpectedOperation { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { @@ -1486,7 +1487,7 @@ - (void)testItShouldFetchFilteredMembershipsWhenFilterIsSet { - (void)testItShouldFetchSortedMembershipsWhenSortedIsSet { NSArray *channelsMetadata = [self setChannelsMetadata:6 usingClient:nil]; NSArray *uuidsMetadata = [self setUUIDMetadata:1 usingClient:nil]; - NSString *expectedSort = @"channel.name%3Adesc,updated"; + NSString *expectedSort = @"channel.name%3Adesc%2Cupdated"; NSArray *memberships = [self createUUIDsMembership:[uuidsMetadata valueForKey:@"uuid"] inChannels:[channelsMetadata valueForKey:@"channel"] @@ -1556,7 +1557,7 @@ - (void)testItShouldFetchMembershipWhenLimitIsSet { XCTAssertNotNil(memberships); XCTAssertEqual(memberships.count, expectedCount); XCTAssertEqual(result.data.totalCount, channelsMetadata.count); - XCTAssertNotNil(memberships.firstObject.custom); + XCTAssertNil(memberships.firstObject.custom); handler(); }); diff --git a/Tests/Tests/Integration/Objects/PNUUIDMetadataIntegrationTest.m b/Tests/Tests/Integration/Objects/PNUUIDMetadataIntegrationTest.m index 4c21ddd3d..4827339fb 100644 --- a/Tests/Tests/Integration/Objects/PNUUIDMetadataIntegrationTest.m +++ b/Tests/Tests/Integration/Objects/PNUUIDMetadataIntegrationTest.m @@ -28,6 +28,7 @@ @implementation PNUUIDMetadataIntegrationTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down @@ -54,14 +55,13 @@ - (void)testItShouldSetUUIDMetadataAndReceiveStatusWithExpectedOperationAndCateg PNUUIDMetadata *metadata = status.data.metadata; XCTAssertFalse(status.isError); XCTAssertNotNil(metadata); - XCTAssertEqualObjects(metadata.externalId, [NSNull null]); - XCTAssertEqualObjects(metadata.profileUrl, [NSNull null]); - XCTAssertEqualObjects(metadata.custom, [NSNull null]); - XCTAssertEqualObjects(metadata.email, [NSNull null]); + XCTAssertNil(metadata.externalId); + XCTAssertNil(metadata.profileUrl); + XCTAssertNil(metadata.custom); + XCTAssertNil(metadata.email); XCTAssertEqualObjects(metadata.uuid, identifier); XCTAssertNotNil(metadata.updated); XCTAssertNotNil(metadata.eTag); - XCTAssertNotEqual([metadata.debugDescription rangeOfString:@"uuid-metadata"].location, NSNotFound); XCTAssertEqual(status.operation, PNSetUUIDMetadataOperation); XCTAssertEqual(status.category, PNAcknowledgmentCategory); @@ -266,56 +266,6 @@ - (void)testItShouldRemoveUUIDMetadataAndTriggerDeleteEventToUUIDChannel { [self removeAllUUIDMetadataUsingClient:client1]; } -/** - * @brief To test event skip for older Objects version - * 'ItShouldNotTriggerDeleteEventToUUIDChannelWhenSentFromPreviousObjectsVersion.json' should - * be modified after cassette recording. Find GET request for subscribe with longest Base64 - * encoded body. Decode body, change objects version to "1.0" and encode string back to use as - * replacement for original. - */ -- (void)testItShouldNotTriggerDeleteEventToUUIDChannelWhenSentFromPreviousObjectsVersion { - if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { - NSLog(@"'%@' requires special conditions (modified mocked response). Skip", self.name); - return; - } - - PubNub *client1 = [self createPubNubForUser:@"serhii"]; - PubNub *client2 = [self createPubNubForUser:@"david"]; - NSArray *uuids = [self setUUIDMetadata:2 usingClient:client1]; - NSString *channel = uuids.firstObject.uuid; - - [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - - - [self waitToNotCompleteIn:self.falseTestCompletionDelay codeBlock:^(dispatch_block_t handler) { - [self addObjectHandlerForClient:client2 - withBlock:^(PubNub *client, PNObjectEventResult *event, BOOL *remove) { - - XCTAssertEqualObjects(event.data.event, @"delete"); - XCTAssertEqualObjects(event.data.type, @"uuid"); - XCTAssertEqualObjects(event.data.uuidMetadata.uuid, uuids.firstObject.uuid); - XCTAssertNotNil(event.data.timestamp); - *remove = YES; - - handler(); - }]; - - client1.objects().removeUUIDMetadata().uuid(uuids.firstObject.uuid) - .performWithCompletion(^(PNAcknowledgmentStatus *status) { - XCTAssertFalse(status.isError); - - [self removeCachedUUIDMetadata:uuids.firstObject.uuid]; - }); - }]; - - [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; - - - [self verifyUUIDMetadataCountShouldEqualTo:(uuids.count - 1) usingClient:client1]; - - [self removeAllUUIDMetadataUsingClient:client1]; -} - #pragma mark - Tests :: Builder pattern-based fetch uuid metadata @@ -376,7 +326,7 @@ - (void)testItShouldNotFetchUUIDMetadataWhenTargetUUIDDoesNotHaveMetadata { * 'ItShouldFetchAllUUIDMetadataAndReceiveResultWithExpectedOperation.json' should * be modified after cassette recording. Find first mention of UUID metadata fetch and copy paste 4 entries * which belong to it. For new entries change 'id' field to be different from source. For original - * response entry change status code to 404. + * response entry change `Content-Type` code to `text/html`. */ - (void)testItShouldFetchAllUUIDMetadataAndReceiveResultWithExpectedOperation { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { @@ -447,7 +397,7 @@ - (void)testItShouldFetchFilteredUUIDsMetadataWhenFilterIsSet { - (void)testItShouldFetchSortedUUIDMetadataWhenSortIsSet { NSArray *uuids = [self setUUIDMetadata:6 usingClient:nil]; - NSString *expectedSort = @"name%3Adesc,updated"; + NSString *expectedSort = @"name%3Adesc%2Cupdated"; NSArray *expectedUUIDsOrder = [uuids sortedArrayUsingDescriptors:@[ [NSSortDescriptor sortDescriptorWithKey:@"name" ascending:NO], [NSSortDescriptor sortDescriptorWithKey:@"updated" ascending:YES] diff --git a/Tests/Tests/Integration/PNChannelGroupIntegrationTests.m b/Tests/Tests/Integration/PNChannelGroupIntegrationTests.m index 7adffcc0a..f08f0ec03 100644 --- a/Tests/Tests/Integration/PNChannelGroupIntegrationTests.m +++ b/Tests/Tests/Integration/PNChannelGroupIntegrationTests.m @@ -35,6 +35,7 @@ @implementation PNChannelGroupIntegrationTests #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down diff --git a/Tests/Tests/Integration/PNHistoryIntegrationTests.m b/Tests/Tests/Integration/PNHistoryIntegrationTests.m index 290f2859f..224d957bf 100644 --- a/Tests/Tests/Integration/PNHistoryIntegrationTests.m +++ b/Tests/Tests/Integration/PNHistoryIntegrationTests.m @@ -35,6 +35,7 @@ @implementation PNHistoryIntegrationTests #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down @@ -314,7 +315,7 @@ - (void)testItShouldFetchHistoryForChannelWithEncryptedMessagesAndFailToDecryptW XCTAssertTrue(status.isError); XCTAssertEqual(status.operation, PNHistoryOperation); XCTAssertEqual(status.category, PNDecryptionErrorCategory); - NSArray *encryptedMessages = status.associatedObject[@"channels"][channel]; + NSArray *encryptedMessages = ((PNHistoryFetchData *)status.associatedObject).channels[channel]; XCTAssertNotNil(status.associatedObject); XCTAssertNotNil(encryptedMessages); XCTAssertNotEqualObjects(encryptedMessages[halfSize][@"message"], publishedMessages[halfSize][@"message"]); @@ -350,7 +351,7 @@ - (void)testItShouldFetchHistoryForChannelWithEncryptedMessagesAndFailToDecryptW XCTAssertTrue(status.isError); XCTAssertEqual(status.operation, PNHistoryOperation); XCTAssertEqual(status.category, PNDecryptionErrorCategory); - NSArray *encryptedMessages = status.associatedObject[@"channels"][channel]; + NSArray *encryptedMessages = ((PNHistoryFetchData *)status.associatedObject).channels[channel]; XCTAssertNotNil(status.associatedObject); XCTAssertNotNil(encryptedMessages); XCTAssertNotEqualObjects(encryptedMessages[halfSize][@"message"], publishedMessages[halfSize][@"message"]); @@ -539,7 +540,7 @@ - (void)testItShouldFetchHistoryForChannelUsingBuilderPatternInterface { XCTAssertEqual([result.data.start compare:firstTimetoken], NSOrderedSame); XCTAssertEqual([result.data.end compare:lastTimetoken], NSOrderedSame); XCTAssertEqual(result.operation, PNHistoryOperation); - + handler(); }); }]; @@ -685,9 +686,10 @@ - (void)testItShouldNotFetchHistoryWithActionsAndReceiveBadRequestStatusWhenMult .includeMessageActions(YES) .performWithCompletion(^(PNHistoryResult *result, PNErrorStatus *status) { XCTAssertTrue(status.isError); - XCTAssertEqual(status.operation, PNHistoryOperation); + XCTAssertEqual(status.operation, PNHistoryForChannelsOperation); XCTAssertEqual(status.category, PNBadRequestCategory); XCTAssertEqual(status.statusCode, 400); + handler(); }); } @catch (NSException *exception) { handler(); @@ -921,7 +923,7 @@ - (void)testItShouldDeleteMessagesForChannelAndNotCrashWhenCompletionBlockIsNil XCTAssertNil(status); XCTAssertEqualObjects(result.data.messages, @[]); XCTAssertEqual(result.operation, PNHistoryOperation); - + handler(); }]; }]; @@ -959,7 +961,7 @@ - (void)testItShouldDeleteMessagesForChannelExcludingSpecifiedTimetokenAndOlderW XCTAssertEqual(fetchedMessages.count, halfSize); XCTAssertEqualObjects(fetchedMessages.firstObject, publishedMessages[halfSize][@"message"]); XCTAssertEqualObjects(fetchedMessages.lastObject, publishedMessages.lastObject[@"message"]); - + handler(); }]; }]; @@ -997,7 +999,7 @@ - (void)testItShouldDeleteMessagesForChannelIncludingSpecifiedTimetokenAndNewerW XCTAssertEqual(fetchedMessages.count, halfSize); XCTAssertEqualObjects(fetchedMessages.firstObject, publishedMessages.firstObject[@"message"]); XCTAssertEqualObjects(fetchedMessages.lastObject, publishedMessages[halfSize - 1][@"message"]); - + handler(); }]; }]; @@ -1035,7 +1037,7 @@ - (void)testItShouldDeleteMessagesForChannelExcludingSpecifiedStartAndIncludingE XCTAssertEqual(fetchedMessages.count, 2); XCTAssertEqualObjects(fetchedMessages.firstObject, publishedMessages.firstObject[@"message"]); XCTAssertEqualObjects(fetchedMessages.lastObject, publishedMessages.lastObject[@"message"]); - + handler(); }]; }]; @@ -1081,7 +1083,7 @@ - (void)testItShouldNotDeleteMessagesForChannelAndReceiveBadRequestStatusWhenCha XCTAssertEqual(fetchedMessages.count, publishedMessages.count); XCTAssertEqualObjects(fetchedMessages.firstObject, publishedMessages.firstObject[@"message"]); XCTAssertEqualObjects(fetchedMessages.lastObject, publishedMessages.lastObject[@"message"]); - + handler(); }]; }]; diff --git a/Tests/Tests/Integration/PNPresenceIntegrationTest.m b/Tests/Tests/Integration/PNPresenceIntegrationTest.m index a7aef719c..0381e388e 100644 --- a/Tests/Tests/Integration/PNPresenceIntegrationTest.m +++ b/Tests/Tests/Integration/PNPresenceIntegrationTest.m @@ -27,6 +27,7 @@ @implementation PNPresenceIntegrationTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down @@ -189,7 +190,7 @@ - (void)testItShouldFetchGlobalHereNowWithParticipantsStateWhenStateVerbosityIsS * 'ItShouldFetchGlobalHereWithParticipantsOccupancyWhenOccupancyVerbosityIsSet.json' should * be modified after cassette recording. Find first place where presence fetch API usage and copy paste * 4 entries which belong to it. For new entries change 'id' field to be different from source. For - * original response entry change status code to 404. + * original response entry change `Content-Type` to `text/html`. */ - (void)testItShouldFetchGlobalHereNowWithParticipantsOccupancyWhenOccupancyVerbosityIsSet { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { @@ -493,7 +494,10 @@ - (void)testItShouldFetchChannelHereNowUsingBuilderPatternInterface { [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 5.f : 0.f)]; - + /** + void (^)(PNPresenceChannelHereNowResult *__strong, PNErrorStatus *__strong)' to parameter of type 'PNHereNowCompletionBlock _Nonnull __strong' (aka 'void (^__strong)(PNPresenceHereNowResult * _Nullable __strong, PNErrorStatus * _Nullable __strong) + */ + [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { self.client.presence().hereNow() .channel(channel) diff --git a/Tests/Tests/Integration/PNPresenceStateIntegrationTest.m b/Tests/Tests/Integration/PNPresenceStateIntegrationTest.m index d32989748..2c06dee25 100644 --- a/Tests/Tests/Integration/PNPresenceStateIntegrationTest.m +++ b/Tests/Tests/Integration/PNPresenceStateIntegrationTest.m @@ -27,6 +27,7 @@ @implementation PNPresenceStateIntegrationTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down @@ -121,10 +122,6 @@ - (void)testItShouldSetPresenceStateForChannelAndTriggerUpdateEventToTargetChann }]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; - - - // Ensure, that state manager for observing client (same user) stored updated user state. - XCTAssertEqualObjects([client2.clientStateManager state][channel], updatedState); } - (void)testItShouldNotSetPresenceStateForChannelAndReceiveBadRequestStatusWhenChannelIsNil { diff --git a/Tests/Tests/Integration/PNPublishIntegrationTests.m b/Tests/Tests/Integration/PNPublishIntegrationTests.m index 7721ad7ce..03d455c75 100644 --- a/Tests/Tests/Integration/PNPublishIntegrationTests.m +++ b/Tests/Tests/Integration/PNPublishIntegrationTests.m @@ -31,6 +31,7 @@ @implementation PNPublishIntegrationTests #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - VCR configuration @@ -49,14 +50,9 @@ - (BOOL)shouldSetupVCR { - (PNConfiguration *)configurationForTestCaseWithName:(NSString *)name { PNConfiguration *configuration = [super configurationForTestCaseWithName:name]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" configuration.useRandomInitializationVector = [self.name rangeOfString:@"RandomIV"].location != NSNotFound; - if ([self.name pnt_includesString:@"Encrypt"]) { - configuration.cipherKey = self.cipherKey; - } -#pragma clang diagnostic pop + if ([self.name pnt_includesString:@"Encrypt"]) configuration.cipherKey = self.cipherKey; return configuration; } @@ -74,11 +70,8 @@ - (void)testItShouldPublishWithRequestAndReceivePublishTimetokenWhenDefaultsUsed NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { PNPublishRequest *request = [PNPublishRequest requestWithChannel:channel]; @@ -98,11 +91,8 @@ - (void)testItShouldPublishWithRequestAndReceivePublishTimetokenWhenReplicationD NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { PNPublishRequest *request = [PNPublishRequest requestWithChannel:channel]; @@ -123,11 +113,8 @@ - (void)testItShouldPublishWithRequestAndReceivePublishTimetokenWhenStoreDisable NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { PNPublishRequest *request = [PNPublishRequest requestWithChannel:channel]; @@ -148,11 +135,8 @@ - (void)testItShouldPublishAndReceivePublishTimetoken { NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [client publish:expectedMessage toChannel:channel withCompletion:^(PNPublishStatus *status) { @@ -169,11 +153,8 @@ - (void)testItShouldPublishAndReceiveStatusWithExpectedOperationAndCategory { NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [client publish:expectedMessage toChannel:channel withCompletion:^(PNPublishStatus *status) { @@ -190,11 +171,8 @@ - (void)testItShouldPublishAndNotCrashWhenCompletionBlockIsNil { NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToNotCompleteIn:self.falseTestCompletionDelay codeBlock:^(dispatch_block_t handler) { @try { @@ -209,16 +187,14 @@ - (void)testItShouldNotPublishAndReceiveBadRequestStatusWhenMessageIsNil { NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = nil; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [client publish:expectedMessage toChannel:channel withCompletion:^(PNPublishStatus *status) { XCTAssertTrue(status.isError); - XCTAssertNotNil(status.data.information); + XCTAssertNotNil(status.errorData.information); + XCTAssertEqual(status.operation, PNPublishOperation); XCTAssertEqual(status.category, PNBadRequestCategory); XCTAssertEqual(status.statusCode, 400); @@ -232,12 +208,11 @@ - (void)testItShouldNotPublishAndReceiveBadRequestStatusWhenChannelIsNil { PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; NSString *channel = nil; - - + [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [client publish:expectedMessage toChannel:channel withCompletion:^(PNPublishStatus *status) { XCTAssertTrue(status.isError); - XCTAssertNotNil(status.data.information); + XCTAssertNotNil(status.errorData.information); XCTAssertEqual(status.operation, PNPublishOperation); XCTAssertEqual(status.category, PNBadRequestCategory); XCTAssertEqual(status.statusCode, 400); @@ -251,11 +226,8 @@ - (void)testItShouldPublishWithTTL { NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { client.publish() @@ -277,11 +249,8 @@ - (void)testItShouldPublishWithOutTTLWhenStoreInHistoryDisabled { NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { client.publish() @@ -305,11 +274,8 @@ - (void)testItShouldPublishWithNoReplicationPolicy { NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { client.publish() @@ -334,12 +300,9 @@ - (void)testItShouldPublishNSString { NSString *expectedMessage = @"Hello there"; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -354,7 +317,7 @@ - (void)testItShouldPublishNSString { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -365,12 +328,9 @@ - (void)testItShouldPublishNSNumber { NSNumber *expectedMessage = @2010; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -385,7 +345,7 @@ - (void)testItShouldPublishNSNumber { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -396,12 +356,9 @@ - (void)testItShouldPublishNSDictionary { NSDictionary *expectedMessage = @{ @"hello": @"there" }; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -416,7 +373,7 @@ - (void)testItShouldPublishNSDictionary { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -427,12 +384,9 @@ - (void)testItShouldPublishNSDictionaryWithNestedCollections { NSDictionary *expectedMessage = @{ @"hello": @[@"there", @{ @"general": @"kenobi" }] }; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -447,7 +401,7 @@ - (void)testItShouldPublishNSDictionaryWithNestedCollections { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -458,12 +412,9 @@ - (void)testItShouldPublishNSArray { NSArray *expectedMessage = @[@"hello", @"there"]; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -478,7 +429,7 @@ - (void)testItShouldPublishNSArray { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -489,12 +440,9 @@ - (void)testItShouldPublishNSArrayWithNestedCollections { NSArray *expectedMessage = @[@"hello", @[@"there", @{ @"general": @"kenobi" }]]; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -509,7 +457,7 @@ - (void)testItShouldPublishNSArrayWithNestedCollections { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -520,12 +468,9 @@ - (void)testItShouldPublish1000CharactersLongNSString { PubNub *client2 = [self createPubNubForUser:@"david"]; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -541,7 +486,7 @@ - (void)testItShouldPublish1000CharactersLongNSString { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -552,12 +497,9 @@ - (void)testItShouldPublish10000CharactersLongNSString { PubNub *client2 = [self createPubNubForUser:@"david"]; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -573,7 +515,7 @@ - (void)testItShouldPublish10000CharactersLongNSString { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -583,7 +525,6 @@ - (void)testItShouldNotPublishTooLongPublishMessage { PubNub *client = [self createPubNubForUser:@"serhii"]; __block BOOL retried = NO; - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { XCTAssertEqual(expectedMessage.length, 100000); @@ -600,7 +541,7 @@ - (void)testItShouldNotPublishTooLongPublishMessage { } }]; }]; - + XCTAssertTrue(retried); } @@ -611,12 +552,9 @@ - (void)testItShouldPublishStringWithSpecialSymbols { NSString *expectedMessage = @"!@#$%^&*()_+|"; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -631,7 +569,7 @@ - (void)testItShouldPublishStringWithSpecialSymbols { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -649,12 +587,9 @@ - (void)testItShouldPublishEncryptedMessage { PubNub *client2 = [self createPubNubForUser:@"david"]; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *receivedMessage, BOOL *shouldRemove) { @@ -671,7 +606,7 @@ - (void)testItShouldPublishEncryptedMessage { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -686,12 +621,9 @@ - (void)testItShouldPublishEncryptedMessageRandomIV { PubNub *client2 = [self createPubNubForUser:@"david"]; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertTrue(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertTrue(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *receivedMessage, BOOL *shouldRemove) { @@ -708,7 +640,7 @@ - (void)testItShouldPublishEncryptedMessageRandomIV { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -723,12 +655,9 @@ - (void)testItShouldPublishWithFilterMetadata { NSString *expectedMessage = @"Hello there"; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -746,7 +675,7 @@ - (void)testItShouldPublishWithFilterMetadata { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -757,11 +686,8 @@ - (void)testItShouldPublishAndFetchMessageFromHistory { NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [client publish:expectedMessage toChannel:channel withCompletion:^(PNPublishStatus *status) { @@ -787,11 +713,8 @@ - (void)testItShouldPublishAndFetchEmptyHistoryWhenStoreInHistoryDisabled { NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [client publish:expectedMessage toChannel:channel storeInHistory:NO @@ -833,12 +756,9 @@ - (void)testItShouldPublishMobilePayloadWithWrappedKeys { }; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -855,7 +775,7 @@ - (void)testItShouldPublishMobilePayloadWithWrappedKeys { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -868,12 +788,9 @@ - (void)testItShouldPublishMobilePayloadWithWrappedAPSKey { NSDictionary *expectedMessage = @{ @"pn_other": message, @"pn_apns": mobilePayload }; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -890,7 +807,7 @@ - (void)testItShouldPublishMobilePayloadWithWrappedAPSKey { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -903,12 +820,9 @@ - (void)testItShouldPublishNSStringWithMobilePayload { NSDictionary *expectedMessage = @{ @"pn_other": message, @"pn_apns": mobilePayload[@"apns"] }; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -925,7 +839,7 @@ - (void)testItShouldPublishNSStringWithMobilePayload { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -938,12 +852,9 @@ - (void)testItShouldPublishNSNumberWithMobilePayload { NSDictionary *expectedMessage = @{ @"pn_other": message, @"pn_apns": mobilePayload[@"apns"] }; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -960,7 +871,7 @@ - (void)testItShouldPublishNSNumberWithMobilePayload { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -973,12 +884,9 @@ - (void)testItShouldPublishNSArrayWithMobilePayload { NSDictionary *expectedMessage = @{ @"pn_other": message, @"pn_apns": mobilePayload[@"apns"] }; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -995,7 +903,7 @@ - (void)testItShouldPublishNSArrayWithMobilePayload { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -1009,12 +917,9 @@ - (void)testItShouldPublishNSDictionaryWithMobilePayload { [expectedMessage addEntriesFromDictionary:message]; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -1031,7 +936,7 @@ - (void)testItShouldPublishNSDictionaryWithMobilePayload { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -1050,12 +955,9 @@ - (void)testItShouldPublishEncryptedMessageWithNotEncryptedMobilePayload { PubNub *client2 = [self createPubNubForUser:@"david"]; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -1072,7 +974,7 @@ - (void)testItShouldPublishEncryptedMessageWithNotEncryptedMobilePayload { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -1091,12 +993,9 @@ - (void)testItShouldPublishEncryptedMessageWithNotEncryptedMobilePayloadRandomIV PubNub *client2 = [self createPubNubForUser:@"david"]; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertTrue(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertTrue(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -1113,7 +1012,7 @@ - (void)testItShouldPublishEncryptedMessageWithNotEncryptedMobilePayloadRandomIV XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -1127,12 +1026,9 @@ - (void)testItShouldPublishCompressedMessageWithMobilePayload { [expectedMessage addEntriesFromDictionary:message]; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -1149,7 +1045,7 @@ - (void)testItShouldPublishCompressedMessageWithMobilePayload { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -1158,11 +1054,8 @@ - (void)testItShouldPublishMessageWithMobilePayloadAndFetchEmptyHistoryWhenStore NSDictionary *message = @{ @"hello": @[@"there", @{ @"general": @"kenobi" }] }; NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [client publish:message toChannel:channel mobilePushPayload:mobilePayload storeInHistory:NO @@ -1192,11 +1085,8 @@ - (void)testItShouldPublishCompressedMessageWithMobilePayloadAndFetchMessageFrom PubNub *client = [self createPubNubForUser:@"serhii"]; NSMutableDictionary *expectedMessage = [@{ @"pn_apns": mobilePayload[@"apns"] } mutableCopy]; [expectedMessage addEntriesFromDictionary:message]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [client publish:message toChannel:channel mobilePushPayload:mobilePayload storeInHistory:YES @@ -1228,12 +1118,9 @@ - (void)testItShouldPublishOnlyWithMobilePayload { PubNub *client2 = [self createPubNubForUser:@"david"]; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -1250,7 +1137,7 @@ - (void)testItShouldPublishOnlyWithMobilePayload { XCTAssertFalse(status.isError); }]; }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -1260,11 +1147,8 @@ - (void)testItShouldPublishCompressedMessageUsingPOST { NSString *expectedMessage = [@"hello-there" pnt_stringWithLength:10000]; NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { XCTAssertEqual(expectedMessage.length, 10000); @@ -1286,11 +1170,8 @@ - (void)testItShouldPublishCompressedAndFetchEmptyHistoryWhenStoreInHistoryDisab NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedMessage = @"Hello there"; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [client publish:expectedMessage toChannel:channel storeInHistory:NO compressed:YES @@ -1323,12 +1204,9 @@ - (void)testItShouldPublishNSDictionaryUsingBuilderPatternInterface { NSDictionary *expectedMessage = @{ @"hello": @"there" }; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 withBlock:^(PubNub *client, PNMessageResult *message, BOOL *shouldRemove) { @@ -1343,7 +1221,7 @@ - (void)testItShouldPublishNSDictionaryUsingBuilderPatternInterface { XCTAssertFalse(status.isError); }); }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -1354,11 +1232,8 @@ - (void)testItShouldFireMessageAndFetchEmptyHistory { NSDictionary *message = @{ @"hello": @[@"there", @{ @"general": @"kenobi" }] }; NSString *channel = [self channelWithName:@"test-channel"]; PubNub *client = [self createPubNubForUser:@"serhii"]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { client.fire() @@ -1390,7 +1265,7 @@ - (void)testItShouldSendSignalAndReceivePublishTimetoken { PubNub *client = [self createPubNubForUser:@"serhii"]; NSString *expectedSignal = @"Hello there"; - + [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [client signal:expectedSignal channel:channel withCompletion:^(PNSignalStatus *status) { XCTAssertFalse(status.isError); @@ -1407,7 +1282,7 @@ - (void)testItShouldSendSignalAndReceiveStatusWithExpectedOperationAndCategory { PubNub *client = [self createPubNubForUser:@"serhii"]; NSNumber *expectedSignal = @2010; - + [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [client signal:expectedSignal channel:channel withCompletion:^(PNSignalStatus *status) { XCTAssertFalse(status.isError); @@ -1425,12 +1300,12 @@ - (void)testItShouldNotSendTooLongSignalMessage { NSString *expectedSignal = [@"hello-there" pnt_stringWithLength:200]; __block BOOL retried = NO; - + [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [client signal:expectedSignal channel:channel withCompletion:^(PNSignalStatus *status) { XCTAssertTrue(status.isError); XCTAssertEqual(status.operation, PNSignalOperation); - XCTAssertEqual(status.category, PNMalformedResponseCategory); + XCTAssertEqual(status.category, PNBadRequestCategory); XCTAssertNotNil(status.errorData.information); XCTAssertEqualObjects(status.errorData.information, @"Signal size too large"); @@ -1442,7 +1317,7 @@ - (void)testItShouldNotSendTooLongSignalMessage { } }]; }]; - + XCTAssertTrue(retried); } @@ -1457,7 +1332,7 @@ - (void)testItShouldSendSignalUsingBuilderPatternInterface { [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - + [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addSignalHandlerForClient:client2 withBlock:^(PubNub *client, PNSignalResult *signal, BOOL *shouldRemove) { XCTAssertEqualObjects(signal.data.publisher, client1.currentConfiguration.userID); @@ -1471,7 +1346,7 @@ - (void)testItShouldSendSignalUsingBuilderPatternInterface { XCTAssertFalse(status.isError); }); }]; - + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } @@ -1486,7 +1361,7 @@ - (void)testItShouldSendSignalWithNotEncryptedMessageWhenCipherKeyIsSet { [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; - + [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addSignalHandlerForClient:client2 withBlock:^(PubNub *client, PNSignalResult *signal, BOOL *shouldRemove) { XCTAssertEqualObjects(signal.data.publisher, client1.currentConfiguration.userID); @@ -1500,225 +1375,11 @@ - (void)testItShouldSendSignalWithNotEncryptedMessageWhenCipherKeyIsSet { XCTAssertFalse(status.isError); }]; }]; - - [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; -} - - -#pragma mark - Tests :: Publish size - -- (void)testItShouldHaveNegativeSizeWhenMessageIsNil { - NSString *channel = [self channelWithName:@"test-channel"]; - PubNub *client = [self createPubNubForUser:@"serhii"]; - NSString *expectedMessage = nil; - - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel withCompletion:^(NSInteger size) { - XCTAssertEqual(size, -1); - handler(); - }]; - }]; -} - -- (void)testItShouldHaveNegativeSizeWhenChannelIsNil { - PubNub *client = [self createPubNubForUser:@"serhii"]; - NSString *expectedMessage = @"Hello there"; - NSString *channel = nil; - - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel withCompletion:^(NSInteger size) { - XCTAssertEqual(size, -1); - handler(); - }]; - }]; -} - -- (void)testItShouldCalculateNSStringMessageSize { - NSString *channel = [self channelWithName:@"test-channel"]; - PubNub *client = [self createPubNubForUser:@"serhii"]; - NSString *expectedMessage = @"Hello there"; - - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel withCompletion:^(NSInteger size) { - XCTAssertEqualWithAccuracy(size, 526, 30); - handler(); - }]; - }]; -} -- (void)testItShouldCalculateNSNumberMessageSize { - NSString *channel = [self channelWithName:@"test-channel"]; - PubNub *client = [self createPubNubForUser:@"serhii"]; - NSNumber *expectedMessage = @2010; - - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel withCompletion:^(NSInteger size) { - XCTAssertEqualWithAccuracy(size, 511, 30); - handler(); - }]; - }]; -} - -- (void)testItShouldCalculateNSDictionaryMessageSize { - NSString *channel = [self channelWithName:@"test-channel"]; - NSDictionary *expectedMessage = @{ @"hello": @"there" }; - PubNub *client = [self createPubNubForUser:@"serhii"]; - - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel withCompletion:^(NSInteger size) { - XCTAssertEqualWithAccuracy(size, 538, 30); - handler(); - }]; - }]; -} - -- (void)testItShouldCalculateNSDictionaryWithNestedCollectionsMessageSize { - NSDictionary *expectedMessage = @{ @"hello": @[@"there", @{ @"general": @"kenobi" }] }; - NSString *channel = [self channelWithName:@"test-channel"]; - PubNub *client = [self createPubNubForUser:@"serhii"]; - - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel withCompletion:^(NSInteger size) { - XCTAssertEqualWithAccuracy(size, 581, 30); - handler(); - }]; - }]; -} - -- (void)testItShouldCalculateNSArrayMessageSize { - NSString *channel = [self channelWithName:@"test-channel"]; - PubNub *client = [self createPubNubForUser:@"serhii"]; - NSArray *expectedMessage = @[@"hello", @"there"]; - - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel withCompletion:^(NSInteger size) { - XCTAssertEqualWithAccuracy(size, 538, 30); - handler(); - }]; - }]; -} - -- (void)testItShouldCalculateNSArrayWithNestedCollectionsMessageSize { - NSArray *expectedMessage = @[@"hello", @[@"there", @{ @"general": @"kenobi" }]]; - NSString *channel = [self channelWithName:@"test-channel"]; - PubNub *client = [self createPubNubForUser:@"serhii"]; - - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel withCompletion:^(NSInteger size) { - XCTAssertEqualWithAccuracy(size, 581, 30); - handler(); - }]; - }]; -} - -- (void)testItShouldCalculateCompressedMessageSize { - NSString *expectedMessage = [@"hello-there" pnt_stringWithLength:1000]; - NSString *channel = [self channelWithName:@"test-channel"]; - PubNub *client = [self createPubNubForUser:@"serhii"]; - __block NSInteger compressedStorableMessageSize = 0; - __block NSInteger compressedMessageSize = 0; - - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel compressed:YES - withCompletion:^(NSInteger size) { - - compressedMessageSize = size; - handler(); - }]; - }]; - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel compressed:YES storeInHistory:YES - withCompletion:^(NSInteger size) { - - compressedStorableMessageSize = size; - handler(); - }]; - }]; - - - XCTAssertEqualWithAccuracy(compressedMessageSize, 617, 30); - XCTAssertEqual(compressedStorableMessageSize, compressedMessageSize); -} - -- (void)testItShouldCalculateNotStorableMessageSize { - NSString *channel = [self channelWithName:@"test-channel"]; - PubNub *client = [self createPubNubForUser:@"serhii"]; - NSString *expectedMessage = @"Hello there"; - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel storeInHistory:YES - withCompletion:^(NSInteger size) { - - XCTAssertEqualWithAccuracy(size, 526, 30); - handler(); - }]; - }]; -} - -- (void)testItShouldCalculateSizeOfMessageWithMetadata { - NSString *expectedMessage = [@"hello-there" pnt_stringWithLength:1000]; - NSDictionary *expectedMetadata = @{ @"access-level": @"editor" }; - NSString *channel = [self channelWithName:@"test-channel"]; - PubNub *client = [self createPubNubForUser:@"serhii"]; - __block NSInteger messageWithMetadataSize = 0; - __block NSInteger notCompressedMessageWithMetadataSize = 0; - - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel withMetadata:expectedMetadata - completion:^(NSInteger size) { - - messageWithMetadataSize = size; - handler(); - }]; - }]; - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - [client sizeOfMessage:expectedMessage toChannel:channel compressed:NO - withMetadata:expectedMetadata completion:^(NSInteger size) { - - notCompressedMessageWithMetadataSize = size; - handler(); - }]; - }]; - - - XCTAssertEqualWithAccuracy(messageWithMetadataSize, 1558, 30); - XCTAssertEqual(notCompressedMessageWithMetadataSize, messageWithMetadataSize); + [self unsubscribeClient:client2 fromChannels:@[channel] withPresence:NO]; } -#pragma mark - Tests :: Builder pattern-based message size - -- (void)testItShouldCalculateSizeUsingBuilderPatternInterface { - NSString *channel = [self channelWithName:@"test-channel"]; - PubNub *client = [self createPubNubForUser:@"serhii"]; - NSString *expectedMessage = @"Hello there"; - - [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { - client.size() - .message(expectedMessage) - .channel(channel) - .shouldStore(NO) - .ttl(120) - .replicate(NO) - .performWithCompletion(^(NSInteger size) { - XCTAssertEqualWithAccuracy(size, 545, 30); - handler(); - }); - }]; -} - #pragma mark - #pragma clang diagnostic pop diff --git a/Tests/Tests/Integration/PNPushNotificationsIntegrationTests.m b/Tests/Tests/Integration/PNPushNotificationsIntegrationTests.m index f4ab4cd4f..fc65329b3 100644 --- a/Tests/Tests/Integration/PNPushNotificationsIntegrationTests.m +++ b/Tests/Tests/Integration/PNPushNotificationsIntegrationTests.m @@ -77,6 +77,7 @@ @implementation PNPushNotificationsIntegrationTests #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down diff --git a/Tests/Tests/Integration/PNRequestRetryConfigurationIntegrationTest.m b/Tests/Tests/Integration/PNRequestRetryConfigurationIntegrationTest.m index 6340fbc9a..8843e9543 100644 --- a/Tests/Tests/Integration/PNRequestRetryConfigurationIntegrationTest.m +++ b/Tests/Tests/Integration/PNRequestRetryConfigurationIntegrationTest.m @@ -24,6 +24,9 @@ @interface PNRequestRetryConfigurationIntegrationTest : PNRecordableTestCase @implementation PNRequestRetryConfigurationIntegrationTest +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #pragma mark - Setup / Tear down @@ -56,7 +59,6 @@ - (void)testItShouldRetryRequestTwiceWithLinearPolicy { [self waitToCompleteIn:4.f codeBlock:^(dispatch_block_t handler) { [self.client publish:@"hello-world" toChannel:@"test-channel" withCompletion:^(PNPublishStatus *status) { - XCTAssertTrue(status.isError); XCTAssertTrue([YHVVCR.cassette allPlayed]); handler(); @@ -83,5 +85,6 @@ - (void)testItShouldRetryRequestTwiceWithExponentialPolicy { #pragma mark - +#pragma clang diagnostic pop @end diff --git a/Tests/Tests/Integration/PNSubscribeIntegrationTest.m b/Tests/Tests/Integration/PNSubscribeIntegrationTest.m index 19f09c764..2c0d8f39a 100644 --- a/Tests/Tests/Integration/PNSubscribeIntegrationTest.m +++ b/Tests/Tests/Integration/PNSubscribeIntegrationTest.m @@ -30,9 +30,6 @@ @interface PNSubscribeIntegrationTest : PNRecordableTestCase @implementation PNSubscribeIntegrationTest -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-retain-cycles" - #pragma mark - VCR configuration @@ -49,10 +46,12 @@ - (BOOL)shouldSetupVCR { #pragma mark - Setup / Tear down -- (PNConfiguration *)configurationForTestCaseWithName:(NSString *)name { - PNConfiguration *configuration = [super configurationForTestCaseWithName:name]; #pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-retain-cycles" #pragma clang diagnostic ignored "-Wdeprecated-declarations" + +- (PNConfiguration *)configurationForTestCaseWithName:(NSString *)name { + PNConfiguration *configuration = [super configurationForTestCaseWithName:name]; configuration.useRandomInitializationVector = [self.name rangeOfString:@"RandomIV"].location != NSNotFound; configuration.presenceHeartbeatValue = 20; configuration.presenceHeartbeatInterval = 0; @@ -68,7 +67,6 @@ - (PNConfiguration *)configurationForTestCaseWithName:(NSString *)name { configuration.cipherKey = @"secret"; } } -#pragma clang diagnostic pop self.initializedClientsCount++; @@ -93,10 +91,7 @@ - (void)setUp { - (void)testItShouldSubscribeToSingleChannelAndReceiveConnectedEvent { NSString *channel = [self channelWithName:@"test-channel1"]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addStatusHandlerForClient:self.client @@ -107,7 +102,7 @@ - (void)testItShouldSubscribeToSingleChannelAndReceiveConnectedEvent { XCTAssertEqual([@0 compare:status.currentTimetoken], NSOrderedAscending); XCTAssertTrue([self.client isSubscribedOn:channel]); *remove = YES; - + handler(); } }]; @@ -124,12 +119,9 @@ - (void)testItShouldSubscribeToSingleChannelAndTriggerOnlineEvent { [self subscribeClient:client2 toChannels:@[channel] withPresence:YES]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addPresenceHandlerForClient:client2 @@ -154,10 +146,7 @@ - (void)testItShouldSubscribeToSingleChannelAndTriggerOnlineEvent { - (void)testItShouldSubscribeToSingleChannelWithPresenceAndReceiveOwnOnlineEvent { NSString *channel = [self channelWithName:@"test-channel1"]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addPresenceHandlerForClient:self.client @@ -186,10 +175,7 @@ - (void)testItShouldSubscribeToMultipleChannelsAndReceiveConnectedEvent { NSArray *channels = [self channelsWithNames:@[@"test-channel1", @"test-channel2"]]; NSSet *subscriptionChannelsSet = [NSSet setWithArray:channels]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addStatusHandlerForClient:self.client @@ -220,11 +206,8 @@ - (void)testItShouldSubscribeToMultipleChannelsAndTriggerOnlineEvent { [self subscribeClient:client2 toChannels:channels withPresence:YES]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addPresenceHandlerForClient:client2 @@ -257,11 +240,8 @@ - (void)testItShouldSubscribeToMultipleChannelsAndTriggerOnlineEventWhenSubscrib [self subscribeClient:client2 toChannels:channels withPresence:NO]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToNotCompleteIn:self.falseTestCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addPresenceHandlerForClient:client2 @@ -281,8 +261,7 @@ - (void)testItShouldSubscribeToMultipleChannelsAndTriggerOnlineEventWhenSubscrib [client2 subscribeToPresenceChannels:@[channels.lastObject]]; [self waitTask:@"waitForSubscribeOnPresence" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; - - + XCTAssertTrue([client2 isSubscribedOn:[channels.lastObject stringByAppendingString:@"-pnpres"]]); [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { @@ -305,10 +284,7 @@ - (void)testItShouldSubscribeToMultipleChannelsWithPresenceAndReceiveOwnOnlineEv NSArray *channels = [self channelsWithNames:@[@"test-channel1", @"test-channel2"]]; __block NSUInteger reportedOnlineCount = 0; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addPresenceHandlerForClient:self.client @@ -341,10 +317,7 @@ - (void)testItShouldSubscribeToSingleChannelAndSetState { channel: @{ @"channel1-state": [self randomizedValuesWithValues:@[@"channel-1-random-value"]] } }; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addStatusHandlerForClient:self.client @@ -386,10 +359,7 @@ - (void)testItShouldSubscribeToMultipleChannelsAndSetState { channels.lastObject: @{ @"channel2-state": [self randomizedValuesWithValues:@[@"channel-2-random-value"]] } }; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addStatusHandlerForClient:self.client @@ -484,10 +454,7 @@ - (void)testItShouldSubscribeToSingleChannelGroupAndReceiveConnectedEvent { [self addChannels:@[channel] toChannelGroup:channelGroup usingClient:nil]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addStatusHandlerForClient:self.client @@ -505,7 +472,7 @@ - (void)testItShouldSubscribeToSingleChannelGroupAndReceiveConnectedEvent { [self.client subscribeToChannelGroups:@[channelGroup] withPresence:NO]; }]; - + [self removeChannelGroup:channelGroup usingClient:nil]; } @@ -520,11 +487,8 @@ - (void)testItShouldSubscribeToSingleChannelGroupAndTriggerOnlineEvent { [self subscribeClient:client2 toChannelGroups:@[channelGroup] withPresence:YES]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addPresenceHandlerForClient:client2 @@ -544,7 +508,7 @@ - (void)testItShouldSubscribeToSingleChannelGroupAndTriggerOnlineEvent { [client1 subscribeToChannelGroups:@[channelGroup] withPresence:NO]; }]; - + [self removeChannelGroup:channelGroup usingClient:client1]; } @@ -556,10 +520,7 @@ - (void)testItShouldSubscribeToSingleChannelGroupWithPresenceAndReceiveOwnOnline [self addChannels:@[channel] toChannelGroup:channelGroup usingClient:nil]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addPresenceHandlerForClient:self.client @@ -581,7 +542,7 @@ - (void)testItShouldSubscribeToSingleChannelGroupWithPresenceAndReceiveOwnOnline [self.client subscribeToChannelGroups:@[channelGroup] withPresence:YES]; }]; - + [self removeChannelGroup:channelGroup usingClient:nil]; } @@ -595,10 +556,7 @@ - (void)testItShouldSubscribeToMultipleChannelGroupsAndReceiveConnectedEvent { [self addChannels:@[channels.lastObject] toChannelGroup:channelGroups.lastObject usingClient:nil]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addStatusHandlerForClient:self.client @@ -617,7 +575,7 @@ - (void)testItShouldSubscribeToMultipleChannelGroupsAndReceiveConnectedEvent { [self.client subscribeToChannelGroups:channelGroups withPresence:NO]; }]; - + [self removeChannelGroup:channelGroups.firstObject usingClient:nil]; [self removeChannelGroup:channelGroups.lastObject usingClient:nil]; } @@ -635,11 +593,8 @@ - (void)testItShouldSubscribeToMultipleChannelGroupsAndTriggerOnlineEvent { [self subscribeClient:client2 toChannelGroups:channelGroups withPresence:YES]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertFalse(client2.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addPresenceHandlerForClient:client2 @@ -661,7 +616,7 @@ - (void)testItShouldSubscribeToMultipleChannelGroupsAndTriggerOnlineEvent { [client1 subscribeToChannelGroups:channelGroups withPresence:NO]; }]; - + [self removeChannelGroup:channelGroups.firstObject usingClient:client1]; [self removeChannelGroup:channelGroups.lastObject usingClient:client1]; } @@ -676,10 +631,7 @@ - (void)testItShouldSubscribeToMultipleChannelGroupsWithPresenceAndReceiveOwnOnl [self addChannels:@[channels.lastObject] toChannelGroup:channelGroups.lastObject usingClient:nil]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addPresenceHandlerForClient:self.client @@ -701,7 +653,7 @@ - (void)testItShouldSubscribeToMultipleChannelGroupsWithPresenceAndReceiveOwnOnl [self.client subscribeToChannelGroups:channelGroups withPresence:YES]; }]; - + [self removeChannelGroup:channelGroups.firstObject usingClient:nil]; [self removeChannelGroup:channelGroups.lastObject usingClient:nil]; } @@ -720,10 +672,7 @@ - (void)testItShouldSubscribeToSingleChannelGroupAndSetState { [self addChannels:@[channel] toChannelGroup:channelGroup usingClient:nil]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addStatusHandlerForClient:self.client @@ -753,7 +702,7 @@ - (void)testItShouldSubscribeToSingleChannelGroupAndSetState { handler(); }]; }]; - + [self removeChannelGroup:channelGroup usingClient:nil]; } @@ -777,10 +726,7 @@ - (void)testItShouldSubscribeToMultipleChannelGroupsAndSetState { [self addChannels:@[channels.lastObject] toChannelGroup:channelGroups.lastObject usingClient:nil]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addStatusHandlerForClient:self.client @@ -814,7 +760,7 @@ - (void)testItShouldSubscribeToMultipleChannelGroupsAndSetState { handler(); }); }]; - + [self removeChannelGroup:channelGroups.firstObject usingClient:nil]; [self removeChannelGroup:channelGroups.lastObject usingClient:nil]; } @@ -845,7 +791,7 @@ - (void)testItShouldNotSubscribeToChannelGroupAndRetryWhenReceiveAccessDeniedEve NSString *channelGroup = [self channelGroupWithName:@"test-channel-group1"]; __block NSUInteger retriedCount = 0; - + [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addStatusHandlerForClient:self.client withBlock:^(PubNub *client, PNSubscribeStatus *status, BOOL *remove) { @@ -881,10 +827,7 @@ - (void)testItShouldSubscribeToChannelAndGroupUsingBuilderPatternInterface { [self addChannels:channels toChannelGroup:channelGroup usingClient:nil]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addStatusHandlerForClient:self.client @@ -921,10 +864,7 @@ - (void)testItShouldSubscribeToPresenceChannelUsingBuilderPatternInterface { [self subscribeClient:client2 toChannels:channels withPresence:NO]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertFalse(self.client.currentConfiguration.shouldUseRandomInitializationVector); -#pragma clang diagnostic pop [self waitToNotCompleteIn:self.falseTestCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addPresenceHandlerForClient:client2 @@ -1459,7 +1399,7 @@ - (void)testItShouldSubscribeToSingleChannelAndReceiveMessageWhenPublished { * Received information should be used to add new entry to `ItShouldSubscribeToSingleChannelAndReceiveMessageWhenDataWithNulBytePublished.json` * with packet type \b 2 (check previous entries with same type). */ -- (void)testItShouldSubscribeToSingleChannelAndReceiveMessageWhenDataWithNulBytePublished { +- (void)disabled_testItShouldSubscribeToSingleChannelAndReceiveMessageWhenDataWithNulBytePublished { if ([self shouldSkipTestWithManuallyModifiedMockedResponse]) { NSLog(@"'%@' requires special conditions (modified mocked response). Skip", self.name); return; @@ -1505,12 +1445,9 @@ - (void)testItShouldSubscribeToSingleChannelAndReceiveDecryptedMessageWhenPublis [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertNotNil(client1.currentConfiguration.cipherKey); XCTAssertNotNil(client2.currentConfiguration.cipherKey); XCTAssertEqualObjects(client1.currentConfiguration.cipherKey, client2.currentConfiguration.cipherKey); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 @@ -1541,14 +1478,11 @@ - (void)testItShouldSubscribeToSingleChannelAndReceiveDecryptedMessageWhenPublis [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertTrue(client1.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertTrue(client2.currentConfiguration.shouldUseRandomInitializationVector); XCTAssertNotNil(client1.currentConfiguration.cipherKey); XCTAssertNotNil(client2.currentConfiguration.cipherKey); XCTAssertEqualObjects(client1.currentConfiguration.cipherKey, client2.currentConfiguration.cipherKey); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:client2 @@ -1576,8 +1510,8 @@ - (void)testItShouldSubscribeToSingleChannelAndReceiveNotDecryptedMessageWhenPub NSString *channel = [self channelWithName:@"test-channel1"]; PubNub *client1 = [self createPubNubForUser:@"serhii"]; PubNub *client2 = [self createPubNubForUser:@"david"]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + + NSString *encryptedMessage = [PNAES encrypt:publishedMessageData withKey:client1.currentConfiguration.cipherKey]; [self subscribeClient:client2 toChannels:@[channel] withPresence:NO]; @@ -1587,13 +1521,12 @@ - (void)testItShouldSubscribeToSingleChannelAndReceiveNotDecryptedMessageWhenPub XCTAssertNotNil(client1.currentConfiguration.cipherKey); XCTAssertNotNil(client2.currentConfiguration.cipherKey); XCTAssertNotEqualObjects(client1.currentConfiguration.cipherKey, client2.currentConfiguration.cipherKey); -#pragma clang diagnostic pop [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addStatusHandlerForClient:client2 withBlock:^(PubNub *client, PNSubscribeStatus *status, BOOL *remove) { if (status.operation == PNSubscribeOperation && status.category == PNDecryptionErrorCategory) { - PNMessageData *messageData = status.associatedObject; - + PNSubscribeMessageEventData *messageData = status.associatedObject; + XCTAssertEqualObjects(messageData.message, encryptedMessage); XCTAssertEqualObjects(messageData.subscription, channel); XCTAssertEqualObjects(messageData.channel, channel); @@ -1617,7 +1550,7 @@ - (void)testItShouldSubscribeToMultipleChannelsAndReceiveMessageWhenPublished { [self subscribeClient:self.client toChannels:channels withPresence:NO]; [self waitTask:@"waitForDistribution" completionFor:(YHVVCR.cassette.isNewCassette ? 3.f : 0.f)]; - + [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addMessageHandlerForClient:self.client withBlock:^(PubNub *client, PNMessageResult *message, BOOL *remove) { @@ -1645,7 +1578,7 @@ - (void)testItShouldSubscribeToSingleChannelWithCatchUpOnSecondChannelWhenSetToK NSDictionary *publishedMessage = @{ @"test-message": [self randomizedValuesWithValues:@[@"message"]] }; __block NSNumber *lastTimetoken = nil; - + [self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) { [self addStatusHandlerForClient:self.client withBlock:^(PubNub *client, PNSubscribeStatus *status, BOOL *remove) { @@ -1677,10 +1610,7 @@ - (void)testItShouldSubscribeToSingleChannelWithCatchUpOnSecondChannelWhenSetToK [self addMessageHandlerForClient:self.client withBlock:^(PubNub *client, PNMessageResult *message, BOOL *remove) { - NSURLRequest *request = [message valueForKey:@"clientRequest"]; - if ([message.data.publisher isEqualToString:self.client.currentConfiguration.userID]) { - XCTAssertTrue([request.URL.absoluteString pnt_includesString:lastTimetoken.stringValue]); XCTAssertEqualObjects(message.data.message, publishedMessage); *remove = YES; @@ -1909,7 +1839,6 @@ - (void)testItShouldSubscribeToSingleChannelGroupWithCatchUpOnSecondChannelGroup NSURLRequest *request = [message valueForKey:@"clientRequest"]; if ([message.data.publisher isEqualToString:self.client.currentConfiguration.userID]) { - XCTAssertTrue([request.URL.absoluteString pnt_includesString:lastTimetoken.stringValue]); XCTAssertEqualObjects(message.data.message, publishedMessage); *remove = YES; @@ -2264,6 +2193,7 @@ - (void)testItShouldSubscribeToSingleChannelAndReceiveFilteredMessagesWhenFilter #pragma mark - -#pragma clang diagnostic pop @end + +#pragma clang diagnostic pop diff --git a/Tests/Tests/Integration/PNTimeIntegrationTest.m b/Tests/Tests/Integration/PNTimeIntegrationTest.m index f53bb9a04..4049d7184 100644 --- a/Tests/Tests/Integration/PNTimeIntegrationTest.m +++ b/Tests/Tests/Integration/PNTimeIntegrationTest.m @@ -27,6 +27,7 @@ @implementation PNTimeIntegrationTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down @@ -90,7 +91,6 @@ - (void)testItShouldFetchPubNubTimeAfterRetry { XCTAssertTrue(status.isError); XCTAssertEqual(status.operation, PNTimeOperation); XCTAssertEqual(status.category, PNMalformedResponseCategory); - XCTAssertEqual(status.statusCode, 404); retried = YES; [status retry]; diff --git a/Tests/Tests/Unit/Core/Access Manager/PNPAMTokenTest.m b/Tests/Tests/Unit/Core/Access Manager/PNPAMTokenTest.m index b34b6340a..77cd81d11 100644 --- a/Tests/Tests/Unit/Core/Access Manager/PNPAMTokenTest.m +++ b/Tests/Tests/Unit/Core/Access Manager/PNPAMTokenTest.m @@ -2,7 +2,6 @@ * @author Serhii Mamontov * @copyright © 2010-2019 PubNub, Inc. */ -#import #import #import "PNRecordableTestCase.h" #import @@ -46,8 +45,8 @@ - (void)testItShouldParseToken { XCTAssertNotNil(token.patterns, @"'patterns' is missing"); XCTAssertNotNil(token.error); - XCTAssertEqual(token.error.code, kPNAuthPAMTokenWrongUUIDError); - + XCTAssertEqual(token.error.code, PNAuthErrorPAMTokenWrongUUID); + XCTAssertEqualObjects(token.authorizedUUID, @"test-authorized-uuid"); XCTAssertEqual(token.resources.channels.count, 1); XCTAssertEqual(token.resources.groups.count, 1); diff --git a/Tests/Tests/Unit/Core/Actions/Messages/PNMessageActionsTest.m b/Tests/Tests/Unit/Core/Actions/Messages/PNMessageActionsTest.m index 13486123a..2b8bee479 100644 --- a/Tests/Tests/Unit/Core/Actions/Messages/PNMessageActionsTest.m +++ b/Tests/Tests/Unit/Core/Actions/Messages/PNMessageActionsTest.m @@ -2,8 +2,11 @@ * @author Serhii Mamontov * @copyright © 2010-2022 PubNub, Inc. */ -#import #import +#import +#import +#import +#import #import "PNRecordableTestCase.h" #import #import @@ -29,6 +32,7 @@ @implementation PNMessageActionsTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - VCR configuration @@ -58,18 +62,15 @@ - (void)testItShouldAddMessageActionWhenCalled { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNAddMessageActionOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNAddMessageActionRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - NSData *sentData = [self objectForInvocation:invocation argumentAtIndex:3]; - - XCTAssertEqualObjects(parameters.pathComponents[@"{channel}"], expectedChannel); - XCTAssertEqualObjects(parameters.pathComponents[@"{message-timetoken}"], - expectedMessageTimetoken.stringValue); - XCTAssertEqualObjects(sentData, expectedPayload); + PNAddMessageActionRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertNil([request validate]); + XCTAssertEqualObjects(request.channel, expectedChannel); + XCTAssertEqualObjects(request.messageTimetoken, expectedMessageTimetoken); + XCTAssertEqualObjects(request.body, expectedPayload); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -227,18 +228,14 @@ - (void)testItShouldRemoveMessageActionWhenCalled { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNRemoveMessageActionOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNRemoveMessageActionRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertEqualObjects(parameters.pathComponents[@"{channel}"], expectedChannel); - XCTAssertEqualObjects(parameters.pathComponents[@"{message-timetoken}"], - expectedMessageTimetoken.stringValue); - XCTAssertEqualObjects(parameters.pathComponents[@"{action-timetoken}"], - expectedActionTimetoken.stringValue); + PNRemoveMessageActionRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertEqualObjects(request.channel, expectedChannel); + XCTAssertEqualObjects(request.messageTimetoken, expectedMessageTimetoken); + XCTAssertEqualObjects(request.messageActionTimetoken, expectedActionTimetoken); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -325,16 +322,14 @@ - (void)testItShouldFetchMessagesActionsWhenCalled { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchMessagesActionsOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchMessageActionsRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertEqualObjects(parameters.query[@"start"], expectedStart.stringValue); - XCTAssertEqualObjects(parameters.query[@"end"], expectedEnd.stringValue); - XCTAssertEqualObjects(parameters.query[@"limit"], expectedLimit.stringValue); + PNFetchMessageActionsRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertEqualObjects(request.start, expectedStart); + XCTAssertEqualObjects(request.end, expectedEnd); + XCTAssertEqual(request.limit, expectedLimit.unsignedIntegerValue); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ diff --git a/Tests/Tests/Unit/Core/History/PNMessageCountTest.m b/Tests/Tests/Unit/Core/History/PNMessageCountTest.m index 0569d4f19..a4f4e05f9 100644 --- a/Tests/Tests/Unit/Core/History/PNMessageCountTest.m +++ b/Tests/Tests/Unit/Core/History/PNMessageCountTest.m @@ -2,11 +2,10 @@ * @author Serhii Mamontov * @copyright © 2010-2020 PubNub, Inc. */ -#import +#import #import #import "PNRecordableTestCase.h" #import -#import #import @@ -30,6 +29,7 @@ @implementation PNMessageCountTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - VCR configuration @@ -49,24 +49,23 @@ - (void)testItShouldReturnMessageCountsBuilder { #pragma mark - Tests :: Call - (void)testItShouldFetchMessageCountsWhenCalled { - NSArray *channels = @[@"PubNub 1", @"PubNub-2"]; + NSArray *expectedChannels = @[@"PubNub 1", @"PubNub-2"]; NSArray *timetokens = @[@(1550140202)]; - NSString *expectedChannels = [PNChannel namesForRequest:channels]; NSString *expectedTimetokens = @(15501402020000000).stringValue; id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNMessageCountOperation - withParameters:[OCMArg any] completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNHistoryMessagesCountRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertEqualObjects(parameters.pathComponents[@"{channels}"], expectedChannels); - XCTAssertEqualObjects(parameters.query[@"timetoken"], expectedTimetokens); + PNHistoryMessagesCountRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertEqualObjects(request.channels, expectedChannels); + XCTAssertEqualObjects(request.request.query[@"timetoken"], expectedTimetokens); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ - self.client.messageCounts().channels(channels).timetokens(timetokens) + self.client.messageCounts().channels(expectedChannels).timetokens(timetokens) .performWithCompletion(^(PNMessageCountResult *result, PNErrorStatus *status) { }); }]; } @@ -78,14 +77,15 @@ - (void)testItShouldUseTimetokenWhenOnlyOneTimetokenProvidedForChannels { id clientMock = [self mockForObject:self.client]; - OCMStub([clientMock processOperation:PNMessageCountOperation withParameters:[OCMArg any] - completionBlock:[OCMArg any]]).andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertNil(parameters.query[@"channelsTimetoken"]); - XCTAssertEqualObjects(parameters.query[@"timetoken"], expectedTimetokens); - }); - + OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNHistoryMessagesCountRequest class]] + withCompletion:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + PNHistoryMessagesCountRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertNil(request.request.query[@"channelsTimetoken"]); + XCTAssertEqualObjects(request.request.query[@"timetoken"], expectedTimetokens); + }); + self.client.messageCounts().channels(channels).timetokens(timetokens) .performWithCompletion(^(PNMessageCountResult *result, PNErrorStatus *status) { }); } @@ -97,31 +97,33 @@ - (void)testItShouldUseChannelsTimetokenWhenMultipleOneTimetokenProvidedForChann id clientMock = [self mockForObject:self.client]; - OCMStub([clientMock processOperation:PNMessageCountOperation withParameters:[OCMArg any] - completionBlock:[OCMArg any]]).andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertNil(parameters.query[@"timetoken"]); - XCTAssertEqualObjects(parameters.query[@"channelsTimetoken"], expectedTimetokens); - }); - + OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNHistoryMessagesCountRequest class]] + withCompletion:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + PNHistoryMessagesCountRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertNil(request.request.query[@"timetoken"]); + XCTAssertEqualObjects(request.request.query[@"channelsTimetoken"], expectedTimetokens); + }); + self.client.messageCounts().channels(channels).timetokens(timetokens) .performWithCompletion(^(PNMessageCountResult *result, PNErrorStatus *status) { }); } -- (void)testItShouldNotSetChannelsWhenNumberOfChannelsAndTimetokensIsDifferent { +- (void)testItShouldFailValidationWhenNumberOfChannelsAndTimetokensIsDifferent { NSArray *channels = @[@"PubNub 1", @"PubNub-2"]; NSArray *timetokens = @[@(1550140202), @(1550140204), @(1550140206)]; id clientMock = [self mockForObject:self.client]; - OCMStub([clientMock processOperation:PNMessageCountOperation withParameters:[OCMArg any] - completionBlock:[OCMArg any]]).andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertNil(parameters.pathComponents[@"{channels}"]); - }); - + OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNHistoryMessagesCountRequest class]] + withCompletion:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + PNHistoryMessagesCountRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertNotNil([request validate]); + }); + self.client.messageCounts().channels(channels).timetokens(timetokens) .performWithCompletion(^(PNMessageCountResult *result, PNErrorStatus *status) { }); } @@ -159,9 +161,9 @@ - (void)testItShouldRetryWhenRetryOnFailureCalled { }]; id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNMessageCountOperation - withParameters:[OCMArg any] completionBlock:[OCMArg any]]); - + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNHistoryMessagesCountRequest class]] + withCompletion:[OCMArg any]]); + [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ [errorStatus retry]; }]; diff --git a/Tests/Tests/Unit/Core/Objects/PNChannelMemberObjectsTest.m b/Tests/Tests/Unit/Core/Objects/PNChannelMemberObjectsTest.m index a7e6b703f..b57fa3115 100644 --- a/Tests/Tests/Unit/Core/Objects/PNChannelMemberObjectsTest.m +++ b/Tests/Tests/Unit/Core/Objects/PNChannelMemberObjectsTest.m @@ -2,7 +2,10 @@ * @author Serhii Mamontov * @copyright © 2010-2020 PubNub, Inc. */ -#import +#import +#import +#import +#import #import #import "PNRecordableTestCase.h" #import @@ -30,6 +33,7 @@ @implementation PNChannelMemberObjectsTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - VCR configuration @@ -68,25 +72,25 @@ - (void)testItShouldSetMembersWhenCalled { NSData *expectedPayload = [NSJSONSerialization dataWithJSONObject:expectedBody options:(NSJSONWritingOptions)0 error:nil]; - NSString *expectedFilterExpression = [PNString percentEscapedString:filterExpression]; + // Encoding is transport layer responsibility, so we are expecting raw string in query. + NSString *expectedFilterExpression = filterExpression; + id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNSetChannelMembersOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNSetChannelMembersRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - NSData *sentData = [self objectForInvocation:invocation argumentAtIndex:3]; - NSArray *includeFields = [parameters.query[@"include"] componentsSeparatedByString:@","]; + PNSetChannelMembersRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + NSArray *includeFields = [request.query[@"include"] componentsSeparatedByString:@","]; SEL sortSelector = @selector(caseInsensitiveCompare:); NSString *includeQuery = [[includeFields sortedArrayUsingSelector:sortSelector] componentsJoinedByString:@","]; - XCTAssertEqualObjects(parameters.pathComponents[@"{channel}"], expectedId); + XCTAssertNil([request validate]); + XCTAssertEqualObjects(request.identifier, expectedId); XCTAssertEqualObjects(includeQuery, @"custom,uuid.custom"); - XCTAssertEqualObjects(parameters.query[@"filter"], expectedFilterExpression); - XCTAssertEqualObjects(sentData, expectedPayload); + XCTAssertEqualObjects(request.query[@"filter"], expectedFilterExpression); + XCTAssertEqualObjects(request.body, expectedPayload); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -149,25 +153,24 @@ - (void)testItShouldRemoveMembersWhenCalled { NSData *expectedPayload = [NSJSONSerialization dataWithJSONObject:expectedBody options:(NSJSONWritingOptions)0 error:nil]; - NSString *expectedFilterExpression = [PNString percentEscapedString:filterExpression]; + // Encoding is transport layer responsibility, so we are expecting raw string in query. + NSString *expectedFilterExpression = filterExpression; id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNRemoveChannelMembersOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNRemoveChannelMembersRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - NSData *sentData = [self objectForInvocation:invocation argumentAtIndex:3]; - NSArray *includeFields = [parameters.query[@"include"] componentsSeparatedByString:@","]; + PNRemoveChannelMembersRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + NSArray *includeFields = [request.query[@"include"] componentsSeparatedByString:@","]; SEL sortSelector = @selector(caseInsensitiveCompare:); NSString *includeQuery = [[includeFields sortedArrayUsingSelector:sortSelector] componentsJoinedByString:@","]; - XCTAssertEqualObjects(parameters.pathComponents[@"{channel}"], expectedId); + XCTAssertNil([request validate]); + XCTAssertEqualObjects(request.identifier, expectedId); XCTAssertEqualObjects(includeQuery, @"custom,uuid.custom"); - XCTAssertEqualObjects(parameters.query[@"filter"], expectedFilterExpression); - XCTAssertEqualObjects(sentData, expectedPayload); + XCTAssertEqualObjects(request.query[@"filter"], expectedFilterExpression); + XCTAssertEqualObjects(request.body, expectedPayload); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -213,25 +216,24 @@ - (void)testItShouldManageMembersWhenCalled { NSData *expectedPayload = [NSJSONSerialization dataWithJSONObject:expectedBody options:(NSJSONWritingOptions)0 error:nil]; - NSString *expectedFilterExpression = [PNString percentEscapedString:filterExpression]; - + // Encoding is transport layer responsibility, so we are expecting raw string in query. + NSString *expectedFilterExpression = filterExpression; + id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNManageChannelMembersOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNManageChannelMembersRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - NSData *sentData = [self objectForInvocation:invocation argumentAtIndex:3]; - NSArray *includeFields = [parameters.query[@"include"] componentsSeparatedByString:@","]; + PNManageChannelMembersRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + NSArray *includeFields = [request.query[@"include"] componentsSeparatedByString:@","]; SEL sortSelector = @selector(caseInsensitiveCompare:); NSString *includeQuery = [[includeFields sortedArrayUsingSelector:sortSelector] componentsJoinedByString:@","]; - XCTAssertEqualObjects(parameters.pathComponents[@"{channel}"], expectedId); + XCTAssertNil([request validate]); + XCTAssertEqualObjects(request.identifier, expectedId); XCTAssertEqualObjects(includeQuery, @"custom,uuid.custom"); - XCTAssertEqualObjects(parameters.query[@"filter"], expectedFilterExpression); - XCTAssertEqualObjects(sentData, expectedPayload); + XCTAssertEqualObjects(request.query[@"filter"], expectedFilterExpression); + XCTAssertEqualObjects(request.body, expectedPayload); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -286,7 +288,8 @@ - (void)testItShouldSetDefaultFetchMembersIncludeFields { - (void)testItShouldFetchMembersWhenCalled { NSString *filterExpression = @"updated >= '2019-08-31T00:00:00Z'"; - NSString *expectedFilterExpression = [PNString percentEscapedString:filterExpression]; + // Encoding is transport layer responsibility, so we are expecting raw string in query. + NSString *expectedFilterExpression = filterExpression; NSString *expectedStart = [NSUUID UUID].UUIDString; NSString *expectedEnd = [NSUUID UUID].UUIDString; NSString *expectedId = [NSUUID UUID].UUIDString; @@ -294,21 +297,19 @@ - (void)testItShouldFetchMembersWhenCalled { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchChannelMembersOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) - .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertEqualObjects(parameters.pathComponents[@"{channel}"], expectedId); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); - XCTAssertEqualObjects(parameters.query[@"start"], expectedStart); - XCTAssertEqualObjects(parameters.query[@"end"], expectedEnd); - XCTAssertEqualObjects(parameters.query[@"limit"], expectedLimit.stringValue); - XCTAssertEqualObjects(parameters.query[@"filter"], expectedFilterExpression); - XCTAssertNil(parameters.query[@"count"]); - }); + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchChannelMembersRequest class]] + withCompletion:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + PNFetchChannelMembersRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertEqualObjects(request.identifier, expectedId); + XCTAssertEqualObjects(request.query[@"include"], @"custom"); + XCTAssertEqualObjects(request.query[@"start"], expectedStart); + XCTAssertEqualObjects(request.query[@"end"], expectedEnd); + XCTAssertEqualObjects(request.query[@"limit"], expectedLimit.stringValue); + XCTAssertEqualObjects(request.query[@"filter"], expectedFilterExpression); + XCTAssertNil(request.query[@"count"]); + }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ self.client.objects().channelMembers(expectedId) @@ -323,6 +324,6 @@ - (void)testItShouldFetchMembersWhenCalled { #pragma mark - -#pragma clang diagnostic pop - @end + +#pragma clang diagnostic pop diff --git a/Tests/Tests/Unit/Core/Objects/PNChannelMetadataObjectsTest.m b/Tests/Tests/Unit/Core/Objects/PNChannelMetadataObjectsTest.m index 6e5c2bbb1..0b2532e10 100644 --- a/Tests/Tests/Unit/Core/Objects/PNChannelMetadataObjectsTest.m +++ b/Tests/Tests/Unit/Core/Objects/PNChannelMetadataObjectsTest.m @@ -2,7 +2,11 @@ * @author Serhii Mamontov * @copyright © 2010-2020 PubNub, Inc. */ -#import +#import +#import +#import +#import +#import #import #import "PNRecordableTestCase.h" #import @@ -30,6 +34,7 @@ @implementation PNChannelMetadataObjectsTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - VCR configuration @@ -69,17 +74,15 @@ - (void)testItShouldSetChannelMetadataWhenCalled { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNSetChannelMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNSetChannelMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - NSData *sentData = [self objectForInvocation:invocation argumentAtIndex:3]; + PNSetChannelMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertEqualObjects(parameters.pathComponents[@"{channel}"], expectedId); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); - XCTAssertEqualObjects(sentData, expectedPayload); + XCTAssertNil([request validate]); + XCTAssertEqualObjects(request.identifier, expectedId); + XCTAssertEqualObjects(request.query[@"include"], @"custom"); + XCTAssertEqualObjects(request.body, expectedPayload); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -93,14 +96,12 @@ - (void)testItShouldSetChannelMetadataWhenCalled { - (void)testItShouldNotSetIncludeFieldsWhenCalledWithSetChannelMetadataIncludeFieldsSetToZero { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNSetChannelMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNSetChannelMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNSetChannelMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertNil(parameters.query[@"include"]); + XCTAssertNil(request.query[@"include"]); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -167,14 +168,12 @@ - (void)testItShouldRemoveChannelMetadataWhenCalled { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNRemoveChannelMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNRemoveChannelMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNRemoveChannelMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertEqualObjects(parameters.pathComponents[@"{channel}"], expectedId); + XCTAssertEqualObjects(request.identifier, expectedId); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -202,15 +201,13 @@ - (void)testItShouldFetchChannelMetadataWhenCalled { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchChannelMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchChannelMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNFetchChannelMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertEqualObjects(parameters.pathComponents[@"{channel}"], expectedId); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); + XCTAssertEqualObjects(request.identifier, expectedId); + XCTAssertEqualObjects(request.query[@"include"], @"custom"); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -224,14 +221,12 @@ - (void)testItShouldNotSetIncludeFieldsWhenCalledWithFetchChannelMetadataInclude id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchChannelMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchChannelMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNFetchChannelMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertNil(parameters.query[@"include"]); + XCTAssertNil(request.query[@"include"]); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -260,26 +255,25 @@ - (void)testItShouldSetDefaultFetchAllChannelsMetadataIncludeFields { - (void)testItShouldFetchAllChannelsMetadataWhenCalled { NSString *filterExpression = @"updated >= '2019-08-31T00:00:00Z'"; - NSString *expectedFilterExpression = [PNString percentEscapedString:filterExpression]; + // Encoding is transport layer responsibility, so we are expecting raw string in query. + NSString *expectedFilterExpression = filterExpression; NSString *expectedStart = [NSUUID UUID].UUIDString; NSString *expectedEnd = [NSUUID UUID].UUIDString; NSNumber *expectedLimit = @(56); id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchAllChannelsMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchAllChannelsMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertEqualObjects(parameters.query[@"start"], expectedStart); - XCTAssertEqualObjects(parameters.query[@"end"], expectedEnd); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); - XCTAssertEqualObjects(parameters.query[@"limit"], expectedLimit.stringValue); - XCTAssertEqualObjects(parameters.query[@"filter"], expectedFilterExpression); - XCTAssertNil(parameters.query[@"count"]); + PNFetchAllChannelsMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertEqualObjects(request.query[@"start"], expectedStart); + XCTAssertEqualObjects(request.query[@"end"], expectedEnd); + XCTAssertEqualObjects(request.query[@"include"], @"custom"); + XCTAssertEqualObjects(request.query[@"limit"], expectedLimit.stringValue); + XCTAssertEqualObjects(request.query[@"filter"], expectedFilterExpression); + XCTAssertNil(request.query[@"count"]); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -295,14 +289,12 @@ - (void)testItShouldFetchAllChannelsMetadataWhenCalled { - (void)testItShouldSetDefaultIncludeFieldsWhenCalledWithOutFetchAllChannelsMetadataIncludeFields { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchAllChannelsMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchAllChannelsMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNFetchAllChannelsMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertNotNil(parameters.query[@"include"]); + XCTAssertNotNil(request.query[@"include"]); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ diff --git a/Tests/Tests/Unit/Core/Objects/PNMembershipObjectsTest.m b/Tests/Tests/Unit/Core/Objects/PNMembershipObjectsTest.m index e700c79b4..fb1159db0 100644 --- a/Tests/Tests/Unit/Core/Objects/PNMembershipObjectsTest.m +++ b/Tests/Tests/Unit/Core/Objects/PNMembershipObjectsTest.m @@ -2,7 +2,11 @@ * @author Serhii Mamontov * @copyright © 2010-2020 PubNub, Inc. */ -#import +#import +#import +#import +#import +#import #import #import "PNRecordableTestCase.h" #import @@ -30,6 +34,7 @@ @implementation PNMembershipObjectsTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - VCR configuration @@ -70,25 +75,24 @@ - (void)testItShouldSetMembershipsWhenCalled { NSData *expectedPayload = [NSJSONSerialization dataWithJSONObject:expectedBody options:(NSJSONWritingOptions)0 error:nil]; - NSString *expectedFilterExpression = [PNString percentEscapedString:filterExpression]; - + // Encoding is transport layer responsibility, so we are expecting raw string in query. + NSString *expectedFilterExpression = filterExpression; + id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNSetMembershipsOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNSetMembershipsRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - NSData *sentData = [self objectForInvocation:invocation argumentAtIndex:3]; - NSArray *includeFields = [parameters.query[@"include"] componentsSeparatedByString:@","]; + PNSetMembershipsRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + NSArray *includeFields = [request.query[@"include"] componentsSeparatedByString:@","]; SEL sortSelector = @selector(caseInsensitiveCompare:); NSString *includeQuery = [[includeFields sortedArrayUsingSelector:sortSelector] componentsJoinedByString:@","]; - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); + XCTAssertNil([request validate]); + XCTAssertEqualObjects(request.identifier, expectedId); XCTAssertEqualObjects(includeQuery, @"channel.custom,custom"); - XCTAssertEqualObjects(parameters.query[@"filter"], expectedFilterExpression); - XCTAssertEqualObjects(sentData, expectedPayload); + XCTAssertEqualObjects(request.query[@"filter"], expectedFilterExpression); + XCTAssertEqualObjects(request.body, expectedPayload); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -109,15 +113,13 @@ - (void)testItShouldSetMembershipsUsingPubNubClientUUIDWhenUUIDIsMissing { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNSetMembershipsOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) - .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNSetMembershipsRequest class]] + withCompletion:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + PNSetMembershipsRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertEqualObjects(request.identifier, expectedId); + XCTAssertEqualObjects(request.query[@"include"], @"custom"); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -156,25 +158,24 @@ - (void)testItShouldRemoveMembershipsWhenCalled { NSData *expectedPayload = [NSJSONSerialization dataWithJSONObject:expectedBody options:(NSJSONWritingOptions)0 error:nil]; - NSString *expectedFilterExpression = [PNString percentEscapedString:filterExpression]; + // Encoding is transport layer responsibility, so we are expecting raw string in query. + NSString *expectedFilterExpression = filterExpression; id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNRemoveMembershipsOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNRemoveMembershipsRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - NSData *sentData = [self objectForInvocation:invocation argumentAtIndex:3]; - NSArray *includeFields = [parameters.query[@"include"] componentsSeparatedByString:@","]; + PNRemoveMembershipsRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + NSArray *includeFields = [request.query[@"include"] componentsSeparatedByString:@","]; SEL sortSelector = @selector(caseInsensitiveCompare:); NSString *includeQuery = [[includeFields sortedArrayUsingSelector:sortSelector] componentsJoinedByString:@","]; - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); + XCTAssertNil([request validate]); + XCTAssertEqualObjects(request.identifier, expectedId); XCTAssertEqualObjects(includeQuery, @"channel.custom,custom"); - XCTAssertEqualObjects(parameters.query[@"filter"], expectedFilterExpression); - XCTAssertEqualObjects(sentData, expectedPayload); + XCTAssertEqualObjects(request.query[@"filter"], expectedFilterExpression); + XCTAssertEqualObjects(request.body, expectedPayload); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -195,14 +196,12 @@ - (void)testItShouldRemoveMembershipsUsingPubNubClientUUIDWhenUUIDIsMissing { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNSetMembershipsOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) - .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNSetMembershipsRequest class]] + withCompletion:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + PNSetMembershipsRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertEqualObjects(request.identifier, expectedId); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -243,25 +242,24 @@ - (void)testItShouldManageMembershipsWhenCalled { NSData *expectedPayload = [NSJSONSerialization dataWithJSONObject:expectedBody options:(NSJSONWritingOptions)0 error:nil]; - NSString *expectedFilterExpression = [PNString percentEscapedString:filterExpression]; - + // Encoding is transport layer responsibility, so we are expecting raw string in query. + NSString *expectedFilterExpression = filterExpression; + id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNManageMembershipsOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNManageMembershipsRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - NSData *sentData = [self objectForInvocation:invocation argumentAtIndex:3]; - NSArray *includeFields = [parameters.query[@"include"] componentsSeparatedByString:@","]; + PNManageMembershipsRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + NSArray *includeFields = [request.query[@"include"] componentsSeparatedByString:@","]; SEL sortSelector = @selector(caseInsensitiveCompare:); NSString *includeQuery = [[includeFields sortedArrayUsingSelector:sortSelector] componentsJoinedByString:@","]; - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); + XCTAssertNil([request validate]); + XCTAssertEqualObjects(request.identifier, expectedId); XCTAssertEqualObjects(includeQuery, @"channel.custom,custom"); - XCTAssertEqualObjects(parameters.query[@"filter"], expectedFilterExpression); - XCTAssertEqualObjects(sentData, expectedPayload); + XCTAssertEqualObjects(request.query[@"filter"], expectedFilterExpression); + XCTAssertEqualObjects(request.body, expectedPayload); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -283,15 +281,13 @@ - (void)testItShouldManageMembershipsUsingPubNubClientUUIDWhenUUIDIsMissing { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNManageMembershipsOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNManageMembershipsRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNManageMembershipsRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); + XCTAssertEqualObjects(request.identifier, expectedId); + XCTAssertEqualObjects(request.query[@"include"], @"custom"); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -344,7 +340,8 @@ - (void)testItShouldSetDefaultFetchMembershipIncludeFields { - (void)testItShouldFetchMembershipsWhenCalled { NSString *filterExpression = @"updated >= '2019-08-31T00:00:00Z'"; - NSString *expectedFilterExpression = [PNString percentEscapedString:filterExpression]; + // Encoding is transport layer responsibility, so we are expecting raw string in query. + NSString *expectedFilterExpression = filterExpression; NSString *expectedStart = [NSUUID UUID].UUIDString; NSString *expectedEnd = [NSUUID UUID].UUIDString; NSString *expectedId = [NSUUID UUID].UUIDString; @@ -352,20 +349,18 @@ - (void)testItShouldFetchMembershipsWhenCalled { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchMembershipsOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchMembershipsRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNFetchMembershipsRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); - XCTAssertEqualObjects(parameters.query[@"start"], expectedStart); - XCTAssertEqualObjects(parameters.query[@"end"], expectedEnd); - XCTAssertEqualObjects(parameters.query[@"limit"], expectedLimit.stringValue); - XCTAssertEqualObjects(parameters.query[@"filter"], expectedFilterExpression); - XCTAssertNil(parameters.query[@"count"]); + XCTAssertEqualObjects(request.identifier, expectedId); + XCTAssertEqualObjects(request.query[@"include"], @"custom"); + XCTAssertEqualObjects(request.query[@"start"], expectedStart); + XCTAssertEqualObjects(request.query[@"end"], expectedEnd); + XCTAssertEqualObjects(request.query[@"limit"], expectedLimit.stringValue); + XCTAssertEqualObjects(request.query[@"filter"], expectedFilterExpression); + XCTAssertNil(request.query[@"count"]); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -385,15 +380,13 @@ - (void)testItShouldFetchMembershipsUsingPubNubClientUUIDMembershipsWhenUUIDIsMi id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchMembershipsOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchMembershipsRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNFetchMembershipsRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); + XCTAssertEqualObjects(request.identifier, expectedId); + XCTAssertEqualObjects(request.query[@"include"], @"custom"); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ diff --git a/Tests/Tests/Unit/Core/Objects/PNUUIDMetadataObjectsTest.m b/Tests/Tests/Unit/Core/Objects/PNUUIDMetadataObjectsTest.m index 82f432a0b..1d0057a8a 100644 --- a/Tests/Tests/Unit/Core/Objects/PNUUIDMetadataObjectsTest.m +++ b/Tests/Tests/Unit/Core/Objects/PNUUIDMetadataObjectsTest.m @@ -2,8 +2,12 @@ * @author Serhii Mamontov * @copyright © 2010-2020 PubNub, Inc. */ -#import #import +#import +#import +#import +#import +#import #import "PNRecordableTestCase.h" #import #import @@ -30,6 +34,7 @@ @implementation PNUUIDMetadataObjectsTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - VCR configuration @@ -67,19 +72,17 @@ - (void)testItShouldSetUUIDMetadataWhenCalled { options:(NSJSONWritingOptions)0 error:nil]; - + id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNSetUUIDMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNSetUUIDMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - NSData *sentData = [self objectForInvocation:invocation argumentAtIndex:3]; - - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); - XCTAssertEqualObjects(sentData, expectedPayload); + PNSetUUIDMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertNil([request validate]); + XCTAssertEqualObjects(request.identifier, expectedId); + XCTAssertEqualObjects(request.request.query[@"include"], @"custom"); + XCTAssertEqualObjects(request.body, expectedPayload); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -93,14 +96,12 @@ - (void)testItShouldSetUUIDMetadataWhenCalled { - (void)testItShouldNotSetIncludeFieldsWhenCalledWithSetUUIDMetadataIncludeFieldsSetToZero { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNSetUUIDMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNSetUUIDMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertNil(parameters.query[@"include"]); + PNSetUUIDMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertNil(request.query[@"include"]); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -108,7 +109,7 @@ - (void)testItShouldNotSetIncludeFieldsWhenCalledWithSetUUIDMetadataIncludeField .uuid([NSUUID UUID].UUIDString) .name([NSUUID UUID].UUIDString) .includeFields(0) - .performWithCompletion(^(PNSetUUIDMetadataStatus *status) {}); + .performWithCompletion(^(PNSetUUIDMetadataStatus *status) { }); }]; } @@ -117,15 +118,13 @@ - (void)testItShouldSetUUIDMetadataUsingPubNubClientUUIDWhenUUIDIsMissing { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNSetUUIDMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNSetUUIDMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNSetUUIDMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); + XCTAssertEqualObjects(request.identifier, expectedId); + XCTAssertEqualObjects(request.query[@"include"], @"custom"); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -194,14 +193,12 @@ - (void)testItShouldRemoveUUIDMetadataWhenCalled { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNRemoveUUIDMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNRemoveUUIDMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNRemoveUUIDMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); + XCTAssertEqualObjects(request.identifier, expectedId); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -216,14 +213,12 @@ - (void)testItShouldRemoveUUIDMetadataUsingPubNubClientUUIDWhenUUIDIsMissing { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNRemoveUUIDMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNRemoveUUIDMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNRemoveUUIDMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); + XCTAssertEqualObjects(request.identifier, expectedId); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -254,15 +249,13 @@ - (void)testItShouldFetchUUIDMetadataWhenCalled { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchUUIDMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchUUIDMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); + PNFetchUUIDMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertEqualObjects(request.identifier, expectedId); + XCTAssertEqualObjects(request.query[@"include"], @"custom"); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -274,14 +267,12 @@ - (void)testItShouldFetchUUIDMetadataWhenCalled { - (void)testItShouldNotSetIncludeFieldsWhenCalledWithFetchUUIDMetadataIncludeFieldsSetToZero { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchUUIDMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchUUIDMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNFetchUUIDMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertNil(parameters.query[@"include"]); + XCTAssertNil(request.query[@"include"]); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -297,15 +288,13 @@ - (void)testItShouldFetchUUIDMetadataUsingPubNubClientUUIDWhenUUIDIsMissing { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchUUIDMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchUUIDMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNFetchUUIDMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertEqualObjects(parameters.pathComponents[@"{uuid}"], expectedId); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); + XCTAssertEqualObjects(request.identifier, expectedId); + XCTAssertEqualObjects(request.query[@"include"], @"custom"); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -333,26 +322,25 @@ - (void)testItShouldSetDefaultFetchAllUUIDMetadataIncludeFields { - (void)testItShouldFetchAllUsersWhenCalled { NSString *filterExpression = @"updated >= '2019-08-31T00:00:00Z'"; - NSString *expectedFilterExpression = [PNString percentEscapedString:filterExpression]; + // Encoding is transport layer responsibility, so we are expecting raw string in query. + NSString *expectedFilterExpression = filterExpression; NSString *expectedStart = [NSUUID UUID].UUIDString; NSString *expectedEnd = [NSUUID UUID].UUIDString; NSNumber *expectedLimit = @(56); id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchAllUUIDMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) - .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertEqualObjects(parameters.query[@"start"], expectedStart); - XCTAssertEqualObjects(parameters.query[@"end"], expectedEnd); - XCTAssertEqualObjects(parameters.query[@"include"], @"custom"); - XCTAssertEqualObjects(parameters.query[@"limit"], expectedLimit.stringValue); - XCTAssertEqualObjects(parameters.query[@"filter"], expectedFilterExpression); - XCTAssertNil(parameters.query[@"count"]); + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchAllUUIDMetadataRequest class]] + withCompletion:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + PNFetchAllUUIDMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertEqualObjects(request.query[@"start"], expectedStart); + XCTAssertEqualObjects(request.query[@"end"], expectedEnd); + XCTAssertEqualObjects(request.query[@"include"], @"custom"); + XCTAssertEqualObjects(request.query[@"limit"], expectedLimit.stringValue); + XCTAssertEqualObjects(request.query[@"filter"], expectedFilterExpression); + XCTAssertNil(request.query[@"count"]); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ @@ -368,14 +356,12 @@ - (void)testItShouldFetchAllUsersWhenCalled { - (void)testItShouldSetDefaultIncludeFieldsWhenCalledWithOutFetchAllUUIDMetadataIncludeFields { id clientMock = [self mockForObject:self.client]; - id recorded = OCMExpect([clientMock processOperation:PNFetchAllUUIDMetadataOperation - withParameters:[OCMArg any] - data:[OCMArg any] - completionBlock:[OCMArg any]]) + id recorded = OCMExpect([clientMock performRequest:[OCMArg isKindOfClass:[PNFetchAllUUIDMetadataRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNFetchAllUUIDMetadataRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertNotNil(parameters.query[@"include"]); + XCTAssertNotNil(request.query[@"include"]); }); [self waitForObject:clientMock recordedInvocationCall:recorded afterBlock:^{ diff --git a/Tests/Tests/Unit/Core/Publish/PNSignalTest.m b/Tests/Tests/Unit/Core/Publish/PNSignalTest.m index e64af0425..4b38bb8c5 100644 --- a/Tests/Tests/Unit/Core/Publish/PNSignalTest.m +++ b/Tests/Tests/Unit/Core/Publish/PNSignalTest.m @@ -2,8 +2,9 @@ * @author Serhii Mamontov * @copyright © 2010-2019 PubNub, Inc. */ -#import #import +#import +#import #import "PNRecordableTestCase.h" #import #import @@ -33,6 +34,7 @@ @implementation PNSignalTest #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-retain-cycles" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma mark - Setup / Tear down @@ -79,13 +81,14 @@ - (void)testItShouldProcessOperation { NSString *expectedChannel = [NSUUID UUID].UUIDString; - id recorded = OCMExpect([(id)self.client processOperation:PNSignalOperation withParameters:[OCMArg any] - data:[OCMArg any] completionBlock:[OCMArg any]]) + id recorded = OCMExpect([(id)self.client performRequest:[OCMArg isKindOfClass:[PNSignalRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; - - XCTAssertEqualObjects(parameters.pathComponents[@"{channel}"], expectedChannel); - XCTAssertEqualObjects(parameters.pathComponents[@"{message}"], expectedMessage); + PNSignalRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; + + XCTAssertNil([request validate]); + XCTAssertEqualObjects(request.channel, expectedChannel); + XCTAssertEqualObjects(request.path.lastPathComponent, expectedMessage); }); @@ -103,13 +106,14 @@ - (void)testItShouldNotEncryptWhenCipherKeyIsSet { id message = @{ @"such": @"object" }; - id recorded = OCMExpect([(id)self.client processOperation:PNSignalOperation withParameters:[OCMArg any] - data:[OCMArg any] completionBlock:[OCMArg any]]) + id recorded = OCMExpect([(id)self.client performRequest:[OCMArg isKindOfClass:[PNSignalRequest class]] + withCompletion:[OCMArg any]]) .andDo(^(NSInvocation *invocation) { - PNRequestParameters *parameters = [self objectForInvocation:invocation argumentAtIndex:2]; + PNSignalRequest *request = [self objectForInvocation:invocation argumentAtIndex:1]; - XCTAssertEqualObjects(parameters.pathComponents[@"{channel}"], expectedChannel); - XCTAssertEqualObjects(parameters.pathComponents[@"{message}"], expectedMessage); + XCTAssertNil([request validate]); + XCTAssertEqualObjects(request.channel, expectedChannel); + XCTAssertEqualObjects(request.path.lastPathComponent, expectedMessage); }); [self waitForObject:self.client recordedInvocationCall:recorded afterBlock:^{ @@ -130,13 +134,17 @@ - (void)testItShouldRetryWhenPreviousCallFails { self.client.signal().message(message) .performWithCompletion(^(PNSignalStatus * status) { errorStatus = status; + // Hack. Non-error status doesn't have retry block. + status.retryBlock = ^{ + [self.client signal:@"Hello" channel:@"channel" withCompletion:nil]; + }; handler(); }); }]; - id recorded = OCMExpect([(id)self.client processOperation:PNSignalOperation withParameters:[OCMArg any] - data:[OCMArg any] completionBlock:[OCMArg any]]); - + id recorded = OCMExpect([(id)self.client performRequest:[OCMArg isKindOfClass:[PNSignalRequest class]] + withCompletion:[OCMArg any]]); + [self waitForObject:self.client recordedInvocationCall:recorded afterBlock:^{ [errorStatus retry]; }]; diff --git a/VERSION b/VERSION index d50359de1..1bc788d3b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.5.0 +5.6.0