Skip to content

Fix Paywalls crash on iOS 18 beta#4154

Merged
MarkVillacampa merged 3 commits into
mainfrom
andy/fix-iOS-18-crash
Aug 7, 2024
Merged

Fix Paywalls crash on iOS 18 beta#4154
MarkVillacampa merged 3 commits into
mainfrom
andy/fix-iOS-18-crash

Conversation

@aboedo

@aboedo aboedo commented Aug 7, 2024

Copy link
Copy Markdown
Member

Temporary fix for #4150

Hopefully iOS 8 beta 6 fixes ViewThatFits and we can roll this back, but this should help in the meantime

@aboedo aboedo added the pr:fix A bug fix label Aug 7, 2024
@aboedo aboedo requested review from a team, MarkVillacampa and joshdholtz August 7, 2024 18:23
@aboedo aboedo self-assigned this Aug 7, 2024
Comment on lines +117 to +118
let iOSVersionWithCrash = OperatingSystemVersion(majorVersion: 18, minorVersion: 0, patchVersion: 0)
let isIOSVersionWithCrash = ProcessInfo.processInfo.isOperatingSystemAtLeast(iOSVersionWithCrash)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

note: I'm kinda going out of my way to not name this iOS18 so that people don't get knocked for having references to unreleased software, just in case. I've seen Apple's code checks get really dumb.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

might even be worth extracting the 18 to a different variable just in case too

@JayShortway JayShortway Aug 8, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

majorVersion: 6*3

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

majorVersion: 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

😆

@aboedo

aboedo commented Aug 7, 2024

Copy link
Copy Markdown
Member Author

can't approve because I opened the PR but 🚢

@MarkVillacampa MarkVillacampa merged commit a557ca5 into main Aug 7, 2024
@MarkVillacampa MarkVillacampa deleted the andy/fix-iOS-18-crash branch August 7, 2024 18:53
MarkVillacampa pushed a commit that referenced this pull request Aug 7, 2024
**This is an automatic release.**

### Bugfixes
* Fix Paywalls crash on iOS 18 beta (#4154) via Andy Boedo (@aboedo)
### Dependency Updates
* Bump danger from 9.4.3 to 9.5.0 (#4143) via dependabot[bot]
(@dependabot[bot])
* Bump nokogiri from 1.16.6 to 1.16.7 (#4129) via dependabot[bot]
(@dependabot[bot])
* Bump fastlane from 2.221.1 to 2.222.0 (#4130) via dependabot[bot]
(@dependabot[bot])
### Other Changes
* Update deployment targets for tests (#4145) via Andy Boedo (@aboedo)
* Deploy purchaserTester: clean up dry-run parameter (#4140) via Andy
Boedo (@aboedo)
* Clean up API Testers (#4141) via Andy Boedo (@aboedo)
* More project structure cleanup (#4131) via Andy Boedo (@aboedo)
* temporarily disables purchasetester deploy (#4133) via Andy Boedo
(@aboedo)
* Fix trigger all tests branch (#4135) via Andy Boedo (@aboedo)
* Clean up XCWorkspace and testing apps (#4111) via Andy Boedo (@aboedo)
* tests trigger: add target-branch parameter to trigger from the right
branch (#4121) via Andy Boedo (@aboedo)
* Re-added the RevenueCatUI tests job on every commit (#4113) via Andy
Boedo (@aboedo)
#endif
}

private static var isIOSVersionWithCrash: Bool {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is going to get called a million times as the view is re-evaluated. I'd cache it 😇

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

great call

MarkVillacampa added a commit that referenced this pull request Aug 12, 2024
The issue has been fixed in iOS 18.1 beta 2 / iOS 18 beta 6.

Original PR: #4154
nyeu pushed a commit that referenced this pull request Oct 2, 2024
Temporary fix for
#4150

Hopefully iOS 8 beta 6 fixes `ViewThatFits` and we can roll this back,
but this should help in the meantime

---------

Co-authored-by: Mark Villacampa <m@markvillacampa.com>
nyeu pushed a commit that referenced this pull request Oct 2, 2024
**This is an automatic release.**

### Bugfixes
* Fix Paywalls crash on iOS 18 beta (#4154) via Andy Boedo (@aboedo)
### Dependency Updates
* Bump danger from 9.4.3 to 9.5.0 (#4143) via dependabot[bot]
(@dependabot[bot])
* Bump nokogiri from 1.16.6 to 1.16.7 (#4129) via dependabot[bot]
(@dependabot[bot])
* Bump fastlane from 2.221.1 to 2.222.0 (#4130) via dependabot[bot]
(@dependabot[bot])
### Other Changes
* Update deployment targets for tests (#4145) via Andy Boedo (@aboedo)
* Deploy purchaserTester: clean up dry-run parameter (#4140) via Andy
Boedo (@aboedo)
* Clean up API Testers (#4141) via Andy Boedo (@aboedo)
* More project structure cleanup (#4131) via Andy Boedo (@aboedo)
* temporarily disables purchasetester deploy (#4133) via Andy Boedo
(@aboedo)
* Fix trigger all tests branch (#4135) via Andy Boedo (@aboedo)
* Clean up XCWorkspace and testing apps (#4111) via Andy Boedo (@aboedo)
* tests trigger: add target-branch parameter to trigger from the right
branch (#4121) via Andy Boedo (@aboedo)
* Re-added the RevenueCatUI tests job on every commit (#4113) via Andy
Boedo (@aboedo)
nyeu pushed a commit that referenced this pull request Oct 2, 2024
The issue has been fixed in iOS 18.1 beta 2 / iOS 18 beta 6.

Original PR: #4154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants