'xcode does't generate .h file for swift framework project?
I created a framework writting on pure swift , but I cant find any .h file of public class . shouldn't Xcode generate .h file automaticly?
here is project structure
- ProjectName
-- ProjectName.h
-- publicClass.swift
the final projectname.framework does not contails the publicClass.h ,neither any "publicClass" string
Xcode Version 13.1 (13A1030d)
I searched the internet but got little about this problem
Solution 1:[1]
Swift doesn't use header files, you only get .swift files. If you want header file you have to use Objective-C.
Solution 2:[2]
In TARGETS, select your framework, then in Build Phases, there is a Headers section, you could put your public swift file under Public, then command + B, in your framework folder, headers file, you will see.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nandish |
| Solution 2 |
