Swiftpack.co - Package - highmobility/hmutilities-swift

HMUtilities Swift SDK

The HMUtilities hosts a set of extensions, and other functionality, commonly used in other High Mobility's Swift libraries.

Table of contents

Features

Binary Serialization: Converting types conforming to HMBytesConvertable to bytes and back. Out of the box support for basic Swift types like String, Int, Double, URL and more.

Hex: Converting between hex strings and bytes.

Integration

It's recommended to use the library through Swift Package Manager (SPM), which is now also built-in to Xcode and accessible in File > Swift Packages > ... or going to project settings and selecting Swift Packages in the top-center.
When targeting a Swift package, the Package.swift file must include .package(url: "https://github.com/highmobility/hmutilities-swift", .upToNextMinor(from: "[__version__]")), under dependencies.

If SPM is not possible, the source can be downloaded directly from Github and built into an .xcframework using an accompaning script: XCFrameworkBuilder.sh. The created package includes both the simulator and device binaries, which must then be dropped (linked) to the target Xcode project.

Furthermore, when .xcframework is also not suitable, the library can be made into a fat binary (.framework) by running UniversalBuildScript.sh. This combines both simulator and device slices into one binary, but requires the simulator slice to be removed before being able to upload to App Store Connect – for this there is a AppStoreCompatible.sh script included inside the created .framework folder.

Requirements

HMUtilities Swift SDK requires Xcode 11.0 or later and is compatible with apps targeting iOS 10.0 or above.

Contributing

We would love to accept your patches and contributions to this project. Before getting to work, please first discuss the changes that you wish to make with us via GitHub Issues, Spectrum or Slack.

See more in CONTRIBUTING.md

License

This repository is using MIT license. See more in LICENSE

Github

link
Stars: 0

Dependencies

Used By

Total: 0

Releases

1.4.7 - 2020-01-16 14:03:35

New LICENCE!

Added back scripts to deal with fat-binaries. Updated README.

1.4.6 - 2020-01-08 11:05:55

Fixed HMDebugTree and XCFrameworkBuilder script.

- 2019-10-15 12:49:40

Lowercased hex-output from byte-collection (helps with readability).

Proper Xcode 11 release.

- 2019-09-17 10:46:25

Updated for Xcode 11 GM2. Added XCFramework building script (and removed the "old" universal scripts).

- 2019-09-11 11:11:07

Updated for Xcode 11 GM and Swift 5.1

- 2019-08-20 18:59:44

Updated for Xcode 11b6 to use with it's integrated SPM and Swift 5.1

- 2019-05-27 07:51:58

Reintroduced .bytes and .data in UInt8-Collection.

- 2019-05-02 09:01:34

Added -compactMapConcurrently to Collection
Improved HMBytesConvertable's -init-s
Removed .bytes and .data from UInt8 Collection

- 2019-04-05 12:32:50

Fixed Int8's HMBytesConvertable .bytes value.
Improved HMBytesConvertable code.

- 2019-03-29 07:45:45

Updated to Swift 5

- 2019-03-11 15:06:23

Fixed signed integer's initialisation for HMBytesConvertable.

- 2019-02-25 17:00:33

Added a new type HMBytesConvertable and made the following types conform to it: Bool, Date, Double, Float, String, URL, signed and unsigned integers.

- 2018-11-06 11:15:52

Renamed DebugTree to HMDebugTree.

- 2018-09-27 08:55:32

Added .bytes accessor for Double to get IEE 754 bytes. Added binary initialiser for FixedWidthInteger types (i.e. UInt16 can be initialised with 2 bytes, UInt32 with 4 and so forth).

- 2018-08-21 08:43:48

Updated to Swift 4.2

- 2018-06-15 09:57:51

Ignores whitespace when converting a hex string to bytes.

- 2018-05-11 07:02:01

Added DebugTree.

- 2018-04-12 17:22:51

Fixed invalid bundle-identifier and bitcode problems.

Initial release - 2018-04-03 08:23:09

First release of some additionally "useful" swift functionality. Also used by other High-Mobility's swift frameworks.