Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XMLRPC-iOS for iOS project

I am gettings insane, I can't figure it out.

I have downloaded and tries to build XMLRPC for iOS. I triend with https://github.com/eczarny/xmlrpc and https://bitbucket.org/kdbdallas/xmlrpc-ios/wiki/Home The first one, the original one, doesn't have an iOS target. the second one should have, but even that one doesn't seem to work.

I build XMLRPC-iOS lib using XCode the following way:

  • download, unzip, open in xcode
  • Go to menu Product > Archive
  • In organized I choose "Share" on the latest build
  • I save it in my own project folder. Include it in the project.

When I build my own project I get:

ld: warning: ignoring file /Users/paulp/Documents/ios/iPhone/ios-account/Account/external/XMLRPC/libXMLRPC_iOS.a, file was built for archive which is not the architecture being linked (i386) Undefined symbols for architecture i386:
"_OBJC_CLASS_$_XMLRPCRequest", referenced from: objc-class-ref in MyAPI.o
"_OBJC_CLASS_$_XMLRPCConnectionManager", referenced from: objc-class-ref in MyAPI.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

How is that possible? The XMLRPC-iOS settings are set to:

  • SDKROOT = iphoneos5.0
  • ARCHS = $(ARCHS_STANDARD_32_BIT) = armv7
  • IPHONEOS_DEPLOYMENT_TARGET = 5.0
  • VALID_ARCHS = armv6 armv7k armv7f armv7
  • OTHER_CODE_SIGN_FLAGS = armv7k armv7f armv6 armv7
  • GCC_VERSION = com.apple.compilers.llvmgcc42

Can someone explain for me how I can build and use the XMLRPC-iOS library in my own application? Thanks!

like image 562
Paul Peelen Avatar asked Sep 09 '11 14:09

Paul Peelen


1 Answers

it worked for me; here is exactly what i did.

  • Create new project (called RpcTest)
  • Download the forked project from bitbucket, extracted the zip in my RpcTest directory, so my directory looks like this:

directory structure

  • Drag the XMLRPC-iOS.xcodeproj into my Xcode project (under Frameworks group, but this doesn't matter)
  • Now, to the build settings. Add kdbdallas-xmlrpc-ios-f28a13cc16ae under User Header Search Paths (uncheck recursive) in your project's Build Settings; now build your project (cmd+B)
  • go to Build Phases tab, expand Target Dependencies, add XMLRPC-IOS project, expand Link Binary With Libraries, add libXMLRPC_iOS.a. enter image description here

Now you should be able to include any xmlrpc header and use the lib.

Hope that helps.

EDIT Download via Dropbox. be advised: incomplete implementation, just a demo that xmlrpc works! ;)

like image 185
mja Avatar answered Sep 22 '22 03:09

mja