diff --git a/VITTY/VITTY.xcodeproj/project.pbxproj b/VITTY/VITTY.xcodeproj/project.pbxproj index 3e10610..19cfb83 100644 --- a/VITTY/VITTY.xcodeproj/project.pbxproj +++ b/VITTY/VITTY.xcodeproj/project.pbxproj @@ -66,14 +66,6 @@ 5247A3992B963877006C0DF9 /* FirebaseStorageCombine-Community in Frameworks */ = {isa = PBXBuildFile; productRef = 5247A3982B963877006C0DF9 /* FirebaseStorageCombine-Community */; }; 5247A39C2B9638DA006C0DF9 /* GoogleSignIn in Frameworks */ = {isa = PBXBuildFile; productRef = 5247A39B2B9638DA006C0DF9 /* GoogleSignIn */; }; 5247A39E2B9638DA006C0DF9 /* GoogleSignInSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 5247A39D2B9638DA006C0DF9 /* GoogleSignInSwift */; }; - 5247A3A52B9645A2006C0DF9 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5247A3A42B9645A1006C0DF9 /* WidgetKit.framework */; }; - 5247A3A62B9645A2006C0DF9 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3105871C27A3ECBB00C2FC41 /* SwiftUI.framework */; }; - 5247A3A92B9645A2006C0DF9 /* vittywidgetBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5247A3A82B9645A2006C0DF9 /* vittywidgetBundle.swift */; }; - 5247A3AB2B9645A2006C0DF9 /* vittywidgetLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5247A3AA2B9645A2006C0DF9 /* vittywidgetLiveActivity.swift */; }; - 5247A3AD2B9645A2006C0DF9 /* vittywidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5247A3AC2B9645A2006C0DF9 /* vittywidget.swift */; }; - 5247A3AF2B9645A2006C0DF9 /* AppIntent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5247A3AE2B9645A2006C0DF9 /* AppIntent.swift */; }; - 5247A3B12B9645A3006C0DF9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5247A3B02B9645A3006C0DF9 /* Assets.xcassets */; }; - 5247A3B52B9645A3006C0DF9 /* vittywidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 5247A3A32B9645A1006C0DF9 /* vittywidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 524B842F2B46EBBD006D18BD /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 524B842E2B46EBBD006D18BD /* HomeView.swift */; }; 524B84332B46EF3A006D18BD /* CommunityPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 524B84322B46EF3A006D18BD /* CommunityPage.swift */; }; 524B84362B46F10F006D18BD /* CommunityPageHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 524B84352B46F10F006D18BD /* CommunityPageHeader.swift */; }; @@ -104,16 +96,6 @@ 5DC0AF552AD2B586006B081D /* UserImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DC0AF542AD2B586006B081D /* UserImage.swift */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 5247A3B32B9645A3006C0DF9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 314A408327383BEC0058082F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 5247A3A22B9645A1006C0DF9; - remoteInfo = vittywidgetExtension; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXCopyFilesBuildPhase section */ 3105872727A3ECBD00C2FC41 /* Embed Foundation Extensions */ = { isa = PBXCopyFilesBuildPhase; @@ -121,7 +103,6 @@ dstPath = ""; dstSubfolderSpec = 13; files = ( - 5247A3B52B9645A3006C0DF9 /* vittywidgetExtension.appex in Embed Foundation Extensions */, ); name = "Embed Foundation Extensions"; runOnlyForDeploymentPostprocessing = 0; @@ -146,7 +127,6 @@ 314A409027383BEC0058082F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 314A409227383BEE0058082F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 314A409527383BEE0058082F /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 3164C46927CBCFBE00D6B53F /* vitty-widgetExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "vitty-widgetExtension.entitlements"; sourceTree = ""; }; 317715DD279F1431009A532E /* IndexedCollection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IndexedCollection.swift; sourceTree = ""; }; 317EE1982775D3C6008AEB31 /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; }; 31900F0927759DB60014A58D /* Gradient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Gradient.swift; sourceTree = ""; }; @@ -162,14 +142,6 @@ 5238C7ED2B4A9E2C00413946 /* FriendRequestRaw.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendRequestRaw.swift; sourceTree = ""; }; 5238C7F02B4AAE8700413946 /* FriendRequestView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendRequestView.swift; sourceTree = ""; }; 5238C7F32B4AB07400413946 /* FriendReqCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendReqCard.swift; sourceTree = ""; }; - 5247A3A32B9645A1006C0DF9 /* vittywidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = vittywidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - 5247A3A42B9645A1006C0DF9 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; - 5247A3A82B9645A2006C0DF9 /* vittywidgetBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = vittywidgetBundle.swift; sourceTree = ""; }; - 5247A3AA2B9645A2006C0DF9 /* vittywidgetLiveActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = vittywidgetLiveActivity.swift; sourceTree = ""; }; - 5247A3AC2B9645A2006C0DF9 /* vittywidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = vittywidget.swift; sourceTree = ""; }; - 5247A3AE2B9645A2006C0DF9 /* AppIntent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppIntent.swift; sourceTree = ""; }; - 5247A3B02B9645A3006C0DF9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 5247A3B22B9645A3006C0DF9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 524B842E2B46EBBD006D18BD /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = ""; }; 524B84322B46EF3A006D18BD /* CommunityPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityPage.swift; sourceTree = ""; }; 524B84352B46F10F006D18BD /* CommunityPageHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityPageHeader.swift; sourceTree = ""; }; @@ -241,15 +213,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 5247A3A02B9645A1006C0DF9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5247A3A62B9645A2006C0DF9 /* SwiftUI.framework in Frameworks */, - 5247A3A52B9645A2006C0DF9 /* WidgetKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -257,7 +220,6 @@ isa = PBXGroup; children = ( 3105871C27A3ECBB00C2FC41 /* SwiftUI.framework */, - 5247A3A42B9645A1006C0DF9 /* WidgetKit.framework */, ); name = Frameworks; sourceTree = ""; @@ -316,9 +278,7 @@ 314A409227383BEE0058082F /* Assets.xcassets */, AFEFCB6C27C90233007B2029 /* VITTY.entitlements */, AFEFCB6B27C90042007B2029 /* VITTYRelease.entitlements */, - 3164C46927CBCFBE00D6B53F /* vitty-widgetExtension.entitlements */, 314A408D27383BEC0058082F /* VITTY */, - 5247A3A72B9645A2006C0DF9 /* vittywidget */, 3105871927A3ECBB00C2FC41 /* Frameworks */, 314A408C27383BEC0058082F /* Products */, ); @@ -328,7 +288,6 @@ isa = PBXGroup; children = ( 314A408B27383BEC0058082F /* VITTY.app */, - 5247A3A32B9645A1006C0DF9 /* vittywidgetExtension.appex */, ); name = Products; sourceTree = ""; @@ -479,19 +438,6 @@ path = Components; sourceTree = ""; }; - 5247A3A72B9645A2006C0DF9 /* vittywidget */ = { - isa = PBXGroup; - children = ( - 5247A3A82B9645A2006C0DF9 /* vittywidgetBundle.swift */, - 5247A3AA2B9645A2006C0DF9 /* vittywidgetLiveActivity.swift */, - 5247A3AC2B9645A2006C0DF9 /* vittywidget.swift */, - 5247A3AE2B9645A2006C0DF9 /* AppIntent.swift */, - 5247A3B02B9645A3006C0DF9 /* Assets.xcassets */, - 5247A3B22B9645A3006C0DF9 /* Info.plist */, - ); - path = vittywidget; - sourceTree = ""; - }; 524B842C2B46EBA6006D18BD /* Home */ = { isa = PBXGroup; children = ( @@ -753,7 +699,6 @@ buildRules = ( ); dependencies = ( - 5247A3B42B9645A3006C0DF9 /* PBXTargetDependency */, ); name = VITTY; packageProductDependencies = ( @@ -795,23 +740,6 @@ productReference = 314A408B27383BEC0058082F /* VITTY.app */; productType = "com.apple.product-type.application"; }; - 5247A3A22B9645A1006C0DF9 /* vittywidgetExtension */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5247A3B62B9645A3006C0DF9 /* Build configuration list for PBXNativeTarget "vittywidgetExtension" */; - buildPhases = ( - 5247A39F2B9645A1006C0DF9 /* Sources */, - 5247A3A02B9645A1006C0DF9 /* Frameworks */, - 5247A3A12B9645A1006C0DF9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = vittywidgetExtension; - productName = vittywidgetExtension; - productReference = 5247A3A32B9645A1006C0DF9 /* vittywidgetExtension.appex */; - productType = "com.apple.product-type.app-extension"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -825,9 +753,6 @@ 314A408A27383BEC0058082F = { CreatedOnToolsVersion = 13.0; }; - 5247A3A22B9645A1006C0DF9 = { - CreatedOnToolsVersion = 15.2; - }; }; }; buildConfigurationList = 314A408627383BEC0058082F /* Build configuration list for PBXProject "VITTY" */; @@ -850,7 +775,6 @@ projectRoot = ""; targets = ( 314A408A27383BEC0058082F /* VITTY */, - 5247A3A22B9645A1006C0DF9 /* vittywidgetExtension */, ); }; /* End PBXProject section */ @@ -874,14 +798,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 5247A3A12B9645A1006C0DF9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5247A3B12B9645A3006C0DF9 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -976,27 +892,8 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 5247A39F2B9645A1006C0DF9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5247A3AD2B9645A2006C0DF9 /* vittywidget.swift in Sources */, - 5247A3AF2B9645A2006C0DF9 /* AppIntent.swift in Sources */, - 5247A3A92B9645A2006C0DF9 /* vittywidgetBundle.swift in Sources */, - 5247A3AB2B9645A2006C0DF9 /* vittywidgetLiveActivity.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 5247A3B42B9645A3006C0DF9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 5247A3A22B9645A1006C0DF9 /* vittywidgetExtension */; - targetProxy = 5247A3B32B9645A3006C0DF9 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ 314A409C27383BEE0058082F /* Debug */ = { isa = XCBuildConfiguration; @@ -1122,7 +1019,6 @@ 314A409F27383BEE0058082F /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = VITTY/VITTY.entitlements; @@ -1161,7 +1057,6 @@ 314A40A027383BEE0058082F /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = VITTY/VITTYRelease.entitlements; @@ -1196,75 +1091,6 @@ }; name = Release; }; - 5247A3B72B9645A3006C0DF9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = FYJ559CK7D; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = vittywidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = vittywidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 17.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.gdscvit.vittyios.vittywidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 5247A3B82B9645A3006C0DF9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = FYJ559CK7D; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = vittywidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = vittywidget; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 17.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.gdscvit.vittyios.vittywidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -1286,15 +1112,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 5247A3B62B9645A3006C0DF9 /* Build configuration list for PBXNativeTarget "vittywidgetExtension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5247A3B72B9645A3006C0DF9 /* Debug */, - 5247A3B82B9645A3006C0DF9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ diff --git a/VITTY/vitty-widgetExtension.entitlements b/VITTY/vitty-widgetExtension.entitlements deleted file mode 100644 index 9f4f550..0000000 --- a/VITTY/vitty-widgetExtension.entitlements +++ /dev/null @@ -1,15 +0,0 @@ - - - - - com.apple.security.application-groups - - group.com.gdscvit.vittyios - group.com.gdscvit.vittyios.vitty-widget - - keychain-access-groups - - $(AppIdentifierPrefix)com.gdscvit.vittyios.vitty-widget - - - diff --git a/VITTY/vittywidget/AppIntent.swift b/VITTY/vittywidget/AppIntent.swift deleted file mode 100644 index ea810fc..0000000 --- a/VITTY/vittywidget/AppIntent.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// AppIntent.swift -// vittywidget -// -// Created by Chandram Dutta on 04/03/24. -// - -import AppIntents -import WidgetKit - -struct ConfigurationAppIntent: WidgetConfigurationIntent { - static var title: LocalizedStringResource = "Configuration" - static var description = IntentDescription("This is an example widget.") - - // An example configurable parameter. - @Parameter(title: "Favorite Emoji", default: "😃") - var favoriteEmoji: String -} diff --git a/VITTY/vittywidget/Assets.xcassets/AccentColor.colorset/Contents.json b/VITTY/vittywidget/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb87897..0000000 --- a/VITTY/vittywidget/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/VITTY/vittywidget/Assets.xcassets/AppIcon.appiconset/Contents.json b/VITTY/vittywidget/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 13613e3..0000000 --- a/VITTY/vittywidget/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/VITTY/vittywidget/Assets.xcassets/Contents.json b/VITTY/vittywidget/Assets.xcassets/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/VITTY/vittywidget/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/VITTY/vittywidget/Assets.xcassets/WidgetBackground.colorset/Contents.json b/VITTY/vittywidget/Assets.xcassets/WidgetBackground.colorset/Contents.json deleted file mode 100644 index eb87897..0000000 --- a/VITTY/vittywidget/Assets.xcassets/WidgetBackground.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/VITTY/vittywidget/Info.plist b/VITTY/vittywidget/Info.plist deleted file mode 100644 index 0f118fb..0000000 --- a/VITTY/vittywidget/Info.plist +++ /dev/null @@ -1,11 +0,0 @@ - - - - - NSExtension - - NSExtensionPointIdentifier - com.apple.widgetkit-extension - - - diff --git a/VITTY/vittywidget/vittywidget.swift b/VITTY/vittywidget/vittywidget.swift deleted file mode 100644 index 38b1e20..0000000 --- a/VITTY/vittywidget/vittywidget.swift +++ /dev/null @@ -1,98 +0,0 @@ -// -// vittywidget.swift -// vittywidget -// -// Created by Chandram Dutta on 04/03/24. -// - -import SwiftUI -import WidgetKit - -struct Provider: AppIntentTimelineProvider { - func placeholder(in context: Context) -> SimpleEntry { - SimpleEntry(date: Date(), configuration: ConfigurationAppIntent()) - } - - func snapshot( - for configuration: ConfigurationAppIntent, - in context: Context - ) async -> SimpleEntry { - SimpleEntry(date: Date(), configuration: configuration) - } - - func timeline( - for configuration: ConfigurationAppIntent, - in context: Context - ) async -> Timeline { - var entries: [SimpleEntry] = [] - - // Generate a timeline consisting of five entries an hour apart, starting from the current date. - let currentDate = Date() - for hourOffset in 0..<5 { - let entryDate = Calendar.current.date( - byAdding: .hour, - value: hourOffset, - to: currentDate - )! - let entry = SimpleEntry(date: entryDate, configuration: configuration) - entries.append(entry) - } - - return Timeline(entries: entries, policy: .atEnd) - } -} - -struct SimpleEntry: TimelineEntry { - let date: Date - let configuration: ConfigurationAppIntent -} - -struct vittywidgetEntryView: View { - var entry: Provider.Entry - - var body: some View { - VStack { - Text("Time:") - Text(entry.date, style: .time) - - Text("Favorite Emoji:") - Text(entry.configuration.favoriteEmoji) - } - } -} - -struct vittywidget: Widget { - let kind: String = "vittywidget" - - var body: some WidgetConfiguration { - AppIntentConfiguration( - kind: kind, - intent: ConfigurationAppIntent.self, - provider: Provider() - ) { entry in - vittywidgetEntryView(entry: entry) - .containerBackground(.fill.tertiary, for: .widget) - } - } -} - -extension ConfigurationAppIntent { - fileprivate static var smiley: ConfigurationAppIntent { - let intent = ConfigurationAppIntent() - intent.favoriteEmoji = "😀" - return intent - } - - fileprivate static var starEyes: ConfigurationAppIntent { - let intent = ConfigurationAppIntent() - intent.favoriteEmoji = "🤩" - return intent - } -} - -#Preview(as: .systemSmall) { - vittywidget() -} timeline: { - SimpleEntry(date: .now, configuration: .smiley) - SimpleEntry(date: .now, configuration: .starEyes) -} diff --git a/VITTY/vittywidget/vittywidgetBundle.swift b/VITTY/vittywidget/vittywidgetBundle.swift deleted file mode 100644 index 197188b..0000000 --- a/VITTY/vittywidget/vittywidgetBundle.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// vittywidgetBundle.swift -// vittywidget -// -// Created by Chandram Dutta on 04/03/24. -// - -import SwiftUI -import WidgetKit - -@main -struct vittywidgetBundle: WidgetBundle { - var body: some Widget { - vittywidget() - vittywidgetLiveActivity() - } -} diff --git a/VITTY/vittywidget/vittywidgetLiveActivity.swift b/VITTY/vittywidget/vittywidgetLiveActivity.swift deleted file mode 100644 index 83a5d03..0000000 --- a/VITTY/vittywidget/vittywidgetLiveActivity.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// vittywidgetLiveActivity.swift -// vittywidget -// -// Created by Chandram Dutta on 04/03/24. -// - -import ActivityKit -import SwiftUI -import WidgetKit - -struct vittywidgetAttributes: ActivityAttributes { - public struct ContentState: Codable, Hashable { - // Dynamic stateful properties about your activity go here! - var emoji: String - } - - // Fixed non-changing properties about your activity go here! - var name: String -} - -struct vittywidgetLiveActivity: Widget { - var body: some WidgetConfiguration { - ActivityConfiguration(for: vittywidgetAttributes.self) { context in - // Lock screen/banner UI goes here - VStack { - Text("Hello \(context.state.emoji)") - } - .activityBackgroundTint(Color.cyan) - .activitySystemActionForegroundColor(Color.black) - - } dynamicIsland: { context in - DynamicIsland { - // Expanded UI goes here. Compose the expanded UI through - // various regions, like leading/trailing/center/bottom - DynamicIslandExpandedRegion(.leading) { - Text("Leading") - } - DynamicIslandExpandedRegion(.trailing) { - Text("Trailing") - } - DynamicIslandExpandedRegion(.bottom) { - Text("Bottom \(context.state.emoji)") - // more content - } - } compactLeading: { - Text("L") - } compactTrailing: { - Text("T \(context.state.emoji)") - } minimal: { - Text(context.state.emoji) - } - .widgetURL(URL(string: "http://www.apple.com")) - .keylineTint(Color.red) - } - } -} - -extension vittywidgetAttributes { - fileprivate static var preview: vittywidgetAttributes { - vittywidgetAttributes(name: "World") - } -} - -extension vittywidgetAttributes.ContentState { - fileprivate static var smiley: vittywidgetAttributes.ContentState { - vittywidgetAttributes.ContentState(emoji: "😀") - } - - fileprivate static var starEyes: vittywidgetAttributes.ContentState { - vittywidgetAttributes.ContentState(emoji: "🤩") - } -} - -#Preview("Notification", as: .content, using: vittywidgetAttributes.preview) { - vittywidgetLiveActivity() -} contentStates: { - vittywidgetAttributes.ContentState.smiley - vittywidgetAttributes.ContentState.starEyes -}