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

RCTLinkingManager: Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) #21071

Closed
3 tasks done
tpisto opened this issue Sep 12, 2018 · 21 comments
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@tpisto
Copy link

tpisto commented Sep 12, 2018

Environment

React Native Environment Info:
System:
OS: macOS Sierra 10.12.6
Memory: 6.48 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.1 - ~/.nvm/versions/node/v8.11.1/bin/node
Yarn: 1.9.4 - ~/.yarn/bin/yarn
npm: 5.6.0 - ~/.nvm/versions/node/v8.11.1/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.2, macOS 10.13, tvOS 11.2, watchOS 4.2
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 9.2/9C40b - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0

Description

After upgrading from React Native 0.55 to 0.57 and trying to compile the compile fails with
"Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)"
Screenshot: https://cl.ly/af7f38877e19

@PublicParadise
Copy link

Suggested fix

RCTLinkingManager.h

/**
 * Copyright (c) 2015-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

#import <UIKit/UIKit.h>

#import <React/RCTEventEmitter.h>

@interface RCTLinkingManager : RCTEventEmitter

+ (BOOL)application:(nullable UIApplication *)app
            openURL:(nullable NSURL *)URL
            options:(nullable NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options;

+ (BOOL)application:(nullable UIApplication *)application
            openURL:(nullable NSURL *)URL
  sourceApplication:(nullable NSString *)sourceApplication
         annotation:(nullable id)annotation;

+ (BOOL)application:(nullable UIApplication *)application
continueUserActivity:(nullable NSUserActivity *)userActivity
  restorationHandler:(nullable void (^)(NSArray * __nullable))restorationHandler;

@end

@tpisto
Copy link
Author

tpisto commented Sep 12, 2018

@PublicParadise Wow, wonderful, works! Thank you for the super quick answer 🎉

@thomas-gilbert
Copy link

This looks like a duplicate of #20797. There is a PR open here #20798

@tobbbe
Copy link

tobbbe commented Sep 18, 2018

react-native link solved it for me

@bdrobinson
Copy link

For anyone looking for a workaround – if you're able to upgrade to xcode > 9.2 then that will also fix the problem (credit here).

@radko93
Copy link
Contributor

radko93 commented Sep 19, 2018

A temporary workaround if you're not able to update Xcode - use patch-package https://www.npmjs.com/package/patch-package

@ParhamZare
Copy link

ParhamZare commented Sep 26, 2018

I have same issue how solve this? react-native link don't work

@tpisto
Copy link
Author

tpisto commented Sep 26, 2018

I have same issue how solve this? react-native link don't work

Hi! Seems the latest release 0.57.1 fixes this issue.

@radko93
Copy link
Contributor

radko93 commented Sep 26, 2018

This is solved, please ping me if you have any other problems with this.

@radko93 radko93 closed this as completed Sep 26, 2018
@leotm
Copy link
Contributor

leotm commented Mar 27, 2019

This has cropped up again with XCode Version 10.2 (10E125).

I fixed it manually at first with _Nonnull assertions at first, nullable's work for me too.

@digitaldavenyc
Copy link

digitaldavenyc commented Mar 29, 2019

+1

This issue seems to have popped up right after upgrading to XCode 10.2.

Have tried updating to react-native 57.1, cleaning build folders, react-native link and issue is still persisting.

@khizar
Copy link

khizar commented Apr 3, 2019

I can confirm it, I ran into this after upgrading to 10.2 :(

@cemarguvanli
Copy link

nullable works for me too.

@maamounapprise
Copy link

maamounapprise commented Apr 10, 2019

still an issue for me, with latest xcode 10.2 - react-native 0.59.3 @radko93

@komaldeep
Copy link

I am still facing the issue with react-native 0.57.0

@lamtan92
Copy link

Same issue when I upgrading to Xcode 10.2,
I'm using react-native 0.57.0 @radko93

@EJohnF
Copy link

EJohnF commented Apr 24, 2019

seems we will be unnoticed here... I also met it after upgrading to xCode 10.2

@talyh
Copy link

talyh commented Apr 29, 2019

@radko93 - wondering if we can reopen this for XCode 10.2, or if a new issue should be filed.

@ericlewis
Copy link
Contributor

For the commenters above: the fix is to use the latest version of RN, which doesn't appear to have this issue. Otherwise, patch RCTLinking.

@talyh
Copy link

talyh commented Apr 29, 2019

@ericlewis - Can you elaborate on what you mean with "patch RCTLinking"?

I've tried @PublicParadise's suggested change, which got rid of that problem, only to throw "React/RCTEventEmitter.h' file not found". Looking up that issue, gets me back to this one, so I feel like I'm going in circles trying to fix this on my own.

@Viktor19931
Copy link

@PublicParadise thanks! works like charm )

@facebook facebook locked as resolved and limited conversation to collaborators Sep 26, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests