Add BeaconsInSpace to your iOS app
The guide below will get you setup with full functionality in 5 minutes.
BeaconsInSpace uses Cocoapods for installs. If you would like to manually install our SDK please download the latest version.
Note: For manual installs, after you have added the BeaconsInSpace.framework to your Xcode project, you must navigate to Build Settings > Linking > Other Linker Flags and add "-ObjC".
1. Get setup
Here's what you'll need before installing the SDK:
1 iPhone (4S or newer) or iPad (3rd gen. or newer) with iOS 7+, to run your app.
1 Mac computer with Xcode.
Note: BeaconsInSpace does not require location background modes, CoreBluetooth, or a Bluetooth permission prompt for the end user. Unless you are using location background modes or CoreBluetooth for a different reason, please do not include them when submitting to the store.
2. Install CocoaPod
To run the CocoaPod, open your terminal and navigate to your apps Xcode project.
If you haven't already created a Podfile for your application, create one with:
Next, open the Podfile for your app and enter:
Save the file and run:
This creates an .xcworkspace file for your application. Use this file for all future development on your application.
3. Setup the manager
In the AppDelegate.m put the following in your import statements:
In the application:didFinishLaunchingWithOptions: method place the following code:
This sets up the beaconManager, which will automatically connect you with your test beacons and subscription beacons with BeaconsInSpace.
4. Authorize Location Services
BeaconsInSpace uses foreground and background location monitoring to detect when users are near a beacon. In order to use location services, go to the info.plist and put in the Key "NSLocationAlwaysUsageDescription" and "NSLocationAlwaysAndWhenInUseUsageDescription" and "NSLocationWhenInUseUsageDescription", and for the String Values enter the message you'd like to display to users when asking for their location.
The BeaconsInSpace beaconManager will handle asking for permission once this is set.
5. Confirm the SDK is initialized
You can confirm the SDK has been initialized successfully by viewing "The BeaconsInSpace SDK has been initialized." in the development environment logs. If you see this line of text, you are all set and ready for Step 6.
6. Add the AdSupport.framework
Before you submit your app, please make sure to include the AdSupport.framework in your project. The BeaconsInSpace SDK requires this framework in order to run properly.
7. Submit to the App Store
Before submitting to the App Store please be aware that BeaconsInSpace collects the IDFA. When you get asked, "Does this app use the Advertising Identifier (IDFA)?" on this page, please make sure to check the following three boxes:
- “Attribute this app installation to a previously served advertisement”
- “Attribute an action taken within this app to a previously served advertisement”
- “I, YOUR_NAME, confirm that this app, and any third party…”
Note: please do not check the box labeled ““Serve advertisements within the app” unless you display ads or already have a standard process of checking this box and collecting the IDFA.
Sample: We share data we collect about you including unique identification numbers associated with mobile devices or through its API (including, for example, a Unique ID for Advertisers ("IDFA"), Unique ID for Vendors ("IDFV"), Google Ad ID, or Windows Advertising ID), mobile carrier, device processes, device type, model and manufacturer, mobile device operating system brand and model, device name, battery life, and, depending on the user’s mobile device settings, the geographical location data, including GPS coordinates (e.g. latitude and/or longitude) or similar information regarding the location of the mobile device (“User Data”) with our third party partners, that enables us to provide you with information, advertisements, or offers specific to your location and interests.
By accepting our terms of service, you consent to the collection, storage and processing of your data by our third party partners for the purposes of: (i) providing or improving their services; (ii) enabling third parties to assist us and the retailer and venues (in which the beacons are located) in better serving and understanding our users; and (iii) sharing your data with third parties so they can provide or enable the provision of content, offers or other marketing solutions that may be of interest to you. You also consent to having your data transferred to and processed in the United States or any other jurisdiction in which our third party partners or their parent, subsidiaries, affiliates, service providers or partners maintain facilities. If you do not consent to the collection and transfer of the aforementioned data through the identification of your mobile device, we recommend that you: (a) delete our app or adjust the in-app settings of the app; or (b) opt out of sharing your mobile advertiser ID by limiting ad tracking on the device. For iOS, navigate to your Settings > Select Privacy > Select Advertising > Enable the “Limit Ad Tracking” setting. For Android, open your Google Settings app > Ads > Enable “Opt out of interest-based advertising. For more information on specific opt-out choices, please visit: http://www.networkadvertising.org/mobile-choices.