G'day,
This is really killing me my framework project builds without error or warning in the debug configuration, but when I try to build for archive it fails because the <Module>-Swift.h
is not found. Apparently it's not being generated in this configuration.
Sometimes when this happens (in Debug) I can delete the references to the swift header, build then put back then rebuild to fix it. This does not help when building for Release.
All the swift related build settings are the same for Debug as for Release.
Here is an example of an error from the build log, note that the file LBImageView.swift does not import anything except Foundation. It make no reference to the 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 from <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 from /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: could not build Objective-C module 'LabBot'
Has anyone experienced this and solved it? Does anyone have any ideas?
Thanks for any help on this, Lee.