objective-c-swift-bridge Questions

26

Solved

I downloaded a project from GitHub, then pod the following files, some of which are written by OBJ-C and I used a bridge header. pod ‘SnapKit’ pod ‘MJRefresh’ pod ‘Alamofire’ pod ‘Kingfisher’ pod ...
Militiaman asked 20/8, 2017 at 7:30

1

I'm trying to import a Swift class into an Objective-C header file. I know that Project-Swift.h bridge can only be imported into implementation files (.m) but I've got an Objective-C header that ne...
Unessential asked 30/12, 2017 at 5:44

4

Solved

I added a bridge header to my app the other day because I was trying to add Objective-C files to my Swift project. I was having trouble getting the connection to work(and I also did not know how to...
Hawthorne asked 28/8, 2015 at 15:31

3

Solved

I have already updated to Xcode 8 and now I need to convert my code from Swift 2 to Swift 3. Before, when I want to convert NSDictionary to Dictionary, I just wrote the following: let post_paramsVa...

2

Im a rookie in Swift and Objective-C but Im trying to make a bridge from React Native to Swift, and send a JSON and a JSON Array as params to Swift. Inside React I would like to call this function...
Presence asked 29/11, 2016 at 21:52

4

Solved

The title says it all. I've searched in the build settings for SWIFT_MODULE_NAME, and nothing came up. I've also searched online, and there are references to this name, but there is no information ...
Dessiedessma asked 14/4, 2016 at 0:19

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

1

Solved

I have a class defined in Objective-C, whose initializer is -initWithError: (the initializer can fail due to a dependence on an outside resource). I want this to bridge into Swift as init() throws....

4

Solved

I am trying to access a Swift class's Double? property from Objective-C. class BusinessDetailViewController: UIViewController { var lat : Double? var lon : Double? // Other elements... } In a...
Pomerania asked 14/10, 2014 at 16:50

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/...

2

I want to validate user created expressions (like "2+2", "5+7" or more complex). I use NSExpression class to parse and calculate this expressions. This is my Playground code: import UIKit l...
Linders asked 24/4, 2017 at 10:19

1

Solved

I have an Objective-C protocol which I'm trying to implement in a Swift class. For example: @class AnObjcClass; @protocol ObjcProtocol <NSObject> - (void)somethingWithAnArgument:(AnObjcCla...
Noncompliance asked 2/10, 2015 at 20:37

1

A performance question for developers who have experience with adding swift into existent Objective-C codebase. My premise is: eventually Bridging-Header.h might become really big (it might end up...
Apparel asked 17/6, 2015 at 21:0
1

© 2022 - 2024 — McMap. All rights reserved.