diff --git a/source/images/activate-my-mac-xcode-catalyst.png b/source/images/activate-my-mac-xcode-catalyst.png new file mode 100644 index 0000000000..39a3cd4a43 Binary files /dev/null and b/source/images/activate-my-mac-xcode-catalyst.png differ diff --git a/source/includes/steps-mac-catalyst.yaml b/source/includes/steps-mac-catalyst.yaml new file mode 100644 index 0000000000..6bf94bdef3 --- /dev/null +++ b/source/includes/steps-mac-catalyst.yaml @@ -0,0 +1,63 @@ +title: Update Your Build Phase Settings +ref: update-build-phase-settings +content: | + Before you can use Mac Catalyst in your React Native application, you must + specify the platform name. Click :guilabel:`Build Phases` in XCode, and within + the :guilabel:`Bundle React Native code and images` tab, add the following to + specify "ios" as the platform name. + + .. code-block:: none + + export PLATFORM_NAME=ios +--- +title: Update Your Podfile +ref: update-podfile +content: | + + .. note:: + + This is a temporary step that will not be necessary when the following Cocoapods issue is solved: + :github:`[Catalyst] Podspec Resource Bundle requires a development team ` + + Currently, there is a :github:`Cocoapods bug + ` that causes XCode to require a development + team when building for Mac Catalyst. This bug prevents signing locally. As a + workaround, you can alter your Podfile to fix your bundle target's signing + certificate to sign to run locally. + + Replace the post-install script in your Podfile by removing the following lines: + + .. code-block:: none + :caption: /ios/Podfile + + post_install do |installer| + react_native_post_install(installer) + end + + And copy the following lines where your previous post-install script was: + + .. code-block:: none + :caption: /ios/Podfile + + post_install do |installer| + react_native_post_install(installer) + installer.pods_project.targets.each do |target| + # Fix bundle targets' 'Signing Certificate' to 'Sign to Run Locally' + if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" + target.build_configurations.each do |config| + config.build_settings['CODE_SIGN_IDENTITY[sdk=macosx*]'] = '-' + end + end + end + end +--- +title: Activate and Test Catalyst in Your Project +ref: activate-catalyst +content: | + To test out Catalyst in your project, activate Mac in the :guilabel:`general` + tab of your XCode project workspace. To do this, click :guilabel:`Mac` in the + :guilabel:`Deployment Info` section. Select :guilabel:`"Scale Interface to Match iPad"`. + This makes "My Mac" selectable, allowing you to run your application on your Mac. + + .. figure:: /images/activate-my-mac-xcode-catalyst.png + :alt: Activate your Mac in Xcode Project Workspace \ No newline at end of file diff --git a/source/sdk/react-native.txt b/source/sdk/react-native.txt index 4fdaeefd0a..ebee89e7b9 100644 --- a/source/sdk/react-native.txt +++ b/source/sdk/react-native.txt @@ -14,6 +14,7 @@ MongoDB Realm React Native SDK Fundamentals Data Types Usage Examples + Integration Guides Advanced Guides Javascript SDK Reference Manual diff --git a/source/sdk/react-native/install.txt b/source/sdk/react-native/install.txt index b6afe05232..199891ee56 100644 --- a/source/sdk/react-native/install.txt +++ b/source/sdk/react-native/install.txt @@ -41,6 +41,13 @@ meets the following prerequisites: "eject" your Expo project to use {+service-short+}. The installation steps on this page do not use the Expo CLI. +.. note:: Realm JS version 10.6.0 Supports Mac Catalyst + + For `React Native version 0.64 and below + `_, building your {+service-short+} React + Native application requires additional steps in order to :doc:`build your + application when using Mac Catalyst + `. Installation ------------ diff --git a/source/sdk/react-native/integrations.txt b/source/sdk/react-native/integrations.txt new file mode 100644 index 0000000000..5adceeb499 --- /dev/null +++ b/source/sdk/react-native/integrations.txt @@ -0,0 +1,13 @@ +===================================== +Realm Integrations - React Native SDK +===================================== + +.. toctree:: + :titlesonly: + :hidden: + + Build using Mac Catalyst + +- :doc:`Build using Mac Catalyst ` + + diff --git a/source/sdk/react-native/integrations/mac-catalyst.txt b/source/sdk/react-native/integrations/mac-catalyst.txt new file mode 100644 index 0000000000..d46b38fc1b --- /dev/null +++ b/source/sdk/react-native/integrations/mac-catalyst.txt @@ -0,0 +1,37 @@ +.. _react-native-mac-catalyst: + +======================== +Build using Mac Catalyst +======================== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Overview +-------- + +This page details steps required for building your {+service+} application when +using `Mac Catalyst `_ with `React +Native version 0.64 and below `_. + +.. note:: + + Version 10.6.0 and above of the {+service+} React Native SDK supports Mac Catalyst. + +.. important:: + + Version 0.65 and above of React Native do not require these additional steps to build using Mac Catalyst. + +.. seealso:: + + :ref:`react-native-install` + +Procedure +--------- + +.. include:: /includes/steps/mac-catalyst.rst \ No newline at end of file