mirror of
https://github.com/cranci1/Sora.git
synced 2026-05-07 10:40:26 +00:00
im dumb 😭
This commit is contained in:
parent
626e5df595
commit
0933bc448c
2 changed files with 11 additions and 0 deletions
|
|
@ -148,6 +148,16 @@ class AppInfo: NSObject {
|
|||
@objc func getDisplayName() -> String {
|
||||
return Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String ?? Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as! String
|
||||
}
|
||||
|
||||
@objc func isValidApp() -> Bool {
|
||||
let bundleId = getBundleIdentifier().lowercased()
|
||||
let displayName = getDisplayName().lowercased()
|
||||
|
||||
let hasValidBundleId = bundleId.contains("sulfur")
|
||||
let hasValidDisplayName = displayName == "sora" || displayName == "sulfur"
|
||||
|
||||
return hasValidBundleId && hasValidDisplayName
|
||||
}
|
||||
}
|
||||
|
||||
class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ extension JSContext {
|
|||
Logger.shared.log("JavaScript log: \(message)", type: "Debug")
|
||||
}
|
||||
self.setObject(logFunction, forKeyedSubscript: "log" as NSString)
|
||||
self.setObject(appInfoBridge, forKeyedSubscript: "AppInfo" as NSString)
|
||||
}
|
||||
|
||||
func setupNativeFetch() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue