Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shopify_iossdk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cemarose
shopify_iossdk
Commits
78acdd90
Commit
78acdd90
authored
Feb 09, 2016
by
David Muzi
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #98 from Shopify/task/bundle-id
Adds bundle identifier to user_agent
parents
07bb50d4
26c65e54
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
project.pbxproj
Mobile Buy SDK/Mobile Buy SDK.xcodeproj/project.pbxproj
+4
-4
BUYClient.m
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient.m
+13
-6
Info.plist
Mobile Buy SDK/Mobile Buy SDK/Info.plist
+1
-1
No files found.
Mobile Buy SDK/Mobile Buy SDK.xcodeproj/project.pbxproj
View file @
78acdd90
...
...
@@ -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
;
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient.m
View file @
78acdd90
...
...
@@ -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
createUrlSession
];
self
.
pageSize
=
25
;
}
return
self
;
}
-
(
NSURLSession
*
)
createUrlSession
{
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
...
...
Mobile Buy SDK/Mobile Buy SDK/Info.plist
View file @
78acdd90
...
...
@@ -15,7 +15,7 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
FMWK
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.2.
4
<
/string
>
<
string
>
1.2.
5
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment