Skip to content

Commit

Permalink
Merge pull request #278 from apptentive/branch_5.2.12
Browse files Browse the repository at this point in the history
Release 5.2.12
  • Loading branch information
frankus committed Jun 30, 2020
2 parents ac77da9 + 569234e commit beae22f
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 13 deletions.
12 changes: 8 additions & 4 deletions Apptentive/Apptentive.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
01626EB91EB7D60C0064E73F /* NSData+Encryption.h in Headers */ = {isa = PBXBuildFile; fileRef = 01626EB71EB7D60C0064E73F /* NSData+Encryption.h */; };
01626EBA1EB7D60C0064E73F /* NSData+Encryption.m in Sources */ = {isa = PBXBuildFile; fileRef = 01626EB81EB7D60C0064E73F /* NSData+Encryption.m */; };
01626EBC1EB7E5B90064E73F /* ApptentiveEncryptionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 01626EBB1EB7E5B90064E73F /* ApptentiveEncryptionTests.m */; };
0168B1AD24AAAFD1006EEF65 /* DebugLogging.cer in Resources */ = {isa = PBXBuildFile; fileRef = 0168B1AC24AAAFD1006EEF65 /* DebugLogging.cer */; };
017477261EA92BED00A0A949 /* ApptentiveEventPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = 0174771E1EA92BED00A0A949 /* ApptentiveEventPayload.h */; };
017477271EA92BED00A0A949 /* ApptentiveEventPayload.m in Sources */ = {isa = PBXBuildFile; fileRef = 0174771F1EA92BED00A0A949 /* ApptentiveEventPayload.m */; };
017477281EA92BED00A0A949 /* ApptentiveMessagePayload.h in Headers */ = {isa = PBXBuildFile; fileRef = 017477201EA92BED00A0A949 /* ApptentiveMessagePayload.h */; };
Expand Down Expand Up @@ -504,6 +505,7 @@
01626EB71EB7D60C0064E73F /* NSData+Encryption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Encryption.h"; sourceTree = "<group>"; };
01626EB81EB7D60C0064E73F /* NSData+Encryption.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Encryption.m"; sourceTree = "<group>"; };
01626EBB1EB7E5B90064E73F /* ApptentiveEncryptionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApptentiveEncryptionTests.m; sourceTree = "<group>"; };
0168B1AC24AAAFD1006EEF65 /* DebugLogging.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = DebugLogging.cer; sourceTree = "<group>"; };
0174771E1EA92BED00A0A949 /* ApptentiveEventPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApptentiveEventPayload.h; sourceTree = "<group>"; };
0174771F1EA92BED00A0A949 /* ApptentiveEventPayload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApptentiveEventPayload.m; sourceTree = "<group>"; };
017477201EA92BED00A0A949 /* ApptentiveMessagePayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApptentiveMessagePayload.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1013,6 +1015,7 @@
01A2CF931E49062700C2103A /* Apptentive */ = {
isa = PBXGroup;
children = (
0168B1AC24AAAFD1006EEF65 /* DebugLogging.cer */,
EF3FE88720A226EE00A3C9C5 /* Apptimize */,
01A2CFB01E490A9700C2103A /* Custom Views */,
01A2CFBB1E490A9700C2103A /* Engagement */,
Expand Down Expand Up @@ -2031,6 +2034,7 @@
files = (
01A2D1481E490A9700C2103A /* at_apptentive_logo.png in Resources */,
01A2D15D1E490A9700C2103A /* at_document.png in Resources */,
0168B1AD24AAAFD1006EEF65 /* DebugLogging.cer in Resources */,
01A2D1681E490A9700C2103A /* [email protected] in Resources */,
01A2D14B1E490A9700C2103A /* at_attach.png in Resources */,
01A2D1721E490A9700C2103A /* at_update_logo.png in Resources */,
Expand Down Expand Up @@ -2405,7 +2409,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 39;
CURRENT_PROJECT_VERSION = 41;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -2463,7 +2467,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 39;
CURRENT_PROJECT_VERSION = 41;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -2495,7 +2499,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 86WML2UN43;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 39;
DYLIB_CURRENT_VERSION = 41;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = "APPTENTIVE_DEBUG=1";
Expand All @@ -2515,7 +2519,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 86WML2UN43;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 39;
DYLIB_CURRENT_VERSION = 41;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch";
INFOPLIST_FILE = Apptentive/Info.plist;
Expand Down
5 changes: 4 additions & 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.11"
#define kApptentiveVersionString @"5.2.12"

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

/** Notification sent when a survey is cancelled. */
extern NSNotificationName const ApptentiveSurveyCancelledNotification;

/** Notification sent when a message is sent, either by the user or using a sendAttachment method.
You can use this notification to ask the user to enable push notifications. */
extern NSNotificationName const ApptentiveMessageSentNotification;
Expand Down
1 change: 1 addition & 0 deletions Apptentive/Apptentive/Apptentive.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

NSNotificationName const ApptentiveSurveyShownNotification = @"ApptentiveSurveyShownNotification";
NSNotificationName const ApptentiveSurveySentNotification = @"ApptentiveSurveySentNotification";
NSNotificationName const ApptentiveSurveyCancelledNotification = @"ApptentiveSurveyCancelledNotification";

NSNotificationName const ApptentiveCustomPersonDataChangedNotification = @"ApptentiveCustomPersonDataChangedNotification";
NSNotificationName const ApptentiveCustomDeviceDataChangedNotification = @"ApptentiveCustomDeviceDataChangedNotification";
Expand Down
Binary file added Apptentive/Apptentive/DebugLogging.cer
Binary file not shown.
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.11</string>
<string>5.2.12</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
37 changes: 36 additions & 1 deletion Apptentive/Apptentive/Misc/ApptentiveLogMonitor.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ + (void)startSessionWithBaseURL:(NSURL *)baseURL appKey:(NSString *)appKey signa
if (session != nil) {
ApptentiveLogInfo(ApptentiveLogTagMonitor, @"Previous Apptentive Log Monitor session loaded from persistent storage: %@", session);
[self startSession:session];
} else {
} else if ([self IsMobileConfigInstalled]) {
// attempt to read access token from a clipboard
NSString *accessToken = [self readAccessTokenFromClipboard];
if (accessToken == nil) {
Expand Down Expand Up @@ -222,4 +222,39 @@ + (void)verifyAccessToken:(NSString *)accessToken baseURL:(NSURL *)baseURL appKe
[task resume];
}

#pragma mark -
#pragma mark Configuration Profile

+ (BOOL)IsMobileConfigInstalled {
NSString* certPath = [[NSBundle bundleForClass:self] pathForResource:@"DebugLogging" ofType:@"cer"];
if (certPath == nil) {
return NO;
}

NSData* certData = [NSData dataWithContentsOfFile:certPath];
if (certData == nil) {
return NO;
}

SecCertificateRef cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef) certData);
SecPolicyRef policy = SecPolicyCreateBasicX509();
SecTrustRef trust;

OSStatus err = SecTrustCreateWithCertificates((__bridge CFArrayRef) [NSArray arrayWithObject:(__bridge id)cert], policy, &trust);

SecTrustResultType trustResult = -1;

err = SecTrustEvaluate(trust, &trustResult);

CFRelease(trust);
CFRelease(policy);
CFRelease(cert);

if(trustResult == kSecTrustResultUnspecified || trustResult == kSecTrustResultProceed) {
return YES;
} else {
return NO;
}
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell
otherCell.textField.tag = [self.viewModel textFieldTagForIndexPath:indexPath];
otherCell.textField.font = [self.viewModel.styleSheet fontForStyle:ApptentiveTextStyleTextInput];
otherCell.textField.textColor = [self.viewModel.styleSheet colorForStyle:ApptentiveTextStyleTextInput];
otherCell.textField.backgroundColor = [self.viewModel.styleSheet colorForStyle:ApptentiveColorTextInputBackground];
}

return cell;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ - (void)answerChangedAtIndexPath:(NSIndexPath *)indexPath {
}

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

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.11</string>
<string>5.2.12</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 2020-06-29 - v5.2.12

#### Improvements

* Use configuration profile to enable log monitor. This will avoid the pasting-from-clipboard notification in iOS 14.
* Post a notification when a survey is cancelled.

#### Bugs Fixed

* Remove `MobileCoreServices` from the `podspec` to fix a deprecation warning.
* Fix missing background color override for "Other" question text boxes in surveys.

# 2020-04-27 - v5.2.11

#### Improvements
Expand Down
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- apptentive-ios (5.2.11)
- apptentive-ios (5.2.12)

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

SPEC CHECKSUMS:
apptentive-ios: 307d75a04a6f51097459dc3756ad1146eda072bd
apptentive-ios: 209e1e8c472392f7658387b113a63a8325c11a3d

PODFILE CHECKSUM: 89d2b5f4683b04482e89df6d46b268cc9ed1ef79

COCOAPODS: 1.9.0
COCOAPODS: 1.9.1
4 changes: 2 additions & 2 deletions 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.11'
s.version = '5.2.12'
s.license = 'BSD'
s.summary = 'Apptentive Customer Communications SDK.'
s.homepage = 'https://www.apptentive.com/'
Expand All @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.platform = :ios, '9.0'
s.source_files = 'Apptentive/Apptentive/**/*.{h,m}'
s.requires_arc = true
s.frameworks = 'AVFoundation', 'CoreData', 'CoreGraphics', 'Foundation', 'ImageIO', 'MobileCoreServices', 'QuartzCore', 'QuickLook', 'SystemConfiguration', 'UIKit'
s.frameworks = 'AVFoundation', 'CoreData', 'CoreGraphics', 'Foundation', 'ImageIO', 'QuartzCore', 'QuickLook', 'SystemConfiguration', 'UIKit'
s.resource_bundle = { 'ApptentiveResources' => [
'Apptentive/Apptentive/Model/*.xcdatamodeld',
'Apptentive/Apptentive/Model/*.xcmappingmodel',
Expand Down

0 comments on commit beae22f

Please sign in to comment.