Skip to content

Commit

Permalink
🚨 Fixes for Swift 6 language mode
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Friese <peter@peterfriese.de>
  • Loading branch information
peterfriese committed Nov 13, 2024
1 parent 870562f commit 981852d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.samples.FriendlyFlix;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand Down Expand Up @@ -314,7 +314,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.samples.FriendlyFlix;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import Firebase
import FirebaseAuth
import FirebaseDataConnect
@preconcurrency import FirebaseDataConnect
import FriendlyFlixSDK
import SwiftUI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAuth
@preconcurrency import FirebaseAuth
import Foundation
import Observation

Expand All @@ -22,7 +22,7 @@ enum AuthenticationState {
case authenticated
}

@Observable
@Observable @MainActor
class AuthenticationService {
var presentingAuthenticationDialog = false
var presentingAccountDialog = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseDataConnect
@preconcurrency import FirebaseDataConnect
import FriendlyFlixSDK
import NukeUI
import SwiftUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseDataConnect
@preconcurrency import FirebaseDataConnect
import FriendlyFlixSDK
import SwiftUI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct MovieTeaserView: View {
}

#Preview {
var movie = Movie.mock
let movie = Movie.mock
MovieTeaserView(
title: movie.title,
subtitle: movie.description,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseDataConnect
@preconcurrency import FirebaseDataConnect
import FriendlyFlixSDK
import SwiftUI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct Movie: Identifiable, Hashable {
}

extension Movie: Mockable {
static var mockList: [Movie] = [
static let mockList: [Movie] = [
.init(
title: "The Hitchhiker's Guide to the Galaxy",
description:
Expand Down Expand Up @@ -137,7 +137,7 @@ extension Movie: Mockable {
),
]

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

0 comments on commit 981852d

Please sign in to comment.