diff --git a/Cartfile b/Cartfile
index 42a324b..97ca48d 100644
--- a/Cartfile
+++ b/Cartfile
@@ -1,8 +1,7 @@
github "SVProgressHUD/SVProgressHUD"
github "radex/SwiftyUserDefaults"
github "libgit2/objective-git"
-# github "zahlz/SwiftPasscodeLock" "master"
-github "yishilin14/SwiftPasscodeLock" "app-extension-support"
-github "bitserf/FavIcon"
+github "leonbreedt/FavIcon"
github "kishikawakatsumi/KeychainAccess"
github "mattrubin/OneTimePassword"
+github "jpsim/Yams"
diff --git a/Podfile b/Podfile
index a95879a..fca1e49 100644
--- a/Podfile
+++ b/Podfile
@@ -2,7 +2,7 @@ platform :ios, '10.2'
use_frameworks!
target 'passKit' do
- pod 'ObjectivePGP', :git => 'https://github.com/krzyzanowskim/ObjectivePGP.git', :tag => '0.10.0-beta2'
+ pod 'ObjectivePGP', :git => 'https://github.com/krzyzanowskim/ObjectivePGP.git', :tag => '0.10.0'
target 'pass' do
inherit! :search_paths
end
diff --git a/README.md b/README.md
index 73a639f..d0d9098 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# Pass
-[](https://github.com/mssun/pass-ios/releases)
+[](https://github.com/mssun/passforios/releases)

[](https://gitter.im/passforios/passforios)
[](https://travis-ci.org/mssun/passforios)
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 1ce0f8c..51aa52e 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -62,7 +62,7 @@ platform :ios do
)
# ensure_git_status_clean
increment_build_number(
- build_number: latest_testflight_build_number(version: get_version_number, initial_build_number: 0) + 1,
+ build_number: latest_testflight_build_number(version: get_version_number(target: "pass"), initial_build_number: 0) + 1,
xcodeproj: "pass.xcodeproj"
)
# commit_version_bump(xcodeproj: "pass.xcodeproj")
diff --git a/pass.xcodeproj/project.pbxproj b/pass.xcodeproj/project.pbxproj
index 24f7730..de182dd 100644
--- a/pass.xcodeproj/project.pbxproj
+++ b/pass.xcodeproj/project.pbxproj
@@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
18F19A67B0C07F13C17169E0 /* Pods_pass.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A5620D17DF5E86B61761D0E /* Pods_pass.framework */; };
23B82F0228254275DBA609E7 /* Pods_passExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B975797E0F0B7476CADD6A7D /* Pods_passExtension.framework */; };
+ 3012B06D2039D6E400BE1793 /* Yams.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3012B06C2039D6E400BE1793 /* Yams.framework */; };
61326CDA7A73757FB68DCB04 /* Pods_passKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DAB3F5541E51ADC8C6B56642 /* Pods_passKit.framework */; };
A20691F41F2A3D0E0096483D /* SecurePasteboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20691F31F2A3D0E0096483D /* SecurePasteboard.swift */; };
A2168A7F1EFD40D5005EA873 /* OnePasswordExtensionConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2168A7E1EFD40D5005EA873 /* OnePasswordExtensionConstants.swift */; };
@@ -29,8 +30,6 @@
A26700371EEC475600176B8A /* passProcessor.js in Resources */ = {isa = PBXBuildFile; fileRef = A26700351EEC475600176B8A /* passProcessor.js */; };
A2802BF91E70813A00879216 /* SliderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2802BF71E70813A00879216 /* SliderTableViewCell.swift */; };
A2802BFA1E70813A00879216 /* SliderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A2802BF81E70813A00879216 /* SliderTableViewCell.xib */; };
- A28C66651EF109D600A398A1 /* PasscodeLockConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = A28C66631EF109D600A398A1 /* PasscodeLockConfiguration.swift */; };
- A28C66661EF109D600A398A1 /* PasscodeLockRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = A28C66641EF109D600A398A1 /* PasscodeLockRepository.swift */; };
A28C66681EF10EC900A398A1 /* PasscodeExtensionDisplay.swift in Sources */ = {isa = PBXBuildFile; fileRef = A28C66671EF10EC900A398A1 /* PasscodeExtensionDisplay.swift */; };
A2A61C131EEF90CB00CFE063 /* Base32.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A262A58C1E68749C006B0890 /* Base32.framework */; };
A2A61C151EEF90CB00CFE063 /* KeychainAccess.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCA742D91E599ED400D54E16 /* KeychainAccess.framework */; };
@@ -39,6 +38,10 @@
A2A61C201EEFABAD00CFE063 /* UtilsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2A61C1F1EEFABAD00CFE063 /* UtilsExtension.swift */; };
A2A61C2C1EEFDF3300CFE063 /* ExtensionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2A61C2B1EEFDF3300CFE063 /* ExtensionViewController.swift */; };
A2A7813F1E97DBD9001311F5 /* QRScannerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2A7813E1E97DBD9001311F5 /* QRScannerController.swift */; };
+ A2BEC1BB207D2EFE00F3051C /* UIViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2BEC1BA207D2EFE00F3051C /* UIViewExtension.swift */; };
+ A2C532BB201E5A9600DB9F53 /* PasscodeLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2C532BA201E5A9600DB9F53 /* PasscodeLock.swift */; };
+ A2C532BE201E5AA100DB9F53 /* PasscodeLockViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2C532BC201E5AA000DB9F53 /* PasscodeLockViewController.swift */; };
+ A2C532BF201E5AA100DB9F53 /* PasscodeLockPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2C532BD201E5AA100DB9F53 /* PasscodeLockPresenter.swift */; };
A2F4E2141EED800F0011986E /* GitCredential.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2F4E2101EED800F0011986E /* GitCredential.swift */; };
A2F4E2151EED800F0011986E /* Password.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2F4E2111EED800F0011986E /* Password.swift */; };
A2F4E2161EED800F0011986E /* PasswordEntity.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2F4E2121EED800F0011986E /* PasswordEntity.swift */; };
@@ -61,7 +64,6 @@
DC037CC01E4ED4E100609409 /* TextViewTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DC037CBE1E4ED4E100609409 /* TextViewTableViewCell.xib */; };
DC13B1511E8640810097803F /* passTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC13B1501E8640810097803F /* passTests.swift */; };
DC193FFA1E49B4430077E0A3 /* AdvancedSettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC193FF91E49B4430077E0A3 /* AdvancedSettingsTableViewController.swift */; };
- DC193FFC1E49E0340077E0A3 /* PasscodeLock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC193FFB1E49E0340077E0A3 /* PasscodeLock.framework */; };
DC3E64E61E656F11009A83DE /* CommitLogsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC3E64E51E656F11009A83DE /* CommitLogsTableViewController.swift */; };
DC4914961E434301007FF592 /* LabelTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC4914941E434301007FF592 /* LabelTableViewCell.swift */; };
DC4914991E434600007FF592 /* PasswordDetailTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC4914981E434600007FF592 /* PasswordDetailTableViewController.swift */; };
@@ -157,6 +159,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 3012B06C2039D6E400BE1793 /* Yams.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Yams.framework; path = Carthage/Build/iOS/Yams.framework; sourceTree = ""; };
31C3033E8868D05B2C55C8B1 /* Pods-passExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-passExtension.debug.xcconfig"; path = "Pods/Target Support Files/Pods-passExtension/Pods-passExtension.debug.xcconfig"; sourceTree = ""; };
3A5620D17DF5E86B61761D0E /* Pods_pass.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_pass.framework; sourceTree = BUILT_PRODUCTS_DIR; };
666769E0B255666D02945C15 /* Pods-passKitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-passKitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-passKitTests/Pods-passKitTests.release.xcconfig"; sourceTree = ""; };
@@ -191,8 +194,6 @@
A26700351EEC475600176B8A /* passProcessor.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = passProcessor.js; sourceTree = ""; };
A2802BF71E70813A00879216 /* SliderTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SliderTableViewCell.swift; sourceTree = ""; };
A2802BF81E70813A00879216 /* SliderTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SliderTableViewCell.xib; sourceTree = ""; };
- A28C66631EF109D600A398A1 /* PasscodeLockConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PasscodeLockConfiguration.swift; path = Models/PasscodeLockConfiguration.swift; sourceTree = ""; };
- A28C66641EF109D600A398A1 /* PasscodeLockRepository.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PasscodeLockRepository.swift; path = Models/PasscodeLockRepository.swift; sourceTree = ""; };
A28C66671EF10EC900A398A1 /* PasscodeExtensionDisplay.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PasscodeExtensionDisplay.swift; sourceTree = ""; };
A2A61C0C1EEF8DFE00CFE063 /* libPods-passExtension.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libPods-passExtension.a"; path = "../../Library/Developer/Xcode/DerivedData/pass-fwlmfsjroyvbfhdyqmglrwfhvjli/Build/Products/Debug-iphonesimulator/libPods-passExtension.a"; sourceTree = ""; };
A2A61C101EEF8E3500CFE063 /* libPods-passKit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libPods-passKit.a"; path = "Pods/../build/Debug-iphoneos/libPods-passKit.a"; sourceTree = ""; };
@@ -200,6 +201,10 @@
A2A61C2B1EEFDF3300CFE063 /* ExtensionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExtensionViewController.swift; sourceTree = ""; };
A2A7813E1E97DBD9001311F5 /* QRScannerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRScannerController.swift; sourceTree = ""; };
A2BC54C71EEE5669001FAFBD /* Objective-CBridgingHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Objective-CBridgingHeader.h"; sourceTree = ""; };
+ A2BEC1BA207D2EFE00F3051C /* UIViewExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = UIViewExtension.swift; path = Helpers/UIViewExtension.swift; sourceTree = ""; };
+ A2C532BA201E5A9600DB9F53 /* PasscodeLock.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PasscodeLock.swift; path = Models/PasscodeLock.swift; sourceTree = ""; };
+ A2C532BC201E5AA000DB9F53 /* PasscodeLockViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PasscodeLockViewController.swift; path = Controllers/PasscodeLockViewController.swift; sourceTree = ""; };
+ A2C532BD201E5AA100DB9F53 /* PasscodeLockPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PasscodeLockPresenter.swift; path = Controllers/PasscodeLockPresenter.swift; sourceTree = ""; };
A2F4E2101EED800F0011986E /* GitCredential.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = GitCredential.swift; path = Models/GitCredential.swift; sourceTree = ""; };
A2F4E2111EED800F0011986E /* Password.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Password.swift; path = Models/Password.swift; sourceTree = ""; };
A2F4E2121EED800F0011986E /* PasswordEntity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PasswordEntity.swift; path = Models/PasswordEntity.swift; sourceTree = ""; };
@@ -315,8 +320,8 @@
files = (
A260758D1EEC6F34005DB03E /* passKit.framework in Frameworks */,
DCC408C71E307DBB00F29B0E /* SVProgressHUD.framework in Frameworks */,
- DC193FFC1E49E0340077E0A3 /* PasscodeLock.framework in Frameworks */,
18F19A67B0C07F13C17169E0 /* Pods_pass.framework in Frameworks */,
+ 3012B06D2039D6E400BE1793 /* Yams.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -344,11 +349,12 @@
A26075791EEC6F34005DB03E /* passKit */ = {
isa = PBXGroup;
children = (
+ A2C532B9201DD07500DB9F53 /* Controllers */,
+ A2F4E20F1EED7F0A0011986E /* Helpers */,
+ A260757B1EEC6F34005DB03E /* Info.plist */,
A2F4E20E1EED7F040011986E /* Models */,
A26075A51EEC7125005DB03E /* pass.xcdatamodeld */,
- A2F4E20F1EED7F0A0011986E /* Helpers */,
A260757A1EEC6F34005DB03E /* passKit.h */,
- A260757B1EEC6F34005DB03E /* Info.plist */,
);
path = passKit;
sourceTree = "";
@@ -376,11 +382,19 @@
path = passExtension;
sourceTree = "";
};
+ A2C532B9201DD07500DB9F53 /* Controllers */ = {
+ isa = PBXGroup;
+ children = (
+ A2C532BD201E5AA100DB9F53 /* PasscodeLockPresenter.swift */,
+ A2C532BC201E5AA000DB9F53 /* PasscodeLockViewController.swift */,
+ );
+ name = Controllers;
+ sourceTree = "";
+ };
A2F4E20E1EED7F040011986E /* Models */ = {
isa = PBXGroup;
children = (
- A28C66631EF109D600A398A1 /* PasscodeLockConfiguration.swift */,
- A28C66641EF109D600A398A1 /* PasscodeLockRepository.swift */,
+ A2C532BA201E5A9600DB9F53 /* PasscodeLock.swift */,
A2F4E2101EED800F0011986E /* GitCredential.swift */,
A2F4E2111EED800F0011986E /* Password.swift */,
A2F4E2121EED800F0011986E /* PasswordEntity.swift */,
@@ -398,6 +412,7 @@
A2F4E21B1EED80160011986E /* NotificationNames.swift */,
A2F4E21C1EED80160011986E /* UITextFieldExtension.swift */,
A2F4E21D1EED80160011986E /* Utils.swift */,
+ A2BEC1BA207D2EFE00F3051C /* UIViewExtension.swift */,
);
name = Helpers;
sourceTree = "";
@@ -429,30 +444,30 @@
DC19400C1E4B39400077E0A3 /* Controllers */ = {
isa = PBXGroup;
children = (
- DCD3C65D1EFB9BB400CBE842 /* SettingsSplitViewController.swift */,
- DC3E64E51E656F11009A83DE /* CommitLogsTableViewController.swift */,
- DC5F385A1E56AADB00C69ACA /* PGPKeyArmorSettingTableViewController.swift */,
DC037CB11E4CAB1700609409 /* AboutRepositoryTableViewController.swift */,
DC962CDE1E4B62C10033B5D8 /* AboutTableViewController.swift */,
DC037CB71E4DD1A500609409 /* AddPasswordTableViewController.swift */,
DC193FF91E49B4430077E0A3 /* AdvancedSettingsTableViewController.swift */,
DC037CA71E4B898100609409 /* BasicStaticTableViewController.swift */,
+ DC3E64E51E656F11009A83DE /* CommitLogsTableViewController.swift */,
DCFB77A61E502DF9008DE471 /* EditPasswordTableViewController.swift */,
DC037CAF1E4CA51F00609409 /* GeneralSettingsTableViewController.swift */,
+ A217ACE31E9BBBBD00A1A6CF /* GitConfigSettingTableViewController.swift */,
DCA049991E335CC800522E8F /* GitServerSettingTableViewController.swift */,
+ DCC441531E916382008A90C4 /* GitSSHKeyArmorSettingTableViewController.swift */,
DC037CA51E4B883900609409 /* OpenSourceComponentsTableViewController.swift */,
+ A217ACE11E9AB17C00A1A6CF /* OTPScannerController.swift */,
DC4914981E434600007FF592 /* PasswordDetailTableViewController.swift */,
- DCC441511E8F6C06008A90C4 /* RawPasswordViewController.swift */,
DCFB77A81E502FF6008DE471 /* PasswordEditorTableViewController.swift */,
DC5734AD1E439AD400D09270 /* PasswordsViewController.swift */,
+ DC5F385A1E56AADB00C69ACA /* PGPKeyArmorSettingTableViewController.swift */,
DCA0499B1E3362F400522E8F /* PGPKeySettingTableViewController.swift */,
+ A2A7813E1E97DBD9001311F5 /* QRScannerController.swift */,
+ DCC441511E8F6C06008A90C4 /* RawPasswordViewController.swift */,
+ DCD3C65D1EFB9BB400CBE842 /* SettingsSplitViewController.swift */,
DCAAF7441E2FA66800AB94BC /* SettingsTableViewController.swift */,
DC037CA91E4B8EAE00609409 /* SpecialThanksTableViewController.swift */,
DC8963BF1E38EEB900828B09 /* SSHKeySettingTableViewController.swift */,
- DCC441531E916382008A90C4 /* GitSSHKeyArmorSettingTableViewController.swift */,
- A2A7813E1E97DBD9001311F5 /* QRScannerController.swift */,
- A217ACE11E9AB17C00A1A6CF /* OTPScannerController.swift */,
- A217ACE31E9BBBBD00A1A6CF /* GitConfigSettingTableViewController.swift */,
);
path = Controllers;
sourceTree = "";
@@ -477,21 +492,21 @@
DC19400F1E4B3A9E0077E0A3 /* Views */ = {
isa = PBXGroup;
children = (
- A2802BF71E70813A00879216 /* SliderTableViewCell.swift */,
- A2802BF81E70813A00879216 /* SliderTableViewCell.xib */,
+ DCFB77AA1E503729008DE471 /* ContentTableViewCell.swift */,
DCFB779C1E4F40C7008DE471 /* FillPasswordTableViewCell.swift */,
DCFB779D1E4F40C7008DE471 /* FillPasswordTableViewCell.xib */,
- DCFB77981E4F3BCF008DE471 /* TitleTextFieldTableViewCell.swift */,
- DCFB77991E4F3BCF008DE471 /* TitleTextFieldTableViewCell.xib */,
DC4914941E434301007FF592 /* LabelTableViewCell.swift */,
DCDDEAAF1E4639F300F68193 /* LabelTableViewCell.xib */,
- DC037CB91E4DD47B00609409 /* TextFieldTableViewCell.swift */,
- DC037CBA1E4DD47B00609409 /* TextFieldTableViewCell.xib */,
DCDDEAB11E4896BF00F68193 /* PasswordDetailTitleTableViewCell.swift */,
DCFB77A21E500D9C008DE471 /* PasswordDetailTitleTableViewCell.xib */,
+ A2802BF71E70813A00879216 /* SliderTableViewCell.swift */,
+ A2802BF81E70813A00879216 /* SliderTableViewCell.xib */,
+ DC037CB91E4DD47B00609409 /* TextFieldTableViewCell.swift */,
+ DC037CBA1E4DD47B00609409 /* TextFieldTableViewCell.xib */,
DC037CBD1E4ED4E100609409 /* TextViewTableViewCell.swift */,
DC037CBE1E4ED4E100609409 /* TextViewTableViewCell.xib */,
- DCFB77AA1E503729008DE471 /* ContentTableViewCell.swift */,
+ DCFB77981E4F3BCF008DE471 /* TitleTextFieldTableViewCell.swift */,
+ DCFB77991E4F3BCF008DE471 /* TitleTextFieldTableViewCell.xib */,
);
path = Views;
sourceTree = "";
@@ -542,6 +557,7 @@
DC917BED1E2F38C4000FDF54 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 3012B06C2039D6E400BE1793 /* Yams.framework */,
A2A61C101EEF8E3500CFE063 /* libPods-passKit.a */,
A2A61C0C1EEF8DFE00CFE063 /* libPods-passExtension.a */,
A2227D541EEE5E78002A69A9 /* libObjectivePGP.a */,
@@ -693,7 +709,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
- LastUpgradeCheck = 0900;
+ LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Bob Sun";
TargetAttributes = {
A26075771EEC6F34005DB03E = {
@@ -984,11 +1000,11 @@
"$(SRCROOT)/Carthage/Build/iOS/SVProgressHUD.framework",
"$(SRCROOT)/Carthage/Build/iOS/SwiftyUserDefaults.framework",
"$(SRCROOT)/Carthage/Build/iOS/ObjectiveGit.framework",
- "$(SRCROOT)/Carthage/Build/iOS/PasscodeLock.framework",
"$(SRCROOT)/Carthage/Build/iOS/FavIcon.framework",
"$(SRCROOT)/Carthage/Build/iOS/KeychainAccess.framework",
"$(SRCROOT)/Carthage/Build/iOS/OneTimePassword.framework",
"$(SRCROOT)/Carthage/Build/iOS/Base32.framework",
+ "$(SRCROOT)/Carthage/Build/iOS/Yams.framework",
);
name = "Run Script";
outputPaths = (
@@ -1019,14 +1035,16 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- A28C66661EF109D600A398A1 /* PasscodeLockRepository.swift in Sources */,
+ A2BEC1BB207D2EFE00F3051C /* UIViewExtension.swift in Sources */,
+ A2C532BB201E5A9600DB9F53 /* PasscodeLock.swift in Sources */,
A2F4E2151EED800F0011986E /* Password.swift in Sources */,
- A28C66651EF109D600A398A1 /* PasscodeLockConfiguration.swift in Sources */,
A26075AD1EEC7125005DB03E /* pass.xcdatamodeld in Sources */,
A2F4E21E1EED80160011986E /* AppError.swift in Sources */,
A2F4E2171EED800F0011986E /* PasswordStore.swift in Sources */,
A2F4E2211EED80160011986E /* NotificationNames.swift in Sources */,
A2F4E2221EED80160011986E /* UITextFieldExtension.swift in Sources */,
+ A2C532BF201E5AA100DB9F53 /* PasscodeLockPresenter.swift in Sources */,
+ A2C532BE201E5AA100DB9F53 /* PasscodeLockViewController.swift in Sources */,
A2F4E2201EED80160011986E /* Globals.swift in Sources */,
A2F4E2231EED80160011986E /* Utils.swift in Sources */,
A2F4E21F1EED80160011986E /* DefaultsKeys.swift in Sources */,
@@ -1325,6 +1343,7 @@
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
@@ -1358,6 +1377,7 @@
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
@@ -1408,6 +1428,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@@ -1415,6 +1436,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -1441,6 +1463,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = "$(SDKROOT)/usr/include/libxml2";
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
@@ -1465,6 +1488,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@@ -1472,6 +1496,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -1492,6 +1517,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = "$(SDKROOT)/usr/include/libxml2";
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = me.mssun.passforios;
@@ -1530,7 +1556,7 @@
OTHER_LDFLAGS = "${inherited}";
PRODUCT_BUNDLE_IDENTIFIER = "$(PRODUCT_BUNDLE_IDENTIFIER)";
PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE = "2e72f4af-b935-4970-9cd3-44d4cc24b646";
+ PROVISIONING_PROFILE = "3c4f599a-ce77-4184-b4c4-edebf09cba3b";
PROVISIONING_PROFILE_SPECIFIER = "match Development me.mssun.passforios";
SWIFT_OBJC_BRIDGING_HEADER = "pass/Helpers/Objective-CBridgingHeader.h";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
diff --git a/pass.xcodeproj/xcshareddata/xcschemes/pass.xcscheme b/pass.xcodeproj/xcshareddata/xcschemes/pass.xcscheme
index 75208fd..a455f03 100644
--- a/pass.xcodeproj/xcshareddata/xcschemes/pass.xcscheme
+++ b/pass.xcodeproj/xcshareddata/xcschemes/pass.xcscheme
@@ -1,6 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -241,7 +224,7 @@
-
+
@@ -273,7 +256,6 @@
-
diff --git a/pass/Controllers/OpenSourceComponentsTableViewController.swift b/pass/Controllers/OpenSourceComponentsTableViewController.swift
index b67fb40..bdd809a 100644
--- a/pass/Controllers/OpenSourceComponentsTableViewController.swift
+++ b/pass/Controllers/OpenSourceComponentsTableViewController.swift
@@ -17,9 +17,6 @@ class OpenSourceComponentsTableViewController: BasicStaticTableViewController {
["KeychainAccess",
"https://github.com/kishikawakatsumi/KeychainAccess",
"https://github.com/kishikawakatsumi/KeychainAccess/blob/master/LICENSE"],
- ["PasscodeLock",
- "https://github.com/zahlz/SwiftPasscodeLock",
- "https://github.com/zahlz/SwiftPasscodeLock/blob/master/LICENSE.txt"],
["ObjectiveGit",
"https://github.com/libgit2/objective-git",
"https://github.com/libgit2/objective-git/blob/master/LICENSE"],
@@ -35,6 +32,9 @@ class OpenSourceComponentsTableViewController: BasicStaticTableViewController {
["SVProgressHUD",
"https://github.com/SVProgressHUD/SVProgressHUD",
"https://github.com/SVProgressHUD/SVProgressHUD/blob/master/LICENSE.txt"],
+ ["Yams",
+ "https://github.com/jpsim/Yams",
+ "https://github.com/jpsim/Yams/blob/master/LICENSE"],
]
override func viewDidLoad() {
diff --git a/pass/Controllers/PasswordEditorTableViewController.swift b/pass/Controllers/PasswordEditorTableViewController.swift
index 7ed2ed6..e03eb48 100644
--- a/pass/Controllers/PasswordEditorTableViewController.swift
+++ b/pass/Controllers/PasswordEditorTableViewController.swift
@@ -28,7 +28,7 @@ class PasswordEditorTableViewController: UITableViewController, FillPasswordTabl
private var navigationItemTitle: String?
private var sectionHeaderTitles = ["name", "password", "additions",""].map {$0.uppercased()}
- private var sectionFooterTitles = ["", "", "Use \"key: value\" format for additional fields.", ""]
+ private var sectionFooterTitles = ["", "", "Use YAML format for additional fields.", ""]
private let nameSection = 0
private let passwordSection = 1
private let additionsSection = 2
diff --git a/pass/Controllers/PasswordsViewController.swift b/pass/Controllers/PasswordsViewController.swift
index 34a208d..2129d8c 100644
--- a/pass/Controllers/PasswordsViewController.swift
+++ b/pass/Controllers/PasswordsViewController.swift
@@ -229,6 +229,11 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
// reset the data table if the disaply settings have been changed
NotificationCenter.default.addObserver(self, selector: #selector(actOnReloadTableViewRelatedNotification), name: .passwordDisplaySettingChanged, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(actOnSearchNotification), name: .passwordSearch, object: nil)
+
+ // listen to the swipe back guesture
+ let swipeRight = UISwipeGestureRecognizer(target: self, action: #selector(self.respondToSwipeGesture))
+ swipeRight.direction = UISwipeGestureRecognizerDirection.right
+ self.view.addGestureRecognizer(swipeRight)
}
override func viewWillAppear(_ animated: Bool) {
@@ -314,6 +319,15 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
}
}
+ @objc func respondToSwipeGesture(gesture: UIGestureRecognizer) {
+ if let swipeGesture = gesture as? UISwipeGestureRecognizer {
+ // swipe right -> swipe back
+ if swipeGesture.direction == .right && parentPasswordEntity != nil {
+ self.backAction(nil)
+ }
+ }
+ }
+
@objc func backAction(_ sender: Any?) {
guard SharedDefaults[.isShowFolderOn] else { return }
var anim: CATransition? = transitionFromLeft
diff --git a/pass/Controllers/SettingsTableViewController.swift b/pass/Controllers/SettingsTableViewController.swift
index 86d6e9a..65f40c8 100644
--- a/pass/Controllers/SettingsTableViewController.swift
+++ b/pass/Controllers/SettingsTableViewController.swift
@@ -9,25 +9,16 @@
import UIKit
import SVProgressHUD
import CoreData
-import PasscodeLock
-import LocalAuthentication
import passKit
class SettingsTableViewController: UITableViewController, UITabBarControllerDelegate {
-
- lazy var touchIDSwitch: UISwitch = {
- let uiSwitch = UISwitch(frame: CGRect.zero)
- uiSwitch.onTintColor = Globals.blue
- uiSwitch.addTarget(self, action: #selector(touchIDSwitchAction), for: UIControlEvents.valueChanged)
- return uiSwitch
- }()
-
@IBOutlet weak var pgpKeyTableViewCell: UITableViewCell!
- @IBOutlet weak var touchIDTableViewCell: UITableViewCell!
@IBOutlet weak var passcodeTableViewCell: UITableViewCell!
@IBOutlet weak var passwordRepositoryTableViewCell: UITableViewCell!
+ var setPasscodeLockAlert: UIAlertController?
+
let passwordStore = PasswordStore.shared
- var passcodeLockConfig = PasscodeLockConfiguration.shared
+ var passcodeLock = PasscodeLock.shared
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
navigationController?.popViewController(animated: true)
@@ -77,8 +68,8 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
SVProgressHUD.show(withStatus: "Fetching PGP Key")
DispatchQueue.global(qos: .userInitiated).async { [unowned self] in
do {
- try self.passwordStore.initPGPKey(with: controller.armorPublicKeyTextView.text, keyType: .public)
- try self.passwordStore.initPGPKey(with: controller.armorPrivateKeyTextView.text, keyType: .secret)
+ try self.passwordStore.initPGPKey(with: SharedDefaults[.pgpPublicKeyArmor] ?? "", keyType: .public)
+ try self.passwordStore.initPGPKey(with: SharedDefaults[.pgpPrivateKeyArmor] ?? "", keyType: .secret)
DispatchQueue.main.async {
self.pgpKeyTableViewCell.detailTextLabel?.text = self.passwordStore.pgpKeyID
SVProgressHUD.showSuccess(withStatus: "Success")
@@ -123,14 +114,6 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
- // Security section, hide TouchID if the device doesn't support
- if section == 1 {
- if hasTouchID() {
- return 2
- } else {
- return 1
- }
- }
return super.tableView(tableView, numberOfRowsInSection: section)
}
@@ -138,10 +121,9 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
super.viewDidLoad()
NotificationCenter.default.addObserver(self, selector: #selector(SettingsTableViewController.actOnPasswordStoreErasedNotification), name: .passwordStoreErased, object: nil)
self.passwordRepositoryTableViewCell.detailTextLabel?.text = SharedDefaults[.gitURL]?.host
- touchIDTableViewCell.accessoryView = touchIDSwitch
setPGPKeyTableViewCellDetailText()
setPasswordRepositoryTableViewCellDetailText()
- setPasscodeLockTouchIDCells()
+ setPasscodeLockCell()
}
override func viewWillAppear(_ animated: Bool) {
@@ -149,38 +131,11 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
tabBarController!.delegate = self
}
- private func hasTouchID() -> Bool {
- let context = LAContext()
- var error: NSError?
- if context.canEvaluatePolicy(LAPolicy.deviceOwnerAuthenticationWithBiometrics, error: &error) {
- return true
- } else {
- switch error!.code {
- case LAError.Code.touchIDNotEnrolled.rawValue:
- return true
- case LAError.Code.passcodeNotSet.rawValue:
- return true
- default:
- return false
- }
- }
- }
-
- private func isTouchIDEnabled() -> Bool {
- let context = LAContext()
- return context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: nil)
- }
-
- private func setPasscodeLockTouchIDCells() {
- if passcodeLockConfig.repository.hasPasscode {
+ private func setPasscodeLockCell() {
+ if passcodeLock.hasPasscode {
self.passcodeTableViewCell.detailTextLabel?.text = "On"
- passcodeLockConfig.isTouchIDAllowed = SharedDefaults[.isTouchIDOn]
- touchIDSwitch.isOn = SharedDefaults[.isTouchIDOn]
} else {
self.passcodeTableViewCell.detailTextLabel?.text = "Off"
- SharedDefaults[.isTouchIDOn] = false
- passcodeLockConfig.isTouchIDAllowed = SharedDefaults[.isTouchIDOn]
- touchIDSwitch.isOn = SharedDefaults[.isTouchIDOn]
}
}
@@ -203,10 +158,7 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
@objc func actOnPasswordStoreErasedNotification() {
setPGPKeyTableViewCellDetailText()
setPasswordRepositoryTableViewCellDetailText()
- setPasscodeLockTouchIDCells()
-
- let appDelegate = UIApplication.shared.delegate as! AppDelegate
- appDelegate.passcodeLockPresenter = PasscodeLockPresenter(mainWindow: appDelegate.window, configuration: passcodeLockConfig)
+ setPasscodeLockCell()
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
@@ -221,22 +173,7 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
}
tableView.deselectRow(at: indexPath, animated: true)
}
-
- @objc func touchIDSwitchAction(uiSwitch: UISwitch) {
- if !passcodeLockConfig.repository.hasPasscode || !isTouchIDEnabled() {
- // switch off
- DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(500)) {
- uiSwitch.isOn = SharedDefaults[.isTouchIDOn] // SharedDefaults[.isTouchIDOn] should be false
- Utils.alert(title: "Notice", message: "Please enable Touch ID of your phone and setup the passcode lock for Pass.", controller: self, completion: nil)
- }
- } else {
- SharedDefaults[.isTouchIDOn] = uiSwitch.isOn
- passcodeLockConfig.isTouchIDAllowed = SharedDefaults[.isTouchIDOn]
- }
- let appDelegate = UIApplication.shared.delegate as! AppDelegate
- appDelegate.passcodeLockPresenter = PasscodeLockPresenter(mainWindow: appDelegate.window, configuration: passcodeLockConfig)
- }
-
+
func showPGPKeyActionSheet() {
let optionMenu = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
var urlActionTitle = "Download from URL"
@@ -314,21 +251,20 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
}
func showPasscodeActionSheet() {
- let passcodeChangeViewController = PasscodeLockViewController(state: .change, configuration: passcodeLockConfig)
- let passcodeRemoveViewController = PasscodeLockViewController(state: .remove, configuration: passcodeLockConfig)
-
let optionMenu = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
+ let passcodeRemoveViewController = PasscodeLockViewController()
+
+
let removePasscodeAction = UIAlertAction(title: "Remove Passcode", style: .destructive) { [weak self] _ in
- passcodeRemoveViewController.successCallback = { _ in
- self?.setPasscodeLockTouchIDCells()
- let appDelegate = UIApplication.shared.delegate as! AppDelegate
- appDelegate.passcodeLockPresenter = PasscodeLockPresenter(mainWindow: appDelegate.window, configuration: (self?.passcodeLockConfig)!)
+ passcodeRemoveViewController.successCallback = {
+ self?.passcodeLock.delete()
+ self?.setPasscodeLockCell()
}
self?.present(passcodeRemoveViewController, animated: true, completion: nil)
}
let changePasscodeAction = UIAlertAction(title: "Change Passcode", style: .default) { [weak self] _ in
- self?.present(passcodeChangeViewController, animated: true, completion: nil)
+ self?.setPasscodeLock()
}
let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
@@ -339,12 +275,50 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
optionMenu.popoverPresentationController?.sourceRect = passcodeTableViewCell.bounds
self.present(optionMenu, animated: true, completion: nil)
}
+
+ @objc func alertTextFieldDidChange(_ sender: UITextField) {
+ // check whether we should enable the Save button in setPasscodeLockAlert
+ if let setPasscodeLockAlert = self.setPasscodeLockAlert,
+ let setPasscodeLockAlertTextFields0 = setPasscodeLockAlert.textFields?[0],
+ let setPasscodeLockAlertTextFields1 = setPasscodeLockAlert.textFields?[1] {
+ if sender == setPasscodeLockAlertTextFields0 || sender == setPasscodeLockAlertTextFields1 {
+ // two passwords should be the same, and length >= 4
+ let passcodeText = setPasscodeLockAlertTextFields0.text!
+ let passcodeConfirmationText = setPasscodeLockAlertTextFields1.text!
+ setPasscodeLockAlert.actions[0].isEnabled = passcodeText == passcodeConfirmationText && passcodeText.count >= 4
+ }
+ }
+ }
func setPasscodeLock() {
- let passcodeSetViewController = PasscodeLockViewController(state: .set, configuration: passcodeLockConfig)
- passcodeSetViewController.successCallback = { _ in
- self.setPasscodeLockTouchIDCells()
+ // prepare the alert for setting the passcode
+ setPasscodeLockAlert = UIAlertController(title: "Set passcode", message: "Fill in your passcode for Pass (at least 4 characters)", preferredStyle: .alert)
+ setPasscodeLockAlert?.addTextField(configurationHandler: {(_ textField: UITextField) -> Void in
+ textField.placeholder = "Password"
+ textField.isSecureTextEntry = true
+ textField.addTarget(self, action: #selector(self.alertTextFieldDidChange(_:)), for: UIControlEvents.editingChanged)
+ })
+ setPasscodeLockAlert?.addTextField(configurationHandler: {(_ textField: UITextField) -> Void in
+ textField.placeholder = "Password Confirmation"
+ textField.isSecureTextEntry = true
+ textField.addTarget(self, action: #selector(self.alertTextFieldDidChange(_:)), for: UIControlEvents.editingChanged)
+ })
+
+ // save action
+ let saveAction = UIAlertAction(title: "Save", style: .default) { (action:UIAlertAction) -> Void in
+ let passcode: String = self.setPasscodeLockAlert!.textFields![0].text!
+ self.passcodeLock.save(passcode: passcode)
+ // refresh the passcode lock cell ("On")
+ self.setPasscodeLockCell()
}
- present(passcodeSetViewController, animated: true, completion: nil)
+ saveAction.isEnabled = false // disable the Save button by default
+
+ // cancel action
+ let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
+
+ // present
+ setPasscodeLockAlert?.addAction(saveAction)
+ setPasscodeLockAlert?.addAction(cancelAction)
+ self.present(setPasscodeLockAlert!, animated: true, completion: nil)
}
}
diff --git a/pass/Info.plist b/pass/Info.plist
index dd7b02f..843bff0 100644
--- a/pass/Info.plist
+++ b/pass/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.3.0
+ 0.3.1
CFBundleURLTypes
diff --git a/pass/Views/FillPasswordTableViewCell.xib b/pass/Views/FillPasswordTableViewCell.xib
index 2ebed2b..3afd825 100644
--- a/pass/Views/FillPasswordTableViewCell.xib
+++ b/pass/Views/FillPasswordTableViewCell.xib
@@ -1,11 +1,11 @@
-
+
-
+
@@ -20,19 +20,19 @@
-
+
-
+
-
+