Skip to content

iOS Installation & Setup

Requirements

  • iOS 13.0 or later
  • Xcode 13.0 or later
  • Swift 5.3 or later

Installation Methods

  1. In Xcode, select File > Add Package Dependencies...
  2. Enter the Squad SDK repository URL:
https://github.com/withyoursquad/squad-sports-ios.git
  1. Select version settings:
  2. Rules: Version - Up to Next Major
  3. Version: 1.0.0 or later

CocoaPods

  1. Add the following to your Podfile:
platform :ios, '13.0'
use_frameworks!

target 'YourApp' do
  pod 'SquadSDK', '~> 1.0.0'
end
  1. Install the dependency:
pod install

Project Setup

1. Required Permissions

Add the following to your Info.plist:

<!-- Microphone permission for voice calls -->
<key>NSMicrophoneUsageDescription</key>
<string>Squad needs access to your microphone for voice calls.</string>

<!-- Camera permission for profile photos (optional) -->
<key>NSCameraUsageDescription</key>
<string>Squad needs access to your camera for profile photos.</string>

2. Background Modes

Enable the following capabilities in Xcode:

  1. Go to your target's Signing & Capabilities
  2. Click + Capability
  3. Add Background Modes
  4. Enable:
  5. Voice over IP
  6. Audio, AirPlay, and Picture in Picture
  7. Background fetch

3. Network Configuration

Add App Transport Security settings to Info.plist:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <false/>
    <key>NSExceptionDomains</key>
    <dict>
        <key>squadforsports.com</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <false/>
            <key>NSExceptionRequiresForwardSecrecy</key>
            <true/>
            <key>NSExceptionMinimumTLSVersion</key>
            <string>TLSv1.3</string>
            <key>NSIncludesSubdomains</key>
            <true/>
        </dict>
    </dict>
</dict>

4. Framework Dependencies

The Squad SDK requires the following frameworks:

  • WebKit.framework
  • AVFoundation.framework
  • Network.framework

These are automatically linked when using package managers.

Post-Installation Steps

1. Import the SDK

Add the import statement to your source files:

import SquadSDK

2. Initialize the SDK

In your AppDelegate or SceneDelegate:

func application(_ application: UIApplication,
                didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Initialize Squad SDK
    do {
        try SquadSDK.initialize(
            organizationId: "YOUR_ORG_ID",
            apiKey: "YOUR_API_KEY"
        )
    } catch {
        print("Squad SDK initialization failed: \(error)")
    }
    return true
}

3. Verify Installation

Add a test implementation:

class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()

        // Verify SDK version
        print("Squad SDK Version: \(SquadSDK.version)")

        // Check initialization status
        if SquadSDK.shared.isInitialized {
            print("Squad SDK initialized successfully")
        }
    }
}

Troubleshooting

Common Issues

  1. Pod Installation Failed

  2. Run pod repo update

  3. Delete Podfile.lock and run pod install again
  4. Check minimum iOS version in Podfile

  5. SPM Installation Failed

  6. Check Xcode version compatibility

  7. Clear derived data
  8. Update to latest Xcode version

  9. Framework Not Found

  10. Clean build folder (Cmd + Shift + K)
  11. Clean build cache
  12. Re-run package manager installation

Support

For installation issues:

Next Steps