Initialization error with CDYelpFusionKit - ios

Trying to use the CDYelpFusionKit api for an app, and I'm getting an error on the first step:
let yelpAPIClient = CDYelpAPIClient(apiKey: "myapikeyhere")
It's saying that it's an
Use of unresolved identifier 'CDYelpAPIClient'
but I have already installed the dependencies with cocoapods.

You also need to import the framework
import CDYelpFusionKit

Related

How to add Firebase Functions v8 to a Swift iOS project and use Codable in httpsCallable?

I have a Swift 5.5 iOS project that already contains Firebase 7.x and uses Firebase Functions. I just upgraded to 8.13.0, because I want to use Codable support in Firebase Functions.
I added Firebase through the Swift Package manager and included Firebase Functions in my source code using:
import FirebaseFunctions
However, when I want to call:
func httpsCallable<Request: Encodable,
Response: Decodable>(_ name: String,
requestAs: Request.Type = Request.self,
responseAs: Response.Type = Response.self)
I get an error saying that it doesn't find this method.
Upon inspecting the packages, I discovered that the function I want to call is defined in FirebaseFunctionsSwift in a file called Callable+Codable .
This exists in my project as you can see:
However when I add import FirebaseFunctionsSwift to my source file I get the following error:
No such module 'FirebaseFunctionsSwift'
How can I solve this problem?
Add FirebaseFunctionsSwift-Beta framework to the build target:

Error - No such module CCXGoogleSDK

I have to fetch all nearby ATM and for this I am using CCXGoogleNearbyPlaces framework using cocoapods (Reference: https://cocoapods.org/pods/CCXGoogleNearbyPlaces)
But I am not able to use CCXGoogleSDK class. I am getting this error:
you should need to import CCXGoogleNearbyPlaces.
import CCXGoogleNearbyPlaces instead of import CCXGoogleSDK

Use of undeclared type 'cocoapods library'

I made a pod Here and pushed cocoapods succesfully. When I try to test my library I added
pod 'TDTextSlider'
to my podfile of another test project.It is installed and imported without error but when I try to use the library with this code
let td : TDTextSlider = TDTextSlider(frame: UIScreen.main.bounds)
I got "Use of undeclared type TDTextSlider" error but when I copy the swift.class manually its working.What am i doing wrong?
Make sure the classes you are trying to access are public or Open.

Cannot implement Swift SSLCreateContext

I am new to iOS development, and am trying to implement an SSL connection to a custom port.
I found the code from this answer as the best/easiest implementation of a secure connection over a socket https://stackoverflow.com/a/30733961/2306428
However, I am getting these errors:
Use of unresolved identifier 'kSSLClientSide'
Use of unresolved identifier 'kSSLStreamType'
Use of unresolved identifier 'kSSLSessionOptionBreakOnClientAuth'
I have checked and I am running Swift version 2.1.1, using iOS 9.2 SDK and Xcode 7.2. I have even tried adding import Security but that has no effect.
What is the reason that these constants are not being found?
The line being tested is here: https://github.com/ksred/bank-ios/blob/master/Bank/TCPClient.swift#L209
Please use the identifiers declared in Swift:
if let sslContext = SSLCreateContext(kCFAllocatorDefault, SSLProtocolSide.ClientSide, SSLConnectionType.StreamType) {
SSLSetIOFuncs(sslContext, sslReadCallback, sslWriteCallback)
SSLSetConnection(sslContext, &socketfd)
SSLSetSessionOption(sslContext, SSLSessionOption.BreakOnClientAuth, true)
SSLHandshake(sslContext)
}

Cannot use class from TSMessage library imported via cocoaPods

I have installed cocoapods in a swift project and installed TSMessage through it. No problem there, but when I try to use it with this instruction:
TSMessage.showNotificationWithTitle("Success Notification !!!", type: .Success)
I get the error :
Use of unresolved identifier 'TSMessage'
I include it like this in my bridging header:
#import <TSMessages/TSMessage.h>
Actually I finally found the answer in this article, you have to add import TSMessages at the top of the file where you want to use this class

Resources