Search Unity

CFBundleIdentifier Collision - com.unity.purchasing.unitypurchasing

Discussion in 'Unity IAP' started by dcheglakov, Apr 27, 2021.

  1. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    Hi,

    I'm building Mac build for Intel and Apple Silicon and creating an XCode project. When I trying to upload the build to the app store I got an error:
    I'm not quite sure what another application is meant, maybe iOS app which was uploaded early.

    I've tried to change com.unity.purchasing.unitypurchasing to com.specialbit.wildcase.unitypurchasing in XCode project inside unitypurchasing.bundle and got this error:
    And now I'm not sure if it the correct way to fix this issue.
    How can I fix this? Thanks.

    P.S. Also I've noticed that unitypurchasing.bundle only have Intel 64 architecture, other libs have both Intel 64 and Apple Silicon (arm64)

    Unity 2020.3.5f1
    In App Purchasing 3.0.2
     

    Attached Files:

    nicholasr likes this.
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    What bundle identifier are you using? Typically you use com.YourCompany.YourProduct. On the Signing and Capabilities tab in XCode, what do you have for Bundle Identifier? Have you created this identifier on your Apple dashboard? They need to match.
     
  3. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    I'm using com.specialbit.wild.case, screenshot in the attachment. And yes I've created this identifier already, my iOS app already using it and now I'm trying to add Mac app.
     

    Attached Files:

  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You'll likely want to build a new XCode project from Unity on your Mac and choose Replace since it appears you've directly edited some files. I'm not sure why it is seeing a different BundleID from what you have in your screenshots.
     
  5. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    In my first post I've attached a screenshot with unitypurchasing.bundle info.plist, not my Mac app. You can't imagine how many times I've build a clean project from Unity today. Same error over and over again. The main problem with the identifier of unitypurchasing.bundle please see the screenshot in the attachment.
     

    Attached Files:

  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    What do you mean "not my Mac app"? I'm not following. Please provide your full steps to reproduce. The only Bundle Identifier I ever added/used is as I've described, you should not need to make any other changes. I'm building the Sample IAP Project in Unity on my Mac. It creates an XCode project that I then open in XCode. It prompts me if I want to use automatic signing, which I agree to. Then it prompts me for my provisioning profile from the drop down. I enter the bundle ID as mentioned, and it builds. Can you try with the Sample IAP Project as a test? https://forum.unity.com/threads/sample-iap-project.529555/#post-6950270
     
  7. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    I have a game The Wild Case that has bundle ID com.specialbit.wild.case. In the App Store Connect for this bundle ID, I've created an iOS app and a Mac app, both of them are using Unity IAP. I've successfully built and uploaded the iOS version without any errors, but when I'm trying to upload Mac build with the same bundle ID to the same app in the App Store Connect I got an error CFBundleIdentifier Collision - com.unity.purchasing.unitypurchasing. I think because iOS app that uploaded early already have unitypurchasing.bundle with bundle ID com.unity.purchasing.unitypurchasing.
     
  8. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    Steps to reproduce
    1. Build iOS app with some bundle ID
    2. Upload this app to App Store Connect
    3. Go to App Store Connect page and inside your app click on Add Mac App
    4. Build Mac app with same bundle ID you've used for iOS app
    5. Upload Mac app to App Store Connect
     
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Don't you need a separate BundleID ? That is my understanding, and is the error you are receiving. Granted I've never tried it. Can you try with a new BundleID, as a test?
     
  10. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    Previously, yes, there was a separate bundle ID for ios and mac and I could use the same title for ios and mac, but now they have changed that, unfortunately. Now if I want the same title for ios, mac, and tvos, I have to create ios, mac, and tvos apps under one bundle id.
    With the new bundle ID, everything works fine.
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    So if Apple changed it, you will need to follow that flow ("but now they have changed that..")
     
  12. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    Any suggestions on how to fix this error?
     
  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Create a new bundleID?
     
  14. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    I can't do this. This is a new Apple workflow: one App, one Bundle ID, one App Title, multiple platforms.
     
    zenasprime likes this.
  15. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You said previously "but now they have changed that, unfortunately". By "they", do you mean Apple? If they have indeed changed that (I'm not personally familiar), then you will need to comply.
     
  16. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
  17. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  18. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    Let me clarify, due to the fact that my game uses Unity IAP, I can not release the mac version of the game? And you can't do anything about it?
     
  19. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    Yes, Apple.
     
  20. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    I'm sure the Unity team has an Apple dev account, please try to submit the Unity IAP Sample project to App Store - iOS and Mac by the same App title.
     
  21. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    If they changed their policy, I suspect I would see the same thing? Again, I think I'm not following. My understanding is that your comment implies that a unique BundleID is required now for the Mac store. Where are you seeing that they made this announcement "now they have changed that", can you provide a link? Or is this an assumption you are making. I am also checking with engineering here.
     
  22. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
    Yes, this is an assumption. All I want to submit the Mac build and get rid of this error

    ERROR ITMS-90511: "CFBundleIdentifier Collision. The Info.plist CFBundleIdentifier value 'com.unity.purchasing.unitypurchasing' of 'The Wild Case.app/Contents/PlugIns/unitypurchasing.bundle' is already in use by another application."
     
  23. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you confirm you've followed the steps here https://developer.apple.com/support/universal-purchase/
     
  24. dcheglakov

    dcheglakov

    Joined:
    Aug 11, 2014
    Posts:
    34
  25. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  26. castles_trip

    castles_trip

    Joined:
    Jan 1, 2021
    Posts:
    5
    Hi, @JeffDUnity3D!
    I have the same problem.
    And I also cannot solve it for a long time.
    Tell me, were you able to reproduce this? And have there been any solutions on this issue?
     
  27. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please describe your issue and steps to reproduce.
     
  28. castles_trip

    castles_trip

    Joined:
    Jan 1, 2021
    Posts:
    5
    @JeffDUnity3D

    On the unity side

    1. Created and published an iOS app (successfully);
    2. Ported the application to the Mac platform (locally);
    3. I changed the bundle to a new one created in the appstor;
    4. Collected xCode project from Unity;
    5. Confirmed that it works locally from xCode;
    6. Started exporting to appstore via "Product / Archive" with a valid version of the application;
    7. I get an error similar to the one described above.

    From the actions performed by me:
    - change of application architecture;
    - change of version of unity (2020.1.16f1 / 2021.1.5f1);
    - update of the Unity Purchasing plugin;
    - setting up an additional test bundle on the appstore;
    - replacement of the bundle in plist unitypurchasing.

    All of the above does not help to bring the application to publication with working purchases.
     
    zenasprime likes this.
  29. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We are looking into this, hopefully get an update into an upcoming release.
     
    sdalex likes this.
  30. castles_trip

    castles_trip

    Joined:
    Jan 1, 2021
    Posts:
    5
    @JeffDUnity3D, please report possible changes if you become aware of them.
     
  31. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I trust you followed the previous links I shared.
     
  32. castles_trip

    castles_trip

    Joined:
    Jan 1, 2021
    Posts:
    5
    Yes of course...
    I also looked for all sorts of solutions ...
    All is unsuccessful.

    Now I have created a completely new bundle in the appstore, which I called the test one.
    Also, I created an empty project into which I imported In App Purchasing.
    Tried submitting this to appstore - the error remains the same. I am attaching screenshots of build settings
     

    Attached Files:

    Last edited: May 5, 2021
    zenasprime and JeffDUnity3D like this.
  33. Rolling_Corn

    Rolling_Corn

    Joined:
    Oct 2, 2019
    Posts:
    6
    Hi,
    I have exactly the same issue with my game including unity IAP... I implemented a renewable subscription.
    When I remove the plugin in the 'build phase' in Xcode, I can upload my game and have no error! But how will I get paid ;-)
    What's wrong with the plugin? It seems to me that it should be signed by another certificate (a Unity certificate maybe) and Xcode is signing everything with my developper certificate.
    Any solution comming from Unity?
    Thanks form help!
     
  34. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    https://forum.unity.com/threads/cfb...chasing-unitypurchasing.1100227/#post-7110817
     
  35. zenasprime

    zenasprime

    Joined:
    Mar 31, 2010
    Posts:
    166
    Dude, that's a bit over the top.

    This is how it works. You get one bundleID across each of the three platforms; iOS, tvOS, and MacOS.

    There is no "Creatte a new bundleID". Your app will be rejected.

    BTW - I'm having this issue today as well.

    Unity 2019.4.26f1.

    The issue, as it always seems to be with MacOS, is with Unity Purchasing. It's a freaking mess on MacOS. So much so that I have no interest to use it in any future projects. If I could rip it out for MacOS I would but Apple will reject an app that does not maintain IAP parity for a game that spans each of the three platforms.

    :mad:
     
  36. In2Play

    In2Play

    Joined:
    Apr 25, 2016
    Posts:
    66
    "This is how it works. You get one bundleID across each of the three platforms; iOS, tvOS, and MacOS."

    I'm actually surprised that Unity team does not follow that. This has been for ages. At least in 2018 when I first published my app for iOS and tvOS they both needed to be under the SAME bundle id. This is important because if costumers purchase an app or IAP they can get the same benefits on other Apple platforms aswell.

    So confused on how Unity team does this..
     
    zenasprime likes this.
  37. castles_trip

    castles_trip

    Joined:
    Jan 1, 2021
    Posts:
    5
    Hey,

    I tried to create a completely new empty project and IAP and load it with a new bundle, alas, I still got the same error.
    https://forum.unity.com/posts/7110937/
     
    zenasprime likes this.
  38. Rolling_Corn

    Rolling_Corn

    Joined:
    Oct 2, 2019
    Posts:
    6
    I think the problem is because Unity IAP is signed by Unity, and Xcode doesn't sign it with the app bundle ID
    I tried this:
    In the Terminal and from the Plugins directory I typed: codesign --remove-signature unitypurshasing.bundle to remove unity's signature from the IAP bundle.
    I replaced the bundle identifier com.unity.prushasing by the identifier of my app in Xcode
    Then I archived my project and signed it automatically during the upload proccess (Xcode then signed unitypurchasing.bundle!). It worked for me :)
    I'm now waiting for Apple to validate my app...
    Hope this will help ;)
     
    castles_trip and In2Play like this.
  39. In2Play

    In2Play

    Joined:
    Apr 25, 2016
    Posts:
    66
    Thank you for this.

    However, can you please post the exact steps on how to do this?

    Thanks!
     
  40. Rolling_Corn

    Rolling_Corn

    Joined:
    Oct 2, 2019
    Posts:
    6
    1° make Xcode project with unity.
    2° Open the terminal window to unsign the unitypurchase bundle
    3° unsign with this command line: codesign --remove-signature /path/to/the/bundle/unitypurchasing.bundle
    4° Open Xcode project
    5° find the info.plist file in the unitypurshasing.bundle
    6° change the cf bundle identifier from com.unity.unitypurchasing to com.yourTeam.yourApp
    7° Archive your project
    8° Sign and export the generated archive.
     
    sdalex and castles_trip like this.
  41. zenasprime

    zenasprime

    Joined:
    Mar 31, 2010
    Posts:
    166
    I'll give this a try but it is most definitely a hack. I'm interested to see if it passes review (though knowing Apple, they will probably let this pass while failing you for something more ridiculous and unnecessary).

    What it really comes down to is that this is a bug and that Unity should be properly signing their framework.
     
    In2Play and castles_trip like this.
  42. zenasprime

    zenasprime

    Joined:
    Mar 31, 2010
    Posts:
    166
    After changing the plist file to reflect your instructions I can no longer archive the project. It fails with a Code Sign Error.
     
  43. zenasprime

    zenasprime

    Joined:
    Mar 31, 2010
    Posts:
    166
    Hey guys, I hate to be a pain in the butt but I see that you have been making updates to Unity Purchasing. This is literally a platform breaking bug that makes it impossible to push a game to the Mac App Store. This isn't just a weird little unrepeatable issue that nobody is going to encounter. It makes publishing a MacOS port to the store impossible for anyone using Unity Purchasing. Can we maybe push this up to the top of the issues that need to be fixed stack?
     
    In2Play likes this.
  44. Rolling_Corn

    Rolling_Corn

    Joined:
    Oct 2, 2019
    Posts:
    6
    It has to be exactly the same identifier as your app.
    Are you sure you unsigned the IAP bundle? No error message like "no such file...."?
     
  45. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We are looking into this, a single bundleID should work (this was my personal misunderstanding)
     
  46. zenasprime

    zenasprime

    Joined:
    Mar 31, 2010
    Posts:
    166
    The error reads "code object is not signed at all".

    Is there a step that I'm missing where the code is signed again... say via the command line?
     
  47. Rolling_Corn

    Rolling_Corn

    Joined:
    Oct 2, 2019
    Posts:
    6
    I signed all together with Xcode after archieving the project. Just before uploading.
    But after a few tries I noticed that the music and sounds became awfull... with lot of noise...
    I don't know why... still searching.
    For now I've just notorized my app and I distribute it on my website...
     
  48. zenasprime

    zenasprime

    Joined:
    Mar 31, 2010
    Posts:
    166
    How do you do that?
     
  49. zenasprime

    zenasprime

    Joined:
    Mar 31, 2010
    Posts:
    166
    I saw that there was another update to Unity IAP recently so I imported it into my project thinking "maybe they fixed this long outstanding issue that is completely preventing MacOS builds from being uploaded to Apple Connect!!!!!"

    CFBundleIdentifier Collision.png

    NOPE. Come on guys. Can we get this "game breaking bug" fixed so that we can build and distribute our games to the Mac App Store?
     
    In2Play likes this.
  50. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I just spoke to engineering and asked them to bump up the priority on this important issue.
     
    In2Play and zenasprime like this.