Categories
Building Mobile Apps iOS Development iPhone Development Training

Write your first iPhone App using Swift 3 and XCode 8

I’m creating a tutorial series on creating iOS apps from the ground up. Take a look at the first video, it will get you started programming iPhone apps even with no experience. I’ll be exploring this more on BuildingMobileApps.com, if you want to follow along there.

https://www.buildingmobileapps.com/write-your-first-ios-10-app-with-swift-3-and-xcode-8-video/

Categories
iOS Development iPhone Development Teaching UT Austin

Fall Semester 2015: Mobile App Development Class for iOS

It’s the fall semester at the University of Texas at Austin, and I’m teaching my introduction to iPhone app programming class again! This is the third time that I’ve taught the class, and I’m always excited by it.

This year, we’ll be using the Swift programming language, and we’ll also be using Auto Layout from the very beginning of the class for responsive user interface design. Those are two major changes from how the class was taught in previous semesters (Objective-C, and very little Auto Layout).

Because this is a class for journalism students who may have never programmed before, I take a slightly different approach than many of the other iOS programming classes and tutorials. We start with a user-interface driven approach, and then go into programming.

If you’re interested, I’ll be adding links from this year’s class (and previous years’ classes) onto this web site on the Mobile Apps Class page.

Categories
Android iPhone Development Phonegap Talks Twilio

Twilio Signal 2015: Video of my Talk

My Talk at Twilio’s Signal 2015 Conference, Using your web development skills to build Twilio-powered apps for Android and iOS, is now up as a video. If you’re interested in adding voice to your mobile apps using the Twilio Client Plugin for PhoneGap, this video is a short intro to the topic. If you have any questions about mobile app development with Twilio, I’d be happy to talk about it!

Categories
Android iPhone Development Phonegap Talks Twilio

Twilio Signal 2015: Build Twilio-Powered Apps for Android and iOS

Categories
Android iPhone Development

App allows tourists to experience ‘12 Years a Slave’

Here’s a nice write-up from the Baton Rouge Advocate on an app for Android and iOS that I worked on with Frank Eakin and Justine Boyer. I did the software development for both apps, in Java and Objective-C.

TwelveYearsApp

App allows tourists to experience ‘12 Years a Slave’

The app officially launches at noon on Saturday, November 1, 2014 at the Louisiana Book Fair on the grounds of the State Capitol in Baton Rouge. Steve McQueen, the director of the movie “Twelve Years a Slave”, and Louis Gossett, Jr., actor and the narrator of the audiobook, are helping to kick off the app launch. On Sunday, November 2, 2014 Frank Eakin and the descendants of many of the characters in the book will take a tour of the app sites, followed by a celebration in Marksville, Louisiana.

I had a great time working on these apps, as they combined my love of history with a great design, great content, and a very interesting story. Many were introduced to the story of Solomon Northup through the movie, Twelve Years a Slave, and I hope they can now easily visit the historical sites associated with his story of being kidnapped as a free man in New York and brought to slavery in Louisiana.

Purchase the Twelve Years a Slave Tour Guide app for the iPhone and the Twelve Years a Slave Tour Guide app for Android.

Categories
iPhone Development

HTML5 Video Autoplay on iOS Sample App

Link to my HTML5 Video Autoplay on iOS Sample App GitHub repo

As part of a current project building a large hybrid native/web iPad app, some issues came up regarding iOS 7 and 8 and HTML5 content in a UIWebView with an autoplaying video.

This is an area where Mobile Safari differs from the UIWebView that iOS developers can embed into their own apps. Mobile Safari doesn’t allow video to autoplay, ostensibly to protect users on cellular data plans from large data charges. As far as I can tell, its behavior doesn’t change if the device is on a wifi network, so there may be other reasons.

There are many StackOverflow issues about this, some of which appear to be outdated, so the easiest thing for me to do was to build a quick, simple app to test out HTML5 autoplay. The key setting to know is that you must change the UIWebView to allow media playback without user interaction – you can set this in the Storyboard, or you can set it via code:


self.webView.mediaPlaybackRequiresUserAction = NO;

You don’t need any kind of Javascript to let the HTML5 video autoplay – simply set the autoplay attribute on the video tag, and you’ll be able to run the video as soon as the HTML loads.

Categories
iPhone Development Teaching

Created a Toolbar Demo for my students

I co-taught the UT-Austin Mobile Apps class with Robert Quigley in the spring 2014 semester – the class is a collaboration between the Department of Journalism and the Department of Computer Science where students from both departments form teams of five and create mobile apps.

Right before the final demo day, one of the teams, Sono, was showing off their app. It’s a sound recording app for journalists and students, and the key feature is the audio recording. They had a nice custom tab bar, but they wanted it to go away when they were recording, and then come back. I talked to them about doing a simple fade-in/fade-out effect, but I got pretty excited about doing something a little more interesting – what if you could have the toolbar buttons fly away, and then come back?

I went to the right-off-campus Starbucks after class, sat down with an iced coffee for two hours, and coded up JLAwesomeToolbar  – then published it on GitHub with an open source license. They were able to adapt it into their app and show it off during their final demo two  days later, so I was extremely impressed with the coding capability. Here’s a video preview of the effect from YouTube:

 

Categories
iPhone Development Training

Meme App for Learn It Meetup

I’m teaching a class on how to make an iPhone app with the Learn It Meetup – as part of the class, we are going to build a Meme app for iOS 7 using Storyboard and Objective-C.

I’m publishing the app on GitHub – https://github.com/jefflinwood/TrainingMemeApp – the v1.0 tag is the completed version for the meet up.

Some of the concepts in the app are:

  • View Controllers
  • Navigation Controllers
  • Tab Bar Controller
  • UILabel
  • Creating a View Controller class
  • Using the XCode Assistant
  • Outlets and Actions
  • UIImage and UIImageView
  • Creating a UIImage from a UIView
  • Subviews
  • UITextView
  • Sharing on Facebook
  • Sharing on Twitter
  • Working with the Keyboard
  • Using the Camera
Categories
Hackathon iPhone Development

Slash Hackathon for SXSW

On Wednesday, I got a chance to pitch my six-hour hackathon project to Slash (lead guitarist for Guns and Roses and Velvet Revolver), tech blogger (and Startup Liason Officer for RackSpace) Robert Scoble, and the inventor of BitTorrent, Bram Cohen. The idea behind the hackathon was to create an app or web site for artists to connect with their fans, and if Slash thought your idea was the winning one, he’d use it for his upcoming album in 2014.

Slash

I came down to the Slashathon with an idea all thought out and ready to go, basically an app for users to try upcoming music from albums and rate it as hot-or-not. Nothing too crazy, but I don’t particularly know what a band would want to use to engage their fans, so I wasn’t particularly tied to the idea.

This hackathon had more sponsors and API partners than I had ever seen at one event – some of them had just created API’s for this event and released them to the public. Muzik Headphones came with their developer-friendly wireless headphones, which I didn’t get a chance to include in my hack, but would like to put into a different project soon. Geeklist organized the event with The Collective, and it was held at the Capital Factory in downtown Austin.

After watching Qualcomm’s team show off their Gimbal beacons, I decided I wanted to use them for my project instead of my original idea. I’ve been involved in a few projects around location awareness and context, but haven’t had a real chance to sit down and program with any of the beacons yet. A hackathon is perfect for this sort of thing, because if I needed help, Qualcomm had a developer right there to point me in the right direction.

My first idea was to create a whole-house audio system that just used your phone, the Gimbal beacons, and the Muzik headphones with Spotify playlists. Instead of putting in an expensive whole-house custom audio installation, just put a few inexpensive beacons in the different rooms of your house, and have an app that changes up the playlist for you. Ideally, you’d smoothly transition in and out from the playlists, but in a six-hour hackathon, that’s the sort of detail that can get left for the future.

This idea worked pretty well – I had some problems with the Spotify iOS SDK, because I had a Spotify free account (a no-go for streaming, you need Premium), but once I got past all of that, I brought in the Gimbal SDK, and quickly had an app that could detect the different beacons. It was a quick jump from just printing out “New beacon detected” to switching the Spotify stream, so then I went ahead and made the app’s background switch to different iOS 7-style backgrounds, based on your location. This is a nice effect, but I don’t think anyone noticed during my demo.

After talking my idea with the Qualcomm Gimbal team, they asked how it would help artists, and then they suggested the idea of letting the musicians set up custom playlists tied to these beacons – I called them “Proximity Picks”, because they look kind of like Guitar Picks. Artists could include one with their box sets, CDs, or other physical sales, and anyone with my app could listen to the playlist, for instance if you brought the pick to the office.

My App

This was a lot better idea than just the whole-house audio, though you could certainly do that as well with this technology. Because artists could now sell these picks, I added PayPal integration to the app, and basically called it done. We only had from 12pm-7pm to work on the project, so it was a short hackathon.

Jeff Pitching

It was a little bit nerve-wracking to pitch to the hackathon judges, but I felt like I had a decent story behind the project, and Robert Scoble seemed to really like the idea behind a context-aware music mobile app. I ended up winning third place overall behind SlashTV and Retune, and then first place for the Gimbal and PayPal integrations. I also used Spotify as the music provider for the app.

Overall, I liked this hackathon – it had a lot of different API sponsors, which is great, and it’s in an area – music – where I’ve never done a project before. Now that I’ve used the Gimbal beacons, I can recommend using them for location awareness on other projects, which is always nice.

[Thanks to my wife, Cheri for the photography!]

Categories
iPhone Development

iOS: UITableView not allowing you to reorder items?

I just ran into an interesting problem with UITableView, editing mode, and ECSlidingViewController.

I had an extremely basic UITableView that let the user reorder or delete rows. Everything seemed to be set up fine with the UITableViewDelegate and UITableViewDataSource, but the rows wouldn’t drag!

Turns out that because I was using ECSlidingViewController to create a sliding menu in my app (as is all the rage in 2013/2014), there was a pan gesture recognizer on my view controller that held the table. That pan gesture recognizer normally lets you slide the menu in from the right, but apparently, the UITableView also uses a similar gesture for reordering. The ECSlidingViewController was canceling the touches before the UITableView could get them, so all I had to do to fix the problem was to add one line of code in my view controller’s viewDidLoad: method:

    self.slidingViewController.panGesture.cancelsTouchesInView = NO;

This fixed the issue, and the sliding menu still works on the view controller.

This Stack Overflow page (http://stackoverflow.com/questions/9953706/unable-to-move-rows-in-a-uitableview-even-when-grabber-are-displaying) was the most useful to figure out what was happening with my app.