3

Has anybody successfully managed to integrate the Janrain Jump.IOS library with Xamarin?

So far I tried downloading the Jump.IOS from GitHub, created a XCode static library and added in all the stuff from the JREngage folder (right now, if I can get sign in working, I'll be happy - sign up can just work through the web site for the time being). After some fiddling and including a few bits from elsewhere in the Jump.IOS project (JRConnectionManager, SFHFKeychainUtils and JSONKit) and including some required frameworks, I was able to get XCode to compile it into a .a file.

From there, I was able to run it through Objective Sharpie and produce a .cs file. Then I created a binding library project in Xamarin Studio, included my .a file and the code from my .cs file and, with a little more fiddling, got that to compile.

Then I created a simple single view app and tried to use the library in the ViewDidLoad method of my main view. This compiles and executes without any errors, but doesn't actually appear to be doing anything! I don't think it's actually calling the Janrain code and contacting their servers.

Without any errors to work with, I'm now stumped.

Some updates:

I dumped all of the code from Janrain's github repository into a new XCode project, removed JRCapture (although it turns out, I think I need it now) and recompiled. With some fiddling, it compiled. A large part of my initial problem was that it wouldn't build a universal binary. I found a script here and added it to the build phases of my xcode project and that seemed to have cracked the problem. I was building ARM binaries before and they (obviously) don't run on the simulator. I don't know why Apple makes it so difficult to make a universal binary!

I ran JRConnectionManager.h and JREngage.h throw Objective Sharpie to create a .cs file and then added it to a binding project. With a little tweaking that would compile. Then I created a simple iPhone project to test. A couple of key points with the iPhone project:

  1. Even if you include the .xib files in the xcode project, they are unusable in the xamarin project. You have to add them all again to your iphone project itself (find them in JREngage/Resources/xibs)
  2. The code to fire ShowAuthenticationDialog needs to be in ViewDidAppear rather than ViewDidLoad. Apparently the view is loaded, but because it's not actually shown yet, the Janrain code can't add it's dialog to the view.
  3. Despite the fact that the github repo has all the images nested in Resources\Images and Resources\Images-2x, the code actually expects all the images to be in the root of the application. You can edit the IPhoneResourcePrefix tag in your .csproj with a semicolon delimited list of paths to get it to automatically strip all the paths. See here.

Once I fiddled around with that some, I actually got the thing to work. The authentication dialog appears, it connects with the appropriate providers and comes back with data. Now I just need to figure out what to do with the response!

Community
  • 1
  • 1
Matt Burland
  • 44,552
  • 18
  • 99
  • 171
  • Hey, I favorited this so I could get any updates, but there's no response! I haven't worked with Janrain or Xamarin yet, but plan to do both very soon and whatever info you find on this topic would be highly useful! If you find anything, let me know! – Stachu Jul 08 '13 at 15:14
  • Thanks! Seems like this is a big pain! – Stachu Jul 08 '13 at 15:53

0 Answers0