Categories
Current Events Mobile Programming

A mobile dev’s perspective on that old Vine code

Of the many ideas for Twitter that Elon Musk has been posting for public reaction since taking over, the best one — an easy choice, as most of the ones he’s tweeted run the gamut from dismal to disastrous — is resurrecting Vine, the proto-TikTok short video service where you could share incredibly short (six-second) looping videos:

Vine started as its own company in June 2012, Twitter acquired it in October 2012, and its first official release was in January 2013. Twitter announced that it would discontinue Vine in October 2016 and disabled all uploads.

If Vine could be turned into a TikTok competitor as YouTuber Jimmy “MrBeast” Donaldson suggests, it could help counter TikTok’s serious security issues and help give Twitter a much-needed image boost.

Here’s the problem:

Musk has asked engineers to look at the old code. This would be a sensible thing if we were dealing with a hardware, mechanical, or physical artifact, but Vine is software. Even more challenging is the fact that it’s mobile software. That was first released in 2012 and last updated in 2016.

As software developer and product manager Sara Beykpour put it (and on Twitter, no less!):

An actual book from the early Vine era.

I have no inside knowledge of Vine, but I’d be willing to bet that the Android and iOS Vine apps were probably written as native apps. React Native wasn’t out until 2015, and every other cross-platform solution at the time (including Xamarin) wouldn’t have been up to the task.

In 2012, when Vine began, that would mean:

  • On Android: writing the app in Java using Eclipse (the stable 1.0 version of Android Studio wouldn’t come out until December 2014).
  • On iOS: writing the app in Objective-C, quite possibly using NIBs instead of storyboards.

Simply put — ancient stuff, at least by the standards of mobile development. While there are still some Java-based Android and Objective-C-based iOS projects out there, the majority of the top apps in the stores are written in either Kotlin or Swift.

It would be a good idea to have a handful of developers look over the old Vine code for an audit. There’s a chance that there might be a few useful ideas in there, possibly in feature switches that never got turned on. However, that old code will probably be useless as a starting point to build on in the short timeframe that Musk suggests for the relaunch of Vine.

In case you were wondering…

…the flagship phones of 2016, when Vine was active, were the Samsung Galaxy S7 on the Android side, which came with Android 6 (a.k.a. “Marshmallow”, a.k.a. API 23)

…and on the iOS side, it was the iPhone 7, which came with iOS 10.

Categories
Current Events Mobile

RayWenderlich.com is now called “Kodeco!”

“Distracted Boyfriend” meme, with RayWenderlich.com logo covering the ignored girlfriend’s head, a smartphone covering the boyfriend’s head, and the Kodeco logo covering the distracting woman’s head.

Kodeco (pronounced Koe-DECK-coe, or “code echo,” your choice) is the new name of RayWenderlich.com, the premier mobile development tutorial site!

Over the past decade, I’ve had the pleasure of not just learning mobile development at RayWenderlich.com, but also writing articles for them, doing presentations and workshops at their conference, recording a full video course, and even co-authoring a book!

Anitra Pavka professional head shot.

I even introduced Anitra to them, and she’s now a tech editor there, which is why we’re both on the team photo collage:

Photo collage of RayWenderlich.com team with arrows pointing to Anitra Pavka’s and Joey deVilla’s photos.
Ray Wenderlich.

The name RayWenderlich.com made sense when it was just a blog that its namesake, Ray Wenderlich, started when he’d quit his job to become an indie mobile developer. At the time, he was simply blogging and sharing iOS development tips as part of his business. As I mentioned earlier, I learned iOS programming from the original edition of his first book, The iOS Apprentice, where you learn by building four applications.

The site kept growing and became that classic internet success story where the side business became the main business. The site grew to add Android development tutorials (around the time I joined the team), and since then has expanded to add Flutter, Unity, and other mobile development topics.

A decade and thousands of articles later, the name change makes sense. It’s no longer an indie mobile developer’s side project, but a full-fledged publishing company in the same spirit as O’Reilly and No Starch Press.

Congratulations, Kodeco, and I look forward to writing more mobile dev tutorials with you!

More about Kodeco

Kodeco banner
Categories
Mobile Programming Video What I’m Up To

How to add Auth0 authentication to a SwiftUI app

Joey deVilla in his home office, holding an “Einstein” rubber duck up to the camera.
C’mon, how many programming tutorial videos have a scene like this?

If you’re making an iOS app, the odds are pretty good that sooner or later, you’re going to have to integrate authentication — login and logout — into it. I show you how to do that with Auth0 in both a video

…as well as a matching two-part article series that walks you through the process:

Both the video and article present how the final app will look and work:

Tap to view at full size.

And then they’ll get you started with a starter project:

Joey deVilla appears in the corner of the screen showing the starter project of Auth0’s iOS/SwiftUI authentication video.
Tap to view at full size.

I’ll walk you through the processes of getting Auth0 set up to recognize your app and creating a user with which to log in:

Joey deVilla appears in the corner of the screen showing the Auth0 dashboard in Auth0’s iOS/SwiftUI authentication video.
Tap to view at full size.

And then, I’ll show you how to add login and logout to the project’s app:

Joey deVilla appears in the corner of the screen, while adding login and logout to the starter project of Auth0’s iOS/SwiftUI authentication video.
Tap to view at full size.

And along the way, I’ll provide a brief intro to ID tokens, JWTs, and JWT.io:

Joey deVilla appears in the corner of the screen showing the JWT.io site in  Auth0’s iOS/SwiftUI authentication video.
Tap to view at full size.

Of course the video ends with an accordion number!

Joey deVilla plays accordion at the end of an Auth0 tutorial video.
Again, I ask: how many programming tutorial videos have a scene like this?

Once again, the here’s the video, How to Integrate Auth0 in a SwiftUI App, and here are the articles:

Whether you prefer to learn by watching video, reading, or a little bit of both, I hope you find these useful!

Categories
Mobile Programming

My initial impression of Android development with Jetpack Compose

Cat with horrified expression on its face.
Categories
Mobile Programming

How to fix the “Android Gradle plugin requires Java 11 to run” error (quick and dirty edition)

Maybe you’ve run into this Android Studio problem lately. You’ve created a brand new project, and when you run it — even if you haven’t made any changes — you get the dreaded Android Gradle plugin requires Java 11 to run error:

Here’s the “quick and dirty” fix. It assumes that you already have JDK 11 installed.

  • On Linux and Windows, open the File menu and select Settings… to get to the Settings window (you can also use the keyboard shortcut Ctrl + Alt + s).
  • On macOS, open the Android Studio menu and select Preferences… to get to the Preferences window (you can also use the keyboard shortcut + , ).

Once the Settings or Preferences window is open, select Build, Execution, DeploymentBuild ToolsGradle from the menu on the left side.

You can change the JDK that Gradle uses in the Gradle projects section’s Gradle JDK menu. Changing the current selection from JDK 1.8 to JDK 11 works for me:

The Android Studio on my Windows machine already defaults Gradle to JDK 11, but on my Mac, it’s still insisting on JDK 1.8. I’m sure there’s some config file floating around somewhere that I need to edit — does anyone know which one? — but in the meantime, I’m using the quick and dirty fix.

Categories
Hardware Mobile

Sidetalking makes a (slight) comeback

“I CAN’T HEAR YOU! I’VE GOT A CONTROLLER IN MY EAR!!!”

While getting groceries, I saw this endcap for cotton candy-flavored energy drink. The “XBox controller as phone” pose is silly, but it also reminded me of a phone I’d wanted way back in the early 2000s: the Nokia N-Gage.

The Nokia N-Gage. Tap to view at full size.

Released in 2003 (in the pre-smartphone era, back when mobile phones sported a lot of dedicated buttons), the N-Gage was a phone-meets-handheld gaming device. IGN summed it up best as “a bad console filled with bad games,” and it didn’t help that the speaker and microphone were mounted on its side. In order to use it as a phone, you’d have to hold it like this — a position that would come to be known as sidetalking:

Sidetalking looked silly, so soon there were sidetalking photos featuring people using the N-Gage while making silly faces…

…followed by people ditching the N-Gage altogether and opting to take sidetalking photos with any old electronic thing, turning it into a full-blown meme:

I even got on the fun, using my device of choice:

In case you’re wondering, I’m not really pining for the N-Gage anymore. My iPhone 13 Pro is a decent gaming phone, and on the Android side, I’ve got a Nubia Redmagic 6R that plays Genshin Impact rather nicely.

Categories
Current Events Mobile

Hired Russian goons caused Apple and Google to delist an app that Putin didn’t like

Goons (hired goons!) following the order of Vladimir Putin went to the homes of Apple and Google executives in Moscow and threatened to arrest them unless Navalny — an app that helped voters to strategically cast ballots against Putin — was taken down from their respective app stores.

It’s summarized in the first two paragraphs of the Washington Post story, Putin’s pre-war moves against U.S. tech giants laid groundwork for crackdown on free expression:

Russian agents came to the home of Google’s top executive in Moscow to deliver a frightening ultimatum last September: take down an app that had drawn the ire of Russian President Vladimir Putin within 24 hours or be taken to prison.

Google quickly moved the woman to a hotel where she checked in under an assumed name and might be protected by the presence of other guests and hotel security, according to people with knowledge of the matter. The same agents — believed by company officials to be from Russia’s FSB, a successor to the KGB intelligence service — then showed up at her room to tell her the clock was still ticking.

It turns out that the same demand was made to an Apple executive in the similarly threatening manner.

It’s one thing to feel pressure from a government official or a street-level thug in their employ, but it’s entirely something else to get an ultimatum delivered by a member of the world’s most notorious spy agency (or, more accurately, the agency that the world’s most notorious spy agency turned into), especially after they’ve bypassed the security arrangements of two of the world’s best-heeled companies and have been known to poison political enemies (including Alexei Navalny, after whom the app is named).

The Navalny app

As mentioned earlier, the app gets its name from Alexei Navalny, Russian opposition leader and general thorn in Vladimir Putin’s side. He’s also the leader of the Russia of the Future party, which is described as pro-reform, anti-Putin, anti-corruption, and pro-European. He also has the dubious distinction of being a survivor of a Putin poisoning attempt.

The Navalny app is a backup for a website that presented strategic voting options during the 2021 election in Russia. The idea was to prevent the election of Putin’s party, United Russia. If you went to the site and chose your electoral district, it would tell you which of your district’s candidate had the best chance of defeating the United Russia candidate. The Russian government could easily block the site, which is on the open internet, and could be blocked by forcing ISPs to filter it out, or possibly through ASN blocking.

The app had the similar functionality as the site, but since it was available only through the walled gardens of Apple’s App Store and Google’s Play Store, it can’t be directly censored by a state. It would take indirect — and, as we’ve seen, downright nasty — action to make an app unavailable.

The perspective from a few months ago

You may remember that back in September, there were a number of stories about Apple and Google “caving” and removing the app. Some of them were very critical of both companies for the move:

And there’s Rachel Maddow’s scathing piece on the matter (see above).

What this says about the limits of big tech’s power

From xkcd. Tap to view the original comic.

Russia’s solution to the problem of the Navalny app was a variation on the crudely descriptive euphemism of rubber-hose cryptanalysis. In practical terms, it’s the extraction of the decoding key for an encrypted message through intimidation or torture, the latter of which can include beating the key holder with a rubber hose.

It’s probably why Russia passed a law last year requiring big U.S. tech companies to open offices in Russia by the start of 2022. By opening local offices, there would be local management, who could then be subjected to rubber-hosery. In light of this story, we can expect these offices to close soon, if they haven’t already.

In case you didn’t get the “hired goons” reference…

It’s from an old Simpsons episode: