rainyl / opencv_dart

OpenCV bindings for Dart language and Flutter. Support Asynchronous Now!
https://pub.dev/packages/opencv_dart
Apache License 2.0
137 stars 18 forks source link

Generate archive in XCODE #256

Closed gustavovisentini closed 1 month ago

gustavovisentini commented 1 month ago

Read README carefully first

Question

The file generated in the release version does not seem to contain the OpenCV libraries, because in this version that I uploaded for testing in TestFlight the processing simply does not work. Is there something I should configure in XCODE and also in Android Studio to generate the versions for release?

The XCODE log

`ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to lookup symbol 'Image_IMRead': dlsym(RTLD_DEFAULT, Image_IMRead): symbol not found

0 DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:33:70)

1 CvNative._Image_IMReadPtr (package:opencv_dart/src/opencv.g.dart:11543:34)

2 CvNative._Image_IMReadPtr (package:opencv_dart/src/opencv.g.dart)

3 CvNative._Image_IMRead (package:opencv_dart/src/opencv.g.dart:11544:30)

4 CvNative._Image_IMRead (package:opencv_dart/src/opencv.g.dart)

5 CvNative.Image_IMRead (package:opencv_dart/src/opencv.g.dart:11533:12)

6 imread.. (package:opencv_dart/src/imgcodecs/imgcodecs.dart:26:22)

7 cvRun (package:opencv_dart/src/core/base.dart:96:76)

8 imread. (package:opencv_dart/src/imgcodecs/imgcodecs.dart:26:5)

9 cvRunArena (package:opencv_dart/src/core/base.dart:247:31)

10 imread (package:opencv_dart/src/imgcodecs/imgcodecs.dart:24:10)

11 _ResultProcessState.build. (package:dropx/screens/analisar/result_process.dart:447:56)

12 _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1170:21)

13 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:351:24)

14 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:656:11)

15 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:313:5)

16 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:246:7)

17 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:703:9)

18 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12)

19 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:143:9)

20 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:633:13)

21 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18)

22 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7)

23 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:501:19)

24 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:481:22)

25 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:450:11)

26 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:426:7)

27 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:389:5)

28 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:336:7)

29 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:305:9)

30 _invoke1 (dart:ui/hooks.dart:328:13)

31 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:442:7)

32 _dispatchPointerDataPacket (dart:ui/hooks.dart:262:31)`

rainyl commented 1 month ago

@gustavovisentini Please refer to:

gustavovisentini commented 1 month ago

I did that https://github.com/rainyl/opencv_dart/issues/200#issuecomment-2278057007 https://github.com/rainyl/opencv_dart/issues/200#issuecomment-2363572016

but it show this message for me when do upload in the testFlight or if try install in the fisical IPhone

Captura de Tela 2024-10-01 às 11 41 44

`Não foi possível instalar o app Dropx Domain: IXUserPresentableErrorDomain Code: 14 Recovery Suggestion: Failed to install embedded profile for br.com.agrodevx.dropx : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.) User Info: { DVTErrorCreationDateKey = "2024-10-01 14:57:20 +0000"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; }

Failed to install the app on the device. Domain: com.apple.dt.CoreDeviceError Code: 3002 User Info: { NSURL = "file:///Users/gustavovisentini/Library/Developer/Xcode/DerivedData/Runner-esmfnkogfzmiqegpguwohhoqezqn/Build/Products/Debug-iphoneos/Runner.app"; }

Não foi possível instalar o app Dropx Domain: IXUserPresentableErrorDomain Code: 14 Failure Reason: Este app não pode ser instalado porque sua integridade não pôde ser verificada. Recovery Suggestion: Failed to install embedded profile for br.com.agrodevx.dropx : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.)

Failed to install embedded profile for br.com.agrodevx.dropx : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.) Domain: MIInstallerErrorDomain Code: 13 User Info: { FunctionName = "-[MIInstallableBundle _installEmbeddedProfilesWithError:]"; LegacyErrorString = ApplicationVerificationFailed; LibMISErrorNumber = "-402620385"; SourceFileLine = 320; }

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_identifier" = "00008110-001015863622401E"; "device_isCoreDevice" = 1; "device_model" = "iPhone14,5"; "device_osBuild" = "18.0 (22A3354)"; "device_platform" = "com.apple.platform.iphoneos"; "device_thinningType" = "iPhone14,5"; "dvt_coredevice_version" = "397.21"; "dvt_coresimulator_version" = 987; "dvt_mobiledevice_version" = "1759.2.1"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 3212; "operation_errorCode" = 14; "operation_errorDomain" = IXUserPresentableErrorDomain; "operation_errorWorker" = IDEInstallCoreDeviceWorker; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphoneos"; "param_diag_113575882_enable" = 0; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_guardMalloc_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_mtc_enable" = 1; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_enable" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 2; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphoneos18.0"; "sdk_osVersion" = "18.0"; "sdk_variant" = iphoneos; }

System Information

macOS Version 15.0 (Build 24A335) Xcode 16.0 (23051) (Build 16A242d) Timestamp: 2024-10-01T11:57:20-03:00`

gustavovisentini commented 1 month ago

I did that #200 (comment) #200 (comment)

but it show this message for me when do upload in the testFlight or if try install in the fisical IPhone Captura de Tela 2024-10-01 às 11 41 44

`Não foi possível instalar o app Dropx

Domain: IXUserPresentableErrorDomain Code: 14 Recovery Suggestion: Failed to install embedded profile for br.com.agrodevx.dropx : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.) User Info: { DVTErrorCreationDateKey = "2024-10-01 14:57:20 +0000"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; }

Failed to install the app on the device.

Domain: com.apple.dt.CoreDeviceError Code: 3002 User Info: { NSURL = "file:///Users/gustavovisentini/Library/Developer/Xcode/DerivedData/Runner-esmfnkogfzmiqegpguwohhoqezqn/Build/Products/Debug-iphoneos/Runner.app"; }

Não foi possível instalar o app Dropx

Domain: IXUserPresentableErrorDomain Code: 14 Failure Reason: Este app não pode ser instalado porque sua integridade não pôde ser verificada. Recovery Suggestion: Failed to install embedded profile for br.com.agrodevx.dropx : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.)

Failed to install embedded profile for br.com.agrodevx.dropx : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.)

Domain: MIInstallerErrorDomain Code: 13 User Info: { FunctionName = "-[MIInstallableBundle _installEmbeddedProfilesWithError:]"; LegacyErrorString = ApplicationVerificationFailed; LibMISErrorNumber = "-402620385"; SourceFileLine = 320; }

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {

"device_identifier" = "00008110-001015863622401E"; "device_isCoreDevice" = 1; "device_model" = "iPhone14,5"; "device_osBuild" = "18.0 (22A3354)"; "device_platform" = "com.apple.platform.iphoneos"; "device_thinningType" = "iPhone14,5"; "dvt_coredevice_version" = "397.21"; "dvt_coresimulator_version" = 987; "dvt_mobiledevice_version" = "1759.2.1"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 3212; "operation_errorCode" = 14; "operation_errorDomain" = IXUserPresentableErrorDomain; "operation_errorWorker" = IDEInstallCoreDeviceWorker; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphoneos"; "param_diag_113575882_enable" = 0; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_guardMalloc_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_mtc_enable" = 1; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_enable" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 2; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphoneos18.0"; "sdk_osVersion" = "18.0"; "sdk_variant" = iphoneos; } System Information

macOS Version 15.0 (Build 24A335) Xcode 16.0 (23051) (Build 16A242d) Timestamp: 2024-10-01T11:57:20-03:00`

gustavovisentini commented 1 month ago

The generated Archive in TestFlight works!

rainyl commented 1 month ago

The generated Archive in TestFlight works!

Great!

It would be awesome if you could share your solutions, I am not an apple developer so can't test it, your solutions will help others with the same problem. :)

gustavovisentini commented 1 month ago

Steps..

Captura de Tela 2024-10-07 às 20 28 49 Captura de Tela 2024-10-07 às 20 29 03

And after, using the commands for make IPA

flutter clean flutter pub flutter build ipa

Open the XCODE Archives and make de upload for the appstoreconnect

rainyl commented 1 month ago

Thanks~