From a93e165f85756fd89ff31433a0ccaf914aac17dd Mon Sep 17 00:00:00 2001 From: Mineek <84083936+mineek@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:01:30 +0100 Subject: [PATCH] Workaround for iOS 18+ users --- MuffinStoreJailed/ContentView.swift | 8 +++++++- MuffinStoreJailed/IPATool.swift | 11 +++++++---- README.md | 2 ++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/MuffinStoreJailed/ContentView.swift b/MuffinStoreJailed/ContentView.swift index 3e06eae..59aa402 100644 --- a/MuffinStoreJailed/ContentView.swift +++ b/MuffinStoreJailed/ContentView.swift @@ -72,7 +72,13 @@ struct ContentView: View { .textFieldStyle(RoundedBorderTextFieldStyle()) .padding() Button("Authenticate") { - if appleId.isEmpty || password.isEmpty || code.isEmpty { + if appleId.isEmpty || password.isEmpty { + return + } + if code.isEmpty { + // we can just try to log in and it'll request a code, very scuffed tho. + ipaTool = IPATool(appleId: appleId, password: password) + ipaTool?.authenticate(requestCode: true) return } let finalPassword = password + code diff --git a/MuffinStoreJailed/IPATool.swift b/MuffinStoreJailed/IPATool.swift index c72dd9d..bd69b6e 100644 --- a/MuffinStoreJailed/IPATool.swift +++ b/MuffinStoreJailed/IPATool.swift @@ -110,7 +110,7 @@ class StoreClient { return false } - func authenticate() -> Bool { + func authenticate(requestCode: Bool = false) -> Bool { if self.guid == nil { self.guid = generateGuid(appleId: appleId) } @@ -186,6 +186,10 @@ class StoreClient { if ret { break } + if requestCode { + ret = false + break + } } return ret } @@ -284,11 +288,10 @@ class IPATool { storeClient = StoreClient(appleId: appleId, password: password) } - func authenticate() -> Bool { + func authenticate(requestCode: Bool = false) -> Bool { print("Authenticating to iTunes Store...") if !storeClient.tryLoadAuthInfo() { - // storeClient.authenticate() - return storeClient.authenticate() + return storeClient.authenticate(requestCode: requestCode) } else { return true } diff --git a/README.md b/README.md index d9938f1..05f4aaa 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,5 @@ The UI is a bit scuffed, there's no progress bar during downgrading so just wait I am not responsible for any issues caused by the usage of this tool, it's experimental and I will not be held accountable if anything happens. Use at your own risk. Although nothing should happen, just putting this here just in case. The app you want to downgrade will need to be uninstalled, however, you can preserve app data by offloading the app first, and then downgrading it. + +You should request a 2fa code BEFORE logging in, via the Settings app, however, if the settings app doesn't show the option ( iOS 18+ ), you can leave the code field empty, and then you should get a popup, accept it, and copy the code from there. If it doesn't log you in fully close and re-open the app and try again.