Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/microsoft-build-rntester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ on:

jobs:
build-rntester:
name: "${{ matrix.platform }}, ${{ matrix.arch }}"
name: "${{ matrix.platform }}, ${{ matrix.arch }}, ${{ matrix.linkage }}"
runs-on: macos-26
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
platform: [macos, ios, visionos]
arch: [oldarch, newarch]
linkage: [static, dynamic]
include:
# Platform-specific properties
- platform: macos
Expand All @@ -32,6 +33,11 @@ jobs:
new_arch_enabled: '0'
- arch: newarch
new_arch_enabled: '1'
# Linkage-specific properties
- linkage: static
use_frameworks: ''
- linkage: dynamic
use_frameworks: 'dynamic'

steps:
- uses: actions/checkout@v4
Expand All @@ -51,14 +57,27 @@ jobs:

- name: Install Pods
working-directory: packages/rn-tester
# Dynamic frameworks are still a work in progress on this fork (see RCT-Folly /
# header plumbing). Run those jobs for coverage but don't let pod install / build
# failures fail the check; the real result is still visible in the step logs.
# Static builds stay strict/required.
continue-on-error: ${{ matrix.linkage == 'dynamic' }}
env:
RCT_NEW_ARCH_ENABLED: ${{ matrix.new_arch_enabled }}
USE_FRAMEWORKS: ${{ matrix.use_frameworks }}
run: |
set -eox pipefail
# USE_FRAMEWORKS is empty for static-library builds; unset it so the
# Podfile keeps its default (static libraries) instead of coercing an
# empty linkage value.
if [[ -z "$USE_FRAMEWORKS" ]]; then
unset USE_FRAMEWORKS
fi
bundle install
bundle exec pod install --verbose

- name: Build ${{ matrix.scheme }}
continue-on-error: ${{ matrix.linkage == 'dynamic' }} # [macOS] Dynamic frameworks WIP; keep the check green while building for coverage
env:
USE_CCACHE: 0
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/microsoft-prebuild-macos-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
id: cache-slice
uses: actions/cache/restore@v4
with:
key: v1-macos-core-${{ matrix.platform }}-Debug-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
key: v1-macos-core-${{ matrix.platform }}-Debug-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactApple/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
path: |
packages/react-native/.build/output/spm/Debug/Build/Products
packages/react-native/.build/headers
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/') && endsWith(github.ref, '-stable') }}
uses: actions/cache/save@v4
with:
key: v1-macos-core-${{ matrix.platform }}-Debug-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
key: v1-macos-core-${{ matrix.platform }}-Debug-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactApple/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
path: |
packages/react-native/.build/output/spm/Debug/Build/Products
packages/react-native/.build/headers
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
id: cache-xcframework
uses: actions/cache/restore@v4
with:
key: v1-macos-core-xcframework-Debug-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
key: v1-macos-core-xcframework-Debug-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactApple/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
path: |
packages/react-native/.build/output/xcframeworks/ReactCoreDebug.xcframework.tar.gz
packages/react-native/.build/output/xcframeworks/ReactCoreDebug.framework.dSYM.tar.gz
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/') && endsWith(github.ref, '-stable') }}
uses: actions/cache/save@v4
with:
key: v1-macos-core-xcframework-Debug-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
key: v1-macos-core-xcframework-Debug-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactApple/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
path: |
packages/react-native/.build/output/xcframeworks/ReactCoreDebug.xcframework.tar.gz
packages/react-native/.build/output/xcframeworks/ReactCoreDebug.framework.dSYM.tar.gz
Expand Down
6 changes: 3 additions & 3 deletions packages/react-native/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ let reactCore = RNTarget(
"ReactCommon/react/runtime/platform/ios", // explicit header search path to break circular dependency. RCTHost imports `RCTDefines.h` in ReactCore, ReacCore needs to import RCTHost
],
linkedFrameworks: ["CoreServices"],
excludedPaths: ["Fabric", "Tests", "Resources", "Runtime/RCTJscInstanceFactory.mm", "I18n/strings", "CxxBridge/JSCExecutorFactory.mm", "CoreModules", "RCTUIKit"], // [macOS]
excludedPaths: ["Fabric", "Tests", "Resources", "Runtime/RCTJscInstanceFactory.mm", "I18n/strings", "CxxBridge/JSCExecutorFactory.mm", "CoreModules"],
dependencies: [.reactNativeDependencies, .reactCxxReact, .reactPerfLogger, .jsi, .reactJsiExecutor, .reactUtils, .reactFeatureFlags, .reactRuntimeScheduler, .yoga, .reactJsInspector, .reactJsiTooling, .rctDeprecation, .reactCoreRCTWebsocket, .reactRCTImage, .reactTurboModuleCore, .reactRCTText, .reactRCTBlob, .reactRCTAnimation, .reactRCTNetwork, .reactFabric, .hermesPrebuilt, .reactRCTUIKit], // [macOS]
sources: [".", "Runtime/RCTHermesInstanceFactory.mm"]
)
Expand Down Expand Up @@ -543,7 +543,7 @@ let reactSettings = RNTarget(
/// UIKit/AppKit compatibility layer for React Native macOS.
let reactRCTUIKit = RNTarget(
name: .reactRCTUIKit,
path: "React/RCTUIKit",
path: "ReactApple/Libraries/RCTUIKit",
// [macOS: UIKit on iOS/visionOS, AppKit on macOS
platformLinkerSettings: [
.linkedFramework("UIKit", .when(platforms: [.iOS, .visionOS])),
Expand Down Expand Up @@ -786,7 +786,7 @@ extension String {
static let reactNativeModuleDom = "React-domnativemodule"
static let reactAppDelegate = "React-RCTAppDelegate"
static let reactSettings = "React-RCTSettings"
static let reactRCTUIKit = "React-RCTUIKit" // [macOS]
static let reactRCTUIKit = "RCTUIKit" // [macOS]
}

func relativeSearchPath(_ depth: Int, _ path: String) -> String {
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/React-Core.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ Pod::Spec.new do |s|
"React/Tests/**/*",
"React/Inspector/**/*",
"React/Runtime/**/*",
"React/RCTUIKit/**/*", # [macOS]
]

# The default is use hermes, we don't have jsc installed
Expand Down
9 changes: 9 additions & 0 deletions packages/react-native/React/RCTPlatformDisplayLink.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) Microsoft Corporation.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

// [macOS] Compatibility header for existing <React/RCTPlatformDisplayLink.h> consumers.
#import <RCTUIKit/RCTPlatformDisplayLink.h>
9 changes: 9 additions & 0 deletions packages/react-native/React/RCTUIKit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) Microsoft Corporation.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

// [macOS] Compatibility umbrella for existing <React/RCTUIKit.h> consumers.
#import <RCTUIKit/RCTUIKit.h>
25 changes: 0 additions & 25 deletions packages/react-native/React/RCTUIKit/RCTUIKit.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <TargetConditionals.h>

#import <React/RCTUIKitCompat.h>
#import "RCTUIKitCompat.h"

#if !TARGET_OS_OSX
@compatibility_alias RCTUIActivityIndicatorView UIActivityIndicatorView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#if TARGET_OS_OSX

#import <React/RCTUIActivityIndicatorView.h>
#import "RCTUIActivityIndicatorView.h"

#import <CoreImage/CIFilter.h>
#import <CoreImage/CIVector.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#if TARGET_OS_OSX

#import <React/RCTUIGraphics.h>
#import "RCTUIGraphics.h"

#import <objc/runtime.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <TargetConditionals.h>

#import <React/RCTUIImage.h>
#import "RCTUIImage.h"

#if !TARGET_OS_OSX

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#if TARGET_OS_OSX

#import <React/RCTUIGraphicsImageRenderer.h>
#import <React/RCTUIImage.h>
#import "RCTUIGraphicsImageRenderer.h"
#import "RCTUIImage.h"

@implementation RCTUIGraphicsImageRendererFormat

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <TargetConditionals.h>

#import <React/RCTUIKitCompat.h>
#import "RCTUIKitCompat.h"

#if !TARGET_OS_OSX
#import <UIKit/UIKit.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#if TARGET_OS_OSX

#import <React/RCTUIImage.h>
#import "RCTUIImage.h"

// UIImage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

#include <TargetConditionals.h>

#import <React/RCTUIKitCompat.h>
#import <React/RCTUIImage.h>
#import "RCTUIKitCompat.h"
#import "RCTUIImage.h"

#if !TARGET_OS_OSX
@compatibility_alias RCTUIImageView UIImageView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#if TARGET_OS_OSX

#import <React/RCTUIImageView.h>
#import "RCTUIImageView.h"

#import <CoreImage/CIFilter.h>

Expand Down
25 changes: 25 additions & 0 deletions packages/react-native/ReactApple/Libraries/RCTUIKit/RCTUIKit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) Microsoft Corporation.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

// [macOS]
// Umbrella header for RCTUIKit — the UIKit/AppKit compatibility layer.

#import "RCTUIKitCompat.h"
#import "RCTUIAccessibilityTraits.h"
#import "RCTUIGeometry.h"
#import "RCTUIGraphics.h"
#import "RCTUIImage.h"
#import "RCTUIView.h"
#import "RCTUIScrollView.h"
#import "RCTUISlider.h"
#import "RCTUILabel.h"
#import "RCTUISwitch.h"
#import "RCTUIActivityIndicatorView.h"
#import "RCTUITouch.h"
#import "RCTUIImageView.h"
#import "RCTUIGraphicsImageRenderer.h"
#import "RCTPlatformDisplayLink.h"
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <TargetConditionals.h>

#import <React/RCTUIKitCompat.h>
#import "RCTUIKitCompat.h"

#if !TARGET_OS_OSX
@compatibility_alias RCTUILabel UILabel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#if TARGET_OS_OSX

#import <React/RCTUILabel.h>
#import "RCTUILabel.h"

@implementation RCTUILabel {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <TargetConditionals.h>

#import <React/RCTUIKitCompat.h>
#import "RCTUIKitCompat.h"

#if !TARGET_OS_OSX

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#if TARGET_OS_OSX

#import <React/RCTUIScrollView.h>
#import "RCTUIScrollView.h"

// RCTUIScrollView

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <TargetConditionals.h>

#import <React/RCTUIKitCompat.h>
#import "RCTUIKitCompat.h"

#if !TARGET_OS_OSX
@compatibility_alias RCTUISlider UISlider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#if TARGET_OS_OSX

#import <React/RCTUISlider.h>
#import "RCTUISlider.h"

@implementation RCTUISlider {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <TargetConditionals.h>

#import <React/RCTUIKitCompat.h>
#import "RCTUIKitCompat.h"

#if !TARGET_OS_OSX
@compatibility_alias RCTUISwitch UISwitch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#if TARGET_OS_OSX

#import <React/RCTUISwitch.h>
#import "RCTUISwitch.h"

@implementation RCTUISwitch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <TargetConditionals.h>

#import <React/RCTUIKitCompat.h>
#import "RCTUIKitCompat.h"

#if !TARGET_OS_OSX
#import <UIKit/UIKit.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#if TARGET_OS_OSX

#import <QuartzCore/QuartzCore.h>
#import <React/RCTUIView.h>
#import "RCTUIView.h"

// UIView

Expand Down
Loading
Loading