Welcome!
This is a two part series on how you can create an Augmented Reality app using just Dapp and Layar. As part of this series, I have also included the settings for a sample published Layar app for you to try out.
The first required step is that you download the Layar Player SDK - LayarPlayerSDK26May.zip
Alternatively, you can also download the latest Layar Player SDK at http://www.layar.com/tools/player/, just be careful with later versions as instructions might have changed and this tutorial might no longer be 100% correct.
Within the Layar Player SDK is also included the “LayarPlayer SDK 1.1 Documentation.PDF”. Please open this file when working on the second part of the tutorial as this is the documentation I work from and can assist in getting everything correctly setup.
PART ONE
The first part shows us creating a simple Dapp app that we will export to Xcode. This will form the basis of our Layar App.
PART TWO
Part two of this video tutorial involves us copying over our exported Dapp code into a new Xcode project. Feel free to visit Creating an advanced Hello World Xcode 4 iPhone project with Dapp video tutorial for a more detailed rundown of copying over these files to Xcode.
This is my first Audio based Video Tutorial and I feel I might have moved a bit too quickly
. All good, just make sure you press the pause button often so you can keep up. Finally, feel free to view the video in full-screen 720p HD mode if you have any trouble seeing any of the code. Everything should then be perfectly clear
.
Amendment: Throughout the video I included Release AND Debug symbols (as well as both the Debug and Release folders). Perfectly fine to use both during development but prior to release, please remove references to Debug symbols and the copied Debug folder from your project as they are no longer required.
The code that we insert during this second tutorial is:
- (void)loadLayarPlayerWithName:(NSString *)layarName key:(NSString *)consumerKey secret:(NSString *)consumerSecret { NSArray *oauthKeys = [NSArray arrayWithObjects:LPConsumerKeyParameterKey, LPConsumerSecretParameterKey, nil]; NSArray *oauthValues = [NSArray arrayWithObjects:consumerKey, consumerSecret, nil]; NSDictionary *oauthParameters = [NSDictionary dictionaryWithObjects:oauthValues forKeys:oauthKeys]; NSArray *layerKeys = [NSArray arrayWithObject:@"radius"]; NSArray *layerValues = [NSArray arrayWithObject:@"1000"]; NSDictionary *layerFilters = [NSDictionary dictionaryWithObjects:layerValues forKeys:layerKeys]; LPAugmentedRealityViewController *augmentedRealityViewController = [[[ LPAugmentedRealityViewController alloc] init] autorelease]; augmentedRealityViewController.delegate = nil; [self presentModalViewController:augmentedRealityViewController animated:YES]; [augmentedRealityViewController loadLayerWithName:layarName oauthParameters:oauthParameters layerFilters:layerFilters options:LPMapViewDisabled | LPListViewDisabled]; } |
Also, this is the sample Layer Player name, consumer key and secret key to use within the tutorial (if you don’t already have your own).
- Player Name: nestest
- Consumer Key: e4c775db9a1d90377764dd8ba06829
- Secret Key: 3e69effc36
Create an Augmented Reality app with Dapp and Layar Player SDK Dapp Auto-Generated Project Files
As a special treat I’m also attaching my complete Xcode project. Feel free to replace my Dapp generated files with your own, and use it as a starting template for future Layar SDK projects
. The neat thing is that all the frameworks, include files and everything is already setup for you. Please Note: These include/release/debug folders would need to be replaced when using future versions of Layar Player SDK.
Create an Augmented Reality app with Dapp and Layar Player SDK Dapp Complete Project
Comments are encouraged as I’m keen to update this video tutorial wherever might be required.
Cliff
P.S. Technology is only a small part of your app success. There is the business, sales and marketing that you need to think of too :). Which is why I also provide a bunch of free education on how to succeed on the App Store - http://kerofrog.com :).
Just a quick Tab Bar Controller tutorial. :)
I’ll put up the Dapp generated source code tomorrow. But yeah, this video shows a quick rundown of building a Design (Project) with 3 Pages (View Controllers) that are linked together with Actions.
From there, I set up the Tab Bar Controller and Tab Bar Items.
Tab Bar Controllers support custom images, titles and all of the system Tab Bar Item choices.
Just a BIG bit of information in regard of Tab Bar Item images is to make sure you read the Apple Custom Icon and Custom Image Creation Guidelines. Basically, Tab Bar Item Images must follow a strict format guidelines for them to display correctly. I’ll try to get a more condensed version of those guidelines on the website tomorrow.
Without further ado, here is the Tab Bar Controller with Dapp Video Tutorial.
To your app success!,Cliff
P.S. Technology is only a small part of your app success. There is the business, sales and marketing that you need to think of too :). Which is why I also provide a bunch of free education on how to succeed on the App Store - http://kerofrog.com :).
I’ve created a list of all the tutorials that are available so they can more easily be referenced
.
You can view all tutorials by category at – Dapp iPhone SDK Tutorials
If you are looking for support, then you can contact me at:
dapp@kerofrog.com.au
I check my emails every morning, so you should get a very speedy reply
.
Otherwise, the following is the current list of tutorials ordered by their publish date.
Tutorials
- How to Send Email – Dapp + Xcode 4 iOS Video Tutorial
- ImageView Zoom: Custom class for making your images zoomable Video Tutorial
- How to export Dapp iPhone generated code files to Xcode 4.2 Video Tutorial
- iPhone UIScrollView tutorial using Dapp
- Create an Augmented Reality app with Dapp and Layar Player SDK
- How to hide Navigation Controller Navigation Bars using code
- Tab Bar Controller with Dapp Video Tutorial
- Creating an advanced Hello World Xcode 4 iPhone project with Dapp video tutorial
- Updating UINavigationController Navigation Bar Tutorial
- Basic RSS Reader iPhone SDK Tutorial with Dapp
- Dapp iPhone Code Gen with Actions Preview
- Hello World iPhone SDK Tutorial with Dapp
- Create an iPhone App with Dapp Tutorial 2 – Export to code
- Create an iPhone App with Dapp Tutorial 1 – Our first mockup
Planned Tutorials
A rundown of tutorials I'm planning to post on the website. Partly here so I can track what needs to be done and so my awesome users can know what tutorials are coming soon :).| Title - Description | ETA | Status | Requested By | |
|---|---|---|---|---|
| T1 | UIScrollView Tutorial A tutorial that will show you how to create a UIScrollView in code, and add a few objects to it. | 6h | Completed | Sanjar |
| T2 | Dapp Style Add New Row in TableViews Tutorial Showing you how I create the 'add new Design' etc. rows in TableViews within Dapp. | 6h | David | |
| T3 | Hide Tab Bar Controller Going through the code needed to hide a Tab Bar Controller (Tab Bar) on individual pages within an app. | 4h | Completed | Jason |
| T4 | UISearchBar Tutorial Showing you how to setup a UISearchBar and respond to user events in the search bar. | 10h | ||
| T5 | SQLite Tutorial An sqlite tutorial showing how you can hookup Dapp to a Sqlite database, and use some basic commands. | 48h | ||
| T6 | MKMapView Tutorial Just to address how to add frameworks to Xcode 4, especially for users who use the MapView from Dapp. | 5h | Mike | |
| T7 | iAds Tutorial Tutorial on how to integrate iAd into your Dapp app | 15h | Tori | |
| T8 | Get Image from User Tutorial Tutorial that will take you through the steps to prompt for an image from a user, and get them to either select one from their photo library or take a photo themselves. | 7h | Kristy | |
| T9 | Background Music Tutorial How to put background musing into your app | 8h | Wk2010Channel | |
| T10 | Play Video Quick tutorial on how to embed video into your Dapp apps | 8h | Mike | |
| T11 | Multi Font & Color Custom Object This is gonna be fun :) | 16h | Michael | |
| T12 | Sideswipe through series of image views | 10h | Colin |
Cliff
P.S. Technology is only a small part of your app success. There is the business, sales and marketing that you need to think of too :). Which is why I also provide a bunch of free education on how to succeed on the App Store - http://kerofrog.com :).
We have had a few questions about how the code generation capabilities in Dapp work. I thought I would write a post answering some of the more common questions, however. If you just want to visually see how it works, then watch our Hello World tutorial.
Will Dapp be affected by the new clause in the iPhone developer agreement (clause 3.3.1) which states that iPhone apps can not be written on third-party platforms, and then subsequently converted into native iPhone code.
Clause 3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).
Dapp has originally been written in Objective-C and is not affected by this clause.
How are these mockups converted into code?
The collection of mockup pages is converted into a group of code files, then compressed along with any images that the user has implemented within Dapp. Once compressed, Dapp opens up the default iPhone mail browser and attaches the compressed file. The user then just has to press send and the file is emailed to their predefined email address.
Can I reuse the code created by Dapp in my own projects?
Certainly. You may reuse the code for any personal or commercial purposes. All we ask is that if you redistribute the code in it’s original form that you do not remove or change the disclaimer.
I have just started to learn how to code my own iPhone apps, what do I have to do to get an iPhone app prototype up and running?
Nearly everything is provided for you. You just need to start a new project in Xcode then delete three files that were automatically created as part of the Xcode project. Drag and drop the files you uncompressed from the zip file provided by Dapp into your Xcode project and that’s it. You can then press ‘Build & Run’ to run your iPhone app prototype. Our Hello World video tutorial will show you the process.
Naturally, experienced developers can simply drag and drop whichever individual files they require.
Cliff.
To your app success!,Cliff
P.S. Technology is only a small part of your app success. There is the business, sales and marketing that you need to think of too :). Which is why I also provide a bunch of free education on how to succeed on the App Store - http://kerofrog.com :).
