@@ -98,7 +98,7 @@ + (void)loadStoreFrameworksWithError:(NSError **)error {
98
98
99
99
NSArray *signerFrameworks;
100
100
101
- if ([self store ] == AltStore ) {
101
+ if ([NSFileManager .defaultManager fileExistsAtPath: [ self .storeBundlePath URLByAppendingPathComponent: @" Frameworks/KeychainAccess.framework " ].path] ) {
102
102
// AltStore requires 1 more framework than sidestore
103
103
signerFrameworks = @[@" OpenSSL.framework" , @" Roxas.framework" , @" KeychainAccess.framework" , @" AltStoreCore.framework" ];
104
104
} else {
@@ -326,10 +326,10 @@ + (void)writeStoreIDToSetupExecutableWithError:(NSError **)error {
326
326
[data writeToURL: execPath options: 0 error: error];
327
327
}
328
328
329
- + (void )validateJITLessSetupWithCompletionHandler : (void (^)(BOOL success, NSError *error))completionHandler {
329
+ + (void )validateJITLessSetupWithSigner : (Signer) signer completionHandler : (void (^)(BOOL success, NSError *error))completionHandler {
330
330
// Verify that the certificate is usable
331
331
// Create a test app bundle
332
- NSString *path = [NSTemporaryDirectory () stringByAppendingPathComponent: @" CertificateValidation" ];
332
+ NSString *path = [NSTemporaryDirectory () stringByAppendingPathComponent: @" CertificateValidation.app " ];
333
333
[NSFileManager .defaultManager createDirectoryAtPath: path withIntermediateDirectories: YES attributes: nil error: nil ];
334
334
NSString *tmpExecPath = [path stringByAppendingPathComponent: @" LiveContainer.tmp" ];
335
335
NSString *tmpLibPath = [path stringByAppendingPathComponent: @" TestJITLess.dylib" ];
@@ -341,12 +341,23 @@ + (void)validateJITLessSetupWithCompletionHandler:(void (^)(BOOL success, NSErro
341
341
[info writeToFile: tmpInfoPath atomically: YES ];
342
342
343
343
// 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
+
350
361
}
351
362
352
363
+ (NSURL *)archiveIPAWithBundleName : (NSString *)newBundleName error : (NSError **)error {
0 commit comments