Wrong binary type for cv2 when uploading to Apple Cloud connect
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- build-system, mobile
Hướng nghiên cứu
Bắt đầu bằng cách kiểm tra kiểu Mach-O của cv2.abi3.so và cách xử lý các framework cv2 trong serious_python_darwin.podspec; so sánh điều này với wheel của numpy và kiểu nhị phân được chấp nhận của nó. Tái hiện quy trình packaging bằng flutter build ipa và --cleanup-packages, sau đó xác định cần thay đổi gì để quá trình xác thực của Apple chấp nhận bundle được tạo ra.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello !
I've built and tested an Flutter app using Serious Python with several non-pure Python packages ( Like opencv ).
I've successfully publish my Apk but i got an error when publishing on the TestFlight of Apple Store.
Here are 3 issue about the same file cv2.cv2 explaining why Apple refuse my .ipa.
TMS-90171: Invalid bundle structure - The “Runner.app/Frameworks/cv2.cv2.framework/cv2.cv2” binary file is not permitted. Your app cannot contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. For details, visit: https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle
ITMS-90124: The binary is invalid - The executable 'Runner.app/Frameworks/cv2.cv2.framework/cv2.cv2' has type 'BUNDLE' that is not valid. Only 'EXECUTE' is permitted.
ITMS-90210: Missing load commands - The executable at 'Runner.app/Frameworks/cv2.cv2.framework' does not have the necessary load commands. Try rebuilding the app with the latest Xcode version. If you are using third party development tools, contact the provider.
If i download wheels (numpy and opencv) from the https://pypi.flet.dev/ repository, and i extract the content, the file command returned 2 differents output for the .so built.
$ file numpy_1_26_4_2_cp312_cp312_ios_13_0_arm64_iphoneos_whl/numpy/core/_umath_tests.cpython-312-iphoneos.so
_umath_tests.cpython-312-iphoneos.so: Mach-O 64-bit dynamically linked shared library arm64
$ file opencv_python_4_10_0_84_1_cp312_cp312_ios_13_0_arm64_iphoneos_whl/cv2/cv2.abi3.so
cv2.abi3.so: Mach-O 64-bit bundle arm64
Do you have any idea why this package is refused by AppleStore ? Did you succeed to publish a iOS app using this package ( using serious python or Flet ) ?
Is a workaround to recompile the package using mobile-forge and adding a compilation flag to change the file type?
Note :
- I'm on MacOS 26 & xcode 26. (out Github actions CI building and publishing too)
- Adding the cv2 xcframeworks as a resources instead of frameworks ( serious_python_darwin.podspec ) doesn't change the error.
- I had to change the
CFBundlePackageTypefromAPPLtoFRMKin all info.plist of all python packages, or i got an issue about BundleID and AppId.Cannot determine the Apple ID from Bundle ID 'org.python.numpy.random.-pcg64' and platform 'IOS'. (12) - Apple Profiles and certs should be okay as it is not our first app Version deployed with our CI.
- serious_python ( forked ) is a dependencie of a custom Flutter plugin, which is a dependencie of our application.
- I explored the cv2.cv2.frameworks and xcframeworks folder after "ios preparation", i can't see any other issue in the plists of this xcframeworks.
- app is build with
flutter build ipa ...and uploaded withxcrun altool --upload-package ./path/app.ipa --type ios - I used the
--cleanup-packagesarg of the package command to remove all.afiles.
Thanks a lot for any insights and for this awesome package.
- Ngôn ngữ chính
- Dart
- Star
- 325
- Fork
- 46
- Merge trung bình
- 14 giờ 53 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của flet-dev/serious-python
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
flet-dev/serious-python#226 ·
-
iOS Build Failure: Missing site-xcframeworks Directory in serious_python_darwin PhaseScriptExecutionĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
flet-dev/serious-python#168 ·
-
Update docs for site-packagesCó thể làm lại được @FeodorFitsner đã nhận 558 ngày trước và không có pull request nào đang mở. Đang mởdocumentation
flet-dev/serious-python#157 · 1 bình luận · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
flet-dev/serious-python#133 · 2 bình luận ·
-
Fail to debug run_exampleĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
flet-dev/serious-python#117 ·
Tất cả issue của flet-dev/serious-python
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
flame-engine/flame#4067 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mrgnhnt96/zonai#37 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
google/skills_lint.dart#58 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] attempt to index nil valueĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
nvim-flutter/flutter-tools.nvim#557 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
lugassawan/swe-workbench#755 ·
Maintainer thường phản hồi trong vòng 1 ngày