diff --git a/.gitignore b/.gitignore index 45fb6f1..f36ee26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +*.xcodeproj + # Created by http://www.gitignore.io ### OSX ### diff --git a/.travis.yml b/.travis.yml index 4063fe0..e7eabac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,14 +9,22 @@ before_install: - gem install slather - brew update - brew outdated carthage || brew upgrade carthage -- travis_wait 120 carthage bootstrap --platform iOS --cache-builds +- brew outdated cocoapods || brew upgrade cocoapods +- brew install xcodegen before_deploy: - travis_wait 120 carthage build --no-skip-current --platform iOS --cache-builds - carthage archive $FRAMEWORK_NAME after_deploy: - travis_wait 120 pod trunk push --skip-import-validation --skip-tests --allow-warnings script: -- set -o pipefail && xcodebuild test -scheme MnemonicKit -destination 'platform=iOS +# CocoaPods +- xcodegen generate +- travis_wait 120 pod lib lint +# Carthage +- rm -rf MnemonicKit.xcodeproj +- xcodegen generate +- travis_wait 120 carthage bootstrap --platform iOS --cache-builds +- set -o pipefail && xcodebuild test -scheme MnemonicKit_iOS -destination 'platform=iOS Simulator,name=iPhone XS,OS=12.2' ONLY_ACTIVE_ARCH=YES | xcpretty after_success: - slather diff --git a/Gemfile b/Gemfile index 2f13508..ac49481 100644 --- a/Gemfile +++ b/Gemfile @@ -1 +1,3 @@ +source 'https://rubygems.org' + gem 'slather' diff --git a/MnemonicKit.podspec b/MnemonicKit.podspec index 275c848..cd5ee91 100644 --- a/MnemonicKit.podspec +++ b/MnemonicKit.podspec @@ -3,8 +3,8 @@ s.version = "1.3.7" s.summary = "MnemonicKit provides a Swift implementation of BIP39" s.description = <<-DESC - MnemonicKit provides a Swift implementation of BIP39. - + MnemonicKit provides a Swift implementation of BIP39. + This library is originally forked from CKMnemonic: https://github.com/CikeQiu/CKMnemonic. Modifications are made for non-throwing APIs and support on OSX as well as iOS. Credit for most of this work is given to work_cocody@hotmail.com, qiuhongyang@askcoin.org. DESC @@ -16,11 +16,13 @@ s.swift_version = "4.2" s.ios.deployment_target = "8.0" s.osx.deployment_target = "10.10" - + + s.prepare_command = "xcodegen generate -s project.yml" + s.dependency "CryptoSwift", "~> 0.14.0" s.test_spec "Tests" do |test_spec| test_spec.source_files = "Tests/*.swift" test_spec.resources = ["Tests/*.json"] - end -end \ No newline at end of file + end +end diff --git a/MnemonicKit.xcodeproj/project.pbxproj b/MnemonicKit.xcodeproj/project.pbxproj deleted file mode 100644 index 7248d1f..0000000 --- a/MnemonicKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,590 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 77FE007321BDA0CF009C3CD1 /* MnemonicKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 778602D621863BDD0036843F /* MnemonicKitTests.swift */; }; - 77FE007421BDA2AF009C3CD1 /* vectors.json in Resources */ = {isa = PBXBuildFile; fileRef = 778602DE2186426A0036843F /* vectors.json */; }; - F8A8C56721CD4CAA005684A3 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8A8C54321CD490C005684A3 /* CryptoSwift.framework */; }; - F8DA3F0721DE068F004B016E /* Mnemonic.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8DA3F0121DE068F004B016E /* Mnemonic.swift */; }; - F8DA3F0821DE068F004B016E /* String+MnemonicData.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8DA3F0221DE068F004B016E /* String+MnemonicData.swift */; }; - F8DA3F0921DE068F004B016E /* Chinese.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8DA3F0421DE068F004B016E /* Chinese.swift */; }; - F8DA3F0A21DE068F004B016E /* English.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8DA3F0521DE068F004B016E /* English.swift */; }; - F8DA3F0B21DE068F004B016E /* Data+BitArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8DA3F0621DE068F004B016E /* Data+BitArray.swift */; }; - F8DA3F1021DE07EF004B016E /* MnemonicKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8A8C55A21CD4C86005684A3 /* MnemonicKit.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - F8DA3F1721DE0935004B016E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 778602A32186370E0036843F /* Project object */; - proxyType = 1; - remoteGlobalIDString = F8A8C55921CD4C86005684A3; - remoteInfo = MnemonicKit; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 778602D621863BDD0036843F /* MnemonicKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MnemonicKitTests.swift; sourceTree = ""; }; - 778602D821863BDD0036843F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 778602DE2186426A0036843F /* vectors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = vectors.json; sourceTree = ""; }; - 77CE32B121F16281006ADABA /* MnemonicKitExample.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; name = MnemonicKitExample.playground; path = Examples/MnemonicKitExample.playground; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - 77FE006821BDA092009C3CD1 /* MnemonicKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MnemonicKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - F8A8C54321CD490C005684A3 /* CryptoSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CryptoSwift.framework; path = Carthage/Build/iOS/CryptoSwift.framework; sourceTree = ""; }; - F8A8C55A21CD4C86005684A3 /* MnemonicKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MnemonicKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F8A8C55C21CD4C86005684A3 /* MnemonicKit-Swift.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MnemonicKit-Swift.h"; sourceTree = ""; }; - F8A8C55D21CD4C86005684A3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - F8DA3F0121DE068F004B016E /* Mnemonic.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Mnemonic.swift; sourceTree = ""; }; - F8DA3F0221DE068F004B016E /* String+MnemonicData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+MnemonicData.swift"; sourceTree = ""; }; - F8DA3F0421DE068F004B016E /* Chinese.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Chinese.swift; sourceTree = ""; }; - F8DA3F0521DE068F004B016E /* English.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = English.swift; sourceTree = ""; }; - F8DA3F0621DE068F004B016E /* Data+BitArray.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+BitArray.swift"; sourceTree = ""; }; - F8DA3F1121DE07F4004B016E /* CryptoSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = CryptoSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 77FE006521BDA092009C3CD1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - F8DA3F1021DE07EF004B016E /* MnemonicKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F8A8C55721CD4C86005684A3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - F8A8C56721CD4CAA005684A3 /* CryptoSwift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 487474B4EF0B93DF80EF5CE8 /* Frameworks */ = { - isa = PBXGroup; - children = ( - F8DA3F1121DE07F4004B016E /* CryptoSwift.framework */, - F8A8C54321CD490C005684A3 /* CryptoSwift.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 778602A22186370E0036843F = { - isa = PBXGroup; - children = ( - 77CE32B321F16899006ADABA /* Examples */, - 778602D521863BDD0036843F /* Tests */, - F8A8C55B21CD4C86005684A3 /* MnemonicKit */, - 778602AC2186370E0036843F /* Products */, - 487474B4EF0B93DF80EF5CE8 /* Frameworks */, - ); - sourceTree = ""; - }; - 778602AC2186370E0036843F /* Products */ = { - isa = PBXGroup; - children = ( - 77FE006821BDA092009C3CD1 /* MnemonicKitTests.xctest */, - F8A8C55A21CD4C86005684A3 /* MnemonicKit.framework */, - ); - name = Products; - sourceTree = ""; - }; - 778602D521863BDD0036843F /* Tests */ = { - isa = PBXGroup; - children = ( - 778602DE2186426A0036843F /* vectors.json */, - 778602D621863BDD0036843F /* MnemonicKitTests.swift */, - 778602D821863BDD0036843F /* Info.plist */, - ); - path = Tests; - sourceTree = ""; - }; - 77CE32B321F16899006ADABA /* Examples */ = { - isa = PBXGroup; - children = ( - 77CE32B121F16281006ADABA /* MnemonicKitExample.playground */, - ); - path = Examples; - sourceTree = ""; - }; - F8A8C55B21CD4C86005684A3 /* MnemonicKit */ = { - isa = PBXGroup; - children = ( - F8DA3F0321DE068F004B016E /* Language */, - F8DA3F0621DE068F004B016E /* Data+BitArray.swift */, - F8DA3F0121DE068F004B016E /* Mnemonic.swift */, - F8DA3F0221DE068F004B016E /* String+MnemonicData.swift */, - F8A8C55C21CD4C86005684A3 /* MnemonicKit-Swift.h */, - F8A8C55D21CD4C86005684A3 /* Info.plist */, - ); - path = MnemonicKit; - sourceTree = ""; - }; - F8DA3F0321DE068F004B016E /* Language */ = { - isa = PBXGroup; - children = ( - F8DA3F0421DE068F004B016E /* Chinese.swift */, - F8DA3F0521DE068F004B016E /* English.swift */, - ); - path = Language; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - F8A8C55521CD4C86005684A3 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 77FE006721BDA092009C3CD1 /* MnemonicKitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 77FE007221BDA092009C3CD1 /* Build configuration list for PBXNativeTarget "MnemonicKitTests" */; - buildPhases = ( - 77FE006421BDA092009C3CD1 /* Sources */, - 77FE006521BDA092009C3CD1 /* Frameworks */, - 77FE006621BDA092009C3CD1 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - F8DA3F1821DE0935004B016E /* PBXTargetDependency */, - ); - name = MnemonicKitTests; - productName = MnemonicKitTests2; - productReference = 77FE006821BDA092009C3CD1 /* MnemonicKitTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - F8A8C55921CD4C86005684A3 /* MnemonicKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = F8A8C56321CD4C86005684A3 /* Build configuration list for PBXNativeTarget "MnemonicKit" */; - buildPhases = ( - F8A8C55521CD4C86005684A3 /* Headers */, - F8A8C55621CD4C86005684A3 /* Sources */, - F8A8C55721CD4C86005684A3 /* Frameworks */, - F8A8C55821CD4C86005684A3 /* Resources */, - F8A8C57321CD4D6E005684A3 /* Carthage */, - 7791E60E21FE346900957650 /* SwiftLint */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MnemonicKit; - productName = MnemonicKit; - productReference = F8A8C55A21CD4C86005684A3 /* MnemonicKit.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 778602A32186370E0036843F /* Project object */ = { - isa = PBXProject; - attributes = { - KnownAssetTags = ( - TestInput, - ); - LastSwiftUpdateCheck = 1010; - LastUpgradeCheck = 1000; - ORGANIZATIONNAME = "Keefer Taylor"; - TargetAttributes = { - 77FE006721BDA092009C3CD1 = { - CreatedOnToolsVersion = 10.1; - LastSwiftMigration = 1020; - }; - F8A8C55921CD4C86005684A3 = { - CreatedOnToolsVersion = 10.1; - LastSwiftMigration = 1020; - }; - }; - }; - buildConfigurationList = 778602A62186370E0036843F /* Build configuration list for PBXProject "MnemonicKit" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 778602A22186370E0036843F; - productRefGroup = 778602AC2186370E0036843F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - F8A8C55921CD4C86005684A3 /* MnemonicKit */, - 77FE006721BDA092009C3CD1 /* MnemonicKitTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 77FE006621BDA092009C3CD1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 77FE007421BDA2AF009C3CD1 /* vectors.json in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F8A8C55821CD4C86005684A3 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 7791E60E21FE346900957650 /* SwiftLint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = SwiftLint; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\nswiftlint --strict\nelse\necho \"warning: SwiftLint not installed, run `brew install swiftlint`\"\nfi\n"; - }; - F8A8C57321CD4D6E005684A3 /* Carthage */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(SRCROOT)/Carthage/Build/iOS/CryptoSwift.framework", - ); - name = Carthage; - outputFileListPaths = ( - ); - outputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/CryptoSwift.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/usr/local/bin/carthage copy-frameworks\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 77FE006421BDA092009C3CD1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 77FE007321BDA0CF009C3CD1 /* MnemonicKitTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F8A8C55621CD4C86005684A3 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F8DA3F0B21DE068F004B016E /* Data+BitArray.swift in Sources */, - F8DA3F0821DE068F004B016E /* String+MnemonicData.swift in Sources */, - F8DA3F0721DE068F004B016E /* Mnemonic.swift in Sources */, - F8DA3F0A21DE068F004B016E /* English.swift in Sources */, - F8DA3F0921DE068F004B016E /* Chinese.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - F8DA3F1821DE0935004B016E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = F8A8C55921CD4C86005684A3 /* MnemonicKit */; - targetProxy = F8DA3F1721DE0935004B016E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 778602BB2186370F0036843F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 778602BC2186370F0036843F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 77FE007021BDA092009C3CD1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 6F6VXZUKN5; - FRAMEWORK_SEARCH_PATHS = ( - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.keefertaylor.MnemonicKit.Tests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 77FE007121BDA092009C3CD1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 6F6VXZUKN5; - FRAMEWORK_SEARCH_PATHS = ( - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.keefertaylor.MnemonicKit.Tests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - F8A8C56421CD4C86005684A3 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = 6F6VXZUKN5; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = MnemonicKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = keefertaylor.MnemonicKit; - PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - F8A8C56521CD4C86005684A3 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = 6F6VXZUKN5; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = MnemonicKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = keefertaylor.MnemonicKit; - PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 778602A62186370E0036843F /* Build configuration list for PBXProject "MnemonicKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 778602BB2186370F0036843F /* Debug */, - 778602BC2186370F0036843F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 77FE007221BDA092009C3CD1 /* Build configuration list for PBXNativeTarget "MnemonicKitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 77FE007021BDA092009C3CD1 /* Debug */, - 77FE007121BDA092009C3CD1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - F8A8C56321CD4C86005684A3 /* Build configuration list for PBXNativeTarget "MnemonicKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F8A8C56421CD4C86005684A3 /* Debug */, - F8A8C56521CD4C86005684A3 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 778602A32186370E0036843F /* Project object */; -} diff --git a/MnemonicKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MnemonicKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b7aa771..0000000 --- a/MnemonicKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/MnemonicKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/MnemonicKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/MnemonicKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/MnemonicKit.xcodeproj/xcshareddata/xcschemes/MnemonicKit.xcscheme b/MnemonicKit.xcodeproj/xcshareddata/xcschemes/MnemonicKit.xcscheme deleted file mode 100644 index 61b50e6..0000000 --- a/MnemonicKit.xcodeproj/xcshareddata/xcschemes/MnemonicKit.xcscheme +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MnemonicKit.xcodeproj/xcshareddata/xcschemes/MnemonicKitTests.xcscheme b/MnemonicKit.xcodeproj/xcshareddata/xcschemes/MnemonicKitTests.xcscheme deleted file mode 100644 index a224c8d..0000000 --- a/MnemonicKit.xcodeproj/xcshareddata/xcschemes/MnemonicKitTests.xcscheme +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MnemonicKit/MnemonicKit-Swift.h b/MnemonicKit/MnemonicKit-Swift.h deleted file mode 100644 index 9543b45..0000000 --- a/MnemonicKit/MnemonicKit-Swift.h +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright Keefer Taylor, 2019 - -#import - -//! Project version number for MnemonicKit. -FOUNDATION_EXPORT double MnemonicKitVersionNumber; - -//! Project version string for MnemonicKit. -FOUNDATION_EXPORT const unsigned char MnemonicKitVersionString[]; diff --git a/README.md b/README.md index 6efd1d9..a698866 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,12 @@ An implementation of BIP39 in Swift. MnemonicKit supports both English and Chinese mnemonics. -This library is a fork of [CKMnemonic](https://github.com/CikeQiu/CKMnemonic). This fork provides several conveniences over the original library, namely: +This library is a fork of [CKMnemonic](https://github.com/CikeQiu/CKMnemonic). This fork provides several conveniences over the original library, namely: - Converting throwing APIs to non-throwing nullable APIs - Additional helper methods - Code clarity and documentation - Additional Testing -- Support on OSX +- Support on OSX ## Installation @@ -66,7 +66,14 @@ If you use Carthage to build your dependencies, make sure you have added `Crypto ## Contributions -I am happy to accept pull requests. If anyone is able to reach the original authors of CKMnemonic, I am happy to merge this library upstream with them. +I am happy to accept pull requests. + +To get set up: +```shell +$ brew install xcodegen # if you don't already have it +$ xcodegen generate # Generate an XCode project from Project.yml +$ open MnemonicKit.xcodeproj +``` ## License diff --git a/project.yml b/project.yml new file mode 100644 index 0000000..77026a7 --- /dev/null +++ b/project.yml @@ -0,0 +1,25 @@ +name: MnemonicKit +options: + bundleIdPrefix: com.keefertaylor +settings: + LD_RUNPATH_SEARCH_PATHS: "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks $(PROJECT_DIR)/Carthage/Build/iOS" +targets: + MnemonicKit: + type: framework + platform: [iOS, macOS] + sources: [MnemonicKit] + scheme: + testTargets: + - MnemonicKitTests_$platform + gatherCoverageData: true + postCompileScripts: + - script: swiftlint autocorrect --config .swiftlint.yml + name: SwiftLint + dependencies: + - carthage: CryptoSwift + MnemonicKitTests: + type: bundle.unit-test + platform: [iOS, macOS] + sources: [Tests] + dependencies: + - target: MnemonicKit_$platform