mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-11 17:45:37 +00:00
idk what is this but alright
This commit is contained in:
parent
bd2b7ccb41
commit
73256c5aab
1 changed files with 10 additions and 0 deletions
|
|
@ -23,8 +23,18 @@ class JSController: ObservableObject {
|
|||
context = JSContext()
|
||||
setupContext()
|
||||
context.evaluateScript(script)
|
||||
|
||||
let appInfoBridge = AppInfo()
|
||||
context.setObject(appInfoBridge, forKeyedSubscript: "AppInfo" as NSString)
|
||||
|
||||
if let exception = context.exception {
|
||||
Logger.shared.log("Error loading script: \(exception)", type: "Error")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AppInfo: NSObject {
|
||||
@objc func getBundleIdentifier() -> String {
|
||||
return Bundle.main.bundleIdentifier ?? "me.cranci.sulfur"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue