“Unresolved Identifier” error SparkSetupMainController()” custom Particle Photon Swift iOS app (Standard Particle documentation procedure) [Solved]

Hello there,

I’m trying to connect my Particle Photon with a custom Swift iOS app. I’m writing code in Swift and use the official Particle iOS development documentation as my guidance: (https://docs.particle.io/guide/how-to-build-a-product/mobile-app/)

All the SDK’s are within my Xcode project and ready to be used. The SDK installation process via CocoaPods didn’t show any errors or ploblems.

I had to create an UIButton (startDeviceSetup) and added some code that (I think) asks for functions within Particle’s SDK.

Code given by Particle in their documentation:

After creating and connecting my UIButton and entering the following code. Xcode gives me an Unresolved Identifier error when I’m trying to make a build:

The internet tells me that “Unresolved Identifier” seems to be a common error that often have something to do with Target memberships or classes that aren’t public. Unfortunately I can’t figure out the location of my problem. I strictly followed Particles documentation and did nothing different.

Additional information
I’m using Xcode 8.0, iOS 10 and Swift 3. I installed Particles SDK’s using CocoaPods. As described in the official Particle documentation. I created a new UIButton within my main.storyboard and connected it as an action to my ViewController etc.

Also Imports like this “import Spark-SDK” didn’t make any difference.

Thank you for reading my question, I’m still searching for an answer. It would be greatly appreciated if someone could help me :slight_smile:

Somehow Xcode fixed itself. I just reinstalled it. Importing Spark-SDK and SparkSetup in my ViewController works fine now.

Glad your up and running again!

@Joren-e @KyleG

I’m doing the same project and haver the same error. Could you tell me how you fixed it in more detail please? This is literally my fifth day of coding with xcode :sweat_smile:

-Jack

Hello,

Let me ping someone that might be able to help, @rickkas7 are you able to assist?

Kyle

1 Like