Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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,790
    I would like to present IOS Native Unity Plugin. With this plugin you can easily access Game-Center, In-App Purchases, iCloud and a lot more from within Unity, on your IOS device. The plugin comes with complete documentation and a sample scene to get you started immediately!



    Available on Asset Store | Documentation | Versions


    All Source Code is Open!
    IOS6, IOS7, IOS8 - supported

    Fully compatible with All Stan's Assets Plugins

    Game Center
    * iTunes Setup
    * Init The Game Center
    * Leaderboards
    * Achievements
    * Changes
    * Friends
    * Real-Time Multiplayer

    In-App purchases (Cons. / Non-Cons.)
    * iTunes Setup
    * Coding Guidelines
    * Transactions Validation
    * Restoring Purchases

    Social Sharing
    * Facebook Post
    * Twitter Post
    * Native Sharing Dialog
    * Sending e-mail
    * Documentation

    iAd App Network
    * Banners
    * Interstitials
    * 9 Gravity Options supported
    * Ability to set Cusrom x,y banner point
    * iTunes Setup
    * Coding Guidelines

    Camera And Gallery
    * Taking Photo from Camera
    * Loaing Texture from Gallery
    * Saving Texture to Gallery
    * Saving Screenshot to Gallery
    * Coding Guidelines

    iCloud
    * iTunes Setup
    * Coding Guidelines

    More features
    * Video API
    * Local Notifications
    * Push Notifications
    * Shared App API
    * Poups and Pre-loaders
    * System Native Events
    * Flash Like Events as gift

    Playmaker
    * Avaliable Actions List
    * iAd Playmaker Actions Guide
    * InApp Purchasing with Playmaker

    Supported 3-rd party plugins:
    • Playmaker - Artists and Designers: Realize your creative vision without coding! Unlock the power of Unity.
    • Simple IAP System - Takes the complexity out of in-app purchases (IAPs) and the billing process as a whole by providing a one-stop solution for managing IAPs.

    Hot get Support
     
    Last edited: Nov 11, 2014
  2. Peter78

    Peter78

    Joined:
    Dec 4, 2012
    Posts:
    2
    As i can see, your popup dialogs can be used for any language but your example of the rating dialog shows me no possibility to insert my own text. Is it possible to display this dialog in any localized version?
     
  3. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Sorry for late replay.
    Of course you can insert any language in rate popup as well. There is one more constructor for rate pop up
    Code (csharp):
    1. public static IOSRateUsPopUp Create(string title, string message)
     
    Last edited: Jun 19, 2013
  4. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,255
    Purchased. Thanks
     
  5. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Thanks for purchase, derkoi.

    By the way new update is coming, it was submited on asset store more than week ago, so it should be released soon.
    It will contains improved (speed) events and Game Center Achivmets full support.

    And I whant to ask you guys.
    Do you whant to have an opportunity subscire on IOS events like:
    "OnMemoryWarningReceived"
    "ApplicationDidEnterBackground"
    "ApplicationDidBeacomeActive"

    But if I implement this it may require additional setup steps. So what do you think?
     
  6. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Version 1.2 is now avaliable on asset store
    https://www.assetstore.unity3d.com/#/content/7421

    • Game Center full Achievements support dded
    • Events Systme Speed increased

    Firs post of this thread with how to use instruction was updated.
    Thanks.
     
  7. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Hi,

    Nice, but, are you planned to do the same for Android?
     
  8. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi lacost.

    Congratulations. One of very few products I see and buy immediately :)

    Regarding your question, yes, I think being notified of when the app enters the background or becomes active again would be most welcome indeed! The memory warning... meh, not so much...
     
  9. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hi, ZJP Thanks for your interest.

    Shure. I plenned to do it month ago but shipping of android device is delayed, I simply do not have test platfrom now.
    And I was working on other ideas with are finished and released already
    TOD List | Events Pro

    So if everesing will go as I expect first version of Android Plugin will be ready in next two weeks.

    Thanks for kind words MrDude, appreciated!
     
  10. HollowRockAdam

    HollowRockAdam

    Joined:
    Jan 15, 2013
    Posts:
    16
    lacost,

    Thank you for making this amazing plugin. I have gotten all of the features up and working, except for one. I am unable to properly submit scores to GameCenter Leaderboards. I cannot figure out what I am doing wrong.

    In my opening scene, I run the IOS Native script.

    I have the GameCenterManager script run when my airplane explodes (this is the point in the game where the score should be submitted) - and GameCenter opens the proper leaderboard, but it does not submit the score.

    I tried it also with the GameCenterExample script - but, I can only get it to send the preset init hiScore of 100.

    It would be greatly appreciated if you could point me in the right direction, I just cannot figure out what I am doing wrong.

    Thanks again for such a great tool!
     
  11. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello, HollowRockAdam
    Thanks for kind words and purchase.

    For submitting score you should use this function
    Code (csharp):
    1. GameCenterManager.reportScore(hiScore, leaderBoardId);
    make shure that leaderBoardId is correct and it the same with leader board id you trying to show.
    And of cuorse check please that AppID and App bundle Id is correct and much with your registered itunes app.

    If you steel need help please PM me or send E-mail at lacost.st@gmail.com
    I can do a closer look on your code to figure out what goes wrong.
     
  12. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello :)

    Thanks for your support and feedbacks.
    One more feature was implemented and next version of IOS Native is on review now

    Now you can listen for the system events like

    applicationDidBecomeActive
    applicationDidReceiveMemoryWarning


    Here is little example how to do this.

    Code (csharp):
    1.    
    2.     //--------------------------------------
    3.     // INITIALIZE
    4.     //--------------------------------------
    5.  
    6.     void Start() {
    7.         IOSNative.instance.addEventListener (IOSNative.APPLICATION_DID_BECOME_ACTIVE,                OnApplicationDidBecomeActive);
    8.         IOSNative.instance.addEventListener (IOSNative.APPLICATION_DID_RECEIVE_MEMORY_WARNING,       OnApplicationDidReceiveMemoryWarning);
    9.     }
    10.  
    11.     //--------------------------------------
    12.     // EVENTS
    13.     //--------------------------------------
    14.    
    15.  
    16.     private void OnApplicationDidBecomeActive() {
    17.         // Called when application become active again. Optionally refresh the user interface, check for some data than probably was chenged wile application was paused
    18.  
    19.         Debug.Log ("Catched  OnApplicationDidBecomeActive event");
    20.     }
    21.  
    22.     private void OnApplicationDidReceiveMemoryWarning() {
    23.         //Called when application receives a memory warning from the system.
    24.  
    25.         Debug.Log ("Catched  OnApplicationDidReceiveMemoryWarning event");
    26.     }
    27.  
     
  13. Mars91

    Mars91

    Joined:
    Mar 6, 2012
    Posts:
    572
    Hi,
    Are you planning to add some new ios features? Like playing videos or using the keyboard or stuff like that?
     
  14. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    I am open for the feature request's.
    Last feature requested was applicationDidBecomeActive event. And now it's ready.

    For now I do not have feature request for this plugging (just little things with documentation)
    So I open for propositions. You can post them here, send PM or E-mail at lacost.st@gmail.com

    Thanks for your interest, FootprintGames.
     
  15. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,255
    Hi Lacost, excellent plugin.

    I'm wondering if you plan on making a Native Android plugin too?
     
  16. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello derkoi, I sure do.
    And I will start working on it as soon as I get my test device.
     
  17. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,255
    Great!
     
  18. echoic

    echoic

    Joined:
    Apr 29, 2011
    Posts:
    89
    Just bought this. Very easy to use, love it! My app runs in landscape view, is there any way to make the 'rate this' pop-up appear vertically in landscape?

    Thank you!
     
  19. stanislav-osipov

    stanislav-osipov

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

    I afraid thai I didn't get your point. Can you explain more what behavior you trying to achieve?
    The popup-us orientation depends on device orientation mode.
     
  20. echoic

    echoic

    Joined:
    Apr 29, 2011
    Posts:
    89

    The pop-ups are only being displayed with portrait orientation even though I have built my application to run in landscape mode.
     
  21. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    It seem like something going wrong. Event example scene included in the project is designed for landscape mode, and popup's are displaying in landscape mode there. That why you question was a little bit confusing to me.

    Popups should really on device orientation mode. I'll send you PM.
     
  22. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Version 1.3 is now available on Asset Sote

    Application event's listen example
    Code (csharp):
    1.  
    2.     void Start() {
    3.         IOSNative.instance.addEventListener (IOSNative.APPLICATION_DID_BECOME_ACTIVE,                OnApplicationDidBecomeActive);
    4.         IOSNative.instance.addEventListener (IOSNative.APPLICATION_DID_RECEIVE_MEMORY_WARNING,       OnApplicationDidReceiveMemoryWarning);
    5.     }
    6.  
    After you subscribed on events you can handle it handler functions

    Code (csharp):
    1.  
    2.     private void OnApplicationDidBecomeActive() {
    3.         // Called when application become active again. Optionally refresh the user interface, check for some data than probably was chenged wile application was paused
    4.  
    5.         Debug.Log ("Catched  OnApplicationDidBecomeActive event");
    6.     }
    7.  
    8.     private void OnApplicationDidReceiveMemoryWarning() {
    9.         //Called application receives a memory warning from the system.
    10.  
    11.         Debug.Log ("Catched  OnApplicationDidReceiveMemoryWarning event");
    12.     }
    13.  
     
  23. Abnormalia_

    Abnormalia_

    Joined:
    Jul 23, 2013
    Posts:
    128
    I've bought this plugin few days ago.

    I have 2 game projects in Unity (just upgraded to 4.2),

    Whenever I import this plugin to one of the project unity crashes. I noted this happens when it start compile script and adds dll in extensions folder.

    Then it keeps crashing unless I remove dll manually.

    Can yo advise how can I get rid of crashing ?
     
  24. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    I sure that such behavior caused by new Unity version.

    I will upgrade to Unity 4.2 for testing today.

    Edited:
    IkaBika, I've sent you PM message with compiled and tested plugin version on Unity 4.2 version. Please send be Pm message I just what to now is problem gone for you? This is the only one report with crash on Unity 4.2 I got so far, and what to be sure that problem is solved for you. Thanks.
     
    Last edited: Jul 24, 2013
  25. Abnormalia_

    Abnormalia_

    Joined:
    Jul 23, 2013
    Posts:
    128
    Now it works just fine, no crashes thanks you ! :)
     
  26. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Glad To hear that. Thanks for purchasing!
     
  27. Fusnex

    Fusnex

    Joined:
    Aug 7, 2013
    Posts:
    2
    Hi Lacost,

    This plugin looks great and the price is unbeatable. However, it is missing an important feature: Restore In-App purchase? I don't see this feature listed in your documentation. From what I've read, Apple will reject apps that doesn't have a restore button that uses non-consumable in-App purchase.
     
  28. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello Fusnex, that is reasonable note. And this feture already was requested. It will be available after next update.
     
  29. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello. The new update is submitted to Asset Store

    Restoring purchases:
    Code (csharp):
    1.  
    2. InAppPurchaseManager.instance.restorePurchases();
    3.  
    More examples added how to manage multiple leader-boards

    Show default leaderBoard page(the page with leader-boards list):
    Code (csharp):
    1. GameCenterManager.showLeaderBoards ();
    Request lleader-board score for current user:
    Code (csharp):
    1. GameCenterManager.getScore(leaderBoardId);
    Update is now available.
     
    Last edited: Aug 15, 2013
  30. jhample

    jhample

    Joined:
    Jul 7, 2012
    Posts:
    47
    I cannot seem to get this to work. I am getting "Cannot connect to payment servers, check your internet connection" on my devices. And I get:

    EntryPointNotFoundException: _loadStore
    at (wrapper managed-to-native) IOSNative:_loadStore (string)
    at IOSNative.loadStore (System.String ids) [0x00000] in <filename unknown>:0
    at InAppPurchaseManager.loadStore () [0x00000] in <filename unknown>:0
    at Store.Start () [0x00000] in <filename unknown>:0

    and

    EntryPointNotFoundException: _buyProduct
    at (wrapper managed-to-native) IOSNative:_buyProduct (string)
    at IOSNative.buyProduct (System.String id) [0x00000] in <filename unknown>:0
    at InAppPurchaseManager.buyProduct (System.String productId) [0x00000] in <filename unknown>:0
    at Store.Purchase1000() [0x00000] in <filename unknown>:0
    UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
    tk2dUIItem:DoSendMessage(String)
    tk2dUIItem:Release()
    tk2dUIManager:CheckInputs()
    tk2dUIManager:Update()

    (Filename: Line: -1)

    when attempted in the simulator. Have you seen these errors before?
     
    Last edited: Aug 22, 2013
  31. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello.
    Everything is simple. You can not test payment on simulator, you need device for testing.
    And make sure that you have set up your app and iTunes setting correctly. And do not forget to create iTunes test account to be able to test payment.
    If you still have problems running the plugin, please email me at lacost.st@gmail.com. I am responding much quicker via email. Feel free to contact me.
    Cheers.
     
  32. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    Hi do you have a version that is compatible with unity 3.7+?
     
  33. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello Changchun. The version does not use any special features of Unity4. It fully compatible with 3.5+ Unity versions.
     
  34. MajidKhosravi

    MajidKhosravi

    Joined:
    Jun 21, 2013
    Posts:
    39
    Dear Lacost,

    I bought it and imported it into my project.

    When I try to use rate my app, it opens a link in app store and giving me the following error:

    Your request produced an error.

    [newNullResponse]

    I have added my app id already, any suggestions?
     
    Last edited: Aug 29, 2013
  35. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello MajidKhosravi, thanks for purchasing

    Please make sure that IOSNative game-object is on your initial scene. But I need more info to find out what is going wrong.

    If you steel need help, please send me e-mail: malito:lacost.st@gmail.com
    Cheers!
     
  36. Afroman

    Afroman

    Joined:
    Aug 17, 2013
    Posts:
    43
    Hi Lacost,

    I was just wondering if you can verify a transaction with iAP.
    Does it provide a receipt when a product is bought?
     
  37. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello kalid360 , sorry for slow replay.
    Here is few scenarios

    1) You initializing purchase flow by calling buyProduct(string productId) function of InAppPurchaseManager
    2) Customer successfully bought product
    3) Your application gets PRODUCT_BOUGHT event

    That is most common scenario, and you got your PRODUCT_BOUGHT event only after customer paid for your product

    Here is few more scenarios with can also happened.

    1) You initializing purchase flow by calling buyProduct(string productId) function of InAppPurchaseManager
    2) Application crashed (unknown reason)
    3) Customer successfully bought product when your app wasn't running any more
    4) Your app does not get PRODUCT_BOUGHT event
    5) Customer starts your app again
    6) Your app receives PRODUCT_BOUGHT event after InAppPurchaseManager initialized


    Only for non-consumable products
    1) Customer changed device
    2) Customer initialize restore purchase flow
    3) Your app receives PRODUCT_BOUGHT event for all purchases hi owned

    Note: PRODUCT_BOUGHT event contains productId information
    Note: you can also get TRANSACTION_FAILED if customer canceled transaction or hi didn't finish purchase flow (any reason)
     
  38. Afroman

    Afroman

    Joined:
    Aug 17, 2013
    Posts:
    43

    Hi Lacost,

    That's a alright, I've actually been holding off. It's the only thing holding me back.
    I understand that you get the PRODUCT_BOUGHT event after the user purchased the item.
    What if the transaction was fraudulent? I want to be able to verity the receipts server-side.

    Does the PRODUCT_BOUGHT event allow me to do that?
     
  39. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Okay, I got your point now.
    Here is detailed explanation, not only for you but for others who interested in this question too.

    Part from IOS Developer Guide:

    How can I validate transactions that have already completed?

    Consumables If you have saved the receipts, either on the device or on your server, revalidate the receipts after implementing your mitigation strategy. If you have not saved the receipts, you cannot validate these past transactions; you should not take any action. (currently not implemented )

    Non-consumables Set aside the current receipts, perform a restore operation, and validate the new receipts. Avoid redownloading content that is already on the device during this process. (currently implemented )

    If you talking about Consumables receipts validation, there is no such function inside package currently. But this is what this thread for. I will treat your massage as feature request, and that feature will appear in next package version.


    As you already noted, package is full open source. So if you wary about transaction secure you have few options.

    1) Modify Transaction controller to communicate with your own secure server. (I can not help you with this, but you able to do that because source is open)
    2) Wait about 1 week until package update, and get receipts validation function using Apple servers.
    3) And of-corse you can modify the code by your self to add this function. In case.

    Thanks a lot for feature request. Be sure that receipts validation will be part of new update.
     
    Last edited: Sep 9, 2013
  40. Afroman

    Afroman

    Joined:
    Aug 17, 2013
    Posts:
    43

    Hi Lacost,

    I was actually asking about validating transactions at time of purchase with the receipts, verifying that the transaction is non-fradulent.
    It's good that you brought this up though as I wasn't aware you could even do this.

    I could be crazy, is this the same thing as validating consumable transactions at time of purchase?

    Regardless, I can't thank you enough for the support, it's amazing that you've even considering it and promised it in a future update.
    I will look forward to that feature, I will still purchase your asset now anyways.
     
  41. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Thanks for purchase.

    As I understand you can validate only completed transaction with receipt. I will dig in to this issue when start to implement this. It should be done on this week.
    If you what to get this version before official update, just PM me your e-mail.

    Cheers!
     
  42. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,151
    lacost, do you plan to add more api like facebook, tweeter messaging? is there any roadmap?
     
  43. Z3R0Skull

    Z3R0Skull

    Joined:
    May 15, 2013
    Posts:
    5
    Hi

    Thanks for the great asset, I just purchased :)

    Two questions:

    Did you think about implementing iCloud?
    Any news about an android native asset?
     
  44. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    The main idea of asset is creating tool with is all what you need for porting game to IOS. So in first version I implemented all basics feature with everybody need in the game. Now I improving asset code and architecture, and excepting feature requests.
    Next step going to be iCloud.

    Thanks a lot.

    It will probably next api for this asset. But I can't say time rage when it going to be implemented.

    Yea.
    It already submitted. Asset contains native popups, billing, full goole play (achievements, leaderboards, cloud)
    If you would like to get more info, here is documentation.
    https://docs.google.com/document/d/1px0BVXcZqgrW99OQV4bM7q1rD5NYaCYTxXnn4eS4ytY/edit

    And also asset for implementing Goole Play Services to IOS (achievements, leaderboards, cloud) waiting for review in asset store. So you can consider using Google Cloud on Android and IOS instead of iCloud on IOS only.
    here is asset documentation

    https://docs.google.com/document/d/1vuB8xIpKmW3VCjVAXejiOsrY5lHXWW-xWoclFVXWlVc/edit


    Cheers!
     
  45. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
  46. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,151
    I've just bought it. my feature request; i would like to see iAd and Facebook integration features with your product.
     
  47. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Thanks for purchasing, and for feature request. New update will come shortly.

    I know that a lot of peaple wating for Android plugin with the same structure
    Good news! Two new plugins released!

    Android Native Plugin

    $Asset Store - Android Native Plugin.png



    Google Play Service For IOS

    $Asset Store - Google Play Service For IOS.png



    I hope you will enjoy using this plugins in your game the same as IOS Native plugin!
    Cheers!
     
    Last edited: Sep 20, 2013
  48. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,151
    thanks for Android plugin. i just wondered why android plugin is little more expensive then ios? :)
     
  49. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello, thanks for your interest.

    Well it little more expensive because two main reasons.
    1) in addition to all ios native plugin features (IAPs, Play Service, Pop-ups) it also has google cloud integration.
    2) Android plugin support takes much more time then ios plugin.
     
  50. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,151
    it make sense, more features means more money. i missed cloud integration now i see differences.

    is it possible to use ios game center integration to android?

    is there any examples that ios game use google play service. because apple does not like other systems on app review :)