osx - XCode will build 'debug' but not 'release' because "<Module>-Swift.h" header is not found -


g'day,

this killing me framework project builds without error or warning in debug configuration, when try build archive fails because <module>-swift.h not found. apparently it's not being generated in configuration.

sometimes when happens (in debug) can delete references swift header, build put rebuild fix it. not when building release.

all swift related build settings same debug release.

here example of error build log, note file lbimageview.swift not import except foundation. make no reference drhexperimentdata class:

compileswift normal x86_64 /users/l.walsh/documents/developer/labbot/lbimageview.swift cd /users/l.walsh/documents/developer/labbot /applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /users/l.walsh/documents/developer/labbot/lbimageview.swift /users/l.walsh/documents/developer/labbot/lbsize.swift /users/l.walsh/documents/developer/labbot/lbdatamatrix.swift /users/l.walsh/documents/developer/labbot/lbcalibratedpair.swift /users/l.walsh/documents/developer/labbot/lbextensions.swift /users/l.walsh/documents/developer/labbot/lbexperimentdelegate.swift /users/l.walsh/documents/developer/labbot/lbgridview.swift /users/l.walsh/documents/developer/labbot/lbpoint.swift -target x86_64-apple-macosx10.9 -enable-objc-interop -sdk /applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.10.sdk -i /users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/buildproductspath/release -f /users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/buildproductspath/release -g -import-underlying-module -module-cache-path /users/l.walsh/library/developer/xcode/deriveddata/modulecache -serialize-debugging-options -xcc -i/users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/swift-overrides.hmap -xcc -iquote -xcc /users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/labbot-generated-files.hmap -xcc -i/users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/labbot-own-target-headers.hmap -xcc -i/users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/labbot-all-non-framework-target-headers.hmap -xcc -ivfsoverlay -xcc /users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/all-product-headers.yaml -xcc -iquote -xcc /users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/labbot-project-headers.hmap -xcc -i/users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/buildproductspath/release/include -xcc -i/applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain/usr/include -xcc -i/users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/derivedsources/x86_64 -xcc -i/users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/derivedsources -xcc -ivfsoverlay -xcc /users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/unextended-module-overlay.yaml -xcc -working-directory/users/l.walsh/documents/developer/labbot -emit-module-doc-path /users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/objects-normal/x86_64/lbimageview~partial.swiftdoc -o -module-name labbot -emit-module-path /users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/objects-normal/x86_64/lbimageview~partial.swiftmodule -serialize-diagnostics-path /users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/objects-normal/x86_64/lbimageview.dia -emit-dependencies-path /users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/objects-normal/x86_64/lbimageview.d -emit-reference-dependencies-path /users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/objects-normal/x86_64/lbimageview.swiftdeps -o /users/l.walsh/library/developer/xcode/deriveddata/labbot-hjckzfsxfeqqsxdbhfipevwfcmkx/build/intermediates/archiveintermediates/labbot/intermediatebuildfilespath/labbot.build/release/labbot.build/objects-normal/x86_64/lbimageview.o  <module-includes>:1:9: note: in file included <module-includes>:1: #import "/users/l.walsh/documents/developer/labbot/labbot.h"     ^ /users/l.walsh/documents/developer/labbot/labbot.h:16:9: note: in file included /users/l.walsh/documents/developer/labbot/labbot.h:16: #import "drhexperimentdata.h"     ^ /users/l.walsh/documents/developer/labbot/drhexperimentdata.h:12:9: error: 'labbot/labbot-swift.h' file not found #import <labbot/labbot-swift.h>     ^ <unknown>:0: error: not build objective-c module 'labbot' 

has experienced , solved it? have ideas?

thanks on this, lee.

so turns out can't #import swift module headers obj-c .h files, must put them in .m files. removed #import <labbot/labbot-swift.h> class.h , put in .m file. problem solved.

note, need @class statement in .h file if interface refers class defined in swift module want import.

unfortunately, reason xcode let me away importing module headers .h files when building debug. spat dummy when building release. furthermore, xcode not throw error related offending obj-c class, throws errors relating classes part of swift module being included.

maybe there build setting stops letting debug allow (or lets release allow it), not find it.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -