Search Unity

[Released] [Free] Mobile Native PopUps

Discussion in 'Assets and Asset Store' started by lacost, Jun 10, 2014.

  1. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,525
    Plugin will allow you to add native platform popups and preloaders in your project. API is cross platform, so you need to implement it only once, and it will work on all supported mobile platforms. You also can use Playmaker Actions as alternative to coding.



    Documentation | Versions | Forum | Get From Asset Store | Get From Union Assets

    Supported platforms:
    • IOS
    • WP8
    • Android

    Pop-ups types:

    Features:

    Compatibility
    Package will play nice with all IOS, Android and WP8 plugins.

    Fully compatible with:

    How to get support
     
    Last edited: Nov 13, 2014
  2. mStep

    mStep

    Joined:
    Sep 24, 2012
    Posts:
    33
    Trying to use this alongside the Mobile Social Plugin (which works fine) on iOS, I get about 8 linker errors in Xcode:

    Undefined symbols for architecture armv7:
    "__MNP_ShowRateUsPopUp", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    "__MNP_ShowDialog", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    "__MNP_ShowPreloader", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    "__MNP_RedirectToAppStoreRatingPage", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    "__MNP_HidePreloader", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    "__MNP_ShowMessage", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    "__MNP_DismissCurrentAlert", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    ld: symbol(s) not found for architecture armv7

    Am I missing necessary frameworks? I didn't see any listed in the documentation.
     
  3. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,525
    Looks like you haven't moved filed from Plugins/StansAssets/IOS to the Plugins/IOS ?
    Cheers!
     
    ramp likes this.
  4. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    242
    Hi,
    really cool asset!

    But i have problems with Unity 5 IOS. As there seems to be ARC turned on XCode tells me:
    'release' is unavailable: not available in automatic reference counting mode

    When I comment these calls out i can compile my project but the app has problems with closing the popups.
    I get a EXC_BAD_ACCESS exception in main.mm line 40 UIApplicationManagerMain()

    So this Asset doesn't work under Unity 5 :( !
     
  5. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,525
    Hey, thx for report, you got the point assets should be updated for Unity 5, I will do this ASAP.
    Cheers!
     
  6. LightSource

    LightSource

    Joined:
    Sep 29, 2012
    Posts:
    250
    Hey, thanks for this plugin but I'm having a bit of a crashing problem.

    When I throw a notification, it shows up fine with specified text and the like. It's is all well and good until any option from any box is pressed in which case the app crashes immediately. Unfortunately, this is game breaking and any help on the matter would be wonderful. Thanks.

    Bonus: Is there any way to keep the popup from pausing the app?
     
  7. jprocha101

    jprocha101

    Joined:
    Apr 8, 2015
    Posts:
    134
    I am getting strange behavior when using the dialog functionality. The first time I call Create it works as expected, I get the dialog popup. After that I have to call Create multiple times to get the dialog box to appear; sometimes it appears after multiple calls and other times it appears then immediately disappears with no user interaction. Am I missing a step or something, or is this a known issue?

    Thanks
     
  8. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,525
    Hey @LightSource I am not sure I got your issues, can you please contact me via e-mail and described it a bit more?

    Well, I hear such issue for the first time, so I guess problem might be in the way you implementing popups. Can you please send me sample project so I could have a look?

    Thx.
     
  9. janapejic

    janapejic

    Joined:
    Jul 12, 2015
    Posts:
    1
    Hi,
    I'm having trouble with the plugin on my iOS 8 device - when using MobileNativeMessage, my OnComplete callback is not being invoked. Any idea what might be the problem?
     
  10. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,525
    the problem was in the implementation. IOS 8 have absolutely different API for popups.
    I rewrite native implementation, so now it will work fine, feel free to download latest update from the store.
     
  11. lundgren93

    lundgren93

    Joined:
    Oct 1, 2014
    Posts:
    3
    Hi,
    I'm using the latest version of this asset and I get some errors in Xcode,

    'release' is unavailable: not available in automatic reference counting mode

    ARC forbids explicit message send of 'release'

    'release' is unavailable: not available in automatic reference counting mode

    ARC forbids explicit message send of 'release'

    This is in IOSNativePopUpsManager.m under IOS 6, 7 implementation. I'm building for iOS 7 atm.

    Any idea how to fix those?

    Thanks for your help, can't wait to get your asset running! :)
     
  12. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,525
    Hello, sure this issues was already fixed, you just need to download latest asset version.
    Cheers!
     
  13. gselfish

    gselfish

    Joined:
    Mar 13, 2015
    Posts:
    6
    I have the latest asset version (3.6), but I still get the same errors as lundgren93.
    Building for ios8 doesn't help either.
     
  14. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,525
    Hey @gselfish , @lundgren93 you are right, there was one more issues with Unity 5 compatibility, feel free to updated to the 3.7 version, issues is fixed.

    Cheers!
     
  15. gselfish

    gselfish

    Joined:
    Mar 13, 2015
    Posts:
    6
    Thank you Stan, working fine now. :)
    Btw, I've imported the asset in a finished project and it's working even without moving plugin files out of StansAssets.
    On an empty project, however, Unity gives an error upon import as expected and invites to move files to Plugins/IOS and Plugins/Android.
    Not sure why that happens. I've tried only IOS, however.
     
  16. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,525
    Well, this is Unity 5 feature, it can find IOS Native files event what that not int the Assets/Plugins/IOS location. However it's steel recommended to keep it there.

    Cheers!
     
  17. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    476
    @lacost thank you for making this available for free, very useful.

    I know that would be Android only, but any luck for adding Toast messages?
     
  18. Santa Madonna

    Santa Madonna

    Joined:
    Sep 23, 2015
    Posts:
    1
    Hi Iacost,

    the plugin is great, but I have found a behavior it doesn't seem right.

    On iOS, I am currently trying on iOS 9, if you are showing a native message on the mobile screen and you press home button the app goes to pause and when you return to your app the native message is not shown on the mobile screen and when you try to show it again it doesn't show and xcode console shows you a warning. Here is the xcode console log.

    2015-09-23 11:48:49.608 ProductName[1525:804419] -> registered mono modules 0x100cfb5a0
    -> applicationDidFinishLaunching()
    -> applicationDidBecomeActive()
    Requesting Resolution: 750x1334
    Init: screen size 750x1334
    Initializing Metal device caps
    Initialize engine version: 5.2.0f3 (e7947df39b5c)
    Setting up 1 worker threads for Enlighten.
    Thread -> id: 16e78f000 -> priority: 1
    -> applicationWillResignActive()
    -> applicationDidEnterBackground()
    -> applicationWillEnterForeground()
    -> applicationDidBecomeActive()
    2015-09-23 11:49:08.976 ProductName[1525:804419] Warning: Attempt to present <UIAlertController: 0x1378d3670> on <UnityDefaultViewController: 0x1365d57a0> which is already presenting <UIAlertController: 0x1379bf740>

    It seems the UIAlertController is present but it also seems it lost the focus and the scene became touchable again.

    I hope you can give me some light about it.

    Thanks in advance and best regards
     
  19. CarlosCastro

    CarlosCastro

    Joined:
    Aug 12, 2015
    Posts:
    1
    Plugin 'WP8PopUps.dll' is used from several locations:
    assets/Plugins/WP8/WP8PopUps.dll would be copied to <PluginPath>/WP8PopUps.dll
    assets/Plugins/WP8PopUps.dll would be copied to <PluginPath>/WP8PopUps.dll
    Please fix plugin settings and try again.

    UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions(String)
    UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25)
    UnityEditor.HostView:OnGUI()
     
  20. lacost

    lacost

    Joined:
    May 30, 2012
    Posts:
    1,525
  21. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    You need basic platform import setup for WP8PopUps.dll and WP8Native.dll libraries in your project.
    Great detailed guide you can find here.
    Just follow the same instructions for native Windows Phone 8 libs in your project.

    Best regards,
    Alex
     
  22. iast999

    iast999

    Joined:
    Nov 14, 2013
    Posts:
    2
    Hello, thanks for the great asset.
    But i got some problem, i dunno if it was a bug or am i mistaken something.
    I want to call the popup when android user press on return(android native button). It will confirm the action of player to exit or not.
    The first time, it success. While trying the second time and so on, the popup cant be call, sometime it appear for just a sec and disappear again. Trying to call it for numerous time and always like that. Could anyone tell me if my code wrong?

    After importing the plugin, i call it like this :

    Code (CSharp):
    1. void Update () {
    2.  
    3.         if (Input.GetKeyDown (KeyCode.Escape)) {
    4.  
    5.             MobileNativeDialog dialog = new MobileNativeDialog("Exit","Exit Application ?");
    6.             dialog.OnComplete += OnDialogClose;
    7.          
    8.         }
    9.     }
    10.  
    11.     private void OnDialogClose(MNDialogResult result) {
    12.  
    13.         switch(result) {
    14.         case MNDialogResult.YES:
    15.             Application.Quit ();
    16.             break;
    17.         case MNDialogResult.NO:
    18.  
    19.             break;
    20.         }
    21.  
    22.     }
     
    UnitySora and jprocha101 like this.
  23. Guimauve

    Guimauve

    Joined:
    Apr 21, 2015
    Posts:
    4
    Hi guys and happy new year !

    Thank you very much for the great asset. Its works perfectly on iOS.

    Unfortunalty, I'm trying to build my project for Windows Phone 8.1 and there are errors in the file SA_ModuleInfo.cs :

    1) Assets\Extensions\StansAssetsCommon\Utilities\Modules\SA_ModulesInfo.cs(20,52): error CS0234: The type or namespace name 'AppDomain' does not exist in the namespace 'System' (is missing an assembly reference?)

    2) Assets\Extensions\StansAssetsCommon\Utilities\Modules\SA_ModulesInfo.cs(51,71): error CS1061: 'System.Type' does not contain a definition for 'GetProperty' and no extension method 'GetProperty' accepting a first argument of type 'System.Type' were found (a using directive or an assembly reference is -it missing?)

    Do you know how to solve this issue ?

    Guillaume
     
  24. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    What plugin version do you use? What Unity version?
    Please, provide me this information and I'll send you fixed source files to get this issue fixed.

    Best regards,
    Alex.
     
  25. Mr Asset

    Mr Asset

    Joined:
    Sep 9, 2014
    Posts:
    4
    Hi,
    This plugin is greate! But I found MNIOSNative implements dismissCurrentAlert, why MNAndroidNative doesn’t? Can you implement for Android too?
     
  26. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    I added the feature you mentioned to the features list.
    It will be considered in our team and will be added in a case of approval.

    You can ask for the status of this case The Stan's Assets Support Team directly.

    Best regards,
    Alex
     
  27. DudoTheStampede

    DudoTheStampede

    Joined:
    Mar 16, 2015
    Posts:
    55
    Great and simple plugin, just one question, is there a way to see the popups in the editor? It can be tricky to test the app otherwise..

    Thanks for the plugin!
     
  28. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    For now, there is no such a feature you mentioned.
    Currently we are working on Editor Testing implementation for all of Stan's Assets plugins.
    So, such a features will be added with following plugin updates.
    Every feature has its own priority, so they will be added one after another.

    Please, keep looking forward to future updates.

    Cheers!
     
  29. UnitySora

    UnitySora

    Joined:
    Mar 31, 2016
    Posts:
    28
    Having the exact same problem as iast999 when Android user press back button.
     
  30. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    I'll perform additional tests on my side.
    The fix will be provided if needed and will be included with following plugin update.

    I'll provide you my feedback as soon as it will be available.
    Thank you for your patience and understanding!

    Best regards,
    Alex.
     
  31. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    I performed some tests on my side.
    There is no issue/bug in plugin source code.

    The one wrong thing you are doing is to create MobileNativeDialog with Input.GetKeyDown method.
    The right method for your case will be Input.GetKeyUp.
    Please, fix it in your code and all the issues will disappear.

    Cheers!
     
  32. NAYIR55

    NAYIR55

    Joined:
    Oct 5, 2014
    Posts:
    9
    Hello

    Very nice asset indeed!!

    I have a little problem...

    I want to send a pop up message alerting the user about an empty inputfield, and I'm kinda dispointed, either because I don't know how to use it properly or the lack of examples and case uses... well here's my problem...

    I have a button and an imputfield, the user has to write some numbers inside the inputfield, then press the button and then the result shows in a text box

    I want to alert the user of the empty inputfield like "Alert", "No values!", "OK", I did follow the bare bones instructions
    Code (CSharp):
    1. MobileNativeMessage msg = new MobileNativeMessage("Message Title", "Message message");
    and then got a warning
    Code (CSharp):
    1. warning CS0219: The variable `msg' is assigned but its value is never used
    here's my example

    Code (CSharp):
    1. if (inputBox1.text == null)
    2.         {
    3.             MobileNativeMessage msg = new MobileNativeMessage("Alert", "No values!","OK");
    4.         }
    I don't know what's going on

    Help and feedback is very appreciated
     
  33. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello,
    Please, try following code
    Code (CSharp):
    1. private void OnShowMessage() {
    2. new MobileNativeMessage("Result", "Message Closed");
    3. }
    You will not get any warnings with this code.
    Please, try it on your own.
     
  34. gfaraj

    gfaraj

    Joined:
    Jul 11, 2016
    Posts:
    35
    With the new version, if I want to show a new popup in the dismiss callback of another popup, the new popup does not show up. This worked well in previous versions. Any idea?
     
  35. AlexRay

    AlexRay

    Joined:
    Jul 9, 2014
    Posts:
    993
    Hello!
    Looks quite strange. I don't think we have this issue before.

    I would recommend you to contact our support team for further assistance.
    Please, go ahead and you will get great support in a short time!
     
  36. otakdoe

    otakdoe

    Joined:
    Apr 19, 2013
    Posts:
    2
    Hello, I was having issues with popups not showing on android, and it turned out to be because of the Unity code stripping.
    Do you plan on handling code stripping anytime soon ?