sleepy_ios
sleepy_ios

Reputation: 455

when xcode builds and deploys on device

iOS provides a lot of frameworks, I am new to iOS but there's one concept I am not sure of: If I minimise the number of frameworks my app depends on, I assume that is a performance boost, am I correct? or does it not matter? For example, am I saving on memory footprint, or optimizing performance if I do not iOS frameworks ( like core data or core graphics ) if I really don't need the functionality in them? in my app the code is too simple that I can write it myself without core data ( very basic functionality ) .

I couldn;t find good articles that discuss this concept, do all frameworks released by apple get deployed on the device irrelevant of your project using them or not?

Upvotes: 1

Views: 40

Answers (1)

mipadi
mipadi

Reputation: 411380

It's generally best not to link to frameworks you're not using. To answer your more specific questions:

do all frameworks released by apple get deployed on the device irrelevant of your project using them or not?

Essentially yes -- they're provided as part of iOS, so they're already loaded onto the device (and always present).

If I minimise the number of frameworks my app depends on, I assume that is a performance boost, am I correct?

Perhaps -- the linker/loader won't have to load the frameworks into memory and link your app to them, but the performance cost for doing so is so minuscule that avoiding linking/loading a framework isn't a good reason to not use it if you otherwise would find it to be useful.

am I saving on memory footprint

Maybe. When you load a shared library, the contents of the library get loaded into your app's memory space, so it will increase the memory footprint. However, if the library is already loaded by another app (or by the OS), it'll be shared amongst all apps using it.

Even so, a possibly increased memory footprint is a bad reason to avoid using a framework you might otherwise find helpful.

Upvotes: 2

Related Questions