Search Unity

[Released] IOS Native Unity3D Plugin

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

  1. MrScary

    MrScary

    Joined:
    Dec 8, 2007
    Posts:
    94
    My problem is fixed... I nuked all the existing extensions plugins and script folders, reimported the package fresh, and everything seems to work okay now.. Thanks for the quick response via email.
     
  2. RC15

    RC15

    Joined:
    Apr 19, 2013
    Posts:
    38
    Hi,
    congrats for the plugin.
    Just a question. Does it require pro version of Unity and Unity iOs ?!
    Thanks

    Edit: Just tested. Works perfectly.
     
    Last edited: Feb 6, 2014
  3. eyalfx

    eyalfx

    Joined:
    Oct 8, 2010
    Posts:
    108
    Excellent plugin. I totally dumped my prime31 to use that one :)
    My only issue is that while running in editor, after every time I stop the game I get a leftover InAppPurchaseManager gameobject and they keep accumulating with each play session. I also get this error when I stop running. Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)
    Did I set it up wrong?
    Thanks.
     
  4. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,162
    have your plugin any support for ios 7 application background refresh?
     
  5. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    380
    Hello everyone is there anyone here who has experience setting up i-ads and GameCenter that might be interested in making a quick $ 40 to give me a little 1 hour skype LESSON ?

    Please let me know I will download this assest and we can begin :D

    Just know I have 0 programming skills. :( but my game is ready to go, and its fairly simple. I just need help putting in iads and game center..
     
  6. TheRaider

    TheRaider

    Joined:
    Dec 5, 2010
    Posts:
    2,250
    I am getting

    "(Filename: /Applications/buildAgent/work/d3d49558e4d408f4/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 53)

    2014-02-16 18:31:37.211 AppName[45871:60b] reportScore:
    2014-02-16 18:31:37.216 AppName[45871:60b] NEW HI SCORE : 5000
    2014-02-16 18:31:37.217 AppName[45871:60b] category 001
    SubmitScore"

    The score actually submits but the app freezes after that comes in an infinite loop.
     
  7. chriscj477

    chriscj477

    Joined:
    Feb 7, 2014
    Posts:
    4
    I am having a lot of trouble using this plugin in my unity project. I have been able to use the iAd example to show iAds, but cannot integrate it in my project, what have I missed?

    I have amended IOSNative.cs to include my app_id, and I have added IOSNative.instance.Init(); inside Void Awake() in my GamePlayGUI.cs, what have I missed?? Any help would be appreciated, cheers :)
     
  8. iamthehunta

    iamthehunta

    Joined:
    Feb 17, 2014
    Posts:
    4
    UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String:AppControllerClassName]);

    Thread 1: signal SIGABRT

    Will not run after build. I added app id and loaded store kit, not sure why this is happening.
     
  9. henriquefaria

    henriquefaria

    Joined:
    Sep 17, 2013
    Posts:
    31
    All features work on Unity Free?
     
  10. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello. Sorry for slow replay guys. Something was wrong wrong thread notification.

    Hello that is common issue when working with event listeners and singleton

    You trying do remove listener from Singleton instance OnDestroy function, but it was already destroyed and calling "instance.removeEventListener" will create new instance.

    I am pretty sure I already solved this issue by e-mail. Problem was in the way plugin was used.


    Please give me more information IOSNative.instance.Init(); is not enough, you should also create iAd banner, or start interstitial request, like in the example scene.

    Looks very strange. Please contact me by e-mail if you steel have this issue.

    Yep!

    Information about plugin support can be found here
     
  11. moopi

    moopi

    Joined:
    Apr 24, 2012
    Posts:
    39
    Hi!

    I'm currently integrating some of these nice features provided by IOS Native Plugin, and just noticed an issue with iCloud.

    When running the iClound test scene (or my own project), I'm getting initialization failed messaged on every run. It seems that the test scene is partially working, as get-set float buttons seems to work (different float after set - get). However, it seems that the actual values are not stored in the iCloud. On every run of my own application, values which are read from the iCloud are not the ones which I stored in iCloud during previous run (I run application on IPad, stop it by menu button, remove application from task list and run it again. Values are first read from the iCloud, then modified and stored back). Also, I'm not able to see my application (AppID) on the iCloud (developer.icloud.com).

    Br,

    - Moopi
     
  12. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Thanks for report moopi , I will check the iCloud.

    You should create applicaion in iTunes connect, AppID will be there.
     
  13. Lynn_haha

    Lynn_haha

    Joined:
    Jul 24, 2013
    Posts:
    3
    Hi!
    I'm using GameCenterManager.showLeaderBoard(string).MyBoard didn't appear(IOS 5.1).But it appeared on IOS7.0+
    Even I used GameCenterManager.reportScore(int,string) and GameCenterManager.getScore (string), they worked fine.
    Sorry for my poor English.Hope U can understand..

    Lynn
     
  14. Lynn_haha

    Lynn_haha

    Joined:
    Jul 24, 2013
    Posts:
    3
    And I used IOSSocialManager.instance.TwitterPost("") and IOSSocialManager.instance.FacebookPost("") . My app crashed.
    I'm sure IOSSocialManager on a gameObject. help!!!!!!!!!!!:|
     
  15. Lynn_haha

    Lynn_haha

    Joined:
    Jul 24, 2013
    Posts:
    3
    SocialKit need iOS6.0+ . Maybe It's the reason. And I have iOS 5.1 and iOS 7.0.4 device, but can only post msg on FB&Twitter on iOS 7.0.4 device after logged in FB/TW account in settings.
     
  16. uboncukcu

    uboncukcu

    Joined:
    Dec 13, 2011
    Posts:
    9
    Hello,
    I use IOS Native plugin for local notification. Actually, it works fine but I cannot find the way how to cancel a notification. I mean that when I set local notification for 5 min later, I cannot cancel it. In our game, the time of notification is changed when user open the game so we need to cancel previous notification and set new one. How can I cancel it?
     
  17. Ciprian

    Ciprian

    Joined:
    Jul 9, 2013
    Posts:
    27
    Hi,

    Great work and great plugin.. very simple to use..

    I do have some problems:
    1. the Dispatcher and IDispatcher conflict with the ones from strange framework https://github.com/strangeioc/strangeioc Would there be any chance to rename these to something closer to flash like, eg: IFlashDispatcher, FlashDispatcher so we make sure no other conflicts appear?
    2. Also, you have a folder named IOS Native in the extensions.. this is rather non filepath friendly as spaces are known to cause issues when used in paths.. so I would recommend having something like IOSNative instead
    3. Unless I'm doing something wrong, the YES and NO handlers of a dialog window are swapped for IOS 7 at least


    Thank you
     
    Last edited: Mar 2, 2014
  18. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Hello. Thanks for purchase. Plugin was tested with latest IOS version. Some of plugin feature can not work with IOS 5. Plugin native code uses all latest api provided by Apple.


    So basically 100% plugin features working and tested with IOS7 and IOS6
    I can not guaranty that 100% plugin features will work with IOS5


    Hello you can cancel all notifications using CanselAllNotification function.


    That is valuable remarks Thanks you. I'll fix those in nearest future.
     
  19. denizoguz

    denizoguz

    Joined:
    Feb 15, 2014
    Posts:
    3
    There is no such thing as APPID, Pugins documentation is incorrect I think. Only similar thing is Apple ID. And this is a two char saving from 8 character, that cost me one hour.
     
  20. denizoguz

    denizoguz

    Joined:
    Feb 15, 2014
    Posts:
    3
    I'm having a lot of trouble while integrating iAd with this plugin. I had used free AdMobPlugin before and it was only drag and drop.
    Plugin setup instructions says that you should replace APP_ID in IOSNative file, but there is no APP_ID in IOSNative.m or IOSNative.h files. I really need where to find IOSNative class? thanks.
     
  21. Ciprian

    Ciprian

    Joined:
    Jul 9, 2013
    Posts:
    27
    You should find the APP_ID in Assets/Extensions/IOS Native/Core/IOSNative.cs, the first defined const.. If you don't find it, try to reinstall package
     
  22. Ciprian

    Ciprian

    Joined:
    Jul 9, 2013
    Posts:
    27
    As another request, I need for my users to be connected to the internet to use the app..

    Is there any way to use the IOS Native plugin to detect if internet is connected or not?

    However, I made a unity script that detects this, but now I need to display the Cellular Data is Turned Off dialog. This has a button that is called Settings and another that is called OK. I think this is a default popup for IOS. Can we use it in the plugin?

    Also, if the users don't have the latest app, or if there is an update available do we have some script telling us if the app is the latest or not? In any case I would like to open the app update page from AppStore and Android

    Lastly, as a small suggestion, I think you should unify the 2 plugins (Android and IOS) since I think most users use them both.. And as feedback, I already use the facebook sdk and I don't want the one from the android native to overlap. I think the plugins should be installed separately since they are both under active development.

    Thanks again for the great plugin
     
  23. stanislav-osipov

    stanislav-osipov

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

    That is reasonable request. I will put them in my plugin todo list.

    That what I am doing =)
    Basically I choosed a little bit another way. I want IOS native to conation only unique platform features. Like iAd for example. For things with is common for both platforms, like Social part, Admob, I am creating separate crossplatfrom plugins with can be installed in addition to IOS Native or Android Native.
     
  24. RC15

    RC15

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

    please post releases notes for this plugin as well.
    I have modified it (as android native) and it is important to know which classes or functionalities are modified.
    Thanks.

    PS : don't mind, I found them on asset store panel.
     
    Last edited: Mar 7, 2014
  25. Afroman

    Afroman

    Joined:
    Aug 17, 2013
    Posts:
    43
  26. stanislav-osipov

    stanislav-osipov

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


    RC15 , That is good tip, thanks.
    Afroman , Feature request accepted!

    Thanks for your support guys!
     
  27. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Is it possible to use this product without adding frameworks mentioned in the Plugin Setup Guide to the XCode project if you won't be using parts of the functionality that don't rely on those frameworks? For example, I don't plan to use StoreKit.framework-related functionality, can I exclude it from the project?

    I'm asking due to frequent rumors that apps can be rejected during the review process if they include frameworks that aren't actually employed for any in-app functionality.
     
  28. greenland

    greenland

    Joined:
    Oct 22, 2005
    Posts:
    205
    I've set up iCloud, store, and game center entitlements. iOSNative is initialized. Store is initialized and works correctly.

    iCloud returns CLOUD_INITIALIZE_FAILED every time.

    Zero error information.

    Same problem when running the iCloud example scene (after making required changes to bundle identifier and apple id)

    I'm stumped.

    Up-to-date provisioning profile. Here's the log:
    Code (csharp):
    1. IOSNative inited with appId: #########
    2. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    3. UnityEngine.Debug:Log(Object)
    4. IOSNative:Start()
    5.  
    6. (Filename: /Applications/buildAgent/work/d3d49558e4d408f4/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 53)
    7.  
    8. iCloud: Initialization Failed!
    9. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    10. UnityEngine.Debug:Log(Object)
    11. Cloud:OnInitFailed()
    12. EventDispatcher:dispatch(Int32, Object, String)
    13. EventDispatcher:dispatch(String)
    14. iCloudManager:OnCloudInitFail()
    15.  
    16. (Filename: /Applications/buildAgent/work/d3d49558e4d408f4/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 53)
    17.  
    18. 2014-03-08 21:06:57.353 crystalcombat[402:60b] productsRequest....
    19. 2014-03-08 21:06:57.359 crystalcombat[402:60b] Total loaded products: 3
    20. InAppPurchaseManager, tottal products loaded: 3
    21. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    22. UnityEngine.Debug:Log(Object)
    23. InAppPurchaseManager:onStoreDataRecived(String)
    24.  
    25. (Filename: /Applications/buildAgent/work/d3d49558e4d408f4/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 53)
    26.  
    27. Ad loading.
    28. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    29. UnityEngine.Debug:Log(Object)
    30. Ads:OnViewLoaded()
    31. EventDispatcher:dispatch(Int32, Object, String)
    32. EventDispatcher:dispatch(String)
    33. iAdBannerController:bannerViewWillLoadAd(String)
    34.  
    35. (Filename: /Applications/buildAgent/work/d3d49558e4d408f4/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 53)
    36.  
    37. Ad loaded.
    38. UnityEngine.Debug:Internal_Log(Int32, String, Object)
    39. UnityEngine.Debug:Log(Object)
    40. Ads:OnLoaded()
    41. EventDispatcher:dispatch(Int32, Object, String)
    42. EventDispatcher:dispatch(String)
    43. iAdBannerController:bannerViewDidLoadAd(String)
    44.  
    45. (Filename: /Applications/buildAgent/work/d3d49558e4d408f4/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 53)
     
    Last edited: Mar 9, 2014
  29. PeterShoferistov

    PeterShoferistov

    Joined:
    Sep 22, 2013
    Posts:
    59
    Great asset.
    However, there is a little problem. When I'm getting an achievement, the notification banner doesn't shows up in a game. How can it be fixed?
     
  30. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    No, you should include those frameworks or delete plugin files with are has dependence of this frameworks. Source code is open sou you can easily do this. But I havant got such reject complain before.


    Looks like something wrong with the set up. I will update plugin to contain more info about the error, In the mean time feel free to send e-mail to support.


    Completion banners does not show all the time in iOS7.0+
    If you steel want it to be there, feel free to use:
    Just use public void ShowNotificationBanner (string title, string messgae) function of IOSNotificationController
     
  31. PeterShoferistov

    PeterShoferistov

    Joined:
    Sep 22, 2013
    Posts:
    59
    Thanks, I'll use it as a temporary solution by calling this method in OnAchievementProgress event. Hope that apple will get completion banners back.
    Here is my code sample, works for now:

    Code (csharp):
    1.  public void PostAchievement(string id, float progress = 100)
    2.     {
    3.         if(GameCenterManager.getAchievementProgress(id)!=100)
    4.         {
    5.             GameCenterManager.submitAchievement(progress, id, false);
    6.         }
    7.     }
    8.  
    9.     private void OnAchievementProgress(CEvent e)
    10.         {
    11.         AchievementTemplate tpl = e.data as AchievementTemplate;
    12.         if(tpl.progress==100)
    13.         {
    14.             IOSNotificationController.instance.ShowNotificationBanner("Achievement unlocked!", tpl.id.Replace("_"," "));
    15.         }
    16.     }
     
  32. dpkonofa

    dpkonofa

    Joined:
    Nov 6, 2012
    Posts:
    16
    Did you ever get this fixed? This is happening to me too. It doesn't matter how it's triggered, but, if I call buyItem(productID), I get double purchases. Every single item, even though I'm only adding the products to the cart once. This only started happening to me after the latest update to the plugin.
     
  33. dpkonofa

    dpkonofa

    Joined:
    Nov 6, 2012
    Posts:
    16
    This is the user I was responding to. Sorry for the double post.
     
  34. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    That is common error, if you adding purchase listeners twice, make sure you do it only once. You can use simple static flag for it. That is not the plugin problem, it about how you are using the API, duplicate listeners that is most popular error for all programmers who working with event system.
     
  35. mattshepherd

    mattshepherd

    Joined:
    Feb 12, 2014
    Posts:
    2
    Im trying to use the in-app purchase plugin however it always reports that the store isnt initialised when using the example. I see there is a flag which should be set on receipt of data from the store (onStoreDataRecived) however this is never triggered, neither do i see where its wired up?

    Does a product have to be submitted to the store before the demo code will work?
     
  36. dpkonofa

    dpkonofa

    Joined:
    Nov 6, 2012
    Posts:
    16
    I don't think I am adding the purchase listeners twice, though. How would I check if I'm doing that? It's a pretty simple use case where I have a button that calls "buyItem(PID)". I even added some debug logging and the buyItem function only gets called once, but the response comes in twice so the switch() statement gets executed twice. What should I be looking for here? Also, when is the next release with the Button.cs rename coming out? That's still causing issues in my project.
     
  37. moopi

    moopi

    Joined:
    Apr 24, 2012
    Posts:
    39
    Hi,

    There seems to be an issue in the social features, twitter plugin. With the IPad mini running IOS v6.0.2, the twitter freezes touch input when sending a tweet. This happens when you write a tweet and then press send button. The tweet is sent correctly, but the touch keyboard will remain on the screen. After closing the keyboard with keyboard close button, the touch input of unity is working very poorly (recognizes only one touch out of tens of touches), which makes my application totally unresponsive. Facebook seems to work ok. Also both seems to work on iPhone5s with IOS 7. This is crucial for me, as I'm currently submitting my application for review.

    Br, Moopi


    Edit: may be related to this: http://stackoverflow.com/questions/12800489/app-freezes-after-sending-tweet

    Edit2: it seems that you have to make dismiss for the devices <IOS7.0, and not for devices >IOS7.0

    Edit3: I made my own fix SocialGate.mm. I check if IOS version is < 7.0 and if it is:
    "[twSheet dismissViewControllerAnimated:YES completion:nil];"
    inside
    "case SLComposeViewControllerResultDone: "
     
    Last edited: Mar 11, 2014
  38. mattshepherd

    mattshepherd

    Joined:
    Feb 12, 2014
    Posts:
    2
    Ok solved my issues. Apple doesn't allow testing of In-App Purchases inside the simulator.. found this out by implementing

    Code (csharp):
    1. - (void)request:(SKRequest *)request didFailWithError:(NSError *)error
    Could be handy if this was implemented and logged to the output?
     
  39. PeterShoferistov

    PeterShoferistov

    Joined:
    Sep 22, 2013
    Posts:
    59
    Is there any way to get the player position in leader-boards? getScore method gives only the submitted score
     
  40. stanislav-osipov

    stanislav-osipov

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

    I'm not syaing you calling buy item twice, it looks like you adding listener's twice. Could you please send me your purchase implementation to the e-mail: stans.assets@gmail.com

    '
    Thanks a lot for your research, I will fix this in new plugin version.

    mattshepherd, Good tip, thanks, will defiantly add this to the upcoming release.

    Not yet, but I will treat it as feature request. Thanks!
     
  41. skymong

    skymong

    Joined:
    Mar 18, 2014
    Posts:
    1
    Hello.
    I have quest.
    My game was crashed when it was running offline.

    I think that GameCenterManager.init() function is problem.
    Please check it and fix it.
     
  42. alvaris924

    alvaris924

    Joined:
    Aug 3, 2011
    Posts:
    35
    Hi, bought the plugin and I must say, best plugin of the year!

    Btw, I have to apologize for my peanut brain, as I'm not sure how to add local notification that notifies user daily, like shamelessly telling user, 'Please play the game!' on 12pm every day.

    Any suggestion? Thank you! :)
     
  43. gravyleaves

    gravyleaves

    Joined:
    Mar 19, 2014
    Posts:
    28
  44. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    Thanks for report. Will defiantly check this, can you send me the XCode log file?

    Well you can add notification with will fires in x seconds from now. So if you want it to be fired at 12pm. you should get the system time and calculate difference between now and 12pm, then simply set notification using this difference.

    Thanks for the feature request. I am working on pretty big update currently, can not tell the it will appear in next release, but it's in todo list! :)

    Cheers!
     
  45. denizoguz

    denizoguz

    Joined:
    Feb 15, 2014
    Posts:
    3
    Hi,

    I am receiving following errors in some devices and application is crashing at Splash screen:
    *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'ADInterstitialAd is available on iPad only.'

    But Interstitial ads are shown on Iphone5, at least test ads. How could I handle that? Thanks
     
  46. dpkonofa

    dpkonofa

    Joined:
    Nov 6, 2012
    Posts:
    16
    Interstitials are not currently available on iPhone. Stan has already addressed this in the docs and in the forums earlier. Make sure you search your question before posting to see if it's already been answered.
     
  47. DanjelRicci

    DanjelRicci

    Joined:
    Mar 8, 2010
    Posts:
    310
    Hello! I bought both the iOS and Android plugins and they work well enough, good job!
    Unfortunately it looks like everything compiles only the first time I build it (from Unity). Every following time I use the "Build and Run" command, this error appears in Unity and Xcode can't read the Plist file:

    What's wrong? Thanks for the help. :)

    EDIT: It looks like the compiler adds a </string> tag more.
     
    Last edited: Mar 21, 2014
  48. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    I see such error for the first time. Well any way you should just Build Xcode project and include the required frameworks, and use post processing scripts to do that.
     
  49. dpkonofa

    dpkonofa

    Joined:
    Nov 6, 2012
    Posts:
    16
    How long does it usually take for updates you send to Unity to be available on the Asset Store? You mentioned you'd submitted an update a week or two ago and I still don't see it available yet. Any idea or do they kinda just leave you in the dark?
     
  50. stanislav-osipov

    stanislav-osipov

    Joined:
    May 30, 2012
    Posts:
    1,790
    It depends of how much cases they currently have. Some times updates got live in 2-3 days, some times it can take weeks, But usually it not more that two weeks.

    If anythings critical you waiting in the update, you can just drop me e-mail and I will send package to you.
    Cheers!