Reamaze allows you to embed a support knowledge base into your app.
For a quick first look at Reamaze, we have included a very small sample application that you can build and run. The sample app demonstrates presenting a ReamazeController and delegation when the controller is finished.
There are two ways to add Reamaze to your project:
CocoaPods is a common library dependency management tool for Objective-C. To use the Reamaze iOS bindings with CocoaPods, simply add the following to your Podfile
and run pod install
:
pod 'Reamaze', :git => 'https://github.com/reamaze/reamaze-ios.git'
Note: be sure to use the .xcworkspace
to open your project in Xcode instead of the .xcproject
.
- Clone this repository (
git clone --recursive
) - In the menubar, click on 'File' then 'Add files to "Project"...'
- Select the 'ReamazeSDK' directory in your cloned reamaze-ios repository
- Make sure "Copy items into destination group's folder (if needed)" is checked"
- Click "Add"
Trigger Reamaze from anywhere (e.g. Button Press)
// SomeViewController.m
- (IBAction)viewHelp:(id)sender {
ReamazeController *reamaze = [[ReamazeController alloc] init];
reamaze.brand = @"YOUR BRAND HERE"; // Get your brand from the subdomain of your public site. (e.g. foobar.reamaze.com is brand "foobar")
[self presentModalViewController:reamaze animated:YES];
}
If you decide to customize the appearance of the navigation bar within your app, a typical implementation can be:
[[UINavigationBar appearance] setTitleTextAttributes:@{
NSFontAttributeName: [UIFont fontWithName:myFontName size:mySize],
NSForegroundColorAttributeName:myColor
}];
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:@{
NSFontAttributeName: [UIFont fontWithName:myFont size:mySize],
NSForegroundColorAttributeName: myColor
}
forState:UIControlStateNormal];
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:@{
NSForegroundColorAttributeName: myColorWithHalfAlpha
}
forState:UIControlStateDisabled];
Create a class that conforms to the ReamazeControllerDelegate
protocol.
// SomeViewController.h
#import "Reamaze.h"
@interface SomeViewController : UIViewController<ReamazeControllerDelegate>
// ...
Write a delegate method to receive the callback when the user is done viewing your knowledge base
// SomeViewController.m
- (void)reamazeCompletionHandler:(ReamazeController *)reamaze {
NSLog(@"Reamaze is done");
}
That's all you need to do!