SparkSetupExample-swift won't allow adding a device to my organization

Hi- all, am stuck and could use some help. We’re hoping to get an ios App up and running for some beta customer setups in the next several weeks. Unfortunately it doesn’t seem to work to add a device into an organization. The SparkSetupExample-Swift project looks ideal for some minor modification for us. By the way, this entire Particle line is one heck of an impressive set of products and technologies–and our company is excited to be involved in this!

So-- I’ve set up a SparkSetupExample-Swift project successfully in Xcode and I’m able to successfully add a device when using my developer account. (Required commenting out 2 lines of code that were effectively no-ops). I’ve set up an organization dashboard and initial experimentation shows it is working ok (I set up a C# test project and have been accessing the organization with the .net webClient with reasonable success for organization cloud calls although I wasn’t able to get claims to work at all).

In SparkSetupExample-Swift, when I add in productSlug and organizationSlug and set organization to true, I get a failure during the soft setup process. The debug window in XCODE shows that the code was executing generateClaimCodeForOrganization Failed with a status code of 404, error = “Organization not found for user.”. I’m set up as the user in the organization.

Can anyone help me to debug a device_claims failed? Any chance this might be an issue at the cloud API level? I wasn’t able to get cloud API https:// put commands to work for device claims…


1 Like

me too :frowning:

Turns out this defect is fixed in a more recent version of the SparkSetup SDK that’s available out on GitHUB. The version I had pulled using CocoaPods although current as of Sept. 2 2016 didn’t have all of the defect fixes that are out on GitHUB . (approximately 17 commits behind). There may be other library dependencies.