OpenCVForUnity icon indicating copy to clipboard operation
OpenCVForUnity copied to clipboard

Code signing "opencv2.framework" failed

Open Darshandegr8 opened this issue 6 years ago • 34 comments

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 avatar Jun 24 '19 10:06 Darshandegr8

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 avatar Jun 24 '19 13:06 Darshandegr8

Fixed it disable bitcode in build settings

Darshandegr8 avatar Jun 24 '19 16:06 Darshandegr8

Capture

Darshandegr8 avatar Jun 24 '19 16:06 Darshandegr8

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

  • OSX 10.14.5
  • XCode 10.2.1
  • Current plugin from the AssetStore

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 :)

naus3a avatar Jul 03 '19 12:07 naus3a

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 -

liamwalsh avatar Mar 31 '20 16:03 liamwalsh

Thank you very much for reporting.

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

EnoxSoftware avatar Apr 01 '20 07:04 EnoxSoftware

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

Thanks Liam

liamwalsh avatar Apr 01 '20 10:04 liamwalsh

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

EnoxSoftware avatar Apr 03 '20 10:04 EnoxSoftware

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 avatar Apr 16 '20 09:04 bugrahanbayat

Im waiting your support. Please help me.

bugrahanbayat avatar Apr 16 '20 09:04 bugrahanbayat

@bugrahanbayat Thank you very much for reporting. Are you getting the following errors? 78048222-50a96980-7371-11ea-86e8-beeab1d14ce0

EnoxSoftware avatar Apr 16 '20 10:04 EnoxSoftware

Greetings no, I'm getting this error.

Error

bugrahanbayat avatar Apr 16 '20 10:04 bugrahanbayat

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

  • Create Empty Project.
  • Import OpenCVForUnity2.3.8 and setup ImportSettings.
  • Import DlibFaceLandmarkDetector1.3.0 and setup ImportSettings.
  • Build Xcode Project.
xcode1 xcode2 xcode3 xcode4

EnoxSoftware avatar Apr 16 '20 20:04 EnoxSoftware

@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.

marimomo00 avatar Jun 09 '20 11:06 marimomo00

@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 :

EnoxSoftware avatar Jun 10 '20 07:06 EnoxSoftware

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 [email protected] 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]

marimomo00 avatar Jun 10 '20 08:06 marimomo00

@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

EnoxSoftware avatar Jun 11 '20 14:06 EnoxSoftware

@EnoxSoftware Seem there is an error.

opencv error

marimomo00 avatar Jun 15 '20 08:06 marimomo00

@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?

EnoxSoftware avatar Jun 17 '20 11:06 EnoxSoftware

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

Ochasovskiy avatar Jun 17 '20 15:06 Ochasovskiy

I solved this by changing my version of Xcode

liamwalsh avatar Jun 26 '20 10:06 liamwalsh

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?

HaimBendanan avatar Nov 13 '20 22:11 HaimBendanan

@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.

EnoxSoftware avatar Nov 14 '20 10:11 EnoxSoftware

@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?

HaimBendanan avatar Nov 14 '20 11:11 HaimBendanan

@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.

EnoxSoftware avatar Nov 16 '20 08:11 EnoxSoftware

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

estebanhiguita avatar Apr 29 '21 13:04 estebanhiguita

@estebanhiguita Is the version of OpenCVForUnity 2.4.4?

EnoxSoftware avatar May 02 '21 14:05 EnoxSoftware

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

estebanhiguita avatar May 03 '21 20:05 estebanhiguita

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.

CoaNewco avatar Apr 07 '23 14:04 CoaNewco

@CoaNewco Is the Unity you used Unity 2021.2.18f1?

EnoxSoftware avatar Apr 07 '23 19:04 EnoxSoftware