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

[Released] Mobile Social Plugin

Discussion in 'Assets and Asset Store' started by stanislav-osipov, Feb 21, 2014.

  1. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    @AlexRay, Thanks for your side reply. I am using same version of Facebook and Unity from my end as well.
    FeedShare method working perfectly for my project so I don't think it is problem related to any Facebook setting.

    I will communicate with Stan's Support Team for this because I am really interested to find this problem.
    Thanks for your support up to now :)
     
  2. nproject

    nproject

    Joined:
    Jan 16, 2015
    Posts:
    68
    Hey @AlexRay,

    When I tried scene FBExample in Unity Editor, everything is ok. I can login and load user info.
    But when I tried export to apk. Then I tried FB login, apk just crash.

    I also use example scene from facebook, everything is ok.
    Facebook Unity SDK v7.4.0, Unity v5.3.3.1f, Mobile Social Plugin v7.5

    Can you help me?
     
  3. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Let's try to clarify this case.
    Please, could you provide more additional information according to this case?

    Provide full LogCat log from your Android device.
    Just add Unity and AndroidNative filters to your Eclipse and capture the log from the start of your Facebook requests.
    One good approach is to contact The Stan's Assets Support Team directly.
    You will get great assistance with any issues you have in your project.

    Best regards,
    Alex
     
  4. nproject

    nproject

    Joined:
    Jan 16, 2015
    Posts:
    68
    Hey, problem is solved.

    The problem is because in MSP FB setting there many permissions, but my in facebook app the default is only 3, email, user_friends, public_profile.

    So I delete all permission in setting, and only use email, user_friends, public_profile , and everything is fine now.

    Thanks
     
    AlexRay likes this.
  5. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    @AlexRay, I am back with other error in iOS Facebook sharing.
    I want to do share image and text in Facebook account. So that I am using Feed Share method for this purpose.
    In actual iPhone, I can able to do login as well able to load user info but can't able to share message.

    I am getting following error into LogCat.

    Screen Shot 2016-04-11 at 10.28.30 PM.png

    Let me know if you want any more information for this.

    Please give me some help me in this.
     
  6. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Did you test FeedShare sample from FBExample Unity scene?
    Please, provide me the code snippet how do you call this method from your code.

    I am looking forward to your reply.

    Best regards,
    Alex
     
  7. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    @AlexRay, Thanks for your reply.
    Here is my FeedShare code :

    Code (CSharp):
    1. private void PostMessage ()
    2.     {
    3.  
    4. //        SPFacebook.Instance.PostText ("I've just scored " + DataStorage.RetrievePlayerBestScore () + " in #Shape Dash. Can you beat me?");
    5.  
    6.         SPFacebook.instance.FeedShare (
    7.             link: "http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=1102051493&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8",
    8.             linkName: "Shape Dash",
    9.             linkDescription: "I've just scored " + DataStorage.RetrievePlayerBestScore () + " in #Shape Dash. Can you beat me?" +
    10.             "\nhttp://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=1102051493&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8",
    11.             linkCaption: "Ebi's Inc",
    12.             picture: "http://www.shinetechnolab.com/share_logo.png"
    13.         );
    14.     }
    Please check above code and reply back to me. If you want any more detail then I am available to reply.
     
  8. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    I am on it. I'll check the same FeedShare call on my own.

    Cheers!
     
  9. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    @AlexRay, Whatever result you will get, reply back to me!! I am waiting for your suggestion.
     
    Last edited: Apr 13, 2016
    AlexRay likes this.
  10. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    I have checked full source code again. Now I can able to FeedShare one time using my game.
    When I try to share something second time nothing happens in screen.

    Here I my Facebook sharing script that I have created using MSFacebookUseExample script.
    Definitely mistake exist in this one. So please take a look and reply back to me.
     

    Attached Files:

  11. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    I took a look at the script you provided and have following comments according to this case.
    As I can see, you have PostMessage() method call in OnAuth (FB_Result result) callback.
    That explains why do you get post message only once.

    At the very first session, the user will be Authenticated. OnAuth callback will be fired.
    If you didn't log out from the session and open the application again, OnAuth callback will not be fired, because your user is already authenticated. Only OnInit callback will be fired in such a case.
    So, to avoid such a moments, you better call PostMessage method by button click etc.

    Best regards,
    Alex
     
  12. CrowbarSka

    CrowbarSka

    Joined:
    Dec 15, 2009
    Posts:
    192
    Hi, I'm having difficulty implementing this plugin alongside my Google Play Games plugin.

    At first I had AndroidManifest.xml merge errors when compiling, complaining that targetSdkVersion was 18, but 19 in library. I resolved this by finding every manifest in my project and setting the targetSdkVersion to 19.

    I also set Minimum API Level to be 19 in my PlayerSettings > Other Settings > Identification > Minimum API Level.

    I can compile the game now, but it crashes on launch.

    adb logcat outputs this error:

    04-18 14:50:45.802 21369 21369 E AndroidRuntime: FATAL EXCEPTION: main
    04-18 14:50:45.802 21369 21369 E AndroidRuntime: Process: [MY_APP], PID: 21369
    04-18 14:50:45.802 21369 21369 E AndroidRuntime: java.lang.Error: FATAL EXCEPTION [main]
    04-18 14:50:45.802 21369 21369 E AndroidRuntime: Unity version : 5.3.4f1
    04-18 14:50:45.802 21369 21369 E AndroidRuntime: Device model : asus Nexus 7
    04-18 14:50:45.802 21369 21369 E AndroidRuntime: Device fingerprint: google/razor/flo:6.0.1/MMB29V/2554798:user/release-keys
    04-18 14:50:45.802 21369 21369 E AndroidRuntime:
    04-18 14:50:45.802 21369 21369 E AndroidRuntime: Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 8487000 but found 6587000. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@Integer/google_play_services_version" />

    The part it's complaining about does exist in both my Google Play Games manifest and my main manifest.

    I understand there's some kind of merge problem occurring as I have multiple AndroidManifest.xml files in the project, but I'm new to this stuff and I'm not sure how to resolve the issue. Could anyone walk me through the steps please?
     
  13. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    It's not the case for AndroidManifest merging problems because you got this error at runtime, not during the build time.
    I think, the reason of such an error is wrong Google Play Services library version.
    Please, contact The Stan's Assets Support Team for appropriate Google Play Services version.
    All the issues should be fixed!

    I can not attach this library here because it's size is 5.6 Mb and Unity Forum files size limit is 4Mb.
    So, please, contact support team and you will get this issues fixed in a short time.

    Best regards,
    Alex
     
  14. CrowbarSka

    CrowbarSka

    Joined:
    Dec 15, 2009
    Posts:
    192
    Thanks Alex, I will drop support an email and try to resolve this when I get home tonight.
     
  15. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    @AlexRay, Thanks for your suggestion and it worked for me :)
     
  16. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    @AlexRay, do you provide support for AppleTv? Does social sharing is possible in Apple Tv?
     
  17. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    For now, there are no Social Sharing features for tvOS platform.
    Most likely we will provide such a features in future, but I can not say exactly how much time it will take.
    So, please, keep looking forward to future plugin updates.

    Best regards,
    Alex
     
  18. Tarzan111

    Tarzan111

    Joined:
    Oct 8, 2014
    Posts:
    72
    Hi, i'm trying to use your social plugin for Facebook connectivity. (Just to get user id and friends name+id).

    But i have the following error when i'm trying to connect i have the folowing error :
    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Read permissions are not permitted to be requested with publish or manage permissions.'

    Screen Shot 2016-05-30 at 10.45.36 AM.png

    My permission are supposed to be correct, right?
    Screen-Shot-2016-05-30-at-11.13.51-AM.png Screen Shot 2016-05-30 at 11.08.36 AM.png

    I got this error on the "FacebookExample" scene. I got it too on the scene i'm working on it.



    I'm using :
    Unity 5.3.4f1
    Mobile social plugin 7.6
    Ultimate mobile 4.6.2
    FacebookSDK 7.5
     
  19. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Please, leave only one publish_actions Facebook permission in Mobile Social Settings window.
    Remove e-mail, public_profile and user_friends permissions, rebuild the project and retest it.
    I think, it should resolve the issue you have with your project.

    Best regards,
    Alex
     
  20. Tarzan111

    Tarzan111

    Joined:
    Oct 8, 2014
    Posts:
    72
    Great, it works.
    Will it be possible with only publish_actions Facebook permission to get :
    -user id + name
    -Friend id + name (friend who already logged in)
    -Invite friend who didn't logged in yet

    Thanks
     
  21. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    I think publish_actions permission will be enough for all the functionality you mentioned.
    Anyway, you should test your application to be sure, that you are ready to go with Facebook SDK integrated.

    Cheers!
     
  22. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    @Tarzan111
    Facebook documentation is very good. publish_action is not enough.

    You need following:
    -user id + name : None
    -Friend id + name (friend who already logged in) : user_friends
    -Invite friend who didn't logged in yet: game must be present on facebook canvas
     
  23. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    Hi, kinda doubling my bets as have emailed support, but want to ask here too...

    Does the plugin require coding work in the Android and iOS exported projects from Unity? I am not an Android developer and so the thought of opening Eclipse (well I have Android Studio) to tweak code is not something I am comfortable with?

    Can the plugin be added to Unity, I develop the bits I need in Unity, export to Android and iOS and it...works?

    Thanks in advance
     
  24. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Mobile Social Plugin DOES NOT require any Java or Objective-C programming skills.
    You just build from Unity and you are ready to go with your project.

    Cheers!
     
    elpuerco63 likes this.
  25. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    Thanks, off to Store to purchase :)
     
  26. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    Hi, I have bought this and started clear project, followed the instructions to add app to Twitter and now trying to build the twiiter example for Android and it keeps failing with this:

    CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
    /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/ppp/Documents/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -

    stderr[

    ]
    stdout[
    Warning: [Temp/StagingArea/AndroidManifest-main.xml:4, /Users/ppp/Documents/programming/Unity/Projects/MobileSocial/Temp/StagingArea/android-libraries/an_social/AndroidManifest.xml:3] Main manifest has <uses-sdk android:targetSdkVersion='18'> but library uses targetSdkVersion='23'
    Warning: [Temp/StagingArea/AndroidManifest-main.xml:4, /Users/ppp/Documents/programming/Unity/Projects/MobileSocial/Temp/StagingArea/android-libraries/androidnative/AndroidManifest.xml:3] Main manifest has <uses-sdk android:targetSdkVersion='18'> but library uses targetSdkVersion='21'
    ]
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.HostView:OnGUI()

    It also keeps complaining about targetSdkVersion="18" but expects 21 for one thing and 23 for another?

    :-(

    Help..
     
    Last edited: Jun 16, 2016
  27. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Please, open your main Assets/Plugins/Android/AndroidManifest.xml file and edit the following line
    Code (CSharp):
    1. <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="23" />
    I think, you have android:targetSdkVersion="18" in your project.
    So, please, make sure you use exactly android:targetSdkVersion="23" and you will be ready to go.

    Cheers!
     
  28. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    Thanks, currently in contact via support email and they have copy of project to see what is wrong, will update here when I hear back.
     
  29. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    OK, I have at last got this working, was not as straight forward as hoped, but now it is working I'm happier.

    I would really appreciate if the following questions could be answered please?

    1.
    Given I was told I had to remove this from the Android Manifest in order to resolve the non compile problem:
    <meta-data android:name="com.google.android.gms.version" android:value="
    @Integer/google_play_services_version" />
    Why is this in the downloaded package?

    2.
    Is there a check that can be made to determine if the user had Twitter app installed on their device? Is there a way to determine if the user has Twitter app installed on their device as ideally my app should automatically either open the post message in Twitter app if installed or supply a connect button to connect via the web interface.

    3.
    The documentation seems to be out of date? Although there is an example scene it takes some time to track through what each bit is doing where as if the documentation had a tutorial, or steps to create the correct setup would be much better.
     
  30. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    1. All our plugins have the similar logic for plugin installation/reinstalling/removing.
    Additionally, each plugin has its own Android manifest merging implementation.
    As a result, each plugin will merge required tags into main AndroidManifest.xml file depending on the settings of the plugin.
    <meta-data android:name="com.google.android.gms.version" android:value="@Integer/google_play_services_version" /> - this tag is required for Android Native plugin and most likely exists in your manifest file by mistake.
    This case will be checked and fixed on our side.

    2. Yes, there is such kind of API. Please, check the documentation here.

    3. What documentation looks out of date for you? Please, provide me a link. I'll assign documentation update task for our engineer. What additional tutorial do you need?


    Cheers!
     
  31. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    Regarding 1. I have found that now when I import the package into my working project (the one I bought the package for) it breaks my app! It does not merge the Android manifests? I'm going through trying to identify the bits I need to merge...but not very good :-(

    Regarding 2. Will check it out, but looks like Android only so will need to find one for iOS too.

    Regarding 3.
    Open Windows → Mobile Social Plugin → Edit Settings
    should be
    Windows → Stan's Assets → Mobile Social Plugin → Edit Settings

    Guide doe not mention the "Install Plugin" button after importing package. I did not have tab selected so did not see this immediately

    Plugin version displayed in guide shows 2.3....current version 7.7

    I'm not trying to be picky just pointing out given the package in now 5 major versions on...maybe guide should be updated too?

    Regarding tutorial, now that I am getting with it probably not a deal breaker, but would have been nice to have one that complete the circle re setting up the app on Twitter then trough to Unity...create connect button, etc etc.

    Don't get me wrong, now I am getting the plugin to work I am a happy bunny and think it is cool...just feel there is room for improvement especially for those new to social media in Unity.

    Also....can you let me know what parts of the plugin import can I ignore so as not to import if I only want to use Twitter?
     
    Last edited: Jun 21, 2016
  32. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    At first, I want to say, that you should not edit the main AndroidManifest.xml file manually.
    Mobile Social Plugin will automatically merge-in all the needed tags for correct plugin's work.
    So, please, don't lose your time for manual manifest editing.

    The documentation will be updated in future. We work on improving our documentation permanently.
    Please, keep looking forward.

    If you want to use Twitter functionality only, please, set up your Mobile Social plugin as following
    screen18.png

    Just enable Twitter and Image Sharing options (if you are going to use image sharing).
    If you are not going to use Facebook SDK, just don't import it into your project.
    Otherwise, feel free to remove it from your project and all the Facebook SDK resources will not be included into your final build package.

    Best regards,
    Alex
     
    elpuerco63 likes this.
  33. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    This is great news and very helpful thanks!

    Re the manifest, I had to add manually the original parts from my app as the plugin did not merge and so things like camera use etc were omitted even though in my original manifest before I added plugin?
     
  34. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    I have been trying for some time now to post a users tweet, with some added tags and an image but although when I use a connect button to authenticate using Chrome which successfully authenticates my app when I try to post I get this error:

    D/AndroidNative﹕ 401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
    {"request":"\/1.1\/statuses\/update_with_media.json","error":"Read-only application cannot POST."}

    I am new to this twitter posting in Unity..well in others too...so do not understand this? I have the key and secret set and it is ok to authenticate but not post?

    I use this to post: PTwitter.instance.Post(usersTweet.text + "\n" + preTweet.text, ImageToShare);
     
  35. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    What the plugin version do you use in your project?
    I think, this kind of issue took place earlier but was fixed with the previous(or last) update.
    So, if you are not os the latest version, please, feel free to update the plugin in your project.
    All the issues should be fixed.

    If any issues will take place, please, feel free to ask for assistance.

    Cheers!
     
  36. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    I'm using package 7.7. I found that the access token and access token secrets needed entries, after I did that it all works:

    Did you see my post above re Android manifest not merging?
     
  37. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    When I said, that Mobile Social plugin will merge-in all the needed tags automatically, I mean following.
    The only tags needed for Mobile Social will be added. Nothing more.
    Any other additional tags you should provide manually.

    E.g. if you use other plugins you should add needed tags manually.
    Or you may have some tags unique specific for your application.
    In such a cases the responsibility for proper manifest configuration is on you.

    Cheers!
     
  38. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    Ok that makes sense....but the package replaced my existing manifest and so I had to resort to a backup copy to restore the parts that were previously there. So from my experience the MSP merge is destructive to existing manifest?
     
  39. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    The best approach is to import the plugin at first. Next step is to install the plugin.
    And after that, you should add to the main manifest all the tags specific to your application and other third-party plugins.
    In such a case your manifest data will not be removed/rewritten by Mobile Social.
    As I said earlier, Mobile Social will not replace the full manifest, but add the needed tags for the own functionality.

    I can not see any kind of bad experience with this logic.
    Your manifest data is safe. Mobile Social manifest tags are added automatically.
    This approach will prevent a lot of mistakes related to manual manifest editing.

    Cheers!
     
  40. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    My iOS build is failing with error re plugin?

    I then after research found if I added the frameworks messageUI, Social and Accounts it compiles.

    Should these not have been added automatically by the plugin?



    ld: warning: arm64 function not 4-byte aligned: ltmp0 from /Users/me/Desktop/appname/Libraries/libiPhone-lib.a(PLCrashAsyncThread_current-5565F35D16E4818B.o)

    ld: warning: arm64 function not 4-byte aligned: _Unityplcrash_async_thread_state_current from /Users/me/Desktop/appname/Libraries/libiPhone-lib.a(PLCrashAsyncThread_current-5565F35D16E4818B.o)

    "_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
    objc-class-ref in ISN_SocialGate.o
    "_ACAccountTypeIdentifierTwitter", referenced from:
    -[IOSTwitterPlugin authificateUser] in ISN_SocialGate.o
    -[IOSTwitterPlugin loadUserData] in ISN_SocialGate.o
    -[IOSTwitterPlugin IsTwitterAuthed] in ISN_SocialGate.o
    "_OBJC_CLASS_$_SLComposeViewController", referenced from:
    objc-class-ref in ISN_SocialGate.o
    "_SLServiceTypeFacebook", referenced from:
    -[ISN_SocialGate fbPost:url:media:] in ISN_SocialGate.o
    "_OBJC_CLASS_$_SLRequest", referenced from:
    objc-class-ref in ISN_SocialGate.o
    "_OBJC_CLASS_$_ACAccountStore", referenced from:
    objc-class-ref in ISN_SocialGate.o
    "_OBJC_CLASS_$_SLComposeServiceViewController", referenced from:
    objc-class-ref in ISN_SocialGate.o
    "_SLServiceTypeTwitter", referenced from:
    -[ISN_SocialGate twitterPost:url:media:] in ISN_SocialGate.o
    ___32-[IOSTwitterPlugin loadUserData]_block_invoke in ISN_SocialGate.o
    -[IOSTwitterPlugin postWithMedia:media:] in ISN_SocialGate.o
    -[IOSTwitterPlugin post:] in ISN_SocialGate.o
    -[IOSTwitterPlugin IsTwitterAvaliable] in ISN_SocialGate.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
     
    Last edited: Jun 27, 2016
  41. loko08

    loko08

    Joined:
    Oct 6, 2013
    Posts:
    57
    I have the same issue el puerco is having , shouldn't the iOS deploy plugin deal with this??

    Weird
     
  42. loko08

    loko08

    Joined:
    Oct 6, 2013
    Posts:
    57
    Also, we are getting a horrible crash whenever we try to use the MSP to log to facebook on iOS 9.3. Application crashes.

    this lines in main.mm


    Code (CSharp):
    1.  
    2. #include "RegisterMonoModules.h"
    3. #include "RegisterFeatures.h"
    4. #include <csignal>
    5.  
    6. // Hack to work around iOS SDK 4.3 linker problem
    7. // we need at least one __TEXT, __const section entry in main application .o files
    8. // to get this section emitted at right time and so avoid LC_ENCRYPTION_INFO size miscalculation
    9. static const int constsection = 0;
    10.  
    11. void UnityInitTrampoline();
    12.  
    13. // WARNING: this MUST be c decl (NSString ctor will be called after +load, so we cant really change its value)
    14. const char* AppControllerClassName = "UnityAppController";
    15.  
    16. int main(int argc, char* argv[])
    17. {
    18.     @autoreleasepool
    19.     {
    20.         UnityInitTrampoline();
    21.         UnityParseCommandLine(argc, argv);
    22.  
    23.         RegisterMonoModules();
    24.         NSLog(@"-> registered mono modules %p\n", &constsection);
    25.         RegisterFeatures();
    26.  
    27.         // iOS terminates open sockets when an application enters background mode.
    28.         // The next write to any of such socket causes SIGPIPE signal being raised,
    29.         // even if the request has been done from scripting side. This disables the
    30.         // signal and allows Mono to throw a proper C# exception.
    31.         std::signal(SIGPIPE, SIG_IGN);
    32.  
    33. [B]        UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String:AppControllerClassName]);[/B]
    34.     }
    35.  
    36.     return 0;
    37. }
    The line 32 is where the crash is. This didn't happen before,and does not happen on android. Also the error elpuerco is getting is fixed if you have iOS native installed.

    Finally, I already tested the Facebook SDK and it's examples and it does work fine. The problem is with MSP.
     
    Last edited: Jun 27, 2016
  43. Tarzan111

    Tarzan111

    Joined:
    Oct 8, 2014
    Posts:
    72
    Hi, i manage to load friend list and store information (friends id, friends name, friend profile picture) into arrays.

    Is there a way to hide the facebook friend selector popup or automatically close it once it's open and friend list has been loaded? I'd like to do my own design for the friend selector.

    Thanks
     
  44. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    It looks like you have few frameworks missing:
    • Social.framework
    • Accounts.framework
    • MessageUI.framework
    • MobileCoreServices.framework
    Please, add this frameworks into your XCode project.
    The build issues should be fixed.

    Cheers!
     
  45. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Please, could you clarify what APIs do you actually use?
    What facebook friend selector popup do you mean?

    Provide me more detailed information and I'll be able to guide you in this case.

    Cheers!
     
  46. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    You have some errors in your application at runtime.
    As you can see, UIApplicationMain is the main application method of Unity iOS application.
    So, of course, this method does not even exist in Android application at all.

    The error inside this function may indicate, that you are doing something wrong within your application.
    Just some kind of generic error. But there are some ways to find out the reason for such behavior.
    If you look in the XCode debugger it will probably tell you what caused the error. It may happen due to insufficient memory (too many items on screen at once). Either way, look at the target debugger for what caused the error.

    Best regards,
    Alex
     
  47. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    Hi Alex,

    yes I already have done so and all works well, but surely either these should have been added by the package or at list have these details in the documentation?

    Great plugin, does the job a treat but little things like this takes the polish of it.
     
  48. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Here is the documentation for the very basic Mobile Social plugin setup.
    All the frameworks mentioned above are listed there.

    I think, it will be useful for you.
     
  49. loko08

    loko08

    Joined:
    Oct 6, 2013
    Posts:
    57
    Alex, am not doing anything wrong. I am running your example scene.Just that. That's where the crash is happening. Tested on an iPhone 6 plus with iOS 9.3 latest Xcode.

    You did the same thing last time, you tried to dismiss my report as my fault, just to later acknowledge the issue. Please look into it with the latest beta 5.4.0b20
     
  50. elpuerco63

    elpuerco63

    Joined:
    Jun 26, 2014
    Posts:
    271
    This is very helpful yes, but again highlights the fragmentation in documentation/help as the guide I have been reading is MobileSocialPlugin.pdf which comes with the package, it does not include this part re iOS frameworks.

    I do not see any reference in that pdf to checkout Union Assets?

    Again, I'm not complaining as now I have the plugin working and can see how it works I'm very happy, I'm just saying that for a great plugin the documentation lets it down.