Hashids.org in Swift 3 not working

219 Views Asked by At

I installed the hashids.org github project (downloaded from here: http://hashids.org/swift/ ), as I want to implement it in my project.

I need to convert 15 digit booking numbers into 5 digit alphanumeric strings, kind of like airline booking references (e.g. A5UW9).

Problem is, the hashids github project cannot run as the

import Hashids_Swift

line on the top of the HashidsTests.swift file gives an error

No such module 'Hashids_Swift"

Any help on how to make it work from someone who has implemented it, or any advice on an alternative to achieve the conversion stated above with another method within Swift to do that?

1

There are 1 best solutions below

0
On

There is a .podspec, so you install it through CocoaPods:

pod 'Hashids-Swift', '~> 0.3'