WordPress-iOS
WordPress-iOS copied to clipboard
Fix MediaRequestAuthenticator Core Data threading issue
Fixes an issue discovered when testing private Atomic sites.
There is a threading violation in this line that's being called from the background.
try? WPAccount.lookupDefaultWordPressComAccount(in: ContextManager.shared.mainContext)
I moved it to the main thread as a quick fix, but it really needs to be redesigned together with how session dependencies are managed in the app.
To test:
- Open a private Atomic site
- Open Media
- Verify that Xcode doesn't report any Core Data threading violations
Regression Notes
-
Potential unintended areas of impact
-
What I did to test those areas of impact (or what existing automated tests I relied on)
-
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
- [ ] I have completed the Regression Notes.
- [ ] I have considered adding unit tests for my changes.
- [ ] I have considered adding accessibility improvements for my changes.
- [ ] I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txtif necessary.
Testing checklist:
- [ ] WordPress.com sites and self-hosted Jetpack sites.
- [ ] Portrait and landscape orientations.
- [ ] Light and dark modes.
- [ ] Fonts: Larger, smaller and bold text.
- [ ] High contrast.
- [ ] VoiceOver.
- [ ] Languages with large words or with letters/accents not frequently used in English.
- [ ] Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
- [ ] iPhone and iPad.
- [ ] Multi-tasking: Split view and Slide over. (iPad)
📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
| App Name | Jetpack Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr23189-78189d1 | |
| Version | 24.8 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 78189d13c01a288b835ed370c2e9b539be6313fb | |
| App Center Build | jetpack-installable-builds #8920 |
📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
| App Name | WordPress Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr23189-78189d1 | |
| Version | 24.8 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 78189d13c01a288b835ed370c2e9b539be6313fb | |
| App Center Build | WPiOS - One-Offs #9872 |