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
df303a5f
Commit
df303a5f
authored
May 20, 2016
by
Gabriel O'Flaherty-Chan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move model manager into separate category
parent
4f4c5011
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
49 deletions
+79
-49
project.pbxproj
Mobile Buy SDK/Mobile Buy SDK.xcodeproj/project.pbxproj
+14
-0
BUYApplePayHelpers.h
Mobile Buy SDK/Mobile Buy SDK/Utils/BUYApplePayHelpers.h
+0
-26
BUYApplePayHelpers.m
Mobile Buy SDK/Mobile Buy SDK/Utils/BUYApplePayHelpers.m
+2
-23
BUYModelManager+ApplePay.h
...e Buy SDK/Mobile Buy SDK/Utils/BUYModelManager+ApplePay.h
+34
-0
BUYModelManager+ApplePay.m
...e Buy SDK/Mobile Buy SDK/Utils/BUYModelManager+ApplePay.m
+29
-0
No files found.
Mobile Buy SDK/Mobile Buy SDK.xcodeproj/project.pbxproj
View file @
df303a5f
...
@@ -374,6 +374,11 @@
...
@@ -374,6 +374,11 @@
9A47CF221CE5112A00A6D5BA
/* BUYAssert.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A47CF211CE5112A00A6D5BA
/* BUYAssert.h */
;
};
9A47CF221CE5112A00A6D5BA
/* BUYAssert.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A47CF211CE5112A00A6D5BA
/* BUYAssert.h */
;
};
9A47CF231CE5112A00A6D5BA
/* BUYAssert.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A47CF211CE5112A00A6D5BA
/* BUYAssert.h */
;
};
9A47CF231CE5112A00A6D5BA
/* BUYAssert.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A47CF211CE5112A00A6D5BA
/* BUYAssert.h */
;
};
9A6B03791CDA5D4F0054C26E
/* BUYAccountCredentialsTests.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A6B03781CDA5D4F0054C26E
/* BUYAccountCredentialsTests.m */
;
};
9A6B03791CDA5D4F0054C26E
/* BUYAccountCredentialsTests.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A6B03781CDA5D4F0054C26E
/* BUYAccountCredentialsTests.m */
;
};
B2653EC31CEF55CC0012D57D
/* BUYModelManager+ApplePay.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
B2653EC11CEF55CC0012D57D
/* BUYModelManager+ApplePay.h */
;
};
B2653EC41CEF55CC0012D57D
/* BUYModelManager+ApplePay.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
B2653EC11CEF55CC0012D57D
/* BUYModelManager+ApplePay.h */
;
};
B2653EC51CEF55CC0012D57D
/* BUYModelManager+ApplePay.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
B2653EC21CEF55CC0012D57D
/* BUYModelManager+ApplePay.m */
;
};
B2653EC61CEF55CC0012D57D
/* BUYModelManager+ApplePay.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
B2653EC21CEF55CC0012D57D
/* BUYModelManager+ApplePay.m */
;
};
B2653EC71CEF55CC0012D57D
/* BUYModelManager+ApplePay.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
B2653EC21CEF55CC0012D57D
/* BUYModelManager+ApplePay.m */
;
};
BE47340F1B66C4EF00AA721A
/* BUYError.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BE47340D1B66C4EF00AA721A
/* BUYError.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
BE47340F1B66C4EF00AA721A
/* BUYError.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BE47340D1B66C4EF00AA721A
/* BUYError.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
BE4734101B66C4EF00AA721A
/* BUYError.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BE47340E1B66C4EF00AA721A
/* BUYError.m */
;
};
BE4734101B66C4EF00AA721A
/* BUYError.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BE47340E1B66C4EF00AA721A
/* BUYError.m */
;
};
BE5DC3631B71022D00B2BC1E
/* BUYMaskedCreditCard.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BE5DC3611B71022D00B2BC1E
/* BUYMaskedCreditCard.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
BE5DC3631B71022D00B2BC1E
/* BUYMaskedCreditCard.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BE5DC3611B71022D00B2BC1E
/* BUYMaskedCreditCard.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
...
@@ -650,6 +655,8 @@
...
@@ -650,6 +655,8 @@
9A47CF1F1CE50EBB00A6D5BA
/* BUYApplePayTestToken.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
BUYApplePayTestToken.m
;
sourceTree
=
"<group>"
;
};
9A47CF1F1CE50EBB00A6D5BA
/* BUYApplePayTestToken.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
BUYApplePayTestToken.m
;
sourceTree
=
"<group>"
;
};
9A47CF211CE5112A00A6D5BA
/* BUYAssert.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
BUYAssert.h
;
path
=
../Additions/BUYAssert.h
;
sourceTree
=
"<group>"
;
};
9A47CF211CE5112A00A6D5BA
/* BUYAssert.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
BUYAssert.h
;
path
=
../Additions/BUYAssert.h
;
sourceTree
=
"<group>"
;
};
9A6B03781CDA5D4F0054C26E
/* BUYAccountCredentialsTests.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
BUYAccountCredentialsTests.m
;
sourceTree
=
"<group>"
;
};
9A6B03781CDA5D4F0054C26E
/* BUYAccountCredentialsTests.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
BUYAccountCredentialsTests.m
;
sourceTree
=
"<group>"
;
};
B2653EC11CEF55CC0012D57D
/* BUYModelManager+ApplePay.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"BUYModelManager+ApplePay.h"
;
sourceTree
=
"<group>"
;
};
B2653EC21CEF55CC0012D57D
/* BUYModelManager+ApplePay.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"BUYModelManager+ApplePay.m"
;
sourceTree
=
"<group>"
;
};
BE33B4ED1B15FF4D0067982B
/* BUYApplePayHelpers.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BUYApplePayHelpers.h
;
sourceTree
=
"<group>"
;
};
BE33B4ED1B15FF4D0067982B
/* BUYApplePayHelpers.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BUYApplePayHelpers.h
;
sourceTree
=
"<group>"
;
};
BE33B4EE1B15FF4D0067982B
/* BUYApplePayHelpers.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
BUYApplePayHelpers.m
;
sourceTree
=
"<group>"
;
};
BE33B4EE1B15FF4D0067982B
/* BUYApplePayHelpers.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
BUYApplePayHelpers.m
;
sourceTree
=
"<group>"
;
};
BE47340D1B66C4EF00AA721A
/* BUYError.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BUYError.h
;
sourceTree
=
"<group>"
;
};
BE47340D1B66C4EF00AA721A
/* BUYError.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BUYError.h
;
sourceTree
=
"<group>"
;
};
...
@@ -1087,6 +1094,8 @@
...
@@ -1087,6 +1094,8 @@
F70CE40E1A8BF1D90055BEB8
/* BUYApplePayAdditions.m */
,
F70CE40E1A8BF1D90055BEB8
/* BUYApplePayAdditions.m */
,
BE33B4ED1B15FF4D0067982B
/* BUYApplePayHelpers.h */
,
BE33B4ED1B15FF4D0067982B
/* BUYApplePayHelpers.h */
,
BE33B4EE1B15FF4D0067982B
/* BUYApplePayHelpers.m */
,
BE33B4EE1B15FF4D0067982B
/* BUYApplePayHelpers.m */
,
B2653EC11CEF55CC0012D57D
/* BUYModelManager+ApplePay.h */
,
B2653EC21CEF55CC0012D57D
/* BUYModelManager+ApplePay.m */
,
8498DCA71CDD1B1C00BD12A8
/* BUYError+BUYAdditions.h */
,
8498DCA71CDD1B1C00BD12A8
/* BUYError+BUYAdditions.h */
,
8498DCA81CDD1B1C00BD12A8
/* BUYError+BUYAdditions.m */
,
8498DCA81CDD1B1C00BD12A8
/* BUYError+BUYAdditions.m */
,
2AF52A731A700AC80087DB2C
/* BUYRuntime.h */
,
2AF52A731A700AC80087DB2C
/* BUYRuntime.h */
,
...
@@ -1199,6 +1208,7 @@
...
@@ -1199,6 +1208,7 @@
8498DCB61CDD1B5400BD12A8
/* BUYClient+Internal.h in Headers */
,
8498DCB61CDD1B5400BD12A8
/* BUYClient+Internal.h in Headers */
,
841ADE201CB6C942000004B0
/* NSURL+BUYAdditions.h in Headers */
,
841ADE201CB6C942000004B0
/* NSURL+BUYAdditions.h in Headers */
,
841ADE241CB6C942000004B0
/* NSURLComponents+BUYAdditions.h in Headers */
,
841ADE241CB6C942000004B0
/* NSURLComponents+BUYAdditions.h in Headers */
,
B2653EC41CEF55CC0012D57D
/* BUYModelManager+ApplePay.h in Headers */
,
841ADE141CB6C942000004B0
/* NSException+BUYAdditions.h in Headers */
,
841ADE141CB6C942000004B0
/* NSException+BUYAdditions.h in Headers */
,
841ADE041CB6C942000004B0
/* NSDate+BUYAdditions.h in Headers */
,
841ADE041CB6C942000004B0
/* NSDate+BUYAdditions.h in Headers */
,
84980F2D1CB75B5E00CFAB58
/* BUYModelManagerProtocol.h in Headers */
,
84980F2D1CB75B5E00CFAB58
/* BUYModelManagerProtocol.h in Headers */
,
...
@@ -1297,6 +1307,7 @@
...
@@ -1297,6 +1307,7 @@
8498DCB31CDD1B5400BD12A8
/* BUYClient+Internal.h in Headers */
,
8498DCB31CDD1B5400BD12A8
/* BUYClient+Internal.h in Headers */
,
841ADE0F1CB6C942000004B0
/* NSDictionary+BUYAdditions.h in Headers */
,
841ADE0F1CB6C942000004B0
/* NSDictionary+BUYAdditions.h in Headers */
,
841ADE1F1CB6C942000004B0
/* NSURL+BUYAdditions.h in Headers */
,
841ADE1F1CB6C942000004B0
/* NSURL+BUYAdditions.h in Headers */
,
B2653EC31CEF55CC0012D57D
/* BUYModelManager+ApplePay.h in Headers */
,
841ADE231CB6C942000004B0
/* NSURLComponents+BUYAdditions.h in Headers */
,
841ADE231CB6C942000004B0
/* NSURLComponents+BUYAdditions.h in Headers */
,
84980F2C1CB75B5E00CFAB58
/* BUYModelManagerProtocol.h in Headers */
,
84980F2C1CB75B5E00CFAB58
/* BUYModelManagerProtocol.h in Headers */
,
84D73C031CDD1944000F978A
/* BUYAddress.h in Headers */
,
84D73C031CDD1944000F978A
/* BUYAddress.h in Headers */
,
...
@@ -1535,6 +1546,7 @@
...
@@ -1535,6 +1546,7 @@
isa
=
PBXSourcesBuildPhase
;
isa
=
PBXSourcesBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
files
=
(
files
=
(
B2653EC71CEF55CC0012D57D
/* BUYModelManager+ApplePay.m in Sources */
,
901930E31BC5B9BC00D1134E
/* BUYApplePayHelpers.m in Sources */
,
901930E31BC5B9BC00D1134E
/* BUYApplePayHelpers.m in Sources */
,
84DD12AA1CC63FE600A2442D
/* _BUYOrder.m in Sources */
,
84DD12AA1CC63FE600A2442D
/* _BUYOrder.m in Sources */
,
841ADE1E1CB6C942000004B0
/* NSString+BUYAdditions.m in Sources */
,
841ADE1E1CB6C942000004B0
/* NSString+BUYAdditions.m in Sources */
,
...
@@ -1629,6 +1641,7 @@
...
@@ -1629,6 +1641,7 @@
8491103A1CCE718100E53B93
/* BUYExceptionAdditionsTests.m in Sources */
,
8491103A1CCE718100E53B93
/* BUYExceptionAdditionsTests.m in Sources */
,
849110441CCE9F3F00E53B93
/* BUYTransformerTests.m in Sources */
,
849110441CCE9F3F00E53B93
/* BUYTransformerTests.m in Sources */
,
8498DCCC1CDD208200BD12A8
/* BUYCustomerTests.m in Sources */
,
8498DCCC1CDD208200BD12A8
/* BUYCustomerTests.m in Sources */
,
B2653EC51CEF55CC0012D57D
/* BUYModelManager+ApplePay.m in Sources */
,
8498DCCE1CDD208200BD12A8
/* BUYOrderTests.m in Sources */
,
8498DCCE1CDD208200BD12A8
/* BUYOrderTests.m in Sources */
,
9A0B0C831CEB981C0037D68F
/* BUYClient+RoutingTests.m in Sources */
,
9A0B0C831CEB981C0037D68F
/* BUYClient+RoutingTests.m in Sources */
,
849110351CCE70CE00E53B93
/* BUYDictionaryAdditionsTests.m in Sources */
,
849110351CCE70CE00E53B93
/* BUYDictionaryAdditionsTests.m in Sources */
,
...
@@ -1669,6 +1682,7 @@
...
@@ -1669,6 +1682,7 @@
isa
=
PBXSourcesBuildPhase
;
isa
=
PBXSourcesBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
files
=
(
files
=
(
B2653EC61CEF55CC0012D57D
/* BUYModelManager+ApplePay.m in Sources */
,
BE9A64751B503D370033E558
/* BUYApplePayHelpers.m in Sources */
,
BE9A64751B503D370033E558
/* BUYApplePayHelpers.m in Sources */
,
84DD12921CC63FE600A2442D
/* _BUYOrder.m in Sources */
,
84DD12921CC63FE600A2442D
/* _BUYOrder.m in Sources */
,
841ADE1D1CB6C942000004B0
/* NSString+BUYAdditions.m in Sources */
,
841ADE1D1CB6C942000004B0
/* NSString+BUYAdditions.m in Sources */
,
...
...
Mobile Buy SDK/Mobile Buy SDK/Utils/BUYApplePayHelpers.h
View file @
df303a5f
...
@@ -25,11 +25,7 @@
...
@@ -25,11 +25,7 @@
//
//
@import
Foundation
;
@import
Foundation
;
@import
PassKit
;
#import <Buy/BUYModelManager.h>
@class
BUYAddress
;
@class
BUYClient
;
@class
BUYClient
;
@class
BUYCheckout
;
@class
BUYCheckout
;
@class
BUYShop
;
@class
BUYShop
;
...
@@ -72,26 +68,4 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -72,26 +68,4 @@ NS_ASSUME_NONNULL_BEGIN
@end
@end
@interface
BUYModelManager
(
ApplePay
)
/**
* Creates a BUYAddress from an ABRecordRef
*
* @param record ABRecordRef to create a BUYAddress from
*
* @return The BUYAddress created from an ABRecordRef
*/
-
(
BUYAddress
*
)
buyAddressWithABRecord
:(
ABRecordRef
)
addressRecord
NS_DEPRECATED_IOS
(
8
_0
,
9
_0
,
"Use the CNContact backed `buyAddressWithContact:` instead"
);
/**
* Creates a BUYAddress from a PKContact
*
* @param contact PKContact to create a BUYAddress from
*
* @return The BUYAddress created from a PKContact
*/
-
(
BUYAddress
*
)
buyAddressWithContact
:(
PKContact
*
)
contact
NS_AVAILABLE_IOS
(
9
_0
);
@end
NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
Mobile Buy SDK/Mobile Buy SDK/Utils/BUYApplePayHelpers.m
View file @
df303a5f
...
@@ -25,16 +25,15 @@
...
@@ -25,16 +25,15 @@
//
//
#import "BUYApplePayHelpers.h"
#import "BUYApplePayHelpers.h"
#import "BUYAddress.h"
#import "BUYApplePayAdditions.h"
#import "BUYApplePayAdditions.h"
#import "BUYApplePayToken.h"
#import "BUYClient+Checkout.h"
#import "BUYClient+Checkout.h"
#import "BUYClient+Storefront.h"
#import "BUYClient+Storefront.h"
#import "BUYCheckout.h"
#import "BUYCheckout.h"
#import "BUYError.h"
#import "BUYError.h"
#import "BUYModelManager.h"
#import "BUYModelManager
+ApplePay
.h"
#import "BUYShop.h"
#import "BUYShop.h"
#import "BUYShopifyErrorCodes.h"
#import "BUYShopifyErrorCodes.h"
#import "BUYApplePayToken.h"
const
NSTimeInterval
PollDelay
=
0
.
5
;
const
NSTimeInterval
PollDelay
=
0
.
5
;
...
@@ -314,22 +313,3 @@ const NSTimeInterval PollDelay = 0.5;
...
@@ -314,22 +313,3 @@ const NSTimeInterval PollDelay = 0.5;
}
}
@end
@end
@implementation
BUYModelManager
(
ApplePay
)
-
(
BUYAddress
*
)
buyAddressWithABRecord
:(
ABRecordRef
)
addressRecord
{
BUYAddress
*
address
=
[
self
insertAddressWithJSONDictionary
:
nil
];
[
address
updateWithRecord
:
addressRecord
];
return
address
;
}
-
(
BUYAddress
*
)
buyAddressWithContact
:(
PKContact
*
)
contact
{
BUYAddress
*
address
=
[
self
insertAddressWithJSONDictionary
:
nil
];
[
address
updateWithContact
:
contact
];
return
address
;
}
@end
\ No newline at end of file
Mobile Buy SDK/Mobile Buy SDK/Utils/BUYModelManager+ApplePay.h
0 → 100644
View file @
df303a5f
//
// BUYModelManager+ApplePay.h
// Mobile Buy SDK
//
// Created by Gabriel O'Flaherty-Chan on 2016-05-20.
// Copyright © 2016 Shopify Inc. All rights reserved.
//
#import <Buy/BUYModelManager.h>
@class
BUYAddress
;
@import
PassKit
;
@interface
BUYModelManager
(
ApplePay
)
/**
* Creates a BUYAddress from an ABRecordRef
*
* @param record ABRecordRef to create a BUYAddress from
*
* @return The BUYAddress created from an ABRecordRef
*/
-
(
BUYAddress
*
)
buyAddressWithABRecord
:(
ABRecordRef
)
addressRecord
NS_DEPRECATED_IOS
(
8
_0
,
9
_0
,
"Use the CNContact backed `buyAddressWithContact:` instead"
);
/**
* Creates a BUYAddress from a PKContact
*
* @param contact PKContact to create a BUYAddress from
*
* @return The BUYAddress created from a PKContact
*/
-
(
BUYAddress
*
)
buyAddressWithContact
:(
PKContact
*
)
contact
NS_AVAILABLE_IOS
(
9
_0
);
@end
\ No newline at end of file
Mobile Buy SDK/Mobile Buy SDK/Utils/BUYModelManager+ApplePay.m
0 → 100644
View file @
df303a5f
//
// BUYModelManager+ApplePay.m
// Mobile Buy SDK
//
// Created by Gabriel O'Flaherty-Chan on 2016-05-20.
// Copyright © 2016 Shopify Inc. All rights reserved.
//
#import "BUYAddress.h"
#import "BUYApplePayAdditions.h"
#import "BUYModelManager+ApplePay.h"
@implementation
BUYModelManager
(
ApplePay
)
-
(
BUYAddress
*
)
buyAddressWithABRecord
:(
ABRecordRef
)
addressRecord
{
BUYAddress
*
address
=
[
self
insertAddressWithJSONDictionary
:
nil
];
[
address
updateWithRecord
:
addressRecord
];
return
address
;
}
-
(
BUYAddress
*
)
buyAddressWithContact
:(
PKContact
*
)
contact
{
BUYAddress
*
address
=
[
self
insertAddressWithJSONDictionary
:
nil
];
[
address
updateWithContact
:
contact
];
return
address
;
}
@end
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