Thank you for your interest in contributing! We love your input and appreciate your efforts to make OpenIAP better.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
swift test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone your fork
git clone https://github.com/YOUR_USERNAME/openiap-apple.git
cd openiap-apple
# Open in Xcode
open Package.swift
# Run tests
swift test- Follow Swift API Design Guidelines
- Use meaningful variable and function names
- Keep functions small and focused
- Add comments only when necessary
- Acronyms: Use Pascal case when at beginning/middle (
IapModule,OpenIapTests) - Acronyms as suffix: Use all caps (
ProductIAP,ManagerIOS) - See CLAUDE.md for detailed naming rules
- Prefix all public model types with
OpenIap.- Examples:
OpenIapProduct,OpenIapPurchase,OpenIapProductRequest,OpenIapRequestPurchaseProps,OpenIapPurchaseOptions,OpenIapReceiptValidationProps,OpenIapReceiptValidationResult,OpenIapActiveSubscription,OpenIapPurchaseState,OpenIapPurchaseOffer,OpenIapProductType,OpenIapProductTypeIOS.
- Examples:
- Private/internal helper types do not need the prefix.
- When renaming existing types, add a public
typealiasfrom the old name to the new name to preserve source compatibility, then migrate usages incrementally.
All new features must include tests:
func testYourFeature() async throws {
// Arrange
let module = IapModule.shared
// Act
let result = try await module.yourMethod()
// Assert
XCTAssertEqual(result, expectedValue)
}- Write clear PR titles and descriptions
- Include tests for new features
- Update documentation if needed
- Keep changes focused and small
- Mix unrelated changes in one PR
- Break existing tests
- Change code style without discussion
- Include commented-out code
Keep them clear and concise:
Add purchase error recoveryFix subscription status checkUpdate StoreKit 2 integrationRefactor transaction handling
When your PR is merged, maintainers will handle the release:
-
Version Update: We use semantic versioning (major.minor.patch)
./scripts/bump-version.sh patch # for bug fixes ./scripts/bump-version.sh minor # for new features ./scripts/bump-version.sh major # for breaking changes
-
Automatic Deployment: Creating a GitHub release triggers:
- Swift Package Manager update (immediate)
- CocoaPods deployment (via
pod trunk push)
-
Availability:
- Swift Package: Available immediately after release
- CocoaPods: Available within ~10 minutes via
pod update
Contributors don't need to worry about deployment - just focus on making great contributions!
Feel free to:
- Open an issue for bugs or features
- Start a discussion for questions
- Tag @hyodotdev for urgent matters
By contributing, you agree that your contributions will be licensed under the MIT License.