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
29595a44
Commit
29595a44
authored
May 03, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setup a basic application to demo new Customer APIs.
parent
01b76023
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
304 additions
and
5 deletions
+304
-5
Main.storyboard
...Mobile Buy SDK Advanced Sample/Base.lproj/Main.storyboard
+3
-5
project.pbxproj
... Customers/Sample App Customers.xcodeproj/project.pbxproj
+0
-0
AccountViewController.swift
...ustomers/Sample App Customers/AccountViewController.swift
+77
-0
AppDelegate.swift
...mple App Customers/Sample App Customers/AppDelegate.swift
+39
-0
Contents.json
...ustomers/Assets.xcassets/AppIcon.appiconset/Contents.json
+39
-0
LaunchScreen.storyboard
...s/Sample App Customers/Base.lproj/LaunchScreen.storyboard
+27
-0
Main.storyboard
...Customers/Sample App Customers/Base.lproj/Main.storyboard
+0
-0
Info.plist
...Apps/Sample App Customers/Sample App Customers/Info.plist
+40
-0
LoginViewController.swift
... Customers/Sample App Customers/LoginViewController.swift
+40
-0
SignupViewController.swift
...Customers/Sample App Customers/SignupViewController.swift
+39
-0
No files found.
Mobile Buy SDK Sample Apps/Sample App Advanced/Mobile Buy SDK Advanced Sample/Base.lproj/Main.storyboard
View file @
29595a44
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"
8191"
systemVersion=
"15A282b
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
initialViewController=
"rS3-R9-Ivy"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"
10116"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
initialViewController=
"rS3-R9-Ivy"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"
8154
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"
10085
"
/>
</dependencies>
<scenes>
<!--Master-->
...
...
@@ -11,7 +11,6 @@
<navigationController
title=
"Master"
id=
"rS3-R9-Ivy"
sceneMemberID=
"viewController"
>
<navigationBar
key=
"navigationBar"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"scaleToFill"
id=
"yXu-0R-QUA"
>
<autoresizingMask
key=
"autoresizingMask"
/>
<animations/>
</navigationBar>
<connections>
<segue
destination=
"pGg-6v-bdr"
kind=
"relationship"
relationship=
"rootViewController"
id=
"RxB-wf-QIq"
/>
...
...
@@ -28,8 +27,7 @@
<tableView
key=
"view"
opaque=
"NO"
clipsSubviews=
"YES"
clearsContextBeforeDrawing=
"NO"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"grouped"
separatorStyle=
"default"
rowHeight=
"44"
sectionHeaderHeight=
"18"
sectionFooterHeight=
"18"
id=
"mLL-gJ-YKr"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"600"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<animations/>
<color
key=
"backgroundColor"
cocoaTouchSystemColor=
"groupTableViewBackgroundColor"
/>
<color
key=
"backgroundColor"
red=
"0.93725490199999995"
green=
"0.93725490199999995"
blue=
"0.95686274510000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<sections/>
<connections>
<outlet
property=
"dataSource"
destination=
"pGg-6v-bdr"
id=
"P41-gY-KXY"
/>
...
...
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers.xcodeproj/project.pbxproj
0 → 100644
View file @
29595a44
This diff is collapsed.
Click to expand it.
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/AccountViewController.swift
0 → 100644
View file @
29595a44
//
// AccountViewController.swift
// Sample App Customers
//
// Created by Shopify.
// Copyright (c) 2016 Shopify Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
import
UIKit
class
AccountViewController
:
UIViewController
{
private
var
loginViewController
:
LoginViewController
!
private
var
signupViewController
:
SignupViewController
!
// ----------------------------------
// MARK: - View Loading -
//
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
self
.
automaticallyAdjustsScrollViewInsets
=
false
}
// ----------------------------------
// MARK: - Segue -
//
override
func
prepareForSegue
(
segue
:
UIStoryboardSegue
,
sender
:
AnyObject
?)
{
switch
segue
.
identifier
{
case
let
login
where
login
==
"loginSegue"
:
self
.
loginViewController
=
segue
.
destinationViewController
as!
LoginViewController
case
let
signup
where
signup
==
"signupSegue"
:
self
.
signupViewController
=
segue
.
destinationViewController
as!
SignupViewController
default
:
break
}
if
self
.
loginViewController
!=
nil
&&
self
.
signupViewController
!=
nil
{
self
.
updateSelectedIndex
(
0
)
}
}
// ----------------------------------
// MARK: - Updates -
//
private
func
updateSelectedIndex
(
index
:
Int
)
{
self
.
loginViewController
.
view
.
hidden
=
(
index
!=
0
)
self
.
signupViewController
.
view
.
hidden
=
(
index
==
0
)
}
// ----------------------------------
// MARK: - UI Actions -
//
@IBAction
func
segmentAction
(
sender
:
UISegmentedControl
)
{
self
.
updateSelectedIndex
(
sender
.
selectedSegmentIndex
)
}
}
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/AppDelegate.swift
0 → 100644
View file @
29595a44
//
// AppDelegate.swift
// Sample App Customers
//
// Created by Shopify.
// Copyright (c) 2016 Shopify Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
import
UIKit
@UIApplicationMain
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
{
var
window
:
UIWindow
?
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
return
true
}
}
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/Assets.xcassets/AppIcon.appiconset/Contents.json
0 → 100644
View file @
29595a44
{
"images"
:
[
{
"idiom"
:
"iphone"
,
"size"
:
"29x29"
,
"scale"
:
"2x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"29x29"
,
"scale"
:
"3x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"40x40"
,
"scale"
:
"2x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"40x40"
,
"scale"
:
"3x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"60x60"
,
"scale"
:
"2x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"60x60"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/Base.lproj/LaunchScreen.storyboard
0 → 100644
View file @
29595a44
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"8150"
systemVersion=
"15A204g"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
launchScreen=
"YES"
useTraitCollections=
"YES"
initialViewController=
"01J-lp-oVM"
>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"8122"
/>
</dependencies>
<scenes>
<!--View Controller-->
<scene
sceneID=
"EHf-IW-A2E"
>
<objects>
<viewController
id=
"01J-lp-oVM"
sceneMemberID=
"viewController"
>
<layoutGuides>
<viewControllerLayoutGuide
type=
"top"
id=
"Llm-lL-Icb"
/>
<viewControllerLayoutGuide
type=
"bottom"
id=
"xb3-aO-Qok"
/>
</layoutGuides>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"Ze5-6b-2t3"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"600"
height=
"600"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<animations/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
</view>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"iYj-Kq-Ea1"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"53"
y=
"375"
/>
</scene>
</scenes>
</document>
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/Base.lproj/Main.storyboard
0 → 100644
View file @
29595a44
This diff is collapsed.
Click to expand it.
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/Info.plist
0 → 100644
View file @
29595a44
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
en
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
$
(
PRODUCT_BUNDLE_IDENTIFIER
)<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_NAME
)<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
UILaunchStoryboardName
<
/k
e
y
>
<
string
>
LaunchScreen
<
/string
>
<
k
e
y
>
UIMainStoryboardFile
<
/k
e
y
>
<
string
>
Main
<
/string
>
<
k
e
y
>
UIRequiredDeviceCapabilities
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
armv7
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/plist
>
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/LoginViewController.swift
0 → 100644
View file @
29595a44
//
// LoginViewController.swift
// Sample App Customers
//
// Created by Shopify.
// Copyright (c) 2016 Shopify Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
import
UIKit
class
LoginViewController
:
UITableViewController
{
// ----------------------------------
// MARK: - View Loading -
//
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
}
}
Mobile Buy SDK Sample Apps/Sample App Customers/Sample App Customers/SignupViewController.swift
0 → 100644
View file @
29595a44
//
// SignupViewController.swift
// Sample App Customers
//
// Created by Shopify.
// Copyright (c) 2016 Shopify Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
import
UIKit
class
SignupViewController
:
UITableViewController
{
// ----------------------------------
// MARK: - View Loading -
//
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
}
}
\ No newline at end of file
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