This commit is contained in:
2026-01-12 18:13:22 -07:00
parent 94566eabf6
commit 394789d609
17 changed files with 192 additions and 11 deletions

View File

@@ -1,6 +1,4 @@
# SwiftFormat Configuration for Ascently iOS
# Maintains consistent formatting across the project
# File options
--exclude build,Pods,DerivedData,.build

View File

@@ -92,7 +92,6 @@ identifier_name:
- DATA_JSON_FILENAME
- IMAGES_DIR_NAME
- METADATA_FILENAME
# ViewBuilder section functions (SwiftUI convention)
- StatusSection
- IconDisplaySection
- DebugSection

View File

@@ -466,7 +466,7 @@
CODE_SIGN_ENTITLEMENTS = Ascently/Ascently.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 46;
CURRENT_PROJECT_VERSION = 47;
DEVELOPMENT_TEAM = 4BC9Y2LL4B;
DRIVERKIT_DEPLOYMENT_TARGET = 24.6;
ENABLE_PREVIEWS = YES;
@@ -491,7 +491,7 @@
"@executable_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 15.6;
MARKETING_VERSION = 2.7.0;
MARKETING_VERSION = 2.7.1;
PRODUCT_BUNDLE_IDENTIFIER = com.atridad.Ascently;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -518,7 +518,7 @@
CODE_SIGN_ENTITLEMENTS = Ascently/Ascently.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 46;
CURRENT_PROJECT_VERSION = 47;
DEVELOPMENT_TEAM = 4BC9Y2LL4B;
DRIVERKIT_DEPLOYMENT_TARGET = 24.6;
ENABLE_PREVIEWS = YES;
@@ -543,7 +543,7 @@
"@executable_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 15.6;
MARKETING_VERSION = 2.7.0;
MARKETING_VERSION = 2.7.1;
PRODUCT_BUNDLE_IDENTIFIER = com.atridad.Ascently;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -610,7 +610,7 @@
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
CODE_SIGN_ENTITLEMENTS = SessionStatusLiveExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 46;
CURRENT_PROJECT_VERSION = 47;
DEVELOPMENT_TEAM = 4BC9Y2LL4B;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = SessionStatusLive/Info.plist;
@@ -622,7 +622,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.7.0;
MARKETING_VERSION = 2.7.1;
PRODUCT_BUNDLE_IDENTIFIER = com.atridad.Ascently.SessionStatusLive;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
@@ -641,7 +641,7 @@
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
CODE_SIGN_ENTITLEMENTS = SessionStatusLiveExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 46;
CURRENT_PROJECT_VERSION = 47;
DEVELOPMENT_TEAM = 4BC9Y2LL4B;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = SessionStatusLive/Info.plist;
@@ -653,7 +653,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.7.0;
MARKETING_VERSION = 2.7.1;
PRODUCT_BUNDLE_IDENTIFIER = com.atridad.Ascently.SessionStatusLive;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -0,0 +1,21 @@
{
"images": [
{
"idiom": "universal",
"filename": "AscentlyBlueBall.png",
"scale": "1x"
},
{
"idiom": "universal",
"scale": "2x"
},
{
"idiom": "universal",
"scale": "3x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -0,0 +1,21 @@
{
"images": [
{
"idiom": "universal",
"filename": "AscentlyGreenBall.png",
"scale": "1x"
},
{
"idiom": "universal",
"scale": "2x"
},
{
"idiom": "universal",
"scale": "3x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -0,0 +1,21 @@
{
"images": [
{
"idiom": "universal",
"filename": "AscentlyRedBall.png",
"scale": "1x"
},
{
"idiom": "universal",
"scale": "2x"
},
{
"idiom": "universal",
"scale": "3x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@@ -0,0 +1,21 @@
{
"images": [
{
"idiom": "universal",
"filename": "AscentlyYellowBall.png",
"scale": "1x"
},
{
"idiom": "universal",
"scale": "2x"
},
{
"idiom": "universal",
"scale": "3x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -0,0 +1,21 @@
{
"images": [
{
"idiom": "universal",
"filename": "AscetlyTriangle1.png",
"scale": "1x"
},
{
"idiom": "universal",
"scale": "2x"
},
{
"idiom": "universal",
"scale": "3x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -0,0 +1,21 @@
{
"images": [
{
"idiom": "universal",
"filename": "AscetlyTriangle2.png",
"scale": "1x"
},
{
"idiom": "universal",
"scale": "2x"
},
{
"idiom": "universal",
"scale": "3x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

View File

@@ -1,6 +1,7 @@
import HealthKit
import MusicKit
import SwiftUI
import UIKit
import UniformTypeIdentifiers
enum SheetType {
@@ -28,6 +29,8 @@ struct SettingsView: View {
AppearanceSection()
AppIconSection()
DataManagementSection(
activeSheet: $activeSheet
)
@@ -168,6 +171,61 @@ struct AppearanceSection: View {
}
}
struct AppIconSection: View {
@State private var currentIcon: String? = UIApplication.shared.alternateIconName
var body: some View {
Section("App Icon") {
Button(action: {
setIcon(nil)
}) {
HStack {
Image(systemName: "triangle.fill")
Text("Peaks")
.foregroundColor(.primary)
Spacer()
if currentIcon == nil {
Image(systemName: "checkmark")
.foregroundColor(.blue)
}
}
}
Button(action: {
setIcon("Balls")
}) {
HStack {
Image(systemName: "circle.fill")
Text("Balls")
.foregroundColor(.primary)
Spacer()
if currentIcon == "Balls" {
Image(systemName: "checkmark")
.foregroundColor(.blue)
}
}
}
}
.onAppear {
currentIcon = UIApplication.shared.alternateIconName
}
}
private func setIcon(_ name: String?) {
guard UIApplication.shared.alternateIconName != name else { return }
UIApplication.shared.setAlternateIconName(name) { error in
if let error = error {
print("Error setting icon: \(error.localizedDescription)")
} else {
DispatchQueue.main.async {
currentIcon = name
}
}
}
}
}
struct DataManagementSection: View {
@EnvironmentObject var dataManager: ClimbingDataManager
@EnvironmentObject var themeManager: ThemeManager