Texture icon indicating copy to clipboard operation
Texture copied to clipboard

macOS Catalyst Support

Open b3ll opened this issue 5 years ago • 14 comments

Any chance of supporting Catalyst anytime soon?

There's a few issues with text rendering and some thread affinity stuff that seems to break when being run as UIKit on the mac.

If there are plans to adopt it / support it, I'll happily post crash logs / more info.

b3ll avatar Jun 12 '19 06:06 b3ll

Hi Adam! Would you be so kind and post in some crash logs and more info in here. I don't have a Catalina machine on hand yet, but would happily take a first look so we can tackle it as soon as we get a machine. Thanks and appreciated!

maicki avatar Jun 24 '19 16:06 maicki

After explicitly building AsyncDisplayKit.framework with UIKit macOS support (meaning to enable that checkbox in Xcode 11) I was able to run my Texture app on macOS! 😃My only problem was ASCollectionView and IGListKIt, some assertions for setDatasource/setDelegate produced crashes. But after commenting them out + re-building IGLIstKit everything seems working at first glance, but need a more careful investigation. Can't express enough how awesome it is, async layout on 60 fps, the same UIView animations + other libraries. Magic!

So now I need to figure out what needs to be contributed back. Have someone else managed to built their app with Texture?

ptmt avatar Jun 26 '19 18:06 ptmt

Although, window resizing s something: Screen-Recording-2019-06-26-at-10 03 21-PM

ptmt avatar Jun 26 '19 19:06 ptmt

@ptmt Got our iOS Composer at Buffer running on Mac last week. Think I hit the same issues as you, mainly around getting Texture to include the correct frameworks when building on Mac along with IGListKit tweaks.

Things that spring to mind...

  • Unsupported AssetsLibrary was being included, need to add check for UIKitForMac.
  • ASDisplayNode CAEAGLLayer check

ay8s avatar Jun 27 '19 18:06 ay8s

echoing what was already mentioned, thanks for those notes @ay8s

The other main issue I saw was font rendering, it appears as though the CF attribute stripping of NSAttributedString is breaking system fonts (i.e. SF Pro, +systemFontOfSize:, etc.).

I have a pretty hacky fix here: https://github.com/b3ll/Texture/commit/140af43cfa9fd4de6737014c8a75269ff7973725

Didn't really test it that much though

b3ll avatar Jun 27 '19 18:06 b3ll

Can maybe PR that one @b3ll, maybe can be tidied up with some input :) Been loving Times New Roman :P

ay8s avatar Jun 27 '19 18:06 ay8s

@b3ll Could you try out running ASTextNode2 instead of ASTextNode. This is using Core Text directly.

maicki avatar Jun 27 '19 18:06 maicki

ASTextNode2 indeed solves both resizing and font problems, thanks!

ptmt avatar Jul 03 '19 18:07 ptmt

ASTextNode2 also fixed it for me!

What's the deal with ASTextNode vs. ASTextNode2? Is there an eta when we should switch?

b3ll avatar Jul 05 '19 18:07 b3ll

Just FYI, I fixed the font issue so it should be safe to use either text node now

rahul-malik avatar Jul 20 '19 03:07 rahul-malik

Things that spring to mind...

Unsupported AssetsLibrary was being included, need to add check for UIKitForMac. ASDisplayNode CAEAGLLayer check

@ay8s Hey! May I do a PR for those things?

objectivecosta avatar Oct 04 '19 14:10 objectivecosta

@martinstoyanov mine works pretty well. Just make sure you remove all references to AssetsLibrary:

  • Delete AssetsLibrary.framework from Texture's linked framework list;
  • Search and delete all -framework "AssetsLibrary";
  • Search and replace all AS_USE_ASSETS_LIBRARY=1 to AS_USE_ASSETS_LIBRARY=0.

JunyuKuang avatar Apr 17 '20 14:04 JunyuKuang

How did you get around ASDisplayNode CAEAGLLayer check?

brennanerbz avatar Jul 14 '23 15:07 brennanerbz

@brennanerbz Yes, you can check it out https://github.com/nickaroot/Texture/commit/05a486e3275de53f2b0dfb24925fa528e2b610e6

nickaroot avatar Sep 01 '23 01:09 nickaroot