bridging-header Questions

7

I added a new Test target to my Xcode project. My project has Swift code and Objective-C code, and has a bridging header. Upon either adding the bridging header to UnitTesting's build settings, or ...
Libau asked 5/2, 2015 at 12:3

5

Solved

I updated to Xcode 8.3 and Swift 3.1 and got this warning in my bridging header file, referencing to an Objective-C header file: Non-portable path to file "File.h"; specified path differs in cas...
Sestina asked 28/3, 2017 at 10:23

2

I am working on an iOS project developed using Objective-C. I need to integrate some Swift files in it. So, did following: Added a new Swift file named "temp", so that MyProject-Bridging...
Rollo asked 28/12, 2017 at 14:27

25

Solved

I have a Swift project for which I'm trying to import ObjC-based frameworks. The framework is located in a directory under the project's path and is referenced by the project in Xcode. It's also ad...
Reeba asked 16/12, 2014 at 1:23

9

Solved

I imported an Obj-C file into my swift project and Xcode automatically prompted me to create a bridging header file as expected. However, I deleted both the files (moved to trash) to make some chan...
Porism asked 30/7, 2015 at 6:18

1

In a Swift project that has mixed Obj-C and C++, I have a class that extends the class belonging to a 3rd party framework. When I compile the project, the compiler complains that it Cannot find int...
Truncate asked 9/12, 2017 at 22:26

4

Solved

I am getting Use of undeclared identifier for every Facebook Object I use Following this tutorial: TUTORIAL: HOW TO SHARE IN FACEBOOK SDK 4.1.X FOR SWIFT But I've got the following error: I'v...
Rotator asked 25/10, 2015 at 9:20

6

Hi I'm getting a very annoying error on Xcode 10 that is 1 error generated. <unknown>:0: error: failed to emit precompiled header '/Users/me/Library/Developer/Xcode/DerivedData/APP-hlczpcke...
Dark asked 23/9, 2018 at 5:13

0

The problem I'm encountering, and absolutely not understanding, is why can my Swift code not access an bridged C-style struct import from objective-c when a NSString pointer is contained, whereas t...
Cavil asked 23/11, 2020 at 10:59

5

Solved

I am trying to add objective-c libraries to my Swift 3 project (Xcode 8 IDE). But objective c interface header is not getting generated automatically. I tried to add bridging header manually but sh...
Crim asked 21/9, 2016 at 11:10

2

In an iOS application I have a subproject (not cocoapods) in which I have included a swift file and ObjC file (that is used by the swift file). XCode automatically created a bridging file but could...
Reclaim asked 12/4, 2019 at 12:22

3

Solved

I have an existing Objective-C iOS project and I want to add swift files to it. The project has 2 targets. I created the bridging header MyProject-Bridging-Header.h file and the automatically crea...
Tetratomic asked 21/4, 2016 at 13:13

2

EDIT: Getting negatives for such a detailed and HONEST question? Sometimes I don't really get Stack Overflow. Really. Hi, I'm trying to create a PoC using Swift 5 (Xcode 10.2.1) and a modern ren...
Vomitory asked 12/6, 2019 at 16:43

1

Running my project in Xcode 10 throws me this error fatal error: 'Stories-Swift.h' file not found I've tried multiple things including: Adding a new swift file to the project and rebuilding ...
Raynaraynah asked 24/9, 2018 at 17:48

5

I have visited this links - MyClass is unavailable: cannot find Swift declaration for this class - Release Build Only Adding Linked or Embedded Swift Framework: 'MyClass' is unavailable:...
Binding asked 31/8, 2015 at 13:30

1

Solved

According to this tutorial, we should add use_frameworks! to Podfile in Swift project. But how to use third-party code in .m in the same project? One possible way is, Do NOT add use_frameworks! ...
Cream asked 3/11, 2015 at 6:41

1

I read this instructions to use google analytics in my app https://developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift so I installed pod 'GoogleAnalytics' into my app and creat...
Milena asked 4/3, 2018 at 7:42

19

Solved

Following instructions, I've created a bridging header and added to my project. Unfortunately, the following error occurred: :0: error: could not import Objective-C header '---path--to---header/...

3

Solved

I am trying to extend a class written in Obj-C and include an extension written in Swift that makes it conform to the UIDropInteractionDelegate, like so: @available(iOS 11.0, *) extension NoteEdit...

5

Solved

Before I added a new dependency to my test project via CocoaPods, I have already added a C header file ('wahoo.h') and exposed it to the swift code via a bridging header file "wahoo-Bridging-Header...
Antiseptic asked 9/9, 2014 at 8:10

2

Solved

I'm working on a project that contains Swift and Objective_C code, it works without any problem until i was trying to import a ".h" class in my "Bridging-Header" file: Expected a type : in the cl...
Tervalent asked 26/5, 2017 at 10:47

2

I have an objective-c project with one class implemented in Swift. The project has with two targets: A and B. For both of them the Xcode created the bridging header files, A-Swift.h and B-Swift.h, ...
Jerky asked 6/7, 2016 at 8:12

1

Solved

I am using Xcode 8.0, I have created Swift Bridging Header Manually. But I could not find the option Ojective-C Bridging Header under Swift Compiler – Code Generation. (under Targets). Please see t...
Puffy asked 14/12, 2016 at 4:50

2

Solved

I just tried to update from cocoapods 0.39.x to Cocoapods 1.0. Running pod install from the terminal causes no warnings. Everything seems normal. However, when I try to build my project it out...
Perfectly asked 22/5, 2016 at 17:32

2

Solved

enter image description here I am trying to use SDWebImage in a Swift project. I dragged and dropped the SDWebImage library folder into my Swift project and created a bridging header by name listi...
Leyden asked 18/7, 2016 at 6:26

© 2022 - 2024 — McMap. All rights reserved.