EnoxSoftware / OpenCVForUnity

OpenCV for Unity (Untiy Asset Plugin)
https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088
557 stars 175 forks source link

Code signing "opencv2.framework" failed #40

Open Darshandegr8 opened 5 years ago

Darshandegr8 commented 5 years ago

Unity Version : 2018.3.4 Xcode: 10.2.1

When i archive and when i want to publish it "Code signing "opencv2.framework" failed".

Please help

Darshandegr8 commented 5 years ago

FYI I have purchased both the asset from asset store -Dlib FaceLandmark Detector -https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088

Darshandegr8 commented 5 years ago

Fixed it disable bitcode in build settings

Darshandegr8 commented 5 years ago

Capture

naus3a commented 5 years ago

I can confirm @Darshandegr8 issue and solution. Verified on:

It would be nice to add a sticky note about the issue on the readme here, on the website and on the asset store page :)

liamwalsh commented 4 years ago

Since upgrading to Catalina I can no longer archive and upload to the App Store -

Screenshot 2020-03-31 at 16 46 28

After getting this error I disable bitcode as outlined in other posts here but I then get this error

Screenshot 2020-03-31 at 16 03 29

This all worked prior to switching to Catalina -

EnoxSoftware commented 4 years ago

Thank you very much for reporting.

Can you tell me the environment you tested? macOS version : Xcode version : Unity version : OpenCV for Unity version :

liamwalsh commented 4 years ago

Thanks for replying Mac OS Catalina 10.15.4 Xcode 11.3 Unity 2019.2.12f OpenCV for Unity 2.3.8

Thanks Liam

EnoxSoftware commented 4 years ago

Do you see 'success : Architectures ...' in the UnityEditor console when the iOS project output is complete?

ios_2020-04-03 16 04 16 ios_2020-04-03 16 03 28
bugrahanbayat commented 4 years ago

Hi :)

I'm getting the same error.

XCode:11.3

I use Dlib and OpenCv in my project.

WhatsApp Image 2020-04-16 at 00 28 37

Ekran Resmi 2020-04-16 11 59 16
bugrahanbayat commented 4 years ago

Im waiting your support. Please help me.

EnoxSoftware commented 4 years ago

@bugrahanbayat Thank you very much for reporting. Are you getting the following errors?

78048222-50a96980-7371-11ea-86e8-beeab1d14ce0
bugrahanbayat commented 4 years ago

Greetings no, I'm getting this error.

Error
EnoxSoftware commented 4 years ago

I tested the upload in my environment and the App file uploaded successfully with no problems. If you send me an email in the contact form, I will send you the Unity project that I have tested. https://enoxsoftware.com/opencvforunity/contact/technical-inquiry/

Validate App success Distribute App -> Export success Distribute App -> Upload success

Environment Mac OS Catalina 10.15.4 Xcode 11.3 (11C29) Unity 2019.2.14f OpenCV for Unity 2.3.8

Setup

xcode1 xcode2 xcode3 xcode4
marimomo00 commented 4 years ago

@bugrahanbayat Thank you very much for reporting. Are you getting the following errors?

78048222-50a96980-7371-11ea-86e8-beeab1d14ce0

I got this error. How to fix it? Thanks in advance.

EnoxSoftware commented 4 years ago

@marimomo00 Thank you very much for reporting.

Can you tell me the environment you tested? macOS version : Xcode version : Unity version : OpenCV for Unity version :

marimomo00 commented 4 years ago

macOS version : 10.14.5 Xcode version : 11.2.1 Unity version : 2019.2.11 OpenCV for Unity version : 2.3.8

Thanks!

On Wed, Jun 10, 2020 at 3:37 PM Enox Software notifications@github.com wrote:

@marimomo00 https://github.com/marimomo00 Thank you very much for reporting.

Can you tell me the environment you tested? macOS version : Xcode version : Unity version : OpenCV for Unity version :

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EnoxSoftware/OpenCVForUnity/issues/40#issuecomment-641794820, or unsubscribe https://github.com/notifications/unsubscribe-auth/APCOC7YVG6PZ2MU7LBG3GQDRV4Z4FANCNFSM4H25JSOA . [image: image.gif]

EnoxSoftware commented 4 years ago

@marimomo00 "ERROR ITMS-90087: "Unsupported Architectures ." error occurs when the framework contains unwanted Architectures. OpenCVForUnity removes unnecessary Architectures by the RemoveSimulatorArchitectures() method of "Assets/OpenCVForUnity/Ediotr/OpenCVForUnityIOSBuildPostprocessor.cs".

Do you see 'success : Architectures ...' in the UnityEditor console when the iOS project output is complete?

78347741-e47e6e00-75db-11ea-9149-6de1494e7c5d
marimomo00 commented 4 years ago

@EnoxSoftware Seem there is an error.

opencv error

EnoxSoftware commented 4 years ago

@marimomo00 The opencv2.framework does not seem to exist in the following directories

framework_dir

Did you change the OpenCVForUnity folder location after you imported OpenCVForUnity into your project?

Ochasovskiy commented 4 years ago

I'm facing the same issue. After building is finished I'm getting this error inside Unity. And it doesn't loads to AppStore because of OpenCV2 signing issue image Plugin version 2.3.9 Names, paths etc. wasn't changed, except moving Streaming assets folder as in Readme file. I triedto create an empty project from scratch on Unity 2019.3.13f1, importing ArFoundation with ArKit, OpenCVforUnity, Native camera asset from assetstore, setup basic Ar scene, and don't touch anything else. It won't help. Basically asset works for the development build(direct install from xCode to the device by development provisioning profile) but it totally broken for distribution. i've even tried to move OpenCV2.framework from the Emeded to link binaries and libraries with a required flag, it loads but the application is broken then.

UPD: SOLVED USE MacOS TO BUILD project and not the Windows

liamwalsh commented 4 years ago

I solved this by changing my version of Xcode

HaimBendanan commented 3 years ago

I am facing the same issue as @marimomo00. It seems to be because there is an attempt to use the lipo function, which fails when building on Windows.

How can we make it works on Windows? I am using iOS project builder for windows, so I am not using a mac when building for iOS.... I would not want to have to build on mac just to make this code pass. Is there an alternative?

EnoxSoftware commented 3 years ago

@HaimBendanan When outputting an Xcode project on Windows, RemoveSimulatorArchitectures() method fails. You can manually remove the unnecessary Architectures on macOS.

//remove i386 architectures. lipo -remove i386 opencv2.framework/opencv2 -o opencv2.framework/opencv2 //remove x86_64 architectures. lipo -remove x86_64 opencv2.framework/opencv2 -o opencv2.framework/opencv2 //check the architectures. lipo -info opencv2.framework/opencv2

//remove i386 architectures. lipo -remove i386 libopencvforunity.a -o libopencvforunity.a //remove x86_64 architectures. lipo -remove x86_64 libopencvforunity.a -o libopencvforunity.a //check the architectures. lipo -info libopencvforunity.a

After removing the unnecessary architecture on macOS, comment out the RemoveSimulatorArchitectures() method in OpenCVForUnityIOSBuildPostprocessor.cs. It will probably succeed in building on windows.

HaimBendanan commented 3 years ago

@HaimBendanan When outputting an Xcode project on Windows, RemoveSimulatorArchitectures() method fails. You can manually remove the unnecessary Architectures on macOS.

//remove i386 architectures. lipo -remove i386 opencv2.framework/opencv2 -o opencv2.framework/opencv2 //remove x86_64 architectures. lipo -remove x86_64 opencv2.framework/opencv2 -o opencv2.framework/opencv2 //check the architectures. lipo -info opencv2.framework/opencv2

//remove i386 architectures. lipo -remove i386 libopencvforunity.a -o libopencvforunity.a //remove x86_64 architectures. lipo -remove x86_64 libopencvforunity.a -o libopencvforunity.a //check the architectures. lipo -info libopencvforunity.a

After removing the unnecessary architecture on macOS, comment out the RemoveSimulatorArchitectures() method in OpenCVForUnityIOSBuildPostprocessor.cs. It will probably succeed in building on windows.

Thanks for the answer! So to make sure I get it, the process would be:

  1. Copy the openCvForUnity folder to mac (no need for my whole project?)
  2. Run the lipo commands
  3. Copy the updated folder back to windows
  4. Comment out the RemoveSimulatorArchitectures() when running on windows

Will that be good? For development and release builds?

EnoxSoftware commented 3 years ago

@HaimBendanan

Will that be good? For development and release builds? The i386 and x86 architectures are only required if you want to run on iPhone simulator. Otherwise, it works fine.

estebanhiguita commented 3 years ago

I have the same error: macOS 11.2.3 Xcode 12.5 Build from Unity 2019.3.14f1 opencv 3.4.11

WhatsApp Image 2021-04-29 at 8 51 45 AM

@EnoxSoftware thanks in advance

EnoxSoftware commented 3 years ago

@estebanhiguita Is the version of OpenCVForUnity 2.4.4?

estebanhiguita commented 3 years ago

I'm sorry this is for opencv 3.4.11 And I solved not importing in xcode

CoaNewco commented 1 year ago

Hi, I have the following issue on MacBook Pro M1, Xcode 14, Unity 2022.2.18f1

ITMS-90087: Unsupported Architectures - The executable for Test.app/Frameworks/opencv2.framework contains unsupported architectures '[x86_64, i386]'.

Also, when I successfully build from Unity, I get this message "success : Architectures in the fat file: libopencvforunity.a are: armv7 armv7s arm64"

I'm using OpenCVForUnity 4.5.2. Thank you for your swift reply.

EnoxSoftware commented 1 year ago

@CoaNewco Is the Unity you used Unity 2021.2.18f1?

CoaNewco commented 1 year ago

It's 2022.1.19f1 actually.

EnoxSoftware commented 1 year ago

@CoaNewco The build succeeded without problems in the environment I tried. OpenCVForUnity 2.5.3 Unity 2022.1.19f1 Xcode 14.2

The i386 and x86 architectures are removed in the build script because they are only needed if you want to run on the iPhone simulator. If the following message is displayed, the output to the Xcode project was successful.

2023-04-11 17 53 11
favymiracle commented 1 year ago

OpenCV: 2.4.2 Unity:2021.3.2f1

I can't get success message when build to iOS project.

image

How can I fix it?

BikalBinodAdhikari commented 3 weeks ago

While building it from Mac and unity project exported as flutterios I'm getting this kind of error.. I have added opencv2.framework but still it says not found. Can anyone help!!

Screenshot 2024-08-21 at 9 54 20 PM