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.

Can't build on Xcode 8.2

See original GitHub issue

Before openning an issue

  1. Reproduce it with the example project in this repo.
  2. If you can’t receive iOS notification, make sure you can receive notification using quickstart-ios project provided by Firebase team

When openning an issue, please include following information for better support

  1. What version of RN and react-native-fcm are you running? RN 0.52 & RNFCM 13.1.0
  2. What device are you using? (e.g iOS9 emulator, Android 6 device)? iOS
  3. Is your app running in foreground, background or not running?

Previously I can build, but I don’t know since when it can’t build again on current Xcode 8.2.

I get an error like this:

/Users/pewh/Documents/KLOP/node_modules/react-native-fcm/ios/RNFIRMessaging.m:196:13: error: unexpected '@' in program
        if (@available(iOS 11.0, *)) {
            ^
/Users/pewh/Documents/KLOP/node_modules/react-native-fcm/ios/RNFIRMessaging.m:197:44: error: no known class method for selector 'categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:options:'
            return [UNNotificationCategory categoryWithIdentifier:identifier actions:actions intentIdentifiers:intentIdentifiers hiddenPreviewsBodyPlaceholder:hiddenPreviewsBodyPlaceholder options:options];
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/pewh/Documents/KLOP/node_modules/react-native-fcm/ios/RNFIRMessaging.m:211:118: error: use of undeclared identifier 'UNNotificationCategoryOptionHiddenPreviewsShowTitle'
                                                           @"UNNotificationCategoryOptionHiddenPreviewsShowTitle": @(UNNotificationCategoryOptionHiddenPreviewsShowTitle),
                                                                                                                     ^
/Users/pewh/Documents/KLOP/node_modules/react-native-fcm/ios/RNFIRMessaging.m:212:121: error: use of undeclared identifier 'UNNotificationCategoryOptionHiddenPreviewsShowSubtitle'
                                                           @"UNNotificationCategoryOptionHiddenPreviewsShowSubtitle": @(UNNotificationCategoryOptionHiddenPreviewsShowSubtitle),
                                                                                                                        ^
4 errors generated.
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
zxiestcommented, Mar 6, 2018

For a temporary fix and to be able to build, add the following to RNFIRMessaging.m:

const UNNotificationCategoryOptionHiddenPreviewsShowTitle = (1 << 2);
const UNNotificationCategoryOptionHiddenPreviewsShowSubtitle = (1 << 3);
0reactions
evollucommented, Mar 22, 2018

@zxiest I can check to apply the change. do you have to stick with old xcode?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode 8.2 beta wrong path for Simulator - Apple Developer
I'm trying to debug my app in the simulator so I click the 'Build and then run current Schema' button. I get the...
Read more >
[SOLVED] Cant build JUCE 5.4.2 in Xcode 8.2.1
Hi, I just switched to the newest JUCE 5.4.2. Unfortunately I am stuck on XCode 8.2.1, because my machine is very old.
Read more >
Receiving build error in Appcelerator when compiling in xcode ...
I just installed appcelerator and when I build the default app.js that is included with a default mobile project xcode throws error and ......
Read more >
Can't build 4.14.3 from source: Xcode 8.2.1
I'm trying to build UE4 from source using Xcode, and am following the GitHub readme steps. I have downloaded as a .zip, run...
Read more >
Xamarin iOS failed to build after upgrade to 8.2 Build 1105
Xcode installed in Mac is also latest Version 10.3. I didn't do any changes in the project and it is building successfully before...
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