      */
     internal init(identifier: String) {
 
-        for device in DeviceType.all {
+		for device in DeviceType.allCases {
             for deviceId in device.identifiers {
                 guard identifier == deviceId else { continue }
                 self = device

}

/// Enum representing the different types of iOS devices available
public enum DeviceType: String, EnumProtocol {
    case iPhone2G

    case iPhone3G

    }
}

// MARK: -

#if swift(>=4.2)
#else

// MARK: -

internal protocol CaseIterable {
	associatedtype AllCases: Collection where AllCases.Element == Self
	static var allCases: AllCases { get }
}

internal extension CaseIterable where Self: Hashable {
	static var allCases: [Self] {
		return [Self](AnySequence { () -> AnyIterator<Self> in
			var raw = 0
			return AnyIterator {
				let current = withUnsafeBytes(of: &raw) { $0.load(as: Self.self) }
				guard current.hashValue == raw else {
					return nil
				}
				raw += 1
				return current
			}
		})
	}
}

#endif
