how to use SignalR in swift 2.0 or later? - ios

I was in search for document or a sample that shows how to use SignalR in iOS with swift 2.0 or later , but didn't find any until now so I am not able to provide any code here. I am looking for sample code. I am Using Xcode 7.2 Swift 2.1.1. Asp.net mvc 4 as Backend.Later I have found some libraries like DyKnow/SignalR-ObjC and adamhartford/SwiftR but as a newbie with Swift I don't know which one Suits my Project(Creating a Chat Application that contains only Group Chats with file sharing like photos , videos etc) and how to implement the library. So looking forward for some sample on how to use SignalR with swift

Hmmm... I tried adamhartford/SwiftR and it worked for me. There is a great documentation available for using the library. hope this helps anyone searching the same. :)

Related

Google Maps SDK demo doesn't works with Swift 3.0

I am using the google maps demo (http://www.appcoda.com/google-maps-api-tutorial). After updating my Xcode to latest Version the MapTasks.swift (https://github.com/appcoda/google-maps-api-demo) has many errors with swift 3. And some how I was fixed those errors but the map isn't works and the map is not loading as well.
So, Please help me to fix it , hence I've to update it in my Current working project.
Thanks!
I guess the demo you use is a old demo. The most accurate way to try Google Maps demo is to get the demo directly from Google.
Here is a easy way to get it from Google using CocoaPods.
https://developers.google.com/maps/documentation/ios-sdk/code-samples
Finally i found the Answer at https://github.com/BhavinBhadani/MapDemo thanks to Bhavin

Many errors after update to swift 3

Hello i'm working on swift 2 with parse then i just updated to swift 3
and i got many errors the app was working perfect. Here is some errors i would get help with:
Another swift file
other errors:
How cannot assign that object into nsarray and it was working good.
so how could i fix them, any help will be appreciate.
You should read Swift 3.0 Migration Guide. It covers everything you need to know about new Swift 3 API changes. Since standard library changed a lot, it is common for third party frameworks to not work fully since they all use standard library as an underlying framework.

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

Using ShareKit with Xcode 5

My iPhone application is developed using Xcode 5. I want to use ShareKit library in order to share images and urls from my application. The problem is, that ShareKit seems to be incompatible with Xcode 5 (thought is says it is).
Attached screenshot to illustrate my problem:
Any help (or alternative solution for sharing images and URLs) will be greatly welcome.
It seems you both are referring to an obsolete, long time abandoned version of ShareKit. Check ShareKit 2. For easiest installation I recommend Cocoapods.
Have you followed the instructions here?
(It seems like you've added objc-class.h that has no use)
Also, consider using the native sharing class UIActivityViewController for sharing purposes.

Howto use Twitter-OAuth-iPhone with iOS5 and ARC

I am trying to use Ben Gottliebs Twitter-OAuth-iPhone within an iOS5 app that uses ARC.
I already flagged the files with -fno-objc-arc. But now I get a lot of errors. I don't know where to start. Without ARC the framework seems to work just fine. Any help would be appreciated.
Edit: it seems that is has something to do with SecKeychainItemRef
I can not find the answer here: https://stackoverflow.com/questions/3675522/how-to-use-mgtwitterengine-for-iphone
I hope is not considered bad etiquette to recommend my own project, but I believe it's relevant to this question, so...
I just published a new OAuth library to GitHub that's fully ARC compatible. It comes with a working demo that implements the whole Twitter OAuth flow and allows you to post a tweet. You can find it here: RSOAuthEngine.
You might want to consider using the official Twitter API that's available with iOS 5. Here's a post on how to use it: http://www.peterfriese.de/the-accounts-and-twitter-framework-on-ios-5/
You could just tell the compiler not to use ARC on the files included in that library.
ios5 ARC what is the compiler flag to exclude a file from ARC?

Resources