watchOS 2 Beta 4: Can’t Import CoreText
Originator: | SlaunchaMan | ||
Number: | rdar://22106516 | Date Originated: | 01-Aug-2015 11:08 PM |
Status: | Duplicate/22596950/Closed | Resolved: | |
Product: | watchOS SDK | Product Version: | Xcode Version 7.0 beta 4 (7A165t) |
Classification: | Other Bug | Reproducible: | Always |
Summary: If you want to use CoreText in watchOS (for instance, to render small-caps text, as I do in the attached sample project), you can’t use it directly, as you can’t import CoreText. Steps to Reproduce: 1. In a watchOS 2 project, import CoreText using: Swift: import CoreText Objective-C: @import CoreText; 2. Build Expected Results: The app builds and you can use constants defined in CoreText headers. Actual Results: The compiler throws an error that it can't find CoreText. Version: Xcode Version 7.0 beta 4 (7A165t) Notes: According to this URL, as of Beta 4, CoreText is in WatchKit: https://developer.apple.com/library/prerelease/watchos/releasenotes/General/watchOS2SeedAPIDiffs/frameworks/CoreText.html Since there’s no <CoreText/CoreText.h> to be found, I tried this: #import <CoreText/SFNTLayoutTypes.h> since that header was explicitly added in the diff, but it still wouldn’t work.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Sample project:
https://github.com/SlaunchaMan/RadarSampleProjects/tree/master/22106516/SmallCaps