Skip to main content

iOS Setup Guide

This page covers the iOS-specific parts of a bare React Native SrcPush integration.

For the full flow, start with React Native SDK Setup.

Files to update

  • ios/Podfile
  • ios/<AppTarget>/AppDelegate.mm or ios/<AppTarget>/AppDelegate.m
  • ios/<AppTarget>/Info.plist

1. Add the pod

Open ios/Podfile and add:

pod 'CodePush', :path => '../node_modules/@srcpush/react-native-code-push'

Then install pods:

cd ios && pod install

2. Update AppDelegate

Import the SrcPush header:

#import <CodePush/CodePush.h>

Return the React Native dev bundle in debug and the SrcPush bundle in release:

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [CodePush bundleURL];
#endif
}

If your app already customizes sourceURLForBridge, preserve the existing logic and only replace the release bundle location.

3. Add placeholders to Info.plist

Use placeholders instead of real deployment values:

<key>CodePushDeploymentKey</key>
<string>YOUR_IOS_DEPLOYMENT_KEY</string>
<key>CodePushServerURL</key>
<string>https://api.srcpush.com</string>
<key>CodePushPublicKey</key>
<string>YOUR_PUBLIC_KEY</string>

CodePushServerURL and CodePushPublicKey are optional unless your backend configuration requires them.

4. Keep secrets out of git

Do not commit:

  • real deployment keys
  • private signing keys
  • access keys
  • environment-specific managed config

If you need tracked placeholders locally or in CI, inject real values before releasing.

Release note

For iOS release commands, prefer explicit scripts such as:

{
"scripts": {
"srcpush:ios:staging": "srcpush release-react YOUR_APP_NAME_IOS ios -d Staging --privateKeyPath ./keys/private.pem --plistFile ./ios/YOUR_APP/Info.plist --useHermes",
"srcpush:ios:prod": "srcpush release-react YOUR_APP_NAME_IOS ios -d Production --privateKeyPath ./keys/private.pem --plistFile ./ios/YOUR_APP/Info.plist --useHermes"
}
}

Next steps