Why is the same app different sizes on different devices - ios

I released my first app in the AppStore right before Apple's holiday break. On the iPhone the size of app listed in the App Store is 15MB. However, the exact same app on iPad is 28.8MB according to AppStore page.
Why is there a the huge size difference if both the apps have everything the same?

Do they? I do not think so.
Apple sends only the images along with the app file that the particular devices needs. The non-retina devices will have really tiny size while the app for the iPhone 6S Plus will be a lot larger.
The term used for that procedure is App Thinning. What I mentioned regarding the images is a part of that and called Slicing

Apple has introduced a concept called App Thinning with iOS 9. It contains three strategies to reduce the download size of you App:
Slicing: In short only the images and resources needed for a specific target device are delivered. If someone downloads the App with iOS 8 or earlier, the full package will be downloaded
Slicing is the process of creating and delivering variants of the app bundle for different target devices. A variant contains only the executable architecture and resources that are needed for the target device
Bitcode: If active, Apple can optimise your code for a specific device. For example deploy with 32 or 64 Bit compiled code
On demand data sources: Must be used explicitely by you

Related

Size of binary for Apple Watch apps

I'm developing an iOS app with a corresponding watchOS app. The watchOS app is not required and the iOS app should still be accesable to people who doesn't have an Apple Watch.
My question is regarding the size of the app; the binary size. Does the people who needs the watchOS app and the people who doesn't download the same binary?
If this is the case, this means that for the non-watch users the download size will be unnecessary big, since it also contains the watchOS binary, right?
Looking at Apple's documentation on App thinning and Bitcode, it seems that they do quite a lot to ensure an elegant and small footprint for apps, including on demand resource download and architecture specific binaries.
That said, it seems that WatchOS components aren't included in this process.

About xcode assets catalog and app size

I'm wondering if having images for all kind of devices in the assets catalog will make the app bundle size larger on the user's end.
Is the ipa file downloaded with all images in the assets catalog, or just with those specific to the device the app is being downloaded to?
As from iOS 9 and later, only those assets are downloaded with the app which are compatible with the device.
It is mentioned in this link here
Sliced apps are supported on devices running 9.0 and later; otherwise,
the store delivers universal apps to customers.
Apple has a feature called "App thinning" which is designed to combat this. Basically unused assets are stripped out based on device configuration.
The store will create and deliver different variants based on the
devices your app supports. Image resources are sliced according to
their resolution and device family. GPU resources are sliced according
to device capabilities.
Apple's App Thinning Docs

ENABLE_BITCODE in xcode 7 should provide all image sizes for XCode?

I am using some images with only 1x and use it for all sizes and some images are only 2x ,
Now by enabling the bitcode flag in Xcode should regenerate all images with three sizes?
also the splash screens and icons should i added it to the image asset catalogs or the keep it on the project as files does this affect the app size?
Firstly, Bitcode is a total different concept which generates intermediate representation of a compiled program. This SO thread beautifully explains about it.
I believe you are looking for Slicing. Per Apple Documentation:
Slicing is the process of creating and delivering variants of the app
bundle for different target devices. A variant contains only the
executable architecture and resources that are needed for the target
device. You continue to develop and upload full versions of your app
to iTunes Connect. The App Store will create and deliver different
variants based on the devices your app supports. Image resources are
sliced according to their resolution and device family. GPU resources
are sliced according to device capabilities. When the user installs an
app, a variant for the user’s device is downloaded and installed.
Trusting you are talking about Slicing:
In Xcode, specify target devices and provide multiple resolutions of
images in the asset catalog.
So you should provide all target device images in asset catalog for slicing to work effectively.

Is it possible to exclude 3.5 inch screen devices when submitting an iOS app?

When submitting an iOS app to iTunes connect, is it possible to exclude 3.5" devices? I do not want to support this screen size, just 4" and above.
I checked the iTunes Connect App Properties documentation and the App's Metadata documentation and unfortunately there doesn't look like there is an easy way to restrict your app from not being downloadable onto a iPhone 4S and older device.
But one thing you could try doing is setting your app to build for armv7s & armv8 (see this related question for more elaboration), or if that doesn't work, you could try throwing a "you need a modern iPhone in order to run this app" if it's launched on a smaller screen. This might be okay if your app is free, but you certainly will have an interesting time getting it onto the store if it's a paid app.

Is it possible to support iPad HD only device while releasing app to Apple AppStore?

Update:
iPad HD : iPad Retina (high resolution) (2048x1536)
iPad : Medium resolution (1024x768)
iphone : Low Resolution (below 1024x768)
I'm a c++ developer and mostly develop our apps on cocos2d-x to support cross platform.
Since we are supporting all device resolutions, we need to ship all resource contents (iphone, ipad and ipadhd) in one universal binary for Apple AppStore. The accumulative size is 38MB for our app and its already in the Apple AppStore.
We have been thinking about spliting app to support for iPhone, iPad and iPadHD separately. But in "xcode > Target > Devices", I can see only three options iPhone, iPad and Universal.
What I'm aware of?
If I go to support iPhone and iPad individually, I need two different names like AppName and AppName for iPad.
We can not use the existing name and bundle id, and continue to support only one of the target devices if it is already a universal binary.
What I want to accomplish?
I want to have three different packages for same app with three different names(or bundle id's) like AppName, AppName for iPad and AppName HD for Apple AppStore.
Packing only resources required to support the individual target device (I can use python scripting to remove irrelevant resource assets).
Whenever there is any update, release for individual target devices.
What is the issue?
How to support iPad HD only? I don't want to bundle ipad(12MB) and ipadhd(17MB) resources in one binary. Is it possible to accomplish this task?
If the above problem has no solution and I choose target device as iPad, Do I need to support iPad and iPad HD both?
Thanks
Manish, one solution is to "simply" download the large images after the user purchases the app. It's common with games that that happens. First you download the app off the app store, and then it says "Loading dragon costumes!" or whatever and then it downloads a half gig of dragon costumes.
Whatever platform you are using , Unity3D or whatever, there is usually a trivial way to do this (since most games do it).
BTW two points, (a) 38mb is nothing for a game, so forget that. and (b) you are very smart to only target users with modern machines. Users with old machines are cheap, they don't pay for stuff. It's all but pointless supporting anything less than iOS7, for example, unless you are the biggest most world-famous games.

Resources