How (Not) to Write an iOS SDK
realm.io
realm.io
Seems quite unreasonable to me. Perhaps a better way to write this would be describing how iOS's SDKs have too many variations in deployment to make them truly drop-in for everyone else.
But there are quite a few developers that work on SDKs as a full time job, so hopefully they'll pick up on some of the items in the talk :^)
(as for the fragmentation in the iOS ecosystem in general… that's a topic in and of itself)
C++ layers are rare for framework authors, so I don't think that the idea of them should be used to dissuade people from writing Swift frameworks. Obviously, if you need to integrate with C++, use a language that can.
This aside - I also disagree with you, Swift is a worse language in a lot of ways, not to mention the extreme compile times and purely unfinished concepts, as well as bugs related to seemingly foundational things like auto-created initializers for structs not getting picked up properly by sourcekit.
e.g. Github employees probably (originally) wrote ReactiveCocoa and Carthage because they were useful for developing Github apps, not necessarily to gift fantastic tools to the iOS world.
More macOS components will be slowly rewritten in future OS versions.
Likewise some new Sierra APIs like Units are Swift only.
See this year's WWDC talk about Swift 3.0.
https://developer.apple.com/reference/foundation/nsdimension...
I agree that you'll get the most coverage of potential developers by supporting both languages, but you're already doing the world a service by releasing open-source software. I don't think putting additional demands on maintainers (you must support CocoaPods, you must support Objective-C) is a reasonable request. If a consumer of the framework wants those features, they can submit a pull request (or just maintain the Podspec independently, as is done with ReactiveCocoa).
For mobile apps that's still a big consideration.
The other way around is much easier, that's why he proposes Swift wrappers around Objective-C code that allow a Swifty interface with your libraries. But often using generics and nullability will already help a lot.
If you're using Objective-C, keep doing that, but then this isn't really a question to begin with.
If anyone else find that helpful, great - that's why I released it. If you 'require' me to add cocoapod support, when I don't use, now, or understand the intricacies of cocoapods, then that' bad for both of us (I probably can't support you properly when it breaks).
If the audience for this is really the Dropbox-types, i.e. their products live and die on integrations and SDKs, then this makes more sense...
Really, really well done.
Nice shirt, too. :)
The Workflow app itself, however, is spectacular, and I use it all the time. I use it to log arbitrary stuff to HealthKit (like when I drink a caffeinated beverage, for example).
Great to hear that you enjoy using Workflow :D
I'm not an iOS developer but aren't Swift and Objective C files interchangeable?
There are multiple Swift constructs that cannot be exposed to Objective-C, such as enums with associated values, structs, and global variables and functions. So if you implement your API in Swift, you have to be careful if you want it to be usable from Objective-C.
Another problem with writing your API in Swift is that the Swift ABI isn't stable yet. It changes between compiler versions. This means that your API (if written in Swift) must be compiled with the same Swift compiler as the user's code. If you want to distribute your API as a binary-only library, you'll have to release a new version every time Apple releases a new version of Xcode, and your user will have to be sure to get the correct version of your library for their version of Xcode.
Sort of doable with generics, but only from Swift code:
<ViewController: UIViewController where ViewController: UIPickerViewDataSource>