Getting started - xamoom/xamoom-ios-sdk GitHub Wiki

Here you will learn how to setup the xamoom SDK and how to work with XMMEnduserApi. This class is the most important class in our SDK, because it includes all functions for loading any kind of data from our backend.

Installation

pod 'XamoomSDK', '~> 3.11.15'

Since XamoomSDK version 3.11.0 there might be an issue with your AppIcon. For a more detailed description why your AppIcon could be gone, please check this.

To avoid that CocoaPods issue, implement the following code lines in your Podfile.


target 'Your-target' do

  pod 'XamoomSDK', '~> 3.11.15'

  ...
end

post_install do |installer|
  installer.aggregate_targets.each do |target|
    copy_pods_resources_path = "Pods/Target Support Files/#{target.name}/#{target.name}-resources.sh"
    string_to_replace = '--compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"'
    assets_compile_with_app_icon_arguments = '--compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${BUILD_DIR}/assetcatalog_generated_info.plist"'
    text = File.read(copy_pods_resources_path)
    new_contents = text.gsub(string_to_replace, assets_compile_with_app_icon_arguments)
    File.open(copy_pods_resources_path, "w") {|file| file.puts new_contents }
  end
end

Note: After adding this line run pod update, otherwise the Pods/Target Support Files/ would not be updated.

Usage

First, import our SDK where you want to use it.

import XamoomSDK

To get data from our backend you need to use the XMMEnduserApi class. To make it work properly, you only have to create an instance of the XMMEnduserApi class with your API KEY.

let api = XMMEnduserApi(apiKey: "API_KEY")

Now you are able to call any function you want from XMMEnduserapi.

Next steps