Skip to content

Commit

Permalink
Merge pull request #29 from Jitsusama/finalize-podspec-changes
Browse files Browse the repository at this point in the history
Finalize podspec Changes
  • Loading branch information
Jitsusama authored Apr 15, 2018
2 parents 6348378 + 1cd7ce2 commit 0ef5f90
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 43 deletions.
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,30 @@ native unsigned integer types support.
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)

## Installation
This library includes Carthage and SPM support out of the box. Reference this git
repository in a Podfile, Cartfile or Package.swift file in order to easily include this library
while also being able to easily track changes.
This library includes Carthage, CocoaPods and SPM support out of the box.
Reference this git repository in a Podfile, Cartfile or Package.swift file in
order to easily include this library while also being able to easily track
changes.

You can also manually copy over the Sources/UInt128.swift file into your project and
it should work great. I've purposely kept this library constrained to a single file in
order to support this use case.
You can also manually copy over the Sources/UInt128.swift file into your project
and it should work great. I've purposely kept this library constrained to a
single file in order to support this use case.

## Usage
Since this library fully implements the UnsignedInteger protocol, you can use this data
type just like any other native UInt data type. For numbers larger than UIntMax, you'll
either want to call the `init(upperBits: UInt64, lowerBits: UInt64)` initializer, or,
use the `init(stringLiteral: String)` initializer to create an instance with a string.
The string can be in binary, octal, decimal or hexadecimal.
Since this library fully implements the UnsignedInteger protocol, you can use
this data type just like any other native UInt data type. For numbers larger
than UIntMax, you'll either want to call the `init(upperBits: UInt64, lowerBits:
UInt64)` initializer, or, use the `init(stringLiteral: String)` initializer to
create an instance with a string. The string can be in binary, octal, decimal
or hexadecimal.

For example:

let uInt128ByString: UInt128 = "0xffaabbcc00129823fa9a12d4aa87f498"
let uInt128ByInteger: UInt128 = 1234

## Building
This project includes an example Xcode project for building the framework that also includes
a playground that can be utilized for testing things out. This Xcode project can build from
one target a iphone, iphonesimulator or mac os x build. It also includes unit testing and
code coverage.
This project includes an example Xcode project for building the framework that
also includes a playground that can be utilized for testing things out. This
Xcode project can build from one target a iphone, iphonesimulator or macos
build. It also includes unit testing and code coverage.
58 changes: 31 additions & 27 deletions UInt128.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,41 @@
# Be sure to run `pod lib lint UInt128.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
s.name = 'UInt128'
s.version = '0.7.0'
s.summary = 'A Swift 128-bit Unsigned Integer Data Type conforming to the UnsignedInteger Protocol'
Pod::Spec.new do |spec|
# Project metadata
spec.name = 'UInt128'
spec.version = '0.8.0'
spec.summary = 'A Swift 128-bit Unsigned Integer Data Type'
spec.description = <<~DESC
This library provides a Swift 4.0 compatible 128-bit Unsigned Integer
data type. It includes support for all of the protocols that you would
expect from a native UnsignedInteger type in the Swift standard library.
DESC
spec.homepage = 'https://github.com/Jitsusama/UInt128'
spec.license = {
:type => 'Apache-2.0',
:file => 'LICENSE'
}
spec.author = {
'Joel Gerber' => 'joel@grrbrr.ca'
}
spec.source = {
:git => 'https://github.com/Jitsusama/UInt128.git',
:tag => spec.version.to_s
}

# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
# Where to look for source files
spec.source_files = 'Sources/*'

s.description = <<-DESC
A Swift 128-bit Unsigned Integer Data Type conforming to the UnsignedInteger Protocol.
This library also implements a number of other initializers and properties that Swift's native unsigned integer types support.
DESC
# State supported version of the Swift library
spec.swift_version = "4.0"

s.homepage = 'https://github.com/Jitsusama/UInt128'
s.license = { :type => 'Apache-2.0', :file => 'LICENSE' }
s.author = { 'Joel Gerber' => 'joel@grrbrr.ca' }
s.source = { :git => 'https://github.com/Jitsusama/UInt128.git', :tag => s.version.to_s }
s.swift_version = "4.0"

s.ios.deployment_target = "8.0"
s.tvos.deployment_target = "9.0"
s.osx.deployment_target = "10.9"
s.watchos.deployment_target = "2.0"

s.source_files = 'Sources/*'

# OS deployment targets
spec.ios.deployment_target = "8.0"
spec.tvos.deployment_target = "9.0"
spec.osx.deployment_target = "10.9"
spec.watchos.deployment_target = "2.0"
end
2 changes: 1 addition & 1 deletion UInt128.xcodeproj/UInt128_Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>0.8.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

0 comments on commit 0ef5f90

Please sign in to comment.