card-scanner-flutter
card-scanner-flutter copied to clipboard
App Store rejection due to .ir domain in MLKit OCR framework
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_scannerplugin depends on MLKit TextRecognition which seems to introduce this framework. - This
.irdomain 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 🙏
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
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
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