card-scanner-flutter icon indicating copy to clipboard operation
card-scanner-flutter copied to clipboard

App Store rejection due to .ir domain in MLKit OCR framework

Open Aethey opened this issue 7 months ago • 2 comments

Our app uses card_scanner: ^1.0.2, and was rejected by App Store review due to a metadata/legal issue with the following message:

"...app includes the following link/s in the binary: https://nic.ir.md/..."

  • The card_scanner plugin depends on MLKit TextRecognition which seems to introduce this framework.
  • This .ir domain reference may cause unexpected App Store rejections with minimal traceability.

$ grep -rni 'nic.ir.md' .

Binary file ./ios/Pods/MLKitTextRecognitionCommon/Frameworks/MLKitTextRecognitionCommon.framework/MLKitTextRecognitionCommon matches Binary file ./build/ios/iphoneos/Runner.app/Runner matches Binary file ./build/ios/Debug-iphonesimulator/Runner.app/Runner.debug.dylib matches Binary file ./build/ios/Release-iphoneos/Runner.app/Runner matches Binary file ./build/ios/Debug-iphoneos/Runner.app/Runner.debug.dylib matches Binary file ./build/ios/iphonesimulator/Runner.app/Runner.debug.dylib matches

I confirmed this by running grep -rni 'nic.ir.md' . on the built app directory. The domain reference is present in MLKitTextRecognitionCommon.framework, which appears to be included via card_scanner.

Just sharing this to help others avoid the same unexpected rejection. Appreciate your great work maintaining this package 🙏

Aethey avatar Apr 17 '25 01:04 Aethey

I'm experiencing the same issue, so I’ve created a new report on the Google Issue Tracker: https://issuetracker.google.com/issues/411157364

I’ve also linked it on GitHub for visibility: https://github.com/googlesamples/mlkit/issues/939

HassanTaleb90 avatar Apr 19 '25 05:04 HassanTaleb90

Temporary solution. Added this package to pubsec.yaml

google_ml_kit: ^0.20.0

After that you may have to update: pod update or pod update GoogleMLKit/TextRecognition

Niko-by avatar May 20 '25 09:05 Niko-by

I added this to the Podfile. It found and removed nic.ir.md. It worked as expected, and Apple accepted the project.

 # 🚫 Patch MLKit binary to remove problematic domain
 Dir.glob("Pods/MLKitTextRecognitionCommon/Frameworks/MLKitTextRecognitionCommon.framework/MLKitTextRecognitionCommon") do |binary|
   puts "🔧 Patching MLKitTextRecognitionCommon to remove nic.ir.md..."
   system("LC_CTYPE=C sed -i '' 's/nic.ir.md/         /g' #{binary}")
 end
end

avetikSukiasyan avatar Jun 16 '25 17:06 avetikSukiasyan