diff --git a/Arc Mini.xcodeproj/project.pbxproj b/Arc Mini.xcodeproj/project.pbxproj index 569659e..f94194a 100644 --- a/Arc Mini.xcodeproj/project.pbxproj +++ b/Arc Mini.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 09C227A470BFD8839C9491BB /* Pods_Arc_Mini.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49BFAF13CA1E780FC2651251 /* Pods_Arc_Mini.framework */; }; + AD1E3112F2FD3C6C4B8E8F75 /* Pods_RecordersWidgetExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9162A14B29BDED2585FC47B5 /* Pods_RecordersWidgetExtension.framework */; }; C90C27372439DCCC00A36251 /* NavBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = C90C27362439DCCC00A36251 /* NavBar.swift */; }; C90D78542428FBA2004ABFD0 /* PathEditView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C90D78532428FBA2004ABFD0 /* PathEditView.swift */; }; C90D78682428FFCE004ABFD0 /* PlaceCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = C90D78632428FFCE004ABFD0 /* PlaceCache.swift */; }; @@ -73,6 +74,12 @@ C9B86B88242CAD8900D52C0D /* ArcError.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9B86B87242CAD8900D52C0D /* ArcError.swift */; }; C9BF95372446F959000F3299 /* Config.plist in Resources */ = {isa = PBXBuildFile; fileRef = C9BF95362446F959000F3299 /* Config.plist */; }; C9BF9539244744CC000F3299 /* DeleteVisitAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9BF9538244744CC000F3299 /* DeleteVisitAlert.swift */; }; + C9C045C824A891B300C1A99C /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9C045C724A891B300C1A99C /* WidgetKit.framework */; }; + C9C045CA24A891B300C1A99C /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9C045C924A891B300C1A99C /* SwiftUI.framework */; }; + C9C045CD24A891B300C1A99C /* RecordersWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9C045CC24A891B300C1A99C /* RecordersWidget.swift */; }; + C9C045CF24A891B500C1A99C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C9C045CE24A891B500C1A99C /* Assets.xcassets */; }; + C9C045D324A891B500C1A99C /* RecordersWidgetExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = C9C045C624A891B300C1A99C /* RecordersWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + C9C045DA24A89CAA00C1A99C /* WidgetState.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9C045D924A89CAA00C1A99C /* WidgetState.swift */; }; C9C5C009242FB2C700BC064E /* MapState.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9C5C008242FB2C700BC064E /* MapState.swift */; }; C9C6FBF2243333D3004F868C /* TimelineState.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9C6FBF1243333D3004F868C /* TimelineState.swift */; }; C9C827AD243C7B1E00F3199B /* Calendar+extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9C827AC243C7B1E00F3199B /* Calendar+extensions.swift */; }; @@ -92,9 +99,36 @@ C9F98B77242FAB38003D2A23 /* ItemSegmentsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9F98B76242FAB38003D2A23 /* ItemSegmentsView.swift */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + C9C045D124A891B500C1A99C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C9822A77240CF8D5006B70F4 /* Project object */; + proxyType = 1; + remoteGlobalIDString = C9C045C524A891B300C1A99C; + remoteInfo = RecordersWidgetExtension; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + C9C045D424A891B500C1A99C /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + C9C045D324A891B500C1A99C /* RecordersWidgetExtension.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ + 20E416AF0980D8060B59267C /* Pods-RecordersWidgetExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RecordersWidgetExtension.debug.xcconfig"; path = "Target Support Files/Pods-RecordersWidgetExtension/Pods-RecordersWidgetExtension.debug.xcconfig"; sourceTree = ""; }; 49BFAF13CA1E780FC2651251 /* Pods_Arc_Mini.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Arc_Mini.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 85A052185CDD9B73636FE978 /* Pods-Arc Mini.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Arc Mini.debug.xcconfig"; path = "Target Support Files/Pods-Arc Mini/Pods-Arc Mini.debug.xcconfig"; sourceTree = ""; }; + 90D296A8D1D889A0FBBEF51E /* Pods-RecordersWidgetExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RecordersWidgetExtension.release.xcconfig"; path = "Target Support Files/Pods-RecordersWidgetExtension/Pods-RecordersWidgetExtension.release.xcconfig"; sourceTree = ""; }; + 9162A14B29BDED2585FC47B5 /* Pods_RecordersWidgetExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RecordersWidgetExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C90C27362439DCCC00A36251 /* NavBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavBar.swift; sourceTree = ""; }; C90D78532428FBA2004ABFD0 /* PathEditView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PathEditView.swift; sourceTree = ""; }; C90D78632428FFCE004ABFD0 /* PlaceCache.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlaceCache.swift; sourceTree = ""; }; @@ -136,6 +170,7 @@ C969D1DD245199B600874305 /* ArcAnnotation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArcAnnotation.swift; sourceTree = ""; }; C96E00B72449B3AD00A3635F /* TasksManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TasksManager.swift; sourceTree = ""; }; C970732C243889D400E3B938 /* LocoKit+extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LocoKit+extensions.swift"; sourceTree = ""; }; + C977E57324AB600700B2F0BA /* RecordersWidgetExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RecordersWidgetExtension.entitlements; sourceTree = ""; }; C97C193B2432164700FC45A1 /* ItemSegmentEditView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemSegmentEditView.swift; sourceTree = ""; }; C97DCDEA242395C3006437B7 /* ItemDetailsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemDetailsView.swift; sourceTree = ""; }; C9822A7F240CF8D5006B70F4 /* Arc Mini.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Arc Mini.app"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -162,6 +197,13 @@ C9B86B87242CAD8900D52C0D /* ArcError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArcError.swift; sourceTree = ""; }; C9BF95362446F959000F3299 /* Config.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Config.plist; sourceTree = ""; }; C9BF9538244744CC000F3299 /* DeleteVisitAlert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteVisitAlert.swift; sourceTree = ""; }; + C9C045C624A891B300C1A99C /* RecordersWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = RecordersWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + C9C045C724A891B300C1A99C /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; + C9C045C924A891B300C1A99C /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; + C9C045CC24A891B300C1A99C /* RecordersWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecordersWidget.swift; sourceTree = ""; }; + C9C045CE24A891B500C1A99C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + C9C045D024A891B500C1A99C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C9C045D924A89CAA00C1A99C /* WidgetState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetState.swift; sourceTree = ""; }; C9C5C008242FB2C700BC064E /* MapState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapState.swift; sourceTree = ""; }; C9C6FBF1243333D3004F868C /* TimelineState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineState.swift; sourceTree = ""; }; C9C827AC243C7B1E00F3199B /* Calendar+extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Calendar+extensions.swift"; sourceTree = ""; }; @@ -196,6 +238,16 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + C9C045C324A891B300C1A99C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C9C045CA24A891B300C1A99C /* SwiftUI.framework in Frameworks */, + C9C045C824A891B300C1A99C /* WidgetKit.framework in Frameworks */, + AD1E3112F2FD3C6C4B8E8F75 /* Pods_RecordersWidgetExtension.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -205,6 +257,9 @@ C9F32F49242A60A100184862 /* HealthKit.framework */, C953392624126E250005E98F /* MapKit.framework */, 49BFAF13CA1E780FC2651251 /* Pods_Arc_Mini.framework */, + C9C045C724A891B300C1A99C /* WidgetKit.framework */, + C9C045C924A891B300C1A99C /* SwiftUI.framework */, + 9162A14B29BDED2585FC47B5 /* Pods_RecordersWidgetExtension.framework */, ); name = Frameworks; sourceTree = ""; @@ -214,6 +269,8 @@ children = ( 85A052185CDD9B73636FE978 /* Pods-Arc Mini.debug.xcconfig */, E9A51D53A86269BDF7C3EB1A /* Pods-Arc Mini.release.xcconfig */, + 20E416AF0980D8060B59267C /* Pods-RecordersWidgetExtension.debug.xcconfig */, + 90D296A8D1D889A0FBBEF51E /* Pods-RecordersWidgetExtension.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -358,7 +415,9 @@ C9822A76240CF8D5006B70F4 = { isa = PBXGroup; children = ( + C977E57324AB600700B2F0BA /* RecordersWidgetExtension.entitlements */, C9822A81240CF8D5006B70F4 /* Arc Mini */, + C9C045CB24A891B300C1A99C /* RecordersWidget */, C9822A80240CF8D5006B70F4 /* Products */, B22ED509648B34F49EC36016 /* Pods */, 0309A64F2B5F60D9E14F1F4E /* Frameworks */, @@ -369,6 +428,7 @@ isa = PBXGroup; children = ( C9822A7F240CF8D5006B70F4 /* Arc Mini.app */, + C9C045C624A891B300C1A99C /* RecordersWidgetExtension.appex */, ); name = Products; sourceTree = ""; @@ -411,6 +471,17 @@ path = Foursquare; sourceTree = ""; }; + C9C045CB24A891B300C1A99C /* RecordersWidget */ = { + isa = PBXGroup; + children = ( + C9C045CC24A891B300C1A99C /* RecordersWidget.swift */, + C9C045D924A89CAA00C1A99C /* WidgetState.swift */, + C9C045CE24A891B500C1A99C /* Assets.xcassets */, + C9C045D024A891B500C1A99C /* Info.plist */, + ); + path = RecordersWidget; + sourceTree = ""; + }; C9C6FBF3243333D9004F868C /* View Models */ = { isa = PBXGroup; children = ( @@ -477,10 +548,12 @@ C9822A7C240CF8D5006B70F4 /* Frameworks */, C9822A7D240CF8D5006B70F4 /* Resources */, 8D8C8963E71905193BAF6937 /* [CP] Embed Pods Frameworks */, + C9C045D424A891B500C1A99C /* Embed App Extensions */, ); buildRules = ( ); dependencies = ( + C9C045D224A891B500C1A99C /* PBXTargetDependency */, ); name = "Arc Mini"; packageProductDependencies = ( @@ -495,6 +568,24 @@ productReference = C9822A7F240CF8D5006B70F4 /* Arc Mini.app */; productType = "com.apple.product-type.application"; }; + C9C045C524A891B300C1A99C /* RecordersWidgetExtension */ = { + isa = PBXNativeTarget; + buildConfigurationList = C9C045D724A891B500C1A99C /* Build configuration list for PBXNativeTarget "RecordersWidgetExtension" */; + buildPhases = ( + D2677A903AFD0C2CCD2A8613 /* [CP] Check Pods Manifest.lock */, + C9C045C224A891B300C1A99C /* Sources */, + C9C045C324A891B300C1A99C /* Frameworks */, + C9C045C424A891B300C1A99C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RecordersWidgetExtension; + productName = RecordersWidgetExtension; + productReference = C9C045C624A891B300C1A99C /* RecordersWidgetExtension.appex */; + productType = "com.apple.product-type.app-extension"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -505,13 +596,13 @@ LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Matt Greenfield"; TargetAttributes = { - C9661A1524A7753E0045CF53 = { - CreatedOnToolsVersion = 12.0; - }; C9822A7E240CF8D5006B70F4 = { CreatedOnToolsVersion = 11.3.1; LastSwiftMigration = 1140; }; + C9C045C524A891B300C1A99C = { + CreatedOnToolsVersion = 12.0; + }; }; }; buildConfigurationList = C9822A7A240CF8D5006B70F4 /* Build configuration list for PBXProject "Arc Mini" */; @@ -536,6 +627,7 @@ projectRoot = ""; targets = ( C9822A7E240CF8D5006B70F4 /* Arc Mini */, + C9C045C524A891B300C1A99C /* RecordersWidgetExtension */, ); }; /* End PBXProject section */ @@ -551,6 +643,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + C9C045C424A891B300C1A99C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C9C045CF24A891B500C1A99C /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -593,6 +693,28 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Arc Mini/Pods-Arc Mini-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + D2677A903AFD0C2CCD2A8613 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RecordersWidgetExtension-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -625,6 +747,7 @@ C95E0E2D2417B773008418A1 /* ArcVisit.swift in Sources */, C92BF627241D06AD0089E4AD /* PathPolyline.swift in Sources */, C90C27372439DCCC00A36251 /* NavBar.swift in Sources */, + C9C045DA24A89CAA00C1A99C /* WidgetState.swift in Sources */, C9C6FBF2243333D3004F868C /* TimelineState.swift in Sources */, C928C2EF2443522300586121 /* RecordingDebugView.swift in Sources */, C9DAA083249F97BE004BA946 /* ThinkingListBox.swift in Sources */, @@ -674,8 +797,24 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + C9C045C224A891B300C1A99C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C9C045CD24A891B300C1A99C /* RecordersWidget.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + C9C045D224A891B500C1A99C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = C9C045C524A891B300C1A99C /* RecordersWidgetExtension */; + targetProxy = C9C045D124A891B500C1A99C /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ C9822A8D240CF8D8006B70F4 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; @@ -816,7 +955,7 @@ DEVELOPMENT_TEAM = U5N7VG8DUG; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = "Arc Mini/Core/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 13.2; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -842,11 +981,12 @@ DEVELOPMENT_TEAM = U5N7VG8DUG; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = "Arc Mini/Core/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 13.2; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.bigpaua.ArcMini; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Arc Mini/Core/BridgingHeader.h"; @@ -855,6 +995,54 @@ }; name = Release; }; + C9C045D524A891B500C1A99C /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 20E416AF0980D8060B59267C /* Pods-RecordersWidgetExtension.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; + CODE_SIGN_ENTITLEMENTS = RecordersWidgetExtension.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 5; + DEVELOPMENT_TEAM = U5N7VG8DUG; + INFOPLIST_FILE = RecordersWidget/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.bigpaua.ArcMini.RecordersWidget; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + C9C045D624A891B500C1A99C /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 90D296A8D1D889A0FBBEF51E /* Pods-RecordersWidgetExtension.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; + CODE_SIGN_ENTITLEMENTS = RecordersWidgetExtension.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 5; + DEVELOPMENT_TEAM = U5N7VG8DUG; + INFOPLIST_FILE = RecordersWidget/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.bigpaua.ArcMini.RecordersWidget; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -876,6 +1064,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + C9C045D724A891B500C1A99C /* Build configuration list for PBXNativeTarget "RecordersWidgetExtension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C9C045D524A891B500C1A99C /* Debug */, + C9C045D624A891B500C1A99C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ diff --git a/Arc Mini.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist b/Arc Mini.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist index d5cc8c3..23ba72e 100644 --- a/Arc Mini.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Arc Mini.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist @@ -12,7 +12,12 @@ Arc Mini RELEASE.xcscheme_^#shared#^_ orderHint - 7 + 1 + + RecordersWidgetExtension.xcscheme_^#shared#^_ + + orderHint + 8 SuppressBuildableAutocreation diff --git a/Arc Mini.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Arc Mini.xcworkspace/xcshareddata/swiftpm/Package.resolved index cae5296..22428cb 100644 --- a/Arc Mini.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Arc Mini.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/mxcl/PromiseKit", "state": { "branch": null, - "revision": "f14f16cc2602afec1030e4f492100d6d43dca544", - "version": "6.13.1" + "revision": "f6b15b7626a4399864ffa1d5ec2ed9cf0cea5556", + "version": "6.13.2" } }, { @@ -51,7 +51,7 @@ "repositoryURL": "https://github.com/timbersoftware/SwiftUI-Introspect.git", "state": { "branch": "master", - "revision": "18c8c7fb0f22a3b86b34d68cb3a5f4e7351774e1", + "revision": "07ec9bb46181e58cc0ea04b3191329ff8249df3c", "version": null } } diff --git a/RecordersWidget/Assets.xcassets/AccentColor.colorset/Contents.json b/RecordersWidget/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/RecordersWidget/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/RecordersWidget/Assets.xcassets/AppIcon.appiconset/Contents.json b/RecordersWidget/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/RecordersWidget/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/RecordersWidget/Assets.xcassets/Contents.json b/RecordersWidget/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/RecordersWidget/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/RecordersWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json b/RecordersWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/RecordersWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/RecordersWidget/Info.plist b/RecordersWidget/Info.plist new file mode 100644 index 0000000..064b243 --- /dev/null +++ b/RecordersWidget/Info.plist @@ -0,0 +1,29 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + RecordersWidget + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSExtension + + NSExtensionPointIdentifier + com.apple.widgetkit-extension + + + diff --git a/RecordersWidget/RecordersWidget.swift b/RecordersWidget/RecordersWidget.swift new file mode 100644 index 0000000..e72c20d --- /dev/null +++ b/RecordersWidget/RecordersWidget.swift @@ -0,0 +1,82 @@ +// +// RecordersWidget.swift +// RecordersWidget +// +// Created by Matt Greenfield on 28/6/20. +// Copyright © 2020 Matt Greenfield. All rights reserved. +// + +import WidgetKit +import SwiftUI +import LocoKit + +struct Provider: TimelineProvider { + public typealias Entry = SimpleEntry + + let appGroup = AppGroup(appName: .arcMini, suiteName: "group.ArcApp", readOnly: true) + + public func snapshot(with context: Context, completion: @escaping (SimpleEntry) -> ()) { + let entry = SimpleEntry(date: Date(), sortedApps: appGroup.sortedApps) + completion(entry) + } + + public func timeline(with context: Context, completion: @escaping (Timeline) -> ()) { + let appGroup = AppGroup(appName: .arcMini, suiteName: "group.ArcApp", readOnly: true) + let entries: [SimpleEntry] = [SimpleEntry(date: Date(), sortedApps: appGroup.sortedApps)] + let timeline = Timeline(entries: entries, policy: .atEnd) + completion(timeline) + } +} + +struct SimpleEntry: TimelineEntry { + public let date: Date + public let sortedApps: [LocoKit.AppGroup.AppState] +} + +struct PlaceholderView: View { + var body: some View { + Text("Placeholder View") + } +} + +struct RecordersWidgetEntryView: View { + var entry: Provider.Entry + + let appGroup = AppGroup(appName: .arcMini, suiteName: "group.ArcApp", readOnly: true) + + var body: some View { + VStack { + Text(entry.date, style: .time) + ForEach(appGroup.sortedApps, id: \.updated) { appState in + self.row( + leftText: appState.appName.rawValue, + rightText: "\(appState.recordingState.rawValue) (\(String(duration: appState.updated.age)) ago)", + highlight: appState.isAliveAndRecording, fade: !appState.isAlive + ).frame(height: 20) + } + }.padding([.leading, .trailing], 20) + } + + func row(leftText: String, rightText: String, highlight: Bool = false, fade: Bool = false) -> some View { + let font = highlight ? Font.system(.footnote).bold() : Font.system(.footnote) + return HStack { + Text(leftText).font(font).opacity(fade ? 0.6 : 1) + Spacer() + Text(rightText).font(font).opacity(0.6).opacity(fade ? 0.6 : 1) + } + } + +} + +@main +struct RecordersWidget: Widget { + private let kind: String = "RecordersWidget" + + public var body: some WidgetConfiguration { + StaticConfiguration(kind: kind, provider: Provider(), placeholder: PlaceholderView()) { entry in + RecordersWidgetEntryView(entry: entry) + } + .configurationDisplayName("Arc Recorders") + .description("The currently alive Arc recorders.") + } +} diff --git a/RecordersWidget/WidgetState.swift b/RecordersWidget/WidgetState.swift new file mode 100644 index 0000000..a596a03 --- /dev/null +++ b/RecordersWidget/WidgetState.swift @@ -0,0 +1,14 @@ +// +// WidgetState.swift +// Arc Mini +// +// Created by Matt Greenfield on 28/6/20. +// Copyright © 2020 Matt Greenfield. All rights reserved. +// + +import SwiftUI +import LocoKit + +class WidgetState: ObservableObject { + var appGroup = AppGroup(appName: .arcMini, suiteName: "group.ArcApp") +} diff --git a/RecordersWidgetExtension.entitlements b/RecordersWidgetExtension.entitlements new file mode 100644 index 0000000..3cbf1c7 --- /dev/null +++ b/RecordersWidgetExtension.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.application-groups + + group.ArcApp + + +