diff --git a/BusinessCard.xcodeproj/project.pbxproj b/BusinessCard.xcodeproj/project.pbxproj index 6aed681..2f93e79 100644 --- a/BusinessCard.xcodeproj/project.pbxproj +++ b/BusinessCard.xcodeproj/project.pbxproj @@ -81,9 +81,19 @@ /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + EA69EC522F3D5DDB00592220 /* Exceptions for "BusinessCardWatch Watch App" folder in "BusinessCardWatch Watch App" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Configuration/Watch.xcconfig, + ); + target = EA837F972F11B16400077F87 /* BusinessCardWatch Watch App */; + }; EA837E5C2F106CB500077F87 /* Exceptions for "BusinessCard" folder in "BusinessCard" target */ = { isa = PBXFileSystemSynchronizedBuildFileExceptionSet; membershipExceptions = ( + Configuration/Base.xcconfig, + Configuration/Debug.xcconfig, + Configuration/Release.xcconfig, Info.plist, ); target = EA8379222F105F2600077F87 /* BusinessCard */; @@ -91,6 +101,7 @@ EACLIP0012F20000000000E /* Exceptions for "BusinessCardClip" folder in "BusinessCardClip" target */ = { isa = PBXFileSystemSynchronizedBuildFileExceptionSet; membershipExceptions = ( + Configuration/Clip.xcconfig, Info.plist, ); target = EACLIP0012F200000000004 /* BusinessCardClip */; @@ -118,6 +129,9 @@ }; EA837F992F11B16400077F87 /* BusinessCardWatch Watch App */ = { isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + EA69EC522F3D5DDB00592220 /* Exceptions for "BusinessCardWatch Watch App" folder in "BusinessCardWatch Watch App" target */, + ); path = "BusinessCardWatch Watch App"; sourceTree = ""; }; @@ -345,7 +359,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 2600; - LastUpgradeCheck = 2600; + LastUpgradeCheck = 2630; TargetAttributes = { EA8379222F105F2600077F87 = { CreatedOnToolsVersion = 26.0; @@ -500,6 +514,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; @@ -554,6 +569,7 @@ MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; @@ -565,6 +581,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; @@ -612,6 +629,7 @@ MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; + STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_COMPILATION_MODE = wholemodule; VALIDATE_PRODUCT = YES; }; @@ -637,7 +655,8 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_BackgroundColor = LaunchBackground; INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -674,7 +693,8 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_BackgroundColor = LaunchBackground; INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -851,7 +871,7 @@ CODE_SIGN_ENTITLEMENTS = BusinessCardClip/BusinessCardClip.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = "$(DEVELOPMENT_TEAM)"; + DEVELOPMENT_TEAM = 6R7KLBPBLZ; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = BusinessCardClip/Info.plist; @@ -860,7 +880,8 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_BackgroundColor = LaunchBackground; INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; IPHONEOS_DEPLOYMENT_TARGET = 26.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -889,7 +910,7 @@ CODE_SIGN_ENTITLEMENTS = BusinessCardClip/BusinessCardClip.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = "$(DEVELOPMENT_TEAM)"; + DEVELOPMENT_TEAM = 6R7KLBPBLZ; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = BusinessCardClip/Info.plist; @@ -898,7 +919,8 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_BackgroundColor = LaunchBackground; INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; IPHONEOS_DEPLOYMENT_TARGET = 26.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/BusinessCard.xcodeproj/xcuserdata/mattbruce.xcuserdatad/xcschemes/xcschememanagement.plist b/BusinessCard.xcodeproj/xcuserdata/mattbruce.xcuserdatad/xcschemes/xcschememanagement.plist index cfbae5b..f828abe 100644 --- a/BusinessCard.xcodeproj/xcuserdata/mattbruce.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/BusinessCard.xcodeproj/xcuserdata/mattbruce.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,12 +7,12 @@ BusinessCard.xcscheme_^#shared#^_ orderHint - 1 + 3 BusinessCardClip.xcscheme_^#shared#^_ orderHint - 3 + 1 BusinessCardWatch Watch App.xcscheme_^#shared#^_ diff --git a/BusinessCard/BusinessCardApp.swift b/BusinessCard/BusinessCardApp.swift index ec07d5f..82df317 100644 --- a/BusinessCard/BusinessCardApp.swift +++ b/BusinessCard/BusinessCardApp.swift @@ -1,5 +1,6 @@ import SwiftUI import SwiftData +import AppIntents import Bedrock @main diff --git a/BusinessCard/Design/DesignConstants.swift b/BusinessCard/Design/DesignConstants.swift index 786e23c..5414597 100644 --- a/BusinessCard/Design/DesignConstants.swift +++ b/BusinessCard/Design/DesignConstants.swift @@ -6,6 +6,7 @@ // import SwiftUI +import UIKit import Bedrock // MARK: - Device Size Tier @@ -20,7 +21,10 @@ enum DeviceSizeTier { /// The current device's size tier based on screen dimensions. static var current: DeviceSizeTier { - let bounds = UIScreen.main.bounds + let bounds = UIApplication.shared.connectedScenes + .compactMap { $0 as? UIWindowScene } + .first?.screen.bounds + ?? CGRect(x: 0, y: 0, width: 390, height: 844) let height = max(bounds.width, bounds.height) let width = min(bounds.width, bounds.height) diff --git a/BusinessCard/Resources/Localizable.xcstrings b/BusinessCard/Resources/Localizable.xcstrings index c3fa779..016d08e 100644 --- a/BusinessCard/Resources/Localizable.xcstrings +++ b/BusinessCard/Resources/Localizable.xcstrings @@ -801,10 +801,6 @@ } } }, - "Show first-run onboarding again on next app launch" : { - "comment" : "A description of the reset onboarding feature.", - "isCommentAutoGenerated" : true - }, "Social Media" : { }, diff --git a/BusinessCard/Views/Features/Onboarding/OnboardingView.swift b/BusinessCard/Views/Features/Onboarding/OnboardingView.swift index 96cf160..ebd95a9 100644 --- a/BusinessCard/Views/Features/Onboarding/OnboardingView.swift +++ b/BusinessCard/Views/Features/Onboarding/OnboardingView.swift @@ -221,6 +221,8 @@ struct OnboardingView: View { switch status { case .authorized: .allowed + case .limited: + .allowed case .notDetermined: .notRequested case .denied, .restricted: diff --git a/BusinessCard/Views/Features/Share/QRScannerViewController.swift b/BusinessCard/Views/Features/Share/QRScannerViewController.swift index 93a246c..d5993bf 100644 --- a/BusinessCard/Views/Features/Share/QRScannerViewController.swift +++ b/BusinessCard/Views/Features/Share/QRScannerViewController.swift @@ -58,18 +58,12 @@ final class QRScannerViewController: UIViewController, AVCaptureMetadataOutputOb private func startScanning() { guard let session = captureSession, !session.isRunning else { return } - let capturedSession = session - DispatchQueue.global(qos: .userInitiated).async { - capturedSession.startRunning() - } + session.startRunning() } private func stopScanning() { guard let session = captureSession, session.isRunning else { return } - let capturedSession = session - DispatchQueue.global(qos: .userInitiated).async { - capturedSession.stopRunning() - } + session.stopRunning() } func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) { diff --git a/BusinessCardClip/Assets.xcassets/AppIcon.appiconset/AppIcon.png b/BusinessCardClip/Assets.xcassets/AppIcon.appiconset/AppIcon.png new file mode 100644 index 0000000..70a2778 Binary files /dev/null and b/BusinessCardClip/Assets.xcassets/AppIcon.appiconset/AppIcon.png differ diff --git a/BusinessCardClip/Assets.xcassets/AppIcon.appiconset/Contents.json b/BusinessCardClip/Assets.xcassets/AppIcon.appiconset/Contents.json index 13613e3..cefcc87 100644 --- a/BusinessCardClip/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/BusinessCardClip/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,6 +1,7 @@ { "images" : [ { + "filename" : "AppIcon.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/BusinessCardClip/BusinessCardClip.entitlements b/BusinessCardClip/BusinessCardClip.entitlements index e23bfd2..95f1007 100644 --- a/BusinessCardClip/BusinessCardClip.entitlements +++ b/BusinessCardClip/BusinessCardClip.entitlements @@ -12,11 +12,11 @@ com.apple.developer.icloud-services - CloudKit + CloudKit-Anonymous com.apple.developer.parent-application-identifiers - $(AppIdentifierPrefix)$(APP_BUNDLE_IDENTIFIER) + $(AppIdentifierPrefix)com.mbrucedogs.BusinessCard diff --git a/BusinessCardClip/BusinessCardClipApp.swift b/BusinessCardClip/BusinessCardClipApp.swift index 13993f7..1ef2fda 100644 --- a/BusinessCardClip/BusinessCardClipApp.swift +++ b/BusinessCardClip/BusinessCardClipApp.swift @@ -1,14 +1,18 @@ import SwiftUI +import AppIntents @main struct BusinessCardClipApp: App { @State private var recordName: String? @State private var launchErrorMessage: String? + #if DEBUG @State private var debugState: ClipDebugState? + #endif var body: some Scene { WindowGroup { Group { + #if DEBUG if let debugState { ClipDebugHarnessView(initialState: debugState) } else if let recordName { @@ -20,6 +24,17 @@ struct BusinessCardClipApp: App { } else { ClipLoadingView() } + #else + if let recordName { + ClipRootView(recordName: recordName) + } else if let launchErrorMessage { + ClipErrorView(message: launchErrorMessage) { + self.launchErrorMessage = nil + } + } else { + ClipLoadingView() + } + #endif } .onContinueUserActivity(NSUserActivityTypeBrowsingWeb) { activity in handleUserActivity(activity) diff --git a/BusinessCardWatch Watch App/Assets.xcassets/AccentColor.colorset/Contents.json b/BusinessCardWatch Watch App/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/BusinessCardWatch Watch App/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/BusinessCardWatch Watch App/Assets.xcassets/AppIcon.appiconset/AppIcon.png b/BusinessCardWatch Watch App/Assets.xcassets/AppIcon.appiconset/AppIcon.png new file mode 100644 index 0000000..70a2778 Binary files /dev/null and b/BusinessCardWatch Watch App/Assets.xcassets/AppIcon.appiconset/AppIcon.png differ diff --git a/BusinessCardWatch Watch App/Assets.xcassets/AppIcon.appiconset/Contents.json b/BusinessCardWatch Watch App/Assets.xcassets/AppIcon.appiconset/Contents.json index bb0321f..74cc725 100644 --- a/BusinessCardWatch Watch App/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/BusinessCardWatch Watch App/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,7 +1,8 @@ { "images" : [ { - "idiom" : "watch", + "filename" : "AppIcon.png", + "idiom" : "universal", "platform" : "watchos", "size" : "1024x1024" } diff --git a/BusinessCardWatch Watch App/BusinessCardWatchApp.swift b/BusinessCardWatch Watch App/BusinessCardWatchApp.swift index 155c8e4..1edc730 100644 --- a/BusinessCardWatch Watch App/BusinessCardWatchApp.swift +++ b/BusinessCardWatch Watch App/BusinessCardWatchApp.swift @@ -1,4 +1,5 @@ import SwiftUI +import AppIntents @main struct BusinessCardWatchApp: App {