From 372a891f976ff55db36115ab22f317f5c17d7fad Mon Sep 17 00:00:00 2001 From: Rio Keefe Date: Sat, 3 May 2025 11:21:58 +0100 Subject: [PATCH] feat: iOS sharing is now working --- .../gen/apple/Haystack.xcodeproj/project.pbxproj | 2 ++ .../src-tauri/gen/apple/Haystack/Haystack.entitlements | 10 ++++++++++ .../gen/apple/Haystack/ShareViewController.swift | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 frontend/src-tauri/gen/apple/Haystack/Haystack.entitlements diff --git a/frontend/src-tauri/gen/apple/Haystack.xcodeproj/project.pbxproj b/frontend/src-tauri/gen/apple/Haystack.xcodeproj/project.pbxproj index bd921c2..af55a11 100644 --- a/frontend/src-tauri/gen/apple/Haystack.xcodeproj/project.pbxproj +++ b/frontend/src-tauri/gen/apple/Haystack.xcodeproj/project.pbxproj @@ -438,6 +438,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = Haystack/Haystack.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; @@ -521,6 +522,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = Haystack/Haystack.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; diff --git a/frontend/src-tauri/gen/apple/Haystack/Haystack.entitlements b/frontend/src-tauri/gen/apple/Haystack/Haystack.entitlements new file mode 100644 index 0000000..847b16e --- /dev/null +++ b/frontend/src-tauri/gen/apple/Haystack/Haystack.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.application-groups + + group.com.haystack.app + + + diff --git a/frontend/src-tauri/gen/apple/Haystack/ShareViewController.swift b/frontend/src-tauri/gen/apple/Haystack/ShareViewController.swift index 7ed03e4..ea1bb00 100644 --- a/frontend/src-tauri/gen/apple/Haystack/ShareViewController.swift +++ b/frontend/src-tauri/gen/apple/Haystack/ShareViewController.swift @@ -133,7 +133,7 @@ class ShareViewController: SLComposeServiceViewController { var request = URLRequest(url: uploadURLwithName) request.httpMethod = "POST" request.httpBody = rawData - request.setValue("application/octet-stream", forHTTPHeaderField: "Content-Type") + request.setValue("application/oclet-stream", forHTTPHeaderField: "Content-Type") request.setValue("Bearer \(bearerToken)", forHTTPHeaderField: "Authorization") let task = URLSession.shared.dataTask(with: request) { [weak self] (data, response, error) in