Search Unity

Introducing IOS Native Pro

Discussion in 'Assets and Asset Store' started by stanislav-osipov, Jun 7, 2018.

  1. AlienFreak

    AlienFreak

    Joined:
    Jul 2, 2012
    Posts:
    40
  2. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    AlienFreak likes this.
  3. unity_CM5LIE6yvxd4fQ

    unity_CM5LIE6yvxd4fQ

    Joined:
    Apr 20, 2019
    Posts:
    5
    you can read nfc?
     
  4. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    There is no such feature atm.
     
  5. tcmeric

    tcmeric

    Joined:
    Dec 21, 2016
    Posts:
    190
    Hi, looks like a great set of tools. Does it have the ability to import and export the iOS devices calendar?
     
  6. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey, thx @tcmeric. Not yet, but I will add it into the request list. Right now you the only one who asked about it, but if we will receive more requests it will be part of the plugin :)
     
    tcmeric likes this.
  7. DanFlanaganCodes

    DanFlanaganCodes

    Joined:
    Jun 21, 2014
    Posts:
    17
    @lacost

    I am using IOS Native Pro and followed your documentation. I am running into some major issues. The Insagram Share only pops up the entire default Dialog and not the iIstagram only direct as I was doing in your previous product IOS Native (non pro) as well as you have failed to include the ISN_Media C# class that I can access as well. Please let me know how to resolve these issues.
     
  8. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Can you give me an example of how exactly you are using Instagram sharing with the new plugin? Thanks.
     
  9. DanFlanaganCodes

    DanFlanaganCodes

    Joined:
    Jun 21, 2014
    Posts:
    17
    Code (CSharp):
    1.     private void InstagramShare(Texture2D texture = null, string path = null)
    2.     {
    3.  
    4.         if (texture != null)
    5.         {
    6. #if UNITY_IOS
    7.             Debug.Log("Posting on Instagram: IOS Texture 2D");
    8.             ISN_Instagram.Post(texture);
    9.             return;
    10. #endif
    11.  
    12. #if UNITY_ANDROID
    13.  
    14. #endif
    15.         }
    16.  
    17.         if (!string.IsNullOrEmpty(path))
    18.         {
    19. #if UNITY_IOS
    20.  
    21. #endif
    22.  
    23. #if UNITY_ANDROID
    24.             Debug.Log("Posting on Instagram: Android Path");
    25.             new NativeShare().SetTarget("com.instagram").SetText(ShareCopy).AddFile(filePath);
    26. #endif
    27.         }
    28.  
    29. #if UNITY_EDITOR
    30.  
    31. #endif
    32.     }
     
  10. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    Headsup, still looks like old version to me, says updated may 2018

    edit: and I can't get sharing dialog to work anymore. Updated plugin, use the snippet you provided, nothing happens. The callback doesn't seem to get called on the device like it does in the editor.
     
    Last edited: Jul 15, 2019
  11. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    Updated the plugin and this isn't working for me. Logs have:

    edit: this may be related to the orientation bug I mentioned a while ago, checking

    edit2: yep, if I strip orientation change code from the app it works fine
     
    Last edited: Jul 15, 2019
  12. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    So what exact code are you referring to? I will take it and make sure it would work property. Thanks for the report,
     
  13. TillmaniaLtd

    TillmaniaLtd

    Joined:
    Jan 29, 2013
    Posts:
    65
    Hey,

    Any way to use App Groups with this plugin?
     
  14. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    You can definantly set up upgoups compatibilities using the XCode config section. But if you a reffering to some spesific API please let me know, and I can give you an implementation estimate.
    Thanks.
     
  15. TillmaniaLtd

    TillmaniaLtd

    Joined:
    Jan 29, 2013
    Posts:
    65
    So I’m trying to pass data between 2 different versions of an app (a lite and pro version). But I need to be able to access this data from within Unity C#.
     
  16. josephdave

    josephdave

    Joined:
    Nov 16, 2016
    Posts:
    3
    Im using IOS Native Pro plugin on a only landscape app development, everyting goes fine but when i call the camera throught the plugin im getting this error:
    2019-08-06 09:59:03.282420-0500 parasoles[3916:891301] *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [CAMViewfinderViewController shouldAutorotate] is returning YES'
    *******
    Tested on an Iphone 7: works OK
    Tested on an Iphone X and Xmax: Throws error
    Thanks for your help
     
  17. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey, @josphdave thx for the report I will take a look.
     
  18. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey, not sure I fully understand, are you talking about saved games, icloud or something else?
     
  19. Andrew-Kite

    Andrew-Kite

    Joined:
    Oct 16, 2014
    Posts:
    34
    I seem to be having issue with cloud builds. Local builds are compiling fine.
    I am using Assembly Defines to help separate my projects/unit test, and the Script folder uses an Game.asmdef file.

    Unity Cloud reports the following error:
    Code (CSharp):
    1. [Unity] -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Game.dll
    2. 13: [Unity] Assets/Scripts/UI/Menus/Test.cs(12,7): error CS0246: The type or namespace name 'SA' could not be found (are you missing a using directive or an assembly reference?)
    3. 14: [Unity] Assets/Scripts/UI/Menus/Test.cs(12,7): error CS0246: The type or namespace name 'SA' could not be found (are you missing a using directive or an assembly reference?)
    I have added the following references to Game.asmdef, thinking that it may resolve the issue as there is no 'SA' assembly to reference.
    SA.Crossplatform
    SA.iOS
    SA.Android

    Still receive the above error.
    The classes which are causing the error are utilizing the cross platform wheel picker and date picker.

    Any help would be appreciated.
    Thanks!

    Edit
    Just realised I posted in the incorrect thread, meant to post in Ultimate Mobile Pro... o_O

    Edit 2
    Looks like the failure had nothing to do with the above references. Those errors may have been due to the cloud caching and not finding the new files.

    What I have noticed are 20 Unit Tests that are part of Stans Assets failing due some link to my own. All mine are currently passing. Disabling the cloud configuration option which fails a build upon a failed test allowed me to successfully build the project on Unity Cloud.
    Will update with a resolution when found incase it helps anyone else.

    Last Edit
    Unit Tests were the issue, I had to add some cleanup code using the TearDown attribute to my own tests so the plugins' didn't fail.
    Having said that, I am still unable to enable the option to fail builds on failed tests as the plugin produces a few failed ones of its own (only when run in cloud).

    Here are the ones which fail due to timeout.

    Failed - 5
    CamptueVideo
    Test exceeded Timeout value of 180000ms
    CamptureImage
    Test exceeded Timeout value of 180000ms
    PickImage
    Test exceeded Timeout value of 180000ms
    PickVideo
    Test exceeded Timeout value of 180000ms
    SaveScreenshot
    Test exceeded Timeout value of 180000ms
     
    Last edited: Aug 12, 2019
  20. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    @Andrew-Kite
    Hey. that was a pretty interesting read.
    For now, feel free to remove the plugin test if that is an issue for you at the moment.

    First of all, I am happy yo hear that unity community is moving to direction when people are start using tests. That will only encourage me to increase package test coverage.

    The filed test is not completely automatic yet.. those were my experiments. Those tests are actually requiring some interaction when running otherwise will fail with a timeout.

    I have no idea so far how to make it fully automatic. For example, if I want to test camera API, I need to simulate user click on camera photo button and on done button, but that's native iOS environment and I don't really know how to do that yet.
     
    Andrew-Kite likes this.
  21. josephdave

    josephdave

    Joined:
    Nov 16, 2016
    Posts:
    3
    Any news on this?
    Thanks
     
  22. Andrew-Kite

    Andrew-Kite

    Joined:
    Oct 16, 2014
    Posts:
    34
    @lacost
    Thanks for the explanation, easy enough to remove the unit testing project once imported :)

    Just another thing I noticed as part of the iOS Native Date Time Picker. If you follow this process, it can break the Picker.
    1. Multiple options in menu to display a Date Time Picker.
    2. User selects an option bringing up a Date Time Picker.
    3. User selects second Data Time Picker option (bringing new one over the top of the one in step 1).
    4. Select done, Picker from step 3 goes away, Picker from step 2 remains.
    5. Unable to select cancel or done on the first picker.
    The way I am working around it at the moment is by disabling UI interaction when a Data Time Picker is displayed, preventing a second one from overlapping and breaking the first.
    Would there be a way to auto close previously opened ones so this does not happen?

    Also as a feature request, being able to navigate through our UI options or input fields with the shortcut arrows usually presented on native UI's. I was going to take a look at how or if those have the ability to send events down to the Unity layer myself if I get the chance, but if it is on your roadmap, even better!

    Example being;
     
  23. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey @Andrew-Kite I think I would add inout blocking mask to make sure unity UI is not interactable when a picker is present.

    Regarding your feature request, I had an idea of making custom keyboard options etc. But keyboard API in iOS is a disaster, and basically made to work with iOS forms, so it's extremely hard of getting it to cooperate :) So can't promise anything at this point :)
     
    Andrew-Kite likes this.
  24. Andrew-Kite

    Andrew-Kite

    Joined:
    Oct 16, 2014
    Posts:
    34
    @lacost that's understandable, I have heard similar.
    Though the above image was just an example to display the navigation arrows which could be present on Data Pickers/Wheel Pickers/ etc. to help the flow from one UI component to the next via code, if those arrow button press events are easy enough to register. I think Unity's keyboard implementation is more than enough for most use cases ;)

    Keep up the good work on this plugin, everything else is working great!
     
  25. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    I see what you mean, I will consider adding it :)
     
    Andrew-Kite likes this.
  26. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
  27. Figment_Tech

    Figment_Tech

    Joined:
    Nov 24, 2016
    Posts:
    2
    Hi @lacost wondering if this is now in the plugin? Or are you still working on it?
     
  28. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Not yet, Had to focus on Andoird, due to migration to the androidX and billing API has been deprecated so had to rework the whole implementation. I will keep you posted. This feature is sitting in TODO list.
    I think would be also nice Sing-In with Google for android and they make cross-platfrom option.
     
  29. faolad

    faolad

    Joined:
    Jan 27, 2013
    Posts:
    118
    Keep getting these errors since the last update, can't use the share function anymore and there's something weird going on with the achievements.

    Code (CSharp):
    1.  IOSNative::Native->Unity method: onAchievementsLoadedResponse data: {"m_error":{"m_message":"","m_code":0},"m_achievements":[],"m_requestId":"gk3kXBVrdcpXB7V3OZPX"}
    2. Parse: Can't convert share to enum, please check the spell.
    Code (CSharp):
    1. 2019-08-21 15:09:58.673287-0500 ud[12518:1121365] IOSNative::Unity->Native method: _ISN_GKAchievement_resetAchievements data: kO2IfEJtBQtlCYXrrCmP
    2. 2019-08-21 15:09:58.908660-0500 ud[12518:1121365] IOSNative::Native->Unity method: onAchievementsResetResponse data: {"m_error":{"m_message":"","m_code":0},"m_requestId":"kO2IfEJtBQtlCYXrrCmP"}
    3. 2019-08-21 15:10:02.653769-0500 ud[12518:1121365] IOSNative::Unity->Native method: _ISN_LoadStore data: {"ProductIdentifiers":[]}
    4. 2019-08-21 15:10:02.655498-0500 ud[12518:1121365] IOSNative: ISN_InAppManager::init
    5. 2019-08-21 15:10:02.655636-0500 ud[12518:1121365] IOSNative: loadStoreProductsWithIdentifiers....
    6. 2019-08-21 15:10:03.616040-0500 ud[12518:1121365] IOSNative: ISN_SKProductsRequestDelegate loaded products count: 0
    7. 2019-08-21 15:10:03.617478-0500 ud[12518:1121365] IOSNative::Native->Unity method: OnStoreKitDidReceiveResponse data: {"m_invalidProductIdentifiers":[],"m_error":{"m_message":"","m_code":0},"m_products":[]}
    8. 2019-08-21 15:10:03.639559-0500 ud[12518:1121365] IOSNative::Unity->Native method: _ISN_RestoreCompletedTransactions data:
    9. 2019-08-21 15:10:09.076766-0500 ud[12518:1121365] IOSNative::Unity->Native method: _ISN_GKGameCenterViewControllerShow data: {"m_leaderboardIdentifier":"","m_leaderboardTimeScope":0,"m_viewState":2}
    10. 2019-08-21 15:10:18.165289-0500 ud[12518:1121365] IOSNative::Native->Unity callback data: {"m_error":{"m_message":"","m_code":0}}
     
  30. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    I am not quite following.
    Code (CSharp):
    1. Parse: Can't convert share to enum, please check the spell.
    Is this a Parse plugin output?
    The log you provided looks just fine. Or something wrong with Achievements behavior? Since log shows you do not have any achievements in your game, do you?


    So what is wrong with it? I mean what do you expect to get and what are you getting instead?
    Can I get any logs with your attempt to use a sharing?

    Thanks.
     
  31. faolad

    faolad

    Joined:
    Jan 27, 2013
    Posts:
    118
    If you try to use share it will output that. And I do have achievements in the game.

    What is wrong with it? Previously the button would pop up the share window of the system now it doesn't do anything.

    So basically everything is broken with the update.

    This is the full log:
    Code (CSharp):
    1. Parse: Can't convert share to enum, please check the spell.
    2. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    3. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    4. UnityEngine.Logger:LogFormat(LogType, String, Object[])
    5. UnityEngine.Debug:LogErrorFormat(String, Object[])
    6. Manage_menu:ChangeScreenWithName(String)
    7. UnityEngine.Events.UnityAction`1:Invoke(T0)
    8. UnityEngine.Events.InvokableCall`1:Invoke(T1)
    9. UnityEngine.Events.CachedInvokableCall`1:Invoke(Object[])
    10. UnityEngine.Events.UnityEvent:Invoke()
    11. UnityEngine.UI.Button:Press()
    12. UnityEngine.UI.Button:OnPointerClick(PointerEventData)
    13. UnityEngine.EventSystems.ExecuteEvents:Execute(IPointerClickHandler, BaseEventData)
    14. UnityEngine.EventSystems.EventFunction`1:Invoke(T1, BaseEventData)
    15. UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
    16. UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
    17. UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
    18. UnityEngine.EventSystems.StandaloneInputModule:Process()
    19. UnityEngine.EventSystems.EventSystem:Update()
    20.  
     
  32. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    There is nothing wrong in the log. Can you please show me implementation? I will give it a try on my side and will check if it works.
     
  33. faolad

    faolad

    Joined:
    Jan 27, 2013
    Posts:
    118
    @lacost
    Code (CSharp):
    1.  public void CheckAchievements()
    2.     {
    3.         //Check How many Levels are
    4.         foreach (var world in levelManager.WorldList)
    5.         {
    6.             worlds += 1;
    7.             levels += world.LevelList.Count;
    8.         }
    9.  
    10.         //Check each Achievement Progress
    11.         ISN_GKAchievement.LoadAchievements((result) =>
    12.         {
    13.             if (result.IsSucceeded)
    14.             {
    15.                 float newPercent = 0;
    16.                 float lvlsCompleted = 0;
    17.  
    18.                 foreach (ISN_GKAchievement achievement in result.Achievements)
    19.                 {
    20.                     switch (achievement.Identifier)
    21.                     {
    22.                         case "PearChallenge":
    23.                             newPercent = (ES3.Load<int>("GameData.txt?tag=TotalPears") * 1.0f / 63) * 100;
    24.                             break;
    25.  
    26.                         case "Kill50Insects":
    27.                             newPercent = (ES3.Load<int>("GameData.txt?tag=TotalInsectsKill") * 1.0f / 50) * 100;
    28.                             break;
    29.  
    30.                         case "ShareTheGame20Times":
    31.                             newPercent = (ES3.Load<int>("GameData.txt?tag=TotalShares") * 1.0f / 20) * 100;
    32.                             break;
    33.  
    34.                         case "Jump1kTimes":
    35.                             newPercent = (ES3.Load<int>("GameData.txt?tag=TotalJumps") * 1.0f / 1000) * 100;
    36.                             break;
    37.  
    38.                         case "Fall100Times":
    39.                             newPercent = ES3.Load<int>("GameData.txt?tag=TotalFalls");
    40.                             break;
    41.  
    42.                         case "WearTheMagicHat10Games":
    43.                             newPercent = (ES3.Load<int>("GameData.txt?tag=TotalTimesWearingTheMagicHat") * 1.0f / 10) * 100;
    44.                             break;
    45.  
    46.                         case "Take100Lights":
    47.                             newPercent = ES3.Load<int>("GameData.txt?tag=TotalLightsTaken");
    48.                             break;
    49.  
    50.                         case "GetPushed300Times":
    51.                             newPercent = (ES3.Load<int>("GameData.txt?tag=TotalPushes") * 1.0f / 300) * 100;
    52.                             break;
    53.  
    54.                         case "TakeNo":
    55.                             lvlsCompleted = 0;
    56.                             for (int w = 1; w < worlds + 1; w++)
    57.                             {
    58.                                 for (int i = 1; i < levels + 1; i++)
    59.                                 {
    60.                                     if (ES3.KeyExists("LevelsData.txt?tag=" + "Level" + w + "_" + i + "_challenge03") && ES3.Load<bool>("LevelsData.txt?tag=" + "Level" + w + "_" + i + "_challenge03"))
    61.                                     {
    62.                                         lvlsCompleted += 1;
    63.                                     }
    64.                                 }
    65.                             }
    66.                             newPercent = (lvlsCompleted / levels) * 100;
    67.                             break;
    68.  
    69.                         case "TakeNoPunch":
    70.                             lvlsCompleted = 0;
    71.                             for (int w = 1; w < worlds + 1; w++)
    72.                             {
    73.                                 for (int i = 1; i < levels + 1; i++)
    74.                                 {
    75.                                     if (ES3.KeyExists("LevelsData.txt?tag=" + "Level" + w + "_" + i + "_challenge02") && ES3.Load<bool>("LevelsData.txt?tag=" + "Level" + w + "_" + i + "_challenge02"))
    76.                                     {
    77.                                         lvlsCompleted += 1;
    78.                                     }
    79.                                 }
    80.                             }
    81.                             newPercent = (lvlsCompleted / levels) * 100;
    82.                             break;
    83.                     }
    84.  
    85.                     float oldPercent = achievement.PercentComplete;
    86.  
    87.                     if (oldPercent < newPercent)
    88.                     {
    89.                         ReportAchievementProgress(achievement.Identifier, newPercent);
    90.                     }
    91.                 }
    92.             }
    93.             else
    94.             {
    95.                 Debug.Log("LoadAchievements failed! Code: " + result.Error.Code + " Message: " + result.Error.Message);
    96.             }
    97.         });
    98.  
    99.     }
    100.  
    101.     private void ReportAchievementProgress(string Identifier, float percent)
    102.     {
    103.         {//Report Achievement Progress
    104.             ISN_GKAchievement achievement = new ISN_GKAchievement(Identifier);
    105.             achievement.PercentComplete = percent;
    106.             achievement.Report((result) =>
    107.             {
    108.                 if (result.IsSucceeded)
    109.                 {
    110.                     Debug.Log("Achievement reported");
    111.                 }
    112.                 else
    113.                 {
    114.                     Debug.Log("Achievement report failed! Code: " + result.Error.Code + " Message: " + result.Error.Message);
    115.                 }
    116.             });
    117.         }
    118.     }
    119.     public void RestoreAchievementProgress()
    120.     {
    121.         ISN_GKAchievement.ResetAchievements((result) =>
    122.         {
    123.             var content = new ISN_UNNotificationContent();
    124.             ISN_NSDateComponents date = new ISN_NSDateComponents();
    125.             date.Second = 2;
    126.  
    127.             if (result.IsSucceeded)
    128.             {
    129.                 content.Title = "Done!";
    130.                 content.Body = "Reset Achievements Success";
    131.             }
    132.             else
    133.             {
    134.                 content.Title = "Something Went Wrong!";
    135.                 content.Body = "Reset Achievements failed! Code: " + result.Error.Code + " Message: " + result.Error.Message;
    136.  
    137.             }
    138.  
    139.             var trigger = new ISN_UNCalendarNotificationTrigger(date, false);
    140.             // Create the request object.
    141.             string identifier = "OnRestoreTransactionsComplete";
    142.             var request = new ISN_UNNotificationRequest(identifier, content, trigger);
    143.         });
    144.     }
    145. }
    Code (CSharp):
    1. private void ShareURLOnSocialNetwork()
    2.     {
    3.         ISN_UIActivityViewController controller = new ISN_UIActivityViewController();
    4.         controller.SetText("Bla Bla Bla --> itms://itunes.apple.com/app/apple-store/1463103243?mt=8");
    5.         controller.AddImage(Resources.Load<Texture2D>("_Promo"));
    6.  
    7.         controller.ExcludedActivityTypes.Add(ISN_UIActivityType.Print);
    8.         controller.ExcludedActivityTypes.Add(ISN_UIActivityType.AssignToContact);
    9.         controller.Present((result) =>
    10.         {
    11.             if (result.IsSucceeded)
    12.             {
    13.                 Debug.Log("Completed: " + result.Completed);
    14.                 Debug.Log("ActivityType: " + result.ActivityType);
    15.  
    16.                 if (ES3.KeyExists("GameData.txt?tag=CanShareURLOnSocialNetwork") && ES3.Load<bool>("GameData.txt?tag=CanShareURLOnSocialNetwork"))
    17.                 {
    18.                     ES3.Save<bool>("GameData.txt?tag=CanShareURLOnSocialNetwork", false);
    19.                     livesManagerInstance.current_lives += 10;
    20.                     livesManagerInstance.Save();
    21.                     Update_lives();
    22.                 }
    23.  
    24.                 //ReportAchievements
    25.                 ES3.Save<int>("GameData.txt?tag=TotalShares", ES3.Load<int>("GameData.txt?tag=TotalShares") + 1);
    26.             }
    27.             else
    28.             {
    29.                 Debug.Log("ISN_UIActivityViewController error: " + result.Error.FullMessage);
    30.             }
    31.         });
    32.     }
     
  34. Oshigawa

    Oshigawa

    Joined:
    Jan 26, 2016
    Posts:
    362
    hello @lacost

    i'm running into issues with achievements, that is, i can't get them to activate.

    The setup is quite simple, report gets to activate once the player runs over an object and triggers it. The code is basically a copy/paste, as far as i have seen there's not much to be set. Achievements are configured in iTunes Connect, but i also put one for testing in ISN settings. Game Kit has been enabled in services of course.

    Code (CSharp):
    1.  
    2. {
    3.  
    4. Debug.Log("Entered Method");
    5. ISN_GKAchievement someAchievement = new ISN_GKAchievement("identifier");
    6. someAchievement.PercentComplete = 100.0f;
    7.  
    8. someAchievement.Report((result) =>
    9.  
    10.     {
    11. if(result.IsSucceeded)
    12.     {
    13.  
    14. Debug.Log("Achievement reported");
    15. }
    16.  
    17. else
    18.  
    19. {
    20. Debug.Log("Achievement report failed! Code: " + result.Error.Code + " Message: " + result.Error.Message);
    21. }
    22. });
    When testing in editor, i do get a debug.log "Entered Method" i put for validation, but no other debugs if the result is succeeded or failed. Tried a build on mobile with a singleton that holds the GameKitUseExample, game center is activated, but the achievement doesn't show up, nor the xcode shows any report debugs ("Achievement reported/Achievement report failed").

    Any help is appreciated.
     
  35. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey @faolad I am not quite following some of your code, in terms of what are you trying to achieve. But on the other hand, I haven't noticed any wrong implementation that would raise a flag for me.

    From the log you provided, I see only valid plugin logs, well except the fact that you are trying to load the store without providing any products.
    I also see an only response for load achievements data and some error message about converting to enum, wich is unlikely caused by the plugin.

    I will send you a PM, and let's probably have a call since I am really having trouble to understand what the issue is.
     
  36. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    @Oshigawa the code looks fine. Can you please give me the FULL Xcode log, from the app start to the point where you trying to unlock an achievement without success. Thank you.
     
  37. Oshigawa

    Oshigawa

    Joined:
    Jan 26, 2016
    Posts:
    362
    Ok, me and the team member that's doing the builds are in the different time zones, so i'll post it a bit later.
     
    Last edited: Aug 27, 2019
  38. planetmatrix

    planetmatrix

    Joined:
    Dec 8, 2015
    Posts:
    38
    Xcode version 11.0 (Latest)
    Unity: 2019.1.6f1
    Services enabled: App Delegate

    Xcode error: ISN_UIApplicationDelegate.mm:204:34: Use of undeclared identifier 'app'

    Code (CSharp):
    1. #if !TARGET_OS_TV
    2. - (BOOL)application:(UIApplication*)application openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
    3.       appOpenUrl = [url absoluteString];
    4.      [ISN_UIApplicationDelegate sendMessage:"openURL" withParams:appOpenUrl];
    5.    
    6.     @try {
    7.       return [super application:app openURL:url options:options];
    8.     }
    9.     @catch (NSException *exception) {
    10.         NSLog(@"exception: %@", exception.reason);
    11.         return true;
    12.     }
    13. }
    14. #endif
     
  39. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey @planetmatrix, thx for a report, this issue has already been fixed. will post an asset store update this weekends. In the meantime just replace app to with application
     
    planetmatrix likes this.
  40. Serhii-Horun

    Serhii-Horun

    Joined:
    Apr 12, 2015
    Posts:
    151
    Hi Lacost.

    We got a problem with getting video from library after iPhone was updated to latest iOS version(13+).
    Steps:
    1. Ask access permission(also you can check if it is granted). This step works ok
    2. Then open photo library and select some video. It will return MediaUrl
    3. Then try to read media file and you will get:

    UnauthorizedAccessException: Access to the path "/var/mobile/Containers/Data/PluginKitPlugin/4D53D976-9CFA-4A4C-A19F-227F173876BB/tmp/trim.AC72F187-D20F-4B52-AC4E-79A06792406D.MOV" is denied.

    Can you help us?
     
  41. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Sure! The issue seems related to the iOS13 update and affecting only a video URL.
    I fixed it using the solution from here:
    https://github.com/apache/cordova-plugin-camera/issues/506

    I believe I have your case on our support e-mail, so you should already get an updated version by now (please PM me if you not)

    The Asset Store update is also coming this week, I just waiting for a few external testers to confirm stability for the certain use cases I can't check myself.
     
    Serhii-Horun likes this.
  42. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    New version released 2019.19
    • iOS 13 push notification token retrieval fixed.
    • UIAlertControllerStyleActionSheet fixed for iPad.
    • Native Dialogs stack implemented.
    • TvOs GameKit view dismisses fixed.
    • Experimental - MacOs GameKit API support.
    • GameKit API performance improvements.
    • App delegate API, XCode compilation issue fixed.
    • CoreLocation XCode compilation bug fixed.
     
  43. dimib

    dimib

    Joined:
    Apr 16, 2017
    Posts:
    50
    Hi Lacost, what about MapKit support for your awesome asset? It would be nice to have the possibility to display a map onto a Unity canvas or view.
     
  44. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    It's defiantly possible for an external view. But I am not sure how you would use it for a game :)
    I think if you will use Google REST map API you will be able to do even better because unlike the map view that is "detached" from your game, you would be able to get all the info to build a map using 3d asset.

    But the location API is already present in the plugin :)
    https://unionassets.com/ios-native-pro/manual#core-location
     
  45. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    New version released 2019.20
    • ISN_SKPaymentOriginalTransaction C# 4.0 warning fixed.
    • Date-time picker dark theme support added.
    • UIKit Disabled Plist variables bug fixed.
     
  46. Deleted User

    Deleted User

    Guest

    @lacost
    I downloaded the latest version from asset store.
    And I am unable to open the video from gallery. When I choose it doesn't play in handheld player
     
  47. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hey. I am not sure I totally understand an issue.
    Can you please share the code as well as your expectation of what should happen. Thank you!
     
  48. Deleted User

    Deleted User

    Guest

    @lacost In short, The mediaURL issue in iOS 13 hasn't resolved in the plugin. I am unable to play a video from the path returned by the plugin.
     
  49. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    I recall I was fixing some iOS 13 issues with media picker. And I can pick the media just find using the plugin example scene.
    I would really appreciate a sample I can work with. Thanks.
     
  50. thao050192

    thao050192

    Joined:
    Jul 17, 2017
    Posts:
    5
    hey bros, i use this code
    Code (CSharp):
    1. public class Test : MonoBehaviour
    2. {
    3.     // Start is called before the first frame update
    4.     void Start()
    5.     {
    6.         var player = ISN_MPMusicPlayerController.SystemMusicPlayer;
    7.         player.Play();
    8.     }
    9.  
    10. }
    but i dont know how to play my music in app, example i have a song in folder assets how to insert in var player, thank