iOS SDK
Distribution
Section titled “Distribution”Download the SDK archive (example version from the legacy docs):
Older versions (if needed): instaplysdk.1.20.zip · instaplysdk_1.23.zip
Overview
Section titled “Overview”The Instaply SDK opens a conversation between your customer and a representative, inside your iOS app.
Installation
Section titled “Installation”- Download and unzip the SDK; add the folder to your project (often under a
Vendordirectory). - Link frameworks if required:
MobileCoreServices,ImageIO,CoreMedia,AVFoundation,SystemConfiguration. - In Xcode Other Linker Flags, add
-ObjC. - In your app delegate (or wherever you know the signed-in user), import and configure the account manager.
Import:
#import "INSInstaplyAccountManager.h"In application:didFinishLaunchingWithOptions: (or equivalent), configure the user and store:
[[INSInstaplyAccountManager sharedManager] configureWithAPIKey:apiKey userID:userId type:INSUserIdTypeEmail randomNonce:nonce verificationToken:digest];
[[INSInstaplyAccountManager sharedManager] setPreferredInstaplyStoreId:businessId];[[INSInstaplyAccountManager sharedManager] setFirstName:@"Herve"];[[INSInstaplyAccountManager sharedManager] setLastName:@"Dupont"];[[INSInstaplyAccountManager sharedManager] setAdditionalSearchableFields:@{ @"Town": @"Toulon", @"Employer": @"Agropole", @"ZipCode": @"75000", @"Title": @"Mr", @"BirthDate": @"11/07/1978"}];[[INSInstaplyAccountManager sharedManager] setAvatarImage:[UIImage imageNamed:@"herve.jpg"]];Required calls: configureWithAPIKey:… and setPreferredInstaplyStoreId: (business / store id).
userID must be unique per user in your system. type categorizes the id (email, phone, etc.).
additionalSearchableFields is a string dictionary used for full-text search in the Instaply web UI.
Optional locale (if app language differs from device):
[[INSInstaplyAccountManager sharedManager] setLocale:@"fr"];Supported locale codes: en, fr, nl, pt, es. Others fall back to English.
- In
application:didRegisterForRemoteNotificationsWithDeviceToken::
[[INSInstaplyAccountManager sharedManager] setAPNSToken:deviceToken];See SDK authentication for nonce and verificationToken / digest.
Add a bridging header:
#import "instaplysdk.h"Unread count
[[INSInstaplyAccountManager sharedManager] getUnreadCountWithSuccess:^(NSInteger unreadCount) { // Update UI} errorCallback:^(NSError *error) { // Network error}];Open conversation
Import INSThreadViewController.h, then:
INSThreadViewController *threadViewController = [[INSThreadViewController alloc] init];[viewController presentViewController:threadViewController animated:YES completion:nil];Link handling (optional) — implement INSThreadViewControllerDelegate and return YES if your app handled the URL:
@protocol INSThreadViewControllerDelegate <NSObject>- (BOOL)handleURL:(NSString *)URL;@endOpen from push — when the user opens the app from an Instaply notification, show the conversation immediately when appropriate.
Prefill composer
[threadViewController prefillMessage:@"Bonjour, auriez-vous des infos sur les nouveaux forfaits?"];Integration example
Section titled “Integration example”- DemoSDK.zip (legacy hosted sample)
Remarks
Section titled “Remarks”- The SDK exposes a small API surface and should not conflict with other SDKs.
- Supports iOS 7 and newer (as stated in legacy docs; verify with Instaply for current minimum iOS).
- Errors are only shown to the user while the conversation UI is visible.
- Authentication and profile updates retry after relaunch or network changes.
- Calling authentication every launch is optional but safe.
- User data is stored in the keychain under service
your.bundle.identifier.instaplysdkwith keys prefixedINSTAPLY_.