顯然,this is a well known issue在升級到Xcode 8時反應原生。我按照this指南修復了我遇到的錯誤,但是當我的應用嘗試加載時,我仍然收到以下錯誤<ScrollView/>
組件。React Native升級到Xcode8後RCTCustomScrollView壞了
[RCTCustomScrollView refreshControl]: unrecognized selector sent to instance 0x16099e00
,每個人都似乎認爲我RCTScrollView.m
代碼導致問題如下所示:
- (void)setRefreshControl:(RCTRefreshControl *)refreshControl
{
if (refreshControl) {
[refreshControl removeFromSuperview];
}
refreshControl = refreshControl;
[self addSubview:refreshControl];
}
- (void)removeReactSubview:(UIView *)subview
{
if ([subview isKindOfClass:[RCTRefreshControl class]]) {
_scrollView.refreshControl = nil;
} else {
RCTAssert(_contentView == subview, @"Attempted to remove non-existent subview");
_contentView = nil;
[subview removeFromSuperview];
}
}
一切似乎很好地工作,當我運行iOS 9.1.1的設備上運行此,但是當我嘗試運行9.3的設備時,它在嘗試加載<ScrollView/>
時崩潰。
重要提示 - 我運行原生的反應和0.28是在緊張的情況下,我現在不能升級,因此我必須手動進行修復。