Objective-C and Swift files can coexist in a single project, whether the project was originally an Objective-C or Swift project. Steps to follow to integrate Gamooga SDK in your swift projects.

  • Import our Objective C framework by dragging and dropping the framework into your Xcode Swift project.
  • Create a new Objective C file in your project (File->New->File [Objective C for iOS]).
  • Accept the prompt (agree) to create a bridging header file between Objective C and Swift.
  • Delete your newly created Objective C file but retain the bridging header file ${YOURPROJ}-Bridging-Header.h.
  • In the Bridging header file, import our framework using the standard Objective C import syntax (e.g. #import "TargetActClient/TargetActClient.h").
  • This relinquishes the need to perform an import TargetActClient statement in your AppDelegate.swift file. You can now write code that utilizes whatever framework as long as it is imported using the bridging header. It is available throughout your project's Swift files.

For more detailed information refer to Apple’s docs at: https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html