Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift 6 Compliant #425

Open
tazmancoder opened this issue Oct 2, 2024 · 4 comments
Open

Swift 6 Compliant #425

tazmancoder opened this issue Oct 2, 2024 · 4 comments

Comments

@tazmancoder
Copy link

tazmancoder commented Oct 2, 2024

I am just wondering when DeviceKit will be Swift 6 compliant. On my import for DeviceKit I get the following suggestion.

Add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'DeviceKit'

I have and enum like so where I use it:

enum LAC {
	// MARK: - DeviceKit
	static let device = Device.current
	
	// MARK: - Submit Feedback
	static let categoryDescritionNotSet = String(localized: "Choose a category and enter a description.", table: "ContactUsView+Strings", comment: "Message to user that something is missing on view")
}

This way in my code I can call LAC.device.isPad or any of the other options DeviceKit offers.

Not sure if this is the best way to use this package, but I just wanted to instantiate this in one place instead of putting

import DeviceKit and 
let device = Device.current in many places in my code.

Can you provide some feedback on when this package will support Swift 6?

Thanks

Mark

@kudit
Copy link

kudit commented Oct 21, 2024

You can probably add @MainActor to the static variable to silence the warning.

@tazmancoder
Copy link
Author

tazmancoder commented Oct 22, 2024 via email

@kudit

This comment was marked as off-topic.

@tazmancoder

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants