added LC setting

This commit is contained in:
Dusk 2025-03-31 11:14:22 +08:00
parent ff0e6c0c19
commit 49beef71df
4 changed files with 8 additions and 4 deletions

View file

@ -32,6 +32,10 @@ struct HomeView: View {
@State private var viewDidAppeared = false
@State private var pendingBundleIdToEnableJIT : String? = nil
init(is_lc: Binding<Bool>? = nil) {
self._is_lc = is_lc ?? .constant(false)
}
var body: some View {
ZStack {
@ -265,7 +269,7 @@ struct HomeView: View {
LogManager.shared.addInfoLog("Starting JIT for \(bundleID)")
DispatchQueue.global(qos: .background).async {
JITEnableContext.shared().debugApp(withBundleID: bundleID, logger: { message in
JITEnableContext.shared().debugApp(withBundleID: bundleID,isLC: is_lc, logger: { message in
if let message = message {
// Log messages from the JIT process
LogManager.shared.addInfoLog(message)

View file

@ -251,7 +251,7 @@ struct SettingsView: View {
.foregroundColor(.primary)
.padding(.bottom, 4)
Toggle("Enable in-LiveContainer JIT", isOn: $is_lc)
Toggle("Enable In-LiveContainer JIT", isOn: $is_lc)
.padding()
HomeView(is_lc: $is_lc)

View file

@ -15,6 +15,6 @@ typedef void (^LogFunc)(NSString *message);
+ (instancetype)shared;
- (IdevicePairingFile*)getPairingFileWithError:(NSError**)error;
- (void)startHeartbeatWithCompletionHandler:(HeartbeatCompletionHandler)completionHandler logger:(LogFunc)logger;
- (void)debugAppWithBundleID:(NSString*)bundleID logger:(LogFunc)logger;
- (void)debugAppWithBundleID:(NSString*)bundleID isLC:(BOOL)isLC logger:(LogFunc)logger;
- (NSDictionary<NSString*, NSString*>*)getAppListWithError:(NSError**)error;
@end

View file

@ -96,7 +96,7 @@ JITEnableContext* sharedJITContext = nil;
completionHandler(result,[NSString stringWithCString:message encoding:NSASCIIStringEncoding]);
}, [self createCLogger:logger]);
}
- (void)debugAppWithBundleID:(NSString*)bundleID logger:(LogFunc)logger isLC:(BOOL)isLC {
- (void)debugAppWithBundleID:(NSString*)bundleID isLC:(BOOL)isLC logger:(LogFunc)logger {
if(!provider) {
if(logger) {
logger(@"Provider not initialized!");