particle-iot / particle-cloud-sdk-ios

Official Particle Cloud SDK for iOS
Apache License 2.0
19 stars 21 forks source link

"_OBJC_CLASS_$_ParticleCloud", referenced from: #2

Closed Rio-D closed 7 years ago

Rio-D commented 7 years ago

Hi,

I seem to be having a hard time getting your library to work.

These are the errors I currently get when attempting to use the library in xCode

Apple Mach-O Linker Error Group "_OBJCCLASS$_ParticleCloud", referenced from: clang: error: linker command failed with exit code 1 (use -v to see invocation)

idokleinman commented 7 years ago

How are you using the library? Which version? Cocoapods/Carthage? How did you install it? Which XCode version are you using? Is your project swift or Obj-C?

Must have more details in order to try to help.. Also be sure to check the huge knowledge base in: https://community.particle.io/c/mobile

Rio-D commented 7 years ago

Thanks for the reply.

I am using Particle-SDK via Cocoapods. Xcode version: 8.3.3

My project is in Swift and I have a Bridge Header to import:

import "ParticleDevice.h"

import "ParticleCloud.h"

Everything builds fine but when I try to use it like so is when I get this error.

  ParticleCloud.sharedInstance().login(withUser: "xx@xx.com", password: "test", completion: nil)
idokleinman commented 7 years ago

Did you open and use the .xcworkspace Xcode workspace pod CLI created for you? Do you see the pod in the linked frameworks and libraries? (under settings/general)

Rio-D commented 7 years ago

Yes, I opened the workspace.

The pods project is part of the workspace and contains the 'Particle-SDK'. And yes the Linked Frameworks and Libraries has the pod_xxx.framework there

Even just cloning all the SDK files and adding them to the project manually results in the same error

idokleinman commented 7 years ago

I'll try to reproduce it with a blank project

Rio-D commented 7 years ago

Thanks for the help!

I just deleted everything and restarted from scratch and it's all working now.

And sorry for the trouble

idokleinman commented 7 years ago

Happy to hear issue was resolved, probably was a workspace/linking issue.