Skip to content

Commit

Permalink
Merge pull request #102 from grahamgilbert/wes/py3
Browse files Browse the repository at this point in the history
Wes/py3
  • Loading branch information
grahamgilbert authored Jul 14, 2020
2 parents 1f21011 + 3456aee commit f4d1606
Show file tree
Hide file tree
Showing 15 changed files with 476 additions and 439 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ Carthage/Build

*.pkg
*.pyc
Package/Python.framework/
Package/entitlements.plist
Package/config.mk
30 changes: 16 additions & 14 deletions Crypt.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -137,22 +137,22 @@
FCD4FD8C1BEE763C00CF7F48 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1150;
ORGANIZATIONNAME = "Graham Gilbert";
TargetAttributes = {
FCD4FD931BEE763C00CF7F48 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0930;
LastSwiftMigration = 1150;
};
};
};
buildConfigurationList = FCD4FD8F1BEE763C00CF7F48 /* Build configuration list for PBXProject "Crypt" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
mainGroup = FCD4FD8B1BEE763C00CF7F48;
productRefGroup = FCD4FD8B1BEE763C00CF7F48;
Expand Down Expand Up @@ -216,6 +216,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -258,7 +259,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand All @@ -270,6 +271,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -306,7 +308,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand All @@ -322,7 +324,7 @@
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 3.3.1;
CURRENT_PROJECT_VERSION = 4.0;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Crypt/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
Expand All @@ -331,8 +333,8 @@
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 3.3.1;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 4.0;
PRODUCT_BUNDLE_IDENTIFIER = com.grahamgilbert.Crypt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
Expand All @@ -342,7 +344,7 @@
SWIFT_OBJC_BRIDGING_HEADER = "Crypt/Crypt-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
WRAPPER_EXTENSION = bundle;
};
name = Debug;
Expand All @@ -355,7 +357,7 @@
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 3.3.1;
CURRENT_PROJECT_VERSION = 4.0;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Crypt/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
Expand All @@ -364,16 +366,16 @@
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 3.3.1;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 4.0;
PRODUCT_BUNDLE_IDENTIFIER = com.grahamgilbert.Crypt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Crypt/Crypt-Bridging-Header.h";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
WRAPPER_EXTENSION = bundle;
};
name = Release;
Expand Down
4 changes: 2 additions & 2 deletions Crypt/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.3.1</string>
<string>4.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>194</string>
<string>205</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2018 The Crypt Project. All rights reserved.</string>
<key>NSPrincipalClass</key>
Expand Down
6 changes: 3 additions & 3 deletions Crypt/Mechanisms/CryptMechanism.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class CryptMechanism: NSObject {
var needsEncryption: Bool {
set {
os_log("needsEncryption set to %@", log: CryptMechanism.log, type: .default, newValue as CVarArg)
let data = NSKeyedArchiver.archivedData(withRootObject: NSNumber.init(value: newValue))
guard let data = try? NSKeyedArchiver.archivedData(withRootObject: NSNumber.init(value: newValue), requiringSecureCoding: false) else { return }
_ = setHintData(key: needsEncryptionHintKey, data: data as NSData)
}

Expand All @@ -161,10 +161,10 @@ class CryptMechanism: NSObject {
guard let data = getHintData(key: needsEncryptionHintKey) else {
return false
}
guard let value = NSKeyedUnarchiver.unarchiveObject(with: data as Data) else {
guard let value = try? NSKeyedUnarchiver.unarchivedObject(ofClass: NSNumber.self, from: data as Data) else {
return false
}
return (value as! NSNumber).boolValue
return (value).boolValue
}
}

Expand Down
6 changes: 3 additions & 3 deletions Package/Distribution-Template
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<pkg-ref id="com.grahamgilbert.Crypt"/>
<options rootVolumeOnly="true" />
<volume-check>
<allowed-os-versions>
<os-version min="10.12.0" />
</allowed-os-versions>
<allowed-os-versions>
<os-version min="10.14.0" />
</allowed-os-versions>
</volume-check>
<options customize="never" require-scripts="false"/>
<choices-outline>
Expand Down
147 changes: 0 additions & 147 deletions Package/FoundationPlist.py

This file was deleted.

Loading

0 comments on commit f4d1606

Please sign in to comment.