Author and share great documentation for your Swift packages and frameworks.

Posts under DocC tag

69 Posts

Post

Replies

Boosts

Views

Activity

DocC Documentation for targets other than static and dynamic libraries
Is it possible to add DocC documentation to a target that does not result in either a static library or a framework? It doesn't yet appear to be a feature of DocC. If not, will there be support in the future to add documentation to "regular" Xcode projects that don't result in a static library or framework? I think it could be useful to have documentation for larger apps that may use multiple frameworks in complex ways
2
0
1.7k
Feb ’22
Unable to generate DocC documentation
Hi there! I've been trying to play around with the DocC documentation (amazing addition, my favourite for sure this year). Sadly, I'm not able to build documentation for the project. I'm running macOS 11.4 and the Xcode 13 beta (13A5154h). I've tried this on a couple of existing projects and a new fresh one. When I click product -> build documentation it will do a build action and open the documentation for the page I had open last and show all Apple documentation, but I am unable to see any documentation for my project. I am able to add a documentation catalog. That creates the 'index' and a resources folder, which is empty. Is this a known issue, or an issue on my end?
7
0
6.0k
Jan ’22
DocC documentation can't be rendered with Apache on CentOS 7
I downloaded the sample code project 'SlothCreator' from here then exported a SlothCreator.doccarchive file. I placed the SlothCreator.doccarchive in /var/www/html/. I use Apache web server on CentOS 7. My .htaccess file is as follows. # Enable custom routing. RewriteEngine On # Route documentation and tutorial pages. RewriteRule ^(documentation|tutorials)\/.*$ SlothCreator.doccarchive/index.html [L] # Route files and data for the documentation archive. RewriteRule ^(css|js|data|images|downloads|favicon\.ico|favicon\.svg|img|theme-settings\.json|videos)\/.$ SlothCreator.doccarchive/$0 [L] # If the file path doesn't exist in the website's root ... RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # ... route the request to that file path with the documentation archive. RewriteRule .* SlothCreator.doccarchive/$0 [L] I confirmed that the RewriteEngine works well. I try the following urls then see error message "An unknown error occurred." or "The page you’re looking for can’t be found." http://localhost/documentation/SlothCreator => "An unknown error occurred." http://localhost/SlothCreator.doccarchive/index.html => "The page you’re looking for can’t be found." Can I know what the problem is? Doesn't it work with CentOS?
4
0
2.3k
Dec ’21
What's the pattern to provide organization around properties and methods within a struct or class?
I'm using DocC to add documentation to an existing swift package, and the basics are working great - properties and methods showing up, linked pages, all the stuff you'd hope for. I'd like to update the structure within the struct (or class) to organize the methods and properties a bit more akin to how Apple does it in their documentation - not just the default headers, but organized by why you'd use them. Can this be done in DocC using headings within the doc comments in the source file directly, or do we need to add an Extension file with the same symbol name at the top to override and provide that additional structure? The extension template looks like it might be redundant with the summary and overview sections, since that same area is (I think) what comes from the doc comments in the source headers. # ``Symbol`` Summary ## Overview Text ## Topics ### Group - ``Symbol``
1
0
1.4k
Nov ’21
Missing search field in hosted documentation
I found out docC is missing search field in hosted documentation, that is currently for example in documentation tool jazzy (https://pspdfkit.com/blog/2016/adding-live-search-to-jazzy/). This is useful feature that should have every documentation. I would consider it as one of the vital feature for every documentation. Could we expect this feature someday ? Thanks for answer.
2
0
1.1k
Sep ’21
Can .doccarchive file enhance experience of code completion
In this documentation: distributing-documentation-to-external-developers, it seems that .doccarchive file can only be opened directly in Xcode or hosted in a website. In my circumstance, I am distributing my swift static framework by turning on BUILD_LIBRARY_FOR_DISTRIBUTION. There are some symbols such as struct/class/function/property, and they must be marked as public to meet the requirement of compiler. But I really discourage my clients to use these symbols. One of the approach is to remove them from the code completion suggestion of Xcode. In another documentation: documenting-a-swift-framework-or-package, it is said that: The compiler integrates directly with Xcode to enhance your existing workflow, including code completion, Quick Help, and more. I am wondering if it is possible that I ship my framework with a .doccarchive file. And when my clients use my binary framework, Xcode can use my .doccarchive file when doing code completion and showing quick help of the code?
1
0
1.3k
Jul ’21
DocC Documentation for targets other than static and dynamic libraries
Is it possible to add DocC documentation to a target that does not result in either a static library or a framework? It doesn't yet appear to be a feature of DocC. If not, will there be support in the future to add documentation to "regular" Xcode projects that don't result in a static library or framework? I think it could be useful to have documentation for larger apps that may use multiple frameworks in complex ways
Replies
2
Boosts
0
Views
1.7k
Activity
Feb ’22
Unable to generate DocC documentation
Hi there! I've been trying to play around with the DocC documentation (amazing addition, my favourite for sure this year). Sadly, I'm not able to build documentation for the project. I'm running macOS 11.4 and the Xcode 13 beta (13A5154h). I've tried this on a couple of existing projects and a new fresh one. When I click product -> build documentation it will do a build action and open the documentation for the page I had open last and show all Apple documentation, but I am unable to see any documentation for my project. I am able to add a documentation catalog. That creates the 'index' and a resources folder, which is empty. Is this a known issue, or an issue on my end?
Replies
7
Boosts
0
Views
6.0k
Activity
Jan ’22
DocC documentation can't be rendered with Apache on CentOS 7
I downloaded the sample code project 'SlothCreator' from here then exported a SlothCreator.doccarchive file. I placed the SlothCreator.doccarchive in /var/www/html/. I use Apache web server on CentOS 7. My .htaccess file is as follows. # Enable custom routing. RewriteEngine On # Route documentation and tutorial pages. RewriteRule ^(documentation|tutorials)\/.*$ SlothCreator.doccarchive/index.html [L] # Route files and data for the documentation archive. RewriteRule ^(css|js|data|images|downloads|favicon\.ico|favicon\.svg|img|theme-settings\.json|videos)\/.$ SlothCreator.doccarchive/$0 [L] # If the file path doesn't exist in the website's root ... RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # ... route the request to that file path with the documentation archive. RewriteRule .* SlothCreator.doccarchive/$0 [L] I confirmed that the RewriteEngine works well. I try the following urls then see error message "An unknown error occurred." or "The page you’re looking for can’t be found." http://localhost/documentation/SlothCreator => "An unknown error occurred." http://localhost/SlothCreator.doccarchive/index.html => "The page you’re looking for can’t be found." Can I know what the problem is? Doesn't it work with CentOS?
Replies
4
Boosts
0
Views
2.3k
Activity
Dec ’21
What's the pattern to provide organization around properties and methods within a struct or class?
I'm using DocC to add documentation to an existing swift package, and the basics are working great - properties and methods showing up, linked pages, all the stuff you'd hope for. I'd like to update the structure within the struct (or class) to organize the methods and properties a bit more akin to how Apple does it in their documentation - not just the default headers, but organized by why you'd use them. Can this be done in DocC using headings within the doc comments in the source file directly, or do we need to add an Extension file with the same symbol name at the top to override and provide that additional structure? The extension template looks like it might be redundant with the summary and overview sections, since that same area is (I think) what comes from the doc comments in the source headers. # ``Symbol`` Summary ## Overview Text ## Topics ### Group - ``Symbol``
Replies
1
Boosts
0
Views
1.4k
Activity
Nov ’21
Is there a way to include snippets from an external file with DocC?
I have a few sections in my content where I have a repeated example that I use to illustrate how to use a few methods in my library together - is there a way to move this into an external snippet and include it inline within existing content?
Replies
4
Boosts
0
Views
2.4k
Activity
Nov ’21
Missing search field in hosted documentation
I found out docC is missing search field in hosted documentation, that is currently for example in documentation tool jazzy (https://pspdfkit.com/blog/2016/adding-live-search-to-jazzy/). This is useful feature that should have every documentation. I would consider it as one of the vital feature for every documentation. Could we expect this feature someday ? Thanks for answer.
Replies
2
Boosts
0
Views
1.1k
Activity
Sep ’21
DocC build failed when I use section title include Chinese with "Xcode"
The editor prompt me include content not permitted... This is my content: And I don't know why this content not permitted...
Replies
1
Boosts
0
Views
985
Activity
Aug ’21
Can .doccarchive file enhance experience of code completion
In this documentation: distributing-documentation-to-external-developers, it seems that .doccarchive file can only be opened directly in Xcode or hosted in a website. In my circumstance, I am distributing my swift static framework by turning on BUILD_LIBRARY_FOR_DISTRIBUTION. There are some symbols such as struct/class/function/property, and they must be marked as public to meet the requirement of compiler. But I really discourage my clients to use these symbols. One of the approach is to remove them from the code completion suggestion of Xcode. In another documentation: documenting-a-swift-framework-or-package, it is said that: The compiler integrates directly with Xcode to enhance your existing workflow, including code completion, Quick Help, and more. I am wondering if it is possible that I ship my framework with a .doccarchive file. And when my clients use my binary framework, Xcode can use my .doccarchive file when doing code completion and showing quick help of the code?
Replies
1
Boosts
0
Views
1.3k
Activity
Jul ’21
Docc export to HTML
Is it possible to export interactive tutorial to html and use it on my website?
Replies
1
Boosts
0
Views
2.7k
Activity
Jul ’21