Its very easy to reproduce.
A simple Swift console project with a C header file containing
// file testc.h
#include <stdio.h>
typedef struct
{
uint8_t data[4097];
}
TEST_FIXED_ARRAY;
In Build Setting specify as Objective-C Bridging Header
And test using the followng Swift code in main.swift
// file main.swift
import Foundation
print("Hello, World!")
let cStruct = TEST_FIXED_ARRAY()
let data = cStruct.data
print(data)
This work without problem using Xcode 10 with size > 4096
But with Xcode 11.2 the following error:
Value of type 'TEST_FIXED_ARRAY' has no member 'data'
So the compiler simply don't see the 'data' member.
Changing the size to 4096 and its fine.
Changing the type to uint16_t and same result, So not related to the member type but the array size.
There is a many article related to Swift interop with C and fixed-array. C fixed are imported as Swift tuple. This is not the problem, I can process the tuple in Swift to get the data bytes. The problem is related to the C array size when imported with Xcode 11.