4

I want to set the flag "-ObjC -all_load" like i set in the xcode (under build-settings-> other linker flags)

in order to get iOS apps with air to work with applicasa iOS framework. But what ever I do in the xcode proj seems like the flag being ignored by the air

So How do I set that flag in the air?

(note: its not info.plist configuration, its build setting configuration)

  • 1
    As a note, [you shouldn't need to use `-all_load` with modern versions of LLVM.](http://stackoverflow.com/questions/7942616/why-is-force-load-no-longer-required-for-my-three20-dependencies-in-xcode-4-2/7942924#7942924) Categories in static libraries still require `-ObjC`, but `-all_load` had some nasty side-effects that you can avoid by dropping it. – Brad Larson Jan 29 '13 at 18:32
  • @op why do you think you need to set that flag? It is not needed now. – Nitin Alabur Jan 29 '13 at 18:48
  • A framework that I added has category on NSDictionary, and without that flag the app will crash – Applicasa iOS developer Jan 30 '13 at 09:01
  • I have that problem too with Admob static library libGoogleAdMobAds.a, categories aren't loaded and I get unrecognized selector sent to instance error. So where do I set -ObjC that will occur when packaging IPA? – Yitzchak Nov 12 '14 at 10:41

1 Answers1

0

Try these two:

1) while selecting your extension .a target in xcode, go to other linker flags and add -ObjC then export your .a

2) in your iOS-Platform.xml file, under linkerOptions add

<option>-ObjC</option>
Hadi tavakoli
  • 1,267
  • 2
  • 16
  • 30