Skip to content

Commit

Permalink
PubNub SDK v4.15.1 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
client-engineering-bot committed Jul 28, 2020
1 parent 15bf7a0 commit 5f04edb
Show file tree
Hide file tree
Showing 15 changed files with 256 additions and 19 deletions.
9 changes: 8 additions & 1 deletion .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
---
name: objective-c
scm: github.com/pubnub/objective-c
version: "4.15.0"
version: "4.15.1"
schema: 1
changelog:
-
changes:
-
text: "Fix default issues after migration to publish requests objects usage because of which `replicate` and `store` has been reset to `false`."
type: bug
date: Jul 28, 20
version: v4.15.1
-
changes:
-
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## [v4.15.1](https://github.com/pubnub/objective-c/releases/tag/v4.15.1)
July 28 2020

[Full Changelog](https://github.com/pubnub/objective-c/compare/v4.15.0...v4.15.1)

#### Fixed
- Fix default issues after migration to publish requests objects usage because of which `replicate` and `store` has been reset to `false`.

## [v4.15.0](https://github.com/pubnub/objective-c/releases/tag/v4.15.0)
July 27 2020

Expand Down
6 changes: 3 additions & 3 deletions Framework/PubNub/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>PubNub</string>
<key>CFBundleGetInfoString</key>
<string>4.15.0</string>
<string>4.15.1</string>
<key>CFBundleIdentifier</key>
<string>com.pubnub.pubnub-objc</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.15.0</string>
<string>4.15.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>4.15.0</string>
<string>4.15.1</string>
<key>NSHumanReadableCopyright</key>
<string>© 2010 - 2020 PubNub, Inc.</string>
<key>NSPrincipalClass</key>
Expand Down
6 changes: 3 additions & 3 deletions Framework/PubNub/PubNub-iOS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>PubNub</string>
<key>CFBundleGetInfoString</key>
<string>4.15.0</string>
<string>4.15.1</string>
<key>CFBundleIdentifier</key>
<string>com.pubnub.pubnub-objc</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.15.0</string>
<string>4.15.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>4.15.0</string>
<string>4.15.1</string>
<key>NSHumanReadableCopyright</key>
<string>© 2010 - 2020 PubNub, Inc.</string>
<key>NSPrincipalClass</key>
Expand Down
6 changes: 3 additions & 3 deletions Framework/PubNub/PubNub-tvOS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>PubNub</string>
<key>CFBundleGetInfoString</key>
<string>4.15.0</string>
<string>4.15.1</string>
<key>CFBundleIdentifier</key>
<string>com.pubnub.pubnub-objc</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.15.0</string>
<string>4.15.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>4.15.0</string>
<string>4.15.1</string>
<key>NSHumanReadableCopyright</key>
<string>© 2010 - 2020 PubNub, Inc.</string>
<key>NSPrincipalClass</key>
Expand Down
6 changes: 3 additions & 3 deletions Framework/PubNub/PubNub-watchOS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>PubNub</string>
<key>CFBundleGetInfoString</key>
<string>4.15.0</string>
<string>4.15.1</string>
<key>CFBundleIdentifier</key>
<string>com.pubnub.pubnub-objc</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.15.0</string>
<string>4.15.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>4.15.0</string>
<string>4.15.1</string>
<key>NSHumanReadableCopyright</key>
<string>© 2010 - 2020 PubNub, Inc.</string>
<key>NSPrincipalClass</key>
Expand Down
2 changes: 1 addition & 1 deletion PubNub.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Pod::Spec.new do |spec|
spec.name = 'PubNub'
spec.version = '4.15.0'
spec.version = '4.15.1'
spec.summary = 'The PubNub Real-Time Network. Build real-time apps quickly and scale them globally.'
spec.homepage = 'https://github.com/pubnub/objective-c'

Expand Down
4 changes: 2 additions & 2 deletions PubNub/Misc/PNConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
#pragma mark General information constants

// Stores client library version number
static NSString * const kPNLibraryVersion = @"4.15.0";
static NSString * const kPNLibraryVersion = @"4.15.1";

// Stores information about SDK codebase
static NSString * const kPNCommit = @"2a04165517fe9fa97fb3807ca0563407aea46578";
static NSString * const kPNCommit = @"31d74ef9d966fe998132ea59708221463177140f";

/**
@brief Stores reference on unique identifier which is used to identify \b PubNub client among other
Expand Down
3 changes: 2 additions & 1 deletion PubNub/Network/Requests/Publish/PNBasePublishRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ - (id)preFormattedMessage {
- (instancetype)initWithChannel:(NSString *)channel {
if ((self = [super init])) {
_channel = [channel copy];
_replicate = YES;
self.replicate = YES;
self.store = YES;
}

return self;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PubNub 4.15.0 for iOS 9+
# PubNub 4.15.1 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)
[![License](https://img.shields.io/github/license/pubnub/objective-c.svg?style=flat)](https://img.shields.io/github/license/pubnub/objective-c.svg)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[
{
"id" : "03F0F286-32BA-4540-AC52-96FDEDABBD9E",
"data" : {
"method" : "get",
"cls" : "NSURLRequest",
"cellular" : true,
"cache" : 1,
"timeout" : 60,
"cookies" : true,
"headers" : {
"User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version",
"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"
},
"type" : 0
},
{
"id" : "03F0F286-32BA-4540-AC52-96FDEDABBD9E",
"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",
"headers" : {
"Access-Control-Allow-Methods" : "GET",
"Content-Type" : "text\/javascript; charset=\"UTF-8\"",
"Access-Control-Allow-Origin" : "*",
"Date" : "Tue, 28 Jul 2020 09:33:59 GMT",
"Content-Length" : "30",
"Cache-Control" : "no-cache",
"Connection" : "keep-alive"
}
},
"type" : 1
},
{
"id" : "03F0F286-32BA-4540-AC52-96FDEDABBD9E",
"data" : {
"cls" : "NSData",
"base64" : "WzEsIlNlbnQiLCIxNTk1OTI4ODM5OTQ5OTc4MyJd"
},
"type" : 2
},
{
"id" : "03F0F286-32BA-4540-AC52-96FDEDABBD9E",
"type" : 4
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[
{
"id" : "5F35C44F-667A-4A5D-9B72-800360F1E6E1",
"data" : {
"method" : "get",
"cls" : "NSURLRequest",
"cellular" : true,
"cache" : 1,
"timeout" : 60,
"cookies" : true,
"headers" : {
"User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version",
"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?norep=1&pnsdk=PubNub-ObjC-iOS\/4.x.x&seqn=1&uuid=serhii"
},
"type" : 0
},
{
"id" : "5F35C44F-667A-4A5D-9B72-800360F1E6E1",
"data" : {
"status" : 200,
"cls" : "NSHTTPURLResponse",
"url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22Hello%20there%22?uuid=serhii&norep=1&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x",
"headers" : {
"Access-Control-Allow-Methods" : "GET",
"Content-Type" : "text\/javascript; charset=\"UTF-8\"",
"Access-Control-Allow-Origin" : "*",
"Date" : "Tue, 28 Jul 2020 09:37:22 GMT",
"Content-Length" : "30",
"Cache-Control" : "no-cache",
"Connection" : "keep-alive"
}
},
"type" : 1
},
{
"id" : "5F35C44F-667A-4A5D-9B72-800360F1E6E1",
"data" : {
"cls" : "NSData",
"base64" : "WzEsIlNlbnQiLCIxNTk1OTI5MDQyNTEzMjk0NSJd"
},
"type" : 2
},
{
"id" : "5F35C44F-667A-4A5D-9B72-800360F1E6E1",
"type" : 4
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[
{
"id" : "0F314AAC-0573-4C61-A33B-7F3EDC37E1DB",
"data" : {
"method" : "get",
"cls" : "NSURLRequest",
"cellular" : true,
"cache" : 1,
"timeout" : 60,
"cookies" : true,
"headers" : {
"User-Agent" : "iPhone; CPU iPhone OS 13.6.0 Version",
"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"
},
"type" : 0
},
{
"id" : "0F314AAC-0573-4C61-A33B-7F3EDC37E1DB",
"data" : {
"status" : 200,
"cls" : "NSHTTPURLResponse",
"url" : "https:\/\/ps.pndsn.com\/publish\/demo\/demo\/0\/test-channel\/0\/%22Hello%20there%22?uuid=serhii&store=0&seqn=1&pnsdk=PubNub-ObjC-iOS\/4.x.x",
"headers" : {
"Access-Control-Allow-Methods" : "GET",
"Content-Type" : "text\/javascript; charset=\"UTF-8\"",
"Access-Control-Allow-Origin" : "*",
"Date" : "Tue, 28 Jul 2020 09:37:39 GMT",
"Content-Length" : "30",
"Cache-Control" : "no-cache",
"Connection" : "keep-alive"
}
},
"type" : 1
},
{
"id" : "0F314AAC-0573-4C61-A33B-7F3EDC37E1DB",
"data" : {
"cls" : "NSData",
"base64" : "WzEsIlNlbnQiLCIxNTk1OTI5MDU5MTU5OTMxMiJd"
},
"type" : 2
},
{
"id" : "0F314AAC-0573-4C61-A33B-7F3EDC37E1DB",
"type" : 4
}
]
62 changes: 62 additions & 0 deletions Tests/Tests/Integration/PNPublishIntegrationTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,68 @@ - (void)setUp {

#pragma mark - Tests :: Regular publish

- (void)testItShouldPublishWithRequestAndReceivePublishTimetokenWhenDefaultsUsed {
NSString *channel = [self channelWithName:@"test-channel"];
PubNub *client = [self createPubNubForUser:@"serhii"];
NSString *expectedMessage = @"Hello there";


[self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) {
PNPublishRequest *request = [PNPublishRequest requestWithChannel:channel];
request.message = expectedMessage;

[client publishWithRequest:request completion:^(PNPublishStatus *status) {
XCTAssertFalse(status.isError);
XCTAssertNotNil(status.data.timetoken);
XCTAssertEqual(status.statusCode, 200);

handler();
}];
}];
}

- (void)testItShouldPublishWithRequestAndReceivePublishTimetokenWhenReplicationDisabled {
NSString *channel = [self channelWithName:@"test-channel"];
PubNub *client = [self createPubNubForUser:@"serhii"];
NSString *expectedMessage = @"Hello there";


[self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) {
PNPublishRequest *request = [PNPublishRequest requestWithChannel:channel];
request.message = expectedMessage;
request.replicate = NO;

[client publishWithRequest:request completion:^(PNPublishStatus *status) {
XCTAssertFalse(status.isError);
XCTAssertNotNil(status.data.timetoken);
XCTAssertEqual(status.statusCode, 200);

handler();
}];
}];
}

- (void)testItShouldPublishWithRequestAndReceivePublishTimetokenWhenStoreDisabled {
NSString *channel = [self channelWithName:@"test-channel"];
PubNub *client = [self createPubNubForUser:@"serhii"];
NSString *expectedMessage = @"Hello there";


[self waitToCompleteIn:self.testCompletionDelay codeBlock:^(dispatch_block_t handler) {
PNPublishRequest *request = [PNPublishRequest requestWithChannel:channel];
request.message = expectedMessage;
request.store = NO;

[client publishWithRequest:request completion:^(PNPublishStatus *status) {
XCTAssertFalse(status.isError);
XCTAssertNotNil(status.data.timetoken);
XCTAssertEqual(status.statusCode, 200);

handler();
}];
}];
}

- (void)testItShouldPublishAndReceivePublishTimetoken {
NSString *channel = [self channelWithName:@"test-channel"];
PubNub *client = [self createPubNubForUser:@"serhii"];
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.15.0
4.15.1

0 comments on commit 5f04edb

Please sign in to comment.