Commit 3adc2c74 by David Muzi

Remove Swift Sample App

parent 9c2b37d0
The MIT License (MIT)
Copyright (c) 2015 Shopify
Copyright (c) 2016 Shopify
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
BE9A637A1B5007AA0033E558 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE9A63791B5007AA0033E558 /* AppDelegate.swift */; };
BE9A637C1B5007AA0033E558 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE9A637B1B5007AA0033E558 /* ViewController.swift */; };
BE9A637F1B5007AA0033E558 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BE9A637D1B5007AA0033E558 /* Main.storyboard */; };
BE9A63811B5007AA0033E558 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BE9A63801B5007AA0033E558 /* Images.xcassets */; };
BE9A63841B5007AA0033E558 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = BE9A63821B5007AA0033E558 /* LaunchScreen.xib */; };
BEDEFF541D3823180090AFA1 /* Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEDEFF531D3823180090AFA1 /* Config.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
BE3437B31BC5C20700C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 90F592EC1B0D5EFE0026B382;
remoteInfo = "Mobile Buy SDK Tests";
};
BE3437B51BC5C20700C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BE9A64281B503C2F0033E558;
remoteInfo = Buy;
};
BE3437B91BC5C21300C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 901930E11BC5B9BC00D1134E;
remoteInfo = "Buy Dynamic";
};
BE3437BD1BC5C22C00C71330 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 901930E11BC5B9BC00D1134E;
remoteInfo = "Buy Dynamic";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
BE3437BF1BC5C22C00C71330 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "Mobile Buy SDK.xcodeproj"; path = "../../Mobile Buy SDK/Mobile Buy SDK.xcodeproj"; sourceTree = "<group>"; };
BE9A63741B5007AA0033E558 /* Mobile Buy SDK Swift Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mobile Buy SDK Swift Sample.app"; sourceTree = BUILT_PRODUCTS_DIR; };
BE9A63781B5007AA0033E558 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BE9A63791B5007AA0033E558 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
BE9A637B1B5007AA0033E558 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
BE9A637E1B5007AA0033E558 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
BE9A63801B5007AA0033E558 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
BE9A63831B5007AA0033E558 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
BEDEFF531D3823180090AFA1 /* Config.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Config.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
BE9A63711B5007AA0033E558 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
BE3437A91BC5C20700C71330 /* Products */ = {
isa = PBXGroup;
children = (
BE3437B61BC5C20700C71330 /* Buy.framework */,
BE3437B41BC5C20700C71330 /* Mobile Buy SDK Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
BE9A636B1B5007AA0033E558 = {
isa = PBXGroup;
children = (
BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */,
BE9A63761B5007AA0033E558 /* Mobile Buy SDK Swift Sample */,
BE9A63751B5007AA0033E558 /* Products */,
);
sourceTree = "<group>";
};
BE9A63751B5007AA0033E558 /* Products */ = {
isa = PBXGroup;
children = (
BE9A63741B5007AA0033E558 /* Mobile Buy SDK Swift Sample.app */,
);
name = Products;
sourceTree = "<group>";
};
BE9A63761B5007AA0033E558 /* Mobile Buy SDK Swift Sample */ = {
isa = PBXGroup;
children = (
BE9A63791B5007AA0033E558 /* AppDelegate.swift */,
BE9A637B1B5007AA0033E558 /* ViewController.swift */,
BEDEFF531D3823180090AFA1 /* Config.swift */,
BE9A637D1B5007AA0033E558 /* Main.storyboard */,
BE9A63801B5007AA0033E558 /* Images.xcassets */,
BE9A63821B5007AA0033E558 /* LaunchScreen.xib */,
BE9A63771B5007AA0033E558 /* Supporting Files */,
);
path = "Mobile Buy SDK Swift Sample";
sourceTree = "<group>";
};
BE9A63771B5007AA0033E558 /* Supporting Files */ = {
isa = PBXGroup;
children = (
BE9A63781B5007AA0033E558 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
BE9A63731B5007AA0033E558 /* Mobile Buy SDK Swift Sample */ = {
isa = PBXNativeTarget;
buildConfigurationList = BE9A63931B5007AA0033E558 /* Build configuration list for PBXNativeTarget "Mobile Buy SDK Swift Sample" */;
buildPhases = (
BE9A63701B5007AA0033E558 /* Sources */,
BE9A63711B5007AA0033E558 /* Frameworks */,
BE9A63721B5007AA0033E558 /* Resources */,
BE3437BF1BC5C22C00C71330 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
BE3437BA1BC5C21300C71330 /* PBXTargetDependency */,
BE3437BE1BC5C22C00C71330 /* PBXTargetDependency */,
);
name = "Mobile Buy SDK Swift Sample";
productName = "Mobile Buy SDK Swift Sample";
productReference = BE9A63741B5007AA0033E558 /* Mobile Buy SDK Swift Sample.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
BE9A636C1B5007AA0033E558 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700;
ORGANIZATIONNAME = Shopify;
TargetAttributes = {
BE9A63731B5007AA0033E558 = {
CreatedOnToolsVersion = 6.4;
};
};
};
buildConfigurationList = BE9A636F1B5007AA0033E558 /* Build configuration list for PBXProject "Mobile Buy SDK Swift Sample" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = BE9A636B1B5007AA0033E558;
productRefGroup = BE9A63751B5007AA0033E558 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = BE3437A91BC5C20700C71330 /* Products */;
ProjectRef = BE3437A81BC5C20700C71330 /* Mobile Buy SDK.xcodeproj */;
},
);
projectRoot = "";
targets = (
BE9A63731B5007AA0033E558 /* Mobile Buy SDK Swift Sample */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
BE3437B41BC5C20700C71330 /* Mobile Buy SDK Tests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "Mobile Buy SDK Tests.xctest";
remoteRef = BE3437B31BC5C20700C71330 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
BE3437B61BC5C20700C71330 /* Buy.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Buy.framework;
remoteRef = BE3437B51BC5C20700C71330 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
BE9A63721B5007AA0033E558 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BE9A637F1B5007AA0033E558 /* Main.storyboard in Resources */,
BE9A63841B5007AA0033E558 /* LaunchScreen.xib in Resources */,
BE9A63811B5007AA0033E558 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
BE9A63701B5007AA0033E558 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BE9A637C1B5007AA0033E558 /* ViewController.swift in Sources */,
BE9A637A1B5007AA0033E558 /* AppDelegate.swift in Sources */,
BEDEFF541D3823180090AFA1 /* Config.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
BE3437BA1BC5C21300C71330 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "Buy Dynamic";
targetProxy = BE3437B91BC5C21300C71330 /* PBXContainerItemProxy */;
};
BE3437BE1BC5C22C00C71330 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "Buy Dynamic";
targetProxy = BE3437BD1BC5C22C00C71330 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
BE9A637D1B5007AA0033E558 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
BE9A637E1B5007AA0033E558 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
BE9A63821B5007AA0033E558 /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
BE9A63831B5007AA0033E558 /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
BE9A63911B5007AA0033E558 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
BE9A63921B5007AA0033E558 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
BE9A63941B5007AA0033E558 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEBUG_INFORMATION_FORMAT = dwarf;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"${PROJECT_DIR}/../**",
);
INFOPLIST_FILE = "Mobile Buy SDK Swift Sample/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.shopify.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "${PROJECT_DIR}/Mobile Buy SDK Swift Sample/Buy-Bridging-Header.h";
};
name = Debug;
};
BE9A63951B5007AA0033E558 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEBUG_INFORMATION_FORMAT = dwarf;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"${PROJECT_DIR}/../**",
);
INFOPLIST_FILE = "Mobile Buy SDK Swift Sample/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.shopify.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "${PROJECT_DIR}/Mobile Buy SDK Swift Sample/Buy-Bridging-Header.h";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
BE9A636F1B5007AA0033E558 /* Build configuration list for PBXProject "Mobile Buy SDK Swift Sample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BE9A63911B5007AA0033E558 /* Debug */,
BE9A63921B5007AA0033E558 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
BE9A63931B5007AA0033E558 /* Build configuration list for PBXNativeTarget "Mobile Buy SDK Swift Sample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BE9A63941B5007AA0033E558 /* Debug */,
BE9A63951B5007AA0033E558 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = BE9A636C1B5007AA0033E558 /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Mobile Buy SDK Swift Sample.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BE9A63731B5007AA0033E558"
BuildableName = "Mobile Buy SDK Swift Sample.app"
BlueprintName = "Mobile Buy SDK Swift Sample"
ReferencedContainer = "container:Mobile Buy SDK Swift Sample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BE9A63731B5007AA0033E558"
BuildableName = "Mobile Buy SDK Swift Sample.app"
BlueprintName = "Mobile Buy SDK Swift Sample"
ReferencedContainer = "container:Mobile Buy SDK Swift Sample.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BE9A63731B5007AA0033E558"
BuildableName = "Mobile Buy SDK Swift Sample.app"
BlueprintName = "Mobile Buy SDK Swift Sample"
ReferencedContainer = "container:Mobile Buy SDK Swift Sample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BE9A63731B5007AA0033E558"
BuildableName = "Mobile Buy SDK Swift Sample.app"
BlueprintName = "Mobile Buy SDK Swift Sample"
ReferencedContainer = "container:Mobile Buy SDK Swift Sample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
//
// AppDelegate.swift
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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 {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
func applicationDidEnterBackground(application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Shopify. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mobile Buy SDK Swift Sample" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="Mobile_Buy_SDK_Swift_Sample" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w4i-KI-xG9">
<rect key="frame" x="198" y="289" width="205" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="205" id="Uem-6N-nZR"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="myN-h2-Dgs">
<rect key="frame" x="180" y="107" width="240" height="174"/>
<constraints>
<constraint firstAttribute="width" constant="240" id="LiS-Tq-f61"/>
<constraint firstAttribute="height" constant="174" id="uVT-fL-eSP"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LhO-1x-id6">
<rect key="frame" x="209" y="377" width="183" height="46"/>
<constraints>
<constraint firstAttribute="width" constant="183" id="FX3-Mu-EHH"/>
<constraint firstAttribute="height" constant="46" id="PZh-iB-XaY"/>
</constraints>
<state key="normal" title="Checkout">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="didTapCheckout:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="NUh-t1-m3u"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="LhO-1x-id6" firstAttribute="top" secondItem="w4i-KI-xG9" secondAttribute="bottom" constant="67" id="4bJ-BB-Bp3"/>
<constraint firstAttribute="centerX" secondItem="LhO-1x-id6" secondAttribute="centerX" constant="-0.5" id="9c5-lh-Eum"/>
<constraint firstAttribute="centerY" secondItem="w4i-KI-xG9" secondAttribute="centerY" constant="0.5" id="FTK-cT-nSo"/>
<constraint firstAttribute="centerX" secondItem="w4i-KI-xG9" secondAttribute="centerX" constant="-0.5" id="K4o-ZV-HHD"/>
<constraint firstItem="w4i-KI-xG9" firstAttribute="top" secondItem="myN-h2-Dgs" secondAttribute="bottom" constant="8" id="Qol-n6-Rvq"/>
<constraint firstAttribute="centerX" secondItem="myN-h2-Dgs" secondAttribute="centerX" id="obV-vj-KhY"/>
</constraints>
</view>
<connections>
<outlet property="imageView" destination="myN-h2-Dgs" id="LDX-Hm-8Du"/>
<outlet property="titleLabel" destination="w4i-KI-xG9" id="Enu-cf-Irq"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
//
// Buy-Bridging-Header.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
#ifndef Mobile_Buy_SDK_Buy_Bridging_Header_h
#define Mobile_Buy_SDK_Buy_Bridging_Header_h
#import <Buy/Buy.h>
#endif
//
// Config.swift
// Mobile Buy SDK Swift Sample
//
// Created by Shopify.
// Copyright (c) 2015 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 Foundation
struct Config {
static let shopDomain = ""
static let apiKey = ""
static let appId = ""
static let productId = 0
}
{
"images" : [
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-Small-40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-Small-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
//
// ViewController.swift
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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
import Buy
class ViewController: UIViewController {
@IBOutlet private var titleLabel: UILabel!
@IBOutlet private var imageView: UIImageView!
var productVariant: BUYProductVariant?
let client: BUYClient
required init(coder aDecoder: NSCoder) {
client = BUYClient(shopDomain: Config.shopDomain, apiKey: Config.apiKey, appId: Config.appId)
super.init(coder: aDecoder)!
}
override func viewDidLoad() {
super.viewDidLoad()
client.getProductById(Config.productId) { (product, error) in
guard let product = product else { return }
self.titleLabel.text = product.title
self.productVariant = product.variantsArray().first
guard let buyImage = product.images?.firstObject as? BUYImageLink else { return }
NSURLSession.sharedSession().dataTaskWithURL(buyImage.sourceURL) { (data, response, error) in
guard let data = data else { return }
dispatch_async(dispatch_get_main_queue()) {
let image = UIImage(data: data)
self.imageView.image = image
}
}.resume()
}
}
@IBAction func didTapCheckout(sender: UIButton) {
// Create the checkout
let cart = client.modelManager.buy_objectWithEntityName(BUYCart.entityName(), JSONDictionary: nil) as! BUYCart
cart.addVariant(productVariant!)
let checkout = client.modelManager.checkoutWithCart(cart)
client.createCheckout(checkout) { (checkout, error) -> Void in
if let checkoutURL = checkout?.webCheckoutURL {
if (UIApplication.sharedApplication().canOpenURL(checkoutURL)) {
UIApplication.sharedApplication().openURL(checkoutURL)
}
}
}
}
}
# Mobile Buy SDK Sample Swift App
The Swift sample app demonstrates how to use the SDK within a Swift app. The app includes an Objective-C bridging header.
### Getting started
First, add your shop domain, API key and App ID to the `Config.swift`.
```swift
let shopDomain = ""
let apiKey = ""
let appId = ""
let productId = ""
```
### Overview
The sample app also demonstrates how to use the `BUYClient` to obtain a product by calling `getProductById()`.
```swift
client.getProductById(productId) { (product, error) -> Void in
}
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment