TextureGroup / Texture

Smooth asynchronous user interfaces for iOS apps.
https://texturegroup.org/
Other
8k stars 1.29k forks source link

macOS Catalyst Support #1549

Open b3ll opened 5 years ago

b3ll commented 5 years ago

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.

maicki commented 5 years ago

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!

ptmt commented 5 years ago

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 commented 5 years ago

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

ay8s commented 5 years ago

@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...

b3ll commented 5 years ago

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

ay8s commented 5 years ago

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

maicki commented 5 years ago

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

ptmt commented 5 years ago

ASTextNode2 indeed solves both resizing and font problems, thanks!

b3ll commented 5 years ago

ASTextNode2 also fixed it for me!

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

rahul-malik commented 5 years ago

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

objectivecosta commented 4 years ago

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?

JunyuKuang commented 4 years ago

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

brennanerbz commented 1 year ago

How did you get around ASDisplayNode CAEAGLLayer check?

nickaroot commented 1 year ago

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