Search Unity

Multiple apple.dll files, both set to iOS target

Discussion in 'Unity IAP' started by MaxGuernseyIII, Aug 6, 2020.

  1. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    Hi,

    When installed Unity IAP 2.0.6 and went through the little import wizard, I ended up with two Apple.dll files.

    One of them was enabled for iOS and the other was enabled for MacOS and iOS.

    It is preventing a build. I started fiddling with the targets to try to get it fixed but I haven't yet got the combination right.

    The two files are at:
    Assets/Plugins/UnityPurchasing/Bin/Apple/Apple.dll

    and
    Assets/Plugins/UnityPurchasing/Bin/Apple/live/Apple.dll


    Which build settings should I apply to each?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    How is it preventing you from building? Can you describe your steps? No additional setting should be required. I've used IAP and built many times, and published on iOS without any problem. We do have an issue if you are compiling for MacOS with il2cpp, we are working on that. And you would not "install IAP 2.0.6" directly also. To install IAP, you enable IAP in the Services window, and follow the prompts. IAP requires both an Asset component and the 2.0.6 Package Manager Purchasing package. The latest IAP version is 1.23.4
     
  3. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    @JeffDUnity3D It is preventing me from building because Unity is finding two assemblies with the same assembly name:

    Code (csharp):
    1. PrecompiledAssemblyException: Multiple precompiled assemblies with the same name Apple.dll included or the current platform. Only one assembly with the same name is allowed per platform. Assembly paths:
    2. Assets/Plugins/UnityPurchasing/Bin/Apple/Apple.dll
    3. Assets/Plugins/UnityPurchasing/Bin/Apple/live/Apple.dll
    I don't know what you mean by "describe my steps" but I think you mean "What does my build system do?" Here is the relevant portion of the answer to that question:
    1. Do a Unity build on a Windows build agent
    2. Zip it up and send it down the pipeline
    3. Consume the zip on a Mac build agent so I can run XCode
    It should be noted that we don't get past the first step, in this case.

    I actually have, since my original post, an iOS build. The solution was to disable the .../live/Apple.dll assembly entirely. I suspect that's the one that is supposed to be for MacOS?

    It's a little confusing that the installer wizard marks both the .dlls for iOS build when there's no way that could ever work for anyone. It doesn't seem likely that is the experience of most people or everyone would be screaming bloody murder about it.

    It makes me think I ran into some kind of bug and didn't realize it. The first try of the IAP installer wizard failed and refused to come back up so I had to close Unity, reopen, delete the stuff it installed, and try again. Maybe the problem lives there?
     
  4. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    The mind-bending new error is:

    Code (csharp):
    1. Error: Could not load signature of UnityEngine.Purchasing.AppleStoreImpl:SetNativeStore due to: Could not load file or assembly 'Apple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:Apple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null type:<unknown type> member:(null) signature:<none>
    What's mind-bending about it is that this is in my Android build.

    I guess, just, turn on the Apple.dll library for Android builds, too?

    I assume it will never get hit, so it won't matter that it links to something that doesn't exist...
     
  5. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    That worked. I also noticed that some of the stuff fin the
    Content
    IAP plugin folder wasn't getting checked in to my repo. I wonder if that could have been having an effect.