feat(ios): implement MyID turbo module against MyIdSDK 3.1.3
ObjC++ flattens the codegen C++ param structs into NSDictionary, since Swift cannot see them, and delegates to a Swift layer that owns all SDK interaction. The pod is named RNMyidSdk rather than MyidSdk: the latter differs from the vendor pod MyIdSDK only by case, and on a case-insensitive filesystem the two targets share one intermediate build directory, so the generated Swift header lands in the vendor's directory and the bridge fails to import it. MyIdClientDelegate conformance is kept on an internal proxy so it is not re-emitted into the generated Swift header, which ObjC++ parses without any visibility of MyIdSDK's Swift types.
| ... | ... | @@ -2,8 +2,13 @@ require "json" |
| package = JSON.parse(File.read(File.join(__dir__, "package.json"))) | ||
| # The pod is deliberately NOT named "MyidSdk": that differs from the vendor pod | ||
| # "MyIdSDK" only by case, and on a case-insensitive filesystem the two targets | ||
| # collide on the same intermediate build directory, so this pod's generated | ||
| # Swift header lands in the vendor's build dir and the ObjC++ layer cannot | ||
| # import it. The JS module name is unaffected and stays "MyidSdk". | ||
| Pod::Spec.new do |s| | ||
| s.name = "MyidSdk" | ||
| s.name = "RNMyidSdk" | ||
| s.version = package["version"] | ||
| s.summary = package["description"] | ||
| s.homepage = package["homepage"] | ||
| ... | ... | @@ -16,5 +21,13 @@ Pod::Spec.new do |s| |
| s.source_files = "ios/**/*.{h,m,mm,swift,cpp}" | ||
| s.private_header_files = "ios/**/*.h" | ||
| # Binary XCFramework distributed on the public CocoaPods trunk. | ||
| s.dependency "MyIdSDK", "3.1.3" | ||
| s.swift_version = "5.0" | ||
| # DEFINES_MODULE lets the ObjC++ layer import the generated RNMyidSdk-Swift.h. | ||
| s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES" } | ||
| install_modules_dependencies(s) | ||
| end |
example/ios/Podfile.lock
0 → 100644
ios/MyidSdkImpl.swift
0 → 100644
Please register or sign in to comment