Skip to content

MRGS SDK can be integrated with🔗

  • Swift Package Manager
  • Cocoapods
  • Carthage
  • Manual integration

Swift Package Manager🔗

Step 1: Add dependencies

Via Package collection

  • In Xcode select File > Add Packages
  • Select "+" > "Add Swift Package Collection"
  • Insert URL: https://mrgs-nexus.my.games/repository/ios-sdks/MRGSPackageCollection.json
  • Select required modules from "MRGS Package Collection".
  • Or you can select "MRGS" package from "MRGS Package Collection" (contains all mrgs modules as products) and then select only the required product module.

Individual packages

  • In Xcode select File > Add Packages
  • In the search bar in the upper right corner, paste the URL of the desired MRGS module in the format: https://mrgs-gitea.my.games/mrgs/<MODULE>-ios-sdk.git (for example, https://mrgs-gitea.my.games/mrgs/mrgsbank-ios-sdk.git)
  • Add a module to your project
  • Or you can paste the URL https://mrgs-gitea.my.games/mrgs/ios-sdks.git to include the "MRGS" package which contains all mrgs modules as products and then select only the required module product.

Step 2: Add support for ObjectiveC categories

  • Set the -ObjC flag in the "Other linker Flags" field in the project settings.
  • Import the module in code: @import MRGServiceKit; or @import MRGS_MODULE; or #import <MRGS_MODULE/MRGS_MODULE.h>

Cocoapods🔗

Step 1. Add Sources

In your podfile, add sources to the top of the file:

source 'https://github.com/CocoaPods/Specs.git' # For main repo
source 'https://mrgs-gitea.my.games/mrgs/cocoapods-specs.git'  # For MRGS repo

Step 2: Add dependencies

In target, add the latest versions of the required MRGS frameworks:

To add via subspecs:

target 'MyProject' do
    pod 'MRGS', '~> 5.0.0', :subspecs => ['Bank', 'GDPR', 'Authentication']
end

To add via individual modules:

target 'MyProject' do
    pod 'MRGSAuthentication', '~> 5.0.0'
    pod 'MRGSBank', '~> 5.0.0'
    pod 'MRGSGDPR', '~> 5.0.0'
end

To add all mrgs modules:

target 'MyProject' do
    pod 'MRGS/AllKits', '~> 5.0.0'
end

Step 3: Install dependencies

  • Run pod install (or pod install --repo-update if necessary)
  • Import the module in code: @import MRGServiceKit; or @import MRGS_MODULE; or #import <MRGS_MODULE/MRGS_MODULE.h>

Carthage🔗

Step 1: Add dependencies

Add the required dependencies to your Cartfile in the format:

binary "https://mrgs-nexus.my.games/repository/ios-sdks/<MODULE>/<MODULE>.json"

For example:

binary "https://mrgs-nexus.my.games/repository/ios-sdks/MRGSShowcase/MRGSShowcase.json" ~> 5.0.0
binary "https://mrgs-nexus.my.games/repository/ios-sdks/MRGSGDPR/MRGSGDPR.json" ~> 5.0.0
binary "https://mrgs-nexus.my.games/repository/ios-sdks/MRGSAuthentication/MRGSAuthentication.json" ~> 5.0.0

Step 2: Install dependencies

  • Run carthage update --use-xcframeworks
  • Add downloaded frameworks to your project (make sure "do not embed" option is enabled)
  • Set the -ObjC flag in the "Other linker Flags" field in the project settings.
  • Import the module in code: @import MRGServiceKit; or @import MRGS_MODULE; or #import <MRGS_MODULE/MRGS_MODULE.h>

Manual integration🔗

  • Download the latest version of the library. Unzip the archive.
  • Add the necessary libraries from the downloaded archive to your project (we recommend using xcframework)
  • If necessary, add dependencies to the project from the "Dependencies" folder of the downloaded archive, as well as a .bundle with resources, if necessary
  • Set the -ObjC flag in the "Other linker Flags" field in the project settings.
  • Import the module in code: @import MRGS_MODULE; or #import <MRGS_MODULE/MRGS_MODULE.h>
  • Also, you can add the MRGServiceKit.h and module.modulemap files from the archive to your project, or specify the path to them in the project settings in the Build Settings -> Header search paths section. Now, instead of importing each of our frameworks separately, you can only import one header file: @import MRGServiceKit;

Last update: 2025-01-21
Created: 2022-07-05