0

Platform tag not working?

cahoots 11 year бұрын updated by icahill (Administrator) 11 year бұрын 2
My iPad Mini Retina returns "iPad4,4" as the device. But when I use this in a platform tag, the code doesn't get executed. I have the same code in a sibling platform tag for the iPhone, and everything works fine for that device. I tried the more generic iPad device name, but still no luck. I just want a way to distinguish between phones and tablets. Is there an easy way to do that?
Our platform tags work on a much more generic level. Check out the documentation for supported types: https://studio.rarewire.com/wordpress/2012/04/platform/

<wire>
    <main>
        <platform device="iphone">
        <panel name="download" height="25%" width="25%"
background="#FF0000" align="left" valign="center"></panel>
</platform>
        <platform device="ipad">
        <panel name="download" height="25%" width="25%"
background="#00FFFF" align="right" valign="center"
></panel>
        </platform>    
    </main>
  
</wire>
Incidentally the non-retina ipad mini will work with a platform tag of "ipad2" I am logging some tickets to add mini specific platform tags. 
Just to clarify - even when I use a generic device of "ipad", the code between the platform tags is not executed. 
Can you tell me your app id from the studio? I would like to take a look at your code.

Are you able to get the example above working correctly?
It may have been a "coding error" as I did have different parameters for each platform. Unfortunately I can't show it to you as I have since removed the code.  I now find that I don't need this functionality in my app. (I used height and width calculations from the panel instead of pre-baked values based on platform.)
Ok. If you encounter this again I would like to see it. I am confident that platform tags are working as we use them heavily in most apps these days, but there could be a scenario where something isn't functioning correctly. 

Thanks for the follow-up.