Skip to content

Commit

Permalink
General: Release 1.6.0 (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
anian03 authored Dec 30, 2024
2 parents 4212ca4 + 813accb commit da3018f
Show file tree
Hide file tree
Showing 31 changed files with 1,133 additions and 671 deletions.
2 changes: 2 additions & 0 deletions Artemis.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<string>webcredentials:artemis-test6.artemis.cit.tum.de</string>
<string>webcredentials:artemis-test9.artemis.cit.tum.de</string>
</array>
<key>com.apple.developer.usernotifications.communication</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)de.tum.cit.ase.artemis</string>
Expand Down
10 changes: 8 additions & 2 deletions Artemis.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@
51B0EFCA2CE6468700927F30 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APP_VERSION_NUMBER = "$(APP_VERSION_NUMBER)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CODE_SIGN_ENTITLEMENTS = ArtemisNotificationExtension/ArtemisNotificationExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
Expand All @@ -414,7 +415,7 @@
"@executable_path/../../Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
MARKETING_VERSION = "$(APP_VERSION_NUMBER)";
PRODUCT_BUNDLE_IDENTIFIER = de.tum.cit.ase.artemis.ArtemisNotificationExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -428,6 +429,7 @@
51B0EFCB2CE6468700927F30 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APP_VERSION_NUMBER = "$(APP_VERSION_NUMBER)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CODE_SIGN_ENTITLEMENTS = ArtemisNotificationExtension/ArtemisNotificationExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
Expand All @@ -446,7 +448,7 @@
"@executable_path/../../Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
MARKETING_VERSION = "$(APP_VERSION_NUMBER)";
PRODUCT_BUNDLE_IDENTIFIER = de.tum.cit.ase.artemis.ArtemisNotificationExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -504,6 +506,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
APP_VERSION_NUMBER = 1.6.0;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
Expand Down Expand Up @@ -567,6 +570,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
APP_VERSION_NUMBER = 1.6.0;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
Expand Down Expand Up @@ -624,6 +628,7 @@
7555FFA6242A565B00829871 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APP_VERSION_NUMBER = "$(APP_VERSION_NUMBER)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Artemis.entitlements;
Expand Down Expand Up @@ -653,6 +658,7 @@
7555FFA7242A565B00829871 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APP_VERSION_NUMBER = "$(APP_VERSION_NUMBER)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Artemis.entitlements;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "60201ec1c26be7adad9fdf6611cc7c649da23b2d45f1aa466264a869dc6de3a1",
"originHash" : "008193f82a18024045696bb777eb551728aa12ae494d1eb655cdd7ae99cb3cdf",
"pins" : [
{
"identity" : "apollon-ios-module",
Expand All @@ -15,8 +15,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/ls1intum/artemis-ios-core-modules",
"state" : {
"revision" : "f28438e6960df1c91bbfa59e53f46670430f509e",
"version" : "15.1.4"
"revision" : "23fa0aaf0b16db7643c2589a65bf1e09ff257546",
"version" : "15.3.0"
}
},
{
Expand All @@ -33,17 +33,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/krzyzanowskim/CryptoSwift.git",
"state" : {
"revision" : "678d442c6f7828def400a70ae15968aef67ef52d",
"version" : "1.8.3"
"revision" : "729e01bc9b9dab466ac85f21fb9ee2bc1c61b258",
"version" : "1.8.4"
}
},
{
"identity" : "emojipicker",
"identity" : "gzipswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Kelvas09/EmojiPicker.git",
"location" : "https://github.com/1024jp/GzipSwift.git",
"state" : {
"revision" : "d787591e2121b617209172ad6a8ebf2975f605ae",
"version" : "1.0.1"
"revision" : "56bf51fdd2fe4b2cf254b2cf34aede3d7caccc6c",
"version" : "6.1.0"
}
},
{
Expand Down
6 changes: 5 additions & 1 deletion Artemis/Supporting/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSUserActivityTypes</key>
<array>
<string>INSendMessageIntent</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
Expand All @@ -21,7 +25,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.5.2</string>
<string>$(APP_VERSION_NUMBER)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>ITSAppUsesNonExemptEncryption</key>
Expand Down
8 changes: 3 additions & 5 deletions ArtemisKit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/onmyway133/Smile.git", revision: "6bacbf7"),
.package(url: "https://github.com/Kelvas09/EmojiPicker.git", from: "1.0.0"),
.package(url: "https://github.com/ls1intum/apollon-ios-module", .upToNextMajor(from: "1.0.2")),
.package(url: "https://github.com/ls1intum/artemis-ios-core-modules", .upToNextMajor(from: "15.1.2")),
.package(url: "https://github.com/ls1intum/artemis-ios-core-modules", .upToNextMajor(from: "15.3.0")),
.package(url: "https://github.com/mac-cain13/R.swift.git", from: "7.7.0")
],
targets: [
Expand Down Expand Up @@ -113,15 +112,14 @@ let package = Package(
"Extensions",
"Faq",
"Navigation",
.product(name: "EmojiPicker", package: "EmojiPicker"),
.product(name: "Smile", package: "Smile"),
.product(name: "APIClient", package: "artemis-ios-core-modules"),
.product(name: "ArtemisMarkdown", package: "artemis-ios-core-modules"),
.product(name: "DesignLibrary", package: "artemis-ios-core-modules"),
.product(name: "SharedModels", package: "artemis-ios-core-modules"),
.product(name: "SharedServices", package: "artemis-ios-core-modules"),
.product(name: "UserStore", package: "artemis-ios-core-modules"),
.product(name: "RswiftLibrary", package: "R.swift"),
.product(name: "Smile", package: "Smile")
.product(name: "RswiftLibrary", package: "R.swift")
],
plugins: [
.plugin(name: "RswiftGeneratePublicResources", package: "R.swift")
Expand Down
2 changes: 2 additions & 0 deletions ArtemisKit/Sources/CourseView/CourseView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public struct CourseView: View {
}
.navigationTitle(viewModel.course.title ?? R.string.localizable.loading())
.navigationBarTitleDisplayMode(.inline)
// Add a file picker here, inside the navigation it doesn't work sometimes
.supportsFilePicker()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,17 @@
"directMessages" = "Direct Messages";
"unreadFilter" = "Unread";
"allFilter" = "All";
"recentFilter" = "Recent";
"unresolvedFilter" = "Unresolved";
"allDone" = "All done";
"allDoneDescription" = "All messages are resolved. Good work!";

// MARK: MessageDetailView
"edited" = "Edited";
"messageCouldNotBeLoadedError" = "Message could not be loaded.";
"thread" = "Thread";
"replies" = "Reply";
"attachment" = "Attachment";

// MARK: MessageActionSheet
"replyInThread" = "Reply in Thread";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ protocol MessagesService {
* Perform a put request to edit the name/topic/description of a specific conversation in a specific course to the server.
*/
func editConversation(for courseId: Int, conversation: Conversation, newName: String?, newTopic: String?, newDescription: String?) async -> DataState<Conversation>

/**
* Perform a get request to retrieve channels which have unresolved messages
*/
func getUnresolvedChannelIds(for courseId: Int, and channelIds: [Int64]) async -> DataState<[Int64]>
}

extension MessagesService {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
//
// File.swift
// ArtemisKit
//
// Created by Anian Schleyer on 28.12.24.
//

import APIClient
import Common
import Foundation
import SharedModels

// Requests for Conversation Management
extension MessagesServiceImpl {
struct CreateChannelRequest: APIRequest {
typealias Response = Channel

let courseId: Int
var type: ConversationType = .channel
let name: String
let description: String?
let isPublic: Bool
let isAnnouncementChannel: Bool

var method: HTTPMethod {
return .post
}

var resourceName: String {
return "api/courses/\(courseId)/channels"
}
}

func createChannel(for courseId: Int, name: String, description: String?, isPrivate: Bool, isAnnouncement: Bool) async -> DataState<Channel> {
let result = await client.sendRequest(
CreateChannelRequest(courseId: courseId, name: name, description: description, isPublic: !isPrivate, isAnnouncementChannel: isAnnouncement)
)

switch result {
case let .success((channel, _)):
return .done(response: channel)
case let .failure(error):
return .failure(error: UserFacingError(error: error))
}
}

struct ArchiveChannelRequest: APIRequest {
typealias Response = RawResponse

let courseId: Int
let channelId: Int64

var method: HTTPMethod {
return .post
}

var resourceName: String {
return "api/courses/\(courseId)/channels/\(channelId)/archive"
}
}

func archiveChannel(for courseId: Int, channelId: Int64) async -> NetworkResponse {
let result = await client.sendRequest(ArchiveChannelRequest(courseId: courseId, channelId: channelId))

switch result {
case .success:
return .success
case let .failure(error):
return .failure(error: error)
}
}

struct UnarchiveChannelRequest: APIRequest {
typealias Response = RawResponse

let courseId: Int
let channelId: Int64

var method: HTTPMethod {
return .post
}

var resourceName: String {
return "api/courses/\(courseId)/channels/\(channelId)/unarchive"
}
}

func unarchiveChannel(for courseId: Int, channelId: Int64) async -> NetworkResponse {
let result = await client.sendRequest(UnarchiveChannelRequest(courseId: courseId, channelId: channelId))

switch result {
case .success:
return .success
case let .failure(error):
return .failure(error: error)
}
}

struct GetUnresolvedChannelsRequest: APIRequest {
typealias Response = [UnresolvedChannelsResponse]
struct UnresolvedChannelsResponse: Codable {
let conversation: Conversation
}

let courseId: Int
let channelIds: [Int64]
var channelIdsString: String {
channelIds.map(String.init(describing:)).joined(separator: ",")
}

var method: HTTPMethod {
return .get
}

var params: [URLQueryItem] {
[
.init(name: "courseWideChannelIds", value: channelIdsString),
.init(name: "postSortCriterion", value: "CREATION_DATE"),
.init(name: "sortingOrder", value: "DESCENDING"),
.init(name: "pagingEnabled", value: "true"),
.init(name: "page", value: "0"),
.init(name: "size", value: "\(50)")
] + MessageRequestFilter(filterToUnresolved: true).queryItems
}

var resourceName: String {
return "api/courses/\(courseId)/messages"
}
}

func getUnresolvedChannelIds(for courseId: Int, and channelIds: [Int64]) async -> DataState<[Int64]> {
let result = await client.sendRequest(GetUnresolvedChannelsRequest(courseId: courseId, channelIds: channelIds))

switch result {
case let .success((conversations, _)):
let ids = conversations.map(\.conversation.id)
return .done(response: Array(Set(ids)))
case let .failure(error):
return DataState(error: error)
}
}
}
Loading

0 comments on commit da3018f

Please sign in to comment.