Skip to content

Commit

Permalink
Include iOS scheme in Xcode package. Clean up Xcode project.
Browse files Browse the repository at this point in the history
  • Loading branch information
objecthub committed Apr 10, 2020
1 parent 51fb4ec commit c317982
Show file tree
Hide file tree
Showing 12 changed files with 174 additions and 50 deletions.
70 changes: 49 additions & 21 deletions NumberKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
Expand All @@ -20,7 +20,7 @@
CCA2651723EF73B700483329 /* CodableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA2651623EF73B700483329 /* CodableTests.swift */; };
CCA8E8111F7780C800927A41 /* FloatingPointNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA8E8101F7780C800927A41 /* FloatingPointNumber.swift */; };
CCA8E8131F77814F00927A41 /* IntegerNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA8E8121F77814F00927A41 /* IntegerNumber.swift */; };
CCD2603D23F20F7200DFE5A4 /* NumberKit_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = CCD2603B23F20F7200DFE5A4 /* NumberKit_iOS.h */; settings = {ATTRIBUTES = (Public, ); }; };
CCD2603D23F20F7200DFE5A4 /* NumberKit_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = CCD2603B23F20F7200DFE5A4 /* NumberKit_iOS.h */; platformFilter = ios; settings = {ATTRIBUTES = (Public, ); }; };
CCD2604123F2119900DFE5A4 /* NumberUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC99F56D1B7AAAA300355E1E /* NumberUtil.swift */; };
CCD2604223F2119C00DFE5A4 /* IntegerNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA8E8121F77814F00927A41 /* IntegerNumber.swift */; };
CCD2604323F2119F00DFE5A4 /* FloatingPointNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA8E8101F7780C800927A41 /* FloatingPointNumber.swift */; };
Expand Down Expand Up @@ -189,9 +189,9 @@
isa = PBXNativeTarget;
buildConfigurationList = CC99F5631B7AA6E200355E1E /* Build configuration list for PBXNativeTarget "NumberKit" */;
buildPhases = (
CC99F54C1B7AA6E200355E1E /* Headers */,
CC99F54A1B7AA6E200355E1E /* Sources */,
CC99F54B1B7AA6E200355E1E /* Frameworks */,
CC99F54C1B7AA6E200355E1E /* Headers */,
CC99F54D1B7AA6E200355E1E /* Resources */,
);
buildRules = (
Expand Down Expand Up @@ -225,9 +225,9 @@
isa = PBXNativeTarget;
buildConfigurationList = CCD2604023F20F7200DFE5A4 /* Build configuration list for PBXNativeTarget "NumberKit iOS" */;
buildPhases = (
CCD2603423F20F7200DFE5A4 /* Headers */,
CCD2603523F20F7200DFE5A4 /* Sources */,
CCD2603623F20F7200DFE5A4 /* Frameworks */,
CCD2603423F20F7200DFE5A4 /* Headers */,
CCD2603723F20F7200DFE5A4 /* Resources */,
);
buildRules = (
Expand Down Expand Up @@ -464,7 +464,8 @@
MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -478,16 +479,20 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = "$(SRCROOT)/Sources/NumberKit/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.3.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.3.5;
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.NumberKit;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -501,16 +506,20 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = "$(SRCROOT)/Sources/NumberKit/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.3.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.3.5;
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.NumberKit;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -523,7 +532,11 @@
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Tests/NumberKitTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.NumberKitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -535,7 +548,11 @@
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Tests/NumberKitTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.NumberKitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -552,24 +569,29 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = C72Z63N8M5;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "$(SRCROOT)/Sources/NumberKit iOS/Info.plist";
INFOPLIST_FILE = "Sources/NumberKit iOS/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.3.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.3.5;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.NumberKit;
PRODUCT_NAME = NumberKit;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -586,23 +608,29 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = C72Z63N8M5;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "$(SRCROOT)/Sources/NumberKit iOS/Info.plist";
INFOPLIST_FILE = "Sources/NumberKit iOS/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.3.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.3.5;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.NumberKit;
PRODUCT_NAME = NumberKit;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand Down
77 changes: 77 additions & 0 deletions NumberKit.xcodeproj/xcshareddata/xcschemes/NumberKit iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CCD2603823F20F7200DFE5A4"
BuildableName = "NumberKit iOS.framework"
BlueprintName = "NumberKit iOS"
ReferencedContainer = "container:NumberKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CC99F5581B7AA6E200355E1E"
BuildableName = "NumberKitTests.xctest"
BlueprintName = "NumberKitTests"
ReferencedContainer = "container:NumberKit.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CCD2603823F20F7200DFE5A4"
BuildableName = "NumberKit iOS.framework"
BlueprintName = "NumberKit iOS"
ReferencedContainer = "container:NumberKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
14 changes: 14 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,32 @@ import PackageDescription

let package = Package(
name: "NumberKit",

// Platforms define the operating systems for which this library can be compiled for.
platforms: [
.macOS(.v10_12),
.iOS(.v11),
],

// Products define the executables and libraries produced by a package, and make them visible
// to other packages.
products: [
.library(name: "NumberKit", targets: ["NumberKit"]),
],

// Dependencies declare other packages that this package depends on.
// e.g. `.package(url: /* package url */, from: "1.0.0"),`
dependencies: [
],

// Targets are the basic building blocks of a package. A target can define a module or
// a test suite. Targets can depend on other targets in this package, and on products
// in packages which this package depends on.
targets: [
.target(name: "NumberKit", dependencies: []),
.testTarget(name: "NumberKitTests", dependencies: ["NumberKit"]),
],

// Required Swift language version.
swiftLanguageVersions: [.v5]
)
35 changes: 22 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,47 @@ each represented as a struct:
2. `Rational`: signed rational numbers
3. `Complex`: complex floating-point numbers

**Requirements**:
- Xcode 11.4
- Swift 5.2
- macOS with Xcode or Swift Package Manager
- Linux with Swift Package Manager

**Note**: So far, with every major version of Swift, Apple decided to change the foundational APIs of the numeric
types in Swift significantly and consistently in a backward incompatible way. In order to be more isolated from
such changes in future, with Swift 3, I decided to introduce a distinct integer type used in NumberKit based on a
new protocol `IntegerNumber`. All standard numeric integer types implement this protocol. This is now consistent
with the usage of protocol `FloatingPointNumber` for floating point numbers, where there was, so far, never a
real, generic enough foundation (and still isn't).


## BigInt

`BigInt` objects are immutable, signed, arbitrary-precision integers that can be used as a
drop-in replacement for the existing binary integer types of Swift 5. Struct `BigInt` defines all
drop-in replacement for the existing binary integer types of Swift 5.
[Struct `BigInt`](https://github.com/objecthub/swift-numberkit/blob/master/Sources/NumberKit/BigInt.swift) defines all
the standard arithmetic integer operations and implements the corresponding protocols defined
in the standard library.


## Rational

Struct `Rational<T>` defines immutable, rational numbers based on an existing signed integer
[Struct `Rational<T>`](https://github.com/objecthub/swift-numberkit/blob/master/Sources/NumberKit/Rational.swift)
defines immutable, rational numbers based on an existing signed integer
type `T`, like `Int32`, `Int64`, or `BigInt`. A rational number is a signed number that can
be expressed as the quotient of two integers _a_ and _b_: _a / b_.


## Complex

Struct `Complex<T>` defines complex numbers based on an existing floating point type `T`,
like `Float` or `Double`. A complex number consists of two components, a real part _re_
and an imaginary part _im_ and is typically written as: _re + im * i_ where _i_ is
the _imaginary unit_.
[Struct `Complex<T>`](https://github.com/objecthub/swift-numberkit/blob/master/Sources/NumberKit/Complex.swift)
defines complex numbers based on an existing floating point type `T`, like `Float` or `Double`. A complex number
consists of two components, a real part _re_ and an imaginary part _im_ and is typically written as: _re + im * i_
where _i_ is the _imaginary unit_.

## Requirements

The following technologies are needed to build the components of the _Swift NumberKit_ framework:

- [Xcode 11.4](https://developer.apple.com/xcode/)
- [Swift 5.2](https://developer.apple.com/swift/)
- [Swift Package Manager](https://swift.org/package-manager/)
- macOS or Linux

## Copyright

Author: Matthias Zenger (<[email protected]>)
Copyright © 2016-2020 Matthias Zenger. All rights reserved.
2 changes: 1 addition & 1 deletion Sources/NumberKit iOS/NumberKit_iOS.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// NumberKit_iOS.h
// NumberKit-iOS
// NumberKit
//
// Created by Matthias Zenger on 10/02/2020.
// Copyright © 2015-2020 Matthias Zenger. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion Sources/NumberKit/Complex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// NumberKit
//
// Created by Matthias Zenger on 15/08/2015.
// Copyright © 2015-2019 Matthias Zenger. All rights reserved.
// Copyright © 2015-2020 Matthias Zenger. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Sources/NumberKit/FloatingPointNumber.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// NumberKit
//
// Created by Matthias Zenger on 23/09/2017.
// Copyright © 2015-2019 Matthias Zenger. All rights reserved.
// Copyright © 2015-2020 Matthias Zenger. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit c317982

Please sign in to comment.