Questions tagged [bridging]
39 questions
5
votes
1 answer
What is missing in this Swift name macro for a bridged Objective-C method?
Xcode reports this warning:
parameter of 'swift_name' attribute must be a Swift function name string"
For the following function. I do not know what I wrote incorrectly.
+ (CGFloat *)feedDetailWithUpdate:(PostUpdate *)update
…

Max Miranda
- 191
- 5
5
votes
1 answer
How to use RCTConvert in react
I am new to react and working on react bridging modules. I just want to know that how the RCTConvert is useful and how can use that. I am following this site
link
Please, anyone helps me to know about this stuff.

Ramakrishna
- 712
- 8
- 26
4
votes
1 answer
What is a bridging conversion in Swift as in the following warning: Conditional downcast from 'Data?' to 'CKRecordValue is a bridging conversion
What is a bridging conversion in Swift? What does "bridging" mean?
I get a warning in the following code where I marked with a comment saying "// warning":
import UIKit
import CloudKit
let int: UInt8 = 1
let data: Data? = Data([int])
let record:…

daniel
- 1,446
- 3
- 29
- 65
4
votes
1 answer
wrapping std::vector from C++ to C for use in Swift
I want to use a program which is written in C++ in Swift 4. I already read and understood the description how to do the briding and wrapping as described in http://www.swiftprogrammer.info/swift_call_cpp.html.
However, real life is more complicated…

Heinz M.
- 668
- 3
- 8
4
votes
1 answer
Matching a Swift protocol from an Objective-C Protocol instance
I'm looking for a way to match dynamically an Objective-C Protocol instance with a corresponding Swift protocol.
I have a protocol defined in swift that is compatible with Objective-C:
@objc(YHMyProtocol) protocol MyProtocol { }
I try to perform…

yageek
- 4,115
- 3
- 30
- 48
4
votes
1 answer
Bridging 'NSNumber' to 'Int' warning
Is this warning anything that I should be concerned about?
If so what would be a solution?
this is my function :
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let destination = segue.destination as?…

Step Step
- 97
- 1
- 12
3
votes
1 answer
NS_REFINED_FOR_SWIFT and return value
I'm new with Swift and I begin exploring some feature for bridging with Objective-C.
Currently I have a method with NSError reference which is:
- (BOOL) verifyPersonalizationWithError:(NSError **) error NS_REFINED_FOR_SWIFT;
Now I can access the…

marco.bollati
- 31
- 4
2
votes
1 answer
Connection refused to localhost with Docker container (Windows)
I'm working on Windows with Docker Desktop.
I built a Docker container which has this Dockerfile:
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y \
default-jre \
default-jdk \
&& rm -rf /var/lib/apt/lists/*
COPY ./src/…

Alberto
- 83
- 2
- 7
2
votes
1 answer
How to create an openvswitch bridge using main network interface with Ansible?
Mainly I am trying to build an ansible role/playbook that would configure an openvswitch bridge that is using the main/primary network interface of the machine and avoid the most common problem with openvswitch bridges -- getting locked out when you…

sorin
- 161,544
- 178
- 535
- 806
2
votes
1 answer
Annotate NSArray * in Objective-C so that it is bridged to Array
Is there a way to annotate an NSArray of NSNumber:
@property (nonatomic) NSArray *myProperty
in Objective-C, so that it will be imported in Swift as
var myProperty: [Int] instead of var myProperty: [NSNumber]?
I know of NS_SWIFT_NAME,…

Trenskow
- 3,783
- 1
- 29
- 35
1
vote
1 answer
Query for retrieving data from a bridging table of many to many relationship
I have a table SQL server with two joining or bridging tables because of the many-to-many relationship.
I wonder if anyone can write the query to retrieve data or perform CRUD operations for this table that updates all these three tables.
Please…

S. Omer Sadaat
- 15
- 4
1
vote
0 answers
Bidirectional Javascript - Swift bridge for common business logic
I'm looking for a solution to setup a swift SDK (e.g. framework) that access shared business logic from a javascript bundle (shared with for example an android app or SDK). I don't want to use webviews etc...
shared business logic in javascript…

WilliamVH
- 11
- 3
1
vote
1 answer
Swift Unable to bridge NSNumber to Float
So I have a NSArrays loaded with for pitch and yaw values saved on a Shot object.
@interface Shot : NSObject
@property (strong, nonatomic) NSArray *pitch;
@property (strong, nonatomic) NSArray *yaw;
I am trying to do some number crunching in swift…

Chase Roberts
- 9,082
- 13
- 73
- 131
1
vote
3 answers
Possible Bug in Swift 3 with Implicit Bridging of multidimensional arrays?
I am currently working on a SpriteKit game written in Swift 3.
When I tried generating SKShapeNodes from points stored in a multidimensional array, using the init(splinePoints: UnsafeMutablePointer, count: Int) initialiser, I found that I just was…

Jeffrey Douglas
- 53
- 3
1
vote
2 answers
After importing Objective C Framework into my Swift project, my project does not recognise my header file in my Bridging file
I've got to import a Framework into my Swift project that is written in Objective C. So I've created a Bridging file and after I've added the Header files to it and compiled, my project says it cannot find them. The image below shows my Framework…

user616076
- 3,907
- 8
- 38
- 64