0

I'm building a cocoa touch static library on iOS which I would like to distribute. I've compiled a release and a debug version, by updating the Schemes. When I look at the size of the produced library, the release version is 2195504 bytes whereas the debug version is 2021216 bytes. (in the Products/Release|Debug-iphoneos directory)

Shouldn't the release version be smaller?

When I link the release version of the library into the application, I would expect to not be able to see the source code within the static library, but I continue to see the source code when stepping through the code.

Do you suspect that I have not built the release version of the static library correctly?

ivoj
  • 11
  • 3

1 Answers1

0

xcode is smart enough to find the source code in your machine. So try deleting the source code from your machine or try using your library in new machine where source file is not at all available.

Release version should be lesser in size.

This link should provide more insight.

If none of this works you could consider creating a custom framework which will hide your source code. See how to do it here and here.

Community
  • 1
  • 1
Vignesh
  • 10,205
  • 2
  • 35
  • 73
  • I tried linking the library on another machine where the source didn't exist, and XCode indeed couldn't find it. Thanks. – ivoj Mar 21 '12 at 02:44