Bug 59628 - iOS 11 - Back button on toolbar of Modal page does not display (Xamarin Forms)
Summary: iOS 11 - Back button on toolbar of Modal page does not display (Xamarin Forms)
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- major
Target Milestone: ---
Assignee: Bugzilla
: 59700 ()
Depends on:
Reported: 2017-09-20 19:55 UTC by Sid Dubey
Modified: 2017-12-29 18:52 UTC (History)
11 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:

Sample Repro Project (486.92 KB, application/x-zip-compressed)
2017-09-20 19:57 UTC, Sid Dubey
iOS 10 sim screenshot, unmodified code (231.68 KB, image/png)
2017-09-21 19:46 UTC, Paul DiPietro [MSFT]
iOS 11 sim screenshot, modified code (233.97 KB, image/png)
2017-09-21 19:46 UTC, Paul DiPietro [MSFT]
pre upgrade modal page image (690.89 KB, image/png)
2017-09-22 01:24 UTC, curry_kelly
post upgrade modal page (569.15 KB, image/png)
2017-09-22 01:25 UTC, curry_kelly
10.3 simulator image (736.85 KB, image/png)
2017-09-22 15:03 UTC, curry_kelly
11.0 simulator (594.93 KB, image/png)
2017-09-22 15:04 UTC, curry_kelly

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Sid Dubey 2017-09-20 19:55:37 UTC
Customer is working on an application and updated the Mac environment to support iOS 11. In particular, he updated to the latest Xcode 9.0 and VS Studio for Mac.

The app has a few modal pages that get called, and on these pages includes a generic "back" arrow in the tool bar:
    <ToolbarItem x:Name="btnBack" Text="Back" Priority="1" Command="{Binding GoBackCommand}">
            <OnPlatform x:TypeArguments="FileImageSource"

Prior to the update, this was working great and the "back" arrow image would display on the modal pages.
Post update, the image does not display, but if he "click" on the modal page where the arrow is supposed to be, the "GoBackCommand" is called, and I navigate back to the calling page.

In the repro project, On the "about" page, a button is added to call a modal page, and on the modal page following line is added the toolbar item:

    <ToolbarItem x:Name="btnBack" Text="Back" />

The text "Back" is not displayed on the modal page.

The problem can be replicated using VS 2017 latest version too. 

Steps to reproduce 
1. Download the attached project
2. Open it in IDE (VS 2017 or VS for Mac) with latest updates.
3. Run it on iOS 11 Simulator
3. Click 'About' at the bottom of the screen. New Screen appears.
4. Click Open Model button
5. New screen appears but the back button is not visible. 

IDE Details - 
Microsoft Visual Studio Enterprise 2017 
Version 15.3.5
Microsoft .NET Framework
Version 4.7.02053

Installed Version: Enterprise

Visual Basic 2017   00369-60000-00001-AA548
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA548
Microsoft Visual C# 2017

Visual C++ 2017   00369-60000-00001-AA548
Microsoft Visual C++ 2017

Visual F# 4.1   00369-60000-00001-AA548
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package   8.8.00712.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.30726.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   1.0
Provides languages services for ASP.NET Core Razor.

ASP.NET Template Engine 2017   15.0.30726.0
ASP.NET Template Engine 2017

ASP.NET Web Frameworks and Tools 2017   5.2.50601.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30728.0
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.2.9000.1
Microsoft Azure Data Lake Tools for Visual Studio

Azure Data Lake Tools for Visual Studio   2.2.9000.1
Microsoft Azure Data Lake Tools for Visual Studio

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Cookiecutter   3.0.17240.1
Provides tools for finding, instantiating and customizing templates in cookiecutter format.

Fabric.DiagnosticEvents   1.0
Fabric Diagnostic Events

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript UWP Project System   2.0
JavaScript UWP Project System

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure HDInsight Azure Node   2.2.9000.1
HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service   2.2.9000.1
Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio   1.7
Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service   2.2.9000.1
Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node   1.0
Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50719.1

Microsoft Continuous Delivery Tools for Visual Studio   0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   4.6.8-pre (ec7034f)
Support for debugging Mono processes with Visual Studio.

Node.js Tools
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   4.3.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Python   3.0.17240.1
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

Python - Django support   3.0.17240.1
Provides templates and integration for the Django web framework.

Python - IronPython support   3.0.17240.1
Provides templates and integration for IronPython-based projects.

Python - Profiling support   3.0.17240.1
Profiling support for Python projects.

R Tools for Visual Studio   1.1.30817.1931
Provides project system, R Interactive window, plotting, and more for the R programming language.

Redgate ReadyRoll
Extend DevOps processes to your SQL Server databases and safely automate database deployments.
Visit https://www.red-gate.com/readyroll for more information.

Copyright (C) 2011 Red Gate Software Ltd. All rights reserved.
This software contains components from Component Owl.
SQL Server is a registered trademark of Microsoft Corporation. 
Visual Studio is a registered trademark of Microsoft Corporation. 

ReadyRoll contains code from the following open source software:

NuGet https://www.nuget.org/
SQL LocalDB Wrapper https://github.com/martincostello/sqllocaldb
Autofac https://autofac.org/
Json.NET https://json.net/
MahApps.Metro http://mahapps.com/
SemVer https://github.com/maxhauser/semver
Log4Net http://logging.apache.org/log4net/
Extended WPF Toolkit https://wpftoolkit.codeplex.com/
Code InfoBox VSX http://www.codeproject.com/Articles/55196/Code-InfoBox-Visual-Studio-Extension-VSX
OctoPack https://github.com/OctopusDeploy/OctoPack
SQLite https://sqlite.org/

This product contains icons from http://www.visualpharm.com distributed under a free backlink license.

For license details or other notices relating to the above software, please see NOTICE.TXT and EULA.rtf in the ReadyRoll application folder.

Redgate SQL Prompt
Write, format, and refactor SQL effortlessly

SQL Server Data Tools   15.1.61707.200
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript tools for Visual Studio

Visual C++ for Cross Platform Mobile Development (Android)   15.0.26724.01
Visual C++ for Cross Platform Mobile Development (Android)

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Apache Cordova   15.120.6728.1
Visual Studio Tools for Apache Cordova

Visual Studio Tools for Unity
Visual Studio Tools for Unity

Visual Studio Tools for Universal Windows Apps   15.0.26730.08
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

WebJobs Tools v1.0.0   15.0.30901.0
WebJobs Tools v1.0.0

Xamarin (bd7e3753c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK (fb018c5)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK (152b654)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Comment 1 Sid Dubey 2017-09-20 19:57:59 UTC
Created attachment 24840 [details]
Sample Repro Project
Comment 2 Sid Dubey 2017-09-20 20:08:21 UTC
VS for Mac - IDE 

=== Visual Studio Community 2017 for Mac ===

Version 7.1.5 (build 2)
Installation UUID: db913935-e0af-4f4e-8e5b-0b6053b4f959
            Mono (d15-3/14f2c81) (64-bit)
            GTK+ 2.24.23 (Raleigh theme)

            Package version: 502000224

=== NuGet ===


=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
SDK: /usr/local/share/dotnet/sdk/1.0.3/Sdks
SDK Version: 1.0.3
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: (Visual Studio Community)
Android SDK: /Users/hightouch/Library/Developer/Xamarin/android-sdk-macosx
            Supported Android versions:
                        6.0 (API level 23)
                        7.1 (API level 25)

SDK Tools Version: 25.2.3
SDK Platform Tools Version: 25
SDK Build Tools Version: 23.0.2

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

Android Designer EPL code available here:

=== Apple Developer Tools ===

Xcode 9.0 (13247)
Build 9A235

=== Xamarin.iOS ===

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

=== Xamarin.Mac ===

Version: (Visual Studio Community)

=== Xamarin Inspector ===

Version: 1.3.0
Hash: 8c298a5
Branch: 1.3-release
Build date: Thu, 14 Sep 2017 21:21:26 GMT
Client compatibility: 1

=== 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 Paul DiPietro [MSFT] 2017-09-21 19:45:20 UTC
I actually looked at this more closely and the ModalPage isn't inside a navigation page when it's pushed. The toolbar items wouldn't show up. An iOS 10 simulator behaves the same way. Unless I'm missing something, that's the problem. I'll attach a screenshot of a 10.3 simulator doing the same thing with the default code ("back" doesn't show), and then a modified version where the ModalPage is pushed inside of a NavigationPage ("back" shows).
Comment 4 Paul DiPietro [MSFT] 2017-09-21 19:46:06 UTC
Created attachment 24866 [details]
iOS 10 sim screenshot, unmodified code
Comment 5 Paul DiPietro [MSFT] 2017-09-21 19:46:33 UTC
Created attachment 24867 [details]
iOS 11 sim screenshot, modified code
Comment 6 curry_kelly 2017-09-22 01:23:57 UTC
Hi Paul, in our app, we use a navigation service and a custom navigation page and a custom modal navigation page. These are called when we move between pages, and what type of page we want to open. Each page is opened with the appropriate custom navigation page. In the code behind for each page we set the bar background color and the bar text color (white).

The project is setup with an iOS project and a .NET Standard (1.3) Library project (which holds all of the pages, viewmodels, models, services, controls, etc.)

I am attaching two images pre & post upgrade. You can see in the pre that the modal page was displaying the toolbar item images. In the post you can see that the toolbar item images are no longer visible BUT still functional - meaning if I touch/click in the area that the item images should be displayed, the correct command function is called. 

After the upgrade, we made NO changes to our code - just ran the app. 

We cannot figure out why the images are no longer visible.

Comment 7 curry_kelly 2017-09-22 01:24:57 UTC
Created attachment 24876 [details]
pre upgrade modal page image
Comment 8 curry_kelly 2017-09-22 01:25:32 UTC
Created attachment 24877 [details]
post upgrade modal page
Comment 9 curry_kelly 2017-09-22 01:30:41 UTC
the images are in the Resources folder of the iOS project and have a build action of BundleResource

 - kc
Comment 10 curry_kelly 2017-09-22 15:03:20 UTC
Hi Paul, please find the image for the 10.3 simulator this morning showing the toolbaritems in the correct place and visible. 

You can see in the 11.0 simulator image that the toolbaritems are NOT visible, but if I click in the area that command function will execute. They are there, just NOT visible.

Hopefully this helps.

- KC
Comment 11 curry_kelly 2017-09-22 15:03:49 UTC
Created attachment 24895 [details]
10.3 simulator image
Comment 12 curry_kelly 2017-09-22 15:04:11 UTC
Created attachment 24896 [details]
11.0 simulator
Comment 13 Paul DiPietro [MSFT] 2017-09-22 15:52:48 UTC
An updated project would be more helpful for us to look at. That said, I believe that this issue might have to do with this bug report:


Which is referred to by this SO question:

Comment 14 Paul DiPietro [MSFT] 2017-09-22 18:11:21 UTC
*** Bug 59700 has been marked as a duplicate of this bug. ***
Comment 15 Jon Goldberger [MSFT] 2017-12-29 18:52:18 UTC
The customer who initially reported this issue to MSFT support confirms that the issue he was hitting was the same as noted in Comment 13 above.

To workaround this issue on Apple's side, set the UIButton.Appearance.TintColor to be the desired TintColor for the UIBarButtonItem in the AppDelegate.FinishedLaunching method of the iOS project.