Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ca70968264 | |||
| 8017ad0d4e | |||
| e77cffad00 | |||
| 8d825ab368 | |||
| fb4030034d | |||
| 8f21125a77 | |||
| 3d6ce4d5f0 | |||
| 4caf3e99b4 | |||
| d04d2fe9b7 | |||
| 440de6f490 | |||
| 658233b596 | |||
| 4246e19952 | |||
| b988530bce | |||
| 73d14afcfa |
+1
-1
@@ -2,7 +2,7 @@
|
||||
# * http://www.objc.io/issue-6/travis-ci.html
|
||||
# * https://github.com/supermarin/xcpretty#usage
|
||||
|
||||
language: objective-c
|
||||
language: swift
|
||||
# cache: cocoapods
|
||||
# podfile: Example/Podfile
|
||||
# before_install:
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
|
||||
use_frameworks!
|
||||
|
||||
platform :ios, '8.0'
|
||||
|
||||
target 'Locksmith', :exclusive => true do
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
PODS:
|
||||
- Expecta (0.3.1)
|
||||
- Locksmith (1.2.0)
|
||||
- Locksmith (1.2.1)
|
||||
- Specta (0.2.1)
|
||||
|
||||
DEPENDENCIES:
|
||||
@@ -10,11 +10,11 @@ DEPENDENCIES:
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Locksmith:
|
||||
:path: ../
|
||||
:path: "../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Expecta: 03aabd0a89d8dea843baecb19a7fd7466a69a31d
|
||||
Locksmith: 392ae330eb455e824dab5b714b6719eb29ef5038
|
||||
Specta: 9141310f46b1f68b676650ff2854e1ed0b74163a
|
||||
Expecta: a354d4633409dd9fe8c4f5ff5130426adbe31628
|
||||
Locksmith: 770f6c5c6e5c5c712d1f00e709c62b8a7240c716
|
||||
Specta: 15a276a6343867b426d5ed135d5aa4d04123a573
|
||||
|
||||
COCOAPODS: 0.36.0.beta.1
|
||||
COCOAPODS: 0.36.3
|
||||
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
#
|
||||
# Be sure to run `pod lib lint Locksmith.podspec' to ensure this is a
|
||||
# valid spec and remove all comments before submitting the spec.
|
||||
#
|
||||
# Any lines starting with a # are optional, but encouraged
|
||||
#
|
||||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
|
||||
#
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "Locksmith"
|
||||
s.version = "1.2.0"
|
||||
s.summary = "Locksmith is a sane way to work with the iOS Keychain in Swift."
|
||||
s.description = <<-DESC
|
||||
Locksmith is a sane way to work with the iOS Keychain in Swift.
|
||||
It provides a fast and intuitive way to work with the C Keychain API.
|
||||
Results are provided as tuples, and errors are informative and easily detected.
|
||||
DESC
|
||||
s.homepage = "https://github.com/matthewpalmer/Locksmith"
|
||||
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
|
||||
s.license = 'MIT'
|
||||
s.author = { "matthewpalmer" => "matt@matthewpalmer.net" }
|
||||
s.source = { :git => "https://github.com/matthewpalmer/Locksmith.git", :tag => s.version.to_s }
|
||||
s.social_media_url = 'https://twitter.com/_matthewpalmer'
|
||||
|
||||
s.platform = :ios, '8.0'
|
||||
s.requires_arc = true
|
||||
|
||||
s.source_files = 'Pod/Classes'
|
||||
s.resource_bundles = {
|
||||
'Locksmith' => ['Pod/Assets/*.png']
|
||||
}
|
||||
|
||||
# s.public_header_files = 'Pod/Classes/**/*.h'
|
||||
# s.frameworks = 'UIKit', 'MapKit'
|
||||
# s.dependency 'AFNetworking', '~> 2.3'
|
||||
end
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Locksmith",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.1",
|
||||
"summary": "Locksmith is a sane way to work with the iOS Keychain in Swift.",
|
||||
"description": " Locksmith is a sane way to work with the iOS Keychain in Swift.\n It provides a fast and intuitive way to work with the C Keychain API.\n Results are provided as tuples, and errors are informative and easily detected.\n",
|
||||
"homepage": "https://github.com/matthewpalmer/Locksmith",
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"source": {
|
||||
"git": "https://github.com/matthewpalmer/Locksmith.git",
|
||||
"tag": "1.2.0"
|
||||
"tag": "1.2.1"
|
||||
},
|
||||
"social_media_url": "https://twitter.com/_matthewpalmer",
|
||||
"platforms": {
|
||||
|
||||
Generated
+6
-6
@@ -1,6 +1,6 @@
|
||||
PODS:
|
||||
- Expecta (0.3.1)
|
||||
- Locksmith (1.2.0)
|
||||
- Locksmith (1.2.1)
|
||||
- Specta (0.2.1)
|
||||
|
||||
DEPENDENCIES:
|
||||
@@ -10,11 +10,11 @@ DEPENDENCIES:
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Locksmith:
|
||||
:path: ../
|
||||
:path: "../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Expecta: 03aabd0a89d8dea843baecb19a7fd7466a69a31d
|
||||
Locksmith: 392ae330eb455e824dab5b714b6719eb29ef5038
|
||||
Specta: 9141310f46b1f68b676650ff2854e1ed0b74163a
|
||||
Expecta: a354d4633409dd9fe8c4f5ff5130426adbe31628
|
||||
Locksmith: 770f6c5c6e5c5c712d1f00e709c62b8a7240c716
|
||||
Specta: 15a276a6343867b426d5ed135d5aa4d04123a573
|
||||
|
||||
COCOAPODS: 0.36.0.beta.1
|
||||
COCOAPODS: 0.36.3
|
||||
|
||||
+1746
-6151
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.2.0</string>
|
||||
<string>1.2.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
Example/Pods/Target Support Files/Pods-Locksmith-Locksmith/Pods-Locksmith-Locksmith-Private.xcconfig
Generated
+4
-3
@@ -3,7 +3,8 @@ CONFIGURATION_BUILD_DIR = $PODS_FRAMEWORK_BUILD_PATH
|
||||
FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Locksmith" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/Locksmith" "${PODS_ROOT}/Headers/Public/Specta"
|
||||
OTHER_LDFLAGS = -ObjC
|
||||
OTHER_SWIFT_FLAGS = "-D COCOAPODS"
|
||||
OTHER_LDFLAGS = ${PODS_LOCKSMITH_LOCKSMITH_OTHER_LDFLAGS} -ObjC
|
||||
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
|
||||
PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Locksmith
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
SKIP_INSTALL = YES
|
||||
Generated
+1
@@ -0,0 +1 @@
|
||||
PODS_LOCKSMITH_LOCKSMITH_OTHER_LDFLAGS = -framework "Security" -framework "UIKit"
|
||||
+1
-1
@@ -10,5 +10,5 @@
|
||||
#define COCOAPODS_POD_AVAILABLE_Locksmith
|
||||
#define COCOAPODS_VERSION_MAJOR_Locksmith 1
|
||||
#define COCOAPODS_VERSION_MINOR_Locksmith 2
|
||||
#define COCOAPODS_VERSION_PATCH_Locksmith 0
|
||||
#define COCOAPODS_VERSION_PATCH_Locksmith 1
|
||||
|
||||
|
||||
+7
-4
@@ -11,7 +11,7 @@ install_framework()
|
||||
local source="${BUILT_PRODUCTS_DIR}/Pods-Locksmith/$1"
|
||||
local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
||||
|
||||
if [ -L ${source} ]; then
|
||||
if [ -L "${source}" ]; then
|
||||
echo "Symlinked..."
|
||||
source=$(readlink "${source}")
|
||||
fi
|
||||
@@ -28,10 +28,13 @@ install_framework()
|
||||
local basename
|
||||
basename=$(echo $1 | sed -E s/\\..+// && exit ${PIPESTATUS[0]})
|
||||
local swift_runtime_libs
|
||||
swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/$1/${basename}" | grep @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
|
||||
swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/$1/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
|
||||
for lib in $swift_runtime_libs; do
|
||||
echo "rsync -av \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
|
||||
rsync -av "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
|
||||
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
|
||||
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
|
||||
if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then
|
||||
code_sign "${destination}/${lib}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
+6
-2
@@ -6,6 +6,8 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
||||
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
|
||||
> "$RESOURCES_TO_COPY"
|
||||
|
||||
XCASSET_FILES=""
|
||||
|
||||
install_resource()
|
||||
{
|
||||
case $1 in
|
||||
@@ -36,6 +38,7 @@ install_resource()
|
||||
xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm"
|
||||
;;
|
||||
*.xcassets)
|
||||
XCASSET_FILES="$XCASSET_FILES '${PODS_ROOT}/$1'"
|
||||
;;
|
||||
/*)
|
||||
echo "$1"
|
||||
@@ -54,7 +57,7 @@ if [[ "${ACTION}" == "install" ]]; then
|
||||
fi
|
||||
rm -f "$RESOURCES_TO_COPY"
|
||||
|
||||
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ]
|
||||
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ]
|
||||
then
|
||||
case "${TARGETED_DEVICE_FAMILY}" in
|
||||
1,2)
|
||||
@@ -70,5 +73,6 @@ then
|
||||
TARGET_DEVICE_ARGS="--target-device mac"
|
||||
;;
|
||||
esac
|
||||
find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
||||
while read line; do XCASSET_FILES="$XCASSET_FILES '$line'"; done <<<$(find "$PWD" -name "*.xcassets" | egrep -v "^$PODS_ROOT")
|
||||
echo $XCASSET_FILES | xargs actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
||||
fi
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
|
||||
OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/Locksmith.framework/Headers"
|
||||
OTHER_LDFLAGS = -ObjC -framework "Locksmith"
|
||||
OTHER_LDFLAGS = $(inherited) -ObjC -framework "Locksmith"
|
||||
OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
|
||||
OTHER_SWIFT_FLAGS = "-D COCOAPODS"
|
||||
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
|
||||
PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Locksmith
|
||||
PODS_ROOT = ${SRCROOT}/Pods
|
||||
+2
-2
@@ -2,8 +2,8 @@ FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
|
||||
OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/Locksmith.framework/Headers"
|
||||
OTHER_LDFLAGS = -ObjC -framework "Locksmith"
|
||||
OTHER_LDFLAGS = $(inherited) -ObjC -framework "Locksmith"
|
||||
OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
|
||||
OTHER_SWIFT_FLAGS = "-D COCOAPODS"
|
||||
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
|
||||
PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Locksmith
|
||||
PODS_ROOT = ${SRCROOT}/Pods
|
||||
+2
-1
@@ -5,4 +5,5 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Expecta" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/Locksmith" "${PODS_ROOT}/Headers/Public/Specta"
|
||||
OTHER_LDFLAGS = ${PODS_TESTS_EXPECTA_OTHER_LDFLAGS} -ObjC
|
||||
PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Tests
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
SKIP_INSTALL = YES
|
||||
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.2.0</string>
|
||||
<string>1.2.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
Generated
+4
-3
@@ -3,7 +3,8 @@ CONFIGURATION_BUILD_DIR = $PODS_FRAMEWORK_BUILD_PATH
|
||||
FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Locksmith" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/Locksmith" "${PODS_ROOT}/Headers/Public/Specta"
|
||||
OTHER_LDFLAGS = -ObjC
|
||||
OTHER_SWIFT_FLAGS = "-D COCOAPODS"
|
||||
OTHER_LDFLAGS = ${PODS_TESTS_LOCKSMITH_OTHER_LDFLAGS} -ObjC
|
||||
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
|
||||
PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Tests
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
SKIP_INSTALL = YES
|
||||
+1
@@ -0,0 +1 @@
|
||||
PODS_TESTS_LOCKSMITH_OTHER_LDFLAGS = -framework "Security" -framework "UIKit"
|
||||
+2
-1
@@ -5,4 +5,5 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Specta" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/Locksmith" "${PODS_ROOT}/Headers/Public/Specta"
|
||||
OTHER_LDFLAGS = ${PODS_TESTS_SPECTA_OTHER_LDFLAGS} -ObjC
|
||||
PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Tests
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
SKIP_INSTALL = YES
|
||||
@@ -16,7 +16,7 @@
|
||||
#define COCOAPODS_POD_AVAILABLE_Locksmith
|
||||
#define COCOAPODS_VERSION_MAJOR_Locksmith 1
|
||||
#define COCOAPODS_VERSION_MINOR_Locksmith 2
|
||||
#define COCOAPODS_VERSION_PATCH_Locksmith 0
|
||||
#define COCOAPODS_VERSION_PATCH_Locksmith 1
|
||||
|
||||
// Specta
|
||||
#define COCOAPODS_POD_AVAILABLE_Specta
|
||||
|
||||
@@ -11,7 +11,7 @@ install_framework()
|
||||
local source="${BUILT_PRODUCTS_DIR}/Pods-Tests/$1"
|
||||
local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
||||
|
||||
if [ -L ${source} ]; then
|
||||
if [ -L "${source}" ]; then
|
||||
echo "Symlinked..."
|
||||
source=$(readlink "${source}")
|
||||
fi
|
||||
@@ -28,10 +28,13 @@ install_framework()
|
||||
local basename
|
||||
basename=$(echo $1 | sed -E s/\\..+// && exit ${PIPESTATUS[0]})
|
||||
local swift_runtime_libs
|
||||
swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/$1/${basename}" | grep @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
|
||||
swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/$1/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
|
||||
for lib in $swift_runtime_libs; do
|
||||
echo "rsync -av \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
|
||||
rsync -av "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
|
||||
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
|
||||
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
|
||||
if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then
|
||||
code_sign "${destination}/${lib}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
||||
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
|
||||
> "$RESOURCES_TO_COPY"
|
||||
|
||||
XCASSET_FILES=""
|
||||
|
||||
install_resource()
|
||||
{
|
||||
case $1 in
|
||||
@@ -36,6 +38,7 @@ install_resource()
|
||||
xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm"
|
||||
;;
|
||||
*.xcassets)
|
||||
XCASSET_FILES="$XCASSET_FILES '${PODS_ROOT}/$1'"
|
||||
;;
|
||||
/*)
|
||||
echo "$1"
|
||||
@@ -54,7 +57,7 @@ if [[ "${ACTION}" == "install" ]]; then
|
||||
fi
|
||||
rm -f "$RESOURCES_TO_COPY"
|
||||
|
||||
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ]
|
||||
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ]
|
||||
then
|
||||
case "${TARGETED_DEVICE_FAMILY}" in
|
||||
1,2)
|
||||
@@ -70,5 +73,6 @@ then
|
||||
TARGET_DEVICE_ARGS="--target-device mac"
|
||||
;;
|
||||
esac
|
||||
find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
||||
while read line; do XCASSET_FILES="$XCASSET_FILES '$line'"; done <<<$(find "$PWD" -name "*.xcassets" | egrep -v "^$PODS_ROOT")
|
||||
echo $XCASSET_FILES | xargs actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
||||
fi
|
||||
|
||||
@@ -2,8 +2,8 @@ FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
|
||||
OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/Expecta.framework/Headers" -iquote "$PODS_FRAMEWORK_BUILD_PATH/Locksmith.framework/Headers" -iquote "$PODS_FRAMEWORK_BUILD_PATH/Specta.framework/Headers"
|
||||
OTHER_LDFLAGS = -ObjC -framework "Expecta" -framework "Locksmith" -framework "Specta"
|
||||
OTHER_LDFLAGS = $(inherited) -ObjC -framework "Expecta" -framework "Locksmith" -framework "Specta"
|
||||
OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
|
||||
OTHER_SWIFT_FLAGS = "-D COCOAPODS"
|
||||
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
|
||||
PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Tests
|
||||
PODS_ROOT = ${SRCROOT}/Pods
|
||||
@@ -2,8 +2,8 @@ FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
|
||||
OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/Expecta.framework/Headers" -iquote "$PODS_FRAMEWORK_BUILD_PATH/Locksmith.framework/Headers" -iquote "$PODS_FRAMEWORK_BUILD_PATH/Specta.framework/Headers"
|
||||
OTHER_LDFLAGS = -ObjC -framework "Expecta" -framework "Locksmith" -framework "Specta"
|
||||
OTHER_LDFLAGS = $(inherited) -ObjC -framework "Expecta" -framework "Locksmith" -framework "Specta"
|
||||
OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
|
||||
OTHER_SWIFT_FLAGS = "-D COCOAPODS"
|
||||
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
|
||||
PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-Tests
|
||||
PODS_ROOT = ${SRCROOT}/Pods
|
||||
@@ -75,7 +75,7 @@ class LocksmithTests: XCTestCase {
|
||||
setupLoads()
|
||||
|
||||
let (dictionary, error) = Locksmith.loadDataForUserAccount("user1", inService: "myService")
|
||||
XCTAssert(dictionary!.valueForKey("key")! as NSString == "value" && error == nil, "❌: loading one item")
|
||||
XCTAssert(dictionary!.valueForKey("key")! as! NSString == "value" && error == nil, "❌: loading one item")
|
||||
}
|
||||
|
||||
func testLoadData_Multiple() {
|
||||
@@ -85,9 +85,9 @@ class LocksmithTests: XCTestCase {
|
||||
let (dictionary2, error2) = Locksmith.loadDataForUserAccount("user2", inService: "myService")
|
||||
let (dictionary3, error3) = Locksmith.loadDataForUserAccount("user3", inService: "myService")
|
||||
|
||||
XCTAssert(dictionary!.valueForKey("key")! as NSString == "value" && error == nil, "❌: loading multiple items")
|
||||
XCTAssert(dictionary2!.valueForKey("anotherkey")! as NSString == "anothervalue" && error == nil, "❌: loading multiple items")
|
||||
XCTAssert(dictionary3!.valueForKey("word")! as NSString == "definition" && error == nil, "❌: loading multiple items")
|
||||
XCTAssert(dictionary!.valueForKey("key")! as! NSString == "value" && error == nil, "❌: loading multiple items")
|
||||
XCTAssert(dictionary2!.valueForKey("anotherkey")! as! NSString == "anothervalue" && error == nil, "❌: loading multiple items")
|
||||
XCTAssert(dictionary3!.valueForKey("word")! as! NSString == "definition" && error == nil, "❌: loading multiple items")
|
||||
}
|
||||
|
||||
// public class func updateData(data: Dictionary<String, String>, inService service: String, forUserAccount userAccount: String) -> NSError?
|
||||
@@ -96,7 +96,7 @@ class LocksmithTests: XCTestCase {
|
||||
|
||||
let error = Locksmith.updateData(["key": "newvalue"], forUserAccount: "user1", inService: "myService")
|
||||
let (dictionary, err) = Locksmith.loadDataForUserAccount("user1", inService: "myService")
|
||||
XCTAssert(dictionary!.valueForKey("key")! as NSString == "newvalue" && error == nil, "❌: updating item")
|
||||
XCTAssert(dictionary!.valueForKey("key")! as! NSString == "newvalue" && error == nil, "❌: updating item")
|
||||
|
||||
// Updating an item that doesn't exist should create that item (i.e. performs a regular create request)
|
||||
let error2 = Locksmith.updateData(["key": "anothervalue"], forUserAccount: "user1", inService: "myService")
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "Locksmith"
|
||||
s.version = "1.2.0"
|
||||
s.version = "1.2.1"
|
||||
s.summary = "Locksmith is a sane way to work with the iOS Keychain in Swift."
|
||||
s.description = <<-DESC
|
||||
Locksmith is a sane way to work with the iOS Keychain in Swift.
|
||||
|
||||
@@ -9,12 +9,12 @@ import UIKit
|
||||
import Security
|
||||
|
||||
public let LocksmithErrorDomain = "com.locksmith.error"
|
||||
public let LocksmithDefaultService = NSBundle.mainBundle().infoDictionary![kCFBundleIdentifierKey] as String
|
||||
public let LocksmithDefaultService = NSBundle.mainBundle().infoDictionary![kCFBundleIdentifierKey] as! String
|
||||
|
||||
|
||||
public class Locksmith: NSObject {
|
||||
// MARK: Perform request
|
||||
class func performRequest(request: LocksmithRequest) -> (NSDictionary?, NSError?) {
|
||||
public class func performRequest(request: LocksmithRequest) -> (NSDictionary?, NSError?) {
|
||||
let type = request.type
|
||||
//var result: Unmanaged<AnyObject>? = nil
|
||||
var result: AnyObject?
|
||||
@@ -130,6 +130,9 @@ public class Locksmith: NSObject {
|
||||
options[String(kSecAttrService)] = request.service
|
||||
options[String(kSecAttrSynchronizable)] = request.synchronizable
|
||||
options[String(kSecClass)] = securityCode(request.securityClass)
|
||||
if let accessibleMode = request.accessible {
|
||||
options[String(kSecAttrAccessible)] = accessible(accessibleMode)
|
||||
}
|
||||
|
||||
for (key, option) in options {
|
||||
parsedRequest.setOptional(option, forKey: key)
|
||||
@@ -220,6 +223,25 @@ public class Locksmith: NSObject {
|
||||
return kSecClassGenericPassword
|
||||
}
|
||||
}
|
||||
|
||||
private class func accessible(accessible: Accessible) -> CFStringRef {
|
||||
switch accessible {
|
||||
case .WhenUnlock:
|
||||
return kSecAttrAccessibleWhenUnlocked
|
||||
case .AfterFirstUnlock:
|
||||
return kSecAttrAccessibleAfterFirstUnlock
|
||||
case .Always:
|
||||
return kSecAttrAccessibleAlways
|
||||
case .WhenPasscodeSetThisDeviceOnly:
|
||||
return kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly
|
||||
case .WhenUnlockedThisDeviceOnly:
|
||||
return kSecAttrAccessibleWhenUnlockedThisDeviceOnly
|
||||
case .AfterFirstUnlockThisDeviceOnly:
|
||||
return kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly
|
||||
case .AlwaysThisDeviceOnly:
|
||||
return kSecAttrAccessibleAlwaysThisDeviceOnly
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Convenient Class Methods
|
||||
@@ -302,4 +324,4 @@ extension NSMutableDictionary {
|
||||
self.setObject(object, forKey: key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,19 +20,25 @@ public enum RequestType: Int {
|
||||
case Create, Read, Update, Delete
|
||||
}
|
||||
|
||||
public enum Accessible: Int {
|
||||
case WhenUnlock, AfterFirstUnlock, Always, WhenPasscodeSetThisDeviceOnly,
|
||||
WhenUnlockedThisDeviceOnly, AfterFirstUnlockThisDeviceOnly, AlwaysThisDeviceOnly
|
||||
}
|
||||
|
||||
public class LocksmithRequest: NSObject, DebugPrintable {
|
||||
// Keychain Options
|
||||
// Required
|
||||
var service: String = NSBundle.mainBundle().infoDictionary![kCFBundleIdentifierKey] as String // Default to Bundle Identifier
|
||||
var userAccount: String
|
||||
var type: RequestType = .Read // Default to non-destructive
|
||||
public var service: String = NSBundle.mainBundle().infoDictionary![kCFBundleIdentifierKey] as! String // Default to Bundle Identifier
|
||||
public var userAccount: String
|
||||
public var type: RequestType = .Read // Default to non-destructive
|
||||
|
||||
// Optional
|
||||
var securityClass: SecurityClass = .GenericPassword // Default to password lookup
|
||||
var group: String?
|
||||
var data: NSDictionary?
|
||||
var matchLimit: MatchLimit = .One
|
||||
var synchronizable = false
|
||||
public var securityClass: SecurityClass = .GenericPassword // Default to password lookup
|
||||
public var group: String?
|
||||
public var data: NSDictionary?
|
||||
public var matchLimit: MatchLimit = .One
|
||||
public var synchronizable = false
|
||||
public var accessible: Accessible?
|
||||
|
||||
// Debugging
|
||||
override public var debugDescription: String {
|
||||
@@ -44,13 +50,13 @@ public class LocksmithRequest: NSObject, DebugPrintable {
|
||||
self.userAccount = userAccount
|
||||
}
|
||||
|
||||
convenience init(userAccount: String, requestType: RequestType, service: String = LocksmithDefaultService) {
|
||||
public convenience init(userAccount: String, requestType: RequestType, service: String = LocksmithDefaultService) {
|
||||
self.init(userAccount: userAccount, service: service)
|
||||
self.type = requestType
|
||||
}
|
||||
|
||||
convenience init(userAccount: String, requestType: RequestType, data: NSDictionary, service: String = LocksmithDefaultService) {
|
||||
public convenience init(userAccount: String, requestType: RequestType, data: NSDictionary, service: String = LocksmithDefaultService) {
|
||||
self.init(userAccount: userAccount, requestType: requestType, service: service)
|
||||
self.data = data
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
A sane way to work with the iOS Keychain in Swift.
|
||||
|
||||
[](https://travis-ci.org/matthewpalmer/Locksmith)
|
||||
<!--[](https://travis-ci.org/matthewpalmer/Locksmith)-->
|
||||
[](http://cocoadocs.org/docsets/Locksmith)
|
||||
[](http://cocoadocs.org/docsets/Locksmith)
|
||||
[](http://cocoadocs.org/docsets/Locksmith)
|
||||
@@ -14,7 +14,8 @@ A sane way to work with the iOS Keychain in Swift.
|
||||
Locksmith is available through [CocoaPods](http://cocoapods.org). To install
|
||||
it, simply add the following line to your Podfile:
|
||||
|
||||
pod "Locksmith"
|
||||
pod "Locksmith"
|
||||
|
||||
|
||||
### Manual
|
||||
|
||||
@@ -122,4 +123,4 @@ var synchronizable: Bool // Defaults to false
|
||||
|
||||
## License
|
||||
|
||||
Locksmith is available under the MIT license. See the LICENSE file for more info.
|
||||
Locksmith is available under the MIT license. See the LICENSE file for more info.
|
||||
|
||||
Reference in New Issue
Block a user