forked from firka/firka
Update app group identifiers to unify naming convention across the project
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
|
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
|
||||||
<string>$(TeamIdentifierPrefix)app.firka.firkaa</string>
|
<string>$(TeamIdentifierPrefix)app.firka.firka</string>
|
||||||
<key>com.apple.security.application-groups</key>
|
<key>com.apple.security.application-groups</key>
|
||||||
<array>
|
<array>
|
||||||
<string>group.app.firka.firka</string>
|
<string>group.app.firka.firka</string>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class WatchL10n {
|
|||||||
private let languageKey = "watch_language"
|
private let languageKey = "watch_language"
|
||||||
private let syncWithiPhoneKey = "watch_sync_language_with_iphone"
|
private let syncWithiPhoneKey = "watch_sync_language_with_iphone"
|
||||||
private let lastAppliedSharedLanguageVersionKey = "watch_last_applied_shared_language_version"
|
private let lastAppliedSharedLanguageVersionKey = "watch_last_applied_shared_language_version"
|
||||||
private static let appGroupID = "group.app.firka.firkaa"
|
private static let appGroupID = "group.app.firka.firka"
|
||||||
private var appGroupDefaults: UserDefaults? {
|
private var appGroupDefaults: UserDefaults? {
|
||||||
UserDefaults(suiteName: Self.appGroupID)
|
UserDefaults(suiteName: Self.appGroupID)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class DataStore {
|
|||||||
(error == "token_expired" || error == "no_token") && recoveryAttempted && !isRecoveringToken
|
(error == "token_expired" || error == "no_token") && recoveryAttempted && !isRecoveringToken
|
||||||
}
|
}
|
||||||
|
|
||||||
private let appGroupID = "group.app.firka.firkaa"
|
private let appGroupID = "group.app.firka.firka"
|
||||||
private let cacheFileName = "watch_data.json"
|
private let cacheFileName = "watch_data.json"
|
||||||
private let lastHandledSessionStateVersionKey = "firka.watch.last_handled_session_state_version"
|
private let lastHandledSessionStateVersionKey = "firka.watch.last_handled_session_state_version"
|
||||||
private let lastHandledSessionActiveStudentIdNormKey = "firka.watch.last_handled_session_active_student_id_norm"
|
private let lastHandledSessionActiveStudentIdNormKey = "firka.watch.last_handled_session_active_student_id_norm"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import SwiftUI
|
|||||||
// MARK: - Complication Localization Helper
|
// MARK: - Complication Localization Helper
|
||||||
|
|
||||||
private struct ComplicationL10n {
|
private struct ComplicationL10n {
|
||||||
private static let appGroupID = "group.app.firka.firkaa"
|
private static let appGroupID = "group.app.firka.firka"
|
||||||
|
|
||||||
enum Language: String {
|
enum Language: String {
|
||||||
case hungarian = "hu"
|
case hungarian = "hu"
|
||||||
@@ -63,7 +63,7 @@ private struct ComplicationL10n {
|
|||||||
// MARK: - Watch Cache Loader
|
// MARK: - Watch Cache Loader
|
||||||
|
|
||||||
private struct WatchCacheLoader {
|
private struct WatchCacheLoader {
|
||||||
private static let appGroupID = "group.app.firka.firkaa"
|
private static let appGroupID = "group.app.firka.firka"
|
||||||
private static let cacheFileName = "watch_data.json"
|
private static let cacheFileName = "watch_data.json"
|
||||||
|
|
||||||
static func loadWidgetData() -> WidgetData? {
|
static func loadWidgetData() -> WidgetData? {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
|
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
|
||||||
<string>$(TeamIdentifierPrefix)app.firka.firkaa</string>
|
<string>$(TeamIdentifierPrefix)app.firka.firka</string>
|
||||||
<key>com.apple.security.application-groups</key>
|
<key>com.apple.security.application-groups</key>
|
||||||
<array>
|
<array>
|
||||||
<string>group.app.firka.firka</string>
|
<string>group.app.firka.firka</string>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import WidgetKit
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
import AppIntents
|
import AppIntents
|
||||||
|
|
||||||
private let appGroup = "group.app.firka.firkaa"
|
private let appGroup = "group.app.firka.firka"
|
||||||
|
|
||||||
// MARK: - Navigation Intents (iOS 16+, used by Controls and Shortcuts)
|
// MARK: - Navigation Intents (iOS 16+, used by Controls and Shortcuts)
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ struct OpenTimetableIntent: AppIntent {
|
|||||||
|
|
||||||
@available(iOS 18.0, *)
|
@available(iOS 18.0, *)
|
||||||
struct HomeControl: ControlWidget {
|
struct HomeControl: ControlWidget {
|
||||||
static let kind = "app.firka.firkaa.control.home"
|
static let kind = "app.firka.firka.control.home"
|
||||||
|
|
||||||
var body: some ControlWidgetConfiguration {
|
var body: some ControlWidgetConfiguration {
|
||||||
StaticControlConfiguration(kind: Self.kind) {
|
StaticControlConfiguration(kind: Self.kind) {
|
||||||
@@ -63,7 +63,7 @@ struct HomeControl: ControlWidget {
|
|||||||
|
|
||||||
@available(iOS 18.0, *)
|
@available(iOS 18.0, *)
|
||||||
struct GradesControl: ControlWidget {
|
struct GradesControl: ControlWidget {
|
||||||
static let kind = "app.firka.firkaa.control.grades"
|
static let kind = "app.firka.firka.control.grades"
|
||||||
|
|
||||||
var body: some ControlWidgetConfiguration {
|
var body: some ControlWidgetConfiguration {
|
||||||
StaticControlConfiguration(kind: Self.kind) {
|
StaticControlConfiguration(kind: Self.kind) {
|
||||||
@@ -80,7 +80,7 @@ struct GradesControl: ControlWidget {
|
|||||||
|
|
||||||
@available(iOS 18.0, *)
|
@available(iOS 18.0, *)
|
||||||
struct TimetableControl: ControlWidget {
|
struct TimetableControl: ControlWidget {
|
||||||
static let kind = "app.firka.firkaa.control.timetable"
|
static let kind = "app.firka.firka.control.timetable"
|
||||||
|
|
||||||
var body: some ControlWidgetConfiguration {
|
var body: some ControlWidgetConfiguration {
|
||||||
StaticControlConfiguration(kind: Self.kind) {
|
StaticControlConfiguration(kind: Self.kind) {
|
||||||
|
|||||||
@@ -1587,7 +1587,7 @@
|
|||||||
INFOPLIST_KEY_CFBundleDisplayName = FirkaWatch;
|
INFOPLIST_KEY_CFBundleDisplayName = FirkaWatch;
|
||||||
INFOPLIST_KEY_NSSupportsLiveActivities = YES;
|
INFOPLIST_KEY_NSSupportsLiveActivities = YES;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||||
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = app.firka.firkaa;
|
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = app.firka.firka;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
@@ -1640,7 +1640,7 @@
|
|||||||
INFOPLIST_KEY_CFBundleDisplayName = FirkaWatch;
|
INFOPLIST_KEY_CFBundleDisplayName = FirkaWatch;
|
||||||
INFOPLIST_KEY_NSSupportsLiveActivities = YES;
|
INFOPLIST_KEY_NSSupportsLiveActivities = YES;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||||
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = app.firka.firkaa;
|
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = app.firka.firka;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
@@ -1690,7 +1690,7 @@
|
|||||||
INFOPLIST_KEY_CFBundleDisplayName = FirkaWatch;
|
INFOPLIST_KEY_CFBundleDisplayName = FirkaWatch;
|
||||||
INFOPLIST_KEY_NSSupportsLiveActivities = YES;
|
INFOPLIST_KEY_NSSupportsLiveActivities = YES;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||||
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = app.firka.firkaa;
|
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = app.firka.firka;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ import BackgroundTasks
|
|||||||
widgetDeepLinkChannel = FlutterMethodChannel(name: "firka.app/widget_deep_link", binaryMessenger: controller.binaryMessenger)
|
widgetDeepLinkChannel = FlutterMethodChannel(name: "firka.app/widget_deep_link", binaryMessenger: controller.binaryMessenger)
|
||||||
widgetDeepLinkChannel?.setMethodCallHandler { [weak self] (call: FlutterMethodCall, result: @escaping FlutterResult) in
|
widgetDeepLinkChannel?.setMethodCallHandler { [weak self] (call: FlutterMethodCall, result: @escaping FlutterResult) in
|
||||||
if call.method == "getPendingDeepLink" {
|
if call.method == "getPendingDeepLink" {
|
||||||
if let controlNav = UserDefaults(suiteName: "group.app.firka.firkaa")?.string(forKey: "controlNavigation") {
|
if let controlNav = UserDefaults(suiteName: "group.app.firka.firka")?.string(forKey: "controlNavigation") {
|
||||||
UserDefaults(suiteName: "group.app.firka.firkaa")?.removeObject(forKey: "controlNavigation")
|
UserDefaults(suiteName: "group.app.firka.firka")?.removeObject(forKey: "controlNavigation")
|
||||||
result(controlNav)
|
result(controlNav)
|
||||||
} else if let link = self?.pendingWidgetDeepLink {
|
} else if let link = self?.pendingWidgetDeepLink {
|
||||||
self?.pendingWidgetDeepLink = nil
|
self?.pendingWidgetDeepLink = nil
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class HomeWidgetMethodChannel {
|
|||||||
switch call.method {
|
switch call.method {
|
||||||
case "getAppGroupDirectory":
|
case "getAppGroupDirectory":
|
||||||
if let containerURL = FileManager.default.containerURL(
|
if let containerURL = FileManager.default.containerURL(
|
||||||
forSecurityApplicationGroupIdentifier: "group.app.firka.firkaa"
|
forSecurityApplicationGroupIdentifier: "group.app.firka.firka"
|
||||||
) {
|
) {
|
||||||
result(containerURL.path)
|
result(containerURL.path)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleURLName</key>
|
<key>CFBundleURLName</key>
|
||||||
<string>app.firka.firkaa</string>
|
<string>app.firka.firka</string>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>firka</string>
|
<string>firka</string>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<key>aps-environment</key>
|
<key>aps-environment</key>
|
||||||
<string>development</string>
|
<string>development</string>
|
||||||
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
|
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
|
||||||
<string>$(TeamIdentifierPrefix)app.firka.firkaa</string>
|
<string>$(TeamIdentifierPrefix)app.firka.firka</string>
|
||||||
<key>com.apple.developer.usernotifications.time-sensitive</key>
|
<key>com.apple.developer.usernotifications.time-sensitive</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.application-groups</key>
|
<key>com.apple.security.application-groups</key>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ enum TokenError: Error {
|
|||||||
class TokenManager {
|
class TokenManager {
|
||||||
static let shared = TokenManager()
|
static let shared = TokenManager()
|
||||||
|
|
||||||
private let appGroupID = "group.app.firka.firkaa"
|
private let appGroupID = "group.app.firka.firka"
|
||||||
private let tokenFileName = "watch_token.json"
|
private let tokenFileName = "watch_token.json"
|
||||||
|
|
||||||
private static let keychainService = "app.firka.watch.token"
|
private static let keychainService = "app.firka.watch.token"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ struct WidgetData: Codable {
|
|||||||
|
|
||||||
static func load() -> WidgetData? {
|
static func load() -> WidgetData? {
|
||||||
guard let containerURL = FileManager.default.containerURL(
|
guard let containerURL = FileManager.default.containerURL(
|
||||||
forSecurityApplicationGroupIdentifier: "group.app.firka.firkaa"
|
forSecurityApplicationGroupIdentifier: "group.app.firka.firka"
|
||||||
) else {
|
) else {
|
||||||
lastError = "No App Group container"
|
lastError = "No App Group container"
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user