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

[Released] IOS Native Unity3D Plugin

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

  1. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    366
     
  2. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    366
    Hello my man darkinureass You said to come here to thread to continue this conversation, may I ask how do I get the logs from xcode ?
     
  3. VicM

    VicM

    Joined:
    Mar 14, 2012
    Posts:
    22
    Hi @mimminito, thanks for posting that issue, I am facing the same with the latest iOS Native as of today, using Unity 4.7.1f. I am not sure why the authors have been reacting slowly in solving this issues that affect customers that need to publish ASAP. After investing a couple of hours I could get rid of the errors you posted in the image related to the iOS "Save game" stuff. I am not using Game Center, only Social Sharing, so for the folks that are in similar situations here is how I overcome this errors in XCode.

    Simply open the ISN_GameSaves.cs file and modify some conditionals to add an "AND" in them looking for a ENABLED_GAMESAVECODE definition, as I did not defined it those conditional compilations are not considered and the errors in XCode dissapear, so far have not detected any negative effect in my app but remember that maybe this only works for people that is not using Game Center.

    Here some screenshots of how I modify the code, just look for the "&& ENABLED_GAMESAVECODE" piece of code.
    Hope this could help in the meantime we have an official most proper solution from the authors.

    Screen Shot 2016-04-13 at 8.50.48 PM.png Screen Shot 2016-04-13 at 8.51.30 PM.png
     
    Artyom-Abgaryan and XCO like this.
  4. darkinyourass

    darkinyourass

    Joined:
    Sep 24, 2015
    Posts:
    28
    I mean, when you write a letter, just reply to my letter, and do not create new, because I'm starting to get confused.

    Thank you for your in-depth and detailed explanation. We already have fix for it, and all those who are faced with a similar problem, simply write to our mail and we will send the fix, I hope your post will help people as much as possible :)
     
  5. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    366
  6. darkinyourass

    darkinyourass

    Joined:
    Sep 24, 2015
    Posts:
    28
    Contact me via this email - support@stansassets.com and I will send you a working package.
     
    mimminito likes this.
  7. petediddy

    petediddy

    Joined:
    Mar 17, 2015
    Posts:
    18
    Hello,

    I'm using iOS Native for IAP and GameCenter. However, my app was rejected by Apple today for soom.la SDK? I haven't done anything with soom.la within the app. I'm using v8.0.2.

    Help! Anyone else seen this?
     
  8. bringclose

    bringclose

    Joined:
    Nov 20, 2014
    Posts:
    7
    Hi Support team,

    I'm using iOS Native for IAP and GameCenter. But everytime failed on Init()
    Log: player auth failed

    I have tried to setup AppleID and bundle ID on unity editer, enabled gamecenter on appstore itune.

    So, what happen on my build? Could you please help me check this bug?

    Thank so much.
     
  9. darkinyourass

    darkinyourass

    Joined:
    Sep 24, 2015
    Posts:
    28
    Contact me via email - support@stansassets.com and provide the full answer from Apple, and i will help you.

    Did you test our example scene? Did you follow this manual - Manage In-App Purchases?
     
  10. bringclose

    bringclose

    Joined:
    Nov 20, 2014
    Posts:
    7
    Hi darkinyourass,

    First thanks for your support.
    I'm just using "Game center & push notifications", then I'm disable "IAP, Camera & Gallery, Media Player, Replay Kit".
    and I'm trying to implement like this: How to implement IOS game center

    Code (CSharp):
    1.  
    2. public void Init()
    3.     {
    4.         GameCenterManager.OnAuthFinished += OnAuthFinished;
    5.         GameCenterManager.Init();
    6.     }
    7.  
    8.     void OnAuthFinished(ISN_Result res)
    9.     {
    10.         if (res.IsSucceeded)
    11.         {
    12.             IsInitialized = true;
    13.             IOSNativePopUpManager.showMessage("Player Authored ", "ID: " + GameCenterManager.Player.Id + "\n" + "Alias: " + GameCenterManager.Player.Alias);
    14.         }
    15.         else
    16.         {
    17.             IOSNativePopUpManager.showMessage("Game Center ", "Player auth failed");
    18.         }
    19.     }
    20.  
    Do I need to submit the build on apple store for test?

    Thanks.
     
  11. bringclose

    bringclose

    Joined:
    Nov 20, 2014
    Posts:
    7
    My issue has been resolved. It's because my devices has some wrong, I changed an other device and It's work : )

    Thanks.
     
  12. Ramon_Nae

    Ramon_Nae

    Joined:
    Jun 1, 2015
    Posts:
    15
    Hi darkinyourass,
    We have some issues with our game and last plugin. The game crash happens on start and it seems to be related with setApplicationBagesNumber.

    We have found that you have missed some lines of code in ISN_NativeCore.mm. The lines are:
    Code (CSharp):
    1. -(void) setApplicationBagesNumber:(int) count {
    2. #if !TARGET_OS_TV
    3.     [UIApplication sharedApplication].applicationIconBadgeNumber = count;
    4. #endif
    5. }
    We have added a new method in the same file, maybe you could implement it.
    Code (CSharp):
    1. void _ISN_openSettings() {
    2.         [[UIApplication sharedApplication]openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
    3. }
    Thank you,
    Xavi.
     

    Attached Files:

  13. ParityClaws

    ParityClaws

    Joined:
    Aug 1, 2015
    Posts:
    15
    Might be a stupid question so apologies in advance.

    I am currently building my test builds for iOS in Windows 10 using iOS build environment. Will this product work fine under windows, will I be missing any functionality by not using OSX?
     
  14. petediddy

    petediddy

    Joined:
    Mar 17, 2015
    Posts:
    18
    Hi @Ramon_Nae,

    We were having the same issue - the app would crash at setApplicationBagesNumber (worked fine in Unity Editor, but would crash here on device)... using your first snippet of code which we added to the ISN_NativeCore.mm file, our app is now working.

    Thank you for posting this! It fixed the crash and local notifications are now working again.
     
  15. bringclose

    bringclose

    Joined:
    Nov 20, 2014
    Posts:
    7
    Does anyone have a problem with error:
    Code (CSharp):
    1. Game center unavailable
    2. Player is not signed in
    This problem does not happened for all devices.

    Sample devices:
    Code (CSharp):
    1. ipad mini 2 16GB
    2. OS: 8.2
     
  16. darkinyourass

    darkinyourass

    Joined:
    Sep 24, 2015
    Posts:
    28
    Thank you provided a solution for this problem, we will think about it, and maybe it will appear in next updates.
     
  17. darkinyourass

    darkinyourass

    Joined:
    Sep 24, 2015
    Posts:
    28
    You will be able to build the project for IOS from Windows 10, but you can not test it, because you need to Xcode installed, to build it on the apple device.
     
  18. darkinyourass

    darkinyourass

    Joined:
    Sep 24, 2015
    Posts:
    28
    Contact me via email - support@stansassets.com about this problem, we need to look closer at this problem.
     
  19. 0x646877

    0x646877

    Joined:
    Apr 19, 2014
    Posts:
    24
    Users have been getting this error/crash
    NullReferenceException: A null value was found where an object instance was required. GameCenterManager.OnLoaderBoardInfoRetrived (System.String data)


    I have not been able to reproduce it myself. Any ideas?
     
  20. bringclose

    bringclose

    Joined:
    Nov 20, 2014
    Posts:
    7
    Hi Darkinyourass,

    I have been to sold this problem about this
    This's because the sandbox test on devices does not enable or we're do not using sandbox account for test.

    Thanks for your support.
    --
    Regards,
     
  21. megasweet

    megasweet

    Joined:
    Nov 10, 2015
    Posts:
    5
    Hi, I'm interested in allowing my users to share gifs recorded from gameplay. I have the code set up to record the GIF and store it in StreamingAssets. It appears that the Twitter and FB sharing functions only accept a Texture2D parameter though. Is there a way they can be altered to support a GIF file?
     
  22. conehead

    conehead

    Joined:
    Feb 23, 2014
    Posts:
    12
    Hey! Unfortunately I cannot get in app purchases to work with iOS native.
    I used this code in my Title UI Start script:

    Code (CSharp):
    1.     IOSInAppPurchaseManager.instance.AddProductId("game.iap1");
    2.         IOSInAppPurchaseManager.instance.LoadStore();
    I created that in app purchase with this ID in itunes connect and I created an Test-User.
    Still when I call

    Code (CSharp):
    1. IOSInAppPurchaseManager.Instance.BuyProduct("game.iap1");
    I get the error SKErrorPaymentNotAllowed.
    The game does not even ask me to login with a user.

    Please help...thanks!
     
  23. young-gu

    young-gu

    Joined:
    Aug 10, 2015
    Posts:
    5
    hi.

    I have a little bit of a problem are using the Ultimate mobile assets.

    I now implement an iOS in-app payments using Unity

    but, I have a little bit of error.

    i receive a message when implementing iap billing

    "Store init Succeded
    Available products count: 0"

    and then, when trying to buy a product the message showed is

    "Transaction Failed
    Error code: 4
    Error description: Product Not Available"

    I want to know why that happens.

    I use Game Center Service, Social Sharing, Camera And Gallery, iAd, Media Player, In-App purchases Services.

    Waiting for the answer.

    Have a good day.
     
    Last edited: Jul 14, 2016
  24. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    It looks like you have already asked this question is a separate forum thread.
    I think, you have not configured In-App billing for your application properly.

    As I can see you have 0 products added to your application.
    Maybe you didn't publish your In-App purchases in iTunes Console.
    Or you didn't provide correct settings into your Ultimate Mobile plugin settings.
    Please, check this documentation. I think, it will be useful for you.

    Cheers!
     
  25. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Please, follow In-App purchases iOS Native integration guide.
    If you will have any additional questions, please, feel free to contact Stan's Assets Support Team directly via support@stansassets.com

    Best regards,
    Alex
     
  26. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    With the latest plugin version the new API available for GIFs porting into Twitter.
    Take a look at IOSSocialManager acript.
    This new API is available only with the latest plugin version.
    Code (CSharp):
    1. public void TwitterPostGif(string text, string url)
    Best regards,
    Alex
     
  27. unitydevv

    unitydevv

    Joined:
    Aug 14, 2016
    Posts:
    6
    Hello,
    i am using your ios native plugin for sending push notification..i have followed ur IOS notification tutorial..device gets registered and i got token....i have edited simple.php with this token and passphrase and message too .. run simple.php in terminal,its showing successfully connected to APNS ...and message successfully deleivered..but i am not able to receive any notification. i am just using ur plugin and its example scene ...and i have also subscribed to OnRemoteNotificationReceived action..... push notification is checked too in setting...any idea what i might be doing wrong and also i havent give apple id yet in setting...is it neccessary for push ??
     
  28. livingtech

    livingtech

    Joined:
    Aug 7, 2015
    Posts:
    6
    First of all, great plugin, thanks for making it!

    I'm looking for a deep-linking solution. Essentially a way to add a custom URL scheme (the way that is described under the feature checking for other apps here: https://unionassets.com/iosnative/shared-app-url-11). Curious whether that's on your radar or roadmap?
     
  29. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    For now, there is no ready-made solution for deep linking in iOS Native.
    Please, feel free to contact Stan's Assets Support Team via support@stansassets.com and request the feature you described.
    I am not 100% sure, that the feature will be implemented in a short time, but the functionality you described will be added to feature requests list and most likely will be added in future plugin updates.
    So, please, feel free to communicate with our support team engineers.

    Best regards,
    Alex
     
  30. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    It's quite hard to help you in a forum circumstances.
    Please, contact Stan's Assets Support Team and describe all this case in your mail.
    You will get great assistance with any issue in a short time.

    Cheers!
     
  31. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    849
    Hi,
    I think your IAP-plugin-part is not TV-OS ready.
    There are some sections in the code (initializing IAP) which are covered by #if UNITY_IPHONE (although they are also needed for TV OS).
    I am not 100% sure because my IAP still doesn't work (probably because of missing tax information in iTunes connect). But I think my investigations in the code are correct.
     
  32. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    I think, that tvOS In-App Purchases functionality is ready to go.
    If you have some difficulties, please, you better contact Stan's Assets Support Team directly.
    Also, please, attach the log from your device to your e-mail.
    You will get great assistance with any kind of issue you have in a short time.
     
  33. cashnett

    cashnett

    Joined:
    Mar 25, 2016
    Posts:
    6
    Hi AlexRay,

    i'm using iOS Native plugin for Turn-Based Multiplayer game.
    I'm try to customize GKTurnBasedMatchOutcome :

    Code (CSharp):
    1. public enum GK_TurnBasedMatchOutcome  {
    2.     None = 0,           // Participants who are not done with a match have this state
    3.     Quit = 1,           // Participant quit
    4.     Won = 2,            // Participant won
    5.     Lost = 3,           // Participant lost
    6.     Tied = 4,           // Participant tied
    7.     TimeExpired = 5,    // Game ended due to time running out
    8.     First = 6 ,
    9.     Second = 7 ,
    10.     Third = 8 ,
    11.     Fourth = 9,
    12.  
    13.     CustomRange = 0x00FF0000,
    14.  
    15.     GK_PLACING_1 = 1 | CustomRange,         //FF0001
    16.     GK_PLACING_2 = 2 | CustomRange,         //FF0002
    17.     GK_PLACING_3 = 3 | CustomRange,         //FF0003
    18.     GK_PLACING_4 = 4 | CustomRange,         //FF0004
    19.     GK_PLACING_5 = 5 | CustomRange,         //FF0005
    20.     GK_PLACING_6 = 6 | CustomRange,         //FF0006
    21.     GK_PLACING_7 = 7 | CustomRange,         //FF0007
    22.     GK_PLACING_8 = 8 | CustomRange,         //FF0008
    23.  
    24.     GK_MATCH_RESULT_WIN = 16 | CustomRange,        //FF0010
    25.     GK_MATCH_RESULT_LOSS = 32 | CustomRange,       //FF0020
    26.     GK_MATCH_RESULT_TIE = 48 | CustomRange         //FF0030
    27. }
    I set my outcome for all partecipants like :

    Code (CSharp):
    1. int position=1;
    2. Master.GKMatch.Participants[a].SetOutcome(GK_TurnBasedMatchOutcome.GK_MATCH_RESULT_WIN | (GK_TurnBasedMatchOutcome)(position| 16711680));
    at this point is all ok.
    But when i try to esecute the endMatch:

    Code (CSharp):
    1. GameCenter_TBM.Instance.EndMatch(GKMatch.Id, Data);
    the app crashs with this log:
    Code (CSharp):
    1. 'NSInvalidArgumentException', reason: 'invalid matchOutcome for participant'
    2.  
    3. *** First throw call stack:
    4.  
    5. (0x183ec2db0 0x183527f80 0x191ff0edc 0x1007c96c4 0x1007cdc90 0x1000db008 0x100178b8c 0x100176a08 0x100176828 0x1001a8f08 0x1001a8afc 0x100789464 0x101046178 0x1009a1fe8 0x1009a1fb4 0x100995884 0x100865784 0x10094e42c 0x100b65be0 0x10001169c 0x100011598 0x103813768 0x1869fc22c 0x1869fc0e0 0x184139e54 0x183e61030 0x183e797d4 0x183e78f0c 0x183e76c64 0x183da0c50 0x185688088 0x18908e088 0x10000b4dc 0x18393e8b8)
    6.  
    7. libc++abi.dylib: terminating with uncaught exception of type NSException
    8.  
    9.  

    What am I doing wrong?

    Thanks
     
  34. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    From the log, you provided, the error is fully clarified.
    So, the error caused by your implementation of GKTurnBasedMatchOutcome values.
    My advice for you is to check official Game Center documentation and check the permitted match outcomes.
     
  35. cashnett

    cashnett

    Joined:
    Mar 25, 2016
    Posts:
    6
    I know :D

    Official Game Center documentation says:

    Initially, this property holds none. Before your game can end a match, it must set the match outcome to a value that reflects the outcome of this participant when he or she left the match. SeeGKTurnBasedMatchOutcome. Optionally, it may also use an OR OPERATION to include a custom match outcome for your specific game. Game Center does not use the custom value; it exists to allow your game to store its own information about the end of the match. The custom value must fit in the range provided by the customRange constant.

    Code (CSharp):
    1. enum GKTurnBasedMatchOutcome : Int {
    2.     case None
    3.     case Quit
    4.     case Won
    5.     case Lost
    6.     case Tied
    7.     case TimeExpired
    8.     case First
    9.     case Second
    10.     case Third
    11.     case Fourth
    12.     case CustomRange
    13. }


    Your code in the plugin haven't a custom value

    Code (CSharp):
    1. public enum GK_TurnBasedMatchOutcome  {
    2.     None = 0,           // Participants who are not done with a match have this state
    3.     Quit = 1,           // Participant quit
    4.     Won = 2,            // Participant won
    5.     Lost = 3,           // Participant lost
    6.     Tied = 4,           // Participant tied
    7.     TimeExpired = 5,    // Game ended due to time running out
    8.     First = 6 ,
    9.     Second = 7 ,
    10.     Third = 8 ,
    11.     Fourth = 9
    12. }
    13.  
    Now, i ask to you: How to implement a custom value in the plugin without the app crashs?

    Thank you.
     
  36. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    It's hard for me to be sure, that you provide 100% correct match outcome in your Data value.
    So, please, check it on your own.

    Additionally, please, pay your attention to following methods of GameCenter_TBM class
    Code (CSharp):
    1. public void QuitInTurn(string matchId, GK_TurnBasedMatchOutcome outcome, string nextPlayerId, byte[] matchData)
    2.  
    3. public void QuitOutOfTurn(string matchId, GK_TurnBasedMatchOutcome outcome)
    Maybe you have to call one of these methods instead of GameCenter_TBM.Instance.EndMatch
    Please, try it on your own. Rebuild the project and retest it.
     
  37. cashnett

    cashnett

    Joined:
    Mar 25, 2016
    Posts:
    6
    I don't store the outcome value in my DATA byte

    The call is syntax correct and the log confirm:
    2016-09-12 09:43:25.367 android[238:12498] ISN_NativeLog: ISN endMatch

    if my code is
    Code (CSharp):
    1. GKMatch.Participants[a].SetOutcome(GK_TurnBasedMatchOutcome.Won);
    all is ok.


    if my code is
    Code (CSharp):
    1. GKMatch.Participants[a].SetOutcome(GK_TurnBasedMatchOutcome.CustomValue);
    where Official Game Center documentation says the custom value must fit in the range provided by the customRange constant-->the app crashs.

    is plugin ready to send CustomValue to Game Center?

    Thanks
     
  38. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Yes, sure. Please, follow my instructions from previous message and check the result.
     
  39. cashnett

    cashnett

    Joined:
    Mar 25, 2016
    Posts:
    6
    Same result.

    Code (CSharp):
    1. 'NSInvalidArgumentException', reason: 'invalid matchOutcome'
    2.  
    3. *** First throw call stack:
    4.  
    5. (0x183ec2db0 0x183527f80 0x191ff026c 0x100804b74 0x100809a00 0x100117040 0x1001b4bf0 0x1001b2b28 0x1001b2948 0x1001e4f68 0x1001e4948 0x1007c54c4 0x1010821d8 0x1009de048 0x1009de014 0x1009d18e4 0x1008a17e4 0x10098a48c 0x100ba1c40 0x10004d7bc 0x10004d6b8 0x10384f768 0x1869fc22c 0x1869fc0e0 0x184139e54 0x183e61030 0x183e797d4 0x183e78f0c 0x183e76c64 0x183da0c50 0x185688088 0x18908e088 0x1000475fc 0x18393e8b8)
    6.  
    7. libc++abi.dylib: terminating with uncaught exception of type NSException
     
  40. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    I got it. My advice for you is to contact support team for further assistance.
    You will get a great assistance with the any case you have in a short time.
     
  41. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    186
    Using the latest version, on submit I get "Invalid Binary" due to

    "This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data."

    This is despite having 'Camera and Galleries' unchecked in the settings. Why is it trying to access the camera?
     
  42. ExcellencyHong

    ExcellencyHong

    Joined:
    Aug 9, 2016
    Posts:
    22
    hi,

    do you have a plan to support iOS10?

    if you have the plan, when is the update?
     
  43. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Yes, sure. All the features will be fully compatible with iOS 10.
    If you found that some feature has issues with iOS 10 compatibility, please, report it to support team.
    Such a cases should be fixed in a short time. Thank you!
     
  44. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Please, could you provide me more additional information according to this case?
    What particular APIs do you use from iOS Native plugin?
     
  45. ExcellencyHong

    ExcellencyHong

    Joined:
    Aug 9, 2016
    Posts:
    22
    the classes about the local notification has whole changed in ios10 as i know.
    is the plugin currently version supported the new local notification classes?
     
  46. ExcellencyHong

    ExcellencyHong

    Joined:
    Aug 9, 2016
    Posts:
    22
    and, a question.

    in the ios 10,
    i can't handle to received the local notification in my app with foreground.

    the notification is just noticed in the notification center upper the screen.

    it was worked correctly in ios9.

    possibly, could you test it?
     
    Last edited: Sep 27, 2016
  47. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Thank you for this report! I assigned this report to our developer.
    Additional tests will be performed on our side.
    If any kind of issue will take place the fix will be provided.
    You will be able to get any additional information by contacting our support engineer via e-mail.

    Thank you for your patience and understanding.
    Have a nice day!
     
  48. LAZAROMANUEL

    LAZAROMANUEL

    Joined:
    Apr 23, 2013
    Posts:
    4
    We have exactly the same problem. We are only using the social sharing features, but apparently something else is trying to access the camera.
     
  49. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    You better contact support team via e-mail for an assistance in this case.
    As you can see, few other developers already had this issue, so, you will get great support in a short time.
     
  50. Skatola

    Skatola

    Joined:
    Jan 17, 2013
    Posts:
    45
    tried to update ios native plugin for ios 10 compatibility but this is so frustrating...
    i use both ios native and android native in my project plus google mobile ads plugin and every time one of this three plugin need an update i have to remove and reinstall all : (
    there isn't a better solution? Why if i need to update ios native i have to remove all my stan assets plugin? I understand they share a lot of code maybe but in my opinion they should be indipentent from each others, remove and reinstall all plugins every time one of them need an update (and testing again the app on all the platforms) is a nightmare for an indie dev : (
    And after i did that i have several errors in console, hope support team can help me soon, thank you for your work like always : )
     
unityunity