0

There is an Objective-c framework in the project, the framework does not support running on simulator. It's not good for developing, so I excluded the file in Build Settings --> Excluded Source File Name, but this causes errors xxxx.h file not found. in Bridge-Header.h.

I also tried to set Validate workspace = yes, again, the framework seemed to be excluded, but it causes the errors.

How can I exclude framework correctly? and why the errors above happens?

Thanks.

jdleung
  • 1,088
  • 2
  • 10
  • 26
  • Does this answer your question? [Check for framework's existence at compile time?](https://stackoverflow.com/questions/15642067/check-for-frameworks-existence-at-compile-time) – Cy-4AH Apr 20 '21 at 14:40

1 Answers1

0

This cause errors because Xcode can't find the files in the framework!You should find out all the files that have referred to any file of the framework. After you find them out, you'd better disable the functions provided by the framework, and remove all the reference in all the files. The errors will disappear after you remove all the reference Don't delete or mess up the code, you need them when running on a real device after all.

Stoull
  • 1,098
  • 8
  • 13
  • The header file is `SVProgressHUD.h`, and it's not called by the framework. – jdleung Apr 20 '21 at 03:52
  • Is there any file or Framework in your project imported `SVProgressHUD.h`? If yes, remove the `#import SVProgressHUD.h` – Stoull Apr 20 '21 at 11:48
  • A framework disables running on simulator, and for testing I added the following so as to run in simulator, `Build Settings --> VALID_ARCHS: arm64e armv7s arm64`. App works again by removing this. Thanks. – jdleung Apr 22 '21 at 14:49