Skip to content

Commit 839aff0

Browse files
authored
Merge pull request #221 from apptentive/branch_5.2.1
Release 5.2.1
2 parents 98f7eb9 + ddc8122 commit 839aff0

File tree

12 files changed

+35
-16
lines changed

12 files changed

+35
-16
lines changed

Apptentive/Apptentive.xcodeproj/project.pbxproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -2382,7 +2382,7 @@
23822382
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
23832383
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
23842384
COPY_PHASE_STRIP = NO;
2385-
CURRENT_PROJECT_VERSION = 16;
2385+
CURRENT_PROJECT_VERSION = 19;
23862386
DEBUG_INFORMATION_FORMAT = dwarf;
23872387
ENABLE_STRICT_OBJC_MSGSEND = YES;
23882388
ENABLE_TESTABILITY = YES;
@@ -2440,7 +2440,7 @@
24402440
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
24412441
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
24422442
COPY_PHASE_STRIP = NO;
2443-
CURRENT_PROJECT_VERSION = 16;
2443+
CURRENT_PROJECT_VERSION = 19;
24442444
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
24452445
ENABLE_NS_ASSERTIONS = NO;
24462446
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -2472,7 +2472,7 @@
24722472
DEFINES_MODULE = YES;
24732473
DEVELOPMENT_TEAM = 86WML2UN43;
24742474
DYLIB_COMPATIBILITY_VERSION = 1;
2475-
DYLIB_CURRENT_VERSION = 16;
2475+
DYLIB_CURRENT_VERSION = 19;
24762476
DYLIB_INSTALL_NAME_BASE = "@rpath";
24772477
GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch";
24782478
GCC_PREPROCESSOR_DEFINITIONS = "APPTENTIVE_DEBUG=1";
@@ -2494,7 +2494,7 @@
24942494
DEFINES_MODULE = YES;
24952495
DEVELOPMENT_TEAM = 86WML2UN43;
24962496
DYLIB_COMPATIBILITY_VERSION = 1;
2497-
DYLIB_CURRENT_VERSION = 16;
2497+
DYLIB_CURRENT_VERSION = 19;
24982498
DYLIB_INSTALL_NAME_BASE = "@rpath";
24992499
GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch";
25002500
GCC_TREAT_WARNINGS_AS_ERRORS = YES;

Apptentive/Apptentive/Apptentive.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ FOUNDATION_EXPORT double ApptentiveVersionNumber;
2020
FOUNDATION_EXPORT const unsigned char ApptentiveVersionString[];
2121

2222
/** The version number of the Apptentive SDK. */
23-
#define kApptentiveVersionString @"5.2.0"
23+
#define kApptentiveVersionString @"5.2.1"
2424

2525
/** The version number of the Apptentive API platform. */
2626
#define kApptentiveAPIVersionString @"9"

Apptentive/Apptentive/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>5.2.0</string>
18+
<string>5.2.1</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

Apptentive/Apptentive/Networking/ApptentiveClient.h

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
2525
@property (readonly, nonatomic) NSURL *baseURL;
2626
@property (readonly, nonatomic) NSString *apptentiveKey;
2727
@property (readonly, nonatomic) NSString *apptentiveSignature;
28+
@property (assign, nonatomic, getter=isPaused) BOOL paused;
2829

2930
- (instancetype)initWithBaseURL:(NSURL *)baseURL apptentiveKey:(NSString *)apptentiveKey apptentiveSignature:(NSString *)apptentiveSignature delegateQueue:(ApptentiveDispatchQueue *)delegateQueue;
3031

Apptentive/Apptentive/Networking/ApptentiveClient.m

+7
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ - (instancetype)initWithBaseURL:(NSURL *)baseURL apptentiveKey:(nonnull NSString
9595
return self;
9696
}
9797

98+
- (void)setPaused:(BOOL)paused {
99+
_paused = paused;
100+
101+
ApptentiveLogInfo(ApptentiveLogTagNetwork, @"%@ %@", paused ? @"Pausing" : @"Resuming", NSStringFromClass([self class]));
102+
self.networkQueue.suspended = self.paused;
103+
}
104+
98105
#pragma mark - Creating request operations
99106

100107
- (ApptentiveRequestOperation *)requestOperationWithRequest:(id<ApptentiveRequest>)request token:(nullable NSString *)token delegate:(ApptentiveRequestOperationCallback *)delegate {

Apptentive/Apptentive/Persistence/ApptentiveBackend.m

+6
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,13 @@ - (void)startUp {
279279
ApptentiveAssertOperationQueue(self.operationQueue);
280280

281281
_client = [[ApptentiveClient alloc] initWithBaseURL:self.baseURL apptentiveKey:self.apptentiveKey apptentiveSignature:self.apptentiveSignature delegateQueue:self.operationQueue];
282+
_client.paused = !self.networkAvailable;
282283

283284
_conversationManager = [[ApptentiveConversationManager alloc] initWithStoragePath:self.supportDirectoryPath operationQueue:self.operationQueue client:self.client parentManagedObjectContext:self.managedObjectContext];
284285
self.conversationManager.delegate = self;
285286

286287
_payloadSender = [[ApptentivePayloadSender alloc] initWithBaseURL:self.baseURL apptentiveKey:self.apptentiveKey apptentiveSignature:self.apptentiveSignature managedObjectContext:self.managedObjectContext delegateQueue:self.operationQueue];
288+
_payloadSender.paused = !self.networkAvailable;
287289

288290
[self.conversationManager loadActiveConversation];
289291

@@ -458,10 +460,14 @@ - (void)updateNetworkingForCurrentNetworkStatus {
458460
if (self.networkAvailable) {
459461
[self.client.retryPolicy resetRetryDelay];
460462
[self.payloadSender.retryPolicy resetRetryDelay];
463+
self.client.paused = NO;
464+
self.payloadSender.paused = NO;
461465

462466
[self completeHousekeepingTasks];
463467
} else {
464468
[self.payloadSender cancelNetworkOperations];
469+
self.client.paused = YES;
470+
self.payloadSender.paused = YES;
465471
}
466472
}
467473
}

Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyCollectionViewLayout.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ - (void)setShouldExpand:(BOOL)shouldExpand {
150150
- (void)updateHeaderHeight {
151151
if ([self.collectionView isKindOfClass:[ApptentiveSurveyCollectionView class]]) {
152152
UIView *collectionHeaderView = ((ApptentiveSurveyCollectionView *)self.collectionView).collectionHeaderView;
153-
CGSize headerSize = [collectionHeaderView systemLayoutSizeFittingSize:CGSizeMake(self.collectionView.bounds.size.width, CGFLOAT_MAX)];
153+
CGSize headerSize = [collectionHeaderView systemLayoutSizeFittingSize:CGSizeMake(self.collectionView.bounds.size.width, 10000.0)];
154154
self.headerHeight = headerSize.height + self.sectionInset.bottom;
155155
} else {
156156
self.headerHeight = 0;

Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewController.m

+1-3
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ - (void)dealloc {
121121
}
122122

123123
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
124-
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
125-
[self.collectionViewLayout invalidateLayout];
126-
} completion:nil];
124+
[self.collectionViewLayout invalidateLayout];
127125
}
128126

129127
- (void)sizeDidUpdate:(NSNotification *)notification {

Apptentive/ApptentiveTests/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>5.2.0</string>
18+
<string>5.2.1</string>
1919
<key>CFBundleVersion</key>
2020
<string>1</string>
2121
</dict>

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 2018-09-18 - v5.2.1
2+
3+
#### Bugs Fixed
4+
5+
* Pause network requests when network is unreachable
6+
* Fix survey layout warning on rotation from landscape to portrait
7+
18
# 2018-08-23 - v5.2.0
29

310
#### Improvements

Example/Podfile.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
PODS:
2-
- apptentive-ios (5.2.0)
2+
- apptentive-ios (5.2.1)
33

44
DEPENDENCIES:
55
- apptentive-ios (from `..`)
66

77
EXTERNAL SOURCES:
88
apptentive-ios:
9-
:path: ..
9+
:path: ".."
1010

1111
SPEC CHECKSUMS:
12-
apptentive-ios: fafd22764202d97acc37f097d8460a56b704d767
12+
apptentive-ios: b646db39055d2335be8e6af13f7a9c1019e96883
1313

1414
PODFILE CHECKSUM: 89d2b5f4683b04482e89df6d46b268cc9ed1ef79
1515

16-
COCOAPODS: 1.4.0
16+
COCOAPODS: 1.5.3

apptentive-ios.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = 'apptentive-ios'
33
s.module_name = 'Apptentive'
4-
s.version = '5.2.0'
4+
s.version = '5.2.1'
55
s.license = 'BSD'
66
s.summary = 'Apptentive Customer Communications SDK.'
77
s.homepage = 'https://www.apptentive.com/'

0 commit comments

Comments
 (0)