|
|
@@ -122,41 +122,15 @@ provisioning profiles, which is achieved by passing the `-allowProvisioningUpdat |
|
|
|
#### Archiving for iOS |
|
|
|
|
|
|
|
CMake's out-of-the-box archiving behaviour doesn't always work as expected, especially for targets |
|
|
|
that depend on static libraries (such as targets added with `juce_add_binary_data`). Xcode may |
|
|
|
generate these libraries into a 'DerivedData' directory, but then omit this directory from the |
|
|
|
library search paths later in the build. |
|
|
|
|
|
|
|
If the "Product -> Archive" action isn't working, the following steps may help correct the issue: |
|
|
|
|
|
|
|
- On your static library, explicitly set the `ARCHIVE_OUTPUT_DIRECTORY` property. |
|
|
|
``` |
|
|
|
set_target_properties(my_static_lib_target PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "./") |
|
|
|
``` |
|
|
|
- Now, the Archive build should complete without linker errors, but the archived product may still |
|
|
|
be hidden in the Organizer window. To fix this issue, set the following properties on the target |
|
|
|
representing the actual iOS app. If your target was added with `juce_add_gui_app`, pass the same |
|
|
|
target name. Otherwise, if your target was added with `juce_add_plugin` you may need to append |
|
|
|
`_Standalone` to the target name, to specify the standalone plugin target. |
|
|
|
``` |
|
|
|
set_target_properties(my_ios_app_target PROPERTIES |
|
|
|
XCODE_ATTRIBUTE_INSTALL_PATH "$(LOCAL_APPS_DIR)" |
|
|
|
XCODE_ATTRIBUTE_SKIP_INSTALL "NO") |
|
|
|
``` |
|
|
|
|
|
|
|
To archive an AUv3 plugin, `XCODE_ATTRIBUTE_INSTALL_PATH` must point to the PlugIns directory of the |
|
|
|
final app bundle but only for the AUv3 target. In code, that might look like this: |
|
|
|
|
|
|
|
set_target_properties(my_plugin_Standalone PROPERTIES |
|
|
|
XCODE_ATTRIBUTE_INSTALL_PATH "$(LOCAL_APPS_DIR)" |
|
|
|
XCODE_ATTRIBUTE_SKIP_INSTALL "NO") |
|
|
|
|
|
|
|
get_target_property(output_name my_plugin_Standalone OUTPUT_NAME) |
|
|
|
|
|
|
|
# On iOS, the AUv3 should go in <bundle_dir>/PlugIns |
|
|
|
# On macOS, the AUv3 should go in <bundle_dir>/Contents/PlugIns |
|
|
|
set_target_properties(my_plugin_AUv3 PROPERTIES |
|
|
|
XCODE_ATTRIBUTE_INSTALL_PATH "$(LOCAL_APPS_DIR)/${output_name}.app/PlugIns" |
|
|
|
XCODE_ATTRIBUTE_SKIP_INSTALL "NO") |
|
|
|
that depend on custom static libraries. Xcode may generate these libraries into a 'DerivedData' |
|
|
|
directory, but then omit this directory from the library search paths later in the build. |
|
|
|
|
|
|
|
If the "Product -> Archive" action isn't working due to missing staticlibs, try setting the |
|
|
|
`ARCHIVE_OUTPUT_DIRECTORY` property explicitly: |
|
|
|
|
|
|
|
set_target_properties(my_static_lib_target PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "./") |
|
|
|
|
|
|
|
Note that the static library produced by `juce_add_binary_data` automatically sets this property. |
|
|
|
|
|
|
|
### Building universal binaries for macOS |
|
|
|
|
|
|
|