Easily stan your favorite K-pop stars from the comfort of your home screen via an iOS 14 widget.
This widget connects to Twitter's Recent Search to get the most recent K-pop related images. Images are detected to be about K-pop through Tweet annotations.
- Every day, the widget asks the Twitter API for 24 K-pop related Tweets.
- The timeline provider creates a
Timeline
with those Tweets (one per hour) - WidgetKit will try to load a new image every hour or so (depending on how much screen time your widget gets, your battery status, etc.)
- The app requests new Tweets at the end of the timeline.
If for any reason the app fails to get a response from the Twitter API, the widget should retry every 15 minutes until it succeeds.
Start up your latest Xcode! Xcode 12 (targeting the iOS 14 SDK) should work. Before you start, you will need:
- A valid Twitter developer account. Don't have one? Apply on Twitter Developer
- Access to v2. If you haven't done so, create a new Project. Make sure you have an app connected to the project.
- A Bearer token for this project. You can generate a Bearer token for your app under "Keys and tokens" in Developer Portal.
Once you have your Bearer token, locate the Info.plist
under the Widget group in Xcode.
Have fun! You can expand the widget by supporting multiple contexts, or you can try with different Tweet annotations. Change the context
to 65.852262932607926273
for pets!
Let us know! If you have issues, or if you end up building something cool with this project, come see us on the Twitter Community forums!