Bug 178191

Summary: [Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and ApplePayError
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, buildbot, cdumez, commit-queue, esprehn+autocc, kondapallykalyan, mmaxfield, rniwa, ryanhaddad, sam, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews103 for mac-elcapitan
none
Patch none

Description Andy Estes 2017-10-11 15:53:03 PDT
[Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact
Comment 1 Andy Estes 2017-10-11 16:02:10 PDT
rdar://problem/34906367
Comment 2 Andy Estes 2017-10-11 16:03:27 PDT
Created attachment 323476 [details]
Patch
Comment 3 Build Bot 2017-10-11 17:10:50 PDT Comment hidden (obsolete)
Comment 4 Build Bot 2017-10-11 17:10:51 PDT Comment hidden (obsolete)
Comment 5 Andy Estes 2017-10-11 17:14:40 PDT
Committed r223215: <https://trac.webkit.org/changeset/223215>
Comment 6 Ryan Haddad 2017-10-11 17:19:59 PDT
This change broke the Sierra build:

/Volumes/Data/slave/sierra-32bit-release/build/Source/WebCore/Modules/applepay/cocoa/PaymentContactCocoa.mm:104:22: error: instance method '-setSubLocality:' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
/Volumes/Data/slave/sierra-32bit-release/build/Source/WebCore/Modules/applepay/cocoa/PaymentContactCocoa.mm:110:22: error: instance method '-setSubAdministrativeArea:' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
/Volumes/Data/slave/sierra-32bit-release/build/Source/WebCore/Modules/applepay/cocoa/PaymentContactCocoa.mm:147:40: error: property 'subLocality' not found on object of type 'CNPostalAddress *'
/Volumes/Data/slave/sierra-32bit-release/build/Source/WebCore/Modules/applepay/cocoa/PaymentContactCocoa.mm:150:50: error: property 'subAdministrativeArea' not found on object of type 'CNPostalAddress *'

https://build.webkit.org/builders/Apple%20Sierra%20Release%20%2832-bit%20Build%29/builds/5699
Comment 7 Ryan Haddad 2017-10-11 17:47:54 PDT
Reverted r223215 for reason:

This change broke the Sierra build.

Committed r223221: <https://trac.webkit.org/changeset/223221>
Comment 8 Andy Estes 2017-10-11 20:15:52 PDT
(In reply to Ryan Haddad from comment #6)
> This change broke the Sierra build:
> 
> /Volumes/Data/slave/sierra-32bit-release/build/Source/WebCore/Modules/
> applepay/cocoa/PaymentContactCocoa.mm:104:22: error: instance method
> '-setSubLocality:' not found (return type defaults to 'id')
> [-Werror,-Wobjc-method-access]
> /Volumes/Data/slave/sierra-32bit-release/build/Source/WebCore/Modules/
> applepay/cocoa/PaymentContactCocoa.mm:110:22: error: instance method
> '-setSubAdministrativeArea:' not found (return type defaults to 'id')
> [-Werror,-Wobjc-method-access]
> /Volumes/Data/slave/sierra-32bit-release/build/Source/WebCore/Modules/
> applepay/cocoa/PaymentContactCocoa.mm:147:40: error: property 'subLocality'
> not found on object of type 'CNPostalAddress *'
> /Volumes/Data/slave/sierra-32bit-release/build/Source/WebCore/Modules/
> applepay/cocoa/PaymentContactCocoa.mm:150:50: error: property
> 'subAdministrativeArea' not found on object of type 'CNPostalAddress *'
> 
> https://build.webkit.org/builders/Apple%20Sierra%20Release%20%2832-
> bit%20Build%29/builds/5699

Huh, that builder is on 10.12.5 and these APIs are available in 10.12.4 and later. Maybe it's using an Xcode with an old SDK, though.
Comment 9 Andy Estes 2017-10-16 14:45:08 PDT
Created attachment 323944 [details]
Patch
Comment 10 WebKit Commit Bot 2017-10-16 17:00:43 PDT
Comment on attachment 323944 [details]
Patch

Clearing flags on attachment: 323944

Committed r223447: <https://trac.webkit.org/changeset/223447>
Comment 11 WebKit Commit Bot 2017-10-16 17:00:45 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Ryosuke Niwa 2017-10-17 01:52:46 PDT
Looks like this patch broke builds on macOS 10.12.6 due to re-declaration of APIs on CNPostalAddress and CNMutablePostalAddress.

As far as I can tell, the relevant API is defined post 10.12.4 but changing if-def to the following doesn't seem to help:
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101204

so I'm at loss here.
Comment 13 Andy Estes 2017-10-17 12:33:07 PDT
(In reply to Ryosuke Niwa from comment #12)
> Looks like this patch broke builds on macOS 10.12.6 due to re-declaration of
> APIs on CNPostalAddress and CNMutablePostalAddress.
> 
> As far as I can tell, the relevant API is defined post 10.12.4 but changing
> if-def to the following doesn't seem to help:
> #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101204
> 
> so I'm at loss here.

Reverted in r223566: <https://trac.webkit.org/changeset/223566/webkit>
Comment 14 Andy Estes 2017-10-17 14:42:49 PDT
Committed r223580: <https://trac.webkit.org/changeset/223580>
Comment 15 Andy Estes 2017-10-17 16:10:52 PDT
Fixed the Sierra build in r223583: <https://trac.webkit.org/changeset/223583>