Skip to content

Commit 04f771c

Browse files
committedMay 18, 2016
Replace 'Reset' button
Replaces Reset button for distribution profile when private key is missing.
1 parent cdbedc6 commit 04f771c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
 

‎FixCode/FixCode.m

+22
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@
1111
#import "Aspects.h"
1212
#import "FixCode.h"
1313

14+
@interface IDEEnhancedProvisioningSigningIdentity : NSObject
15+
16+
@property NSUInteger state; // 0: current, 2: online-only
17+
18+
@end
19+
20+
@interface IDESigningIdentityActionCellViewContents : NSObject
21+
22+
@property IDEEnhancedProvisioningSigningIdentity *signingIdentity;
23+
24+
@end
25+
1426
@interface NSObject (Shutup)
1527

1628
-(void)_autoLayoutViewViewFrameDidChange:(id)arg0;
@@ -163,6 +175,16 @@ - (void)swizzleCodeSigningResolution
163175
if (error) {
164176
NSLog(@"Error: %@", error);
165177
}
178+
179+
[objc_getClass("IDESigningIdentityActionCellView") aspect_hookSelector:@selector(setObjectValue:) withOptions:AspectPositionAfter usingBlock:^(id<AspectInfo> info, IDESigningIdentityActionCellViewContents *cellContents) {
180+
if ([[cellContents signingIdentity] state] == 2) {
181+
[self findAndReplaceFixIssueButtonInView:info.instance];
182+
}
183+
} error:&error];
184+
185+
if (error) {
186+
NSLog(@"Error: %@", error);
187+
}
166188
}
167189

168190
@end

0 commit comments

Comments
 (0)
Please sign in to comment.