iosreact-nativereact-native-iospodspecreact-native-bridge

Can pods access frameworks in main project?


there is an SDK developed for Native iOS. I'm trying to create a React Native bridge for this SDK. My goal is to be able to establish the bridge without breaking the native ios integration. Can I access the .framework extension SDK in the main project from within my bridge POD? is it possible? enter image description here


Solution

  • Unfortunately it is not possible. You cannot access an object that is not part of your framework.

    In best practice, a child class should not know anything about a parent class.

    You may define default values for that framework's properties or you may create an other shared library.

    You may find a similar case on this topic: Access parent class from subproject framework