Forums

Some questions after testing Empty Keys UI
Last Post 07 Sep 2015 09:41 AM by Filip Dušek. 30 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Page 1 of 212 > >>
Author Messages Resolved
Johannes SjøkvistUser is Offline
New Member
New Member
Posts:47


--
20 Aug 2015 12:11 AM
    First of all, thank you for this awesome UI framework!
    I have just startet testing it on iOS using CocosSharp.
    It works very well.

    Is it possible to render UI on top of a CCLayer?

    Like this:
    var scene = new CCScene;
    var cocosLayer = new CCLayerColor;
    var uiLayer = new CCLayerColor;

    scene.Add(cocosLayer);
    scene.Add(uiLayer);

    If I do that, the uiLayer is always rendered first so that the other layer is on top.

    One other thing is the ScrollViewer. Is it easy to change the scroll direction (when dragging up and down on mobile)?

    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    20 Aug 2015 09:34 AM
    • Accepted Answer
    Hi,
    They changed rendering pipeline lately so in my internal tests I use CCCustomCommand. You have to set Background of UIRoot to Transparent too. I updated example on GitHub so check this commit

    http://github.com/EmptyKeys/UI_Exam...6d67891c76

    ad ScrollViewer) draging up is scroll down, right?
    Johannes SjøkvistUser is Offline
    New Member
    New Member
    Posts:47


    --
    20 Aug 2015 12:38 PM
    Thanks, I will try it out later today, but it looks promising!
    Exactly, draging up should scroll down.
    Johannes SjøkvistUser is Offline
    New Member
    New Member
    Posts:47


    --
    20 Aug 2015 07:25 PM
    I changed my test project to use CCCustomCommand and it works! Thank you for updating the example!

    When I use the TextBox on iOS, a soft keyboard shows up. Is that keyboard customizable? I want to add the norwegian letters æøå if possible...
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    20 Aug 2015 07:40 PM
    Almost. InputLanguageManager doesn't have method to add new KeyboardLayout. I will add that in next version.

    KeyboardLayout is just simple map and looks like this (english version)...

    
    public class KeyboardLayout
        {
            /// <summary>
            /// The keyboard shift layout
            /// </summary>
            protected readonly Dictionary<KeyCode, char> keyboardShiftLayout = new Dictionary<KeyCode, char>();
    
            /// <summary>
            /// The keyboard layout
            /// </summary>
            protected readonly Dictionary<KeyCode, char> keyboardLayout = new Dictionary<KeyCode, char>();
    
            /// <summary>
            /// The virtual keyboard map
            /// </summary>
            protected readonly List<VirtualKeyboardMapItem> virtualKeyboardMap = new List<VirtualKeyboardMapItem>();
    
            /// <summary>
            /// Gets the virtual keyboard map.
            /// </summary>
            /// <value>
            /// The virtual keyboard map.
            /// </value>
            public List<VirtualKeyboardMapItem> VirtualKeyboardMap
            {
                get
                {
                    return virtualKeyboardMap;
                }
            }
    
            /// <summary>
            /// Initializes a new instance of the <see cref="KeyboardLayout"/> class.
            /// </summary>
            public KeyboardLayout()
            {
                keyboardShiftLayout.Add(KeyCode.D0, &#39;)&#39;);
                keyboardShiftLayout.Add(KeyCode.D1, &#39;!&#39;);
                keyboardShiftLayout.Add(KeyCode.D2, &#39;@&#39;);
                keyboardShiftLayout.Add(KeyCode.D3, &#39;#&#39;);
                keyboardShiftLayout.Add(KeyCode.D4, &#39;$&#39;);
                keyboardShiftLayout.Add(KeyCode.D5, &#39;%&#39;);
                keyboardShiftLayout.Add(KeyCode.D6, &#39;^&#39;);
                keyboardShiftLayout.Add(KeyCode.D7, &#39;&amp;&#39;);
                keyboardShiftLayout.Add(KeyCode.D8, &#39;*&#39;);
                keyboardShiftLayout.Add(KeyCode.D9, &#39;(&#39;);            
                keyboardLayout.Add(KeyCode.Space, &#39; &#39;);
    
                for (int i = (int)KeyCode.D0; i <= (int)KeyCode.D9; i++)
                {
                    keyboardLayout.Add((KeyCode)i, (char)i);
                }
    
                for (int i = (int)KeyCode.A; i <= (int)KeyCode.Z; i++)
                {
                    keyboardLayout.Add((KeyCode)i, Char.ToLower((char)i));
                }
    
                keyboardShiftLayout.Add(KeyCode.Separator, &#39;?&#39;);
                keyboardLayout.Add(KeyCode.Separator, &#39;/&#39;);
                keyboardLayout.Add(KeyCode.Divide, &#39;/&#39;);
                keyboardLayout.Add(KeyCode.Multiply, &#39;*&#39;);
                keyboardLayout.Add(KeyCode.Subtract, &#39;-&#39;);
                keyboardLayout.Add(KeyCode.Add, &#39;+&#39;);            
                keyboardLayout.Add(KeyCode.Decimal, &#39;.&#39;);            
                keyboardLayout.Add(KeyCode.OemPlus, &#39;=&#39;);
                keyboardShiftLayout.Add(KeyCode.OemPlus, &#39;+&#39;);
                keyboardLayout.Add(KeyCode.OemMinus, &#39;-&#39;);
                keyboardShiftLayout.Add(KeyCode.OemMinus, &#39;_&#39;);
                keyboardLayout.Add(KeyCode.OemTilde, &#39;`&#39;);
                keyboardShiftLayout.Add(KeyCode.OemTilde, &#39;~&#39;);
                keyboardLayout.Add(KeyCode.OemOpenBrackets, &#39;[&#39;);
                keyboardShiftLayout.Add(KeyCode.OemOpenBrackets, &#39;{&#39;);
                keyboardLayout.Add(KeyCode.OemCloseBrackets, &#39;]&#39;);
                keyboardShiftLayout.Add(KeyCode.OemCloseBrackets, &#39;}&#39;);
                keyboardLayout.Add(KeyCode.OemPipe, &#39;\\&#39;);
                keyboardShiftLayout.Add(KeyCode.OemPipe, &#39;|&#39;);
                keyboardLayout.Add(KeyCode.OemSemicolon, &#39;;&#39;);
                keyboardShiftLayout.Add(KeyCode.OemSemicolon, &#39;:&#39;);
                keyboardLayout.Add(KeyCode.OemQuotes, &#39;\&#39;&#39;);
                keyboardShiftLayout.Add(KeyCode.OemQuotes, &#39;"&#39;);
                keyboardLayout.Add(KeyCode.OemComma, &#39;,&#39;);
                keyboardShiftLayout.Add(KeyCode.OemComma, &#39;<&#39;);
                keyboardLayout.Add(KeyCode.OemPeriod, &#39;.&#39;);
                keyboardShiftLayout.Add(KeyCode.OemPeriod, &#39;>&#39;);
                keyboardLayout.Add(KeyCode.OemQuestion, &#39;/&#39;);
                keyboardShiftLayout.Add(KeyCode.OemQuestion, &#39;?&#39;);            
    
                CreateDefaultVirtualKeyboardMap();
            }
    
            private void CreateDefaultVirtualKeyboardMap()
            {
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 0, KeyCode = KeyCode.Q });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 1, KeyCode = KeyCode.W });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 2, KeyCode = KeyCode.E });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 3, KeyCode = KeyCode.R });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 4, KeyCode = KeyCode.T });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 5, KeyCode = KeyCode.Y });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 6, KeyCode = KeyCode.U });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 7, KeyCode = KeyCode.I });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 8, KeyCode = KeyCode.O });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 9, KeyCode = KeyCode.P });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 10, KeyCode = KeyCode.Back, ItemType = MapItemType.SpecialKey, SpecialKeyName = "Backspace" });
    
    
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 1, KeyCode = KeyCode.A });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 2, KeyCode = KeyCode.S });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 3, KeyCode = KeyCode.D });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 4, KeyCode = KeyCode.F });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 5, KeyCode = KeyCode.G });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 6, KeyCode = KeyCode.H });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 7, KeyCode = KeyCode.J });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 8, KeyCode = KeyCode.K });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 9, KeyCode = KeyCode.L });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 10, KeyCode = KeyCode.Enter, ItemType = MapItemType.SpecialKey, SpecialKeyName = "Enter" });
    
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 0, KeyCode = KeyCode.LeftShift, ItemType = MapItemType.SpecialKey, SpecialKeyName = "Shift" });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 1, KeyCode = KeyCode.Z });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 2, KeyCode = KeyCode.X });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 3, KeyCode = KeyCode.C });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 4, KeyCode = KeyCode.V });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 5, KeyCode = KeyCode.B });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 6, KeyCode = KeyCode.N });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 7, KeyCode = KeyCode.M });
                
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 8, KeyCode = KeyCode.OemComma });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 9, KeyCode = KeyCode.OemPeriod });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 10, KeyCode = KeyCode.OemQuestion, Shift = true });
    
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 11, KeyCode = KeyCode.RightShift, ItemType = MapItemType.SpecialKey, SpecialKeyName = "Shift" });
    
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 3, Column = 0, KeyCode = KeyCode.None, ItemType = MapItemType.SwitchToNumbers, SpecialKeyName = "123" });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 3, Column = 1, KeyCode = KeyCode.LeftControl, ItemType = MapItemType.SpecialKey, SpecialKeyName = "Ctrl" });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 3, Column = 2, KeyCode = KeyCode.Space, ItemType = MapItemType.SpecialKey, SpecialKeyName = "Space" });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 3, Column = 3, KeyCode = KeyCode.Left, ItemType = MapItemType.SpecialKey, SpecialKeyName = "<" });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 3, Column = 4, KeyCode = KeyCode.Right, ItemType = MapItemType.SpecialKey, SpecialKeyName = ">" });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 3, Column = 5, KeyCode = KeyCode.None, ItemType = MapItemType.HideKeyboard, SpecialKeyName = "Hide" });
    
                // numbers mode            
    
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 0, KeyCode = KeyCode.D1, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 1, KeyCode = KeyCode.D2, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 2, KeyCode = KeyCode.D3, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 3, KeyCode = KeyCode.D4, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 4, KeyCode = KeyCode.D5, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 5, KeyCode = KeyCode.D6, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 6, KeyCode = KeyCode.D7, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 7, KeyCode = KeyCode.D8, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 8, KeyCode = KeyCode.D9, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 0, Column = 9, KeyCode = KeyCode.D0, KeyboardMode = VirtualKeyboardMode.Numbers });
    
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 1, KeyCode = KeyCode.D1, KeyboardMode = VirtualKeyboardMode.Numbers, Shift = true });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 2, KeyCode = KeyCode.D2, KeyboardMode = VirtualKeyboardMode.Numbers, Shift = true });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 3, KeyCode = KeyCode.D3, KeyboardMode = VirtualKeyboardMode.Numbers, Shift = true });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 4, KeyCode = KeyCode.D4, KeyboardMode = VirtualKeyboardMode.Numbers, Shift = true });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 5, KeyCode = KeyCode.D5, KeyboardMode = VirtualKeyboardMode.Numbers, Shift = true });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 6, KeyCode = KeyCode.D6, KeyboardMode = VirtualKeyboardMode.Numbers, Shift = true });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 7, KeyCode = KeyCode.D7, KeyboardMode = VirtualKeyboardMode.Numbers, Shift = true });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 8, KeyCode = KeyCode.D9, KeyboardMode = VirtualKeyboardMode.Numbers, Shift = true });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 9, KeyCode = KeyCode.D0, KeyboardMode = VirtualKeyboardMode.Numbers, Shift = true });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 1, Column = 10, KeyCode = KeyCode.Enter, ItemType = MapItemType.SpecialKey, SpecialKeyName = "Enter" });
    
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 0, KeyCode = KeyCode.None, ItemType = MapItemType.SwitchToSings, SpecialKeyName = "&#39;[]", KeyboardMode = VirtualKeyboardMode.Numbers });
    
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 1, KeyCode = KeyCode.Subtract, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 2, KeyCode = KeyCode.OemMinus, Shift = true, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 3, KeyCode = KeyCode.OemPlus, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 4, KeyCode = KeyCode.Add, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 5, KeyCode = KeyCode.OemPipe, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 6, KeyCode = KeyCode.OemQuotes, Shift = true, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 7, KeyCode = KeyCode.Multiply, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 8, KeyCode = KeyCode.Divide, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 9, KeyCode = KeyCode.OemSemicolon, KeyboardMode = VirtualKeyboardMode.Numbers });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 10, KeyCode = KeyCode.OemSemicolon, Shift = true, KeyboardMode = VirtualKeyboardMode.Numbers });
    
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 11, KeyCode = KeyCode.None, ItemType = MapItemType.Empty, KeyboardMode = VirtualKeyboardMode.Numbers });
    
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 3, Column = 0, KeyCode = KeyCode.None, ItemType = MapItemType.SwitchToLetters, SpecialKeyName = "ABC", KeyboardMode = VirtualKeyboardMode.Numbers });
    
                // signs
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 0, KeyCode = KeyCode.None, ItemType = MapItemType.SwitchToNumbers, SpecialKeyName = "-_=", KeyboardMode = VirtualKeyboardMode.Signs });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 1, KeyCode = KeyCode.OemQuotes, KeyboardMode = VirtualKeyboardMode.Signs });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 2, KeyCode = KeyCode.OemOpenBrackets, KeyboardMode = VirtualKeyboardMode.Signs });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 3, KeyCode = KeyCode.OemCloseBrackets, KeyboardMode = VirtualKeyboardMode.Signs });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 4, KeyCode = KeyCode.OemOpenBrackets, Shift = true, KeyboardMode = VirtualKeyboardMode.Signs });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 5, KeyCode = KeyCode.OemCloseBrackets, Shift = true, KeyboardMode = VirtualKeyboardMode.Signs });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 6, KeyCode = KeyCode.OemPipe, Shift = true, KeyboardMode = VirtualKeyboardMode.Signs });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 7, KeyCode = KeyCode.OemTilde, KeyboardMode = VirtualKeyboardMode.Signs });
                virtualKeyboardMap.Add(new VirtualKeyboardMapItem { Row = 2, Column = 8, KeyCode = KeyCode.OemTilde, Shift = true, KeyboardMode = VirtualKeyboardMode.Signs });
            }
    
    }
    
    
    Johannes SjøkvistUser is Offline
    New Member
    New Member
    Posts:47


    --
    21 Aug 2015 03:54 PM
    OK, I'll wait for the next version then.
    But I got another problem when trying to link assemblies when building iOS:
    >C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(501,3): error : Failed to resolve "EmptyKeys.UserInterface.Timer/<>c__DisplayClass3/<<.ctor>b__0>d__8" reference from "EmptyKeys.UserInterface, Version=1.8.0.0, Culture=neutral, PublicKeyToken=null"

    I have tried to linkskip EmptyKeys.UserInterface, but the error is still there... So I have to set linking behavior to Don't link.
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    21 Aug 2015 04:21 PM
    hmm interesting. Timer is internal class, which I don't use anywhere. Guess I can remove it, but no idea what is Xamarin trying to do. Maybe it has problem with code inside constructor. Lot's of async and Task stuff in there. Is it show stopper or can you run it without linking?
    Johannes SjøkvistUser is Offline
    New Member
    New Member
    Posts:47


    --
    21 Aug 2015 05:01 PM
    Well I can only run it without linking on the simulator. When compiling to device, the size gets to big and I get error : Could not AOT the assembly.
    So no real device... And so it is kind of show stopper I'm afraid...
    Johannes SjøkvistUser is Offline
    New Member
    New Member
    Posts:47


    --
    21 Aug 2015 05:26 PM
    Same happens on Android with linking...
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    21 Aug 2015 05:34 PM
    OK, try this version and let me know

    http://emptykeys.com/LinkClick.aspx...portalid=0
    Johannes SjøkvistUser is Offline
    New Member
    New Member
    Posts:47


    --
    21 Aug 2015 07:28 PM
    Thank you for this quick fix! That Timer error went away. But I still get AOT errors even with linking on iOS. Not sure at the moment if it has to do with the framework or not, but I'll test some more and report back. Android works perfectly with that fix.
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    21 Aug 2015 07:57 PM
    I think "could not AOT bla bla" is pretty much failed compilation. Try some more verbose log mode to see, what's the problem.
    Johannes SjøkvistUser is Offline
    New Member
    New Member
    Posts:47


    --
    22 Aug 2015 11:48 AM
    Verbose logging has this where it fails:
     Executing opt: "/Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.4.46/LLVM/bin/opt" -f -targetlibinfo -no-aa -basicaa -notti -instcombine -simplifycfg -inline-cost -inline -sroa -domtree -early-cse -lazy-value-info -correlated-propagation -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loop-simplify -lcssa -indvars -loop-idiom -loop-deletion -loop-unroll -memdep -gvn -memdep -memcpyopt -sccp -instcombine -lazy-value-info -correlated-propagation -domtree -memdep -adce -simplifycfg -instcombine -strip-dead-prototypes -domtree -verify -o "/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/EmptyKeys.UserInterface.dll.armv7.s.opt.bc" "/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/EmptyKeys.UserInterface.dll.armv7.s.bc" (TaskId:107)
    2>  Executing llc: "/Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.4.46/LLVM/bin/llc"  -mattr=+vfp2,-neon,+d16 -asm-verbose=false -disable-gnu-eh-frame -enable-mono-eh-frame -mtriple=armv7-ios -mono-eh-frame-symbol=mono_aot_EmptyKeys_UserInterface_eh_frame -relocation-model=pic -o "/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/EmptyKeys.UserInterface.dll.armv7-llvm.s" "/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/EmptyKeys.UserInterface.dll.armv7.s.opt.bc" (TaskId:107)
    2>  * Assertion at ../../../../../mono/mono/metadata/class.c:7012, condition `field->type->attrs &amp; FIELD_ATTRIBUTE_HAS_DEFAULT&#39; not met (TaskId:107)
    2>   (TaskId:107)
    2>   (TaskId:107)
    2>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(501,3): error : Could not AOT the assembly &#39;/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/Build/EmptyKeys.UserInterface.dll&#39;  
    Johannes SjøkvistUser is Offline
    New Member
    New Member
    Posts:47


    --
    22 Aug 2015 02:39 PM
    I tried to remove the framework, and it compiled without errors.
    So something in your framework is causing Xamarin compiler to complain...
    Just tell me if you need me to test some more.

    I would realy like to use this on iOS...

    This also happens with your monogame iOS sample when building for real devices.
    It works perfectly well on simulators.
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    22 Aug 2015 05:31 PM
    I see assert in mono metadata, weird. If you can go to Project Options, iOS Build, Additional mtouch arguments and add -v -v -v -v and rebuild

    We might see some more.

    Johannes SjøkvistUser is Offline
    New Member
    New Member
    Posts:47


    --
    22 Aug 2015 06:18 PM
    Only this related to the error:
    MONO_PATH=/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/Build /Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.4.46/bin/arm-darwin-mono-sgen --debug --llvm -O=gsharedvt  --aot=mtriple=armv7-ios,full,static,asmonly,direct-icalls,nodebug,dwarfdebug,llvm-path=/Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.4.46/LLVM/bin/,outfile=/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/EmptyKeys.UserInterface.dll.armv7.s,llvm-outfile=/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/EmptyKeys.UserInterface.dll.armv7-llvm.s "/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/Build/EmptyKeys.UserInterface.dll" (TaskId:67)
    2>  Mono Ahead of Time compiler - compiling assembly /Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/Build/EmptyKeys.UserInterface.dll (TaskId:67)
    2>  Executing opt: "/Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.4.46/LLVM/bin/opt" -f -targetlibinfo -no-aa -basicaa -notti -instcombine -simplifycfg -inline-cost -inline -sroa -domtree -early-cse -lazy-value-info -correlated-propagation -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loop-simplify -lcssa -indvars -loop-idiom -loop-deletion -loop-unroll -memdep -gvn -memdep -memcpyopt -sccp -instcombine -lazy-value-info -correlated-propagation -domtree -memdep -adce -simplifycfg -instcombine -strip-dead-prototypes -domtree -verify -o "/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/EmptyKeys.UserInterface.dll.armv7.s.opt.bc" "/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/EmptyKeys.UserInterface.dll.armv7.s.bc" (TaskId:67)
    2>  Executing llc: "/Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.4.46/LLVM/bin/llc"  -mattr=+vfp2,-neon,+d16 -asm-verbose=false -disable-gnu-eh-frame -enable-mono-eh-frame -mtriple=armv7-ios -mono-eh-frame-symbol=mono_aot_EmptyKeys_UserInterface_eh_frame -relocation-model=pic -o "/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/EmptyKeys.UserInterface.dll.armv7-llvm.s" "/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Ad-Hoc/mtouch-cache/EmptyKeys.UserInterface.dll.armv7.s.opt.bc" (TaskId:67)
    2>  * Assertion at ../../../../../mono/mono/metadata/class.c:7012, condition `field->type->attrs &amp; FIELD_ATTRIBUTE_HAS_DEFAULT&#39; not met (TaskId:67)
    2>   (TaskId:67)
    2>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(501,3): error : Could not AOT the assembly &#39;/Users/johannes/Library/Caches/Xamarin/mtbs/builds/EmptyKeysTestProject/157104cf92824d855779566f94f80d13/obj/iPhone/Debug/mtouch-cache/64/Build/EmptyKeys.UserInterface.dll&#39;
    2>    at MonoTouch.AOTTask.Build () [0x00000] in <filename unknown>:0  (TaskId:88)
    2>    at MonoTouch.BuildTask.Execute () [0x00000] in <filename unknown>:0  (TaskId:88)
    2>    at MonoTouch.Target+<Compile>c__AnonStorey0.<>m__0 (MonoTouch.BuildTask v) [0x00000] in <filename unknown>:0  (TaskId:88)
    2>    at System.Threading.Tasks.Parallel+<ForEachWorker>c__AnonStorey6`2[MonoTouch.BuildTask,System.Object].<>m__0 (Int32 i) [0x00000] in <filename unknown>:0  (TaskId:88)
    2>    at System.Threading.Tasks.Parallel+<ForWorker>c__AnonStorey3`1[System.Object].<>m__1 () [0x00000] in <filename unknown>:0  (TaskId:88)
    2>  Tool /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch execution finished. (TaskId:88)
    2>  MTouch: 2015-08-22T19:58:13.1612937+02:00 - Finished (TaskId:88)
    2>Done executing task "MTouch" -- FAILED. (TaskId:88) 
    Johannes SjøkvistUser is Offline
    New Member
    New Member
    Posts:47


    --
    22 Aug 2015 06:30 PM
    Same error if I build the Android version with AOT enabled:
    1>[aot-compiler stdout] * Assertion at /Users/builder/data/lanes/1978/f98871a9/source/mono/mono/metadata/class.c:7007, condition `field->type->attrs &amp; FIELD_ATTRIBUTE_HAS_DEFAULT&#39; not met
    1>[aot-compiler stdout] 
     
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    22 Aug 2015 06:31 PM
    I see, posted on Xamarin forums, lets see if anyone knows ... i have no idea
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    24 Aug 2015 03:17 PM
    Johannes SjøkvistUser is Offline
    New Member
    New Member
    Posts:47


    --
    24 Aug 2015 05:07 PM
    Yepp! I have contacted Xamarin support and linked to the topic there. Did that earlier today, so hopefully they respond soon...
    You are not authorized to post a reply.
    Page 1 of 212 > >>