Skip to content

[Infra] Convert App Check sample app to SwiftUI #14769

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

Merged
merged 4 commits into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,49 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 60;
objects = {

/* Begin PBXBuildFile section */
9A07E0572541D1B50076D8F5 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9A07E0562541D1B50076D8F5 /* GoogleService-Info.plist */; };
9AC7C27C2541C7E500F5DD80 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AC7C27B2541C7E500F5DD80 /* AppDelegate.swift */; };
9AC7C27E2541C7E500F5DD80 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AC7C27D2541C7E500F5DD80 /* SceneDelegate.swift */; };
9AC7C2802541C7E500F5DD80 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AC7C27F2541C7E500F5DD80 /* ViewController.swift */; };
9AC7C2832541C7E500F5DD80 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9AC7C2812541C7E500F5DD80 /* Main.storyboard */; };
9AC7C2852541C7E600F5DD80 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9AC7C2842541C7E600F5DD80 /* Assets.xcassets */; };
9AC7C2882541C7E600F5DD80 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9AC7C2862541C7E600F5DD80 /* LaunchScreen.storyboard */; };
EAD122EF2DB97E10004D64C9 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = EAD122EE2DB97E10004D64C9 /* GoogleService-Info.plist */; };
EAD122F12DB98BD0004D64C9 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAD122F02DB98BCC004D64C9 /* ContentView.swift */; };
EAD122F32DB9920D004D64C9 /* AppCheckTestApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAD122F22DB99206004D64C9 /* AppCheckTestApp.swift */; };
EAD122F62DB9940E004D64C9 /* FirebaseAppCheck in Frameworks */ = {isa = PBXBuildFile; productRef = EAD122F52DB9940E004D64C9 /* FirebaseAppCheck */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
9A07E0562541D1B50076D8F5 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
9AC7C2782541C7E500F5DD80 /* FIRAppCheckTestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FIRAppCheckTestApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
9AC7C27B2541C7E500F5DD80 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
9AC7C27D2541C7E500F5DD80 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
9AC7C27F2541C7E500F5DD80 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
9AC7C2822541C7E500F5DD80 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
9AC7C2842541C7E600F5DD80 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
9AC7C2872541C7E600F5DD80 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
9AC7C2892541C7E600F5DD80 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
EAD122EE2DB97E10004D64C9 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
EAD122F02DB98BCC004D64C9 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
EAD122F22DB99206004D64C9 /* AppCheckTestApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCheckTestApp.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
9AC7C2752541C7E500F5DD80 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
EAD122F62DB9940E004D64C9 /* FirebaseAppCheck in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
30221A668C12ED048788DFEB /* Pods */ = {
isa = PBXGroup;
children = (
);
path = Pods;
sourceTree = "<group>";
};
9AC7C26F2541C7E500F5DD80 = {
isa = PBXGroup;
children = (
9AC7C27A2541C7E500F5DD80 /* FIRAppCheckTestApp */,
9AC7C2792541C7E500F5DD80 /* Products */,
30221A668C12ED048788DFEB /* Pods */,
);
sourceTree = "<group>";
};
Expand All @@ -66,14 +60,14 @@
9AC7C27A2541C7E500F5DD80 /* FIRAppCheckTestApp */ = {
isa = PBXGroup;
children = (
EAD122EE2DB97E10004D64C9 /* GoogleService-Info.plist */,
9AC7C27B2541C7E500F5DD80 /* AppDelegate.swift */,
9AC7C27D2541C7E500F5DD80 /* SceneDelegate.swift */,
9AC7C27F2541C7E500F5DD80 /* ViewController.swift */,
9AC7C2812541C7E500F5DD80 /* Main.storyboard */,
EAD122F02DB98BCC004D64C9 /* ContentView.swift */,
EAD122F22DB99206004D64C9 /* AppCheckTestApp.swift */,
9AC7C2842541C7E600F5DD80 /* Assets.xcassets */,
9AC7C2862541C7E600F5DD80 /* LaunchScreen.storyboard */,
9AC7C2892541C7E600F5DD80 /* Info.plist */,
9A07E0562541D1B50076D8F5 /* GoogleService-Info.plist */,
);
path = FIRAppCheckTestApp;
sourceTree = "<group>";
Expand Down Expand Up @@ -121,6 +115,9 @@
Base,
);
mainGroup = 9AC7C26F2541C7E500F5DD80;
packageReferences = (
EAD122F42DB9940E004D64C9 /* XCLocalSwiftPackageReference "../../../../firebase-ios-sdk" */,
);
productRefGroup = 9AC7C2792541C7E500F5DD80 /* Products */;
projectDirPath = "";
projectRoot = "";
Expand All @@ -136,9 +133,8 @@
buildActionMask = 2147483647;
files = (
9AC7C2882541C7E600F5DD80 /* LaunchScreen.storyboard in Resources */,
EAD122EF2DB97E10004D64C9 /* GoogleService-Info.plist in Resources */,
9AC7C2852541C7E600F5DD80 /* Assets.xcassets in Resources */,
9AC7C2832541C7E500F5DD80 /* Main.storyboard in Resources */,
9A07E0572541D1B50076D8F5 /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -149,23 +145,16 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9AC7C2802541C7E500F5DD80 /* ViewController.swift in Sources */,
EAD122F32DB9920D004D64C9 /* AppCheckTestApp.swift in Sources */,
9AC7C27C2541C7E500F5DD80 /* AppDelegate.swift in Sources */,
EAD122F12DB98BD0004D64C9 /* ContentView.swift in Sources */,
9AC7C27E2541C7E500F5DD80 /* SceneDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
9AC7C2812541C7E500F5DD80 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
9AC7C2822541C7E500F5DD80 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
9AC7C2862541C7E600F5DD80 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
Expand Down Expand Up @@ -357,6 +346,20 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
EAD122F42DB9940E004D64C9 /* XCLocalSwiftPackageReference "../../../../firebase-ios-sdk" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = "../../../../firebase-ios-sdk";
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
EAD122F52DB9940E004D64C9 /* FirebaseAppCheck */ = {
isa = XCSwiftPackageProductDependency;
productName = FirebaseAppCheck;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 9AC7C2702541C7E500F5DD80 /* Project object */;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseCore
import SwiftUI

@main
struct FIRAppCheckTestApp: App {
@UIApplicationDelegateAdaptor private var appDelegate: AppDelegate

var body: some Scene {
WindowGroup {
ContentView()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import UIKit
import FirebaseAppCheck
import FirebaseCore

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseCore
import SwiftUI

struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
Text("Hello, world!")
}
.padding()
}
}

#Preview {
ContentView()
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,10 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
Expand Down

This file was deleted.

Loading