0

I am trying to build a Framework and make it run in iOS Simulator. It builds fine with No Custom Frameworks added to it. I am adding a Framework via CocoaPods and it starts throwing Semantic Issues and Parse Issues errors related to Foundation Framework. No idea about all the errors coming.

Attaching the Image with the errors for reference.

enter image description here

/Applications/Xcode_11.5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:11:1: Unknown type name 'NS_ASSUME_NONNULL_BEGIN'

/Applications/Xcode_11.5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:15:1: Unknown type name 'FOUNDATION_EXPORT'

/Applications/Xcode_11.5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:17:38: Unknown type name 'NSZone'

Everything works fine in the device but my primary objective is to build the Framework and make it run in iOS Simulator. I am using Xcode 11.5 and iOS 13.5. Got struck on this badly. Any help would be appreciated.

Pradeep Reddy Kypa
  • 3,992
  • 7
  • 57
  • 75

2 Answers2

1

The only correct solution i found after banging my head is to Uninstall and Install a New Xcode Version. Don't look further than this and search for a different solution. It would be a time waste effort. Just Uninstall and re-install the Xcode will do. I kept searching for a solution for about 4-5 days but only Uninstalling and Re-Installing new xcode version worked at the end.

Pradeep Reddy Kypa
  • 3,992
  • 7
  • 57
  • 75
0

i faced the same problem, reason due to the corrupted Foundation framework Fixed by replacing Foundation framework from other working xcode.app in the following path with/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework.

Prasad.Jakka
  • 159
  • 2
  • 8