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
b66b4fb8
Commit
b66b4fb8
authored
Jun 06, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #210 from Shopify/task/clean-up
Remove deprecations across the SDK
parents
b8795034
0a69d7c5
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
169 additions
and
68 deletions
+169
-68
BUYApplePayAdditionsTest.m
...e Buy SDK/Mobile Buy SDK Tests/BUYApplePayAdditionsTest.m
+1
-1
BUYCheckoutTest.m
Mobile Buy SDK/Mobile Buy SDK Tests/BUYCheckoutTest.m
+2
-2
BUYClientTest.m
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTest.m
+3
-3
BUYIntegrationTest.m
Mobile Buy SDK/Mobile Buy SDK Tests/BUYIntegrationTest.m
+9
-9
project.pbxproj
Mobile Buy SDK/Mobile Buy SDK.xcodeproj/project.pbxproj
+127
-4
Buy.h
Mobile Buy SDK/Mobile Buy SDK/Buy.h
+0
-1
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
Info.plist
Mobile Buy SDK/Mobile Buy SDK/Info.plist
+1
-1
BUYCollection.h
... Buy SDK/Mobile Buy SDK/Models/Persistent/BUYCollection.h
+0
-6
BUYCollection.m
... Buy SDK/Mobile Buy SDK/Models/Persistent/BUYCollection.m
+0
-21
BUYImageLink.h
...e Buy SDK/Mobile Buy SDK/Models/Persistent/BUYImageLink.h
+0
-2
BUYImageLink.m
...e Buy SDK/Mobile Buy SDK/Models/Persistent/BUYImageLink.m
+0
-5
BUYCheckout.h
Mobile Buy SDK/Mobile Buy SDK/Models/Transient/BUYCheckout.h
+2
-2
BUYCheckout.m
Mobile Buy SDK/Mobile Buy SDK/Models/Transient/BUYCheckout.m
+4
-4
Buy.h
Mobile Buy SDK/Mobile Buy SDK/Static Framework/Buy.h
+0
-1
No files found.
Mobile Buy SDK/Mobile Buy SDK Tests/BUYApplePayAdditionsTest.m
View file @
b66b4fb8
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
-
(
void
)
setUp
-
(
void
)
setUp
{
{
_modelManager
=
[
BUYModelManager
modelManager
];
_modelManager
=
[
BUYModelManager
modelManager
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
nil
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
_modelManager
c
art
:
nil
];
}
}
-
(
void
)
tearDown
-
(
void
)
tearDown
...
...
Mobile Buy SDK/Mobile Buy SDK Tests/BUYCheckoutTest.m
View file @
b66b4fb8
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
-
(
void
)
testInitWithCartAddsLineItems
-
(
void
)
testInitWithCartAddsLineItems
{
{
[
_cart
addVariant
:
_variant
];
[
_cart
addVariant
:
_variant
];
BUYCheckout
*
checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
_cart
];
BUYCheckout
*
checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
_modelManager
c
art
:
_cart
];
XCTAssertEqual
([[
checkout
lineItems
]
count
],
[[
_cart
lineItems
]
count
]);
XCTAssertEqual
([[
checkout
lineItems
]
count
],
[[
_cart
lineItems
]
count
]);
XCTAssertTrue
([
checkout
isDirty
]);
XCTAssertTrue
([
checkout
isDirty
]);
}
}
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
-
(
void
)
testHasToken
-
(
void
)
testHasToken
{
{
BUYCheckout
*
checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
_cart
];
BUYCheckout
*
checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
_modelManager
c
art
:
_cart
];
checkout
.
token
=
nil
;
checkout
.
token
=
nil
;
XCTAssertFalse
([
checkout
hasToken
]);
XCTAssertFalse
([
checkout
hasToken
]);
checkout
.
token
=
@""
;
checkout
.
token
=
@""
;
...
...
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTest.m
View file @
b66b4fb8
...
@@ -70,7 +70,7 @@ NSString * const BUYFakeCustomerToken = @"dsfasdgafdg";
...
@@ -70,7 +70,7 @@ NSString * const BUYFakeCustomerToken = @"dsfasdgafdg";
-
(
NSData
*
)
dataForCartFromClient
:
(
BUYClient
*
)
client
-
(
NSData
*
)
dataForCartFromClient
:
(
BUYClient
*
)
client
{
{
BUYCart
*
cart
=
[
self
cart
];
BUYCart
*
cart
=
[
self
cart
];
BUYCheckout
*
checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
cart
];
BUYCheckout
*
checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
cart
.
modelManager
c
art
:
cart
];
BUYRequestOperation
*
task
=
(
BUYRequestOperation
*
)[
self
.
client
createCheckout
:
checkout
completion
:
^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{}];
BUYRequestOperation
*
task
=
(
BUYRequestOperation
*
)[
self
.
client
createCheckout
:
checkout
completion
:
^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{}];
XCTAssertNotNil
(
task
);
XCTAssertNotNil
(
task
);
...
@@ -99,7 +99,7 @@ NSString * const BUYFakeCustomerToken = @"dsfasdgafdg";
...
@@ -99,7 +99,7 @@ NSString * const BUYFakeCustomerToken = @"dsfasdgafdg";
-
(
void
)
testPartialAddressesFlag
-
(
void
)
testPartialAddressesFlag
{
{
BUYCart
*
cart
=
[
self
cart
];
BUYCart
*
cart
=
[
self
cart
];
BUYCheckout
*
checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
cart
];
BUYCheckout
*
checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
cart
.
modelManager
c
art
:
cart
];
XCTAssertThrows
([
checkout
setPartialAddressesValue
:
NO
]);
XCTAssertThrows
([
checkout
setPartialAddressesValue
:
NO
]);
...
@@ -107,7 +107,7 @@ NSString * const BUYFakeCustomerToken = @"dsfasdgafdg";
...
@@ -107,7 +107,7 @@ NSString * const BUYFakeCustomerToken = @"dsfasdgafdg";
NSDictionary
*
json
=
[
NSJSONSerialization
JSONObjectWithData
:
task
.
originalRequest
.
HTTPBody
options
:
0
error
:
nil
];
NSDictionary
*
json
=
[
NSJSONSerialization
JSONObjectWithData
:
task
.
originalRequest
.
HTTPBody
options
:
0
error
:
nil
];
XCTAssertFalse
([
json
[
@"checkout"
][
@"partial_addresses"
]
boolValue
]);
XCTAssertFalse
([
json
[
@"checkout"
][
@"partial_addresses"
]
boolValue
]);
checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
cart
];
checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
cart
.
modelManager
c
art
:
cart
];
BUYAddress
*
partialAddress
=
[
self
.
client
.
modelManager
insertAddressWithJSONDictionary
:
nil
];
BUYAddress
*
partialAddress
=
[
self
.
client
.
modelManager
insertAddressWithJSONDictionary
:
nil
];
partialAddress
.
address1
=
nil
;
partialAddress
.
address1
=
nil
;
...
...
Mobile Buy SDK/Mobile Buy SDK Tests/BUYIntegrationTest.m
View file @
b66b4fb8
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
{
{
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testCheckoutFlowUsingCreditCard_1"
useMocks
:[
self
shouldUseMocks
]];
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testCheckoutFlowUsingCreditCard_1"
useMocks
:[
self
shouldUseMocks
]];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
_cart
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
_modelManager
c
art
:
_cart
];
_checkout
.
shippingAddress
=
[
self
shippingAddress
];
_checkout
.
shippingAddress
=
[
self
shippingAddress
];
_checkout
.
billingAddress
=
[
self
billingAddress
];
_checkout
.
billingAddress
=
[
self
billingAddress
];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testCheckoutFlowUsingCreditCard_1"
useMocks
:[
self
shouldUseMocks
]];
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testCheckoutFlowUsingCreditCard_1"
useMocks
:[
self
shouldUseMocks
]];
[
self
createCart
];
[
self
createCart
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
_cart
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
_modelManager
c
art
:
_cart
];
NSString
*
note
=
@"Order note"
;
NSString
*
note
=
@"Order note"
;
_checkout
.
note
=
note
;
_checkout
.
note
=
note
;
...
@@ -709,7 +709,7 @@
...
@@ -709,7 +709,7 @@
-
(
void
)
testCheckoutWithInvalidShop
-
(
void
)
testCheckoutWithInvalidShop
{
{
[
self
createCart
];
[
self
createCart
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
_cart
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
_modelManager
c
art
:
_cart
];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testInvalidIntegrationBadShopUrl_0"
useMocks
:[
self
shouldUseMocks
]];
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testInvalidIntegrationBadShopUrl_0"
useMocks
:[
self
shouldUseMocks
]];
...
@@ -733,7 +733,7 @@
...
@@ -733,7 +733,7 @@
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testFetchingShippingRatesWithoutShippingAddress_1"
useMocks
:[
self
shouldUseMocks
]];
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testFetchingShippingRatesWithoutShippingAddress_1"
useMocks
:[
self
shouldUseMocks
]];
[
self
createCart
];
[
self
createCart
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
_cart
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
_modelManager
c
art
:
_cart
];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
[
self
.
client
createCheckout
:
_checkout
completion
:
^
(
BUYCheckout
*
returnedCheckout
,
NSError
*
error
)
{
[
self
.
client
createCheckout
:
_checkout
completion
:
^
(
BUYCheckout
*
returnedCheckout
,
NSError
*
error
)
{
...
@@ -766,7 +766,7 @@
...
@@ -766,7 +766,7 @@
{
{
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testFetchingShippingRatesWithInvalidCheckout_1"
useMocks
:[
self
shouldUseMocks
]];
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testFetchingShippingRatesWithInvalidCheckout_1"
useMocks
:[
self
shouldUseMocks
]];
BUYCheckout
*
checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
nil
];
BUYCheckout
*
checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
_modelManager
c
art
:
nil
];
checkout
.
token
=
@"bananaaaa"
;
checkout
.
token
=
@"bananaaaa"
;
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
...
@@ -792,7 +792,7 @@
...
@@ -792,7 +792,7 @@
-
(
void
)
testCheckoutWithAPartialAddress
-
(
void
)
testCheckoutWithAPartialAddress
{
{
[
self
createCart
];
[
self
createCart
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
_cart
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
_modelManager
c
art
:
_cart
];
_checkout
.
shippingAddress
=
[
self
partialShippingAddress
];
_checkout
.
shippingAddress
=
[
self
partialShippingAddress
];
if
([
_checkout
.
shippingAddress
isPartialAddress
])
{
if
([
_checkout
.
shippingAddress
isPartialAddress
])
{
...
@@ -836,7 +836,7 @@
...
@@ -836,7 +836,7 @@
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testCreateCheckoutWithValidDiscount_1"
useMocks
:[
self
shouldUseMocks
]];
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testCreateCheckoutWithValidDiscount_1"
useMocks
:[
self
shouldUseMocks
]];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
_cart
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
_modelManager
c
art
:
_cart
];
_checkout
.
discount
=
[
self
applicableDiscount
];
_checkout
.
discount
=
[
self
applicableDiscount
];
// Create the checkout
// Create the checkout
...
@@ -865,7 +865,7 @@
...
@@ -865,7 +865,7 @@
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testCreateCheckoutWithExpiredDiscount_1"
useMocks
:[
self
shouldUseMocks
]];
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testCreateCheckoutWithExpiredDiscount_1"
useMocks
:[
self
shouldUseMocks
]];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
_cart
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
_modelManager
c
art
:
_cart
];
_checkout
.
discount
=
[
self
inapplicableDiscount
];
_checkout
.
discount
=
[
self
inapplicableDiscount
];
//Create the checkout
//Create the checkout
...
@@ -887,7 +887,7 @@
...
@@ -887,7 +887,7 @@
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testCreateCheckoutWithNonExistentDiscount_1"
useMocks
:[
self
shouldUseMocks
]];
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testCreateCheckoutWithNonExistentDiscount_1"
useMocks
:[
self
shouldUseMocks
]];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
C
art
:
_cart
];
_checkout
=
[[
BUYCheckout
alloc
]
initWith
ModelManager
:
_modelManager
c
art
:
_cart
];
_checkout
.
discount
=
[
self
nonExistentDiscount
];
_checkout
.
discount
=
[
self
nonExistentDiscount
];
//Create the checkout
//Create the checkout
...
...
Mobile Buy SDK/Mobile Buy SDK.xcodeproj/project.pbxproj
View file @
b66b4fb8
...
@@ -109,6 +109,9 @@
...
@@ -109,6 +109,9 @@
84D73C081CDD194D000F978A
/* _BUYAddress.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D73BFF1CDD1931000F978A
/* _BUYAddress.m */
;
};
84D73C081CDD194D000F978A
/* _BUYAddress.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D73BFF1CDD1931000F978A
/* _BUYAddress.m */
;
};
84D73C091CDD194D000F978A
/* BUYAddress.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D73C011CDD1931000F978A
/* BUYAddress.m */
;
};
84D73C091CDD194D000F978A
/* BUYAddress.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D73C011CDD1931000F978A
/* BUYAddress.m */
;
};
84D915441CC0359700D334FB
/* BUYObserver.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D915411CC0359700D334FB
/* BUYObserver.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
84D915441CC0359700D334FB
/* BUYObserver.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D915411CC0359700D334FB
/* BUYObserver.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
84D915431CC0359700D334FB
/* BUYObserver.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D915411CC0359700D334FB
/* BUYObserver.h */
;
};
84D915441CC0359700D334FB
/* BUYObserver.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D915411CC0359700D334FB
/* BUYObserver.h */
;
};
84D915451CC0359700D334FB
/* BUYObserver.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D915421CC0359700D334FB
/* BUYObserver.m */
;
};
84D915461CC0359700D334FB
/* BUYObserver.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D915421CC0359700D334FB
/* BUYObserver.m */
;
};
84D915461CC0359700D334FB
/* BUYObserver.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D915421CC0359700D334FB
/* BUYObserver.m */
;
};
84D9154C1CC03F1600D334FB
/* BUYManagedObject.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D915471CC03F1600D334FB
/* BUYManagedObject.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
84D9154C1CC03F1600D334FB
/* BUYManagedObject.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D915471CC03F1600D334FB
/* BUYManagedObject.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
84D9154E1CC03F1600D334FB
/* BUYManagedObject.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D915481CC03F1600D334FB
/* BUYManagedObject.m */
;
};
84D9154E1CC03F1600D334FB
/* BUYManagedObject.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D915481CC03F1600D334FB
/* BUYManagedObject.m */
;
};
...
@@ -1422,7 +1425,7 @@
...
@@ -1422,7 +1425,7 @@
buildSettings
=
{
buildSettings
=
{
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CURRENT_PROJECT_VERSION
=
1.2.6
;
CURRENT_PROJECT_VERSION
=
2.0
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
DEFINES_MODULE
=
YES
;
DEFINES_MODULE
=
YES
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
...
@@ -1454,7 +1457,7 @@
...
@@ -1454,7 +1457,7 @@
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
COPY_PHASE_STRIP
=
NO
;
COPY_PHASE_STRIP
=
NO
;
CURRENT_PROJECT_VERSION
=
1.2.6
;
CURRENT_PROJECT_VERSION
=
2.0
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
DEFINES_MODULE
=
YES
;
DEFINES_MODULE
=
YES
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
...
@@ -1662,13 +1665,45 @@
...
@@ -1662,13 +1665,45 @@
};
};
name
=
"Debug-core-data"
;
name
=
"Debug-core-data"
;
};
};
B2AE98381CED035700FB0C5D
/* Debug-core-data */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ALWAYS_SEARCH_USER_PATHS
=
NO
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CURRENT_PROJECT_VERSION
=
2.0
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
DEFINES_MODULE
=
YES
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
DYLIB_CURRENT_VERSION
=
1
;
DYLIB_INSTALL_NAME_BASE
=
"@rpath"
;
GCC_NO_COMMON_BLOCKS
=
YES
;
GCC_PREPROCESSOR_DEFINITIONS
=
(
"DEBUG=1"
,
"$(inherited)"
,
);
INFOPLIST_FILE
=
"$(SRCROOT)/Mobile Buy SDK/Info.plist"
;
INSTALL_PATH
=
"$(LOCAL_LIBRARY_DIR)/Frameworks"
;
IPHONEOS_DEPLOYMENT_TARGET
=
8.0
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
MACH_O_TYPE
=
staticlib
;
MODULEMAP_FILE
=
"${PROJECT_DIR}/Mobile Buy SDK/Static Framework/Buy.modulemap"
;
PRODUCT_BUNDLE_IDENTIFIER
=
"com.shopify.$(PRODUCT_NAME:rfc1034identifier)"
;
PRODUCT_NAME
=
Buy
;
SKIP_INSTALL
=
YES
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
VERSIONING_SYSTEM
=
"apple-generic"
;
VERSION_INFO_PREFIX
=
""
;
};
name
=
"Debug-core-data"
;
};
B2AE98391CED035700FB0C5D
/* Debug-core-data */
=
{
B2AE98391CED035700FB0C5D
/* Debug-core-data */
=
{
isa
=
XCBuildConfiguration
;
isa
=
XCBuildConfiguration
;
buildSettings
=
{
buildSettings
=
{
ALWAYS_SEARCH_USER_PATHS
=
NO
;
ALWAYS_SEARCH_USER_PATHS
=
NO
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CURRENT_PROJECT_VERSION
=
1.2.6
;
CURRENT_PROJECT_VERSION
=
2.0
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
DEFINES_MODULE
=
YES
;
DEFINES_MODULE
=
YES
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
...
@@ -1779,6 +1814,35 @@
...
@@ -1779,6 +1814,35 @@
};
};
name
=
"Release-core-data"
;
name
=
"Release-core-data"
;
};
};
B2AE98441CED036F00FB0C5D
/* Release-core-data */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ALWAYS_SEARCH_USER_PATHS
=
NO
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
COPY_PHASE_STRIP
=
NO
;
CURRENT_PROJECT_VERSION
=
2.0
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
DEFINES_MODULE
=
YES
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
DYLIB_CURRENT_VERSION
=
1
;
DYLIB_INSTALL_NAME_BASE
=
"@rpath"
;
GCC_NO_COMMON_BLOCKS
=
YES
;
INFOPLIST_FILE
=
"$(SRCROOT)/Mobile Buy SDK/Info.plist"
;
INSTALL_PATH
=
"$(LOCAL_LIBRARY_DIR)/Frameworks"
;
IPHONEOS_DEPLOYMENT_TARGET
=
8.0
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
MACH_O_TYPE
=
staticlib
;
MODULEMAP_FILE
=
"${PROJECT_DIR}/Mobile Buy SDK/Static Framework/Buy.modulemap"
;
PRODUCT_BUNDLE_IDENTIFIER
=
"com.shopify.$(PRODUCT_NAME:rfc1034identifier)"
;
PRODUCT_NAME
=
Buy
;
SKIP_INSTALL
=
YES
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
VERSIONING_SYSTEM
=
"apple-generic"
;
VERSION_INFO_PREFIX
=
""
;
};
name
=
"Release-core-data"
;
};
B2AE98451CED036F00FB0C5D
/* Release-core-data */
=
{
B2AE98451CED036F00FB0C5D
/* Release-core-data */
=
{
isa
=
XCBuildConfiguration
;
isa
=
XCBuildConfiguration
;
buildSettings
=
{
buildSettings
=
{
...
@@ -1786,7 +1850,7 @@
...
@@ -1786,7 +1850,7 @@
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
COPY_PHASE_STRIP
=
NO
;
COPY_PHASE_STRIP
=
NO
;
CURRENT_PROJECT_VERSION
=
1.2.6
;
CURRENT_PROJECT_VERSION
=
2.0
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
DEFINES_MODULE
=
YES
;
DEFINES_MODULE
=
YES
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
...
@@ -1808,6 +1872,65 @@
...
@@ -1808,6 +1872,65 @@
};
};
name
=
"Release-core-data"
;
name
=
"Release-core-data"
;
};
};
BE9A64421B503C2F0033E558
/* Debug */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CURRENT_PROJECT_VERSION
=
2.0
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
DEFINES_MODULE
=
YES
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
DYLIB_CURRENT_VERSION
=
1
;
DYLIB_INSTALL_NAME_BASE
=
"@rpath"
;
GCC_NO_COMMON_BLOCKS
=
YES
;
GCC_PREPROCESSOR_DEFINITIONS
=
(
"DEBUG=1"
,
"$(inherited)"
,
);
INFOPLIST_FILE
=
"$(SRCROOT)/Mobile Buy SDK/Info.plist"
;
INSTALL_PATH
=
"$(LOCAL_LIBRARY_DIR)/Frameworks"
;
IPHONEOS_DEPLOYMENT_TARGET
=
8.0
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
MACH_O_TYPE
=
staticlib
;
MODULEMAP_FILE
=
"${PROJECT_DIR}/Mobile Buy SDK/Static Framework/Buy.modulemap"
;
PRODUCT_BUNDLE_IDENTIFIER
=
"com.shopify.$(PRODUCT_NAME:rfc1034identifier)"
;
PRODUCT_NAME
=
Buy
;
SKIP_INSTALL
=
YES
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
VERSIONING_SYSTEM
=
"apple-generic"
;
VERSION_INFO_PREFIX
=
""
;
};
name
=
Debug
;
};
BE9A64431B503C2F0033E558
/* Release */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
COPY_PHASE_STRIP
=
NO
;
CURRENT_PROJECT_VERSION
=
2.0
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
DEFINES_MODULE
=
YES
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
DYLIB_CURRENT_VERSION
=
1
;
DYLIB_INSTALL_NAME_BASE
=
"@rpath"
;
GCC_NO_COMMON_BLOCKS
=
YES
;
INFOPLIST_FILE
=
"$(SRCROOT)/Mobile Buy SDK/Info.plist"
;
INSTALL_PATH
=
"$(LOCAL_LIBRARY_DIR)/Frameworks"
;
IPHONEOS_DEPLOYMENT_TARGET
=
8.0
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
MACH_O_TYPE
=
staticlib
;
MODULEMAP_FILE
=
"${PROJECT_DIR}/Mobile Buy SDK/Static Framework/Buy.modulemap"
;
PRODUCT_BUNDLE_IDENTIFIER
=
"com.shopify.$(PRODUCT_NAME:rfc1034identifier)"
;
PRODUCT_NAME
=
Buy
;
SKIP_INSTALL
=
YES
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
VERSIONING_SYSTEM
=
"apple-generic"
;
VERSION_INFO_PREFIX
=
""
;
};
name
=
Release
;
};
F773742C19C770CB0039681C
/* Debug */
=
{
F773742C19C770CB0039681C
/* Debug */
=
{
isa
=
XCBuildConfiguration
;
isa
=
XCBuildConfiguration
;
buildSettings
=
{
buildSettings
=
{
...
...
Mobile Buy SDK/Mobile Buy SDK/Buy.h
View file @
b66b4fb8
...
@@ -73,7 +73,6 @@ FOUNDATION_EXPORT const unsigned char BuyVersionString[];
...
@@ -73,7 +73,6 @@ FOUNDATION_EXPORT const unsigned char BuyVersionString[];
#import <Buy/BUYModelManager.h>
#import <Buy/BUYModelManager.h>
#import <Buy/BUYModelManagerProtocol.h>
#import <Buy/BUYModelManagerProtocol.h>
#import <Buy/BUYObjectProtocol.h>
#import <Buy/BUYObjectProtocol.h>
#import <Buy/BUYObserver.h>
#import <Buy/BUYShopifyErrorCodes.h>
#import <Buy/BUYShopifyErrorCodes.h>
#import <Buy/BUYPaymentToken.h>
#import <Buy/BUYPaymentToken.h>
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Internal.h
View file @
b66b4fb8
...
@@ -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
=
@"1.3"
;
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 @
b66b4fb8
...
@@ -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 @
b66b4fb8
...
@@ -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
]]
};
};
}
}
...
...
Mobile Buy SDK/Mobile Buy SDK/Info.plist
View file @
b66b4fb8
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
FMWK
<
/string
>
<
string
>
FMWK
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.2.6
<
/string
>
<
string
>
2.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
...
...
Mobile Buy SDK/Mobile Buy SDK/Models/Persistent/BUYCollection.h
View file @
b66b4fb8
...
@@ -29,12 +29,6 @@
...
@@ -29,12 +29,6 @@
@interface
BUYCollection
:
_BUYCollection
{}
@interface
BUYCollection
:
_BUYCollection
{}
@property
(
nonatomic
,
readonly
)
NSDate
*
createdAtDate
NS_DEPRECATED_IOS
(
8
_0
,
9
_0
);
@property
(
nonatomic
,
readonly
)
NSDate
*
updatedAtDate
NS_DEPRECATED_IOS
(
8
_0
,
9
_0
);
@property
(
nonatomic
,
readonly
)
NSDate
*
publishedAtDate
NS_DEPRECATED_IOS
(
8
_0
,
9
_0
);
@property
(
nonatomic
,
readonly
)
NSURL
*
imageURL
NS_DEPRECATED_IOS
(
8
_0
,
9
_0
);
@property
(
nonatomic
,
readonly
)
NSString
*
stringDescription
;
@property
(
nonatomic
,
readonly
)
NSString
*
stringDescription
;
/**
/**
...
...
Mobile Buy SDK/Mobile Buy SDK/Models/Persistent/BUYCollection.m
View file @
b66b4fb8
...
@@ -29,27 +29,6 @@
...
@@ -29,27 +29,6 @@
#import "NSString+BUYAdditions.h"
#import "NSString+BUYAdditions.h"
@implementation
BUYCollection
@implementation
BUYCollection
@synthesize
stringDescription
=
_stringDescription
;
-
(
NSDate
*
)
createdAtDate
{
return
self
.
createdAt
;
}
-
(
NSDate
*
)
updatedAtDate
{
return
self
.
updatedAt
;
}
-
(
NSDate
*
)
publishedAtDate
{
return
self
.
publishedAt
;
}
-
(
NSURL
*
)
imageURL
{
return
self
.
image
.
sourceURL
;
}
-
(
void
)
updateStringDescription
-
(
void
)
updateStringDescription
{
{
...
...
Mobile Buy SDK/Mobile Buy SDK/Models/Persistent/BUYImageLink.h
View file @
b66b4fb8
...
@@ -44,8 +44,6 @@ typedef NS_ENUM(NSUInteger, BUYImageURLSize) {
...
@@ -44,8 +44,6 @@ typedef NS_ENUM(NSUInteger, BUYImageURLSize) {
@property
(
nonatomic
,
readonly
,
copy
)
NSDate
*
createdAtDate
;
@property
(
nonatomic
,
readonly
,
copy
)
NSDate
*
createdAtDate
;
@property
(
nonatomic
,
readonly
,
copy
)
NSDate
*
updatedAtDate
;
@property
(
nonatomic
,
readonly
,
copy
)
NSDate
*
updatedAtDate
;
@property
(
nonatomic
,
readonly
)
NSString
*
src
NS_DEPRECATED_IOS
(
8
_0
,
9
_0
);
@end
@end
...
...
Mobile Buy SDK/Mobile Buy SDK/Models/Persistent/BUYImageLink.m
View file @
b66b4fb8
...
@@ -40,11 +40,6 @@
...
@@ -40,11 +40,6 @@
return
self
.
updatedAt
;
return
self
.
updatedAt
;
}
}
-
(
NSString
*
)
src
{
return
self
.
sourceURL
.
absoluteString
;
}
@end
@end
@implementation
BUYImageLink
(
BUYImageSizing
)
@implementation
BUYImageLink
(
BUYImageSizing
)
...
...
Mobile Buy SDK/Mobile Buy SDK/Models/Transient/BUYCheckout.h
View file @
b66b4fb8
...
@@ -39,8 +39,8 @@
...
@@ -39,8 +39,8 @@
@property
(
nonatomic
)
BOOL
hasToken
;
@property
(
nonatomic
)
BOOL
hasToken
;
-
(
instancetype
)
initWith
Cart
:(
BUYCart
*
)
cart
NS_DEPRECATED_IOS
(
8
_0
,
9
_0
,
"Use `BUYModelManager` to create new instances of model objects instead"
)
;
-
(
instancetype
)
initWith
ModelManager
:(
id
<
BUYModelManager
>
)
modelManager
cart
:(
BUYCart
*
)
cart
;
-
(
instancetype
)
initWith
CartToken
:(
NSString
*
)
token
NS_DEPRECATED_IOS
(
8
_0
,
9
_0
,
"Use `BUYModelManager` to create new instances of model objects instead"
);
;
-
(
instancetype
)
initWith
ModelManager
:(
id
<
BUYModelManager
>
)
modelManager
cartToken
:(
NSString
*
)
token
;
-
(
void
)
updateWithCart
:(
BUYCart
*
)
cart
;
-
(
void
)
updateWithCart
:(
BUYCart
*
)
cart
;
...
...
Mobile Buy SDK/Mobile Buy SDK/Models/Transient/BUYCheckout.m
View file @
b66b4fb8
...
@@ -94,18 +94,18 @@
...
@@ -94,18 +94,18 @@
}
}
#endif
#endif
-
(
instancetype
)
initWith
C
art
:
(
BUYCart
*
)
cart
-
(
instancetype
)
initWith
ModelManager
:
(
id
<
BUYModelManager
>
)
modelManager
c
art
:
(
BUYCart
*
)
cart
{
{
self
=
[
self
initWithModelManager
:
cart
.
modelManager
JSONDictionary
:
nil
];
self
=
[
self
initWithModelManager
:
modelManager
JSONDictionary
:
nil
];
if
(
self
)
{
if
(
self
)
{
[
self
updateWithCart
:
cart
];
[
self
updateWithCart
:
cart
];
}
}
return
self
;
return
self
;
}
}
-
(
instancetype
)
initWith
C
artToken
:
(
NSString
*
)
token
-
(
instancetype
)
initWith
ModelManager
:
(
id
<
BUYModelManager
>
)
modelManager
c
artToken
:
(
NSString
*
)
token
{
{
self
=
[
self
initWithModelManager
:
nil
JSONDictionary
:
nil
];
self
=
[
self
initWithModelManager
:
modelManager
JSONDictionary
:
nil
];
if
(
self
)
{
if
(
self
)
{
self
.
cartToken
=
token
;
self
.
cartToken
=
token
;
}
}
...
...
Mobile Buy SDK/Mobile Buy SDK/Static Framework/Buy.h
View file @
b66b4fb8
...
@@ -70,7 +70,6 @@
...
@@ -70,7 +70,6 @@
#import "BUYModelManager.h"
#import "BUYModelManager.h"
#import "BUYModelManagerProtocol.h"
#import "BUYModelManagerProtocol.h"
#import "BUYObjectProtocol.h"
#import "BUYObjectProtocol.h"
#import "BUYObserver.h"
#import "BUYShopifyErrorCodes.h"
#import "BUYShopifyErrorCodes.h"
#import "BUYPaymentToken.h"
#import "BUYPaymentToken.h"
...
...
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