- I added the files directly to my project from finder to Xcode.
- Bridging header was automatically created by Xcode.
- #import the Class into the Bridging header - no issues on the Bridging Header.
I try to instantiate Class var into swift class - "use of undeclared type" error shows up.
- Notes: When I try to COMMAND + click on the #import I get the message "Symbol Not Found".
# Imported Obj-C class through automatically created Bridging header, Bridging header seems to find it but Swift class won't
163 Views Asked by moyoteg At
2
There are 2 best solutions below
Related Questions in OBJECTIVE-C
- How do I customize NSOutlineView to have border color?
- UIWebView Screen Fitting Issue
- How to hide "Now playing url" in control center
- CloudKit: Preventing Duplicate Records
- Image and Text locations in UIButton
- setting OpenGL version in objective-C
- Setup code for xibs in iOS. -awakFromNb:
- realm db, get parent link of object
- CFBundleDocumentType is not working in myproject-Info.plist file
- UIPopoverPresentationController not rendering properly
- Using Storyboard Reference
- Pass Data between two view controllers using 'Delegation' : Objective-C
- Unexpected CALayer Vertical Flipping on 3D Rotation 'Bounce'
- Setting View orientation to portrait is ignored
- UITextField append / between dates while enforcing character limit
Related Questions in SWIFT
- Overlapping UICollectionView in storyboard
- Cannot pod spec lint because of undeclared type errors
- Swift code with multiple NSDateFormatter - optimization
- How do I add multiple in app purchases in Swift Spritekit?
- cellForRowAtIndexPath and prepareForSegue return different label colors
- Getting this message in my console in xcode "Ignoring restoreCompletedTransactionsWithApplicationUsername: because already restoring transactions"?
- Change background of an Accessory View in a UITableViewCell
- fade in an bounce animation subview
- Create a PFObject and PFRelation after PFUser Sign Up
- Swift 2 - Pattern matching in "if"
- How do I give inputs through NSURL
- How do I add custom cells to TableView in Swift?
- UIWebView not loading URL in simulator
- Compiler complains that 'Expression resolved to unused function' when removing index in array of functions
- Cast from 'Int?' to unrelated type 'NSNumber' always fails
Related Questions in IMPORT
- Django invalid literal for int() with base 10:
- Importing a downloaded JAR file into a Servlet
- Importing with package name breaking enum comparison in Python
- Being able to print before declaring. PYTHON
- R Importing excel file directly from web
- Connect to database and export to sql script
- Import Git SVN cloned repository into existing Git repository
- Python Searching for files and Importing them
- Python Importlib Not Finding Modules
- Python dynamic from?
- Android Importing Project -- FloatingActionButton cannot be found
- importing function giving scoping error
- How can I add an image in the drawable/res folder?
- importing external ".txt" file in python
- Import dataset with spanish special characters into R
Related Questions in HEADER
- sorting all data on multiple pages by clicking on its header
- Chrome print preview disable only link location in footer and header
- Keeping middle item centered horizontally
- Class enumerator values cannot be passed as parameters to another class's function
- Mobile Header not working properly
- Text before php header not giving errors
- Checking proxy anonymity in Java
- PHP Header Location - redirect to URL with HTML anchor
- Save cookies between two curl requests
- What do I have to consider when putting all code in the header?
- Cocoapods generate bad xcconfig file - no header search path
- multiple header files redefinition error in C
- Loop for reading txt file with multiple headers and detail items in php
- Header Content 3 (tagline area) set to Banner, shortcode for cart added. How to reposition and align
- Aligning headers/footers using responsive styles
Related Questions in BRIDGING-HEADER
- # Imported Obj-C class through automatically created Bridging header, Bridging header seems to find it but Swift class won't
- Obj C bridging header does not seem to matter?
- Failed to Import Bridging Header Error
- swift zeromq c bridging header - cannot find types
- Callback Functions in React Native Swift Modules
- typedef struct from C to Swift
- @testable import and Bridging header don't work simultaneously
- Swift protocol as an init parameter called from Objective C class
- Cannot find protocol declaration for 'UNUserNotificationCenterDelegate'
- Getting "file not found" in Bridging Header when importing Objective-C frameworks into Swift project
- Unrecognized selector sent to class when accessing a ObjC++ function from Swift in tvOS
- Failed to emit precompiled header for bridging header error after adding test target
- Error using Objective-C structure in Swift (Cannot find type 'XXX' in scope)
- C-style struct in Objc not importing to Swift
- Objective-C++ and Swift - nested structs in bridging header
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?

Turns out that file (A.swift) that was trying to reference the "other file" (B.swift) had "test target membership" selected! So I either had to add the "other file"(B.swift) to the test target membership or remove file (A.swift) from the test target membership. I hope that makes sense and that it is of help to someone.