Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

[Released] IOS Native Unity3D Plugin

Discussion in 'Assets and Asset Store' started by stanislav-osipov, Apr 22, 2013.

  1. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Unfortunately no. IOS Game Center can be used in IOS apps only.

    Google Play for IOS that is quite new service. Honestly a haven't seen product that used Google Play in IOS game.
    But:


    1) If Google has created this service with Android / IOS/ Windows 8 support, that mean it shouldn't be any problem on app review.
    2) That is really cool to have Cloud data, Achievement and LeaderBoards shared between Android and IOS devices.
    3) Im currently developing few projects with will support Google Play Service on IOS, as option of course. And this support already agreed with publishers.
     
  2. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,054
    i bought android native too :) do you plan to release such asset for mac os? do you think to release unified asset for multiple platform. i mean single inapp purchase API for ios, android and mac os.

    i havent examined phone 8 yet. will you cover this platform too?
     
  3. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Hello, atmuc. Thanks for purchase, I hope you enjoy using it.

    Sure I do. I planing to start working on it in the end of this month.

    I was actually thinking about this. But here is the thing:
    1) A do not have a lot platforms now (IOS, Android, Mac OS(in development))
    2) Before starting this all other asset should be stable and contain all requested features like (Full GameCenter, IAP's, Cloud)
    3) It will be extremely hard to support this.

    But I looking forward to this.

    This one next after OSX :)

    Thanks for your interest. Cheers!

    P.S Update is coming, it will contain Game Center Pear-to-Pear multiplayer with game example and iCloud
     
  4. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Just bought this.
     
  5. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    I Stanis,

    you support a webview in your package?
     
  6. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Hello, not there is no webview support.
    Only listed stuff in package description. But I left source code open, you can ad what ever you want :)
     
  7. yifan024

    yifan024

    Joined:
    Jun 5, 2013
    Posts:
    19
    with native events, can it check if device connected to power or not? Thanks
     
  8. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    No there is nothing like this there.
    Only features described in documentation.
    But I can treat it like feature request and add battary state to the next plugin
     
  9. RC15

    RC15

    Joined:
    Apr 19, 2013
    Posts:
    38
    Hi Stanislav,

    congratulation for the asset, very good one.

    I have a problem running it on iPad2 iOS 6, not teste on other device so far.
    When I try Multiplayer and PtP scene, I got this launching Find match

    $photo.PNG

    Any idea about this strange behaviour of the window ?!
    Thanks
     
  10. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Hello, Thanks a lot for purchasing and for issue report.
    I've have tested multiplayer only on IOS7, I let you know as soon as I check this IOS6.

    Please send me your e-mail, and I will send your fixed version ASAP.
    Cheers!
     
  11. Javy

    Javy

    Joined:
    Mar 18, 2012
    Posts:
    20
    Hi Lacost,

    Thank you for making great plugins with open source code.

    I'd like to request Admob and iAd banner ad features. Ad revenue is very important to many developers, I would guess even more important than iCloud and Google Cloud.

    Can you create the additions to your code for banner ads on both iOS and Android?

    Thank you again for such a great product!
     
  12. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Hello Javy, Thanks for purchasing.

    I planing to work on it during next month, for both plugins.
    Cheers!
     
  13. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    92
    hi lacost,

    This is really an awesome pack.Got some questions which i couldn't resolve through docs.
    1>Can i retrieve leaderboards/achievements data and show them in my custom UI?
    2>What result set leaderboards returns(is it global/just friends data set)?Are there separate functions to achieve these two different type of results?

    Thanks.
     
    Last edited: Oct 31, 2013
  14. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Hello. Thanks for purchasing.
    Sure you can.
    After you inittialize game center with this
    Code (csharp):
    1. GameCenteManager.init()
    function. Plugin will request achievements data.

    As soon as you will get GAME_CENTER_ACHIEVEMENTS_LOADED event, all achievements data will be stored in this array, and you can easily access it.

    Code (csharp):
    1. public static List<AchievementTemplate> achievements {get;}
    Uf you want custom interface for achievement progress then. set isCompleteNotification param of this function to false.
    Code (csharp):
    1. public static void  submitAchievement(int percent, string achievementId, bool isCompleteNotification)
    Standart achivement progress iterface will not popup any more, so you can handel GAME_CENTER_ACHIEVEMENT_PROGRESS event by your self.


    If you what to get leaderboard data, just use this function
    Code (csharp):
    1. public static void getScore(string leaderBoradrId)
    I do not actually understand what do you mean by this.
    Code (csharp):
    1. public static void  reportScore(int score, string leaderBoradrId)
    This function will not return any result. It will just send your data to Game Center. And there is no separation in Game Center for friend or global data, you are setting global results only.

    Cheers!
     
  15. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Dear lacost,

    I don't find any forum thread a about android plugin ....
    However I want ask you if it is possible save any image like screenshot using your library on android.

    Thanks
     
  16. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Hello, kaz2057.

    Here is Android Native Thread
    http://forum.unity3d.com/threads/201468-Released-Android-Native-Plugin


    No, I'm not supporting this.

    I look at my plugins in a bit other direction.
    I try to include function with is simply necessary for every app and make it affordable. If you want something specific, I think like for example some cool stuff with the camera or native maps. You should do it by your self or buy expensive plugin with huge feature list.

    Currently both plugins support.
    In-Apps
    Game Center / Play Service
    iCloud / Google Cloud
    Native multiplayer / coming soon for Android
    Advertising - coming soon for both plugins.

    Thanks for your interest!
    Cheers!
     
  17. myohyun

    myohyun

    Joined:
    Nov 3, 2013
    Posts:
    1
    there's a huge error. after purchasing once, "purchase success" popup appears twice. and then it makes it as purchasing twice. paying double.

    " private static void onProductBought(CEvent e) { " this is also called twice. more than once
     
    Last edited: Nov 3, 2013
  18. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Hello. Thanks for purchasing.

    I sure there is no problem like described.
    A lot of people already use this plugin with their released apps(including me). So I am sure that there is can't be hole like this.

    Can you please send me more detailed description (it will be perfect if you will attach project). I will try to figure it out what triggers double purchasing in your project ASAP.
    lacost.st@gmail.com

    Cheers!
     
    Last edited: Nov 3, 2013
  19. tenlinstudios

    tenlinstudios

    Joined:
    Nov 6, 2013
    Posts:
    3
    Not sure if this has been asked, but is the PRO license required to use this plugin for iOS?
     
  20. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    No, Native code plugins for mobile devices can be used with the free version of Unity.
     
  21. tenlinstudios

    tenlinstudios

    Joined:
    Nov 6, 2013
    Posts:
    3
    Thanks for the quick response!
     
  22. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    92
    Hi Lacost,
    After IOS pack purchased your android native pack also.Thanks for creating such nice packs.

    But while implementation i ran into a confusion regarding player authorization which is as:
    While first time authorization check is handled by GameCenterManager.GAME_CENTER_PLAYER_AUTHENTICATED check.What if while playing the game user changes the Game Center login.Is there any check which can validate if the logged in player (IOS Game Center)is the same as that having in the Game center Manager of Native class or the above mentioned event handler will handle the scenario appropriately?

    This may sound too weird,but as a developer one has to think even of the most weirdest cases :)

    Thanks.
     
  23. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Hello thank you mention this.
    Basically if player is log out from game center, when he will try to open leader board or achivements he will be asked to log in again.
    But I will work on this scenario more carefully.
    Thanks!
     
  24. knuffellutje

    knuffellutje

    Joined:
    Aug 26, 2013
    Posts:
    1
    Hi lacost,

    I implemented the plugin, but when trying to use the data from ProductTemplate I ran into an issue.
    In InAppPurchaseManager.m you create a string with the product data and you separate them with ",". My localized prices were in this format: "0,89", so when splitting up the string in onStoreDataRecived in InAppPurchaseManager all my data was wrong. I changed it so my products are separated with the string "<>" and my product data is separated with "||".
    It would be a good idea to change the comma separator, because if the localized prices have comma's or if the product descriptions have comma's, the data in ProductTemplate will be incorrect.
     
  25. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Hi there, thanks for reporting the problem.
    The issue is already fixed and will be available in the next update.
    Please PM me your e-mail and I will send you updated version.

    P.S. New version will be also contain, iAd, Local and Push notifications.

    Cheers!
     
  26. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    New Features:
    • iAd App Network
    • Local Notifications
    • Push Notifications
    • Game Kit Banner

    Price is the same :)
     
  27. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    the kit do not have facebook/twitter/weibo post message?
     
  28. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Not yet.
    This is plans for future updates.
    But I am not sure about Facebook, Unity already have cross platform plugin for it.
    But Tweeter very reasonable request.
    Cheers.
     
  29. Afroman

    Afroman

    Joined:
    Aug 17, 2013
    Posts:
    43
    I got a feature request!

    Apple provides a way for developers to receive app arguments through special promotional web links called "Smart App Banner".

    https://developer.apple.com/library...s.html#//apple_ref/doc/uid/TP40002051-CH6-SW7
    Apparently all you have to do is just implement a delegate that gets fired at app launch. (It's at the bottom)

    I couldn't find any other plugin with this cool yet underused feature, so it would be great if you added it!
     
  30. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Thanks for requesting this feature, I will add this in the next update.
    Cheers!
     
  31. Mikea15

    Mikea15

    Joined:
    Sep 20, 2012
    Posts:
    93
    Hello Lacost,

    I recently bought your plugin so I could use the In-App Purchase feature, which I still haven't made it to work.

    I already had the certificates and the aplication on "Ready to Upload" status. I also have the Non-Consumable added to the app version.

    Inside the Unity3D, on my menu scene, I've added the game object with the IOSNative script, and added the correct APP Id.

    I've set up everything on the file so I could listen to the events on purchase and on failure.

    I've also setup to restore previous purchases.

    Now the problem, when I hit "Buy" ( My beautiful button ), I call InAppManager.instance.buy(myItem), but nothing happens.

    Also, on Xcode, I've added the In-App Purchase to the App, as well as the StoreKit.

    I don't think I'm missing anything, but I'll paste here some of the code I'm using so its clearer to you.

    Code (csharp):
    1. #if UNITY_IPHONE
    2.     public const string kUNLOCK_FULL_GAME = "com.MichaelAdaixo.MemTilesKidsLite.UnlockFullGame";
    3.  
    4.  
    5.     private static void OnUnlockFullGameFailed( )
    6.     {
    7.         IOSNative.showMessage("Fail", "Transaction was failed");
    8.     }
    9.  
    10.     private static void onProductBought(CEvent e) {
    11.        
    12.         IOSStoreKitResponce responce =  e.data as IOSStoreKitResponce;
    13.         Debug.Log("STORE KIT GOT BUY: " + responce.productIdentifier);
    14.         Debug.Log("RECIPT: " + responce.receipt);
    15.  
    16.         IOSNative.showMessage("Success", "product " + responce.productIdentifier + " is purchased");
    17.     }
    18.    
    19.     private static void onTransactionFailed(CEvent e) {
    20.         IOSStoreKitResponce responce =  e.data as IOSStoreKitResponce;
    21.         IOSNative.showMessage("Fail", responce.error);
    22.     }
    23.  
    24. #endif
    This is inside the start function. This script runs after IOSNative.
    Code (csharp):
    1. #if UNITY_IPHONE
    2.         InAppPurchaseManager.instance.addProductId(kUNLOCK_FULL_GAME);
    3.  
    4.         InAppPurchaseManager.instance.addEventListener(InAppPurchaseManager.PRODUCT_BOUGHT, onProductBought);
    5.         InAppPurchaseManager.instance.addEventListener(InAppPurchaseManager.TRANSACTION_FAILED, onTransactionFailed);
    6.  
    7.  
    8.         InAppPurchaseManager.instance.loadStore();
    9.  
    10.         InAppPurchaseManager.instance.restorePurchases();
    11. #endif
    When I run the app I get these log messages:
    This is how I call the buyProduct.
    Code (csharp):
    1. void OnBuyFullGameIOS( )
    2.     {
    3.         InAppPurchaseManager.instance.buyProduct(kUNLOCK_FULL_GAME);
    4.         Debug.Log("Trying to buy product");
    5.     }

    Now I must be missing something. But I don't know what.. :S

    Also, I am testing this is a iPod Touch with iOS 5.1.1

    PS: I just noticed my In-App Non-Consumable has this ID: com.MichaelAdaixo.MemTilesKidsLite.UnlockFullGame
    And my game has : com.michaeladaixo.MemtilesKidsLite

    Would this be an issue??

    Any help is appreciated. Thanks :)
     
  32. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
  33. Mikea15

    Mikea15

    Joined:
    Sep 20, 2012
    Posts:
    93
    I'll test it out when I leave work, and I'll let you know how it goes :)

    Thanks
     
  34. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Thanks a lot.
    Sorry for such inconvenience.

    Cheers!
     
  35. SouthernCoder69

    SouthernCoder69

    Joined:
    Oct 23, 2013
    Posts:
    74
    I have a simple request:

    As it stands now, from the example for GameCenter - when you click any of the 'show leaderboardX' buttons, it prompts you to login. The problem is that the 'Show leaderboards'(all of them) does not initiate the login dialog, and instead says 'unavailable'. How can i make the GameCenter.ShowLeaderBoards() behave the same as GameCenter.ShowLeaderboard (name of leader board) ? Should be simple, but the plugin stuff is causing me headaches…

    Also - i do like the asset, and the decent price - but there is something that you MUST do to make this become truly simple to use. Unfortunately, there are an amazing number of spelling errors which are a little silly:

    private static extern void _initGamaCenter(); --> should be _initGameCenter()
    _getLeadrBoardScore(leaderBoradrId); -> should be _getLeader…and BoardId..
    tpl.id = achievemenId; -> should be achievementId

    etc etc ect, there are at least 20 of these silly errors - polishing this up would make this look very professional :) Just a suggestion!
     
    Last edited: Dec 1, 2013
  36. Mikea15

    Mikea15

    Joined:
    Sep 20, 2012
    Posts:
    93
    Hey Lacost, the plugin works fine now.

    Thank you for your fast support! :)
     
  37. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Thanks for purchasing Mikea15, I am glad you satisfied with the plugin.

    Hello, SouthernCoder69. I got mail with the pretty much same content recently, probably it was yours, but anyway.
    I understand your confusion. Thats why I wrote simple Game Center coding Guideline.
    Please have a look at:
    https://docs.google.com/document/d/1IT1qIuM6QsqV7D--69uv0sn4OSQ24UQKos3x0P3BQjc/edit#heading=h.67obzp6pacpg

    Yea, completely agree with you. Point is English not my first language. I working on it, but steel making errors. If you guys can report about stuff like this I will really appreciate this and fix it right away.

    Cheers!
     
  38. damelin

    damelin

    Joined:
    Jul 3, 2012
    Posts:
    25
    Anyone used the In-App Purchase feature with iOS 5 (more specifically 5.1.1) ?

    Everything works fine on iOS 7, but when I upload the same build to my ipod 5.1.1, I get "invalid product id" for all the products. My project iOS target is 5.0 in the unity player' setting.
     
  39. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    This problem can be triggered by device also, is it jailbroken?
    Try to go true this checklist

    • Have you enabled In-App Purchases for your App ID?
    • Have you checked Cleared for Sale for your product?
    • Have you submitted (and optionally rejected) your application binary?
    • Does your project’s .plist Bundle ID match your App ID?
    • Have you generated and installed a new provisioning profile for the new App ID?
    • Have you configured your project to code sign using this new provisioning profile?
    • Are you building for iPhone OS 3.0 or above?
    • Are you using the full product ID when when making an SKProductRequest?
    • Have you waited several hours since adding your product to iTunes Connect?
    • Are your bank details active on iTunes Connect? (via Mark)
    • Have you tried deleting the app from your device and reinstalling?
    • Is your device jailbroken? If so, you need to revert the jailbreak for IAP to work.

    Cheers!
     
  40. damelin

    damelin

    Joined:
    Jul 3, 2012
    Posts:
    25
    Oh man.. I've just reboot the device, re-install the app and it works now! Feel stupid hehe :/

    Congrats for you plugin, really useful, and very easy to use. I've setup the in-app in no time. Had some experience with other plugins (like the StoreKit from Prime31 which is great too) but you got me with your receipt validation!
     
  41. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    520
    hello lacost
    i test the plug in, and surprisingly it work right of the box, as i m still a beginner i wonder how to call a specific function to unlock a level by exemple with your in-App asset.
    let s say i have a script call gamemanager wich has a public void unlockMyLevel()
    wich function should i use once i got the product bought?

    thanks for your help
     
  42. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    520
    hello lacost

    i try to add this line of code but it dont seem to register the event, could you provide me a simple way to call a function with your asset?

    here is what i try

    private static void onProductBought(CEvent e) {

    IOSStoreKitResponce responce = e.data as IOSStoreKitResponce;
    Debug.Log("STORE KIT GOT BUY: " + responce.productIdentifier);
    Debug.Log("RECIPT: " + responce.receipt);

    switch(responce.productIdentifier) {
    case SMALL_PACK:
    GameObject unlock = GameObject.Find("Cube");
    unlock.SetActive(false);
    //code for adding small game money amount here
    break;
    case NC_PACK:
    //code for unlocking cool item here
    break;

    }


    thanks for your help
     
  43. SebastianCrow

    SebastianCrow

    Joined:
    Aug 18, 2013
    Posts:
    3
    Hey Lacost,

    Is it possible to create custom UI using your plugin?
    E.g., I see in documentation that retrieving GameCenter achievement list is possible but can I get leaderboards data to use it in my customized UI?

    Thanks for response.
     
  44. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    520
    i try to test the gamecenter exemple Scene, it open game Center with my sandbox log in, add the hiScore to my leaderboeard so far it work but but when i increment to +1 hiScore won t update on the leaderboard ? i see that hiScore got increment by +1 but didn t got updated when i check gamecenter leaderboard...
    does it suppose to behave like that by default?
     
  45. wana7262

    wana7262

    Joined:
    Jul 2, 2012
    Posts:
    97
    noob question:

    i used many plugin all of them mostly have the problem of Main Activity in Menifest.xml file.. does your plugin also uses its main activity?

    how can i make two activities as main activity?

    i used free GPG plugin with Facebook and some monetization plugin all of them want the their activity set as Main activity... Help
     
  46. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    92
    From the included examples of icloud ,it seems to be mostly using key-value data for icloud storage.

    Is there any way to achieve document storage for icloud?If not are there any plans to implement document storage on icloud,as it will be useful for the cases where large amount of keys are needed to save game state?
     
  47. nachobeard

    nachobeard

    Joined:
    May 7, 2013
    Posts:
    47
    Hello

    Is it possible to use the iOS native events functionality to provide handlers for touch events?

    the problem is that if you use the regular unity touch input you miss a lot of touch events (you only get the last touch moved event that happens in-between frames).

    I was hoping that by using your sytem I'd be able to provide my own handler so I can process **all** touch events that iOS generates.

    is such a thing possible with your plugin?

    thanks.
     
  48. nachobeard

    nachobeard

    Joined:
    May 7, 2013
    Posts:
    47
    Bought the plugin to try it out.
    I make a new project, import the plugin and load the "ExampleScene".
    I try to run the app and get some linker errors. $Captura de pantalla 2014-01-14 a la(s) 00.10.47.png

    I've got unity 4.3, installed freshly on a new machine a couple of months ago.
     
  49. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,782
    Hello.
    For now it's only key-value

    Please add required IOS framework like described in Setup Guide

    Cheers!
     
  50. MrScary

    MrScary

    Joined:
    Dec 8, 2007
    Posts:
    92
    Just installed 4.3.4.. Am getting this with the latest version of iOS Native

    $compile_errors.jpg
     

    Attached Files:

    Last edited: Feb 4, 2014
unityunity