Knowledge Base - How to create your own APP with Swift and RadaeePDF SDK

  • Download the Swift repository from:
  • Create a new Swift project.
  • Set "Storyboard" as interface
  • Create a new group called Radaee.
  • Include “include” folder and "RadaeeSwift-Bridging-Header.h” file from demo project into Radaee group using “Create groups” option.
  • Include “cmaps” and “fdat” folders from demo project into Radaee group using “Create folder references” option.
  • Copy icons from demo project Assets
  • Completely remove the “Application Scene Manifest” entry from Info.plist
  • Remove "PDFRes" folder from "include" folder and re-add it as folder references
  • Remove "RDFileCollection" folder, RDAppDelegate class, MoreViewController class and main.m reference from "include" folder
  • Add "help.pdf" file from "PDFRes" folder in main project navigator's directory
  • The project navigator should be something like:
  • Replace AppDelegate.swift and ViewController.swift with same files from demo project to try the Swift module (you can replace the current one).
  • Replace 'UIApplicationLaunchOptionsKey' with 'UIApplication.LaunchOptionsKey' in AppDelegate.swift

  • Replace 'UIAlertControllerStyle' with 'UIAlertController.Style' in ViewController.swift

  • Add the path of "RadaeeSwift-Bridging-Header.h” to “Objective-C Bridging Header” of Build Setting tab.
  • Add -ObjC and -lstdc++ flags to Other Linker Flags of Build Setting tab.
  • In this example we use a navigation controller to present the reader, and the storyboard will look like:
  • The “Show Reader” button calls ShowReader method of ViewController class.
  • The current ViewController uses demo Premium License to run the APP, in this case you should set the same bundle id of demo project (“com.radaee.viewer”).
  • If you want to use your license, you should set your bundle id and edit pluginInit method in ViewController class to activate your license.
  • Now you can run the project and customize the ViewController code.
  • The reader viewcontroller must be contained into a navigation controller, this is the demo implementation
  • If you want to customize the reader, you can edit the RadaeeLib project (Obj-C) and use the Makefile to create a custom static library to replace the “libRDPDFLibSDK.a” file of demo project
Applies To

RadaeePDF SDK for iOS


Created : 2018-12-03 12:11:07, Last Modified : 2021-05-27 13:36:28