Skip to main content

First Time

Integrating via SPM (First Time)

if you are integrating the SPM for first time, then follow the below steps or else you can skip this part and go directly upgrade documents

Step 1: Navigate to Package Dependencies in Xcode

  1. Open your project in Xcode.
  2. In the Project Navigator, select the Project (not a specific target).
  3. Click on the Package Dependencies tab.

Step 2: Add a New Package

  1. In the Package Dependencies tab, click the + button.

  2. A popup will appear. In the Search or enter package URL field at the top-right, enter the following URL:

Then please enter the below URL

https://nucleijenkinsbot:<token>@github.com/CDNA-Technologies/nuclei-ios-sdk-frameworks

Note: Please contact the Nuclei Team for the token to access the repository.

Step 3: Fetch the Package and Choose Version

  1. After entering the URL, Xcode will fetch the repository and show the latest release.

  2. In the Dependency Rule section, select Exact Version from the dropdown.

  3. If the Nuclei team has specified a version, enter it. Otherwise, leave it to default, which will pull the latest release.

  4. Click Add Package to proceed.

Step 4: Select Modules to Add

  1. After adding the package, you will be prompted to select modules.

  2. Ensure that you select Nuclei Core for your main target. If you have multiple targets, you can add it to the others later.

Important: Only add Native Categories if necessary. If a category is implemented in Svelte, you don’t need to add its native module—Nuclei Core will handle Svelte integrations automatically.

    • Avoid adding unnecessary modules to prevent increasing your app size.

Step 5: Complete the Integration

  1. After selecting the necessary modules, click Add Package.

  2. Xcode will take a moment to load the package configurations.

  3. Once done, you can see the Nuclei SDK under Package Dependencies in the Project Navigator, along with the specified version.

  4. You’re all set! Now, build your project to complete the integration.

You can look at the side project navigator you can see the package dependies of stating nuclei and it's version

Step 6 (If Necessary): Add Modules to Other Targets

  1. If you need to add Nuclei categories to other targets, navigate to Target Settings in your project.

  2. In the General tab, scroll down to Frameworks, Libraries, and Embedded Content.

  3. Click the + button and search for the specific category module you need to add.

  4. Select it and repeat as necessary for other targets.

By following these steps, you should be able to smoothly integrate the Nuclei SDK into your iOS project using Swift Package Manager. Let us know if you have any questions or run into any issues!