Skip to content

Commit beae22f

Browse files
authored
Merge pull request #278 from apptentive/branch_5.2.12
Release 5.2.12
2 parents ac77da9 + 569234e commit beae22f

12 files changed

+70
-13
lines changed

Apptentive/Apptentive.xcodeproj/project.pbxproj

+8-4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
01626EB91EB7D60C0064E73F /* NSData+Encryption.h in Headers */ = {isa = PBXBuildFile; fileRef = 01626EB71EB7D60C0064E73F /* NSData+Encryption.h */; };
6464
01626EBA1EB7D60C0064E73F /* NSData+Encryption.m in Sources */ = {isa = PBXBuildFile; fileRef = 01626EB81EB7D60C0064E73F /* NSData+Encryption.m */; };
6565
01626EBC1EB7E5B90064E73F /* ApptentiveEncryptionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 01626EBB1EB7E5B90064E73F /* ApptentiveEncryptionTests.m */; };
66+
0168B1AD24AAAFD1006EEF65 /* DebugLogging.cer in Resources */ = {isa = PBXBuildFile; fileRef = 0168B1AC24AAAFD1006EEF65 /* DebugLogging.cer */; };
6667
017477261EA92BED00A0A949 /* ApptentiveEventPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = 0174771E1EA92BED00A0A949 /* ApptentiveEventPayload.h */; };
6768
017477271EA92BED00A0A949 /* ApptentiveEventPayload.m in Sources */ = {isa = PBXBuildFile; fileRef = 0174771F1EA92BED00A0A949 /* ApptentiveEventPayload.m */; };
6869
017477281EA92BED00A0A949 /* ApptentiveMessagePayload.h in Headers */ = {isa = PBXBuildFile; fileRef = 017477201EA92BED00A0A949 /* ApptentiveMessagePayload.h */; };
@@ -504,6 +505,7 @@
504505
01626EB71EB7D60C0064E73F /* NSData+Encryption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Encryption.h"; sourceTree = "<group>"; };
505506
01626EB81EB7D60C0064E73F /* NSData+Encryption.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Encryption.m"; sourceTree = "<group>"; };
506507
01626EBB1EB7E5B90064E73F /* ApptentiveEncryptionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApptentiveEncryptionTests.m; sourceTree = "<group>"; };
508+
0168B1AC24AAAFD1006EEF65 /* DebugLogging.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = DebugLogging.cer; sourceTree = "<group>"; };
507509
0174771E1EA92BED00A0A949 /* ApptentiveEventPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApptentiveEventPayload.h; sourceTree = "<group>"; };
508510
0174771F1EA92BED00A0A949 /* ApptentiveEventPayload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApptentiveEventPayload.m; sourceTree = "<group>"; };
509511
017477201EA92BED00A0A949 /* ApptentiveMessagePayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApptentiveMessagePayload.h; sourceTree = "<group>"; };
@@ -1013,6 +1015,7 @@
10131015
01A2CF931E49062700C2103A /* Apptentive */ = {
10141016
isa = PBXGroup;
10151017
children = (
1018+
0168B1AC24AAAFD1006EEF65 /* DebugLogging.cer */,
10161019
EF3FE88720A226EE00A3C9C5 /* Apptimize */,
10171020
01A2CFB01E490A9700C2103A /* Custom Views */,
10181021
01A2CFBB1E490A9700C2103A /* Engagement */,
@@ -2031,6 +2034,7 @@
20312034
files = (
20322035
01A2D1481E490A9700C2103A /* at_apptentive_logo.png in Resources */,
20332036
01A2D15D1E490A9700C2103A /* at_document.png in Resources */,
2037+
0168B1AD24AAAFD1006EEF65 /* DebugLogging.cer in Resources */,
20342038
01A2D1681E490A9700C2103A /* [email protected] in Resources */,
20352039
01A2D14B1E490A9700C2103A /* at_attach.png in Resources */,
20362040
01A2D1721E490A9700C2103A /* at_update_logo.png in Resources */,
@@ -2405,7 +2409,7 @@
24052409
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
24062410
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
24072411
COPY_PHASE_STRIP = NO;
2408-
CURRENT_PROJECT_VERSION = 39;
2412+
CURRENT_PROJECT_VERSION = 41;
24092413
DEBUG_INFORMATION_FORMAT = dwarf;
24102414
ENABLE_STRICT_OBJC_MSGSEND = YES;
24112415
ENABLE_TESTABILITY = YES;
@@ -2463,7 +2467,7 @@
24632467
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
24642468
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
24652469
COPY_PHASE_STRIP = NO;
2466-
CURRENT_PROJECT_VERSION = 39;
2470+
CURRENT_PROJECT_VERSION = 41;
24672471
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
24682472
ENABLE_NS_ASSERTIONS = NO;
24692473
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -2495,7 +2499,7 @@
24952499
DEFINES_MODULE = YES;
24962500
DEVELOPMENT_TEAM = 86WML2UN43;
24972501
DYLIB_COMPATIBILITY_VERSION = 1;
2498-
DYLIB_CURRENT_VERSION = 39;
2502+
DYLIB_CURRENT_VERSION = 41;
24992503
DYLIB_INSTALL_NAME_BASE = "@rpath";
25002504
GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch";
25012505
GCC_PREPROCESSOR_DEFINITIONS = "APPTENTIVE_DEBUG=1";
@@ -2515,7 +2519,7 @@
25152519
DEFINES_MODULE = YES;
25162520
DEVELOPMENT_TEAM = 86WML2UN43;
25172521
DYLIB_COMPATIBILITY_VERSION = 1;
2518-
DYLIB_CURRENT_VERSION = 39;
2522+
DYLIB_CURRENT_VERSION = 41;
25192523
DYLIB_INSTALL_NAME_BASE = "@rpath";
25202524
GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch";
25212525
INFOPLIST_FILE = Apptentive/Info.plist;

Apptentive/Apptentive/Apptentive.h

+4-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.11"
23+
#define kApptentiveVersionString @"5.2.12"
2424

2525
/** The version number of the Apptentive API platform. */
2626
#define kApptentiveAPIVersionString @"9"
@@ -79,6 +79,9 @@ extern NSNotificationName const ApptentiveSurveyShownNotification;
7979
/** Notification sent when a survey is submitted by the user. */
8080
extern NSNotificationName const ApptentiveSurveySentNotification;
8181

82+
/** Notification sent when a survey is cancelled. */
83+
extern NSNotificationName const ApptentiveSurveyCancelledNotification;
84+
8285
/** Notification sent when a message is sent, either by the user or using a sendAttachment method.
8386
You can use this notification to ask the user to enable push notifications. */
8487
extern NSNotificationName const ApptentiveMessageSentNotification;

Apptentive/Apptentive/Apptentive.m

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
NSNotificationName const ApptentiveSurveyShownNotification = @"ApptentiveSurveyShownNotification";
3737
NSNotificationName const ApptentiveSurveySentNotification = @"ApptentiveSurveySentNotification";
38+
NSNotificationName const ApptentiveSurveyCancelledNotification = @"ApptentiveSurveyCancelledNotification";
3839

3940
NSNotificationName const ApptentiveCustomPersonDataChangedNotification = @"ApptentiveCustomPersonDataChangedNotification";
4041
NSNotificationName const ApptentiveCustomDeviceDataChangedNotification = @"ApptentiveCustomDeviceDataChangedNotification";
964 Bytes
Binary file not shown.

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

Apptentive/Apptentive/Misc/ApptentiveLogMonitor.m

+36-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ + (void)startSessionWithBaseURL:(NSURL *)baseURL appKey:(NSString *)appKey signa
7474
if (session != nil) {
7575
ApptentiveLogInfo(ApptentiveLogTagMonitor, @"Previous Apptentive Log Monitor session loaded from persistent storage: %@", session);
7676
[self startSession:session];
77-
} else {
77+
} else if ([self IsMobileConfigInstalled]) {
7878
// attempt to read access token from a clipboard
7979
NSString *accessToken = [self readAccessTokenFromClipboard];
8080
if (accessToken == nil) {
@@ -222,4 +222,39 @@ + (void)verifyAccessToken:(NSString *)accessToken baseURL:(NSURL *)baseURL appKe
222222
[task resume];
223223
}
224224

225+
#pragma mark -
226+
#pragma mark Configuration Profile
227+
228+
+ (BOOL)IsMobileConfigInstalled {
229+
NSString* certPath = [[NSBundle bundleForClass:self] pathForResource:@"DebugLogging" ofType:@"cer"];
230+
if (certPath == nil) {
231+
return NO;
232+
}
233+
234+
NSData* certData = [NSData dataWithContentsOfFile:certPath];
235+
if (certData == nil) {
236+
return NO;
237+
}
238+
239+
SecCertificateRef cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef) certData);
240+
SecPolicyRef policy = SecPolicyCreateBasicX509();
241+
SecTrustRef trust;
242+
243+
OSStatus err = SecTrustCreateWithCertificates((__bridge CFArrayRef) [NSArray arrayWithObject:(__bridge id)cert], policy, &trust);
244+
245+
SecTrustResultType trustResult = -1;
246+
247+
err = SecTrustEvaluate(trust, &trustResult);
248+
249+
CFRelease(trust);
250+
CFRelease(policy);
251+
CFRelease(cert);
252+
253+
if(trustResult == kSecTrustResultUnspecified || trustResult == kSecTrustResultProceed) {
254+
return YES;
255+
} else {
256+
return NO;
257+
}
258+
}
259+
225260
@end

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

+1
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell
348348
otherCell.textField.tag = [self.viewModel textFieldTagForIndexPath:indexPath];
349349
otherCell.textField.font = [self.viewModel.styleSheet fontForStyle:ApptentiveTextStyleTextInput];
350350
otherCell.textField.textColor = [self.viewModel.styleSheet colorForStyle:ApptentiveTextStyleTextInput];
351+
otherCell.textField.backgroundColor = [self.viewModel.styleSheet colorForStyle:ApptentiveColorTextInputBackground];
351352
}
352353

353354
return cell;

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

+1
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ - (void)answerChangedAtIndexPath:(NSIndexPath *)indexPath {
520520
}
521521

522522
- (void)didCancel:(UIViewController *)presentingViewController {
523+
[[NSNotificationCenter defaultCenter] postNotificationName:ApptentiveSurveyCancelledNotification object:nil];
523524
[Apptentive.shared.backend engage:ApptentiveInteractionSurveyEventLabelCancel fromInteraction:self.interaction fromViewController:presentingViewController];
524525
}
525526

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

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 2020-06-29 - v5.2.12
2+
3+
#### Improvements
4+
5+
* Use configuration profile to enable log monitor. This will avoid the pasting-from-clipboard notification in iOS 14.
6+
* Post a notification when a survey is cancelled.
7+
8+
#### Bugs Fixed
9+
10+
* Remove `MobileCoreServices` from the `podspec` to fix a deprecation warning.
11+
* Fix missing background color override for "Other" question text boxes in surveys.
12+
113
# 2020-04-27 - v5.2.11
214

315
#### Improvements

Example/Podfile.lock

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

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

1111
SPEC CHECKSUMS:
12-
apptentive-ios: 307d75a04a6f51097459dc3756ad1146eda072bd
12+
apptentive-ios: 209e1e8c472392f7658387b113a63a8325c11a3d
1313

1414
PODFILE CHECKSUM: 89d2b5f4683b04482e89df6d46b268cc9ed1ef79
1515

16-
COCOAPODS: 1.9.0
16+
COCOAPODS: 1.9.1

apptentive-ios.podspec

+2-2
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.11'
4+
s.version = '5.2.12'
55
s.license = 'BSD'
66
s.summary = 'Apptentive Customer Communications SDK.'
77
s.homepage = 'https://www.apptentive.com/'
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
1010
s.platform = :ios, '9.0'
1111
s.source_files = 'Apptentive/Apptentive/**/*.{h,m}'
1212
s.requires_arc = true
13-
s.frameworks = 'AVFoundation', 'CoreData', 'CoreGraphics', 'Foundation', 'ImageIO', 'MobileCoreServices', 'QuartzCore', 'QuickLook', 'SystemConfiguration', 'UIKit'
13+
s.frameworks = 'AVFoundation', 'CoreData', 'CoreGraphics', 'Foundation', 'ImageIO', 'QuartzCore', 'QuickLook', 'SystemConfiguration', 'UIKit'
1414
s.resource_bundle = { 'ApptentiveResources' => [
1515
'Apptentive/Apptentive/Model/*.xcdatamodeld',
1616
'Apptentive/Apptentive/Model/*.xcmappingmodel',

0 commit comments

Comments
 (0)