Skip to content

Supported swift 6 and fixed warnings#134

Open
InderKumarRathore wants to merge 2 commits intomasterfrom
cleanup
Open

Supported swift 6 and fixed warnings#134
InderKumarRathore wants to merge 2 commits intomasterfrom
cleanup

Conversation

@InderKumarRathore
Copy link
Copy Markdown
Owner

@InderKumarRathore InderKumarRathore commented Jan 7, 2025

  • Supported swift 6
  • Fix some of the warnings that was showing while running pod lib lint

TODOs:

  • Test for some actual hardware devices

Comment on lines +113 to +120
let strings: [String] = results.compactMap {
guard let range = Range($0.range, in: text) else {
print("Unable to create the range for: \(text)")
return nil
}
return String(text[range])
}.first
}
return strings.first
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helping compiler here, as it was not able to resolve this expression

var hw_machine = [Unicode.UTF8.CodeUnit](repeating: 0, count: Int(size))
sysctl(&name, 2, &hw_machine, &size, nil, 0)

var hardware: String = String(cString: hw_machine)
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String(cString:) is deprecated, used String(decoding: as:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant