Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bac8d9e0a | ||
|
|
3fa7e1e8a1 | ||
|
|
d1104e4028 | ||
|
|
e9f2a25c9c | ||
|
|
171a3f0978 | ||
|
|
8cfb9a83c5 | ||
|
|
5717375e75 | ||
|
|
cc2dca3bd0 | ||
|
|
7575924d80 | ||
|
|
8bedcedfaf | ||
|
|
10b205c541 | ||
|
|
774f183ac0 | ||
|
|
2279aacb5a | ||
|
|
1bd654621c | ||
|
|
c4f60e325d | ||
|
|
d4de3afb72 | ||
|
|
694b5ea227 | ||
|
|
66dd78797b | ||
|
|
61d1660560 | ||
|
|
c3568e4744 | ||
|
|
0c921d4318 | ||
|
|
0178efaaf7 |
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
@@ -77,11 +77,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 +150,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, ); }; };
|
||||
@@ -166,6 +176,7 @@
|
||||
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 */; };
|
||||
@@ -573,19 +584,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 +595,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 +649,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 +673,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 +1609,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 +1698,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 +1788,7 @@
|
||||
DA5BFA47147E415C00F98B1E /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DA72E22F2453B91700676D4F /* WebKit.framework */,
|
||||
DAFC1F6F2439795000D1CD66 /* CoreServices.framework */,
|
||||
DAB7AE5C1F3D752900C856B1 /* libjson-c.a */,
|
||||
DA6701B716406A4100B61001 /* Accounts.framework */,
|
||||
@@ -3286,6 +3300,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 +3320,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 +3376,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 +3393,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 +3441,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 +3449,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 +3466,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;
|
||||
};
|
||||
@@ -3865,7 +3889,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 +4017,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 +4024,7 @@
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
"-DMPW_CPERCIVA=0",
|
||||
"-DMPW_JSON=1",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lyndir.lhunath.MasterPassword;
|
||||
PRODUCT_NAME = MasterPassword;
|
||||
@@ -4013,9 +4032,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 +4044,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 +4053,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 +4060,7 @@
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
"-DMPW_CPERCIVA=0",
|
||||
"-DMPW_JSON=1",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lyndir.lhunath.MasterPassword;
|
||||
PRODUCT_NAME = MasterPassword;
|
||||
@@ -4057,10 +4068,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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -46,9 +46,10 @@ esac
|
||||
description=$(git describe --always --dirty --long --match "*-$platform*")
|
||||
version=${description%-g*} build=${version##*-} version=${version%-$build}
|
||||
version=${version//-$platform/} version=${version//-/.} commit=${description##*-g}
|
||||
IFS=. read major minor build <<< "$version"
|
||||
|
||||
addPlistWithKey GITDescription string "$description"
|
||||
setPlistWithKey CFBundleVersion "$(hr "${version%%.*}" 14).${version#*.}"
|
||||
setPlistWithKey CFBundleVersion "$(hr "$major" 14)$(printf '%02d' "$minor")$(printf '%02d' "$build")"
|
||||
setPlistWithKey CFBundleShortVersionString "$version"
|
||||
|
||||
setSettingWithTitle "Build" "$commit"
|
||||
|
||||
@@ -197,18 +197,16 @@ PearlAssociatedObjectProperty( NSMutableArray*, ProductObservers, productObserve
|
||||
forKey:transaction.payment.productIdentifier];
|
||||
[queue finishTransaction:transaction];
|
||||
|
||||
if ([[MPConfig get].sendInfo boolValue]) {
|
||||
SKProduct *product = self.products[transaction.payment.productIdentifier];
|
||||
[attributes addEntriesFromDictionary:@{
|
||||
@"id": product.productIdentifier,
|
||||
@"name": product.localizedTitle,
|
||||
@"price": product.price.description,
|
||||
@"currency": [product.priceLocale objectForKey:NSLocaleCurrencyCode],
|
||||
@"state" : @"success",
|
||||
@"quantity": @(transaction.payment.quantity).description,
|
||||
}];
|
||||
[Countly.sharedInstance recordEvent:@"purchase" segmentation:attributes];
|
||||
}
|
||||
SKProduct *product = self.products[transaction.payment.productIdentifier];
|
||||
[attributes addEntriesFromDictionary:@{
|
||||
@"id": product.productIdentifier,
|
||||
@"name": product.localizedTitle,
|
||||
@"price": product.price.description,
|
||||
@"currency": [product.priceLocale objectForKey:NSLocaleCurrencyCode],
|
||||
@"state" : @"success",
|
||||
@"quantity": @(transaction.payment.quantity).description,
|
||||
}];
|
||||
[Countly.sharedInstance recordEvent:@"purchase" segmentation:attributes];
|
||||
break;
|
||||
}
|
||||
case SKPaymentTransactionStateRestored: {
|
||||
@@ -224,18 +222,16 @@ PearlAssociatedObjectProperty( NSMutableArray*, ProductObservers, productObserve
|
||||
MPError( transaction.error, @"Transaction failed: %@.", transaction.payment.productIdentifier );
|
||||
[queue finishTransaction:transaction];
|
||||
|
||||
if ([[MPConfig get].sendInfo boolValue]) {
|
||||
SKProduct *product = self.products[transaction.payment.productIdentifier];
|
||||
[Countly.sharedInstance recordEvent:@"purchase" segmentation:@{
|
||||
@"id": product.productIdentifier,
|
||||
@"name": product.localizedTitle,
|
||||
@"price": product.price.description,
|
||||
@"currency": [product.priceLocale objectForKey:NSLocaleCurrencyCode],
|
||||
@"state" : @"failed",
|
||||
@"quantity": @(transaction.payment.quantity).description,
|
||||
@"reason" : [transaction.error localizedFailureReason]?: [transaction.error localizedDescription],
|
||||
}];
|
||||
}
|
||||
SKProduct *product = self.products[transaction.payment.productIdentifier];
|
||||
[Countly.sharedInstance recordEvent:@"purchase" segmentation:@{
|
||||
@"id": product.productIdentifier,
|
||||
@"name": product.localizedTitle,
|
||||
@"price": product.price.description,
|
||||
@"currency": [product.priceLocale objectForKey:NSLocaleCurrencyCode],
|
||||
@"state" : @"failed",
|
||||
@"quantity": @(transaction.payment.quantity).description,
|
||||
@"reason" : [transaction.error localizedFailureReason]?: [transaction.error localizedDescription],
|
||||
}];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,13 +173,11 @@
|
||||
else
|
||||
dbg( @"Automatic login failed for user: %@", user.userID );
|
||||
|
||||
if ([[MPConfig get].sendInfo boolValue]) {
|
||||
[Countly.sharedInstance recordEvent:@"login" segmentation:@{
|
||||
@"method" : password? @"Password": @"Automatic",
|
||||
@"state" : @"failed",
|
||||
@"algorithm": @(user.algorithm.version).description,
|
||||
}];
|
||||
}
|
||||
[Countly.sharedInstance recordEvent:@"login" segmentation:@{
|
||||
@"method" : password? @"Password": @"Automatic",
|
||||
@"state" : @"failed",
|
||||
@"algorithm": @(user.algorithm.version).description,
|
||||
}];
|
||||
|
||||
return NO;
|
||||
}
|
||||
@@ -203,15 +201,13 @@
|
||||
}
|
||||
|
||||
@try {
|
||||
if ([[MPConfig get].sendInfo boolValue]) {
|
||||
[Countly.sharedInstance userLoggedIn:user.userID];
|
||||
[Countly.sharedInstance userLoggedIn:user.userID];
|
||||
|
||||
[Countly.sharedInstance recordEvent:@"login" segmentation:@{
|
||||
@"method" : password? @"Password": @"Automatic",
|
||||
@"state" : @"success",
|
||||
@"algorithm": @(user.algorithm.version).description,
|
||||
}];
|
||||
}
|
||||
[Countly.sharedInstance recordEvent:@"login" segmentation:@{
|
||||
@"method" : password? @"Password": @"Automatic",
|
||||
@"state" : @"success",
|
||||
@"algorithm": @(user.algorithm.version).description,
|
||||
}];
|
||||
}
|
||||
@catch (id exception) {
|
||||
err( @"While setting username: %@", exception );
|
||||
|
||||
@@ -119,8 +119,7 @@ static MPAppDelegate_Shared *instance;
|
||||
if (self.key)
|
||||
self.key = nil;
|
||||
|
||||
if ([[MPConfig get].sendInfo boolValue])
|
||||
[Countly.sharedInstance userLoggedOut];
|
||||
[Countly.sharedInstance userLoggedOut];
|
||||
|
||||
self.activeUserOID = activeUserOID;
|
||||
|
||||
|
||||
@@ -39,8 +39,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
|
||||
|
||||
@@ -563,50 +563,46 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
||||
|
||||
// Read metadata for the import file.
|
||||
MPMarshalledFile *file = mpw_marshal_read( NULL, importData.UTF8String );
|
||||
if (!file)
|
||||
return MPError( ([NSError errorWithDomain:MPErrorDomain code:MPErrorMarshalCode userInfo:@{
|
||||
@"type" : @(MPMarshalErrorInternal),
|
||||
NSLocalizedDescriptionKey: @"Could not process Master Password import data.",
|
||||
}]), @"While importing sites." );
|
||||
if (file->error.type != MPMarshalSuccess) {
|
||||
MPMarshalErrorType type = file->error.type;
|
||||
mpw_marshal_file_free( &file );
|
||||
return MPError( ([NSError errorWithDomain:MPErrorDomain code:MPErrorMarshalCode userInfo:@{
|
||||
@"type" : @(type),
|
||||
NSLocalizedDescriptionKey: @"Could not parse Master Password import data.",
|
||||
}]), @"While importing sites." );
|
||||
}
|
||||
if (file->info->format == MPMarshalFormatNone) {
|
||||
mpw_marshal_file_free( &file );
|
||||
return MPError( ([NSError errorWithDomain:MPErrorDomain code:MPErrorMarshalCode userInfo:@{
|
||||
@"type" : @(MPMarshalErrorFormat),
|
||||
NSLocalizedDescriptionKey: @"This is not a Master Password import file.",
|
||||
}]), @"While importing sites." );
|
||||
}
|
||||
|
||||
// Get master password for import file.
|
||||
MPKey *importKey;
|
||||
NSString *importMasterPassword;
|
||||
do {
|
||||
importMasterPassword = askImportPassword( @(file->info->fullName) );
|
||||
if (!importMasterPassword) {
|
||||
inf( @"Import cancelled." );
|
||||
mpw_marshal_file_free( &file );
|
||||
return MPError( ([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]), @"" );
|
||||
MPMarshalledUser *importUser = nil;
|
||||
@try {
|
||||
if (!file)
|
||||
return MPError( ([NSError errorWithDomain:MPErrorDomain code:MPErrorMarshalCode userInfo:@{
|
||||
@"type" : @(MPMarshalErrorInternal),
|
||||
NSLocalizedDescriptionKey: @"Could not process Master Password import data.",
|
||||
}]), @"While importing sites." );
|
||||
if (file->error.type != MPMarshalSuccess) {
|
||||
return MPError( ([NSError errorWithDomain:MPErrorDomain code:MPErrorMarshalCode userInfo:@{
|
||||
@"type" : @(file->error.type),
|
||||
NSLocalizedDescriptionKey: strf( @"Could not parse Master Password import data:\n%@", @(file->error.message) ),
|
||||
}]), @"While importing sites." );
|
||||
}
|
||||
if (file->info->format == MPMarshalFormatNone) {
|
||||
return MPError( ([NSError errorWithDomain:MPErrorDomain code:MPErrorMarshalCode userInfo:@{
|
||||
@"type" : @(MPMarshalErrorFormat),
|
||||
NSLocalizedDescriptionKey: @"This is not a Master Password import file.",
|
||||
}]), @"While importing sites." );
|
||||
}
|
||||
|
||||
importKey = [[MPKey alloc] initForFullName:@(file->info->fullName) withMasterPassword:importMasterPassword];
|
||||
} while ([[[importKey keyIDForAlgorithm:MPAlgorithmForVersion( file->info->algorithm )] encodeHex]
|
||||
caseInsensitiveCompare:@(file->info->keyID)] != NSOrderedSame);
|
||||
// Get master password for import file.
|
||||
MPKey *importKey;
|
||||
NSString *importMasterPassword;
|
||||
do {
|
||||
importMasterPassword = askImportPassword( @(file->info->fullName) );
|
||||
if (!importMasterPassword) {
|
||||
inf( @"Import cancelled." );
|
||||
return MPError( ([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]), @"" );
|
||||
}
|
||||
|
||||
// Parse import data.
|
||||
MPMarshalledUser *importUser = mpw_marshal_auth( file, mpw_masterKeyProvider_str( importMasterPassword.UTF8String ) );
|
||||
importKey = [[MPKey alloc] initForFullName:@(file->info->fullName) withMasterPassword:importMasterPassword];
|
||||
} while ([[[importKey keyIDForAlgorithm:MPAlgorithmForVersion( file->info->algorithm )] encodeHex]
|
||||
caseInsensitiveCompare:@(file->info->keyID)] != NSOrderedSame);
|
||||
|
||||
@try {
|
||||
// Parse import data.
|
||||
importUser = mpw_marshal_auth( file, mpw_masterKeyProvider_str( importMasterPassword.UTF8String ) );
|
||||
if (!importUser || file->error.type != MPMarshalSuccess)
|
||||
return MPError( ([NSError errorWithDomain:MPErrorDomain code:MPErrorMarshalCode userInfo:@{
|
||||
@"type" : @(file->error.type),
|
||||
NSLocalizedDescriptionKey: @(file->error.message),
|
||||
NSLocalizedDescriptionKey: strf( @"Could not authenticate Master Password import:\n%@", @(file->error.message) ),
|
||||
}]), @"While importing sites." );
|
||||
|
||||
// Find an existing user to update.
|
||||
@@ -708,16 +704,23 @@ 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;
|
||||
}
|
||||
|
||||
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 );
|
||||
@@ -741,22 +744,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
|
||||
|
||||
@@ -21,11 +21,13 @@
|
||||
@interface MPConfig : PearlConfig
|
||||
|
||||
@property(nonatomic, retain) NSNumber *sendInfo;
|
||||
@property(nonatomic, retain) NSNumber *sendInfoDecided;
|
||||
@property(nonatomic, retain) NSNumber *notificationsDecided;
|
||||
|
||||
@property(nonatomic, retain) NSNumber *rememberLogin;
|
||||
@property(nonatomic, retain) NSNumber *hidePasswords;
|
||||
@property(nonatomic, strong) NSNumber *siteAttacker;
|
||||
|
||||
@property(nonatomic, retain) NSNumber *checkInconsistency;
|
||||
|
||||
@property(nonatomic, strong) NSNumber *siteAttacker;
|
||||
|
||||
@end
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
@implementation MPConfig
|
||||
|
||||
@dynamic sendInfo, rememberLogin, checkInconsistency, hidePasswords, siteAttacker;
|
||||
@dynamic sendInfo, sendInfoDecided, notificationsDecided, rememberLogin, hidePasswords, siteAttacker, checkInconsistency;
|
||||
|
||||
- (id)init {
|
||||
|
||||
@@ -29,13 +29,16 @@
|
||||
return nil;
|
||||
|
||||
[self.defaults registerDefaults:@{
|
||||
NSStringFromSelector( @selector( askForReviews ) ) : @YES,
|
||||
NSStringFromSelector( @selector( sendInfo ) ) : @NO,
|
||||
NSStringFromSelector( @selector( sendInfoDecided ) ) : @NO,
|
||||
NSStringFromSelector( @selector( notificationsDecided ) ): @NO,
|
||||
|
||||
NSStringFromSelector( @selector( sendInfo ) ) : @YES,
|
||||
NSStringFromSelector( @selector( rememberLogin ) ) : @NO,
|
||||
NSStringFromSelector( @selector( hidePasswords ) ) : @NO,
|
||||
NSStringFromSelector( @selector( checkInconsistency ) ): @NO,
|
||||
NSStringFromSelector( @selector( siteAttacker ) ) : @(MPAttacker1),
|
||||
NSStringFromSelector( @selector( rememberLogin ) ) : @NO,
|
||||
NSStringFromSelector( @selector( hidePasswords ) ) : @NO,
|
||||
NSStringFromSelector( @selector( siteAttacker ) ) : @(MPAttacker1),
|
||||
|
||||
NSStringFromSelector( @selector( checkInconsistency ) ) : @NO,
|
||||
NSStringFromSelector( @selector( askForReviews ) ) : @YES,
|
||||
}];
|
||||
|
||||
self.delegate = [MPAppDelegate_Shared get];
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
#define LOGIN_HELPER_BUNDLE_ID @"com.lyndir.lhunath.MasterPassword.Mac.LoginHelper"
|
||||
|
||||
|
||||
@implementation MPMacAppDelegate
|
||||
|
||||
#pragma clang diagnostic push
|
||||
@@ -69,7 +68,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
|
||||
@try {
|
||||
// Sentry
|
||||
[SentrySDK initWithOptions:@{
|
||||
[SentrySDK startWithOptions:@{
|
||||
@"dsn" : NilToNSNull( decrypt( sentryDSN ) ),
|
||||
#ifdef DEBUG
|
||||
@"debug" : @(YES),
|
||||
@@ -81,12 +80,12 @@ 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) {
|
||||
PearlLogLevel level = PearlLogLevelWarn;
|
||||
if ([[MPConfig get].sendInfo boolValue])
|
||||
if ([[MPMacConfig get].sendInfo boolValue])
|
||||
level = PearlLogLevelDebug;
|
||||
|
||||
if (message.level >= level) {
|
||||
@@ -134,7 +133,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
#if DEBUG
|
||||
countlyConfig.enableDebug = YES;
|
||||
countlyConfig.pushTestMode = CLYPushTestModeDevelopment;
|
||||
#elif ! PUBLIC
|
||||
#elif !PUBLIC
|
||||
countlyConfig.enableDebug = NO;
|
||||
countlyConfig.pushTestMode = CLYPushTestModeTestFlightOrAdHoc;
|
||||
#endif
|
||||
@@ -145,7 +144,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
}
|
||||
|
||||
// Setup delegates and listeners.
|
||||
[MPConfig get].delegate = self;
|
||||
[MPMacConfig get].delegate = self;
|
||||
__weak id weakSelf = self;
|
||||
[self addObserverBlock:^(NSString *keyPath, id object, NSDictionary *change, void *context) {
|
||||
dispatch_async( dispatch_get_main_queue(), ^{
|
||||
@@ -205,12 +204,12 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
}
|
||||
|
||||
[self enableNotifications];
|
||||
[self tryNotifications];
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(NSNotification *)notification {
|
||||
|
||||
if (![[MPConfig get].rememberLogin boolValue])
|
||||
if (![[MPMacConfig get].rememberLogin boolValue])
|
||||
[self lock:nil];
|
||||
}
|
||||
|
||||
@@ -231,7 +230,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
return NSTerminateNow;
|
||||
}
|
||||
|
||||
- (void)enableNotifications {
|
||||
- (void)tryNotifications {
|
||||
|
||||
[Countly.sharedInstance giveConsentForFeature:CLYConsentPushNotifications];
|
||||
if (@available( macOS 10.14, * )) {
|
||||
@@ -250,18 +249,19 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
|
||||
- (void)askNotifications {
|
||||
|
||||
if ([[MPMacConfig get].notificationsDecided boolValue])
|
||||
return;
|
||||
|
||||
PearlMainQueue( ^{
|
||||
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"notificationsDecided"]) {
|
||||
if (@available( macOS 10.14, * )) {
|
||||
[Countly.sharedInstance askForNotificationPermissionWithOptions:UNAuthorizationOptionAlert completionHandler:
|
||||
^(BOOL granted, NSError *error) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"notificationsDecided"];
|
||||
}];
|
||||
}
|
||||
else {
|
||||
[Countly.sharedInstance askForNotificationPermission];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"notificationsDecided"];
|
||||
}
|
||||
if (@available( macOS 10.14, * )) {
|
||||
[Countly.sharedInstance askForNotificationPermissionWithOptions:UNAuthorizationOptionAlert completionHandler:
|
||||
^(BOOL granted, NSError *error) {
|
||||
[MPMacConfig get].notificationsDecided = @(YES);
|
||||
}];
|
||||
}
|
||||
else {
|
||||
[Countly.sharedInstance askForNotificationPermission];
|
||||
[MPMacConfig get].notificationsDecided = @(YES);
|
||||
}
|
||||
} );
|
||||
}
|
||||
@@ -409,11 +409,11 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
- (IBAction)togglePreference:(id)sender {
|
||||
|
||||
if (sender == self.diagnosticsItem)
|
||||
[MPConfig get].sendInfo = @(self.diagnosticsItem.state != NSOnState);
|
||||
[MPMacConfig get].sendInfo = @(self.diagnosticsItem.state != NSOnState);
|
||||
if (sender == self.hidePasswordsItem)
|
||||
[MPConfig get].hidePasswords = @(self.hidePasswordsItem.state != NSOnState);
|
||||
[MPMacConfig get].hidePasswords = @(self.hidePasswordsItem.state != NSOnState);
|
||||
if (sender == self.rememberPasswordItem)
|
||||
[MPConfig get].rememberLogin = @(self.rememberPasswordItem.state != NSOnState);
|
||||
[MPMacConfig get].rememberLogin = @(self.rememberPasswordItem.state != NSOnState);
|
||||
if (sender == self.openAtLoginItem)
|
||||
[self setLoginItemEnabled:self.openAtLoginItem.state != NSOnState];
|
||||
if (sender == self.showFullScreenItem) {
|
||||
@@ -440,8 +440,8 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
NSAlert *alert = [NSAlert new];
|
||||
[alert setMessageText:@"New User"];
|
||||
[alert setInformativeText:@"To begin, enter your full name.\n\n"
|
||||
@"IMPORTANT: Enter your name correctly, including the right capitalization, "
|
||||
@"as you would on an official document."];
|
||||
@"IMPORTANT: Enter your name correctly, including the right capitalization, "
|
||||
@"as you would on an official document."];
|
||||
[alert addButtonWithTitle:@"Create User"];
|
||||
[alert addButtonWithTitle:@"Cancel"];
|
||||
NSTextField *nameField = [[NSTextField alloc] initWithFrame:NSMakeRect( 0, 0, 200, 22 )];
|
||||
@@ -760,26 +760,29 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
|
||||
PearlMainQueue( ^{
|
||||
if (!key || [key isEqualToString:NSStringFromSelector( @selector( sendInfo ) )])
|
||||
self.diagnosticsItem.state = [[MPConfig get].sendInfo boolValue]? NSOnState: NSOffState;
|
||||
self.diagnosticsItem.state = [[MPMacConfig get].sendInfo boolValue]? NSOnState: NSOffState;
|
||||
if (!key || [key isEqualToString:NSStringFromSelector( @selector( hidePasswords ) )])
|
||||
self.hidePasswordsItem.state = [[MPConfig get].hidePasswords boolValue]? NSOnState: NSOffState;
|
||||
self.hidePasswordsItem.state = [[MPMacConfig get].hidePasswords boolValue]? NSOnState: NSOffState;
|
||||
if (!key || [key isEqualToString:NSStringFromSelector( @selector( rememberLogin ) )])
|
||||
self.rememberPasswordItem.state = [[MPConfig get].rememberLogin boolValue]? NSOnState: NSOffState;
|
||||
self.rememberPasswordItem.state = [[MPMacConfig get].rememberLogin boolValue]? NSOnState: NSOffState;
|
||||
} );
|
||||
|
||||
// Send info
|
||||
NSArray *countlyFeatures = @[
|
||||
CLYConsentSessions, CLYConsentEvents, CLYConsentUserDetails, CLYConsentCrashReporting, CLYConsentViewTracking, CLYConsentStarRating
|
||||
CLYConsentEvents, CLYConsentUserDetails, CLYConsentCrashReporting, CLYConsentViewTracking, CLYConsentStarRating
|
||||
];
|
||||
if ([[MPConfig get].sendInfo boolValue]) {
|
||||
[Countly.sharedInstance giveConsentForFeatures:countlyFeatures];
|
||||
if ([[MPConfig get].sendInfo boolValue] || ![[MPConfig get].sendInfoDecided boolValue])
|
||||
[Countly.sharedInstance giveConsentForFeature:CLYConsentSessions];
|
||||
else
|
||||
[Countly.sharedInstance cancelConsentForFeature:CLYConsentSessions];
|
||||
if ([[MPMacConfig get].sendInfo 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:[MPMacConfig get].rememberLogin forKey:@"rememberLogin"];
|
||||
[scope setExtraValue:[MPMacConfig get].sendInfo forKey:@"sendInfo"];
|
||||
[scope setExtraValue:[MPMacConfig get].fullScreen forKey:@"fullScreen"];
|
||||
[scope setExtraValue:[PearlConfig get].firstRun forKey:@"firstRun"];
|
||||
[scope setExtraValue:[PearlConfig get].launchCount forKey:@"launchCount"];
|
||||
@@ -790,10 +793,12 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
[scope setExtraValue:@([PearlDeviceUtils isAppEncrypted]) forKey:@"encrypted"];
|
||||
[scope setExtraValue:[PearlDeviceUtils platform] forKey:@"platform"];
|
||||
}];
|
||||
|
||||
[Countly.sharedInstance giveConsentForFeatures:countlyFeatures];
|
||||
}
|
||||
else {
|
||||
[SentrySDK.currentHub getClient].options.enabled = @NO;
|
||||
[Countly.sharedInstance cancelConsentForFeatures:countlyFeatures];
|
||||
[SentrySDK.currentHub getClient].options.enabled = @NO;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
//==============================================================================
|
||||
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import <Countly/Countly.h>
|
||||
#import "MPSitesWindowController.h"
|
||||
#import "MPMacAppDelegate.h"
|
||||
#import "MPAppDelegate_Store.h"
|
||||
@@ -42,13 +43,30 @@
|
||||
prof_rewind( @"replaceFonts" );
|
||||
|
||||
PearlAddNotificationObserver( NSWindowDidBecomeKeyNotification, self.window, [NSOperationQueue mainQueue],
|
||||
^(id host, NSNotification *note) {
|
||||
(^(id host, NSNotification *note) {
|
||||
prof_new( @"didBecomeKey" );
|
||||
[self.window makeKeyAndOrderFront:nil];
|
||||
prof_rewind( @"fadeIn" );
|
||||
[self updateUser];
|
||||
prof_finish( @"updateUser" );
|
||||
} );
|
||||
prof_rewind( @"updateUser" );
|
||||
|
||||
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 addButtonWithTitle:@"Disable"];
|
||||
[alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {
|
||||
[MPMacConfig get].sendInfo = @(returnCode != NSAlertSecondButtonReturn);
|
||||
[MPMacConfig get].sendInfoDecided = @(YES);
|
||||
}];
|
||||
}
|
||||
prof_finish( @"sendInfoDecided" );
|
||||
}) );
|
||||
PearlAddNotificationObserver( NSWindowWillCloseNotification, self.window, [NSOperationQueue mainQueue],
|
||||
^(id host, NSNotification *note) {
|
||||
NSWindow *sheet = [self.window attachedSheet];
|
||||
@@ -376,7 +394,52 @@
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)changeType:(id)sender {
|
||||
- (IBAction)changeDefaultType:(id)sender {
|
||||
|
||||
MPSiteModel *site = self.selectedSite;
|
||||
MPUserEntity *user = [MPMacAppDelegate get].activeUserForMainThread;
|
||||
NSArray *types = [user.algorithm allTypes];
|
||||
[self.passwordTypesMatrix renewRows:(NSInteger)[types count] columns:1];
|
||||
for (NSUInteger t = 0; t < [types count]; ++t) {
|
||||
MPResultType type = (MPResultType)[types[t] unsignedIntegerValue];
|
||||
NSString *title = [user.algorithm nameOfType:type];
|
||||
if (type & MPResultTypeClassTemplate)
|
||||
title = strf( @"%@ – %@", [user.algorithm mpwTemplateForSiteNamed:site.name?: @"masterpassword.app" ofType:type
|
||||
withCounter:site.counter?: MPCounterValueDefault
|
||||
usingKey:[MPMacAppDelegate get].key], title );
|
||||
|
||||
NSButtonCell *cell = [self.passwordTypesMatrix cellAtRow:(NSInteger)t column:0];
|
||||
cell.tag = type;
|
||||
cell.state = type == site.type? NSOnState: NSOffState;
|
||||
cell.title = title;
|
||||
}
|
||||
|
||||
self.passwordTypesBox.title = strf( @"Choose a password type for new sites of %@:", user.name );
|
||||
|
||||
NSAlert *alert = [NSAlert new];
|
||||
[alert addButtonWithTitle:@"Save"];
|
||||
[alert addButtonWithTitle:@"Cancel"];
|
||||
[alert setMessageText:@"Change Default Type"];
|
||||
[alert setAccessoryView:self.passwordTypesBox];
|
||||
[alert layout];
|
||||
[alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {
|
||||
switch (returnCode) {
|
||||
case NSAlertFirstButtonReturn: {
|
||||
// "Save" button.
|
||||
MPResultType type = (MPResultType)[self.passwordTypesMatrix.selectedCell tag];
|
||||
[MPMacAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
||||
[[MPMacAppDelegate get] activeUserInContext:context].defaultType = type;
|
||||
[context saveToStore];
|
||||
}];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)changeSiteType:(id)sender {
|
||||
|
||||
MPSiteModel *site = self.selectedSite;
|
||||
NSArray *types = [site.algorithm allTypes];
|
||||
|
||||
@@ -31,26 +31,26 @@
|
||||
<rect key="contentRect" x="0.0" y="0.0" width="640" height="577"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
|
||||
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ" userLabel="Root">
|
||||
<rect key="frame" x="0.0" y="0.0" width="640" height="557"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="738" height="553"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<visualEffectView blendingMode="behindWindow" material="popover" state="followsWindowActiveState" translatesAutoresizingMaskIntoConstraints="NO" id="eRe-Ef-AZx">
|
||||
<rect key="frame" x="0.0" y="0.0" width="640" height="557"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="738" height="553"/>
|
||||
</visualEffectView>
|
||||
<progressIndicator hidden="YES" wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="oSh-Ec-8Nf" userLabel="Progress Spinner">
|
||||
<rect key="frame" x="312" y="521" width="16" height="16"/>
|
||||
<rect key="frame" x="361" y="517" width="16" height="16"/>
|
||||
</progressIndicator>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="NGk-Io-Buc" userLabel="Top Box">
|
||||
<rect key="frame" x="20" y="381" width="600" height="132"/>
|
||||
<rect key="frame" x="20" y="377" width="698" height="132"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ond-dT-x5d" userLabel="Site Password Label">
|
||||
<rect key="frame" x="157" y="98" width="287" height="14"/>
|
||||
<rect key="frame" x="206" y="98" width="287" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Your password for apple.com (hit <⏎ enter> to copy):" id="CgJ-XZ-6Hy">
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -72,13 +72,13 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ia6-7b-dFr">
|
||||
<rect key="frame" x="127" y="59" width="347" height="14"/>
|
||||
<rect key="frame" x="176" y="59" width="347" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="No password set. Click "Set Password" on the bottom to set one." id="eDQ-iz-97a">
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -108,13 +108,13 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OaQ-of-zmb" userLabel="Initial Help">
|
||||
<rect key="frame" x="39" y="109" width="522" height="18"/>
|
||||
<rect key="frame" x="113" y="109" width="473" height="17"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Master Password generates passwords for your sites (and other things)." id="YyD-hd-wi3">
|
||||
<font key="font" size="16" name="HelveticaNeue"/>
|
||||
<font key="font" metaFont="menu" size="14"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -136,18 +136,18 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sYt-eL-uwt" userLabel="Initial Tip">
|
||||
<rect key="frame" x="-26" y="31" width="652" height="70"/>
|
||||
<rect key="frame" x="-2" y="31" width="702" height="70"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" id="9c4-NI-NM0">
|
||||
<font key="font" size="12" name="HelveticaNeue"/>
|
||||
<string key="title">– When you create an account with a site, use Master Password to create a password for it.
|
||||
– For accounts you already have, change the password to that created by Master Password for it.
|
||||
– To get a password, enter the site's bare domain name in the "site name" field (eg. apple.com).
|
||||
– For your master password, think of a strong password (eg. a short sentence). Tell *nobody*.
|
||||
– It's OK to share your site passwords. They can be changed if necessary.</string>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<string key="title">⑴ When you create an account on a site, open Master Password to create your account password.
|
||||
⑵ Consider changing all your existing account passwords to the password Master Password creates for those sites.
|
||||
⑶ To get the password for a site, just enter its domain name in the "site name" field (eg. "apple.com").
|
||||
⑷ When chosing a master password, make it easy but long (eg. a short sentence).
|
||||
⑸ Tell *nobody* your master password. It's OK to share your site passwords with people you trust: they can be changed if necessary.</string>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -169,7 +169,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XUV-zU-Y9c" userLabel="Site Password">
|
||||
<rect key="frame" x="-2" y="26" width="604" height="80"/>
|
||||
<rect key="frame" x="-2" y="26" width="702" height="80"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||
@@ -202,6 +202,7 @@
|
||||
<constraint firstItem="XUV-zU-Y9c" firstAttribute="leading" secondItem="NGk-Io-Buc" secondAttribute="leading" id="6Kl-7u-r90"/>
|
||||
<constraint firstAttribute="centerY" secondItem="XUV-zU-Y9c" secondAttribute="centerY" id="6Qf-5O-Cvk"/>
|
||||
<constraint firstAttribute="centerX" secondItem="XUV-zU-Y9c" secondAttribute="centerX" id="7sl-qi-HY9"/>
|
||||
<constraint firstItem="sYt-eL-uwt" firstAttribute="width" secondItem="NGk-Io-Buc" secondAttribute="width" id="Beb-mW-KDP"/>
|
||||
<constraint firstItem="Ond-dT-x5d" firstAttribute="top" secondItem="NGk-Io-Buc" secondAttribute="top" constant="20" symbolic="YES" id="IX4-cd-VkJ"/>
|
||||
<constraint firstItem="Ia6-7b-dFr" firstAttribute="centerY" secondItem="XUV-zU-Y9c" secondAttribute="centerY" id="KqM-uR-Obm"/>
|
||||
<constraint firstItem="Ia6-7b-dFr" firstAttribute="centerX" secondItem="XUV-zU-Y9c" secondAttribute="centerX" id="NFQ-aw-8tm"/>
|
||||
@@ -209,14 +210,13 @@
|
||||
<constraint firstAttribute="trailing" secondItem="XUV-zU-Y9c" secondAttribute="trailing" id="TdB-QV-9JK"/>
|
||||
<constraint firstItem="Ond-dT-x5d" firstAttribute="bottom" secondItem="XUV-zU-Y9c" secondAttribute="top" constant="8" symbolic="YES" id="UgV-J6-B5T"/>
|
||||
<constraint firstItem="Ond-dT-x5d" firstAttribute="centerX" secondItem="XUV-zU-Y9c" secondAttribute="centerX" id="UhT-LQ-aZ8"/>
|
||||
<constraint firstItem="sYt-eL-uwt" firstAttribute="leading" secondItem="NGk-Io-Buc" secondAttribute="leading" constant="-24" id="eaC-ow-ren"/>
|
||||
<constraint firstItem="sYt-eL-uwt" firstAttribute="top" secondItem="OaQ-of-zmb" secondAttribute="bottom" constant="8" symbolic="YES" id="hjJ-f1-mFv"/>
|
||||
<constraint firstItem="sYt-eL-uwt" firstAttribute="centerX" secondItem="OaQ-of-zmb" secondAttribute="centerX" id="mu2-se-Mtn"/>
|
||||
<constraint firstAttribute="centerY" secondItem="sYt-eL-uwt" secondAttribute="centerY" id="zLS-QG-MKS"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
<scrollView focusRingType="none" borderType="none" autohidesScrollers="YES" horizontalLineScroll="34" horizontalPageScroll="10" verticalLineScroll="34" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" horizontalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="Bme-XK-MMc" userLabel="Sites Table">
|
||||
<rect key="frame" x="64" y="40" width="512" height="177"/>
|
||||
<rect key="frame" x="113" y="40" width="512" height="177"/>
|
||||
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="e11-59-xSS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="512" height="177"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
@@ -251,7 +251,7 @@
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" alignment="center" title="apple.com" id="o0g-Zv-pH4">
|
||||
<font key="font" size="24" name="HelveticaNeue-Thin"/>
|
||||
<font key="font" metaFont="systemUltraLight" size="24"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -310,7 +310,7 @@
|
||||
</connections>
|
||||
</scrollView>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="nM8-O3-spM" customClass="MPGradientView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="640" height="212"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="738" height="238"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="startingColor">
|
||||
<color key="value" red="0.11764705882352941" green="0.11764705882352941" blue="0.11764705882352941" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
@@ -324,7 +324,7 @@
|
||||
</userDefinedRuntimeAttributes>
|
||||
</customView>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="Aue-Zx-6Mf" userLabel="Settings Gear">
|
||||
<rect key="frame" x="585" y="493" width="35" height="44"/>
|
||||
<rect key="frame" x="683" y="489" width="35" height="44"/>
|
||||
<shadow key="shadow">
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
@@ -339,13 +339,13 @@
|
||||
</connections>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gAU-xs-aae">
|
||||
<rect key="frame" x="594" y="479" width="18" height="14"/>
|
||||
<rect key="frame" x="692" y="475" width="18" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="⌘," id="Xm1-qb-6EP">
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -358,7 +358,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OnR-s6-d4P" userLabel="Site Name Label">
|
||||
<rect key="frame" x="209" y="308" width="223" height="16"/>
|
||||
<rect key="frame" x="258" y="306" width="223" height="16"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -370,7 +370,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<secureTextField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iGR-wo-ual" userLabel="Secure Master Password">
|
||||
<rect key="frame" x="18" y="257" width="604" height="43"/>
|
||||
<rect key="frame" x="18" y="255" width="702" height="43"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -405,7 +405,7 @@
|
||||
</connections>
|
||||
</secureTextField>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="v80-wd-hUR" userLabel="Revealed Master Password">
|
||||
<rect key="frame" x="18" y="257" width="604" height="43"/>
|
||||
<rect key="frame" x="18" y="255" width="702" height="43"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -444,13 +444,13 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lW3-2z-cEa" userLabel="Master Password Tip">
|
||||
<rect key="frame" x="195" y="237" width="251" height="12"/>
|
||||
<rect key="frame" x="248" y="236" width="243" height="11"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Hold alt ⌥ to reveal tips and unmask ●●●●●●●●." id="4Ep-xX-Ky8">
|
||||
<font key="font" size="11" name="HelveticaNeue"/>
|
||||
<font key="font" metaFont="miniSystem"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -471,13 +471,13 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Oy5-B7-hdN" userLabel="Revealed Master Password Tip">
|
||||
<rect key="frame" x="195" y="237" width="250" height="12"/>
|
||||
<rect key="frame" x="258" y="236" width="222" height="11"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Hold alt ⌥ to reveal tips and unmask passwords." id="bQ4-AN-S1A">
|
||||
<font key="font" size="11" name="HelveticaNeue"/>
|
||||
<font key="font" metaFont="miniSystem"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -499,7 +499,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<searchField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="CnS-iI-dhr" userLabel="Site Name">
|
||||
<rect key="frame" x="62" y="257" width="516" height="43"/>
|
||||
<rect key="frame" x="111" y="255" width="516" height="43"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="512" id="rW7-Vq-4Xy"/>
|
||||
</constraints>
|
||||
@@ -508,7 +508,7 @@
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<searchFieldCell key="cell" selectable="YES" editable="YES" focusRingType="none" alignment="center" placeholderString="Site Name" sendsSearchStringImmediately="YES" id="ppl-2c-1E9">
|
||||
<font key="font" size="36" name="HelveticaNeue-Thin"/>
|
||||
<font key="font" metaFont="system" size="36"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</searchFieldCell>
|
||||
@@ -519,13 +519,13 @@
|
||||
</connections>
|
||||
</searchField>
|
||||
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="npC-Kk-gUM" userLabel="Site Name Tip">
|
||||
<rect key="frame" x="101" y="237" width="438" height="12"/>
|
||||
<rect key="frame" x="172" y="236" width="395" height="11"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Type the name of your site (eg. apple.com), then hit enter ⏎ to create a password for it." id="QTI-cz-Onx">
|
||||
<font key="font" size="11" name="HelveticaNeue"/>
|
||||
<font key="font" metaFont="miniSystem"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -542,13 +542,13 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rhm-sC-xFS" userLabel="Site Name Tip">
|
||||
<rect key="frame" x="138" y="225" width="365" height="24"/>
|
||||
<rect key="frame" x="206" y="225" width="326" height="22"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" id="n3W-XU-dya">
|
||||
<font key="font" size="11" name="HelveticaNeue"/>
|
||||
<font key="font" metaFont="miniSystem"/>
|
||||
<string key="title">Hit enter ⏎ to copy the site's password, hold shift ⇧ for the login name.
|
||||
Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -568,7 +568,7 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</textField>
|
||||
<stackView distribution="fill" orientation="horizontal" alignment="bottom" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pHt-gg-ZNX">
|
||||
<rect key="frame" x="73" y="20" width="495" height="152"/>
|
||||
<rect key="frame" x="122" y="20" width="495" height="178"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1Qo-iG-CQt">
|
||||
<rect key="frame" x="0.0" y="-1" width="85" height="19"/>
|
||||
@@ -591,16 +591,16 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</button>
|
||||
<stackView distribution="fill" orientation="vertical" alignment="centerX" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DT0-RU-3LT">
|
||||
<rect key="frame" x="93" y="0.0" width="177" height="152"/>
|
||||
<rect key="frame" x="93" y="0.0" width="177" height="178"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uol-dE-I8H">
|
||||
<rect key="frame" x="77" y="138" width="22" height="14"/>
|
||||
<rect key="frame" x="77" y="164" width="22" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="⌘P" id="MyN-x6-dMk">
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -631,7 +631,7 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="brI-fg-Kav">
|
||||
<rect key="frame" x="40" y="111" width="96" height="19"/>
|
||||
<rect key="frame" x="40" y="137" width="96" height="19"/>
|
||||
<shadow key="shadow">
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
@@ -659,6 +659,35 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</binding>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jl4-sS-xbm">
|
||||
<rect key="frame" x="12" y="111" width="153" height="19"/>
|
||||
<shadow key="shadow">
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<buttonCell key="cell" type="recessed" title="Default Password Type" bezelStyle="recessed" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Ah6-gK-Rm7" customClass="MPNoStateButtonCell">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
<string key="keyEquivalent">p</string>
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="changeDefaultType:" target="-2" id="3Qg-xV-ewc"/>
|
||||
<binding destination="-2" name="hidden2" keyPath="alternatePressed" previousBinding="2Mv-lM-iXB" id="6QO-NJ-Uyo">
|
||||
<dictionary key="options">
|
||||
<integer key="NSMultipleValuesPlaceholder" value="-1"/>
|
||||
<integer key="NSNoSelectionPlaceholder" value="-1"/>
|
||||
<integer key="NSNotApplicablePlaceholder" value="-1"/>
|
||||
<integer key="NSNullPlaceholder" value="-1"/>
|
||||
<string key="NSValueTransformerName">NSNegateBoolean</string>
|
||||
</dictionary>
|
||||
</binding>
|
||||
<binding destination="mcS-ik-b0n" name="hidden" keyPath="canRemove" id="2Mv-lM-iXB">
|
||||
<dictionary key="options">
|
||||
<string key="NSValueTransformerName">NSNegateBoolean</string>
|
||||
</dictionary>
|
||||
</binding>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="R46-fx-n14">
|
||||
<rect key="frame" x="0.0" y="85" width="177" height="19"/>
|
||||
<shadow key="shadow">
|
||||
@@ -686,7 +715,7 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</button>
|
||||
<stackView distribution="fill" orientation="horizontal" alignment="top" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Bgn-Ne-fQ7" userLabel="Version Container">
|
||||
<rect key="frame" x="70" y="56" width="36" height="22"/>
|
||||
<rect key="frame" x="71" y="56" width="34" height="22"/>
|
||||
<subviews>
|
||||
<stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mcq-qD-yte">
|
||||
<rect key="frame" x="-3" y="-3" width="19" height="28"/>
|
||||
@@ -699,13 +728,13 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</stepper>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gyg-Fh-yn7">
|
||||
<rect key="frame" x="19" y="7" width="19" height="15"/>
|
||||
<rect key="frame" x="19" y="8" width="17" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="V1" id="Pjy-Fm-zwB">
|
||||
<font key="font" size="12" name="HelveticaNeue-Medium"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="calibratedRGB"/>
|
||||
</textFieldCell>
|
||||
@@ -740,7 +769,7 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</stackView>
|
||||
<stackView distribution="fill" orientation="horizontal" alignment="centerY" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6II-KA-cNi" userLabel="Counter Container">
|
||||
<rect key="frame" x="74" y="26" width="28" height="22"/>
|
||||
<rect key="frame" x="75" y="26" width="27" height="22"/>
|
||||
<subviews>
|
||||
<stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XgA-Vl-CKh" userLabel="Counter Stepper">
|
||||
<rect key="frame" x="-3" y="-3" width="19" height="28"/>
|
||||
@@ -753,13 +782,13 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</stepper>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NvO-kt-eZ2" userLabel="Counter Field">
|
||||
<rect key="frame" x="19" y="4" width="11" height="15"/>
|
||||
<rect key="frame" x="19" y="4" width="10" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="1" id="dhQ-bJ-rn3">
|
||||
<font key="font" size="12" name="HelveticaNeue-Medium"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="calibratedRGB"/>
|
||||
</textFieldCell>
|
||||
@@ -805,7 +834,7 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="changeType:" target="-2" id="6Jj-7p-da9"/>
|
||||
<action selector="changeSiteType:" target="-2" id="6Jj-7p-da9"/>
|
||||
<binding destination="mcS-ik-b0n" name="hidden" keyPath="canRemove" id="Hat-GU-hcQ">
|
||||
<dictionary key="options">
|
||||
<string key="NSValueTransformerName">NSNegateBoolean</string>
|
||||
@@ -821,6 +850,7 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
<integer value="1000"/>
|
||||
<integer value="1000"/>
|
||||
<integer value="1000"/>
|
||||
<integer value="1000"/>
|
||||
</visibilityPriorities>
|
||||
<customSpacing>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
@@ -829,6 +859,7 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
</customSpacing>
|
||||
</stackView>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="whJ-Bw-pr4">
|
||||
@@ -886,13 +917,13 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</customSpacing>
|
||||
</stackView>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="luC-0j-BeV">
|
||||
<rect key="frame" x="135" y="50" width="103" height="14"/>
|
||||
<rect key="frame" x="185" y="50" width="103" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Password Number:" id="weR-33-U49">
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -923,13 +954,13 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gjx-bt-fKM">
|
||||
<rect key="frame" x="134" y="80" width="100" height="14"/>
|
||||
<rect key="frame" x="184" y="80" width="100" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Password Version:" id="E77-5t-EKJ">
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -960,13 +991,13 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dbM-ja-dKO" userLabel="Version Tip">
|
||||
<rect key="frame" x="88" y="106" width="332" height="14"/>
|
||||
<rect key="frame" x="137" y="106" width="332" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Upgrade your site's algorithm version for maximum protection:" id="3ds-qG-YNd">
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -988,13 +1019,13 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ido-NQ-3MY">
|
||||
<rect key="frame" x="104" y="4" width="22" height="12"/>
|
||||
<rect key="frame" x="154" y="2" width="21" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="⌘L" id="fUB-rF-7x8">
|
||||
<font key="font" size="11" name="HelveticaNeue"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -1016,13 +1047,13 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9b3-wy-KBb">
|
||||
<rect key="frame" x="243" y="2" width="22" height="14"/>
|
||||
<rect key="frame" x="292" y="2" width="22" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="⌘T" id="HFM-Bk-akx">
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -1044,13 +1075,13 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qal-PP-YtO">
|
||||
<rect key="frame" x="516" y="4" width="23" height="12"/>
|
||||
<rect key="frame" x="565" y="2" width="23" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="⌘D" id="PPC-be-w4E">
|
||||
<font key="font" size="11" name="HelveticaNeue"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -1072,13 +1103,13 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qLF-A6-ThX">
|
||||
<rect key="frame" x="404" y="4" width="23" height="12"/>
|
||||
<rect key="frame" x="453" y="2" width="22" height="14"/>
|
||||
<shadow key="shadow" blurRadius="0.5">
|
||||
<size key="offset" width="0.0" height="1"/>
|
||||
<color key="color" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
|
||||
</shadow>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="⌘S" id="qh6-k2-MUr">
|
||||
<font key="font" size="11" name="HelveticaNeue"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
@@ -1178,7 +1209,7 @@ Use the arrows ⇅ to navigate the list or esc ⎋ to exit.</string>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kCO-1M-Wz1">
|
||||
<rect key="frame" x="10" y="12" width="390" height="92"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="kl0-P1-6ZY">
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
<font key="font" metaFont="message" size="11"/>
|
||||
<string key="title">"Personal password" allows you to store your own password. It cannot be regenerated in the event of loss. "Device private password" is similar but will never leave your device: it cannot be synced, backed up or exported.</string>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -33,9 +33,8 @@ 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) NSCharacterSet *siteNameAcceptableCharactersSet;
|
||||
@@ -435,13 +434,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 +446,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 +459,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;
|
||||
}];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -231,12 +231,10 @@ typedef NS_ENUM( NSUInteger, MPActiveUserState ) {
|
||||
user.avatar = newUserAvatar;
|
||||
user.name = newUserName;
|
||||
|
||||
if ([[MPConfig get].sendInfo boolValue]) {
|
||||
[Countly.sharedInstance recordEvent:@"new-user" segmentation:@{
|
||||
@"algorithm": @(user.algorithm.version).description,
|
||||
@"avatar" : @(user.avatar).description,
|
||||
}];
|
||||
}
|
||||
[Countly.sharedInstance recordEvent:@"new-user" segmentation:@{
|
||||
@"algorithm": @(user.algorithm.version).description,
|
||||
@"avatar" : @(user.avatar).description,
|
||||
}];
|
||||
}
|
||||
|
||||
BOOL signedIn = [[MPiOSAppDelegate get] signInAsUser:user saveInContext:context
|
||||
@@ -434,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,56 @@
|
||||
[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 new];
|
||||
controller.title = self.webView.URL.host;
|
||||
controller.message = self.webView.URL.absoluteString;
|
||||
[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,22 @@
|
||||
//==============================================================================
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <StoreKit/StoreKit.h>
|
||||
|
||||
#import "MPAppDelegate_Shared.h"
|
||||
|
||||
@interface MPiOSAppDelegate : MPAppDelegate_Shared
|
||||
@interface MPiOSAppDelegate : MPAppDelegate_Shared <SKStoreProductViewControllerDelegate>
|
||||
|
||||
@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].navigationController performSegueWithIdentifier:@"web" sender:[NSURL URLWithString:URLString]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface MPiOSAppDelegate()<UIDocumentInteractionControllerDelegate>
|
||||
|
||||
@property(nonatomic, strong) UIDocumentInteractionController *interactionController;
|
||||
@@ -43,7 +57,7 @@
|
||||
|
||||
@try {
|
||||
// Sentry
|
||||
[SentrySDK initWithOptions:@{
|
||||
[SentrySDK startWithOptions:@{
|
||||
@"dsn" : NilToNSNull( decrypt( sentryDSN ) ),
|
||||
#ifdef DEBUG
|
||||
@"debug" : @(YES),
|
||||
@@ -55,7 +69,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) {
|
||||
@@ -172,11 +186,30 @@
|
||||
}
|
||||
} );
|
||||
|
||||
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( ^{
|
||||
[self.navigationController performSegueWithIdentifier:@"web" sender:[NSURL URLWithString:@"masterpassword://foo?bar=quux"]];
|
||||
if ([[MPiOSConfig get].showSetup boolValue])
|
||||
[self.navigationController performSegueWithIdentifier:@"setup" sender:self];
|
||||
|
||||
[self enableNotifications];
|
||||
[self consentFeatures];
|
||||
} );
|
||||
}
|
||||
@catch (id exception) {
|
||||
@@ -193,6 +226,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) {
|
||||
@@ -229,7 +268,43 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)enableNotifications {
|
||||
- (void)consentFeatures {
|
||||
if ([self askDiagnostics])
|
||||
return;
|
||||
|
||||
[self tryNotifications];
|
||||
}
|
||||
|
||||
- (BOOL)askDiagnostics {
|
||||
|
||||
if ([[MPiOSConfig get].sendInfoDecided boolValue])
|
||||
return NO;
|
||||
|
||||
PearlMainQueue( ^{
|
||||
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:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
||||
[MPiOSConfig get].sendInfo = @(NO);
|
||||
[MPiOSConfig get].sendInfoDecided = @(YES);
|
||||
[self consentFeatures];
|
||||
}]];
|
||||
[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];
|
||||
} );
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)tryNotifications {
|
||||
|
||||
[Countly.sharedInstance giveConsentForFeature:CLYConsentPushNotifications];
|
||||
if (@available( iOS 12, * )) {
|
||||
@@ -240,35 +315,36 @@
|
||||
|
||||
[self askNotifications];
|
||||
}];
|
||||
return;
|
||||
}
|
||||
else {
|
||||
[self askNotifications];
|
||||
}
|
||||
|
||||
[self askNotifications];
|
||||
}
|
||||
|
||||
- (void)askNotifications {
|
||||
|
||||
if ([[MPiOSConfig get].notificationsDecided boolValue])
|
||||
return;
|
||||
|
||||
PearlMainQueue( ^{
|
||||
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"notificationsDecided"]) {
|
||||
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"
|
||||
@"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) {
|
||||
if (@available( iOS 12, * )) {
|
||||
[Countly.sharedInstance askForNotificationPermissionWithOptions:UNAuthorizationOptionAlert completionHandler:
|
||||
^(BOOL granted, NSError *error) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"notificationsDecided"];
|
||||
}];
|
||||
}
|
||||
else {
|
||||
[Countly.sharedInstance askForNotificationPermission];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"notificationsDecided"];
|
||||
}
|
||||
}]];
|
||||
[(self.navigationController.presentedViewController?: (UIViewController *)self.navigationController)
|
||||
presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Coming Soon" message:
|
||||
@"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) {
|
||||
if (@available( iOS 12, * )) {
|
||||
[Countly.sharedInstance askForNotificationPermissionWithOptions:UNAuthorizationOptionAlert completionHandler:
|
||||
^(BOOL granted, NSError *error) {
|
||||
[MPiOSConfig get].notificationsDecided = @(YES);
|
||||
}];
|
||||
}
|
||||
else {
|
||||
[Countly.sharedInstance askForNotificationPermission];
|
||||
[MPiOSConfig get].notificationsDecided = @(YES);
|
||||
}
|
||||
}]];
|
||||
[(self.navigationController.presentedViewController?: (UIViewController *)self.navigationController)
|
||||
presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -392,6 +468,42 @@
|
||||
|
||||
#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"]) {
|
||||
[[MPiOSAppDelegate get].navigationController 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]) {
|
||||
@@ -486,7 +598,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];
|
||||
}]];
|
||||
@@ -512,89 +624,164 @@
|
||||
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];
|
||||
[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.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
} result:^(NSString *exportedUser, NSError *error) {
|
||||
if (!exportedUser || error) {
|
||||
MPError( error, @"Failed to export mpsites." );
|
||||
PearlMainQueue( ^{
|
||||
} 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];
|
||||
} );
|
||||
}
|
||||
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.navigationController 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.navigationController 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.navigationController 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.navigationController 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.navigationController presentViewController:self.voltoViewController animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)changeMasterPasswordFor:(MPUserEntity *)user saveInContext:(NSManagedObjectContext *)moc didResetBlock:(void ( ^ )(void))didReset {
|
||||
@@ -622,6 +809,13 @@
|
||||
} );
|
||||
}
|
||||
|
||||
#pragma mark - SKStoreProductViewControllerDelegate
|
||||
|
||||
- (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController {
|
||||
|
||||
[viewController dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - UIDocumentInteractionControllerDelegate
|
||||
|
||||
- (void)documentInteractionController:(UIDocumentInteractionController *)controller didEndSendingToApplication:(NSString *)application {
|
||||
@@ -643,10 +837,13 @@
|
||||
|
||||
// Send info
|
||||
NSArray *countlyFeatures = @[
|
||||
CLYConsentSessions, CLYConsentEvents, CLYConsentUserDetails, CLYConsentCrashReporting, CLYConsentViewTracking, CLYConsentStarRating
|
||||
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]) {
|
||||
[Countly.sharedInstance giveConsentForFeatures:countlyFeatures];
|
||||
if ([PearlLogger get].printLevel > PearlLogLevelInfo)
|
||||
[PearlLogger get].printLevel = PearlLogLevelInfo;
|
||||
|
||||
@@ -670,11 +867,13 @@
|
||||
#else
|
||||
[scope setExtraValue:@(NO) forKey:@"reviewedVersion"];
|
||||
#endif
|
||||
|
||||
[Countly.sharedInstance giveConsentForFeatures:countlyFeatures];
|
||||
}];
|
||||
}
|
||||
else {
|
||||
[SentrySDK.currentHub getClient].options.enabled = @NO;
|
||||
[Countly.sharedInstance cancelConsentForFeatures:countlyFeatures];
|
||||
[SentrySDK.currentHub getClient].options.enabled = @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>
|
||||
|
||||
@@ -472,17 +472,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 +488,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"/>
|
||||
@@ -2324,7 +2313,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 +2401,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">
|
||||
@@ -3036,7 +3025,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">
|
||||
@@ -3268,8 +3257,8 @@ Ut in geometria, prima si dederis, danda sunt omnia. Nonne igitur tibi videntur,
|
||||
</scene>
|
||||
</scenes>
|
||||
<inferredMetricsTieBreakers>
|
||||
<segue reference="Ql4-wf-T8u"/>
|
||||
<segue reference="GZk-I4-JyH"/>
|
||||
<segue reference="k2G-nL-x3l"/>
|
||||
<segue reference="gtb-zE-u9H"/>
|
||||
</inferredMetricsTieBreakers>
|
||||
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<resources>
|
||||
|
||||
@@ -176,6 +176,21 @@ MPMarshalledFile *mpw_marshal_file(
|
||||
return file;
|
||||
}
|
||||
|
||||
MPMarshalledFile *mpw_marshal_error(
|
||||
MPMarshalledFile *file, MPMarshalErrorType type, const char *format, ...) {
|
||||
|
||||
file = mpw_marshal_file( file, NULL, NULL );
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
va_list args;
|
||||
va_start( args, format );
|
||||
file->error = (MPMarshalError){ type, mpw_strdup( mpw_vstr( format, args ) ) };
|
||||
va_end( args );
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
void mpw_marshal_info_free(
|
||||
MPMarshalledInfo **info) {
|
||||
|
||||
@@ -228,6 +243,7 @@ void mpw_marshal_file_free(
|
||||
|
||||
mpw_marshal_info_free( &(*file)->info );
|
||||
mpw_marshal_data_free( &(*file)->data );
|
||||
mpw_free_string( &(*file)->error.message );
|
||||
mpw_free( file, sizeof( MPMarshalledFile ) );
|
||||
}
|
||||
|
||||
@@ -539,7 +555,7 @@ static const char *mpw_marshal_write_flat(
|
||||
|
||||
const MPMarshalledData *data = file->data;
|
||||
if (!data) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorMissing, "Missing data." };
|
||||
mpw_marshal_error( file, MPMarshalErrorMissing, "Missing data." );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -583,9 +599,9 @@ static const char *mpw_marshal_write_flat(
|
||||
}
|
||||
|
||||
if (!out)
|
||||
file->error = (MPMarshalError){ MPMarshalErrorFormat, "Couldn't encode JSON." };
|
||||
mpw_marshal_error( file, MPMarshalErrorFormat, "Couldn't encode JSON." );
|
||||
else
|
||||
file->error = (MPMarshalError){ MPMarshalSuccess, NULL };
|
||||
mpw_marshal_error( file, MPMarshalSuccess, NULL );
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -637,7 +653,7 @@ static const char *mpw_marshal_write_json(
|
||||
// Section: "export"
|
||||
json_object *json_file = mpw_get_json_data( file->data );
|
||||
if (!json_file) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorFormat, "Couldn't serialize export data." };
|
||||
mpw_marshal_error( file, MPMarshalErrorFormat, "Couldn't serialize export data." );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -650,9 +666,9 @@ static const char *mpw_marshal_write_json(
|
||||
json_object_put( json_file );
|
||||
|
||||
if (!out)
|
||||
file->error = (MPMarshalError){ MPMarshalErrorFormat, "Couldn't encode JSON." };
|
||||
mpw_marshal_error( file, MPMarshalErrorFormat, "Couldn't encode JSON." );
|
||||
else
|
||||
file->error = (MPMarshalError){ MPMarshalSuccess, NULL };
|
||||
mpw_marshal_error( file, MPMarshalSuccess, NULL );
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -698,17 +714,17 @@ const char *mpw_marshal_write(
|
||||
if (!file_)
|
||||
mpw_marshal_file_free( &file );
|
||||
else
|
||||
file->error = (MPMarshalError){ MPMarshalErrorInternal, "Couldn't allocate data." };
|
||||
mpw_marshal_error( file, MPMarshalErrorInternal, "Couldn't allocate data." );
|
||||
return NULL;
|
||||
}
|
||||
if (!user->fullName || !strlen( user->fullName )) {
|
||||
if (!file_)
|
||||
mpw_marshal_file_free( &file );
|
||||
else
|
||||
file->error = (MPMarshalError){ MPMarshalErrorMissing, "Missing full name." };
|
||||
mpw_marshal_error( file, MPMarshalErrorMissing, "Missing full name." );
|
||||
return NULL;
|
||||
}
|
||||
file->error = (MPMarshalError){ MPMarshalSuccess, NULL };
|
||||
mpw_marshal_error( file, MPMarshalSuccess, NULL );
|
||||
|
||||
MPMasterKey masterKey = NULL;
|
||||
if (user->masterKeyProvider)
|
||||
@@ -749,7 +765,7 @@ const char *mpw_marshal_write(
|
||||
if (!file_)
|
||||
mpw_marshal_file_free( &file );
|
||||
else
|
||||
file->error = (MPMarshalError){ MPMarshalErrorInternal, "Couldn't derive master key." };
|
||||
mpw_marshal_error( file, MPMarshalErrorInternal, "Couldn't derive master key." );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -807,7 +823,7 @@ const char *mpw_marshal_write(
|
||||
const char *out = NULL;
|
||||
switch (outFormat) {
|
||||
case MPMarshalFormatNone:
|
||||
file->error = (MPMarshalError){ MPMarshalSuccess, NULL };
|
||||
mpw_marshal_error( file, MPMarshalSuccess, NULL );
|
||||
break;
|
||||
case MPMarshalFormatFlat:
|
||||
out = mpw_marshal_write_flat( file );
|
||||
@@ -818,7 +834,7 @@ const char *mpw_marshal_write(
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
file->error = (MPMarshalError){ MPMarshalErrorFormat, mpw_str( "Unsupported output format: %u", outFormat ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorFormat, "Unsupported output format: %u", outFormat );
|
||||
break;
|
||||
}
|
||||
if (out && file->error.type == MPMarshalSuccess)
|
||||
@@ -839,7 +855,7 @@ static void mpw_marshal_read_flat(
|
||||
|
||||
mpw_marshal_file( file, NULL, mpw_marshal_data_new() );
|
||||
if (!file->data) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorInternal, "Couldn't allocate data." };
|
||||
mpw_marshal_error( file, MPMarshalErrorInternal, "Couldn't allocate data." );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -891,10 +907,7 @@ static void mpw_marshal_read_flat(
|
||||
const char *headerName = mpw_get_token( &positionInLine, endOfLine, ":\n" );
|
||||
const char *headerValue = mpw_get_token( &positionInLine, endOfLine, "\n" );
|
||||
if (!headerName || !headerValue) {
|
||||
file->error = (MPMarshalError){
|
||||
MPMarshalErrorStructure,
|
||||
mpw_str( "Invalid header: %s", mpw_strndup( line, (size_t)(endOfLine - line) ) )
|
||||
};
|
||||
mpw_marshal_error( file, MPMarshalErrorStructure, "Invalid header: %s", mpw_strndup( line, (size_t)(endOfLine - line) ) );
|
||||
mpw_free_strings( &headerName, &headerValue, NULL );
|
||||
continue;
|
||||
}
|
||||
@@ -908,7 +921,7 @@ static void mpw_marshal_read_flat(
|
||||
if (mpw_strcasecmp( headerName, "Algorithm" ) == OK) {
|
||||
unsigned long value = strtoul( headerValue, NULL, 10 );
|
||||
if (value < MPAlgorithmVersionFirst || value > MPAlgorithmVersionLast)
|
||||
file->error = (MPMarshalError){ MPMarshalErrorIllegal, mpw_str( "Invalid user algorithm version: %s", headerValue ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid user algorithm version: %s", headerValue );
|
||||
else
|
||||
algorithm = (MPAlgorithmVersion)value;
|
||||
}
|
||||
@@ -923,7 +936,7 @@ static void mpw_marshal_read_flat(
|
||||
if (mpw_strcasecmp( headerName, "Default Type" ) == OK) {
|
||||
unsigned long value = strtoul( headerValue, NULL, 10 );
|
||||
if (!mpw_type_short_name( (MPResultType)value ))
|
||||
file->error = (MPMarshalError){ MPMarshalErrorIllegal, mpw_str( "Invalid user default type: %s", headerValue ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid user default type: %s", headerValue );
|
||||
else
|
||||
defaultType = (MPResultType)value;
|
||||
}
|
||||
@@ -934,7 +947,7 @@ static void mpw_marshal_read_flat(
|
||||
if (!headerEnded)
|
||||
continue;
|
||||
if (!fullName)
|
||||
file->error = (MPMarshalError){ MPMarshalErrorMissing, "Missing header: Full Name" };
|
||||
mpw_marshal_error( file, MPMarshalErrorMissing, "Missing header: Full Name" );
|
||||
if (positionInLine >= endOfLine)
|
||||
continue;
|
||||
|
||||
@@ -973,7 +986,7 @@ static void mpw_marshal_read_flat(
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorFormat, mpw_str( "Unexpected import format: %u", format ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorFormat, "Unexpected import format: %u", format );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -981,28 +994,24 @@ static void mpw_marshal_read_flat(
|
||||
if (siteName && str_type && str_counter && str_algorithm && str_uses && str_lastUsed) {
|
||||
MPResultType siteType = (MPResultType)strtoul( str_type, NULL, 10 );
|
||||
if (!mpw_type_short_name( siteType )) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorIllegal, mpw_str( "Invalid site type: %s: %s", siteName, str_type ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid site type: %s: %s", siteName, str_type );
|
||||
continue;
|
||||
}
|
||||
long long int value = strtoll( str_counter, NULL, 10 );
|
||||
if (value < MPCounterValueFirst || value > MPCounterValueLast) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorIllegal, mpw_str( "Invalid site counter: %s: %s", siteName, str_counter ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid site counter: %s: %s", siteName, str_counter );
|
||||
continue;
|
||||
}
|
||||
MPCounterValue siteCounter = (MPCounterValue)value;
|
||||
value = strtoll( str_algorithm, NULL, 0 );
|
||||
if (value < MPAlgorithmVersionFirst || value > MPAlgorithmVersionLast) {
|
||||
file->error = (MPMarshalError){
|
||||
MPMarshalErrorIllegal, mpw_str( "Invalid site algorithm: %s: %s", siteName, str_algorithm )
|
||||
};
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid site algorithm: %s: %s", siteName, str_algorithm );
|
||||
continue;
|
||||
}
|
||||
MPAlgorithmVersion siteAlgorithm = (MPAlgorithmVersion)value;
|
||||
time_t siteLastUsed = mpw_timegm( str_lastUsed );
|
||||
if (!siteLastUsed) {
|
||||
file->error = (MPMarshalError){
|
||||
MPMarshalErrorIllegal, mpw_str( "Invalid site last used: %s: %s", siteName, str_lastUsed )
|
||||
};
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid site last used: %s: %s", siteName, str_lastUsed );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1020,11 +1029,9 @@ static void mpw_marshal_read_flat(
|
||||
mpw_marshal_data_set_str( dateString, file->data, "sites", siteName, "last_used", NULL );
|
||||
}
|
||||
else {
|
||||
file->error = (MPMarshalError){
|
||||
MPMarshalErrorMissing,
|
||||
mpw_str( "Missing one of: lastUsed=%s, uses=%s, type=%s, version=%s, counter=%s, loginName=%s, siteName=%s",
|
||||
str_lastUsed, str_uses, str_type, str_algorithm, str_counter, siteLoginState, siteName )
|
||||
};
|
||||
mpw_marshal_error( file, MPMarshalErrorMissing,
|
||||
"Missing one of: lastUsed=%s, uses=%s, type=%s, version=%s, counter=%s, loginName=%s, siteName=%s",
|
||||
str_lastUsed, str_uses, str_type, str_algorithm, str_counter, siteLoginState, siteName );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1044,7 +1051,7 @@ static void mpw_marshal_read_json(
|
||||
|
||||
mpw_marshal_file( file, NULL, mpw_marshal_data_new() );
|
||||
if (!file->data) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorInternal, "Couldn't allocate data." };
|
||||
mpw_marshal_error( file, MPMarshalErrorInternal, "Couldn't allocate data." );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1052,7 +1059,7 @@ static void mpw_marshal_read_json(
|
||||
enum json_tokener_error json_error = json_tokener_success;
|
||||
json_object *json_file = json_tokener_parse_verbose( in, &json_error );
|
||||
if (!json_file || json_error != json_tokener_success) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorFormat, mpw_str( "Couldn't parse JSON: %s", json_tokener_error_desc( json_error ) ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorFormat, "Couldn't parse JSON: %s", json_tokener_error_desc( json_error ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1074,9 +1081,9 @@ MPMarshalledFile *mpw_marshal_read(
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
file->error = (MPMarshalError){ MPMarshalSuccess, NULL };
|
||||
mpw_marshal_error( file, MPMarshalSuccess, NULL );
|
||||
if (!info) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorInternal, "Couldn't allocate info." };
|
||||
mpw_marshal_error( file, MPMarshalErrorInternal, "Couldn't allocate info." );
|
||||
return file;
|
||||
}
|
||||
|
||||
@@ -1090,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
|
||||
}
|
||||
}
|
||||
@@ -1116,13 +1125,13 @@ MPMarshalledUser *mpw_marshal_auth(
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
file->error = (MPMarshalError){ MPMarshalSuccess, NULL };
|
||||
mpw_marshal_error( file, MPMarshalSuccess, NULL );
|
||||
if (!file->info) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorMissing, "File wasn't parsed yet." };
|
||||
mpw_marshal_error( file, MPMarshalErrorMissing, "File wasn't parsed yet." );
|
||||
return NULL;
|
||||
}
|
||||
if (!file->data) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorMissing, "No input data." };
|
||||
mpw_marshal_error( file, MPMarshalErrorMissing, "No input data." );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1132,43 +1141,43 @@ MPMarshalledUser *mpw_marshal_auth(
|
||||
MPAlgorithmVersion algorithm =
|
||||
mpw_default_n( MPAlgorithmVersionCurrent, mpw_marshal_data_get_num( file->data, "user", "algorithm", NULL ) );
|
||||
if (algorithm < MPAlgorithmVersionFirst || algorithm > MPAlgorithmVersionLast) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorIllegal, mpw_str( "Invalid user algorithm: %u", algorithm ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid user algorithm: %u", algorithm );
|
||||
return NULL;
|
||||
}
|
||||
unsigned int avatar = mpw_default_n( 0U, mpw_marshal_data_get_num( file->data, "user", "avatar", NULL ) );
|
||||
const char *fullName = mpw_marshal_data_get_str( file->data, "user", "full_name", NULL );
|
||||
if (!fullName || !strlen( fullName )) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorMissing, "Missing value for full name." };
|
||||
mpw_marshal_error( file, MPMarshalErrorMissing, "Missing value for full name." );
|
||||
return NULL;
|
||||
}
|
||||
MPIdenticon identicon = mpw_identicon_encoded( mpw_marshal_data_get_str( file->data, "user", "identicon", NULL ) );
|
||||
const char *keyID = mpw_marshal_data_get_str( file->data, "user", "key_id", NULL );
|
||||
MPResultType defaultType = mpw_default_n( MPResultTypeDefault, mpw_marshal_data_get_num( file->data, "user", "default_type", NULL ) );
|
||||
if (!mpw_type_short_name( defaultType )) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorIllegal, mpw_str( "Invalid user default type: %u", defaultType ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid user default type: %u", defaultType );
|
||||
return NULL;
|
||||
}
|
||||
const char *str_lastUsed = mpw_marshal_data_get_str( file->data, "user", "last_used", NULL );
|
||||
time_t lastUsed = mpw_timegm( str_lastUsed );
|
||||
if (!lastUsed) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorIllegal, mpw_str( "Invalid user last used: %s", str_lastUsed ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid user last used: %s", str_lastUsed );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MPMasterKey masterKey = NULL;
|
||||
if (masterKeyProvider && !(masterKey = masterKeyProvider( algorithm, fullName ))) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorInternal, "Couldn't derive master key." };
|
||||
mpw_marshal_error( file, MPMarshalErrorInternal, "Couldn't derive master key." );
|
||||
return NULL;
|
||||
}
|
||||
if (keyID && masterKey && !mpw_id_buf_equals( keyID, mpw_id_buf( masterKey, MPMasterKeySize ) )) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorMasterPassword, "Master key doesn't match key ID." };
|
||||
mpw_marshal_error( file, MPMarshalErrorMasterPassword, "Master key doesn't match key ID." );
|
||||
mpw_free( &masterKey, MPMasterKeySize );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MPMarshalledUser *user = NULL;
|
||||
if (!(user = mpw_marshal_user( fullName, masterKeyProvider, algorithm ))) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorInternal, "Couldn't allocate a new user." };
|
||||
mpw_marshal_error( file, MPMarshalErrorInternal, "Couldn't allocate a new user." );
|
||||
mpw_free( &masterKey, MPMasterKeySize );
|
||||
mpw_marshal_user_free( &user );
|
||||
return NULL;
|
||||
@@ -1189,21 +1198,21 @@ MPMarshalledUser *mpw_marshal_auth(
|
||||
|
||||
algorithm = mpw_default_n( user->algorithm, mpw_marshal_data_get_num( siteData, "algorithm", NULL ) );
|
||||
if (algorithm < MPAlgorithmVersionFirst || algorithm > MPAlgorithmVersionLast) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorIllegal, mpw_str( "Invalid site algorithm: %s: %u", siteName, algorithm ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid site algorithm: %s: %u", siteName, algorithm );
|
||||
mpw_free( &masterKey, MPMasterKeySize );
|
||||
mpw_marshal_user_free( &user );
|
||||
return NULL;
|
||||
}
|
||||
MPCounterValue siteCounter = mpw_default_n( MPCounterValueDefault, mpw_marshal_data_get_num( siteData, "counter", NULL ) );
|
||||
if (siteCounter < MPCounterValueFirst || siteCounter > MPCounterValueLast) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorIllegal, mpw_str( "Invalid site counter: %s: %d", siteName, siteCounter ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid site counter: %s: %d", siteName, siteCounter );
|
||||
mpw_free( &masterKey, MPMasterKeySize );
|
||||
mpw_marshal_user_free( &user );
|
||||
return NULL;
|
||||
}
|
||||
MPResultType siteType = mpw_default_n( user->defaultType, mpw_marshal_data_get_num( siteData, "type", NULL ) );
|
||||
if (!mpw_type_short_name( siteType )) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorIllegal, mpw_str( "Invalid site type: %s: %u", siteName, siteType ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid site type: %s: %u", siteName, siteType );
|
||||
mpw_free( &masterKey, MPMasterKeySize );
|
||||
mpw_marshal_user_free( &user );
|
||||
return NULL;
|
||||
@@ -1211,7 +1220,7 @@ MPMarshalledUser *mpw_marshal_auth(
|
||||
const char *siteResultState = mpw_marshal_data_get_str( siteData, "password", NULL );
|
||||
MPResultType siteLoginType = mpw_default_n( MPResultTypeTemplateName, mpw_marshal_data_get_num( siteData, "login_type", NULL ) );
|
||||
if (!mpw_type_short_name( siteLoginType )) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorIllegal, mpw_str( "Invalid site login type: %s: %u", siteName, siteLoginType ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid site login type: %s: %u", siteName, siteLoginType );
|
||||
mpw_free( &masterKey, MPMasterKeySize );
|
||||
mpw_marshal_user_free( &user );
|
||||
return NULL;
|
||||
@@ -1221,7 +1230,7 @@ MPMarshalledUser *mpw_marshal_auth(
|
||||
str_lastUsed = mpw_marshal_data_get_str( siteData, "last_used", NULL );
|
||||
time_t siteLastUsed = mpw_timegm( str_lastUsed );
|
||||
if (!siteLastUsed) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorIllegal, mpw_str( "Invalid site last used: %s: %s", siteName, str_lastUsed ) };
|
||||
mpw_marshal_error( file, MPMarshalErrorIllegal, "Invalid site last used: %s: %s", siteName, str_lastUsed );
|
||||
mpw_free( &masterKey, MPMasterKeySize );
|
||||
mpw_marshal_user_free( &user );
|
||||
return NULL;
|
||||
@@ -1231,7 +1240,7 @@ MPMarshalledUser *mpw_marshal_auth(
|
||||
|
||||
MPMarshalledSite *site = mpw_marshal_site( user, siteName, siteType, siteCounter, algorithm );
|
||||
if (!site) {
|
||||
file->error = (MPMarshalError){ MPMarshalErrorInternal, "Couldn't allocate a new site." };
|
||||
mpw_marshal_error( file, MPMarshalErrorInternal, "Couldn't allocate a new site." );
|
||||
mpw_free( &masterKey, MPMasterKeySize );
|
||||
mpw_marshal_user_free( &user );
|
||||
return NULL;
|
||||
@@ -1245,10 +1254,7 @@ MPMarshalledUser *mpw_marshal_auth(
|
||||
// Clear Text
|
||||
mpw_free( &masterKey, MPMasterKeySize );
|
||||
if (!masterKeyProvider || !(masterKey = masterKeyProvider( site->algorithm, user->fullName ))) {
|
||||
file->error = (MPMarshalError){
|
||||
MPMarshalErrorInternal,
|
||||
"Couldn't derive master key."
|
||||
};
|
||||
mpw_marshal_error( file, MPMarshalErrorInternal, "Couldn't derive master key." );
|
||||
mpw_free( &masterKey, MPMasterKeySize );
|
||||
mpw_marshal_user_free( &user );
|
||||
return NULL;
|
||||
|
||||
@@ -246,6 +246,10 @@ MPMarshalledQuestion *mpw_marshal_question(
|
||||
* @return The given file or new (allocated) if file is NULL; or NULL if the user is missing or the file couldn't be allocated. */
|
||||
MPMarshalledFile *mpw_marshal_file(
|
||||
MPMarshalledFile *file, MPMarshalledInfo *info, MPMarshalledData *data);
|
||||
/** Record a marshal error.
|
||||
* @return The given file or new (allocated) if file is NULL; or NULL if the file couldn't be allocated. */
|
||||
MPMarshalledFile *mpw_marshal_error(
|
||||
MPMarshalledFile *file, MPMarshalErrorType type, const char *format, ...);
|
||||
|
||||
//// Disposing.
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#endif
|
||||
|
||||
MP_LIBS_BEGIN
|
||||
#define __STDC_WANT_LIB_EXT1__ 1
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||