mirror of
https://github.com/StikDebug/StikDebug.git
synced 2026-10-16 04:20:30 +00:00
added LC setting
This commit is contained in:
parent
ff0e6c0c19
commit
49beef71df
4 changed files with 8 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue