I am using (a per your documentation some time ago):
extension Data {
public static var declaredDatatype: String {
return Blob.declaredDatatype
}
public static func fromDatatypeValue(_ dataValue: Blob) -> Data {
return Data(dataValue.bytes)
}
public var datatypeValue: Blob {
return withUnsafeBytes( { (pointer: UnsafePointer<UInt8>) -> Blob in Blob(bytes: pointer, length: count) } )
}
}
which gives the following in latest Xcode and Macos:
'withUnsafeBytes' is deprecated: use withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R instead
which I have tried to do with no success. Could you help me here?
I am using (a per your documentation some time ago):
which gives the following in latest Xcode and Macos: 'withUnsafeBytes' is deprecated: use
withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R
insteadwhich I have tried to do with no success. Could you help me here?