diff --git a/storage/StorageExample (iOS) UITests/StorageExampleUITests.swift b/storage/StorageExample (iOS) UITests/StorageExampleUITests.swift new file mode 100644 index 000000000..3a032478a --- /dev/null +++ b/storage/StorageExample (iOS) UITests/StorageExampleUITests.swift @@ -0,0 +1,41 @@ +// 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 XCTest + +final class StorageExample__iOS__UITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + @MainActor + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} diff --git a/storage/StorageExample (iOS) UITests/StorageExampleUITestsLaunchTests.swift b/storage/StorageExample (iOS) UITests/StorageExampleUITestsLaunchTests.swift new file mode 100644 index 000000000..a3a44a39a --- /dev/null +++ b/storage/StorageExample (iOS) UITests/StorageExampleUITestsLaunchTests.swift @@ -0,0 +1,40 @@ +// 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 XCTest + +final class StorageExample__iOS__UITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + @MainActor + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +} diff --git a/storage/StorageExample.xcodeproj/project.pbxproj b/storage/StorageExample.xcodeproj/project.pbxproj index 58948f61c..899fe6f61 100644 --- a/storage/StorageExample.xcodeproj/project.pbxproj +++ b/storage/StorageExample.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 55; + objectVersion = 70; objects = { /* Begin PBXBuildFile section */ @@ -36,6 +36,16 @@ EA4A29EA2E6F543800B647BC /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = EA4A29E72E6F543800B647BC /* GoogleService-Info.plist */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + EA2B4E812ED64431003F9A40 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B9A598B227E3D169003BCFD0 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B9A598B927E3D169003BCFD0; + remoteInfo = StorageExample; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ B94D0ABC27F5060C00753EEA /* StorageExample (macOS).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "StorageExample (macOS).app"; sourceTree = BUILT_PRODUCTS_DIR; }; B94D0AC227F5060D00753EEA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -51,9 +61,14 @@ B9EABE2127FB82B200E055FD /* StorageExample (tvOS).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "StorageExample (tvOS).app"; sourceTree = BUILT_PRODUCTS_DIR; }; B9EABE2727FB82B300E055FD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; B9EABE2A27FB82B300E055FD /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + EA2B4E7B2ED64431003F9A40 /* StorageExample (iOS) UITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "StorageExample (iOS) UITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; EA4A29E72E6F543800B647BC /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; /* End PBXFileReference section */ +/* Begin PBXFileSystemSynchronizedRootGroup section */ + EA2B4E7C2ED64431003F9A40 /* StorageExample (iOS) UITests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = "StorageExample (iOS) UITests"; sourceTree = ""; }; +/* End PBXFileSystemSynchronizedRootGroup section */ + /* Begin PBXFrameworksBuildPhase section */ B94D0AB927F5060C00753EEA /* Frameworks */ = { isa = PBXFrameworksBuildPhase; @@ -82,6 +97,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + EA2B4E782ED64431003F9A40 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -122,6 +144,7 @@ B9A598BC27E3D169003BCFD0 /* StorageExample (iOS) */, B94D0ABD27F5060C00753EEA /* StorageExample (macOS) */, B9EABE2227FB82B200E055FD /* StorageExample (tvOS) */, + EA2B4E7C2ED64431003F9A40 /* StorageExample (iOS) UITests */, B9A598BB27E3D169003BCFD0 /* Products */, B9EABE2F27FB82CD00E055FD /* Frameworks */, ); @@ -133,6 +156,7 @@ B9A598BA27E3D169003BCFD0 /* StorageExample (iOS).app */, B94D0ABC27F5060C00753EEA /* StorageExample (macOS).app */, B9EABE2127FB82B200E055FD /* StorageExample (tvOS).app */, + EA2B4E7B2ED64431003F9A40 /* StorageExample (iOS) UITests.xctest */, ); name = Products; sourceTree = ""; @@ -244,6 +268,29 @@ productReference = B9EABE2127FB82B200E055FD /* StorageExample (tvOS).app */; productType = "com.apple.product-type.application"; }; + EA2B4E7A2ED64431003F9A40 /* StorageExample (iOS) UITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = EA2B4E852ED64431003F9A40 /* Build configuration list for PBXNativeTarget "StorageExample (iOS) UITests" */; + buildPhases = ( + EA2B4E772ED64431003F9A40 /* Sources */, + EA2B4E782ED64431003F9A40 /* Frameworks */, + EA2B4E792ED64431003F9A40 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + EA2B4E822ED64431003F9A40 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + EA2B4E7C2ED64431003F9A40 /* StorageExample (iOS) UITests */, + ); + name = "StorageExample (iOS) UITests"; + packageProductDependencies = ( + ); + productName = "StorageExample (iOS) UITests"; + productReference = EA2B4E7B2ED64431003F9A40 /* StorageExample (iOS) UITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -251,7 +298,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1330; + LastSwiftUpdateCheck = 1640; LastUpgradeCheck = 1610; TargetAttributes = { B94D0ABB27F5060C00753EEA = { @@ -264,6 +311,10 @@ B9EABE2027FB82B200E055FD = { CreatedOnToolsVersion = 13.3; }; + EA2B4E7A2ED64431003F9A40 = { + CreatedOnToolsVersion = 16.4; + TestTargetID = B9A598B927E3D169003BCFD0; + }; }; }; buildConfigurationList = B9A598B527E3D169003BCFD0 /* Build configuration list for PBXProject "StorageExample" */; @@ -285,6 +336,7 @@ B9A598B927E3D169003BCFD0 /* StorageExample */, B94D0ABB27F5060C00753EEA /* StorageExample (macOS) */, B9EABE2027FB82B200E055FD /* StorageExample (tvOS) */, + EA2B4E7A2ED64431003F9A40 /* StorageExample (iOS) UITests */, ); }; /* End PBXProject section */ @@ -320,6 +372,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + EA2B4E792ED64431003F9A40 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -356,8 +415,23 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + EA2B4E772ED64431003F9A40 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + EA2B4E822ED64431003F9A40 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B9A598B927E3D169003BCFD0 /* StorageExample */; + targetProxy = EA2B4E812ED64431003F9A40 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ B94D0AC827F5060D00753EEA /* Debug */ = { isa = XCBuildConfiguration; @@ -652,6 +726,57 @@ }; name = Release; }; + EA2B4E832ED64431003F9A40 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.5; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 15.5; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.firebase.StorageExample--iOS--UITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + TEST_TARGET_NAME = StorageExample; + XROS_DEPLOYMENT_TARGET = 2.5; + }; + name = Debug; + }; + EA2B4E842ED64431003F9A40 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.5; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 15.5; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.firebase.StorageExample--iOS--UITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + TEST_TARGET_NAME = StorageExample; + XROS_DEPLOYMENT_TARGET = 2.5; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -691,6 +816,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + EA2B4E852ED64431003F9A40 /* Build configuration list for PBXNativeTarget "StorageExample (iOS) UITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EA2B4E832ED64431003F9A40 /* Debug */, + EA2B4E842ED64431003F9A40 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */