Skip to content
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

invalid use of UIKit from a background thread. #1254

Closed
AymenFarrah opened this issue Feb 19, 2018 · 5 comments
Closed

invalid use of UIKit from a background thread. #1254

AymenFarrah opened this issue Feb 19, 2018 · 5 comments

Comments

@AymenFarrah
Copy link

AymenFarrah commented Feb 19, 2018

we have a crash caused by using a UIKit from a background thread
i have the last version of IQKeyboardManager 5.0.7 (objective-c version)

the issue is in the file : IQKeyboardManager.m Line 240 .. UITextField *view = [[UITextField alloc] init];

//Loading IQToolbar, IQTitleBarButtonItem, IQBarButtonItem to fix first time keyboard appearance delay (Bug ID: #550)
            {
                UITextField *view = [[UITextField alloc] init];
                [view addDoneOnKeyboardWithTarget:nil action:nil];
                [view addPreviousNextDoneOnKeyboardWithTarget:nil previousAction:nil nextAction:nil doneAction:nil];
            }
@hackiftekhar
Copy link
Owner

Please be sure to don't call IQKeyboardManager.sharedManager() from a background thread.

@CyberMew
Copy link

@hackiftekhar I am having this problem as well during launch of the app. Same even after updating to 5.0.8. I am using the ObjC version and I do not call any of IQKeyboardManager functions/methods at all. We do not experience a crash but we do experience a breakpoint (we do have All Exceptions turned on). The only way to 'fix it' is to turn off exception for a short while and reenable it after the app has launched finished.

screen shot 2018-03-19 at 11 47 53 am

@hackiftekhar
Copy link
Owner

As you can see this is on main thread and we aren't doing anything special. Same code doesn't have issue with previous version of Xcode. So I believe ut's not from our side. To let you know I'm also having same issue but unable to gix tjis since it's beyond our control.

@hackiftekhar
Copy link
Owner

Duplucate of #1136

@CyberMew
Copy link

Yes, seems like it's some bug with All Exceptions, because if we disabled All Exceptions but still enable the exceptions underneath it, it works.

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

No branches or pull requests

3 participants