-
-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,098 additions
and
74 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
114 changes: 114 additions & 0 deletions
114
IceCubesApp.xcodeproj/xcshareddata/xcschemes/IceCubesAppWidgetsExtensionExtension.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1530" | ||
wasCreatedForAppExtension = "YES" | ||
version = "2.0"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES" | ||
buildArchitectures = "Automatic"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "9F7788C42BE652B1004E6BEF" | ||
BuildableName = "IceCubesAppWidgetsExtensionExtension.appex" | ||
BlueprintName = "IceCubesAppWidgetsExtensionExtension" | ||
ReferencedContainer = "container:IceCubesApp.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "9FBFE638292A715500C250E9" | ||
BuildableName = "Ice Cubes.app" | ||
BlueprintName = "IceCubesApp" | ||
ReferencedContainer = "container:IceCubesApp.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
shouldAutocreateTestPlan = "YES"> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "" | ||
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn" | ||
launchStyle = "0" | ||
askForAppToLaunch = "Yes" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES" | ||
launchAutomaticallySubstyle = "2"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "9FBFE638292A715500C250E9" | ||
BuildableName = "Ice Cubes.app" | ||
BlueprintName = "IceCubesApp" | ||
ReferencedContainer = "container:IceCubesApp.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
<EnvironmentVariables> | ||
<EnvironmentVariable | ||
key = "_XCWidgetKind" | ||
value = "" | ||
isEnabled = "YES"> | ||
</EnvironmentVariable> | ||
<EnvironmentVariable | ||
key = "_XCWidgetDefaultView" | ||
value = "timeline" | ||
isEnabled = "YES"> | ||
</EnvironmentVariable> | ||
<EnvironmentVariable | ||
key = "_XCWidgetFamily" | ||
value = "systemMedium" | ||
isEnabled = "YES"> | ||
</EnvironmentVariable> | ||
</EnvironmentVariables> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES" | ||
askForAppToLaunch = "Yes" | ||
launchAutomaticallySubstyle = "2"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "9FBFE638292A715500C250E9" | ||
BuildableName = "Ice Cubes.app" | ||
BlueprintName = "IceCubesApp" | ||
ReferencedContainer = "container:IceCubesApp.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import AppAccount | ||
import AppIntents | ||
import Env | ||
import Foundation | ||
import Models | ||
import Network | ||
|
||
extension IntentDescription: @unchecked Sendable {} | ||
extension TypeDisplayRepresentation: @unchecked Sendable {} | ||
|
||
public struct AppAccountEntity: Identifiable, AppEntity { | ||
public var id: String { account.id } | ||
|
||
public let account: AppAccount | ||
|
||
public static let defaultQuery = DefaultAppAccountEntityQuery() | ||
|
||
public static let typeDisplayRepresentation: TypeDisplayRepresentation = "AppAccount" | ||
|
||
public var displayRepresentation: DisplayRepresentation { | ||
DisplayRepresentation(title: "\(account.accountName ?? account.server)") | ||
} | ||
} | ||
|
||
public struct DefaultAppAccountEntityQuery: EntityQuery { | ||
public init() {} | ||
|
||
public func entities(for identifiers: [AppAccountEntity.ID]) async throws -> [AppAccountEntity] { | ||
return await AppAccountsManager.shared.availableAccounts.filter { account in | ||
identifiers.contains { id in | ||
id == account.id | ||
} | ||
}.map { AppAccountEntity(account: $0) } | ||
} | ||
|
||
public func suggestedEntities() async throws -> [AppAccountEntity] { | ||
await AppAccountsManager.shared.availableAccounts.map { .init(account: $0) } | ||
} | ||
|
||
public func defaultResult() async -> AppAccountEntity? { | ||
await .init(account: AppAccountsManager.shared.currentAccount) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import AppAccount | ||
import AppIntents | ||
import Env | ||
import Foundation | ||
import Models | ||
import Network | ||
import Timeline | ||
|
||
public struct TimelineFilterEntity: Identifiable, AppEntity { | ||
public var id: String { timeline.id } | ||
|
||
public let timeline: TimelineFilter | ||
|
||
public static let defaultQuery = DefaultTimelineEntityQuery() | ||
|
||
public static let typeDisplayRepresentation: TypeDisplayRepresentation = "TimelineFilter" | ||
|
||
public var displayRepresentation: DisplayRepresentation { | ||
DisplayRepresentation(title: "\(timeline.title)") | ||
} | ||
} | ||
|
||
public struct DefaultTimelineEntityQuery: EntityQuery { | ||
public init() {} | ||
|
||
public func entities(for _: [TimelineFilter.ID]) async throws -> [TimelineFilterEntity] { | ||
[.home, .trending, .federated, .local].map { .init(timeline: $0) } | ||
} | ||
|
||
public func suggestedEntities() async throws -> [TimelineFilterEntity] { | ||
[.home, .trending, .federated, .local].map { .init(timeline: $0) } | ||
} | ||
|
||
public func defaultResult() async -> TimelineFilterEntity? { | ||
.init(timeline: .home) | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
IceCubesAppWidgetsExtension/Assets.xcassets/AccentColor.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "display-p3", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0.859", | ||
"green" : "0.267", | ||
"red" : "0.675" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
IceCubesAppWidgetsExtension/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"platform" : "ios", | ||
"size" : "1024x1024" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Oops, something went wrong.