Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.x fails to build with error: expected a type #113

Closed
geraintwhite opened this issue May 4, 2020 · 7 comments · Fixed by #128
Closed

1.2.x fails to build with error: expected a type #113

geraintwhite opened this issue May 4, 2020 · 7 comments · Fixed by #128

Comments

@geraintwhite
Copy link
Contributor

geraintwhite commented May 4, 2020

Bug

After updating to 1.2.0 from 1.1.1, the module fails to build in Xcode with the following error:

RNCPushNotificationIOS.h:22:41: error: expected a type  + (void)didReceiveNotificationResponse:(UNNotificationResponse *)response API_AVAILABLE(ios(10.0));

Environment info

react-native info output:

info
  React Native Environment Info:
    System:
      OS: macOS 10.15.3
      CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
      Memory: 1.29 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 12.4.0 - ~/.nvm/versions/node/v12.4.0/bin/node
      Yarn: 1.5.1 - /usr/local/bin/yarn
      npm: 6.9.0 - ~/.nvm/versions/node/v12.4.0/bin/npm
    SDKs:
      iOS SDK:
        Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
    IDEs:
      Android Studio: 3.6 AI-192.7142.36.36.6241897
      Xcode: 10.3/10G8 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.13.1 => 16.13.1
      react-native: 0.59.10 => 0.59.10

Library version: 1.2.0

@geraintwhite geraintwhite changed the title 1.2.x fails to build 1.2.x fails to build with error: expected a type May 4, 2020
@sairam-405
Copy link

Hi @grit96
#import <UserNotifications/UserNotifications.h>
import above one in RNCPushNotificationIOS.h file then it will works.
If you want you can take fork and change the file and then install library through your git url

@YevheniiShabelnykkk
Copy link

It's not working. Could someone help with this? Have the same error. It happened after updating to 1.2.0 from 1.1.1.

@anthowm
Copy link

anthowm commented May 7, 2020

after a clean install of my project it stop working because it update to 1.2.0 with this error.

@dilipsuthar97
Copy link

dilipsuthar97 commented May 15, 2020

Thank you @sairam-405 it's working fine after importing ✌

#import <UserNotifications/UserNotifications.h>

@saintego
Copy link

Are you planning to do some fix? I have this issue on appCentre build

geraintwhite added a commit to geraintwhite/push-notification-ios that referenced this issue May 29, 2020
@saintego
Copy link

saintego commented Jun 1, 2020

It seems it is working after updating XCode from 10 to 11.5 on AppCentre

@Naturalclar
Copy link
Collaborator

I've landed the fix and released it as 1.2.2 🎉 thanks @grit96 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants