2

I am creating an iOS app with PhoneGap 0.9.3 and AsiHTTPRequest. They both use a 'reachability' file. PhoneGap uses version 1.5 AsiHTTPRequest uses version 2.0.4

They keep throwing up errors in combination, because there are lots of equal variables. I've tried to refactor the both files but they keep throwing errors.

Is there a more simple way to do this or should I stay on trying to combine those 2 files.

Thanks in advance!

Paul R
  • 208,748
  • 37
  • 389
  • 560
Wouter A
  • 151
  • 2
  • 13

2 Answers2

1

You could try to find a newer version of PhoneGap that uses a newer Reachability version, but I'm guessing you've already tried that route.

Other than that, it's a little ugly but you could build with both concurrently if you refactored/renamed one of them. Eg. rename PhoneGap's Reachability v1.5 class to Reachability15 or something (and rename its files accordingly), and change all references to Reachability in PhoneGap to Reachability15. A simple find/replace wouldn't take long and you should be on your way.

Chris
  • 366
  • 3
  • 11
  • Yea I just renamed my 1.5 version, and all references to it, before dragging in the 2.0 version and the files that depended on it's various methods and data structures. – David van Dugteren Aug 03 '11 at 01:34
0

The GNU compiler has something called @compatibility_alias, never had occasion to use it. Sounds like you might need it.

@compatibility_alias MyOpenGLView ComCocoaDevCentral_CoolScreenSaver_MyOpenGLView;

Here's the (post)[http://cocoadevcentral.com/articles/000089.php] where I ran across it.

Tobias
  • 4,397
  • 3
  • 26
  • 33