@@ -98,7 +98,7 @@ + (void)loadStoreFrameworksWithError:(NSError **)error {
9898
9999 NSArray *signerFrameworks;
100100
101- if ([self store ] == AltStore ) {
101+ if ([NSFileManager .defaultManager fileExistsAtPath: [ self .storeBundlePath URLByAppendingPathComponent: @" Frameworks/KeychainAccess.framework " ].path] ) {
102102 // AltStore requires 1 more framework than sidestore
103103 signerFrameworks = @[@" OpenSSL.framework" , @" Roxas.framework" , @" KeychainAccess.framework" , @" AltStoreCore.framework" ];
104104 } else {
@@ -326,10 +326,10 @@ + (void)writeStoreIDToSetupExecutableWithError:(NSError **)error {
326326 [data writeToURL: execPath options: 0 error: error];
327327}
328328
329- + (void )validateJITLessSetupWithCompletionHandler : (void (^)(BOOL success, NSError *error))completionHandler {
329+ + (void )validateJITLessSetupWithSigner : (Signer) signer completionHandler : (void (^)(BOOL success, NSError *error))completionHandler {
330330 // Verify that the certificate is usable
331331 // Create a test app bundle
332- NSString *path = [NSTemporaryDirectory () stringByAppendingPathComponent: @" CertificateValidation" ];
332+ NSString *path = [NSTemporaryDirectory () stringByAppendingPathComponent: @" CertificateValidation.app " ];
333333 [NSFileManager .defaultManager createDirectoryAtPath: path withIntermediateDirectories: YES attributes: nil error: nil ];
334334 NSString *tmpExecPath = [path stringByAppendingPathComponent: @" LiveContainer.tmp" ];
335335 NSString *tmpLibPath = [path stringByAppendingPathComponent: @" TestJITLess.dylib" ];
@@ -341,12 +341,23 @@ + (void)validateJITLessSetupWithCompletionHandler:(void (^)(BOOL success, NSErro
341341 [info writeToFile: tmpInfoPath atomically: YES ];
342342
343343 // Sign the test app bundle
344- [LCUtils signAppBundle: [NSURL fileURLWithPath: path]
345- completionHandler: ^(BOOL success, NSDate * expirationDate, NSError *_Nullable error) {
346- dispatch_async (dispatch_get_main_queue (), ^{
347- completionHandler (success, error);
348- });
349- }];
344+ if (signer == AltSign) {
345+ [LCUtils signAppBundle: [NSURL fileURLWithPath: path]
346+ completionHandler: ^(BOOL success, NSDate * expirationDate, NSError *_Nullable error) {
347+ dispatch_async (dispatch_get_main_queue (), ^{
348+ completionHandler (success, error);
349+ });
350+ }];
351+ } else {
352+ [LCUtils signAppBundleWithZSign: [NSURL fileURLWithPath: path]
353+ completionHandler: ^(BOOL success, NSDate * expirationDate, NSError *_Nullable error) {
354+ dispatch_async (dispatch_get_main_queue (), ^{
355+ completionHandler (success, error);
356+ });
357+ }];
358+ }
359+
360+
350361}
351362
352363+ (NSURL *)archiveIPAWithBundleName : (NSString *)newBundleName error : (NSError **)error {
0 commit comments