Frequently Asked Questions

A curated summary of the top questions asked on our Slack community, often relating to implementation, functionality, and building better products generally.
Statsig FAQs
ea Notion Webflow vercel bluesky Flipkart Microsoft bloomberg Brex Univision OpenAI Rippling
GENERAL

How can I use Statsig's iOS SDK with Swift Package Manager in a multi-module project using Tuist?

Date of slack thread: 8/6/24

Anonymous: Hello. Statsig team! I have a question regarding usage of https://github.com/statsig-io/ios-sdk as SPM module. I’m using https://github.com/tuist/tuist|Tuist as project generation tool and would love to use your SDK as SPM instead of cocoapods.

But, I facing an issue importing SPM module in my multi-module project, while installing SDK as it described in guide:

//...
dependencies: [
    // see the latest version on <https://github.com/statsig-io/ios-sdk/releases>
    .package(url: "<https://github.com/statsig-io/ios-sdk.git>", .upToNextMinor("X.Y.Z")),
],
//...
targets: [
    .target(
        name: "YOUR_TARGET",
        dependencies: ["Statsig"]
    )
],
//...

Context: • multi module app • tuist 3.31.2 • Struct: I have Module X, in which I’m importing statsig SPM. This module X imported into module Y

The problem is next: During compilation I’m facing error, that module Y missing required module StatsigInternalObjC, which defined as internal https://github.com/statsig-io/ios-sdk/blob/main/Package.swift#L22|dependency for you swift module. So, I’m assuming obj-c or not imported or not included into my project compilation.

For Cocoapods all works fine and as expected.

Question: Am I missing smth from guide or project setup ? Or it smth different?

Thanks in advance for help!

Anonymous: Problem is that I can’t import Statsig in all my sub-modules, which may need Statsig abstractions or module it self. Also, not sure that it’ll work. I’d prefer to keep current struct where only module X have Statsig imported as SPM dependency. And Obj module handled properly when X module imported into Module Y, A, B etc.

Or it’s an SPM bug or I’m doing smth wrong with my setup and need to roll-back to cocoapods usage.

So I’d grateful for help or any tips!

tore (Statsig): Hi Ivan - I think we can make this a bit easier. We’re going to remove the StatsigInternalObjC as it is currently unused

Anonymous: Hi! Wow, it’d be nice. Do you have any ETA for that?

Join the #1 experimentation community

Connect with like-minded product leaders, data scientists, and engineers to share the latest in product experimentation.

Try Statsig Today

Get started for free. Add your whole team!

Why the best build with us

OpenAI OpenAI
Brex Brex
Notion Notion
SoundCloud SoundCloud
Ancestry Ancestry
At OpenAI, we want to iterate as fast as possible. Statsig enables us to grow, scale, and learn efficiently. Integrating experimentation with product analytics and feature flagging has been crucial for quickly understanding and addressing our users' top priorities.
OpenAI
Dave Cummings
Engineering Manager, ChatGPT
Brex's mission is to help businesses move fast. Statsig is now helping our engineers move fast. It has been a game changer to automate the manual lift typical to running experiments and has helped product teams ship the right features to their users quickly.
Brex
Karandeep Anand
President
At Notion, we're continuously learning what our users value and want every team to run experiments to learn more. It’s also critical to maintain speed as a habit. Statsig's experimentation platform enables both this speed and learning for us.
Notion
Mengying Li
Data Science Manager
We evaluated Optimizely, LaunchDarkly, Split, and Eppo, but ultimately selected Statsig due to its comprehensive end-to-end integration. We wanted a complete solution rather than a partial one, including everything from the stats engine to data ingestion.
SoundCloud
Don Browning
SVP, Data & Platform Engineering
We only had so many analysts. Statsig provided the necessary tools to remove the bottleneck. I know that we are able to impact our key business metrics in a positive way with Statsig. We are definitely heading in the right direction with Statsig.
Ancestry
Partha Sarathi
Director of Engineering
We use cookies to ensure you get the best experience on our website.
Privacy Policy