Skip to content

Add support for Swift Package Manager (SPM) as the dependency manager for iOS #587

Description

@sja26

Introduction

Deprecate Cocoapods as the dependency manager for iOS, and add support for Swift Package Manager (SPM) as its successor.

Details

There is growing evidence that SPM is on a trajectory to replace Cocoapods as the most popular dependency manager for iOS apps.

I surmise that Cocoapods, being the only option to integrate React Native into an iOS app, is preventing a significant and growing number of iOS developers from trying out React Native.

Some background:

  • Cocoapods was released in 2011 written in Ruby, it became the de facto dependency manager for iOS apps.
  • SPM was released as part of Swift 3.0 in 2016.

References:

Discussion points

Focusing on the data gathered by JetBrains' most recent annual survey for Swift and Objective-C developers in 2022. The results of 3 questions stand out as the main motivators to address the aforementioned trajectory of SPM.

Do you use Swift and Objective-C together in the same project?

  • 62% Yes, most of my codebase is in Swift
  • 23% Yes, most of my codebase is in Objective-C
  • 16% No

Which dependency manager do you use?

  • 61% CocoaPods
  • 47% Swift Package Manager
  • 18% None
  • 11% Carthage
  • 1% Other

Do you plan to replace CocoaPods dependencies with SPM packages?

  • 48% No, and I don’t plan to in the next 12 months
  • 28% Yes
  • 24% No, but I plan to in the next 12 months

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions