In an earlier post I provided step by step instructions on how mobile app developers can install and initialize the mobile SDK on iOS applications. The purpose of this post is to provide instructions on how to show spots in an iOS application. Future posts will discuss topics such as how to configure mobile events, how to set up mobile messages and how to handle navigation within a mobile application.
A spot is the place on a mobile app where a task delivers HTML content.
The content that is going to be displayed is created in SAS Customer Intelligence 360.
In this example I create the following ad that I want to be showed in my mobile application:
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
In addition to the creative that is used to create the ad a Spot ID is specified in SAS Customer Intelligence 360 which will be passed into my application:
In your storyboard, create a UIView that is the size of the spot that you want to display. In InterfaceBuilder, change the class of the view to SASCollectorUIAdView.
In Xcode, create a filename+Designable.m file. Make sure that the file is in a target for your project. Add this code to the file and then close and reopen xcode:
In the header file for the viewcontroller that contains the ad, import SASCollector.
In your viewcontroller’s h file, create an IBOutlet to your SASCollectorUIAdview.
To show spot content, you must specify a spotID. You can specify a spotID in either InterfaceBuilder or viewDidAppear. Here it is set in viewDidAppear and the spot ID matches that which was set up in SAS Customer Intelligence 360. Once the spot Id is specified load the ad.
Spots in SAS Customer Intelligence 360 offer the option of adding spot attributes. See SAS Help Center: Working with Spots for more detail on spot attributes and how to configure them.
The Ad Delegate provides the means to notify you when certain actions occur (for example, when a spot loads, fails, closes, expands, resizes, begins, or ends an action). To receive notifications about asynchronous loads, failures to load, and user interactions with the spot, the SASIA_AdDelegate protocol must be implemented. See SAS Help Center: Working with Spots for more detail on using the ad delegate.
It is possible to include a link in the spot that can direct users to a different part of the application or direct them to a web browser. It is the responsibility of the mobile app developer to design the app to be flexible to handle navigation to other parts of the application. Future blogs will give examples of ways that this can be accomplished in iOS applications.
For more details about how to load mobile spots in an iOS application see SAS Help Center: Working with Spots. Additionally, more details can be found in the SAS Customer Intelligence 360 Mobile SDK course included in the SAS Customer Intelligence Learning subscription.
Find more articles from SAS Global Enablement and Learning here.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.