Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by ashetynw · Oct 10, 2019 at 03:21 PM · iosvuforia

Duplicate interface definition for class 'CAMetalLayer' : unity to Xcode simulator

building for iOS 13 attempting to use the Xcode simulator for iPhone 11/pro/pro max.

unity version: 2018.3.14f1 personal. when running in Xcode I get the following error(s):

alt text

screen-shot-2019-10-09-at-75127-pm.png (445.5 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by LiamColee · Feb 06, 2020 at 11:53 AM

Hey, if anyone wants to fix this issue and doesn't want to install new software and doesn't feel comfortable deleting the problem code. just add a conditional around it that is the same as the conditional above it (#if UNITY_CAN_USE_METAL). this fixed the issue for me

EDIT: you may run into some void* issues. just copy what it says it should be and past it in place of the void*

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image alas11 · Feb 11, 2020 at 06:33 PM 0
Share

good solution, worked for me

avatar image
3

Answer by GrayLightGames · Dec 10, 2019 at 11:51 PM

If you're like me and don't want to rearrange your Unity/Xcode installations, I was able to deploy to the simulator by just removing the problem CAMetalLayer code in Xcode. There is another error that pops up after that, just removed the code causing the problem there as well. Might not work if your code relies on CAMetalLayer, whatever that is :) My 2D game apparently does not. Or it really is just a duplicate definition, so removing has no impact.

Not the most elegant and surely not the best solution, but doesn't require any updating of your software.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
2

Answer by schwips · Oct 20, 2019 at 04:23 PM

I have the same problem and I don't want to go back to xcode 9 or 10. Any solutions?

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image schwips · Oct 22, 2019 at 07:08 AM 1
Share

The problem is solved with the latest Unity patches.

avatar image ai_jon schwips · Dec 04, 2019 at 07:46 AM 0
Share

Would you $$anonymous$$d sharing the version you upgraded to that fixed this issue?

avatar image
1

Answer by DonnaAG · Oct 15, 2019 at 09:13 AM

I had the same thing happening when I went from Unity to iOS. I fixed it by specifying in Unity build settings a version of Xcode prior to Xcode 11. For some reason I get this same error if I run in Xcode 11, but not if I run in Xcode 9 (I'm sure Xcode 10 will work too).

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image luciano_unity · Nov 20, 2019 at 08:12 PM 0
Share

Also hit this problem with 2018.3.14f1. Can confirm that downloading and opening with Xcode 10 (all $$anonymous$$or versions) fixes this problem.

Note that in order to get rid of the project error, you'll have to rebuild the project from Xcode.

Does anyone know if this is fixed in any of the LTS Release versions for Unity? Unfortunately I'd have to port my runtime to .NET 4 in order to move up to the next LTS Release, but I don't want to invest that time unless I know I can get around this problem.

avatar image
0

Answer by umair_hassan1991 · Jan 27, 2020 at 10:45 AM

Is there any workaround from Unity, that I can fix this issue.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

159 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to move a GameObject into scene 1 Answer

Vuforia 4.2.3 + U5.0.2f1 + Xcode 6.3.x iOS can't code sign 2 Answers

Turn on iPhone torch using ARKit 1 Answer

Issue with vuforia and unity 2019.3.5 0 Answers

Black Screen in WebcamTexture on iOS8 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges