On OS X El Capitan version 10.11.5 (15F34)
node --version v6.0.0
nam --v v6.2.2
react-native-cli: 1.0.0
react-native: 0.28.0
watchman --v 4.5.0
xcode 7.3.1
$ react-native init AwesomeProject
$ cd AwesomeProject
$ react-native run-iso
/Users/laurachacon/dev/AwesomeProject/node_modules/react-native/React/Views/RCTScrollView.m:363:7: error: use of undeclared identifier '_refreshControl'; did
you mean 'refreshControl'?
if (_refreshControl) {
^~~~~~~~~~~~~~~
refreshControl
/Users/laurachacon/dev/AwesomeProject/node_modules/react-native/React/Views/RCTScrollView.m:364:6: error: unknown receiver '_refreshControl'; did you mean
'UIRefreshControl'?
[_refreshControl removeFromSuperview];
^~~~~~~~~~~~~~~
UIRefreshControl
/Users/laurachacon/dev/AwesomeProject/node_modules/react-native/React/Views/RCTScrollView.m:364:22: error: no known class method for selector
'removeFromSuperview'
[_refreshControl removeFromSuperview];
^~~~~~~~~~~~~~~~~~~
/Users/laurachacon/dev/AwesomeProject/node_modules/react-native/React/Views/RCTScrollView.m:366:3: error: use of undeclared identifier '_refreshControl'; did
you mean 'refreshControl'?
_refreshControl = refreshControl;
^~~~~~~~~~~~~~~
refreshControl
/Users/laurachacon/dev/AwesomeProject/node_modules/react-native/React/Views/RCTScrollView.m:367:20: error: use of undeclared identifier '_refreshControl'; did
you mean 'refreshControl'?
[self addSubview:_refreshControl];
^~~~~~~~~~~~~~~
refreshControl
** BUILD FAILED **
The following build commands failed:
CompileC /Users/laurachacon/dev/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Objects-normal/x86_64/RCTScrollView.o Views/RCTScrollView.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/AwesomeProject.app
No devices are booted.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
/Users/laurachacon/dev/AwesomeProject/node_modules/promise/lib/done.js:10
throw err;
^
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:486:13)
at Object.execFileSync (child_process.js:506:13)
at _runIOS (/Users/laurachacon/dev/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:82:34)
at Promise (/Users/laurachacon/dev/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:24:5)
at tryCallTwo (/Users/laurachacon/dev/AwesomeProject/node_modules/promise/lib/core.js:45:5)
at doResolve (/Users/laurachacon/dev/AwesomeProject/node_modules/promise/lib/core.js:200:13)
at new Promise (/Users/laurachacon/dev/AwesomeProject/node_modules/promise/lib/core.js:66:3)
at Array.runIOS (/Users/laurachacon/dev/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:23:10)
at Object.run (/Users/laurachacon/dev/AwesomeProject/node_modules/react-native/local-cli/cliEntry.js:88:13)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)
Happens to me after upgrading to xCode 8.0 beta (8S128d)...:(
@laura-chacon @geldarhb Change the variable _refreshControl
to refreshControl
resolved the issue for me. So your setRefreshControl will becoming like this:
- (void)setRefreshControl:(RCTRefreshControl *)refreshControl
{
if (refreshControl) {
[refreshControl removeFromSuperview];
}
refreshControl = refreshControl;
[self addSubview:refreshControl];
}
Worked for me. Thanks. Shouldn't they update in react native module itself
You're right @kkiran33 - It doesn't make sense that he actually made the changes in RN module.
@rankun203 that's the incorrect fix. The correct fix is to synthesize the refreshControl
property manually within the RCTCustomScrollView
implementation.
This appears to be fixed in https://github.com/facebook/react-native/commit/7c8b91442b3547cf94c752f234210bef0848c00a
Simply renaming the variable refreshControl
to rctRefreshControl
(Right-click > Refactor > Rename) fixed this issue for me (based on 7c8b91442b3547cf94c752f234210bef0848c00a).
This is fixed in master; closing out.
@yanqiw you saved my life
I'm getting this error in 0.39
That was a red herring - nevermind
thank for me .
@yanqiw @rankun203 you are good man
@rankun203 You are a hero!
Most helpful comment
@laura-chacon @geldarhb Change the variable
_refreshControl
torefreshControl
resolved the issue for me. So your setRefreshControl will becoming like this: