Skip to Content
Getting StartedDeployment

Deployment

Deploy your TrustPin-enabled application to production with confidence.

Pre-Deployment Checklist

Before deploying to production, verify:

  • SDK Integrated: TrustPin SDK is properly integrated
  • Strict Mode: Using strict mode for production
  • Credentials Secure: Using environment variables, not hardcoded
  • All Domains Configured: All API domains are registered and pinned
  • Certificates Valid: All certificates are current and not expiring soon
  • Tested in Staging: Full testing completed in staging environment
  • Logging Configured: Production log level set (error or none)
  • Monitoring Ready: Error tracking and monitoring configured

For platform-specific deployment instructions, see:


Post-Deployment

Verification Steps

After deployment, verify:

  1. Monitor Error Rates

    • Check for PINS_MISMATCH errors
    • Monitor DOMAIN_NOT_REGISTERED occurrences
    • Track setup failures
  2. Test Live App

    • Download from App Store / Play Store
    • Test on multiple devices
    • Verify all API calls work
  3. Check Analytics

    • Monitor TrustPin-related events
    • Track certificate validation success rates
    • Review error logs

Rollback Plan

If issues occur:

  1. Identify Issue

    • Check error logs
    • Review recent certificate changes
    • Verify domain configurations
  2. Quick Fix Options

    • Update pins in dashboard (no app release needed)
    • Disable specific domain pins (no app release needed)
    • Switch to permissive mode temporarily (requires app update)

Certificate Rotation

Planning Certificate Updates

At least 15 minutes before expiration

  • Upload new certificate to TrustPin dashboard
  • Both old and new pins are active

Zero-Downtime Rotation

TrustPin supports multiple pins per domain:

Domain: api.example.com Pins: - SHA-256: abc123... (current, expires 2026-03-01) - SHA-256: def456... (new, expires 2027-03-01)

This allows seamless rotation without app updates.


Best Practices

Production Deployment

  1. Always use strict mode in production
  2. Set log level to error or none
  3. Test with TestFlight / Internal Testing first
  4. Monitor error rates closely after release
  5. Keep credentials in secrets management
  6. Document deployment process
  7. Have rollback plan ready

Security

  1. Never commit credentials to source control
  2. Use environment variables in CI/CD
  3. Rotate credentials periodically
  4. Monitor pin validation failures
  5. Set up alerts for security events

Performance

  1. Cache is automatic (10-minute TTL)
  2. Initialize early in app lifecycle
  3. Handle failures gracefully
  4. Don’t block app launch on TrustPin setup

Troubleshooting Deployment

High Error Rate After Release

Issue: Increased PINS_MISMATCH errors

Solutions:

  • Verify certificates in dashboard are current
  • Check if certificate was recently rotated
  • Ensure all domains are configured
  • Review error logs for specific domains

Users Can’t Connect

Issue: Network requests failing for all users

Solutions:

  • Verify TrustPin CDN is accessible
  • Check dashboard for service status
  • Review certificate configurations

Build Failures in CI/CD

Issue: Build fails in continuous integration

Solutions:

  • Verify environment variables are set in CI
  • Check ProGuard/R8 rules
  • Ensure dependencies are properly resolved
  • Review CI logs for specific errors

Next Steps


Support

Need help with deployment?