Compare commits

...

12 Commits

Author SHA1 Message Date
Matthew Palmer f086127b46 Add links to Apple's docs
Fixes #78
2015-10-04 09:30:17 +11:00
matthewpalmer b36864e1da Bump version number. Fixes #77 2015-10-04 09:08:31 +11:00
matthewpalmer ecd63efd8b Bump to 2.0.2 2015-09-27 19:32:52 +10:00
matthewpalmer f3afe2d968 Merge branch 'jankase-master' into version-2.0.2
* jankase-master:
  fixed crash when store is empty
2015-09-27 19:31:21 +10:00
Jan Kase b096465a33 fixed crash when store is empty 2015-09-26 16:17:19 +02:00
Jan Kase 157e4531f1 Merge commit '3b2523e89e6c84c05386517183fa7b6c43ddbf50' 2015-09-26 16:09:57 +02:00
Matthew Palmer 3b2523e89e Merge pull request #67 from hermanolsson/master
Add umbrella header to all three targets.
2015-09-22 07:33:57 +10:00
Herman Olsson a8a1abca7b Add umbrella header to all three targets. 2015-09-21 17:10:07 +02:00
matthewpalmer eb4d2f8351 Merge branch 'tucali-LocksmithExample'
* tucali-LocksmithExample:
  Simplify example project
  Added basic iOS and wOS example.
2015-09-13 08:43:12 +10:00
matthewpalmer f7b5ee5c57 Simplify example project 2015-09-13 08:42:55 +10:00
Tai Heng c6af051213 Added basic iOS and wOS example. 2015-09-12 11:12:30 +01:00
Jan Kaše cbcada16dc Merge pull request #2 from matthewpalmer/master
update
2015-09-08 16:40:14 +02:00
17 changed files with 603 additions and 43 deletions
@@ -0,0 +1 @@
Did you know that git does not support storing empty directories?
@@ -0,0 +1,11 @@
//
// ExtensionDelegate.swift
// Locksmith Extension
//
// Created by Tai Heng on 12/09/2015.
// Copyright © 2015 Matthew Palmer. All rights reserved.
//
import WatchKit
class ExtensionDelegate: NSObject, WKExtensionDelegate {}
@@ -0,0 +1,40 @@
<?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>CFBundleDisplayName</key>
<string>Locksmith Extension</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>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>WKAppBundleIdentifier</key>
<string>net.matthewpalmer.Locksmith-iOS-Example.watchkitapp</string>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.watchkit</string>
</dict>
<key>RemoteInterfacePrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).InterfaceController</string>
<key>WKExtensionDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).ExtensionDelegate</string>
</dict>
</plist>
@@ -0,0 +1,51 @@
//
// InterfaceController.swift
// LocksmithExample WatchKit Extension
//
// Created by Tai Heng on 05/09/2015.
// Copyright © 2015 matthewpalmer. All rights reserved.
//
import WatchKit
import Foundation
import Locksmith
import WatchConnectivity
class InterfaceController: WKInterfaceController, WCSessionDelegate {
override func willActivate() {
// This method is called when watch view controller is about to be visible to user
super.willActivate()
if (WCSession.isSupported()) {
let session = WCSession.defaultSession()
session.delegate = self
session.activateSession()
}
struct TwitterAccount: ReadableSecureStorable, CreateableSecureStorable, DeleteableSecureStorable, GenericPasswordSecureStorable {
let username: String
let password: String
let service = "Twitter"
var account: String { return username }
var data: [String: AnyObject] {
return ["password": password]
}
}
let account = TwitterAccount(username: "_matthewpalmer", password: "my_password")
// CreateableSecureStorable lets us create the account in the keychain
try! account.createInSecureStore()
// ReadableSecureStorable lets us read the account from the keychain
let result = account.readFromSecureStore()
print("Watch app: \(result), \(result?.data)")
// DeleteableSecureStorable lets us delete the account from the keychain
try! account.deleteFromSecureStore()
}
}
@@ -7,15 +7,62 @@
objects = {
/* Begin PBXBuildFile section */
056F2A731BA42E3C00B24B65 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 056F2A711BA42E3C00B24B65 /* Interface.storyboard */; };
056F2A751BA42E3C00B24B65 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 056F2A741BA42E3C00B24B65 /* Assets.xcassets */; };
056F2A7C1BA42E3C00B24B65 /* Locksmith Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 056F2A7B1BA42E3C00B24B65 /* Locksmith Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
056F2A811BA42E3C00B24B65 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 056F2A801BA42E3C00B24B65 /* InterfaceController.swift */; };
056F2A831BA42E3C00B24B65 /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 056F2A821BA42E3C00B24B65 /* ExtensionDelegate.swift */; };
056F2A851BA42E3C00B24B65 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 056F2A841BA42E3C00B24B65 /* Assets.xcassets */; };
056F2A891BA42E3C00B24B65 /* Locksmith.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 056F2A6F1BA42E3C00B24B65 /* Locksmith.app */; };
056F2A941BA42FFC00B24B65 /* Locksmith.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 056F2A931BA42FFC00B24B65 /* Locksmith.framework */; };
056F2A961BA4300700B24B65 /* Locksmith.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 056F2A951BA4300700B24B65 /* Locksmith.framework */; };
0E13A9A41BA3EE8700A06FF9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E13A9A31BA3EE8700A06FF9 /* AppDelegate.swift */; };
0E13A9A61BA3EE8700A06FF9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E13A9A51BA3EE8700A06FF9 /* ViewController.swift */; };
0E13A9A91BA3EE8700A06FF9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E13A9A71BA3EE8700A06FF9 /* Main.storyboard */; };
0E13A9AB1BA3EE8700A06FF9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0E13A9AA1BA3EE8700A06FF9 /* Assets.xcassets */; };
0E13A9AE1BA3EE8700A06FF9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E13A9AC1BA3EE8700A06FF9 /* LaunchScreen.storyboard */; };
0E13A9B81BA3EFFA00A06FF9 /* Locksmith.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E13A9B71BA3EFFA00A06FF9 /* Locksmith.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
056F2A7D1BA42E3C00B24B65 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0E13A9981BA3EE8600A06FF9 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 056F2A7A1BA42E3C00B24B65;
remoteInfo = "Locksmith Extension";
};
056F2A871BA42E3C00B24B65 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0E13A9981BA3EE8600A06FF9 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 056F2A6E1BA42E3C00B24B65;
remoteInfo = Locksmith;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
056F2A8F1BA42E3C00B24B65 /* Embed App Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
056F2A7C1BA42E3C00B24B65 /* Locksmith Extension.appex in Embed App Extensions */,
);
name = "Embed App Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
056F2A911BA42E3C00B24B65 /* Embed Watch Content */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "$(CONTENTS_FOLDER_PATH)/Watch";
dstSubfolderSpec = 16;
files = (
056F2A891BA42E3C00B24B65 /* Locksmith.app in Embed Watch Content */,
);
name = "Embed Watch Content";
runOnlyForDeploymentPostprocessing = 0;
};
0E13A9BA1BA3F03D00A06FF9 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
@@ -28,6 +75,17 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
056F2A6F1BA42E3C00B24B65 /* Locksmith.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Locksmith.app; sourceTree = BUILT_PRODUCTS_DIR; };
056F2A721BA42E3C00B24B65 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = "<group>"; };
056F2A741BA42E3C00B24B65 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
056F2A761BA42E3C00B24B65 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
056F2A7B1BA42E3C00B24B65 /* Locksmith Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Locksmith Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
056F2A801BA42E3C00B24B65 /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = "<group>"; };
056F2A821BA42E3C00B24B65 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = "<group>"; };
056F2A841BA42E3C00B24B65 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
056F2A861BA42E3C00B24B65 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
056F2A931BA42FFC00B24B65 /* Locksmith.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Locksmith.framework; path = "../../build/Debug-iphoneos/Locksmith.framework"; sourceTree = "<group>"; };
056F2A951BA4300700B24B65 /* Locksmith.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Locksmith.framework; path = "../../build/Debug-watchos/Locksmith.framework"; sourceTree = "<group>"; };
0E13A9A01BA3EE8700A06FF9 /* Locksmith iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Locksmith iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
0E13A9A31BA3EE8700A06FF9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
0E13A9A51BA3EE8700A06FF9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -35,27 +93,64 @@
0E13A9AA1BA3EE8700A06FF9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
0E13A9AD1BA3EE8700A06FF9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
0E13A9AF1BA3EE8700A06FF9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0E13A9B71BA3EFFA00A06FF9 /* Locksmith.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Locksmith.framework; path = "../build/Debug-iphoneos/Locksmith.framework"; sourceTree = "<group>"; };
15FCF62F6935D11C671F41FF /* Pods_app.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_app.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1D62CFE6D2814693AE03CF5C /* Pods_watch.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_watch.framework; sourceTree = BUILT_PRODUCTS_DIR; };
379DD1E5C8CDE5ABD6E50A38 /* Pods-watch.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-watch.release.xcconfig"; path = "Pods/Target Support Files/Pods-watch/Pods-watch.release.xcconfig"; sourceTree = "<group>"; };
74E67F961D2CBE4F8D171223 /* Pods-watch.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-watch.debug.xcconfig"; path = "Pods/Target Support Files/Pods-watch/Pods-watch.debug.xcconfig"; sourceTree = "<group>"; };
8D5C601685F38F2EA6AA2CA0 /* Pods-app.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.release.xcconfig"; path = "Pods/Target Support Files/Pods-app/Pods-app.release.xcconfig"; sourceTree = "<group>"; };
FFB6EBF2507E751B53E55514 /* Pods-app.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.debug.xcconfig"; path = "Pods/Target Support Files/Pods-app/Pods-app.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
056F2A781BA42E3C00B24B65 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
056F2A961BA4300700B24B65 /* Locksmith.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
0E13A99D1BA3EE8700A06FF9 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0E13A9B81BA3EFFA00A06FF9 /* Locksmith.framework in Frameworks */,
056F2A941BA42FFC00B24B65 /* Locksmith.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
056F2A701BA42E3C00B24B65 /* Locksmith */ = {
isa = PBXGroup;
children = (
056F2A711BA42E3C00B24B65 /* Interface.storyboard */,
056F2A741BA42E3C00B24B65 /* Assets.xcassets */,
056F2A761BA42E3C00B24B65 /* Info.plist */,
);
path = Locksmith;
sourceTree = "<group>";
};
056F2A7F1BA42E3C00B24B65 /* Locksmith Extension */ = {
isa = PBXGroup;
children = (
056F2A801BA42E3C00B24B65 /* InterfaceController.swift */,
056F2A821BA42E3C00B24B65 /* ExtensionDelegate.swift */,
056F2A841BA42E3C00B24B65 /* Assets.xcassets */,
056F2A861BA42E3C00B24B65 /* Info.plist */,
);
path = "Locksmith Extension";
sourceTree = "<group>";
};
0E13A9971BA3EE8600A06FF9 = {
isa = PBXGroup;
children = (
0E13A9B71BA3EFFA00A06FF9 /* Locksmith.framework */,
0E13A9A21BA3EE8700A06FF9 /* Locksmith iOS Example */,
056F2A701BA42E3C00B24B65 /* Locksmith */,
056F2A7F1BA42E3C00B24B65 /* Locksmith Extension */,
0E13A9A11BA3EE8700A06FF9 /* Products */,
74B88A8534E794C2027D6B3D /* Pods */,
D1E3110F9ED1A0EE737E7A37 /* Frameworks */,
);
sourceTree = "<group>";
};
@@ -63,6 +158,8 @@
isa = PBXGroup;
children = (
0E13A9A01BA3EE8700A06FF9 /* Locksmith iOS Example.app */,
056F2A6F1BA42E3C00B24B65 /* Locksmith.app */,
056F2A7B1BA42E3C00B24B65 /* Locksmith Extension.appex */,
);
name = Products;
sourceTree = "<group>";
@@ -80,9 +177,65 @@
path = "Locksmith iOS Example";
sourceTree = "<group>";
};
74B88A8534E794C2027D6B3D /* Pods */ = {
isa = PBXGroup;
children = (
FFB6EBF2507E751B53E55514 /* Pods-app.debug.xcconfig */,
8D5C601685F38F2EA6AA2CA0 /* Pods-app.release.xcconfig */,
74E67F961D2CBE4F8D171223 /* Pods-watch.debug.xcconfig */,
379DD1E5C8CDE5ABD6E50A38 /* Pods-watch.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
D1E3110F9ED1A0EE737E7A37 /* Frameworks */ = {
isa = PBXGroup;
children = (
056F2A951BA4300700B24B65 /* Locksmith.framework */,
056F2A931BA42FFC00B24B65 /* Locksmith.framework */,
15FCF62F6935D11C671F41FF /* Pods_app.framework */,
1D62CFE6D2814693AE03CF5C /* Pods_watch.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
056F2A6E1BA42E3C00B24B65 /* Locksmith */ = {
isa = PBXNativeTarget;
buildConfigurationList = 056F2A901BA42E3C00B24B65 /* Build configuration list for PBXNativeTarget "Locksmith" */;
buildPhases = (
056F2A6D1BA42E3C00B24B65 /* Resources */,
056F2A8F1BA42E3C00B24B65 /* Embed App Extensions */,
);
buildRules = (
);
dependencies = (
056F2A7E1BA42E3C00B24B65 /* PBXTargetDependency */,
);
name = Locksmith;
productName = Locksmith;
productReference = 056F2A6F1BA42E3C00B24B65 /* Locksmith.app */;
productType = "com.apple.product-type.application.watchapp2";
};
056F2A7A1BA42E3C00B24B65 /* Locksmith Extension */ = {
isa = PBXNativeTarget;
buildConfigurationList = 056F2A8E1BA42E3C00B24B65 /* Build configuration list for PBXNativeTarget "Locksmith Extension" */;
buildPhases = (
056F2A771BA42E3C00B24B65 /* Sources */,
056F2A781BA42E3C00B24B65 /* Frameworks */,
056F2A791BA42E3C00B24B65 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Locksmith Extension";
productName = "Locksmith Extension";
productReference = 056F2A7B1BA42E3C00B24B65 /* Locksmith Extension.appex */;
productType = "com.apple.product-type.watchkit2-extension";
};
0E13A99F1BA3EE8700A06FF9 /* Locksmith iOS Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 0E13A9B21BA3EE8700A06FF9 /* Build configuration list for PBXNativeTarget "Locksmith iOS Example" */;
@@ -91,10 +244,12 @@
0E13A99D1BA3EE8700A06FF9 /* Frameworks */,
0E13A99E1BA3EE8700A06FF9 /* Resources */,
0E13A9BA1BA3F03D00A06FF9 /* CopyFiles */,
056F2A911BA42E3C00B24B65 /* Embed Watch Content */,
);
buildRules = (
);
dependencies = (
056F2A881BA42E3C00B24B65 /* PBXTargetDependency */,
);
name = "Locksmith iOS Example";
productName = "Locksmith iOS Example";
@@ -110,6 +265,12 @@
LastUpgradeCheck = 0700;
ORGANIZATIONNAME = "Matthew Palmer";
TargetAttributes = {
056F2A6E1BA42E3C00B24B65 = {
CreatedOnToolsVersion = 7.0;
};
056F2A7A1BA42E3C00B24B65 = {
CreatedOnToolsVersion = 7.0;
};
0E13A99F1BA3EE8700A06FF9 = {
CreatedOnToolsVersion = 7.0;
};
@@ -129,11 +290,30 @@
projectRoot = "";
targets = (
0E13A99F1BA3EE8700A06FF9 /* Locksmith iOS Example */,
056F2A6E1BA42E3C00B24B65 /* Locksmith */,
056F2A7A1BA42E3C00B24B65 /* Locksmith Extension */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
056F2A6D1BA42E3C00B24B65 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
056F2A751BA42E3C00B24B65 /* Assets.xcassets in Resources */,
056F2A731BA42E3C00B24B65 /* Interface.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
056F2A791BA42E3C00B24B65 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
056F2A851BA42E3C00B24B65 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
0E13A99E1BA3EE8700A06FF9 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -147,6 +327,15 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
056F2A771BA42E3C00B24B65 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
056F2A831BA42E3C00B24B65 /* ExtensionDelegate.swift in Sources */,
056F2A811BA42E3C00B24B65 /* InterfaceController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
0E13A99C1BA3EE8700A06FF9 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -158,7 +347,28 @@
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
056F2A7E1BA42E3C00B24B65 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 056F2A7A1BA42E3C00B24B65 /* Locksmith Extension */;
targetProxy = 056F2A7D1BA42E3C00B24B65 /* PBXContainerItemProxy */;
};
056F2A881BA42E3C00B24B65 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 056F2A6E1BA42E3C00B24B65 /* Locksmith */;
targetProxy = 056F2A871BA42E3C00B24B65 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
056F2A711BA42E3C00B24B65 /* Interface.storyboard */ = {
isa = PBXVariantGroup;
children = (
056F2A721BA42E3C00B24B65 /* Base */,
);
name = Interface.storyboard;
sourceTree = "<group>";
};
0E13A9A71BA3EE8700A06FF9 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
@@ -178,6 +388,68 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
056F2A8A1BA42E3C00B24B65 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
IBSC_MODULE = Locksmith_Extension;
INFOPLIST_FILE = Locksmith/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "net.matthewpalmer.Locksmith-iOS-Example.watchkitapp";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
name = Debug;
};
056F2A8B1BA42E3C00B24B65 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
IBSC_MODULE = Locksmith_Extension;
INFOPLIST_FILE = Locksmith/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = "net.matthewpalmer.Locksmith-iOS-Example.watchkitapp";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
name = Release;
};
056F2A8C1BA42E3C00B24B65 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 74E67F961D2CBE4F8D171223 /* Pods-watch.debug.xcconfig */;
buildSettings = {
INFOPLIST_FILE = "Locksmith Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.matthewpalmer.Locksmith-iOS-Example.watchkitapp.watchkitextension";
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
name = Debug;
};
056F2A8D1BA42E3C00B24B65 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 379DD1E5C8CDE5ABD6E50A38 /* Pods-watch.release.xcconfig */;
buildSettings = {
INFOPLIST_FILE = "Locksmith Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.matthewpalmer.Locksmith-iOS-Example.watchkitapp.watchkitextension";
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
name = Release;
};
0E13A9B01BA3EE8700A06FF9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -263,6 +535,7 @@
};
0E13A9B31BA3EE8700A06FF9 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FFB6EBF2507E751B53E55514 /* Pods-app.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = "Locksmith iOS Example/Info.plist";
@@ -275,6 +548,7 @@
};
0E13A9B41BA3EE8700A06FF9 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8D5C601685F38F2EA6AA2CA0 /* Pods-app.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = "Locksmith iOS Example/Info.plist";
@@ -288,6 +562,24 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
056F2A8E1BA42E3C00B24B65 /* Build configuration list for PBXNativeTarget "Locksmith Extension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
056F2A8C1BA42E3C00B24B65 /* Debug */,
056F2A8D1BA42E3C00B24B65 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
056F2A901BA42E3C00B24B65 /* Build configuration list for PBXNativeTarget "Locksmith" */ = {
isa = XCConfigurationList;
buildConfigurations = (
056F2A8A1BA42E3C00B24B65 /* Debug */,
056F2A8B1BA42E3C00B24B65 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
0E13A99B1BA3EE8600A06FF9 /* Build configuration list for PBXProject "Locksmith iOS Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
@@ -11,19 +11,17 @@ import Locksmith
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
struct TwitterAccount: ReadableSecureStorable,
CreateableSecureStorable,
DeleteableSecureStorable,
GenericPasswordSecureStorable {
struct TwitterAccount: ReadableSecureStorable, CreateableSecureStorable, DeleteableSecureStorable, GenericPasswordSecureStorable {
let username: String
let password: String
let service = "Twitter"
var account: String { return username }
var data: [String: AnyObject] {
return ["password": password]
}
@@ -37,7 +35,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// ReadableSecureStorable lets us read the account from the keychain
let result = account.readFromSecureStore()
print("Result: \(result) \(result?.data)")
print("iOS app: \(result), \(result?.data)")
// DeleteableSecureStorable lets us delete the account from the keychain
try! account.deleteFromSecureStore()
@@ -1,40 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8173.3" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8173.3" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="kvZ-1V-3wx">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8142"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<!--Locksmith Example-->
<scene sceneID="DFV-sl-Fly">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="Locksmith_iOS_Example" customModuleProvider="target" sceneMemberID="viewController">
<viewController title="Locksmith Example" id="kvZ-1V-3wx" customClass="ViewController" customModule="Locksmith_iOS_Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
<viewControllerLayoutGuide type="top" id="Jdi-8X-X7l"/>
<viewControllerLayoutGuide type="bottom" id="xfR-hD-RHw"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<view key="view" contentMode="scaleToFill" id="tK0-bv-krV">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Locksmith Example—see AppDelegate.swift" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mhD-FU-PNz">
<rect key="frame" x="132" y="289" width="337" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="mhD-FU-PNz" secondAttribute="bottom" constant="290" id="0ha-lJ-FNO"/>
<constraint firstItem="mhD-FU-PNz" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="112" id="3eM-ve-Fq1"/>
<constraint firstItem="mhD-FU-PNz" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="269" id="ZCS-J6-lWh"/>
<constraint firstAttribute="trailingMargin" secondItem="mhD-FU-PNz" secondAttribute="trailing" constant="111" id="o19-IS-K4H"/>
</constraints>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="zND-74-PgH" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="347" y="447"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,62 @@
{
"images" : [
{
"size" : "24x24",
"idiom" : "watch",
"scale" : "2x",
"role" : "notificationCenter",
"subtype" : "38mm"
},
{
"size" : "27.5x27.5",
"idiom" : "watch",
"scale" : "2x",
"role" : "notificationCenter",
"subtype" : "42mm"
},
{
"size" : "29x29",
"idiom" : "watch",
"role" : "companionSettings",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "watch",
"role" : "companionSettings",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "watch",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "38mm"
},
{
"size" : "44x44",
"idiom" : "watch",
"scale" : "2x",
"role" : "longLook",
"subtype" : "42mm"
},
{
"size" : "86x86",
"idiom" : "watch",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "38mm"
},
{
"size" : "98x98",
"idiom" : "watch",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "42mm"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="8173.3" systemVersion="14F27" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="AgC-eL-Hgc">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8142"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="8089"/>
</dependencies>
<scenes>
<!--Interface Controller-->
<scene sceneID="aou-V4-d1y">
<objects>
<controller id="AgC-eL-Hgc" customClass="InterfaceController" customModule="Locksmith" customModuleProvider="target">
<items>
<label width="136" alignment="left" text="Locksmith" id="0hb-l0-xFa"/>
</items>
</controller>
</objects>
<point key="canvasLocation" x="220" y="345"/>
</scene>
<!--Static Notification Interface Controller-->
<scene sceneID="AEw-b0-oYE">
<objects>
<notificationController id="YCC-NB-fut">
<items>
<label alignment="left" text="Alert Label" id="IdU-wH-bcW"/>
</items>
<notificationCategory key="notificationCategory" identifier="myCategory" id="JfB-70-Muf"/>
<connections>
<outlet property="notificationAlertLabel" destination="IdU-wH-bcW" id="JKC-fr-R95"/>
<segue destination="4sK-HA-Art" kind="relationship" relationship="dynamicNotificationInterface" id="kXh-Jw-8B1"/>
</connections>
</notificationController>
</objects>
<point key="canvasLocation" x="220" y="643"/>
</scene>
<!--Notification Controller-->
<scene sceneID="ZPc-GJ-vnh">
<objects>
<controller id="4sK-HA-Art" customClass="NotificationController" customModule="Locksmith" customModuleProvider="target"/>
</objects>
<point key="canvasLocation" x="468" y="643"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,35 @@
<?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>CFBundleDisplayName</key>
<string>Locksmith iOS Example</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.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>WKCompanionAppBundleIdentifier</key>
<string>net.matthewpalmer.Locksmith-iOS-Example</string>
<key>WKWatchKitApp</key>
<true/>
</dict>
</plist>
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Locksmith"
s.version = "2.0.1"
s.version = "2.0.2"
s.summary = "Locksmith is a powerful, protocol-oriented library for working with the keychain in Swift."
s.description = <<-DESC
Locksmith is a powerful, protocol-oriented library for working with the iOS, Mac OS X, watchOS, and tvOS keychain in Swift. It provides extensive support for a lot of different keychain requests, and extensively uses Swift-native concepts.
+23
View File
@@ -7,6 +7,13 @@
objects = {
/* Begin PBXBuildFile section */
056F2A971BA4316700B24B65 /* Dictionary_Initializers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC25C401BA38539004191AF /* Dictionary_Initializers.swift */; settings = {ASSET_TAGS = (); }; };
056F2A981BA4316700B24B65 /* Locksmith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC25C421BA38539004191AF /* Locksmith.swift */; settings = {ASSET_TAGS = (); }; };
056F2A991BA4316700B24B65 /* LocksmithAccessibleOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC25C431BA38539004191AF /* LocksmithAccessibleOption.swift */; settings = {ASSET_TAGS = (); }; };
056F2A9A1BA4316700B24B65 /* LocksmithError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC25C441BA38539004191AF /* LocksmithError.swift */; settings = {ASSET_TAGS = (); }; };
056F2A9B1BA4316700B24B65 /* LocksmithInternetAuthenticationType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC25C451BA38539004191AF /* LocksmithInternetAuthenticationType.swift */; settings = {ASSET_TAGS = (); }; };
056F2A9C1BA4316700B24B65 /* LocksmithInternetProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC25C461BA38539004191AF /* LocksmithInternetProtocol.swift */; settings = {ASSET_TAGS = (); }; };
056F2A9D1BA4316700B24B65 /* LocksmithSecurityClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC25C471BA38539004191AF /* LocksmithSecurityClass.swift */; settings = {ASSET_TAGS = (); }; };
0EC25C631BA385AB004191AF /* Locksmith.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EC25C591BA385AA004191AF /* Locksmith.framework */; };
0EC25C7F1BA385F6004191AF /* Locksmith.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EC25C751BA385F6004191AF /* Locksmith.framework */; };
0EC25C8D1BA38648004191AF /* LocksmithTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC25C491BA38539004191AF /* LocksmithTests.swift */; };
@@ -26,6 +33,9 @@
0EC25C9B1BA38662004191AF /* LocksmithSecurityClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC25C471BA38539004191AF /* LocksmithSecurityClass.swift */; };
0EC25C9C1BA38663004191AF /* LocksmithSecurityClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC25C471BA38539004191AF /* LocksmithSecurityClass.swift */; };
0EC25C9F1BA389CB004191AF /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 0EC25C9E1BA389CB004191AF /* Info.plist */; };
DF6BD4B91BB0524500A3EB64 /* Locksmith.h in Headers */ = {isa = PBXBuildFile; fileRef = DF6BD4B61BB051ED00A3EB64 /* Locksmith.h */; settings = {ATTRIBUTES = (Public, ); }; };
DF6BD4BC1BB054CB00A3EB64 /* Locksmith.h in Headers */ = {isa = PBXBuildFile; fileRef = DF6BD4B61BB051ED00A3EB64 /* Locksmith.h */; settings = {ATTRIBUTES = (Public, ); }; };
DF6BD4BD1BB054D400A3EB64 /* Locksmith.h in Headers */ = {isa = PBXBuildFile; fileRef = DF6BD4B61BB051ED00A3EB64 /* Locksmith.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -61,6 +71,7 @@
0EC25C9D1BA389BD004191AF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0EC25C9E1BA389CB004191AF /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0EC25CA71BA39C9F004191AF /* Locksmith.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Locksmith.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DF6BD4B61BB051ED00A3EB64 /* Locksmith.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Locksmith.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -108,6 +119,7 @@
isa = PBXGroup;
children = (
0EC25C401BA38539004191AF /* Dictionary_Initializers.swift */,
DF6BD4B61BB051ED00A3EB64 /* Locksmith.h */,
0EC25C421BA38539004191AF /* Locksmith.swift */,
0EC25C431BA38539004191AF /* LocksmithAccessibleOption.swift */,
0EC25C441BA38539004191AF /* LocksmithError.swift */,
@@ -172,6 +184,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
DF6BD4BD1BB054D400A3EB64 /* Locksmith.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -179,6 +192,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
DF6BD4BC1BB054CB00A3EB64 /* Locksmith.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -186,6 +200,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
DF6BD4B91BB0524500A3EB64 /* Locksmith.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -418,6 +433,13 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
056F2A991BA4316700B24B65 /* LocksmithAccessibleOption.swift in Sources */,
056F2A9D1BA4316700B24B65 /* LocksmithSecurityClass.swift in Sources */,
056F2A981BA4316700B24B65 /* Locksmith.swift in Sources */,
056F2A971BA4316700B24B65 /* Dictionary_Initializers.swift in Sources */,
056F2A9A1BA4316700B24B65 /* LocksmithError.swift in Sources */,
056F2A9B1BA4316700B24B65 /* LocksmithInternetAuthenticationType.swift in Sources */,
056F2A9C1BA4316700B24B65 /* LocksmithInternetProtocol.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -762,6 +784,7 @@
0EC25CAD1BA39CA0004191AF /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
BFFB19CA1A4870A300CCFFC3 /* Build configuration list for PBXProject "Locksmith" */ = {
isa = XCConfigurationList;
+3 -3
View File
@@ -365,7 +365,7 @@ public enum LocksmithAccessibleOption {
#### `LocksmithError`
`LocksmithError` provides Swift-friendly translations of common keychain error codes. These are thrown from methods throughout the library.
`LocksmithError` provides Swift-friendly translations of common keychain error codes. These are thrown from methods throughout the library. [Apples documentation](https://developer.apple.com/library/ios/documentation/Security/Reference/keychainservices/#//apple_ref/c/econst/errSecSuccess) provides more information on these errors.
```swift
public enum LocksmithError: ErrorType {
@@ -388,7 +388,7 @@ public enum LocksmithError: ErrorType {
#### `LocksmithInternetAuthenticationType`
`LocksmithInternetAuthenticationType` lets you pick out the type of authentication you want to store alongside your `.InternetPassword`s—anything from `.MSN` to `.HTTPDigest`.
`LocksmithInternetAuthenticationType` lets you pick out the type of authentication you want to store alongside your `.InternetPassword`s—anything from `.MSN` to `.HTTPDigest`. [Apples documentation](https://developer.apple.com/library/ios/documentation/Security/Reference/keychainservices/#//apple_ref/doc/constant_group/Authentication_Type_Values) provides more information on these values.
```swift
public enum LocksmithInternetAuthenticationType {
@@ -405,7 +405,7 @@ public enum LocksmithInternetAuthenticationType {
#### `LocksmithInternetProtocol`
`LocksmithInternetProtocol` is used with `.InternetPassword` to choose which protocol was used for the interaction with the web service, including `.HTTP`, `.SMB`, and a whole bunch more.
`LocksmithInternetProtocol` is used with `.InternetPassword` to choose which protocol was used for the interaction with the web service, including `.HTTP`, `.SMB`, and a whole bunch more. [Apples documentation](https://developer.apple.com/library/ios/documentation/Security/Reference/keychainservices/#//apple_ref/doc/constant_group/Protocol_Values) provides more information on these values.
```swift
public enum {
+1 -1
View File
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>2.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
+4
View File
@@ -0,0 +1,4 @@
#import <Foundation/Foundation.h>
FOUNDATION_EXPORT double LocksmithVersionNumber;
FOUNDATION_EXPORT const unsigned char LocksmithVersionString[];
+10 -4
View File
@@ -474,8 +474,11 @@ struct GenericPasswordResult: GenericPasswordSecureStorableResultType {
public extension ReadableSecureStorable where Self : GenericPasswordSecureStorable {
func readFromSecureStore() -> GenericPasswordSecureStorableResultType? {
do {
let result = try performSecureStorageAction(performReadRequestClosure, secureStoragePropertyDictionary: asReadableSecureStoragePropertyDictionary)
return GenericPasswordResult(resultDictionary: result!)
if let result = try performSecureStorageAction(performReadRequestClosure, secureStoragePropertyDictionary: asReadableSecureStoragePropertyDictionary) {
return GenericPasswordResult(resultDictionary: result)
} else {
return nil
}
} catch {
print(error)
return nil
@@ -486,8 +489,11 @@ public extension ReadableSecureStorable where Self : GenericPasswordSecureStorab
public extension ReadableSecureStorable where Self : InternetPasswordSecureStorable {
func readFromSecureStore() -> InternetPasswordSecureStorableResultType? {
do {
let result = try performSecureStorageAction(performReadRequestClosure, secureStoragePropertyDictionary: asReadableSecureStoragePropertyDictionary)
return InternetPasswordResult(resultDictionary: result!)
if let result = try performSecureStorageAction(performReadRequestClosure, secureStoragePropertyDictionary: asReadableSecureStoragePropertyDictionary) {
return InternetPasswordResult(resultDictionary: result)
} else {
return nil
}
} catch {
print(error)
return nil