Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
Fixes for sessionData.userIdentity ownership
Browse files Browse the repository at this point in the history
  • Loading branch information
grooze committed Feb 25, 2020
1 parent 432e29c commit 06b89df
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions AppMetr.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,8 @@
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 11700;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 11703;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks\"",
Expand All @@ -824,7 +825,7 @@
GCC_PREFIX_HEADER = "Sample/Sample-Prefix.pch";
INFOPLIST_FILE = "$(SRCROOT)/Sample/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
MARKETING_VERSION = 1.17.0;
MARKETING_VERSION = 1.17.3;
PRODUCT_NAME = test;
PROVISIONING_PROFILE = "";
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -837,7 +838,8 @@
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 11700;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 11703;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks\"",
Expand All @@ -846,7 +848,7 @@
GCC_PREFIX_HEADER = "Sample/Sample-Prefix.pch";
INFOPLIST_FILE = "$(SRCROOT)/Sample/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
MARKETING_VERSION = 1.17.0;
MARKETING_VERSION = 1.17.3;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PRODUCT_NAME = test;
PROVISIONING_PROFILE = "";
Expand Down
2 changes: 1 addition & 1 deletion AppMetr/Constants.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
NSUInteger const kUploadInMemoryCount = 30; // max batch count for direct upload

NSString *const kAppMetrDefaultUrl = @"https://appmetr.com/api";
NSString *const kAppMetrVersionString = @"1.17.0";
NSString *const kAppMetrVersionString = @"1.17.3";

// Generic constants

Expand Down
4 changes: 2 additions & 2 deletions AppMetr/SessionData.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ - (id)init {
mIsFirstTrackSessionSent = [[preferences objectForKey:kPreferencesFirstTrackSessionKeyName] boolValue];
mSessionDuration = [[preferences objectForKey:kPreferencesSessionDuration] longValue];
mSessionDurationCurrent = [[preferences objectForKey:kPreferencesSessionDurationCurrent] longValue];
mUserIdentity = [preferences objectForKey:kPreferencesUserIdentity];
mUserIdentity = [[preferences objectForKey:kPreferencesUserIdentity] copy];

if (!mFileList) {
mFileList = [[NSMutableArray alloc] init];
Expand Down Expand Up @@ -100,7 +100,7 @@ - (void)setUserIdentity:(NSString *)userIdentity
{
if(mUserIdentity != nil && [mUserIdentity isEqualToString:userIdentity]) return;
[SessionData setPreferences:userIdentity ?: @"" forKey:kPreferencesUserIdentity];
mUserIdentity = userIdentity;
mUserIdentity = [userIdentity copy];
}

#pragma mark - Class methods
Expand Down

0 comments on commit 06b89df

Please sign in to comment.