Esta página detalla los pasos necesarios para crear su aplicación Realm al usar Catalizador de Maccon React Native versión,0 64 y anteriores.
Nota
Version 10.6.0 and above of the Realm React Native SDK supports Mac Catalyst.
Importante
Version 0.65 and above of React Native do not require these additional steps to build using Mac Catalyst.
Procedimiento
Actualice la configuración de la fase de compilación
Antes de poder usar Mac Catalyst en su aplicación React Native, debe especificar el nombre de la plataforma. Haga clic en Build Phases En XCode, y dentro de la pestaña Bundle React Native code and images, agregue lo siguiente para especificar "ios" como el nombre de la plataforma.
export PLATFORM_NAME=ios
Actualiza tu Podfile
Nota
This is a temporary step that will not be necessary when the following Cocoapods issue is solved: [Catalyst] Podspec Resource Bundle requires a development team
Currently, there is a 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:
post_install do |installer| react_native_post_install(installer) end
And copy the following lines where your previous post-install script was:
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
Activar y probar Catalyst en su proyecto
To test out Catalyst in your project, activate Mac in the general tab of your XCode project workspace. To do this, click Mac in the Deployment Info section. Select "Scale Interface to Match iPad". This makes "My Mac" selectable, allowing you to run your application on your Mac.