Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift package manager for objective c code

I have few old objective c projects which has to be converted to a framework for usage across existing and new xcodeproj. Will SPM be a good choice ? Please let me know if SPM work for a pure objective c project ?

like image 778
thndrkiss Avatar asked Feb 20 '17 14:02

thndrkiss


People also ask

Can I use Swift package manager with Objective-C?

The Swift Package Manager allows developers to build reusable components made up of Swift, Objective-C, Objective-C++, C, or C++ code that other developers can use in their own projects.

How do I run Swift package manager?

swift in its directory produces an executable. Running the swift build command starts the Swift build system to produce the Dealer executable, which can be run from the . build/debug directory. The complete code for the Dealer package can be found at https://github.com/apple/example-package-dealer.

How do I write a Swift package?

To create a new Swift package, open Xcode and select File > New > Swift Package. Choose a name and select a file location. Select “Create Git repository on my Mac” to put your package under version control. On completion, the Swift package opens in Xcode and looks similar to a standard Xcode project.


1 Answers

Apple have now answered this question.

From the documentation "Swift packages are reusable components of Swift, Objective-C, Objective-C++, C, or C++ code that developers can use in their projects"

So yes, and I intend to do this almost immediately, as the maintenance of frameworks has been a major pain over the years, with all the run scripts and the like.

Here is the link for the source document : https://developer.apple.com/documentation/swift_packages

like image 163
Gordon Dove Avatar answered Sep 22 '22 02:09

Gordon Dove