Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import OCMock for RNTester macOS as a pod #1257

Merged
merged 3 commits into from
Jul 15, 2022

Conversation

amgleitman
Copy link
Member

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 馃憤
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 馃憤
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

Previously, we've been unable to test RNTester for macOS on an M1 machine. This is because we were using a framework that was prebuilt for Intel architecture, so the test components would fail to build.

The fix is to build OCMock from source directly instead of using a prebuilt version.

This is only necessary on macOS. The iOS version is already built for ARM architecture, as iOS devices have been running exclusively on ARM for a while now.

Test Plan

We can build and test RNTester on macOS.

@amgleitman amgleitman requested a review from a team as a code owner July 13, 2022 18:03
@amgleitman
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@amgleitman amgleitman merged commit 788ec2e into microsoft:main Jul 15, 2022
@amgleitman amgleitman deleted the ocmock-pod branch July 15, 2022 22:57
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Mar 6, 2023
Summary:
This is a change we have implemented in React Native macOS that I am now upstreaming: microsoft#1257

The library `ocMock` is currently imported as a checked in binary by RN-Tester to help run unit tests on iOS. That binary is only compiled for x86 on macOS, which meant we could not run tests on M1 / M2 Macs. Switching  it so that we import from source as a pod should make maintenance easier for both iOS and macOS! :)

Original change notes:

>Previously, we've been unable to test RNTester for macOS on an M1 machine. This is because we were using a framework that was prebuilt for Intel architecture, so the test components would fail to build.
>
> The fix is to build OCMock from source directly instead of using a prebuilt version.
>
> This is only necessary on macOS. The iOS version is already built for ARM architecture, as iOS devices have been running exclusively on ARM for a while now.

## Changelog

[INTERNAL] [CHANGED] -  Import OCMock as a pod

Pull Request resolved: #36239

Test Plan: CI should pass as it did before.

Reviewed By: dmytrorykun

Differential Revision: D43732219

Pulled By: cipolleschi

fbshipit-source-id: 028b5a7f384042145bf1966c8c2730d7437940ec
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
This is a change we have implemented in React Native macOS that I am now upstreaming: microsoft#1257

The library `ocMock` is currently imported as a checked in binary by RN-Tester to help run unit tests on iOS. That binary is only compiled for x86 on macOS, which meant we could not run tests on M1 / M2 Macs. Switching  it so that we import from source as a pod should make maintenance easier for both iOS and macOS! :)

Original change notes:

>Previously, we've been unable to test RNTester for macOS on an M1 machine. This is because we were using a framework that was prebuilt for Intel architecture, so the test components would fail to build.
>
> The fix is to build OCMock from source directly instead of using a prebuilt version.
>
> This is only necessary on macOS. The iOS version is already built for ARM architecture, as iOS devices have been running exclusively on ARM for a while now.

## Changelog

[INTERNAL] [CHANGED] -  Import OCMock as a pod

Pull Request resolved: facebook#36239

Test Plan: CI should pass as it did before.

Reviewed By: dmytrorykun

Differential Revision: D43732219

Pulled By: cipolleschi

fbshipit-source-id: 028b5a7f384042145bf1966c8c2730d7437940ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants