Getting started - siimsuu1/MOPP-iOS GitHub Wiki

Getting MoppLib framework

You can find build under releases. Just download MoppLib.framework.zip, unpack it and you're ready to go!

Adding MoppLib framework to your project

  1. Download latest version of framework if you haven't done so yet, and unpack it.
  2. Drag and drop framework to you project in Xcode.
  3. Select General tab in your project settings and add MoppLib.framework/CryptoLib.framework/cdoc.framework under Embedded binaries
  4. In Build Settings, set Always Embed Swift Standard Libraries to YES
  5. In Build Settings, set Enable Bitcode to NO

MoppLib framework setup

You're almost done. In order for library to work with containers, it needs to prepare a few things first. For that you need to call setup method. We recommend you to do this at earliest opportunity, preferably in AppDelegate application:didFinishLaunchingWithOptions:. Setup will take some time, so you need to make sure it finishes first before starting any container actions.

To start with setup, import MoppLib as follows:
#import <MoppLib/MoppLib.h>

Then call setup method:

[[MoppLibManager sharedInstance] setupWithSuccess:^{   
   NSLog(@"Setup is complete!");    
} andFailure:^(NSError *error) {     
   NSLog(@"There was a problem with setup: %@", error);   
} usingTestDigiDocService:NO];