Aws-sdk-ios: 'AWSMobileClient-Swift.h' not found with CocoaPods as static libraries

Created on 27 Jan 2020  路  4Comments  路  Source: aws-amplify/aws-sdk-ios

Describe the bug
When building a project with Pods as static libraries by not including use_frameworks! in the Podfile, but adding use_modular_headers! or :modular_headers => true to a single pod I get following error:

'AWSMobileClient/AWSMobileClient-Swift.h' file not found

Which AWS service(s) are affected?
Local AWSMobileClient pod. Not aws services affected.

Environment(please complete the following information):

  • SDK Version: pod 'AWSMobileClient', '~> 2.12.2'
  • Dependency Manager: Cocoapods
  • Swift Version : 5.x
  • Target: iOS 13.0
  • Xcode: 11.3.1

* Code related to the issue*
https://github.com/aws-amplify/aws-sdk-ios/blob/b64ed76724f662239f3f5e8df0c40745098626b1/AWSAuthSDK/Sources/AWSMobileClient/Internal/_AWSMobileClient.m#L18

Possible fix?

-- #import <AWSMobileClient/AWSMobileClient-Swift.h>
++ #import "AWSMobileClient-Swift.h"

As _AWSMobileClient.m already lives on AWSMobileClient/.
When applying this, project compiles and runs apparently fine.

Additional context
I couldn't find a AWSMobileClient-Swift.h file inside AWSMobileClient directory:

_AWSMobileCLient m

Related issue
https://github.com/aws-amplify/aws-sdk-ios/issues/1126

bug mobile client

Most helpful comment

Hi,
Thank you so much for reporting this.

I did some research and found a potential workaround here: https://github.com/CocoaPods/CocoaPods/issues/7594 , and have submitted a PR here: https://github.com/aws-amplify/aws-sdk-ios/pull/2267 . Please be warned that, I haven't exhaustively tested the implications of compiling each and every library statically, so if/when this PR gets pushed into an official release, please use caution and your best judgement in using this feature.

Thanks again!

All 4 comments

Hi,
Thank you so much for reporting this.

I did some research and found a potential workaround here: https://github.com/CocoaPods/CocoaPods/issues/7594 , and have submitted a PR here: https://github.com/aws-amplify/aws-sdk-ios/pull/2267 . Please be warned that, I haven't exhaustively tested the implications of compiling each and every library statically, so if/when this PR gets pushed into an official release, please use caution and your best judgement in using this feature.

Thanks again!

Thank you! I couldn't find that solution.

I'm still having this issue, but based on this it should be fixed right?

Screenshot 2020-04-12 20 10 06

This is what's in my podfile:

pod 'AWSMobileClient', '~> 2.13.0'

I'm running XCode Version 11.2.1 (11B500)

i'm facing the same issue as @rajuashok, is there any way to workaround it?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pawlowskialex picture pawlowskialex  路  4Comments

aTylerRice picture aTylerRice  路  3Comments

anbarasu0504 picture anbarasu0504  路  3Comments

bradgmueller picture bradgmueller  路  5Comments

ChrisInspect picture ChrisInspect  路  4Comments