#if canImport() does not find frameworks with CocoaPods

后端 未结 2 2045
北海茫月
北海茫月 2020-12-10 16:19

Hello here is our Podspec which has a default_subspec and an optional subspec (which won\'t be taken since the default is already set). That subspec has more fe

2条回答
  •  醉酒成梦
    2020-12-10 17:09

    Can't achieve that by saying that mainSDK is MainTarget and additionalSDK is your AdditionalTarget? What I see is that whatever version you want differently it will be just another target. You can right-click on the original target, select duplicate from the current target and after it you can make the changes you wish to linking frameworks within the Build Phases section.

    #check1: check you have use_frameworks! uncommented like this:

    # Uncomment this line if you're using Swift
    use_frameworks!
    

    #check2: try to delete the ModuleCache if you really think the Framework is there and in the right path. To delete ModuleCache just delete ~/Library/Developer/Xcode/DerivedData/ModuleCache directory, clean the project and delete project-specific derived data just to be sure. When you do the normal cleanup, the ModuleCache directory usually doesn't get rebuilt.

    #check3: inspect your framework to see if it contains a Modules folder with a module.modulemap file inside it (right click on your framework > Show In Finder > make sure your modulemap is there)

提交回复
热议问题