Chan Wu – Audio and Video Freelance iOS App Project

In the last few months, I have been busy with a few iOS freelance projects. Chan Wu – The Audio and Video iOS App Project is just one of them.

Here are the requirements from my client:-
– Have Sign Up and Login.
– Able to Reset and Change Password
– Able to download and play Audio files.
– Able to download and play Video files.
– Support In App Purchase for purchasing the Audio and the Video.

The requirements seem to be quite simple at First. But, I did face some challenges after starting to develop this mobile app. But, I am glad that I am able to solve all the challenges so far.

The Design of the App

A friend of mine has designed the app using Sketch for Mac. I have been using Sketch for more than 1 year and I really love this design tool. Even someone like me, who is not designer, also know how to use the tool. The tool is simple and really easy to use. Here is the screen shot for the simple design:-
ChanWuSketch

Technologies used in this Audio and Video iOS App

For Sign Up and Login API, I am using Parse.com. I have been using Parse for a few mobile applications that I developed. It is very simple to use and it saves a lot of my time – the time that is needed for hosting the server, programming and deploying the server end coding.

Most simple mobile apps do not really need a server. Using the mobile backend as a service provider like Parse.com is already good enough for most simple apps.

The client also does not have to pay extra for hosting a server and also the fee for the extra backend programming work. How cool can that be?

Other than the Sign Up and the Login, I also use Parse API to Reset Password, Change Password and update the In App Purchase content. Parse is able to send an email on your app behalf to the user who forgets his/her password.

For downloading the Audio and Video, I am using the latest AFNetworking 2.5 Framework.

For playing the Audio, I am using AVAudioPlayer. For playing the sample videos on Youtube, I am using XCDYouTubeKit. For playing the videos locally, I am using MPMoviePlayerController.

I am using AutoLayout for this app. In fact, I have been using Autolayout since the release of the XCode 6 beta and I will be using Auto Layout for all the iOS apps that I will develop in the future.

You may check out the auto layout articles that I wrote here:-
1. Basic Auto Layout Tutorial in XCode 6 for iOS 7 and 8
2. Advance Auto Layout Tutorial in XCode 6 for iOS 7 and 8

ChanWu1
ChanWu2
ChanWu3



The screen shots above are taken from both the 3.5 inches and 4 inches iOS devices. The screens are adjusted nicely based on the Auto Layout constraints.

Challenges for this Audio and Video iOS App

One of the First challenges that I encountered was related to downloading the audio/video in the background. If the background task is not keeping active in the background, the downloading process might be suspended by the iOS and the downloaded file will be corrupted.

Luckily, I have done a lot of programming works related to making the background location services active in iOS 7 and 8. With some tweaks of the solution, I actually can make the background downloading of the Audio and Video work perfectly!

Challenge #2: Sometimes when the downloading process could be terminated half way because the user kills the app. So, the file will be corrupted and the user has to download again. To solve this problem, the exact size of each of the audio and video files have to be stored in Parse. Before playing the audio/video, the size of the file has to be checked. If the size does not match, then the file must be corrupted and the user will have to re-download the file again.

Challenge #3: Only one audio is able to play at the same time. I will have to support the function to stop and play the audio file and also change from one audio file to another. There are some small User Interface (touches) like Play Icon and Stop Icon are quite important. They have to be there in order to have the best user experience.

ChanWu4
ChanWu5
ChanWu6



The screen shots above are taken from both the 3.5 inches and 4 inches iOS devices. The screens are adjusted nicely based on the Auto Layout constraints.

Final Words on this Chan Wu – Audio and Video Freelance iOS App Project

I feel happy that I am able to complete this project in less than 3 weeks (part time basis). I learned some new things. This app will be available on the app store soon in both the iOS and Android App store. I will update with the app store links once they are available on the app store.

Swift, Home Automation and Indoor Positioning System

There is not much update on this website on June and July because I have been busy with my company project (Watch Over Me 3.0 Enhancement) and also my personal project. The personal project is a dating social network on mobile. This personal project is developed with the intention to test my skills and to learn new things. I do not have any plan to monetize it at the moment. To develop this app, I am using Facebook and Parse API heavily. The “engine” behind this app is mostly complete. I still have to add some features and polish the interface before ready to be uploaded to the appstore. There will be more updates on this dating social network within the next 2 months.

The Apple Worldwide Developers Conference 2014 (WWDC 2014)

There are some exciting announcements by Apple during the WWDC 2014. For example, the new programming language – Swift and the new frameworks like Home Automation and also the new APIs on CoreBluetooth and CoreLocation. All of these will be ready to ship by Apple probably on September 2014 together with the stable version of XCode 6 and iOS 8.

Swift – Programming Language

Swift is a new programming language that is developed by Apple for iOS and OSX. When the Swift was announced, I did a simple Google search and I was surprised to find out that Swift has been in the development for almost 5 years. It means that Steve Jobs could have been involved in the early stage of the development of Swift. He could have been the visionary behind the development and he knows that Swift could replace Objective-C in the future and make the apps development much easier, faster and powerful.

Since the release of Swift on the XCode 6 Beta, there has been many discussions on the comparison between Swift and Objective-C. At the First glance, I found out that the variable declaration is somewhat similar to JavaScript. After watching the WWDC videos, I understand that Swift is designed to be more safe, more modern and more power.

Safe: The design of the syntax + the auto error detection by the XCode has made the chances of a programmer to create an erroneous code will be reduced to the minimal.
Modern: The programming syntax is modern. It was described as the “Objective-C without the C”. Develop a similar app using both Objective-C and Swift, the development using Swift could be faster because the developer can develop using lesses lines of codes. Some unnecessary syntax such as @ and { } has been removed when comparing with the codes in Objective-C.
Power: Swift has some powerful features such as Nested type and Extensions that will help developer to create great apps.

Here is a list of videos titles related to Swift on WWDC 2014:-
402 Introduction to Swift
403 Intermediate Swift
404 Advanced Swift
406 Integrating Swift with Objective-C
407 Swift interoperability in depth
408 Swift playgrounds
409 Introduction to lldb and the Swift repl
410 Advanced Swift Debugging in lldb

You should be able to watch/download it from: https://developer.apple.com/videos/wwdc/2014/

I have watched all these videos and started to learn Swift since a month ago. I am going to get more serious in it on August and hope that I can master it together with some new features on XCode 6. I am going to convert all the codes on the dating app that I developed to Swift as well.

Apple mentioned that they have big plans for Swift. Well, we shall wait and see.

Home Automation and Indoor Positioning System

Apple has released a new framework calls HomeKit for the iOS developers. The HomeKit can be used to create mobile apps to communicate and control different devices in a house such as television, lightings, air conditioner, garage door and more.

The core technology in the HomeKit is Bluetooth LE. So, the communication using the iPhone/iPad to control the home devices will not consume a lot of battery. Since iBeacon (the indoor proximity system by Apple) is using Bluetooth as well, so, HomeKit and Indoor positioning system are closely related and may compliment each other.

Bluetooth technology is going to play an important role for the years to come as I believe the development of the technology is moving towards indoor. There are many exciting developments in the Smart Home and also Indoor positioning technology. Just to name a few:
1. Google has acquired Nest (maker of “smart” thermostats and smoke alarms for homes) for USD $ 3.2 Billions.
2. The new CoreLocation framework by Apple for iOS 8 will support multistory building. It means that you will know which floor that you are currently standing inside a building from your iPhone.

I am not sure about you. But, I am very excited on the latest development on the mobile app ecosystem. I really can’t wait to see how these new technologies shape the world in the next few years.

Go-Eco – Mobile Application That Rewards Anyone Who Helps the Environment

I was at the Global Startup Youth organized by Startup Malaysia. This event was attended by over 500 youth from over 60 countries who are either developers, hustlers, domains experts or youth leaders. The youth was helped by over 100 mentors to solve some of the world biggest problems using mobile applications in 2 days time. There are 4 categories: Environment, Education, Health and Women Empowerment.

I was in Team 4 under the Environment category and I am the main coder. Our team consists of mostly Malaysian with 1 person from Morocco, another from Russia and the last one from West Africa (Sierra Leone).

We came out with a mobile app idea with the following features:-
1. Educate users related to environmentally issue
2. Encourage people to take actions to help the environment
3. People will gain points from the actions they take or the education that they learn.

The points that they gain from the mobile app can be used to exchange for vouchers by our sponsors such as (Starbuck, YTL, Old Town Kopitiam, Machines and etc). Our team leader went to talk to a few reputable companies and some of them are interested to join this project as part of their corporate social responsibility. But, the deal does not materialised yet as we only have 2 days. Shall the project continues in the future, I believe we really will have the real sponsor vouchers.

Please allow me to introduce you: Go-Eco. The app is using Parse.com as the backend server. Go-Eco has the following screens:-
1. Login
2. Sign Up
3. Profile
4. Learning
5. Challenges
6. Redemption

Most of the functions of the app are already completed. We have the real login and sign up (connect to Parse). The points addition and reduction (for completing learning, challenges and redemption)

The followings are the real screen shots from the app itself.
Go-Eco Login Go-Eco Sign Up

Go-Eco ProfileGo-Eco Learning

Go-Eco LearningGo-Eco Learning

Go-Eco ChallengesGo-Eco Challenges

Go-Eco ChallengesGo-Eco Redemption

Go-Eco Redemption

It has been a nice experience working with Team 4. They are really focused and committed. We are also lucky to have a great graphic designer in our team. Unfortunately, we didn’t win under the environment category, the judges certainly have different opinions on what they think is the best app under the environment category. Winning is not the main purpose here. It is the team work and our effort to produce something that will help this world.

Lastly, I am very happy the mobile app that we produced in just 2 days time. It is functional and very polished. We shall see if we are able to bring Go-Eco forward.