Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code signing error on IOS with libdracodec_Unity.bundle #4

Closed
aribot-hrv opened this issue Jan 19, 2021 · 8 comments
Closed

Code signing error on IOS with libdracodec_Unity.bundle #4

aribot-hrv opened this issue Jan 19, 2021 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@aribot-hrv
Copy link

When publishing on apple store, the app code signing failed.

The issue is caused by wrong configuration of the OSX bundle on Unity :
Runtime/Plugins/x86_64/dracodecunity.bundle
Target defined on metadata file is for all targets instead of OSX only.

@chrisssssy
Copy link

I got the exact same Problem. Did you find a solution? Unity doesn't let me change the platforms for dracodecunity.bundle. It always gets reverted to Any Platform.

@atteneder atteneder added the bug Something isn't working label Jan 31, 2021
@atteneder atteneder self-assigned this Jan 31, 2021
@atteneder
Copy link
Owner

Hi,

Thanks for bringing it up!
This is a macOS security feature trying to prevent running unsigned (and thus possibly harmful) code. I'd have to setup the CI to do code-signing. This requires enrolling in the Apple developer program costing 100$ per year, which is why I didn't do it so far.

Here's the steps to get around it:

  1. When you first open a project with DracoUnity (or add the package), you get prompted to remove the "broken" ktx_unity.bundle. Don't do it and click "cancel" instead.
  2. Open the macOS "System Preferencess" and go to "Security & Privacy". At the bottom of the "General" tab you should see a warning about ktx_unity.bundle. Click the "Allow anyways" button besides it.
  3. Restart Unity
  4. Now you get another, similar prompt (see step 1) with the third option "Open". Click it
  5. Now it should work (at least for development on your machine)

If you want to deploy your software using DracoUnity you either have to

  • Wait until I have proper code-sign setup (I'll close this issue in that case)
  • Build your own library from this source draco repository and sign it with your own credentials/Apple profile.

I hope that helps,

Andi

@atteneder
Copy link
Owner

Added information to the project README.md

@chrisssssy
Copy link

chrisssssy commented Feb 1, 2021

Hi @atteneder,

thanks for the answer, but i don't use Unity in macOS, nor do try to build a macOS app with DracoUnity. I try to build the app with DracoUnity for iOS Devices on a Windows PC an then publish the app with XCode on a Mac.
My workaround to publish the app successfully, was to delete the dracodec_unity.bundle folder in /Runtime/Plugins/x86_64/ rebuild the XCode project and publish it again from XCode on the Mac. However, after restarting unity, the deleted folder gets automatically added to unity again. Is it possible to prevent that from happening?
Also isn't it possible to change the platform configuration (image below) to standalone only?
image

@atteneder
Copy link
Owner

Hi @chrisssssy

never tried that combo, lol (downloading iOS module on win right now)

changes to the package are not preserved if it's installed via package repo. And that makes sense. Packages are not part of the project itself. You can shoot yourself in the foot easily by making accidental changes and forget them.

If you want to develop/change a package, install it via GIT or locally (e.g. download the repo as ZIP)

The settings in your screenshot are not what I see. It's Editor and Standalone only here. Did you make an accidental change?

Note: You can't even change the DLL settings. It's a bug that you actually can change the bundle settings, imho.

@atteneder
Copy link
Owner

Even with iOS module installed and removed and re-added the DracoUnity package I get this:

grafik

How did you install DracoUnity? Please try the recommendet variant via OpenUPM (see reamde)

@chrisssssy
Copy link

chrisssssy commented Feb 1, 2021

I am not shure anymore how i installed it, but it's in the package manager and the registry is OpenUPM.
However i could make an update in the Package Manager from version 1.3.0 to 1.4.0 and that seems to fix the issue. Now the selected platforms are editor and standalone only, like in your screenshot.

@atteneder
Copy link
Owner

Oh, that makes sense. I must have fixed it along the way.
My assumption, that code sign is to blame, are likely wrong => closing
Thanks a lot for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants