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

Fix superview issue on iOS #198

Merged
merged 1 commit into from
May 9, 2023

Conversation

AdityaPahilwani
Copy link
Contributor

@AdityaPahilwani AdityaPahilwani commented Oct 8, 2022

Fixes #192

current the lib access UIWindow access by
UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
and was deprecated in ios 15 and can return nil https://developer.apple.com/forums/thread/695932
and when I debugged this and passed
UIWindow *keyWindow = nil;
it threw the exact error
Unable to parse constraint format: Unable to interpret '|' character, because the related view doesn't have a superview V:[self(>=48)]| ^

By accessing UIWindow by
UIWindow *keyWindow = [[UIApplication sharedApplication] delegate].window;
which would point to the window of AppDelegagte.

We didn't saw any crash reports after this fix.

@savv
Copy link

savv commented May 9, 2023

@cooperka, many thanks for this library! What about merging this and making a new release?

@cooperka
Copy link
Owner

cooperka commented May 9, 2023

thanks for the fix and documentation, @AdityaPahilwani! i will merge and release as a minor (rather than patch) version bump since i have not been able to verify whether or not this change may break earlier versions. it likely does not.

@cooperka cooperka changed the title Fix superview issue Fix superview issue on iOS May 9, 2023
@cooperka cooperka merged commit 5d44f84 into cooperka:main May 9, 2023
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.

getting crash on iOS 15
4 participants