Search Unity

Unity IAP for IOS weighs too much

Discussion in 'Unity IAP' started by DAPPSD, Oct 16, 2018.

  1. DAPPSD

    DAPPSD

    Joined:
    Apr 26, 2018
    Posts:
    47
    I created an empty project in order to test Unity IAP and my problem is that my IOS build on my iPhone weighs 56MB which is too much considering that there's nothing other than the Unity IAP in this project.
    The raw Xcode project that Unity generated weighs more than 700MB, and the IOS build on my iPhone weighs 56MB.

    This project contains:
    - The IAP package
    - 4 UI buttons
    - Scroll view
    - 3 TextMesh Pro (one shows the log, and the two others show stuff when the user purchase consumable and non-consumable items)
    - 2 script I created (one for doing the IAP stuff and the other one for interacting with the UI in case of a purchase being made)


    I would love to get some help in reducing the size of the IOS build, it really doesn't make sense why an empty game with only Unity IAP weighs 56MB when my other 3D games with multiple textures and multiple models and scripts weighs less than 30MB on IOS...
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Are you creating a Debug build? And MB is not a weight, it is a size :)
     
  3. DAPPSD

    DAPPSD

    Joined:
    Apr 26, 2018
    Posts:
    47
    No, in the build settings next to "Run in Xcode as" it says "Release"
    LOL sorry bad translation on my part... in my native language we reffer to file sizes both as "size" as well as "weight" :)
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  5. DAPPSD

    DAPPSD

    Joined:
    Apr 26, 2018
    Posts:
    47
    OK Thanks for the help :)

    BTW, do you know if there's any solution to showing in my in-game shop the pricing tier in the user's currency?
    For example in Apple's AppStore tier 2 is 1.99$US for US accounts and 2.29EUR for EU accounts, and I want my shop to automatically detect the user's iTunes account's region and adjust the currency of the price accordingly, instead of letting EU users see the prices in US$..

    I know that a lot of games such as subway surfers and angry birds automatically do this...
     
  6. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    You can use the product metadata to do this:
    https://docs.unity3d.com/ScriptReference/Purchasing.ProductMetadata.html

    You can see an example of how to access the product from the store controller in the scripting reference:
    https://docs.unity3d.com/ScriptReference/Purchasing.Product.html