February 5, 2013

HOW TO: Embed a Demo in an iPhone or iPad App

Quick intro

One cool feature of AppDemoStore demos is that you can easily embed them in your existing iPhone or iPad apps. This is an easy way to provide a guided tutorial for your users so they'll quickly get introduced to your app.

To learn how to create a demo on AppDemoStore, start with this tutorial: How to Create iOS App Demo

Click through the demo on the right to see a sample clickable app tutorial for NuVo App.



How it works


1 Embed the hosted demo in your app

To embed a demo in your app, just copy this Objective-C code provided below to your Xcode project (replace the demo-id marked with red with your own).

// web view
UIWebView *webView = [[UIWebView alloc] initWithFrame:UIScreen.mainScreen.bounds];
self.view = webView;
   
// load url
// Change the URL below to match your demo
NSString *urlDemo = @"http://www.appdemostore.com/m/2816110";
NSURL *url = [NSURL URLWithString:urlDemo];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];
[webView loadRequest:urlRequest];

Alternatively, you can get the code from the Demo Page: click on then click on and copy the code provided there.




2 Embed the downloaded demo in your app

You can download a demo as HTML or ZIP and include it in your app without hosting it on AppDemoStore. This will make sure that the demo will run also without internet connection.

To download your demo: click on the Demo Page, then click




The embed code is the same as provided in section 1 only that you just have to replace the link to the hosted demo with the link to the demo in the app project.


Helpful Articles