-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Description
Description
As commented here the recently introduced change to relatively locate the icudt.dat file inside an app bundle works fine.
However, when a NativeAOT'd library is included and called from an XCTest bundle, -[NSBundle mainBundle] returns a path inside Xcode instead of the test bundle:
let mainPath = Bundle.main.bundlePath
// /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents
let testPath = Bundle(for: SomeTypeInTheTestBundle.self).bundlePath
// ~/Library/Developer/Xcode/DerivedData/TestBundle/Build/Products/Variant-ASan/Debug-iphonesimulator/TestBundle.xctestOf course this causes the load to fail because the icudt.dat will never be in Xcode's app bundle.
If the XCTest project is however set up to copy this file to it's bundle resources folder, it would be there waiting to be consumed by the .NET runtime but currently fails because the logic of locating it just targets the main bundle.