Skip to content

Conversation

@zerefel
Copy link

@zerefel zerefel commented Nov 22, 2025

Problem

Using --outputDir with --privateKeyPath causes signature verification failures on the client.

Root Cause

The client SDK expects all files under a CodePush/ directory in the update ZIP. Custom outputDir paths like /tmp/CodePush-ios-49556 resulted in files being
zipped as CodePush-ios-49556/main.jsbundle instead of CodePush/main.jsbundle, breaking signature verification.

Solution

  • Automatically append /CodePush to custom outputDir paths to maintain correct ZIP structure
  • Use recursive: true when creating directories to support nested paths

This is a general bug but it also enables features like parallel iOS/Android releases using different output directories while maintaining proper code signing.

Testing

  • Verified with --outputDir /tmp/CodePush-ios-12345 --privateKeyPath .codepush/private.pem
  • Tested with and without outputDor flag
  • Signature verification now succeeds on client
  • ZIP structure correctly contains CodePush/main.jsbundle for both default and custom outputDir

- Ensure custom outputDir always uses /CodePush subdirectory
- Enable recursive directory creation for nested paths

Fixes signature verification failures when using custom outputDir
with privateKeyPath by maintaining correct ZIP structure that
client SDK expects (CodePush/main.jsbundle).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant