1

I'm using documentation here to create my custom expo module.

npx create-expo-module FooModule

Using this instruction, for example on ios folder, only .swift files are generated.

I have to import a custom framework (a local folder) and use it inside swift files.

How can I manage it without an xcproject?

Luca Davanzo
  • 21,000
  • 15
  • 120
  • 146

1 Answers1

1

To import a custom framework in your Expo module without an Xcode project, you can follow these steps:

  1. Create a folder in your Expo module project and copy your custom framework into it.

  2. In the iOS folder of your Expo module project, create a new folder named "Vendor". This folder is typically used to hold external libraries and frameworks.

  3. Drag the folder containing your custom framework into the "Vendor" folder in Xcode.

  4. In the "Build Phases" section of your Expo module project's target in Xcode, add a "Copy Files" build phase.

  5. In the "Copy Files" build phase, set the "Destination" to "Frameworks" and add your custom framework to the list of files to be copied.

  6. In your Swift files, import your custom framework using the import statement.

Once you've completed these steps, you should be able to use your custom framework in your Expo module's Swift files.

Nahid
  • 11
  • 1