Swift SDK - “No such module Backendless” from generated code

Hi - something odd is going on when I look at the generated code from the backendless dashboard.

Once I run Pod Install/Update i look at the workspace project and it reports “No such module Backendless” when I clean the project.

I can still build/run the project but not sure why I’m getting this. I’m very new to Backendless and am sure its something silly my end…

Any help much appreciated.

Thanks
Pat

Sample Project

Should add - Xcode 11.3.1on macOS Catalina 10.15.3. MBP 16GB RAM

This sorted the issue - my main projects has multiple targets and only one of them had one of the xcconfig files attached…

This was only part of this fix - some of my group names in the project had spaces in there and that broke some references… Hopefully thats it now :slight_smile:

Well, I spoke far too soon - still have an issue running the pod. Thought I’d got past this but no…

I’ve tested on a brand new project and not having fun! Steps.
1 - Open a brand new Single View Swift iOS project
2- Run Pod Init from a terminal to get a pod file (terminal, project folder)
3 - Podfile reads

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'TestBackendlessSwiftSDK' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for TestBackendlessSwiftSDK
	pod 'BackendlessSwift'

end

4 - Run Pod Install (also Pod Update for the hell of it) - no errors
5 - Open the workspace and add Import Backendless to the AppDelegate file

Project builds/runs ok but when I clean the project I get the “No such module Backendless” error.

Any ideas, I’m about to give up on this I want to write functionality not mess about with SDKs. May well be something in my environment and cocoapods related but this is nuts and I’m not seeing it.

Thanks
Pat

Is that your entire podfile? If not, can you please update with all of it?

Also, make sure you’re opening the . xcworkspace file, not the . xcodeproj file.

Thanks for replying -
Yes, definitely opening the workspace and…
Yes, thats the complete pod file. All I added to the Pod Init generated file is the pod ‘BackendlessSwift’ entry

Hello Patrick,

I can reproduce this issue and it’s not a Backendless error.
E.g.

As for me closing and reopening the .xcworkspace worked perfectly. You can also try to define the Framework Search Paths to $(SRCROOT) and set it to recursive as they say here.

Regards,
Olha

Hmm.

All of my projects podfiles have a project “xxxx” as the first line - like this

project 'BackendlessToDo.xcodeproj'
platform :osx, '10.14'
target 'BackendlessToDo' do
  use_frameworks!
  pod 'BackendlessSwift'
end

Yours doesn’t and that seems odd.

Thanks for both your efforts… I do appreciate it.

Jay - I’ve played around with the pod file and also looked at the accompanying docs and I can’t see anything in there to help.

Olha - You’re probably right and this looks more of a cocoapods issue than a Backendless one. I’m a RDBMS guy and have been for years (MSSQL) however Backendless seems an ideal fit for what I want to work on. To have three days effort just to try and get the SDK to behave isn’t instilling confidence no matter where the issue resides. I’ve tried the attachments you put above and I’m still having “fun”…

Not sure where to go from here if I’m honest…

Thanks
Pat

I modified my podfile to match yours (removing the project designation line) and am getting the exact same error

Oh - and there was a developer document updated recently. Sign into your apple developer account and ensure you accept it. That can sometimes cause odd errors.

You could also try disintegrating the pod and then reinstalling it. That’s corrected weird errors for me in the past.

Hi Jay - thanks for the reply.

I’ve tried everything you’ve suggested - there was an updated doc to agree to - deintegrated/reintegrated etc etc. I’ve pretty much tried everything I can think of.

All to no effect. I’ve been looking at alternatives to Backendless now - I’ve wasted far too much time trying to get the SDK to integrate properly, I just something that’s going to work.

I do appreciate your/Olha’s suggestions though…

Thanks
Pat

I am still questioning the podfile as if it’s being generated correctly, it should include the project line at the top. If not, that may be part of an underlying issue.

Hi Jay - according to the Cocoapods documentation thats not a necessary entry if only one project file in the directory… Good practice though? Probably…

No disagreement here. Cocoapods does work we’ve used the cocoapods.app and command line many times to construct projects - including backendless, so just trying to eliminate some variables.

One of the original comments said

So I thought there may be a tie-in there.

Hi Jay - this was pretty frustrating! While looking at alternatives a developer friend suggested I try a complete uninstall/reinstall of Xcode - things are now behaving themselves which makes no sense whatsoever!

I’ve got the login/logout/register/password reset elements working in my app now - now trying to get my head around persisting logins.