PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

iPhone Keyboard and Facebook Connect

Hello,

We were asked to make an iPhone project that will need Facebook Connect and the iPhone keyboard to enter login/pass.
Is this possible with Edgelib ?
If we buy an Edgelib license, will this include support to help us for example with some code hints to use iPhone keyboard ?

Thank you !
Sure, this is quite well possible. We do it ourselves all the time!

While standard licenses do not include "guaranteed" support or response times, we are always willing to help you out when you have questions. Preferably on this public forum, but we also answer support questions by email.
Thanks for the answer.

Do you have a little example of some lines of code that interface edgelib with obj-c code ?
I tried in many ways of integrating obj-c code but it doesn't compile. I don't really know obj-c so I'm not really at ease with it.

Another question, since if we buy edgelib 3.985 we will not access to edgelib 4 update, we would like to know if we will miss important changes (like maybe better iphone support/functions ?) in edgelib 4 ?

Thank you.
After a lots of tries I finally succeeded in having obj-c code working with Edgelib:

I made a .mm file (it doesn't work with a .m file !)
Code:
#import <UIKit/UIKit.h>
void MyExternalObjCFunc(int param)
{
// UIWindow *edgewindow = (UIWindow *)param; // doesn't work
UIWindow *edgewindow = [[UIApplication sharedApplication] keyWindow];

CGRect frame = {0, 100, 320, 140};
UITextField *text = [[UITextField alloc] initWithFrame: frame];
[text setBorderStyle:UITextBorderStyleRoundedRect];
[edgewindow addSubview: text];
[edgewindow bringSubviewToFront: text];
}


And then calling MyExternalObjCFunc(GetWindowHandle()); one time in NextFrame from the Edgelib class.

It's working but I get random crashes when using the text field. can somebody explain me what I'm doing wrong in this example ?
I think for the next release of edgelib you should include a little tutorial or code sample on how to do such thing on iPhone.

Also, when I'm using the simple helloworld example, it seems to run fine on the device but I always get a crash report each time I run the program on the device. (in the xcode / organizer window) This happen with the helloworld example unmodified and without obj-c stuff.
I compiled with SDK 2.2.1 Release, and testing on an iPod 3.1.3.
Also, I can't test on the simulator, because it seems that only the lib for the device are included in the 3.985 version of the sdk.
I have no idea on how to call facebook from edgelib, I tried many things and It just doesn't compile.
Any help would be appreciated.
I finally figured it out.