我正在尝试在版本0.6.4中安装包react-native-today-widget,因为我的项目的反应原生版本(0.44.3),我能够成功安装包:
yarn add react-native-today-widget@0.6.4
yarn add v0.24.5
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "react-native-today-widget@0.6.4" has unmet peer dependency "react@^16.0.0-alpha.6".
warning "react-native-today-widget@0.6.4" has unmet peer dependency "react-native@^0.44.0".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
└─ react-native-today-widget@0.6.4
✨ Done in 2.62s.
安装软件包后,我也成功运行了react-native link
,但是当我使用react-native run-ios
运行应用程序构建时,出现以下错误:
error: Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier.
Embedded Binary Bundle Identifier: .TodayWidgetExtension
Parent App Bundle Identifier: org.reactjs.native.example.testTodayWidget
** BUILD FAILED **
The following build commands failed:
ValidateEmbeddedBinary build/Build/Products/Debug-iphonesimulator/testTodayWidget.app/PlugIns/TodayWidgetExtension.appex
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/testTodayWidget.app
An error was encountered processing the command (domain=IXErrorDomain, code=2):
Failed to set plugin placeholders for org.reactjs.native.example.testTodayWidget
Launching org.reactjs.native.example.testTodayWidget
有没有人有这个错误?有关解决方案或解决方法的任何建议吗?
韩国社交协会
答案 0 :(得分:1)
我找到了问题的解决方案,我运行
./node_modules/.bin/bundle-id org.reactjs.native.example.ProjectName.TodayWidgetExtension
在项目根目录中,因为必须为窗口小部件项目设置项目包,它必须以主应用程序的Bundle ID开始(包含窗口小部件)。
此库为小部件项目script to set Bundle ID运行automatically after installation。