How to compile a project with app and library in the same workspace with different configuration names?

前端 未结 3 1209
渐次进展
渐次进展 2020-12-04 13:25

I am developing an app and I am using an open source component.

I have a workspace containing both MyApp.xcodeproj and Component.xcodeproj. My app

3条回答
  •  臣服心动
    2020-12-04 14:00

    I had this same problem, but I had multiple configurations (Debug, TestFlight, Release, Enterprise) in my app, and the bolded configurations would always fail to build cause it couldn't find the frameworks. I really didn't want to mess with the project settings of my sub projects in order to make updating them easy.

    The answer I found was to just update the framework search path to account for the fact that the frameworks would be dropped in Release (or whatever the default configuration is set to) of the sub projects.

    Specifically I set it to: $(BUILD_DIR)/Release-$(PLATFORM_NAME)

    I set it to be recursive too. This works both for Simulator and Device, building in Xcode and command line.

提交回复
热议问题