Migrate Your iOS Project From Carthage To Swift Package Manager
Blog post from Stream
Since the release of Swift 5 and Xcode 11, Swift Package Manager (SPM) has emerged as a viable dependency manager for iOS projects, with improved capabilities in Xcode 12, including support for binary frameworks and resource files. Although CocoaPods remains the most popular with 46.5% of iOS developers, SPM is rapidly gaining traction, trailing closely behind with 42.1%, while Carthage is used by 11.4%. The article provides a detailed guide on migrating iOS projects from Carthage to SPM, emphasizing the manual steps necessary to remove Carthage-related files and settings from Xcode projects and the process for adding dependencies via SPM. It highlights that SPM's integration with the iOS toolchain and its recent updates position it to potentially overtake other dependency managers in popularity. The author also offers assistance for those transitioning projects and underscores the importance of ensuring compatibility and proper configuration when switching to SPM.