Skip to content

Commit

Permalink
Merge pull request #243 from apptentive/branch_5.2.7
Browse files Browse the repository at this point in the history
Release 5.2.7
  • Loading branch information
frankus authored Sep 18, 2019
2 parents 40a693a + 6cdafcc commit df75e96
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 24 deletions.
8 changes: 4 additions & 4 deletions Apptentive/Apptentive.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2371,7 +2371,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 27;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -2429,7 +2429,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 27;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -2461,7 +2461,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 86WML2UN43;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 26;
DYLIB_CURRENT_VERSION = 27;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = "APPTENTIVE_DEBUG=1";
Expand All @@ -2483,7 +2483,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 86WML2UN43;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 26;
DYLIB_CURRENT_VERSION = 27;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch";
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
Expand Down
2 changes: 1 addition & 1 deletion Apptentive/Apptentive/Apptentive.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ FOUNDATION_EXPORT double ApptentiveVersionNumber;
FOUNDATION_EXPORT const unsigned char ApptentiveVersionString[];

/** The version number of the Apptentive SDK. */
#define kApptentiveVersionString @"5.2.6"
#define kApptentiveVersionString @"5.2.7"

/** The version number of the Apptentive API platform. */
#define kApptentiveAPIVersionString @"9"
Expand Down
2 changes: 1 addition & 1 deletion Apptentive/Apptentive/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.2.6</string>
<string>5.2.7</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
@class ApptentiveInteractionController;


@interface ApptentiveMessageCenterViewController : UITableViewController <ApptentiveMessageCenterViewModelDelegate, UITextViewDelegate, UITextFieldDelegate, UICollectionViewDataSource, UICollectionViewDelegate>
@interface ApptentiveMessageCenterViewController : UITableViewController <ApptentiveMessageCenterViewModelDelegate, UITextViewDelegate, UITextFieldDelegate, UICollectionViewDataSource, UICollectionViewDelegate, UIAdaptivePresentationControllerDelegate>

@property (strong, nonatomic) ApptentiveMessageCenterViewModel *viewModel;

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

- (void)startDismissal;
- (void)completeDismissal;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ - (void)viewDidLoad {
ApptentiveProgressNavigationBar *navigationBar = (ApptentiveProgressNavigationBar *)self.navigationController.navigationBar;

navigationBar.progressView.hidden = YES;

self.navigationController.presentationController.delegate = self;
}

- (void)dealloc {
Expand Down Expand Up @@ -657,23 +659,21 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField {
return NO;
}

#pragma mark - Actions

- (IBAction)dismiss:(id)sender {
[self.attachmentController resignFirstResponder];
#pragma mark - Presentation Controller delegate

[self saveDraft];
- (void)presentationControllerDidDismiss:(UIPresentationController *)presentationController {
[self startDismissal];
[self completeDismissal];
ApptentiveLogInfo(@"Presentation Controller did dismiss");
}

[self.viewModel stop];

UIViewController *presentingViewController = self.presentingViewController;
#pragma mark - Actions

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

self.interactionController = nil;
[self dismissViewControllerAnimated:YES completion:^{ [self completeDismissal]; }];
}

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

#pragma mark - Private

- (void)startDismissal {
[self.attachmentController resignFirstResponder];
[self saveDraft];
[self.viewModel stop];
}

- (void)completeDismissal {
[Apptentive.shared.backend engage:ATInteractionMessageCenterEventLabelClose fromInteraction:self.viewModel.interaction fromViewController:self.presentingViewController];

self.interactionController = nil;
}

- (void)updateStatusOfVisibleCells {
NSMutableArray *indexPathsToReload = [NSMutableArray array];
for (UITableViewCell *cell in self.tableView.visibleCells) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
@class ApptentiveInteractionController;


@interface ApptentiveSurveyViewController : UICollectionViewController <UICollectionViewDelegateFlowLayout, UITextViewDelegate, UITextFieldDelegate, ApptentiveCollectionViewDataSource, ATSurveyViewModelDelegate>
@interface ApptentiveSurveyViewController : UICollectionViewController <UICollectionViewDelegateFlowLayout, UITextViewDelegate, UITextFieldDelegate, UIAdaptivePresentationControllerDelegate, ApptentiveCollectionViewDataSource, ATSurveyViewModelDelegate>

@property (strong, nonatomic) ApptentiveSurveyViewModel *viewModel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ - (void)viewDidLoad {
self.navigationController.toolbar.translucent = NO;
self.navigationController.toolbar.barTintColor = [style colorForStyle:ApptentiveColorFailure];
self.navigationController.toolbar.userInteractionEnabled = NO;

self.navigationController.presentationController.delegate = self;
}

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

#pragma mark - Presentation controller delegate
- (void)presentationControllerDidDismiss:(UIPresentationController *)presentationController {
[self.viewModel didCancel:self];

self.interactionController = nil;
}

#pragma mark - View model delegate

- (void)viewModelValidationChanged:(ApptentiveSurveyViewModel *)viewModel isValid:(BOOL)valid {
Expand Down
2 changes: 1 addition & 1 deletion Apptentive/ApptentiveTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>5.2.6</string>
<string>5.2.7</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2019-09-18 - v5.2.7

#### Bugs Fixed

* Fix a bugs with gesture-driven dismissal of Message Center and Surveys.

# 2019-09-16 - v5.2.6

#### Bugs Fixed
Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- apptentive-ios (5.2.6)
- apptentive-ios (5.2.7)

DEPENDENCIES:
- apptentive-ios (from `..`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: ".."

SPEC CHECKSUMS:
apptentive-ios: 70093701d0d5aa9c56cd2a8cf03df28f7a45be40
apptentive-ios: fc0c29a9599737240b5fe93d10d2a90150fb6b7a

PODFILE CHECKSUM: 89d2b5f4683b04482e89df6d46b268cc9ed1ef79

Expand Down
2 changes: 1 addition & 1 deletion apptentive-ios.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'apptentive-ios'
s.module_name = 'Apptentive'
s.version = '5.2.6'
s.version = '5.2.7'
s.license = 'BSD'
s.summary = 'Apptentive Customer Communications SDK.'
s.homepage = 'https://www.apptentive.com/'
Expand Down

0 comments on commit df75e96

Please sign in to comment.