-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Example App #16
base: main
Are you sure you want to change the base?
Conversation
79f4cf6
to
3962f1b
Compare
3962f1b
to
bfa7d00
Compare
{ | ||
"identity" : "mobile-payments-sdk-ios", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/square/mobile-payments-sdk-ios", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using a remote package, you could use the local package file. That way it's always using what ever this branch is on and we don't need to remember to update it.
packageProductDependencies = ( | ||
FB1E68DB2C1CC58C004DC0A9 /* MockReaderUI */, | ||
FB1E68DD2C1CC58C004DC0A9 /* SquareMobilePaymentsSDK */, | ||
D05023652CE52A5B005FA05C /* MockReaderUI */, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why there are two references to each dependency
|
||
enum Location { | ||
static var locationPermissionTitle: String = "Location" | ||
static var locationPermissionDescription: String = "Square used location to know where transactions take place. This reduces risk and minimizes payment disputes." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be Square uses instead of used?
import MockReaderUI | ||
#endif | ||
|
||
class HomeViewModel: ObservableObject, PaymentManagerDelegate { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be interesting to convert this to using the Observable macro instead? Make it a little more up to date. But I think it's a fine follow up too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree, we should use the Observable macro
|
||
Divider() | ||
|
||
// Mirophone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling
CODE_SIGN_STYLE = Automatic; | ||
CURRENT_PROJECT_VERSION = 1; | ||
DEVELOPMENT_ASSET_PATHS = "\"../Shared/Preview Content\""; | ||
DEVELOPMENT_TEAM = J6PNP64J5X; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove your development team so that it's blank?
|
||
class AppDelegate: NSObject, UIApplicationDelegate { | ||
|
||
var mobilePaymentSDK: SDKManager! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private(set)
?
public static let squareApplicationID: String? = nil // Replace with your squareApplicationID | ||
public static let accessToken: String? = nil // Replace with your accessToken | ||
public static let locationID: String? = nil // Replace with your locationID | ||
static let squareApplicationID: String = "your_square_application_id" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I kind of liked have these optional because if you ran the app for the first time you would get a compile error saying that you need to input these instead of the app trying to run with dummy values.
Description
This PR introduces a new example app developers can utilize to better understand how to integrate the Mobile Payments SDK into their applications.
Demo
DonutCounteriPhoneDemo.MP4