From 6780736d9c6c4e893c4e92f2412bc304f9f05360 Mon Sep 17 00:00:00 2001 From: Anthony Ronning <101225832+AnthonyRonning@users.noreply.github.com> Date: Sat, 24 Oct 2026 22:48:30 +0000 Subject: [PATCH 1/6] research(ios): adopt the UIScene life cycle Apps built with the iOS 27 SDK must adopt the scene-based life cycle or UIKit aborts at launch (_UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption). tauri-cli merges src-tauri/Info.ios.plist into the generated iOS plist, so the manifest stays out of the shared Info.plist that macOS also uses. One scene only: tao 0.37 creates a single WebView window, and any extra scene iPad or iPhone Duo opened would have no WebView and render black. The delegate is tao's TaoSceneDelegate. iOS 26 SDK builds behave the same with the manifest, so this lands before the Xcode 27.1 bump. Co-Authored-By: Claude Opus 5.5 --- .../frontend/src-tauri/Info.ios.plist | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 apps/maple-research/frontend/src-tauri/Info.ios.plist diff --git a/apps/maple-research/frontend/src-tauri/Info.ios.plist b/apps/maple-research/frontend/src-tauri/Info.ios.plist new file mode 100644 index 000000000..da3db42d6 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/Info.ios.plist @@ -0,0 +1,25 @@ + + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + TaoSceneDelegate + + + + + + From 3aba2f58b27ca393ecf8a2446dd97e90464ede25 Mon Sep 17 00:00:00 2001 From: Anthony Ronning <101225832+AnthonyRonning@users.noreply.github.com> Date: Thu, 29 Oct 2026 18:17:24 +0000 Subject: [PATCH 2/6] research: vendor tauri-plugin-sign-in-with-apple 1.0.2 unmodified The crates.io release as published (sha256 e9402eb8a70fdff5127fccc1f1666ebb06b5efc10e0eb656d8a70c798e26142e), so the next commits show Maple's changes as plain diffs. Left out: .cargo_vcs_info.json, as for the vendored tao, plus the author's Gradle cache (android/.gradle), the build-generated permissions/autogenerated and the plugin's pnpm-lock.yaml, which this app's build never reads. Co-Authored-By: Claude Opus 5.5 --- .../.gitignore | 17 + .../Cargo.toml | 49 +++ .../Cargo.toml.orig | 18 + .../LICENSE | 7 + .../README.md | 13 + .../android/.gitignore | 2 + .../android/build.gradle.kts | 44 +++ .../android/proguard-rules.pro | 21 ++ .../android/settings.gradle | 31 ++ .../java/ExampleInstrumentedTest.kt | 24 ++ .../android/src/main/AndroidManifest.xml | 3 + .../android/src/main/java/Example.kt | 10 + .../android/src/main/java/ExamplePlugin.kt | 28 ++ .../android/src/test/java/ExampleUnitTest.kt | 17 + .../build.rs | 8 + .../guest-js/index.ts | 31 ++ .../ios/.gitignore | 10 + .../ios/Package.swift | 32 ++ .../ios/README.md | 3 + ...gnInWithAppleAuthorizationController.swift | 82 +++++ .../ios/Sources/SignInWithApplePlugin.swift | 58 ++++ .../ios/Tests/PluginTests/PluginTests.swift | 8 + .../package.json | 34 ++ .../permissions/default.toml | 3 + .../permissions/schemas/schema.json | 315 ++++++++++++++++++ .../rollup.config.js | 31 ++ .../src/commands.rs | 13 + .../src/desktop.rs | 20 ++ .../src/error.rs | 23 ++ .../src/lib.rs | 48 +++ .../src/mobile.rs | 34 ++ .../src/models.rs | 36 ++ .../tsconfig.json | 14 + 33 files changed, 1087 insertions(+) create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/.gitignore create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/Cargo.toml create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/Cargo.toml.orig create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/LICENSE create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/README.md create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/.gitignore create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/build.gradle.kts create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/proguard-rules.pro create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/settings.gradle create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/androidTest/java/ExampleInstrumentedTest.kt create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/main/AndroidManifest.xml create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/main/java/Example.kt create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/main/java/ExamplePlugin.kt create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/test/java/ExampleUnitTest.kt create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/build.rs create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/guest-js/index.ts create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/.gitignore create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Package.swift create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/README.md create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Sources/SignInWithAppleAuthorizationController.swift create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Sources/SignInWithApplePlugin.swift create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Tests/PluginTests/PluginTests.swift create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/package.json create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/permissions/default.toml create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/permissions/schemas/schema.json create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/rollup.config.js create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/commands.rs create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/desktop.rs create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/error.rs create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/lib.rs create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/mobile.rs create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/models.rs create mode 100644 apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/tsconfig.json diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/.gitignore b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/.gitignore new file mode 100644 index 000000000..50d8e32e8 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/.gitignore @@ -0,0 +1,17 @@ +/.vs +.DS_Store +.Thumbs.db +*.sublime* +.idea/ +debug.log +package-lock.json +.vscode/settings.json +yarn.lock + +/.tauri +/target +Cargo.lock +node_modules/ + +dist-js +dist diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/Cargo.toml b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/Cargo.toml new file mode 100644 index 000000000..df1bb1bed --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/Cargo.toml @@ -0,0 +1,49 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies. +# +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. + +[package] +edition = "2021" +rust-version = "1.77.2" +name = "tauri-plugin-sign-in-with-apple" +version = "1.0.2" +authors = ["Manaf941"] +build = "build.rs" +links = "tauri-plugin-sign-in-with-apple" +exclude = [ + "/examples", + "/webview-dist", + "/webview-src", + "/node_modules", +] +autobins = false +autoexamples = false +autotests = false +autobenches = false +description = "Add Sign In With Apple capabilities to your Tauri iOS App." +readme = "README.md" +license = "MIT" + +[lib] +name = "tauri_plugin_sign_in_with_apple" +path = "src/lib.rs" + +[dependencies.serde] +version = "1.0" + +[dependencies.tauri] +version = "2.1.0" + +[dependencies.thiserror] +version = "2" + +[build-dependencies.tauri-plugin] +version = "2.0.2" +features = ["build"] diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/Cargo.toml.orig b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/Cargo.toml.orig new file mode 100644 index 000000000..991605794 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/Cargo.toml.orig @@ -0,0 +1,18 @@ +[package] +name = "tauri-plugin-sign-in-with-apple" +version = "1.0.2" +authors = [ "Manaf941" ] +description = "Add Sign In With Apple capabilities to your Tauri iOS App." +license = "MIT" +edition = "2021" +rust-version = "1.77.2" +exclude = ["/examples", "/webview-dist", "/webview-src", "/node_modules"] +links = "tauri-plugin-sign-in-with-apple" + +[dependencies] +tauri = { version = "2.1.0" } +serde = "1.0" +thiserror = "2" + +[build-dependencies] +tauri-plugin = { version = "2.0.2", features = ["build"] } diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/LICENSE b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/LICENSE new file mode 100644 index 000000000..8cb345be2 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/LICENSE @@ -0,0 +1,7 @@ +Copyright 2024 Manaf Mhamdi Alaoui + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/README.md b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/README.md new file mode 100644 index 000000000..792e168d1 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/README.md @@ -0,0 +1,13 @@ +# Tauri Plugin sign_in_with_apple + +probably unstable, use with caution ! + +For now, only iOS works. + +For other platform, you should probably use the Sign In with Apple Web SDK. + +https://developer.apple.com/help/account/configure-app-capabilities/configure-sign-in-with-apple-for-the-web/ + +in case of any question, contact me: +Discord: @manaf941 +Twitter: @manaaaaaaaf \ No newline at end of file diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/.gitignore b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/.gitignore new file mode 100644 index 000000000..c0f21ec2f --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/.gitignore @@ -0,0 +1,2 @@ +/build +/.tauri diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/build.gradle.kts b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/build.gradle.kts new file mode 100644 index 000000000..0ed421e5a --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.library") + id("org.jetbrains.kotlin.android") +} + +android { + namespace = "ch.manaf.tauri_plugins.sign_in_with_apple" + compileSdk = 34 + + defaultConfig { + minSdk = 21 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + + implementation("androidx.core:core-ktx:1.9.0") + implementation("androidx.appcompat:appcompat:1.6.0") + implementation("com.google.android.material:material:1.7.0") + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test.ext:junit:1.1.5") + androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") + implementation(project(":tauri-android")) +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/proguard-rules.pro b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/proguard-rules.pro new file mode 100644 index 000000000..481bb4348 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/settings.gradle b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/settings.gradle new file mode 100644 index 000000000..d7782a40d --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/settings.gradle @@ -0,0 +1,31 @@ +pluginManagement { + repositories { + mavenCentral() + gradlePluginPortal() + google() + } + resolutionStrategy { + eachPlugin { + switch (requested.id.id) { + case "com.android.library": + useVersion("8.0.2") + break + case "org.jetbrains.kotlin.android": + useVersion("1.8.20") + break + } + } + } +} + +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + mavenCentral() + google() + + } +} + +include ':tauri-android' +project(':tauri-android').projectDir = new File('./.tauri/tauri-api') diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/androidTest/java/ExampleInstrumentedTest.kt b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/androidTest/java/ExampleInstrumentedTest.kt new file mode 100644 index 000000000..7f1e75be0 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/androidTest/java/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package ch.manaf.tauri_plugins.sign_in_with_apple + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("ch.manaf.tauri_plugins.sign_in_with_apple", appContext.packageName) + } +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/main/AndroidManifest.xml b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..9a40236b9 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/main/java/Example.kt b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/main/java/Example.kt new file mode 100644 index 000000000..28c6203ea --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/main/java/Example.kt @@ -0,0 +1,10 @@ +package ch.manaf.tauri_plugins.sign_in_with_apple + +import android.util.Log + +class Example { + fun pong(value: String): String { + Log.i("Pong", value) + return value + } +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/main/java/ExamplePlugin.kt b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/main/java/ExamplePlugin.kt new file mode 100644 index 000000000..045f0c6ff --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/main/java/ExamplePlugin.kt @@ -0,0 +1,28 @@ +package ch.manaf.tauri_plugins.sign_in_with_apple + +import android.app.Activity +import app.tauri.annotation.Command +import app.tauri.annotation.InvokeArg +import app.tauri.annotation.TauriPlugin +import app.tauri.plugin.JSObject +import app.tauri.plugin.Plugin +import app.tauri.plugin.Invoke + +@InvokeArg +class PingArgs { + var value: String? = null +} + +@TauriPlugin +class ExamplePlugin(private val activity: Activity): Plugin(activity) { + private val implementation = Example() + + @Command + fun ping(invoke: Invoke) { + val args = invoke.parseArgs(PingArgs::class.java) + + val ret = JSObject() + ret.put("value", implementation.pong(args.value ?: "default value :(")) + invoke.resolve(ret) + } +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/test/java/ExampleUnitTest.kt b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/test/java/ExampleUnitTest.kt new file mode 100644 index 000000000..d1c3ad2b5 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/android/src/test/java/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package ch.manaf.tauri_plugins.sign_in_with_apple + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/build.rs b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/build.rs new file mode 100644 index 000000000..0ca719650 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/build.rs @@ -0,0 +1,8 @@ +const COMMANDS: &[&str] = &["get_apple_id_credential"]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS) + .android_path("android") + .ios_path("ios") + .build(); +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/guest-js/index.ts b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/guest-js/index.ts new file mode 100644 index 000000000..99c1234f9 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/guest-js/index.ts @@ -0,0 +1,31 @@ +import { invoke } from '@tauri-apps/api/core' + +export type Scope = "fullName" | "email" +export interface AppleIDAuthorizationRequest { + scope: Scope[], + nonce?: string, + state?: string +} + +export interface AppleIDAuthorizationResponse { + // usually not null + userIdentifier: string | null, + + givenName: string | null, + familyName: string | null, + email: string | null, + + authorizationCode: string, + identityToken: string | null, + state: string | null +} + +export async function get_apple_id_credential(request: AppleIDAuthorizationRequest): Promise { + const result = await invoke('plugin:sign-in-with-apple|get_apple_id_credential', { + payload: request, + }) + + return result +} + + diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/.gitignore b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/.gitignore new file mode 100644 index 000000000..5922fdaa5 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/.gitignore @@ -0,0 +1,10 @@ +.DS_Store +/.build +/Packages +/*.xcodeproj +xcuserdata/ +DerivedData/ +.swiftpm/config/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc +Package.resolved diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Package.swift b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Package.swift new file mode 100644 index 000000000..c95f5c0b6 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Package.swift @@ -0,0 +1,32 @@ +// swift-tools-version:5.3 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "tauri-plugin-sign-in-with-apple", + platforms: [ + .macOS(.v10_13), + .iOS(.v13), + ], + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "tauri-plugin-sign-in-with-apple", + type: .static, + targets: ["tauri-plugin-sign-in-with-apple"]), + ], + dependencies: [ + .package(name: "Tauri", path: "../.tauri/tauri-api") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "tauri-plugin-sign-in-with-apple", + dependencies: [ + .byName(name: "Tauri") + ], + path: "Sources") + ] +) diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/README.md b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/README.md new file mode 100644 index 000000000..9d6980b0f --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/README.md @@ -0,0 +1,3 @@ +# Tauri Plugin sign_in_with_apple + +A description of this package. diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Sources/SignInWithAppleAuthorizationController.swift b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Sources/SignInWithAppleAuthorizationController.swift new file mode 100644 index 000000000..9ed7f9c36 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Sources/SignInWithAppleAuthorizationController.swift @@ -0,0 +1,82 @@ +// +// SignInWithAppleAuthorizationController.swift +// tauri-plugin-sign-in-with-apple +// +// Created by Manaf Mhamdi Alaoui on 10.11.2024. +// + +import AuthenticationServices +import Tauri + +class SignInWithAppleAuthorizationController: NSObject, ASAuthorizationControllerDelegate { + var invoke: Invoke + init(_ invoke: Invoke) { + self.invoke = invoke + } + + public func authorize(req: AppleIDAuthorizationRequest) { + let provider = ASAuthorizationAppleIDProvider() + let request = provider.createRequest() + + if let nonce = req.nonce { + request.nonce = nonce + } + if let state = req.state { + request.state = state + } + + request.requestedScopes = [] + for scope in req.scope { + switch scope { + case "email": + request.requestedScopes?.append(.email) + case "fullName": + request.requestedScopes?.append(.fullName) + default: + NSLog("[tauri-plugin-sign-in-with-apple] Unsupported scope: \(scope)") + continue; + } + } + + let controller = ASAuthorizationController( + authorizationRequests: [ + request + ] + ) + + controller.delegate = self + controller.performRequests() + } + + public func authorizationController( + controller: ASAuthorizationController, + didCompleteWithAuthorization authorization: ASAuthorization + ) { + if let appleIDCredential = authorization.credential as? ASAuthorizationAppleIDCredential { + invoke.resolve( + AppleIDAuthorizationResponse( + userIdentifier: !appleIDCredential.user.isEmpty ? + appleIDCredential.user : + nil, + givenName: appleIDCredential.fullName?.givenName, + familyName: appleIDCredential.fullName?.familyName, + email: appleIDCredential.email, + authorizationCode: String(decoding: appleIDCredential.authorizationCode!, as: UTF8.self), + identityToken: appleIDCredential.identityToken != nil ? + String(decoding: appleIDCredential.identityToken!, as: UTF8.self) : + nil, + state: appleIDCredential.state + ) + ) + } else { + invoke.reject("Returned credential is not of type ASAuthorizationAppleIDCredential") + } + } + + public func authorizationController( + controller: ASAuthorizationController, + didCompleteWithError error: Error + ) { + invoke.reject(error.localizedDescription) + } +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Sources/SignInWithApplePlugin.swift b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Sources/SignInWithApplePlugin.swift new file mode 100644 index 000000000..a7824326b --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Sources/SignInWithApplePlugin.swift @@ -0,0 +1,58 @@ +// +// SignInWithApplePlugin.swift +// tauri-plugin-sign-in-with-apple +// +// Created by Manaf Mhamdi Alaoui on 10.11.2024. +// + +import SwiftRs +import Tauri +import UIKit +import WebKit + +class AppleIDAuthorizationRequest: Decodable { + let scope: [String] + let nonce: String? + let state: String? +} + +class AppleIDAuthorizationResponse: Encodable { + let userIdentifier: String? + + let givenName: String? + let familyName: String? + let email: String? + + let authorizationCode: String + let identityToken: String? + let state: String? + + init(userIdentifier: String?, givenName: String?, familyName: String?, email: String?, authorizationCode: String, identityToken: String?, state: String?) { + self.userIdentifier = userIdentifier + self.givenName = givenName + self.familyName = familyName + self.email = email + self.authorizationCode = authorizationCode + self.identityToken = identityToken + self.state = state + } +} + +class SignInWithApplePlugin: Plugin { + var lastController: SignInWithAppleAuthorizationController? + + @objc public func get_apple_id_credential(_ invoke: Invoke) throws { + let args = try invoke.parseArgs(AppleIDAuthorizationRequest.self) + + // store to keep alive + let controller = SignInWithAppleAuthorizationController(invoke) + lastController = controller + + controller.authorize(req: args) + } +} + +@_cdecl("init_plugin_sign_in_with_apple") +func initPlugin() -> Plugin { + return SignInWithApplePlugin() +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Tests/PluginTests/PluginTests.swift b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Tests/PluginTests/PluginTests.swift new file mode 100644 index 000000000..2f50e3087 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Tests/PluginTests/PluginTests.swift @@ -0,0 +1,8 @@ +import XCTest +@testable import SignInWithApplePlugin + +final class SignInWithApplePluginTests: XCTestCase { + func testExample() throws { + let plugin = SignInWithApplePlugin() + } +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/package.json b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/package.json new file mode 100644 index 000000000..7ad4261c5 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/package.json @@ -0,0 +1,34 @@ +{ + "name": "tauri-plugin-sign-in-with-apple-api", + "version": "1.0.2", + "author": "Manaf941", + "description": "", + "type": "module", + "license": "MIT", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", + "exports": { + "types": "./dist-js/index.d.ts", + "import": "./dist-js/index.js", + "require": "./dist-js/index.cjs" + }, + "files": [ + "dist-js", + "README.md" + ], + "scripts": { + "build": "rollup -c", + "prepublishOnly": "pnpm build", + "pretest": "pnpm build" + }, + "dependencies": { + "@tauri-apps/api": ">=2.0.0-beta.6" + }, + "devDependencies": { + "@rollup/plugin-typescript": "^11.1.6", + "rollup": "^4.9.6", + "typescript": "^5.3.3", + "tslib": "^2.6.2" + } +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/permissions/default.toml b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/permissions/default.toml new file mode 100644 index 000000000..02f8eb766 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/permissions/default.toml @@ -0,0 +1,3 @@ +[default] +description = "Default permissions for the plugin" +permissions = ["allow-get-apple-id-credential"] diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/permissions/schemas/schema.json b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/permissions/schemas/schema.json new file mode 100644 index 000000000..c8e4968c9 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/permissions/schemas/schema.json @@ -0,0 +1,315 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PermissionFile", + "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", + "type": "object", + "properties": { + "default": { + "description": "The default permission set for the plugin", + "anyOf": [ + { + "$ref": "#/definitions/DefaultPermission" + }, + { + "type": "null" + } + ] + }, + "set": { + "description": "A list of permissions sets defined", + "type": "array", + "items": { + "$ref": "#/definitions/PermissionSet" + } + }, + "permission": { + "description": "A list of inlined permissions", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/Permission" + } + } + }, + "definitions": { + "DefaultPermission": { + "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", + "type": "object", + "required": [ + "permissions" + ], + "properties": { + "version": { + "description": "The version of the permission.", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 1.0 + }, + "description": { + "description": "Human-readable description of what the permission does. Tauri convention is to use

headings in markdown content for Tauri documentation generation purposes.", + "type": [ + "string", + "null" + ] + }, + "permissions": { + "description": "All permissions this set contains.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "PermissionSet": { + "description": "A set of direct permissions grouped together under a new name.", + "type": "object", + "required": [ + "description", + "identifier", + "permissions" + ], + "properties": { + "identifier": { + "description": "A unique identifier for the permission.", + "type": "string" + }, + "description": { + "description": "Human-readable description of what the permission does.", + "type": "string" + }, + "permissions": { + "description": "All permissions this set contains.", + "type": "array", + "items": { + "$ref": "#/definitions/PermissionKind" + } + } + } + }, + "Permission": { + "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "version": { + "description": "The version of the permission.", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 1.0 + }, + "identifier": { + "description": "A unique identifier for the permission.", + "type": "string" + }, + "description": { + "description": "Human-readable description of what the permission does. Tauri internal convention is to use

headings in markdown content for Tauri documentation generation purposes.", + "type": [ + "string", + "null" + ] + }, + "commands": { + "description": "Allowed or denied commands when using this permission.", + "default": { + "allow": [], + "deny": [] + }, + "allOf": [ + { + "$ref": "#/definitions/Commands" + } + ] + }, + "scope": { + "description": "Allowed or denied scoped when using this permission.", + "allOf": [ + { + "$ref": "#/definitions/Scopes" + } + ] + }, + "platforms": { + "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Target" + } + } + } + }, + "Commands": { + "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", + "type": "object", + "properties": { + "allow": { + "description": "Allowed command.", + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "deny": { + "description": "Denied command, which takes priority.", + "default": [], + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Scopes": { + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "type": "object", + "properties": { + "allow": { + "description": "Data that defines what is allowed by the scope.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Value" + } + }, + "deny": { + "description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Value" + } + } + } + }, + "Value": { + "description": "All supported ACL values.", + "anyOf": [ + { + "description": "Represents a null JSON value.", + "type": "null" + }, + { + "description": "Represents a [`bool`].", + "type": "boolean" + }, + { + "description": "Represents a valid ACL [`Number`].", + "allOf": [ + { + "$ref": "#/definitions/Number" + } + ] + }, + { + "description": "Represents a [`String`].", + "type": "string" + }, + { + "description": "Represents a list of other [`Value`]s.", + "type": "array", + "items": { + "$ref": "#/definitions/Value" + } + }, + { + "description": "Represents a map of [`String`] keys to [`Value`]s.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Value" + } + } + ] + }, + "Number": { + "description": "A valid ACL number.", + "anyOf": [ + { + "description": "Represents an [`i64`].", + "type": "integer", + "format": "int64" + }, + { + "description": "Represents a [`f64`].", + "type": "number", + "format": "double" + } + ] + }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + }, + "PermissionKind": { + "type": "string", + "oneOf": [ + { + "description": "Enables the get_apple_id_credential command without any pre-configured scope.", + "type": "string", + "const": "allow-get-apple-id-credential" + }, + { + "description": "Denies the get_apple_id_credential command without any pre-configured scope.", + "type": "string", + "const": "deny-get-apple-id-credential" + }, + { + "description": "Default permissions for the plugin", + "type": "string", + "const": "default" + } + ] + } + } +} \ No newline at end of file diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/rollup.config.js b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/rollup.config.js new file mode 100644 index 000000000..d83436352 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/rollup.config.js @@ -0,0 +1,31 @@ +import { readFileSync } from 'fs' +import { join } from 'path' +import { cwd } from 'process' +import typescript from '@rollup/plugin-typescript' + +const pkg = JSON.parse(readFileSync(join(cwd(), 'package.json'), 'utf8')) + +export default { + input: 'guest-js/index.ts', + output: [ + { + file: pkg.exports.import, + format: 'esm' + }, + { + file: pkg.exports.require, + format: 'cjs' + } + ], + plugins: [ + typescript({ + declaration: true, + declarationDir: `./${pkg.exports.import.split('/')[0]}` + }) + ], + external: [ + /^@tauri-apps\/api/, + ...Object.keys(pkg.dependencies || {}), + ...Object.keys(pkg.peerDependencies || {}) + ] +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/commands.rs b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/commands.rs new file mode 100644 index 000000000..5f1e9b3d9 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/commands.rs @@ -0,0 +1,13 @@ +use tauri::{AppHandle, command, Runtime}; + +use crate::models::*; +use crate::Result; +use crate::SignInWithAppleExt; + +#[command] +pub(crate) async fn get_apple_id_credential( + app: AppHandle, + payload: AppleIDAuthorizationRequest, +) -> Result { + app.sign_in_with_apple().get_apple_id_credential(payload) +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/desktop.rs b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/desktop.rs new file mode 100644 index 000000000..833307bf6 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/desktop.rs @@ -0,0 +1,20 @@ +use serde::de::DeserializeOwned; +use tauri::{plugin::PluginApi, AppHandle, Runtime}; + +use crate::models::*; + +pub fn init( + app: &AppHandle, + _api: PluginApi, +) -> crate::Result> { + Ok(SignInWithApple(app.clone())) +} + +/// Access to the sign-in-with-apple APIs. +pub struct SignInWithApple(AppHandle); + +impl SignInWithApple { + pub fn get_apple_id_credential(&self, _payload: AppleIDAuthorizationRequest) -> crate::Result { + Err(crate::Error::UnsupportedPlatformError) + } +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/error.rs b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/error.rs new file mode 100644 index 000000000..0e76603ed --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/error.rs @@ -0,0 +1,23 @@ +use serde::{ser::Serializer, Serialize}; + +pub type Result = std::result::Result; + +#[derive(Debug, thiserror::Error)] +pub enum Error { + #[error("Unsupported platform for sign_in_with_apple")] + UnsupportedPlatformError, + #[error(transparent)] + Io(#[from] std::io::Error), + #[cfg(mobile)] + #[error(transparent)] + PluginInvoke(#[from] tauri::plugin::mobile::PluginInvokeError), +} + +impl Serialize for Error { + fn serialize(&self, serializer: S) -> std::result::Result + where + S: Serializer, + { + serializer.serialize_str(self.to_string().as_ref()) + } +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/lib.rs b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/lib.rs new file mode 100644 index 000000000..4f4dec6a9 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/lib.rs @@ -0,0 +1,48 @@ +use tauri::{ + plugin::{Builder, TauriPlugin}, + Manager, Runtime, +}; + +pub use models::*; + +#[cfg(desktop)] +mod desktop; +#[cfg(mobile)] +mod mobile; + +mod commands; +mod error; +mod models; + +pub use error::{Error, Result}; + +#[cfg(desktop)] +use desktop::SignInWithApple; +#[cfg(mobile)] +use mobile::SignInWithApple; + +/// Extensions to [`tauri::App`], [`tauri::AppHandle`] and [`tauri::Window`] to access the sign-in-with-apple APIs. +pub trait SignInWithAppleExt { + fn sign_in_with_apple(&self) -> &SignInWithApple; +} + +impl> crate::SignInWithAppleExt for T { + fn sign_in_with_apple(&self) -> &SignInWithApple { + self.state::>().inner() + } +} + +/// Initializes the plugin. +pub fn init() -> TauriPlugin { + Builder::new("sign-in-with-apple") + .invoke_handler(tauri::generate_handler![commands::get_apple_id_credential]) + .setup(|app, api| { + #[cfg(mobile)] + let sign_in_with_apple = mobile::init(app, api)?; + #[cfg(desktop)] + let sign_in_with_apple = desktop::init(app, api)?; + app.manage(sign_in_with_apple); + Ok(()) + }) + .build() +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/mobile.rs b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/mobile.rs new file mode 100644 index 000000000..c28ac9039 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/mobile.rs @@ -0,0 +1,34 @@ +use serde::de::DeserializeOwned; +use tauri::{ + plugin::{PluginApi, PluginHandle}, + AppHandle, Runtime, +}; + +use crate::models::*; + +#[cfg(target_os = "ios")] +tauri::ios_plugin_binding!(init_plugin_sign_in_with_apple); + +// initializes the Kotlin or Swift plugin classes +pub fn init( + _app: &AppHandle, + api: PluginApi, +) -> crate::Result> { + #[cfg(target_os = "android")] + let handle = api.register_android_plugin("ch.manaf.tauri_plugins.sign_in_with_apple", "ExamplePlugin")?; + #[cfg(target_os = "ios")] + let handle = api.register_ios_plugin(init_plugin_sign_in_with_apple)?; + Ok(SignInWithApple(handle)) +} + +/// Access to the sign-in-with-apple APIs. +pub struct SignInWithApple(PluginHandle); + +impl SignInWithApple { + pub fn get_apple_id_credential(&self, payload: AppleIDAuthorizationRequest) -> crate::Result { + self + .0 + .run_mobile_plugin("get_apple_id_credential", payload) + .map_err(Into::into) + } +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/models.rs b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/models.rs new file mode 100644 index 000000000..980c7ec4c --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/src/models.rs @@ -0,0 +1,36 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct AppleIDAuthorizationRequest { + pub scope: Vec, + pub nonce: Option, + pub state: Option, +} + +#[derive(Debug, Clone, Default, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct AppleIDAuthorizationResponse { + pub user_identifier: Option, + + pub given_name: Option, + pub family_name: Option, + pub email: Option, + + pub authorization_code: String, + pub identity_token: Option, + pub state: Option, +} + + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct PingRequest { + pub value: Option, +} + +#[derive(Debug, Clone, Default, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct PingResponse { + pub value: Option, +} diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/tsconfig.json b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/tsconfig.json new file mode 100644 index 000000000..059112270 --- /dev/null +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "es2021", + "module": "esnext", + "moduleResolution": "bundler", + "skipLibCheck": true, + "strict": true, + "noUnusedLocals": true, + "noImplicitAny": true, + "noEmit": true + }, + "include": ["guest-js/*.ts"], + "exclude": ["dist-js", "node_modules"] +} From 50fbbf4c435983d0f2104a7bd691bcb13e2bff2c Mon Sep 17 00:00:00 2001 From: Anthony Ronning <101225832+AnthonyRonning@users.noreply.github.com> Date: Thu, 29 Oct 2026 18:17:38 +0000 Subject: [PATCH 3/6] research: build the vendored sign-in-with-apple plugin in place Point Cargo at the in-tree copy, and keep what building it writes out of git: the plugin's .gitignore gains the iOS and Android build outputs, and permissions/schemas/schema.json is the one tauri-plugin 2.7's build script regenerates (descriptions in markdown), so builds leave the tree clean. Co-Authored-By: Claude Opus 5.5 --- apps/maple-research/frontend/src-tauri/Cargo.lock | 2 -- apps/maple-research/frontend/src-tauri/Cargo.toml | 6 ++++++ .../.gitignore | 6 ++++++ .../permissions/schemas/schema.json | 15 +++++++++------ 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/apps/maple-research/frontend/src-tauri/Cargo.lock b/apps/maple-research/frontend/src-tauri/Cargo.lock index 59f6d0a16..b4e25b3b9 100644 --- a/apps/maple-research/frontend/src-tauri/Cargo.lock +++ b/apps/maple-research/frontend/src-tauri/Cargo.lock @@ -6860,8 +6860,6 @@ dependencies = [ [[package]] name = "tauri-plugin-sign-in-with-apple" version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9402eb8a70fdff5127fccc1f1666ebb06b5efc10e0eb656d8a70c798e26142e" dependencies = [ "serde", "tauri", diff --git a/apps/maple-research/frontend/src-tauri/Cargo.toml b/apps/maple-research/frontend/src-tauri/Cargo.toml index 7d35090f6..795ac273a 100644 --- a/apps/maple-research/frontend/src-tauri/Cargo.toml +++ b/apps/maple-research/frontend/src-tauri/Cargo.toml @@ -111,3 +111,9 @@ maple-sdk = { path = "../../../../sdk/rust" } # library uses this application's Cargo.lock; its upstream standalone lockfile # is intentionally omitted. tao = { path = "patches/tao-0.37.1" } +# tauri-plugin-sign-in-with-apple 1.0.2 (last release 2024-11) declares its Swift +# entry point `@_cdecl("init_plugin_sign_in_with_apple") func initPlugin()` with +# internal visibility. Xcode 27 release builds need these entry points `public` +# to link (Tauri 2.12.3 made its own public: tauri-apps/tauri#16130); the +# vendored copy only adds that keyword. Remove once upstream publishes the fix. +tauri-plugin-sign-in-with-apple = { path = "patches/tauri-plugin-sign-in-with-apple-1.0.2" } diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/.gitignore b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/.gitignore index 50d8e32e8..64126f687 100644 --- a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/.gitignore +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/.gitignore @@ -15,3 +15,9 @@ node_modules/ dist-js dist + +# Written by this app's iOS and Android builds. +/ios/.build/ +/ios/Package.resolved +/permissions/autogenerated/ +/android/.gradle/ diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/permissions/schemas/schema.json b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/permissions/schemas/schema.json index c8e4968c9..149d8c00d 100644 --- a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/permissions/schemas/schema.json +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/permissions/schemas/schema.json @@ -49,7 +49,7 @@ "minimum": 1.0 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use

headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", "type": [ "string", "null" @@ -111,7 +111,7 @@ "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use

headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", "type": [ "string", "null" @@ -297,17 +297,20 @@ { "description": "Enables the get_apple_id_credential command without any pre-configured scope.", "type": "string", - "const": "allow-get-apple-id-credential" + "const": "allow-get-apple-id-credential", + "markdownDescription": "Enables the get_apple_id_credential command without any pre-configured scope." }, { "description": "Denies the get_apple_id_credential command without any pre-configured scope.", "type": "string", - "const": "deny-get-apple-id-credential" + "const": "deny-get-apple-id-credential", + "markdownDescription": "Denies the get_apple_id_credential command without any pre-configured scope." }, { - "description": "Default permissions for the plugin", + "description": "Default permissions for the plugin\n#### This default permission set includes:\n\n- `allow-get-apple-id-credential`", "type": "string", - "const": "default" + "const": "default", + "markdownDescription": "Default permissions for the plugin\n#### This default permission set includes:\n\n- `allow-get-apple-id-credential`" } ] } From 71119fd0e637893cdcc8cf1805c0734e270ee59c Mon Sep 17 00:00:00 2001 From: Anthony Ronning <101225832+AnthonyRonning@users.noreply.github.com> Date: Sat, 24 Oct 2026 22:49:52 +0000 Subject: [PATCH 4/6] research(ios): make Swift plugin entry points public Xcode 27 release builds need @_cdecl plugin entry points to be public for the Rust bindings to link; Tauri 2.12.3 did the same for its own Swift package (tauri-apps/tauri#16130). Covers the in-tree IAP plugin and the vendored Sign in with Apple plugin. Co-Authored-By: Claude Opus 5.5 --- .../ios/Sources/SignInWithApplePlugin.swift | 2 +- .../plugins/tauri-plugin-iap/ios/Sources/IapPlugin.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Sources/SignInWithApplePlugin.swift b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Sources/SignInWithApplePlugin.swift index a7824326b..df9acc495 100644 --- a/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Sources/SignInWithApplePlugin.swift +++ b/apps/maple-research/frontend/src-tauri/patches/tauri-plugin-sign-in-with-apple-1.0.2/ios/Sources/SignInWithApplePlugin.swift @@ -53,6 +53,6 @@ class SignInWithApplePlugin: Plugin { } @_cdecl("init_plugin_sign_in_with_apple") -func initPlugin() -> Plugin { +public func initPlugin() -> Plugin { return SignInWithApplePlugin() } diff --git a/apps/maple-research/frontend/src-tauri/plugins/tauri-plugin-iap/ios/Sources/IapPlugin.swift b/apps/maple-research/frontend/src-tauri/plugins/tauri-plugin-iap/ios/Sources/IapPlugin.swift index 6841fabf1..2fb10e151 100644 --- a/apps/maple-research/frontend/src-tauri/plugins/tauri-plugin-iap/ios/Sources/IapPlugin.swift +++ b/apps/maple-research/frontend/src-tauri/plugins/tauri-plugin-iap/ios/Sources/IapPlugin.swift @@ -311,7 +311,7 @@ class IapPlugin: Plugin { } @_cdecl("init_plugin_iap") -func initPlugin() -> Plugin { +public func initPlugin() -> Plugin { if #available(iOS 16.0, *) { return IapPlugin() } return Plugin() } From 1b9af3cf0603ec98953e9813d427ada127b05e7c Mon Sep 17 00:00:00 2001 From: Anthony Ronning <101225832+AnthonyRonning@users.noreply.github.com> Date: Sat, 24 Oct 2026 22:50:07 +0000 Subject: [PATCH 5/6] research(ios): deliver deep links that cold-launch the app With the scene life cycle, UIKit hands a launch URL to the connecting scene's connection options and never calls scene:openURLContexts: for it. tao 0.37 ignores those options, so a deep link that starts Maple (for example an OAuth callback after iOS killed the app) never reached tauri-plugin-deep-link. Backports tauri-apps/tao#1376 onto the vendored tao 0.37.1 (only the import context differs from upstream dev). Co-Authored-By: Claude Opus 5.5 --- .../frontend/src-tauri/Cargo.toml | 4 ++ .../src/platform_impl/ios/app_state.rs | 29 ++++++++- .../tao-0.37.1/src/platform_impl/ios/scene.rs | 62 +++++++++++++------ 3 files changed, 73 insertions(+), 22 deletions(-) diff --git a/apps/maple-research/frontend/src-tauri/Cargo.toml b/apps/maple-research/frontend/src-tauri/Cargo.toml index 795ac273a..7c5dc9d04 100644 --- a/apps/maple-research/frontend/src-tauri/Cargo.toml +++ b/apps/maple-research/frontend/src-tauri/Cargo.toml @@ -105,6 +105,10 @@ maple-sdk = { path = "../../../../sdk/rust" } # tauri-plugin-deep-link sees OAuth/payment redirects. Remove the patch once # upstream stops unwrapping those calls. # +# It also carries tauri-apps/tao#1376 for iOS: in the scene life cycle a URL that +# cold-launches the app arrives in the scene connection options, which tao 0.37 +# ignores, so OAuth callbacks that relaunch Maple were dropped. +# # Vendored from crates.io tao 0.37.1 (sha256 # f37f381f4e048e6cdf038b5705f8cf14ad108279d46eb968140a7b291aba9400, upstream # 37b7e8bc90a0); Maple's changes follow the vendoring commit. The vendored diff --git a/apps/maple-research/frontend/src-tauri/patches/tao-0.37.1/src/platform_impl/ios/app_state.rs b/apps/maple-research/frontend/src-tauri/patches/tao-0.37.1/src/platform_impl/ios/app_state.rs index d46e076f4..a0d08996d 100644 --- a/apps/maple-research/frontend/src-tauri/patches/tao-0.37.1/src/platform_impl/ios/app_state.rs +++ b/apps/maple-research/frontend/src-tauri/patches/tao-0.37.1/src/platform_impl/ios/app_state.rs @@ -14,7 +14,10 @@ use std::{ }; use objc2::{rc::Retained, runtime::AnyObject, MainThreadMarker, Message}; -use objc2_ui_kit::{UIApplication, UIScene, UISceneConnectionOptions, UIWindowScene}; +use objc2_foundation::{NSSet, NSUserActivity}; +use objc2_ui_kit::{ + UIApplication, UIOpenURLContext, UIScene, UISceneConnectionOptions, UIWindowScene, +}; use crate::{ dpi::LogicalSize, @@ -28,7 +31,7 @@ use crate::{ CFRunLoopTimerRef, CFRunLoopTimerSetNextFireDate, CGRect, CGSize, NSInteger, NSOperatingSystemVersion, NSUInteger, }, - scene::scene_lifecycle_enabled, + scene::{self, scene_lifecycle_enabled}, }, window::WindowId as RootWindowId, }; @@ -561,6 +564,28 @@ pub unsafe fn connect_scene(scene: &UIScene, options: &UISceneConnectionOptions) let () = msg_send![window, release]; } } + + // a URL that launches the app (or opens a new scene) is handed over here, in the connection + // options: scene:openURLContexts: is only called for URLs received by a scene that is already + // connected, so without this they would be lost + // + // UIKit returns nil for both sets when the app is launched without a link, although the objc2 + // bindings declare them non-null: read them as optional, the bindings would panic on nil + let url_contexts: Option>> = msg_send![options, URLContexts]; + let user_activities: Option>> = msg_send![options, userActivities]; + let source = "the scene connection options"; + let mut urls = url_contexts + .map(|contexts| scene::urls_from_contexts(&contexts, source)) + .unwrap_or_default(); + urls.extend( + user_activities + .iter() + .flat_map(|activities| activities.iter()) + .filter_map(|activity| scene::universal_link_url(&activity, source)), + ); + if !urls.is_empty() { + handle_nonuser_event(EventWrapper::StaticEvent(Event::Opened { urls })); + } } pub unsafe fn register_window_for_scene(window: id) { diff --git a/apps/maple-research/frontend/src-tauri/patches/tao-0.37.1/src/platform_impl/ios/scene.rs b/apps/maple-research/frontend/src-tauri/patches/tao-0.37.1/src/platform_impl/ios/scene.rs index 0077367b3..7495517cc 100644 --- a/apps/maple-research/frontend/src-tauri/patches/tao-0.37.1/src/platform_impl/ios/scene.rs +++ b/apps/maple-research/frontend/src-tauri/patches/tao-0.37.1/src/platform_impl/ios/scene.rs @@ -4,6 +4,7 @@ use objc2::{define_class, rc::Retained, MainThreadMarker, MainThreadOnly}; use objc2_foundation::{ NSBundle, NSError, NSObject, NSObjectProtocol, NSSet, NSString, NSUserActivity, + NSUserActivityTypeBrowsingWeb, }; use objc2_ui_kit::{ UIApplication, UIOpenURLContext, UIScene, UISceneConnectionOptions, UISceneDelegate, @@ -59,6 +60,45 @@ unsafe fn handle_scene_window_events(scene: &UIScene, event: impl Fn() -> Window } } +// parses the URLs carried by the given contexts, skipping (and logging) the ones that are not +// valid; `source` names the delivery path in the log +pub unsafe fn urls_from_contexts( + url_contexts: &NSSet, + source: &str, +) -> Vec { + url_contexts + .iter() + .filter_map(|ctx| { + ctx + .URL() + .absoluteString() + .and_then(|url| parse_url(&url.to_string(), source)) + }) + .collect() +} + +// the URL of a universal link activity, if `activity` is one: other activities, such as +// Handoff, can carry a web page URL too and are not links that opened the app +pub unsafe fn universal_link_url(activity: &NSUserActivity, source: &str) -> Option { + if !activity + .activityType() + .isEqualToString(NSUserActivityTypeBrowsingWeb) + { + return None; + } + activity + .webpageURL() + .and_then(|url| url.absoluteString()) + .and_then(|url| parse_url(&url.to_string(), source)) +} + +fn parse_url(url: &str, source: &str) -> Option { + url + .parse() + .map_err(|e| log::error!("failed to parse URL {url} from {source}: {e}")) + .ok() +} + define_class!( #[unsafe(super(NSObject))] #[name = "TaoSceneDelegate"] @@ -125,21 +165,7 @@ define_class!( #[unsafe(method(scene:openURLContexts:))] fn scene_openURLContexts(&self, _scene: &UIScene, url_contexts: &NSSet) { unsafe { - let urls: Vec = url_contexts - .iter() - .filter_map(|ctx| { - ctx.URL().absoluteString().and_then(|url| { - let url = url.to_string(); - url - .parse() - .map_err(|e| { - log::error!("failed to parse URL {url} from scene:openURLContexts: {e}"); - e - }) - .ok() - }) - }) - .collect(); + let urls = urls_from_contexts(url_contexts, "scene:openURLContexts:"); if !urls.is_empty() { app_state::handle_nonuser_event(EventWrapper::StaticEvent(Event::Opened { urls })); } @@ -174,11 +200,7 @@ define_class!( fn scene_continueUserActivity(&self, _scene: &UIScene, user_activity: &NSUserActivity) { unsafe { // universal app links - if let Some(url) = user_activity - .webpageURL() - .and_then(|url| url.absoluteString()) - { - let url = url.to_string().parse::().unwrap(); + if let Some(url) = universal_link_url(user_activity, "scene:continueUserActivity:") { app_state::handle_nonuser_event(EventWrapper::StaticEvent(Event::Opened { urls: vec![url], })); From f15adfee965bf217a9ba130f5d6440f03c7e3858 Mon Sep 17 00:00:00 2001 From: Anthony Ronning <101225832+AnthonyRonning@users.noreply.github.com> Date: Thu, 29 Oct 2026 18:18:41 +0000 Subject: [PATCH 6/6] ci: fail iOS builds whose app lacks the UIScene manifest The launch-abort fix relies on tauri-cli merging Info.ios.plist into the app at build time; the committed gen/apple Info.plist has no manifest, and no CI job launches the app. A tauri-cli or config regression would ship an iOS 27 SDK build that aborts in _UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption with every check green. ios-pr.sh checks the simulator app after the build, and ios-release.sh both the archived and the exported app. Co-Authored-By: Claude Opus 5.5 --- scripts/ci/_common.sh | 12 ++++++++++++ scripts/ci/ios-pr.sh | 1 + scripts/ci/ios-release.sh | 2 ++ scripts/ci/test_ios_release_signing.py | 1 + 4 files changed, 16 insertions(+) diff --git a/scripts/ci/_common.sh b/scripts/ci/_common.sh index 1aebbcde0..7286433cd 100755 --- a/scripts/ci/_common.sh +++ b/scripts/ci/_common.sh @@ -1115,6 +1115,18 @@ tree_hash_digest() { ) } +# iOS 27 SDK builds abort at launch unless the app adopts the UIScene life cycle. +# tauri-cli merges the manifest from src-tauri/Info.ios.plist at build time; the +# committed gen/apple plist has none, so check the built app itself. +require_ios_scene_manifest() { + local app="$1" delegate + delegate="$(plutil -extract UIApplicationSceneManifest.UISceneConfigurations.UIWindowSceneSessionRoleApplication.0.UISceneDelegateClassName raw "${app}/Info.plist" 2>/dev/null || true)" + if [ "${delegate}" != "TaoSceneDelegate" ]; then + echo "${app} declares no TaoSceneDelegate scene (found '${delegate:-nothing}'); iOS 27 SDK builds abort at launch without it. tauri-cli merges it from src-tauri/Info.ios.plist." >&2 + return 1 + fi +} + print_canonical_ios_app_hash() { local bundle="$1" local label="${2:-$(repo_relative_path "${bundle}")}" diff --git a/scripts/ci/ios-pr.sh b/scripts/ci/ios-pr.sh index e2a7dac88..d4949351b 100755 --- a/scripts/ci/ios-pr.sh +++ b/scripts/ci/ios-pr.sh @@ -77,6 +77,7 @@ rm -rf "${TAURI_DIR}/gen/apple/build/arm64-sim" "${TAURI_DIR}/gen/apple/build/ma cd "${FRONTEND_DIR}" bun tauri ios build --debug --target aarch64-sim --ci --config '{"build":{"beforeBuildCommand":null}}' +require_ios_scene_manifest "${TAURI_DIR}/gen/apple/build/arm64-sim/Maple.app" strip_apple_debug_symbols "${TAURI_DIR}/gen/apple/build/arm64-sim/Maple.app" adhoc_resign_apple_bundle "${TAURI_DIR}/gen/apple/build/arm64-sim/Maple.app" scrub_host_metadata_files "${TAURI_DIR}/gen/apple/build/arm64-sim/Maple.app" diff --git a/scripts/ci/ios-release.sh b/scripts/ci/ios-release.sh index 0afeb5bd0..0c481e60b 100755 --- a/scripts/ci/ios-release.sh +++ b/scripts/ci/ios-release.sh @@ -211,6 +211,7 @@ if [ -z "${unsigned_app}" ]; then exit 1 fi verify_ios_profile verify-app "${unsigned_app}" +require_ios_scene_manifest "${unsigned_app}" unsigned_app_canonical_hash="$(print_canonical_ios_app_hash "${unsigned_app}" "$(repo_relative_path "${unsigned_app}")" | tee "${repro_dir}/ios-release-unsigned-app-canonical.sha256" | awk '{ print $2 }')" cat "${repro_dir}/ios-release-unsigned-app-canonical.sha256" write_ios_canonical_app_file_manifest "${unsigned_app}" "${repro_dir}/ios-release-unsigned-app-canonical-files.sha256" @@ -240,6 +241,7 @@ if [ -z "${signed_app}" ]; then exit 1 fi verify_ios_profile verify-app "${signed_app}" +require_ios_scene_manifest "${signed_app}" signed_app_canonical_hash="$(print_canonical_ios_app_hash "${signed_app}" "$(repo_relative_path "${signed_app}")" | tee "${repro_dir}/ios-release-archive-app-canonical.sha256" | awk '{ print $2 }')" cat "${repro_dir}/ios-release-archive-app-canonical.sha256" write_ios_canonical_app_file_manifest "${signed_app}" "${repro_dir}/ios-release-archive-app-canonical-files.sha256" diff --git a/scripts/ci/test_ios_release_signing.py b/scripts/ci/test_ios_release_signing.py index 7497b32e5..3be4b651a 100644 --- a/scripts/ci/test_ios_release_signing.py +++ b/scripts/ci/test_ios_release_signing.py @@ -53,6 +53,7 @@ build_frontend_dist() { check_stage frontend; export MAPLE_FRONTEND_DIST_TREE_SHA256=fixture; } verify_ios_onnxruntime_manifest() { check_stage onnx; } print_ios_onnxruntime_hashes() { :; } +require_ios_scene_manifest() { :; } write_ios_onnxruntime_reproducibility_manifest() { :; } remove_build_tree() { rm -rf "$1"; } repo_relative_path() { printf '%s\n' "${1#"${REPO_ROOT}"/}"; }