Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Introducing IOS Native Pro

Discussion in 'Assets and Asset Store' started by lacost, Jun 7, 2018.

  1. jason416

    jason416

    Joined:
    Nov 8, 2018
    Posts:
    25
    Hi,
    Could you add support for AVAudioSession.CategoryOptions?

    I would like to access duckOthers specifically but it would be great to access all the options.


    Code (CSharp):
    1. static var duckOthers: AVAudioSession.CategoryOptions { get }
     
  2. erre-rox

    erre-rox

    Joined:
    Dec 3, 2012
    Posts:
    19
    Hi,
    I have fixed the whole purchase flow with the new Plugin. The last problem we have is the AppStore Receipt.
    I'm calling
    Code (CSharp):
    1. ISN_SKReceiptRefreshRequest req = new ISN_SKReceiptRefreshRequest(null);
    2.             req.Start(receiptCallback);
    just after the OnTransactionUpdate has returned the Purchased state.

    When the Receipt callback arrives, I'll pass the

    Code (CSharp):
    1. ISN_SKAppStoreReceipt receipt = ISN_SKPaymentQueue.AppStoreReceipt;
    2. string receiptToValidate = receipt.AsBase64String;
    to the validation flow. Microsoft-PlayFab backend service is returning me that the receipt does not contains the item.
    Reading your docs, I found this:

    For an application purchased from the App Store, use this property a to get the receipt.
    This property makes no guarantee about whether there is a file at the URL—only that if a receipt is present, that is its location.

    Does it mean that the ISN_SKAppStoreReceipt taken by ISN_SKPaymentQueue.AppStoreReceipt is a sort of receipt for the app purchase on the store and it's unrelated to every in-app purchase?
    If so, how can I get the receipt for the purchases?
     
  3. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    115
    Going through all the Social Media API and I see there's not too many documentation, I'm wondering several things:

    Isn't it possible to share videos in the allowed social networks? Specially taking into account we can use the Replay Kit to recording the game... I just see possibility to post Texture2D. Nowadays on Instagram this 'histories' or whatever they are called are very popular, isn't it possible to upload a history as a recording from the game?

    Update: Tried posting screenshot with Facebook, twitter, IG and WhatsApp and while with FB and Twitter the app dialog appeared to publish the screenshot, whith IG and WhatsApp this generic dialog appears:
    https://www.dropbox.com/s/5nwukcy7moj2r6l/IMG_9799.PNG?dl=0
    Thanks again.
     
  4. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Hi :)

    With the new update, it will be possible to share a video or any file by just providing the local file URL to the share dialog.


    Yep, Facebook and Twitter both have the dedicated share dialogs and system API. Any other social app would go through the default social dialog.
     
  5. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Yea, it's actually my bad as well. In the new version, the plugin will throw an exception if you'll try to use App Delegate API without App Delegate service enabled in the plugin settings.
     
  6. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    115
    Yeah but the problem is I have Instagram and WhatsApp installed an still that weird pop up came up, is it normal?

    Thanks
     
  7. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Yep, it's the way it should be. iOS does not provide any special treatment to those APPs. Only Facebook and Twitter will get they won fancy popups, everything else will be displayed in the standard sharing dialog.
     
  8. erre-rox

    erre-rox

    Joined:
    Dec 3, 2012
    Posts:
    19
    Hi @lacost,

    a small update: I've tried to print my app store receipt and decode it from this website:
    https://www.revenuecat.com/app-store-receipt-validator

    I've this:

    Code (JavaScript):
    1. {
    2.   "receipt": {
    3.     "receipt_type": "ProductionSandbox",
    4.     "adam_id": 0,
    5.     "app_item_id": 0,
    6.     "bundle_id": "com.reludo.shootingrangechallenge",
    7.     "application_version": "0",
    8.     "download_id": 0,
    9.     "version_external_identifier": 0,
    10.     "receipt_creation_date": "2020-03-02 15:34:40 Etc/GMT",
    11.     "receipt_creation_date_ms": "1583163280000",
    12.     "receipt_creation_date_pst": "2020-03-02 07:34:40 America/Los_Angeles",
    13.     "request_date": "2020-03-02 15:36:42 Etc/GMT",
    14.     "request_date_ms": "1583163402135",
    15.     "request_date_pst": "2020-03-02 07:36:42 America/Los_Angeles",
    16.     "original_purchase_date": "2013-08-01 07:00:00 Etc/GMT",
    17.     "original_purchase_date_ms": "1375340400000",
    18.     "original_purchase_date_pst": "2013-08-01 00:00:00 America/Los_Angeles",
    19.     "original_application_version": "1.0",
    20.     "in_app": []
    21.   },
    22.   "status": 0,
    23.   "environment": "Sandbox"
    24. }
    Is there something to do for Sandbox environment to update the receipt correctly with IOS Native Pro?
    Purchase flow seems to be okay, and the native dialog confirms that.

    Thanks for help.
     
  9. erre-rox

    erre-rox

    Joined:
    Dec 3, 2012
    Posts:
    19
    [FIX]
    It seems that FinishTransaction() call remove tha consumable items from the receipt. I've fixed reading the receipt before calling FinishTransaction().
     
  10. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Good to know, thanks for the update!
     
  11. matheusfantazm

    matheusfantazm

    Joined:
    Oct 3, 2018
    Posts:
    13
    Is there an easy way to import just parts of the plugin? We need it for a small feature (the date picker) and I'm not sure how much of the plugin I need to to implement that.
     
  12. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    matheusfantazm likes this.
  13. matheusfantazm

    matheusfantazm

    Joined:
    Oct 3, 2018
    Posts:
    13
    Thanks for the reply. I have another question: I'm using the date picker and I notice that there's no way to "close" or "cancel" the picker on my iOS device. The user is forced to choose a date. Is that intended behavior? If to, is it an iOS limitation, or a plugin limitation?

    Thanks in advance.
     
  14. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    It's not the iOS limitation, and this is intended behavior. But I think I will add close button option in the next update, I agree that it would make sense.
     
    matheusfantazm likes this.
  15. matheusfantazm

    matheusfantazm

    Joined:
    Oct 3, 2018
    Posts:
    13
    I'd appreciate if you did so. It's not a huge problem, but from an UX perspective, it's a bit weird that a selection popup can't be easily closed/cancelled.
     
  16. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Yea, I agree with that.
     
    matheusfantazm likes this.
  17. matheusfantazm

    matheusfantazm

    Joined:
    Oct 3, 2018
    Posts:
    13
    I just uploaded my app to the App Store and I received the following warning when the build was being processed:

    ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSPhotoLibraryUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data.

    I checked the iOS Native settings and that permission is disabled. The info.plist file doesn't contain that entry. Yet somehow, that Apple is recognizing API usage related to that permission, even though my app has never requested it and we don't do anything regarding photos at all.

    I suspect the plugin is somehow adding some API calls - even though I've explicitly told it I don't use that permission. I'm using iOS Native just for its date picker and wheel picker. Thus I believe I shouldn't require that permission.

    Am I missing something? How can I fix this?
     
  18. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    115
    First I would like to clarify some doubts I have about this API:
    https://unionassets.com/ios-native-pro/saving-a-game-662

    Not long ago I asked here if you offered the iCloud saving system:
    https://developer.apple.com/library...d.html#//apple_ref/doc/uid/TP40012094-CH2-SW1
    but you said it was not available due to low demand. Now that I look closer the SavingGame Api recommended by you....
    Whats the difference between the iCloud saving system and the Saving-Game API ? are not they using iCloud to save data? are not they syncing between devices with same appleid ?

    Also, is it possible to know where is this stored data? is it visible for the user somehow? can he tamper it? If you dont know, maybe knowing the native calls you have used to store this data can help me find the answer.

    Besides this, while using the SavingGame API, when calling from Editor :
    Code (CSharp):
    1.  ISN_GKLocalPlayer.FetchSavedGames((ISN_GKSavedGameFetchResult result) =>
    I'm not getting any answer, no exceptions and no result, is it normal? is not possible to use this feature to test through Unity editor?
    Thanks
    PS: I would appreciate a quick response since we have to decide as soon as possible which method we implement to continue with the development.
     
    Last edited: Mar 16, 2020
  19. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    115
    I will reply myself since I got almost every answer. Seems like this is using iCloud also and it syncs between devices, the info doesn't seem to be accessible by the user. Also, there's no way to use the iCloud api from Unity editor , at least thats the conclusion I came with.

    Now I found this problem, when using
    Code (CSharp):
    1. ISN_GKLocalPlayer.FetchSavedGames((ISN_GKSavedGameFetchResult result) =>
    First time on first run after new install, it always gives back 0 saved games, once you are inside the game you call the same method and gives you the correct saved games.

    The call to the method is one of the first things the algorithm does in the Awake stage, but as I said, it only gives false info the first run after the new install. Next runs give back the saved games correctly.
    Since I need to load the state of a game when the game just starts this is quite important.

    Any idea of why this might be happening?
    Thanks in advance

    EDIT: seems it's an iOS problem https://stackoverflow.com/questions...turns-0-games-on-installati/60728584#60728584
     
    Last edited: Mar 17, 2020
  20. jason416

    jason416

    Joined:
    Nov 8, 2018
    Posts:
    25
    How do you get the NewUI demo scene to work? I've added it to the build list as well as the two additional test scenes, but it doesn't seem work at all. I've tried on in the simulator and on Device SDK. Does it need iOS13?
     
  21. Colin_MacLeod

    Colin_MacLeod

    Joined:
    Feb 11, 2014
    Posts:
    153
    Hey @lacost is there any way to save a video to the gallery? I can see the API call for a texture2d but what about a video?

    We are capturing video using AVPro Movie Capture. I would like to let the user add these videos to their gallery.
     
  22. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Colin_MacLeod likes this.
  23. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Some of the plugin native files may have API that can trigger photo library API. I think Apple's code analyzer sees this and gives you a warning.

    Since this is just a warning you can feel free to ignore it. Or you can just add NSPhotoLibraryUsageDescription to your info.plist. Either way that would not cause any inconvenience for your application's users. If you never use this API user would never see permission request dialog.

    @pistoleta Sorry for the slow replay, were you able to figure it out? Or you still need assistance with that?
     
  24. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    115
    Almost everything. Although Im quite sure the Saved Game Events described on your documentation here are not being triggered.

    Also the way of calling the native functions with callbacks its quite a hassle since we have a complicated logic and we end up with dozens of callbacks but im looking for a way of making them async Task, I dont know if you could guide me briefly of which path to took for this adventure :D

    Something that we have been able to test too is, playing with 2 devices with same appleID of course... sometimes game saved on device B does not sync to device A, if we do several attempts, finally it does, but there is no tool, method or way to know when this is happening, also the documentation on apple's side is quite poor so it's hard to really know what's going on behind the scenes, like is there a local cache of the iCloud files? is there a way when was that cache lastly updated? is there a way to clear that cache so every time the file must be downloaded from iCloud? is there a way to know if my local cache has been uploaded to iCloud? is there ANY local cache at all?? All this looks like a big black box to me and I have so many doubts.

    I'm wondering if this is a bad solution for saving a game, or we took the wrong choice using this API (the Game Kit I mean) Since it seems impossible to assure the player is using the last save file.

    pistoleta.
     
    Last edited: Mar 27, 2020
  25. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    This API will be part of the next plugin update:

    Code (CSharp):
    1. using SA.iOS.UIKit;
    2. ...
    3. string videoPath = GetMyVideoPath();
    4. if (ISN_PhotoAlbum.UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(videoPath))
    5. {
    6.     ISN_PhotoAlbum.UISaveVideoAtPathToSavedPhotosAlbum(videoPath, result =>
    7.     {
    8.         if (result.IsSucceeded)
    9.             Debug.Log("Video saved.");
    10.         else
    11.             Debug.Log("Error: " + result.Error.Message);
    12.     });
    13. }
    https://github.com/StansAssets/com.stansassets.ios-native/wiki/Save-Video-to-Camera-Roll
     
    Colin_MacLeod likes this.
  26. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    115
    @lacost I dont know if you missed my post or you simply don't know any answer, but since then another doubt arises and its if we can know somehow if 1 device's saveGame has been synchronized to iCloud, we are using the Save Game API in your asset just in case you don't remember.
    The API works well, but if 1 device has poor connection there is no way to know if it's save game state was sync in iCloud or not. And thats quite a problem.
    Thanks.
    pistoleta.
     
  27. Colin_MacLeod

    Colin_MacLeod

    Joined:
    Feb 11, 2014
    Posts:
    153
    @lacost Hey thanks - that looks great.

    Any ETA on the next update?
     
  28. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    @pistoleta Sorry I was looking into it and wanted to answer properly a bit later... but the weekends and I totally forgot about that. I will try to give you a proper replay tomorrow.

    I am trying to release new update at the beginning of each month. So 2020.4 version is coming in a few days :)
     
    Colin_MacLeod likes this.
  29. SergeyBocharov

    SergeyBocharov

    Joined:
    Jul 30, 2017
    Posts:
    3
    Hi, I am using IOS Native Pro and followed your documentation.

    The build in XCode 10 was error-free and the application worked properly.
    But after upgrading to XCode 11, the sharing functionality does not work on iPad mini iOS13 ( on iPhoneX sharing ok ).

    This is our code for sharing method:

    var viewCtrl = new ISN_UIActivityViewController();
    viewCtrl.SetText("message");
    viewCtrl.ExcludedActivityTypes.Add(ISN_UIActivityType.Print);
    viewCtrl.ExcludedActivityTypes.Add(ISN_UIActivityType.AssignToContact);
    viewCtrl.ExcludedActivityTypes.Add(ISN_UIActivityType.SaveToCameraRoll);
    viewCtrl.ExcludedActivityTypes.Add(ISN_UIActivityType.OpenInIBooks);
    viewCtrl.ExcludedActivityTypes.Add(ISN_UIActivityType.MarkupAsPDF );
    viewCtrl.Present(OnComplete);

    This is XCode log from iPad:

    2020-03-31 14:43:11.539261+0300 adventure[2692:20836] IOSNative::Unity->Native method: _ISN_UI_SaveToCameraRoll data: {"m_Text":"message","m_Urls":[],"m_Images":[],"m_ExcludedActivityTypes":["com.apple.UIKit.activity.Print","com.apple.UIKit.activity.AssignToContact","com.apple.UIKit.activity.SaveToCameraRoll","com.apple.UIKit.activity.OpenInIBooks","com.apple.UIKit.activity.MarkupAsPDF"]}
    2020-03-31 14:43:11.540295+0300 adventure[2692:20836] Excluded activityType: com.apple.UIKit.activity.Print
    2020-03-31 14:43:11.540388+0300 adventure[2692:20836] Excluded activityType: com.apple.UIKit.activity.AssignToContact
    2020-03-31 14:43:11.540467+0300 adventure[2692:20836] Excluded activityType: com.apple.UIKit.activity.SaveToCameraRoll
    2020-03-31 14:43:11.540542+0300 adventure[2692:20836] Excluded activityType: com.apple.UIKit.activity.OpenInIBooks
    2020-03-31 14:43:11.540619+0300 adventure[2692:20836] Excluded activityType: com.apple.UIKit.activity.MarkupAsPDF
    2020-03-31 14:43:11.626247+0300 adventure[2692:20836] [LayoutConstraints] Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want.
    Try this:
    (1) look at each constraint and try to figure out which you don't expect;
    (2) find the code that added the unwanted constraint or constraints and fix it.
    (
    "<NSLayoutConstraint:0x2818b2210 LPLinkView:0x133f34b00.leading == UILayoutGuide:0x28012e140'UIViewLayoutMarginsGuide'.leading (active)>",
    "<NSLayoutConstraint:0x2818b36b0 H:[LPLinkView:0x133f34b00]-(59)-| (active, names: '|':_UIActivityContentTitleView:0x133f44220 )>",
    "<NSLayoutConstraint:0x28183c000 H:|-(0)-[_UIActivityContentTitleView:0x133f44220] (active, names: '|':_UINavigationBarContentView:0x133f4cde0 )>",
    "<NSLayoutConstraint:0x281820f50 _UIActivityContentTitleView:0x133f44220.trailing == _UINavigationBarContentView:0x133f4cde0.trailing (active)>",
    "<NSLayoutConstraint:0x2818df5c0 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x133f4cde0.width == 6 (active)>",
    "<NSLayoutConstraint:0x2818b3390 'UIView-leftMargin-guide-constraint' H:|-(16)-[UILayoutGuide:0x28012e140'UIViewLayoutMarginsGuide'](LTR) (active, names: '|':_UIActivityContentTitleView:0x133f44220 )>"
    )

    Will attempt to recover by breaking constraint
    <NSLayoutConstraint:0x2818b2210 LPLinkView:0x133f34b00.leading == UILayoutGuide:0x28012e140'UIViewLayoutMarginsGuide'.leading (active)>

    Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
    The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
     
  30. Benny_Zoeller

    Benny_Zoeller

    Joined:
    Jun 3, 2019
    Posts:
    1
    Hey, we are using iOS Native Pro and have to implement Apple SignIn since our users can use Facebook-Login. I've followed your guide on implementing Apple SignIn but I only get the following error:

    1000::Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1000"(null)"

    Authentication is enabled in the Settings and I use basically the same code so I'm not sure what I could be doing wrong.
     
  31. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Can you be more specific and tell me what kind of event do you think is not properly delivered? Would be happy to test :) Will be able to latest confirm if plugin has issue in that area or not!

    Well as part of "transparency" approach plugin mimicas API provided by apple, so you want have to guess what it does under the hood. I want it to feel like you are using Apple's API directly. That way you can also ready Apple docs and poke me if you think something is missing.

    As far as I know.
    • There should be a local cache for sure.
    • When you have you save game call back it has to be synched on the cloud.
    • Getting saved from the cloud may take some time, and there is no callback unfortunately when new save is available or if Fetch games have the latest saves, but you can, however, to show the metadata for a user and give him an ability to refresh the list.

    Yep I know that there is the luck of callbacks provided by apple... can't do anything about it. but if you like we can have a call (PM me) and will discuss some approaches you can do to get to your goal (people using saved games fo different reason and have different UX for it)
     
  32. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    @SergeyBocharov thx for the report I will check iPad with iOS 13!

    Well, 100 is an UNKNOWN error code(thx Apple) . But in most cases, it appears if you are missing Codesign Entitlements. Make sure you have have Apple Sing In enabled for your App ID Configuration with iTunes Connect and you also have the Sing In compatibility in the Xcode.
     
  33. jason416

    jason416

    Joined:
    Nov 8, 2018
    Posts:
    25
    Are there any advantages of using your iOS Native Pro for IAP vs UNITY IAP?
     
  34. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Hey, @jason416 can't say Unity IAP is bad. So if you only need IAP I have to say just use Unity IAP package instead of spending money on the assets.

    But:
    • IOS Native API is a 1 to 1 match to the Apple iOS API. So it would feel like you are working directly with the Apple IOS API. so you can additionally use Apple doc, tutorials, and API reference.
    • Since it's 1 to 1 match you can always poke me if you think some API is missing.
    • iOS Native is a lot more then just IAP :)
     
  35. mehuls

    mehuls

    Joined:
    Mar 2, 2016
    Posts:
    6
    Hi

    I just downloaded the iOS native pro plugin from asset store. I am using Unity 2019.1.13f1.
    I am getting this error and because of that the menu for Stan's asset is not appearing.

    If I comment this code
    #if UNITY_2018_1_OR_NEWER
    if(capability.SignInWithApple.Enabled) {
    capManager.AddSignInWithApple();
    }
    #endif

    then it works. Can you please let me know what is missing here?


    Assets/Plugins/StansAssets/NativePlugins/IOSDeploy/Editor/Scripts/ISD_PostProcess.cs(275,28): error CS1061: 'ProjectCapabilityManager' does not contain a definition for 'AddSignInWithApple' and no accessible extension method 'AddSignInWithApple' accepting a first argument of type 'ProjectCapabilityManager' could be found (are you missing a using directive or an assembly reference?)
     
  36. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Thx for the report @mehuls
    My bad, looks like this API available from 2019.2 or newer I will fix `UNITY_2018_1_OR_NEWER` to `UNITY_2019_2_OR_NEWER`

    Since you on 2019.1 feel free to remove those lines.
     
    mehuls likes this.
  37. jason416

    jason416

    Joined:
    Nov 8, 2018
    Posts:
    25
    Sorry I should have mentioned I already have iOS Native Pro and I even had started to implement IAP but I got stuck at validation methods. And then I was reading that UnityIAP has some method of doing on device validation of receipts. So I'm confused about which to continue with now.

    I guess my question is there any basic method of validating the receipt on the device with iOS Native?
     
    Last edited: Apr 13, 2020
  38. mehuls

    mehuls

    Joined:
    Mar 2, 2016
    Posts:
    6
    Thank you. Resolved
     
  39. Serhii-Horun

    Serhii-Horun

    Joined:
    Apr 12, 2015
    Posts:
    90
    Hello, Stan Assets.

    I can't find a way how to share my video from iOS app. Is there a way to do it? Can you help me?

    Thanks
     
  40. YHX2000

    YHX2000

    Joined:
    Aug 2, 2015
    Posts:
    17
    Hello @lacost

    Another dumb question on my side. The story is this.
    I'm trying to implement cloud load and save. The problem is that when I execute the ISN_GKLocalPlayer.FetchSavedGames method in Unity's private void Start() function then it tells me that I have no cloud saves, but when I execute ISN_GKLocalPlayer.FetchSavedGames from UI button then it tells me I have 1 cloud save and that's the truth I have 1 cloud save for real. Please check the code bellow for my Start function and my cloud function. I lost 3 weeks figuring this out and still can't fix it, you're my only hope. My goal is once Start is loaded to apply some conditions and to check if i have cloud save and to download it. In the docs there is just functions but no real example i mean full working example how this should be implemented. I understand there are several ways of implementation maybe but it would be nice some basic example for mortals like me.


    Start Function
    Code (CSharp):
    1.   private void Start()
    2.     {
    3.  
    4.         // Auth the user
    5.         if (Application.internetReachability != NetworkReachability.NotReachable)
    6.         {
    7.             //ISN_Preloader.LockScreen();
    8.             if (ISN_GKLocalPlayer.LocalPlayer.Authenticated == false)
    9.             {
    10.                 ISN_GKLocalPlayer.Authenticate(result =>
    11.                 {
    12.                     if (result.IsSucceeded == true)
    13.                     {
    14.                         Debug.Log("User is authenticated: " + result.IsSucceeded);
    15.                         ISN_GKLocalPlayer.FetchSavedGames((ISN_GKSavedGameFetchResult resulty) =>
    16.                         {
    17.                             Debug.Log("Cloud Level Count: 2222 " + resulty.SavedGames.Count.ToString());
    18.                             if (resulty.IsSucceeded)
    19.                             {
    20.                                 string svGames1 = "Checking Cloud Games Details_____" + "\r\n";
    21.                                 foreach (ISN_GKSavedGame game in resulty.SavedGames)
    22.                                 {
    23.                                     svGames1 += "SaveGame Device Name: " + game.DeviceName + "\r\n";
    24.                                     svGames1 += "SaveGame ID: " + game.Id + "\r\n";
    25.                                     svGames1 += "SaveGame Name: " + game.Name + "\r\n";
    26.                                     svGames1 += "SaveGame Modification Date: " + game.ModificationDate.ToLongDateString() + "\r\n";
    27.                                     svGames1 += "---------------------------\r\n";
    28.                                     Debug.Log(svGames1);
    29.                                 }
    30.                             }
    31.                         });
    32.                     }
    33.                     else
    34.                     {
    35.                         Debug.Log("User is NOT authenticated: " + result.IsFailed);
    36.                         //ISN_Preloader.UnlockScreen();
    37.                         //Show pop-up to log in to GameManager
    38.                     }
    39.  
    40.                 });
    41.             }
    42.             else
    43.             {
    44.  
    45.             }
    46.         }
    47.  
    48.     }

    UI Button Function -> BY THE WAY this function is declared in Singleton object !!!
    Code (CSharp):
    1. public void CloudSaveGamesCounts()
    2.     {
    3.         ISN_GKLocalPlayer.FetchSavedGames((ISN_GKSavedGameFetchResult result) =>
    4.         {
    5.             Debug.Log("Cloud Level Count:" + result.SavedGames.Count.ToString());
    6.             if (result.IsSucceeded)
    7.             {
    8.                 string svGames1 = "Checking Cloud Games Details_____" + "\r\n";
    9.                 foreach (ISN_GKSavedGame game in result.SavedGames)
    10.                 {
    11.                     svGames1 += "SaveGame Device Name:" + game.DeviceName + "\r\n";
    12.                     svGames1 += "SaveGame ID:" + game.Id + "\r\n";
    13.                     svGames1 += "SaveGame Name:" + game.Name + "\r\n";
    14.                     svGames1 += "SaveGame Modification Date:" + game.ModificationDate.ToLongDateString() + "\r\n";
    15.                     svGames1 += "---------------------------\r\n";
    16.                     Debug.Log(svGames1);
    17.                 }
    18.             }
    19.         });
    20.     }
    Thank You in Advance !!!
     
  41. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
  42. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Hey @YHX2000 I don't see any problems with your code from the start function. It should work.
    I need to try it on my own and then I can get back to you with the fix/suggestion.

    Also, are you sure you don't have any errors in the XCode console?
    Can I ask you to add this issue here, so I won't forget about it for you and you will be able to track the progress:
    https://github.com/StansAssets/com.stansassets.ios-native/issues

    Thank you!
     
  43. YHX2000

    YHX2000

    Joined:
    Aug 2, 2015
    Posts:
    17
    Hi @lacost Ok sure will report issue there and will post also logs from xcode. Thanks
     
    lacost likes this.
  44. adamfulop

    adamfulop

    Joined:
    Sep 8, 2019
    Posts:
    3
    Hi there,

    we are having an issue while trying to share a video using the new AddUrl() method, setting the path of the video as the url. After sharing, the dialog does not disappear and we receive this error in the logs:

    Found no reference to issues like this in the thread, any help would be appreciated!
     
  45. Serhii-Horun

    Serhii-Horun

    Joined:
    Apr 12, 2015
    Posts:
    90
  46. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Thx for the report, may I ask you to submit it here:
    https://github.com/StansAssets/com.stansassets.ios-native/issues
    Sine it seems like a legit bug report and I can't give you replay how to fix it atm, I need to look into the issue before I can come back with the replay what you did wrong or with fix in the plugin.

    Also few items I would like you to include in your report.

    1. Please share the code sample how are you using the API
    2. In your log I see the callback log from and API but I can't see request log. Can you please attach the whole thing?

    Thank you!
     
  47. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    115

    Does this happen always? or just on first run? I mean, if you run the app the first time you load game from the Start method gives you 0 results, but if you launch again the app , does also give you 0 results on the call made from Start?
     
  48. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    115
    Is it mandatory to use
    ISN_GKLocalPlayer.LocalPlayer.Authenticated
    and
    SN_GKLocalPlayer.Authenticate

    in order to use the ISN_GKLocalPlayer features like ISN_GKLocalPlayer.FetchSavedGames and ISN_GKLocalPlayer.LoadSavedgame?
     
  49. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,708
    Well, as per ISN_GKLocalPlayer.Authenticate description:

    So yea, you need to make sure that local player is authenticated before you can use any Game Kit related API.
     
  50. YHX2000

    YHX2000

    Joined:
    Aug 2, 2015
    Posts:
    17
    @pistoleta And yes this is happening only on first run as far as I'm aware and this is the strange thing once I click play button for second time on Xcode (and game was not deleted from the phone) .... from start method is showing 1 cloud save ...
     
    Last edited: Apr 24, 2020
unityunity