iOS SDK Development Status

Dear Particle Team,

What are your plans to bring the iOS SDK (with Swift example(s)) into a productive version? I don’t see any development on GitHub for the SDK. The iOS part will be critical to what I am building. Maybe you have moved your SDK development somewhere else but your documentation still points to the SDK where it appears nothing is happening.

What do you want to happen? Are there specific things missing from the SDK, or problems with it that you want fixed? Also, what do you mean by "productive version"? People have been using it successfully to make apps now, so what's not "productive" about it (btw, I'm not with Particle, and often use my own SDK, so I don't have any particular axe to grind here, just trying to figure out where you're coming from).

3 Likes

Thank you for helping me to clarify. What I see is that on GitHub and the Particle SDK documentation, the SDK is still in Beta. Since the SDK was announced in 2016, I am simply asking if the SDK is being developed in order to get to a release V1.0 that is stable. How else can I use the Photon in a productive environment? I mean, maybe it is okay for a proof of concept but I would like to have it stable so I can develop a product to put in the hands of customers. That said, maybe I am missing something here. You mention that you use your own SDK. Why are you using your own SDK? Is it because Particle has does not have a stable V1.0?


https://docs.particle.io/reference/ios/

Thank you and Regards.

No, that's not the reason. I wanted a native Swift version before there was a Swift version available from Particle, and mostly I wrote it because I like to keep as much of my code under my control as possible. My SDK is not nearly as complete as the Particle one. It was not intended for setup of devices, or login, or any of those admin tasks. It allows me to use Particle variables, functions, and the pub-sub system which is all I need to control my devices. It's worked fine for me, and it's simpler than having to use CocoaPods or Carthage. I'm a hobbyist writing apps for my own use, so I don't have to worry about any customers.

2 Likes

Hi Bob.

I think you may be too stuck on the version number being less than 1.0, and are attributing too much importance to it.

I am not from Particle but I think you’ll find that most people are comfortable with using this for production apps.

1 Like

Hello Everyone,

I have recently joined Particle as an iOS engineer. I’d like to explain why things are the way they are at the moment. Let me start by saying that iOS SDK & setup library dependencies are stable - it’s safe to use them in your apps. The main reason for sub-1 version number (for both setup lib & sdk) is poor test coverage for existing code base.

With upcoming mesh release there are changes to the SDK & setup library being made as we speak :slight_smile:

We are hesitant to switching core libs to Swift. At the moment Swift is still not ABI stable which means that dependency code has to use same version of Swift as the app where it is used. For example if we had our SDK in Swift 3, you couldn’t use it in Swift 4 app and vice versa. For this reason our core libs are still in obj-c to make it compatible with all version of Swift. Swift should become ABI stable with version 5 and that would probably mean we could safely switch to using Swift as the main language. I would love to develop Swift example apps, but at the moment i really cannot provide any date for that.

I hope that I can publish a new release to both libraries by the end of the week. There are many tiny fixes and improvements to the libs. I have also redid the folder structure to hopefully improve experience for people who are less familiar with iOS.

3 Likes

Hello Raimis,

Thank you for your response. It is very helpful to understand the issue with Swift becoming ABI stable and how that influences the SDK.

What I think, that I found during my search through the Particle.io site and Github.com is that Carthage should be used instead of CocoaPods because it helps with some issues that others were experiencing. Can you confirm if indeed that is true?

Also, I did find this nice example in Swift that is at least something to get me started. I thought this was supported by someone from Particle; can you confirm this?

Regards,

Bob

Hello, sorry for such a late update. I will fix my notification settings trying not to miss community responses in the future. I am currently updating the exact repo to work with newest library release (nothing needs to be changed in the app, except cartfile). Should be live within next 24 hours. Wish setup library example was more elaborate. Right now it just an empty project with working dependency configuration that displays setup. You can also reference our tinker app repo for one more and way more complicated usage example (https://github.com/particle-iot/photon-tinker-ios).

I will next work on iOS documentation as it is in some areas little outdated. I have just updated both of our libs (sdk & setup library). Now they work equally well with both Carthage and Cocoapods (with use_frameworks and without).

1 Like

For the clarity sake I probably should mention that Carthage is still easier way to include libs in your project. With Pods it’s more of the hit and miss process - when it works it just works; when it doesn’t - it’s a puzzle that takes some knowledge to solve. With Carthage there are always some things that need to be done manually. But as soon as you learn to do these, the process is very straight forward. And this is the only reason why Carthage is recommended by docs. If you feel as if you are comfortable with using Pods, please go ahead and use them :slight_smile:

Thank you Raimis for the update. I look forward to the newest release. I will attempt to proceed with Carthage. I always look for Swift examples because that is what I am able to use. I am not strong in Obj-C and I do not want to invest time to learn it… if at all possible.

All libs and examples have been updated already. The example app barely covers anything but dependency integration, but hope that will get you started. I will try to update the docs to include all the important information within couple of days.