top of page
  • Writer's pictureDon Peter

A checklist for creating documentation for an iOS Framework


A checklist for creating documentation for an iOS Framework

iOS Frameworks are share libraries that can be integrated by the developer into the apps and use the functionalities built-in into those libraries. But even the most powerful framework falls short without proper documentation, thus affecting their adoption. The basic purpose of building Frameworks is to help other developers to use the functionalities by integrating the Framework to their app. This requires good documentation that explains each and every steps in the integration process and also about how to make use of the Framework capabilities.

Documentation website is the map that guides developers through using your Framework.

So, how do you craft documentation that shines as brightly as your code? Let's delve into the nitty-gritty of crafting top-notch iOS framework documentation website.


Where to Host the Documentation of your iOS Framework


Choosing the right way to host your documentation is crucial.

Creating Documentation website from Scratch


Writing documentation from scratch gives you complete control over the structure, design, and features. You can tailor it to fit the specific needs and aesthetics of your iOS framework. But this can be time-consuming, especially for large projects as it requires significant investment in planning, writing, and maintaining content.


Using Documentation Website generators


Website generators like GitPages or Docusaurus are best suited for documentation hosting.


They provide a quick start, allowing you to set up documentation with minimal effort. Availability of templates and pre-built themes helps streamline the process. Website generators enforce consistency in structure and style, making it easier for users to navigate and understand the content. This is particularly useful for maintaining a professional and cohesive look across projects.


When choosing a website generator, it is ideal to choose one that works based on mark-down language. This will help you switch between multiple such tools with ease if needed.


Creating a Readme File/First documentation page


Don't underestimate the power of a well-written First page/Readme file. It's the first impression your framework makes! Keep it updated and consider employing a templating system to streamline maintenance.


  • A concise overview: First page of the documentation website or the Readme file should clearly explain what your framework is. This is important because there will be situations where developers might land on your documentation page first.

  • Prerequisites and dependencies: This section should specify requirements like the minimum supported OS version of the framework or the need to integrate a distribution framework like Cocoapods.

  • Installation instructions: Make it easy for developers to get started. Provide a step-by-step process to help developers kickstart. If you are distributing the framework via cocoapods or any other distribution medium, make sure detailed steps are provided.

  • Basic usage examples: Showcase the core functionalities through code snippets. Code snippets are a must-have for every documentation website. Make sure any API that the developer has to implement when using the framework is explained with code snippets within the documentation website.


Managing documentation of Versions


As your framework evolves, documentation needs to keep pace. Version control systems like Git help you to,

  • Track changes and revert to previous versions if needed.

  • Use the Tag feature in Git to link specific documentation versions to framework releases.

  • Collaborate with fellow developers on documentation updates.


Semantic Versioning


Implement semantic versioning (major.minor.patch) to communicate changes and guide developers through updates. Website generators like GitPages and Docusaurus support versioning out of the box.


Structure for Versioning


A SemVer version number consists of three parts, separated by dots:

  • Major: Indicates significant breaking changes incompatible with previous versions. Increment for major changes in functionality or API.

  • Minor: Introduces new features or enhancements while maintaining backward compatibility. Increment for new features or bug fixes that don't break existing code.

  • Patch: Fixes bugs or makes minor improvements without changing functionality. Increment for bug fixes or performance enhancements.


Guidelines for Versioning


Here are some key guidelines for implementing SemVer:

  • Start with 1.0.0 for your initial release.

  • Only increment the major version number when:

  • You introduce major breaking changes, such as changes that break backward compatibility.

  • You rewrite a significant portion of your codebase.

  • You completely change the functionality of your framework.

  • Increment the minor version number when you:

  • Add new features that don't break existing code.

  • Make significant enhancements to existing functionality.

  • Increment the patch version number when you:

  • Fix bugs in the existing functionality.

  • Make minor improvements to performance or documentation.

  • Always specify a changelog for each release. This will help developers understand what changes were made in each version.

  • Consider using pre-release identifiers like beta or rc before you release a stable version.

  • Follow the SemVer specification strictly to maintain consistency and avoid confusion.


Organizing the Documentation


  • Organize your documentation by features, making it easy for developers to find what they need.

  • Group related functionalities under clear headings. Use internal linking to connect relevant sections.

  • Provide code snippets in abundance.


Screenshot of Finotes Documentation showing organization of different sections
Organization of different section in Finotes Documentation


Release Notes


Keep developers informed about changes with detailed release notes.

Make sure each release notes include the following,

  • New features and bug fixes: Highlight what's new and improved.

  • API changes: In case of any API changes that the developer needs to update make sure that is mentioned in the release notes.

  • Breaking changes: Clearly explain any potential compatibility issues.

  • Upgrade instructions: Guide developers on transitioning to the new version, if needed.


Deprecating an API


Deprecating an API in an iOS framework is a crucial step when your framework evolves and some functionalities may need retirement. 


Here's a breakdown of the process to ensure a smooth transition for developers,


  1. Announce the Deprecation:

    1. Specify the API: Clearly identify the API to be deprecated along with its current version. Provide detailed information about the function, parameters, and return values.

    2. Set a Deprecation Timeline: Choose a reasonable timeframe for sunsetting the API. This period allows developers to adjust their code and find alternatives. Consider a minimum of 6 months for major APIs and shorter periods for minor functionalities.

    3. Communicate through official channel: Utilize your developer documentation and release notes to make the announcement visible to your user base.

  2. Offer Migration Guidance:

    1. Suggest Alternatives: Recommend new or existing APIs that can replace the deprecated functionality. Provide detailed migration guides with code examples and explanations to ease the transition.

    2. Versioning Strategies: If relevant, offer compatibility layers or bridge APIs that work with both the old and new versions, helping developers migrate step-by-step.

    3. Deprecation Warnings: Implement warnings within your framework code that notify developers when they use the deprecated API. This provides immediate feedback and encourages the switch to newer methods.

      1. Use @available(*, deprecated) in Swift to mark a function as deprecated.

      2. Use __deprecated in Objective-c to mark a function as deprecated.

  3. Sunset the API:

    1. Remove the Deprecated API: Once the deprecation period ends, remove the deprecated API from your framework codebase. Clearly document this final step in your changelog and release notes.


Remember: Deprecation is a process, not an event. By following these steps, you can minimize disruption for your developers and ensure a smooth evolution of your dynamic framework.


SEO for making your Docs Discoverable


Discoverable documentation is every developer's dream. 

SEO will make the documentation website discoverable and get to the top of search engine results! Here are the basic steps to achieve it,


  1. Keyword Research:

    1. Dive into developer minds: Research relevant keywords developers use to find information about your framework or similar technologies. Tools like Google Keyword Planner, Ahrefs, and SEMrush can be your allies.

    2. Target long-tail keywords: While "framework" might be competitive, "best practices for XYZ framework API" could be your golden ticket.

    3. Focus on intent: Understand the search intent behind keywords. Are developers looking for tutorials, troubleshooting guides, or API references?

  2. Content Optimization:

    1. Craft compelling titles and meta descriptions: Optimize titles and meta descriptions for target keywords while remaining informative and engaging.

    2. Structure your content wisely: Use clear headings, subheadings, and bullet points for easy navigation and scannability.

    3. Internal linking: Link related pages and tutorials within your documentation, creating a strong knowledge network.

  3. Technical SEO:

    1. Mobile-friendliness is key: Ensure your website is mobile-responsive to cater to developers on the go.

    2. Speed is your friend: Optimize page loading times for a smooth user experience. Tools like Google PageSpeed and PingDom Insights can help identify bottlenecks.

    3. HTTPS for trust: Secure your website with HTTPS to build trust and improve search engine ranking. Most browsers warn users if the website is not secure, diminishing the trust.

  4. Building Buzz:

    1. Promote your documentation: Share it on social media, relevant forums, and developer communities.

    2. Build relationships: Connect with bloggers, influencers, and other developers in your niche. Guest posts and collaborations can amplify your reach.

    3. Monitor and analyze: Track your website traffic and search engine rankings. Use tools like Google Search Console and Google Analytics to understand what's working and what needs improvement.

  5. Bonus Tips:

    1. Utilize structured data: Implement schema markup to give search engines richer information about your content, potentially leading to richer search results.

    2. Localize your documentation: Consider translating your documentation for wider reach if your target audience is global.

    3. Embrace video: Videos and code samples can enhance engagement and improve user experience.


Continuous Improvement


Remember, documentation is a living document, not a set-and-forget affair. Gather feedback from users, actively address issues, and keep it updated alongside your framework.


Following these steps, you should be able to craft iOS framework documentation that is helpful for the developers. It's an investment that pays off in developer satisfaction, and the ultimate success of your creation.


About Finotes Documentation


We used Docusaurus for create oour documentation. It is based on mark-down language which gets built to vanila html files. This helps in deploying the documentation through an webserver. Visit https://docs.finotes.com to explore our documentation.

Blog for Mobile App Developers, Testers and App Owners

 

This blog is from Finotes Team. Finotes is a lightweight mobile APM and bug detection tool for iOS and Android apps.

In this blog we talk about iOS and Android app development technologies, languages and frameworks like Java, Kotlin, Swift, Objective-C, Dart and Flutter that are used to build mobile apps. Read articles from Finotes team about good programming and software engineering practices, testing and QA practices, performance issues and bugs, concepts and techniques. 

bottom of page