Code Monkey home page Code Monkey logo

Comments (4)

PetroccoCo avatar PetroccoCo commented on July 21, 2024 1

I had similar issues as other cordova plugins use swift bridging headers. The fix that I implemented was to create a master header file, Unified-Swift-Header.h, and then include all of the headers from the plugins there:
Note All the plugin headers must be on the header search path (they should be by default)

//
//  Use this file to import your target's public headers that you would like to expose to Swift.
//

//cordova-plugin-apple-watch 0.8.2 "Apple Watch"
#import "Watch-Bridge.h"

//com.eface2face.iosrtc 1.1.1 "iosrtc"
#import "Bridging-Header.h"

As @ibc said above you then must manually set the ObjectiveC Bridging header path to this file, you can grep for the string SWIFT_OBJC_BRIDGING_HEADER to see if you have set them all correctly:

$ grep -Ir SWIFT_OBJC_BRIDGING_HEADER platforms/ios
platforms/ios/cordova/build.xcconfig:SWIFT_OBJC_BRIDGING_HEADER = /Users/pwinters/workspace/ionic_collab/platforms/ios/Unified-Swift-Header.h
platforms/ios/mobile-collab.xcodeproj/project.pbxproj:              SWIFT_OBJC_BRIDGING_HEADER = "Unified-Swift-Header.h";
platforms/ios/mobile-collab.xcodeproj/project.pbxproj:              SWIFT_OBJC_BRIDGING_HEADER = "Unified-Swift-Header.h";
platforms/ios/mobile-collab.xcodeproj/project.pbxproj:              SWIFT_OBJC_BRIDGING_HEADER = "Unified-Swift-Header.h";
platforms/ios/mobile-collab.xcodeproj/project.pbxproj:              SWIFT_OBJC_BRIDGING_HEADER = "Unified-Swift-Header.h";
platforms/ios/mobile-collab.xcodeproj/project.pbxproj:              SWIFT_OBJC_BRIDGING_HEADER = "Unified-Swift-Header.h";
platforms/ios/mobile-collab.xcodeproj/project.pbxproj:              SWIFT_OBJC_BRIDGING_HEADER = "Unified-Swift-Header.h";

from cordova-plugin-iosrtc.

ibc avatar ibc commented on July 21, 2024

In order to compile and run the plugin in XCode you must do the following in your app XCode build settings:

  • Set iOS deployment target to something > 8.0.
  • Set ObjectiveC Bridging header to the path in which Bridging-Header.h is placed (platforms/ios/YOU_PROJECT_NAME/Plugins/com.eface2face.iosrtc/Bridging-Header.h) <-- check it, may be different.
  • Set runpath search paths to $(inherited) @executable_path/Frameworks.

This is what the Plugin's hook does, but it does not work on the generated XCode. I expect this to be an issue in Cordova given that I've found similar reports.

Please check my steps and confirm they work. If so I'll add them to the documentation (please ensure you get the relative path of the bridging header).

from cordova-plugin-iosrtc.

QuentinVolant avatar QuentinVolant commented on July 21, 2024

Thanks, it works after done these steps. It was the path to Bridging header which was empty.

from cordova-plugin-iosrtc.

ibc avatar ibc commented on July 21, 2024

Guys, thanks for your comments. I've released version 1.2.1 and added documentation about using Xcode and multiple Swift plugins:

https://github.com/eface2face/cordova-plugin-iosrtc/blob/master/docs/Building.md

from cordova-plugin-iosrtc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.