Skip to content

Commit df75e96

Browse files
authored
Merge pull request #243 from apptentive/branch_5.2.7
Release 5.2.7
2 parents 40a693a + 6cdafcc commit df75e96

11 files changed

+54
-24
lines changed

Apptentive/Apptentive.xcodeproj/project.pbxproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -2371,7 +2371,7 @@
23712371
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
23722372
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
23732373
COPY_PHASE_STRIP = NO;
2374-
CURRENT_PROJECT_VERSION = 26;
2374+
CURRENT_PROJECT_VERSION = 27;
23752375
DEBUG_INFORMATION_FORMAT = dwarf;
23762376
ENABLE_STRICT_OBJC_MSGSEND = YES;
23772377
ENABLE_TESTABILITY = YES;
@@ -2429,7 +2429,7 @@
24292429
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
24302430
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
24312431
COPY_PHASE_STRIP = NO;
2432-
CURRENT_PROJECT_VERSION = 26;
2432+
CURRENT_PROJECT_VERSION = 27;
24332433
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
24342434
ENABLE_NS_ASSERTIONS = NO;
24352435
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -2461,7 +2461,7 @@
24612461
DEFINES_MODULE = YES;
24622462
DEVELOPMENT_TEAM = 86WML2UN43;
24632463
DYLIB_COMPATIBILITY_VERSION = 1;
2464-
DYLIB_CURRENT_VERSION = 26;
2464+
DYLIB_CURRENT_VERSION = 27;
24652465
DYLIB_INSTALL_NAME_BASE = "@rpath";
24662466
GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch";
24672467
GCC_PREPROCESSOR_DEFINITIONS = "APPTENTIVE_DEBUG=1";
@@ -2483,7 +2483,7 @@
24832483
DEFINES_MODULE = YES;
24842484
DEVELOPMENT_TEAM = 86WML2UN43;
24852485
DYLIB_COMPATIBILITY_VERSION = 1;
2486-
DYLIB_CURRENT_VERSION = 26;
2486+
DYLIB_CURRENT_VERSION = 27;
24872487
DYLIB_INSTALL_NAME_BASE = "@rpath";
24882488
GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch";
24892489
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.6"
23+
#define kApptentiveVersionString @"5.2.7"
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.6</string>
18+
<string>5.2.7</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

Apptentive/Apptentive/Message Center/Controllers/ApptentiveMessageCenterViewController.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
1515
@class ApptentiveInteractionController;
1616

1717

18-
@interface ApptentiveMessageCenterViewController : UITableViewController <ApptentiveMessageCenterViewModelDelegate, UITextViewDelegate, UITextFieldDelegate, UICollectionViewDataSource, UICollectionViewDelegate>
18+
@interface ApptentiveMessageCenterViewController : UITableViewController <ApptentiveMessageCenterViewModelDelegate, UITextViewDelegate, UITextFieldDelegate, UICollectionViewDataSource, UICollectionViewDelegate, UIAdaptivePresentationControllerDelegate>
1919

2020
@property (strong, nonatomic) ApptentiveMessageCenterViewModel *viewModel;
2121

@@ -24,6 +24,9 @@ NS_ASSUME_NONNULL_BEGIN
2424
// `-dismissAllInteractions:` calls).
2525
@property (strong, nullable, nonatomic) ApptentiveInteractionController *interactionController;
2626

27+
- (void)startDismissal;
28+
- (void)completeDismissal;
29+
2730
@end
2831

2932
NS_ASSUME_NONNULL_END

Apptentive/Apptentive/Message Center/Controllers/ApptentiveMessageCenterViewController.m

+24-12
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ - (void)viewDidLoad {
132132
ApptentiveProgressNavigationBar *navigationBar = (ApptentiveProgressNavigationBar *)self.navigationController.navigationBar;
133133

134134
navigationBar.progressView.hidden = YES;
135+
136+
self.navigationController.presentationController.delegate = self;
135137
}
136138

137139
- (void)dealloc {
@@ -657,23 +659,21 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField {
657659
return NO;
658660
}
659661

660-
#pragma mark - Actions
661-
662-
- (IBAction)dismiss:(id)sender {
663-
[self.attachmentController resignFirstResponder];
662+
#pragma mark - Presentation Controller delegate
664663

665-
[self saveDraft];
664+
- (void)presentationControllerDidDismiss:(UIPresentationController *)presentationController {
665+
[self startDismissal];
666+
[self completeDismissal];
667+
ApptentiveLogInfo(@"Presentation Controller did dismiss");
668+
}
666669

667-
[self.viewModel stop];
668670

669-
UIViewController *presentingViewController = self.presentingViewController;
671+
#pragma mark - Actions
670672

671-
[self dismissViewControllerAnimated:YES
672-
completion:^{
673-
[Apptentive.shared.backend engage:ATInteractionMessageCenterEventLabelClose fromInteraction:self.viewModel.interaction fromViewController:presentingViewController];
674-
}];
673+
- (IBAction)dismiss:(id)sender {
674+
[self startDismissal];
675675

676-
self.interactionController = nil;
676+
[self dismissViewControllerAnimated:YES completion:^{ [self completeDismissal]; }];
677677
}
678678

679679
- (IBAction)send:(id)sender {
@@ -843,6 +843,18 @@ - (void)observeValueForKeyPath:(nullable NSString *)keyPath ofObject:(nullable i
843843

844844
#pragma mark - Private
845845

846+
- (void)startDismissal {
847+
[self.attachmentController resignFirstResponder];
848+
[self saveDraft];
849+
[self.viewModel stop];
850+
}
851+
852+
- (void)completeDismissal {
853+
[Apptentive.shared.backend engage:ATInteractionMessageCenterEventLabelClose fromInteraction:self.viewModel.interaction fromViewController:self.presentingViewController];
854+
855+
self.interactionController = nil;
856+
}
857+
846858
- (void)updateStatusOfVisibleCells {
847859
NSMutableArray *indexPathsToReload = [NSMutableArray array];
848860
for (UITableViewCell *cell in self.tableView.visibleCells) {

Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewController.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
1515
@class ApptentiveInteractionController;
1616

1717

18-
@interface ApptentiveSurveyViewController : UICollectionViewController <UICollectionViewDelegateFlowLayout, UITextViewDelegate, UITextFieldDelegate, ApptentiveCollectionViewDataSource, ATSurveyViewModelDelegate>
18+
@interface ApptentiveSurveyViewController : UICollectionViewController <UICollectionViewDelegateFlowLayout, UITextViewDelegate, UITextFieldDelegate, UIAdaptivePresentationControllerDelegate, ApptentiveCollectionViewDataSource, ATSurveyViewModelDelegate>
1919

2020
@property (strong, nonatomic) ApptentiveSurveyViewModel *viewModel;
2121

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

+9
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ - (void)viewDidLoad {
114114
self.navigationController.toolbar.translucent = NO;
115115
self.navigationController.toolbar.barTintColor = [style colorForStyle:ApptentiveColorFailure];
116116
self.navigationController.toolbar.userInteractionEnabled = NO;
117+
118+
self.navigationController.presentationController.delegate = self;
117119
}
118120

119121
- (void)dealloc {
@@ -617,6 +619,13 @@ - (void)textFieldDidEndEditing:(UITextField *)textField {
617619
[self.viewModel commitChangeAtIndexPath:[self.viewModel indexPathForTextFieldTag:textField.tag]];
618620
}
619621

622+
#pragma mark - Presentation controller delegate
623+
- (void)presentationControllerDidDismiss:(UIPresentationController *)presentationController {
624+
[self.viewModel didCancel:self];
625+
626+
self.interactionController = nil;
627+
}
628+
620629
#pragma mark - View model delegate
621630

622631
- (void)viewModelValidationChanged:(ApptentiveSurveyViewModel *)viewModel isValid:(BOOL)valid {

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.6</string>
18+
<string>5.2.7</string>
1919
<key>CFBundleVersion</key>
2020
<string>1</string>
2121
</dict>

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 2019-09-18 - v5.2.7
2+
3+
#### Bugs Fixed
4+
5+
* Fix a bugs with gesture-driven dismissal of Message Center and Surveys.
6+
17
# 2019-09-16 - v5.2.6
28

39
#### Bugs Fixed

Example/Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- apptentive-ios (5.2.6)
2+
- apptentive-ios (5.2.7)
33

44
DEPENDENCIES:
55
- apptentive-ios (from `..`)
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
99
:path: ".."
1010

1111
SPEC CHECKSUMS:
12-
apptentive-ios: 70093701d0d5aa9c56cd2a8cf03df28f7a45be40
12+
apptentive-ios: fc0c29a9599737240b5fe93d10d2a90150fb6b7a
1313

1414
PODFILE CHECKSUM: 89d2b5f4683b04482e89df6d46b268cc9ed1ef79
1515

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.6'
4+
s.version = '5.2.7'
55
s.license = 'BSD'
66
s.summary = 'Apptentive Customer Communications SDK.'
77
s.homepage = 'https://www.apptentive.com/'

0 commit comments

Comments
 (0)