-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'@objc' class method in extension of subclass of 'SwinjectStoryboard' requires iOS 13.0.0 #173
Comments
Update: tried targeting ios 13 and it did not resolve the issue. I also tried updating Swinject to 2.7.1, which did not resolve the issue. I tried Swinject 2.8.2, which did nothing. I tried specifying SwinjectStoryboard 2.2.0, 2.2.1, and 2.2.2.
|
I've same issue, anybody has a solution?
|
for those who struggles with setup method in XCode 14, Either turn off dead strip option, or use this workaround: __attribute__((constructor)) static void swinjectStoryboardSetupEntry(void);
@interface SwinjectStoryboard (SetUp)
@end
@implementation SwinjectStoryboard (SetUp)
// will never get called from outside, but allows to keep swinjectStoryboardSetupEntry away from stripping
- (void) avoidDeadStripping {
swinjectStoryboardSetupEntry();
}
@end
__attribute__((constructor)) static void swinjectStoryboardSetupEntry(void) {
if ([SwinjectStoryboard conformsToProtocol:@protocol(SwinjectStoryboardProtocol)] &&
[SwinjectStoryboard respondsToSelector:@selector(setup)]) {
[SwinjectStoryboard performSelector:@selector(setup)];
}
} |
Could you try this code? I think, it is important - using
If it works, i create PR for fixing docs. |
I have already removed SwinjectStoryboard from my app - I will add it back in on Monday and attempt your change. |
I use Xcode 14, but I still have the same problem. Should I remove SwinjectStoryboard in my project? |
in my case is never entering the library SwinjectStoryboard, like it doesn't exists in my project |
macOS Monterey 12.4 (21F79)
Xcode Version 13.2.1 (13C100)
inside my podfile Target:
Do I have to target iOS 13 to use this version of Swinject?
The text was updated successfully, but these errors were encountered: