0

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

4
  • Aren't you missing a import Backendless or something similar? Commented Oct 17, 2016 at 13:15
  • @Larme Where and how? Next to "import UIKit"? And what may the syntax be? I tried with import Backendless , but it doesn't recognise it. Commented Oct 17, 2016 at 13:18
  • @Benni When I use use_frameworks! I almost always import the module using import module then just build the project. This usually fixes any import issues I have Commented Oct 17, 2016 at 13:20
  • 1
    If you use Swift, add to your bridging header file the following... see full description github.com/Backendless/ios-SDK Commented Oct 17, 2016 at 13:24

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

4 Comments

No such Module 'Backendless' is the error when trying to import.
Is the pod name you are installing correct? Check this out pod 'Backendless-ios-SDK' (github.com/Backendless/ios-SDK)
I reinstalled with the correct pod name. Still the same. Saw a ticket on Backendless describing to use "#import <Backendless-ios-SDK/Backendless-Bridging-Header.h>" in the bridging header. But where is that?
You must create a Bridging Header file in order to import objective-c code into a Swift project. Since this is not the original question, heres a like: learnswiftonline.com/getting-started/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.