Compare commits
36 Commits
2.8-mac-11
...
2.9-ios-4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5db294bdb3 | ||
|
|
fee7bc7401 | ||
|
|
21968f4ba6 | ||
|
|
8582c934c2 | ||
|
|
7091e2ee1b | ||
|
|
d5d455ee57 | ||
|
|
e6ae06798b | ||
|
|
1cae4c754b | ||
|
|
93ad86e63c | ||
|
|
cf74dc5cc2 | ||
|
|
981bdb3ab4 | ||
|
|
9bea8bcbdf | ||
|
|
363d6f6639 | ||
|
|
eb1632cb62 | ||
|
|
73fadaef7f | ||
|
|
60200f6302 | ||
|
|
cce8db5c48 | ||
|
|
6f3da5ccf0 | ||
|
|
52c87eaeca | ||
|
|
1dccdd0a3c | ||
|
|
eb8d10ed05 | ||
|
|
d9e5f77bee | ||
|
|
60f60d087e | ||
|
|
df97dec2fe | ||
|
|
3bac8d9e0a | ||
|
|
3fa7e1e8a1 | ||
|
|
d1104e4028 | ||
|
|
e9f2a25c9c | ||
|
|
171a3f0978 | ||
|
|
8cfb9a83c5 | ||
|
|
5717375e75 | ||
|
|
cc2dca3bd0 | ||
|
|
7575924d80 | ||
|
|
8bedcedfaf | ||
|
|
10b205c541 | ||
|
|
774f183ac0 |
@@ -9,10 +9,12 @@ build_project:
|
||||
- "( ./lib/bin/build_libsodium-macos clean && ./lib/bin/build_libsodium-macos )"
|
||||
- "( ./lib/bin/build_libjson-c-macos clean && ./lib/bin/build_libjson-c-macos )"
|
||||
- "( cd ./platform-independent/c/cli && ./clean && targets=all ./build && ./mpw-tests && ./mpw-cli-tests )"
|
||||
- "( export JAVA_HOME=$(java_home -Fv 10 || java_home -Fv 9* ) && ./gradlew --stacktrace clean test )"
|
||||
- "( xcodebuild -workspace platform-darwin/MasterPassword.xcworkspace -configuration 'Test' -scheme 'MasterPassword iOS' -sdk iphonesimulator clean build )"
|
||||
- "( xcodebuild -workspace platform-darwin/MasterPassword.xcworkspace -configuration 'Test' -scheme 'MasterPassword macOS' clean build )"
|
||||
- "( ./gradlew --stacktrace --info clean test )"
|
||||
- "( cd platform-darwin && pod install )"
|
||||
- "( xcodebuild -workspace platform-darwin/MasterPassword.xcworkspace -configuration 'Release' -scheme 'MasterPassword iOS' -sdk iphonesimulator clean build )"
|
||||
- "( xcodebuild -workspace platform-darwin/MasterPassword.xcworkspace -configuration 'Release' -scheme 'MasterPassword macOS' clean build )"
|
||||
tags:
|
||||
- brew
|
||||
- java_9
|
||||
- xcode_9
|
||||
- java
|
||||
- cocoapods
|
||||
- xcode
|
||||
|
||||
3
.gitmodules
vendored
@@ -15,7 +15,6 @@
|
||||
url = https://github.com/json-c/json-c.git
|
||||
[submodule "public/site"]
|
||||
path = public/site
|
||||
url = https://github.com/Lyndir/MasterPassword.git
|
||||
url = https://gitlab.com/MasterPassword/MasterPassword.git
|
||||
branch = gh-pages
|
||||
shallow = true
|
||||
update = none
|
||||
|
||||
2
platform-darwin/External/Pearl
vendored
@@ -49,7 +49,6 @@
|
||||
93D39A5FF670957C0AF8298D /* MPSiteCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D39DEA995041A13DC9CAF7 /* MPSiteCell.m */; };
|
||||
93D39A8EA1C49CE43B63F47B /* PearlUICollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D39D8A953779B35403AF6E /* PearlUICollectionView.m */; };
|
||||
93D39AA4A0BE66A872CCC02E /* NSPersistentStore+PearlMigration.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D397F4BAFFF7CF3F1B21A4 /* NSPersistentStore+PearlMigration.h */; };
|
||||
93D39B429C67A62E29DC02DA /* MPRootSegue.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D399493FEDDE74DD1A0C15 /* MPRootSegue.m */; };
|
||||
93D39B76DD5AB108BA8928E8 /* UIScrollView+PearlAdjustInsets.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D39DE2CB351D4E3789462B /* UIScrollView+PearlAdjustInsets.h */; };
|
||||
93D39B842AB9A5D072810D76 /* NSError+PearlFullDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D398C95847261903D781D3 /* NSError+PearlFullDescription.h */; };
|
||||
93D39B8F90F58A5D158DDBA3 /* MPSitesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D3924EE15017F8A12CB436 /* MPSitesViewController.m */; };
|
||||
@@ -77,11 +76,6 @@
|
||||
DA0CC5951EB6B030009A8ED9 /* MPSiteEntity+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = DA0CC58B1EB6B030009A8ED9 /* MPSiteEntity+CoreDataProperties.m */; };
|
||||
DA24EBAE19DAD08900FF010B /* tip_basic_black_top.png in Resources */ = {isa = PBXBuildFile; fileRef = DABD38941711E29700CF925C /* tip_basic_black_top.png */; };
|
||||
DA24EBAF19DAD08C00FF010B /* tip_basic_black_top@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DABD38951711E29700CF925C /* tip_basic_black_top@2x.png */; };
|
||||
DA24EBE819DAD6DE00FF010B /* Icon-320.png in Resources */ = {isa = PBXBuildFile; fileRef = DA24EBE619DAD6DE00FF010B /* Icon-320.png */; };
|
||||
DA24EBE919DAD6DE00FF010B /* Icon-64.png in Resources */ = {isa = PBXBuildFile; fileRef = DA24EBE719DAD6DE00FF010B /* Icon-64.png */; };
|
||||
DA24EBEA19DAD6EE00FF010B /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = DA24EBBA19DAD4D000FF010B /* Icon-Small.png */; };
|
||||
DA24EBEB19DAD6EE00FF010B /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA24EBBB19DAD4D000FF010B /* Icon-Small@2x.png */; };
|
||||
DA24EBEC19DAD6EE00FF010B /* Icon-Small@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA24EBBC19DAD4D000FF010B /* Icon-Small@3x.png */; };
|
||||
DA250A17195665A100AC23F1 /* UITableView+PearlReloadItems.m in Sources */ = {isa = PBXBuildFile; fileRef = DA250A13195665A100AC23F1 /* UITableView+PearlReloadItems.m */; };
|
||||
DA250A18195665A100AC23F1 /* UITableView+PearlReloadItems.h in Headers */ = {isa = PBXBuildFile; fileRef = DA250A14195665A100AC23F1 /* UITableView+PearlReloadItems.h */; };
|
||||
DA250A19195665A100AC23F1 /* UICollectionReusableView+PearlDequeue.m in Sources */ = {isa = PBXBuildFile; fileRef = DA250A15195665A100AC23F1 /* UICollectionReusableView+PearlDequeue.m */; };
|
||||
@@ -155,6 +149,21 @@
|
||||
DA5BFA4B147E415C00F98B1E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA5BFA4A147E415C00F98B1E /* Foundation.framework */; };
|
||||
DA5BFA4D147E415C00F98B1E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA5BFA4C147E415C00F98B1E /* CoreGraphics.framework */; };
|
||||
DA5BFA4F147E415C00F98B1E /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA5BFA4E147E415C00F98B1E /* CoreData.framework */; };
|
||||
DA5E0E5524589C9B0007FBA7 /* Icon-Small@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E4624589C9A0007FBA7 /* Icon-Small@3x.png */; };
|
||||
DA5E0E5624589C9B0007FBA7 /* Icon-Small-40.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E4724589C9A0007FBA7 /* Icon-Small-40.png */; };
|
||||
DA5E0E5724589C9B0007FBA7 /* Icon-Small-20.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E4824589C9A0007FBA7 /* Icon-Small-20.png */; };
|
||||
DA5E0E5824589C9B0007FBA7 /* Icon-76.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E4924589C9A0007FBA7 /* Icon-76.png */; };
|
||||
DA5E0E5924589C9B0007FBA7 /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E4A24589C9A0007FBA7 /* Icon-Small@2x.png */; };
|
||||
DA5E0E5A24589C9B0007FBA7 /* Icon-Small-40@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E4B24589C9A0007FBA7 /* Icon-Small-40@2x.png */; };
|
||||
DA5E0E5B24589C9B0007FBA7 /* Icon-76@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E4C24589C9A0007FBA7 /* Icon-76@2x.png */; };
|
||||
DA5E0E5C24589C9B0007FBA7 /* Icon-Small-20@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E4D24589C9A0007FBA7 /* Icon-Small-20@3x.png */; };
|
||||
DA5E0E5D24589C9B0007FBA7 /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E4E24589C9A0007FBA7 /* Icon-Small.png */; };
|
||||
DA5E0E5E24589C9B0007FBA7 /* Icon-83@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E4F24589C9A0007FBA7 /* Icon-83@2x.png */; };
|
||||
DA5E0E5F24589C9B0007FBA7 /* Icon-Small-40@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E5024589C9A0007FBA7 /* Icon-Small-40@3x.png */; };
|
||||
DA5E0E6024589C9B0007FBA7 /* Icon-60@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E5124589C9A0007FBA7 /* Icon-60@3x.png */; };
|
||||
DA5E0E6124589C9B0007FBA7 /* iTunesArtwork@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E5224589C9B0007FBA7 /* iTunesArtwork@2x.png */; };
|
||||
DA5E0E6224589C9B0007FBA7 /* Icon-Small-20@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E5324589C9B0007FBA7 /* Icon-Small-20@2x.png */; };
|
||||
DA5E0E6324589C9B0007FBA7 /* Icon-60@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5E0E5424589C9B0007FBA7 /* Icon-60@2x.png */; };
|
||||
DA6701B816406A4100B61001 /* Accounts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA6701B716406A4100B61001 /* Accounts.framework */; settings = {ATTRIBUTES = (Required, ); }; };
|
||||
DA6701DE16406B7300B61001 /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA6701DD16406B7300B61001 /* Social.framework */; settings = {ATTRIBUTES = (Required, ); }; };
|
||||
DA6701E016406BB400B61001 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA6701DF16406BB400B61001 /* AdSupport.framework */; settings = {ATTRIBUTES = (Required, ); }; };
|
||||
@@ -165,7 +174,7 @@
|
||||
DA67461018DE7F0C00DFE240 /* Exo2.0-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = DA67460C18DE7F0C00DFE240 /* Exo2.0-Bold.otf */; };
|
||||
DA69540617D975D900BF294E /* icon_gears.png in Resources */ = {isa = PBXBuildFile; fileRef = DABD37841711E29500CF925C /* icon_gears.png */; };
|
||||
DA69540717D975D900BF294E /* icon_gears@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DABD37851711E29500CF925C /* icon_gears@2x.png */; };
|
||||
DA72BD7B19C1510C00E6ACFE /* UIView+FontScale.m in Sources */ = {isa = PBXBuildFile; fileRef = DACE2F6719BA6A2A0010F92E /* UIView+FontScale.m */; };
|
||||
DA72E2302453B91700676D4F /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA72E22F2453B91700676D4F /* WebKit.framework */; };
|
||||
DA73049D194E022700E72520 /* ui_spinner.png in Resources */ = {isa = PBXBuildFile; fileRef = DABD36511711E29400CF925C /* ui_spinner.png */; };
|
||||
DA73049E194E022700E72520 /* ui_spinner@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DABD36521711E29400CF925C /* ui_spinner@2x.png */; };
|
||||
DA73049F194E022B00E72520 /* ui_textfield.png in Resources */ = {isa = PBXBuildFile; fileRef = DABD365B1711E29400CF925C /* ui_textfield.png */; };
|
||||
@@ -465,7 +474,6 @@
|
||||
93D391943675426839501BB8 /* MPLogsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLogsViewController.h; sourceTree = "<group>"; };
|
||||
93D391AA32F24290C424438E /* NSNotificationCenter+PearlEasyCleanup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter+PearlEasyCleanup.h"; sourceTree = "<group>"; };
|
||||
93D39246FC21C6E63E35D615 /* UICollectionView+PearlReloadItems.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UICollectionView+PearlReloadItems.h"; sourceTree = "<group>"; };
|
||||
93D3924D6F77E6BF41AC32D3 /* MPRootSegue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRootSegue.h; sourceTree = "<group>"; };
|
||||
93D3924EE15017F8A12CB436 /* MPSitesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSitesViewController.m; sourceTree = "<group>"; };
|
||||
93D392876BE5C011DE73B43F /* MPPopdownSegue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPopdownSegue.h; sourceTree = "<group>"; };
|
||||
93D392C5A6572DB0EB5B82C8 /* mpw-types.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "mpw-types.c"; sourceTree = "<group>"; };
|
||||
@@ -494,7 +502,6 @@
|
||||
93D398C95847261903D781D3 /* NSError+PearlFullDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSError+PearlFullDescription.h"; sourceTree = "<group>"; };
|
||||
93D3990D850D76A94C6B7A4D /* mpw-algorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "mpw-algorithm.h"; sourceTree = "<group>"; };
|
||||
93D3990E0CD1B5CF9FBB2C07 /* MPWebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPWebViewController.m; sourceTree = "<group>"; };
|
||||
93D399493FEDDE74DD1A0C15 /* MPRootSegue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRootSegue.m; sourceTree = "<group>"; };
|
||||
93D3995B1D4DCE5A30D882BA /* MPCoachmarkViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCoachmarkViewController.m; sourceTree = "<group>"; };
|
||||
93D39975CE5AEC99E3F086C7 /* MPSiteCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSiteCell.h; sourceTree = "<group>"; };
|
||||
93D3999693660C89A7465F4E /* MPCoachmarkViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCoachmarkViewController.h; sourceTree = "<group>"; };
|
||||
@@ -573,19 +580,6 @@
|
||||
DA0CC5891EB6B030009A8ED9 /* MPSiteEntity+CoreDataClass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPSiteEntity+CoreDataClass.m"; sourceTree = "<group>"; };
|
||||
DA0CC58A1EB6B030009A8ED9 /* MPSiteEntity+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPSiteEntity+CoreDataProperties.h"; sourceTree = "<group>"; };
|
||||
DA0CC58B1EB6B030009A8ED9 /* MPSiteEntity+CoreDataProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPSiteEntity+CoreDataProperties.m"; sourceTree = "<group>"; };
|
||||
DA24EBB219DAD4D000FF010B /* Icon-60.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-60.png"; sourceTree = "<group>"; };
|
||||
DA24EBB319DAD4D000FF010B /* Icon-60@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-60@2x.png"; sourceTree = "<group>"; };
|
||||
DA24EBB419DAD4D000FF010B /* Icon-60@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-60@3x.png"; sourceTree = "<group>"; };
|
||||
DA24EBB519DAD4D000FF010B /* Icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-76.png"; sourceTree = "<group>"; };
|
||||
DA24EBB619DAD4D000FF010B /* Icon-76@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-76@2x.png"; sourceTree = "<group>"; };
|
||||
DA24EBB719DAD4D000FF010B /* Icon-Small-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-40.png"; sourceTree = "<group>"; };
|
||||
DA24EBB819DAD4D000FF010B /* Icon-Small-40@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-40@2x.png"; sourceTree = "<group>"; };
|
||||
DA24EBB919DAD4D000FF010B /* Icon-Small-40@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-40@3x.png"; sourceTree = "<group>"; };
|
||||
DA24EBBA19DAD4D000FF010B /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small.png"; sourceTree = "<group>"; };
|
||||
DA24EBBB19DAD4D000FF010B /* Icon-Small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small@2x.png"; sourceTree = "<group>"; };
|
||||
DA24EBBC19DAD4D000FF010B /* Icon-Small@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small@3x.png"; sourceTree = "<group>"; };
|
||||
DA24EBBD19DAD4D000FF010B /* iTunesArtwork.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = iTunesArtwork.png; sourceTree = "<group>"; };
|
||||
DA24EBBE19DAD4D000FF010B /* iTunesArtwork@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "iTunesArtwork@2x.png"; sourceTree = "<group>"; };
|
||||
DA24EBBF19DAD4D000FF010B /* icon.sketch */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = icon.sketch; sourceTree = "<group>"; };
|
||||
DA24EBC119DAD4D000FF010B /* 32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 32.png; sourceTree = "<group>"; };
|
||||
DA24EBC219DAD4D000FF010B /* 320-480.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "320-480.png"; sourceTree = "<group>"; };
|
||||
@@ -597,8 +591,6 @@
|
||||
DA24EBC819DAD4D000FF010B /* background@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "background@2x.png"; sourceTree = "<group>"; };
|
||||
DA24EBC919DAD4D000FF010B /* background@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "background@3x.png"; sourceTree = "<group>"; };
|
||||
DA24EBCA19DAD4D000FF010B /* launch.sketch */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = launch.sketch; sourceTree = "<group>"; };
|
||||
DA24EBE619DAD6DE00FF010B /* Icon-320.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-320.png"; sourceTree = "<group>"; };
|
||||
DA24EBE719DAD6DE00FF010B /* Icon-64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-64.png"; sourceTree = "<group>"; };
|
||||
DA250A13195665A100AC23F1 /* UITableView+PearlReloadItems.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+PearlReloadItems.m"; sourceTree = "<group>"; };
|
||||
DA250A14195665A100AC23F1 /* UITableView+PearlReloadItems.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITableView+PearlReloadItems.h"; sourceTree = "<group>"; };
|
||||
DA250A15195665A100AC23F1 /* UICollectionReusableView+PearlDequeue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UICollectionReusableView+PearlDequeue.m"; sourceTree = "<group>"; };
|
||||
@@ -653,6 +645,21 @@
|
||||
DA5BFA4A147E415C00F98B1E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
DA5BFA4C147E415C00F98B1E /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
DA5BFA4E147E415C00F98B1E /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
|
||||
DA5E0E4624589C9A0007FBA7 /* Icon-Small@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small@3x.png"; sourceTree = "<group>"; };
|
||||
DA5E0E4724589C9A0007FBA7 /* Icon-Small-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-40.png"; sourceTree = "<group>"; };
|
||||
DA5E0E4824589C9A0007FBA7 /* Icon-Small-20.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-20.png"; sourceTree = "<group>"; };
|
||||
DA5E0E4924589C9A0007FBA7 /* Icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-76.png"; sourceTree = "<group>"; };
|
||||
DA5E0E4A24589C9A0007FBA7 /* Icon-Small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small@2x.png"; sourceTree = "<group>"; };
|
||||
DA5E0E4B24589C9A0007FBA7 /* Icon-Small-40@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-40@2x.png"; sourceTree = "<group>"; };
|
||||
DA5E0E4C24589C9A0007FBA7 /* Icon-76@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-76@2x.png"; sourceTree = "<group>"; };
|
||||
DA5E0E4D24589C9A0007FBA7 /* Icon-Small-20@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-20@3x.png"; sourceTree = "<group>"; };
|
||||
DA5E0E4E24589C9A0007FBA7 /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small.png"; sourceTree = "<group>"; };
|
||||
DA5E0E4F24589C9A0007FBA7 /* Icon-83@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-83@2x.png"; sourceTree = "<group>"; };
|
||||
DA5E0E5024589C9A0007FBA7 /* Icon-Small-40@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-40@3x.png"; sourceTree = "<group>"; };
|
||||
DA5E0E5124589C9A0007FBA7 /* Icon-60@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-60@3x.png"; sourceTree = "<group>"; };
|
||||
DA5E0E5224589C9B0007FBA7 /* iTunesArtwork@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "iTunesArtwork@2x.png"; sourceTree = "<group>"; };
|
||||
DA5E0E5324589C9B0007FBA7 /* Icon-Small-20@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-20@2x.png"; sourceTree = "<group>"; };
|
||||
DA5E0E5424589C9B0007FBA7 /* Icon-60@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-60@2x.png"; sourceTree = "<group>"; };
|
||||
DA5E5C3C1723681B003798D8 /* Square-bottom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Square-bottom.png"; path = "Dividers/Square-bottom.png"; sourceTree = "<group>"; };
|
||||
DA6701B716406A4100B61001 /* Accounts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accounts.framework; path = System/Library/Frameworks/Accounts.framework; sourceTree = SDKROOT; };
|
||||
DA6701DD16406B7300B61001 /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; };
|
||||
@@ -662,6 +669,7 @@
|
||||
DA67460B18DE7F0C00DFE240 /* Exo2.0-ExtraBold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Exo2.0-ExtraBold.otf"; sourceTree = "<group>"; };
|
||||
DA67460C18DE7F0C00DFE240 /* Exo2.0-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Exo2.0-Bold.otf"; sourceTree = "<group>"; };
|
||||
DA70EC7F1811B13C00F65DB2 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
|
||||
DA72E22F2453B91700676D4F /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
|
||||
DA771FE41E6E1595004D7EDE /* MasterPassword-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MasterPassword-Prefix.pch"; sourceTree = "<group>"; };
|
||||
DA854C8118D4CFBF00106317 /* avatar-add@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "avatar-add@2x.png"; sourceTree = "<group>"; };
|
||||
DA854C8218D4CFBF00106317 /* avatar-add.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "avatar-add.png"; sourceTree = "<group>"; };
|
||||
@@ -1597,6 +1605,7 @@
|
||||
DAE2725A19C93B8E007C5262 /* StoreKit.framework in Frameworks */,
|
||||
DA6701E016406BB400B61001 /* AdSupport.framework in Frameworks */,
|
||||
DA6701DE16406B7300B61001 /* Social.framework in Frameworks */,
|
||||
DA72E2302453B91700676D4F /* WebKit.framework in Frameworks */,
|
||||
DA6701B816406A4100B61001 /* Accounts.framework in Frameworks */,
|
||||
DABB981615100B4000B05417 /* SystemConfiguration.framework in Frameworks */,
|
||||
DA672D3014F9413D004A189C /* libPearl.a in Frameworks */,
|
||||
@@ -1685,21 +1694,21 @@
|
||||
DA24EBB119DAD4D000FF010B /* icon */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DA24EBB219DAD4D000FF010B /* Icon-60.png */,
|
||||
DA24EBB319DAD4D000FF010B /* Icon-60@2x.png */,
|
||||
DA24EBB419DAD4D000FF010B /* Icon-60@3x.png */,
|
||||
DA24EBE719DAD6DE00FF010B /* Icon-64.png */,
|
||||
DA24EBB519DAD4D000FF010B /* Icon-76.png */,
|
||||
DA24EBB619DAD4D000FF010B /* Icon-76@2x.png */,
|
||||
DA24EBE619DAD6DE00FF010B /* Icon-320.png */,
|
||||
DA24EBB719DAD4D000FF010B /* Icon-Small-40.png */,
|
||||
DA24EBB819DAD4D000FF010B /* Icon-Small-40@2x.png */,
|
||||
DA24EBB919DAD4D000FF010B /* Icon-Small-40@3x.png */,
|
||||
DA24EBBA19DAD4D000FF010B /* Icon-Small.png */,
|
||||
DA24EBBB19DAD4D000FF010B /* Icon-Small@2x.png */,
|
||||
DA24EBBC19DAD4D000FF010B /* Icon-Small@3x.png */,
|
||||
DA24EBBD19DAD4D000FF010B /* iTunesArtwork.png */,
|
||||
DA24EBBE19DAD4D000FF010B /* iTunesArtwork@2x.png */,
|
||||
DA5E0E5424589C9B0007FBA7 /* Icon-60@2x.png */,
|
||||
DA5E0E5124589C9A0007FBA7 /* Icon-60@3x.png */,
|
||||
DA5E0E4924589C9A0007FBA7 /* Icon-76.png */,
|
||||
DA5E0E4C24589C9A0007FBA7 /* Icon-76@2x.png */,
|
||||
DA5E0E4F24589C9A0007FBA7 /* Icon-83@2x.png */,
|
||||
DA5E0E4824589C9A0007FBA7 /* Icon-Small-20.png */,
|
||||
DA5E0E5324589C9B0007FBA7 /* Icon-Small-20@2x.png */,
|
||||
DA5E0E4D24589C9A0007FBA7 /* Icon-Small-20@3x.png */,
|
||||
DA5E0E4724589C9A0007FBA7 /* Icon-Small-40.png */,
|
||||
DA5E0E4B24589C9A0007FBA7 /* Icon-Small-40@2x.png */,
|
||||
DA5E0E5024589C9A0007FBA7 /* Icon-Small-40@3x.png */,
|
||||
DA5E0E4E24589C9A0007FBA7 /* Icon-Small.png */,
|
||||
DA5E0E4A24589C9A0007FBA7 /* Icon-Small@2x.png */,
|
||||
DA5E0E4624589C9A0007FBA7 /* Icon-Small@3x.png */,
|
||||
DA5E0E5224589C9B0007FBA7 /* iTunesArtwork@2x.png */,
|
||||
);
|
||||
path = icon;
|
||||
sourceTree = "<group>";
|
||||
@@ -1775,6 +1784,7 @@
|
||||
DA5BFA47147E415C00F98B1E /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DA72E22F2453B91700676D4F /* WebKit.framework */,
|
||||
DAFC1F6F2439795000D1CD66 /* CoreServices.framework */,
|
||||
DAB7AE5C1F3D752900C856B1 /* libjson-c.a */,
|
||||
DA6701B716406A4100B61001 /* Accounts.framework */,
|
||||
@@ -2770,8 +2780,6 @@
|
||||
93D39B050DD5F55E9794EFD4 /* MPPopdownSegue.m */,
|
||||
DABD3BEA1711E2DC00CF925C /* MPPreferencesViewController.h */,
|
||||
DABD3BEB1711E2DC00CF925C /* MPPreferencesViewController.m */,
|
||||
93D3924D6F77E6BF41AC32D3 /* MPRootSegue.h */,
|
||||
93D399493FEDDE74DD1A0C15 /* MPRootSegue.m */,
|
||||
93D39730673227EFF6DEFF19 /* MPSetupViewController.h */,
|
||||
93D39A28369954D147E239BA /* MPSetupViewController.m */,
|
||||
93D39975CE5AEC99E3F086C7 /* MPSiteCell.h */,
|
||||
@@ -3152,7 +3160,7 @@
|
||||
DA5BFA42147E415C00F98B1E /* Resources */,
|
||||
DA6556E314D55F3000841C99 /* Run Script: GIT version -> Info.plist */,
|
||||
4A87858EE3659604089E2F9F /* [CP] Embed Pods Frameworks */,
|
||||
DA3C4EB32439438B00A6C4A8 /* Upload Sentry dSYM */,
|
||||
DA3C4EB32439438B00A6C4A8 /* Sentry dSYM Upload */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -3286,6 +3294,7 @@
|
||||
DA69540617D975D900BF294E /* icon_gears.png in Resources */,
|
||||
DA67460D18DE7F0C00DFE240 /* Exo2.0-Thin.otf in Resources */,
|
||||
DA4522451902355C008F650A /* icon_book@2x.png in Resources */,
|
||||
DA5E0E5F24589C9B0007FBA7 /* Icon-Small-40@3x.png in Resources */,
|
||||
DA32D04919D2F417004F3F0E /* thumb_fuel@2x.png in Resources */,
|
||||
DAFC1F73243989FB00D1CD66 /* Launch Screen.storyboard in Resources */,
|
||||
DABD39371711E29700CF925C /* avatar-0.png in Resources */,
|
||||
@@ -3305,11 +3314,9 @@
|
||||
DA67461018DE7F0C00DFE240 /* Exo2.0-Bold.otf in Resources */,
|
||||
DABD39401711E29700CF925C /* avatar-13.png in Resources */,
|
||||
DA32D07C19D7D784004F3F0E /* background.png in Resources */,
|
||||
DA24EBE919DAD6DE00FF010B /* Icon-64.png in Resources */,
|
||||
DABD39411711E29700CF925C /* avatar-13@2x.png in Resources */,
|
||||
DABD39421711E29700CF925C /* avatar-14.png in Resources */,
|
||||
DABD39431711E29700CF925C /* avatar-14@2x.png in Resources */,
|
||||
DA24EBE819DAD6DE00FF010B /* Icon-320.png in Resources */,
|
||||
DAA1764419D8B82B0044227B /* personal_pw.png in Resources */,
|
||||
DABD39441711E29700CF925C /* avatar-15.png in Resources */,
|
||||
DABD39451711E29700CF925C /* avatar-15@2x.png in Resources */,
|
||||
@@ -3363,11 +3370,14 @@
|
||||
DA32D00919CF5C55004F3F0E /* icon_question.png in Resources */,
|
||||
DABD39561711E29700CF925C /* avatar-6@2x.png in Resources */,
|
||||
DA32D07B19D7D784004F3F0E /* background@2x.png in Resources */,
|
||||
DA5E0E6224589C9B0007FBA7 /* Icon-Small-20@2x.png in Resources */,
|
||||
DABD39571711E29700CF925C /* avatar-7.png in Resources */,
|
||||
DABD39581711E29700CF925C /* avatar-7@2x.png in Resources */,
|
||||
DA5E0E5C24589C9B0007FBA7 /* Icon-Small-20@3x.png in Resources */,
|
||||
DABD39591711E29700CF925C /* avatar-8.png in Resources */,
|
||||
DA32D00A19CF5C55004F3F0E /* icon_question@2x.png in Resources */,
|
||||
DAA1764019D8B82B0044227B /* site_new.png in Resources */,
|
||||
DA5E0E5924589C9B0007FBA7 /* Icon-Small@2x.png in Resources */,
|
||||
DABD395A1711E29700CF925C /* avatar-8@2x.png in Resources */,
|
||||
DABD395B1711E29700CF925C /* avatar-9.png in Resources */,
|
||||
DAA1765419D8B82B0044227B /* choose_type.png in Resources */,
|
||||
@@ -3377,23 +3387,30 @@
|
||||
DA945C8717E3F3FD0053236B /* Images.xcassets in Resources */,
|
||||
DA32D04E19D2F59B004F3F0E /* meter_fuel@3x.png in Resources */,
|
||||
DA25C5FE197DBF200046CDCF /* icon_thumbs-up.png in Resources */,
|
||||
DA5E0E5624589C9B0007FBA7 /* Icon-Small-40.png in Resources */,
|
||||
DABD39871711E29700CF925C /* SourceCodePro-Black.otf in Resources */,
|
||||
DABD39881711E29700CF925C /* SourceCodePro-ExtraLight.otf in Resources */,
|
||||
DABD39A01711E29700CF925C /* icon_action.png in Resources */,
|
||||
DA5E0E5524589C9B0007FBA7 /* Icon-Small@3x.png in Resources */,
|
||||
DABD39A11711E29700CF925C /* icon_action@2x.png in Resources */,
|
||||
DABD39F21711E29700CF925C /* icon_cancel.png in Resources */,
|
||||
DA25C5FB197CCAE00046CDCF /* icon_delete@2x.png in Resources */,
|
||||
DA5E0E5724589C9B0007FBA7 /* Icon-Small-20.png in Resources */,
|
||||
DA29993219C9132F00AF7DF1 /* thumb_generated_login@3x.png in Resources */,
|
||||
DA29992F19C86F5700AF7DF1 /* thumb_generated_login@2x.png in Resources */,
|
||||
DA73049F194E022B00E72520 /* ui_textfield.png in Resources */,
|
||||
DABD39F31711E29700CF925C /* icon_cancel@2x.png in Resources */,
|
||||
DA5E0E5B24589C9B0007FBA7 /* Icon-76@2x.png in Resources */,
|
||||
DABD3A261711E29700CF925C /* icon_edit.png in Resources */,
|
||||
DABD3A271711E29700CF925C /* icon_edit@2x.png in Resources */,
|
||||
DA24EBAF19DAD08C00FF010B /* tip_basic_black_top@2x.png in Resources */,
|
||||
DABD3A3A1711E29700CF925C /* icon_find.png in Resources */,
|
||||
DA5E0E6324589C9B0007FBA7 /* Icon-60@2x.png in Resources */,
|
||||
DABD3A3B1711E29700CF925C /* icon_find@2x.png in Resources */,
|
||||
DAA1765319D8B82B0044227B /* choose_type@2x.png in Resources */,
|
||||
DA5E0E6124589C9B0007FBA7 /* iTunesArtwork@2x.png in Resources */,
|
||||
DABD3AA01711E29800CF925C /* icon_pause.png in Resources */,
|
||||
DA5E0E5A24589C9B0007FBA7 /* Icon-Small-40@2x.png in Resources */,
|
||||
DABD3AA11711E29800CF925C /* icon_pause@2x.png in Resources */,
|
||||
DAA1764219D8B82B0044227B /* settings.png in Resources */,
|
||||
DABD3AAA1711E29800CF925C /* icon_person.png in Resources */,
|
||||
@@ -3418,7 +3435,6 @@
|
||||
DABD3B951711E29800CF925C /* pull-down.png in Resources */,
|
||||
DABD3B961711E29800CF925C /* pull-down@2x.png in Resources */,
|
||||
DABD3B971711E29800CF925C /* pull-up.png in Resources */,
|
||||
DA24EBEA19DAD6EE00FF010B /* Icon-Small.png in Resources */,
|
||||
DA8495321A93049300B3053D /* icon_down@2x.png in Resources */,
|
||||
DABD3B981711E29800CF925C /* pull-up@2x.png in Resources */,
|
||||
DA7304A0194E022B00E72520 /* ui_textfield@2x.png in Resources */,
|
||||
@@ -3427,8 +3443,8 @@
|
||||
DA452249190628A1008F650A /* icon_wrench.png in Resources */,
|
||||
DAA1764519D8B82B0044227B /* name_new@2x.png in Resources */,
|
||||
DA45224819062899008F650A /* icon_settings@2x.png in Resources */,
|
||||
DA5E0E5E24589C9B0007FBA7 /* Icon-83@2x.png in Resources */,
|
||||
DA854C8418D4CFBF00106317 /* avatar-add.png in Resources */,
|
||||
DA24EBEB19DAD6EE00FF010B /* Icon-Small@2x.png in Resources */,
|
||||
DAA1764B19D8B82B0044227B /* login_name@2x.png in Resources */,
|
||||
DABD3C241711E2DC00CF925C /* MasterPassword.entitlements in Resources */,
|
||||
DABD3C251711E2DC00CF925C /* Settings.bundle in Resources */,
|
||||
@@ -3444,16 +3460,18 @@
|
||||
DAA1764619D8B82B0044227B /* name_new.png in Resources */,
|
||||
DA45224B190628B2008F650A /* icon_gear.png in Resources */,
|
||||
DAAA1D4123CD145000F3DF56 /* Storyboard.storyboard in Resources */,
|
||||
DA5E0E6024589C9B0007FBA7 /* Icon-60@3x.png in Resources */,
|
||||
DA8495311A93049300B3053D /* icon_down.png in Resources */,
|
||||
DA5E0E5D24589C9B0007FBA7 /* Icon-Small.png in Resources */,
|
||||
DA25C5FF197DBF200046CDCF /* icon_thumbs-up@2x.png in Resources */,
|
||||
DAE1EF2217E942DE00BC0086 /* Localizable.strings in Resources */,
|
||||
DA5A09DF171A70E4005284AB /* play.png in Resources */,
|
||||
DA24EBEC19DAD6EE00FF010B /* Icon-Small@3x.png in Resources */,
|
||||
DA5A09E0171A70E4005284AB /* play@2x.png in Resources */,
|
||||
DA5A09EA171BB0F7005284AB /* unlocked.png in Resources */,
|
||||
DAA1762819D89B610044227B /* thumb_ios_integration.png in Resources */,
|
||||
DA5A09EB171BB0F7005284AB /* unlocked@2x.png in Resources */,
|
||||
DAA1764F19D8B82B0044227B /* counter@2x.png in Resources */,
|
||||
DA5E0E5824589C9B0007FBA7 /* Icon-76.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -3499,7 +3517,7 @@
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
DA3C4EB32439438B00A6C4A8 /* Upload Sentry dSYM */ = {
|
||||
DA3C4EB32439438B00A6C4A8 /* Sentry dSYM Upload */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 8;
|
||||
files = (
|
||||
@@ -3507,15 +3525,16 @@
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}",
|
||||
);
|
||||
name = "Upload Sentry dSYM";
|
||||
name = "Sentry dSYM Upload";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
shellPath = "/bin/sh -e";
|
||||
shellScript = "if hash sentry-cli 2>/dev/null; then\n if ! ERROR=$(SENTRY_ORG=lyndir SENTRY_PROJECT=masterpassword-ios sentry-cli upload-dif --log-level info \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null); then\n echo >&2 \"warning: sentry-cli: $ERROR\"\n fi\nelse\n echo >&2 \"warning: sentry-cli not installed: try brew install getsentry/tools/sentry-cli\"\nfi\n";
|
||||
shellScript = "if ! hash sentry-cli 2>/dev/null; then\n echo >&2 \"error: sentry-cli not installed. Try brew install getsentry/tools/sentry-cli\"\n exit 1\nfi\n\nSENTRY_ORG=lyndir SENTRY_PROJECT=masterpassword-ios sentry-cli upload-dif --log-level info \"$DWARF_DSYM_FOLDER_PATH\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
DA6556E314D55F3000841C99 /* Run Script: GIT version -> Info.plist */ = {
|
||||
@@ -3618,7 +3637,6 @@
|
||||
93D399D7E08A142776A74CB8 /* MPOverlayViewController.m in Sources */,
|
||||
DA46021D23D5E30B00398FF4 /* MPSecrets.m in Sources */,
|
||||
93D39A27F2506C6FEEF9C588 /* MPAlgorithmV2.m in Sources */,
|
||||
93D39B429C67A62E29DC02DA /* MPRootSegue.m in Sources */,
|
||||
93D392FD5E2052F7D7DB3774 /* NSString+MPMarkDown.m in Sources */,
|
||||
93D395B715D15F2B56F2A2EE /* mpw-types.c in Sources */,
|
||||
93D39943D01E70DAC3B0DF76 /* mpw-util.c in Sources */,
|
||||
@@ -3664,7 +3682,6 @@
|
||||
DAFE4A2E15039824003ABA7C /* PearlStrings.m in Sources */,
|
||||
DAFE4A3015039824003ABA7C /* PearlStringUtils.m in Sources */,
|
||||
DAFE4A3715039824003ABA7C /* PearlKeyChain.m in Sources */,
|
||||
DA72BD7B19C1510C00E6ACFE /* UIView+FontScale.m in Sources */,
|
||||
DA250A17195665A100AC23F1 /* UITableView+PearlReloadItems.m in Sources */,
|
||||
DAFE4A4115039824003ABA7C /* PearlArrayTVC.m in Sources */,
|
||||
DAFE4A4315039824003ABA7C /* PearlBoxView.m in Sources */,
|
||||
@@ -3865,7 +3882,6 @@
|
||||
SKIP_INSTALL = YES;
|
||||
STRIP_INSTALLED_PRODUCT = NO;
|
||||
STRIP_SWIFT_SYMBOLS = NO;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
WARNING_CFLAGS = "-Wno-float-conversion";
|
||||
};
|
||||
@@ -3994,10 +4010,6 @@
|
||||
"\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/include\"",
|
||||
);
|
||||
INFOPLIST_FILE = "Source/iOS/MasterPassword-Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/lib\"",
|
||||
@@ -4005,7 +4017,7 @@
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
"-DMPW_CPERCIVA=0",
|
||||
"-DMPW_JSON=1",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lyndir.lhunath.MasterPassword;
|
||||
PRODUCT_NAME = MasterPassword;
|
||||
@@ -4013,9 +4025,6 @@
|
||||
SKIP_INSTALL = NO;
|
||||
STRIP_INSTALLED_PRODUCT = YES;
|
||||
STRIP_SWIFT_SYMBOLS = YES;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Source/iOS/MasterPassword-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -4028,7 +4037,6 @@
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = NO;
|
||||
CODE_SIGN_ENTITLEMENTS = Source/iOS/MasterPassword.entitlements;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
EXCLUDED_SOURCE_FILE_NAMES = libDCIntrospect.a;
|
||||
GCC_C_LANGUAGE_STANDARD = c11;
|
||||
GCC_PREFIX_HEADER = "Source/MasterPassword-Prefix.pch";
|
||||
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
|
||||
@@ -4038,10 +4046,6 @@
|
||||
"\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/include\"",
|
||||
);
|
||||
INFOPLIST_FILE = "Source/iOS/MasterPassword-Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/lib\"",
|
||||
@@ -4049,7 +4053,7 @@
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
"-DMPW_CPERCIVA=0",
|
||||
"-DMPW_JSON=1",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lyndir.lhunath.MasterPassword;
|
||||
PRODUCT_NAME = MasterPassword;
|
||||
@@ -4057,10 +4061,6 @@
|
||||
SKIP_INSTALL = NO;
|
||||
STRIP_INSTALLED_PRODUCT = YES;
|
||||
STRIP_SWIFT_SYMBOLS = YES;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Source/iOS/MasterPassword-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
@@ -73,6 +73,13 @@
|
||||
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
||||
referenceType = "1">
|
||||
</LocationScenarioReference>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "TERM"
|
||||
value = "color"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Debug"
|
||||
|
||||
@@ -2329,7 +2329,7 @@
|
||||
DAD9B5EE1762CA3A001835F9 /* Copy LoginHelper */,
|
||||
DA6556E314D55F3000841C99 /* Run Script: GIT version -> Info.plist */,
|
||||
43E5966C8C236E86824DDADE /* [CP] Embed Pods Frameworks */,
|
||||
DA3C4EB2243941AE00A6C4A8 /* Upload Sentry dSYM */,
|
||||
DA3C4EB2243941AE00A6C4A8 /* Sentry dSYM Upload */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -2585,7 +2585,7 @@
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MasterPassword-macOS/Pods-MasterPassword-macOS-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
DA3C4EB2243941AE00A6C4A8 /* Upload Sentry dSYM */ = {
|
||||
DA3C4EB2243941AE00A6C4A8 /* Sentry dSYM Upload */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 8;
|
||||
files = (
|
||||
@@ -2593,15 +2593,16 @@
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}",
|
||||
);
|
||||
name = "Upload Sentry dSYM";
|
||||
name = "Sentry dSYM Upload";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
shellPath = "/bin/sh -e";
|
||||
shellScript = "if hash sentry-cli 2>/dev/null; then\n if ! ERROR=$(SENTRY_ORG=lyndir SENTRY_PROJECT=masterpassword-macos sentry-cli upload-dif --log-level info \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null); then\n echo >&2 \"warning: sentry-cli: $ERROR\"\n fi\nelse\n echo >&2 \"warning: sentry-cli not installed: try brew install getsentry/tools/sentry-cli\"\nfi\n";
|
||||
shellScript = "if ! hash sentry-cli 2>/dev/null; then\n echo >&2 \"error: sentry-cli not installed. Try brew install getsentry/tools/sentry-cli\"\n exit 1\nfi\n\nSENTRY_ORG=lyndir SENTRY_PROJECT=masterpassword-macos sentry-cli upload-dif --log-level info \"$DWARF_DSYM_FOLDER_PATH\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
DA4EF9CB19FD4B600032ECB5 /* Run Script: genassets */ = {
|
||||
|
||||
@@ -59,6 +59,17 @@
|
||||
ReferencedContainer = "container:MasterPassword-macOS.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "TERM"
|
||||
value = "color"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<LocationScenarioReference
|
||||
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
||||
referenceType = "1">
|
||||
</LocationScenarioReference>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Debug"
|
||||
|
||||
@@ -59,6 +59,17 @@
|
||||
ReferencedContainer = "container:MasterPassword-macOS.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "TERM"
|
||||
value = "color"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<LocationScenarioReference
|
||||
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
||||
referenceType = "1">
|
||||
</LocationScenarioReference>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -85,6 +85,13 @@
|
||||
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
||||
referenceType = "1">
|
||||
</LocationScenarioReference>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "TERM"
|
||||
value = "color"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -60,6 +60,17 @@
|
||||
ReferencedContainer = "container:MasterPassword-macOS.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "TERM"
|
||||
value = "color"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<LocationScenarioReference
|
||||
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
||||
referenceType = "1">
|
||||
</LocationScenarioReference>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Debug"
|
||||
|
||||
@@ -28,3 +28,14 @@ target 'MasterPassword-macOS' do
|
||||
pod 'KCOrderedAccessorFix'
|
||||
pod 'JRSwizzle'
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
if target.name == 'Countly-iOS' || target.name == 'Countly-macOS'
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
|
||||
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'COUNTLY_EXCLUDE_IDFA=1'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 843 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 236 KiB |
|
Before Width: | Height: | Size: 879 KiB After Width: | Height: | Size: 879 KiB |
@@ -34,7 +34,7 @@ icons=(
|
||||
# 57@1@iphone@:Icon.png
|
||||
# 29@1@iphone@:Icon-Small.png
|
||||
# iPad
|
||||
# 76@1@ipad@7.0:Icon-76.png
|
||||
76@1@ipad@7.0:Icon-76.png
|
||||
152@2@ipad@7.0:Icon-76@2x.png
|
||||
167@2@ipad@9.0:Icon-83@2x.png
|
||||
20@1@ipad@7.0:Icon-Small-20.png
|
||||
|
||||
@@ -621,7 +621,7 @@ static NSOperationQueue *_mpwQueue = nil;
|
||||
|
||||
- (NSString *)exportLoginForSite:(MPSiteEntity *)site usingKey:(MPKey *)key {
|
||||
|
||||
if (!(site.type & MPSiteFeatureExportContent) || site.loginGenerated || ![site.loginName length])
|
||||
if (site.loginGenerated || ![site.loginName length])
|
||||
return nil;
|
||||
|
||||
__block NSData *state = nil;
|
||||
|
||||
@@ -117,7 +117,7 @@ PearlAssociatedObjectProperty( NSMutableArray*, ProductObservers, productObserve
|
||||
[self performPurchaseProductWithIdentifier:productIdentifier quantity:quantity];
|
||||
}]];
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:controller animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:controller animated:YES completion:nil];
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -158,16 +158,16 @@ PearlAssociatedObjectProperty( NSMutableArray*, ProductObservers, productObserve
|
||||
|
||||
- (void)request:(SKRequest *)request didFailWithError:(NSError *)error {
|
||||
|
||||
MPError( error, @"StoreKit request (%@) failed.", request );
|
||||
MPError( error, @"StoreKit request failed." );
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
PearlMainQueue( ^{
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Purchase Failed" message:
|
||||
strf( @"%@\n\n%@", error.localizedDescription,
|
||||
@"Ensure you are online and try logging out and back into iTunes from your device's Settings." )
|
||||
@"Could not reach Apple's iTunes Store. Make sure you're connected to the Internet and try again." )
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:controller animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:controller animated:YES completion:nil];
|
||||
} );
|
||||
#endif
|
||||
}
|
||||
@@ -222,6 +222,17 @@ PearlAssociatedObjectProperty( NSMutableArray*, ProductObservers, productObserve
|
||||
MPError( transaction.error, @"Transaction failed: %@.", transaction.payment.productIdentifier );
|
||||
[queue finishTransaction:transaction];
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
PearlMainQueue( ^{
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Purchase Failed" message:
|
||||
strf( @"%@\n\n%@", transaction.error.localizedDescription,
|
||||
@"Could not reach Apple's iTunes Store. Make sure you're connected to the Internet and try again." )
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.window.rootViewController presentViewController:controller animated:YES completion:nil];
|
||||
} );
|
||||
#endif
|
||||
|
||||
SKProduct *product = self.products[transaction.payment.productIdentifier];
|
||||
[Countly.sharedInstance recordEvent:@"purchase" segmentation:@{
|
||||
@"id": product.productIdentifier,
|
||||
|
||||
@@ -201,6 +201,7 @@
|
||||
}
|
||||
|
||||
@try {
|
||||
[SentrySDK setUser:[[SentryUser alloc] initWithUserId:user.userID]];
|
||||
[Countly.sharedInstance userLoggedIn:user.userID];
|
||||
|
||||
[Countly.sharedInstance recordEvent:@"login" segmentation:@{
|
||||
@@ -248,18 +249,18 @@
|
||||
masterPassword = PearlAwait( ^(void (^setResult)(id)) {
|
||||
PearlMainQueue( ^{
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Enter Old Master Password" message:
|
||||
strf( @"Your old master password is required to migrate the stored password for %@", site.name )
|
||||
strf( @"Your old master password is required to unlock the stored password for: <%@>", site.name )
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[controller addTextFieldWithConfigurationHandler:nil];
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Migrate" style:UIAlertActionStyleDefault handler:
|
||||
^(UIAlertAction *_Nonnull action) {
|
||||
setResult( controller.textFields.firstObject.text );
|
||||
}]];
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Don't Migrate" style:UIAlertActionStyleCancel handler:
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Leave It" style:UIAlertActionStyleCancel handler:
|
||||
^(UIAlertAction *_Nonnull action) {
|
||||
setResult( nil );
|
||||
}]];
|
||||
[self.navigationController presentViewController:controller animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:controller animated:YES completion:nil];
|
||||
} );
|
||||
} );
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
@interface MPAppDelegate_Shared : PearlAppDelegate
|
||||
@interface MPAppDelegate_Shared : UIResponder<UIApplicationDelegate, PearlConfigDelegate>
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -116,9 +116,8 @@ static MPAppDelegate_Shared *instance;
|
||||
if (self.activeUserOID == activeUserOID || [self.activeUserOID isEqual:activeUserOID])
|
||||
return;
|
||||
|
||||
if (self.key)
|
||||
self.key = nil;
|
||||
|
||||
self.key = nil;
|
||||
[SentrySDK setUser:nil];
|
||||
[Countly.sharedInstance userLoggedOut];
|
||||
|
||||
self.activeUserOID = activeUserOID;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
- (id)managedObjectContextChanged:(void ( ^ )(NSDictionary<NSManagedObjectID *, NSString *> *affectedObjects))changedBlock;
|
||||
|
||||
- (MPFixableResult)findAndFixInconsistenciesSaveInContext:(NSManagedObjectContext *)context;
|
||||
- (void)retryCorruptStore;
|
||||
- (void)deleteAndResetStore;
|
||||
|
||||
/** @param completion The block to execute after adding the site, executed from the main thread with the new site in the main MOC. */
|
||||
@@ -39,8 +40,9 @@
|
||||
askImportPassword:(NSString *( ^ )(NSString *userName))importPassword
|
||||
askUserPassword:(NSString *( ^ )(NSString *userName))userPassword
|
||||
result:(void ( ^ )(NSError *error))resultBlock;
|
||||
- (void)exportSitesRevealPasswords:(BOOL)revealPasswords
|
||||
askExportPassword:(NSString *( ^ )(NSString *userName))askImportPassword
|
||||
result:(void ( ^ )(NSString *exportedUser, NSError *error))resultBlock;
|
||||
- (NSString *)exportSitesFor:(MPUserEntity *)user
|
||||
revealPasswords:(BOOL)revealPasswords
|
||||
askExportPassword:(NSString *( ^ )(NSString *userName))askExportPassword
|
||||
error:(__autoreleasing NSError **)error;
|
||||
|
||||
@end
|
||||
|
||||
@@ -232,22 +232,27 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
||||
}];
|
||||
} );
|
||||
|
||||
|
||||
// Create a new store coordinator.
|
||||
NSError *error = nil;
|
||||
NSURL *localStoreURL = [self localStoreURL];
|
||||
if (![[NSFileManager defaultManager] createDirectoryAtURL:[localStoreURL URLByDeletingLastPathComponent]
|
||||
withIntermediateDirectories:YES attributes:nil error:&error]) {
|
||||
MPError( error, @"Couldn't create our application support directory." );
|
||||
PearlRemoveNotificationObserversFrom( self.mainManagedObjectContext );
|
||||
self.mainManagedObjectContext = nil;
|
||||
self.privateManagedObjectContext = nil;
|
||||
return;
|
||||
}
|
||||
if (![self.storeCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:[self localStoreURL]
|
||||
if (![self.storeCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:localStoreURL
|
||||
options:@{
|
||||
NSMigratePersistentStoresAutomaticallyOption: @YES,
|
||||
NSInferMappingModelAutomaticallyOption : @YES,
|
||||
STORE_OPTIONS
|
||||
} error:&error]) {
|
||||
MPError( error, @"Failed to open store." );
|
||||
PearlRemoveNotificationObserversFrom( self.mainManagedObjectContext );
|
||||
self.mainManagedObjectContext = nil;
|
||||
self.privateManagedObjectContext = nil;
|
||||
self.storeCorrupted = @YES;
|
||||
[self handleCoordinatorError:error];
|
||||
return;
|
||||
@@ -274,6 +279,12 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)retryCorruptStore {
|
||||
|
||||
self.storeCorrupted = @NO;
|
||||
[self loadStore];
|
||||
}
|
||||
|
||||
- (void)deleteAndResetStore {
|
||||
|
||||
@synchronized (self) {
|
||||
@@ -704,31 +715,40 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
||||
site.lastUsed = [NSDate dateWithTimeIntervalSince1970:importSite->lastUsed];
|
||||
}
|
||||
|
||||
- (void)exportSitesRevealPasswords:(BOOL)revealPasswords
|
||||
askExportPassword:(NSString *( ^ )(NSString *userName))askImportPassword
|
||||
result:(void ( ^ )(NSString *exportedUser, NSError *error))resultBlock {
|
||||
|
||||
[MPAppDelegate_Shared managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
||||
MPUserEntity *user = [self activeUserInContext:context];
|
||||
- (NSString *)exportSitesFor:(MPUserEntity *)user
|
||||
revealPasswords:(BOOL)revealPasswords
|
||||
askExportPassword:(NSString *( ^ )(NSString *userName))askExportPassword
|
||||
error:(__autoreleasing NSError **)error {
|
||||
|
||||
MPMarshalledUser *exportUser = NULL;
|
||||
MPMarshalledFile *exportFile = NULL;
|
||||
@try {
|
||||
inf( @"Exporting sites, %@, for user: %@", revealPasswords? @"revealing passwords": @"omitting passwords", user.userID );
|
||||
MPMarshalledUser *exportUser = mpw_marshal_user( user.name.UTF8String,
|
||||
mpw_masterKeyProvider_str( askImportPassword( user.name ).UTF8String ), user.algorithm.version );
|
||||
NSString *masterPassword = askExportPassword( user.name );
|
||||
if (!masterPassword) {
|
||||
inf( @"Export cancelled." );
|
||||
return nil;
|
||||
}
|
||||
|
||||
MPKey *key = [[MPKey alloc] initForFullName:user.name withMasterPassword:masterPassword];
|
||||
exportUser = mpw_marshal_user( user.name.UTF8String,
|
||||
mpw_masterKeyProvider_str( masterPassword.UTF8String ), user.algorithm.version );
|
||||
exportUser->redacted = !revealPasswords;
|
||||
exportUser->avatar = (unsigned int)user.avatar;
|
||||
exportUser->keyID = mpw_strdup( [user.keyID encodeHex].UTF8String );
|
||||
exportUser->defaultType = user.defaultType;
|
||||
exportUser->lastUsed = (time_t)user.lastUsed.timeIntervalSince1970;
|
||||
|
||||
for (MPSiteEntity *site in user.sites) {
|
||||
for (MPSiteEntity *site in [user.sites sortedArrayUsingDescriptors:@[
|
||||
[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]
|
||||
]]) {
|
||||
MPCounterValue counter = MPCounterValueInitial;
|
||||
if ([site isKindOfClass:[MPGeneratedSiteEntity class]])
|
||||
counter = ((MPGeneratedSiteEntity *)site).counter;
|
||||
MPMarshalledSite *exportSite = mpw_marshal_site( exportUser,
|
||||
site.name.UTF8String, site.type, counter, site.algorithm.version );
|
||||
exportSite->resultState = mpw_strdup( [site.algorithm exportPasswordForSite:site usingKey:self.key].UTF8String );
|
||||
exportSite->loginState = mpw_strdup( [site.algorithm exportLoginForSite:site usingKey:self.key].UTF8String );
|
||||
exportSite->loginType = site.loginGenerated? MPResultTypeTemplateName: MPResultTypeStatefulPersonal;
|
||||
MPMarshalledSite *exportSite = mpw_marshal_site( exportUser, site.name.UTF8String, site.type, counter, site.algorithm.version );
|
||||
exportSite->resultState = mpw_strdup( [site.algorithm exportPasswordForSite:site usingKey:key].UTF8String );
|
||||
exportSite->loginState = mpw_strdup( [site.algorithm exportLoginForSite:site usingKey:key].UTF8String );
|
||||
exportSite->loginType = site.loginGenerated || !exportSite->loginState? MPResultTypeTemplateName: MPResultTypeStatefulPersonal;
|
||||
exportSite->url = mpw_strdup( site.url.UTF8String );
|
||||
exportSite->uses = (unsigned int)site.uses;
|
||||
exportSite->lastUsed = (time_t)site.lastUsed.timeIntervalSince1970;
|
||||
@@ -737,22 +757,26 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
||||
mpw_marshal_question( exportSite, siteQuestion.keyword.UTF8String );
|
||||
}
|
||||
|
||||
MPMarshalledFile *exportFile = NULL;
|
||||
const char *export = mpw_marshal_write( MPMarshalFormatDefault, &exportFile, exportUser );
|
||||
NSString *exportedUser = nil;
|
||||
if (export && exportFile && exportFile->error.type == MPMarshalSuccess)
|
||||
exportedUser = [NSString stringWithCString:export encoding:NSUTF8StringEncoding];
|
||||
mpw_free_string( &export );
|
||||
|
||||
resultBlock( exportedUser, exportFile && exportFile->error.type == MPMarshalSuccess? nil:
|
||||
[NSError errorWithDomain:MPErrorDomain code:MPErrorMarshalCode userInfo:@{
|
||||
@"type" : @(exportFile? exportFile->error.type: MPMarshalErrorInternal),
|
||||
NSLocalizedDescriptionKey: @(exportFile? exportFile->error.message: nil),
|
||||
}] );
|
||||
if (error)
|
||||
*error = exportFile && exportFile->error.type == MPMarshalSuccess? nil:
|
||||
[NSError errorWithDomain:MPErrorDomain code:MPErrorMarshalCode userInfo:@{
|
||||
@"type" : @(exportFile? exportFile->error.type: MPMarshalErrorInternal),
|
||||
NSLocalizedDescriptionKey: @(exportFile? exportFile->error.message: nil),
|
||||
}];
|
||||
|
||||
return exportedUser;
|
||||
}
|
||||
@finally {
|
||||
mpw_marshal_file_free( &exportFile );
|
||||
mpw_marshal_user_free( &exportUser );
|
||||
mpw_masterKeyProvider_free();
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -20,11 +20,19 @@
|
||||
#import "base64.h"
|
||||
|
||||
// printf <secret> | openssl enc -[ed] -aes-128-cbc -a -A -K <appSecret> -iv 0
|
||||
NSString *appSecret = @"";
|
||||
NSString *appSalt = @"";
|
||||
NSString *sentryDSN = @"";
|
||||
NSString *countlyKey = @"";
|
||||
NSString *countlySalt = @"";
|
||||
#if TARGET_OS_IOS
|
||||
NSString *appSecret = @"946a6b12e6e6e004cc35bad1ea11478c";
|
||||
NSString *appSalt = @"uBcsbZeTB8TfSS7dDw4yUq6wMZD/2nREvR0mqzqsNXvv9guh+62hkt99ly6QcJ5n";
|
||||
NSString *sentryDSN = @"tmVjdMN9DpZ+0EIrrvHi44hWfaBkwrlrxjBkdeau2rDk+zlvgSdAZkAvNj7m1V+5NUR7i8Y/NumNKOaYlWJvPynEMJ4ZBvPepSbivgVvmr8=";
|
||||
NSString *countlyKey = @"mDnMZyxwoq4ENgYnGYTzW8wsyiJQlmNKxkRLj88/nrs0mzE+zVjs6Y5LAT3+AYBB";
|
||||
NSString *countlySalt = @"2COFsZd+4FNAU6jvI/HUu297mkZALzRIyKv5mD3vs55BHXDowh62A7FursCYS+cG";
|
||||
#elif TARGET_OS_MAC
|
||||
NSString *appSecret = @"24fcbadccb5789b2a969c0c811f86702";
|
||||
NSString *appSalt = @"0N1fzSanIOCb7OQ4hEshXSjwEPXAXMhPBKQJeEcYPor8FWz76IpdB8ZHa3Wyb7o9";
|
||||
NSString *sentryDSN = @"2RbeS9wfzQEOKB9MG3EWLDe+N8iXYNtWc8tovMcBmhuMIeyAHYKqo5eclSEYyM6lA73Y7FFHqUyTLbEmOR6MAU2PtWAitLdxOZlq3VnbXjI=";
|
||||
NSString *countlyKey = @"uiasXoQNtkPQHvpvNqEE5N/tw/F1Hnzm+4ViSJ38EMeoWGvDQPJ+Kt9zPhb8Qans";
|
||||
NSString *countlySalt = @"/raQUNxKQdxXRR5VFmCDJdyyJE8f6SPrTO5Y4z0kJH+wCrjaZ1VvCq+JSmOsBkz2";
|
||||
#endif
|
||||
|
||||
NSString *decrypt(NSString *secret) {
|
||||
|
||||
|
||||
@@ -41,8 +41,9 @@ __END_DECLS
|
||||
\
|
||||
if (__error && [[MPConfig get].sendInfo boolValue]) { \
|
||||
SentryEvent *event = [[SentryEvent alloc] initWithLevel:kSentryLevelError]; \
|
||||
event.message = strf(@"%@: %@", message_, [__error localizedDescription]); \
|
||||
event.message = strf( message_ @": %@", ##__VA_ARGS__, [__error localizedDescription]); \
|
||||
event.logger = @"MPError"; \
|
||||
event.fingerprint = @[ message_, __error.domain, @(__error.code) ]; \
|
||||
[SentrySDK captureEvent:event]; \
|
||||
} \
|
||||
__error; \
|
||||
|
||||
@@ -12,9 +12,6 @@
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<menu title="AMainMenu" systemMenu="main" id="29">
|
||||
<point key="canvasLocation" x="139" y="155"/>
|
||||
</menu>
|
||||
<customObject id="494" customClass="MPMacAppDelegate">
|
||||
<connections>
|
||||
<outlet property="createUserItem" destination="757" id="763"/>
|
||||
@@ -241,6 +238,9 @@
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="494" id="Slu-zT-yO4"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="140" y="23"/>
|
||||
</menu>
|
||||
</objects>
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
#import "MPSitesWindowController.h"
|
||||
#import "MPInitialWindowController.h"
|
||||
|
||||
@interface MPMacAppDelegate : MPAppDelegate_Shared<NSApplicationDelegate>
|
||||
@interface MPMacAppDelegate : MPAppDelegate_Shared<NSApplicationDelegate, NSMenuDelegate>
|
||||
|
||||
@property(nonatomic, strong) NSStatusItem *statusView;
|
||||
@property(nonatomic, strong) NSStatusItem *statusItem;
|
||||
@property(nonatomic, strong) MPSitesWindowController *sitesWindowController;
|
||||
@property(nonatomic, strong) MPInitialWindowController *initialWindowController;
|
||||
@property(nonatomic, weak) IBOutlet NSMenuItem *lockItem;
|
||||
|
||||
@@ -68,7 +68,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
|
||||
@try {
|
||||
// Sentry
|
||||
[SentrySDK initWithOptions:@{
|
||||
[SentrySDK startWithOptions:@{
|
||||
@"dsn" : NilToNSNull( decrypt( sentryDSN ) ),
|
||||
#ifdef DEBUG
|
||||
@"debug" : @(YES),
|
||||
@@ -80,7 +80,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
@"debug" : @(NO),
|
||||
@"environment" : @"Private",
|
||||
#endif
|
||||
@"enabled" : [MPMacConfig get].sendInfo,
|
||||
@"enabled" : @([[MPMacConfig get].sendInfo boolValue] || ![[MPMacConfig get].sendInfoDecided boolValue]),
|
||||
@"enableAutoSessionTracking": @(YES),
|
||||
}];
|
||||
[[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) {
|
||||
@@ -158,12 +158,10 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
} forKeyPath:@"activeUser" options:0 context:nil];
|
||||
|
||||
// Status item.
|
||||
self.statusView = [[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength];
|
||||
self.statusView.image = [NSImage imageNamed:@"menu-icon"];
|
||||
self.statusView.image.template = YES;
|
||||
self.statusView.menu = self.statusMenu;
|
||||
self.statusView.target = self;
|
||||
self.statusView.action = @selector( showMenu );
|
||||
self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength];
|
||||
self.statusItem.menu = self.statusMenu;
|
||||
self.statusItem.button.image = [NSImage imageNamed:@"menu-icon"];
|
||||
self.statusItem.button.image.template = YES;
|
||||
|
||||
PearlAddNotificationObserver( NSPersistentStoreCoordinatorStoresWillChangeNotification, self.storeCoordinator, nil,
|
||||
^(id self, NSNotification *note) {
|
||||
@@ -502,7 +500,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
|
||||
- (IBAction)showPopup:(id)sender {
|
||||
|
||||
[self.statusView popUpStatusItemMenu:self.statusView.menu];
|
||||
[[self.statusItem button] performClick:sender];
|
||||
}
|
||||
|
||||
- (IBAction)showPasswordWindow:(id)sender {
|
||||
@@ -546,15 +544,6 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
return;
|
||||
}
|
||||
|
||||
if (!self.key) {
|
||||
NSAlert *alert = [NSAlert new];
|
||||
alert.messageText = @"User Locked";
|
||||
alert.informativeText = @"To export your sites, first unlock your user by opening Master Password.";
|
||||
[alert runModal];
|
||||
[self showPopup:nil];
|
||||
return;
|
||||
}
|
||||
|
||||
NSDateFormatter *exportDateFormatter = [NSDateFormatter new];
|
||||
[exportDateFormatter setDateFormat:@"yyyy'-'MM'-'dd"];
|
||||
|
||||
@@ -579,43 +568,46 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
if ([savePanel runModal] == NSFileHandlingPanelCancelButton)
|
||||
return;
|
||||
|
||||
[self exportSitesRevealPasswords:revealPasswords
|
||||
askExportPassword:^NSString *(NSString *userName) {
|
||||
return PearlMainQueueAwait( ^id {
|
||||
NSAlert *alert = [NSAlert new];
|
||||
[alert addButtonWithTitle:@"Import"];
|
||||
[alert addButtonWithTitle:@"Cancel"];
|
||||
alert.messageText = strf( @"Master Password For\n%@", userName );
|
||||
alert.informativeText = @"Enter the current master password for this user.";
|
||||
alert.accessoryView = [[NSSecureTextField alloc] initWithFrame:NSMakeRect( 0, 0, 200, 22 )];
|
||||
[alert layout];
|
||||
if ([alert runModal] == NSAlertFirstButtonReturn)
|
||||
return ((NSTextField *)alert.accessoryView).stringValue;
|
||||
else
|
||||
return nil;
|
||||
} );
|
||||
} result:^(NSString *mpsites, NSError *error) {
|
||||
if (!mpsites || error) {
|
||||
PearlMainQueue( ^{
|
||||
[[NSAlert alertWithError:MPError( error, @"Failed to export mpsites." )] runModal];
|
||||
[MPMacAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
||||
NSError *error = nil;
|
||||
NSString *exportedUser = [self exportSitesFor:[self activeUserInContext:context] revealPasswords:revealPasswords askExportPassword:
|
||||
^NSString *(NSString *userName) {
|
||||
return PearlMainQueueAwait( ^id {
|
||||
NSAlert *alert = [NSAlert new];
|
||||
[alert addButtonWithTitle:@"Export"];
|
||||
[alert addButtonWithTitle:@"Cancel"];
|
||||
alert.messageText = strf( @"Master Password For\n%@", userName );
|
||||
alert.informativeText = @"Enter the current master password for this user.";
|
||||
alert.accessoryView = [[NSSecureTextField alloc] initWithFrame:NSMakeRect( 0, 0, 200, 22 )];
|
||||
[alert layout];
|
||||
if ([alert runModal] == NSAlertFirstButtonReturn)
|
||||
return ((NSTextField *)alert.accessoryView).stringValue;
|
||||
else
|
||||
return nil;
|
||||
} );
|
||||
return;
|
||||
}
|
||||
} error:&error];
|
||||
|
||||
NSError *coordinateError = nil;
|
||||
[[[NSFileCoordinator alloc] initWithFilePresenter:nil]
|
||||
coordinateWritingItemAtURL:savePanel.URL options:0 error:&coordinateError byAccessor:^(NSURL *newURL) {
|
||||
NSError *writeError = nil;
|
||||
if (![mpsites writeToURL:newURL atomically:NO encoding:NSUTF8StringEncoding error:&writeError])
|
||||
PearlMainQueue( ^{
|
||||
[[NSAlert alertWithError:MPError( writeError, @"Could not write to the export file." )] runModal];
|
||||
} );
|
||||
}];
|
||||
if (coordinateError)
|
||||
PearlMainQueue( ^{
|
||||
[[NSAlert alertWithError:MPError( coordinateError, @"Could not gain access to the export file." )] runModal];
|
||||
} );
|
||||
}];
|
||||
if (error)
|
||||
PearlMainQueue( ^{
|
||||
[[NSAlert alertWithError:MPError( error, @"Failed to export mpsites." )] runModal];
|
||||
} );
|
||||
if (!exportedUser)
|
||||
return;
|
||||
|
||||
NSError *coordinateError = nil;
|
||||
[[[NSFileCoordinator alloc] initWithFilePresenter:nil]
|
||||
coordinateWritingItemAtURL:savePanel.URL options:0 error:&coordinateError byAccessor:^(NSURL *newURL) {
|
||||
NSError *writeError = nil;
|
||||
if (![exportedUser writeToURL:newURL atomically:NO encoding:NSUTF8StringEncoding error:&writeError])
|
||||
PearlMainQueue( ^{
|
||||
[[NSAlert alertWithError:MPError( writeError, @"Could not write to the export file." )] runModal];
|
||||
} );
|
||||
}];
|
||||
if (coordinateError)
|
||||
PearlMainQueue( ^{
|
||||
[[NSAlert alertWithError:MPError( coordinateError, @"Could not gain access to the export file." )] runModal];
|
||||
} );
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)updateUsers {
|
||||
@@ -688,13 +680,6 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
[self updateMenuItems];
|
||||
}
|
||||
|
||||
- (void)showMenu {
|
||||
|
||||
[self updateMenuItems];
|
||||
|
||||
[self.statusView popUpStatusItemMenu:self.statusView.menu];
|
||||
}
|
||||
|
||||
- (void)updateMenuItems {
|
||||
|
||||
MPUserEntity *activeUser = [self activeUserForMainThread];
|
||||
@@ -749,6 +734,13 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - NSMenuDelegate
|
||||
|
||||
- (void)menuNeedsUpdate:(NSMenu *)menu {
|
||||
|
||||
[self updateMenuItems];
|
||||
}
|
||||
|
||||
#pragma mark - PearlConfigDelegate
|
||||
|
||||
- (void)didUpdateConfigForKey:(SEL)configKey fromValue:(id)oldValue {
|
||||
@@ -769,13 +761,9 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
|
||||
// Send info
|
||||
NSArray *countlyFeatures = @[
|
||||
CLYConsentEvents, CLYConsentUserDetails, CLYConsentCrashReporting, CLYConsentViewTracking, CLYConsentStarRating
|
||||
CLYConsentSessions, CLYConsentEvents, CLYConsentUserDetails, CLYConsentCrashReporting, CLYConsentViewTracking, CLYConsentStarRating
|
||||
];
|
||||
if ([[MPConfig get].sendInfo boolValue] || ![[MPConfig get].sendInfoDecided boolValue])
|
||||
[Countly.sharedInstance giveConsentForFeature:CLYConsentSessions];
|
||||
else
|
||||
[Countly.sharedInstance cancelConsentForFeature:CLYConsentSessions];
|
||||
if ([[MPMacConfig get].sendInfo boolValue]) {
|
||||
if ([[MPMacConfig get].sendInfo boolValue] || ![[MPMacConfig get].sendInfoDecided boolValue]) {
|
||||
if ([PearlLogger get].printLevel > PearlLogLevelInfo)
|
||||
[PearlLogger get].printLevel = PearlLogLevelInfo;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
@property(nonatomic, readonly) BOOL stored;
|
||||
@property(nonatomic, readonly) BOOL transient;
|
||||
|
||||
- (instancetype)initWithEntity:(MPSiteEntity *)entity fuzzyGroups:(NSArray *)fuzzyGroups;
|
||||
- (instancetype)initWithEntity:(MPSiteEntity *)entity queryGroups:(NSArray *)queryGroups;
|
||||
- (instancetype)initWithName:(NSString *)siteName forUser:(MPUserEntity *)user;
|
||||
- (MPSiteEntity *)entityInContext:(NSManagedObjectContext *)moc;
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
|
||||
@implementation MPSiteModel
|
||||
|
||||
- (instancetype)initWithEntity:(MPSiteEntity *)entity fuzzyGroups:(NSArray *)fuzzyGroups {
|
||||
- (instancetype)initWithEntity:(MPSiteEntity *)entity queryGroups:(NSArray *)queryGroups {
|
||||
|
||||
if (!(self = [super init]))
|
||||
return nil;
|
||||
|
||||
[self setEntity:entity fuzzyGroups:fuzzyGroups];
|
||||
[self setEntity:entity queryGroups:queryGroups];
|
||||
self.initialized = YES;
|
||||
|
||||
return self;
|
||||
@@ -53,23 +53,25 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setEntity:(MPSiteEntity *)entity fuzzyGroups:(NSArray *)fuzzyGroups {
|
||||
- (void)setEntity:(MPSiteEntity *)entity queryGroups:(NSArray *)queryGroups {
|
||||
|
||||
if ([self.entityOID isEqual:entity.permanentObjectID])
|
||||
return;
|
||||
self.entityOID = entity.permanentObjectID;
|
||||
|
||||
NSString *siteName = entity.name;
|
||||
NSMutableAttributedString *attributedSiteName = [[NSMutableAttributedString alloc] initWithString:siteName];
|
||||
for (NSUInteger f = 0, s = (NSUInteger)-1; f < [fuzzyGroups count]; ++f) {
|
||||
s = [siteName rangeOfString:fuzzyGroups[f] options:NSDiacriticInsensitiveSearch | NSCaseInsensitiveSearch
|
||||
range:NSMakeRange( s + 1, [siteName length] - (s + 1) )].location;
|
||||
if (s == NSNotFound)
|
||||
break;
|
||||
NSMutableAttributedString *attributedSiteName = [[NSMutableAttributedString alloc] initWithString:siteName?: @""];
|
||||
if ([attributedSiteName length])
|
||||
for (NSUInteger f = 0, s = 0; f < [queryGroups count]; ++f, ++s) {
|
||||
s = [siteName rangeOfString:queryGroups[f] options:NSDiacriticInsensitiveSearch | NSCaseInsensitiveSearch
|
||||
range:NSMakeRange( s, [siteName length] - s )].location;
|
||||
if (s == NSNotFound)
|
||||
break;
|
||||
|
||||
[attributedSiteName addAttribute:NSBackgroundColorAttributeName value:[NSColor alternateSelectedControlColor]
|
||||
range:NSMakeRange( s, [queryGroups[f] length] )];
|
||||
}
|
||||
|
||||
[attributedSiteName addAttribute:NSBackgroundColorAttributeName value:[NSColor alternateSelectedControlColor]
|
||||
range:NSMakeRange( s, [fuzzyGroups[f] length] )];
|
||||
}
|
||||
NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new];
|
||||
paragraphStyle.alignment = NSCenterTextAlignment;
|
||||
[attributedSiteName addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange( 0, [siteName length] )];
|
||||
@@ -179,7 +181,8 @@
|
||||
if (algorithmVersion == self.algorithm.version)
|
||||
return;
|
||||
[self willChangeValueForKey:@"outdated"];
|
||||
self.algorithm = MPAlgorithmForVersion( algorithmVersion )?: self.algorithm;
|
||||
self.algorithm =
|
||||
MPAlgorithmForVersion( MIN( MPAlgorithmVersionLast, MAX( MPAlgorithmVersionFirst, algorithmVersion ) ) )?: self.algorithm;
|
||||
[self didChangeValueForKey:@"outdated"];
|
||||
|
||||
if (self.entityOID)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import <Countly/Countly.h>
|
||||
#import <UserNotifications/UserNotifications.h>
|
||||
#import "MPSitesWindowController.h"
|
||||
#import "MPMacAppDelegate.h"
|
||||
#import "MPAppDelegate_Store.h"
|
||||
@@ -52,13 +53,10 @@
|
||||
|
||||
if (![[MPMacConfig get].sendInfoDecided boolValue]) {
|
||||
NSAlert *alert = [NSAlert new];
|
||||
alert.messageText = @"Welcome to Master Password!";
|
||||
alert.informativeText = @"We want you to have a top-notch experience.\n"
|
||||
@"Using diagnostics, we ensure the application keeps working as designed for you.\n"
|
||||
@"\n"
|
||||
@"We look out for application bugs, runtime issues, sudden crashes & usage counters.\n"
|
||||
@"Needless to say, diagnostics are always scrubbed and personal details will never leave your device.";
|
||||
[alert addButtonWithTitle:@"Thanks!"];
|
||||
alert.messageText = @"Diagnostics";
|
||||
alert.informativeText = @"We look for bugs, sudden crashes, runtime issues & statistics.\n\n"
|
||||
@"Diagnostics are scrubbed and personal details will never leave your device.";
|
||||
[alert addButtonWithTitle:@"Engage"];
|
||||
[alert addButtonWithTitle:@"Disable"];
|
||||
[alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {
|
||||
[MPMacConfig get].sendInfo = @(returnCode != NSAlertSecondButtonReturn);
|
||||
@@ -99,7 +97,16 @@
|
||||
self.siteTable.superview.superview.layer.mask = self.siteGradient;
|
||||
|
||||
self.siteTable.controller = self;
|
||||
prof_finish( @"ui" );
|
||||
prof_rewind( @"ui" );
|
||||
|
||||
if (@available( macOS 10.14, * )) {
|
||||
[[UNUserNotificationCenter currentNotificationCenter]
|
||||
requestAuthorizationWithOptions:UNAuthorizationOptionAlert completionHandler:^(BOOL granted, NSError *error) {
|
||||
if (!granted)
|
||||
err( @"Couldn't obtain notification authorization: %@", error );
|
||||
}];
|
||||
}
|
||||
prof_finish( @"notifications" );
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
@@ -550,13 +557,19 @@
|
||||
[self copyContent:self.shiftPressed? selectedSite.loginName: selectedSite.content];
|
||||
[NSApp hide:nil];
|
||||
|
||||
NSUserNotification *notification = [NSUserNotification new];
|
||||
notification.title = @"Password Copied";
|
||||
if (selectedSite.loginName.length)
|
||||
notification.subtitle = strf( @"%@ at %@", selectedSite.loginName, selectedSite.name );
|
||||
else
|
||||
notification.subtitle = selectedSite.name;
|
||||
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
|
||||
if (@available( macOS 10.14, * )) {
|
||||
UNMutableNotificationContent *notification = [UNMutableNotificationContent new];
|
||||
notification.title = self.shiftPressed? @"Login Copied": @"Password Copied";
|
||||
if (selectedSite.loginName.length)
|
||||
notification.subtitle = strf( @"%@ at %@", selectedSite.loginName, selectedSite.name );
|
||||
else
|
||||
notification.subtitle = selectedSite.name;
|
||||
[[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:
|
||||
[UNNotificationRequest requestWithIdentifier:selectedSite.name content:notification trigger:nil]
|
||||
withCompletionHandler:^(NSError *error) {
|
||||
dbg( @"notification: %@, completed w/errror: %@", notification, error );
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateUser {
|
||||
@@ -598,22 +611,20 @@
|
||||
return;
|
||||
}
|
||||
|
||||
static NSRegularExpression *fuzzyRE;
|
||||
static dispatch_once_t once = 0;
|
||||
dispatch_once( &once, ^{
|
||||
fuzzyRE = [NSRegularExpression regularExpressionWithPattern:@"(.)" options:0 error:nil];
|
||||
} );
|
||||
|
||||
prof_new( @"updateSites" );
|
||||
NSString *queryString = self.siteField.stringValue;
|
||||
NSString *queryPattern = [[queryString stringByReplacingMatchesOfExpression:fuzzyRE withTemplate:@"*$1"] stringByAppendingString:@"*"];
|
||||
NSMutableArray *queryGroups = [NSMutableArray new];
|
||||
NSMutableString *queryPattern = [NSMutableString new];
|
||||
[queryString enumerateSubstringsInRange: NSMakeRange(0, [queryString length]) options: NSStringEnumerationByComposedCharacterSequences
|
||||
usingBlock: ^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
|
||||
if (substringRange.location < 10) {
|
||||
[queryGroups addObject:substring];
|
||||
[queryPattern appendString:@"*"];
|
||||
}
|
||||
[queryPattern appendString:substring];
|
||||
}];
|
||||
[queryPattern appendString:@"*"];
|
||||
prof_rewind( @"queryPattern" );
|
||||
NSMutableArray *fuzzyGroups = [NSMutableArray new];
|
||||
[fuzzyRE enumerateMatchesInString:queryString options:0 range:NSMakeRange( 0, queryString.length )
|
||||
usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {
|
||||
[fuzzyGroups addObject:[queryString substringWithRange:result.range]];
|
||||
}];
|
||||
prof_rewind( @"fuzzyRE" );
|
||||
[MPMacAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
||||
prof_rewind( @"moc" );
|
||||
|
||||
@@ -635,7 +646,7 @@
|
||||
BOOL exact = NO;
|
||||
NSMutableArray *newSites = [NSMutableArray arrayWithCapacity:[siteResults count]];
|
||||
for (MPSiteEntity *site in siteResults) {
|
||||
[newSites addObject:[[MPSiteModel alloc] initWithEntity:site fuzzyGroups:fuzzyGroups]];
|
||||
[newSites addObject:[[MPSiteModel alloc] initWithEntity:site queryGroups:queryGroups]];
|
||||
exact |= [site.name isEqualToString:queryString];
|
||||
}
|
||||
prof_rewind( @"newSites: %u, exact: %d", (uint)[siteResults count], exact );
|
||||
|
||||
@@ -722,7 +722,7 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
<shadow key="shadow">
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<stepperCell key="cell" continuous="YES" alignment="left" minValue="1" maxValue="1000" doubleValue="1" id="73y-03-zHt"/>
|
||||
<stepperCell key="cell" continuous="YES" alignment="left" maxValue="4294967295" doubleValue="1" valueWraps="YES" id="73y-03-zHt"/>
|
||||
<connections>
|
||||
<binding destination="mcS-ik-b0n" name="value" keyPath="selection.algorithmVersion" id="GyA-hK-6cD"/>
|
||||
</connections>
|
||||
@@ -776,7 +776,7 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
<shadow key="shadow">
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<stepperCell key="cell" continuous="YES" alignment="left" minValue="1" maxValue="1000" doubleValue="1" id="ikF-n4-xiI"/>
|
||||
<stepperCell key="cell" continuous="YES" alignment="left" minValue="1" maxValue="4294967295" doubleValue="1" valueWraps="YES" id="ikF-n4-xiI"/>
|
||||
<connections>
|
||||
<binding destination="mcS-ik-b0n" name="value" keyPath="selection.counter" id="qmm-6z-boy"/>
|
||||
</connections>
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
[super viewDidLoad];
|
||||
|
||||
self.mode = MPCombinedModeUserSelection;
|
||||
[self performSegueWithIdentifier:@"users" sender:self];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#import "MPNavigationController.h"
|
||||
#import "MPWebViewController.h"
|
||||
#import "MPiOSAppDelegate.h"
|
||||
|
||||
@implementation MPNavigationController
|
||||
|
||||
@@ -29,6 +30,16 @@
|
||||
[self performSegueWithIdentifier:@"setup" sender:self];
|
||||
}
|
||||
|
||||
- (void)performSegueWithIdentifier:(NSString *)identifier sender:(id)sender {
|
||||
|
||||
if ([identifier isEqualToString:@"web"] && [[(NSURL *)sender scheme] isEqualToString:@"masterpassword"]) {
|
||||
[[MPiOSAppDelegate get] openURL:sender];
|
||||
return;
|
||||
}
|
||||
|
||||
[super performSegueWithIdentifier:identifier sender:sender];
|
||||
}
|
||||
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
|
||||
if ([segue.identifier isEqualToString:@"web"])
|
||||
|
||||
@@ -33,13 +33,6 @@
|
||||
self.dismissSegueByButton = [NSMutableDictionary dictionary];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
|
||||
[super viewDidLoad];
|
||||
|
||||
[self performSegueWithIdentifier:@"root" sender:self];
|
||||
}
|
||||
|
||||
- (UIViewController *)childViewControllerForStatusBarStyle {
|
||||
|
||||
return [self.childViewControllers lastObject];
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
//==============================================================================
|
||||
// This file is part of Master Password.
|
||||
// Copyright (c) 2011-2017, Maarten Billemont.
|
||||
//
|
||||
// Master Password is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Master Password is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You can find a copy of the GNU General Public License in the
|
||||
// LICENSE file. Alternatively, see <http://www.gnu.org/licenses/>.
|
||||
//==============================================================================
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MPRootSegue : UIStoryboardSegue
|
||||
|
||||
@end
|
||||
@@ -1,35 +0,0 @@
|
||||
//==============================================================================
|
||||
// This file is part of Master Password.
|
||||
// Copyright (c) 2011-2017, Maarten Billemont.
|
||||
//
|
||||
// Master Password is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Master Password is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You can find a copy of the GNU General Public License in the
|
||||
// LICENSE file. Alternatively, see <http://www.gnu.org/licenses/>.
|
||||
//==============================================================================
|
||||
|
||||
#import "MPRootSegue.h"
|
||||
|
||||
@implementation MPRootSegue
|
||||
|
||||
- (void)perform {
|
||||
|
||||
UIViewController *sourceViewController = self.sourceViewController;
|
||||
UIViewController *destinationViewController = self.destinationViewController;
|
||||
[sourceViewController addChildViewController:destinationViewController];
|
||||
destinationViewController.view.frame = sourceViewController.view.bounds;
|
||||
destinationViewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
[sourceViewController.view addSubview:destinationViewController.view];
|
||||
[destinationViewController didMoveToParentViewController:sourceViewController];
|
||||
[sourceViewController setNeedsStatusBarAppearanceUpdate];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -27,7 +27,7 @@ typedef NS_ENUM ( NSUInteger, MPSiteCellMode ) {
|
||||
|
||||
@interface MPSiteCell : MPCell<UIScrollViewDelegate, UITextFieldDelegate>
|
||||
|
||||
@property(nonatomic) NSArray *fuzzyGroups;
|
||||
@property(nonatomic) NSArray *queryGroups;
|
||||
|
||||
- (void)setSite:(MPSiteEntity *)site animated:(BOOL)animated;
|
||||
- (void)setTransientSite:(NSString *)siteName animated:(BOOL)animated;
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
[super prepareForReuse];
|
||||
|
||||
self.siteOID = nil;
|
||||
self.fuzzyGroups = nil;
|
||||
self.queryGroups = nil;
|
||||
self.transientSite = nil;
|
||||
self.mode = MPPasswordCellModePassword;
|
||||
[self updateAnimated:NO];
|
||||
@@ -150,11 +150,11 @@
|
||||
|
||||
#pragma mark - State
|
||||
|
||||
- (void)setFuzzyGroups:(NSArray *)fuzzyGroups {
|
||||
- (void)setQueryGroups:(NSArray *)queryGroups {
|
||||
|
||||
if (self.fuzzyGroups == fuzzyGroups)
|
||||
if (self.queryGroups == queryGroups)
|
||||
return;
|
||||
_fuzzyGroups = fuzzyGroups;
|
||||
_queryGroups = queryGroups;
|
||||
|
||||
[self updateSiteName:[self siteInContext:[MPiOSAppDelegate managedObjectContextForMainThreadIfReady]]];
|
||||
}
|
||||
@@ -263,6 +263,7 @@
|
||||
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:strf( @"Delete %@?", site.name ) message:nil
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
[controller.popoverPresentationController setSourceView:sender];
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Delete Site" style:UIAlertActionStyleDestructive
|
||||
handler:^(UIAlertAction *_Nonnull action) {
|
||||
[MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
||||
@@ -284,6 +285,7 @@
|
||||
MPSiteEntity *mainSite = [self siteInContext:[MPiOSAppDelegate managedObjectContextForMainThreadIfReady]];
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Change Password Type" message:nil
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
[controller.popoverPresentationController setSourceView:sender];
|
||||
for (NSNumber *typeNumber in [mainSite.algorithm allTypes]) {
|
||||
MPResultType type = (MPResultType)[typeNumber unsignedIntegerValue];
|
||||
NSString *typeName = [mainSite.algorithm nameOfType:type];
|
||||
@@ -425,7 +427,7 @@
|
||||
if (!site || ![site isKindOfClass:[MPGeneratedSiteEntity class]])
|
||||
return;
|
||||
|
||||
((MPGeneratedSiteEntity *)site).counter = 1;
|
||||
((MPGeneratedSiteEntity *)site).counter = MPCounterValueInitial;
|
||||
[context saveToStore];
|
||||
|
||||
[PearlOverlay showTemporaryOverlayWithTitle:@"Counter Reset" dismissAfter:2];
|
||||
@@ -444,6 +446,7 @@
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Create Site" message:
|
||||
strf( @"Remember site named:\n%@", self.transientSite )
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
[controller.popoverPresentationController setSourceView:sender];
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:
|
||||
^(UIAlertAction *_Nonnull action) {
|
||||
[[MPiOSAppDelegate get]
|
||||
@@ -653,14 +656,14 @@
|
||||
NSString *siteName = self.transientSite?: site.name;
|
||||
NSMutableAttributedString *attributedSiteName = [[NSMutableAttributedString alloc] initWithString:siteName?: @""];
|
||||
if ([attributedSiteName length])
|
||||
for (NSUInteger f = 0, s = (NSUInteger)-1; f < [self.fuzzyGroups count]; ++f) {
|
||||
s = [siteName rangeOfString:self.fuzzyGroups[f] options:NSDiacriticInsensitiveSearch | NSCaseInsensitiveSearch
|
||||
range:NSMakeRange( s + 1, [siteName length] - (s + 1) )].location;
|
||||
for (NSUInteger f = 0, s = 0; f < [self.queryGroups count]; ++f, ++s) {
|
||||
s = [siteName rangeOfString:self.queryGroups[f] options:NSDiacriticInsensitiveSearch | NSCaseInsensitiveSearch
|
||||
range:NSMakeRange( s, [siteName length] - s )].location;
|
||||
if (s == NSNotFound)
|
||||
break;
|
||||
|
||||
[attributedSiteName addAttribute:NSBackgroundColorAttributeName value:[UIColor redColor]
|
||||
range:NSMakeRange( s, [self.fuzzyGroups[f] length] )];
|
||||
range:NSMakeRange( s, [self.queryGroups[f] length] )];
|
||||
}
|
||||
|
||||
if (self.transientSite)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
UIView *sitesView = sitesVC.view;
|
||||
sitesView.frame = combinedVC.view.bounds;
|
||||
sitesView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
[combinedVC.view insertSubview:sitesView belowSubview:combinedVC.usersVC.view];
|
||||
[combinedVC.view insertSubview:sitesView belowSubview:combinedVC.usersVC.view.superview];
|
||||
|
||||
[sitesVC setActive:YES animated:self.animated completion:^(BOOL finished) {
|
||||
if (!finished)
|
||||
|
||||
@@ -33,11 +33,10 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
MPPasswordsBadNameTip = 1 << 0,
|
||||
};
|
||||
|
||||
@interface MPSitesViewController()<NSFetchedResultsControllerDelegate, SKStoreProductViewControllerDelegate>
|
||||
@interface MPSitesViewController()<NSFetchedResultsControllerDelegate>
|
||||
|
||||
@property(nonatomic, strong) SKStoreProductViewController *voltoViewController;
|
||||
@property(nonatomic, strong) NSFetchedResultsController *fetchedResultsController;
|
||||
@property(nonatomic, strong) NSArray *fuzzyGroups;
|
||||
@property(nonatomic, strong) NSArray *queryGroups;
|
||||
@property(nonatomic, strong) NSCharacterSet *siteNameAcceptableCharactersSet;
|
||||
@property(nonatomic, strong) NSMutableArray<NSMutableArray *> *dataSource;
|
||||
@property(nonatomic, weak) UIViewController *popdownVC;
|
||||
@@ -121,12 +120,14 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
PearlRemoveNotificationObservers();
|
||||
}
|
||||
|
||||
- (void)viewWillLayoutSubviews {
|
||||
- (void)viewDidLayoutSubviews {
|
||||
|
||||
self.collectionView.contentInset = [self.collectionView occludedInsets];
|
||||
self.collectionView.scrollIndicatorInsets = self.collectionView.contentInset;
|
||||
[super viewDidLayoutSubviews];
|
||||
|
||||
[super viewWillLayoutSubviews];
|
||||
if (@available( iOS 11, * )) {
|
||||
self.collectionView.layoutMargins =
|
||||
UIEdgeInsetsMake( [self.collectionView occludedInsets].top - self.view.safeAreaInsets.top, 0, 0, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
@@ -161,7 +162,7 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
MPSiteCell *cell = [MPSiteCell dequeueFromCollectionView:collectionView indexPath:indexPath];
|
||||
[cell setFuzzyGroups:self.fuzzyGroups];
|
||||
[cell setQueryGroups:self.queryGroups];
|
||||
id item = self.dataSource[(NSUInteger)indexPath.section][(NSUInteger)indexPath.item];
|
||||
if ([item isKindOfClass:[MPSiteEntity class]])
|
||||
[cell setSite:item animated:NO];
|
||||
@@ -171,6 +172,19 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
return cell;
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegateFlowLayout
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout
|
||||
sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
UICollectionViewFlowLayout *layout = (UICollectionViewFlowLayout *)collectionViewLayout;
|
||||
CGFloat availableWidth = collectionView.bounds.size.width
|
||||
- collectionView.layoutMargins.left - collectionView.layoutMargins.right
|
||||
- layout.sectionInset.left - layout.sectionInset.right;
|
||||
CGFloat cells = MAX( 1, (int)((availableWidth + layout.minimumInteritemSpacing) / (318 + layout.minimumInteritemSpacing)) );
|
||||
return CGSizeMake( (availableWidth - layout.minimumInteritemSpacing * (cells - 1)) / cells, 100 );
|
||||
}
|
||||
|
||||
#pragma mark - UIScrollDelegate
|
||||
|
||||
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
|
||||
@@ -354,21 +368,19 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
- (void)reloadSites {
|
||||
|
||||
[self.fetchedResultsController.managedObjectContext performBlock:^{
|
||||
static NSRegularExpression *fuzzyRE;
|
||||
static dispatch_once_t once = 0;
|
||||
dispatch_once( &once, ^{
|
||||
fuzzyRE = [NSRegularExpression regularExpressionWithPattern:@"(.)" options:0 error:nil];
|
||||
} );
|
||||
|
||||
NSString *queryString = self.query;
|
||||
NSString *queryPattern = [[queryString stringByReplacingMatchesOfExpression:fuzzyRE withTemplate:@"*$1"]
|
||||
stringByAppendingString:@"*"];
|
||||
NSMutableArray *fuzzyGroups = [NSMutableArray new];
|
||||
[fuzzyRE enumerateMatchesInString:queryString options:0 range:NSMakeRange( 0, queryString.length )
|
||||
usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {
|
||||
[fuzzyGroups addObject:[queryString substringWithRange:result.range]];
|
||||
}];
|
||||
self.fuzzyGroups = fuzzyGroups;
|
||||
NSMutableArray *queryGroups = [NSMutableArray new];
|
||||
NSMutableString *queryPattern = [NSMutableString new];
|
||||
[queryString enumerateSubstringsInRange: NSMakeRange(0, [queryString length]) options: NSStringEnumerationByComposedCharacterSequences
|
||||
usingBlock: ^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
|
||||
if (substringRange.location < 10) {
|
||||
[queryGroups addObject:substring];
|
||||
[queryPattern appendString:@"*"];
|
||||
}
|
||||
[queryPattern appendString:substring];
|
||||
}];
|
||||
[queryPattern appendString:@"*"];
|
||||
self.queryGroups = queryGroups;
|
||||
|
||||
NSError *error = nil;
|
||||
self.fetchedResultsController.fetchRequest.predicate =
|
||||
@@ -381,7 +393,7 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
toSections:[self createDataSource]
|
||||
reloadItems:@[ MPTransientPasswordItem ] completion:^(BOOL finished) {
|
||||
for (MPSiteCell *cell in self.collectionView.visibleCells)
|
||||
[cell setFuzzyGroups:self.fuzzyGroups];
|
||||
[cell setQueryGroups:self.queryGroups];
|
||||
}];
|
||||
} );
|
||||
}];
|
||||
@@ -435,13 +447,6 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
} completion:completion];
|
||||
}
|
||||
|
||||
#pragma mark - SKStoreProductViewControllerDelegate
|
||||
|
||||
- (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController {
|
||||
|
||||
[viewController dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - Actions
|
||||
|
||||
- (IBAction)dismissPopdown:(id)sender {
|
||||
@@ -454,45 +459,7 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
|
||||
- (IBAction)upgradeVolto:(UIButton *)sender {
|
||||
|
||||
if ([UIApp canOpenURL:[[NSURL alloc] initWithString:@"volto:"]]) {
|
||||
[[MPiOSAppDelegate get] exportSitesRevealPasswords:NO askExportPassword:^NSString *(NSString *userName) {
|
||||
return PearlAwait( ^(void (^setResult)(id)) {
|
||||
PearlMainQueue( ^{
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:strf( @"Master Password For:\n%@", userName )
|
||||
message:@"Enter your master password to export the user."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
|
||||
textField.secureTextEntry = YES;
|
||||
}];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Export" style:UIAlertActionStyleDefault handler:
|
||||
^(UIAlertAction *action) { setResult( alert.textFields.firstObject.text ); }]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:
|
||||
^(UIAlertAction *action) { setResult( nil ); }]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
} );
|
||||
} result:^(NSString *exportedUser, NSError *error) {
|
||||
if (!exportedUser || error) {
|
||||
MPError( error, @"Failed to export user." );
|
||||
PearlMainQueue( ^{
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Error"
|
||||
message:[error localizedDescription]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Okay" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
return;
|
||||
}
|
||||
|
||||
NSURLComponents *components = [NSURLComponents new];
|
||||
components.scheme = @"volto";
|
||||
components.path = @"import";
|
||||
components.queryItems = @[ [[NSURLQueryItem alloc] initWithName:@"data" value:exportedUser] ];
|
||||
[UIApp openURL:components.URL];
|
||||
}];
|
||||
}
|
||||
else if (self.voltoViewController)
|
||||
[self presentViewController:self.voltoViewController animated:YES completion:nil];
|
||||
[[MPiOSAppDelegate get] migrateFor:[MPiOSAppDelegate get].activeUserForMainThread];
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
@@ -505,23 +472,8 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
|
||||
self.voltoMigrateAlert.visible = YES;
|
||||
}
|
||||
else {
|
||||
self.voltoInstallAlert.visible = NO;
|
||||
self.voltoInstallAlert.visible = [MPiOSAppDelegate get].voltoViewController != nil;
|
||||
self.voltoMigrateAlert.visible = NO;
|
||||
self.voltoViewController = [SKStoreProductViewController new];
|
||||
self.voltoViewController.delegate = self;
|
||||
[self.voltoViewController loadProductWithParameters:@{
|
||||
SKStoreProductParameterCampaignToken : @"app-masterpassword.ios", /* Campaign: From MasterPassword iOS */
|
||||
SKStoreProductParameterProviderToken : @153897, /* Provider: Maarten Billemont */
|
||||
SKStoreProductParameterITunesItemIdentifier: @510296984, /* Application: MasterPassword iOS */
|
||||
//SKStoreProductParameterITunesItemIdentifier: @1500430196, /* Application: Volto iOS */
|
||||
} completionBlock:^(BOOL result, NSError *error) {
|
||||
if (error)
|
||||
err( @"Failed loading Volto product information: %@", error );
|
||||
|
||||
[UIView animateWithDuration:0.3f animations:^{
|
||||
self.voltoInstallAlert.visible = result;
|
||||
}];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -432,6 +432,7 @@ referenceSizeForFooterInSection:(NSInteger)section {
|
||||
|
||||
NSManagedObjectID *userID = user.permanentObjectID;
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:user.name message:nil preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
[controller.popoverPresentationController setSourceView:avatarCell];
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Delete User" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
|
||||
UIAlertController *controller_ = [UIAlertController alertControllerWithTitle:@"Deleting User" message:
|
||||
@"The user and its sites will be deleted." preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
@@ -17,10 +17,12 @@
|
||||
//==============================================================================
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <WebKit/WebKit.h>
|
||||
|
||||
@interface MPWebViewController : UIViewController<UIWebViewDelegate>
|
||||
@interface MPWebViewController : UIViewController<WKNavigationDelegate>
|
||||
|
||||
@property(nonatomic) IBOutlet UIWebView *webView;
|
||||
@property(nonatomic) IBOutlet WKWebView *webView;
|
||||
@property(nonatomic) IBOutlet UINavigationBar *webNavigationBar;
|
||||
@property(nonatomic) IBOutlet UINavigationItem *webNavigationItem;
|
||||
|
||||
@property(nonatomic) NSURL *initialURL;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
//==============================================================================
|
||||
|
||||
#import "MPWebViewController.h"
|
||||
#import "MPiOSAppDelegate.h"
|
||||
|
||||
@implementation MPWebViewController
|
||||
|
||||
@@ -24,20 +25,30 @@
|
||||
|
||||
[super viewDidLoad];
|
||||
|
||||
[self.webView.scrollView insetOcclusion];
|
||||
if (!self.initialURL)
|
||||
self.initialURL = [NSURL URLWithString:@"https://masterpassword.app"];
|
||||
self.webNavigationItem.title = self.initialURL.host;
|
||||
|
||||
// WKWebView can't be on the storyboard for iOS pre 11 due to an NSCoding bug.
|
||||
[self.view insertSubview:self.webView = [WKWebView new] atIndex:0];
|
||||
[self.webView setNavigationDelegate:self];
|
||||
[self.webView setTranslatesAutoresizingMaskIntoConstraints:NO];
|
||||
[self.webView.topAnchor constraintEqualToAnchor:self.view.topAnchor].active = YES;
|
||||
[self.webView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor].active = YES;
|
||||
[self.webView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor].active = YES;
|
||||
[self.webView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor].active = YES;
|
||||
|
||||
[self.webView loadRequest:[[NSURLRequest alloc] initWithURL:self.initialURL]];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
||||
[super viewWillAppear:animated];
|
||||
}
|
||||
|
||||
if (!self.initialURL)
|
||||
self.initialURL = [NSURL URLWithString:@"https://masterpassword.app"];
|
||||
|
||||
self.webNavigationItem.title = self.initialURL.host;
|
||||
|
||||
self.webView.visible = NO;
|
||||
[self.webView loadRequest:[[NSURLRequest alloc] initWithURL:self.initialURL]];
|
||||
- (void)viewDidLayoutSubviews {
|
||||
[self.webView.scrollView insetOcclusion];
|
||||
[super viewDidLayoutSubviews];
|
||||
}
|
||||
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle {
|
||||
@@ -45,26 +56,24 @@
|
||||
return UIStatusBarStyleLightContent;
|
||||
}
|
||||
|
||||
#pragma mark - UIWebViewDelegate
|
||||
#pragma mark - WKNavigationDelegate
|
||||
|
||||
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request
|
||||
navigationType:(UIWebViewNavigationType)navigationType {
|
||||
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction
|
||||
decisionHandler:(void ( ^ )(WKNavigationActionPolicy))decisionHandler {
|
||||
|
||||
if ([[request.URL absoluteString] rangeOfString:@"thanks.lhunath.com"].location != NSNotFound) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"tipped.thanks"];
|
||||
if (![[NSUserDefaults standardUserDefaults] synchronize])
|
||||
wrn( @"Couldn't synchronize thanks tip." );
|
||||
if ([navigationAction.request.mainDocumentURL.scheme isEqualToString:@"masterpassword"]) {
|
||||
[[MPiOSAppDelegate get] openURL:navigationAction.request.mainDocumentURL];
|
||||
decisionHandler( WKNavigationActionPolicyCancel );
|
||||
return;
|
||||
}
|
||||
|
||||
if ([request.URL isEqual:request.mainDocumentURL]) {
|
||||
self.webNavigationItem.title = request.URL.host;
|
||||
self.webNavigationItem.prompt = strl( @"Loading" );
|
||||
}
|
||||
|
||||
return YES;
|
||||
decisionHandler( WKNavigationActionPolicyAllow );
|
||||
}
|
||||
|
||||
- (void)webViewDidStartLoad:(UIWebView *)webView {
|
||||
- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(null_unspecified WKNavigation *)navigation {
|
||||
|
||||
self.webNavigationItem.title = webView.URL.host;
|
||||
self.webNavigationItem.prompt = strl( @"Loading" );
|
||||
|
||||
UIActivityIndicatorView *activityView =
|
||||
[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
|
||||
@@ -72,19 +81,57 @@
|
||||
[activityView startAnimating];
|
||||
}
|
||||
|
||||
- (void)webViewDidFinishLoad:(UIWebView *)webView {
|
||||
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
|
||||
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.webView.visible = YES;
|
||||
if ([[webView.URL absoluteString] rangeOfString:@"thanks.lhunath.com"].location != NSNotFound) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"tipped.thanks"];
|
||||
if (![[NSUserDefaults standardUserDefaults] synchronize])
|
||||
wrn( @"Couldn't synchronize thanks tip." );
|
||||
}
|
||||
|
||||
[self.webNavigationItem setLeftBarButtonItem:[[UIBarButtonItem alloc]
|
||||
initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector( action: )]];
|
||||
[webView evaluateJavaScript:@"document.title" completionHandler:^(id o, NSError *error) {
|
||||
self.webNavigationItem.prompt = [o description];
|
||||
}];
|
||||
|
||||
[self.webNavigationItem setLeftBarButtonItem:[webView canGoBack]? [[UIBarButtonItem alloc]
|
||||
initWithTitle:@"⬅︎" style:UIBarButtonItemStylePlain target:webView action:@selector( goBack )]: nil];
|
||||
self.webNavigationItem.prompt = [webView stringByEvaluatingJavaScriptFromString:@"document.title"];
|
||||
}
|
||||
|
||||
#pragma mark - Actions
|
||||
|
||||
- (IBAction)action:(id)sender {
|
||||
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:self.webView.URL.host
|
||||
message:self.webView.URL.absoluteString
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
[controller.popoverPresentationController setSourceView:sender];
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Safari" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[UIApp openURL:self.webView.URL];
|
||||
}]];
|
||||
if ([UIApp canOpenURL:[NSURL URLWithString:@"firefox:"]]) {
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Firefox" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[UIApp openURL:[NSURL URLWithString:strf( @"firefox://open-url?url=%@",
|
||||
[self.webView.URL.absoluteString stringByAddingPercentEncodingWithAllowedCharacters:
|
||||
[NSCharacterSet URLQueryAllowedCharacterSet]] )]];
|
||||
}]];
|
||||
}
|
||||
if ([UIApp canOpenURL:[NSURL URLWithString:@"googlechrome:"]]) {
|
||||
NSURL *url = [[NSURL alloc] initWithScheme:[self.webView.URL.scheme isEqualToString:@"http"]? @"googlechrome": @"googlechromes"
|
||||
host:self.webView.URL.host path:self.webView.URL.path];
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Chrome" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[UIApp openURL:url];
|
||||
}]];
|
||||
}
|
||||
if ([UIApp canOpenURL:[NSURL URLWithString:@"opera-http:"]]) {
|
||||
NSURL *url = [[NSURL alloc] initWithScheme:[self.webView.URL.scheme isEqualToString:@"http"]? @"opera-http": @"opera-https"
|
||||
host:self.webView.URL.host path:self.webView.URL.path];
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Opera" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[UIApp openURL:url];
|
||||
}]];
|
||||
}
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self presentViewController:controller animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (IBAction)done:(id)sender {
|
||||
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
@@ -17,15 +17,23 @@
|
||||
//==============================================================================
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <StoreKit/StoreKit.h>
|
||||
|
||||
#import "MPAppDelegate_Shared.h"
|
||||
|
||||
@interface MPiOSAppDelegate : MPAppDelegate_Shared
|
||||
@interface MPiOSAppDelegate : MPAppDelegate_Shared <SKStoreProductViewControllerDelegate>
|
||||
|
||||
@property(nonatomic, strong) UIWindow *window;
|
||||
@property(nonatomic, strong) SKStoreProductViewController *voltoViewController;
|
||||
|
||||
- (void)openURL:(NSURL *)url;
|
||||
|
||||
- (void)showFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController;
|
||||
- (void)openFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController;
|
||||
|
||||
- (void)showExportForVC:(UIViewController *)viewController;
|
||||
- (void)migrateFor:(MPUserEntity *)user;
|
||||
|
||||
- (void)changeMasterPasswordFor:(MPUserEntity *)user saveInContext:(NSManagedObjectContext *)moc didResetBlock:(void ( ^ )(void))didReset;
|
||||
|
||||
@end
|
||||
|
||||
@@ -26,6 +26,20 @@
|
||||
#import <Sentry/Sentry.h>
|
||||
#import <Countly/Countly.h>
|
||||
|
||||
@interface CountlyPushNotifications
|
||||
@end
|
||||
|
||||
@interface CountlyPushNotifications(MPNotifications)
|
||||
@end
|
||||
|
||||
@implementation CountlyPushNotifications(MPNotifications)
|
||||
|
||||
- (void)openURL:(NSString *)URLString {
|
||||
[[MPiOSAppDelegate get].window.rootViewController performSegueWithIdentifier:@"web" sender:[NSURL URLWithString:URLString]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface MPiOSAppDelegate()<UIDocumentInteractionControllerDelegate>
|
||||
|
||||
@property(nonatomic, strong) UIDocumentInteractionController *interactionController;
|
||||
@@ -34,6 +48,8 @@
|
||||
|
||||
@implementation MPiOSAppDelegate
|
||||
|
||||
@synthesize window;
|
||||
|
||||
+ (void)initialize {
|
||||
|
||||
[MPiOSConfig get];
|
||||
@@ -43,7 +59,7 @@
|
||||
|
||||
@try {
|
||||
// Sentry
|
||||
[SentrySDK initWithOptions:@{
|
||||
[SentrySDK startWithOptions:@{
|
||||
@"dsn" : NilToNSNull( decrypt( sentryDSN ) ),
|
||||
#ifdef DEBUG
|
||||
@"debug" : @(YES),
|
||||
@@ -55,7 +71,7 @@
|
||||
@"debug" : @(NO),
|
||||
@"environment" : @"Private",
|
||||
#endif
|
||||
@"enabled" : [MPiOSConfig get].sendInfo,
|
||||
@"enabled" : @([[MPiOSConfig get].sendInfo boolValue] || ![[MPiOSConfig get].sendInfoDecided boolValue]),
|
||||
@"enableAutoSessionTracking": @(YES),
|
||||
}];
|
||||
[[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) {
|
||||
@@ -136,12 +152,6 @@
|
||||
@catch (id exception) {
|
||||
err( @"During Config Test: %@", exception );
|
||||
}
|
||||
@try {
|
||||
[super application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
}
|
||||
@catch (id exception) {
|
||||
err( @"During Pearl Application Launch: %@", exception );
|
||||
}
|
||||
@try {
|
||||
inf( @"Started up with device identifier: %@", [PearlKeyChain deviceIdentifier] );
|
||||
|
||||
@@ -172,9 +182,27 @@
|
||||
}
|
||||
} );
|
||||
|
||||
SKStoreProductViewController *migrateVC = [SKStoreProductViewController new];
|
||||
[migrateVC loadProductWithParameters:@{
|
||||
SKStoreProductParameterCampaignToken : @"app-masterpassword.ios", /* Campaign: From MasterPassword iOS */
|
||||
SKStoreProductParameterProviderToken : @153897, /* Provider: Maarten Billemont */
|
||||
// SKStoreProductParameterITunesItemIdentifier: @510296984, /* Application: MasterPassword iOS */
|
||||
SKStoreProductParameterITunesItemIdentifier: @1500430196, /* Application: Volto iOS */
|
||||
} completionBlock:^(BOOL result, NSError *error) {
|
||||
if (error)
|
||||
err( @"Failed loading Volto product information: %@", error );
|
||||
|
||||
if (result) {
|
||||
self.voltoViewController = migrateVC;
|
||||
self.voltoViewController.delegate = self;
|
||||
} else {
|
||||
self.voltoViewController = nil;
|
||||
}
|
||||
}];
|
||||
|
||||
PearlMainQueueOperation( ^{
|
||||
if ([[MPiOSConfig get].showSetup boolValue])
|
||||
[self.navigationController performSegueWithIdentifier:@"setup" sender:self];
|
||||
[self.window.rootViewController performSegueWithIdentifier:@"setup" sender:self];
|
||||
|
||||
[self consentFeatures];
|
||||
} );
|
||||
@@ -193,6 +221,12 @@
|
||||
if (!url)
|
||||
return NO;
|
||||
|
||||
// masterpassword: URLs.
|
||||
if ([url.scheme isEqualToString:@"masterpassword"]) {
|
||||
[self openURL:url];
|
||||
return YES;
|
||||
}
|
||||
|
||||
// Arbitrary URL to mpsites data.
|
||||
[[[NSURLSession sharedSession] dataTaskWithURL:url completionHandler:
|
||||
^(NSData *importedSitesData, NSURLResponse *response, NSError *error) {
|
||||
@@ -206,7 +240,7 @@
|
||||
(id)[error localizedDescription]?: error )
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Continue" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
return;
|
||||
}
|
||||
@@ -218,7 +252,7 @@
|
||||
@"Master Password couldn't understand the import file."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Continue" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
return;
|
||||
}
|
||||
@@ -242,25 +276,23 @@
|
||||
return NO;
|
||||
|
||||
PearlMainQueue( ^{
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Welcome to Master Password!" message:
|
||||
@"We want this experience to be top-notch.\n\n"
|
||||
@"We look for bugs, runtime issues, crashes & usage counters.\n"
|
||||
@"Needless to say, diagnostics are always scrubbed and personal details will never leave your device."
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Diagnostics" message:
|
||||
@"We look for bugs, sudden crashes, runtime issues & statistics.\n\n"
|
||||
@"Diagnostics are scrubbed and personal details will never leave your device."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Disable" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Disable" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
||||
[MPiOSConfig get].sendInfo = @(NO);
|
||||
[MPiOSConfig get].sendInfoDecided = @(YES);
|
||||
[self consentFeatures];
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Thanks" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Engage" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[MPiOSConfig get].sendInfo = @(YES);
|
||||
[MPiOSConfig get].sendInfoDecided = @(YES);
|
||||
[self consentFeatures];
|
||||
}]];
|
||||
|
||||
[(self.navigationController.presentedViewController?: (UIViewController *)self.navigationController)
|
||||
presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
|
||||
return YES;
|
||||
@@ -290,7 +322,7 @@
|
||||
|
||||
PearlMainQueue( ^{
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Coming Soon" message:
|
||||
@"Master Password is rolling out a new modern personal security platform and we're excited to bring you along.\n\n"
|
||||
@"Master Password is rolling out a brand new, updated version and we're excited to bring you along.\n\n"
|
||||
@"When it's time, we'll send you a notification to help you make an effortless transition."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Thanks" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
@@ -305,8 +337,7 @@
|
||||
[MPiOSConfig get].notificationsDecided = @(YES);
|
||||
}
|
||||
}]];
|
||||
[(self.navigationController.presentedViewController?: (UIViewController *)self.navigationController)
|
||||
presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -335,7 +366,7 @@
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
||||
setResult( nil );
|
||||
}]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
} );
|
||||
} askUserPassword:^NSString *(NSString *userName) {
|
||||
@@ -353,7 +384,7 @@
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
||||
setResult( nil );
|
||||
}]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
} );
|
||||
} result:^(NSError *error) {
|
||||
@@ -364,7 +395,7 @@
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Error" message:[error localizedDescription]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[controller addAction:[UIAlertAction actionWithTitle:@"Continue" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:controller animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:controller animated:YES completion:nil];
|
||||
}
|
||||
} );
|
||||
}];
|
||||
@@ -374,8 +405,6 @@
|
||||
|
||||
inf( @"Will foreground" );
|
||||
|
||||
[super applicationWillEnterForeground:application];
|
||||
|
||||
[self.hangDetector start];
|
||||
}
|
||||
|
||||
@@ -398,20 +427,16 @@
|
||||
[UIPasteboard generalPasteboard].string = @"";
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
}
|
||||
mpw_marshal_file_free( &importFile );
|
||||
} );
|
||||
|
||||
[super applicationDidBecomeActive:application];
|
||||
}
|
||||
|
||||
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
|
||||
|
||||
inf( @"Received memory warning." );
|
||||
|
||||
[super applicationDidReceiveMemoryWarning:application];
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||
@@ -424,12 +449,46 @@
|
||||
}
|
||||
|
||||
[self.hangDetector stop];
|
||||
|
||||
[super applicationDidEnterBackground:application];
|
||||
}
|
||||
|
||||
#pragma mark - Behavior
|
||||
|
||||
- (void)openURL:(NSURL *)url {
|
||||
if ([url.scheme isEqualToString:@"masterpassword"]) {
|
||||
if ([url.host isEqualToString:@"open-url"]) {
|
||||
for (NSURLQueryItem *item in [NSURLComponents componentsWithString:[url absoluteString]].queryItems)
|
||||
if ([item.name isEqualToString:@"url"]) {
|
||||
[UIApp openURL:[NSURL URLWithString:item.value]];
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if ([url.host isEqualToString:@"show-url"]) {
|
||||
for (NSURLQueryItem *item in [NSURLComponents componentsWithString:[url absoluteString]].queryItems)
|
||||
if ([item.name isEqualToString:@"url"]) {
|
||||
[self.window.rootViewController performSegueWithIdentifier:@"web" sender:[NSURL URLWithString:item.value]];
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if ([url.host isEqualToString:@"migrate"]) {
|
||||
for (NSURLQueryItem *item in [NSURLComponents componentsWithString:[url absoluteString]].queryItems)
|
||||
if ([item.name isEqualToString:@"fullName"]) {
|
||||
[MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
||||
NSFetchRequest
|
||||
*fetchRequest = [NSFetchRequest fetchRequestWithEntityName:NSStringFromClass( [MPUserEntity class] )];
|
||||
fetchRequest.predicate = [NSPredicate predicateWithFormat:@"name == %@", item.value];
|
||||
NSArray *users = [context executeFetchRequest:fetchRequest error:nil];
|
||||
[self migrateFor:users.firstObject];
|
||||
}];
|
||||
return;
|
||||
}
|
||||
|
||||
[self migrateFor:nil];
|
||||
return;
|
||||
}
|
||||
} else
|
||||
[UIApp openURL:url];
|
||||
}
|
||||
|
||||
- (void)showFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController {
|
||||
|
||||
if (![PearlEMail canSendMail]) {
|
||||
@@ -439,7 +498,7 @@
|
||||
@"help@masterpassword.app"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Okay" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
else if (logs) {
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Feedback" message:
|
||||
@@ -453,7 +512,7 @@
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"No Logs" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[self openFeedbackWithLogs:NO forVC:viewController];
|
||||
}]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
else
|
||||
[self openFeedbackWithLogs:NO forVC:viewController];
|
||||
@@ -499,15 +558,16 @@
|
||||
@"This may be due to corruption. You can either reset Master Password and "
|
||||
@"recreate your user, or E-Mail us your logs and leave your corrupt store as-is for now."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"E-Mail Logs" style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
[self openFeedbackWithLogs:YES forVC:nil];
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Try Again" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[self retryCorruptStore];
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Send Logs" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[self openFeedbackWithLogs:YES forVC:nil];
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Reset" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[self deleteAndResetStore];
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Ignore" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
} );
|
||||
}
|
||||
@@ -524,7 +584,7 @@
|
||||
@"Would you like to make all your passwords visible in the export file?\n\n"
|
||||
@"A safe export will include all sites but make their passwords invisible.\n"
|
||||
@"It is great as a backup and remains safe when fallen in the wrong hands."
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[sheet addAction:[UIAlertAction actionWithTitle:@"Safe Export" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[self showExportRevealPasswords:NO forVC:viewController];
|
||||
}]];
|
||||
@@ -532,10 +592,10 @@
|
||||
[self showExportRevealPasswords:YES forVC:viewController];
|
||||
}]];
|
||||
[sheet addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:sheet animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:sheet animated:YES completion:nil];
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)showExportRevealPasswords:(BOOL)revealPasswords forVC:(UIViewController *)viewController {
|
||||
@@ -546,93 +606,172 @@
|
||||
@"Close Master Password, go into Settings and add a Mail account."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Okay" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
return;
|
||||
}
|
||||
|
||||
[self exportSitesRevealPasswords:revealPasswords askExportPassword:^NSString *(NSString *userName) {
|
||||
return PearlAwait( ^(void (^setResult)(id)) {
|
||||
PearlMainQueue( ^{
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:strf( @"Master Password For:\n%@", userName )
|
||||
message:@"Enter your master password to export the user."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
|
||||
textField.secureTextEntry = YES;
|
||||
}];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Export" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
setResult( alert.textFields.firstObject.text );
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
||||
setResult( nil );
|
||||
}]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
} );
|
||||
} result:^(NSString *exportedUser, NSError *error) {
|
||||
if (!exportedUser || error) {
|
||||
MPError( error, @"Failed to export mpsites." );
|
||||
PearlMainQueue( ^{
|
||||
[MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
||||
NSError *error = nil;
|
||||
NSString *exportedUser = [self exportSitesFor:[self activeUserInContext:context] revealPasswords:revealPasswords askExportPassword:
|
||||
^NSString *(NSString *userName) {
|
||||
return PearlAwait( ^(void (^setResult)(id)) {
|
||||
PearlMainQueue( ^{
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:strf(
|
||||
@"Master Password For:\n%@", userName )
|
||||
message:@"Enter your master password to export the user."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
|
||||
textField.secureTextEntry = YES;
|
||||
}];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Export" style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
setResult( alert.textFields.firstObject.text );
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel
|
||||
handler:^(UIAlertAction *action) {
|
||||
setResult( nil );
|
||||
}]];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
} );
|
||||
} error:&error];
|
||||
|
||||
PearlMainQueue( ^{
|
||||
if (error) {
|
||||
MPError( error, @"Failed to export mpsites." );
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Error" message:[error localizedDescription]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Okay" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
if (!exportedUser)
|
||||
return;
|
||||
|
||||
NSDateFormatter *exportDateFormatter = [NSDateFormatter new];
|
||||
[exportDateFormatter setDateFormat:@"yyyy'-'MM'-'dd"];
|
||||
NSString *exportFileName = strf( @"%@ (%@).mpsites",
|
||||
[self activeUserForMainThread].name, [exportDateFormatter stringFromDate:[NSDate date]] );
|
||||
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Destination" message:nil
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Send As E-Mail" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
NSString *message;
|
||||
if (revealPasswords)
|
||||
message = strf( @"Export of Master Password sites with passwords included.\n\n"
|
||||
@"REMINDER: Make sure nobody else sees this file! Passwords are visible!\n\n\n"
|
||||
@"--\n"
|
||||
@"%@\n"
|
||||
@"Master Password %@, build %@",
|
||||
[self activeUserForMainThread].name,
|
||||
[PearlInfoPlist get].CFBundleShortVersionString,
|
||||
[PearlInfoPlist get].CFBundleVersion );
|
||||
else
|
||||
message = strf( @"Backup of Master Password sites.\n\n\n"
|
||||
@"--\n"
|
||||
@"%@\n"
|
||||
@"Master Password %@, build %@",
|
||||
[self activeUserForMainThread].name,
|
||||
[PearlInfoPlist get].CFBundleShortVersionString,
|
||||
[PearlInfoPlist get].CFBundleVersion );
|
||||
|
||||
[PearlEMail sendEMailTo:nil fromVC:viewController subject:@"Master Password Export" body:message
|
||||
attachments:[[PearlEMailAttachment alloc] initWithContent:[exportedUser dataUsingEncoding:NSUTF8StringEncoding]
|
||||
mimeType:@"text/plain"
|
||||
fileName:exportFileName], nil];
|
||||
return;
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Share / Export" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
NSURL *applicationSupportURL = [[[NSFileManager defaultManager] URLsForDirectory:NSApplicationSupportDirectory
|
||||
inDomains:NSUserDomainMask] lastObject];
|
||||
NSURL *exportURL = [[applicationSupportURL
|
||||
URLByAppendingPathComponent:[NSBundle mainBundle].bundleIdentifier isDirectory:YES]
|
||||
URLByAppendingPathComponent:exportFileName isDirectory:NO];
|
||||
NSError *writeError = nil;
|
||||
if (![[exportedUser dataUsingEncoding:NSUTF8StringEncoding]
|
||||
writeToURL:exportURL options:NSDataWritingFileProtectionComplete error:&writeError])
|
||||
MPError( writeError, @"Failed to write export data to URL %@.", exportURL );
|
||||
else {
|
||||
self.interactionController = [UIDocumentInteractionController interactionControllerWithURL:exportURL];
|
||||
self.interactionController.UTI = @"com.lyndir.masterpassword.sites";
|
||||
self.interactionController.delegate = self;
|
||||
[self.interactionController presentOpenInMenuFromRect:CGRectZero inView:viewController.view animated:YES];
|
||||
}
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Continue" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)migrateFor:(MPUserEntity *)user {
|
||||
|
||||
if ([UIApp canOpenURL:[[NSURL alloc] initWithString:@"volto:"]]) {
|
||||
if (!user) {
|
||||
[MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
||||
NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:NSStringFromClass( [MPUserEntity class] )];
|
||||
NSArray *users = [context executeFetchRequest:fetchRequest error:nil];
|
||||
if (![users count])
|
||||
return;
|
||||
|
||||
UIAlertController *usersSheet = [UIAlertController alertControllerWithTitle:@"Migrate User"
|
||||
message:@"Choose a user to migrate out to Volto."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[usersSheet addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
||||
for (MPUserEntity *user_ in users)
|
||||
[usersSheet addAction:[UIAlertAction actionWithTitle:user_.name style:UIAlertActionStyleDefault handler:
|
||||
^(UIAlertAction *action) { [self migrateFor:user_]; }]];
|
||||
|
||||
PearlMainQueue( ^{
|
||||
[self.window.rootViewController presentViewController:usersSheet animated:YES completion:nil];
|
||||
} );
|
||||
}];
|
||||
return;
|
||||
}
|
||||
|
||||
NSDateFormatter *exportDateFormatter = [NSDateFormatter new];
|
||||
[exportDateFormatter setDateFormat:@"yyyy'-'MM'-'dd"];
|
||||
NSString *exportFileName = strf( @"%@ (%@).mpsites",
|
||||
[self activeUserForMainThread].name, [exportDateFormatter stringFromDate:[NSDate date]] );
|
||||
[MPAppDelegate_Shared managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
||||
NSError *error = nil;
|
||||
NSString *exportedUser = [[MPAppDelegate_Shared get] exportSitesFor:[MPUserEntity existingObjectWithID:user.objectID inContext:context]
|
||||
revealPasswords:NO askExportPassword:^NSString *(NSString *userName) {
|
||||
return PearlAwait( ^(void (^setResult)(id)) {
|
||||
PearlMainQueue( ^{
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:strf( @"Master Password For:\n%@", userName )
|
||||
message:@"Enter your master password to export the user."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
|
||||
textField.secureTextEntry = YES;
|
||||
}];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Export" style:UIAlertActionStyleDefault handler:
|
||||
^(UIAlertAction *action) { setResult( alert.textFields.firstObject.text ); }]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:
|
||||
^(UIAlertAction *action) { setResult( nil ); }]];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
} );
|
||||
} error:&error];
|
||||
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Destination" message:nil
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Send As E-Mail" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
NSString *message;
|
||||
if (revealPasswords)
|
||||
message = strf( @"Export of Master Password sites with passwords included.\n\n"
|
||||
@"REMINDER: Make sure nobody else sees this file! Passwords are visible!\n\n\n"
|
||||
@"--\n"
|
||||
@"%@\n"
|
||||
@"Master Password %@, build %@",
|
||||
[self activeUserForMainThread].name,
|
||||
[PearlInfoPlist get].CFBundleShortVersionString,
|
||||
[PearlInfoPlist get].CFBundleVersion );
|
||||
else
|
||||
message = strf( @"Backup of Master Password sites.\n\n\n"
|
||||
@"--\n"
|
||||
@"%@\n"
|
||||
@"Master Password %@, build %@",
|
||||
[self activeUserForMainThread].name,
|
||||
[PearlInfoPlist get].CFBundleShortVersionString,
|
||||
[PearlInfoPlist get].CFBundleVersion );
|
||||
PearlMainQueue( ^{
|
||||
if (error) {
|
||||
MPError( error, @"Failed to export user." );
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Error"
|
||||
message:[error localizedDescription]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Okay" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
if (!exportedUser)
|
||||
return;
|
||||
|
||||
[PearlEMail sendEMailTo:nil fromVC:viewController subject:@"Master Password Export" body:message
|
||||
attachments:[[PearlEMailAttachment alloc] initWithContent:[exportedUser dataUsingEncoding:NSUTF8StringEncoding]
|
||||
mimeType:@"text/plain"
|
||||
fileName:exportFileName], nil];
|
||||
return;
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Share / Export" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
NSURL *applicationSupportURL = [[[NSFileManager defaultManager] URLsForDirectory:NSApplicationSupportDirectory
|
||||
inDomains:NSUserDomainMask] lastObject];
|
||||
NSURL *exportURL = [[applicationSupportURL
|
||||
URLByAppendingPathComponent:[NSBundle mainBundle].bundleIdentifier isDirectory:YES]
|
||||
URLByAppendingPathComponent:exportFileName isDirectory:NO];
|
||||
NSError *writeError = nil;
|
||||
if (![[exportedUser dataUsingEncoding:NSUTF8StringEncoding]
|
||||
writeToURL:exportURL options:NSDataWritingFileProtectionComplete error:&writeError])
|
||||
MPError( writeError, @"Failed to write export data to URL %@.", exportURL );
|
||||
else {
|
||||
self.interactionController = [UIDocumentInteractionController interactionControllerWithURL:exportURL];
|
||||
self.interactionController.UTI = @"com.lyndir.masterpassword.sites";
|
||||
self.interactionController.delegate = self;
|
||||
[self.interactionController presentOpenInMenuFromRect:CGRectZero inView:viewController.view animated:YES];
|
||||
}
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Continue" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
}];
|
||||
NSURLComponents *components = [NSURLComponents new];
|
||||
components.scheme = @"volto";
|
||||
components.path = @"import";
|
||||
components.queryItems = @[ [[NSURLQueryItem alloc] initWithName:@"data" value:exportedUser] ];
|
||||
[UIApp openURL:components.URL];
|
||||
} );
|
||||
}];
|
||||
}
|
||||
|
||||
else if (self.voltoViewController)
|
||||
[self.window.rootViewController presentViewController:self.voltoViewController animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)changeMasterPasswordFor:(MPUserEntity *)user saveInContext:(NSManagedObjectContext *)moc didResetBlock:(void ( ^ )(void))didReset {
|
||||
@@ -643,7 +782,7 @@
|
||||
@"Changing your master password will cause all your generated passwords to change!\n"
|
||||
@"Changing the master password back to the old one will cause your passwords to revert as well."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Abort" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Continue" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[moc performBlockAndWait:^{
|
||||
inf( @"Clearing keyID for user: %@.", user.userID );
|
||||
user.keyID = nil;
|
||||
@@ -656,10 +795,17 @@
|
||||
didReset();
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Abort" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
[self.window.rootViewController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
}
|
||||
|
||||
#pragma mark - SKStoreProductViewControllerDelegate
|
||||
|
||||
- (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController {
|
||||
|
||||
[viewController dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - UIDocumentInteractionControllerDelegate
|
||||
|
||||
- (void)documentInteractionController:(UIDocumentInteractionController *)controller didEndSendingToApplication:(NSString *)application {
|
||||
@@ -681,20 +827,16 @@
|
||||
|
||||
// Send info
|
||||
NSArray *countlyFeatures = @[
|
||||
CLYConsentEvents, CLYConsentUserDetails, CLYConsentCrashReporting, CLYConsentViewTracking, CLYConsentStarRating
|
||||
CLYConsentSessions, CLYConsentEvents, CLYConsentUserDetails, CLYConsentCrashReporting, CLYConsentViewTracking, CLYConsentStarRating
|
||||
];
|
||||
if ([[MPConfig get].sendInfo boolValue] || ![[MPConfig get].sendInfoDecided boolValue])
|
||||
[Countly.sharedInstance giveConsentForFeature:CLYConsentSessions];
|
||||
else
|
||||
[Countly.sharedInstance cancelConsentForFeature:CLYConsentSessions];
|
||||
if ([[MPConfig get].sendInfo boolValue]) {
|
||||
if ([[MPiOSConfig get].sendInfo boolValue] || ![[MPiOSConfig get].sendInfoDecided boolValue]) {
|
||||
if ([PearlLogger get].printLevel > PearlLogLevelInfo)
|
||||
[PearlLogger get].printLevel = PearlLogLevelInfo;
|
||||
|
||||
[SentrySDK.currentHub getClient].options.enabled = @YES;
|
||||
[SentrySDK configureScope:^(SentryScope *scope) {
|
||||
[scope setExtraValue:[MPConfig get].rememberLogin forKey:@"rememberLogin"];
|
||||
[scope setExtraValue:[MPConfig get].sendInfo forKey:@"sendInfo"];
|
||||
[scope setExtraValue:[MPiOSConfig get].rememberLogin forKey:@"rememberLogin"];
|
||||
[scope setExtraValue:[MPiOSConfig get].sendInfo forKey:@"sendInfo"];
|
||||
[scope setExtraValue:[MPiOSConfig get].helpHidden forKey:@"helpHidden"];
|
||||
[scope setExtraValue:[MPiOSConfig get].showSetup forKey:@"showQuickStart"];
|
||||
[scope setExtraValue:[PearlConfig get].firstRun forKey:@"firstRun"];
|
||||
@@ -711,9 +853,8 @@
|
||||
#else
|
||||
[scope setExtraValue:@(NO) forKey:@"reviewedVersion"];
|
||||
#endif
|
||||
|
||||
[Countly.sharedInstance giveConsentForFeatures:countlyFeatures];
|
||||
}];
|
||||
[Countly.sharedInstance giveConsentForFeatures:countlyFeatures];
|
||||
}
|
||||
else {
|
||||
[Countly.sharedInstance cancelConsentForFeatures:countlyFeatures];
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
NSStringFromSelector( @selector( siteInfoHidden ) ) : @YES,
|
||||
NSStringFromSelector( @selector( showSetup ) ) : @YES,
|
||||
NSStringFromSelector( @selector( appleID ) ) : @"510296984",
|
||||
NSStringFromSelector( @selector( actionsTipShown ) ) : @(!self.firstRun),
|
||||
NSStringFromSelector( @selector( typeTipShown ) ) : @(!self.firstRun),
|
||||
NSStringFromSelector( @selector( actionsTipShown ) ) : @(![self.firstRun boolValue]),
|
||||
NSStringFromSelector( @selector( typeTipShown ) ) : @(![self.firstRun boolValue]),
|
||||
NSStringFromSelector( @selector( loginNameTipShown ) ): @NO,
|
||||
NSStringFromSelector( @selector( traceMode ) ) : @NO,
|
||||
NSStringFromSelector( @selector( dictationSearch ) ) : @NO,
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
<dict>
|
||||
<key>CFBundleTypeIconFiles</key>
|
||||
<array>
|
||||
<string>Icon-Small</string>
|
||||
<string>Icon-64.png</string>
|
||||
<string>Icon-320.png</string>
|
||||
<string>Icon-Small-40.png</string>
|
||||
<string>Icon-Small-40@2x.png</string>
|
||||
<string>Icon-Small-40@3x.png</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Master Password sites</string>
|
||||
@@ -21,6 +21,7 @@
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.lyndir.masterpassword.json</string>
|
||||
<string>com.lyndir.masterpassword.sites</string>
|
||||
</array>
|
||||
</dict>
|
||||
@@ -37,8 +38,30 @@
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>[auto]</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLIconFile</key>
|
||||
<string>Icon-Small-40@3x</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>com.lyndir.masterpassword</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>masterpassword</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>[auto]</string>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>firefox</string>
|
||||
<string>googlechrome</string>
|
||||
<string>opera-http</string>
|
||||
<string>volto</string>
|
||||
</array>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||
@@ -103,6 +126,34 @@
|
||||
</array>
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>Master Password JSON export</string>
|
||||
<key>UTTypeIconFiles</key>
|
||||
<array>
|
||||
<string>Icon-Small-40.png</string>
|
||||
<string>Icon-Small-40@2x.png</string>
|
||||
<string>Icon-Small-40@3x.png</string>
|
||||
</array>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>com.lyndir.masterpassword.json</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>https://gitlab.com/MasterPassword/MasterPassword/-/wikis/File-Format</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>mpjson</string>
|
||||
<string>mpsites.json</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<string>text/plain</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
@@ -112,9 +163,9 @@
|
||||
<string>Master Password sites</string>
|
||||
<key>UTTypeIconFiles</key>
|
||||
<array>
|
||||
<string>Icon-Small.png</string>
|
||||
<string>Icon-64.png</string>
|
||||
<string>Icon-320.png</string>
|
||||
<string>Icon-Small-40.png</string>
|
||||
<string>Icon-Small-40@2x.png</string>
|
||||
<string>Icon-Small-40@3x.png</string>
|
||||
</array>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>com.lyndir.masterpassword.sites</string>
|
||||
@@ -123,6 +174,7 @@
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>mpsites</string>
|
||||
<string>mpsites.txt</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="Q1S-vU-GGO">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="Q1S-vU-GGO">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
@@ -69,7 +69,7 @@
|
||||
</collectionViewFlowLayout>
|
||||
<cells>
|
||||
<collectionViewCell opaque="NO" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="MPAvatarCell" id="Zab-uQ-uk9" customClass="MPAvatarCell">
|
||||
<rect key="frame" x="80" y="114.5" width="215" height="667"/>
|
||||
<rect key="frame" x="80" y="115" width="215" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="215" height="667"/>
|
||||
@@ -97,10 +97,10 @@
|
||||
</constraints>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0Sa-Vg-EEI" userLabel="Name Backdrop">
|
||||
<rect key="frame" x="43.5" y="263" width="128.5" height="16"/>
|
||||
<rect key="frame" x="43.5" y="263" width="128" height="16"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalCompressionResistancePriority="1000" text="Maarten Billemont" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cLT-s0-4SQ" userLabel="Name Field">
|
||||
<rect key="frame" x="5" y="0.0" width="118.5" height="16"/>
|
||||
<rect key="frame" x="5" y="0.0" width="118" height="16"/>
|
||||
<fontDescription key="fontDescription" name="Exo2.0-ExtraBold" family="Exo 2.0" pointSize="13"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -288,14 +288,14 @@
|
||||
</connections>
|
||||
</button>
|
||||
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="069-Pu-yXe" userLabel="Thanks Tip">
|
||||
<rect key="frame" x="91" y="0.0" width="232.5" height="60"/>
|
||||
<rect key="frame" x="90.5" y="0.0" width="233" height="60"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="tip_basic_black.png" translatesAutoresizingMaskIntoConstraints="NO" id="Z8P-ZK-aS0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="232.5" height="60"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="233" height="60"/>
|
||||
<rect key="contentStretch" x="0.15000000000000002" y="0.0" width="0.69999999999999973" height="1"/>
|
||||
</imageView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Why is Master Password free?" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="BLV-3x-Q0z">
|
||||
<rect key="frame" x="20" y="11.5" width="192.5" height="17"/>
|
||||
<rect key="frame" x="20" y="11.5" width="193" height="17"/>
|
||||
<fontDescription key="fontDescription" name="Exo2.0-Regular" family="Exo 2.0" pointSize="14"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -442,21 +442,12 @@
|
||||
<outlet property="nextAvatarButton" destination="fUK-gJ-NRE" id="5qo-lK-rSa"/>
|
||||
<outlet property="preferencesTipContainer" destination="0Um-Ot-hI6" id="Cv8-Bp-ZZs"/>
|
||||
<outlet property="previousAvatarButton" destination="9u7-pu-Wtv" id="Hgv-lN-S1n"/>
|
||||
<outlet property="searchDisplayController" destination="h98-GT-FoS" id="VvS-JO-rqq"/>
|
||||
<outlet property="storeLoadingActivity" destination="VDd-oM-ZOO" id="MJ7-2f-e8n"/>
|
||||
<outlet property="thanksTipContainer" destination="069-Pu-yXe" id="wWf-2X-Ryw"/>
|
||||
<outlet property="userSelectionContainer" destination="rWM-08-aab" id="Yme-hX-8P0"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="8hZ-Tb-wZw" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<searchDisplayController id="h98-GT-FoS">
|
||||
<connections>
|
||||
<outlet property="delegate" destination="S8q-YF-Kt9" id="hyY-rf-2x2"/>
|
||||
<outlet property="searchContentsController" destination="S8q-YF-Kt9" id="2RA-rs-GhH"/>
|
||||
<outlet property="searchResultsDataSource" destination="S8q-YF-Kt9" id="Cdu-go-UBQ"/>
|
||||
<outlet property="searchResultsDelegate" destination="S8q-YF-Kt9" id="xxe-xE-sFM"/>
|
||||
</connections>
|
||||
</searchDisplayController>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="2041" y="226"/>
|
||||
</scene>
|
||||
@@ -472,17 +463,11 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<webView contentMode="scaleToFill" scalesPageToFit="YES" suppressesIncrementalRendering="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3aB-Hk-Fgd">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="Sd5-eW-Cx2" id="ePX-qz-XXR"/>
|
||||
</connections>
|
||||
</webView>
|
||||
<navigationBar contentMode="scaleToFill" barStyle="black" translatesAutoresizingMaskIntoConstraints="NO" id="03x-KT-JQN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="90"/>
|
||||
<items>
|
||||
<navigationItem title="masterpassword.app" prompt="Loading" id="Wpf-6b-UJb">
|
||||
<barButtonItem key="leftBarButtonItem" systemItem="action" id="d9P-Hd-rdw"/>
|
||||
<barButtonItem key="rightBarButtonItem" systemItem="done" id="Tbg-c3-qOh">
|
||||
<connections>
|
||||
<action selector="done:" destination="Sd5-eW-Cx2" id="cuN-bV-cwl"/>
|
||||
@@ -494,19 +479,14 @@
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.12549020350000001" green="0.1411764771" blue="0.14901961389999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="3aB-Hk-Fgd" firstAttribute="top" secondItem="zXV-QC-CZm" secondAttribute="bottom" id="3Od-Xa-Ssc"/>
|
||||
<constraint firstItem="03x-KT-JQN" firstAttribute="leading" secondItem="2Jz-8H-3nG" secondAttribute="leading" id="BAn-wU-k2A"/>
|
||||
<constraint firstItem="03x-KT-JQN" firstAttribute="top" secondItem="zXV-QC-CZm" secondAttribute="bottom" id="JU6-uj-GA3"/>
|
||||
<constraint firstAttribute="bottom" secondItem="3aB-Hk-Fgd" secondAttribute="bottom" id="S01-AA-E0a"/>
|
||||
<constraint firstAttribute="trailing" secondItem="03x-KT-JQN" secondAttribute="trailing" id="sQs-u3-M3r"/>
|
||||
<constraint firstItem="3aB-Hk-Fgd" firstAttribute="leading" secondItem="2Jz-8H-3nG" secondAttribute="leading" id="w1l-x3-qCi"/>
|
||||
<constraint firstAttribute="trailing" secondItem="3aB-Hk-Fgd" secondAttribute="trailing" id="xdJ-WF-yw0"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="gmy-ym-z4I"/>
|
||||
<connections>
|
||||
<outlet property="webNavigationItem" destination="Wpf-6b-UJb" id="8gM-LU-pHk"/>
|
||||
<outlet property="webView" destination="3aB-Hk-Fgd" id="Mie-rI-l4h"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="hNt-WS-DuE" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
@@ -542,12 +522,23 @@
|
||||
<view key="view" contentMode="scaleToFill" id="c4P-nn-PjR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qca-aL-Un8">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<connections>
|
||||
<segue destination="Ac5-na-hOV" kind="embed" identifier="root" id="x4h-Hl-KXD"/>
|
||||
</connections>
|
||||
</containerView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="qca-aL-Un8" firstAttribute="top" secondItem="c4P-nn-PjR" secondAttribute="top" id="7ix-Oo-ELN"/>
|
||||
<constraint firstAttribute="bottom" secondItem="qca-aL-Un8" secondAttribute="bottom" id="JRU-fk-cPG"/>
|
||||
<constraint firstItem="qca-aL-Un8" firstAttribute="leading" secondItem="c4P-nn-PjR" secondAttribute="leading" id="OAO-XC-DQ1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="qca-aL-Un8" secondAttribute="trailing" id="R9n-bd-GVl"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="V6W-ql-3TD"/>
|
||||
<connections>
|
||||
<segue destination="Ac5-na-hOV" kind="custom" identifier="root" customClass="MPRootSegue" id="UKS-gd-oD2"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="fQY-fV-sIe" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
@@ -568,12 +559,25 @@
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" image="background.png" translatesAutoresizingMaskIntoConstraints="NO" id="Lkg-xn-bce" userLabel="Background">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
</imageView>
|
||||
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="91I-wN-JQb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="boolean" keyPath="ignoreTouches" value="YES"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<segue destination="S8q-YF-Kt9" kind="embed" identifier="users" id="GzD-Zv-DzW"/>
|
||||
</connections>
|
||||
</containerView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="91I-wN-JQb" firstAttribute="leading" secondItem="fkJ-D0-yue" secondAttribute="leading" id="E4w-Dw-Vip"/>
|
||||
<constraint firstItem="Lkg-xn-bce" firstAttribute="top" secondItem="fkJ-D0-yue" secondAttribute="top" id="EIy-Cd-0vW"/>
|
||||
<constraint firstItem="91I-wN-JQb" firstAttribute="top" secondItem="fkJ-D0-yue" secondAttribute="top" id="EeB-9X-PEK"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Lkg-xn-bce" secondAttribute="trailing" id="ROW-fK-z92"/>
|
||||
<constraint firstItem="Lkg-xn-bce" firstAttribute="leading" secondItem="fkJ-D0-yue" secondAttribute="leading" id="UH5-Kk-taJ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="91I-wN-JQb" secondAttribute="bottom" id="mxv-9s-jxT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Lkg-xn-bce" secondAttribute="bottom" id="txR-pf-v3l"/>
|
||||
<constraint firstAttribute="trailing" secondItem="91I-wN-JQb" secondAttribute="trailing" id="uef-ig-RRl"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="MPa-zX-Kaq"/>
|
||||
@@ -581,7 +585,6 @@
|
||||
<connections>
|
||||
<segue destination="osn-5H-SWW" kind="custom" identifier="emergency" customClass="MPOverlaySegue" id="gtX-Cx-AA2"/>
|
||||
<segue destination="nkY-z6-8jd" kind="custom" identifier="passwords" customClass="MPSitesSegue" id="Ozp-YT-Utx"/>
|
||||
<segue destination="S8q-YF-Kt9" kind="custom" identifier="users" customClass="MPRootSegue" id="StK-nr-nps"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="F33-Fe-Tb6" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
@@ -1146,7 +1149,8 @@ Note that this feature requires you enable the Save Password option and have pur
|
||||
<collectionView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" minimumZoomScale="0.0" maximumZoomScale="0.0" keyboardDismissMode="interactive" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="aXw-tn-8Sj" userLabel="Password Collection">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" sectionInsetReference="safeArea" id="Mv1-29-TWx">
|
||||
<edgeInsets key="layoutMargins" top="100" left="0.0" bottom="0.0" right="0.0"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" sectionInsetReference="layoutMargins" id="Mv1-29-TWx">
|
||||
<size key="itemSize" width="355" height="100"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
@@ -1154,7 +1158,7 @@ Note that this feature requires you enable the Save Password option and have pur
|
||||
</collectionViewFlowLayout>
|
||||
<cells>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="MPSiteCell" id="W2g-yv-V3V" customClass="MPSiteCell">
|
||||
<rect key="frame" x="29.5" y="10" width="355" height="100"/>
|
||||
<rect key="frame" x="29.5" y="110" width="355" height="100"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO">
|
||||
<rect key="frame" x="0.0" y="0.0" width="355" height="100"/>
|
||||
@@ -2237,7 +2241,7 @@ Suspendisse potenti. Etiam ut nisi id augue tempor ultrices et sit amet sapien.
|
||||
<dataDetectorType key="dataDetectorTypes" link="YES"/>
|
||||
</textView>
|
||||
<toolbar contentMode="scaleToFill" barStyle="black" translatesAutoresizingMaskIntoConstraints="NO" id="WmH-JB-jp2">
|
||||
<rect key="frame" x="0.0" y="764" width="414" height="49"/>
|
||||
<rect key="frame" x="0.0" y="769" width="414" height="44"/>
|
||||
<items>
|
||||
<barButtonItem systemItem="compose" id="BSV-3i-01h">
|
||||
<connections>
|
||||
@@ -2252,7 +2256,7 @@ Suspendisse potenti. Etiam ut nisi id augue tempor ultrices et sit amet sapien.
|
||||
<barButtonItem systemItem="flexibleSpace" id="Lp4-ss-KxI"/>
|
||||
<barButtonItem style="plain" id="aMS-HH-mnE">
|
||||
<segmentedControl key="customView" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="bar" selectedSegmentIndex="0" id="lxp-wx-uCy">
|
||||
<rect key="frame" x="267" y="11" width="127" height="32"/>
|
||||
<rect key="frame" x="267" y="6" width="127" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<segments>
|
||||
<segment title="Normal"/>
|
||||
@@ -2324,7 +2328,7 @@ Suspendisse potenti. Etiam ut nisi id augue tempor ultrices et sit amet sapien.
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" image="background.png" translatesAutoresizingMaskIntoConstraints="NO" id="OsH-Mq-gpM">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" image="background.png" translatesAutoresizingMaskIntoConstraints="NO" id="OsH-Mq-gpM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
|
||||
</imageView>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ol8-3I-X99">
|
||||
@@ -2412,7 +2416,7 @@ However, it means that anyone who finds your device unlocked can do the same.</s
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" image="background.png" translatesAutoresizingMaskIntoConstraints="NO" id="Hrg-vp-M2J">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" image="background.png" translatesAutoresizingMaskIntoConstraints="NO" id="Hrg-vp-M2J">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
|
||||
</imageView>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fJc-xU-1xA">
|
||||
@@ -2752,7 +2756,7 @@ Invested: 3.7 work hours</string>
|
||||
<rect key="frame" x="188.5" y="20" width="37" height="37"/>
|
||||
</activityIndicatorView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" verticalCompressionResistancePriority="751" text="Loading products..." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="12" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="NPg-it-juF">
|
||||
<rect key="frame" x="134.5" y="97" width="145.5" height="25"/>
|
||||
<rect key="frame" x="134" y="97" width="146" height="25"/>
|
||||
<fontDescription key="fontDescription" name="Exo2.0-Regular" family="Exo 2.0" pointSize="17"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -3036,7 +3040,7 @@ Invested: 3.7 work hours</string>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" image="background.png" translatesAutoresizingMaskIntoConstraints="NO" id="rvb-7K-MHe">
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" image="background.png" translatesAutoresizingMaskIntoConstraints="NO" id="rvb-7K-MHe">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
|
||||
</imageView>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7A7-Yn-F6L">
|
||||
@@ -3269,7 +3273,7 @@ Ut in geometria, prima si dederis, danda sunt omnia. Nonne igitur tibi videntur,
|
||||
</scenes>
|
||||
<inferredMetricsTieBreakers>
|
||||
<segue reference="Ql4-wf-T8u"/>
|
||||
<segue reference="GZk-I4-JyH"/>
|
||||
<segue reference="gtb-zE-u9H"/>
|
||||
</inferredMetricsTieBreakers>
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<resources>
|
||||
|
||||
@@ -1097,6 +1097,8 @@ MPMarshalledFile *mpw_marshal_read(
|
||||
info->format = MPMarshalFormatJSON;
|
||||
#if MPW_JSON
|
||||
mpw_marshal_read_json( file, in );
|
||||
#else
|
||||
mpw_marshal_error( file, MPMarshalErrorFormat, "JSON support is not enabled." );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ public interface MPAlgorithm {
|
||||
/**
|
||||
* The algorithm iterations.
|
||||
*/
|
||||
enum Version implements MPAlgorithm {
|
||||
enum Version implements MPAlgorithm {
|
||||
|
||||
/**
|
||||
* bugs:
|
||||
@@ -346,7 +346,7 @@ public interface MPAlgorithm {
|
||||
@Nonnull
|
||||
@Override
|
||||
public Version version() {
|
||||
return MPAlgorithm.Version.V0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -20,7 +20,6 @@ package com.lyndir.masterpassword;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.primitives.UnsignedInteger;
|
||||
import com.lyndir.lhunath.opal.system.CodeUtils;
|
||||
import com.lyndir.lhunath.opal.system.logging.Logger;
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumMap;
|
||||
@@ -56,6 +55,7 @@ public class MPMasterKey {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize()
|
||||
throws Throwable {
|
||||
|
||||
|
||||