In the navigator, I'm gonna open the Playgrounds folder and select the NutritionFacts playground. Playgrounds are great for documentation, and they now work seamlessly with packages in Xcode 12. ![]() What's great about NutritionFacts is the authors have included rich documentation explaining how to use the API, and, even better, the documentation was written as a playground. It's a really handy package to use in recipe and food apps. I'm gonna open it in Xcode by double-clicking "Package.swift." NutritionFacts provides accurate nutritional information for many common types of food. Here I have a Swift package checked out called NutritionFacts. So, let's get started by looking at how Xcode Playgrounds works with Swift packages. In the final part of the presentation, I'm going to demonstrate working with resources that need build support, like ML models and asset catalogs, in a playground. Then I'm going to demonstrate improvements for Playgrounds importing project targets, like frameworks and package dependencies. That integration brings with it a lot of improvements to how Playgrounds works with packages, projects and resources.įirst, I'll show you how Playgrounds now works well in Swift packages and makes a great option for package documentation containing runnable code. In Xcode 12, Playgrounds is fully integrated with Xcode's modern build system. ![]() Today, I'm excited to tell you about enhancements we've made to Xcode 12 to make Playgrounds work seamlessly with Swift packages and frameworks in your projects. Welcome to "Explore Packages and Projects with Xcode Playgrounds." I'm Chris Miles, an engineering manager on the Xcode team.ĭevelopers love using Xcode Playgrounds to quickly try out new ideas and to learn and explore APIs and frameworks.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |