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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Yoga.podspec: fixes archiving for macos catalyst on react-native 0.73.1 in xcode #42159

Conversation

kesha-antonov
Copy link
Contributor

Hi

Summary:

When I tried to archive macos catalyst app in Xcode I got error:

Screenshot 2024-01-06 at 18 02 07 Screenshot 2024-01-06 at 18 02 40

This PR fixes archiving

Changelog:

[IOS] [FIXED] - fixed archiving for macos catalyst on react-native 0.73.1 in xcode

Test Plan:

Try archive react-native tester app for macos catalyst in Xcode

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jan 6, 2024
@facebook-github-bot
Copy link
Contributor

@arushikesarwani94 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 9, 2024
@facebook-github-bot
Copy link
Contributor

@arushikesarwani94 merged this pull request in aa2d613.

Othinn pushed a commit to Othinn/react-native that referenced this pull request Jan 9, 2024
…ve 0.73.1 in xcode (facebook#42159)

Summary:
Hi

When I tried to archive macos catalyst app in Xcode I got error:

<img width="994" alt="Screenshot 2024-01-06 at 18 02 07" src="https://github.com/facebook/react-native/assets/11584712/5b334c79-c795-4c29-a6b5-65a024926cb7">
<img width="910" alt="Screenshot 2024-01-06 at 18 02 40" src="https://github.com/facebook/react-native/assets/11584712/dba51fc7-8b1e-4a00-b507-ea773c5b5fdf">

This PR fixes archiving

## Changelog:

[IOS] [FIXED] - fixed archiving for macos catalyst on react-native 0.73.1 in xcode

Pull Request resolved: facebook#42159

Test Plan: Try archive react-native tester app for macos catalyst in Xcode

Reviewed By: christophpurrer

Differential Revision: D52624342

Pulled By: arushikesarwani94

fbshipit-source-id: 21b9b3568986f63f169f11cedc6cea2237d3e2c5
@cipolleschi
Copy link
Contributor

@kesha-antonov we will have to revert this PR because it isn't the right fix.
The right way to handle Catalyst builds is to use the PUBLIC_HEADERS_FOLDER_PATH option, as we are doing here

facebook-github-bot pushed a commit that referenced this pull request Jan 10, 2024
…react-native 0.73.1 in xcode"

Summary:
PR #42159 was working but it was the wrong fix.

The right fix is to use the `"PUBLIC_HEADERS_FOLDER_PATH"` Xcode build setting instead.

bypass-github-export-checks

## Changelog:
[iOS][Changed] - Revert "Update Yoga.podspec: fixes archiving for macos catalyst on react-native 0.73.1 in xcode"

## Facebook:
Original commit changeset: 21b9b3568986

Original Phabricator Diff: D52624342

Reviewed By: arushikesarwani94

Differential Revision: D52656133

fbshipit-source-id: 84a37fe3fca57d5e34139c17c6c1957fe8d40aaf
@facebook-github-bot
Copy link
Contributor

This pull request has been reverted by a4231a7.

gokul1099 pushed a commit to gokul1099/react-native-visionos that referenced this pull request Jan 17, 2024
…ve 0.73.1 in xcode (facebook#42159)

Summary:
Hi

When I tried to archive macos catalyst app in Xcode I got error:

<img width="994" alt="Screenshot 2024-01-06 at 18 02 07" src="https://github.com/facebook/react-native/assets/11584712/5b334c79-c795-4c29-a6b5-65a024926cb7">
<img width="910" alt="Screenshot 2024-01-06 at 18 02 40" src="https://github.com/facebook/react-native/assets/11584712/dba51fc7-8b1e-4a00-b507-ea773c5b5fdf">

This PR fixes archiving

## Changelog:

[IOS] [FIXED] - fixed archiving for macos catalyst on react-native 0.73.1 in xcode

Pull Request resolved: facebook#42159

Test Plan: Try archive react-native tester app for macos catalyst in Xcode

Reviewed By: christophpurrer

Differential Revision: D52624342

Pulled By: arushikesarwani94

fbshipit-source-id: 21b9b3568986f63f169f11cedc6cea2237d3e2c5
gokul1099 pushed a commit to gokul1099/react-native-visionos that referenced this pull request Jan 17, 2024
…react-native 0.73.1 in xcode"

Summary:
PR facebook#42159 was working but it was the wrong fix.

The right fix is to use the `"PUBLIC_HEADERS_FOLDER_PATH"` Xcode build setting instead.

bypass-github-export-checks

## Changelog:
[iOS][Changed] - Revert "Update Yoga.podspec: fixes archiving for macos catalyst on react-native 0.73.1 in xcode"

## Facebook:
Original commit changeset: 21b9b3568986

Original Phabricator Diff: D52624342

Reviewed By: arushikesarwani94

Differential Revision: D52656133

fbshipit-source-id: 84a37fe3fca57d5e34139c17c6c1957fe8d40aaf
@kesha-antonov
Copy link
Contributor Author

kesha-antonov commented Feb 4, 2024

@kesha-antonov we will have to revert this PR because it isn't the right fix. The right way to handle Catalyst builds is to use the PUBLIC_HEADERS_FOLDER_PATH option, as we are doing here

What do we need to pass to PUBLIC_HEADERS_FOLDER_PATH?

I've tried and it doesn't work


module_name = 'yoga'

spec.pod_target_xcconfig = {
      'DEFINES_MODULE' => 'YES'
  }.merge!(ENV['USE_FRAMEWORKS'] != nil ? {
    'PUBLIC_HEADERS_FOLDER_PATH' => "#{module_name}.framework/Headers",
    'HEADER_SEARCH_PATHS' => create_header_search_path_for_frameworks('Yoga', framework_name: module_name)
}: {})

When I try to archive it still shows error when trying to import headers

The missing file that we see in the error is located here

react-native/ReactCommon/yoga/yoga/debug/Log.h

@kesha-antonov
Copy link
Contributor Author

kesha-antonov commented Feb 4, 2024

So I tried to use PUBLIC_HEADERS_FOLDER_PATH and it seems like it doesn't fix the issue.
What fixes is original solution - to add HEADER_SEARCH_PATHS

But better solution is to use "HEADER_SEARCH_PATHS" => "$(PODS_TARGET_SRCROOT)"

PODS_TARGET_SRCROOT is node_modules/react-native/ReactCommon/yoga

@kesha-antonov
Copy link
Contributor Author

@kesha-antonov we will have to revert this PR because it isn't the right fix. The right way to handle Catalyst builds is to use the PUBLIC_HEADERS_FOLDER_PATH option, as we are doing here

Moreover, we have PUBLIC_HEADERS_FOLDER_PATH flag set by default in XCode

So I don't think it changes anything when we set it in podspec

Here's screenshot from xcode with default Yoga.podspec file without changes

Screenshot 2024-02-04 at 23 09 01

@kesha-antonov
Copy link
Contributor Author

kesha-antonov commented Feb 4, 2024

I checked main branch. Apparently I made fix for 0.73.1 but commited in 0.74
My fix works with 0.73.1 but not with 0.74

@kesha-antonov
Copy link
Contributor Author

Question is what to set in header_search_paths ?

Screenshot 2024-02-05 at 00 03 32 Screenshot 2024-02-05 at 00 27 46

facebook-github-bot pushed a commit to facebook/yoga that referenced this pull request Feb 22, 2024
Summary:
Hi

When I tried to archive macos catalyst app in Xcode I got errors:

<img width="977" alt="Screenshot 2024-02-05 at 00 03 32" src="https://github.com/kesha-antonov/react-native/assets/11584712/b83f75a5-b42f-42e4-9afa-1e2527501baa">

This PR fixes archiving by linking PrivateHeaders in yoga.framework

<img width="399" alt="Screenshot 2024-02-05 at 01 03 48" src="https://github.com/kesha-antonov/react-native/assets/11584712/089080ad-b1dc-4703-9273-d8aa3253205e">

<img width="1404" alt="Screenshot 2024-02-05 at 01 05 18" src="https://github.com/kesha-antonov/react-native/assets/11584712/5263cb80-8a53-4a51-bcfc-9d3a2ba739b4">

Prev PR here facebook/react-native#42159

## Changelog:

[IOS] [FIXED] - fixed archiving for Mac Catalyst

X-link: facebook/react-native#42847

Reviewed By: NickGerleman

Differential Revision: D53920474

Pulled By: cipolleschi

fbshipit-source-id: 0534d9aa9d249e4e0c35ada0464c38c291be7f84
facebook-github-bot pushed a commit that referenced this pull request Feb 22, 2024
Summary:
Hi

When I tried to archive macos catalyst app in Xcode I got errors:

<img width="977" alt="Screenshot 2024-02-05 at 00 03 32" src="https://github.com/kesha-antonov/react-native/assets/11584712/b83f75a5-b42f-42e4-9afa-1e2527501baa">

This PR fixes archiving by linking PrivateHeaders in yoga.framework

<img width="399" alt="Screenshot 2024-02-05 at 01 03 48" src="https://github.com/kesha-antonov/react-native/assets/11584712/089080ad-b1dc-4703-9273-d8aa3253205e">

<img width="1404" alt="Screenshot 2024-02-05 at 01 05 18" src="https://github.com/kesha-antonov/react-native/assets/11584712/5263cb80-8a53-4a51-bcfc-9d3a2ba739b4">

Prev PR here #42159

## Changelog:

[IOS] [FIXED] - fixed archiving for Mac Catalyst

Pull Request resolved: #42847

Test Plan: Try archive react-native tester app for macos catalyst in Xcode

Reviewed By: NickGerleman

Differential Revision: D53920474

Pulled By: cipolleschi

fbshipit-source-id: 0534d9aa9d249e4e0c35ada0464c38c291be7f84
NickGerleman pushed a commit to facebook/yoga that referenced this pull request Feb 23, 2024
Summary:
Hi

When I tried to archive macos catalyst app in Xcode I got errors:

<img width="977" alt="Screenshot 2024-02-05 at 00 03 32" src="https://github.com/kesha-antonov/react-native/assets/11584712/b83f75a5-b42f-42e4-9afa-1e2527501baa">

This PR fixes archiving by linking PrivateHeaders in yoga.framework

<img width="399" alt="Screenshot 2024-02-05 at 01 03 48" src="https://github.com/kesha-antonov/react-native/assets/11584712/089080ad-b1dc-4703-9273-d8aa3253205e">

<img width="1404" alt="Screenshot 2024-02-05 at 01 05 18" src="https://github.com/kesha-antonov/react-native/assets/11584712/5263cb80-8a53-4a51-bcfc-9d3a2ba739b4">

Prev PR here facebook/react-native#42159

## Changelog:

[IOS] [FIXED] - fixed archiving for Mac Catalyst

X-link: facebook/react-native#42847

Reviewed By: NickGerleman

Differential Revision: D53920474

Pulled By: cipolleschi

fbshipit-source-id: 0534d9aa9d249e4e0c35ada0464c38c291be7f84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Reverted Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants