What is projectname.iOS file which is huge in size created using Xamarin ios shown inside payload

Jadhav, Snehal [MN035] 0 Reputation points
2023-01-31T12:58:42.0533333+00:00

When we create IPA in Xamarin using visula studio and we check the contents of the IPA using below method.

  1. Create IPA.
  2. Change the extension of IPA from .ipa to .zip
  3. Payload folder will get created
  4. In the Payload folder Projectname.iOS file will be there
  5. Right click on that file and Show Package contents
  6. It will lists some the project files along with one Projectname.iOS document file

So our concern is that Projectname.iOS (Shown after doing Show package Contents) is huge in size and not able to understand what that file contains and if there is any scope for the size reduction of that file?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,297 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 26,751 Reputation points Microsoft Vendor
    2023-02-01T05:35:31.5933333+00:00

    Hello,

    It is the app bundle. Look at the size of the .ipa or .xcarchive directly is misleading. The binaries (The APP file, the XCARCHIVE bundle that you create when you archive your app, the IPA file that you upload to App Store Connect) contain resources and files that aren’t part of the bundles that your users download from the App Store.
    It won't be that big when it gets downloaded to user's device because it will cut the slices that users' device needed. For example, A devices can download some resources when we download the package, but B devices may only need to download the package.

    If you want to determine the real size, you can upload the ipa to App Store Connect, select your app, go to TestFlight, select the version under iOS Builds, under Build Metadata tab, click App Store File Sizes, the Download Size means this is the compressed size of the app downloaded over the air. The Install Size means this is the amount of disk space the app will take up on the customer's device.

    For more details, you can refer to Reducing your app’s size | Apple Developer Documentation

    if there is any scope for the size reduction of that file?

    The only way to make it really smaller than that is to use Link all assemblies, which basically tries to pull out unused code from all symbology, not just framework assemblies. But you have to be careful to preserve needed type/methods/etc. (may cause some runtime issue) You need to make sure that any code and user assemblies that you need there or third-party assemblies that you need to maintain that you're not referencing directly in your code.

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments