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
b726651f
Commit
b726651f
authored
Jul 14, 2016
by
David Muzi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sample app, add unit test for tags
parent
4f9f8577
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
ProductViewController.m
... SDK Advanced Sample/Product View/ProductViewController.m
+3
-2
ProductListViewController.m
...obile Buy SDK Advanced Sample/ProductListViewController.m
+1
-1
BUYClient+StorefrontTests.m
... Buy SDK/Mobile Buy SDK Tests/BUYClient+StorefrontTests.m
+17
-0
No files found.
Mobile Buy SDK Sample Apps/Sample App Advanced/Mobile Buy SDK Advanced Sample/Product View/ProductViewController.m
View file @
b726651f
...
...
@@ -269,7 +269,7 @@ CGFloat const BUYMaxProductViewHeight = 640.0;
[
self
.
navigationController
setNavigationBarHidden
:
NO
];
}
if
(
self
.
product
.
publicURL
)
{
if
(
self
.
URLForSharing
)
{
UIBarButtonItem
*
rightButton
=
[[
UIBarButtonItem
alloc
]
initWithBarButtonSystemItem
:
UIBarButtonSystemItemAction
target
:
self
action
:
@selector
(
shareLink
)];
NSArray
*
rightButtons
=
[@[
rightButton
]
arrayByAddingObjectsFromArray
:
self
.
navigationItem
.
rightBarButtonItems
];
self
.
navigationItem
.
rightBarButtonItems
=
rightButtons
;
...
...
@@ -584,7 +584,8 @@ CGFloat const BUYMaxProductViewHeight = 640.0;
-
(
NSURL
*
)
URLForSharing
{
return
self
.
product
.
publicURL
;
NSString
*
urlString
=
[
NSString
stringWithFormat
:
@"%@/products/%@"
,
self
.
shop
.
domain
,
self
.
product
.
handle
];
return
[
NSURL
URLWithString
:
urlString
];
}
-
(
UIImage
*
)
ImageForSharing
...
...
Mobile Buy SDK Sample Apps/Sample App Advanced/Mobile Buy SDK Advanced Sample/ProductListViewController.m
View file @
b726651f
...
...
@@ -162,7 +162,7 @@
{
[
self
.
collectionOperation
cancel
];
[[
UIApplication
sharedApplication
]
setNetworkActivityIndicatorVisible
:
YES
];
self
.
collectionOperation
=
[
self
.
client
getProductsPage
:
1
inCollection
:
self
.
collection
.
identifier
sortOrder
:
collectionSort
completion
:^
(
NSArray
*
products
,
NSUInteger
page
,
BOOL
reachedEnd
,
NSError
*
error
)
{
self
.
collectionOperation
=
[
self
.
client
getProductsPage
:
1
withTags
:
nil
inCollection
:
self
.
collection
.
identifier
sortOrder
:
collectionSort
completion
:^
(
NSArray
*
products
,
NSUInteger
page
,
BOOL
reachedEnd
,
NSError
*
error
)
{
[[
UIApplication
sharedApplication
]
setNetworkActivityIndicatorVisible
:
NO
];
if
(
error
==
nil
&&
products
)
{
...
...
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClient+StorefrontTests.m
View file @
b726651f
...
...
@@ -308,4 +308,21 @@
}];
}
-
(
void
)
testGettingTags
{
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
[
self
.
client
getProductTagsPage
:
1
completion
:
^
(
NSArray
*
tags
,
NSUInteger
page
,
BOOL
end
,
NSError
*
error
){
XCTAssertNil
(
error
);
XCTAssertNotNil
(
tags
);
[
expectation
fulfill
];
}];
[
self
waitForExpectationsWithTimeout
:
10
handler
:
^
(
NSError
*
error
)
{
XCTAssertNil
(
error
);
}];
}
@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