Share it

Follow me




Create an RFduino enabled iOS app

In this tutorial, I'll explain how to create the skeleton of an RFduino enabled iOS app.


If you want to know more…

If you want to know more about RFduino, you may have a look to About RFduino.

Preliminary note

The following tutorial will show you how to create the skeleton of an RFduino enabled iOS project. It won’t cover communications between iOS device and RFduino modules. You should have a look to RFduino “official” examples you’ll find here on its GitHub page.

Create an RFduino enabled iOS project

New project creation

Create a new iOS application project (in this example, a “Single View Application”).

Project creation - step 1   Project creation - step 2


RFduino framework

Get iOS RFduino framework from “”, and put it into an “rfduino” folder into your project’s folder (see project structure below).

Project structure


Then add this folder to your project:

  • Right click on project, then select “Add files to <project’s name>”.
  • Select “rfduino” folder, check needed targets, then click on “Add”.
    • Project add rfduino folder - step 1   Project add rfduino folder - step 2


      Application cleaning

      Remove original “AppDelegate.h” and “AppDelegate.m” from your project (not the ones from “rfduino” folder).

      Remove AppDelegate


      Rename the following files:

      • “ViewController.h” to “AppViewController.h”
      • “ViewController.m” to “AppViewController.m”

      In these two files, replace all occurrences of “ViewController” by “AppViewController”.

      Then in “Main.storyboard”, select “App View Controller” and change its class from “ViewController” to “AppViewController”.


      If you don’t want to rename ViewController files, you’ll have to edit “ScanViewController.m”, then replace all occurrences of “AppViewController” by “ViewController”.

      RFduino code was not made for StoryBoarded apps. So you have to edit “ScanViewController.m” and replace the whole “- (void)didLoadServiceRFduino:(RFduino *)rfduino” function by

      - (void)didLoadServiceRFduino:(RFduino *)rfduino
          UIStoryboard *storybord = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
          AppViewController *viewController =[storybord instantiateInitialViewController];
          viewController.rfduino = rfduino;
          loadService = true;
          [[self navigationController] pushViewController:viewController animated:YES];
      Don't forget to replace all occurrences of “AppViewController” by “ViewController” if needed.


      CoreBluetooth framework

      Add “CoreBluetooth” framework to your project:

      • Open project’s root
      • Go into “Build Phases” tab
      • Expand “Link Binary With Libraries” section
      • Click on “+” sign under libraries list
      • Add “CoreBluetooth” framework

      Add CoreBluetooth framework

      RFduino functionnality

      Open “AppViewController.h”
      Add the following import directives:

      #import "RFduinoDelegate.h"
      #import "RFduino.h"

      Make the controller a delegate of “RFduinoDelegate”, and add an “rfduino” property.
      @interface AppViewController : UIViewController<RFduinoDelegate>
      @property(nonatomic, strong) RFduino *rfduino;

      Open “AppViewController.m”
      Add a @synthesize for “rfduino” property.

      @synthesize rfduino;

      At the end of “- (void)viewDidLoad” method, add the following line:
      rfduino.delegate = self;

      The end

      Your application should compile, and if you run it from your iPhone, you will be welcomed by available RFduino modules. If you select an item, the (empty) main view will be opened.

      Available modules

      Now, you just have to finish your app :-)

      comments powered by Disqus