Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.
Open
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
4 changes: 2 additions & 2 deletions Config/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION_LONG = 1.0.0.11
VERSION_SHORT = 1.0
VERSION_LONG = 1.0.1.3
VERSION_SHORT = 1.0.1
3 changes: 0 additions & 3 deletions GravatarApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 14.6;
MARKETING_VERSION = 1.0.0;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Gravatar iOS Development";
Expand Down Expand Up @@ -451,7 +450,6 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 14.6;
MARKETING_VERSION = 1.0.0;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.gravatar.GravatarApp";
Expand Down Expand Up @@ -590,7 +588,6 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 14.6;
MARKETING_VERSION = 1.0.0;
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
SDKROOT = auto;
Expand Down
6 changes: 4 additions & 2 deletions GravatarApp/CommonViews/MainMenu/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ struct AboutView: View {

private let textColor = Color.primary.opacity(0.6)
private let notificationCenter: NotificationCenter
private let bundle: Bundle

init(notificationCenter: NotificationCenter = .default) {
init(notificationCenter: NotificationCenter = .default, bundle: Bundle = .main) {
self.notificationCenter = notificationCenter
self.bundle = bundle
}

var body: some View {
Expand Down Expand Up @@ -141,7 +143,7 @@ struct AboutView: View {
}

func getAppVersion() -> String {
if let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
if let appVersion = bundle.infoDictionary?["CFBundleShortVersionString"] as? String {
return appVersion
}
return "?"
Expand Down
15 changes: 14 additions & 1 deletion GravatarAppTests/ModalsTests/AboutModalTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,27 @@ import SnapshotTesting
import SwiftUI
import Testing

// Mock Bundle for testing that provides consistent version info
class MockBundle: Bundle {
override var infoDictionary: [String: Any]? {
[
"CFBundleShortVersionString": "1.0.0",
]
}
}

@Suite(.snapshots(record: .failed, diffTool: .ksdiff))
@MainActor
struct AboutModalTests {
@Test()
func AboutModal() async throws {
let modalManager = ModalPresentationManager()

// Create a mock bundle with version info for testing
let mockBundle = MockBundle()

modalManager.present {
AboutView()
AboutView(bundle: mockBundle)
.environment(\.analytics, Analytics.test)
}

Expand Down