And out of the box – just going to Product > Build Documentation – we actually get something pretty good: Once I had figured out what DocC wasn’t, it was much easier to find a project that would definitely work well: SwiftGD, my open-source image manipulation package that lets you create graphics with server-side Swift.Īlthough this package does have some internal functionality, it’s mostly exposed to the world as public API and that’s exactly what DocC is looking for. If you ever used something like Jazzy to generate your documentation, it had the same public limitation by default, but at least there you could ask it to expose internal values for when you actually wanted it. This is not a bug, but rather another disconnect between my head and the way DocC works – it’s very tightly focused on people who are using a package or framework, as opposed to people building that package or framework, or indeed an app. I felt sure this would work much better, but again hit problems: DocC will only scan for things that are available externally to the package, so most of Sitrep is ignored. My next attempt was with my Sitrep project, which is a package. If you’re in this situation, I would suggest looking to break your project down into smaller packages – that should allow DocC to scan and document them correctly. This is a bit of a shame, to be honest, because the overwhelming majority of us work on actual app projects, and when someone new joins a team it would be great to give them some clear, readable documentation to help on-ramp them. You see, at this time DocC supports only frameworks and packages, which means it picked out only the external packages used by my app as opposed to all the app code itself. It might take a minute or two to complete, but when it’s finished you’ll see Apple’s Developer Documentation window appear with its results – your app’s documentation, living right alongside Apple’s own frameworks.Įxcept it isn’t, at least not in the way I had hoped. If you want to try this in your own app project, just go to the Product menu and choose Build Documentation. In my case, that was Unwrap – it’s a good size of project with various dependencies, and matches the kind of thing many app developers will be working with. The first thing I did when trying out DocC is what I expect most app developers would do: I opened up one of my projects to see what DocC would make of it. Sponsor Hacking with Swift and reach the world's largest Swift community! First, what DoC is not SPONSORED From March 20th to 26th, you can join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Please keep in mind I’m using Xcode 13 beta 1, so it’s all early days at this point – I expect DocC to get polished up a lot before the final release later this year. You can find out more in my article What’s new in Xcode 13. Xcode is packed with lots of major new features – it’s another real stand out year, and I hope the team are feeling really proud.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |