Skip to content

Conversation

@grabbou
Copy link
Contributor

@grabbou grabbou commented Nov 4, 2025

Summary:

While working on local project in monorepo, I found that spm_dependency utility available in CocoaPods does not support local SPM packages, assuming they always come from remote.

This change extends it so that url can also be a local path:

  spm_dependency(s,
    url: File.join(__dir__, 'shared'),
    requirement: {},
    products: ['FooModule']
  )

In the above example, shared folder contains a SPM project.

I don't have opinions on the API design here, I am also happy to create spm_local_dependency utility in order to clean up the API design.

Changelog:

[iOS] - Allow linking local SPM packages in CocoaPods

Test Plan:

Add local Swift Package to your CocoaPods podspec, then run pod install. You should see the project in your Xcode.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 4, 2025
@react-native-bot
Copy link
Collaborator

Fails
🚫

📋 Verify Changelog Format - See Changelog format

Generated by 🚫 dangerJS against f37252c

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 4, 2025
sbuggay pushed a commit to sbuggay/react-native that referenced this pull request Nov 4, 2025
Summary:
While working on local project in monorepo, I found that `spm_dependency` utility available in CocoaPods does not support local SPM packages, assuming they always come from remote.

This change extends it so that `url` can also be a local path:

```ruby
  spm_dependency(s,
    url: File.join(__dir__, 'shared'),
    requirement: {},
    products: ['FooModule']
  )
```

In the above example, `shared` folder contains a SPM project.

I don't have opinions on the API design here, I am also happy to create `spm_local_dependency` utility in order to clean up the API design. 

## Changelog:

[iOS] - Allow linking local SPM packages in CocoaPods


Test Plan: Add local Swift Package to your CocoaPods podspec, then run `pod install`. You should see the project in your Xcode.

Reviewed By: cipolleschi

Differential Revision: D86208056

Pulled By: sbuggay
@meta-codesync
Copy link

meta-codesync bot commented Nov 4, 2025

@sbuggay has imported this pull request. If you are a Meta employee, you can view this in D86212929.

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. p: Callstack Partner: Callstack Partner 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