I’ve spent the last month building workshop and presentation content for Music City Code, held in Nashville, TN. I spoke about NativeScript throughout the conference, met a ton of new friends, and had fun building apps, and automated products. One of the products of my preparations is a cool side project I call the NativeScript tweet bot.
6 Minute Mobile Apps with NativeScript: A Race Against Time
One of my sessions, 6 Minute Mobile App with NativeScript: A Race Against Time, required me to write 10 mobile apps with NativeScript in 60 minutes. I got pretty close: I made it to 5. 5 is a lot, but not what I promised, which was 10.
I suspected I wouldn’t be able to make it to 10 apps, so what I created a NativeScript tweet bot. It’s job is to automatically create NativeScript apps for me. Here’s how it works.
NativeScript Tweet Bot
Tweet me @MikeBranstein and include the hashtag #MakeMeAnApp. In a few minutes, you’ll get back a screenshot of your very own, customized NativeScript app. It take a little bit of time (2-3 minutes), but there’s a lot going on behind the scenes.
- When you tweet @MikeBranstein with #MakeMeAnApp, it is detected by a listening Azure Logic App.
- The logic app does one thing: if a tweet it detected, it queues a Visual Studio Team Services (VSTS) build.
- My Mac build server (running a VSTS build agent) listens to the queue and picks up the build request
- A Github repository is downloaded, containing a NativeScript app template
- The original tweeter’s user name is injected into the app
- The NativeScript app is built and run, using the NativeScript CLI
- The iOS simulator starts and loads the app
- A screenshot of the running app is taken
- The screenshot is submitted to an Azure Web App running a Web API service
- The service negotiates with Twitter and send the image as a reply tweet
Even though I didn’t personally make 10 NativeScript apps in 60 minutes, with the help of the audience, I was able to make a total of 15 apps. Thanks every one!
Unfortunately, I can’t leave the tweet bot running forever, so I’ll leave it up for a few more weeks. Hope you can try it before then!