Skip to main content

Advanced

Theming

The GetintheLoop SDK allows integrations to customize appearance and provide support for additional languages. SDK uses LMGTheme protocol to provide following resources:

  • Spacing between UI elements
  • Colors
  • Typography
  • Icons
  • Additional languages support
  • Custom decorations (rounded corners, dividers, etc)

Please see LMGTheme.h for complete list of all possible modifications in the SDK. When using the LMGUI SDK, you can build a completely custom theme using the protocol mentioned above, or use/modify the existing default theme (LMGDefaultTheme).

In order to use a custom theme, provide an instance of it to LMGThemeManager prior to SDK initialization using following code:

[LMGThemeManager applyTheme:<YOUR_INSTANCE_OF_LMGTheme>];
... initialize SDK here ...

Offers

Sent notification or direct link must have offer id or offer slug available.

Displaying offer details

@import LMGUI;
...
// Offer Details in no particular Location
UIViewController *offerDetailViewController = [LMGOfferDetailsWireframe viewControllerForOfferId:@"OFFER_ID__OR__SLUG"];
[self.navigationController pushViewController:offerDetailViewController animated:TRUE];
...
// Offer Details in one Location
UIViewController *offerDetailViewController = [LMGOfferDetailsWireframe viewControllerForOfferId:@"OFFER_ID__OR__SLUG" locationId:@"LOCATION_ID__OR__SLUG"];
[self.navigationController pushViewController:offerDetailViewController animated:TRUE];

Business or Location

Sent notification or direct link must have business id, business slug, location slug available.

Displaying business details

The Business Details screen displays the offers and locations available for a business. The locations and offers shown are based on what is available in the current geocontext area.

@import LMGUI;
...
UIViewController *businessDetailViewController = [LMGBusinessDetailsWireframe viewControllerForBusinessId:@"BUSINESS_ID__OR__SLUG"];
[self.navigationController pushViewController:businessDetailViewController animated:TRUE];

If location services are enabled, the locations displayed will be ordered based on distance from the device.

Displaying location details

@import LMGUI;
...
UIViewController *locationDetailViewController = [LMGLocationDetailsWireframe viewControllerForBusinessId:@"BUSINESS_ID__OR__SLUG" locationId:@"LOCATION_ID__OR__SLUG"];
[self.navigationController pushViewController:locationDetailViewController animated:TRUE];

Icons

In order to change icons in the SDK one needs to provide a reference to a bundle inside of an instance of LMGTheme with all required assets.

Language Localization

In order to add support for additional language translations, provide a reference to a bundle inside of an instance of LMGTheme with all required localization keys.

SDK Configuration Options

SDK has some configurations that are optional for the integration:

  • Ability to save offers when user is identified (true/false or "VerifiedOnly")
  • Ability to share offers and businesses
  • Ability to add an attribution badge
  • Ability to enable/disable feedback links
  • Ability to customize feedback URL
  • Ability to set the minimum authentication level needed to redeem an offer ("None", "Identified" or "Verified")
  • Ability to enable/disable visual effects like confetti
<key>LMGConfig</key>
<dict>
<key>OfferBookmarkingEnabled</key>
<true/> // or <string>VerifiedOnly</string>
<key>OfferSharingEnabled</key>
<true/>
<key>BusinessSharingEnabled</key>
<true/>
<key>PoweredByGetintheLoopBadgeEnabled</key>
<true/>
<key>FeedbackLinksEnabled</key>
<true/>
<key>SupportEmail</key>
<string>support@loopmediagroup.com</string>
<key>RedemptionRequiresMinimumAudienceId</key>
<string>Identified</string>
<key>VisualEffectsEnabled</key>
<true/>
</dict>

Logging

The SDK comes with 5 built-in debug levels, from most detailed to most restricted logs: LMGDebugLoggerLevelVerbose, LMGDebugLoggerLevelDebug, LMGDebugLoggerLevelInfo, LMGDebugLoggerLevelWarning and LMGDebugLoggerLevelNone.

By default it is set to LMGDebugLoggerLevelNone.

@import LMGUI;

...

- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

... your app init code ...

[[LMGClient shared] setLoggerLevel:LMGDebugLoggerLevelDebug];
return YES;
}