oficina / memoria Public

Restore recent accounts and return from native browser sign-in

Reviewed by GPT-6 Astra. Add saved account switching, app URL handlers, and domain-based Store bundle identifiers. Both Mac and iOS signed build 4 archives and exports verified under Team Tito.
Paul Campbell pushed by codex agent, operated by paul@keymail.dev 26497c8890c6dc9b8e00e93cf164607c74b233c2 parent cc3b29e
9 files changed, +145 −68
  • native/apple/Package.resolved +13 −13
  • native/apple/Package.swift +2 −2
  • native/apple/Sources/MemoriaApp/MemoriaApp.swift +3 −3
  • native/apple/Sources/MemoriaKit/MemoriaWorkspace.swift +8 −1
  • native/ios/Info.plist +35 −0
  • native/ios/project.yml +45 −31
  • native/macos/Info.plist +13 −0
  • native/macos/MemoriaMacStore.xcodeproj/project.pbxproj +5 −3
  • native/macos/project.yml +21 −15

CI passed — run details

diff --git a/native/apple/Package.resolved b/native/apple/Package.resolved
index 710f96c..cf50d40 100644
--- a/native/apple/Package.resolved
+++ b/native/apple/Package.resolved
@@ -1,22 +1,22 @@
{
- "pins": [
+ "pins" : [
{
- "identity": "native",
- "kind": "remoteSourceControl",
- "location": "https://amadan.net/rastrillo/native",
- "state": {
- "revision": "4c61d6283a188c95647e1d0e609e69d29c2e7fa1"
+ "identity" : "native",
+ "kind" : "remoteSourceControl",
+ "location" : "https://amadan.net/rastrillo/native",
+ "state" : {
+ "revision" : "229525909e1d6ac3b6a353d1c4d022798b0e9a24"
}
},
{
- "identity": "sparkle",
- "kind": "remoteSourceControl",
- "location": "https://github.com/sparkle-project/Sparkle",
- "state": {
- "revision": "ac2def288cbff5cfc7df3ffef6abdf45b72bcb0a",
- "version": "2.9.6"
+ "identity" : "sparkle",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/sparkle-project/Sparkle",
+ "state" : {
+ "revision" : "ac2def288cbff5cfc7df3ffef6abdf45b72bcb0a",
+ "version" : "2.9.6"
}
}
],
- "version": 2
+ "version" : 2
}
diff --git a/native/apple/Package.swift b/native/apple/Package.swift
index e243e19..56441a4 100644
--- a/native/apple/Package.swift
+++ b/native/apple/Package.swift
@@ -2,8 +2,8 @@
import PackageDescription
import Foundation
-let sharedNative: Package.Dependency = ProcessInfo.processInfo.environment["OFICINA_NATIVE_PACKAGE_PATH"].map { .package(path: $0) }
- ?? .package(url: "https://amadan.net/rastrillo/native", revision: "4c61d6283a188c95647e1d0e609e69d29c2e7fa1")
+let sharedNative: Package.Dependency = ProcessInfo.processInfo.environment["OFICINA_NATIVE_PACKAGE_PATH"].map { .package(name: "native", path: $0) }
+ ?? .package(url: "https://amadan.net/rastrillo/native", revision: "229525909e1d6ac3b6a353d1c4d022798b0e9a24")
let package = Package(name: "MemoriaNative", platforms: [.macOS(.v14), .iOS(.v17)],
products: [.library(name: "MemoriaKit", targets: ["MemoriaKit"]), .executable(name: "MemoriaMac", targets: ["MemoriaMac"])],
diff --git a/native/apple/Sources/MemoriaApp/MemoriaApp.swift b/native/apple/Sources/MemoriaApp/MemoriaApp.swift
index 6f04218..695327a 100644
--- a/native/apple/Sources/MemoriaApp/MemoriaApp.swift
+++ b/native/apple/Sources/MemoriaApp/MemoriaApp.swift
@@ -13,9 +13,9 @@ import SwiftUI
var body: some Scene {
WindowGroup {
Group {
- if let client = connection.client { MemoriaWorkspace(client: client, signOut: connection.signOut) }
- else { NativeSignInView("Oficina Memoria", systemImage: "books.vertical", connection: connection) }
- }.tint(Color(red: 0.48, green: 0.32, blue: 0.68))
+ if let client = connection.client { MemoriaWorkspace(client: client, accounts: connection.showAccounts, signOut: connection.signOut) }
+ else { NativeAccountsView("Oficina Memoria", systemImage: "books.vertical", connection: connection) }
+ }.id(connection.activeAccountID).onOpenURL(perform: connection.handleOpenURL).tint(Color(red: 0.48, green: 0.32, blue: 0.68))
#if os(macOS)
.frame(minWidth: 800, minHeight: 580)
#endif
diff --git a/native/apple/Sources/MemoriaKit/MemoriaWorkspace.swift b/native/apple/Sources/MemoriaKit/MemoriaWorkspace.swift
index ed3f35f..cbaa78e 100644
--- a/native/apple/Sources/MemoriaKit/MemoriaWorkspace.swift
+++ b/native/apple/Sources/MemoriaKit/MemoriaWorkspace.swift
@@ -4,11 +4,12 @@ import SwiftUI
@MainActor public struct MemoriaWorkspace: View {
let client: NativeHTTP
let signOut: () -> Void
+ private let accounts: (() -> Void)?
@StateObject private var model: MemoriaModel
@State private var selection: Int64?
@State private var adding = false
@State private var column: NavigationSplitViewColumn = .sidebar
- public init(client: NativeHTTP, model: MemoriaModel? = nil, signOut: @escaping () -> Void) { self.client = client; self.signOut = signOut; _model = StateObject(wrappedValue: model ?? MemoriaModel()) }
+ public init(client: NativeHTTP, model: MemoriaModel? = nil, accounts: (() -> Void)? = nil, signOut: @escaping () -> Void) { self.client = client; self.signOut = signOut; self.accounts = accounts; _model = StateObject(wrappedValue: model ?? MemoriaModel()) }
public var body: some View {
NavigationSplitView(preferredCompactColumn: $column) {
VStack(spacing: 0) {
@@ -50,6 +51,12 @@ import SwiftUI
Task { await model.search(client) }
}
.toolbar {
+ if let accounts {
+ ToolbarItem(placement: .navigation) {
+ Button("Accounts", systemImage: "chevron.backward", action: accounts)
+ }
+ }
+
ToolbarItem(placement: .primaryAction) { Button("Add note", systemImage: "plus") { adding = true } }
ToolbarItem {
Menu("Account", systemImage: "person.crop.circle") {
diff --git a/native/ios/Info.plist b/native/ios/Info.plist
new file mode 100644
index 0000000..78ca10c
--- /dev/null
+++ b/native/ios/Info.plist
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
+ <key>CFBundleExecutable</key>
+ <string>$(EXECUTABLE_NAME)</string>
+ <key>CFBundleIdentifier</key>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>$(PRODUCT_NAME)</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>$(MARKETING_VERSION)</string>
+ <key>CFBundleURLTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>CFBundleURLName</key>
+ <string>works.oficina.memoria.signin</string>
+ <key>CFBundleURLSchemes</key>
+ <array>
+ <string>works.oficina.memoria</string>
+ </array>
+ </dict>
+ </array>
+ <key>CFBundleVersion</key>
+ <string>$(CURRENT_PROJECT_VERSION)</string>
+</dict>
+</plist>
diff --git a/native/ios/project.yml b/native/ios/project.yml
index 2479aaf..024fa6d 100644
--- a/native/ios/project.yml
+++ b/native/ios/project.yml
@@ -8,64 +8,77 @@ packages:
path: ../apple
RastrilloNative:
url: https://amadan.net/rastrillo/native
- revision: 4c61d6283a188c95647e1d0e609e69d29c2e7fa1
+ revision: 229525909e1d6ac3b6a353d1c4d022798b0e9a24
settings:
base:
SWIFT_VERSION: '5.0'
CODE_SIGN_STYLE: Automatic
- MARKETING_VERSION: '0.1.0'
+ MARKETING_VERSION: 0.1.0
CURRENT_PROJECT_VERSION: '1'
targets:
MemoriaPhone:
type: application
platform: iOS
sources:
- - ../apple/Sources/MemoriaApp
- - Assets.xcassets
- - path: ../LICENSE.lucide
- buildPhase: resources
- - path: ../PrivacyInfo.xcprivacy
- buildPhase: resources
+ - ../apple/Sources/MemoriaApp
+ - Assets.xcassets
+ - path: ../LICENSE.lucide
+ buildPhase: resources
+ - path: ../PrivacyInfo.xcprivacy
+ buildPhase: resources
dependencies:
- - package: MemoriaNative
- product: MemoriaKit
- - package: RastrilloNative
- product: RastrilloApple
+ - package: MemoriaNative
+ product: MemoriaKit
+ - package: RastrilloNative
+ product: RastrilloApple
settings:
base:
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
- PRODUCT_BUNDLE_IDENTIFIER: net.amadan.oficina.memoria.ios
- TARGETED_DEVICE_FAMILY: '1,2'
- GENERATE_INFOPLIST_FILE: YES
+ PROVISIONING_PROFILE_SPECIFIER: $(OFICINA_PROVISIONING_PROFILE)
+ PRODUCT_BUNDLE_IDENTIFIER: works.oficina.memoria
+ TARGETED_DEVICE_FAMILY: 1,2
+ GENERATE_INFOPLIST_FILE: true
INFOPLIST_KEY_CFBundleDisplayName: Oficina Memoria
- INFOPLIST_KEY_UILaunchScreen_Generation: YES
- INFOPLIST_KEY_UISupportedInterfaceOrientations: UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortraitUpsideDown
-
+ INFOPLIST_KEY_UILaunchScreen_Generation: true
+ INFOPLIST_KEY_UISupportedInterfaceOrientations: UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight
+ UIInterfaceOrientationPortraitUpsideDown
+ info:
+ path: Info.plist
+ properties:
+ CFBundleURLTypes:
+ - CFBundleURLName: works.oficina.memoria.signin
+ CFBundleURLSchemes:
+ - works.oficina.memoria
+ CFBundleTypeRole: Editor
+ CFBundleShortVersionString: $(MARKETING_VERSION)
+ CFBundleVersion: $(CURRENT_PROJECT_VERSION)
MemoriaReviewPhone:
type: application
platform: iOS
- sources: [Review]
+ sources:
+ - Review
dependencies:
- - package: MemoriaNative
- product: MemoriaKit
- - package: RastrilloNative
- product: RastrilloApple
+ - package: MemoriaNative
+ product: MemoriaKit
+ - package: RastrilloNative
+ product: RastrilloApple
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: net.amadan.oficina.memoria.review
- TARGETED_DEVICE_FAMILY: '1,2'
- GENERATE_INFOPLIST_FILE: YES
- INFOPLIST_KEY_UILaunchScreen_Generation: YES
-
+ TARGETED_DEVICE_FAMILY: 1,2
+ GENERATE_INFOPLIST_FILE: true
+ INFOPLIST_KEY_UILaunchScreen_Generation: true
MemoriaPhoneUITests:
type: bundle.ui-testing
platform: iOS
- sources: [UITests]
+ sources:
+ - UITests
dependencies:
- - target: MemoriaReviewPhone
+ - target: MemoriaReviewPhone
settings:
base:
- GENERATE_INFOPLIST_FILE: YES
+ GENERATE_INFOPLIST_FILE: true
TEST_TARGET_NAME: MemoriaReviewPhone
schemes:
MemoriaReviewPhone:
@@ -73,4 +86,5 @@ schemes:
targets:
MemoriaReviewPhone: all
test:
- targets: [MemoriaPhoneUITests]
+ targets:
+ - MemoriaPhoneUITests
diff --git a/native/macos/Info.plist b/native/macos/Info.plist
index 3396f10..c656590 100644
--- a/native/macos/Info.plist
+++ b/native/macos/Info.plist
@@ -20,6 +20,19 @@
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
+ <key>CFBundleURLTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>CFBundleURLName</key>
+ <string>works.oficina.memoria.signin</string>
+ <key>CFBundleURLSchemes</key>
+ <array>
+ <string>works.oficina.memoria</string>
+ </array>
+ </dict>
+ </array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationCategoryType</key>
diff --git a/native/macos/MemoriaMacStore.xcodeproj/project.pbxproj b/native/macos/MemoriaMacStore.xcodeproj/project.pbxproj
index ee3a5c9..9f24de4 100644
--- a/native/macos/MemoriaMacStore.xcodeproj/project.pbxproj
+++ b/native/macos/MemoriaMacStore.xcodeproj/project.pbxproj
@@ -240,7 +240,8 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = net.amadan.oficina.memoria;
+ PRODUCT_BUNDLE_IDENTIFIER = works.oficina.memoria;
+ PROVISIONING_PROFILE_SPECIFIER = "$(OFICINA_PROVISIONING_PROFILE)";
SDKROOT = macosx;
};
name = Debug;
@@ -256,7 +257,8 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = net.amadan.oficina.memoria;
+ PRODUCT_BUNDLE_IDENTIFIER = works.oficina.memoria;
+ PROVISIONING_PROFILE_SPECIFIER = "$(OFICINA_PROVISIONING_PROFILE)";
SDKROOT = macosx;
};
name = Release;
@@ -364,7 +366,7 @@
repositoryURL = "https://amadan.net/rastrillo/native";
requirement = {
kind = revision;
- revision = 4c61d6283a188c95647e1d0e609e69d29c2e7fa1;
+ revision = 229525909e1d6ac3b6a353d1c4d022798b0e9a24;
};
};
/* End XCRemoteSwiftPackageReference section */
diff --git a/native/macos/project.yml b/native/macos/project.yml
index c371057..2988187 100644
--- a/native/macos/project.yml
+++ b/native/macos/project.yml
@@ -7,31 +7,31 @@ packages:
path: ../apple
RastrilloNative:
url: https://amadan.net/rastrillo/native
- revision: 4c61d6283a188c95647e1d0e609e69d29c2e7fa1
+ revision: 229525909e1d6ac3b6a353d1c4d022798b0e9a24
settings:
base:
SWIFT_VERSION: '5.0'
CODE_SIGN_STYLE: Automatic
- MARKETING_VERSION: '0.1.0'
+ MARKETING_VERSION: 0.1.0
CURRENT_PROJECT_VERSION: '3'
- ENABLE_HARDENED_RUNTIME: YES
+ ENABLE_HARDENED_RUNTIME: true
targets:
MemoriaMacStore:
type: application
platform: macOS
sources:
- - ../apple/Sources/MemoriaApp
- - path: AppIcon.icns
- buildPhase: resources
- - path: ../LICENSE.lucide
- buildPhase: resources
- - path: ../PrivacyInfo.xcprivacy
- buildPhase: resources
+ - ../apple/Sources/MemoriaApp
+ - path: AppIcon.icns
+ buildPhase: resources
+ - path: ../LICENSE.lucide
+ buildPhase: resources
+ - path: ../PrivacyInfo.xcprivacy
+ buildPhase: resources
dependencies:
- - package: MemoriaNative
- product: MemoriaKit
- - package: RastrilloNative
- product: RastrilloApple
+ - package: MemoriaNative
+ product: MemoriaKit
+ - package: RastrilloNative
+ product: RastrilloApple
info:
path: Info.plist
properties:
@@ -42,7 +42,13 @@ targets:
CFBundleIconFile: AppIcon
LSApplicationCategoryType: public.app-category.productivity
NSHighResolutionCapable: true
+ CFBundleURLTypes:
+ - CFBundleURLName: works.oficina.memoria.signin
+ CFBundleURLSchemes:
+ - works.oficina.memoria
+ CFBundleTypeRole: Editor
settings:
base:
- PRODUCT_BUNDLE_IDENTIFIER: net.amadan.oficina.memoria
+ PROVISIONING_PROFILE_SPECIFIER: $(OFICINA_PROVISIONING_PROFILE)
+ PRODUCT_BUNDLE_IDENTIFIER: works.oficina.memoria
CODE_SIGN_ENTITLEMENTS: AppStore.entitlements