9 ms·
ExtensionKit
- nimish 4y agoThe dream of COM is alive in Cupertino!
- CGamesPlay 4y agoNot really? The example for Messages seems very specific; closer to an API for Messages.app than a generic process interop framework.
- zdw 4y agoOpenDoc would be more relevant to Apple: https://en.wikipedia.org/wiki/OpenDoc https://en.wikipedia.org/wiki/OpenDoc
- deleted 4y ago[deleted]
- Kukumber 4y agoThey at least decided to go with a sane language instead of C++ Also is it really COM like? it doesn't look like it EDIT: https://www.chimehq.com/blog/extensionkit-intro https://www.chimehq.com/blog/extensionkit-intro https://news.ycombinator.com/item?id=33410067 https://news.ycombinator.com/item?id=33410067
- duped 4y agoCOM is language agnostic.
- kijiki 4y agoLanguage agnostic in that COM lets you use the C++ object model in any language you want.
- duped 4y agoNot really except in that QueryInterface returns a pointer to a struct of function pointers. It doesn't place a requirement on the layout of the object (for example you can use a fat pointer for a COM object, which is incompatible with the C++ object model)
- pjmlp 4y agoOn top of the sibling comment, as of WinRT, COM has been extended with a new ABI, based on additional base interface (IInspectable), replacing TLB libraries with .NET metadata, and support for generics (.NET style). So it isn't the C++ object model per se.
- dwaite 4y agoAs someone who programmed COM back in the day for C++ applications, I can tell you definitively that you got no benefits over other languages outside of brittle macros and non-standardized Visual C++ compiler magics. Especially once you crossed over into Office/VB land, and everything was just IDispatch, Variants, BSTRs and SafeArrays.
- pjmlp 4y agoCOM has been alive for quite some time, not only does Taligent and Copland ideas precede it (the IDL is lously based on DCE/RPC), similar ideas are used in the IOKit, DriverKit and XPC.
- j4nek 4y agoI do not understand what this actually does, has anyone got a better example? :)
- alesso_x 4y agoI wish Apple docs would include examples. I'm not an Apple developer but I've played around with SwiftUI and they have fantastic examples.
- sf4lifer 4y agoI'm with you. Is there a tangible app example?
- halJordan 4y agohttps://developer.apple.com/app-extensions/ https://developer.apple.com/app-extensions/
- hunterb123 4y agoThis allows you to expose either a view or a function in your app to be shown/executed in another app.
- krackers 4y agoHow is this different from bundles/dylibs?
- hunterb123 4y agoDylibs is for including 3rd party code at build time, maybe a client to consume an API. ExtensionKit allows you to expose realtime UI or information, coming from an installed app instead of a 3rd party service. That way you don't have to expose your API or build an SDK. You just have functions in your app that can be invoked. Also the feature is only provided if the user has that app installed. So the experience is curated.
- rukuu001 4y agoDid the headline make anyone else think we were going to see system extensions again?
- deleted 4y ago[deleted]
- johnthuss 4y agoThis is the functionality that enables Live Activities in iOS 16.1. For example showing the score for an ongoing sports game on the Lock Screen.
- chedabob 4y agoThat's a different API https://developer.apple.com/documentation/activitykit https://developer.apple.com/documentation/activitykit
- awestroke 4y agoThey really love the Kit suffix, eh?
- ketralnis 4y agoWhy not? No different to the unix lib prefix
- kennywinker 4y agoConsistent naming patterns help devs navigate the hierarchy of libraries/frameworks/APIs available. CoreFoo is going to be a low level library for dealing with Foo. FooKit is going to be a high level way to create gui apps that deal with Foo. Likely FooKit uses CoreFoo under the hood.
- awestroke 4y agoAnd HomeKit is a product for IOT. Not 100% logical naming
- coldtea 4y agoIt's a NeXT legacy, and it's a mighty fine and nice sounding one, so why not?
- chc 4y agoThey inherited "AppKit" and "Foundation" from Next and they have been running with that naming convention ever since.
- jph 4y agoThis Apple ExtensionKit documentation page opens with "Extensions are executable code bundles" but doesn't provide any executable code bundles such as examples, doesn't provide any way for a developer to ask a question, and doesn't show how a developer learns to create an extension. This misses opportunities to reach developers-- and the tech is actually really compelling. I'm experimenting with it in the BoldContacts app, which conceptually extends the Contacts app to give disabled people ways to contact their families and caregivers. Apple's documentation group needs a new leader ASAP who can emphasize documentation usability in concert with real-world developers. Apple wants its platform to continue being successful, and this goal can be helped by a documentation team that creates examples, questions-and-answers, and tutorials.
- bigyikes 4y agoTotally agree. Apple’s API documentation is nearly useless because it usually doesn’t give me any info that I can’t already infer from my IDE (which of course is XCode, sigh). I usually don’t need a list of classes and methods, I need to know how the pieces fit together to do something useful. They say a picture is worth a thousand words. Well, an example is worth a thousand method signatures.
- porcoda 4y agoYes! To add to this, I also don’t want useful information buried in videos. I’ve run across things where the information I want is likely in a WWDC video that is linked from somewhere in the documentation full of method signature. I don’t want to have to watch a video to get what I could find much faster in some static form. It always confuses me when people see videos as a useful alternative to well written documentation: who on earth has time to sit through hours of videos just to figure out how to use an API? Transcripts help, but I find that they’re still not a replacement for well documented examples and walkthroughs.
- JamesonNetworks 4y agoI’ve been working on adding a watch companion app to an iOS app and its been maddening. The documentation boils down to: you can send strings back and forth. The method to sync app state doesn’t work in the simulator. It appears the rest is on my own to discover. I’m convinced its impossible to develop a watch app only using the simulator and docs.
- duped 4y agoI'd like to take this moment to call out how atrocious Apple developer documentation is. This is honestly embarrassing. I would reject contributions at my company that shipped APIs/headers with this caliber of documentation. People who do it regularly get bad performance reviews. I don't know if it's because they actually hate developers, or they're just bad developers themselves. --- More on topic, this is an interesting approach to a tricky problem that exploits one of Swift's strengths (a stable ABI) and Apple's tight integration across the system (standardized app installation/structure/store/etc). You expose some functions as an extension/plugin API and other apps can just call them. Neat! IPC kind of sucks! What could use some more discussion is how if you have two apps running and calling eachother (or being called from eachother), how does that affect the threading model? Are calls scheduled to happen later on the main UI thread, or are they actually coming from a separate process and you need to worry about synchronization if that call affects any kind of state?
- deleted 4y ago[deleted]
- apozem 4y agoThey have a ton of different products and APIs and they just don't document them all. Even worse, much of the documentation they do have is hidden inside hard-to-search WWDC session videos or, ugh, Slack conversations with Apple engineers. External developers have complained for years. [1] [1]: https://www.caseyliss.com/2020/11/10/on-apples-pisspoor-documentation https://www.caseyliss.com/2020/11/10/on-apples-pisspoor-docu...
- duped 4y agoAt this point I'm starting to believe that Apple begrudgingly accepts that people outside that UFO that landed in Cupertino should be granted the privilege to develop applications for their hardware.
- danielvaughn 4y agoYou'd think with nearly a trillion in cash, they'd be able to hire some full-time technical writers.
- CharlesW 4y agoSample code (not from Apple): https://iosexample.com/apple-extensionfoundation-extensionkit-sample-app/ https://iosexample.com/apple-extensionfoundation-extensionki...
- awestroke 4y ago> However, Apple’s documentation lacks crucial information on how to use these new APIs (FB10140097), and there were no WWDC sessions or sample code available in the weeks following the keynote. > Thanks to some trial and error, and some help from other developers, I was able to put together this sample code, demonstrating how one can use ExtensionFoundation/ExtensionKit to define custom extension points for their Mac apps. Christ
- w10-1 4y agoExtensionKit is for the new facility to extend the UI. Non-UI extensions only need ExtensionFoundation. For example extensions on macOS, go to system preferences and search for extensions. They're listed by affording context (e.g., Finder, Photos Editing). Mine include pdf conversion, cropping photos, etc. You can create your own via Automator. The docs imply that before Ventura (13.0), developers had to create a property list to declare NSExtension, but now you can do it in Swift. However, the TextTransformer sample has the usual melange of metadata, and there's no deployment information in the API documentation. Ideally, a simple swift script would be sufficient :) - https://github.com/insidegui/TextTransformer https://github.com/insidegui/TextTransformer
- sebastien_b 4y agoStill lacks proper documentation (like, vital details still missing). So obviously not a serious feature yet. This fact has been reported multiple times before[1][2][3], and it's frustrating that a company that claims having over 1000 engineers, and touts its $6B campus at every opportunity in every one of its keynotes has, evidently, not enough resources for proper documentation. [1]https://news.ycombinator.com/item?id=33411242 https://news.ycombinator.com/item?id=33411242 [2]https://news.ycombinator.com/item?id=33410300 https://news.ycombinator.com/item?id=33410300 [3]https://news.ycombinator.com/item?id=33410329 https://news.ycombinator.com/item?id=33410329
- afandian 4y agoI object to that. Some of Apple's most serious features are missing vital documentation details!
- sebastien_b 4y agoExactly. All this lack of vital info, from a company that offers APIs for developers to use (consume), is disgraceful. Especially when they claim they have over 1000 engineers, and keep showing off their $6B+ campus at every opportunity in their keynotes. They clearly have the resources to hire people to do proper documentation, but refuse to (no doubt because "Courage").
- coldtea 4y ago>Still lacks proper documentation (like, vital details still missing). So obviously not a serious feature yet. Those two things are completely orthogonal tho... an API/tool/service can even be used to build billion dollar businesses and not have proper documentation...
- deleted 4y ago[deleted]
- smodo 4y agoAs a total noob studying Swift and SwiftUI documentation I was wondering about this. But I couldn't believe this huge company would neglect their developer community like that. But as I delved deeper I found everything is beautiful on a surface level and beyond that suddenly there are no standards.
- thih9 4y agoIs there any context, e.g. a press release, for people unfamiliar with the apple dev environment?
- macshome 4y agoBefore ExtensionKit you could only make app extensions to extend the functionality of Apple provided systems. Things like authentication, file sync and badging in the Finder, Xcode text editors, or Final Cut Pro editing extensions. With ExtensionKit you can make your own extension points and let people develop extensions for your apps on all Apple platforms. The code editor Chime just released extension support in their 2.0 release if you are on macOS 13. They have a lot of good details on how the implemented the feature on their blog. https://www.chimehq.com/blog/extensionkit-intro https://www.chimehq.com/blog/extensionkit-intro
- duped 4y agoApplication extensions outside the Apple ecosystem have been used on Apple computers for decades. It was never limited to Apple provided systems, whatever that means.
- thewebcount 4y agoThis is incorrect. In the past apps like Photoshop have allowed plugins which differ from App Extensions by running inside the host app's process. App Extensions are run in a separate process and don't have access to the entitlements of the host application, and can't directly access its data. This tends to mean that extensions are much better behaved than plug-ins.
- brookst 4y agoThis. It is a different technical model that produces a different user experience. These are closer to widgets than to IPC.
- Yoric 4y agoSo, basically, OS support for the kind of things that Chrome and Firefox have been doing for a while? Having been (a minor) part of the Firefox effort, that was a real pain to implement, so sounds like a very useful component.
- duped 4y ago
- ttoinou 4y agoIs this a new form of IPC ? https://en.wikipedia.org/wiki/Inter-process_communication https://en.wikipedia.org/wiki/Inter-process_communication If not, what IPC is this using behind the hood ?
- dwaite 4y agoTo offer another take at a summary: Apple has offered App Extensions for several years, in both UI-serving and non-UI contexts. App extensions are secondary services, bundled within apps, to provide some service. These extensions are invoked in their own process space, typically in the containing application's sandbox. Examples include: - The contents of the action/share menu in apps, which for example lets you share photos onto social media - Audio Units - Photo plugins - Password manager autofill - Content blockers - Custom keyboards - Filesystem providers to have a cloud storage show up in the Files app - Finder synchronization for cloud-synchronized services like OneDrive - All app integrations to extend Siri ExtensionKit (and the underlying ExtensionFoundation) lets a host application define its own extension points, which other applications can provide. I do not believe you can define n-to-m extensions with this interface however; I can create a language server for an iOS text editor and put it in an app, but I can't do that once and support _every_ text editor.