Skip to content

Chore/ms 311 sdk merchants support cocoapods podspec#14

Open
vscmaster wants to merge 7 commits intomainfrom
chore/MS-311-SDK-Merchants-Support-cocoapods-podspec
Open

Chore/ms 311 sdk merchants support cocoapods podspec#14
vscmaster wants to merge 7 commits intomainfrom
chore/MS-311-SDK-Merchants-Support-cocoapods-podspec

Conversation

@vscmaster
Copy link
Contributor

No description provided.

@vscmaster vscmaster requested a review from ihorbenko January 2, 2026 16:21
@vscmaster vscmaster force-pushed the chore/MS-311-SDK-Merchants-Support-cocoapods-podspec branch from ea27e48 to 89d5b6a Compare January 2, 2026 16:22
@vscmaster vscmaster force-pushed the chore/MS-311-SDK-Merchants-Support-cocoapods-podspec branch from 89d5b6a to 051c7fe Compare January 5, 2026 11:35
@vscmaster vscmaster force-pushed the chore/MS-311-SDK-Merchants-Support-cocoapods-podspec branch from 6289266 to c79916d Compare January 26, 2026 10:20
@vscmaster vscmaster force-pushed the chore/MS-311-SDK-Merchants-Support-cocoapods-podspec branch from c79916d to f432efc Compare February 11, 2026 15:35
@vscmaster vscmaster force-pushed the chore/MS-311-SDK-Merchants-Support-cocoapods-podspec branch from f432efc to cd40b56 Compare February 11, 2026 15:44
@claude
Copy link

claude bot commented Feb 11, 2026

Code Review

Found 5 issues requiring attention:

1. iOS Deployment Target Violations (CLAUDE.md)

Issue: iOS deployment targets are set below the documented requirement.

CLAUDE.md line 85 explicitly requires:

iOS: iOS 15+, Swift tools 5.5

However, this PR sets:

  • ios/ottu_flutter_checkout.podspec:13s.ios.deployment_target = '14.0'
  • Sample/ios/Podfile:2platform :ios, '14.0'
  • Sample/ios/Runner.xcodeproj/project.pbxproj:435,563,615IPHONEOS_DEPLOYMENT_TARGET = 13.0

Fix: Update all iOS deployment targets to 15.0


2. Undocumented Sentry Dependency (Security Risk)

Issue: New third-party dependency added without security review or documentation.

ios/ottu_flutter_checkout.podspec:21 adds Sentry ~> 8.46.0 which:

  • Did NOT exist in the previous Package.swift
  • Has ZERO usage in the codebase (no import Sentry statements)
  • Is a crash reporting/monitoring SDK that can capture and transmit network traffic, breadcrumbs, user data (potential CHD/apiKey exposure)

CLAUDE.md Section G requires dependency review for critical packages.

Fix: Either remove if unused, or document security review in CLAUDE.md


3. Localization Bug - Bundle.main Will Not Find Strings (Critical)

Issue: ios/Classes/CheckoutPlatformView.swift:120,125,130 changed from Bundle.module (SPM) to Bundle.main, but CocoaPods resource_bundles create a separate .bundle file.

Result: Error dialogs will display raw keys ("failed", "ok") instead of localized messages. Arabic localization will break.

Fix: Use correct resource bundle lookup for CocoaPods resource_bundles. See https://guides.cocoapods.org/syntax/podspec.html#resource_bundles


Summary:

  • 3 CLAUDE.md platform requirement violations (iOS version targets)
  • 1 security/documentation violation (undocumented Sentry dependency)
  • 1 critical localization bug (Bundle.main won't find resource bundle strings)

Please address these issues before merging.

@claude
Copy link

claude bot commented Feb 11, 2026

Code Review

I found 3 issues that need attention:

1. 🐛 Localization will fail with Bundle.main

File: ios/Classes/CheckoutPlatformView.swift (lines 117-132)

The code was changed from Bundle.module (SPM) to Bundle.main (CocoaPods), but this will break localization.

Problem: The podspec uses resource_bundles which creates a separate bundle file (ottu_flutter_checkout_resources.bundle). Bundle.main refers to the host app's bundle, which does NOT contain the plugin's localized strings. NSLocalizedString will fail to find the translations and will display raw key names ("failed", "failed_start_payment", "ok") instead of localized messages to users.

Fix: Locate the resource bundle at runtime:

private func getResourceBundle() -> Bundle? {
    guard let bundleURL = Bundle(for: type(of: self)).url(
        forResource: "ottu_flutter_checkout_resources",
        withExtension: "bundle"
    ) else {
        return nil
    }
    return Bundle(url: bundleURL)
}

private func showSdkError(error: Error) {
    let bundle = getResourceBundle() ?? Bundle.main
    // Use bundle in NSLocalizedString calls
    let title = NSLocalizedString("failed", bundle: bundle, comment: "")
    let message = NSLocalizedString("failed_start_payment", bundle: bundle, comment: "")
    let buttonText = NSLocalizedString("ok", bundle: bundle, comment: "")
    // ... etc
}

See:

{
let title = NSLocalizedString(
"failed",
bundle: Bundle.main,
comment: "title of the dialog"
)
let message = NSLocalizedString(
"failed_start_payment",
bundle: Bundle.main,
comment: "messafe of the dialog"
)
let ok = NSLocalizedString(
"ok",
bundle: Bundle.main,
comment: "button label"
)


2. 📋 CLAUDE.md violation: iOS deployment target in podspec

File: ios/ottu_flutter_checkout.podspec (line 13)

The podspec sets s.ios.deployment_target = '14.0', but CLAUDE.md requires:

iOS: iOS 15+, Swift tools 5.5

The previous SPM implementation correctly enforced iOS 15+ via Package.swift. This should be changed to '15.0' to maintain compliance with documented platform requirements.

See:

s.ios.deployment_target = '14.0'


3. 📋 CLAUDE.md violation: iOS platform in Sample Podfile

File: Sample/ios/Podfile (line 2)

The Podfile sets platform :ios, '14.0', but CLAUDE.md requires:

iOS: iOS 15+, Swift tools 5.5

The Sample app should demonstrate integration with the documented minimum iOS version. This should be changed to '15.0'.

See:

platform :ios, '14.0'


Summary: 1 critical bug (localization failure) + 2 CLAUDE.md compliance issues (iOS version requirements)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants