【记录】Print: Entry, ":CFBundleIdentifier", Does Not Exist 报错解决方法

问题描述:使用react-native init 初始化一个react-native(下面简称RN) 项目后;运行react-native run-ios 命令的时候 报错 Print: Entry, “:CFBundleIdentifier”, Does Not Exist

电脑环境是

  • mac 10.13.6
  • xcode 9.4.1
  • react-native 0.40.0

我的解决方法

遇到这种情况,是因为存在报错!我直接用Xcode运行代码
react_native_book/ios/react_native_book.xcodeproj
(react_native_book是我的项目名称 )
然后build项目 发现有一个报错 Users/brady/Gits/react_native_book_v4/node_modules/react-native/React/Base/RCTJavaScriptLoader.mm 文件中有一个报错 Ordered comparison between pointer and zero (‘NSNumber *’ and ‘int’)

解决上面报错的方案就是:

if (_total > 0) {
    [desc appendFormat:@" %ld%% (%@/%@)", (long)(100 * [_done integerValue] / [_total integerValue]), _done, _total];
  }

修改成

if ([_total intValue] > 0) {
    [desc appendFormat:@" %ld%% (%@/%@)", (long)(100 * [_done integerValue] / [_total intValue]), _done, _total];
  }

就行了!

    原文作者:呼啦呀黑
    原文地址: https://www.jianshu.com/p/018689a7fabb
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞