How to use sunlubo/SwiftFFmpeg library in iOS swift? - ios

I am trying to use https://github.com/sunlubo/SwiftFFmpeg library in iOS to convert mp4 file to mpegts. But I am getting below error when trying to add it using SPM:
& No such module 'CFFmpeg' error when trying to add the library manually as used in the Demo project(https://github.com/sunlubo/SwiftFFmpegDemo-iOS). Can anyone provide me the steps or example on how to use this library for iOS?
I am using a M1 Macbook, Xcode 13, SwiftFFmpeg library version(1.0.5), Swift version(5.4)
Thanks in advance!

you can use Mobile ffmpeg cocoa pods like this:
pod 'mobile-ffmpeg-full-gpl'
see this answer https://stackoverflow.com/a/55312118/17927980 that's very helpful

Related

create gdal static library for xcode 9 (libgdal.a)

I need to create a gdal static library (libgdal.a) to use it in iOS. I tried this script Incorporating GDAL/OGR into an iOS project - A quick guide but it just work for iOS 6. And I also tried https://gist.github.com/lachlanhurst/745e1e1d196c3e697450 but I got a lot of warnings and errors and this script didn't generate the libgdal.a. Any suggestions?

How to compile FileMQ in iOS?

I want to implement FileMQ for file transfer from iOS to android in my iOS app.
I tried the steps given here but it causes errors at many steps. Also I need to know how should I use the downloaded library.
How should I compile FileMQ for iOS and use it?
Any information in this regard is appreciated!
I downloaded a C version of the library from the link mentioned in the question and compiled it on linux machine. I made some changes in the headers to make it iOS compatible as the headers were generated for linux. Now I am using the same copy in my iOS project.

Swift Mapbox 3.01 Framework

Trying to get Mapbox framework 3.0.1 working on Swift iOS 9.1 - Followed all the steps here : https://www.mapbox.com/ios-sdk/#binary
When rendering the xcode project, I am getting a weird error when the actual map view is called: Couldn't find resource mapbox.png in bundle.
Anyone any idea?
Sorry for the confusion here. I just updated the docs, but you want to use one of the static library downloads, with the libMapbox.a, not the framework. The framework is used for CocoaPods install and soon, in future, will be a standalone install method.

Does Swift support WebRTC?

Our team is in process of electing programming language to develop a new iOS application in which we have to write features to support video conversation.
The backend is written using WebRTC, now we have to decide which language to use in the iPhone app and we prefer Swift in this case.
However, I'm not sure Swift supports WebRTC or not.
My initial research show that we can implement the features using Objective-C. I found an example written in Objective-C which you can find the source code here.
However, I'm not sure about Swift. Does Swift also support WebRTC?
UPDATE 2023
Unfortunately, as of 2023 there still appears to be no completely Swift framework that implements the WebRTC protocol. Although the iOS framework hosted at webrtc.org can be fairly easily used in Swift apps, it is written mostly in objective C.
For those stumbling on this question, who just want to get webRTC running in your app this is still relatively easy using the cocoapod
UPDATE 2016
The easiest way is to get webRTC in your project is to simply install the CocoaPod using the directions at https://cocoapods.org/pods/WebRTC
If you have never used CocoaPods before you will need to first follow this guide: https://guides.cocoapods.org/using/getting-started.html
Original Answer
The simple answer to the question is that there are currently no open source libraries written in Swift conforming to the WebRTC protocol. You can still compile the code from the official WebRTC project into your app. Directions which may not lead to a successful build can be found here: https://webrtc.org/native-code/ios/
Finally, to clarify Omkar Guhilot's answer: Skylink is a company with a closed source SDK that is designed to work only with their paid stun-turn service, and https://github.com/alongubkin/phonertc requires cordova, which may not be ideal for many native ios developers.
Webrtc comes with Objective C interface. I dont think they will move to swift interface anytime soon. But You can always use them via bridging headers. I have written apprtc (webrtc's demo) in swift 2.3 version with help of bridging headers in github link with a description in this blog . I have planned to write 3.0 version and a swift wrappers over it.
Current version of webrtc framework doesn't require any pods or any extra bridging headers.
The framework can be generated by following instructions on this Link :
https://webrtc.github.io/webrtc-org/native-code/ios/
If you follow them correctly you will generate a framework add that framework in your project and follow the webrtc necessary steps and you will have a WEBRTC integrated project.
To know what all steps are necessary follow this link from appear.in
:
https://tech.appear.in/2015/05/25/Getting-started-with-WebRTC-on-iOS/
This will get you to a stage where you will be able to make calls between a browser and any iOS 8+ device
Yes swift supports WebRTC and there is one more library which you can use in swift link:- http://skylink.io/ios/
And the link that you have shared to which is written in Objective C, we should be able to use that as well in swift by creating a Bridging header
Have a look at this as well https://github.com/alongubkin/phonertc
Thanks
Omkar

Creating OpenFeint static library for iOS

I'm trying to create a static library of Openfeint for iOS, to use it in apps with only C++ calls. When I try to run the cocos2d-x test project with that library linked, the app is going frozen with any OpenFeint call. However, if I don't create the library and I add the sources directly to the test project, it works perfectly. I'm working with SDK 5.0, Xcode 4.2 and deploying target 4.2 (I think that it doesn't really mind, because I can run it without creating the library)
Thanks, regards!
Alternative: Use a wrapper provided on the official web to use ScoreLoop, like OpenFeint: HERE. It´s cross-plarform, work on Android, Blackberry and iOS.

Resources