Objective-C Setup Guide
Objective-C apps (or mixed Swift/ObjC projects) can use the TelemetryDeck Swift SDK through Objective-C interop.
Installing the package¶
- Open Xcode and navigate to your project
- Select File → Add Package Dependencies...
- Paste
https://github.com/TelemetryDeck/SwiftSDKinto the search field - Select the
SwiftSDKpackage - Set the Dependency Rule to Up to Next Major Version
- Click Add Package
Linking the package¶
In the Choose Package Products for SwiftSDK screen, select the TelemetryDeck library and click Add Package.
Multiple targets
If Xcode doesn't prompt you, add it manually: select your target → Build Phases → Link Binary With Libraries → + → select TelemetryDeck.
Initializing TelemetryDeck¶
Add initialization to your App Delegate's application:didFinishLaunchingWithOptions::
@import TelemetryDeck;
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[TelemetryDeck initializeWithAppID:@"YOUR-APP-ID"
namespace:@"YOUR-NAMESPACE"];
return YES;
}
You need your app's unique identifier and namespace
Both values are available in the TelemetryDeck Dashboard under your app's settings.
Verify your setup¶
Run your app. The SDK automatically sends a TelemetryDeck.Session.started event on launch.
Test signals
Events from DEBUG builds are tagged as test signals. Enable Test Mode in the TelemetryDeck Dashboard to see them.
Open the Dashboard → "Explore > Recent Signals" with Test Mode enabled.
Sending custom events¶
With parameters:
App Store requirements¶
See our Apple App Privacy guide and Privacy FAQ.
What's next¶
-
Navigate TelemetryDeck, interpret insights, and make data-driven decisions.