0

I'm implementing Google+ login button for iOS by following this manual:

https://developers.google.com/+/mobile/ios/getting-started

In section 2 step #6:

Add the ObjC linker flag to the app target's build settings:

I noticed that adding this flag increase the size of my binaries in 2 times. Is it possible to avoid using this flag? (other libraries, like Facebook SDK doesn't requires this and you usually can initialize required classed manually)

Thank you!

Mike Keskinov
  • 11,614
  • 6
  • 59
  • 87
  • 1
    []From the instruction on assembling a plane: "step #6: install wings". I noticed that adding them increases the weight of my contraption 2 times. Is it possible to avoid using them? Other things, such as cars and boats, do not require them, and they work just fine.[] My point is, when you linked without the flag, the linker discarded some useful code. Saying that your binaries became two times smaller without the flag is not an apples-to-apples comparison. – Sergey Kalinichenko Mar 03 '14 at 15:28
  • This is not good example. The size increasing not only because it start including Google+ libraries, but all external libraries. Facebook SDK docs also mention this flag with note that it's not recommended because it can significantly increase binary size. So, Facebook SDK provides alternative solution which is simple adding one line of code in app delegate. – Mike Keskinov Mar 03 '14 at 18:12
  • Try the force_load option. Here is the SO link http://stackoverflow.com/questions/25889914/can-the-objc-flag-be-applied-selectively-to-static-libraries – Kris Subramanian May 28 '15 at 01:36
  • Has anyone tried Facebook's suggestion to create the class upfront in the didFinishLaunchingWithOptions callback method to avoid using the ObjC flag. It did not work for me when I tried it. Here is the FB link which explains how to do it. https://developers.facebook.com/docs/ios/troubleshooting – Kris Subramanian May 28 '15 at 01:40

0 Answers0