@@ -105,6 +105,8 @@ When the Djinni file(s) are ready, from the command line or a bash script you ca
--objc-out OBJC_OUTPUT_FOLDER \
--objc-type-prefix DB \ # Apple suggests Objective-C classes have a prefix for each defined type.
\
--objcpp-out OBJC_OUTPUT_FOLDER \
\
--idl MY_PROJECT.djinni
Some other options are also available, such as `--cpp-namespace` that put generated C++ code into the namespace specified. For a list of all options, run
...
...
@@ -158,26 +160,19 @@ you'll need to add calls to your own `JNI_OnLoad` and `JNI_OnUnload` functions.
##### Includes & Build Target
Generated file for Objective-C / C++ is as follows (assuming prefix is `DB`):
| Type | C++ header | C++ source | Objective-C header | Objective-C source |
(+) Generated only for types that contain constants.
The folders `public` and `private` correspond to the options `--objc-out` and `--objc-private-out`
respecitvely, allowing you to isolate implementation headers and sources from the public files
exposed to Objective-C clients.
(++) Generated only for types with derived operations and/or constants. These have `.mm` extensions to allow non-trivial constants.
Add all generated files to your build target, as well as the contents of `support-lib/objc`.
Note that `+Private`headers can only be used with ObjC++ source (other headers are pure ObjC).
Note that `+Private`files can only be used with ObjC++ source (other headers are pure ObjC) and are not required by Objective-C users of your interface.