Benni
Benni

Reputation: 969

Installing and using pod

I'm having issues using a pod. I want to initialise Backendless and use as backend, but Xcode cannot resolve the library as it seems. When I try(AppDelegate.swift):

import UIKit


@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {


let APP_ID = "xxx"
let SECRET_KEY = "xxx"
let VERSION_NUM = "v1"

var backendless = Backendless.sharedInstance()

var window: UIWindow?

I get

Use of unresolved identifier 'Backendless'

and what I did was:

  1. Create a new project, closed xCode.
  2. Created a pod file and edited it to take my library
  3. Installed without fault
  4. Opened the workspace file generated with the pod instalment.
  5. Built project

and then I tried to initialise the library as shown above.

platform :ios, '8.0'
use_frameworks!

target 'Test' do
pod 'Backendless'
end

target 'TestTest' do

end

I have tried cleaning, building and restarting xcode. But I suspect I'm missing a crucial step somewhere?

Thanks in advance

Upvotes: 0

Views: 120

Answers (1)

Danny Yassine
Danny Yassine

Reputation: 681

since you are specifing:

use_frameworks!

in your podfile, in order to use any on your pods, you must use import in order to use the specific pod in the file you want to use it.

In your AppDelegate.swift:

import UIKit
import Backendless

Second of all, your pod name should be

pod 'Backendless-ios-SDK'

https://github.com/Backendless/ios-SDK

Upvotes: 2

Related Questions