Code Signing
Code signing is necessary to distribute your Android, IOS, MacOS and Windows apps. This could be a tedious process so we have tried to simplify the process by bringing all the resources in one place for ease of access.
Code signing on IOS:
Open the
.xcworkspacefile located in<PRODUCT_ID>/iosfolder using XCode.Register for an Apple developer account if you don't have one yet.
Select your project in the Xcode Project Navigator, then select your main target (it should share the same name as your project). Look for the "General" tab. Go to "Signing" and make sure your Apple developer account or team is selected under the Team dropdown. Do the same for the tests target (it ends with Tests, and is below your main target).
Repeat this step for the Tests target in your project

Original guide : https://reactnative.dev/docs/running-on-device#2-configure-code-signing
Code signing on Android:
- This awesome guide walks you through how to sign code for Android
Code signing on MacOS:
Register for an Apple developer account if you don't have one yet.
Generate an application specific password from Apple ID account page (Read : https://support.apple.com/en-gb/HT204397)



Execute
security add-generic-password -a "<APPLE ID HERE>" -w "<APP SPECIFIC PASSWORD HERE>" -s "AC_PASSWORD"(Replace APPLE ID HERE and APP SPECIFIC PASSWORD HERE with your Apple ID and app-specific password generated above. Note that AC_PASSWORD is a static identifier and should NOT be replaced)Open
XCode > preferencesOpen accounts tab
Sign in to XCode with the developer account if not done already
Click manage certificates

Create a new certificate of the type “Developer ID Application”

Execute
security find-identity -v -p codesigningand copy the correct hash corresponding to “Developer ID Application” into your clipboardExecute
export CSC_NAME="<Your copied certificate hash>"We can now continue the build process!
Code signing on Windows:
Buy a code signing certificate from any CA (certifying authority). A list of these CAs can be found at Microsoft docs center
Set the following environment variables: (how to set environment variables in windows?)
CSC_LINKas the absolute path of the .pfx or .p12 certificateCSC_KEY_PASSWORDThe password to decrypt the certificate given inCSC_LINK.
We can now continue the build process!