Sorry for the title, I can\'t find words to describe my question in few words.
I already know that swift can use struct written in c. For example
In Bridging-Hea
You should be OK if you include the original header where Pointer is typedef-ed in ___Bridging-Header.h
So for example if you have foo.h where you declare your struct and your functions, then instead of doing any additional typdef calls in your bridging header just #import foo.h
Then your Swift code should be able to see the symbols declared in foo.h
Update:
What you need:
#include foo.h
For example, I have a Swift project. In this project I have a Swift file (main.swift), a C header (test.h), a C source file (test.c), and a Bridging Header (test-Bridging-Header.h).
Their contents are as follows:
void printFoo();
#include
#include "test.h" void printFoo() { printf("foo\n"); }
#import "test.h"
import Foundation println("Hello, World!") printFoo()
When run, this outputs:
Hello, World! foo