Skip to content

Conversation

@L1ghtmann
Copy link
Member

What does this implement/fix? Explain your changes.

Does this close any currently open issues?

Appears to resolve #9

Any relevant logs, error output, etc?

N/A

Any other comments?

With the following code (a modified version of the code mentioned in the issue above):

@protocol CCSectionDelegate <NSObject>
- (void)updateStatusText:(NSString *)text;
- (void)requestControlCenterDismissal;
- (void)sectionHeightChanged;
- (void)showViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)(void))completion;
@end

%subclass CCSectionViewController : SpringBoard <CCSectionDelegate, UICollectionViewDelegate>
%end

Current logos: crash
This branch: no crash

Where has this been tested?

Operating System:

Linux (WSL)
iP7 -- iOS 14.3 - unc0ver

Platform:

Target Platform:

Toolchain Version:

SDK Version:

Copy link
Member

@uroboro uroboro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use the "elvis" operator, you can reduce the number of calls to objc_getProtocol():

objc_getProtocol(\"$_\") ?: \@protocol($_)

@L1ghtmann
Copy link
Member Author

If you use the "elvis" operator, you can reduce the number of calls to objc_getProtocol():

objc_getProtocol(\"$_\") ?: \@protocol($_)

Today I learned that's a thing. Thanks!

@L1ghtmann
Copy link
Member Author

It appears this exact fix has been proposed on two separate occasions and both times Dustin pointed out potential problems that would need to be addressed:

@L1ghtmann L1ghtmann marked this pull request as draft October 25, 2023 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

%subclass with protocols crashes in the constructor

2 participants