I am looking for a way to include Webrtc in my iOS project. My project consists some C code which I am looking for a way to call the Webrtc apis from. I am able to do this in Android using a Makefile and linking the webrtc library. However, I haven't been able to do it on iOS. I tried to build a webrtc.framework but I am not sure how to link it to my C code. Any idea?
The WebRTC.framework that gets created by the build script has Objective-C header files. You cannot call Objective-C methods in a C source code (.c) file. You'll need to consume it in an Objective-C (.m) file or Objective C++ (.mm) file.
Google introduced and then quickly decided to drop static library target somewhere in Sep 2018. We usually build static library once a month for ios. I can share libs on github if you like.
Related
I need to build a library in C++, which have to get data from motion sensors. And then library in both android and iOS. It looks like it is possible to do it for android but I am struggling to find an answer for iOS.
You would be needing bridges for ios and android separately. Like for android you need different wrapper / JNI Bridge and different wrapper for ios Objective-c (.mm) files to used the sensor values. Ofcourse you can't share the sensor its different for each platform.
You can check this open source repository to get an idea how the wrappers around C++ and obj-c / Swift can be used.
https://github.com/foundry/OpenCVSwiftStitch
You can use C++ with iOS. The most typical way to do this is through hybrid "Objective-C++" files (.mm), which can compile C++ functionality in an Objective-C wrapper, but you can also use straight C/C++ source and C/C++ libraries. If you want your iOS app to be written in Swift (recommended), it can still use such code - I recommend wrapping the C++ in Objective-C(++) and calling the Objective-C wrappers from Swift with a bridging header.
I have a C++ project generated from Cmake to Xcode. My project is just some static and dynamic libraries. I want to include some 3rd party frameworks to it.
Is it possible? Is there any chance to include? Or I should completely redesign the project to Cocoa app?
I haven't access to the framework source code.
Work with Xcode 9.2.
No, you can't use Cocoa frameworks in pure C++ project.
But you can just create an obj-c project and include all of your existing sources inside - everything will work. Just remember to use .mm extension for the source files, calling C++ code.
You can use swift as well, but that will require to create a wrapper for C++ code.
project compiles fine, how do I export it as an iOS app though
I have a large C++ project that I'd like to turn into an iOS app... any tips on how I might go about doing this? What I've done so far is to use CMake to generate an XCode project. I've been able to subsequently build (and archive -- but I can't find the archives in the organizer) my project in XCode, but to my understanding this is merely using XCode as an IDE...
Is there an easy way to remedy this situation? Or do I need to reconstruct the project all over again iOS style. If so, any guides you might recommend?
.mm files compile to objective-c++.
This is how you will get c++ code to talk to all the IOS libraries, which unfortunately are only generally easily available in objective-c and swift.
So create c++ interfaces in .h or .hpp files, and back them up with an objective-c++ impl that then talks to the objective-c runtime.
To get cmake to work nicely with iOS, you'll need a toolchain file.
There is a nice collection that you can use as a starting point here:
https://github.com/ruslo/polly
I have an iOS static library (.a & .h file) and would like to know how to implement it into a C++ Builder project. The documentation cover's how to import a Java library in some detail but does not touch on a third party iOS library at all. Nor are there any blog posts or video's from Embarcadero about doing so.
The closest post I have found is:
Checking for an internet connection on mobile devices with Delphi XE5
However, it is not clear how to link in the .a file and then how to access the interface in the ObjC .h file.
Any help would be appreciated, and will share the completed version with Embarcadero Community so they will hopefully document how to do this eventually.
I ask you for help with the setup of ASIO sdk. I would like to use it to connect some external devices to my system but before that I am struggling to even join ASIO to my programme.
I've downloaded ASIO 2.3 from there:
http://www.steinberg.net/en/company/developers.html
and unfortunately C++ isn't my strongest point. SDK contains few folders (is folder named "Common" having every file needed?), there is no *.lib file only *.cpp and *.h files.
I don't know which files are necessary so the SDK is installed completely.
I was thinking about merging everything into one library but I don't know which files are important for SDK...
Can you give me any hints how can I add files to my program so I can start using ASIO functions in my code?
Sadly I haven't documented my ordeal last year. However, here's some pointers:
How to begin building a VSTi Plugin?
Setting up VST Steinberg SDK on Windows
Build a minimal VST3 host in C++
I admit that's basically cherry-picking the list of SO results for "steinberg", but at least the first 2 seem relevant.