Skip to content

Commit

Permalink
Fix imports in React Bridging for Old Arch and frameworks
Browse files Browse the repository at this point in the history
Summary:
In 0.71.0-RC.2, we had a regression in `use_frameworks!`.

The `use_frameworks! :linkage => :static` use to work fine with the Old Architecture.
We modified how the `React-bridging` pod is configured and, now those are broken.

This change make sure to use the right imports for React-bridging.

## Changelog
[iOS][Changed] - Fix imports in React Bridging for Old Arch and frameworks

Reviewed By: christophpurrer, cortinico

Differential Revision: D41551103

fbshipit-source-id: 4416fde92fef11eb801daf2302a57fe52732e4ef
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Nov 29, 2022
1 parent dd0bf83 commit c5de1eb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ReactCommon/ReactCommon.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Pod::Spec.new do |s|
sss.source_files = "react/nativemodule/core/ReactCommon/**/*.{cpp,h}",
"react/nativemodule/core/platform/ios/**/*.{mm,cpp,h}"
sss.dependency "React-jsidynamic", version
sss.exclude_files = "react/nativemodule/core/ReactCommon/LongLivedObject.h"
sss.exclude_files = "react/nativemodule/core/ReactCommon/{LongLivedObject,CallbackWrapper}.h"
end

ss.subspec "samples" do |sss|
Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/react/bridging/CallbackWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#pragma once

#include <jsi/jsi.h>
#include <react/bridging/LongLivedObject.h>
#include "LongLivedObject.h"

#include <memory>

Expand Down
11 changes: 11 additions & 0 deletions ReactCommon/react/nativemodule/core/ReactCommon/CallbackWrapper.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once

// This header is left here for compatibility reasons.
#include <react/bridging/CallbackWrapper.h>
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
#include <jsi/jsi.h>

#include <ReactCommon/CallInvoker.h>
#include <react/bridging/CallbackWrapper.h>
#include <react/bridging/LongLivedObject.h>
#include <ReactCommon/CallbackWrapper.h>

namespace facebook {
namespace react {
Expand Down

0 comments on commit c5de1eb

Please sign in to comment.