Current location - Health Preservation Learning Network - Slimming men and women - IOS Xcode 12 OC project introduces Swift framework, and no corresponding class can be found to solve the error.
IOS Xcode 12 OC project introduces Swift framework, and no corresponding class can be found to solve the error.
After Xcode was upgraded to 12, the original Swift framework was added to the OC project. Although the -Swift file can be imported, the class declared internally by -Swift cannot be found on the simulator, so it can be used on a real machine. After a long groping, I found a solution:

1. First, make sure that the framework of Swift includes the simulator architecture. Xcode 12 has changed the default architecture of the simulator, and there are many solutions on the Internet, so I won't go into details here.

2. Create an empty swift static library project with Xcode, then add all Swift files in the original static library and edit a new static library, which can be solved.