Skip to content

Commit 05086a3

Browse files
authored
Merge pull request #296 from apptentive/branch_5.3.4
Release 5.3.4
2 parents 7be72b9 + 6af30d6 commit 05086a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+443
-149
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @frankus @LuqKhan

Apptentive/Apptentive.xcodeproj/project.pbxproj

+27-5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
0116D5271E92F516001DA5CF /* ApptentiveMessageStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 0116D5251E92F516001DA5CF /* ApptentiveMessageStore.h */; };
1919
0116D5281E92F516001DA5CF /* ApptentiveMessageStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 0116D5261E92F516001DA5CF /* ApptentiveMessageStore.m */; };
2020
01201AD31FC637BE00EB3593 /* CodePointAndInteractionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 01201AD21FC637BD00EB3593 /* CodePointAndInteractionTests.m */; };
21+
01211CEB268146E7009F0364 /* ApptentiveRandom.h in Headers */ = {isa = PBXBuildFile; fileRef = 01211CE9268146E7009F0364 /* ApptentiveRandom.h */; };
22+
01211CEC268146E7009F0364 /* ApptentiveRandom.m in Sources */ = {isa = PBXBuildFile; fileRef = 01211CEA268146E7009F0364 /* ApptentiveRandom.m */; };
2123
01216C501EBBB53E0062BD0D /* RequestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01216C4F1EBBB53E0062BD0D /* RequestTests.swift */; };
2224
0123005F20531698000EC3C3 /* ClauseTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0123005E20531698000EC3C3 /* ClauseTests.m */; };
2325
012B96C325118349008A56CC /* Apptentive.h in Headers */ = {isa = PBXBuildFile; fileRef = 012B96C22511832D008A56CC /* Apptentive.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -371,6 +373,8 @@
371373
01B9055C2411C83600E2A663 /* ApptentiveArchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 01B9055A2411C83600E2A663 /* ApptentiveArchiver.m */; };
372374
01B9057E2416C52B00E2A663 /* ApptentiveURLOpener.h in Headers */ = {isa = PBXBuildFile; fileRef = 01B9057C2416C52B00E2A663 /* ApptentiveURLOpener.h */; };
373375
01B9057F2416C52B00E2A663 /* ApptentiveURLOpener.m in Sources */ = {isa = PBXBuildFile; fileRef = 01B9057D2416C52B00E2A663 /* ApptentiveURLOpener.m */; };
376+
01D43A2826B3688200963752 /* UIWindow+Apptentive.h in Headers */ = {isa = PBXBuildFile; fileRef = 01D43A2626B3688200963752 /* UIWindow+Apptentive.h */; };
377+
01D43A2926B3688200963752 /* UIWindow+Apptentive.m in Sources */ = {isa = PBXBuildFile; fileRef = 01D43A2726B3688200963752 /* UIWindow+Apptentive.m */; };
374378
01E04F9E1E819CD300D7E849 /* ApptentiveMessageManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 01E04F9C1E819CD300D7E849 /* ApptentiveMessageManager.h */; };
375379
01E04F9F1E819CD300D7E849 /* ApptentiveMessageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 01E04F9D1E819CD300D7E849 /* ApptentiveMessageManager.m */; };
376380
01E8E2361E6E096D00786738 /* ApptentiveInteractionAppleRatingDialogController.h in Headers */ = {isa = PBXBuildFile; fileRef = 01E8E2341E6E096D00786738 /* ApptentiveInteractionAppleRatingDialogController.h */; };
@@ -461,6 +465,8 @@
461465
0116D5251E92F516001DA5CF /* ApptentiveMessageStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApptentiveMessageStore.h; sourceTree = "<group>"; };
462466
0116D5261E92F516001DA5CF /* ApptentiveMessageStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApptentiveMessageStore.m; sourceTree = "<group>"; };
463467
01201AD21FC637BD00EB3593 /* CodePointAndInteractionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CodePointAndInteractionTests.m; sourceTree = "<group>"; };
468+
01211CE9268146E7009F0364 /* ApptentiveRandom.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ApptentiveRandom.h; sourceTree = "<group>"; };
469+
01211CEA268146E7009F0364 /* ApptentiveRandom.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ApptentiveRandom.m; sourceTree = "<group>"; };
464470
01216C4F1EBBB53E0062BD0D /* RequestTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestTests.swift; sourceTree = "<group>"; };
465471
0123005E20531698000EC3C3 /* ClauseTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ClauseTests.m; sourceTree = "<group>"; };
466472
012B96C22511832D008A56CC /* Apptentive.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Apptentive.h; sourceTree = "<group>"; };
@@ -842,6 +848,8 @@
842848
01B9057C2416C52B00E2A663 /* ApptentiveURLOpener.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ApptentiveURLOpener.h; sourceTree = "<group>"; };
843849
01B9057D2416C52B00E2A663 /* ApptentiveURLOpener.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ApptentiveURLOpener.m; sourceTree = "<group>"; };
844850
01BEA06D2511E97500DF982D /* Apptentive.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = Apptentive.modulemap; sourceTree = "<group>"; };
851+
01D43A2626B3688200963752 /* UIWindow+Apptentive.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIWindow+Apptentive.h"; sourceTree = "<group>"; };
852+
01D43A2726B3688200963752 /* UIWindow+Apptentive.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIWindow+Apptentive.m"; sourceTree = "<group>"; };
845853
01E04F9C1E819CD300D7E849 /* ApptentiveMessageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApptentiveMessageManager.h; sourceTree = "<group>"; };
846854
01E04F9D1E819CD300D7E849 /* ApptentiveMessageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApptentiveMessageManager.m; sourceTree = "<group>"; };
847855
01E8E2341E6E096D00786738 /* ApptentiveInteractionAppleRatingDialogController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApptentiveInteractionAppleRatingDialogController.h; sourceTree = "<group>"; };
@@ -1195,6 +1203,8 @@
11951203
01AA89B61F18177E00FB59AB /* ApptentiveAppInstall.h */,
11961204
01AA89B71F18177E00FB59AB /* ApptentiveAppInstall.m */,
11971205
0178C5681FC4A57900DABF39 /* Targeting */,
1206+
01211CE9268146E7009F0364 /* ApptentiveRandom.h */,
1207+
01211CEA268146E7009F0364 /* ApptentiveRandom.m */,
11981208
);
11991209
path = Model;
12001210
sourceTree = "<group>";
@@ -1522,6 +1532,8 @@
15221532
01B9055A2411C83600E2A663 /* ApptentiveArchiver.m */,
15231533
01B9057C2416C52B00E2A663 /* ApptentiveURLOpener.h */,
15241534
01B9057D2416C52B00E2A663 /* ApptentiveURLOpener.m */,
1535+
01D43A2626B3688200963752 /* UIWindow+Apptentive.h */,
1536+
01D43A2726B3688200963752 /* UIWindow+Apptentive.m */,
15251537
);
15261538
path = Misc;
15271539
sourceTree = "<group>";
@@ -1784,6 +1796,7 @@
17841796
01A2D1031E490A9700C2103A /* ApptentivePassThroughWindow.h in Headers */,
17851797
01A2D1391E490A9700C2103A /* ApptentivePerson.h in Headers */,
17861798
01A2D13F1E490A9700C2103A /* ApptentiveState.h in Headers */,
1799+
01211CEB268146E7009F0364 /* ApptentiveRandom.h in Headers */,
17871800
EFC308D71ECA6692006B6D36 /* ApptentiveLegacyConversationRequest.h in Headers */,
17881801
EF4EAB91203F8A57003318C9 /* ApptentiveDispatchTask+Internal.h in Headers */,
17891802
01A2D1781E490A9700C2103A /* ApptentiveAboutViewController.h in Headers */,
@@ -1831,6 +1844,7 @@
18311844
012ED9292072F33F003D87F3 /* ApptentiveRetryPolicy.h in Headers */,
18321845
EF4EABAB2040C0CF003318C9 /* ApptentiveLogMonitorSession.h in Headers */,
18331846
EF9009901F8D370400DC5B56 /* ApptentiveLogMonitor.h in Headers */,
1847+
01D43A2826B3688200963752 /* UIWindow+Apptentive.h in Headers */,
18341848
EF8EE3AB1EBBA5D00033E7A1 /* ApptentiveJWT.h in Headers */,
18351849
01A2D1D81E490A9700C2103A /* ApptentiveDataManager.h in Headers */,
18361850
01A2D0FF1E490A9700C2103A /* ApptentiveNetworkImageIconView.h in Headers */,
@@ -1983,12 +1997,13 @@
19831997
isa = PBXProject;
19841998
attributes = {
19851999
LastSwiftUpdateCheck = 1200;
1986-
LastUpgradeCheck = 1200;
2000+
LastUpgradeCheck = 1250;
19872001
ORGANIZATIONNAME = "Apptentive, Inc.";
19882002
TargetAttributes = {
19892003
01A2CF901E49062700C2103A = {
19902004
CreatedOnToolsVersion = 8.2.1;
19912005
DevelopmentTeam = 86WML2UN43;
2006+
LastSwiftMigration = 1250;
19922007
ProvisioningStyle = Automatic;
19932008
};
19942009
01A2CF991E49062800C2103A = {
@@ -2284,6 +2299,7 @@
22842299
EFC308D31EC52915006B6D36 /* ApptentiveStopWatch.m in Sources */,
22852300
01A2D1261E490A9700C2103A /* ApptentiveDevice.m in Sources */,
22862301
010FE347203E4C810021C246 /* ApptentiveIndentPrinter.m in Sources */,
2302+
01D43A2926B3688200963752 /* UIWindow+Apptentive.m in Sources */,
22872303
01A2D1AB1E490A9700C2103A /* ApptentiveAppConfiguration.m in Sources */,
22882304
01A2D1D11E490A9700C2103A /* ApptentiveSerialRequest.m in Sources */,
22892305
0140D5FB1E833103007B5130 /* ApptentiveMessage.m in Sources */,
@@ -2294,6 +2310,7 @@
22942310
01A2D1E91E490A9700C2103A /* ApptentiveSurveyViewModel.m in Sources */,
22952311
014508A11EAAB26D003326E7 /* ApptentiveConversationRequest.m in Sources */,
22962312
018FAFE41FC4AC41007C52FE /* ApptentiveOrClause.m in Sources */,
2313+
01211CEC268146E7009F0364 /* ApptentiveRandom.m in Sources */,
22972314
01A2D1861E490A9700C2103A /* ApptentiveAttachmentCell.m in Sources */,
22982315
01A2D1FD1E490A9700C2103A /* ApptentiveSurveySingleLineCell.m in Sources */,
22992316
EF4EAB96203F8B99003318C9 /* ApptentiveLogFileWriteTask.m in Sources */,
@@ -2419,7 +2436,7 @@
24192436
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
24202437
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
24212438
COPY_PHASE_STRIP = NO;
2422-
CURRENT_PROJECT_VERSION = 48;
2439+
CURRENT_PROJECT_VERSION = 49;
24232440
DEBUG_INFORMATION_FORMAT = dwarf;
24242441
ENABLE_STRICT_OBJC_MSGSEND = YES;
24252442
ENABLE_TESTABILITY = YES;
@@ -2477,7 +2494,7 @@
24772494
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
24782495
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
24792496
COPY_PHASE_STRIP = NO;
2480-
CURRENT_PROJECT_VERSION = 48;
2497+
CURRENT_PROJECT_VERSION = 49;
24812498
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
24822499
ENABLE_NS_ASSERTIONS = NO;
24832500
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -2505,11 +2522,12 @@
25052522
01A2CFA61E49062800C2103A /* Debug */ = {
25062523
isa = XCBuildConfiguration;
25072524
buildSettings = {
2525+
CLANG_ENABLE_MODULES = YES;
25082526
CODE_SIGN_IDENTITY = "";
25092527
DEFINES_MODULE = YES;
25102528
DEVELOPMENT_TEAM = 86WML2UN43;
25112529
DYLIB_COMPATIBILITY_VERSION = 1;
2512-
DYLIB_CURRENT_VERSION = 48;
2530+
DYLIB_CURRENT_VERSION = 49;
25132531
DYLIB_INSTALL_NAME_BASE = "@rpath";
25142532
GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch";
25152533
GCC_PREPROCESSOR_DEFINITIONS = "APPTENTIVE_DEBUG=1";
@@ -2520,17 +2538,20 @@
25202538
PRODUCT_BUNDLE_IDENTIFIER = com.apptentive.Apptentive;
25212539
PRODUCT_NAME = "$(TARGET_NAME)";
25222540
SKIP_INSTALL = YES;
2541+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
2542+
SWIFT_VERSION = 5.0;
25232543
};
25242544
name = Debug;
25252545
};
25262546
01A2CFA71E49062800C2103A /* Release */ = {
25272547
isa = XCBuildConfiguration;
25282548
buildSettings = {
2549+
CLANG_ENABLE_MODULES = YES;
25292550
CODE_SIGN_IDENTITY = "";
25302551
DEFINES_MODULE = YES;
25312552
DEVELOPMENT_TEAM = 86WML2UN43;
25322553
DYLIB_COMPATIBILITY_VERSION = 1;
2533-
DYLIB_CURRENT_VERSION = 48;
2554+
DYLIB_CURRENT_VERSION = 49;
25342555
DYLIB_INSTALL_NAME_BASE = "@rpath";
25352556
GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch";
25362557
INFOPLIST_FILE = Apptentive/Info.plist;
@@ -2540,6 +2561,7 @@
25402561
PRODUCT_BUNDLE_IDENTIFIER = com.apptentive.Apptentive;
25412562
PRODUCT_NAME = "$(TARGET_NAME)";
25422563
SKIP_INSTALL = YES;
2564+
SWIFT_VERSION = 5.0;
25432565
};
25442566
name = Release;
25452567
};

Apptentive/Apptentive.xcodeproj/xcshareddata/xcschemes/Apptentive.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1200"
3+
LastUpgradeVersion = "1250"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Apptentive/Apptentive.xcodeproj/xcshareddata/xcschemes/ApptentiveDebugging.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1200"
3+
LastUpgradeVersion = "1250"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Apptentive/Apptentive/Apptentive.m

+6-4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#import "ApptentiveVersion.h"
2727
#import "Apptentive_Private.h"
2828
#import "ApptentiveDispatchQueue.h"
29+
#import "UIWindow+Apptentive.h"
2930

3031
NS_ASSUME_NONNULL_BEGIN
3132

@@ -104,6 +105,7 @@ - (nullable instancetype)initWithApptentiveKey:(NSString *)apptentiveKey apptent
104105
_shouldSanitizeLogMessages = YES;
105106
_showInfoButton = YES;
106107
_enableDebugLogFile = YES;
108+
_gatherCarrierInfo = YES;
107109
}
108110
return self;
109111
}
@@ -157,7 +159,7 @@ - (id)initWithConfiguration:(ApptentiveConfiguration *)configuration {
157159

158160
// start log writer
159161
if (configuration.enableDebugLogFile) {
160-
ApptentiveStartLogMonitor([ApptentiveUtilities cacheDirectoryPath:@"com.apptentive.logs"]);
162+
ApptentiveStartLogWriter([ApptentiveUtilities cacheDirectoryPath:@"com.apptentive.logs"]);
161163
}
162164

163165
// start log monitor
@@ -170,6 +172,8 @@ - (id)initWithConfiguration:(ApptentiveConfiguration *)configuration {
170172
_appID = configuration.appID;
171173

172174
_showInfoButton = configuration.showInfoButton;
175+
176+
ApptentiveBackend.gatherCarrierInfo = configuration.gatherCarrierInfo;
173177

174178
_surveyTermsAndConditions = configuration.surveyTermsAndConditions;
175179

@@ -1094,9 +1098,7 @@ @implementation ApptentiveNavigationController
10941098
// Container to allow customization of Apptentive UI using UIAppearance
10951099

10961100
- (void)presentAnimated:(BOOL)animated completion:(void (^__nullable)(void))completion {
1097-
self.apptentiveAlertWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
1098-
self.apptentiveAlertWindow.rootViewController = [[UIViewController alloc] init];
1099-
self.apptentiveAlertWindow.windowLevel = UIWindowLevelAlert + 1;
1101+
self.apptentiveAlertWindow = [UIWindow apptentive_windowWithRootViewController:[[UIViewController alloc] init]];
11001102
[self.apptentiveAlertWindow makeKeyAndVisible];
11011103
[self.apptentiveAlertWindow.rootViewController presentViewController:self animated:animated completion:completion];
11021104
}

Apptentive/Apptentive/ApptentiveMain.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.3.3"
23+
#define kApptentiveVersionString @"5.3.4"
2424

2525
/** The version number of the Apptentive API platform. */
2626
#define kApptentiveAPIVersionString @"9"
@@ -186,6 +186,9 @@ typedef NS_ENUM(NSUInteger, ApptentiveLogLevel) {
186186
/** If set, shows a valid combination of terms & conditions and/or a link with an optional text mask, below the submit button in Surveys. */
187187
@property (copy, nonatomic, nullable) TermsAndConditions* surveyTermsAndConditions;
188188

189+
/** If set, uses the CoreTelephony framework to expose the mobile carrier name to the targeting system. Defaults to `YES`. */
190+
@property (assign, nonatomic) BOOL gatherCarrierInfo;
191+
189192
/**
190193
Returns an instance of the `ApptentiveConfiguration` class
191194
initialized with the specified parameters.

Apptentive/Apptentive/Custom Views/ApptentiveHUDViewController.m

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#import "ApptentiveHUDViewController.h"
1010
#import "ApptentivePassThroughWindow.h"
11+
#import "UIWindow+Apptentive.h"
1112

1213
NS_ASSUME_NONNULL_BEGIN
1314

@@ -94,11 +95,9 @@ - (void)showInAlertWindow {
9495
self.interval = self.interval ?: 2.0;
9596
self.animationDuration = fmin(self.animationDuration ?: 0.25, self.interval / 2.0);
9697

97-
self.hostWindow = [[ApptentivePassThroughWindow alloc] init];
98-
98+
99+
self.hostWindow = [ApptentivePassThroughWindow apptentive_windowWithRootViewController:self];
99100
[self.hostWindow makeKeyAndVisible];
100-
self.hostWindow.rootViewController = self;
101-
self.hostWindow.windowLevel = UIWindowLevelAlert;
102101
self.hostWindow.backgroundColor = [UIColor clearColor];
103102

104103
self.HUDView.alpha = 0.0;

Apptentive/Apptentive/Engagement/Model/ApptentiveConversation.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ typedef NS_ENUM(NSInteger, ApptentiveConversationState) {
2323

2424
extern NSString *NSStringFromApptentiveConversationState(ApptentiveConversationState state);
2525

26-
@class ApptentivePerson, ApptentiveDevice, ApptentiveSDK, ApptentiveAppRelease, ApptentiveEngagement, ApptentiveVersion, ApptentiveConversationMetadataItem;
26+
@class ApptentivePerson, ApptentiveDevice, ApptentiveSDK, ApptentiveAppRelease, ApptentiveEngagement, ApptentiveVersion, ApptentiveConversationMetadataItem, ApptentiveRandom;
2727
@protocol ApptentiveConversationDelegate;
2828

2929
/**
@@ -71,6 +71,11 @@ extern NSString *NSStringFromApptentiveConversationState(ApptentiveConversationS
7171
*/
7272
@property (readonly, nonatomic) ApptentiveEngagement *engagement;
7373

74+
/**
75+
The `ApptentiveRandom` object for this conversation.
76+
*/
77+
@property (readonly, nonatomic) ApptentiveRandom *random;
78+
7479
/**
7580
The authorization token obtained when creating the conversation.
7681
*/

0 commit comments

Comments
 (0)