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

Unity 2020LTS: Can't Build->Append if Unity Purchasing is on

Discussion in 'iOS and tvOS' started by fcloss, May 2, 2022.

  1. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    191
    Hi,

    This error started with 2020LTS (currently using 2020.3.33f1). When I build my iOs project to a new folder, no problem, build succeeds. Then, if I go to build, choose the same folder and then select Append (instead of Replace), the following error will occur on the Unity Purchasing post process script (latest version 4.1.4):

    Exception: The given path Libraries/com.unity.purchasing/Plugins/UnityPurchasing/iOS/UnityPurchasing.h does not refer to a file in a known build section
    UnityEditor.iOS.Xcode.PBXProjectData.BuildSectionAny (UnityEditor.iOS.Xcode.PBX.PBXNativeTargetData target, System.String path, System.Boolean isFolderRef) (at /Users/bokken/buildslave/unity/build/External/XcodeAPI/Xcode/PBXProjectData.cs:250)
    UnityEditor.iOS.Xcode.PBXProject.BuildSectionAny

    If someone knows a workaround, please, let me know.

    I've reported this issue to Unity (Case 1424614).

    Any help is appreciated.

    Kind regards,
    Fernando
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    I will check! I always use Replace, I will test with Append.
     
  3. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    @fcloss It works as expected for me. I'm using Unity 2020.1.7f1, IAP 4.1.4 and XCode 13.3.1. I can do Append and build without issue. Please test with a new project with only IAP installed.
     
    Last edited: May 2, 2022
  4. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    191
    Thanks for the prompt reply.

    I have disabled all the plugins post processors and it seems to solve the issue. I believe it is caused by a plugin that removes all the compile sources and re-adds them, causing the exception because it also re-adds the Unity Purchasing header reference, which PBXProjectData does not accept as it is a header and not a compile source.

    I will double check it and then close the issue. Thanks for the support, Jeff.