react-native-today-widget
react-native-today-widget copied to clipboard
Create Today widget with Cocoapods
Hi,
For those who have some issues to create a Today Widget and link it to use React Native in the widget, here is the missing parts.
- Follow up this wonderful Medium article => https://medium.com/@davidskaarup/add-ios-today-widget-to-your-react-native-app-ed9c9b601cc
- In step 4. Add New Run Script Phase, replace the script with the updated path for react 0.58
export NODE_BINARY=node
../node_modules/react-native/scripts/react-native-xcode.sh
- Edit your Podfile to get something like this :
target 'MainApp' do
... pods with React...
target 'TodayWidget' do
inherit! :search_paths
end
end
Tada!
thanks for this!
But I'm getting a compilation error:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_RCTRootView", referenced from: objc-class-ref in TodayViewController.o "_OBJC_CLASS_$_RCTBundleURLProvider", referenced from: objc-class-ref in TodayViewController.o ld: symbol(s) not found for architecture x86_64
Did anyone encounter this as well?
@Under-Warz Same problem as @littletower for me, do you have any solution ? I'm stocked with these errors, as react-native native now use auto-link and cocoapods workspace by default
any solution?
@magrinj @littletower @Under-Warz , it is finally working, you can follow this video. https://youtu.be/23R3HxnHk3A