Aws-sdk-ios: 'AWSCore/AWSCore.h' file not found with Xcode Version 7.3.1 (7D1014)

Created on 11 May 2016  路  21Comments  路  Source: aws-amplify/aws-sdk-ios

After I upgrade to Xcode Version 7.3.1 (7D1014)
I did pod update

Downloading dependencies
Using AWSCore (2.4.1)
Using AWSS3 (2.4.1)

screen shot 2016-05-11 at 5 09 32 pm

Build will fail

question

Most helpful comment

Update: seems that the problem was in DerivedData/Build/Intermediates... I just removed the products folder so far (clean didn't work out), after deleting the intermediates folder as well the problem seems to be solved.

All 21 comments

I had the same problem after I upgraded to cocoapods 1.0.0 final version.
To me it looks like this line is missing in the podspec file:
s.public_header_files = 'AWSCore/*.h', 'AWSCore/**/*.h'
This may also relate to all the other podspecs.

@tfonfara works for me with version 2.3.5

@k06a even the downgrade doesn't solve the problem for me... maybe my project contains wrong configurations. Two questions: do you have any header files inside the Pods/Headers directory? What directories are included in your Build Settings > Header Search Paths config? My config only includes subdirectories of Pods/Headers (which is actually empty)

@tfonfara I am only using AWSMobileAnalytics:

pod 'AWSMobileAnalytics', '2.3.5'
$ ls Pods/Headers/Public/AWSCore/
AWSBolts.h                          AWSGZIP.h                           AWSSignature.h
AWSBoltsVersion.h                       AWSIdentityProvider.h                       AWSSynchronizedMutableDictionary.h
AWSCancellationToken.h                      AWSLogging.h                            AWSTMCache.h
AWSCancellationTokenRegistration.h              AWSMTLJSONAdapter.h                     AWSTMCacheBackgroundTaskManager.h
AWSCancellationTokenSource.h                    AWSMTLManagedObjectAdapter.h                    AWSTMDiskCache.h
AWSCategory.h                           AWSMTLModel+NSCoding.h                      AWSTMMemoryCache.h
AWSClientContext.h                      AWSMTLModel.h                           AWSTask.h
AWSCognitoIdentity.h                        AWSMTLReflection.h                      AWSTaskCompletionSource.h
AWSCognitoIdentityModel.h                   AWSMTLValueTransformer.h                    AWSUICKeyChainStore.h
AWSCognitoIdentityResources.h                   AWSMantle.h                         AWSURLRequestRetryHandler.h
AWSCognitoIdentityService.h                 AWSModel.h                          AWSURLRequestSerialization.h
AWSCore.h                           AWSNetworking.h                         AWSURLResponseSerialization.h
AWSCredentialsProvider.h                    AWSReachability.h                       AWSURLSessionManager.h
AWSExecutor.h                           AWSSTS.h                            AWSValidation.h
AWSFMDB.h                           AWSSTSModel.h                           NSArray+AWSMTLManipulationAdditions.h
AWSFMDatabase.h                         AWSSTSResources.h                       NSDictionary+AWSMTLManipulationAdditions.h
AWSFMDatabaseAdditions.h                    AWSSTSService.h                         NSError+AWSMTLModelException.h
AWSFMDatabasePool.h                     AWSSerialization.h                      NSObject+AWSMTLComparisonAdditions.h
AWSFMDatabaseQueue.h                        AWSService.h                            NSValueTransformer+AWSMTLInversionAdditions.h
AWSFMResultSet.h                        AWSServiceEnum.h                        NSValueTransformer+AWSMTLPredefinedTransformerAdditions.h

Header search paths contains a lot:
2016-05-11 15 49 22

@k06a I'm also using AWSMobileAnalytics, but my Pods/Headers directory is empty. Can you confirm that pod --version returns 1.0.0? In my git diff I can see, that all the headers were removed with the 1.0 update.

@tfonfara sure, just updated a few hours ago:

$ pod --version
1.0.0

When having an issue with CocoaPods 1.0.0, there are a few things you can try.

  1. Remove Podfile.lock and Pods/ and reinstall pods using pod install.
  2. Starting with 1.0.0, target is required. Make sure you have target defined in your Podfile.
  3. Check your Podfile and see if you have use_frameworks! in it. Here is how you should import AWSCore depending on the language and the flag:

Swift - use_frameworks! is required

import AWSCore

Objective-C - with use_frameworks!

@import AWSCore;

or

#import <AWSCore/AWSCore.h>

Objective-C - without use_frameworks!

#import <AWSCore/AWSCore.h>

I tried all those things, unfortunately without success. I also tried to pod deintegrate and install again. I get the same error as shown in the first post, first in my bridging header ('AWSDynamoDB/AWSDynamoDB.h' file not found), and if I comment that out I get a similar error in the AWSMobileAnalytics.h header ('AWSCore/AWSCore.h' file not found). If I use same podfile with 0.39.0 everything works fine. Installed AWS version numbers are 2.4.1.

aws

@tfonfara updated to version 2.4.1 - all works fine.

Our sample apps are updated to use CocoaPods 1.0.0. You should take a look at them. If you continue encountering the issue, please share the detailed steps to reproduce it. Thanks.

Update: seems that the problem was in DerivedData/Build/Intermediates... I just removed the products folder so far (clean didn't work out), after deleting the intermediates folder as well the problem seems to be solved.

@tfonfara you can also avoid this problem by commenting use_frameworks! line in Podfile

@tfonfara the trick of manually deleting the folder was what worked for me as well, doing a clean did nothing

@tfonfara @barrettj look at my comment in this thread: https://github.com/CocoaPods/CocoaPods/issues/4605

It looks like AWSCore 2.4.8 broke this again? Everything was working fine with Cocoapods 1.0.1 and AWS 2.4.7 but then I updated to 2.4.8 and I'm now getting "'AWSURLRequestRetryHandler.h" file not found" followed by "Could not build Objective-C module 'AWSS3" - I even downloaded the S3TransferUtilitySampleSwift directly from github and receive the same error messages. Anyone else seeing this issue crop up in 2.4.8?
screen shot 2016-09-16 at 1 03 50 pm

Same thing happening here

Yes, please solve this a.s.a.p. Having the same issue.

hi
it's working to me

https://github.com/aws/aws-sdk-ios/pull/462

-#import "AWSURLRequestRetryHandler.h"
+#import "AWSCore/AWSURLRequestRetryHandler.h"

Removing folder ~/Library/Developer/Xcode/DerivedData works for me 馃槃

I was having this problem. You can do Product -> (hold option key) -> Clean Build Folder

or shortcut Option + Shift + Command + K to clean the build folder (not just clean)

Use the $(inherited) flag for FRAMEWORK_SEARCH_PATHS and OTHER_LDFLAGS in both Debug and Release. Somehow pods can't able to add the dependency by itself.

Was this page helpful?
0 / 5 - 0 ratings