Instructions to add the screen params of new iOS devices to the Cardboard SDK
Stay organized with collections
Save and categorize content based on your preferences.
Each year, new iOS devices are released. In order to make the Cardboard SDK
work with these new devices, it is required to update screen_params.mm.
What needs to be updated
Take a look at the history of screen_params
to ensure that the correct lines are being updated.
Update the XR Plugin with the new screen param files
If the XR Plugin is being used, it is required to generate a new
GfxPluginCardboard.a
with the updated screen_params.mm
file.
Follow the steps in the "Download and build the demo app" section from the
Quickstart
up to step 2 to open Cardboard.xcworkspace
workspace in XCode. Select the sdk
module and then Generic iOS Device as the target device (or choose to build
for a specific phone if that suits your needs better). Build the sdk module,
copy the generated .a
file and replace the GfxPluginCardboard.a
file in
cardboard-xr-plugin/Runtime/iOS/.
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-04 UTC."],[[["\u003cp\u003eYearly updates to \u003ccode\u003escreen_params.mm\u003c/code\u003e are necessary for Cardboard SDK compatibility with new iOS devices.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers need to obtain model strings and DPI values from sources like theapplewiki.com and Apple's official specifications.\u003c/p\u003e\n"],["\u003cp\u003eThe XR Plugin requires regeneration of \u003ccode\u003eGfxPluginCardboard.a\u003c/code\u003e using the updated \u003ccode\u003escreen_params.mm\u003c/code\u003e file for proper functionality.\u003c/p\u003e\n"],["\u003cp\u003eUpdating involves building the SDK module in XCode with a generic or specific iOS device target, then replacing the existing \u003ccode\u003eGfxPluginCardboard.a\u003c/code\u003e within the cardboard-xr-plugin.\u003c/p\u003e\n"]]],[],null,["# Instructions to add the screen params of new iOS devices to the Cardboard SDK\n\nEach year, new iOS devices are released. In order to make the Cardboard SDK\nwork with these new devices, it is required to update [screen_params.mm](https://github.com/googlevr/cardboard/blob/master/sdk/screen_params/ios/screen_params.mm).\n\nSource of information\n---------------------\n\n- Model strings can be obtained from \u003chttps://theapplewiki.com/wiki/Models\u003e.\n- DPI (also called PPI) value can be taken from Apple's technical specifications. For example, for iPhone 15 \u003chttps://www.apple.com/iphone-15/specs/\u003e.\n\nWhat needs to be updated\n------------------------\n\nTake a look at the [history of screen_params](https://github.com/googlevr/cardboard/commit/5c9f3066dc14962d1dec9a32ec9d3668641c408d#diff-df9ac93ac73eb84593606cffc684fb9640e704a3e6fda96ca9cf42340a81c78a)\nto ensure that the correct lines are being updated.\n\nUpdate the XR Plugin with the new screen param files\n----------------------------------------------------\n\nIf the XR Plugin is being used, it is required to generate a new\n`GfxPluginCardboard.a` with the updated `screen_params.mm` file.\n\nFollow the steps in the \"Download and build the demo app\" section from the\n[Quickstart](https://developers.google.com/cardboard/develop/ios/quickstart#download_and_build_the_demo_app)\nup to step 2 to open `Cardboard.xcworkspace` workspace in XCode. Select the sdk\nmodule and then **Generic iOS Device** as the target device (or choose to build\nfor a specific phone if that suits your needs better). Build the sdk module,\ncopy the generated `.a` file and replace the `GfxPluginCardboard.a` file in\n[cardboard-xr-plugin/Runtime/iOS/](https://github.com/googlevr/cardboard-xr-plugin/tree/master/Runtime/iOS)."]]