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
a546e889
Commit
a546e889
authored
8 years ago
by
Dima Bart
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #212 from Shopify/task/fix-customer-sample
Adjust sample app to support API changes in the SDK.
parents
b66b4fb8
1a027448
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
AccountViewController.swift
...ustomers/Sample App Customers/AccountViewController.swift
+2
-1
OrdersViewController.swift
...Customers/Sample App Customers/OrdersViewController.swift
+3
-1
No files found.
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/AccountViewController.swift
View file @
a546e889
...
...
@@ -79,7 +79,8 @@ class AccountViewController: UIViewController {
extension
AccountViewController
:
AuthenticationDelegate
{
func
authenticationDidSucceedForCustomer
(
customer
:
BUYCustomer
,
withToken
token
:
String
)
{
if
let
orders
=
self
.
storyboard
?
.
instantiateViewControllerWithIdentifier
(
"ordersViewController"
)
{
if
let
orders
=
self
.
storyboard
?
.
instantiateViewControllerWithIdentifier
(
"ordersViewController"
)
as?
OrdersViewController
{
orders
.
customer
=
customer
self
.
navigationController
?
.
pushViewController
(
orders
,
animated
:
true
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/OrdersViewController.swift
View file @
a546e889
...
...
@@ -28,6 +28,8 @@ import UIKit
import
Buy
class
OrdersViewController
:
UIViewController
{
var
customer
:
BUYCustomer
!
@IBOutlet
private
weak
var
tableView
:
UITableView
!
...
...
@@ -50,7 +52,7 @@ class OrdersViewController: UIViewController {
}
private
func
loadOrders
()
{
BUYClient
.
sharedClient
.
getOrdersForCustomerWith
Callback
{
(
orders
,
error
)
in
BUYClient
.
sharedClient
.
getOrdersForCustomerWith
ID
(
String
(
self
.
customer
.
identifier
))
{
(
orders
,
error
)
in
if
let
orders
=
orders
{
self
.
orders
=
orders
self
.
tableView
.
reloadData
()
...
...
This diff is collapsed.
Click to expand it.
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