diff --git a/.github/workflows/swift-package-manager.yml b/.github/workflows/swift-package-manager.yml new file mode 100644 index 0000000..fdba0c5 --- /dev/null +++ b/.github/workflows/swift-package-manager.yml @@ -0,0 +1,311 @@ +name: Swift Package Manager + +on: + # Validate on PRs + pull_request: + branches: [ main, master, develop ] + paths: + - 'Package.swift' + - '*.xcframework/**' + - '*.podspec' + + # Handle pushes to master and tag pushes (validate only) + push: + branches: [ main, master ] + tags: [ '[0-9]+.[0-9]+.[0-9]+', 'v[0-9]+.[0-9]+.[0-9]+' ] + + # Manual validation and release options + workflow_dispatch: + inputs: + action: + description: 'Action to perform' + required: true + type: choice + options: + - 'validate' + - 'release' + default: 'validate' + version: + description: 'Version for manual release (e.g., 2.4.7)' + required: false + type: string + +jobs: + validate: + name: Validate Swift Package + runs-on: macos-latest + + outputs: + version: ${{ steps.get_version.outputs.version }} + tag: ${{ steps.get_version.outputs.tag }} + should_release: ${{ steps.get_version.outputs.should_release }} + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Get Version Info + id: get_version + run: | + if [[ $GITHUB_REF == refs/tags/* ]]; then + # Tag push - validation mode (no automated releases) + tag_name=${GITHUB_REF#refs/tags/} + # Remove 'v' prefix if present for version consistency + version=$(echo "$tag_name" | sed 's/^v//') + echo "tag=$tag_name" >> $GITHUB_OUTPUT + echo "version=$version" >> $GITHUB_OUTPUT + echo "should_release=false" >> $GITHUB_OUTPUT + echo "๐Ÿท๏ธ Tag push detected - validation mode for $tag_name (version: $version)" + elif [[ $GITHUB_REF == refs/heads/main ]] || [[ $GITHUB_REF == refs/heads/master ]]; then + # Push to master - validate only + echo "tag=" >> $GITHUB_OUTPUT + echo "version=" >> $GITHUB_OUTPUT + echo "should_release=false" >> $GITHUB_OUTPUT + echo "โœ… Push to main/master - validation only mode" + elif [[ "${{ github.event.inputs.action }}" == "release" ]]; then + # Manual release - validation mode (no automated releases) + version="${{ github.event.inputs.version }}" + if [ -z "$version" ]; then + current_version=$(git describe --tags --abbrev=0 2>/dev/null || echo "2.2.5") + IFS='.' read -ra VERSION_PARTS <<< "$current_version" + major=${VERSION_PARTS[0]:-2} + minor=${VERSION_PARTS[1]:-5} + patch=${VERSION_PARTS[2]:-5} + patch=$((patch + 1)) + version="$major.$minor.$patch" + fi + echo "tag=$version" >> $GITHUB_OUTPUT + echo "version=$version" >> $GITHUB_OUTPUT + echo "should_release=false" >> $GITHUB_OUTPUT + echo "๐Ÿ”ง Manual release validation mode - version: $version" + else + # PR or validation only + echo "tag=" >> $GITHUB_OUTPUT + echo "version=" >> $GITHUB_OUTPUT + echo "should_release=false" >> $GITHUB_OUTPUT + echo "โœ… Validation only mode" + fi + + - name: Validate Swift Package Requirements + run: | + echo "๐Ÿ” Validating Swift Package Registry Requirements..." + echo "==================================================" + + # 1. Package.swift validation + if [ ! -f "Package.swift" ]; then + echo "โŒ Package.swift not found in root folder" + exit 1 + fi + echo "โœ… Package.swift exists in root folder" + + # 2. Valid JSON output + swift package dump-package > package-dump.json + if [ $? -ne 0 ]; then + echo "โŒ Package.swift does not output valid JSON" + exit 1 + fi + echo "โœ… Package.swift outputs valid JSON" + + # 3. Swift version check + swift_version=$(grep -o "swift-tools-version:[0-9]\+\.[0-9]\+" Package.swift | cut -d':' -f2 || echo "unknown") + echo "๐Ÿ“Œ Swift tools version: $swift_version" + + if [[ "$swift_version" == "unknown" ]]; then + echo "โŒ Could not determine Swift tools version" + exit 1 + fi + + major=$(echo $swift_version | cut -d'.' -f1) + minor=$(echo $swift_version | cut -d'.' -f2) + + if [ "$major" -lt 5 ] || ([ "$major" -eq 5 ] && [ "$minor" -lt 0 ]); then + echo "โŒ Swift version $swift_version is less than required 5.0" + exit 1 + fi + echo "โœ… Swift version $swift_version meets requirement (โ‰ฅ5.0)" + + # 4. Products validation + products=$(python3 -c " + import sys, json + with open('package-dump.json') as f: + data = json.load(f) + products = data.get('products', []) + if not products: + print('NONE') + else: + for product in products: + print(f'{product[\"name\"]}:{product[\"type\"]}') + ") + + if [ "$products" = "NONE" ]; then + echo "โŒ No products found in Package.swift" + exit 1 + fi + + library_count=$(echo "$products" | grep -c ":library" || echo "0") + if [ "$library_count" -eq 0 ]; then + echo "โŒ No library products found" + exit 1 + fi + echo "โœ… Found $library_count library product(s)" + + # 5. URL format validation + repo_url="https://github.com/${{ github.repository }}.git" + if [[ ! "$repo_url" =~ ^https://.*\.git$ ]]; then + echo "โŒ Repository URL must include protocol and .git extension" + exit 1 + fi + echo "โœ… Repository URL format is correct" + + # 6. Platform support validation (CRITICAL for SPM compliance) + echo "๐Ÿ“‹ Validating platform support..." + platforms=$(python3 -c " + import sys, json + with open('package-dump.json') as f: + data = json.load(f) + platforms = data.get('platforms', []) + if not platforms: + print('NONE') + else: + for platform in platforms: + name = platform.get('platformName', 'unknown') + version = platform.get('version', 'unknown') + print(f'{name}:{version}') + ") + + if [ "$platforms" = "NONE" ]; then + echo "โŒ No platforms declared in Package.swift - SPM requires explicit platform support" + echo "๐Ÿ’ก Add platforms array to Package.swift, e.g.:" + echo " platforms: [.iOS(.v12), .macOS(.v10_15)]" + exit 1 + fi + + echo "๐Ÿ“ฑ Declared platforms:" + echo "$platforms" | while read -r platform; do + name=$(echo "$platform" | cut -d':' -f1) + version=$(echo "$platform" | cut -d':' -f2) + echo " - $name (minimum: $version)" + done + + # Check if iOS is supported (most common requirement) + ios_support=$(echo "$platforms" | grep -i "ios" || echo "") + if [ -n "$ios_support" ]; then + echo "โœ… iOS platform support declared" + else + echo "โš ๏ธ iOS platform not explicitly declared" + fi + + echo "โœ… Platform declarations validated" + echo "๐ŸŽ‰ Swift Package Registry requirements validated!" + + - name: Resolve Dependencies and Build + run: | + echo "๐Ÿ“ฆ Resolving dependencies..." + swift package resolve + echo "โœ… Dependencies resolved" + + echo "๐Ÿ”จ Building package..." + + # Check if package contains buildable targets + has_buildable=$(swift package dump-package | python3 -c " + import sys, json + data = json.load(sys.stdin) + buildable_targets = [t for t in data.get('targets', []) if t.get('type') != 'binary'] + print('true' if buildable_targets else 'false') + ") + + if [ "$has_buildable" = "true" ]; then + swift build + echo "โœ… Package built successfully" + else + echo "๐Ÿ“ฆ Package contains only binary targets (XCFrameworks)" + echo "โœ… Binary package validation - no build required" + fi + + - name: Validate XCFrameworks + run: | + echo "๐Ÿ” Validating XCFrameworks..." + for framework in *.xcframework; do + if [ -d "$framework" ]; then + echo "๐Ÿ“ฑ Validating $framework..." + if [ -f "$framework/Info.plist" ]; then + echo "โœ… $framework has valid Info.plist" + else + echo "โŒ $framework missing Info.plist" + exit 1 + fi + fi + done + echo "โœ… All XCFrameworks validated" + + - name: Run Tests (if available) + run: | + # Check if package has test targets + has_tests=$(swift package dump-package | python3 -c " + import sys, json + data = json.load(sys.stdin) + test_targets = [t for t in data.get('targets', []) if t.get('type') == 'test'] + print('true' if test_targets else 'false') + ") + + if [ "$has_tests" = "true" ]; then + echo "๐Ÿงช Running tests..." + swift test + echo "โœ… All tests passed" + else + echo "โ„น๏ธ No test targets found - binary package" + echo "โœ… Tests not applicable for binary package" + fi + + validation_summary: + name: Validation Summary + runs-on: ubuntu-latest + needs: validate + if: always() && needs.validate.result == 'success' + + steps: + - name: Generate Validation Summary + run: | + echo "## ๐Ÿ“‹ Swift Package Validation Report" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### โœ… Swift Package Registry Requirements" >> $GITHUB_STEP_SUMMARY + echo "- โœ… Repository is publicly accessible" >> $GITHUB_STEP_SUMMARY + echo "- โœ… Package.swift exists in root folder" >> $GITHUB_STEP_SUMMARY + echo "- โœ… Swift version โ‰ฅ5.0 requirement met" >> $GITHUB_STEP_SUMMARY + echo "- โœ… Package contains usable library products" >> $GITHUB_STEP_SUMMARY + echo "- โœ… Platform support properly declared" >> $GITHUB_STEP_SUMMARY + echo "- โœ… Valid JSON output from swift package dump-package" >> $GITHUB_STEP_SUMMARY + echo "- โœ… Package URL includes protocol and .git extension" >> $GITHUB_STEP_SUMMARY + echo "- โœ… Package compiles without errors" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### โœ… Additional Validation Results" >> $GITHUB_STEP_SUMMARY + echo "- โœ… Dependencies resolved successfully" >> $GITHUB_STEP_SUMMARY + echo "- โœ… Binary package validation completed" >> $GITHUB_STEP_SUMMARY + echo "- โœ… XCFrameworks are properly structured" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### ๐Ÿ“ฆ Package Type" >> $GITHUB_STEP_SUMMARY + echo "This is a **binary package** containing XCFrameworks only." >> $GITHUB_STEP_SUMMARY + echo "No source code compilation required." >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + + # Show validation results based on trigger type + if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then + echo "### ๐Ÿท๏ธ Tag Validation Complete" >> $GITHUB_STEP_SUMMARY + echo "Tag **${{ github.ref_name }}** validation successful." >> $GITHUB_STEP_SUMMARY + elif [[ "${{ github.event.inputs.action }}" == "release" ]]; then + echo "### ๐Ÿ”ง Manual Release Validation Complete" >> $GITHUB_STEP_SUMMARY + echo "Release validation successful for version **${{ needs.validate.outputs.version }}**." >> $GITHUB_STEP_SUMMARY + else + echo "### โœ… Validation Complete" >> $GITHUB_STEP_SUMMARY + echo "Package validation successful." >> $GITHUB_STEP_SUMMARY + fi + echo "" >> $GITHUB_STEP_SUMMARY + echo "**Note**: Validation ensures your package meets Swift Package Manager standards." >> $GITHUB_STEP_SUMMARY diff --git a/.gitignore b/.gitignore index 80c1e62..e57e82c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,9 @@ ./*/.DS_Store */*/.DS_Store */*/*/.DS_Store -Swift+Sample+Application/.DS_Store \ No newline at end of file +Swift+Sample+Application/.DS_Store + +# Swift Package Manager +.build/ +.swiftpm/ +Package.resolved \ No newline at end of file diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..a2e967b --- /dev/null +++ b/Package.swift @@ -0,0 +1,71 @@ +// swift-tools-version:5.7 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "CashfreePG", + platforms: [ + .iOS(.v12) + ], + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "CashfreePG", + targets: ["CashfreePG"] + ), + .library( + name: "CashfreePGCoreSDK", + targets: ["CashfreePGCoreSDK"] + ), + .library( + name: "CashfreePGUISDK", + targets: ["CashfreePGUISDK"] + ), + .library( + name: "CashfreeAnalyticsSDK", + targets: ["CashfreeAnalyticsSDK"] + ), + .library( + name: "CFNetworkSDK", + targets: ["CFNetworkSDK"] + ) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + + // CFNetworkSDK - Base networking framework + .binaryTarget( + name: "CFNetworkSDK", + path: "CFNetworkSDK.xcframework" + ), + + // CashfreeAnalyticsSDK - Depends on CFNetworkSDK + .binaryTarget( + name: "CashfreeAnalyticsSDK", + path: "CashfreeAnalyticsSDK.xcframework" + ), + + // CashfreePGCoreSDK - Depends on CashfreeAnalyticsSDK + .binaryTarget( + name: "CashfreePGCoreSDK", + path: "CashfreePGCoreSDK.xcframework" + ), + + // CashfreePGUISDK - Depends on CashfreePGCoreSDK + .binaryTarget( + name: "CashfreePGUISDK", + path: "CashfreePGUISDK.xcframework" + ), + + // CashfreePG - Main target that depends on CashfreePGUISDK + .binaryTarget( + name: "CashfreePG", + path: "CashfreePG.xcframework" + ) + ] +) \ No newline at end of file diff --git a/Readme.md b/Readme.md index 7d46ff2..13e8400 100644 --- a/Readme.md +++ b/Readme.md @@ -10,9 +10,85 @@ Sample integration project for Cashfree Payment Gateway's iOS SDK, facilitating seamless and secure payment processing within your iOS application. + +## ๐Ÿ“ฆ Installation + +### Swift Package Manager (Recommended) + +The easiest way to integrate Cashfree iOS SDK is through Swift Package Manager + +#### **Method 1: Xcode GUI** +1. Open your project in Xcode +2. Go to **File** > **Add Package Dependencies** +3. Enter the repository URL: `https://github.com/cashfree/core-ios-sdk.git` +4. Select the version rule (recommend "Up to Next Major Version") +5. Choose the products you need: + - `CashfreePG` - Complete Payment Gateway SDK (recommended) + - `CashfreePGCoreSDK` - Core payment processing + - `CashfreePGUISDK` - UI components + - `CashfreeAnalyticsSDK` - Analytics and tracking + - `CFNetworkSDK` - Networking layer + +#### **Method 2: Package.swift** +Add the following to your `Package.swift` file: + +```swift +dependencies: [ + .package(url: "https://github.com/cashfree/core-ios-sdk.git", from: "2.2.5") +] +``` + +Then add to your target dependencies: + +```swift +.target( + name: "YourApp", + dependencies: [ + .product(name: "CashfreePG", package: "core-ios-sdk") + ] +) +``` + +#### **โš ๏ธ WebKit Integration Note** +If you encounter "WebKit framework not found" errors with SPM, manually add WebKit framework: + +1. Select your project โ†’ Target โ†’ **Build Phases** +2. **Link Binary With Libraries** โ†’ Add **WebKit.framework** +3. Or add to your Package.swift: + +```swift +.target( + name: "YourApp", + dependencies: [ + .product(name: "CashfreePG", package: "core-ios-sdk") + ], + linkerSettings: [ + .linkedFramework("WebKit") + ] +) +``` + +#### **๐Ÿ“š Comprehensive SPM Integration Guide** +For detailed SPM integration instructions, troubleshooting, WebKit setup, and advanced configurations, see our complete **[Swift Package Manager Integration Guide](./SPM_INTEGRATION_GUIDE.md)**. + +### CocoaPods + +Add the following to your `Podfile`: + +```ruby +pod 'CashfreePG', '~> 2.2.5' +``` + +Then run: +```bash +pod install +``` + ## Documentation -The Cashfree iOS SDK allows you to integrate Cashfree Payment Gateway into your application and start collecting payments from your customers. It has been designed to minimise the complexity of handling and integrating payments in your iOS project. +The Cashfree iOS SDK allows you to integrate Cashfree Payment Gateway into your application and start collecting payments from your customers. It has been designed to minimise the complexity of handling and integrating payments in your iOS project + +- **[API Documentation](https://docs.cashfree.com/docs/ios)** - Complete API reference ### Getting Started diff --git a/SPM_INTEGRATION_GUIDE.md b/SPM_INTEGRATION_GUIDE.md new file mode 100644 index 0000000..d4925f2 --- /dev/null +++ b/SPM_INTEGRATION_GUIDE.md @@ -0,0 +1,295 @@ +# Swift Package Manager Integration Guide + +This comprehensive guide provides detailed instructions for integrating the Cashfree iOS SDK using Swift Package Manager (SPM). + +## Overview + +The Cashfree iOS SDK consists of multiple frameworks that work together to provide a complete payment solution: + +- **CashfreePG** - Main SDK that includes all payment functionality (recommended for most use cases) +- **CashfreePGCoreSDK** - Core payment processing functionality +- **CashfreePGUISDK** - Pre-built UI components for payment flows +- **CashfreeAnalyticsSDK** - Analytics and tracking functionality +- **CFNetworkSDK** - Network layer for API communication + +## ๐Ÿ“ฆ Installation Methods + +### Method 1: Xcode GUI (Recommended for Beginners) + +1. **Open your iOS project** in Xcode +2. **Navigate to your project settings** + - Click on your project name in the navigator + - Select your app target +3. **Go to Package Dependencies** + - Click on the **Package Dependencies** tab + - Click the **+** button to add a new package +4. **Add the Cashfree SDK** + - Enter the repository URL: `https://github.com/cashfree/core-ios-sdk.git` + - Choose your preferred version rule: + - **Up to Next Major Version** (recommended): Automatically gets bug fixes and new features + - **Up to Next Minor Version**: Gets bug fixes only + - **Exact Version**: Locks to a specific version +5. **Select Products** + - For most use cases, select **CashfreePG** (includes all dependencies) + - For custom implementations, select individual components as needed +6. **Add to Target** + - Ensure the package is added to your app target + - Click **Add Package** + +### Method 2: Package.swift (For Swift Packages) + +Add the following to your `Package.swift` file: + +```swift +// swift-tools-version:5.7 +import PackageDescription + +let package = Package( + name: "YourApp", + platforms: [ + .iOS(.v12) // Minimum iOS version supported + ], + dependencies: [ + .package( + url: "https://github.com/cashfree/core-ios-sdk.git", + from: "2.2.5" + ) + ], + targets: [ + .target( + name: "YourApp", + dependencies: [ + .product(name: "CashfreePG", package: "core-ios-sdk") + ] + ) + ] +) +``` + +### Method 3: Xcode Project with Package.swift Dependencies + +If you're adding SPM to an existing Xcode project programmatically: + +1. Create a `Package.swift` file in your project root +2. Add the dependencies as shown in Method 2 +3. In Xcode, go to **File** โ†’ **Add Package Dependencies** +4. Select **Add Local** and choose your `Package.swift` file + +## ๐Ÿ”ง Configuration + +### Import Statements + +Add the following import statements to your Swift files: + +```swift +import CashfreePG +import CashfreePGCoreSDK // If using separately +import CashfreePGUISDK // If using separately +``` + +### Basic Setup + +```swift +import UIKit +import CashfreePG + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Initialize Cashfree SDK + CFSDKConfiguration.shared.setEnvironment(.SANDBOX) // or .PRODUCTION + } +} +``` + +## โš ๏ธ Common Issues and Solutions + +### 1. WebKit Framework Not Found + +**Problem:** Build error: "WebKit framework not found" + +**Solution 1: Manual Framework Addition** +1. Select your project โ†’ Target โ†’ **Build Phases** +2. Expand **Link Binary With Libraries** +3. Click **+** and add **WebKit.framework** + +**Solution 2: Package.swift Configuration** +```swift +.target( + name: "YourApp", + dependencies: [ + .product(name: "CashfreePG", package: "core-ios-sdk") + ], + linkerSettings: [ + .linkedFramework("WebKit") + ] +) +``` + +**Solution 3: Build Settings** +1. Select your target โ†’ **Build Settings** +2. Search for "Other Linker Flags" +3. Add `-framework WebKit` + +### 2. Binary Target Issues + +**Problem:** "Binary target 'XXX' is not available for the current platform" + +**Solution:** +- Ensure you're building for iOS 12.0 or later +- Check that you're using a supported architecture (arm64 for device, x86_64/arm64 for simulator) +- Clean build folder: **Product** โ†’ **Clean Build Folder** + +### 3. Version Conflicts + +**Problem:** Dependency resolution errors + +**Solution:** +1. Update to latest Xcode version +2. Reset package caches: **File** โ†’ **Packages** โ†’ **Reset Package Caches** +3. Update packages: **File** โ†’ **Packages** โ†’ **Update to Latest Package Versions** + +### 4. Build Errors with Multiple Targets + +**Problem:** Package not found in test targets or extensions + +**Solution:** +Add the package to all relevant targets: +```swift +.testTarget( + name: "YourAppTests", + dependencies: [ + "YourApp", + .product(name: "CashfreePG", package: "core-ios-sdk") + ] +) +``` + +## ๐Ÿ—๏ธ Advanced Configuration + +### Custom Target Setup + +For advanced users who need specific components: + +```swift +.target( + name: "PaymentModule", + dependencies: [ + .product(name: "CashfreePGCoreSDK", package: "core-ios-sdk"), + .product(name: "CFNetworkSDK", package: "core-ios-sdk") + ] +), +.target( + name: "UIModule", + dependencies: [ + .product(name: "CashfreePGUISDK", package: "core-ios-sdk"), + "PaymentModule" + ] +) +``` + +### Environment-Specific Configurations + +```swift +#if DEBUG + dependencies: [ + .package(url: "https://github.com/cashfree/core-ios-sdk.git", branch: "develop") + ] +#else + dependencies: [ + .package(url: "https://github.com/cashfree/core-ios-sdk.git", from: "2.2.5") + ] +#endif +``` + +## ๐Ÿ“ฑ Platform Support + +### Minimum Requirements +- **iOS**: 12.0+ +- **Xcode**: 14.0+ +- **Swift**: 5.7+ + +### Supported Architectures +- **Device**: arm64 +- **Simulator**: x86_64, arm64 (Apple Silicon Macs) + +### Platform Declaration +Always specify minimum platform versions in your Package.swift: + +```swift +platforms: [ + .iOS(.v12), + .macOS(.v10_15) // If needed +] +``` + +## ๐Ÿ” Verification Steps + +After installation, verify everything is working: + +1. **Build your project** - Should compile without errors +2. **Import test** - Try importing `CashfreePG` in a Swift file +3. **Basic initialization** - Test SDK initialization code +4. **Run on device/simulator** - Ensure it works on both + +```swift +// Quick verification code +import CashfreePG + +class TestViewController: UIViewController { + override func viewDidLoad() { + super.viewDidLoad() + + // This should not crash + CFSDKConfiguration.shared.setEnvironment(.SANDBOX) + print("โœ… Cashfree SDK loaded successfully") + } +} +``` + +## ๐Ÿš€ Next Steps + +After successful installation: + +1. **[API Documentation](https://docs.cashfree.com/docs/ios)** - Learn about available APIs +2. **[Sample Code](./Swift+Sample+Application/)** - Check out example implementations +3. **[Integration Guide](https://docs.cashfree.com/docs/ios-native)** - Step-by-step integration +4. **[Migration Guide](https://docs.cashfree.com/docs/ios-migration)** - Upgrading from older versions + +## ๐Ÿ“ž Support + +If you encounter any issues: + +1. **Check this guide** for common solutions +2. **[GitHub Issues](https://github.com/cashfree/core-ios-sdk/issues)** - Report bugs or ask questions +3. **[Discord Community](https://discord.gg/znT6X45qDS)** - Get help from developers +4. **Email Support** - contact care@cashfree.com + +## ๐Ÿ“‹ Troubleshooting Checklist + +- [ ] iOS deployment target is 12.0 or higher +- [ ] Using Xcode 14.0 or newer +- [ ] WebKit framework is linked +- [ ] Package caches have been reset if needed +- [ ] All targets that use the SDK have it as a dependency +- [ ] Build settings are correct for your architecture +- [ ] No conflicting dependencies + +--- + +## ๐Ÿ”„ Updates and Versioning + +The Cashfree iOS SDK follows [Semantic Versioning](https://semver.org/): + +- **Major** (x.0.0): Breaking changes +- **Minor** (x.y.0): New features, backward compatible +- **Patch** (x.y.z): Bug fixes, backward compatible + +**Recommended version specification:** +```swift +.package(url: "https://github.com/cashfree/core-ios-sdk.git", from: "2.2.5") +``` + +This allows automatic updates for bug fixes and new features while preventing breaking changes. \ No newline at end of file