Skip to content

Commit bff5c14

Browse files
authored
Merge pull request #248 from apptentive/branch_5.2.8
Release 5.2.8
2 parents df75e96 + 785ad57 commit bff5c14

17 files changed

+63
-23
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 = 27;
2374+
CURRENT_PROJECT_VERSION = 28;
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 = 27;
2432+
CURRENT_PROJECT_VERSION = 28;
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 = 27;
2464+
DYLIB_CURRENT_VERSION = 28;
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 = 27;
2486+
DYLIB_CURRENT_VERSION = 28;
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

+6-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.7"
23+
#define kApptentiveVersionString @"5.2.8"
2424

2525
/** The version number of the Apptentive API platform. */
2626
#define kApptentiveAPIVersionString @"9"
@@ -161,6 +161,9 @@ typedef NS_ENUM(NSUInteger, ApptentiveLogLevel) {
161161
/** The iTunes store app ID of the app (used for Apptentive rating prompt). */
162162
@property (copy, nonatomic, nullable) NSString *appID;
163163

164+
/** If set, shows a button in Surveys and Message Center that presents information about Apptentive including a link to our privacy policy. */
165+
@property (assign, nonatomic) BOOL showInfoButton;
166+
164167
/**
165168
Returns an instance of the `ApptentiveConfiguration` class
166169
initialized with the specified parameters.
@@ -241,6 +244,8 @@ typedef NS_ENUM(NSUInteger, ApptentiveLogLevel) {
241244
*/
242245
@property (copy, nonatomic, nullable) NSString *appID;
243246

247+
@property (readonly, nonatomic) BOOL showInfoButton;
248+
244249
/** An object conforming to the `ApptentiveDelegate` protocol.
245250
If a `nil` value is passed for the view controller into methods such as `-engage:fromViewController`,
246251
the SDK will request a view controller from the delegate from which to present an interaction.

Apptentive/Apptentive/Apptentive.m

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ - (nullable instancetype)initWithApptentiveKey:(NSString *)apptentiveKey apptent
8080
_baseURL = [NSURL URLWithString:@"https://api.apptentive.com/"];
8181
_logLevel = ApptentiveLogLevelInfo;
8282
_shouldSanitizeLogMessages = YES;
83+
_showInfoButton = YES;
8384
}
8485
return self;
8586
}
@@ -143,6 +144,8 @@ - (id)initWithConfiguration:(ApptentiveConfiguration *)configuration {
143144
_baseURL = configuration.baseURL;
144145
_appID = configuration.appID;
145146

147+
_showInfoButton = configuration.showInfoButton;
148+
146149
setShouldSanitizeApptentiveLogMessages(configuration.shouldSanitizeLogMessages);
147150

148151
_backend = [[ApptentiveBackend alloc] initWithApptentiveKey:_apptentiveKey

Apptentive/Apptentive/Apptentive.storyboard

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useSafeAreas="YES" colorMatched="YES">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useSafeAreas="YES" colorMatched="YES">
33
<device id="retina4_7" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14819.2"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
77
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
88
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
99
</dependencies>
@@ -1653,8 +1653,8 @@ Lines</string>
16531653
</subviews>
16541654
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
16551655
<constraints>
1656-
<constraint firstItem="eQS-jv-07Q" firstAttribute="trailing" secondItem="QJU-jb-fK0" secondAttribute="trailingMargin" constant="50" id="3M8-7U-DAv"/>
1657-
<constraint firstAttribute="trailingMargin" secondItem="eQS-jv-07Q" secondAttribute="trailing" id="5o0-nM-4r0"/>
1656+
<constraint firstItem="eQS-jv-07Q" firstAttribute="leading" secondItem="QJU-jb-fK0" secondAttribute="trailing" constant="8" id="eko-8l-aOf"/>
1657+
<constraint firstAttribute="trailingMargin" secondItem="QJU-jb-fK0" secondAttribute="trailing" priority="760" constant="3" id="WFh-nD-Kvx"/>
16581658
<constraint firstAttribute="trailing" secondItem="kjO-RC-C9t" secondAttribute="trailing" id="7ki-29-dG1"/>
16591659
<constraint firstItem="kjO-RC-C9t" firstAttribute="top" relation="greaterThanOrEqual" secondItem="eQS-jv-07Q" secondAttribute="bottom" constant="24" id="FhP-NR-GO3"/>
16601660
<constraint firstAttribute="trailing" secondItem="hym-vX-x0x" secondAttribute="trailing" id="O7u-UU-rCY"/>
@@ -1667,13 +1667,15 @@ Lines</string>
16671667
<constraint firstAttribute="bottom" secondItem="QJU-jb-fK0" secondAttribute="bottom" constant="26" id="inw-Yq-JwN"/>
16681668
<constraint firstItem="QJU-jb-fK0" firstAttribute="top" secondItem="5MM-w9-NsG" secondAttribute="top" constant="19" id="j86-Xc-x2p"/>
16691669
<constraint firstAttribute="bottom" secondItem="hym-vX-x0x" secondAttribute="bottom" id="o7f-uU-vfB"/>
1670+
<constraint firstAttribute="trailingMargin" secondItem="eQS-jv-07Q" secondAttribute="trailing" constant="17" id="vZy-Ar-xGY"/>
16701671
</constraints>
16711672
<viewLayoutGuide key="safeArea" id="H9x-X5-ni1"/>
16721673
<connections>
16731674
<outlet property="borderView" destination="kjO-RC-C9t" id="gjK-IH-cQv"/>
16741675
<outlet property="borderViewHeight" destination="BYb-xi-ZnV" id="RTk-wS-BmV"/>
16751676
<outlet property="greetingLabel" destination="QJU-jb-fK0" id="xYM-nv-FYb"/>
16761677
<outlet property="infoButton" destination="eQS-jv-07Q" id="Wss-bq-skU"/>
1678+
<outlet property="infoButtonSpacer" destination="eko-8l-aOf" id="eYL-k1-CtM"/>
16771679
</connections>
16781680
</view>
16791681
<view contentMode="scaleToFill" id="bBK-pb-4Z7">

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.7</string>
18+
<string>5.2.8</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

Apptentive/Apptentive/Message Center/ApptentiveMessageCenterViewModel.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ typedef NS_ENUM(NSInteger, ATMessageCenterMessageStatus) {
4545
@property (readonly, nonatomic) id<ApptentiveStyle> styleSheet;
4646

4747
@property (readonly, nonatomic) NSString *title;
48-
@property (readonly, nonatomic) NSString *branding;
4948

5049
@property (readonly, nonatomic) NSString *composerTitle;
5150
@property (readonly, nonatomic) NSString *composerPlaceholderText;
@@ -83,6 +82,8 @@ typedef NS_ENUM(NSInteger, ATMessageCenterMessageStatus) {
8382
@property (readonly, nonatomic) NSString *profileEditSkipButtonTitle;
8483
@property (readonly, nonatomic) NSString *profileEditSaveButtonTitle;
8584

85+
@property (readonly, nonatomic) BOOL showInfoButton;
86+
8687
@property (readonly, nonatomic) BOOL networkIsReachable;
8788

8889
@property (assign, nonatomic) BOOL didSkipProfile;

Apptentive/Apptentive/Message Center/ApptentiveMessageCenterViewModel.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ - (NSString *)title {
105105
return self.interaction.configuration[@"title"];
106106
}
107107

108-
- (NSString *)branding {
109-
return self.interaction.configuration[@"branding"];
110-
}
111-
112108
#pragma mark - Composer
113109

114110
- (NSString *)composerTitle {
@@ -151,6 +147,10 @@ - (NSURL *)greetingImageURL {
151147
return (URLString.length > 0) ? [NSURL URLWithString:URLString] : nil;
152148
}
153149

150+
- (BOOL)showInfoButton {
151+
return Apptentive.shared.showInfoButton;
152+
}
153+
154154
#pragma mark - Status
155155

156156
- (NSString *)statusBody {

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,11 @@ - (void)configureView {
236236

237237
self.greetingView.imageView.imageURL = self.viewModel.greetingImageURL;
238238

239-
self.greetingView.aboutButton.hidden = !self.viewModel.branding;
240239
self.greetingView.aboutButton.tintColor = [self.viewModel.styleSheet colorForStyle:ApptentiveTextStyleHeaderMessage];
241240
self.greetingView.isOnScreen = NO;
242241

242+
self.greetingView.aboutButton.hidden = !self.viewModel.showInfoButton;
243+
243244
[self updateHeaderFooterTextSize:nil];
244245

245246
[self.greetingView.aboutButton setImage:[[ApptentiveUtilities imageNamed:@"at_info"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal];

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
@interface ApptentiveSurveyViewController ()
4545

46-
@property (strong, nonatomic) IBOutlet ApptentiveSurveyGreetingView *headerView;
46+
@property (strong, nullable, nonatomic) IBOutlet ApptentiveSurveyGreetingView *headerView;
4747
@property (strong, nonatomic) IBOutlet UIView *headerBackgroundView;
4848
@property (strong, nonatomic) IBOutlet UIView *footerView;
4949
@property (strong, nonatomic) IBOutlet UIView *footerBackgroundView;
@@ -80,6 +80,10 @@ - (void)viewDidLoad {
8080
self.headerView.infoButton.accessibilityLabel = ApptentiveLocalizedString(@"About Apptentive", @"Accessibility label for 'show about' button");
8181
[self.submitButton setTitle:self.viewModel.submitButtonText forState:UIControlStateNormal];
8282

83+
if (!self.viewModel.showInfoButton && self.viewModel.greeting.length == 0) {
84+
self.headerView = nil;
85+
}
86+
8387
((ApptentiveSurveyCollectionView *)self.collectionView).collectionHeaderView = self.headerView;
8488
((ApptentiveSurveyCollectionView *)self.collectionView).collectionFooterView = self.footerView;
8589
((ApptentiveSurveyCollectionViewLayout *)self.collectionViewLayout).shouldExpand = YES;
@@ -97,6 +101,7 @@ - (void)viewDidLoad {
97101
self.headerView.greetingLabel.textColor = [style colorForStyle:ApptentiveTextStyleHeaderMessage];
98102
self.headerView.infoButton.tintColor = [style colorForStyle:ApptentiveTextStyleSurveyInstructions];
99103
self.headerView.borderView.backgroundColor = [style colorForStyle:ApptentiveColorSeparator];
104+
self.headerView.showInfoButton = self.viewModel.showInfoButton;
100105

101106
self.footerBackgroundView.backgroundColor = [style colorForStyle:ApptentiveColorFooterBackground];
102107
self.submitButton.titleLabel.font = [style fontForStyle:ApptentiveTextStyleSubmitButton];

Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewModel.h

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ NS_ASSUME_NONNULL_BEGIN
2929
@property (readonly, nonatomic) id<ApptentiveStyle> styleSheet;
3030
@property (weak, nonatomic) id<ATSurveyViewModelDelegate> delegate;
3131

32+
@property (readonly, nonatomic) BOOL showInfoButton;
33+
3234
@property (readonly, nonatomic) NSString *title;
3335
@property (readonly, nonatomic) NSString *greeting;
3436
@property (readonly, nonatomic) NSString *submitButtonText;

Apptentive/Apptentive/Surveys/View Controllers/ApptentiveSurveyViewModel.m

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ - (NSString *)greeting {
6868
return self.survey.surveyDescription;
6969
}
7070

71+
- (BOOL)showInfoButton {
72+
return Apptentive.shared.showInfoButton;
73+
}
74+
7175
- (NSString *)submitButtonText {
7276
return self.survey.submitText;
7377
}

Apptentive/Apptentive/Surveys/Views/ApptentiveSurveyGreetingView.h

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ NS_ASSUME_NONNULL_BEGIN
1616
@property (strong, nonatomic) IBOutlet UILabel *greetingLabel;
1717
@property (strong, nonatomic) IBOutlet UIButton *infoButton;
1818
@property (strong, nonatomic) IBOutlet UIView *borderView;
19+
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *infoButtonSpacer;
20+
21+
@property (assign, nonatomic) BOOL showInfoButton;
1922

2023
@end
2124

Apptentive/Apptentive/Surveys/Views/ApptentiveSurveyGreetingView.m

+8
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ - (void)layoutSubviews {
3636
[super layoutSubviews];
3737
}
3838

39+
- (void)setShowInfoButton:(BOOL)showInfoButton {
40+
_showInfoButton = showInfoButton;
41+
42+
self.infoButton.hidden = !showInfoButton;
43+
44+
self.infoButtonSpacer.active = showInfoButton;
45+
}
46+
3947
@end
4048

4149
NS_ASSUME_NONNULL_END

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

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
# 2019-11-18 - v5.2.8
2+
3+
#### Improvements
4+
5+
* Add the ability to hide the About Apptentive (i) button from Message Center and Surveys.
6+
17
# 2019-09-18 - v5.2.7
28

39
#### Bugs Fixed
410

5-
* Fix a bugs with gesture-driven dismissal of Message Center and Surveys.
11+
* Fix a bug with gesture-driven dismissal of Message Center and Surveys.
612

713
# 2019-09-16 - v5.2.6
814

Example/Podfile.lock

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

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

1111
SPEC CHECKSUMS:
12-
apptentive-ios: fc0c29a9599737240b5fe93d10d2a90150fb6b7a
12+
apptentive-ios: b6d36cb5ef582b9e5fee5104ad909c736d6bff04
1313

1414
PODFILE CHECKSUM: 89d2b5f4683b04482e89df6d46b268cc9ed1ef79
1515

16-
COCOAPODS: 1.7.5
16+
COCOAPODS: 1.8.4

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

0 commit comments

Comments
 (0)