Search Unity

[Released] IOS Native Unity3D Plugin

Discussion in 'Assets and Asset Store' started by lacost, Apr 22, 2013.

  1. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    iOS Native plugin doesn't have such a features like in-game subview or any other custom in-game UI.
    More detailed information about iOS Native features you can find here. Hope, this information will help you.
     
  2. InfinityCoder88

    InfinityCoder88

    Joined:
    Oct 4, 2013
    Posts:
    250
    Hello @AlexRay ,

    I got an issue with facebook connect on iOS build, I'm using in my project ANP & iOS Native, on Android build the connections with Facebook works fine, but on iOS not :(...where or how to modify permissions for FB on iOS build?
    Thanks in advance!

     
  3. indie_dev85

    indie_dev85

    Joined:
    Mar 7, 2014
    Posts:
    45
    hi,
    I am implementing custom leaderboards in my game using ios native.
    But for some reason i am getting two entries after loading the leaderboard score object,whereas in actual gamecenter there is only one player data.
    1 entry with some junk/unknown name having Rank 0.
    2 entry having mine actual score,verified by going to gamecenter with Rank 1.

    Can you please suggest what might be the reason for this junk value load up?
     
  4. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Please, make sure, that all these permissions are enabled in your Facebook Developer Dashboard.
    Of course, your app needs to be reviewed to get all this stuff working.
    Make sure, that all this is enabled and ready to go.

    If you will have any kind of additional questions, please, feel free to contact our support engineer for further questions.
     
  5. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Looks quite strange. Can you just recreate the leaderboard from your iTunesConnect console or clear all data from the existing one? I believe, it will help in most cases.
     
  6. dmko

    dmko

    Joined:
    Jun 15, 2014
    Posts:
    65
    I have built a small test case for url scheme handling, and when I run it (i.e. open the scheme from safari) I get a crash similar to: https://github.com/facebook/facebook-sdk-for-unity/issues/48

    (... Terminating app due to uncaught exception 'NSInvalidArgumentException' ...)

    Adding in the fix on that site (i.e. to the generated UnityAppController.mm - actually the fix at https://github.com/facebook/facebook-sdk-for-unity/issues/48) fixes the crash - but then no data is getting passed to the app.

    Here's the C# code in case it helps:

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;

    namespace Scenes.Main
    {
    public class MainController : MonoBehaviour
    {

    public string scheme;
    public string dataToSend;
    public Text status;

    void Start() {
    var url = SA.IOSNative.Core.AppController.LaunchUrl;
    if(!url.IsEmpty) {
    parseFullUrl(url.AbsoluteUrl);
    }

    SA.IOSNative.Core.AppController.OnOpenURL += GotUrlFromScheme;

    }

    void GotUrlFromScheme(SA.IOSNative.Models.LaunchUrl url) {
    parseFullUrl (url.AbsoluteUrl);
    }

    void parseFullUrl(string fullUrl) {
    showStatus (fullUrl);
    }

    void showStatus(string data) {
    status.text = data;
    }
    }
    }
     
    Last edited: Mar 29, 2017
  7. dmko

    dmko

    Joined:
    Jun 15, 2014
    Posts:
    65
    OK - updating Unity to 5.2.2 fixed the crash, but it's still not working when visiting the scheme in safari.

    It does open the app - but the GotUrlFromScheme() is not being called
     
  8. Infernospeed

    Infernospeed

    Joined:
    Nov 6, 2013
    Posts:
    5
    Hi is the Facebook post and twitter post have an issue on Version: 9.6/18 (Mar 24, 2017)? I seem to get a failed post notification when I test the facebook and twitter posts. Facebook and Twitter is installed on the phone. Anyways Native sharing is working. Thanks!
     
  9. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    I would recommend you to contact our support team according to this case.
    Usually, it's quite a hard to help you with this case in a forum circumstances.

    Provide as more detailed information as you can. All the logs/screenshots with your description will help to fix your project.
    So, please, go ahead and you will get great support in a short time.
     
  10. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Thank you for this report. I'll check this case on my side and the fix will be provided if any kind of issue will be detected.
    Thank you for your patience and understanding!
     
  11. duckizz

    duckizz

    Joined:
    Mar 15, 2015
    Posts:
    9
    Hi team!
    I know you can call all leaderboards by using
    GameCenterManager.ShowLeaderboards ().
    However we want to set the GK_TimeSpan for each of the leaderboards separately. Is there a way to use ShowleaderBoards and while it is pulling the info, have iosnative set the GK_timespan for each or one specific leaderboard? thanks
     
  12. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    There is no option to predefine the leaderboard timespan.
    It's not the plugin limitation, but the Game Center implementation itself.

    Please, take a look at the Game Center UI

    image8.png

    You can see, that an option for selecting/filtering leaderboard records by timespan is related to the player itself.
    Of course, you can find the same information in the official Game Center information.
     
  13. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    579
    Hi,
    I have my application localized in multiple languages, and I switch the current Culture to the corresponding one, so that number formatting and special letters (see Turkish) are handled correctly.
    I suspect that this could be the reason why I'm getting this exception from some users:

    FormatException: String was not recognized as a valid DateTime.
    System.DateTime.CoreParse (System.String s, IFormatProvider provider, DateTimeStyles styles, DateTime& result, DateTimeOffset& dto, Boolean setExceptionOnError, System.Exception& exception)
    GK_SavedGame..ctor (System.String id, System.String name, System.String device, System.String dateString)
    ISN_GameSaves.DeserializeGameSave (System.String serializedData)
    ISN_GameSaves.OnSaveSuccess (System.String data)

    I don't know if, maybe, specifying the CultureInfo.InvariantCulture to your Parse call could resolve the issue.
    Do you confirm that this could be a possible fix?

    Edit:
    Also, another possible option to consider.
    Quoting this documentation https://developer.apple.com/reference/foundation/nsdateformatter?language=objc
    - For most fixed formats, you should also set the locale property to a POSIX locale ("en_US_POSIX"), and set the timeZone property to UTC.
    But in your source code, there is no locale and timezone set.
     
    Last edited: Apr 20, 2017
  14. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello!
    I added this issue report to our bug-tracker. Our developer will work on it.
    General tests will be performed on our side. The fix will be provided if any kind of issues will be detected.

    Of course, you can contact our support team and ask for the status of this case any time you want.
    Thank you for this report!
     
  15. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
    Hi there,

    Nice plugin however I have a question :) and a problem :(

    - Is there something that I could check internet connectivity? I know that native iOS can send event based on network state, and it can also be done in Xamarin. Is there something similar in your plugin?

    And my problem: I have setup In-App Purchases in the plugin, and in iTunes connect. I've put apple id in settings. However it comes up with an error when my store launches that no products could be found, and the ids could not be found... Any ideas please? I only want to test it on my own iPhone.
     
  16. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    No, there is no functionality for checking the internet connection. All the APIs needed for checking it are already implemented on the Unity side.

    I am not quite sure what event based on network state are you talking about. Anyway, according to Xamarin, I want to tell, that our plugin is Unity oriented. I am not sure, that it will be ready to go with integrating into Xamarin native plugins workflow. Of course, you can try it, but make this decision at your own risk.

    To be able to test your In-App purchases you have to publish your in-app products in your iTunesConnect dashboard.
    Please, take a look at our In-App Purchases integration guide for iOS Native plugin.
    Most likely you will find the answer to your questions according to proper testing flow.
     
  17. BenoitFreslon

    BenoitFreslon

    Joined:
    Jan 16, 2013
    Posts:
    136
    Hello,

    I would like to get the iOS native events like

    -> applicationWillResignActive()

    -> applicationDidEnterBackground()

    -> applicationWillEnterForeground()

    -> applicationDidBecomeActive()

    But the AppEventHandlerExample not seems to work on a clean Unity Project.

    Any help?
     
  18. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    First of all, please, make sure that you followed this guide.
    If you still get any difficulties, please, feel free to contact our support team for an assistance.
    Please, go ahead, you will get great support in a short time.
     
  19. tonycsharks

    tonycsharks

    Joined:
    Dec 31, 2015
    Posts:
    25
    Hi,

    I have been using Stans Assets version 7.6 in my project. Now today I have downloaded and imported Mobile Native PopUps plugin from asset store. After that I'm getting many errors as shown below:

    Can you please help me to fix this issues. Thanks in advance
     
  20. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    All these compilation errors you get related to plugins resources conflict.
    As you mentioned in your message, you have iOS Native v7.6 and imported the latest version Mobile Native Popups.
    All our plugins have the common part in it. I mean, the part which is the same for all the plugin.

    The iOS Native and Mobile Native Popups plugins in your project differ too much.
    Please, update to the latest iOS Native plugin version to move to the same common source.
    Most likely, all these compilation errors have to be fixed.
     
  21. tonycsharks

    tonycsharks

    Joined:
    Dec 31, 2015
    Posts:
    25
    I can't update the plugin because it will cause many issues to our project which has already been published. Is there any d workaround for this?
     
  22. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Yes, I think there is some different workaround. Please, contact our support team and ask for an older Mobile Native Popups version compatible with the iOS Native plugin v7.6
    You will get the right compatible package and will be ready to go with your project.
     
  23. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    779
  24. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    This feature looking good! Please, contact our support team and leave the new feature request.
    Most likely this feature will be available with the following official update.
    Thank you!
     
  25. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    182
    Why do you change the names of the classes, methods and namespaces with almost every release? Every time I come to use this plugin on a new project I have to spend a lot of time fixing errors and refactoring because the names of everything has changed. Please think of a final naming convention and stick to it or mark methods as deprecated for a few releases to ensure backward compatibility.
     
  26. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
    Hi, I've got a question.
    I made my in app purchase screen, and added all the in app purchases. I added them to my iap on the apple website. What is the course of action now in order to test them out, because It says that they are ready for submit however they don't actually load up in the app yet. Do I need to submit my app to test IAP? The app is not completed fully yet, so will they actually accept it? I'm a bit confused.
     
  27. BenoitFreslon

    BenoitFreslon

    Joined:
    Jan 16, 2013
    Posts:
    136
    Hello,

    I just discover that you can add "New Languages" in the Xcode project.
    That's perfect to add languages in the iTunes Store page but I don't how this feature works.

    It just adds new folder in the Xcode Project.



    In the Xcode folder


    In the Xcode project


    I thought The Xcode deploy plugin will add automatically the languages.
     
  28. BenoitFreslon

    BenoitFreslon

    Joined:
    Jan 16, 2013
    Posts:
    136
    By the way the App Events API is not working when the app is terminated

    The applicationWillTerminate event is never triggered.
    I added the WillTerminate event in the Example script:

    Code (CSharp):
    1.         AppController.Subscribe ();
    2.         AppController.OnApplicationDidReceiveMemoryWarning += OnApplicationDidReceiveMemoryWarning;
    3.         AppController.OnApplicationDidBecomeActive += HandleOnApplicationDidBecomeActive;
    4.         AppController.OnApplicationWillTerminate += HandleOnApplicationWillTerminate;

    Code (CSharp):
    1. -> applicationWillResignActive()
    2. -> applicationDidEnterBackground()
    3. -> applicationWillTerminate()
    4. Setting up 1 worker threads for Enlighten.
    5.   Thread -> id: 41299000 -> priority: 1
    6. ##unity-automation:{"messageType":"MemoryLeaks","allocatedMemory":928128,"memoryLabels":[{"Permanent":2272},{"NewDelete":904560},{"Thread":8},{"Manager":56},{"GfxDevice":8},{"Mono":672},{"BaseObject":4360},{"String":784},{"DynamicArray":12160},{"ScriptManager":816},{"CloudService":2272},{"SceneManager":108},{"EditorGui":52}]}
    7.  
     
  29. NathanWarden

    NathanWarden

    Joined:
    Oct 4, 2005
    Posts:
    663
    I'm getting the error "Cannot Send Friend Requests" with the description of "Adding Game Center friends is no longer supported". I'm using the GK_FriendRequest. Is there something else I should be using to send a friend request? I know it's supposed to go through iMessage now, but have no idea where to even start.

    Thanks :)
     
  30. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Please, check our documentation about In-App Purchases testing on iOS platform.
    Most likely you will find the answers to your questions.
     
  31. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    The error description answers for itself. Friend requests have been deprecated from the Apple side.
    We didn't remove this APIs from the plugin because of legacy purposes.

    Please, refer to the official Apple documentation according to this case.
    Hope, you will find the answers to your questions.
     
  32. Stans-Assets

    Stans-Assets

    Joined:
    Jun 20, 2014
    Posts:
    57
    These languages designed for the description of your application in the App store:

    You need to provide each language which your application will use(means all localizations for your game).
    iOS Deploy will't add automatically the languages.
     
  33. Stans-Assets

    Stans-Assets

    Joined:
    Jun 20, 2014
    Posts:
    57
    Sorry for inconvenience. It was the problem from our side.
    Could you replace this file with new one please?
     

    Attached Files:

  34. BenoitFreslon

    BenoitFreslon

    Joined:
    Jan 16, 2013
    Posts:
    136
    Hello,

    I discover that Unity also export Android Native classes in the Xcode project:

    Like AddressBookController.cs

    That's weird because it's not in the Plugin/iOS folder.



    When an error occurs in Xcode got this:

    Code (CSharp):
    1. NullReferenceException: A null value was found where an object instance was required.
    2.  
    3.   at AddressBookController.parseContacts (System.String data) [0x00000] in <filename unknown>:0
    4.  
    5.   at EnigmBoxPlugin.pocketsphinxDidDetectFinishedSpeech (System.String message) [0x00000] in <filename unknown>:0
    That's weird because I never use this class name too.
     
  35. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    1. This is fully correct behaviour. All the scripts have to be included in your final build.
    Of course, these Android platform-related scripts are not usable on iOS platform, but they are included in the XCode project build. And this is 100% right behaviour.
    Even more, not the only scripts from Plugins/iOS folder will be included. But all the scripts from your entire solution (except for Editor scripts) will be included.

    2. AddreddBookController contains the features for Android platform. Not for iOS.
    But, as I correctly understand, you use this script on iOS platform. This is a mistake.
    Please, check this document for Contacts feature on iOS platform.
     
  36. BenoitFreslon

    BenoitFreslon

    Joined:
    Jan 16, 2013
    Posts:
    136
    Thanks for your response.
    Actually I don't use the Contact API in the iOS Native.
    However I will uncheck the "Contact API" in the "IOS Native settings"
     
  37. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    636
    Any plans to integrate taptic engine in iOS native? :)
     
    AlexRay likes this.
  38. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hi,
    Sounds like a good idea! I will consider this feature with my team.
    You can contact our support team and ask any information you want.
    Please, go ahead, you are welcome!

    Thank you!
     
  39. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    636
    Awesome, thanks for the quick reply. Hopefully the team agrees with us, that it's a good idea!
     
  40. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
    I have followed the instructions here https://unionassets.com/iosnative/manage-in-app-purchases-8

    However, I'm getting an error "Invalid Product Id"

    2017-05-31 13:07:10.442756 elsapp[4214:711543] ISN_NativeLog: Total loaded products: 0

    2017-05-31 13:07:10.442906 elsapp[4214:711543] ISN_NativeLog: Invalid product id: com.els.elsapp.bundle1

    2017-05-31 13:07:10.454272 elsapp[4214:711543] ISN_NativeLog: InAppPurchaseManager, no products avaiable

    Any ideas why? I wish the error would give more info....

    Also in the error "avaiable" is spelled wrong:p
     
  41. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Most likely you didn't configure you iTunesConnect console in a proper way.
    Please, double check it to be sure that everything is ready to go.
    All the in-app purchases have to be published to make them able to test.
    Of course, all your information as a developer has to be consistent (tax info etc).
     
  42. BenoitFreslon

    BenoitFreslon

    Joined:
    Jan 16, 2013
    Posts:
    136
    Hello,
    I got this error in MonoDevelop but everything is OK in Unity and I can build and run my project.

    Code (CSharp):
    1. /Assets/Plugins/StansAssets/Modules/IOSDeploy/Scripts/Editor/ISD_PostProcess.cs(23,23): Error CS0234: The type or namespace name `Xcode' does not exist in the namespace `UnityEditor.iOS'. Are you missing an assembly reference? (CS0234) (Assembly-CSharp-Editor-firstpass)
    In Unity the target is set to iOS and the module is installed.
     
  43. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    I would recommend you to update the plugin version in your project.
    We had an update yesterday. So, please, feel free to update to the latest version of the plugin available in the Asset Store. I believe, all the issues will be fixed and you will be ready to go with your project.
    If you will have any kind of issues, please, feel free to contact our support team.
     
  44. Defero

    Defero

    Joined:
    Jul 9, 2012
    Posts:
    200
    Does invite friends exist anymore for friends. I know they removed the old one.

    Is there anyway now for players to invite friends?
     
  45. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    It's quite an old update by Apple. Please, refer this article. All the new approaches for friend invites described pretty well.
    I would recommend you to contact our support engineer. Feel free to ask any kind of information you need.
     
  46. BenoitFreslon

    BenoitFreslon

    Joined:
    Jan 16, 2013
    Posts:
    136
    Hello,

    Can you add in the ISN_AppController.mm?

    The event:

    Code (CSharp):
    1. - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
    2. {
    3.     NSLog(@"didRegisterUserNotificationSettings");
    4.     //register to receive notifications
    5.    
    6.     [application registerForRemoteNotifications];
    7. }
    Thanks.
     
  47. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    As you can see from official Apple documentation, this API is deprecated.
    So, at this moment we are not going to implement this feature.
    Anyway, you can contact our support engineer, explain your situation. Most likely you will get good advice to resolve such a cases.
     
  48. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    317
    Hi,
    I wish to ask about Google+ login feature. You provide it in Android plugin version only. Seems it included to Google Play Service setup. But what about iOS? I had a request to add Google+ login to share the friends list using Gamesparks. What I need is only auth token, nothing more. The only solution I did find is Firebase service, but because of it's requirements it's not acceptable.
    Do you plan to include it to iOS native plugin?
     
  49. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    There are some plans to integrate Google login into iOS Native plugin.
    Please, feel free to contact our support team and leave a feature request.
    Probably, this feature will be available with the following official update, but I'm not 100% sure about it.
    Keep in touch and check the update version notes for the new features in the plugin.
    Thank you!
     
  50. KerfuffleMonkeyGames

    KerfuffleMonkeyGames

    Joined:
    Jun 27, 2016
    Posts:
    9
    Hi,

    Using the SDK's social share example code for Facebook doesn't put the texture or text message into the dialogue box.

    Texture2D tex = new Texture2D( width, height, TextureFormat.RGB24, false ); IOSSocialManager.Instance.FacebookPost("My app Screenshot", null, tex);

    The sample code works for Twitter. Am I missing something?

    Thanks!
     
unityunity