Adding Fullstory as a Swift Package

Available for the following Plan types:

Fullstory Enterprise*

Fullstory Advanced*

Fullstory Business*

Fullstory Free

*with the following add-on:

Fullstory for Mobile Apps

Available to the following User roles:





About this article

This article provides setup steps for adding Fullstory as a Swift package. 

Swift Installation: adding the Fullstory package

Follow these steps to add Fullstory to an iOS app using the Swift package:

From the Xcode menu, select File > Add Packages

Swift Add Packages.png

In the dialog that appears, click in the search filed with the text Search of Enter Package URL and type:

Swift Search.png

The fullstory-swift-package-ios package should then show up in the list of packages. In the input field immediately to the right of the drop-down showing Up to Next Major Version, type the Fullstory plugin version number, 1.47.0, as shown here, then click the Add Package button.

Swift Add Package.png

Another dialog will appear titled Choose Package Products for fullstory-swift-package-ios. Ensure that the FullStory entry is checked, and the target under Add to Target is the target within your Xcode project to which you want Fullstory added. Click the Add Package button.

Swift Add Package .png

Configure Fullstory in your app’s Info.plist file by following the steps here.

Add a build phase for Fullstory's asset uploader:

  • In the project navigator, select your app's project.
  • In the editor panel, select your app's target.
  • Choose the Build Phases tab.
  • Chose Editor → Add Build Phase → Add Run Script Build Phase
  • On the new Run Script phase, double-click on the Run Script label and rename to Run FullStory Asset Uploader
  • If it’s not already, re-order the build phase so it’s the last step.
  • Click the disclosure triangle next to the build phase to expand it.
  • Replace the body of the script with the code below (it should all be on one line):
if [ -d "${BUILD_DIR%Build/*}/SourcePackages/artifacts/FullStory/" ]
# XCode 13.2 and older
"${BUILD_DIR%Build/*}/SourcePackages/artifacts/FullStory/tools/FullStoryCommandLine" "${CONFIGURATION_BUILD_DIR}/${WRAPPER_NAME}"
elif [ -d "${BUILD_DIR%Build/*}/SourcePackages/artifacts/fullstory-swift-package-ios/fullstory/tools/" ]
# XCode 14.3+
"${BUILD_DIR%Build/*}/SourcePackages/artifacts/fullstory-swift-package-ios/fullstory/tools/FullStoryCommandLine" "${CONFIGURATION_BUILD_DIR}/${WRAPPER_NAME}"
elif [ -d "${BUILD_DIR%Build/*}/SourcePackages/artifacts/fullstory-swift-package-ios/" ]
# XCode 13.3 - 14.2
"${BUILD_DIR%Build/*}/SourcePackages/artifacts/fullstory-swift-package-ios/tools/FullStoryCommandLine" "${CONFIGURATION_BUILD_DIR}/${WRAPPER_NAME}"
echo "Error: Unable to find FullStoryCommandLine. Please contact for assistance."
exit 127

The result should look like the following:

Run FullStory Asset Uploader.png


Sometimes, Xcode can get confused about Swift Packages that contain binary artifacts (including Fullstory). This is a known issue in Xcode that also appears to affect other major frameworks. A common symptom of this confusion is Xcode producing an error like:

artifact of binary target FullStory failed extraction: The operation couldn’t be completed.  (TSCBasic.StringError error 1.)

If this happens, try some or all of the following steps:

  • Restart Xcode.
  • In Xcode, select File > Swift Packages > Reset Package Caches.  (This option may not be available if you have not already successfully added at least one Swift Package to your project.)
  • Exit Xcode, delete the contents of your project’s DerivedData folder, and restart Xcode.  (You can find the DerivedData folder by selecting Xcode > Preferences..., then selecting Locations and clicking the arrow icon next to the path in "Derived Data.")

Updating to the latest version of the Fullstory plugin

Xcode pins package dependencies to specific versions in your project. When you would like to update your app to the latest version of the Fullstory plugin, locate the FullStory entry in the Package Dependencies section of the project navigator. Right-click the entry and select Update Package as shown below.

Screen Shot 2021-11-01 at 11.00.38 AM.png

Next Steps

After you’ve completed this setup, return to Getting Started with iOS Capture to configure Fullstory, review advanced features, and more.

Need to get in touch with us?

The Fullstory Team awaits your every question.

Ask the Community Technical Support