Bug 59868 - Secondary ToolbarItems broken on Xamarin.Forms iOS 2.4stable
Summary: Secondary ToolbarItems broken on Xamarin.Forms iOS 2.4stable
Status: IN_PROGRESS
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.4.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-29 18:41 UTC by Nathan Castle (Esri)
Modified: 2017-12-08 14:01 UTC (History)
10 users (show)

See Also:
Tags: ios 11, toolbaritem, ac
Is this bug a regression?: ---
Last known good build:


Attachments

Description Nathan Castle (Esri) 2017-09-29 18:41:09 UTC
# Steps to reproduce

1. Create a ContentPage with a control and two ToolbarItems marked as secondary.
2. Load the page. Observe that the leftmost toolbar item becomes offset. Notice also that the rightmost toolbar item disappears (as if by magic!). 

See code example below:

````
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="xamtest.AboutPage" xmlns:vm="clr-namespace:xamtest;">
    <ContentPage.ToolbarItems>
        <ToolbarItem Order="Secondary" Priority="0" Text="Stop"/>
        <ToolbarItem Order="Secondary" Priority="1" Text="Start" />
    </ContentPage.ToolbarItems>
	<Grid />
</ContentPage>
```
# Expected behavior

1. The display of the toolbar items doesn't change after the page loads; all controls are visible and in the right place. 

# Actual behavior

1. The display of toolbar items does change after the page loads; some controls are invisible and others are offset.

# Supplemental info (logs, images, videos)

Note that 
video capture:

https://imgur.com/0ngk2oN

# Test environment (full version information)

iOS 11 simulator, macOS Sierra, Xamarin.Forms 2.4 stable
Comment 1 Paul DiPietro [MSFT] 2017-09-29 20:30:37 UTC
I believe this might very well be related to 59868 but due to the other aspect of the left item, I'll set this to confirmed for the time being until we can investigate this further.
Comment 2 Timothy Risi 2017-10-09 05:38:44 UTC
Some more information on this, since I'm running into this issue as well.

From what I can tell, this is an issue with XF 2.4, but with Xamarin iOS 11 and Xcode 9.  I've been using 2.3.4.221-pre6 with no issues.  I had some other problems with the last version of my app that I published (before xcode 9 was released), and after fixing those issues, I"m running into the offset secondary toolbaritems while using that same version of XF.  I've also tested with 2.3.4.270, 2.4.0.280 and 2.4.0.282 and nit hasn't made any difference.  

I'm using three secondary ToolbarItems instead of only 2, and only see the problem on device.  It looks fine in the simulator.  On device I see this: https://imgur.com/a/dWQsR.  If I comment out one of the three to only have 2, I see exactly w hat's described in the original bug description.

Visual Studio Community 2017 for Mac
Version 7.1.5 (build 2)
Installation UUID: 9aeeaee4-e204-4c3b-ac1e-e44b2ad7a503
Runtime:
	Mono 5.2.0.224 (d15-3/14f2c81) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000224

NuGet
Version: 4.3.0.2418

.NET Core
Runtime: Not installed
SDK: Not installed
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

Xamarin.Profiler
Version: 1.5.5
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Xamarin.Android
Version: 7.4.5.1 (Visual Studio Community)
Android SDK: /Users/Tim/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)
		7.0   (API level 24)
		7.1   (API level 25)

SDK Tools Version: 25.1.7
SDK Platform Tools Version: 24.0.2
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Xamarin Inspector
Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

Apple Developer Tools
Xcode 9.0 (13247)
Build 9A235

Xamarin.Mac
Version: 3.6.3.3 (Visual Studio Community)

Xamarin.iOS
Version: 11.0.0.0 (Visual Studio Community)
Hash: 152b654a
Branch: xcode9
Build date: 2017-09-15 02:25:56-0400

Build Information
Release ID: 701050002
Git revision: 7afedcaef8e7542e70e3cf8f9bdb26938b8c0876
Build date: 2017-09-15 08:39:58-04
Xamarin addins: 3262aadf811a18c12eac6742532d052b0139a808
Build lane: monodevelop-lion-d15-3-xcode9

Operating System
Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Comment 3 Rui Marinho 2017-10-26 18:08:48 UTC
Can you try with 2.5.0-pre2 ?
Comment 4 Timothy Risi 2017-10-26 19:16:04 UTC
I'm still seeing it with 2.5.0.19271-pre2
Comment 5 Mathias Hartner 2017-11-08 14:53:03 UTC
I have a similar problem since iOS 11.
I have two secondary toolbar items with plain text on my main menu page.
If I navigate one level deeper the same toolbar items are added to the page and that's where the magic happens:

The right toolbar item gets invisible and the left one gets kind an offset.
If I try to navigate back on the upper left screen, the app freezes and the only thing I can do is kill it.
The actions associated with the toolbar items are still working.
With iOS 10.x everything worked just fine and as expected but since iOS 11.x ...No way!

Because of freezing my app, a fix for this bug is really crucial to me!!!

P.S. I tried with any of the 2.4.x versions of Xamarin.Forms, no luck!
Comment 6 patrik.kosonen 2017-11-15 10:52:48 UTC
I have the same problem....Is there some nice work around?
I need to publish an update of my app but can't because of this issue.
Comment 7 Radoslav Gatev 2017-12-08 14:01:05 UTC
We have the same problem and it is seriously blocking our next release!

Note You need to log in before you can comment on or make changes to this bug.