Skip to content
An attempt to get a iOS Today Widget working on React Native
Objective-C JavaScript Python Java
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android
ios
.buckconfig
.flowconfig
.gitignore
.watchmanconfig
README.md
index.android.js
index.ios.js
package.json

README.md

Update 10/10/2017

You should try this library instead.

Steps I followed

  1. react-native init TodayWidgetTest
  2. Added TodayWidget today widget extension target
  3. Set TodayViewController as the NSExtensionPrincipalClass in the TodayWidget Info.plist file
  4. Removed the storyboard file that came with it
  5. Added this code and this code
  6. Added App Transport Security Settings in order to Allow Arbitrary Loads in the Info.plist file
  7. Under Build Phases, add all React Native binary libraries in the Link Binary with Libraries for the TodayWidget target
  8. Under Build Settings, add -ObjC linker flag
  9. Set Deployment Target to 7.0

Results

This works on the iOS Simulator, but unfortunately doesn't work on an actual phone.

Related Issue

https://github.com/facebook/react-native/issues/7391

You can’t perform that action at this time.