Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: experimental SPM support #5721

Merged
merged 6 commits into from
Mar 25, 2023
Merged

feat: experimental SPM support #5721

merged 6 commits into from
Mar 25, 2023

Conversation

rigor789
Copy link
Member

@rigor789 rigor789 commented Mar 21, 2023

PR Checklist

What is the current behavior?

N/A

What is the new behavior?

Implements #5698

Installing and using SPM packages is now possible through the nativescript.config.ts. Example:

export default {
  id: 'org.nativescript.spmtesting',
  appPath: 'app',
  appResourcesPath: 'App_Resources',
  ios: {
    experimentalSPMPackages: [
      {
        name: 'rive-ios',
        libs: ['RiveRuntime'],
        repositoryURL: 'https://github.com/rive-app/rive-ios.git',
        version: '1.0.0'
      }
    ]
  },
  android: {
    v8Flags: '--expose_gc',
    markingMode: 'none'
  }
} as NativeScriptConfig;

This uses the new SPM feature published to @rigor789/trapezedev-project from this Trapeze PR: ionic-team/trapeze#176

The config API is subject to change, so it's marked as experimental.

Note: installing SPM dependencies from plugins is not in scope for this initial pass

TODO

#5723

Trying this out

To try this out, [email protected] has been published to NPM:

Add an SPM dependency like the example above to your nativescript.config.ts and then

ns run ios
# or
ns debug ios

If the SPM package is accessible to Obj-C, you can generate typings for them like normal:

ns typings ios

Enjoy! 😎

@cla-bot cla-bot bot added the cla: yes label Mar 21, 2023
@rigor789 rigor789 marked this pull request as ready for review March 25, 2023 12:56
@rigor789 rigor789 merged commit 1443240 into main Mar 25, 2023
@rigor789 rigor789 deleted the feat/spm-support branch March 25, 2023 12:57
@rigor789 rigor789 mentioned this pull request Mar 25, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant