Skip to content

hyperdevs-team/threatmetrix-spm-mirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ThreatMetrix SPM Mirror

Overview

This repository provides a Swift Package Manager (SPM) mirror for the ThreatMetrix iOS SDK (version 7.7.93).

The official ThreatMetrix SDK is distributed as pre-compiled binary frameworks (.xcframework), but the vendor does not currently offer an official SPM distribution. This mirror package wraps these binaries, making it easy to integrate and manage ThreatMetrix as a standard SPM dependency in Xcode projects.

Why does this exist?

  • Modern Dependency Management: To allow our projects to use Swift Package Manager exclusively, avoiding the need for manual framework management, CocoaPods, or Carthage for this specific dependency.
  • Consistency: Ensures all teams use the same version and configuration of the ThreatMetrix SDK.
  • Simplified Integration: Drastically simplifies the setup process for new projects or new developers.

Installation

You can add ThreatMetrix to your project as a Swift Package dependency in Xcode.

  1. In Xcode, open your project and navigate to File > Add Packages...
  2. In the search bar, paste the repository URL:
    https://github.com/hyperdevs-team/threadmetrix-spm-mirror.git
    
  3. For Dependency Rule, select Up to Next Major Version and enter 7.7.93.
  4. Click Add Package.
  5. Choose the products to add to your app's target.

Available Products

This package offers two ways to add the frameworks, giving you flexibility based on your needs.

1. All-in-One (Recommended)

For most use cases, simply add the ThreatMetrixKit product to your target. This single library automatically includes and links all the necessary ThreatMetrix frameworks.

  • ThreatMetrixKit

This is the simplest and safest way to ensure all dependencies are correctly linked.

2. Granular Products

If you need to optimize your app's binary size and only require specific modules, you can add them individually. The package manifest handles the internal dependencies between them (e.g., adding TMXProfilingConnections will automatically include the base TMXProfiling framework).

  • TMXProfiling (Core framework)
  • TMXProfilingConnections
  • TMXSensors
  • TMXBehavioSec
  • TMXAuthentication

Example: If your app only needs profiling and connections, you would add the TMXProfilingConnections product to your target. SPM will resolve and link both TMXProfilingConnections.xcframework and its required dependency, TMXProfiling.xcframework.


Updating the SDK

To update to a new version of the ThreatMetrix SDK:

  1. Replace the .xcframework files in the Frameworks/ directory with the new ones.
  2. Update the version number and any necessary product/target definitions in Package.swift.
  3. Commit the changes.
  4. Create a new Git tag that matches the new SDK version (e.g., git tag 7.8.0).
  5. Push the commit and the new tag to the remote repository (git push && git push --tags).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published