0
votes

recently I'm refactoring a project which uses Cocoapods to manage dependencies (a lot of dependencies...), since Xcode 11 integrated Swift Package Manager, I want to migrate progressively some dependencies to SPM staring from the framework Alamofire.

After I removed the Alamofire from the Podfile (delete and run pod install) and added it into SPM,

enter image description here

I got the error No such module 'Alamofire'.

enter image description here

I've already tried to clean build and removed derived data but none of them can fix it. Did anyone have this problem too?

1
Did you add the package to target -> general-> "Frameworks, Libraries, and embedded content"? - La pieuvre
@Lapieuvre Yes it is added in this section - Terry
@Sammy I just tried pod update and it doesn't work either :( And the platform is :ios, '10.0' - Terry
@Sammy I did but it still doesn't work... - Terry
@Sammy But I want to remove it from Cocoapods and use it by Swift Package Manager - Terry

1 Answers

1
votes

After few days searching, I found out this https://stackoverflow.com/a/57312755/863020.

Seems that SPM could be only used for Debug and Release configurations, if we want to use it with more configurations then we should write a pre-action. And it is also a known issue on Xcode so I would not use SPM for now :(

UPDATED on dec. 12

So I come back to my question after the new release of Xcode 11.3, it fixed this issue and now I can build the project with custom build configuration :)