I have an app, which is depended on custom SDK. Custom SDK has dependencies, included all dependencies in Podspec and custom framework/static lib ios.vendored_frameworks.
below is my pod spec
Pod::Spec.new do |s|
s.name = "SDK"
s.version = "1.0.1"
s.summary = "SDK"
s.source = { :git => ".git", :tag => "v"+s.version.to_s }
s.platform = :ios
s.ios.deployment_target = '16.0'
s.swift_version = '4.2'
s.static_framework = true
s.frameworks = 'Security'
s.frameworks = 'CoreLocation'
s.requires_arc = true
s.module_name = 'SDK'
s.library = 'z'
s.default_subspec = 'Shared'
s.subspec 'Shared' do |shared|
shared.ios.vendored_frameworks = 'SDKLib.xcframework'
shared.dependency 'CocoaAsyncSocket', '~> 7.4'
shared.dependency 'CocoaHTTPServer'
shared.dependency 'SocketRocket', '~> 0.6'
shared.dependency 'QNNetDiag'
shared.dependency 'SAMKeychain'
shared.dependency 'AFNetworking/Reachability', '~> 4.0'
shared.dependency 'AFNetworking/Serialization', '~> 4.0'
shared.dependency 'AFNetworking/Security', '~> 4.0'
shared.dependency 'AFNetworking/NSURLSession', '~> 4.0'
shared.dependency 'CocoaMQTT'
shared.dependency 'Starscream', '~> 4.0.8'
shared.dependency 'TrustKit'
shared.dependency 'Firebase/Analytics'
end
end
I am getting below error while building an app using custom lib. Showing All Errors Only: Screenshot here
Undefined symbol: dispatch thunk of CocoaMQTT.CocoaMQTTMessage.qos.setter : CocoaMQTT.CocoaMQTTQoS
Undefined symbol: dispatch thunk of CocoaMQTT.CocoaMQTTMessage.string.getter : Swift.String?
Undefined symbol: dispatch thunk of CocoaMQTT.CocoaMQTT5Message.contentType.setter : Swift.String?
Undefined symbol: dispatch thunk of CocoaMQTT.CocoaMQTT5Message.willDelayInterval.setter : Swift.UInt32?
Undefined symbol: dispatch thunk of CocoaMQTT.CocoaMQTT5Message.willResponseTopic.setter : Swift.String?
Undefined symbol: enum case for CocoaMQTT.CocoaMQTTLoggerLevel.debug(CocoaMQTT.CocoaMQTTLoggerLevel.Type) -> CocoaMQTT.CocoaMQTTLoggerLevel
Undefined symbol: enum case for CocoaMQTT.CocoaMQTTLoggerLevel.error(CocoaMQTT.CocoaMQTTLoggerLevel.Type) -> CocoaMQTT.CocoaMQTTLoggerLevel
Undefined symbol: enum case for CocoaMQTT.CocoaMQTTLoggerLevel.warning(CocoaMQTT.CocoaMQTTLoggerLevel.Type) -> CocoaMQTT.CocoaMQTTLoggerLevel
Undefined symbol: dispatch thunk of CocoaMQTT.CocoaMQTT5.connectProperties.setter : CocoaMQTT.MqttConnectProperties?
Undefined symbol: dispatch thunk of CocoaMQTT.CocoaMQTT5.connect() -> Swift.Bool
Undefined symbol: dispatch thunk of CocoaMQTT.MqttDecodeConnAck.topicAliasMaximum.getter : Swift.UInt16?
Undefined symbol: dispatch thunk of CocoaMQTT.MqttDecodePubComp.reasonCode.getter : CocoaMQTT.CocoaMQTTPUBCOMPReasonCode?
Undefined symbol: dispatch thunk of CocoaMQTT.CocoaMQTT.subscribe(_: Swift.String, qos: CocoaMQTT.CocoaMQTTQoS) -> ()
Tried to remove the same from swift interface and didn't work