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
0a69d7c5
Commit
0a69d7c5
authored
Jun 03, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove static version declaration. Refactor dynamic version declaration
parent
1d6d4d7a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
BUYClient+Internal.h
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Internal.h
+0
-1
BUYClient.h
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient.h
+1
-1
BUYClient.m
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient.m
+19
-4
No files found.
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Internal.h
View file @
0a69d7c5
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#import "BUYSerializable.h"
#import "BUYSerializable.h"
static
NSString
*
const
BUYShopifyErrorDomain
=
@"BUYShopifyErrorDomain"
;
static
NSString
*
const
BUYShopifyErrorDomain
=
@"BUYShopifyErrorDomain"
;
static
NSString
*
const
BUYClientVersionString
=
@"2.0"
;
static
NSString
*
const
BUYClientCustomerAccessToken
=
@"X-Shopify-Customer-Access-Token"
;
static
NSString
*
const
BUYClientCustomerAccessToken
=
@"X-Shopify-Customer-Access-Token"
;
typedef
void
(
^
BUYClientRequestJSONCompletion
)(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
);
typedef
void
(
^
BUYClientRequestJSONCompletion
)(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
);
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient.h
View file @
0a69d7c5
...
@@ -121,7 +121,7 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -121,7 +121,7 @@ NS_ASSUME_NONNULL_BEGIN
@property
(
nonatomic
,
strong
,
readonly
,
nonnull
)
NSString
*
appId
;
@property
(
nonatomic
,
strong
,
readonly
,
nonnull
)
NSString
*
appId
;
/**
/**
* Application name to attribute orders to.
Defaults to app bundle name
(CFBundleName)
* Application name to attribute orders to.
Uses the app bundle name from info.plist
(CFBundleName)
*/
*/
@property
(
nonatomic
,
strong
,
nonnull
)
NSString
*
applicationName
;
@property
(
nonatomic
,
strong
,
nonnull
)
NSString
*
applicationName
;
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient.m
View file @
0a69d7c5
...
@@ -71,20 +71,35 @@ static NSString * const BUYClientJSONMimeType = @"application/json";
...
@@ -71,20 +71,35 @@ static NSString * const BUYClientJSONMimeType = @"application/json";
#pragma mark - Headers -
#pragma mark - Headers -
-
(
NSBundle
*
)
sdkBundle
{
return
[
NSBundle
bundleForClass
:[
self
class
]];
}
-
(
NSString
*
)
sdkVersion
{
return
[[
self
sdkBundle
]
objectForInfoDictionaryKey
:(
id
)
kCFBundleVersionKey
]
?:
@""
;
}
-
(
NSBundle
*
)
appBundle
{
return
[
NSBundle
mainBundle
];
}
-
(
NSString
*
)
applicationName
-
(
NSString
*
)
applicationName
{
{
return
[[
NSBundle
mainBundle
]
infoDictionary
][
@"CFBundleName"
]
?:
@""
;
return
[[
self
appBundle
]
objectForInfoDictionaryKey
:(
id
)
kCFBundleNameKey
]
?:
@""
;
}
}
-
(
NSString
*
)
b
undleIdentifier
-
(
NSString
*
)
appB
undleIdentifier
{
{
return
[[
NSBundle
main
Bundle
]
bundleIdentifier
];
return
[[
self
app
Bundle
]
bundleIdentifier
];
}
}
-
(
NSDictionary
*
)
additionalHeaders
-
(
NSDictionary
*
)
additionalHeaders
{
{
return
@{
return
@{
@"User-Agent"
:
[
NSString
stringWithFormat
:
@"Mobile Buy SDK iOS/%@/%@"
,
BUYClientVersionString
,
[
self
b
undleIdentifier
]]
@"User-Agent"
:
[
NSString
stringWithFormat
:
@"Mobile Buy SDK iOS/%@/%@"
,
[
self
sdkVersion
],
[
self
appB
undleIdentifier
]]
};
};
}
}
...
...
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