Swift—Bridging-Header import causes file not found

Asked 2 years ago, Updated 2 years ago, 148 views

I'm a beginner in iOS development, so I'm sorry if it's a rudimentary question...

I'm creating an iOS app for Swift, and I'm trying to use CorePlot to draw a pie chart. "We tried the following steps with reference to this blog ""Using CorePlot with Swift in iOS "

"."

However, an error occurs when importing as shown below.

import error

When I actually checked the file's existence, it was in Users/USER_NAME/Document/workspace/PROJECT_NAME/Pods/CorePlot/framework/CorePlot-CocoaTouch.h.

Therefore, I thought that the pass might be bad, so I corrected it by referring to this Qiita article Swift: Checkpoint memo when the ObjectiveC code cannot be viewed from Swift but it has not changed before. I tried the "import file in Bridging-Header becomes file not found" from the test project.

How should I deal with this?If you have any additional information to add, I would appreciate it if you could comment on it.
Thank you for your cooperation.

ios swift core-plot

2022-09-30 20:35

1 Answers

As far as I've tried as I've just mentioned on the site, there were no errors.

The Pod file was located in three locations under the project folder:

mbp:SOJ6621 user$find.-name "CorePlot-CocoaTouch.h"
./Pods/CorePlot/framework/CorePlot-CocoaTouch.h
./Pods/Headers/Build/CorePlot/CorePlot-CocoaTouch.h
./Pods/Headers/Public/CorePlot/CorePlot-CocoaTouch.h

What do you want me to reconfirm (or provide you with information)?

  • Close the project file xcodeproj and work with the workspace file xcworkspace
  • Bridging-Header Location
  • Does the header path specified in the compiler configuration match the location?

I think there is.
I will attach an image of my environment, so please refer to it.

  • pod install result

pod install result

  • Header File Location and Contents

Header File Location and Contents

  • Compiler Configuration Objective C Bridging Header

Compiler Settings


2022-09-30 20:35

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.