Skip to content

[Bug] Build for iOS Simulator doesn't compile in Debug mode #512

Open
@marekzd

Description

@marekzd

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2020.3.17f1
  • External Dependency Manager version: 1.2.170
  • Source you installed EDM4U: Unity Package Manager (manually unpacked to Packages/ folder; embedded package)
  • Features in External Dependency Manager in use: iOS Resolver
  • Plugins SDK in use: None
  • Platform you are using the Unity editor on: Mac (MacBook Pro, Apple M1 Pro)

[REQUIRED] Please describe the issue here:

Build for iOS Simulator doesn't compile in Debug mode.

XCode throws the following error:

ld: warning: directory not found for option '-F/Users/marekzd/Library/Developer/Xcode/DerivedData/Unity-iPhone-dvncmapbtllnstgjcbjcurdvibwh/Build/Products/Debug-iphonesimulator/AppAuth'
ld: warning: directory not found for option '-F/Users/marekzd/Library/Developer/Xcode/DerivedData/Unity-iPhone-dvncmapbtllnstgjcbjcurdvibwh/Build/Products/Debug-iphonesimulator/GTMAppAuth'
ld: warning: directory not found for option '-F/Users/marekzd/Library/Developer/Xcode/DerivedData/Unity-iPhone-dvncmapbtllnstgjcbjcurdvibwh/Build/Products/Debug-iphonesimulator/GTMSessionFetcher'
ld: warning: directory not found for option '-F/Users/marekzd/Library/Developer/Xcode/DerivedData/Unity-iPhone-dvncmapbtllnstgjcbjcurdvibwh/Build/Products/Debug-iphonesimulator/GoogleSignIn'
ld: framework not found AppAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Here are steps to reproduce this:

  1. Create a new Unity Project
  2. Install EDM4U
  3. Add Editor/Dependencies.xml file
    <dependencies>
        <iosPods>
            <iosPod name="GoogleSignIn" version="~> 6.0"/>
        </iosPods>
    </dependencies>
    
  4. Open Project Settings / Player and set iOS Target to Simulator SDK
  5. Open Build Settings... and switch to iOS platform
  6. Set Run in XCode as to Debug
  7. Click on Build and Run
  8. Unity export succeeds, but XCode compilation fails with error: framework not found AppAuth
  9. It works fine after switching to Release mode

Please answer the following, if applicable:

What's the issue repro rate? (eg 100%, 1/5 etc)
100%

What happened? How can we make the problem occur?

Unity enforces x86_64 architecture for Unity-iPhone and UnityFramework targets (ARCHS=x86_64).

It seems that XCode is not able to build pods in x86_64 architecture in Debug mode.
Although it can do that in Release mode.

I'm not sure why that happens.

It might be related to Build Active Architecture Only being set for Debug builds.
It also might be related to Apple M1.

Here you can find a sample project:
EDM4UiOSSimulatorDebugBug.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions