Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

OpenFeint iOS 2.9 problems.

Discussion in 'iOS and tvOS' started by donlien, Mar 6, 2011.

  1. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    There are 3 main problems in version iOS 2.9 for Unity Support

    1. Definitions missing!!! some definitions were missing in "OpenFeintDefine.h" and other files, failed to compile. (such as "OF...PromptUser....." I can remember now, but I knew it was a define from Initialization of Unity setting.) This issue is not only appeared in this version, but also older version of OF, like OF iOS 2.8 and earlier version seems not fixed for long long long time....

    2. Wrong Frameworks reference!!! some frameworks are missing. (added on wrong version of Frameworks? SDK 4.2 can not find them but have to delete old ones and re-add them.)

    3. Crashed!!! After I added the missing definition to .h .mm files, it seems work and some complier warnings remains only. but it crashed with a "SIGABRT" after Unity Pro 3.3 splash image, even not see anyone OF launchboard.

    I wonder have they really test it on a real device before releasing the new version? :(
     
  2. SuperGlue

    SuperGlue

    Joined:
    Mar 8, 2011
    Posts:
    2
    I am currently having the same issue, any solutions yet for this?
     
  3. heisemoshengren

    heisemoshengren

    Joined:
    Feb 26, 2010
    Posts:
    5
    I have problems, too! I don't know do it.
     
  4. jnakai

    jnakai

    Joined:
    Aug 28, 2009
    Posts:
    38
    I was able to get OF 2.9.1 working after running into some similar problems, I was previously running fine on 2.8.

    I found the crash at startup problem was caused because OpenFeint changed how they handle applicationDidBecomeActive and applicationWillResignActive messages (among a few others listed as deprecated in the v2.8 change notes). Previously I guess you had to pass those events to the OpenFeint system, now they're listening for them, so they've removed the static methods for those.

    Fix for me was to modify the AppController+OpenFeint.mm, I commented out the calls to:

    [OpenFeint applicationDidBecomeActive]
    [OpenFeint applicationWillResignActive]
     
  5. heisemoshengren

    heisemoshengren

    Joined:
    Feb 26, 2010
    Posts:
    5
    Thank you!!!!! I love you! Only if you are a woman!!!!!
    Thank you, very much!!!!
    But:

    Program received signal: “EXC_BAD_ACCESS”.
    warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
    mi_cmd_stack_list_frames: Not enough frames in stack.
    mi_cmd_stack_list_frames: Not enough frames in stack.
     
    Last edited: Mar 16, 2011
  6. jnakai

    jnakai

    Joined:
    Aug 28, 2009
    Posts:
    38
    Glad that worked for you!

    I'm seeing a problem now when I try to update a leaderboard score, it's crashing on the obj-c to mono call (mono_runtime_invoke) in triggerNotificationEvent, in AppController+OpenFeint.mm. Oddly enough this call works fine when the user first logs in, but crashes for the leaderboard update message.

    After a lot of head bashing, I think this is caused by this particular notification originating from a different thread than the main thread. The user login notification happens on Thread-1, but the leaderboard one happens on Thread-10. I'm guessing there's something going on here where the mono runtime doesn't like messages being invoked from non-main threads. This coincides with the fact the v2.9 docs say OF added new threads to improve server call performance.

    Does anyone have any ideas on how to fix this? This problem is eerily similar to what Dreamora mentions http://forum.unity3d.com/threads/38628-Immediate-calls-from-Unity-to-Objective-C...-and-vice-versa!?p=271127&viewfull=1#post271127.
     
  7. ThinkTank

    ThinkTank

    Joined:
    Aug 5, 2010
    Posts:
    25
    I can get Open feint 2.9.1 to compile, however the API calls don't seem to work for me. I can't open the dashboard, submit high scores, etc.

    I using xode 4 with ios 4.3, I have all the required frameworks in my xcode project, and have followed all the steps listed in the readme. My previous versions of OF worked fine.

    Anyone else seeing this behavior?
     
  8. perdicero

    perdicero

    Joined:
    Sep 8, 2010
    Posts:
    2
    @ThinkTank : I have same problem, you found a workaround?

    If found it, please let me know.

    If I find, I'll post here
     
  9. ThinkTank

    ThinkTank

    Joined:
    Aug 5, 2010
    Posts:
    25
    @perdicero: I haven't found one yet, If I do, I'll be sure to post it here.
     
  10. jnakai

    jnakai

    Joined:
    Aug 28, 2009
    Posts:
    38
    perdicero/ThinkTank what is happening for you guys? Are your games launching properly, but OF isn't working? Or are your games crashing on load?
     
  11. ThinkTank

    ThinkTank

    Joined:
    Aug 5, 2010
    Posts:
    25
    My game is launching properly, but OF isn't connecting automatically (like it always did) and all of its functionalities, (Open dashboard, unlock achievement, submit high score) won't work because of it. There is no crash
     
  12. jnakai

    jnakai

    Joined:
    Aug 28, 2009
    Posts:
    38
    I did some unscientific testing on this, and it seems iOS sdk 4.3, and building armv6 really messes things up with openfeint.

    Things worked well for me with iOS sdk 4.2, but once I upgraded to 4.3 I started seeing the same things you guys were seeing, OF wouldn't work properly. I was originally compiling only armv6 build and testing on my iPhone 3G. As a test I switched my game to build as a universal binary and ran it on my iPod touch, which would use the armv7 binaries. When I did that OpenFeint seemed to work properly, the OF user selection dashboard opened up properly, and I could open the dashboard properly when requested.

    I just reinstalled xcode 3.2.5 and iOS sdk 4.2, and OF seems to work fine again on both devices when compiling as armv6. I think I'm going to stick with iOS sdk 4.2 for now
     
  13. BreakYman

    BreakYman

    Joined:
    Feb 15, 2011
    Posts:
    3
    I'm currently running into a similar problem just trying to get OF integrated into a Unity test project. I am currently using xcode 3.2.5, and sdk 4.2. After following the directions and spending hours trying to debug the problem, I have this as the main culprit:

    ld: duplicate symbol OFSdbmHashedString::OFSdbmHashedString(char const*)in /Users/indiePubMobileMacMini/Downloads/OpenFeint.2.9.1/OpenFeint.framework/OpenFeint and /Users/indiePubMobileMacMini/OpenFeintTest/OFTestApp/build/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv6/OFHashedString.o
    collect2: ld returned 1 exit status
    Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 failed with exit code 1

    How am I supposed to remove the OFHashedString.m or .mm file that this object file is generated from? Is there another alternative?
     
  14. jnakai

    jnakai

    Joined:
    Aug 28, 2009
    Posts:
    38
    That's a weird one. Are you using the OpenFeint framework, or the individual source files? I went with the source files approach (which I believe the OF+Unity integration docs walks you through) and didn't have any issues like that.
     
  15. BreakYman

    BreakYman

    Joined:
    Feb 15, 2011
    Posts:
    3
    Thanks jnakai, looks like taking out the OF Framework helped to at least get it to compile and load an empty project on the device.

    The installation guide could definitely use some editing - the current version is very confusing when trying to integrate it with Unity
     
  16. jnakai

    jnakai

    Joined:
    Aug 28, 2009
    Posts:
    38
    Glad to hear you got it working!
     
  17. sriram90

    sriram90

    Joined:
    Oct 14, 2010
    Posts:
    94
    hey guys am getting lot of errors like this,

    error: OpenFeint.h: No such file or directory

    error: OpenFeint+Dashboard.h: No such file or directory

    error: OpenFeint+UserOptions.h: No such file or directory

    error: OFHighScoreService.h: No such file or directory

    error: OFAchievementService.h: No such file or directory

    error: OFSocialNotificationService.h: No such file or directory

    error: OFFriendsService.h: No such file or directory

    error: OFChallengeService.h: No such file or directory

    error: OFChallenge.h: No such file or directory


    what i want to do now???? these errors are showing in xcode when i build my unity with open feint....

    any idea..?? i want to fix it....help me...
     
  18. sriram90

    sriram90

    Joined:
    Oct 14, 2010
    Posts:
    94
    these errors i have mentioned before was cleared....now i have only one error as

    OpenFeintPrefix.pch : No such Files or directory......

    can any one say the answer for it...i have tried openfeint version 2.8 and 2.9.1....

    what am doing wrong....??
     
  19. jawa

    jawa

    Joined:
    Apr 10, 2008
    Posts:
    15
    Sriram90:

    This means that the compiler can not find the OpenFeintPrefix.pch file. There's a list of standard and user-defined paths that the compiler (preprocessor actually) will search for headers and precompiled headers.

    I'm assuming that you're including OpenFeint as a framework, rather than dropping the OpenFeint directory into your project. Is this correct?

    If so, you need to tell XCode where to find it. Again, assuming that you're bringing OpenFeint in as a Framework, the pch file should be in:
    OpenFeint.framework/Headers

    1) In XCode, select your project in the project list window.
    2) Open the info by hitting the "circled i" button.
    3) Go to the Build tab
    4) In the "Search Paths" section, find the entry named "Header Search Paths"
    5) In this entry, add the (relative) path to the OpenFeint framework headers dir. For example, "OpenFeint.framework/Headers"

    Recompile.
     
  20. BreakYman

    BreakYman

    Joined:
    Feb 15, 2011
    Posts:
    3
    Has anyone come across this error, and have been successful fixing it?

    [NSCFString deactivate]: unrecognized selector sent to instance 0x1276e80
    CoreAnimation: ignoring exception: - [NSCFString deactivate]: unrecognized selector sent to instance 0x1276e80

    This happens after the OpenFeint dashboard pops up for the first time and the player successfully signs in.

    Currently though, OpenFeint goes into OFFLINE mode, even though WiFi is already turned on? Very sporadic in getting OpenFeint to even show.

    SOLVED:

    After spending almost an entire day tracing this, it is caused by the following line:

    UnitySetAudioSessionActive(boolean)

    This can be found in dashboardWillAppear and dashboardDidDisappear in AppController+OpenFeint.mm. Make sure to comment these out in addition to the other lines that you need to comment to get this working correctly.

    This has also been discussed previously on another thread:

    http://answers.unity3d.com/questions/37990/crash-at-first-launch-with-openfeint
     
    Last edited: Mar 25, 2011
  21. ThinkTank

    ThinkTank

    Joined:
    Aug 5, 2010
    Posts:
    25
    Looks like openfeint will have a fix to work with Unity 3.3 on 3/28/2011 (Monday).

    Incompatibilities including compiler errors have crept in between the latest versions of the Unity and OF SDKs for iOS (Unity 3.3 and OF SDK 2.9.1 for iOS). A new Unity plug-in to address these errors will be release on approximately 3/28/2011. This page will be updated when the new plug-in is available.

    Source: http://support.openfeint.com/dev/unity3d-ios/
     
  22. jnakai

    jnakai

    Joined:
    Aug 28, 2009
    Posts:
    38
    Thank God. It was a nightmare getting OF 2.9.1 to work a couple weeks ago when I was releasing an update.
     
  23. Deleted User

    Deleted User

    Guest

    People,

    I opened a bug issue on Openfeint's site. They said they'll update unity's support
    but it was more than two weeks ago.
    One person should be enough to make then move, but that seems not to be the case.
    So I ask all of you guys issue similar complaints on OF's website.

    --
    Immersiva
     
  24. sriram90

    sriram90

    Joined:
    Oct 14, 2010
    Posts:
    94
    i got the answer....after we make the project build the finder will show the alert like this "open feint unity support integrated,just add the openfeint source file"...that openfeint source file consist of the file name of prefix header as OpenFeintPrefix.pch....so,it wont show this error.
     
  25. Deleted User

    Deleted User

    Guest

    Well people, we need to put some pressure on OF...

    No planned date to update this wonderful piece of buggy code:

    As you know OF 2.10 is just out the door, the day after the message above, and no still update...
     
  26. AdsySingle

    AdsySingle

    Joined:
    Jan 5, 2011
    Posts:
    116
    I have tried, and repeatedly failed, to find an answer to my problem. I am getting a linking error when I compile my project. It has something to do with Apple Mach-O linker. I have read that it has to do with the armv7 not supporting it, but everywhere I read says to ignore the warnings. That's fine, I do ignore all 1200 of them, but I also have 1 error.
    I also don't really understand the instructions for integrating openfeint. What, exactly, do I have to move into my xcode project? A lot of the time the instructions say to edit settings that I can't even find in x-code. As you may have gathered, I'm not an x-coder, I'm a c++ coder, I'm not even a mac user, so most of this is really confusing. Can anyone walk me through setting up OF 2.9.1 with iOS 4.3 in xCode 4? Because I can't figure it out.
     
  27. AdsySingle

    AdsySingle

    Joined:
    Jan 5, 2011
    Posts:
    116
    So I have got around all the errors by making sure I import OF as a framework instead of source. I still can't get it running. I don't get any errors, I don't get any notification that I failed to login, I don't get anything, it's as if I don't have openfeint integrated at all. In Unity I get debug information from OpenFeint that seems to indicate something is happening. I get logged out info that UnlockAchievement calls have been made along with the achievement ID I am calling. However when I run on the phone I get nothing, I have checked the log, nothing is being written by OF and nothing is happening. I am completely stumped here.
     
  28. T-Strijker

    T-Strijker

    Joined:
    Apr 12, 2010
    Posts:
    26
    Hey all.

    I had some problems white the new OF 2.10.
    First the game didn't start and found out that [OpenFeint applicationWillResignActive] and [OpenFeint applicationDidBecomeActive] where deprecated, so i commented them in the AppContoller+OpenFeint.mm.

    But now i get EXC_BAD_ACCESS error message every time i close OF to go back to the game. Has any body an idea what the problem could be.
     
  29. AdsySingle

    AdsySingle

    Joined:
    Jan 5, 2011
    Posts:
    116
    Sorry T-Strijker, I can't even get OpenFeint to run. I have spent about a week on just getting OF into the xcode project and running. I have narrowed it down to the fact that AppController+OpenFeint.mm isn't actually being called when the game runs, only AppController.mm is. The applicationDidFinishLaunching() function gets called from AppController.mm when I need it to be called from AppController+OpenFeint.mm because in there commonInit() is called which initialises OF. None of that classes functions are being called and I don't know how to fix that.
     
  30. jnakai

    jnakai

    Joined:
    Aug 28, 2009
    Posts:
    38
    T-Strijker, make sure you've removed any calls to 'UnitySetAudioSessionActive()', last I looked for 2.9 it was still in there, and that function doesn't exist anymore.
     
  31. AdsySingle

    AdsySingle

    Joined:
    Jan 5, 2011
    Posts:
    116
    So re-reading all the posts in this topic I noticed some other people were having a similar problem with OF not running even though the game was. They had no crash, this is the same as myself except any solution that involves modifying AppController+OpenFeint.mm isn't going to help me because the problem is that the code never seems to enter AppController+OpenFeint.mm. Did anyone else have this problem?
     
  32. jnakai

    jnakai

    Joined:
    Aug 28, 2009
    Posts:
    38
    I think I saw this issue when I was using OF 2.9.1 and compiling with XCode 4 and iOS 4.3 SDK. If I remember correctly, I had to get around this by downgrading to XCode 3.2.5 and iOS 4.2 SDK. Hopefully there is a better solution
     
  33. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    Testing on an iPod Touch 4 when a fresh build is installed and openfeint starts up, it says "not connected to the internet" when the device is clearly on wifi.

    The second time the app is ran it works and is connected to the internet. Any ideas?

    I am using OpenFeint 2.10 and iOS 4.3.
     
  34. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,550
    This is really bad. Will there be a problem if I just use 2.8 instead?
     
  35. qamarzaman

    qamarzaman

    Joined:
    Jul 1, 2010
    Posts:
    85
    My App is crashed while loading if i integrate the openfeint 2.10.1 in my game.

    Have anyone successfully integrated openfeint into iPhone game.

    I am trying to find solution since a week ago, but still there is no success.
     
  36. Deleted User

    Deleted User

    Guest

    Yeah I did (finally it works).

    Here are the steps:

    1. Followed http://support.openfeint.com/dev/ofunity-ios-example/

    Since unity is having problems with sdk 4.3 (see http://forum.unity3d.com/threads/83076-iOS-4.3-App-Rejected), you have to downgrade OF 2.10.1 to work with sdk 4.2. Also, related to sdk 4.3, my application was crashing when building for armv6 only.
    The next link below shows how to upgrade OF 2.9 to work with sdk 4.3. It works fine in the "opposite direction".

    2. Downgraded OF 2.10.1 static libraries to sdk 4.2: http://support.openfeint.com/dev/building-for-ios-4-3/

    3. Included -all_load in all targets: see http://support.openfeint.com/dev/readme-for-openfeint-ios-sdk-2-10-1/

    Hope it helps...
     
    Last edited by a moderator: May 16, 2011
  37. qamarzaman

    qamarzaman

    Joined:
    Jul 1, 2010
    Posts:
    85
    Immersiva:

    Thank you for responding. and suggesting some good things. But I am having same problem again. I this some reason of iphone harware

    I am using

    iPhone 3G
    iOS 4.2.1
    Xcode 4.0.2
    iOS SDK 4.3

    I am stuck in this problem since a couple of weeks, Please Suggest Something which solve my problem.
     
  38. Pete-L

    Pete-L

    Joined:
    Jun 12, 2011
    Posts:
    8
    Last edited: Jun 12, 2011
  39. qamarzaman

    qamarzaman

    Joined:
    Jul 1, 2010
    Posts:
    85
    Hi,
    I am getting this error when i integrate the Social Networking and OpenFeint both in my game it gives following error. while building

    please suggest something to get rid of this
     
  40. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    I hav some problem.... i m getting the error

    "/Users/ankit/Documents/builds/UnityGenerated_1/Classes/iPhone_target_Prefix.pch:24:0 /Users/ankit/Documents/builds/UnityGenerated_1/Classes/iPhone_target_Prefix.pch:24:40: error: OpenFeint/OpenFeintPrefix.pch: No such file or directory"

    "i didn't got a alert.." as Sriram90 got ..

    can u help me to figure out this... Plz make an empty project for me with Open Feint ... and make it work.. and upload...