We're building a new binary framework for iOS (and macOS later). However, we're thinking of building it in Swift, and after some research, and WWDC19 talk, I still missing some details:
Will we be able to ship .xcframework to apps:
using old Swift versions? (e.g. Swift 2)
using Objective-C?
We know that cocoapods 1.9 supports XCFramework, but it's still in beta, how do you think we should distribute the framwork? And SPM support for .xcframework is still in beta..
If .xcframework is not mature enough yet, is the only option now to use the old .framework using Objective-C or can we use write in Swift?
If we use .framework with Swift, what is the minimum Swift version that client should use? Can they use Objective-C?
I'm not at Apple anymore, but I'll chime in some answers:
XCFrameworks require Xcode 11, which establishes a baseline on how old a Swift version clients can use.
You can definitely use them with Objective-C.
One advantage of XCFrameworks over bare frameworks is that they allow bundling together multiple versions of your built framework (usually simulator and device for one platform, but could include more). You don't have to use them, though.
Note that you can still mix language modes in a project in Xcode 11: your framework can be written using "Swift 5 mode" and clients still on "Swift 4 mode" can use it.
If you use the Archive action to produce your per-product frameworks, as recommended in the talk, the dSYMs will be included in the archive (before making an xcframework from the products). They're not something you usually ship to customers, though…if you were going to give them that much info about your source, you could just ship the framework as source.