0

I'm currently integrating a private library from vendor which they mentioned it's required to have use_framework! added in Podfile. Apparently I found out from them, the framework is written in Objective-C, if so.. why is use_framework! needed? I thought this is the reason why we use use_framework!

use_frameworks tells CocoaPods that you want to use Frameworks instead of Static Libraries. Since Swift does not support Static Libraries you have to use frameworks.

Currently I'm facing this build time issue 'React/RCTBridgeDelegate.h' not found in AppDelegate.h

Side info,

  1. My project is running on React Native Firebase v6, hence I have added # $RNFirebaseAsStaticFramework = true to handle the use_framework! case. Read more about this here.
  2. I'll get the following error if I don't append use_framework!

Framework not found helloFramework

  1. Here's the Xcode error . . . . enter image description here

  2. I confirmed my project's scheme has the React Bulleyes icon from podfile and I'm building on this scheme enter image description here

My questions, why do I get this issue when I use use_frameworks! ? What's is the correct way to handle this issue?

enter image description here

Update:

TommyLeong
  • 832
  • 1
  • 10
  • 30

1 Answers1

2

TLDR

Append $(inherited) at Framework Search Paths .


Explanation

Apparently, when we apply use_frameworks! at Podfile. Our Xcode project will replace libPods-{projectName}.a with Pods_{projectName}.framework.

Since our project is relying on Frameworks to build, we have to append $(inherited) to Framework Search Paths at Target > Build Settings > Search Paths > Framework Search Paths. This will inherit the build settings from project level to target level. Read more here.

TommyLeong
  • 832
  • 1
  • 10
  • 30