-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(DOCSP-17079): Mac Catalyst Support - React Native #1252
Merged
mohammadhunan-dev
merged 9 commits into
mongodb:master
from
mohammadhunan-dev:DOCSP-17079-macOS-ReactNative-support
Jul 28, 2021
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
039cfcb
(DOCSP-17079):MacOS Catalyst Support - React Native
92a880a
change title
f368d92
fix toc + page titles
e1d3195
fixed name macos -> mac cataylst
f9ee125
Added additional steps
027d84c
clean up formatting
3e64d76
update image with circles to highlight
b455057
fixed wording,grammar and formatting
d2741a4
specified that these steps are for RN 0.65 +
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <CocoaPods/CocoaPods/issues/8891>` | ||
|
||
Currently, there is a :github:`Cocoapods bug | ||
<CocoaPods/CocoaPods/issues/8891>` 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
===================================== | ||
Realm Integrations - React Native SDK | ||
===================================== | ||
|
||
.. toctree:: | ||
:titlesonly: | ||
:hidden: | ||
|
||
Build using Mac Catalyst </sdk/react-native/integrations/mac-catalyst> | ||
|
||
- :doc:`Build using Mac Catalyst </sdk/react-native/integrations/mac-catalyst>` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.. _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 for building your {+service+} application when using `Mac Catalyst <https://developer.apple.com/mac-catalyst/>`_. | ||
|
||
.. note:: | ||
|
||
Version 10.6.0 and above of the {+service+} React Native SDK supports Mac Catalyst. | ||
|
||
|
||
.. seealso:: | ||
|
||
:ref:`react-native-install` | ||
|
||
Procedure | ||
--------- | ||
|
||
.. include:: /includes/steps/mac-catalyst.rst |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to make clear, this step should go away in the next React Native release. Here is the relevant PR facebook/react-native#31062
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So maybe we could already cover our bases by saying do this step for RN < v0.65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍 added some text in a few spots saying that this is for RN v 0.64 and below, and that you don't need it for RN v 0.65 and above.