Apple

Basic Integration of Firebase Remote Config into an iOS App

I recently attended iOSDEVUK in Aberystwyth. There was a fascinating talk by Todd Kerpleman (@toddkerpleman) about using Firebase to perform A/B testing.

The technology is pretty cool so I created a demo project. If you’re looking to integrate Firebase into your app then this tutorial looks specifically at how to integrate Firebase Remote Config into your app.

  1. Start by creating a brand new app in xCode. Make sure its set up within a workspace and that you have CocoaPods installed and setup.
  2. Add pod ‘Firebase/RemoteConfig’ to your pods file and run pod install
  3. Make a note of your apps bundle identifier.
  4. Go to http://firebase.google.com and sign up for an account.
  5. Select Create New Project, give your project a name and select your region.screen-shot-2016-09-07-at-14-10-57
  6. Once in the project select the option to Add Firebase to your iOS App.
    screen-shot-2016-09-07-at-14-12-42
  7. Enter your apps bundle identifier and if the app is going to production also enter the app store identifier for your app.
  8. The file GoogleService-Info.plist will be downloaded to your computer.
  9. Drag this file into your xCode projectYou’re now ready to start interacting with Firebase from within iOS.For the purposes of this tutorial I am going to create an app that downloads Constants from Firebase and changes the appearance of a button within my app based upon the retrieved values.
  1. Modify your apps storyboard and add a simple UIButton. Connect the UIButton to your class file as an IBOutlet.We now need to set the app up to download our constants values from Firebase. I’ve decided that I would like the app to download values from Firebase on each launch.
  1. Add a plist to your app and name it plist
  1. Add a new CocoaTouch class to xCode with a subclass of NSObject. Name the file Constants.swift
  1. At the top of the class add the line of code import Firebase
  1. Create a new mutable variable remoteConfig with a type of FIRRemoteConfig

 var remoteConfig:FirRemoteConfig!

  1. Add a new function to the class and call it createDefaults. This function is going to create an instance of the default firebase values and make them accessible by your app.
    screen-shot-2016-09-07-at-14-31-38
  2. Add a new function called setupApp. This function will retrieve the RemoteConfig from Firebase. This function will call createDefaults() to instantiate the default Firebase values.screen-shot-2016-09-07-at-14-33-15The statement self.remoteConfig.activateFetched() instructs your app to replace the local defaults with those fetched from the server.
  1. In the AppDelegate.swift file import Firebase
  1. In the AppDelegate.swift file call FIRApp.configure() from within didFinishLaunchingWithOptions
  1. In the AppDelegate.swift file call Constants().setupAPP() from within didFinishLaunchingWithOptions
  1. If you build and run your app you should now see a log in the console that reads “Config Fetched”
  1. You now need to retrieve key values from the default data returned from Firebase. In Constants.swift create a new function called getButtonText() which returns a string value.screen-shot-2016-09-07-at-14-40-15
  1. In Firebase create a new RemoteConfig property called “ButtonText”. In the example below I’ve also created properties for ButtonTextColor and ButtonColor.screen-shot-2016-09-07-at-14-43-14
  1. Calling Constants().getButtonText from the view controller will then return the value to be used as the label for the Button.screen-shot-2016-09-07-at-14-48-10
  1. You can now create properties in Firebase for any setting within your app easily retrieve it and use it anywhere within your app.

The sample project for this app is available on Github https://github.com/stephenwestgarth/FirebaseRemoteConfigSampleApp/

You will need to replace the GoogleService-Info.plist with your own created in Firebase if you want to see anything other than the values that I have created.

 

Categories: Apple, Google, Tutorial | Leave a comment

iOSDEVUK Review 2016

IOSDEVUK is over for another year; our annual pilgrimage to Aberystwyth always end in a sad train journey home – all the better for the knowledge we’ve gained throughout the week.

As is tradition, here is my round up of the week and my very best bits!

Running A/B tests on your app using Firebase Remote Config and Analytics

Todd Kerpelman

Prior to iOSDEVUK I hadn’t come across Firebase. This tool is phenomenal and can do brilliant things that allow you to control detailed configuration of your app without the need to submit your app for an apple review. Watch out for a blog post tutorial soon showing how you can set it up in a basic project.
Todd was a brilliant speaker, very engaging. One of my favorite talks by far!

Diagnosing Allergies

Emily Toop

This was quite simply interesting. Emily sneezes a lot and is using iOS to track her sneezes in order to help work out what’s causing it. It’s a real world use case for how mobile technology can be used to collect high volumes of data, analyze it and then make use of it in the real world. If you get chance to listen to Emily talk about her sneezing I would highly recommend it.

I’m an Idiot

Richard Turton

Sometimes as developers it does us good to remember that we are all human, we all make mistakes, miss the blindingly obvious and ultimately we are all idiots …. Sometimes.
This talk reminded me that if we need help, we should ask for it and if we share knowledge the community is stronger for it. My take away message from the talk though was that under no circumstances should you ever try to be CLEVER! It always backfires.

img_5097-2

Steve Scott

Steve Scott

Scotty is a brilliant speaker! He has a habit of stating the blindingly obvious in a hilarious way. Scotty reviewed where we have come from as developers and where we are going to; the underlying tone of the talk was the fact that while iOS is a very rich place today for developers this is unlikely to remain the case forever. This changing landscape is part of evolution and even visionary entrepreneurs can’t predict the future! He also emphasised that sometimes people do get it right – can you believe that less than 40 years ago it was considered ambitious to have a computer on every desk, in every work place and in every home!
img_5090

Review of the Year

Dave Verwer

No-one knows the world of iOS like Dave Verwer, writing iOSDEVWEEKLY really does give him an insight into our world like no-other. The stats Dave is able to create showing who is reading iOSDEVWEEKLY are a portal onto the iOS Development Community that just blows you away. Brilliant speaker and in my view Dave is one of the cornerstones that makes doing what we do so interesting.

Dyson Hackathon

img_5100 img_5099

This totally blew me away! I’ve been to hackathons before and they are always brilliant fun but then Dyson entered the room with 16 robotic vacuum cleaners! Words cannot describe how good this event was – I still say we were cheated as our balloon burst itself in the final battle, the stewards’ enquiry is still open in my eyes; but I’m not bitter.
Serious kudos though for a job thoroughly well done.

Conferences are an essential part of our learning as developers and have a huge impact on companies. I want to say a massive thank you to Chris, Neil, John and the team here in Aber; once again you have raised the bar and delivered a brilliant event!

So that’s it; iOSDEVUK is over for another year. If you can’t wait a whole year for another conference check out what we are doing in Chester 17th – 20th April 2017. CodeMobile is a brand new developer conference focusing on both Android and iOS Development. We need more events of this type in the community because when you bring developers together it really does create magic!

Categories: Apple, Conferences, Invention, Robots, Social, Technology | Leave a comment

What’s next for the iPhone?

I can’t believe its almost time for Apple’s September event! It seems like only 5 minutes since apple released the iPhone 6s and 6s Plus and yet here we are anticipating the release of the iPhone 7.

I always find following predictions about what Apple are going to do very interesting. The issue is that over the years it has become increasingly hard for Apple to wow me because much of my tech wish list is now complete. In the early 2000’s when I was still in school I used to dream about a phone that could connect to the internet, that would allow me to record video, share photos and listen to my music. I remember being delighted when I got a pocket PC but in reality being really let down by what the device actually did.

All of those troubles are long behind us. So now I ask what else do we want from Apple and more specifically from the iPhone? What is my new wish list? Here are some ideas:

Wireless Charging

This has been tried by a number of companies but its still not quite here. The idea of simply being able to put my phone onto a surface (ideally any surface) and have it charge is a brilliant concept although I accept that it comes with a lot of challenges. This is definitely something I would like to see brought to market with apples usual flair of simplicity and elegance.

Battery Life

Over the years battery life has improved dramatically however the power demands of devices have also increased significantly. I really want a battery that lasts. When I say lasts I want a battery that can take 12 hours hard use and still not give up – I hate having to carry around my charger.

In the absence of a brilliant battery that never dies what about exploring ideas to extend the battery life. I would love to see a solar powered phone that charges from the sunlight.

Dual Sim

This can be done already but its expensive. I really want the ability for my phone to have 2 telephone numbers, 1 for work and 1 for home. It would be great if I could select which SIM I want to use for certain numbers and then also allow incoming calls on the SIMS to be denied based upon a schedule.

Personal Assistant

Siri is brilliant but I still think there is a lot could be done in terms of improving Siri’s artificial intelligence. Is it plausible that one day we could have a conversation with Siri and that the system would answer in an almost human like fashion?

Ubiquitous Internet Connections

This isn’t in Apples control but its important to draw attention to it. I’m writing this while sat on a train on my way to iOSDEVUK. I havn’t had a mobile signal since Shrewsbury. Large towns and cities have now got 4g and that’s great but what I really want to see is 4g everywhere. Some would argue this isn’t worth the investment especially in rural Britain but when you realize what the internet can do for small communities I think its not only worth the investment but is actually an essential investment.

Life Interaction

The iPhone is now an extension of me it therefore makes sense that my iPhone should interact with the world around me. With iBeacons and location services my iPhone is now very aware of where it is but I would like my iPhone to be more intelligent. For example when in any restaurant wouldn’t it be awesome to be able to see the menu on your phone; to be able to call the waitress and even ask for your bill and pay without having to attract someone’s attention? When queuing at Alton Towers wouldn’t it be awesome if you could see an estimated length of time you were going to be waiting; or even avoid the queue to buy tickets altogether by being prompted to do so as soon as you arrive.

Linked to this is the idea of my iPhone being able to do everyday tasks. Homekit has introduced great new features in terms of being able to control my house; heating, lighting etc. I would love to see this expanded and a much greater rate of adoption – why do I need to carry keys for example; surely I should be able to unlock my house and car without a key? Also as soon as I leave home my phone should prompt me to turn on the intruder alarm.

The other thing that would really help us as developers to achieve this is if Apple were to open up the NFC chip so that we can develop applications that use it.

Apple Watch

Quite simply this needs to fully function without a phone. This is beyond running native apps; I want to see full WIFI, 4g connectivity and have the ability to use all features when my iPhone isn’t close by.

 

I’m sure I want and need more from my iPhone and there are a lot of things I could add to this wish list but I’m very aware that Apple Engineers are busy people. If its possible to just achieve the above this year, the rest of my wish list can wait until 2017 J

 

 

Categories: Apple, Technology | Leave a comment

Developer Conferences

If you’re anything like me then you will love a good developer conference! The opportunity to share and collaborate with like minded people is sometimes just what the doctor ordered to help make sure those creative juices are flowing.

Unfortunately, in the UK we seem to have a lack of events; especially outside of London. There are a couple of independent events like iOSDEVUK and a few others organised by the tech giants such as Microsoft and Google. The issue is that the vast majority of events tend to happen in the south, in and around London and often us up here in the North feel a bit left out.

I’ve recently been chatting about this phenomena to some of my developer friends and colleagues; and the conclusion we have come to is that if there are no conferences happening locally to help promote knowledge share and collaboration between developers, then the only solution is to set one up ourselves!

We got chatting with some friends; those friends made some introductions and the result is CodeMobile – a conference specifically created for Mobile Developers. The event will take place just after easter next year (18th, 19th and 20th April), is a 3 night residential and has 2 tracks, one for Android Developers and another for iOS Developers.

In creating the conference we’ve deliberately tried to make it as accessible as possible for developers from all backgrounds. The ticket price is as cheap as it possibly can be (Super Early Bird, £275 & £350 Full Price) which will hopefully allow Indie Developers who are not backed by big corporations to come along; and we’ve been fortunate enough to attract a plethora of speakers from both the UK and internationally.

Putting the conference together over the past few weeks has been an absolute whirlwind of an experience and I’m delighted we’ve had so much support and encouragement from within the developer community. We are now in the process of finalising the speakers list (there are still some great speakers to add to the list) and also confirm details before tickets go on sale on 1st September 2016.

As this is a new conference any help and support you can give will be very much appreciated. In particular we need help reaching out to developer networks and communities to make sure everyone is aware of the event. If you’re involved in a local meet-up or know any developers who might be interested a tweet mentioning the conference website or that tags those who might be interested would be hugely appreciated.

We’ve also opened up the possibility of winning some free conference tickets! If you want to be in with a chance then you just need to get your tweet on on follow the instructions on the Free Tickets page of the conference website.

I would love to hear any feedback about the event that you might have! Also if you have any speakers you would like to see at the event please drop me a line – I can’t promise but we will certainly reach out to those speakers and see if its possible to get them to attend.

My dream for this conference is that the developer community take ownership of it and that it becomes a true community event; to that end if you have any ideas or suggestions please drop me a tweet.

Once tickets go on sale please show your support by signing up to attend if you’re interested and able. It would be brilliant to see you at the event! You can also follow @codemobileuk on twitter, and find all related information on the conference website www.codemobile.co.uk

Categories: Android, Apple, Apps, Conferences, Social, Technology | Leave a comment

WWDC just around the corner

wwdc14-home-branding

Apples’ annual developer conference WWDC is now only days away the rumour mill is rife with what to expect during this years event.

Last year I was convinced that the iWatch was going to finally be previewed during the keynote speech but I was left disappointed – industry insiders are still doubting that Apple will feature this at the event this year and with a release of Apple TV SDK also being touted as unlikely it really is making me wonder if Apple are going to announce anything worthy of note that will really get me excited!

It is expected that Apple will announce iOS 8 but my view is that this will not be radically different to iOS 7, the significant changes in the current version of iOS caused a lot of upset amongst consumers some of whom did not like the radically different interface, it therefore stands to reason that any update is likely to be more akin to evolution rather than revolution. Perhaps this year we can expect to see a more radical overhaul of OSX, my concern is that won’t be enough to keep consumers excited about Apple’s Innovation.

I am rapidly reaching the conclusion that Apple need to find a game changer and announce the next big thing! The last true innovation announced by the company was iPad and that was released back in 2010, 4 years in technology feels like a life-time and as a true techie i’m desperate to be wowed! I fear that from what i’ve read so far this year is not going to be that year and we may have to wait until 2015 to see a true innovative twist! That said I will still hanging on every word of the keynote speech on 2nd June and can’t wait for the spectacle – Apple really do know how to put on a show!

Categories: Apple, Apps, Technology | Leave a comment

Why do we bother to queue?

This week is Apples word wide developer conference in San Francisco. I’m here for the week, it’s 3am and I’ve just joined the queue for the keynote speech (7 hours to wait).

It’s got me thinking about why people queue in this technology savvy era. The videos from this conference will be available online, it’s rumoured that they will be released during the conference itself to all registered apple developers. Given that information why didn’t I just stay at home and watch the conference online?

For me, I think I’m here for the atmosphere and the buzz. We as humans as social animals and we like to share the experience with others.

This raises some interesting questions as to how fulfilling social media really is ….. Can online communication ever be as effective and fulfilling as actually being together with other like minded individuals?

Categories: Apple, Social | Leave a comment

Traveling with Tech

This weekend I’m visiting Dublin – a city that I’ve never been to before. I thought it would be interesting to take a look at the technology that I’ve used to get me here and how I’ve relied on technology to enhance my visit.

My journey to Dublin actually started when I booked my flights. In this day and age everything can obviously be done online – my booking confirmation was e-mailed to me and the day before flying I simply checked in and printed my boarding pass from the comfort of my sofa. (Everything going good so far).

Once at the airport my boarding pass is scanned, again everything seems to be working although it’s a little disconcerting to think that I’m now entirely reliant upon the Ryan air booking system to recognise that I have a flight that I’ve paid for.

We could obviously spend a lot of time discussing the technology of the plane and computer systems in the airport …..

So now I’m in Dublin does my reliance on technology stop? Well I guess it could ….. But I have been rather lazy using my iPhone to help me navigate, booking tickets for the Guinness Storehouse online to receive my 10% discount and even writing this blog post while grabbing a coffee.

So lets take stock for a moment. Is technology taking the fun out of traveling? Obviously there is technology that is now essential to travel, the booking of the flights and the systems that actually get me here ….. But now I’m here wouldn’t it be more interesting to see the city without my technology leading the way? To navigate using a traditional map, or by speaking to people and asking directions …..

If that we’re the case its’s unlikely I’d have found the costa coffee shop that I’m now sat in …. And I wouldn’t have been able to check reviews of restaurants before choosing one for lunch. But is that actually important? If the restaurant had been dreadful it would have made for an interesting story to tell when I get home.

Maybe i should try traveling the old fashioned way and see how i get on ….. not on this trip (obviously) Maybe that’s an experiment for another time. Or maybe it’s something you’ve done, or do? Does traveling without tech create more adventure?

Categories: Apple, Invention, Social, Technology | Tags: , , , , , | 2 Comments

Technology and Customer Service

I had cause to visit my local Audi Dealership today at Cheshire Oaks earlier today. I’ve been considering a new car for some time and thought that today might just be the day.

During my visit the customer service I received wasn’t what I would consider up to scratch – I was made to feel like I was there for the their benefit and they didn’t seem to care about me as an individual. At the point I was told that I could either wait 45 minutes while the salesman finished the other quotes he had to do (and then do mine) or could have my quote e-mailed to me really annoyed me ….. so I left.

This experience made me start to question how important is customer service when accessing technology. If you want technology badly enough would you put up with poor customer service.

Take Apple as a casing point. I’m always been blown away by the level of service that I receive whenever I have cause to speak to Apple – but would I still want that new iPad, iPhone 5 or accessory if the company didn’t make me feel special?

I return to Audi, the reality is I probably still do want to get an Audi – but i’d be unlikely to purchase it at Audi Cheshire Oaks. My instinct as a customer is to shop at an outlet where I get the best customer service. I guess this is fine for a large company, but what about smaller organisations – if they are they only vendors of a product not shopping with them could be cutting your nose to spite your face.

Would you buy something from an organisation that had annoyed you or didn’t value you as a customer?

Categories: Apple, Customer Service, Technology | Tags: , , , , , , , | 2 Comments

Create a free website or blog at WordPress.com.