Post

Replies

Boosts

Views

Activity

Reply to Xcode 11.4 : Building for iOS Simulator but the linked library was built for Mac OS + iOS
We encountered the same problem. This is what I found out:When a static library is added to the Xcode project (through Build Phases -> Link Binary With Libraries -> Add Other), Xcode automatically adds the relative path to that .a file to its file reference entry.Prior to Xcode 11.4, this path was apparently removed during build, and replaced by the evaluated path generated from the current build settings, i.e. the actual configuration (Debug/Release) and the actual platform (iphoneos or iphonesimulator).Starting from Xcode 11.4 however, this is apparently not happening anymore, and the build system is always using the explicit path set when the library was added.By manually editing the project.pbxproj file for the iOS project, I removed the "path" attribute from the respective entries, e.g. changed from A15F487B16C934CE00D6F824 /* libmurl_engine.a */ = { isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmurl_engine.a; path = "ios/Release-iphoneos/libmurl_engine.a"; sourceTree = ""; };to A15F487B16C934CE00D6F824 /* libmurl_engine.a */ = { isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmurl_engine.a; sourceTree = ""; };After this change, I was able to compile the project for both the actual iOS target as well as the simulator.Hope that helps.
May ’20