Skip to content

Commit

Permalink
Merge pull request #37 from bilaalrashid/bilaal/fix-mainactor
Browse files Browse the repository at this point in the history
Fix accessing UIDevice.current outside of main actor
  • Loading branch information
bilaalrashid authored Oct 12, 2024
2 parents 0c20899 + c33b1d8 commit 3e33cb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/BbcNews/BbcNews.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public struct BbcNews {
/// - systemVersion: The version of the operating system e.g. 16.6.
/// - service: The international service that API results should be localised for e.g. BBC Cymru.
/// - release: The release track of the API version.
public init(service: Service = .english, release: ReleaseTrack? = nil) {
@MainActor public init(service: Service = .english, release: ReleaseTrack? = nil) {
self.init(
modelIdentifier: UIDevice.current.modelIdentifier,
systemName: UIDevice.current.systemName,
Expand Down

0 comments on commit 3e33cb5

Please sign in to comment.