Граф коммитов

6 Коммитов

Автор SHA1 Сообщение Дата
Riccardo Cipolleschi 7a2704455f Move cocoapods utilities to utils.rb - Part 1 (#33978)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33978

This Diff moves part of the utilities from the `react_native_pods` file to a specific `utils.rb` file.

It adds tests for these utils and improve our test mocks.

The goal is to simplify the `react_native_pods.rb` so it's easier to work with it.

I decided to split this diff in 2 because it was becoming quite big.

## Changelog

[iOS][Changed] - Refactoring part of the react_native_pods.rb script

Reviewed By: cortinico

Differential Revision: D37004347

fbshipit-source-id: a5156f7c199d082d5d895a58af80948556c51c2a
2022-06-10 07:25:52 -07:00
Janic Duplessis 77e6bff629 Use `GCC_PREPROCESSOR_DEFINITIONS` to set `FB_SONARKIT_ENABLED` (#33972)
Summary:
`OTHER_CFLAGS` doesn't seem to work when the file is imported from Objc++. This causes flipper to not be included.

## Changelog

[iOS] [Fixed] - Use `GCC_PREPROCESSOR_DEFINITIONS` to set `FB_SONARKIT_ENABLED`

Pull Request resolved: https://github.com/facebook/react-native/pull/33972

Test Plan: Tested the change in an app. Used a breakpoint to see that flipper code is not executed before this change, and is after. Also made sure other `GCC_PREPROCESSOR_DEFINITIONS` set by cocoapods are still properly inherited.

Reviewed By: cipolleschi

Differential Revision: D37001624

Pulled By: dmitryrykun

fbshipit-source-id: 920f3fe368a9fbe2cde9aa1e6d5b3b883c42119d
2022-06-08 05:58:04 -07:00
Franco Meloni 9f112af50a Add comment to explain why production flag is used when Flipper is enabled (#33902)
Summary:
Follow up of https://github.com/facebook/react-native/pull/33882

## Changelog

[Internal] - Add comment to explain why production flag is used when Flipper is enabled

Pull Request resolved: https://github.com/facebook/react-native/pull/33902

Reviewed By: cortinico, f-meloni

Differential Revision: D36632238

Pulled By: cipolleschi

fbshipit-source-id: a859006851d9f50a4ad0ae1141006e8dac7aee6e
2022-05-25 07:00:29 -07:00
Franco Meloni 0bd5239553 Move `use_flipper` logic inside `use_react_native` and simplify the Flipper dependencies logic (#33882)
Summary:
This PR tries to simplify the `use_flipper` logic:
- makes `use_flipper` a configuration inside `use_react_native`'s options
- uses the already present `production` flag in the `use_react_native`'s options to decide if add or not the Flipper pods
- Simplifies the logic to download the flipper dependencies

This PR also adds a workaround for https://github.com/facebook/react-native/issues/33764

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Changed] - Move `use_flipper` logic inside `use_react_native` and simplify the Flipper dependencies logic

Pull Request resolved: https://github.com/facebook/react-native/pull/33882

Test Plan: Executed a pod install with and without flipper and with isProduction true

Reviewed By: cipolleschi

Differential Revision: D36592338

Pulled By: f-meloni

fbshipit-source-id: 3c3f773151513e27e251f18865986e942a96ffd9
2022-05-24 04:37:46 -07:00
Mike Hardy d493f45bd9 fix: bump flipper pods to get arm64 catalyst slice (#33809)
Summary:
Patch release bumps that just change arm64 slice packaging
See https://github.com/facebook/flipper/issues/3117#issuecomment-1123759397

These pods were just released by lblasa and this PR integrates them - I personally confirm success on an arm64 doing a macCatalyst build for the first time since react-native 0.64, and users report intel works fine as well - no regression

## Changelog

[Catalyst][Fix] - use pods with arm64 macCatalyst slices

Pull Request resolved: https://github.com/facebook/react-native/pull/33809

Test Plan:
Run a macCatalyst build on intel machine and m1 machine, I use this harness as part of release-testers facebook group, and it exercises macCatalyst build if you pass in a valid development team (for signing) https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh

(the test harness is locally modified to no longer exclude M1 builds and with a patch-package that implements this PR, pending this merge+release...)

Reviewed By: cortinico

Differential Revision: D36339335

Pulled By: cipolleschi

fbshipit-source-id: d4574fc960e6ff345b31a83ff4629e22edfcf2f7
2022-05-12 02:43:41 -07:00
Riccardo Cipolleschi d96806bbc6 Move Flipper to dedicated flipper.rb
Summary:
This Diff moves all the Flipper.rb related setup in the cocoapods scripts to a dedicated script.

It also removes the not needed dummy files and add tests for flipper.

## Changelog

[iOS][Internal] - Extract Flipper setup in a separate file and add tests

Reviewed By: cortinico

Differential Revision: D36129808

fbshipit-source-id: 5446203a69b527146c893aa9611e98688e20b778
2022-05-09 02:55:30 -07:00