4/10/2023 0 Comments Xcode swift latest versionWhen adding a package as a dependency, Xcode will also automatically scan your GitHub account (if you give it access, of course) and show you a list of the packages that it finds there - making it really quick and easy to pick the dependency that you need. However, interestingly, it seems like dependencies can not yet be added to packages themselves through Xcode - but that’s most likely just a bug or missing feature. ![]() Swift packages can now (finally!) be used natively in apps on all of Apple’s platforms (they were previously limited to command line tools and server-side Swift applications) - and Xcode can even automatically add a package as a dependency to a project through its Add Package Dependency option located in the brand new File > Swift Packages menu. Furthermore, if a new target is added to a package’s manifest, Xcode will automatically pick that up and display that new target within its scheme selector (the caveat here being that, at the time of writing, you do need to manually create folders for each target’s source files). ![]() The contents of a Swift package is defined using a Package.swift manifest file, and editing such files has now been made a lot easier, thanks to proper autocompletion and syntax highlighting. Swift packages can now easily be created right from within Xcode. New packages can easily be created using a new Swift Package option in the File > New submenu, and Xcode is capable of opening any existing Swift package as well (without requiring an Xcode project file to be generated). Creating and building packagesįor Swift package authors (or anyone who wants to start modularizing their code base by moving things into frameworks), Xcode now offers complete support for creating and editing packages. Let’s take a first look at this new integration, and what sort of features that it currently offers. ![]() ![]() While the new version of Xcode is only in an initial beta stage at this point - it already features an impressive amount of functionality when it comes to building, using, and managing Swift packages. One of the most exciting new features in Xcode 11 is that the Swift Package Manager is finally becoming a first class citizen within Apple’s IDE.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |