question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Linker command failed with exit code 1

See original GitHub issue

Versions RN 0.44 react-native-fcm 6.2.3 What device are you using? iOS 10

Problem When I build the project after linking manually without cocoapods I got Linker command failed with exit code 1 . I can inspect the report navigator and then I can see an extra warning 1 duplicate symbol for architecture x86_64 so as I have react-native-firebase library also linked in my project I think that there may be some conflicts. Any clue?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:11
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

15reactions
evollucommented, Jun 28, 2017

if you are using latest fcm repo, you need V4.0.0 SDK for IOS

12reactions
punkstacommented, Jun 22, 2017

have same error while build. this is detailed info:

Building RNFIRMessaging/RNFIRMessaging [Release]
▸ Check Dependencies

❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:195:11: use of undeclared identifier 'FIRMessagingConnectionStateChangedNotification'

name:FIRMessagingConnectionStateChangedNotification object:nil];
                                                                                     ^



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:199:35: no visible @interface for 'FIRMessaging' declares the selector 'setDelegate:'

[[FIRMessaging messaging] setDelegate:self];
          ^



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:206:31: no visible @interface for 'FIRMessaging' declares the selector 'setShouldEstablishDirectChannel:'

[[FIRMessaging messaging] setShouldEstablishDirectChannel:@YES];
         ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:211:39: no visible @interface for 'FIRMessaging' declares the selector 'isDirectChannelEstablished'

resolve([[FIRMessaging messaging] isDirectChannelEstablished] ? @YES: @NO);
     ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:226:38: property 'APNSToken' not found on object of type 'FIRMessaging *'

resolve([FIRMessaging messaging].APNSToken);
             ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:231:38: property 'FCMToken' not found on object of type 'FIRMessaging *'

resolve([FIRMessaging messaging].FCMToken);
                                     ^



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:479:93: property 'isDirectChannelEstablished' not found on object of type 'FIRMessaging *'

[self sendEventWithName:FCMDirectChannelConnectionChanged body:[FIRMessaging messaging].isDirectChannelEstablished ? @YES: @NO];
                                     ^



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:480:67: property 'isDirectChannelEstablished' not found on object of type 'FIRMessaging *'

NSLog(@"connectionStateChanged: %@", [FIRMessaging messaging].isDirectChannelEstablished ? @"connected": @"disconnected");
                                                                                            ^



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:195:11: use of undeclared identifier 'FIRMessagingConnectionStateChangedNotification'

name:FIRMessagingConnectionStateChangedNotification object:nil];
                                                                  ^



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:199:35: no visible @interface for 'FIRMessaging' declares the selector 'setDelegate:'

[[FIRMessaging messaging] setDelegate:self];
          ^



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:206:31: no visible @interface for 'FIRMessaging' declares the selector 'setShouldEstablishDirectChannel:'

[[FIRMessaging messaging] setShouldEstablishDirectChannel:@YES];
         ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:211:39: no visible @interface for 'FIRMessaging' declares the selector 'isDirectChannelEstablished'

resolve([[FIRMessaging messaging] isDirectChannelEstablished] ? @YES: @NO);
     ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:226:38: property 'APNSToken' not found on object of type 'FIRMessaging *'

resolve([FIRMessaging messaging].APNSToken);
             ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:231:38: property 'FCMToken' not found on object of type 'FIRMessaging *'

resolve([FIRMessaging messaging].FCMToken);
                                     ^



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:479:93: property 'isDirectChannelEstablished' not found on object of type 'FIRMessaging *'

[self sendEventWithName:FCMDirectChannelConnectionChanged body:[FIRMessaging messaging].isDirectChannelEstablished ? @YES: @NO];
                                     ^



❌  /Users/administrator/applicationName/app/node_modules/react-native-fcm/ios/RNFIRMessaging.m:480:67: property 'isDirectChannelEstablished' not found on object of type 'FIRMessaging *'

NSLog(@"connectionStateChanged: %@", [FIRMessaging messaging].isDirectChannelEstablished ? @"connected": @"disconnected");
                                                                                            ^


** ARCHIVE FAILED **
Read more comments on GitHub >

github_iconTop Results From Across the Web

Linker Command failed with exit code 1 (use - Stack Overflow
Just go project-> Build Phase->Link Binary with libraries Remove the old FrameWorks by click on minus button(-) And clean and Run again. It's ......
Read more >
clang: error: linker command faile… | Apple Developer Forums
That message isn't the error, it's just a message telling you there is an error. Go to the build log (click the last...
Read more >
error: linker command failed with exit code 1 (open frameworks)
This means you have two files which have a function called "main" in them -- the compiler compiles all the code fine, but...
Read more >
How to fix "linker command failed with exit code 1"?
This error code indicates that the linker was unable to complete its task of linking together the various compiled components of an ...
Read more >
linker command failed with exit code 1 | Sololearn
I have been creating a Map class for creating allocated 2d Array. When I tried to Complier the file there is linker command...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found