launchdarkly / ios-client-sdk

LaunchDarkly Client-side SDK for iOS (Swift and Obj-C)
https://docs.launchdarkly.com/sdk/client-side/ios
Other
69 stars 84 forks source link

Build errors: cannot load underlying module for 'LDSwiftEventSource' #230

Closed jskrepnek closed 3 years ago

jskrepnek commented 3 years ago

Describe the bug When building for a device, using command-line tools via Cordova's CLI, the xcodebuild is failing. The errors all seem to stem from missing module files.

The error is not reproducible when building for a simulator via Cordova's CLI. The error is not reproducible when opening the workspace in Xcode and building or archiving for a device.

To reproduce Integrate LaunchDarkly with a Cordova project via Cocoapods and build for a device.

Expected behavior Build succeeds.

Logs The following error is encountered numerous times:

<unknown>:0: error: module map file '<snip>/BuildProductsPath/Debug-iphoneos/LDSwiftEventSource/LDSwiftEventSource.modulemap' not found
<unknown>:0: error: module map file '<snip>/BuildProductsPath/Debug-iphoneos/LDSwiftEventSource/LDSwiftEventSource.modulemap' not found
<unknown>:0: error: underlying Objective-C module 'LaunchDarkly' not found
<snip>/Pods/LaunchDarkly/LaunchDarkly/LaunchDarkly/Service Objects/ClientServiceFactory.swift:9:8: error: cannot load underlying module for 'LDSwiftEventSource'
import LDSwiftEventSource

SDK version 5.3.0

Language version, developer tools

OS/platform

Additional context I understand that LaunchDarkly does not offer a Cordova integration. I understand and am not expecting support specific to Cordova. However, the product of Cordova's tooling is an Xcode project like any other and the CLI ultimately is calling xcodebuild, so I'm hoping to investigate that from this point of view and then I can figure out how to apply any finding back to the Cordova tool chain.

bwoskow-ld commented 3 years ago

Hello,

I see that you've filed this issue with LaunchDarkly's support team as well. As that ticket has additional information such as your build logs, let's consolidate the conversation over there.

Cheers, @bwoskow-ld