# Mac Configurations
Follow this project configuration guide for your Mac setup. Once completed, return to the Quick Start Guide to finish integration.
# OSX Builds
In our OSX example we have used XCode 10.1. This is automatically setup when creating a template c++ Cocos project. The XCode project files are located in ""ProjectName/proj.ios_mac/
# Mac XCode Settings
Configure the following settings in your XCode Project for all targets:
- Include the following folders to the project:
Frameplay/Engine
,Frameplay/Native/Platforms/Mac
, andResources/Frameplay
. - Add the header search path:
$(SRCROOT)/../Frameplay
to General>Header Search Paths
Configure the following settings in your XCode Project for the desktop target:
- Add
Frameplay/Native/Platforms/Mac/libFrameplayNative.dylib
to Frameworks. - Add
libFrameplayNative.dylib
to General>Embedded Binaries. - Change the Destination of
libFrameplayNative.dylib
in Build Phases>Embedded Libraries to Executables. - Add
$(SRCROOT)/../Frameplay/Native/Platforms/Mac
to Build Settings>Library Search Paths. - Add
@executable_path
to Build Settings>Runpath Search Paths
# Build Mac
Start Debugging or Build the project in your editor. You can also build by running the following commands.
cd ./"ProjectName"
cocos compile -p mac -m debug
Successful builds will be located in "ProjectName"/bin/debug/mac/
# iOS Builds
# iOS XCode Settings
Configure the following settings in your XCode Project for all targets:
- Include the following folders to the project:
Frameplay/Engine
,Frameplay/Native/Platforms/iOS
, andResources/Frameplay
. Do not check theCopy items if needed
checkbox - Add
$(SRCROOT)/../Frameplay
to Build Settings>Header Search Paths.
Configure the following settings in your XCode Project for the mobile target:
- In General>Frameworks, Libraries, and Embedded Content, find
FrameplayNative.framework
and set it toEmbed & Sign
. - Add
$(SRCROOT)/../Frameplay/Native/Platforms/iOS
to Build Settings>Framework Search Paths.
# CMake Settings
Add the below block to CMakeLists.txt
:
if(IOS)
file(GLOB frameplay_mm
"Frameplay/Engine/*.mm"
)
file(GLOB frameplay_engine_cpp
"Frameplay/Engine/*.cpp"
)
list(APPEND GAME_SOURCE frameplay_mm frameplay_engine_cpp)
endif()
# Apple App Tracking Transparency (ATT)
To display an appropriate message when the app launches for the first time, as below:
Configure the following settings in your XCode Project
Make sure the project is targeting iOS 12+.
Add
AdSupport.framework
to General>Frameworks, Libraries, and Embedded Content.Add a string entry for
Privacy - Tracking Usage Description
to com.frameplay.cocos/proj.ios_mac/ios/Info.plist via XCode. This description will be shown in the Privacy popup whenRequestAppTrackingTransparency()
is called for the first time. You can find more information here (opens new window).Call the
RequestAppTrackingTransparency()
function to display the privacy popup at a time of your choosing.
#include "Engine/FrameplayATTManager.h"
// This will call the pop up and will set the App Tracking Status.
RequestAppTrackingTransparency()
An example of the ATT implementation can be found in the Frameplay SDK example scene in Frameplay/FrameplayExampleScene.h
.
More information on authorization status here. (opens new window)
# Build iOS
Deploy to an iOS device using your editor. You can also build by running the following commands:
cd ./com.company.cocos
cocos compile -p ios -m debug
Successful builds will be located in "Project"/bin/debug/ios/...