IronSource - iOS

Based on IronSource demo project: https://github.com/ironsource-mobile/Mediation-Demo-Apps/tree/master/iOS/Swift you can check Nefta custom adapter integration example here: https://github.com/Nefta-io/NeftaISAdapter:

Include the SDK

There are two general ways of integrating the custom adapter or any other hybrid way depending on your needs:

Integration through CocoaPods

If you have CocoaPods installed this is probably the easiest in which case just add the following line to your project pod file:

  target 'yourProject' do
    use_frameworks!
  
    pod 'IronSourceSDK'
    pod 'NeftaISAdapter', :git => 'https://github.com/Nefta-io/NeftaISAdapter.git'
  end
  
  post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'NeftaISAdapter'
      framework_ref = installer.pods_project.frameworks_group.new_reference('IronSourceSDK/IronSource/IronSource.xcframework')
      target.frameworks_build_phase.add_file_reference(framework_ref, true)
    end
  end
end

After this update the pods by running the "pod install" command and then your project should contain the custom adapter:

Integration through bundle

You can download the latest Nefta custom adapter xcframework module from: https://github.com/Nefta-io/NeftaISAdapter/releases.

Copy and include the NeftaISAdapter.xcframework into your iOS project Frameworks folder:

Runtime

Note that NeftaSDK doesn't interfere with your application. Pausing/resuming and audio control is all in your hands so you will probably want to pause any potentially heavy activity and mute the audio during interstitial or rewarded videos.

All done

With this technical part, make sure you have Nefta mediation enabled in your LevelPlay configuration: <https://docs-adnetwork.nefta.io/docs/ironsource-configuration>.

Event integration

If you are integrating Nefta Events, you will have to initialize Nefta SDK manually. The reason for this is that IronSource SDK can initialize the Nefta adapter later in the player session and miss some events:

var _neftaEvents : NeftaEvents

override func viewDidLoad() {
  
  _neftaEvents = NeftaPlugin_iOS.Init(appId: "yourApplicationId").Events
@property NeftaEvents *neftaEvents;

-(void)viewDidAppear:(BOOL)animated {
  
    _plugin = [NeftaPlugin_iOS InitWithAppId: @"yourApplicationId"].Events;

With stored reference to the NeftaEvents you can then start sending various events:

_neftaEvents.AddSpendEvent(category: NeftaEvents.ResourceCategory.PremiumCurrency,
                           method: NeftaEvents.SpendMethod.Upgrade)

_neftaEvents.AddProgressionEvent(status: NeftaEvents.ProgressionStatus.Start,
                                         type: NeftaEvents.ProgressionType.GameplayUnit,
                                         source: NeftaEvents.ProgressionSource.CoreContent,
                                         name: @"area-4",
                                         value: 21)
[_plugin.Events AddSpendEventWithCategory: ResourceCategoryPremiumCurrency
                                       method: SpendMethodUpgrade];

[_plugin.Events AddProgressionEventWithStatus: ProgressionStatusStart
                                             type: ProgressionTypeGameplayUnit
                                           source: ProgressionSourceCoreContent
                                             name: "area-4"
                                            value: 21];