[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f7sAEp6lTZD9un4n8W7UmwBu2ulYuxqJIlHJ2pzctRGA":3},{"code":4,"message":5,"data":6},200,"成功",{"id":7,"createdAt":8,"title":9,"content":10,"summary":11,"image":12,"uid":13,"user":14,"categoryId":21,"category":22,"subCategoryId":24,"subCategory":25,"comments":27,"status":17,"reason":12,"notice":12,"visitCount":28,"commentCount":29,"keywords":30},85,"2024-02-22T05:17:35.138Z","React Native: Build failed Cannot initialize a parameter of type ‘NSArray> ’ with an rvalue of type ‘NSArray ’...","当使用react native的某些早期版本时，单独运行iOS工程，可能会遇到如下问题：\n> Build failed Cannot initialize a parameter of type ‘NSArray> ’ with an rvalue of type ‘NSArray ’...\n\n这个问题，我在react-native 0.61.5 版本时碰到了。\n\n这个问题也可能会因为react-native的版本升级时遇到，暂时不确定是否和pod的模块化有关，但是仍然需要在podfile中做一个配置，使桥接模块bridge类名查找更广。\n\n具体的操作如下，在podfile中添加如下的ruby语句：\n```\npost_install do |installer|\n    find_and_replace(\"../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm\",\n    \"_initializeModules:(NSArray\u003Cid\u003CRCTBridgeModule>> *)modules\", \"_initializeModules:(NSArray\u003CClass> *)modules\")\n    find_and_replace(\"../node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm\",\n        \"RCTBridgeModuleNameForClass(module))\", \"RCTBridgeModuleNameForClass(Class(module)))\")\nend\n\ndef find_and_replace(dir, findstr, replacestr)\n  Dir[dir].each do |name|\n      text = File.read(name)\n      replace = text.gsub(findstr,replacestr)\n      if text != replace\n          puts \"Fix: \" + name\n          File.open(name, \"w\") { |file| file.puts replace }\n          STDOUT.flush\n      end\n  end\n  Dir[dir + '*/'].each(&method(:find_and_replace))\nend\n```\n添加完这2个ruby函数之后，重新运行一下：\n```\npod install --verbose\n```\n\n我当前的问题是这样解决的。","当使用react native的某些早起版本时，单独运行iOS工程，可能会遇到如标题所示的问题。","",499668042977349,{"phone":15,"userId":13,"nickName":16,"vipType":17,"avatar":18,"sign":19,"createdAt":20},"13121171998","全栈老韩",1,"https://image.xinwei.ltd/images/IMG_5430.JPG","全栈工程师，擅长iOS App开发、前端（vue、react、nuxt、小程序&Taro）开发、Flutter、React Native、后端（midwayjs、golang、express、koa）开发、docker容器、seo优化等。","2024-01-01T16:14:30.305Z",2,{"id":21,"name":23},"IT技术",12,{"id":24,"name":26,"parentId":21},"React Native",[],128,0,"react native,react native issue,react native开发,react native问题"]