element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sci Fi Your Pi
  • Challenges & Projects
  • Design Challenges
  • Sci Fi Your Pi
  • More
  • Cancel
Sci Fi Your Pi
Blog PizzaPi: A crash course in iOS app development
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: dmrobotix
  • Date Created: 25 Aug 2015 5:22 AM Date Created
  • Views 588 views
  • Likes 2 likes
  • Comments 0 comments
  • design_challenge
  • apple
  • pizza_pi
  • ios
  • sci_fi_your_pi
  • tablet
  • ipad
Related
Recommended

PizzaPi: A crash course in iOS app development

dmrobotix
dmrobotix
25 Aug 2015

Well, I'm making progress but this iOS app stuff is a little bit tricky! Just about everything I proposed to do on this project I've had some familiarity with EXCEPT iOS apps. In fact, I've never made a mobile phone app but I've always wanted to. I'm glad I'm finally getting around to learning how to do this, but at the same time, it's really challenging trying to learn a new language in such a short period of time.

 

image

 

I decided to learn how to do this in the new Apple language, Swift. I had read a bit about this language a few months ago, that Apple is really trying to push its developers to this language and that they've spent a lot of effort trying to improve it and make the language more robust. I have to say, it has some neat properties that I have not seen elsewhere. The problem, however, is that Swift is changing all the time. I'm having trouble following tutorials that were written only a year ago because of all the changes going on.

 

Right, so that's a headache but let's take a look at that screenshot. This is the only part of the whole project that is being coded in OS X, the rest has been coded in Arch Linux/Raspbian. What you see is XCode, Apple's programming IDE. I've tried to use it in the past for other languages but I've always hated its clunkiness but when it comes to iOS development, it really does shine.

 

You can see the basic layout of the app. There is a login screen that asks for the driver's name. The driver enters his/her name and then the code takes that name, parses it and sends it to the web server for verification and feedback. I'm using this tutorial: https://twitter.com/dave_on_Cape/status/574734739472584704 as my guide and modifying it as I go. You can see in the bottom windows that it's actually tried to run the code that connects to the server, but I haven't finished writing it so of course it sends a response of "404", meaning the verification script (a PHP file that has yet to be written) was not found.

 

image

Here's what the layout looks like on an iPad. For the pizza delivery management side I am designing the web interface to be accessible via a tablet. I've noticed that lots of restaurants make use of tablets. It seems a lot easier to use that than a clunky laptop. Anyway, you can see a little black squiggly line on the map. That's some dummy GPS data that I used to test overlaying GPS coordinates onto a Google map. It's not that difficult to do, all you need to use is GeoJSON. There is actually a nifty website (geojson.io) that will format your data for you so you don't really have to learn how to do the formatting yourself.

 

Things are moving along. The app building is the most challenging thing right now. I still need to write the code to link the back end to the front end but that really isn't that difficult. I do that sort of thing everyday at the lab! What's left after that is to port everything onto the Raspberry Pi 2 and then get real sensor data flowing. Luckily, I wrote the sensor code a long time ago (remember all the headaches with mosquitto?). All I have to do is have the PHP code find the directory where the sensor data is and store those files in the appropriate tables in the database.

 

Until the next post...

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube