I fixed a typo in my Info.plist entry and now it works. Here is the actual entry I used...
<key>MSSupportedPresentationContexts</key>
<array>
<string>MSMessagesAppPresentationContextMessages</string>
<string>MSMessagesAppPresentationContextMedia</string>
</array>
Now my extension appears in the Sticker context and is available in other apps.
Post
Replies
Boosts
Views
Activity
I’m trying to figure this out as well. My Messages extension is bundled with my main app and shows up when the More button is pressed.
This developer doc seems to suggest all I need to do is add a new Info.plist entry to appear in the Stickers context.
I added…
MSSupportedPresentationContexts
- MSMessagesAppPresentationContextMessages
- MSMessagesAppPresentationContextMedia
However, the extension still only appears in the Messages app and not in the keyboard based Stickers app.
I’m using a MSMessagesAppViewController but I think that’s fine.
If I figure it out I’ll let you know.
I've come to the conclusion that font support in NSLayoutManager.setGlyphs is broken for iOS/iPadOS/Catalyst. Only fonts stored in NSTextStorage will be used.
I changed my implementation to set the property to .controlCharacter with a .whitespace action. I then return the correct bounding box to hold the emoji font. Finally, I use a custom NSLayoutManager to do the rendering.
The last part is a pain when using a storyboard, since NSTextContainer.replaceLayoutManager doesn't work right either. But I figured out a workaround to that as well.