Actionbar back button not displaying


#1

Hi, I’m struggling with the action bar between iOS and Android. I’m trying to create a back button on Android, which the code below shows, but when I implement this then the back button on iOS disappears. The back button on iOS is automatic as far as I know, so I assume I don’t need to code it as on a blank action bar (with no buttons coded) it works. Please advise if I’m doing something wrong.

.

#2

Enclose your code for Android back button inside <android> tag so it’s executed only for Android and doesn’t affect the iOS default behavior.


#3

Now that was a quick response, thanks so much! Will try it out. :slight_smile:


#4

So I tried it, worked wonderfully well on Android. The iOS version of the app crashes when I navigate to that page.

Ever come across this before?


#5

Apologies, it’s the page before that which crashes. Here is the code to my action bar:


#6

Apologies, here you go.


#7
<ActionBar class="action-bar" title="Addresses">
        <android>
            <NavigationButton icon="res://menu" tap="onDrawerButtonTap" />
        </android>
        <ios>
            <ActionItem icon="res://menu" ios.position="left" tap="onDrawerButtonTap" />
        </ios>
</ActionBar>

#8

I don’t see any reason for it to crash, try checking the log or post the code where we can actually reproduce the issue.


#9

I can’t access the log as Livesync isn’t working either - I have also created a post about that.

Can I DM you the XML and JS code behind files?


#10

I guess you are in Windows and using iOS device for debugging. Why don’t you try playground?


#11

No I’m using a Mac, so I don’t know what’s wrong with my Livesync not working on iOS but works on Android.

Just solved the issue though, was a very amateur oversight on my part. I never changed the icon path when I copied the code over so it crashed because it couldn’t find the icon.

My apologies for wasting your time.