Closed iosdeveloper closed 2 years ago
Hi @iosdeveloper,
WhatsNewKit is currently using the Text.init(_ attributedContent: AttributedString)
initializer which is only available >= iOS 15.0
A fallback for < iOS 15.0 is currently not implemented when initializing a WhatsNew.Text
instance with a AttributedString
or NSAttributedString
.
Ah, that makes sense. I'm trying to use this from UIKit and have to be backwards compatible one major iOS version. I will just make it plain text only as a fallback then.
@SvenTiigi Unfortunately I'm seeing a crash when running my iOS app on Mac due to the #available(iOS 15.0, *)
checks failing. The issue was acknowledged by an Apple engineer in the forums: https://developer.apple.com/forums/thread/691559?answerId=690192022#690192022
The solution is also mentioned there. Can we update the check in Text+WhatsNewText.swift accordingly?
This problem should be fixed with Xcode 13.2
https://developer.apple.com/documentation/xcode-release-notes/xcode-13_2-release-notes
Fixed an issue that caused availability checks in iPhone and iPad apps running on a Mac with Apple silicon to always return true, which caused iOS apps running in macOS Big Sur to see iOS 15 APIs as available, resulting in crashes. These availability checks now return the correct result for apps compiled with Xcode 13.2. (83378814)
That works, thanks. I found another issue for "iOS app on Mac". The Continue button doesn't dismiss the WhatsNewViewController
. Manually calling dismiss(animated:)
in onDismiss
for the primary action works. Not necessarily your fault though, as it works on iOS.
WhatsNewKit Environment
What did you do?
Try to create an instance of
WhatsNew.Text
from aNSAttributedString
with iOS deployment target14.0
:What did you expect to happen?
No build error.
NSAttributedString
should be available on iOS 3.2+.What happened instead?