Commit ad7635d2 by David Muzi

Adds the bundle ID to the user_agent

parent 07bb50d4
......@@ -1396,7 +1396,7 @@
ALWAYS_SEARCH_USER_PATHS = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1.2.4;
CURRENT_PROJECT_VERSION = 1.2.5;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
......@@ -1429,7 +1429,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1.2.4;
CURRENT_PROJECT_VERSION = 1.2.5;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
......@@ -1552,7 +1552,7 @@
ALWAYS_SEARCH_USER_PATHS = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1.2.4;
CURRENT_PROJECT_VERSION = 1.2.5;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
......@@ -1585,7 +1585,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1.2.4;
CURRENT_PROJECT_VERSION = 1.2.5;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
......
......@@ -54,7 +54,7 @@
#define kMinSuccessfulStatusCode 200
#define kMaxSuccessfulStatusCode 299
NSString * const BUYVersionString = @"1.2.4";
NSString * const BUYVersionString = @"1.2.5";
static NSString *const kBUYClientPathProductPublications = @"product_publications";
static NSString *const kBUYClientPathCollectionPublications = @"collection_publications";
......@@ -88,16 +88,23 @@ static NSString *const kBUYClientPathCollectionPublications = @"collection_publi
self.channelId = channelId;
self.applicationName = [[NSBundle mainBundle] infoDictionary][@"CFBundleName"] ?: @"";
self.queue = dispatch_get_main_queue();
NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
config.HTTPAdditionalHeaders = @{@"User-Agent": [NSString stringWithFormat:@"Mobile Buy SDK iOS/%@", BUYVersionString]};
self.session = [NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:nil];
self.session = [self urlSession];
self.pageSize = 25;
}
return self;
}
- (NSURLSession *)urlSession
{
NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
config.HTTPAdditionalHeaders = @{@"User-Agent": [NSString stringWithFormat:@"Mobile Buy SDK iOS/%@/%@", BUYVersionString, bundleIdentifier]};
return [NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:nil];
}
#pragma mark - Storefront
- (void)setPageSize:(NSUInteger)pageSize
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.2.4</string>
<string>1.2.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment