podexit
    Preparing search index...

    Native iOS: CocoaPods to Swift Package Manager

    For an app with a Podfile next to its Xcode project. The example rows come from the native-app fixture, a real lockfile resolved on 14 October 2026.

    npx @mcamdali/podexit --format markdown --output podexit.md
    

    Each trunk pod gets a row like these:

    Pod Locked Latest on trunk Updates Swift package
    Alamofire 5.12.2 5.12.2 (2026-09-10) frozen after Dec 2 yes
    FirebaseAnalytics 12.19.0 12.19.0 (2026-09-09) capped at 12.x yes (Firebase)
    GoogleAppMeasurement 12.19.0 12.19.0 (2026-09-09) capped with Firebase unknown

    Pods marked "Pulled in by" are dependencies of other pods. You usually do not add them yourself: the Swift package of the pod that needs them declares them too.

    For each pod your Podfile lists with a Swift package:

    1. In Xcode, choose File › Add Package Dependencies… and paste the repository URL from the report.
    2. Pick a version rule that starts at the version you have locked (for Alamofire above, "Up to Next Major Version" from 5.12.2). If the report says the package exists only in newer versions, start from the first version that has Package.swift and read its changelog.
    3. Add the product to your app target. The product name is usually the pod name; check the package's Package.swift (.library(name: …)) when it is not.
    4. Remove the pod from the Podfile and run pod install.
    5. Build and run the tests.

    Firebase's migration page advises against mixing CocoaPods and Swift Package Manager in the same target for long ("complex dependency cycles and build errors"), so finish the move per target rather than leaving it half done.

    • Binary pods (the report says the podspec points to a host such as dl.google.com): check the vendor's documentation. Many ship an XCFramework or a separate package repository. For Google's analytics binaries, the Firebase package already depends on GoogleAppMeasurement.
    • Open-source pods: look for an open issue or pull request about Swift Package Manager in the repository, use a maintained fork that adds Package.swift, or vendor the source into your project.
    • Abandoned pods: replace them, or keep the last version from trunk knowing it will not get fixes.

    When the Podfile has no pods left:

    pod deintegrate
    rm Podfile Podfile.lock
    rm -r Pods

    Delete the .xcworkspace CocoaPods created and open the .xcodeproj from now on (unless the workspace holds other projects you added yourself).