Skip to content

Commit

Permalink
Temp fix for Xcode 14 beta 6 build
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Ye committed Aug 9, 2023
1 parent 1bfc172 commit ce909fe
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 18 deletions.
12 changes: 6 additions & 6 deletions Forumate.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.5.0;
MARKETING_VERSION = 0.5.1;
PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.Forumate.watchkitapp;
PRODUCT_NAME = Forumate;
SDKROOT = watchos;
Expand Down Expand Up @@ -1267,7 +1267,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.5.0;
MARKETING_VERSION = 0.5.1;
PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.Forumate.watchkitapp;
PRODUCT_NAME = Forumate;
SDKROOT = watchos;
Expand Down Expand Up @@ -1297,7 +1297,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.5.0;
MARKETING_VERSION = 0.5.1;
PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.Forumate;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
Expand Down Expand Up @@ -1325,7 +1325,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.5.0;
MARKETING_VERSION = 0.5.1;
PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.Forumate;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
Expand Down Expand Up @@ -1495,7 +1495,7 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 0.5.0;
MARKETING_VERSION = 0.5.1;
PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.Forumate;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
Expand Down Expand Up @@ -1542,7 +1542,7 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 0.5.0;
MARKETING_VERSION = 0.5.1;
PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.Forumate;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
Expand Down
2 changes: 1 addition & 1 deletion Forumate/ForumateApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct ForumateApp: App {
#if os(iOS) || os(macOS)
WindowGroup("Topic Detail", id: "topic", for: TopicDetailWindowModel.self) { $detailModel in
if let detailModel,
let community = container.mainContext.object(with: detailModel.communityID) as? Community {
let community = container.mainContext.model(for: detailModel.communityID) as? Community {
TopicDetail(topic: detailModel.topic)
.environmentObject(appState)
.environmentObject(CommunityDetailState(community: community))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct TopicDetail: View {
}
}
#if os(iOS) || os(macOS)
.toolbar {
.toolbar(content: {
if supportsMultipleWindows {
#if os(iOS)
let placement: ToolbarItemPlacement = .navigationBarLeading
Expand All @@ -55,13 +55,13 @@ struct TopicDetail: View {
#endif
ToolbarItem(placement: placement) {
Button {
openWindow(value: TopicDetailWindowModel(topic: topic, communityID: state.community.objectID))
openWindow(value: TopicDetailWindowModel(topic: topic, communityID: state.community.persistentModelID))
} label: {
Label("Open In New Window", systemImage: "macwindow.badge.plus")
}
}
}
}
})
#endif
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct TopicLabel: View {
if supportsMultipleWindows {
Button {
let model = state.community as (any PersistentModel) // FIXME: Workaround for Xcode 15 beta 5
openWindow(value: TopicDetailWindowModel(topic: topic, communityID: model.objectID))
openWindow(value: TopicDetailWindowModel(topic: topic, communityID: model.persistentModelID))
} label: {
Label("Open In New Window", systemImage: "macwindow.badge.plus")
}
Expand Down
10 changes: 8 additions & 2 deletions Forumate/View/Tab/Topics/Community/Model/Community.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ import SwiftData

@Model
final class Community {
private(set) var id = UUID()
private(set) var id: UUID!
private(set) var host: URL!
private(set) var title = ""
private(set) var title: String!
private(set) var icon: URL?

init() {
self.id = UUID()
self.title = ""
}

init(host: URL, title: String = "", icon: URL? = nil) {
self.id = UUID()
self.host = host
self.title = title
self.icon = icon
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ A native client to access Discourse server for Apple Platforms.

![Forumate](Forumate/Other/Assets.xcassets/AppIcon.appiconset/AppIcon-macOS-512.png)

### Platform Compatibility

- [x] iOS 17+
- [x] iPadOS 17+
- [x] watchOS 10+
Expand All @@ -24,12 +26,15 @@ A native client to access Discourse server for Apple Platforms.
>
> visionOS is buidable, but is not optimized for. Hope I can get a real device to test for it.
## Download
### Version Compatibility

- v0.1~v0.3 supports iOS 16+, watchOS 9+ and macOS 13+
- v0.4.0 supports iOS 17 beta 1, watchOS 10 beta 1 and macOS 14 beta 1
- v0.4.1 supports iOS 17 beta 2-3, watchOS 10 beta 2-3 and macOS 14 beta 2-3
- v0.5.0 supports iOS 17 beta 4, watchOS 10 beta 4 and macOS 14 beta 4
- v0.4.0-beta only supports iOS & iPadOS 17 beta 1, watchOS 10 beta 1 and macOS 14 beta 1
- v0.4.1-beta only supports iOS & iPadOS 17 beta 2-3, watchOS 10 beta 2-3 and macOS 14 beta 2-3
- v0.5.0-beta only supports iOS & iPadOS 17 17 beta 4, watchOS 10 beta 4 and macOS 14 beta 4
- v0.5.1-beta only supports iOS & iPadOS 17 17 beta 5, watchOS 10 beta 5 and macOS 14 beta 5

## Download

### Mac App Store Release

Expand Down
2 changes: 1 addition & 1 deletion TestFlight/WhatToTest.en-US.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
What's new in v0.5.0-beta
What's new in v0.5.1-beta
1. Migrate Community model to SwiftData(iCloud based database) and support iCloud sync now.
You can now setup your favorite your communities and then they will automatically sync to your other Apple device.
2. Update AppIcon and you can change the old icon back in the Setting sections.

0 comments on commit ce909fe

Please sign in to comment.