I am attempting to run the MasterPass sandbox sample app in Xcode 13.3 provided by the MasterPass docs, however the
error: using bridging headers with module interfaces is unsupported
error in my logs keeps persisting. I am attempting to do this because I would prefer to tinker with it first before integrating it with my project
I am using Xcode 13.3, macOS Monterrey mac mini 2018 32GB. I have gone through quite a number of similar questions here on stackoverflow on the same issue, but the solutions thereof have been unsuccessful on my project at this time, hence the need to ask a separate question, with particularity on using the MasterPass iOS SDK
- First, I got the following error message during compilation on the MerchantServices and MCCMerchant frameworks
building for ios simulator, but the linked and embedded framework 'mcc merchant.framework' was built for ios + ios simulator
I resolved that by going to my Build Settings on the specified target and setting the value on Validate Workspace to YES
- I attempted to build the project and this second error popped up
module compiled with swift 5.0 cannot be imported by the swift 5.6 compiler
This I resolved by setting the Build Settings > Build Options > Build Libraries for Distribution option to Yes
- Next build attempt resulted in the following error messages, but this time, it was in the crash logs
remark: incremental compilation has been disabled: it is not compatible with whole module optimization
error: using bridging headers with module interfaces is unsupported
I then resolved the remark by setting the Build Settings > Swift Compiler > Compilation Mode option to Incremental
leaving
error: using bridging headers with module interfaces is unsupported
unresolved
- I took the following steps to try to resolve the issue
4.a - Created a modulemap file to expose the Objective-C headers to my Swift project, BridgingMerchantModule.modulemap
4.b - the following code was in the provided MerchantCheckoutApp-Bridging-Header.h file
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "SDWebImage/UIImageView+WebCache.h"
4.c - I wrote the following Swift code in my modulemap file
module BridgingMerchantModule {
header "SDWebImage/UIImageView+WebCache.h"
export *
}
4.d - Removed the provided bridging header file from the project (MerchantCheckoutApp-Bridging-Header.h)
4.e - In Project Settings > Build Settings > Swift Compiler - Search Paths > Import Paths I added the path to the module map file on my Mac
However the error persists, I am at my wits end and I would appreciate any help
The following is the complete build log
Compile Swift source files (x86_64)
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'MerchantCheckoutApp' from project 'MerchantCheckoutApp')
cd /Users/user226714/Desktop/masterpass_merchant_ios_sdk_v280-2/SampleSourceCode/MerchantCheckoutApp
export DEVELOPER_DIR\=/Applications/Xcode13.3.app/Contents/Developer
export SDKROOT\=/Applications/Xcode13.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.4.sdk
/Applications/Xcode13.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name MerchantCheckoutApp -O -enable-batch-mode -enforce-exclusivity\=checked @/Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/Objects-normal/x86_64/MerchantCheckoutApp.SwiftFileList -DDEBUG -sdk /Applications/Xcode13.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.4.sdk -target x86_64-apple-ios9.0-simulator -g -module-cache-path /Users/user226714/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -enable-testing -enable-library-evolution -swift-version 4 -I /Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Products/Release-iphonesimulator -F /Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Products/Release-iphonesimulator -F /Users/user226714/Desktop/masterpass_merchant_ios_sdk_v280-2/SampleSourceCode/MerchantCheckoutApp/Carthage/Build/iOS -F MerchantCheckoutApp/ExternalComponents -c -j4 -output-file-map /Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/Objects-normal/x86_64/MerchantCheckoutApp-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/Objects-normal/x86_64/MerchantCheckoutApp.swiftmodule -emit-module-interface-path /Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/Objects-normal/x86_64/MerchantCheckoutApp.swiftinterface -Xcc -I/Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/MerchantCheckoutApp-generated-files.hmap -Xcc -I/Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/MerchantCheckoutApp-own-target-headers.hmap -Xcc -I/Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/MerchantCheckoutApp-all-target-headers.hmap -Xcc -iquote -Xcc /Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/MerchantCheckoutApp-project-headers.hmap -Xcc -I/Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Products/Release-iphonesimulator/include -Xcc -I/Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/DerivedSources-normal/x86_64 -Xcc -I/Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/DerivedSources/x86_64 -Xcc -I/Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/DerivedSources -Xcc -DDEBUG\=1 -emit-objc-header -emit-objc-header-path /Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/MerchantCheckoutApp.build/Release-iphonesimulator/MerchantCheckoutApp.build/Objects-normal/x86_64/MerchantCheckoutApp-Swift.h -import-objc-header /Users/user226714/Desktop/masterpass_merchant_ios_sdk_v280-2/SampleSourceCode/MerchantCheckoutApp/MerchantCheckoutApp/Modules/BridgingMerchantModule.modulemap -pch-output-dir /Users/user226714/Library/Developer/Xcode/DerivedData/MerchantCheckoutApp-evrhdgvhehrtuybmevsukiurddrn/Build/Intermediates.noindex/PrecompiledHeaders -working-directory /Users/user226714/Desktop/masterpass_merchant_ios_sdk_v280-2/SampleSourceCode/MerchantCheckoutApp
error: using bridging headers with module interfaces is unsupported
Command CompileSwiftSources failed with a nonzero exit code