Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Consider a scenario of using the module Xamarin.Firebase.iOS.AdMob to implement AdMob in Xamarin.
In such a case you would add the following code:
After the configuration above, you obtain an event registered in iPhone's calendar, and show the EKEventViewController using NavigationController.PushViewController.
However, in the following conditions the event does not appear as expected, and the event view is pitch black.
- App is running on an iOS 11 device (iOS 10/9 armv7 doesn't show the issue)
- App is running on an actual device, not a simulator
- App is running for the first time (updates & future boots won't show the issue)
- App is accessing the calendar (the confirmation dialog of access permissions in the first-time boot is irrelevant)
Moreover, this issue persists even in codes that doesn't explicitly "run" the MobileAds.Configure line; that is, even when the line is skipped (e.g. through if statements), the issue is still seen.
Files for checking the issue are included in the attached "detail.zip" file.
The provisioning info for the Xamarin app should be changed appropriately for the testing device. Also, the App key ID is a dummy one for testing purposes, but if the research is expected to take long, please create a new App key ID in-house.
- 01_PrivacyEvent.png: screenshot showing request of access to the Calendar
- 02_EKEventViewController.png: screenshot when issue shows (only the "delete event" button shows)
- SampleXamarin\: Sample Xamarin app which can repro the issue
- SampleSwift\: Sample Swift app which does not repro the issue
- WaCalendarCrashLog.txt: Crash logs for the crash case (described below)
Additional notes are as follows:
- The customer tried replacing Xamarin.Google.iOS.MobileAds package with a rebuilt version using the latest version of AdMob SDK, but the issue persists.
- Using PushViewController shows a black screeen, while using PresentViewController crashes the app.
- Using EKEventEditViewController does not repro the issue.
- To use the sample, you must create an event beforehand within September-October 2017. Once the repro occurs, to check the issue again you must delete the app and reinstall it.
Development environment is the following:
- Windows 10 Professional
- Visual Studio 2017 Enterprise 15.3.5
- Xcode9.0 (13247 Build:9A235)
- Visual Studio for Mac (7.1.5 build 2)
- Xamarin iOS 184.108.40.206
- iPhone6s Plus(iOS 11.0、11.0.1)
There is a confrimed bug in Bugzilla that is triggered from a similar situation--the simple use of MobileAds.Configure:
Bug 55246 - Focusing on a UITextField is slow when using Xamarin.Google.iOS.MobileAds
I have a device that can repro the issue (iPhone 6s). If you need any additional logs, feel free to let me know.
You can repro the issue with sample project where is located at following share.
If you cannot access there, please let me know.
@Ryoichi Iwaida I cannot download the sample, can you share the link again, please? Thanks in advance
Hello Israel, I'll be commenting on behalf of Iwaida-san on this issue.
Here's a OneDrive link to the ZIP file containing the items provided by the customer. If you still can't access the files please let me know.
I'll note that there are some changes needed:
- Changing the provisioning profile according to your testing environment
- using a new App ID and GoogleService-Info.plist tied to your AdMob account (the one provided by the customer doesn't work anymore)
- change the line "var end_datetime = DateTime.Parse("2017/10/30");" so that the November (& later) dates are within the parsing date frame
- updating the NuGet packages
Another news is that I tested the sample app using the newest Xamarin packages (7.24.1), but the issue persists.
Hello, were you able to access the link above? If there were any issues letting me know would help.
Could you provide a response on this? Again, if you have any issues with accessing the share please let me know. We could discuss this offline if you need to.
Sorry for the late response.
I can download the sample. I'm working on this right now.
The latest customer's comment as follows.
The originally, the problem happens on Xamarin.Google.iOS.MobileAds version 7.15.0 or later. Packages prior to version 7.15.0, I was not able to reproduce the problem.
However, when I recently update to the latest iOS version, the problem is now observing with all versions of Xamarin.Google.iOS.MobileAds.
If this is not Xamarin specific issue then please let me know. I will ask this to Apple or Google for investigation.
After some testing, I couldn't find what is causing this bug, also, tried to find a workaround for this, but with no success.
FWICT, the problem is in the view, G.MobileAds is messing with something in the view and that causes the invalidation of the entire VC.
The navigation controller seems to be working correctly. If I add a controller after the EKEventViewController, the Navigation Controller shows it correctly.
Another thing, at first, I was unable to present the EKEventViewController using PresentViewController method, this was crashing as stated before. But after updating X.iOS to v220.127.116.11, I am unable to reproduce the crash using PresentViewController method. I tested the sample right out of the box (changing the dates, of course) and everything worked as expected. Using PushViewController keeps showing a black screen.
Moving this issue to the iOS team for a further investigation.
Hi Israel, thank you very much for the update. Understood about the current status. Again if there are any questions, please let me know.
Also, there are some updates from the customer's side, so I'd like to share those:
- Apparently the Swift version of the sample stopped working recently. The customer is suspecting that the iOS side is playing a role in causing this issue. If there is suitable reason that Xamarin isn't the direct cause, the customer is considering a contact to Apple/Google for investigation.
- Right now, the blackout issue occurs every time the app starts, except for the first time (i.e. the behavior is the exact opposite of what was seen before). The customer is currently taking a patchy workaround of initializing MobileAds everytime the app goes to the foreground.
If a similar swift-based application shows the same issue then it's not likely to be something related to Xamarin.iOS
It's also very uncommon that bugs exhibited by only some iOS version (and not others) are related to Xamarin.iOS (we have very few version specific code paths).
That black screen situation does not seem to be unique for users of MobileAds  across different tools/SDK
Sadly the cases I've read (not an extensive search) did not come with any solution (beside downgrading the library in one case) and offers no clue about the root cause.
Right now we do not have any indication that this is something incorrect with Xamarin.iOS. If you get additional details please share them with us and we'll see if we can investigate this further.
Hello Sebastien, thank you for the explanation. Also, I apologize for the extremely delayed response.
Before I mentioned that some problems are occurring in the equivalent Swift app--but I just tried to repro the issue and I don't see any problems.
The Swift sample app is no different from the original Xamarin.iOS app that shows the issue. iOS 11.2.5 and AdMob SDK 7.28.0 is used.
Because of this observation the chance that Xamarin.iOS is playing a role in the issue can't be ruled out. Could you investigate this issue further, based on the situation above?
If you need the project that I used, please let me know, and I'll share a link to the share.
@Jesse sure, please share the latest sample versions you have (both swift and XI) and include the version information (of XI being used).
Note that the other links I shared shows the same issue without Xamarin.iOS so, right now, my guess remains it's not related - it's something else, e.g. could be a race, that the XI sample shows.
Thank you Sebastien.
I placed the projects for each sample in my OneDrive (due to large sizes). Here are the links. Let me know if there are any access issues.
For the Xamarin sample, I just tested it today with the most recent Xamarin environment and an iPhone6s with iOS 11.2.5 installed. MobileAds is 7.24.1.
Here is the actual version info for Xamarin:
Xamarin 18.104.22.1680 (fc93f3f5b)
Xamarin Designer 4.8.188 (c5813fa34)
Xamarin.Android SDK 22.214.171.124 (HEAD/75f8c6838)
Xamarin.iOS and Xamarin.Mac SDK 126.96.36.199 (db807ec)
For the Swift sample, I would like to note that I'm not familiar with Swift at all so there may be something missing that causes the issue to not appear.
Just a quick check on whether the comparison between Xamarin.iOS and Swift worked fine based on the files I provided. If there were any problems in testing the projects, please let me know.
Hi, another quick check on the status of this. It would be nice if you could let me know whether the repro status (yes on Xamarin, no on Swift) could be seen on your side as well.
I'll be taking over the bug. I just started looking into it, I'll provide feedback ASAP.
So, I have been looking at the application. In the given version, the application crashes, nevertheless, testing the application with the following environment (pasted at the end of the comments) results in the application running without a crash where we have a dialog displayed to add a new event and going back to the main screen (with the Display Event button). I request @Israel to do the same test and he confirmed that it worked, can you please upgrade to the following and get back to me either confirming that the bug goes not longer occur?
=== Visual Studio Community 2017 for Mac ===
Version Preview - Internal Dogfood (7.4.2 build 7)
Installation UUID: 8d12e55e-3489-463f-ac52-8cb4573c5a81
Mono 188.8.131.52 (2017-10/6bf3922f3fd) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 508010000
=== NuGet ===
=== .NET Core ===
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.8.1/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Apple Developer Tools ===
Xcode 9.3 (14126.4)
=== Xamarin.Mac ===
Version: 184.108.40.206 (Visual Studio Community)
=== Xamarin.iOS ===
Version: 220.127.116.11 (Visual Studio Community)
Build date: 2018-03-29 19:30:53-0400
=== Xamarin.Android ===
Version: 18.104.22.168 (Visual Studio Community)
Android SDK: /Users/mandel/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
4.0.3 (API level 15)
4.3 (API level 18)
4.4 (API level 19)
5.0 (API level 21)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.4
SDK Build Tools Version: 25.0.1
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:
=== Xamarin Inspector ===
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 704020007
Git revision: 6b8c9cfce198dcb66fabb49295f37e5b2b5195ee
Build date: 2018-03-26 15:23:41-04
Xamarin addins: b043a56a617644b4cbdea3c6fdacf9f1502f3a9d
Build lane: monodevelop-lion-dogfood-vNext
=== Operating System ===
Mac OS X 10.13.4
Darwin 17.5.0 Darwin Kernel Version 17.5.0
Mon Mar 5 22:24:32 PST 2018
=== Enabled user installed addins ===
Internet of Things (IoT) development (Preview) 7.1
Thank you, Manuel.
I have tested on the latest environment. The result was the same which you have done. The problem did not happen.
@Ryoichi superb news. Will close the bug as fixed for QA to double check. Thanks for the feedback.