.APINOTES File Extension
Swift Objective-C API Note
Developer | Apple |
Popularity |
3.7 | 22 Votes |
What is an APINOTES file?
More Information
Swift is an Apple-maintained programming language that developers use to create programs for macOS, iOS, tvOS, and watchOS. Developers creating Swift programs may have those programs make API calls to programs written in Objective-C, which is the language Swift replaced.
If an Objective-C API's header does not contain all the information needed for the Swift program to correctly interpret information it receives from the API, developers can annotate the API using an APINOTES file. This file contains YAML-formatted text that defines how and what information a Swift program can receive from the associated Objective-C API.
After a developer creates an APINOTES file, they must place it in the same directory as the Objective-C framework to which it corresponds and update CMakeLists.txt. Then, the next time the developer builds their Swift program, the compiler will load the APINOTES file along with the corresponding framework.
How to open an APINOTES file
You can open and edit an APINOTES file in any text or source code editor, such as GitHub Atom, Sublime Text, or Microsoft Visual Studio Code. Source code editors, like the previously mentioned programs, contain tools that make it easier to review and edit the text APINOTES files contain.