Сгенерированный интерфейс .swift выглядит так:
Код: Выделить всё
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
// swift-module-flags: -target arm64-apple-ios14.5-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name MyFramework
// swift-module-flags-ignorable: -no-verify-emitted-module-interface
import Foundation
@_exported import MyFramework
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
open class MyFrameworkClass : Swift.Decodable {
open var url: Swift.String?
open var parameters: MyFrameworkProperty.Parameters?
public init(url: Swift.String? = nil, parameters: MyFrameworkProperty.Parameters? = nil)
@objc deinit
required public init(from decoder: any Swift.Decoder) throws
}
open class Parameters : Swift.Decodable {
open var PropertyA: Swift.String?
open var PropertyB: Swift.String?
open var PropertyC: Swift.String?
public init(PropertyA: Swift.String? = nil, PropertyB: Swift.String? = nil, PropertyC: Swift.String? = nil)
@objc deinit
required public init(from decoder: any Swift.Decoder) throws
}
public enum PropertyC : Swift.String, Swift.CaseIterable {
case a
case b
case c
public init?(rawValue: Swift.String)
public typealias AllCases = [MyFramework.PropertyC]
public typealias RawValue = Swift.String
nonisolated public static var allCases: [MyFramework.PropertyC] {
get
}
public var rawValue: Swift.String {
get
}
}
extension MyFramework.PropertyC : Swift.Equatable {}
extension MyFramework.PropertyC : Swift.Hashable {}
extension MyFramework.PropertyC : Swift.RawRepresentable {}
Код: Выделить всё
xcodebuild archive -workspace MyFramework.xcworkspace \
-scheme MyFramework \
-configuration Release \
-destination 'generic/platform=iOS Simulator' \
-archivePath './build/MyFramework.framework-iphonesimulator.xcarchive' \
SKIP_INSTALL=NO \
BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
xcodebuild archive -workspace MyFramework.xcworkspace \
-scheme MyFramework \
-configuration Release \
-destination 'generic/platform=iOS' \
-archivePath './build/MyFramework.framework-iphoneos.xcarchive' \
SKIP_INSTALL=NO \
BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
xcodebuild -create-xcframework \
-framework './build/MyFramework.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/MyFramework.framework' \
-framework './build/MyFramework.framework-iphoneos.xcarchive/Products/Library/Frameworks/MyFramework.framework' \
-output './build/MyFramework.xcframework'
Код: Выделить всё
#import
FOUNDATION_EXPORT double MyFrameworkVersionNumber;
FOUNDATION_EXPORT const unsigned char MyFrameworkVersionString[];
Подробнее здесь: https://stackoverflow.com/questions/792 ... ngle-class
Мобильная версия