PINRemoteImage icon indicating copy to clipboard operation
PINRemoteImage copied to clipboard

Create a static library target

Open vlozko opened this issue 6 years ago • 1 comments

PINRemoteImage requires the embedding of 3 different frameworks (PINRemoteImage, PINCache, PINOperation). However, this impacts app load times as these have to be loaded in at runtime. Apple's own guidance suggests an ideal maximum of 6 frameworks. (https://developer.apple.com/videos/play/wwdc2016/406/) Furthermore, apps that would link PINRemoteImage as a static library won't copy the binary in its entirety as static linking only copies code that was used. This would yield a small reduction in binary size.

While it's relatively painless for us to create our own project with a static library target and import the files directly (or possibly fork the project and use the existing projects), we would like some sort of official support for it so that there's less maintenance to do and a guarantee that things won't break between version upgrades. PINRemoteImage is an easy candidate for a static library target because a) It's still Objective-C and thus there are no ABI compatibility issues with distributing it. b) There are no resource files that are bundled into any of the framework targets.

vlozko avatar Apr 06 '18 12:04 vlozko

@vlozko sounds like a good optimization, one thing to consider is that PINCache is optional.

garrettmoon avatar Apr 12 '18 22:04 garrettmoon