Cannot generate Java bindings for the AWSS3 pod

Hello,

I am trying to integrate the AWSS3 lib via CocoaPods on my MOE project. To do so I have added the dependency pod ‘AWSS3’ to my podfile and launched the command pod install. Everything went well and two directories have been downloaded by the command. One called AWSCore and an other one called AWSS3 which depends of the first one.

Then in my NBC file, I have added a new header binding named AWSS3 to generate the Java source files corresponding to the Obj-C ones downloaded previously. Here is the content of the file: pods.txt (1.2 KB).

Finally when I run the Generate Bindings command, it fails and I am getting the following error message:

/Users/nprugne/StudioProjects/team-pulse-app/ios/xcode/Pods/AWSS3/AWSS3/AWSS3Model.h:17:9: fatal error: ‘AWSCore/AWSNetworking.h’ file not found

In the AWSS3Model.h file, the following import is making the generation fails:

#import <AWSCore/AWSNetworking.h>

However the missing header AWSNetworking.h is present in the AWSCore directory but it has the following path: /Pods/AWSCore/AWSCore/Networking/AWSNetworking.h.

I don’t know what to do. Should I move the file manually to the expected location (which seems to be /Pods/AWSCore/AWSCore/AWSNetworking.h) ? Or should I change something to my NBC file ?

Best Regards,
Nicolas

Hi!

Please, try you with follow steps:

  1. Add “use_frameworks!” settings to podfile
  2. Run pod install
  3. Build application
  4. Use frameworks to binding generation in the path: “build/xcodebuild/Debug-iphonesimulator/”
  5. Check generated bindings

Test binding configuration: binding.nbc (557 Bytes)

Best Regards,
Roland

Hi!

Thanks for your help Roland! I have followed your steps and I have successfully generated the bindings. However, it seems that the generated Java classes cannot be compiled. When I start a build I have the following errors: compilation_errors.txt (8.6 KB).

Do I need to change something to my configuration to make it works or do you have the same problem ?

Best regards,
Nicolas

I have made it compile by tweaking the generated files manually, but I am not very confident about what I have done. Is there a cleaner way to do that ? Because, if some day I need to regenerate those bindings, I will have to do these modifications again.

Regards,
Nicolas

Hi!

After fixed errors manually, need remove @generated annotations

Best Regards,
Roland

Hi!

Thanks for the tip, I have removed the @Generated annotations where I manually fixed the bindings.

Best regards,
Nicolas