Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved PBXProject Embed Frameworks Issue

Discussion in '2022.2 Beta' started by Kawaiiiii, Aug 22, 2022.

  1. Kawaiiiii


    Apr 25, 2017
    An update regarding this previous issue that seems to also be present in 2022.2 for us
    Unity project:
    Xcode project:

    This project and our game builds fine on latest 2021 but when updating to 2022.2 beta (and supposedly 2022.1, although that I haven't tried personally) Unity starts to generate the wrong Embed Frameworks pbxproject entries for these libraries. Issue seems to be related to having firebase in the same project, so I'm unsure if the issue lies within Unity's pbxproj generation or if it is being modified by a post-processing step in firebase incorrectly.

    In the xcode project above, under Unity-iPhone.xcodeproject/project.pbxproj you can see on line 316 and 317 these two entries:
    17337CDF53E293836F0AF6F1 /* NatDevice.framework in Frameworks */,
    CD44735A2C57766D235DE98A /* NatCorder.framework in Frameworks */,

    And compare with the entry unity generates for its own embedded framework:
    9D25ABA5213FB47800354C27 /* UnityFramework.framework in Embed Frameworks */,

    In 2021 and earlier unity generated these file entries with comment "in Embed Frameworks" and attached the codesigning settings and such to that file entry. This newer approach has a bug with / prevents cocoapods "pod install". The error returned by cocoapods is:
    [Xcodeproj] Consistency issue: no parent for object `NatCorder.framework`: `Embed Frameworks`, `FrameworksBuildPhase` (RuntimeError)

    Removing the settings from the NatCorder.framework include
    settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); };

    And adding a new duplicate entry with the settings (with new guid)
    37B4342628B32E9400229B23 /* NatCorder.framework in Embed Frameworks */ = {{isa = PBXBuildFile; fileRef = 9BBED82134E9A15B565C458C /* NatCorder.framework */; settings = {{ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }}; }};

    And then changing the embed framework entry on line 316 fixes the problem and allows you to build, but this is a manual step we must execute as a workaround now and we would like to know if there is something the library authors, firebase or unity could do to resolve this
    Last edited: Aug 23, 2022
  2. Kawaiiiii


    Apr 25, 2017