Skip to content

Commit 981852d

Browse files
committed
🚨 Fixes for Swift 6 language mode
Signed-off-by: Peter Friese <[email protected]>
1 parent 870562f commit 981852d

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.samples.FriendlyFlix;
286286
PRODUCT_NAME = "$(TARGET_NAME)";
287287
SWIFT_EMIT_LOC_STRINGS = YES;
288-
SWIFT_VERSION = 5.0;
288+
SWIFT_VERSION = 6.0;
289289
TARGETED_DEVICE_FAMILY = "1,2";
290290
};
291291
name = Debug;
@@ -314,7 +314,7 @@
314314
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.samples.FriendlyFlix;
315315
PRODUCT_NAME = "$(TARGET_NAME)";
316316
SWIFT_EMIT_LOC_STRINGS = YES;
317-
SWIFT_VERSION = 5.0;
317+
SWIFT_VERSION = 6.0;
318318
TARGETED_DEVICE_FAMILY = "1,2";
319319
};
320320
name = Release;

Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix/App/FriendlyFlixApp.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import Firebase
1616
import FirebaseAuth
17-
import FirebaseDataConnect
17+
@preconcurrency import FirebaseDataConnect
1818
import FriendlyFlixSDK
1919
import SwiftUI
2020

Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix/Features/Authentication/AuthenticationService.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import FirebaseAuth
15+
@preconcurrency import FirebaseAuth
1616
import Foundation
1717
import Observation
1818

@@ -22,7 +22,7 @@ enum AuthenticationState {
2222
case authenticated
2323
}
2424

25-
@Observable
25+
@Observable @MainActor
2626
class AuthenticationService {
2727
var presentingAuthenticationDialog = false
2828
var presentingAccountDialog = false

Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix/Features/Details/MovieCardView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import FirebaseDataConnect
15+
@preconcurrency import FirebaseDataConnect
1616
import FriendlyFlixSDK
1717
import NukeUI
1818
import SwiftUI

Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix/Features/Home/HomeScreen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import FirebaseDataConnect
15+
@preconcurrency import FirebaseDataConnect
1616
import FriendlyFlixSDK
1717
import SwiftUI
1818

Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix/Features/Home/MovieTeaserView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct MovieTeaserView: View {
6767
}
6868

6969
#Preview {
70-
var movie = Movie.mock
70+
let movie = Movie.mock
7171
MovieTeaserView(
7272
title: movie.title,
7373
subtitle: movie.description,

Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix/Features/Library/LibraryScreen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import FirebaseDataConnect
15+
@preconcurrency import FirebaseDataConnect
1616
import FriendlyFlixSDK
1717
import SwiftUI
1818

Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix/Model/Movie.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ struct Movie: Identifiable, Hashable {
8585
}
8686

8787
extension Movie: Mockable {
88-
static var mockList: [Movie] = [
88+
static let mockList: [Movie] = [
8989
.init(
9090
title: "The Hitchhiker's Guide to the Galaxy",
9191
description:
@@ -137,7 +137,7 @@ extension Movie: Mockable {
137137
),
138138
]
139139

140-
static var featured = [Movie](mockList.filter { $0.title.contains("The") })
141-
static var topMovies = [Movie](mockList.prefix(3))
142-
static var watchList = [Movie](mockList.suffix(5))
140+
static let featured = [Movie](mockList.filter { $0.title.contains("The") })
141+
static let topMovies = [Movie](mockList.prefix(3))
142+
static let watchList = [Movie](mockList.suffix(5))
143143
}

0 commit comments

Comments
 (0)