-
Notifications
You must be signed in to change notification settings - Fork 84
Add macOS support #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add macOS support #149
Conversation
visionOS support also coming? :) |
Any updates on this one? MacOS support would be huge! |
After applying changes required by macOS itself (e.g. removing Screen.Recording.2024-10-10.at.20.21.15.movI managed to get it working by commenting out two swizzled methods in 7026df1 but then the formatting is applied with a slight delay: Screen.Recording.2024-10-10.at.20.18.19.movSo the formatting is incorrect for 1 frame: ![]() |
Hello! I would be interested if this PR was revived, though as I understand it, now this library is new architecture only? |
@Saadnajmi Hey, nice to hear that! Yep, as of today So one of the blockers is that we're still using method swizzling to override the default behavior when typing or updating the value from JS. There's a PR that eliminates method swizzling but there are still some details that need to be fixed: #520 As far as I remember, there were no blockers caused by I'm curious to know about your use case, feel free to send me a DM. |
The use case is mostly "it would be real great to have a proper open source richtextinput library for desktop". It feels like a common request for desktop apps specifically. We have some custom stuff internally, but it's not something that would be useful in open source IMO. |
@@ -1,34 +1,34 @@ | |||
#import <UIKit/UIKit.h> | |||
#import <React/RCTUIKit.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve put uses of RCTUIKit inside an ifdef for other libraries, because I don’t think iOS would compile since React Native Core doesn’t have it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add #ifdef
s later on, now I'm just trying to make it compile on macOS.
|
||
#import <react/renderer/components/RNLiveMarkdownSpec/Props.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface RCTMarkdownStyle : NSObject | ||
|
||
@property (nonatomic) UIColor *syntaxColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think React Native macOS #defines UIColor to NSColor if that helps?
Details
Work in progress
Related Issues
GH_LINK
Manual Tests
Linked PRs