fechanique / cordova-plugin-fcm

Google FCM Push Notifications Cordova Plugin
623 stars 995 forks source link

iOS 11 app crashes with "Thread 1: signal SIGABRT" #449

Open axpunto opened 6 years ago

axpunto commented 6 years ago

I´m using this environment:

@ionic/cli-utils : 1.19.0 ionic (Ionic CLI) : 3.19.0

global packages: cordova (Cordova CLI) : 8.0.0

local packages: @ionic/app-scripts : 3.1.6 Cordova Platforms : ios 4.5.4 Ionic Framework : ionic-angular 3.9.2

System: ios-deploy : 1.9.2 Node : v8.9.4 npm : 5.6.0 OS : macOS High Sierra Xcode : Xcode 9.2 Build version 9C40b

When i build the app with ionic cordova run ios i have no problem to send the app to the device but the app try to launch the first view and is when crash. In Xcode i have this output in main.m:

int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); Thread 1: signal SIGABRT

I already put the GoogleService-Info.plist in /www and /platforms/ios because i found maybe this should fix the problem.

I also found this issue on https://forum.ionicframework.com/t/thread-1-signal-sigabrt-with-fcm-and-ionic/112230 with no solution since many weeks ago.

Can you help me pleas.

Regard!

sKuD51 commented 6 years ago

Hello, I solved it doing this : https://firebase.google.com/docs/ios/setup?authuser=0 step 5 => adding GoogleService-Info.plist in project. If you don't have this file, generate it on firebase and add it ;-)

valentinvoilean commented 6 years ago

Any news about this issue ?

valentinvoilean commented 6 years ago

OK, I managed to make it work by following these instructions: https://stackoverflow.com/a/48424243/2670603

If you are using cordova-android 7 or newer:

<platform name="android">
  <resource-file src="google-services.json" target="app/google-services.json" />
</platform>

older versions

<platform name="android">
  <resource-file src="google-services.json" target="google-services.json" />
</platform>

iOS

<platform name="ios">
  <resource-file src="GoogleService-Info.plist" />
</platform>
MauroRomer commented 6 years ago

@ruedada. I had the same problem. In my case I just overwrite the file GoogleService-Info.plist on that path: Platform\ios\YOUR_APP_NAME\Resources. In my case the files was there without data.

Reactor13 commented 6 years ago

@MauroRomer Thank you! I have exaсt same problem and exact same solution.

But how GoogleService-Info.plist in Platform\ios\YOUR_APP_NAME\Resources could be damaged? My last system change was XCode update to 9.3

anil1712 commented 6 years ago

@MauroRomer @Reactor13 Its not working for me

DevilLOVEAngel commented 6 years ago

When I try to open file GoogleService-Info.plist in platform\ios\YOUR_APP_NAM\Resources, I see file GoogleService-Info.plist and another file Resources then i open it and see that have a another file GoogleService-Info.plist but inside that file don't same the file in platform\ios\YOUR_APP_NAM\Resources. So i just copy file in platform\ios\YOUR_APP_NAM\Resources to platform\ios\YOUR_APP_NAM\Resources\Resources and the app work correctly on iOS

RakeshKB commented 5 years ago

@DevilLOVEAngel , thanks for the solution man. This worked for me :)