expo-modules-core 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/core/interfaces/Package.java +1 -1
- package/ios/EXDefines.h +22 -8
- package/ios/ExpoModulesCore.podspec +1 -0
- package/ios/ExpoModulesCore.xcframework/Info.plist +40 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64/ExpoModulesCore.framework/ExpoModulesCore +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64/ExpoModulesCore.framework/Info.plist +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/Project/arm64.swiftsourceinfo +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/arm64-apple-ios.swiftinterface +278 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/arm64.swiftdoc +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/arm64.swiftinterface +278 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64/ExpoModulesCore.framework/Modules/module.modulemap +23 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/ExpoModulesCore +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Info.plist +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/Project/arm64.swiftsourceinfo +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/Project/x86_64.swiftsourceinfo +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/arm64-apple-ios-simulator.swiftinterface +278 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/arm64.swiftdoc +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/arm64.swiftinterface +278 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +278 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/x86_64.swiftdoc +0 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/ExpoModulesCore.swiftmodule/x86_64.swiftinterface +278 -0
- package/ios/ExpoModulesCore.xcframework/ios-arm64_x86_64-simulator/ExpoModulesCore.framework/Modules/module.modulemap +23 -0
- package/ios/ModuleRegistryAdapter/EXModuleRegistryAdapter.m +7 -0
- package/ios/NativeModulesProxy/EXNativeModulesProxy.m +11 -5
- package/ios/Services/EXReactNativeAdapter.m +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 5.5 (swiftlang-1300.0.29.102 clang-1300.0.28.1)
|
|
3
|
+
// swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name ExpoModulesCore
|
|
4
|
+
import Dispatch
|
|
5
|
+
@_exported import ExpoModulesCore
|
|
6
|
+
import Foundation
|
|
7
|
+
import ObjectiveC
|
|
8
|
+
import Swift
|
|
9
|
+
import UIKit
|
|
10
|
+
import _Concurrency
|
|
11
|
+
public protocol AnyField {
|
|
12
|
+
func get() -> Any
|
|
13
|
+
}
|
|
14
|
+
public protocol AnyMethod : ExpoModulesCore.AnyDefinition {
|
|
15
|
+
var name: Swift.String { get }
|
|
16
|
+
var argumentsCount: Swift.Int { get }
|
|
17
|
+
var queue: Dispatch.DispatchQueue? { get }
|
|
18
|
+
func call(args: [Any?], promise: ExpoModulesCore.Promise)
|
|
19
|
+
func runOnQueue(_ queue: Dispatch.DispatchQueue?) -> Self
|
|
20
|
+
}
|
|
21
|
+
public protocol AnyMethodArgument {
|
|
22
|
+
}
|
|
23
|
+
extension Swift.Bool : ExpoModulesCore.AnyMethodArgument {
|
|
24
|
+
}
|
|
25
|
+
extension Swift.Int : ExpoModulesCore.AnyMethodArgument {
|
|
26
|
+
}
|
|
27
|
+
extension Swift.Double : ExpoModulesCore.AnyMethodArgument {
|
|
28
|
+
}
|
|
29
|
+
extension Swift.String : ExpoModulesCore.AnyMethodArgument {
|
|
30
|
+
}
|
|
31
|
+
extension Swift.Array : ExpoModulesCore.AnyMethodArgument {
|
|
32
|
+
}
|
|
33
|
+
extension Swift.Dictionary : ExpoModulesCore.AnyMethodArgument {
|
|
34
|
+
}
|
|
35
|
+
public protocol AnyModule : AnyObject {
|
|
36
|
+
init(appContext: ExpoModulesCore.AppContext)
|
|
37
|
+
@ExpoModulesCore.ModuleDefinitionBuilder func definition() -> ExpoModulesCore.ModuleDefinition
|
|
38
|
+
}
|
|
39
|
+
public protocol AnyViewProp : ExpoModulesCore.AnyDefinition {
|
|
40
|
+
var name: Swift.String { get }
|
|
41
|
+
func set(value: Any?, onView: UIKit.UIView)
|
|
42
|
+
}
|
|
43
|
+
public class AppContext {
|
|
44
|
+
public var moduleRegistry: ExpoModulesCore.ModuleRegistry {
|
|
45
|
+
get
|
|
46
|
+
}
|
|
47
|
+
public var legacyModuleRegistry: ExpoModulesCore.EXModuleRegistry? {
|
|
48
|
+
get
|
|
49
|
+
}
|
|
50
|
+
public init()
|
|
51
|
+
convenience public init(withModulesProvider provider: ExpoModulesCore.ModulesProviderProtocol, legacyModuleRegistry: ExpoModulesCore.EXModuleRegistry?)
|
|
52
|
+
public func legacyModule<ModuleProtocol>(implementing moduleProtocol: ObjectiveC.`Protocol`) -> ModuleProtocol?
|
|
53
|
+
public var constants: ExpoModulesCore.EXConstantsInterface? {
|
|
54
|
+
get
|
|
55
|
+
}
|
|
56
|
+
public var fileSystem: ExpoModulesCore.EXFileSystemInterface? {
|
|
57
|
+
get
|
|
58
|
+
}
|
|
59
|
+
public var permissions: ExpoModulesCore.EXPermissionsInterface? {
|
|
60
|
+
get
|
|
61
|
+
}
|
|
62
|
+
public var imageLoader: ExpoModulesCore.EXImageLoaderInterface? {
|
|
63
|
+
get
|
|
64
|
+
}
|
|
65
|
+
public var utilities: ExpoModulesCore.EXUtilitiesInterface? {
|
|
66
|
+
get
|
|
67
|
+
}
|
|
68
|
+
@objc deinit
|
|
69
|
+
}
|
|
70
|
+
public protocol CodedError : Swift.Error {
|
|
71
|
+
var code: Swift.String { get }
|
|
72
|
+
var description: Swift.String { get }
|
|
73
|
+
}
|
|
74
|
+
extension ExpoModulesCore.CodedError {
|
|
75
|
+
public var code: Swift.String {
|
|
76
|
+
get
|
|
77
|
+
}
|
|
78
|
+
public var description: Swift.String {
|
|
79
|
+
get
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
public struct SimpleCodedError : ExpoModulesCore.CodedError {
|
|
83
|
+
public var code: Swift.String
|
|
84
|
+
public var description: Swift.String
|
|
85
|
+
}
|
|
86
|
+
public struct UnexpectedError : ExpoModulesCore.CodedError {
|
|
87
|
+
public let description: Swift.String
|
|
88
|
+
}
|
|
89
|
+
@_hasMissingDesignatedInitializers public class ConcreteMethod<Args, ReturnType> : ExpoModulesCore.AnyMethod {
|
|
90
|
+
public typealias ClosureType = (Args) -> ReturnType
|
|
91
|
+
final public let name: Swift.String
|
|
92
|
+
public var takesPromise: Swift.Bool {
|
|
93
|
+
get
|
|
94
|
+
}
|
|
95
|
+
public var argumentsCount: Swift.Int {
|
|
96
|
+
get
|
|
97
|
+
}
|
|
98
|
+
public var queue: Dispatch.DispatchQueue?
|
|
99
|
+
public func call(args: [Any?], promise: ExpoModulesCore.Promise)
|
|
100
|
+
public func runOnQueue(_ queue: Dispatch.DispatchQueue?) -> Self
|
|
101
|
+
@objc deinit
|
|
102
|
+
}
|
|
103
|
+
@_hasMissingDesignatedInitializers public class ConcreteViewProp<ViewType, PropType> : ExpoModulesCore.AnyViewProp where ViewType : UIKit.UIView {
|
|
104
|
+
public typealias SetterType = (ViewType, PropType) -> Swift.Void
|
|
105
|
+
final public let name: Swift.String
|
|
106
|
+
public func set(value: Any?, onView view: UIKit.UIView)
|
|
107
|
+
@objc deinit
|
|
108
|
+
}
|
|
109
|
+
@propertyWrapper public class Field<Type> {
|
|
110
|
+
public var wrappedValue: Type
|
|
111
|
+
public init(wrappedValue: Type, _ options: ExpoModulesCore.FieldOption...)
|
|
112
|
+
public init(wrappedValue: Type, _ options: [ExpoModulesCore.FieldOption])
|
|
113
|
+
public init(wrappedValue: Type = nil) where Type : Swift.ExpressibleByNilLiteral
|
|
114
|
+
public init(wrappedValue: Type = nil, _ options: ExpoModulesCore.FieldOption...) where Type : Swift.ExpressibleByNilLiteral
|
|
115
|
+
public func get() -> Any
|
|
116
|
+
@objc deinit
|
|
117
|
+
}
|
|
118
|
+
extension ExpoModulesCore.Field where Type == Swift.Int {
|
|
119
|
+
convenience public init(wrappedValue: Type = 0)
|
|
120
|
+
convenience public init(wrappedValue: Type = 0, _ options: ExpoModulesCore.FieldOption...)
|
|
121
|
+
}
|
|
122
|
+
extension ExpoModulesCore.Field where Type == Swift.Double {
|
|
123
|
+
convenience public init(wrappedValue: Type = 0.0)
|
|
124
|
+
convenience public init(wrappedValue: Type = 0.0, _ options: ExpoModulesCore.FieldOption...)
|
|
125
|
+
}
|
|
126
|
+
extension ExpoModulesCore.Field where Type == Swift.Bool {
|
|
127
|
+
convenience public init(wrappedValue: Type = false)
|
|
128
|
+
convenience public init(wrappedValue: Type = false, _ options: ExpoModulesCore.FieldOption...)
|
|
129
|
+
}
|
|
130
|
+
extension ExpoModulesCore.Field where Type == Swift.String {
|
|
131
|
+
convenience public init(wrappedValue: Type = "")
|
|
132
|
+
convenience public init(wrappedValue: Type = "", _ options: ExpoModulesCore.FieldOption...)
|
|
133
|
+
}
|
|
134
|
+
extension ExpoModulesCore.Field where Type : Swift.ExpressibleByArrayLiteral {
|
|
135
|
+
convenience public init(wrappedValue: Type = [])
|
|
136
|
+
convenience public init(wrappedValue: Type = [], _ options: ExpoModulesCore.FieldOption...)
|
|
137
|
+
}
|
|
138
|
+
extension ExpoModulesCore.Field where Type : Swift.ExpressibleByDictionaryLiteral {
|
|
139
|
+
convenience public init(wrappedValue: Type = [:])
|
|
140
|
+
convenience public init(wrappedValue: Type = [:], _ options: ExpoModulesCore.FieldOption...)
|
|
141
|
+
}
|
|
142
|
+
extension ExpoModulesCore.Field where Type : ExpoModulesCore.Record {
|
|
143
|
+
convenience public init(wrappedValue: Type = Type.init())
|
|
144
|
+
convenience public init(wrappedValue: Type = Type.init(), _ options: ExpoModulesCore.FieldOption...)
|
|
145
|
+
}
|
|
146
|
+
public struct FieldOption : Swift.Equatable, Swift.Hashable, Swift.ExpressibleByIntegerLiteral, Swift.ExpressibleByStringLiteral {
|
|
147
|
+
public let rawValue: Swift.Int
|
|
148
|
+
public var key: Swift.String?
|
|
149
|
+
public init(_ rawValue: Swift.Int)
|
|
150
|
+
public static func == (lhs: ExpoModulesCore.FieldOption, rhs: ExpoModulesCore.FieldOption) -> Swift.Bool
|
|
151
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
152
|
+
public init(integerLiteral value: Swift.Int)
|
|
153
|
+
public init(stringLiteral value: Swift.String)
|
|
154
|
+
public typealias ExtendedGraphemeClusterLiteralType = Swift.String
|
|
155
|
+
public typealias IntegerLiteralType = Swift.Int
|
|
156
|
+
public typealias StringLiteralType = Swift.String
|
|
157
|
+
public typealias UnicodeScalarLiteralType = Swift.String
|
|
158
|
+
public var hashValue: Swift.Int {
|
|
159
|
+
get
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
extension ExpoModulesCore.FieldOption {
|
|
163
|
+
public static func keyed(_ key: Swift.String) -> ExpoModulesCore.FieldOption
|
|
164
|
+
public static let required: ExpoModulesCore.FieldOption
|
|
165
|
+
}
|
|
166
|
+
open class BaseModule {
|
|
167
|
+
weak public var appContext: ExpoModulesCore.AppContext? {
|
|
168
|
+
get
|
|
169
|
+
}
|
|
170
|
+
required public init(appContext: ExpoModulesCore.AppContext)
|
|
171
|
+
@objc deinit
|
|
172
|
+
}
|
|
173
|
+
public typealias Module = ExpoModulesCore.BaseModule & ExpoModulesCore.AnyModule
|
|
174
|
+
public protocol AnyDefinition {
|
|
175
|
+
}
|
|
176
|
+
public struct ModuleDefinition : ExpoModulesCore.AnyDefinition {
|
|
177
|
+
}
|
|
178
|
+
@_functionBuilder public struct ModuleDefinitionBuilder {
|
|
179
|
+
public static func buildBlock(_ definitions: ExpoModulesCore.AnyDefinition...) -> ExpoModulesCore.ModuleDefinition
|
|
180
|
+
}
|
|
181
|
+
extension ExpoModulesCore.AnyModule {
|
|
182
|
+
public func name(_ name: Swift.String) -> ExpoModulesCore.AnyDefinition
|
|
183
|
+
public func constants(_ closure: () -> [Swift.String : Any?]) -> ExpoModulesCore.AnyDefinition
|
|
184
|
+
public func method<R>(_ name: Swift.String, _ closure: @escaping () -> R) -> ExpoModulesCore.AnyMethod
|
|
185
|
+
public func method<R, A0>(_ name: Swift.String, _ closure: @escaping (A0) -> R) -> ExpoModulesCore.AnyMethod where A0 : ExpoModulesCore.AnyMethodArgument
|
|
186
|
+
public func method<R, A0, A1>(_ name: Swift.String, _ closure: @escaping (A0, A1) -> R) -> ExpoModulesCore.AnyMethod where A0 : ExpoModulesCore.AnyMethodArgument, A1 : ExpoModulesCore.AnyMethodArgument
|
|
187
|
+
public func method<R, A0, A1, A2>(_ name: Swift.String, _ closure: @escaping (A0, A1, A2) -> R) -> ExpoModulesCore.AnyMethod where A0 : ExpoModulesCore.AnyMethodArgument, A1 : ExpoModulesCore.AnyMethodArgument, A2 : ExpoModulesCore.AnyMethodArgument
|
|
188
|
+
public func method<R, A0, A1, A2, A3>(_ name: Swift.String, _ closure: @escaping (A0, A1, A2, A3) -> R) -> ExpoModulesCore.AnyMethod where A0 : ExpoModulesCore.AnyMethodArgument, A1 : ExpoModulesCore.AnyMethodArgument, A2 : ExpoModulesCore.AnyMethodArgument, A3 : ExpoModulesCore.AnyMethodArgument
|
|
189
|
+
public func method<R, A0, A1, A2, A3, A4>(_ name: Swift.String, _ closure: @escaping (A0, A1, A2, A3, A4) -> R) -> ExpoModulesCore.AnyMethod where A0 : ExpoModulesCore.AnyMethodArgument, A1 : ExpoModulesCore.AnyMethodArgument, A2 : ExpoModulesCore.AnyMethodArgument, A3 : ExpoModulesCore.AnyMethodArgument, A4 : ExpoModulesCore.AnyMethodArgument
|
|
190
|
+
public func method<R, A0, A1, A2, A3, A4, A5>(_ name: Swift.String, _ closure: @escaping (A0, A1, A2, A3, A4, A5) -> R) -> ExpoModulesCore.AnyMethod where A0 : ExpoModulesCore.AnyMethodArgument, A1 : ExpoModulesCore.AnyMethodArgument, A2 : ExpoModulesCore.AnyMethodArgument, A3 : ExpoModulesCore.AnyMethodArgument, A4 : ExpoModulesCore.AnyMethodArgument, A5 : ExpoModulesCore.AnyMethodArgument
|
|
191
|
+
public func method<R, A0, A1, A2, A3, A4, A5, A6>(_ name: Swift.String, _ closure: @escaping (A0, A1, A2, A3, A4, A5, A6) -> R) -> ExpoModulesCore.AnyMethod where A0 : ExpoModulesCore.AnyMethodArgument, A1 : ExpoModulesCore.AnyMethodArgument, A2 : ExpoModulesCore.AnyMethodArgument, A3 : ExpoModulesCore.AnyMethodArgument, A4 : ExpoModulesCore.AnyMethodArgument, A5 : ExpoModulesCore.AnyMethodArgument, A6 : ExpoModulesCore.AnyMethodArgument
|
|
192
|
+
public func method<R, A0, A1, A2, A3, A4, A5, A6, A7>(_ name: Swift.String, _ closure: @escaping (A0, A1, A2, A3, A4, A5, A6, A7) -> R) -> ExpoModulesCore.AnyMethod where A0 : ExpoModulesCore.AnyMethodArgument, A1 : ExpoModulesCore.AnyMethodArgument, A2 : ExpoModulesCore.AnyMethodArgument, A3 : ExpoModulesCore.AnyMethodArgument, A4 : ExpoModulesCore.AnyMethodArgument, A5 : ExpoModulesCore.AnyMethodArgument, A6 : ExpoModulesCore.AnyMethodArgument, A7 : ExpoModulesCore.AnyMethodArgument
|
|
193
|
+
public func onCreate(_ closure: @escaping () -> Swift.Void) -> ExpoModulesCore.AnyDefinition
|
|
194
|
+
public func onDestroy(_ closure: @escaping () -> Swift.Void) -> ExpoModulesCore.AnyDefinition
|
|
195
|
+
public func onAppContextDestroys(_ closure: @escaping () -> Swift.Void) -> ExpoModulesCore.AnyDefinition
|
|
196
|
+
public func onAppEntersForeground(_ closure: @escaping () -> Swift.Void) -> ExpoModulesCore.AnyDefinition
|
|
197
|
+
public func onAppBecomesActive(_ closure: @escaping () -> Swift.Void) -> ExpoModulesCore.AnyDefinition
|
|
198
|
+
public func onAppEntersBackground(_ closure: @escaping () -> Swift.Void) -> ExpoModulesCore.AnyDefinition
|
|
199
|
+
}
|
|
200
|
+
public func viewManager(@ExpoModulesCore.ViewManagerDefinitionBuilder _ closure: @escaping () -> ExpoModulesCore.ViewManagerDefinition) -> ExpoModulesCore.AnyDefinition
|
|
201
|
+
public func view(_ closure: @escaping () -> UIKit.UIView) -> ExpoModulesCore.AnyDefinition
|
|
202
|
+
public func prop<ViewType, PropType>(_ name: Swift.String, _ setter: @escaping (ViewType, PropType) -> Swift.Void) -> ExpoModulesCore.AnyDefinition where ViewType : UIKit.UIView
|
|
203
|
+
@_hasMissingDesignatedInitializers public class ModuleHolder {
|
|
204
|
+
@objc deinit
|
|
205
|
+
}
|
|
206
|
+
@_hasMissingDesignatedInitializers public class ModuleRegistry : Swift.Sequence {
|
|
207
|
+
public typealias Element = ExpoModulesCore.ModuleHolder
|
|
208
|
+
public func register(module: ExpoModulesCore.AnyModule)
|
|
209
|
+
public func register(fromProvider provider: ExpoModulesCore.ModulesProviderProtocol)
|
|
210
|
+
public func unregister(module: ExpoModulesCore.AnyModule)
|
|
211
|
+
public func has(moduleWithName moduleName: Swift.String) -> Swift.Bool
|
|
212
|
+
public func get(moduleHolderForName moduleName: Swift.String) -> ExpoModulesCore.ModuleHolder?
|
|
213
|
+
public func get(moduleWithName moduleName: Swift.String) -> ExpoModulesCore.AnyModule?
|
|
214
|
+
public func makeIterator() -> Swift.IndexingIterator<[ExpoModulesCore.ModuleHolder]>
|
|
215
|
+
public typealias Iterator = Swift.IndexingIterator<[ExpoModulesCore.ModuleHolder]>
|
|
216
|
+
@objc deinit
|
|
217
|
+
}
|
|
218
|
+
@objc public protocol ModulesProviderObjCProtocol {
|
|
219
|
+
}
|
|
220
|
+
public protocol ModulesProviderProtocol : ExpoModulesCore.ModulesProviderObjCProtocol {
|
|
221
|
+
func exportedModules() -> [ExpoModulesCore.AnyModule.Type]
|
|
222
|
+
}
|
|
223
|
+
@_inheritsConvenienceInitializers @objc open class ModulesProvider : ObjectiveC.NSObject, ExpoModulesCore.ModulesProviderProtocol, ExpoModulesCore.ModulesProviderObjCProtocol {
|
|
224
|
+
open func exportedModules() -> [ExpoModulesCore.AnyModule.Type]
|
|
225
|
+
@objc override dynamic public init()
|
|
226
|
+
@objc deinit
|
|
227
|
+
}
|
|
228
|
+
public struct Promise : ExpoModulesCore.AnyMethodArgument {
|
|
229
|
+
public typealias ResolveClosure = (Any?) -> Swift.Void
|
|
230
|
+
public typealias RejectClosure = (ExpoModulesCore.CodedError) -> Swift.Void
|
|
231
|
+
public var resolver: ExpoModulesCore.Promise.ResolveClosure
|
|
232
|
+
public var rejecter: ExpoModulesCore.Promise.RejectClosure
|
|
233
|
+
public var legacyRejecter: ExpoModulesCore.EXPromiseRejectBlock {
|
|
234
|
+
get
|
|
235
|
+
}
|
|
236
|
+
public func resolve(_ value: Any? = nil)
|
|
237
|
+
public func reject(_ error: ExpoModulesCore.CodedError)
|
|
238
|
+
public func reject(_ code: Swift.String, _ description: Swift.String)
|
|
239
|
+
}
|
|
240
|
+
public protocol Record : ExpoModulesCore.AnyMethodArgument {
|
|
241
|
+
typealias Dict = [Swift.String : Any]
|
|
242
|
+
init()
|
|
243
|
+
init(from: Self.Dict) throws
|
|
244
|
+
func toDictionary() -> Self.Dict
|
|
245
|
+
}
|
|
246
|
+
extension ExpoModulesCore.Record {
|
|
247
|
+
public init(from dict: Self.Dict) throws
|
|
248
|
+
public func toDictionary() -> Self.Dict
|
|
249
|
+
}
|
|
250
|
+
@objc public class SwiftInteropBridge : ObjectiveC.NSObject {
|
|
251
|
+
@objc public init(modulesProvider: ExpoModulesCore.ModulesProviderObjCProtocol, legacyModuleRegistry: ExpoModulesCore.EXModuleRegistry)
|
|
252
|
+
@objc public func hasModule(_ moduleName: Swift.String) -> Swift.Bool
|
|
253
|
+
@objc public func callMethod(_ methodName: Swift.String, onModule moduleName: Swift.String, withArgs args: [Any], resolve: @escaping ExpoModulesCore.EXPromiseResolveBlock, reject: @escaping ExpoModulesCore.EXPromiseRejectBlock)
|
|
254
|
+
@objc public func exportedMethodNames() -> [Swift.String : [[Swift.String : Any]]]
|
|
255
|
+
@objc public func exportedModulesConstants() -> [Swift.String : Any]
|
|
256
|
+
@objc public func exportedViewManagersNames() -> [Swift.String]
|
|
257
|
+
@objc public func getViewManagers() -> [ExpoModulesCore.ViewModuleWrapper]
|
|
258
|
+
@objc deinit
|
|
259
|
+
}
|
|
260
|
+
public struct ViewManagerDefinition : ExpoModulesCore.AnyDefinition {
|
|
261
|
+
}
|
|
262
|
+
@_functionBuilder public struct ViewManagerDefinitionBuilder {
|
|
263
|
+
public static func buildBlock(_ definitions: ExpoModulesCore.AnyDefinition...) -> ExpoModulesCore.ViewManagerDefinition
|
|
264
|
+
}
|
|
265
|
+
@_inheritsConvenienceInitializers @objc public class ViewModuleWrapper : ExpoModulesCore.RCTViewManager {
|
|
266
|
+
public init(_ wrappedModuleHolder: ExpoModulesCore.ModuleHolder)
|
|
267
|
+
@objc override dynamic public init()
|
|
268
|
+
@objc public init(dummy: Any?)
|
|
269
|
+
@objc public func name() -> Swift.String
|
|
270
|
+
@objc override dynamic public class func moduleName() -> Swift.String
|
|
271
|
+
@objc override dynamic public class func requiresMainQueueSetup() -> Swift.Bool
|
|
272
|
+
@objc override dynamic public func view() -> UIKit.UIView!
|
|
273
|
+
@objc public class func propConfig_proxiedProperties() -> [Swift.String]
|
|
274
|
+
@objc public func set_proxiedProperties(_ json: Any?, forView view: UIKit.UIView, withDefaultView defaultView: UIKit.UIView)
|
|
275
|
+
@objc public static func createViewModuleWrapperClass(module: ExpoModulesCore.ViewModuleWrapper) -> ExpoModulesCore.ViewModuleWrapper.Type?
|
|
276
|
+
@objc deinit
|
|
277
|
+
}
|
|
278
|
+
extension ExpoModulesCore.Field : ExpoModulesCore.AnyField {}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
framework module ExpoModulesCore {
|
|
3
|
+
umbrella header "ExpoModulesCore.h"
|
|
4
|
+
export *
|
|
5
|
+
module * { export * }
|
|
6
|
+
|
|
7
|
+
module React {
|
|
8
|
+
umbrella "/Users/tomasz/Work/expo/ios/Pods/Headers/Public/React-Core"
|
|
9
|
+
export *
|
|
10
|
+
module * { export * }
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module Yoga {
|
|
14
|
+
umbrella header "/Users/tomasz/Work/expo/ios/Pods/Headers/Public/Yoga/Yoga-umbrella.h"
|
|
15
|
+
export *
|
|
16
|
+
module * { export * }
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
module ExpoModulesCore.Swift {
|
|
21
|
+
header "ExpoModulesCore-Swift.h"
|
|
22
|
+
requires objc
|
|
23
|
+
}
|
|
@@ -3,9 +3,16 @@
|
|
|
3
3
|
#import <ExpoModulesCore/EXNativeModulesProxy.h>
|
|
4
4
|
#import <ExpoModulesCore/EXViewManagerAdapter.h>
|
|
5
5
|
#import <ExpoModulesCore/EXModuleRegistryAdapter.h>
|
|
6
|
+
#import <ExpoModulesCore/EXModuleRegistryProvider.h>
|
|
6
7
|
#import <ExpoModulesCore/EXViewManagerAdapterClassesRegistry.h>
|
|
7
8
|
#import <ExpoModulesCore/EXModuleRegistryHolderReactModule.h>
|
|
9
|
+
#import <ExpoModulesCore/EXReactNativeEventEmitter.h>
|
|
10
|
+
#if __has_include(<ExpoModulesCore/ExpoModulesCore-Swift.h>)
|
|
11
|
+
// For cocoapods framework, the generated swift header will be inside ExpoModulesCore module
|
|
12
|
+
#import <ExpoModulesCore/ExpoModulesCore-Swift.h>
|
|
13
|
+
#else
|
|
8
14
|
#import "ExpoModulesCore-Swift.h"
|
|
15
|
+
#endif
|
|
9
16
|
|
|
10
17
|
@interface EXModuleRegistryAdapter ()
|
|
11
18
|
|
|
@@ -13,7 +13,14 @@
|
|
|
13
13
|
#import <ExpoModulesCore/EXViewManager.h>
|
|
14
14
|
#import <ExpoModulesCore/EXViewManagerAdapter.h>
|
|
15
15
|
#import <ExpoModulesCore/EXViewManagerAdapterClassesRegistry.h>
|
|
16
|
+
#import <ExpoModulesCore/EXModuleRegistryProvider.h>
|
|
17
|
+
#import <ExpoModulesCore/EXReactNativeEventEmitter.h>
|
|
18
|
+
#if __has_include(<ExpoModulesCore/ExpoModulesCore-Swift.h>)
|
|
19
|
+
// For cocoapods framework, the generated swift header will be inside ExpoModulesCore module
|
|
20
|
+
#import <ExpoModulesCore/ExpoModulesCore-Swift.h>
|
|
21
|
+
#else
|
|
16
22
|
#import "ExpoModulesCore-Swift.h"
|
|
23
|
+
#endif
|
|
17
24
|
|
|
18
25
|
static const NSString *exportedMethodsNamesKeyPath = @"exportedMethods";
|
|
19
26
|
static const NSString *viewManagersNamesKeyPath = @"viewManagersNames";
|
|
@@ -235,10 +242,6 @@ RCT_EXPORT_METHOD(callMethod:(NSString *)moduleName methodNameOrKey:(id)methodNa
|
|
|
235
242
|
}
|
|
236
243
|
}
|
|
237
244
|
|
|
238
|
-
// Let the modules consume the registry :)
|
|
239
|
-
// It calls `setModuleRegistry:` on all `EXModuleRegistryConsumer`s.
|
|
240
|
-
[_exModuleRegistry initialize];
|
|
241
|
-
|
|
242
245
|
// Register the view managers as additional modules.
|
|
243
246
|
[bridge registerAdditionalModuleClasses:additionalModuleClasses];
|
|
244
247
|
|
|
@@ -249,7 +252,10 @@ RCT_EXPORT_METHOD(callMethod:(NSString *)moduleName methodNameOrKey:(id)methodNa
|
|
|
249
252
|
// Get the newly created instance of `EXReactEventEmitter` bridge module and register it in expo modules registry.
|
|
250
253
|
EXReactNativeEventEmitter *eventEmitter = [bridge moduleForClass:[EXReactNativeEventEmitter class]];
|
|
251
254
|
[_exModuleRegistry registerInternalModule:eventEmitter];
|
|
252
|
-
|
|
255
|
+
|
|
256
|
+
// Let the modules consume the registry :)
|
|
257
|
+
// It calls `setModuleRegistry:` on all `EXModuleRegistryConsumer`s.
|
|
258
|
+
[_exModuleRegistry initialize];
|
|
253
259
|
}
|
|
254
260
|
|
|
255
261
|
- (void)registerComponentDataForModuleClasses:(NSArray<Class> *)moduleClasses inBridge:(RCTBridge *)bridge
|
|
@@ -217,7 +217,7 @@ EX_REGISTER_MODULE();
|
|
|
217
217
|
} else if (
|
|
218
218
|
_isForegrounded && (
|
|
219
219
|
[notification.name isEqualToString:UIApplicationWillResignActiveNotification] ||
|
|
220
|
-
[notification.name isEqualToString:
|
|
220
|
+
[notification.name isEqualToString:UIApplicationDidEnterBackgroundNotification] ||
|
|
221
221
|
RCTSharedApplication().applicationState == UIApplicationStateBackground
|
|
222
222
|
)
|
|
223
223
|
) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "The core of Expo Modules architecture",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@testing-library/react-hooks": "^7.0.1",
|
|
43
43
|
"expo-module-scripts": "^2.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "1fffde73411ee7a642b98f1506a8de921805d52b"
|
|
46
46
|
}
|