The IPA generated for the project contains references to the malloc function, which is flagged as an insecure function. This occurs when using standard higher-order functions such as filter, first, etc., on arrays containing value-type elements.
How can we address or eliminate this security finding?
Example code
struct ContentView: View {
let arr = [1,2,3]
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
.padding()
.onAppear{
let twos = arr.filter{ $0 == 2 }
}
}
}
1
0
28