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
strictmode 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:
-
Monitor Error Rates
- Check for
PINS_MISMATCHerrors - Monitor
DOMAIN_NOT_REGISTEREDoccurrences - Track setup failures
- Check for
-
Test Live App
- Download from App Store / Play Store
- Test on multiple devices
- Verify all API calls work
-
Check Analytics
- Monitor TrustPin-related events
- Track certificate validation success rates
- Review error logs
Rollback Plan
If issues occur:
-
Identify Issue
- Check error logs
- Review recent certificate changes
- Verify domain configurations
-
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
- Always use strict mode in production
- Set log level to error or none
- Test with TestFlight / Internal Testing first
- Monitor error rates closely after release
- Keep credentials in secrets management
- Document deployment process
- Have rollback plan ready
Security
- Never commit credentials to source control
- Use environment variables in CI/CD
- Rotate credentials periodically
- Monitor pin validation failures
- Set up alerts for security events
Performance
- Cache is automatic (10-minute TTL)
- Initialize early in app lifecycle
- Handle failures gracefully
- 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?
- 📧 Email: support@trustpin.cloud
- 💬 Documentation: docs.trustpin.cloud
- 🎯 Dashboard: app.trustpin.cloud
- 🚨 Status Page: status.trustpin.cloud