Module 'FloatingPanel' not found
Description
I was replacing cocoapods with SPMs and encountered Swift Compiler Errors:
/Users/ios.developer/Library/Developer/Xcode/DerivedData/client-ios-aslyravufwuynvasnzjlelwytgmd/Build/Products/ProdDebug-iphonesimulator/MyFramework.framework/Headers/MyFramework-Swift.h:192:9:
Module 'FloatingPanel' not found
and
<module-includes>:2:9: note: in file included from <module-includes>:2:
#import "Headers/MyFramework-Swift.h"
^
/Users/ios.developer/Library/Developer/Xcode/DerivedData/client-ios-aslyravufwuynvasnzjlelwytgmd/Build/Products/ProdDebug-iphonesimulator/MyFramework.framework/Headers/MyFramework-Swift.h:192:9: error: module 'FloatingPanel' not found
@import FloatingPanel;
^
<unknown>:0: error: could not build Objective-C module 'MyFramework'
Please note that I have the main target and the list of frameworks. In one of those frameworks (MyFramework) I use FloatingPanel. MyFramework has Objetive-C class SVPrivateScrollDelegateProxy and I had to import it in MyFramework.h:
#import <Foundation/Foundation.h>
//! Project version number for MyFramework.
FOUNDATION_EXPORT double MyFrameworkVersionNumber;
//! Project version string for MyFramework.
FOUNDATION_EXPORT const unsigned char MyFrameworkVersionString[];
#import "SVPrivateScrollDelegateProxy.h"
Expected behavior
FloatingPanel works as earlier.
Actual behavior
I can't build the project because there is a Swift Compiler Error.
Steps to reproduce
- Remove the cocoapod FloatingPanel.
- Add the SPM FloatingPanel with standard procedure.
- Add the FloatingPanel to
Project->MyFramework->General->Frameworks and Libraries. - Run
Code example that reproduces the issue This is how the FloatingPanel is being imported to places of usage:
import WebKit
import FloatingPanel
public final class CatalogWebViewController: BaseViewController, АFloatingController {
private var webView: WKWebView!
private var webManager: CatalogWebManager!
How do you display panel(s)?
- Present modally
How many panels do you displays?
- 1
Environment
Library version 2.5.0
Installation method
- Swift Package Manager
iOS version(s) iOS 15.0
Xcode version 13.1
I tested SwiftPM on 2.5.0 in Xcode 13.1, but it works well.
@scenee I've added more details to the current issue. Take a look.
I'm confused by the wording "could not build Objective-C module 'MyFramework'". MyFramework is not Objective-C it has one Obj-C class and that's it.
I'll tell you more: I made a refactoring and I removed the only Objective-C class from my Project. And still I get the same Error.
Maybe there is a problem in pod 'YandexMapsMobile'? Developers haven't yet upgraded it to Swift and haven't made it SPM.
Here is my Podfile:
platform :ios, '12.0'
use_frameworks!
inhibit_all_warnings!
target 'MyProject' do
pod 'SwiftGen', '~> 6.0'
pod 'pop', :git => 'https://github.com/facebook/pop.git'
pod 'ReCaptcha'
# pod 'FloatingPanel'
pod 'DBDebugToolkit'
pod 'Mindbox'
end
target 'Services' do
pod 'YandexMapsMobile', '4.0.0-full'
end
target 'MyFramework' do
pod 'ReCaptcha'
# pod 'FloatingPanel'
end