IATA BCBP Standard Compliance
Documents which IATA BCBP fields and barcode formats a Swift library implements, including Version 8 gender code support.
What this file does
Documents which IATA BCBP fields and barcode formats a Swift library implements, including Version 8 gender code support.
When to use it
- Verifying your boarding pass parser covers all mandatory and conditional IATA fields
- Checking compliance with IATA Resolution 792 Version 8
- Auditing a library that decodes PDF417, Aztec, QR, or Data Matrix barcodes
- Reviewing known limitations before adopting the library
Assumes this stack
IATA BCBP Standard Compliance
Standard Information
Implementation Guide: IATA Resolution 792 - Bar Coded Boarding Pass (BCBP)
Version: 8 (Effective: June 1, 2020) ✅
Previous Version: Version 7 Implementation Guide
Official Reference: IATA Common Use Standards
Compliance Status
✅ Fully Implemented
Mandatory Items (60 characters)
- Format Code (1 char) - 'M' or 'S'
- Number of Legs (1 char)
- Passenger Name (20 chars)
- Electronic Ticket Indicator (1 char)
- PNR Code (7 chars)
- From City Airport Code (3 chars)
- To City Airport Code (3 chars)
- Operating Carrier Designator (3 chars)
- Flight Number (5 chars)
- Date of Flight - Julian Date (3 chars)
- Compartment Code (1 char)
- Seat Number (4 chars)
- Check-In Sequence Number (5 chars)
- Passenger Status (1 char)
- Field Size of Variable Size Field (2 chars - hex)
Conditional Items
- Beginning of Version Number (1 char)
- Version Number (1 char)
- Unique Conditional Items Size (2 chars - hex)
- Passenger Description / Gender Code (1 char) - Version 8 compliant with "X" and "U" support
- Source of Check-In (1 char)
- Source of Boarding Pass Issuance (1 char)
- Date of Issue of Boarding Pass (4 chars)
- Document Type (1 char)
- Airline Designator of Boarding Pass Issuer (3 chars)
- Baggage Tag License Plate Numbers (13 chars each, up to 3 tags)
- Airline Numeric Code (3 chars)
- Document Serial Number (10 chars)
- Selectee Indicator (1 char)
- International Document Verification (1 char)
- Marketing Carrier (3 chars)
- Frequent Flyer Airline Designator (3 chars)
- Frequent Flyer Number (16 chars)
- ID/AD Indicator (1 char)
- Free Baggage Allowance (3 chars)
- Fast Track (1 char)
- Airline Individual Use (variable)
Repeated Conditional Items (for additional legs)
- All segment fields properly parsed from conditional section
Security Data
- Beginning of Security Data indicator '>' (1 char)
- Type of Security Data (1 char)
- Length of Security Data (2 chars - hex)
- Security Data (variable length)
✅ Supported Barcode Formats
According to IATA Resolution 792, BCBP can be encoded in:
- PDF417 (most common)
- Aztec
- QR Code
- Data Matrix
Note: This library decodes the ASCII data structure regardless of the barcode symbology used.
📋 Version Information
Important: There are two different "versions" related to BCBP:
-
IATA Implementation Guide Version (Document)
- Current: Version 8 (June 1, 2020) ✅
- Previous: Version 7 (June 1, 2018)
- This is the specification document version
-
Boarding Pass Format Version (Data Field)
- Single character field in the boarding pass data
- Located at the start of conditional items
- Values: "5", "6", "7", etc.
- Indicates conditional items structure version
- Parsed and stored in
BoardingPass.version
🆕 Version 8 Changes (Effective June 1, 2020)
Field 15 - Passenger Description / Gender Code:
- Added "X" = Unspecified gender
- Added "U" = Undisclosed gender
- Existing codes (M, F, 0-9) remain valid
Status: ✅ Fully supported - the library already parses this field correctly
⚠️ Known Limitations
- Field Validation: The parser does not validate field values against IATA code tables (e.g., airport codes, carrier codes)
- Date Conversion: Julian dates are not automatically converted to calendar dates
- Year Rollover: End-of-year date handling (Dec 31 → Jan 1) may need special handling in your application
- Non-Standard Formats: Some airlines may use proprietary variations that don't strictly follow IATA standard
🔧 Recent Updates
- Version 8 Compliance: Updated to IATA Resolution 792 Version 8 (June 2020) - supports new gender codes X and U
- Segment Parsing: Fixed critical bug where subsequent flight segments incorrectly used mandatory parsing instead of conditional
- Loop Bounds: Fixed off-by-one errors in bag tag and segment loops
- Error Handling: Improved error messages for conditional parsing failures
- Documentation: Added comprehensive field documentation and IATA standard references
📚 References
Testing
The library includes test cases for:
- Single-leg boarding passes (M1)
- Multi-leg boarding passes (M2, M3)
- Various airlines and formats
- Security data variations
- Conditional items edge cases
To run tests:
swift test
Version History
- 2.0.2 - CocoaPods naming update
- Renamed CocoaPods pod from BoardingPassKit to BoardingPassParser to avoid conflicts
- Swift Package Manager remains as BoardingPassKit
- No functional changes, packaging update only
- 2.0.1 - Patch release with improved configuration options
- Enhanced data processing with configurable trim options
- Better handling of empty strings and whitespace
- Improved debugging capabilities
- 2.0.0 - Major release with new configuration options
- Added trimLeadingZeroes, trimWhitespace, and emptyStringIsNil configuration options
- Backward compatible with v1.x
- Enhanced data quality and consistency
- 1.2.0 - IATA Resolution 792 Version 8 compliance (June 2020 standard)
- Supports new gender codes "X" (Unspecified) and "U" (Undisclosed)
- Updated documentation and field descriptions
- 1.1.0 - Critical parsing bug fixes, IATA Version 7 compliance verified
- 1.0.0 - Initial IATA BCBP implementation
What's inside
One compliance checklist, one barcode format list, one version comparison, one known limitations section, one version history.
Change this for your project
- Replace
BoardingPassKitwith your own package name if you fork the library - Replace
BoardingPassParserwith your own CocoaPods pod name if you publish - Replace version numbers like
2.0.2with your own release tags
Where it goes
Keep alongside your test suite. Used to define and score model evaluations.
Worth borrowing
- Checklist format for tracking standard compliance across mandatory, conditional, and security fields
- Separating implementation guide version from boarding pass format version to avoid confusion
Related Documents
AI Tools for Developers
Curates a personal reference of AI coding tools, models, and setup instructions for VS Code, Xcode, and Cursor.
Voice AI Leaderboards, Benchmarks, and Evaluation Gaps (Jan 2025 -- Feb 2026)
Surveys 20+ voice AI benchmarks from Jan 2025, Feb 2026, identifies evaluation gaps, and provides leaderboard data for STT, TTS, and end-to-end voice agents.
Evaluating AI Agent Systems: Metrics, Benchmarks, and Quality Assurance (2024-2026)
Surveys 2024-2026 metrics, benchmarks, and monitoring tools for evaluating AI agent systems, with recommendations for a self-improving coding agent.