Bug 36466 - Google Cloud Messaging for iOS component does not register when we first launch the app
Summary: Google Cloud Messaging for iOS component does not register when we first laun...
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Production (addons.xamarin.com)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Israel Soto [MSFT]
Depends on:
Reported: 2015-12-02 12:29 UTC by Prashant Cholachagudda
Modified: 2016-06-27 21:12 UTC (History)
5 users (show)

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

crash log (38.34 KB, text/plain)
2015-12-02 12:29 UTC, Prashant Cholachagudda

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 Prashant Cholachagudda 2015-12-02 12:29:48 UTC
Created attachment 14074 [details]
crash log

Google Cloud Messaging does not register when we first launch the app, instead app crashes
This can be reproduced with the sample project bundled with Google Cloud Messaging for iOS component.

Component version

Version information
=== Xamarin Studio ===

Version 5.10.1 (build 3)
Installation UUID: 99b15672-d817-4a4a-a60e-5edcef4cc300
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/prashantvc/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 22.0.1

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

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 7.1.1 (9081)
Build 7B1005

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: eb4c1ef
Branch: master
Build date: 2015-12-01 02:12:30-0500

=== Xamarin.Mac ===

Version: (Business Edition)

=== Build Information ===

Release ID: 510010003
Git revision: f2021a209d66d49cbc0649a6d968b29040e57807
Build date: 2015-12-01 10:43:40-05
Xamarin addins: dfd4f5103e8951edbc8ac24480b53b53c55e04ff
Build lane: monodevelop-lion-cycle6-baseline

=== Operating System ===

Mac OS X 10.11.1
Darwin Prashants-Mac-mini.local 15.0.0 Darwin Kernel Version 15.0.0
    Sat Sep 19 15:53:46 PDT 2015
    root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
Comment 3 Kenneth Thorman 2015-12-03 11:55:09 UTC

This bug is preventing our app from using GCM properly, and thus our customers from using our app.

Any help is greatly appreciated.

Thank you in advance.

Kenneth Thorman
Comment 4 Jose Manuel 2015-12-07 07:48:32 UTC
I have similar error, GCM not working correctly and get a crash the first time to open the app. 

Any update? 

Comment 5 Israel Soto [MSFT] 2015-12-07 23:31:47 UTC
The sample app crashes because the Build Action of GoogleService-Info.plist is set as "EmbeddedResource" and not as "BundleResource". Once you set it as BundleResoure, make a clean and build and everything works ok.

This step is specified on Getting Started page of GMC component:

>> 7. Add GoogleService-Info.plist to your Xamarin.iOS app project and set the Build Action to BundleResource

About the customer sample:

>> https://care.appinux.com/appinuxcare/3.0.2415/

I cannot download the customer sample to see if the problem is the same, seems that iOS link is broken.
Comment 6 Jose Manuel 2015-12-08 09:29:12 UTC
@IsraelSoto. I know, the problem isn't GoogleService-Info.plist. 

The problem is the first time to run the app, app crash. So it's not resolved, I have this problem.

+[NSData gtm_dataByGzippingData:]: unrecognized selector sent to class 0x39060214
<GMR/ERROR> Exception on worker queue: +[NSData gtm_dataByGzippingData:]: unrecognized selector sent to class 0x39060214
Comment 7 Kenneth Thorman 2015-12-08 09:44:34 UTC

The link is working, but it is an enterprise distribution app link so it is not a direct download link from a browser as a file. It will download on a ios device and install the app.


points to 


and as you can see from the url that is pointing to a manifest file (AppinuxCare.plist)

Which direct url is https://care.appinux.com/appinuxcare/3.0.2415/ios/AppinuxCare.plist (if you want to investigate it in a browser or text editor)

which in turn points to the ipa file located at 


You can download this directly on the ios device.

Please note that this specific build is ARM7 only.

Comment 8 Kenneth Thorman 2015-12-08 09:48:30 UTC

You are however correct in your observation that in the build 2415 the project file contains this 

  <BundleResource Include="GoogleService-Info.plist" />

It should be noted through that I have tried locally to change this and install and test, that did not make any difference

But I will be happy to make a new build with this change
Comment 9 Kenneth Thorman 2015-12-08 09:51:43 UTC
I see that the status is set to Resolved, that is not correct in our view. This is a blocking problem for us and we have spent the better part of a week trying to fix this specific problem and it is still blocking us.

Please consider changing the status to in progress

Kenneth Thorman
Comment 10 Israel Soto [MSFT] 2015-12-08 17:52:00 UTC

I need an isolated test case with the problem. I tried to reproduce your error on GCM sample but with no success. Here is a test:

>> https://screencast-o-matic.com/watch/coljbUhuQr

I also installed your app and, as you said, it crashes the first time, but without a code I have no tools to help you to find the error.
Comment 11 Kenneth Thorman 2015-12-09 17:51:19 UTC

We are working on disassembling the relevant part of the app to give you a fairly isolated test cast. I expect that we will have a code sample uploaded today (maybe not entirely as isolated as we would like but I guess good enough. After all this is only the AppDelegate that is in play really.

In the meantime we have another Xamarin user apparently experiencing the same


Kenneth Thorman
Comment 12 Kenneth Thorman 2015-12-10 15:58:46 UTC

I have now more or less managed to remove the MVVMCross Android project and removed a few 1000 files from the project and trimmed it down best I can 

The bug is still happening, but the sample is 25MB with libs so I am sending a link to the 7zip file instead. All bin and obj folders have been removed.

Since it is an enterprise distribution app you will need to approve the developer the first time.

So steps to reproduce is

1. Build the app locally (you may need to change from ARM64 to ARM7 - in the project file - or both depending on architecture of testing device)
2. Deploy app to device
3. When you start the app the first time you will see a black screen and you will get the notification dialog where you have to allow notifications for the app
4. When you click on you will get a error in the console, this will normally crash the app when we have a UI view showing. (But during my trimming I have removed most of the UIViews and are not showing any so now you just get the error)

Url to download sources


Thank you in advance

Kenneth Thorman
Comment 13 Jose Manuel 2015-12-15 08:09:42 UTC
@IsrealSoto Any update?
Comment 14 Israel Soto [MSFT] 2015-12-15 18:10:29 UTC

Since yesterday, I have been working on this but with no progress. As soon as I get something, I'll let you know.
Comment 15 Israel Soto [MSFT] 2015-12-17 00:26:13 UTC
@JoseManuel, @KennethThorman

With the help of Components team, we finally discover the error of GCM and it was not related with GCM but with Google.Core. A library was missing on Google Core that was using the `+[NSData gtm_dataByGzippingData:]` method in background, we added the missing library and your app started to work again the first time.

Here's the link to dll that has the missing library, so you can continue the work with your app:


Test it and if you find any issue with it, let us know please.

A big apology for the inconveniences that this cause to you.

Warm regards,
Israel Soto.
Comment 16 man_xam 2016-06-27 21:12:26 UTC
Is this fix included in the latest component?