Could not build Objective-C module 'GroundSdk'

I’m having these problems when I installed GroundSdk iOS via CocoaPaods :

  1. Include of non-modular header inside framework module
  2. Could not build module ‘SdkCore’
  3. could not build Objective-C module ‘GroundSdk’
  4. ‘grpc/support/port_platform.h’ file not found

Pod version:
pod ‘GroundSdk’, ‘1.0.1’
pod ‘ArsdkEngine’, ‘1.0.1’
pod ‘SdkCore’, ‘1.0.1’

Does anyone have same issues, or any solutions?
Thanks

Hi.

You said :
File ‘grpc / support / port_platform.h’ not found
This is not a GroundSdk file.

However, can you check that the GroundSdk demo (or a new fresh project) is correctly built with the pods?
A quick start guide is available here: Using Cocoapods - 7.7

Your podfile should be like this:

platform :ios, ‘10.0’

target ‘your_app_name’ do
use_frameworks!

pod ‘GroundSdk’, ‘1.0.1’
pod ‘ArsdkEngine’, ‘1.0.1’
pod ‘SdkCore’, ‘1.0.1’

end

$ pod install

(Xcode Version 10.3)

Jérôme

Hi @jgournay

Thanks for your support.
I solved the Ground Sdk issue by removing GroundSdk.framework from Linked Frameworks and Libraries, and letting imports just from pods.
But now I had another error: Could not find “SdkCore”

And also I’m having some conflicts with other file Libraries : gRPC -Core file string.h (is same as “SdkCore”).

Should I change any option on Build settings for importing “SdkCore”, or adding any extra things excepting pods?

Hi,

You should have in your Target / general, in the the “Linked Frameworks and Libraries” section:

Pods_’yourappname’.framework ------- Required

In your build settings :

Linking

$(inherited) -framework "ArsdkEngine" -framework "GroundSdk" -framework "SdkCore"

Framework search Paths

FRAMEWORK_SEARCH_PATHS = $(inherited)
"${PODS_CONFIGURATION_BUILD_DIR}/ArsdkEngine"
"${PODS_CONFIGURATION_BUILD_DIR}/GroundSdk"
"${PODS_ROOT}/SdkCore"

… you should have in these files:

  • Pods-yourAppName.debug.xcconfig
  • Pods- yourAppName.release.xcconfig

Something like this :

ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ArsdkEngine" "${PODS_CONFIGURATION_BUILD_DIR}/GroundSdk" "${PODS_ROOT}/SdkCore"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ArsdkEngine/ArsdkEngine.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/GroundSdk/GroundSdk.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
ONLY_ACTIVE_ARCH = YES
OTHER_LDFLAGS = $(inherited) -framework "ArsdkEngine" -framework "GroundSdk" -framework "SdkCore"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods

I do not know exactly what is the problem in your configuration. To understand how the pods are implemented, I advise you to create a dummy application with the pods (as indicated in the documentation) and have a look at the configuration generated by “pod install”.

Have you tried adding pods to a new application created from xcode? Can you build this application without problem?

Jérôme

Hi @jgournay

Thank you for these details informations.
I followed these steps, and still having the issue.

I find that if I comment/delete the include “string.h” in pods of SdkCore/Headers/mavlink/mavlink_helpers.h, and also same in SdkCore/Headers/mavlink/protocol.h, the error disappears and Builds successfully.

How can I find string.h file or any solutions about that.
Thanks