title: awsmobilehub and cocoapods integration
body: <p>I have started using AWSMobileHub and I am just going through the integration steps but it does not appear to play nicely with cocoapods which I intend on using in the project.</p>
  
  <p>I have followed the integration steps and add the frameworks which I downloaded from aws + the helper code.</p>
  
  <p><a href="https://i.stack.imgur.com/aq3BF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aq3BF.png" alt="AWS-Frameworks"></a></p>
  
  <p>I have added them as embedded frameworks like so</p>
  
  <p><a href="https://i.stack.imgur.com/UySyw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UySyw.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/NTm0M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NTm0M.png" alt="enter image description here"></a></p>
  
  <p>This compiles and runs fine</p>
  
  <p>Then I add cocoapods to the project with pod init, editing podfile with the following and creating workspace.</p>
  
  <pre><code>source 'https://github.com/CocoaPods/Specs.git'
  
  platform :ios, '9.0'
  
  use_frameworks!
  
  target 'ProjectName' do
  project 'ProjectName'
  
  pod 'Fabric'
  pod 'Crashlytics'
  
  end
  </code></pre>
  
  <p>followed by pod install which adds what ever frameworks I have added to podfile. </p>
  
  <p>But now when I compile I get the following errors.</p>
  
  <pre><code>Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_AWSS3PreSignedURLBuilder", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
  "_OBJC_CLASS_$_AWSS3ListObjectsOutput", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
  "_OBJC_CLASS_$_AWSS3GetPreSignedURLRequest", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
  "_OBJC_CLASS_$_AWSS3", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
   (maybe you meant: _OBJC_CLASS_$_AWSS3ContentProvider)
  "_OBJC_CLASS_$_FBSDKLoginManager", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
  "_OBJC_CLASS_$_AWSLambdaInvoker", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSCloudLogic.o)
  "_OBJC_CLASS_$_AWSSNSGetEndpointAttributesInput", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
  "_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
  "_OBJC_CLASS_$_AWSSNSSubscribeInput", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
  "_OBJC_CLASS_$_GIDSignIn", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSGoogleSignInProvider.o)
  "_OBJC_CLASS_$_AWSSNSSetEndpointAttributesInput", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
  "_OBJC_CLASS_$_FBSDKAccessToken", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
  "_OBJC_CLASS_$_AWSSNS", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
  "_OBJC_CLASS_$_FBSDKGraphRequest", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
  "_OBJC_CLASS_$_AWSS3ListObjectsRequest", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSContentManager.o)
  "_OBJC_CLASS_$_AWSSNSCreatePlatformEndpointInput", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
  "_OBJC_CLASS_$_AWSSNSUnsubscribeInput", referenced from:
    objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
  "_AWSSNSErrorDomain", referenced from:
    ___88-[AWSPushManager interceptApplication:didRegisterForRemoteNotificationsWithDeviceToken:]_block_invoke.237 in AWSMobileHubHelper(AWSPushManager.o)
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>If I remove the embedded frameworks and add them to the podfile instead</p>
  
  <pre><code>pod 'AWSCognitoIdentityProvider'
  pod 'AWSCore'
  </code></pre>
  
  <p>I get the same errors.</p>
  
  <p>This is my other linker flags for debug build</p>
  
  <pre><code>//:configuration = Debug
  OTHER_LDFLAGS = $(inherited) -l"c++" 
  -l"sqlite3" 
  -l"stdc++" 
  -l"z" 
  -framework "AVFoundation" 
  -framework "AWSCognitoIdentityProvider" 
  -framework "AWSCore" 
  -framework "AddressBook" 
  -framework "AssetsLibrary" 
  -framework "CFNetwork" 
  -framework "CoreFoundation" 
  -framework "CoreGraphics" 
  -framework "CoreLocation" 
  -framework "CoreMedia" 
  -framework "CoreMotion" 
  -framework "CoreText" 
  -framework "CoreVideo" 
  -framework "MessageUI" 
  -framework "QuartzCore" 
  -framework "SafariServices" 
  -framework "Security" 
  -framework "StoreKit" 
  -framework "SystemConfiguration" 
  -framework "UIKit"
  
  //:completeSettings = none
  </code></pre>
  
  <p>edit: It would appear that it allows some frameworks be added with cocoapods fine</p>
  
  <p>the problem seems to arise when a framework requires -ObjC to be added to other linker flags</p>
  
  <pre><code>OTHER_LDFLAGS = $(inherited) -ObjC -l"z" -framework "AFNetworking" -framework "AWSCognitoIdentityProvider" -framework "AWSCore" -framework "Bolts" -framework "CFNetwork" -framework "CoreGraphics" -framework "FBSDKCoreKit" -framework "FBSDKLoginKit" -framework "PureLayout" -framework "QuartzCore" -framework "Reveal"
  </code></pre>
  
  <p>Above is in the pod.debug.xcconfig file</p>
  
  <p>When I add the following the compile fine with aws</p>
  
  <pre><code>pod 'FBSDKCoreKit'
  pod 'FBSDKLoginKit'
  pod 'PureLayout'
  pod 'AFNetworking', '3.1.0'
  </code></pre>
  
  <p>as examples</p>
  
  <p>But then if I add the following it adds in -ObjC and causes all the errors</p>
  
  <pre><code>pod 'Reveal-iOS-SDK', :configurations =&gt; ['Debug']
  </code></pre>
  
  <p>Any ideas what I should be doing here to get these frameworks playing together?</p>
  
  <p>The same happens if I try adding reveal as a pod file into the sample app that comes with AWSMobileHub "MySampleApp"</p>
  
  <p>edit 2:
  When I remove the AMazonAws folder that contains the AWSMobileHubHelper.framework and compile with just the aws files added from cocoapods it works fine. The issue seems to happen when the AmazonAws folder is added.</p>