• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Building your first Native iOs App with an API Backend
 

Building your first Native iOs App with an API Backend

on

  • 4,271 views

 

Statistics

Views

Total Views
4,271
Views on SlideShare
3,790
Embed Views
481

Actions

Likes
5
Downloads
29
Comments
1

14 Embeds 481

https://blog.apigee.com 170
http://apigee.com 161
http://cloud.feedly.com 64
http://feeds.apigee.com 36
http://www.newsblur.com 22
http://newsblur.com 8
http://mktg-dev.apigee.com 7
http://edit.apigee.net 5
http://digg.com 3
http://mktg-new.local 1
http://www.feedspot.com 1
http://www.hanrss.com 1
http://www.goread.io 1
http://www.google.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Hi and welcome! This is build your first Native iOS app with a BaaS!
  • I ’ m Matt Dobson. I ’ m an engineer at Apigee. I love building apps, and creating tools that developers enjoy using.
  • Everyone have XCode installed? Simulators installed? Do you have your developer account up to date if you want to run it on a device?
  • I work at Apigee. I help create tools for developers to build apps, and manage data through APIs
  • We power the APIs of a bunch of large enterprises. These companies use internal and external developers to create awesome products.
  • We ’ ve been doing trainings similar to this for HTML5 and PhoneGap in the past, but now we are branching into the native development. This is our very first training ever for building on iOS.
  • We do this for free, because we want to show the developer community what the cutting edge of APIs and data management can do for their development process. We can do this for free because we make our money working with large enterprises to help manage their APIs and APPs.
  • Apigee is always free for developers. 25GB limit on storage for our hosted service. Our BaaS product is also open source so you can download, and quickly get running on your own cluster.
  • Here is today ’ s agenda. We ’ ll break in with an Objective-C and iOS primer. Where we ’ ll talk about Objective-C, and put together the UI of our app. Then we ’ ll add data storage capabilities using Apigee App Services. Lastly, we ’ ll look at what it would take to submit our app to the app store.
  • Have you developed on iOS before? Have you ever ran into stopping blocks? Is there something in particular that you had a hard time doing? Is there something you ’ d really want to learn in this class?
  • Time to break out some Objective-C!
  • What is Objective-C? It ’ s the primary language used to write iOS apps. There are other options and frameworks for writing iOS apps, but Objective-C is still the standard many app developers use on the Apple platform.
  • It ’ s object oriented. Everything in Objective-C is represented as an object. Objects interact with each other by passing messages back and forth. It ’ s way of thinking is very similar to Java, C#, C, C++, Python, Ruby, et al.
  • Code for apps are primarily contained in .h and .m files. .h files are header files that define what methods the class has, and the .m files contain the implementation of these methods.
  • Today you ’ ll run into objects that will have an NS prefix. This stands for NextStep the original creators of the language. The ongoing standard in Objective-C is to prefix your objects with either your initials or some other multi letter prefix so you have an idea of the object ’ s origin.
  • Reading Objective-C for the first time can be intimidating. You ’ ll see square brackets every where through the code. This is how methods are called.
  • Now lets download our project off of github. We ’ ve done a little bit of work for you, and will walk you through getting your app setup from start to finish. It ’ s a modified standard master-detail application. The app should compile, and run in the simulator but will crash if you begin to click around.
  • Download the sample at this jump link.
  • Today we ’ re going to build a simple list app that will keep track of all the books that we like.
  • First let ’ s get into Interface Builder and setup our app accordingly. Interface builder is the drag and drop tool that allows app developers to quickly setup user interface objects.
  • You ’ ll see a few of these terms thrown around in the code of an iOS app. Apps follow the MVC pattern where there are a separation of concerns between code that holds data, code that presents data, and code that communicates between presentation and data.
  • StoryBoards are the current standard for building interfaces in our app. It allows you to simple drag and drop UI elements into your app for use. It contains the full user interface definition of your application all in one place.
  • Before storyboards app developers had to worry about the presentation of their views between view controllers. We had to code all of our own transitions in our app. StoryBoards give us segues that easily allow us to easily define navigation through the application.
  • Our app is missing a segue. We want users to click the plus button and open a form modally in our app that will allow us to create a book.
  • Lastly we need to tell the story board what controllers handle what views. This is important when defining what data is presented by the UI, and what data is defined using the storyboard. While we ’ ve defined what controllers handle which views lets just take a look so you can see what is going on.
  • Apps are more fun with data! Lets look at integrating a BaaS into our app.
  • Apps today can ’ t do all the work on the device. Modern smart phones have constraints on memory, cpu usage, and network usage. A BaaS provides a simple way to use an API to integrate remote data storage efficiently into your app.
  • It ’ s essentially remote data storage you can access directly in your code.
  • Think of it as an iCloud or Dropbox that syncs your apps data across devices instead of documents or songs.
  • By using a lightweight library you can use API calls to Create, Read, Update, and Delete data with ease. The backend manages access and security through it ’ s API, and the server infrastructure make ’ s sure your data is backed up and safe.
  • In the code you ’ ll see references to UserGrid. UserGrid is an open source project acquired by Apigee a little over a year ago.
  • Before we can add BaaS to our app we need to sign up. Go to the link and sign up. After you ’ ve confirmed your account let ’ s go and play with the dashboard.
  • Add some data. Explain JSON and do a walkthrough of adding a book. Also explain the sandbox app is for learning and testing, but not production use.
  • We have tons of SDKs available to build apps on. They are all open source and we welcome contributions!
  • Okay now lets get some of the data we added in objective-c. Open app and add data retrieval code.
  • This is a two part answer 1. First we need to get all books on viewDidLoad execution. Then we need to display the @ ” title ” property of our book accordingly.
  • Now we can read data. Let ’ s have our device add data instead of using the dashboard. Walk users through writing create entity code.
  • We don ’ t want to keep books in our lists all the time. Let ’ s make sure we can delete books. Take users through removal code.
  • Now that we have a basic app completed. Let ’ s take a look at what it would take to submit it to the app store. I ’ d recommend you don ’ t submit this app. It ’ s a bit too basic for use in the app store just yet. You ’ ll also need an Apple developer account to interact with the app store.
  • Submitting an app is the most intimidating part. You have to walk through the creation wizards, and wait for Apple ’ s approval process to be completed.
  • First you need to create an app id. This holds app specific information like what apple services you want to take advantage of, and you ’ re globally unique bundle id.
  • Next you ’ ll want to generate a code signing certificate. This tells apple you are a registered developer with a specific app ready for submission to the app store. There is a similar process required for testing the app on the device.
  • Next you ’ ll need to create a production provisioning profile. This profile is used in conjunction with the certificate you created to install apps onto the device.
  • Next we ’ ll need to create the app in iTunes connect. This is where we upload icons, screenshots, app descriptions, and name our app. We ’ ll also go here to release it to the app store, and view how many downloads we ’ ve gotten.
  • Next is the waiting game. Apple takes between 2 weeks to a month to fully review an app and approve it for release into the app store. After every step of the review process you ’ ll receive an email that says it ’ s either passed or failed.
  • Once it ’ s ready and approved. Apple will email you with your approval, and you ’ ll have to enter iTunes connect to release your app to the store. It typically can take up to 48 hours to fully appear in the app store.
  • Congrats! You ’ ve just built a data driven app, and learned the app store submission process!
  • That ’ s a great first step, but what could we do next?
  • We can look at apple provided services, or apigee provided services to quickly build great data driven apps that users love. You can reach out to them with push notifications, give them contextually aware information using geolocation, have them setup profiles with user management, keep their data secure, work with files and pictures, or even build your own social graph! Apigee enables you to do all of this!
  • You could build your own
  • iCloud Store App or Social Network
  • You can easily scale to millions of users
  • Want more training? Reach out to [email_address] to get something online or in person organized for your user group, company, or other organization!
  • Join app craft to ask questions, share your app ideas, or help others in the process of designing and building their app!
  • Thanks! This is our first time doing the class so if you have feedback we ’ d love to hear it!
  • Thanks again!

Building your first Native iOs App with an API Backend Building your first Native iOs App with an API Backend Presentation Transcript

  • Build your first Native iOS app with an API Backend! twitter:@mdobs @timburks
  • Matt Dobson @mdobs matt.d@apigee.com Tim Burks @timburks tim@radtastical.com
  • Do you have XCode installed?
  • I work @ Apigee.
  • We help power eBay Best Buy, Walgreens, Gilt Groupe, NewEgg, Cars.com, Dell, Getty Images, GraceNote, Shazam, HomeAway, Pearson, cheezburger
  • We’ve organized trainings for HTML5, but this is our first for iOS!
  • Why do we do this? Why free?
  • Apigee is always free for developers. - Hosted (25GB limit) - Open-source (full) - Private clusters
  • 1.Objective - C 2.API Backend 3.App Store
  • Have you developed for iOS before? What do you want to learn today?
  • Objective-C
  • What is Objective-C?
  • Object Oriented.
  • .h and .m files
  • NS prefixes
  • Brackets, Brackets, Brackets
  • Download the project
  • j.mp/ios-books
  • Our books app!
  • Setting up our UI
  • Model View Controller
  • Storyboards
  • Master-Detail App
  • Segues
  • Setup a segue in our app
  • IBOutlets
  • Setup outlets for our detail view
  • Set up Controllers
  • Build with a Backend.
  • Why use a Backend?
  • It’s remote data storage you can access in your code.
  • It’s like iCloud or Dropbox, because it lets you sync data across devices.
  • Server Infrastructure App Code SDK API
  • Usergrid? Apigee?
  • Let’s take a look at Apigee j.mp/apigee-sign-up
  • Add some data
  • SDKs available for… JS, node.js, iOS, Android, Ruby, Rails, C#, Java, WP8, etc.
  • Getting data
  • Answer: j.mp/all-books and j.mp/book-title
  • Storing Data
  • Answer: j.mp/creating-book
  • Deleting Data
  • Answer: j.mp/delete-book
  • App Store
  • Submitting
  • Create App Id
  • Create Certificate
  • Create Provisioning profile
  • iTunes Connect
  • Approval Process
  • App Store Launch
  • Congrats!
  • What else can be done?
  • Push Notifications Geolocation User Management File Storage Picture Sharing Social Networking Security
  • Build your own...
  • iCloud Retail Store Social Networks
  • Scale to Millions
  • Advanced Class? Training for your company? Questions? matt.d@apigee.com
  • Ask for help! Announce projects! j.mp/app-craft Sign up now :)
  • Thanks! We’d love feedback on how to make it better. Let us know!
  • matt.d@apigee.com