diff --git a/Fall-Ball-Info.plist b/Fall-Ball-Info.plist index efca9f6..b48404a 100644 --- a/Fall-Ball-Info.plist +++ b/Fall-Ball-Info.plist @@ -17,8 +17,27 @@ DirectionalGamepad - GCSupportsControllerUserInteraction - + UIApplicationSceneManifest + + UIApplicationPreferredDefaultSceneSessionRole + UIWindowSceneSessionRoleVolumetricApplication + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleVolumetricApplication + + + UISceneInitialImmersionStyle + UIImmersionStyleMixed + UISceneClassName + endlessfallerApp + UISceneConfigurationName + endlessfaller + + + + UIBackgroundModes remote-notification diff --git a/endlessfaller.xcodeproj/project.pbxproj b/endlessfaller.xcodeproj/project.pbxproj index 4e0c958..c4b66f9 100644 --- a/endlessfaller.xcodeproj/project.pbxproj +++ b/endlessfaller.xcodeproj/project.pbxproj @@ -41,7 +41,7 @@ 7A5CE0D42C0044E500F2ABD2 /* Leaderboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A5CE0D32C0044E500F2ABD2 /* Leaderboard.swift */; }; 7A5CE0D62C0044E500F2ABD2 /* AppIntent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A5CE0D52C0044E500F2ABD2 /* AppIntent.swift */; }; 7A5CE0D82C0044E600F2ABD2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7A5CE0D72C0044E600F2ABD2 /* Assets.xcassets */; }; - 7A5CE0DC2C0044E600F2ABD2 /* LeaderboardExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 7A5CE0C92C0044E500F2ABD2 /* LeaderboardExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 7A5CE0DC2C0044E600F2ABD2 /* LeaderboardExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 7A5CE0C92C0044E500F2ABD2 /* LeaderboardExtension.appex */; platformFilter = ios; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 7A675CED2B835E74001DEF29 /* BoingNotification.caf in Resources */ = {isa = PBXBuildFile; fileRef = 7A675CEB2B835BB4001DEF29 /* BoingNotification.caf */; }; 7A689B392BA7853F006D3AA5 /* LeaderboardInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A689B382BA7853F006D3AA5 /* LeaderboardInfoView.swift */; }; 7A689B3C2BA79AE1006D3AA5 /* SwizzleSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 7A689B3B2BA79AE1006D3AA5 /* SwizzleSwift */; }; @@ -726,7 +726,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1520; - LastUpgradeCheck = 1520; + LastUpgradeCheck = 1600; TargetAttributes = { 7A5CE0C82C0044E500F2ABD2 = { CreatedOnToolsVersion = 15.2; @@ -973,6 +973,7 @@ /* Begin PBXTargetDependency section */ 7A5CE0DB2C0044E600F2ABD2 /* PBXTargetDependency */ = { isa = PBXTargetDependency; + platformFilter = ios; target = 7A5CE0C82C0044E500F2ABD2 /* LeaderboardExtension */; targetProxy = 7A5CE0DA2C0044E600F2ABD2 /* PBXContainerItemProxy */; }; @@ -1011,7 +1012,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 1.9.0; DEVELOPMENT_TEAM = 3Y2Y4CJNN6; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -1026,7 +1027,7 @@ "@executable_path/../../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 1.9.0; PRODUCT_BUNDLE_IDENTIFIER = io.endlessfall.Leaderboard; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -1045,7 +1046,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 1.9.0; DEVELOPMENT_TEAM = 3Y2Y4CJNN6; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -1060,7 +1061,7 @@ "@executable_path/../../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 1.9.0; PRODUCT_BUNDLE_IDENTIFIER = io.endlessfall.Leaderboard; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -1076,6 +1077,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; @@ -1136,6 +1138,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; @@ -1188,7 +1191,6 @@ 7AD234612A5F824900ED626D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; @@ -1202,22 +1204,20 @@ ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "Fall-Ball-Info.plist"; + INFOPLIST_KEY_GCSupportsControllerUserInteraction = YES; + INFOPLIST_KEY_GCSupportsGameMode = YES; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.arcade-games"; + INFOPLIST_KEY_MetalCaptureEnabled = YES; INFOPLIST_KEY_NSCameraUsageDescription = "Fall Ball Does not use your camera"; INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "This App would like to save photo to photo library"; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; INFOPLIST_KEY_UIRequiresFullScreen = YES; - INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleDefault; + INFOPLIST_KEY_UIStatusBarStyle = ""; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UIUserInterfaceStyle = Automatic; IPHONEOS_DEPLOYMENT_TARGET = 16.0; "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphoneos*]" = 16.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; @@ -1226,21 +1226,20 @@ MARKETING_VERSION = 1.9.4; PRODUCT_BUNDLE_IDENTIFIER = io.endlessfall; PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; - SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "1,2,7"; + XROS_DEPLOYMENT_TARGET = 1.3; }; name = Debug; }; 7AD234622A5F824900ED626D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; @@ -1254,22 +1253,20 @@ ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "Fall-Ball-Info.plist"; + INFOPLIST_KEY_GCSupportsControllerUserInteraction = YES; + INFOPLIST_KEY_GCSupportsGameMode = YES; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.arcade-games"; + INFOPLIST_KEY_MetalCaptureEnabled = YES; INFOPLIST_KEY_NSCameraUsageDescription = "Fall Ball Does not use your camera"; INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "This App would like to save photo to photo library"; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; INFOPLIST_KEY_UIRequiresFullScreen = YES; - INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleDefault; + INFOPLIST_KEY_UIStatusBarStyle = ""; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UIUserInterfaceStyle = Automatic; IPHONEOS_DEPLOYMENT_TARGET = 16.0; "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphoneos*]" = 16.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; @@ -1278,21 +1275,20 @@ MARKETING_VERSION = 1.9.4; PRODUCT_BUNDLE_IDENTIFIER = io.endlessfall; PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; - SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "1,2,7"; + XROS_DEPLOYMENT_TARGET = 1.3; }; name = Release; }; 7AD234642A5F824900ED626D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -1316,7 +1312,6 @@ 7AD234652A5F824900ED626D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -1340,7 +1335,6 @@ 7AD234672A5F824900ED626D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = YES; @@ -1363,7 +1357,6 @@ 7AD234682A5F824900ED626D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = YES; @@ -1456,7 +1449,6 @@ 7AFDA5872AC1592A00D3A1F0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -1477,7 +1469,6 @@ 7AFDA5882AC1592A00D3A1F0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -1498,7 +1489,6 @@ 7AFDA58A2AC1592A00D3A1F0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -1524,7 +1514,6 @@ 7AFDA58B2AC1592A00D3A1F0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -1550,7 +1539,6 @@ 7AFDA58D2AC1592A00D3A1F0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -1575,7 +1563,6 @@ 7AFDA58E2AC1592A00D3A1F0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; @@ -1736,8 +1723,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/hexagons/SwiftFX.git"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 1.0.0; + branch = main; + kind = branch; }; }; 7AD234692A5F848700ED626D /* XCRemoteSwiftPackageReference "swiftui-vertical-tab-view" */ = { diff --git a/endlessfaller.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/endlessfaller.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/endlessfaller.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,5 @@ + + + + + diff --git a/endlessfaller.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/endlessfaller.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 86273fd..f5a96b5 100644 --- a/endlessfaller.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/endlessfaller.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,6 +1,15 @@ { "originHash" : "586a6e8889146be5e4a1ecbca217ca3fc1804d5c8ecfcd8ec19d97095c240dee", "pins" : [ + { + "identity" : "asyncgraphics", + "kind" : "remoteSourceControl", + "location" : "http://github.com/heestand-xyz/AsyncGraphics", + "state" : { + "revision" : "70f57529578b3c3c403573e9e80276ad37014736", + "version" : "2.1.0" + } + }, { "identity" : "circular-progress", "kind" : "remoteSourceControl", @@ -38,57 +47,57 @@ } }, { - "identity" : "pixelcolor", + "identity" : "multiviews", "kind" : "remoteSourceControl", - "location" : "https://github.com/heestand-xyz/PixelColor", + "location" : "https://github.com/heestand-xyz/MultiViews", "state" : { - "revision" : "cfc6181e25b1963206cb8c9d0f556adb6a625925", - "version" : "1.4.1" + "revision" : "035f67144c6a2ca6ff7ac476567d9c6df933ac34", + "version" : "2.2.3" } }, { - "identity" : "pixelkit", + "identity" : "pixelcolor", "kind" : "remoteSourceControl", - "location" : "https://github.com/heestand-xyz/PixelKit", + "location" : "https://github.com/heestand-xyz/PixelColor", "state" : { - "revision" : "1d20f0db7536ea433fecd924b5eea8e1ad3bd8f1", - "version" : "2.2.4" + "revision" : "985d12c8339bc0ae08803a0abde32c2e4696c4ce", + "version" : "2.2.2" } }, { - "identity" : "renderkit", + "identity" : "sdwebimage", "kind" : "remoteSourceControl", - "location" : "https://github.com/heestand-xyz/RenderKit", + "location" : "https://github.com/SDWebImage/SDWebImage.git", "state" : { - "revision" : "06782ee0ea9d15ded503bfc7ee7efb9db53859b1", - "version" : "1.2.3" + "revision" : "b8523c1642f3c142b06dd98443ea7c48343a4dfd", + "version" : "5.19.3" } }, { - "identity" : "resolution", + "identity" : "sdwebimageswiftui", "kind" : "remoteSourceControl", - "location" : "https://github.com/heestand-xyz/Resolution", + "location" : "https://github.com/SDWebImage/SDWebImageSwiftUI", "state" : { - "revision" : "0fdee03d7b312f075897cdac437f366cc6631d6a", - "version" : "1.0.4" + "revision" : "53573d6dd017e354c0e7d8f1c86b77ef1383c996", + "version" : "2.2.7" } }, { - "identity" : "sdwebimage", + "identity" : "spatialextensions", "kind" : "remoteSourceControl", - "location" : "https://github.com/SDWebImage/SDWebImage.git", + "location" : "https://github.com/heestand-xyz/SpatialExtensions", "state" : { "revision" : "b8523c1642f3c142b06dd98443ea7c48343a4dfd", "version" : "5.19.3" } }, { - "identity" : "sdwebimageswiftui", + "identity" : "swift-syntax", "kind" : "remoteSourceControl", - "location" : "https://github.com/SDWebImage/SDWebImageSwiftUI", + "location" : "https://github.com/apple/swift-syntax", "state" : { - "revision" : "53573d6dd017e354c0e7d8f1c86b77ef1383c996", - "version" : "2.2.7" + "revision" : "64889f0c732f210a935a0ad7cda38f77f876262d", + "version" : "509.1.1" } }, { @@ -96,8 +105,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/hexagons/SwiftFX.git", "state" : { - "revision" : "5542eae94ac014b78ab832dfd22610904d626c60", - "version" : "1.0.0" + "branch" : "main", + "revision" : "bb5c3ad68c249e2ac2f1b4428e9cc49f4c56d333" } }, { @@ -123,8 +132,17 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/heestand-xyz/TextureMap", "state" : { - "revision" : "c6845fb31a7ba5337c607faeedbeb1d3053c4a50", - "version" : "0.9.0" + "revision" : "7f26073c7dcf4e76dded9ef1cd6adf0a879e0e66", + "version" : "1.0.3" + } + }, + { + "identity" : "videoframes", + "kind" : "remoteSourceControl", + "location" : "https://github.com/heestand-xyz/VideoFrames", + "state" : { + "revision" : "3de476e958b765699eb2f98ca42336acfc262f49", + "version" : "1.1.1" } }, { diff --git a/endlessfaller.xcodeproj/project.xcworkspace/xcuserdata/nullpointersf.xcuserdatad/IDEFindNavigatorScopes.plist b/endlessfaller.xcodeproj/project.xcworkspace/xcuserdata/nullpointersf.xcuserdatad/IDEFindNavigatorScopes.plist new file mode 100644 index 0000000..5dd5da8 --- /dev/null +++ b/endlessfaller.xcodeproj/project.xcworkspace/xcuserdata/nullpointersf.xcuserdatad/IDEFindNavigatorScopes.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/endlessfaller.xcodeproj/project.xcworkspace/xcuserdata/nullpointersf.xcuserdatad/UserInterfaceState.xcuserstate b/endlessfaller.xcodeproj/project.xcworkspace/xcuserdata/nullpointersf.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..15a89f5 Binary files /dev/null and b/endlessfaller.xcodeproj/project.xcworkspace/xcuserdata/nullpointersf.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/endlessfaller.xcodeproj/project.xcworkspace/xcuserdata/nullpointersf.xcuserdatad/WorkspaceSettings.xcsettings b/endlessfaller.xcodeproj/project.xcworkspace/xcuserdata/nullpointersf.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..bbfef02 --- /dev/null +++ b/endlessfaller.xcodeproj/project.xcworkspace/xcuserdata/nullpointersf.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,14 @@ + + + + + BuildLocationStyle + UseAppPreferences + CustomBuildLocationType + RelativeToDerivedData + DerivedDataLocationStyle + Default + ShowSharedSchemesAutomaticallyEnabled + + + diff --git a/endlessfaller.xcodeproj/xcshareddata/xcschemes/Endless Fall.xcscheme b/endlessfaller.xcodeproj/xcshareddata/xcschemes/Endless Fall.xcscheme index 0ddd0b1..a22c5df 100644 --- a/endlessfaller.xcodeproj/xcshareddata/xcschemes/Endless Fall.xcscheme +++ b/endlessfaller.xcodeproj/xcshareddata/xcschemes/Endless Fall.xcscheme @@ -1,6 +1,6 @@ + + + + SchemeUserState + + Endless Fall.xcscheme_^#shared#^_ + + orderHint + 0 + + Fall Bal App Clip.xcscheme_^#shared#^_ + + orderHint + 1 + + Fall Ball.xcscheme_^#shared#^_ + + orderHint + 2 + + FallBallWatchOS Watch App.xcscheme_^#shared#^_ + + orderHint + 3 + + LeaderboardExtension.xcscheme_^#shared#^_ + + orderHint + 4 + + + + diff --git a/endlessfaller/.DS_Store b/endlessfaller/.DS_Store index 39879d7..c90c637 100644 Binary files a/endlessfaller/.DS_Store and b/endlessfaller/.DS_Store differ diff --git a/endlessfaller/Configs/AppModel.swift b/endlessfaller/Configs/AppModel.swift index 9c7edfc..f4517aa 100644 --- a/endlessfaller/Configs/AppModel.swift +++ b/endlessfaller/Configs/AppModel.swift @@ -10,11 +10,11 @@ import SwiftUI import AVFoundation import Combine import UIKit -import NotificationCenter +//import NotificationCenter let levels = 1000 -let deviceHeight = UIScreen.main.bounds.height -let deviceWidth = UIScreen.main.bounds.width +let deviceHeight = 1080.0 +let deviceWidth = 1920.0 class AppModel: ObservableObject { @Published var currentScore: Int = 0 @@ -657,7 +657,9 @@ extension View { } } +#if os(iOS) let impactHeavy = UIImpactFeedbackGenerator(style: .heavy) +#endif struct RoundedAndShadowButtonStyle3:ButtonStyle { @@ -668,7 +670,9 @@ struct RoundedAndShadowButtonStyle3:ButtonStyle { .offset(x: configuration.isPressed ? -3 : 0, y: configuration.isPressed ? 3 : 0) .animation(.easeInOut(duration: 0.1), value: configuration.isPressed) .onChange(of: configuration.isPressed) { newPressSetting in + #if os(iOS) impactHeavy.impactOccurred() + #endif } } } @@ -681,7 +685,9 @@ struct RoundedAndShadowButtonStyle6:ButtonStyle { .offset(x: configuration.isPressed ? -6 : 0, y: configuration.isPressed ? 6 : 0) .animation(.easeInOut(duration: 0.1), value: configuration.isPressed) .onChange(of: configuration.isPressed) { newPressSetting in - impactHeavy.impactOccurred() +#if os(iOS) +impactHeavy.impactOccurred() +#endif } } } @@ -694,7 +700,9 @@ struct RoundedAndShadowButtonStyle9:ButtonStyle { .offset(x: configuration.isPressed ? -9 : 0, y: configuration.isPressed ? 9 : 0) .animation(.easeInOut(duration: 0.1), value: configuration.isPressed) .onChange(of: configuration.isPressed) { newPressSetting in - impactHeavy.impactOccurred() +#if os(iOS) +impactHeavy.impactOccurred() +#endif } } } @@ -706,7 +714,9 @@ struct CharacterMenuButtonStyle:ButtonStyle { .scaleEffect(configuration.isPressed ? 0.85 : 1) .animation(.easeInOut(duration: 0.1), value: configuration.isPressed) .onChange(of: configuration.isPressed) { newPressSetting in - impactHeavy.impactOccurred() +#if os(iOS) +impactHeavy.impactOccurred() +#endif } } } @@ -1099,6 +1109,8 @@ public extension UIDevice { case "i386", "x86_64": return "Simulator \(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "tvOS"))" default: return identifier } + #else + return "Apple Vision Pro" #endif } diff --git a/endlessfaller/Configs/BallAnimationManager.swift b/endlessfaller/Configs/BallAnimationManager.swift index 2e4b2f2..b9fea02 100644 --- a/endlessfaller/Configs/BallAnimationManager.swift +++ b/endlessfaller/Configs/BallAnimationManager.swift @@ -65,9 +65,9 @@ class BallAnimationManager: ObservableObject { self.newBallSpeed = newBallSpeed startingYPosition = ballYPosition if userPersistedData.strategyModeEnabled { - endingYPosition = startingYPosition - UIScreen.main.bounds.height * ((newBallSpeed * 0.06) + 0.1) + endingYPosition = startingYPosition - FallBallDefaults.Sizes.deviceHeight.rawValue * ((newBallSpeed * 0.06) + 0.1) } else { - endingYPosition = startingYPosition - UIScreen.main.bounds.height * ((newBallSpeed * 0.06) + 0.1) + endingYPosition = startingYPosition - FallBallDefaults.Sizes.deviceHeight.rawValue * ((newBallSpeed * 0.06) + 0.1) } startTime = CACurrentMediaTime() pushUp = true @@ -84,7 +84,7 @@ class BallAnimationManager: ObservableObject { if elapsedTime < targetDuration { if pushUp { //calculate the inverse position from startingYPosition to endingYPosition. use half of screen as the number to get the percentage of. - ballYPosition = startingYPosition - ((CGFloat(elapsedTime / targetDuration) * UIScreen.main.bounds.height) / 3) + ballYPosition = startingYPosition - ((CGFloat(elapsedTime / targetDuration) * FallBallDefaults.Sizes.deviceHeight.rawValue) / 3) if ballYPosition <= endingYPosition + 90 || (self.ballYPosition < self.screenCeiling && self.userPersistedData.strategyModeEnabled == false){ // print("ball should stop pushing") if self.ballYPosition < self.screenCeiling { @@ -95,7 +95,7 @@ class BallAnimationManager: ObservableObject { startTimer(speed: newBallSpeed) } } else { - ballYPosition = endingYPosition + (CGFloat(elapsedTime / targetDuration) * (UIScreen.main.bounds.height)) + ballYPosition = endingYPosition + (CGFloat(elapsedTime / targetDuration) * (FallBallDefaults.Sizes.deviceHeight.rawValue)) } } diff --git a/endlessfaller/Configs/StoreKitManager.swift b/endlessfaller/Configs/StoreKitManager.swift index 50fc865..c9c9df8 100644 --- a/endlessfaller/Configs/StoreKitManager.swift +++ b/endlessfaller/Configs/StoreKitManager.swift @@ -126,7 +126,9 @@ class StoreKitManager: ObservableObject { return nil } //make a purchase request - optional parameters available + #if os(iOS) let result = try await product.purchase() + await MainActor.run { AppModel.sharedAppModel.grabbingBoins = true @@ -151,6 +153,9 @@ class StoreKitManager: ObservableObject { default: return nil } + #else + return nil +#endif } diff --git a/endlessfaller/Configs/products.storekit b/endlessfaller/Configs/products.storekit index 8ff1afe..ac4bf2d 100644 --- a/endlessfaller/Configs/products.storekit +++ b/endlessfaller/Configs/products.storekit @@ -173,7 +173,10 @@ "recurringSubscriptionPeriod" : "P1M", "referenceName" : "35boinssubscription", "subscriptionGroupID" : "617E892B", - "type" : "RecurringSubscription" + "type" : "RecurringSubscription", + "winbackOffers" : [ + + ] }, { "adHocOffers" : [ @@ -198,7 +201,10 @@ "recurringSubscriptionPeriod" : "P1M", "referenceName" : "75boinssubscription", "subscriptionGroupID" : "617E892B", - "type" : "RecurringSubscription" + "type" : "RecurringSubscription", + "winbackOffers" : [ + + ] }, { "adHocOffers" : [ @@ -223,7 +229,10 @@ "recurringSubscriptionPeriod" : "P1M", "referenceName" : "200boinssubscription", "subscriptionGroupID" : "617E892B", - "type" : "RecurringSubscription" + "type" : "RecurringSubscription", + "winbackOffers" : [ + + ] }, { "adHocOffers" : [ @@ -248,7 +257,10 @@ "recurringSubscriptionPeriod" : "P1M", "referenceName" : "500boinssubscription", "subscriptionGroupID" : "617E892B", - "type" : "RecurringSubscription" + "type" : "RecurringSubscription", + "winbackOffers" : [ + + ] }, { "adHocOffers" : [ @@ -273,13 +285,16 @@ "recurringSubscriptionPeriod" : "P1M", "referenceName" : "1000boinssubscription", "subscriptionGroupID" : "617E892B", - "type" : "RecurringSubscription" + "type" : "RecurringSubscription", + "winbackOffers" : [ + + ] } ] } ], "version" : { - "major" : 3, + "major" : 4, "minor" : 0 } } diff --git a/endlessfaller/Media/.DS_Store b/endlessfaller/Media/.DS_Store new file mode 100644 index 0000000..a1ff0a9 Binary files /dev/null and b/endlessfaller/Media/.DS_Store differ diff --git a/endlessfaller/Media/Assets.xcassets/.DS_Store b/endlessfaller/Media/Assets.xcassets/.DS_Store index e4c7c29..8c9e49f 100644 Binary files a/endlessfaller/Media/Assets.xcassets/.DS_Store and b/endlessfaller/Media/Assets.xcassets/.DS_Store differ diff --git a/endlessfaller/Views/AnimationsView.swift b/endlessfaller/Views/AnimationsView.swift index 308b609..ea8f968 100644 --- a/endlessfaller/Views/AnimationsView.swift +++ b/endlessfaller/Views/AnimationsView.swift @@ -345,8 +345,11 @@ struct SwiftUIXmasTree2: View { struct SnowView: UIViewRepresentable { func makeUIView(context: Context) -> some UIView { - + #if os(iOS) let screenSize = UIScreen.main.bounds + #else + let screenSize = CGSize(width: FallBallDefaults.Sizes.deviceWidth.rawValue, height: FallBallDefaults.Sizes.deviceHeight.rawValue) + #endif let view = UIView(frame: CGRect(x: 0, y: 0, width: screenSize.width, height: screenSize.height)) view.layer.masksToBounds = true @@ -413,6 +416,9 @@ struct CelebrationEffect: View { } } } + #if os(visionOS) + .frame(depth: 100) + #endif .allowsHitTesting(false) } @@ -532,9 +538,16 @@ struct SVGCharacterView: View { } } +struct FallBallDefaults { + enum Sizes: CGFloat { + case deviceHeight = 1080 + case deviceWidth = 1920 + } +} + struct ReactionsView: View { @State var showReactions = false - let deviceHeight = UIScreen.main.bounds.height + let deviceHeight = FallBallDefaults.Sizes.deviceHeight.rawValue var body: some View { VStack{ @@ -895,7 +908,9 @@ struct KeepSwiping: View { .animatedOffset(speed: 0.5) } .frame(width: 300, height: 450) - + #if os(visionOS) + .frame(depth: 75, alignment: .front) + #endif .customShadow(width: 2) .allowsHitTesting(false) } @@ -1312,7 +1327,9 @@ struct WastedView: View { } .customShadow(radius: 0.1, width: 2.1) .frame(width: 300, height: 300) -// .background(.red) +#if os(visionOS) + .frame(depth: 30, alignment: .front) +#endif .cornerRadius(60) .animatedOffset(speed: 0.1) @@ -1329,8 +1346,8 @@ struct BoinCollectedView: View { @State private var appearFromBottom = false @State private var animationEnding = false - let deviceHeight = UIScreen.main.bounds.height - let deviceWidth = UIScreen.main.bounds.width + let deviceHeight = FallBallDefaults.Sizes.deviceHeight.rawValue + let deviceWidth = FallBallDefaults.Sizes.deviceWidth.rawValue var body: some View { @@ -1377,6 +1394,9 @@ struct BoinCollectedView: View { } } } +#if os(visionOS) + .frame(depth: 50) +#endif .allowsHitTesting(false) } } @@ -1388,8 +1408,8 @@ struct DailyBoinCollectedView: View { @State private var animationEnding = false @StateObject var userPersistedData = UserPersistedData() - let deviceHeight = UIScreen.main.bounds.height - let deviceWidth = UIScreen.main.bounds.width + let deviceHeight = FallBallDefaults.Sizes.deviceHeight.rawValue + let deviceWidth = FallBallDefaults.Sizes.deviceWidth.rawValue var body: some View { diff --git a/endlessfaller/Views/CharactersMenuView.swift b/endlessfaller/Views/CharactersMenuView.swift index 11449ef..edc7119 100644 --- a/endlessfaller/Views/CharactersMenuView.swift +++ b/endlessfaller/Views/CharactersMenuView.swift @@ -7,11 +7,13 @@ import SwiftUI +#if os(iOS) let impactMed = UIImpactFeedbackGenerator(style: .heavy) +#endif struct CharactersMenuView: View { - let deviceHeight = UIScreen.main.bounds.height - let deviceWidth = UIScreen.main.bounds.width + let deviceHeight = FallBallDefaults.Sizes.deviceHeight.rawValue + let deviceWidth = FallBallDefaults.Sizes.deviceWidth.rawValue @StateObject var storeKit = StoreKitManager() @ObservedObject private var model = AppModel.sharedAppModel @@ -115,9 +117,11 @@ struct CharactersMenuView: View { } } } + #if os(iOS) .onAppear { impactMed.impactOccurred() } + #endif .sheet(isPresented: self.$showSecretShop) { SecretShopView() } diff --git a/endlessfaller/Views/ContentView.swift b/endlessfaller/Views/ContentView.swift index 0310283..396dd1c 100644 --- a/endlessfaller/Views/ContentView.swift +++ b/endlessfaller/Views/ContentView.swift @@ -28,7 +28,9 @@ struct ContentView: View { userPersistedData.resetBoinIntervalCounter() } + #if os(iOS) let heavyHaptic = UINotificationFeedbackGenerator() + #endif var body: some View { ZStack{ @@ -66,7 +68,9 @@ struct ContentView: View { .bold() .italic() .multilineTextAlignment(.center) - .frame(height: 300) +#if os(visionOS) + .frame(depth: 250) +#endif .customTextStroke(width: 2.1) .scaleEffect(1.5) @@ -105,6 +109,9 @@ struct ContentView: View { width: deviceWidth, height: deviceHeight ) +#if os(visionOS) + .frame(minDepth: 0, idealDepth: 250, maxDepth: 500, alignment: .front) +#endif .tabViewStyle(PageTabViewStyle(indexDisplayMode: .never)) .onChange(of: $appModel.currentIndex.wrappedValue) { newIndex in if newIndex == -1 { @@ -133,7 +140,9 @@ struct ContentView: View { appModel.highestLevelInRound = newIndex } appModel.FlashTriangles() + #if os(iOS) heavyHaptic.notificationOccurred(.success) + #endif if appModel.score > userPersistedData.bestScore && newIndex > 30 { appModel.showNewBestScore = true DispatchQueue.main.asyncAfter(deadline: .now() + 3) { diff --git a/endlessfaller/Views/ContinuePlayingView.swift b/endlessfaller/Views/ContinuePlayingView.swift index d087da6..85c2ed6 100644 --- a/endlessfaller/Views/ContinuePlayingView.swift +++ b/endlessfaller/Views/ContinuePlayingView.swift @@ -13,8 +13,8 @@ struct ContinuePlayingView: View { @State private var circleProgress: CGFloat = 0.0 @State var buttonIsPressed = false @StateObject var userPersistedData = UserPersistedData() - let deviceHeight = UIScreen.main.bounds.height - let deviceWidth = UIScreen.main.bounds.width + let deviceHeight = FallBallDefaults.Sizes.deviceHeight + let deviceWidth = FallBallDefaults.Sizes.deviceWidth var body: some View { VStack{ @@ -136,6 +136,9 @@ struct ContinuePlayingView: View { .animatedOffset(speed: 1) .customShadow(width: 1) .scaleEffect(1.2) +#if os(visionOS) + .frame(depth: 100) +#endif } .offset(y: UIDevice.isOldDevice ? 60 : 90) .scaleEffect(UIDevice.isOldDevice ? 0.7 : 1) diff --git a/endlessfaller/Views/CurrencyPageView.swift b/endlessfaller/Views/CurrencyPageView.swift index e0672cb..be16955 100644 --- a/endlessfaller/Views/CurrencyPageView.swift +++ b/endlessfaller/Views/CurrencyPageView.swift @@ -157,7 +157,9 @@ struct CurrencyPageView: View { .buttonStyle(.roundedAndShadow9) } Button{ + #if os(iOS) impactHeavy.impactOccurred() + #endif showManageSubscriptions = true } label: { Text("Subscriptions 📆") diff --git a/endlessfaller/Views/GameCenterLeaderboardView.swift b/endlessfaller/Views/GameCenterLeaderboardView.swift index 83e3f75..b86c9a3 100644 --- a/endlessfaller/Views/GameCenterLeaderboardView.swift +++ b/endlessfaller/Views/GameCenterLeaderboardView.swift @@ -615,7 +615,9 @@ struct GameCenterLeaderboardView: View { } } .onAppear{ + #if os(iOS) impactHeavy.impactOccurred() + #endif gameCenter.authenticateUser() Task{ await gameCenter.loadLeaderboard() diff --git a/endlessfaller/Views/GameOverScreenView.swift b/endlessfaller/Views/GameOverScreenView.swift index 60331d2..b2f2043 100644 --- a/endlessfaller/Views/GameOverScreenView.swift +++ b/endlessfaller/Views/GameOverScreenView.swift @@ -11,8 +11,8 @@ struct GameOverScreenView: View { @ObservedObject private var appModel = AppModel.sharedAppModel @StateObject var audioController = AudioManager.sharedAudioManager @State var showPlaqueShare = false - let deviceHeight = UIScreen.main.bounds.height - let deviceWidth = UIScreen.main.bounds.width + let deviceHeight = FallBallDefaults.Sizes.deviceHeight.rawValue + let deviceWidth = FallBallDefaults.Sizes.deviceWidth.rawValue private var idiom : UIUserInterfaceIdiom { UIDevice.current.userInterfaceIdiom } @StateObject var userPersistedData = UserPersistedData() @@ -27,8 +27,11 @@ struct GameOverScreenView: View { .italic() .bold() .font(idiom == .pad ? .largeTitle : .system(size: deviceWidth * 0.08)) - .scaleEffect(1.8) .padding(.bottom, deviceHeight * 0.04) + .scaledToFit() + #if os(visionOS) + .frame(depth: 15) + #endif .allowsHitTesting(false) Button { showPlaqueShare = true @@ -88,17 +91,19 @@ struct GameOverScreenView: View { .frame(maxHeight: 10) } .padding(.trailing, 30) - .padding() + .scaledToFit() +#if os(visionOS) + .frame(depth: 50) +#endif .font(.title) } ZStack{ AnyView(character!.character) - .scaleEffect(1.5) if userPersistedData.selectedHat != "nohat" { AnyView(hat!.hat) } } - .scaleEffect(1.5) + .scaledToFit() .offset(x: -70, y: userPersistedData.selectedHat == "nohat" ? 18 : 30) } .background{ @@ -121,7 +126,6 @@ struct GameOverScreenView: View { .bold() .font(.title2) .padding(15) - .padding(.horizontal, 12) Spacer() } } @@ -137,15 +141,20 @@ struct GameOverScreenView: View { .italic() .multilineTextAlignment(.center) .padding(.bottom) + .lineLimit(2, reservesSpace: true) Image(systemName: "arrow.up") - //.shadow(color: .black, radius: 3) + .frame(width: 64, height: 64) } .bold() .font(idiom == .pad ? .largeTitle : .system(size: deviceWidth * 0.1)) + } - + .scaledToFit() + .offset(y: -60) +#if os(visionOS) + .frame(depth: 75) +#endif .animatedOffset(speed: 1) - .frame(height: 300) .customTextStroke(width: 2.7) Spacer() } diff --git a/endlessfaller/Views/HomeButtonsView.swift b/endlessfaller/Views/HomeButtonsView.swift index e90c00e..da55145 100644 --- a/endlessfaller/Views/HomeButtonsView.swift +++ b/endlessfaller/Views/HomeButtonsView.swift @@ -9,7 +9,9 @@ import SwiftUI import GroupActivities import GameKit +#if os(iOS) let hapticGenerator = UINotificationFeedbackGenerator() +#endif struct HomeButtonsView: View { @StateObject var groupStateObserver = GroupStateObserver() @@ -38,7 +40,9 @@ struct HomeButtonsView: View { .background(.white.opacity( showGameMode ? 0.6 : 0)) .background(.gray.opacity( isGearExpanded ? 0.0001 : 0)) .onTapGesture { + #if os(iOS) impactHeavy.impactOccurred() + #endif withAnimation { showGameMode = false isGearExpanded = false @@ -216,6 +220,9 @@ struct HomeButtonsView: View { .cornerRadius(30) .frame(width: 300, height: 300) + #if os(visionOS) + .frame(depth: 25) + #endif .customTextStroke(width: 3) } } @@ -238,7 +245,10 @@ struct HomeButtonsView: View { } } .onChange(of: self.userPersistedData.strategyModeEnabled){ newValue in + + #if os(iOS) impactHeavy.impactOccurred() + #endif if newValue { withAnimation(){ whiteCircleOffset = 30 diff --git a/endlessfaller/Views/PlayingBallView.swift b/endlessfaller/Views/PlayingBallView.swift index 0506d83..eb136f3 100644 --- a/endlessfaller/Views/PlayingBallView.swift +++ b/endlessfaller/Views/PlayingBallView.swift @@ -7,6 +7,7 @@ import SwiftUI import Vortex +import Spatial struct PlayingBallView: View { @ObservedObject private var appModel = AppModel.sharedAppModel @@ -82,10 +83,13 @@ struct PlayingBallView: View { } .frame(width: 180, height: 120) .opacity(appModel.ballIsStrobing ? 0 : 1) - .scaleEffect(appModel.ballIsStrobing ? 2.1 : 1.5) .animation(.linear(duration: 0.1).repeatForever(autoreverses: true), value: appModel.ballIsStrobing) } .position(x: deviceWidth / 2, y: self.BallAnimator.ballYPosition) + #if os(visionOS) + .frame(depth: 50, alignment: .center) + .transform3DEffect(.init().translated(by: .forward * 50)) + #endif .allowsHitTesting(false) } } diff --git a/endlessfaller/Views/RandomGradientView.swift b/endlessfaller/Views/RandomGradientView.swift index 32979e0..692d961 100644 --- a/endlessfaller/Views/RandomGradientView.swift +++ b/endlessfaller/Views/RandomGradientView.swift @@ -6,11 +6,33 @@ // import SwiftUI +import CoreImage +import CoreImage.CIFilterBuiltins +import RealityKit struct RandomGradientView: View { // Define a state for the gradient to trigger updates @State private var gradient: LinearGradient = LinearGradient(gradient: Gradient(colors: backgroundColors.randomElement(randomCount: 3).map { Color(hex: $0)! }), startPoint: UnitPoint(x: 0, y: 0), endPoint: UnitPoint(x: 1, y: 1)) + private var texture: TextureResource? { + let smoothLinearGradient = CIFilter.smoothLinearGradient() + smoothLinearGradient.point0 = CGPoint(x: 0, y: 0) + smoothLinearGradient.point1 = CGPoint(x: 1, y: 1) +// smoothLinearGradient.color0 = gradient.gradient.stops.first?.color.sec +// smoothLinearGradient.color1 = CIColor(red: 216/255, green: 232/255, blue: 146/255) + guard let image = smoothLinearGradient.outputImage?.cgImage! else { + return nil + } + if #available(visionOS 2.0, *), #available(iOS 18, *) { + return try? TextureResource(image: image, options: .init(semantic: .color)) + } else { + // Fallback on earlier versions + return nil + } + } + + + // Timer to change the gradient periodically let timer = Timer.publish(every: 3, on: .main, in: .common).autoconnect() diff --git a/endlessfaller/Views/SubscriptionOptions.swift b/endlessfaller/Views/SubscriptionOptions.swift index 2e5c0b5..fa8c2cf 100644 --- a/endlessfaller/Views/SubscriptionOptions.swift +++ b/endlessfaller/Views/SubscriptionOptions.swift @@ -98,7 +98,9 @@ struct SubscriptionOptions: View { } .buttonStyle(.roundedAndShadow9) Button{ + #if os(iOS) impactHeavy.impactOccurred() + #endif isProcessingPurchase = true Task { await buyBoins(bundle: bundle) diff --git a/endlessfaller/endlessfallerApp.swift b/endlessfaller/endlessfallerApp.swift index 6feb7fe..f1c6ce8 100644 --- a/endlessfaller/endlessfallerApp.swift +++ b/endlessfaller/endlessfallerApp.swift @@ -10,11 +10,23 @@ import SwiftUI @main struct endlessfallerApp: App { var body: some Scene { - WindowGroup { +#if os(visionOS) + if #available(visionOS 2.0, *) { + return WindowGroup { + ContentView() + .environment(\.sizeCategory, .medium) + } + .volumeWorldAlignment(.gravityAligned) + .windowStyle(.volumetric) + } +#endif + return WindowGroup { ContentView() -// .preferredColorScheme(.light) .environment(\.sizeCategory, .medium) -// .defersSystemGestures(on: .bottom) +#if os(iOS) + .defersSystemGestures(on: .bottom) +#endif } } } +