XTLS / libXray

MIT License
64 stars 57 forks source link

Mac - Command CodeSign failed with a nonzero exit code #5

Closed houmie closed 1 year ago

houmie commented 1 year ago

Today I started implementing a demo on Mac with this lib.

I can't build it though.

/Users/houmie/Library/Developer/Xcode/DerivedData/xraydemo-akmagyiewjmaxhgqegcdimbvucrm/Build/Products/Debug/tunnel-mac.appex: code object is not signed at all
In subcomponent: /Users/houmie/Library/Developer/Xcode/DerivedData/xraydemo-akmagyiewjmaxhgqegcdimbvucrm/Build/Products/Debug/tunnel-mac.appex/Contents/Frameworks/Libxray.framework
Command CodeSign failed with a nonzero exit code

I have already set it to Embed Without Signing.

Screenshot 2023-07-09 at 12 21 17

But it doesn't work.

Any advice please?

ghost commented 1 year ago

Use "Do Not Embed"

houmie commented 1 year ago

Thanks, that is an option to get it working on my machine locally. But if I want to compile it and distribute it on AppStore, it will no longer work because your library is not a system library, correct? I don't think that's the right solution, unless I'm missing something.

ghost commented 1 year ago

Thanks, that is an option to get it working on my machine locally. But if I want to compile it and distribute it on AppStore, it will no longer work because your library is not a system library, correct? I don't think that's the right solution, unless I'm missing something.

I always use "Do Not Embed" to integrate LibXray.xcframework. I never meet your problem.

houmie commented 1 year ago

I always use "Do Not Embed" to integrate LibXray.xcframework. I never meet your problem.

Beware that when you are testing in Debug mode, Xcode always includes third party libraries in the bundle, no matter if you choose "Do Not Embed". However in Release Mode, the app should crash, because the library is not included in the bundle.

Have you uploaded your project with this library as Release mode to AppStore and tested it via TestFlight on your Mac?

Thanks

ghost commented 1 year ago

I always use "Do Not Embed" to integrate LibXray.xcframework. I never meet your problem.

Beware that when you are testing in Debug mode, Xcode always includes third party libraries in the bundle, no matter if you choose "Do Not Embed". However in Release Mode, the app should crash, because the library is not included in the bundle.

Have you uploaded your project with this library as Release mode to AppStore and tested it via TestFlight on your Mac?

Thanks

Yes.

houmie commented 1 year ago

Ok, thank you. Maybe I made a mistake. I'll try again.

ghost commented 1 year ago

Today I started implementing a demo on Mac with this lib.

I can't build it though.

/Users/houmie/Library/Developer/Xcode/DerivedData/xraydemo-akmagyiewjmaxhgqegcdimbvucrm/Build/Products/Debug/tunnel-mac.appex: code object is not signed at all
In subcomponent: /Users/houmie/Library/Developer/Xcode/DerivedData/xraydemo-akmagyiewjmaxhgqegcdimbvucrm/Build/Products/Debug/tunnel-mac.appex/Contents/Frameworks/Libxray.framework
Command CodeSign failed with a nonzero exit code

I have already set it to Embed Without Signing.

Screenshot 2023-07-09 at 12 21 17

But it doesn't work.

Any advice please?

I checked my configuration carefully. I found you missed libresolv.tbd. Try to add it. According to gomobile's issue, you need add it.

houmie commented 1 year ago

Yes, you're right. I added it now.

Screenshot 2023-07-10 at 08 06 15