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..
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.
Now that was a quick response, thanks so much! Will try it out.
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?
Apologies, it’s the page before that which crashes. Here is the code to my action bar:
Apologies, here you go.
<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>
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.
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?
I guess you are in Windows and using iOS device for debugging. Why don’t you try playground?
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.