xcode 7.2 Could not build Objective-C module

后端 未结 4 942
陌清茗
陌清茗 2020-12-16 03:09

I have just updated my Xcode to version 7.2. Now I try to build a framework from command line using xcodebuild but have this error

.... /Applications/Xcode.a         


        
相关标签:
4条回答
  • 2020-12-16 03:53

    Alternative could be to use https://github.com/facebook/xctool which works similar to xcodebuild

    ../<path>/xctool/xctool.sh clean build -workspace XYZ.xcworkspace -scheme ABC -configuration Debug -sdk iphonesimulator
    
    0 讨论(0)
  • 2020-12-16 03:58

    Try to specify the destination, i.e, xcodebuild -workspace 'App.xcworkspace' -scheme 'App Scheme' -destination 'id=[THE_SIMULATOR_ID_YOU_WISH_TO_USE]' -sdk iphonesimulator9.2 -configuration Debug

    Reference: https://twitter.com/nlutsenko/status/674863890342109185

    0 讨论(0)
  • 2020-12-16 03:59

    One possible workaround would be to supply a destination by adding the following:

    -destination 'platform=iOS Simulator,name=iPhone 6'
    

    In your case this would like this:

    xcodebuild clean build -workspace XYZ.xcworkspace \ -scheme ABC -configuration Debug \ -sdk iphonesimulator \ -destination 'platform=iOS Simulator,name=iPhone 6'

    0 讨论(0)
  • 2020-12-16 03:59

    I reported the same issue to Apple, it actually happens on any type of project when building from the command line using a "scheme" and specifying -sdk as simulator.

    I looks like the ARCH and PLATFORM_NAME variables are incorrectly set even though we're specifying -sdk iphonesimulator. My current work around is to specify PLATFORM_NAME=iphonesimulator on top of the -sdk iphonesimulator flag on my xcodebuild command line.

    Waiting to hear more from my bug report to Apple.

    0 讨论(0)
提交回复
热议问题