-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
feat: Support for Mac Catalyst #1231
base: master
Are you sure you want to change the base?
Conversation
* Add Xcode attributes for UIKit for Mac in `CMakeLists.txt` * Patch Xcode project to use the new build system after generation (`cmake-gen.sh`) * Pass appropriate build flags to `libffi` and `webkit` in build scripts * Place sample apps' `Frameworks` directory in `Contents/MacOS` * Add `com.apple.security.cs.allow-unsigned-executable-memory` entitlement which is needed for libffi to work (in samples and project template) * Bundle TKLiveSync as an `.xcframework` * Commit pre-built libzip-iOS * Look for `app/`directory in `Contents/Resources` * Build fixes in `metadata-generator` * Build fixes in `webkit`
NPM doesn't support symlinks but MacOS variants of the XCFrameworks use them
For some reason it was being generated with its full path, change to relative to loader's search paths (via `@rpath`)
It is required for UIKit for Mac
* Pass `resourceURL` as application path when initializing TNSRuntime. It points to the correct path for both iOS and UIKit for Mac * Expose bool flag `__uikitformac` in `global` * Skip native callstack checks in `methodCallsTests.js` when running on UIKit for Mac. Native callstack unwinding stops after it encounters a libffi call frame * Hardcode iOS system version to 13.0 when curnning on UIKit for Mac * Correct initialization of `global.__approot` for iOS and UIKit for Mac
This enables opening the project with Xcode 10.2
… bit unset It seems like a tagged pointer can now be any pointer above 2^53 (not only above 2^63)
In Xcode 11 beta `UIDocumentInteractionControllerDelegate` has been declared as unavailable before SDK 13.0 but it actually exists since 3.2. see https://developer.apple.com/documentation/uikit/uidocumentinteractioncontrollerdelegate
This reverts commit f73fa4e.
* Change architecture name from `uikitformac` to `maccatalyst` * Rebuild `libzip_iOS.xcframework`
* Do not leave properties that are declared in an inheritor as `undefined` * Add unit tests with hidden method * fix metadata generator to handle macOS SDK issues * Exclude blocking property getters from `ApiIterator` tests * Remove hardcoded iOS version for Catalyst (13.0)
* Default initialize pointers * Fallback to enum's declaration if there's no definition * Gracefully handle invalid decl's and show appropriate errors in output
In Catalina beta 6 the issue has reappeared.
Recursing to `globalObject->constructorFor` is the right thing to do because it has the additional logic of looking for a known class from its class hierarchy. Add unit tests.
Once again Catalyst has started returning the macOS version instead of iOS version. Add unit tests to signal each time this changes and temporarily hardcode it to 13.2.
Instead of `putDirectWithoutTransition` call `putDirect` now because due to the changes from commit `fix(runtime): Correctly get base class constructor` it is possible to define the class before this call and the previous method requires that no such property exists in the object.
Keep the mangled names when generating for Catalyst. `class_getName` behaves differently on both platforms and we need to take it into account. Modify unit test to check for the correct name depending on the platform.
The new build system has some caching mechanism which checks in advance whether files to be compiled exist or not. It sporadically fails to find `DerivedSources/WTF/mach_excServer.c` when the generation is a bit slower on Jenkins slaves. As a workaround we're retrying the `xcodebuild` command. The second time around the file will have been generated in advance and no such racing condition will exist.
test branch_tns_core_modules#feat/uikit-for-mac |
test branch_tns_core_modules#feat/uikit-for-mac |
Any updates on this? |
Curious if this is still being pursued |
Any updates? |
@ClassicOldSong I'm not sure what happened with Mac Catalyst support on the iOS JavaScriptCore runtime, but now all development for the iOS runtime is based on V8 instead. This merged PR from 2020 suggests that the iOS V8 runtime, at least, does support Mac Catalyst. I'll caution that there are no guides on setting up a Mac Catalyst project, as although it may theoretically be supported, it's not an active focus. I'm not aware of any example projects. If you get stuck, we could try assisting on Discord, though I suspect most of us have never attempted to run a Mac Catalyst project before. |
@ClassicOldSong I believe @tjvantoll wrote a guide on how to set up a Mac Catalyst project (as an experimental proof of concept) for NativeScript, but I can't find it anymore. It was a long time ago, but some of the information may still be relevant. |
PR Checklist
refs #1165
test branch_tns_core_modules#feat/uikit-for-mac