adform / adform-ios-sdk

adform-ios-sdk
MIT License
8 stars 8 forks source link

Getting "No such module" error when installed via cocoapods in XCode 9.2/swift 3 project #21

Closed rogierdna closed 6 years ago

rogierdna commented 6 years ago

Hello

I have tried to integrate the SDK into older Objective-C project. And it was successful. Now I'm trying to integrate the SDK into newer XCode 9.2 /swift 3 project. pod installs fine via 'pod install' but later, in code, when trying to use it import AdformAdvertising it fails to detect the module. No such module 'AdformAdvertising'

Tried it with clean empty xcode project and it happens there too.

Do you have any suggestions on how to proceed?

rogierdna commented 6 years ago

My guess is that this happens because adform-ios-sdk pod does not contain proper *.modulemap file. At least I can not find it using xcode's search(while it does result modulemaps for other integrated pods).

vladasdrejeris commented 6 years ago

Hi,

Could you provide you pod file for swift project?

rogierdna commented 6 years ago

Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'testadform' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for testadform

  pod "AdformAdvertising", "2.10.3"
end
vladasdrejeris commented 6 years ago

You need to use a bridging header and add this import there:

#import <AdformAdvertising/AdformAdvertising.h> 
rogierdna commented 6 years ago

Hmm, these bridging headers should not be asked to be added manually by users. It should be added via Pod using s.xcconfig = directive or other directives in Podspec file. Can you add this to pod?

vladasdrejeris commented 6 years ago

Sorry, we cannot do it right away, but we will plan to update the podspec as soon as possible.

vladasdrejeris commented 6 years ago

Hello, We have fixed this issue in v.2.10.5.