Quickstart: macOS
Get started with the PlayFab Services SDK for macOS. Follow these steps to include the libraries in your project and try out the sample code for basic PlayFab functionality. This quickstart helps you make your first PlayFab API call using the macOS SDK. Before continuing, make sure you’ve completed the steps in Quickstart: Game Manager, which ensure you have a PlayFab account and are familiar with the PlayFab Game Manager.Requirements
- A PlayFab developer account.
- XCode IDE installed.
Project setup
Download the PlayFab macOS SDK to your project from the PlayFab SDK Release Page.Integrate PlayFab C SDK into your own project
Add binaries to your game
After getting your binaries by download or building from source you should be able to easily integrate them into your game/app. You need to add the following binaries to your game:- HttpClient_macOS.xcframework
- PlayFabCore_macOS.xcframework
- PlayFabServices_macOS.xcframework
- In XCode, navigate to your desired target and select it.
- In the General section, scroll down and in the “Frameworks, Libraries, and Embedded Content” section, select the ”+” sign.
- Search for your PlayFabServices / PlayFabCore / HttpClient binaries and select the xcframework folders. (You can also select a specific library if you navigate inside the xcframework folders, but importing xcframework bundle is recommended since it will work for both device and simulator builds.)
- After importing the binaries successfully, HttpClient_macOS, PlayFabCore_macOS and PlayFabServices_macOS, are listed under Frameworks, Libraries, and Embedded Content.
Add header search paths
Once binaries have been added you’ll need to ensure that header search paths are also correctly set up.- Navigate to your project.
- Select “Build Settings” and then search for “Header Search Paths”.
-
Update the property value to include the SDK Headers. Add a reference to the headers found in the include folder. Example:
