title: Unknown type name 'SKPaymentDiscount'. FBSDKCoreKit
body: <p>I am facing an issue when building the Facebook sdk for iOS <code>facebook-ios-sdk</code> in my <strong>Swift 3 iOS application</strong>.</p>
  
  <p>I have recently updated the <code>FBSDKCorekit</code> and <code>FBSDKLoginkit</code> pods I'm using in my iOS application from version <strong>4.30.0</strong> to <strong>5.13.1</strong></p>
  
  <p>I am using XCode 9.3.1 targeting iOS 10.2. when building my application with XCode I get the following issue: <strong>Unknown type name 'SKPaymentDiscount'; did you mean 'SKProductDiscount'?</strong></p>
  
  <p>This error is raised when the compiler attempts to build the following file <code>Core/FBSDKPaymentObserver.m</code>. See the following segment.</p>
  
  <pre><code>...
  #if !TARGET_OS_TV
  #if __IPHONE_OS_VERSION_MAX_ALLOWED &gt; __IPHONE_11_1
  #if __IPHONE_OS_VERSION_MAX_ALLOWED &gt; __IPHONE_11_4
  #if __IPHONE_OS_VERSION_MAX_ALLOWED &gt; __IPHONE_12_1
    // promotional offer starting from iOS 12.2
    if (@available(iOS 12.2, *)) {
      SKPaymentDiscount *paymentDiscount = transaction.payment.paymentDiscount;
      if (paymentDiscount) {
        NSArray&lt;SKProductDiscount *&gt; *discounts = product.discounts;
        for (SKProductDiscount *discount in discounts) {
          if (discount.paymentMode == SKProductDiscountPaymentModeFreeTrial &amp;&amp;
              [paymentDiscount.identifier isEqualToString:discount.identifier]) {
            return YES;
          }
        }
      }
    }
  #endif
  ...
  </code></pre>
  
  <p>As I understood after doing some research, <code>SKPaymentDiscount</code> was only introduced in iOS sdk 12.2 . Since I am using XCode 9.3.1 the latest available iOS SDK is 11.3 but the conditional compiler expression <code>#if __IPHONE_OS_VERSION_MAX_ALLOWED &gt; __IPHONE_12_1</code>
  should make sure the compiler does not build the previous code segment.</p>
  
  <p>However that doesn't seem to be the case and I am getting the build error.
  <strong>Unknown type name 'SKPaymentDiscount'; did you mean 'SKProductDiscount'?</strong></p>
  
  <p>I have tried installing XCode 10.0 which supports iOS sdk 12.2 but I got the same error. Please advise.</p>