Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change minimum requirements to Xcode9 / iOS 9 #851

Merged
merged 20 commits into from
Dec 12, 2017
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ env:
- TEST_TYPE=installation_carthage
- TEST_TYPE=installation_cocoapods
- TEST_TYPE=installation_cocoapods_frameworks
# Fauxpas 1.7.2 does not build our project correctly https://bitbucket.org/ali_rantakari/faux-pas/issues/117/unrecoverable-compiler-error-translation
# - TEST_TYPE=lint
- TEST_TYPE=lint
- TEST_TYPE=tests
- TEST_TYPE=analyzer
- TEST_TYPE=documentation
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 12.0.0 2017-12-XX
* Minimum supported iOS version is now 9.0.
* If you need to support iOS 8, the last supported version is [11.5.0](https://github.com/stripe/stripe-ios/releases/tag/v11.5.0)
* Minimum supported Xcode version is now 9.0

## 11.5.0 2017-11-09
* Adds a new helper method to `STPSourceParams` for creating reusable Alipay sources. [#811](https://github.com/stripe/stripe-ios/pull/811)
* Silences spurious availability warnings when using Xcode9 [#823](https://github.com/stripe/stripe-ios/pull/823)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -385,7 +385,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OBJC_BRIDGING_HEADER = "Standard Integration (Swift)/Standard Integration (Swift)-Bridging-Header.h";
Expand All @@ -411,7 +411,6 @@
);
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
INFOPLIST_FILE = "Standard Integration (Swift)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.stripe.SimpleSDKExample;
PRODUCT_NAME = "Standard Integration (Swift)";
Expand Down Expand Up @@ -441,7 +440,6 @@
);
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
INFOPLIST_FILE = "Standard Integration (Swift)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.stripe.SimpleSDKExample;
PRODUCT_NAME = "Standard Integration (Swift)";
Expand Down
4 changes: 2 additions & 2 deletions FauxPasConfig/main.fauxpas.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Generated from the Faux Pas GUI
{
// Xcode target to check (String)
"target": "StripeiOS",
"target": "StripeiOSStatic",
// Xcode build configuration to check (String)
"buildConfig": "Release",
// Rules to apply (Array of strings)
"rules": ["APIAvailability","BuildSettingsSetInGUI","DefaultInExhaustiveSwitch","IBOutletsInPublicInterface","ImplicitAtomicProperty","InstanceMethodWritesToStaticVariable","MacroLiteral","MallocCast","MallocWithoutSizeof","NonTypedefBlockDeclaration","ReservedIdentifierNaming","StrongInsteadOfRetain","ThrowingObjCException","UnusedMethod","UnusedResource","UsedVariableMarkedUnused","XIBUnknownClassReference"],
"rules": ["BuildSettingsSetInGUI","DefaultInExhaustiveSwitch","IBOutletsInPublicInterface","ImplicitAtomicProperty","InstanceMethodWritesToStaticVariable","MacroLiteral","MallocCast","MallocWithoutSizeof","NonTypedefBlockDeclaration","ReservedIdentifierNaming","StrongInsteadOfRetain","ThrowingObjCException","UnusedMethod","UnusedResource","UsedVariableMarkedUnused","XIBUnknownClassReference"],
// Rules to apply only (Array of strings)
//"onlyRules": [],
// Rule tags to apply (Array of strings)
Expand Down
8 changes: 3 additions & 5 deletions Stripe.podspec
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
Pod::Spec.new do |s|
s.name = 'Stripe'
s.version = '11.5.0'
s.version = '12.0.0'
s.summary = 'Stripe is a web-based API for accepting payments online.'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.homepage = 'https://stripe.com/docs/mobile/ios'
s.authors = { 'Stripe' => 'support+github@stripe.com' }
s.source = { :git => 'https://github.com/stripe/stripe-ios.git', :tag => "v#{s.version}" }
s.frameworks = 'Foundation', 'Security', 'WebKit', 'PassKit', 'AddressBook', 'CoreLocation'
s.weak_frameworks = 'Contacts'
s.frameworks = 'Foundation', 'Security', 'WebKit', 'PassKit', 'Contacts', 'CoreLocation'
s.requires_arc = true
s.platform = :ios
s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'
s.public_header_files = 'Stripe/PublicHeaders/*.h'
s.source_files = 'Stripe/PublicHeaders/*.h', 'Stripe/*.{h,m}'
s.ios.resource_bundle = { 'Stripe' => 'Stripe/Resources/**/*' }
s.compiler_flags = '-Wno-unguarded-availability'
end
4 changes: 1 addition & 3 deletions Stripe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,6 @@
C1FEE5971CBFF11400A7632B /* STPPostalCodeValidator.m in Sources */ = {isa = PBXBuildFile; fileRef = C1FEE5951CBFF11400A7632B /* STPPostalCodeValidator.m */; };
C1FEE5991CBFF24000A7632B /* STPPostalCodeValidatorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = C1FEE5981CBFF24000A7632B /* STPPostalCodeValidatorTest.m */; };
F1122A7E1DFB84E000A8B1AF /* UINavigationBar+StripeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F1122A7D1DFB84E000A8B1AF /* UINavigationBar+StripeTest.m */; };
F116E94B1D83404D0026A52A /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04B94BC71A47B78A00092C46 /* AddressBook.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
F116E94C1D83405E0026A52A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11C74B9B164043050071C2CA /* Foundation.framework */; };
F116E94D1D8340640026A52A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A0D74F918F6106100966D7B /* Security.framework */; };
F12829DA1D7747E4008B10D6 /* STPBundleLocator.h in Headers */ = {isa = PBXBuildFile; fileRef = F12829D81D7747E4008B10D6 /* STPBundleLocator.h */; };
Expand Down Expand Up @@ -631,7 +630,7 @@
F152322C1EA9306100D65C67 /* NSURLComponents+Stripe.m in Sources */ = {isa = PBXBuildFile; fileRef = F15232291EA9306100D65C67 /* NSURLComponents+Stripe.m */; };
F152322D1EA9306100D65C67 /* NSURLComponents+Stripe.m in Sources */ = {isa = PBXBuildFile; fileRef = F15232291EA9306100D65C67 /* NSURLComponents+Stripe.m */; };
F152322F1EA9344600D65C67 /* iDEALSource.json in Resources */ = {isa = PBXBuildFile; fileRef = F152322E1EA9344000D65C67 /* iDEALSource.json */; };
F15232311EA93E6800D65C67 /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F15232301EA93E6800D65C67 /* Contacts.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
F15232311EA93E6800D65C67 /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F15232301EA93E6800D65C67 /* Contacts.framework */; settings = {ATTRIBUTES = (Required, ); }; };
F15675401DB544D3004468E3 /* STPAddCardViewControllerLocalizationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F156753F1DB544D3004468E3 /* STPAddCardViewControllerLocalizationTests.m */; };
F15AC18E1DBA9CA90009EADE /* FBSnapshotTestCase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F15AC18D1DBA9CA90009EADE /* FBSnapshotTestCase.framework */; };
F15AC1901DBA9CC60009EADE /* FBSnapshotTestCase.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = F15AC18D1DBA9CA90009EADE /* FBSnapshotTestCase.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
Expand Down Expand Up @@ -1224,7 +1223,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F116E94B1D83404D0026A52A /* AddressBook.framework in Frameworks */,
F15232311EA93E6800D65C67 /* Contacts.framework in Frameworks */,
F1D765CE1EDE331500F37005 /* CoreLocation.framework in Frameworks */,
F116E94C1D83405E0026A52A /* Foundation.framework in Frameworks */,
Expand Down
7 changes: 0 additions & 7 deletions Stripe/BuildConfigurations/Project-Debug.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,5 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO

ONLY_ACTIVE_ARCH = YES

// iOS Deployment Target
//
// Code will load on this and later versions of iOS. Framework APIs that are unavailable
// in earlier versions will be weak-linked; your code should check for null function
// pointers or specific system versions before calling newer APIs.

IPHONEOS_DEPLOYMENT_TARGET = 8.0

ENABLE_TESTABILITY = YES
9 changes: 0 additions & 9 deletions Stripe/BuildConfigurations/Project-Release.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,3 @@ GCC_PREPROCESSOR_DEFINITIONS = NDEBUG $(STP_EXTRA_PREPROCESSOR_MACROS)

VALIDATE_PRODUCT = YES

// iOS Deployment Target
//
// Code will load on this and later versions of iOS. Framework APIs that are unavailable
// in earlier versions will be weak-linked; your code should check for null function
// pointers or specific system versions before calling newer APIs.
//

IPHONEOS_DEPLOYMENT_TARGET = 8.0

10 changes: 10 additions & 0 deletions Stripe/BuildConfigurations/Project-Shared.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,13 @@ SDKROOT = iphoneos


WARNING_CFLAGS = -Wall -Wextra -Wundef -Wfloat-equal

// iOS Deployment Target
//
// Code will load on this and later versions of iOS. Framework APIs that are unavailable
// in earlier versions will be weak-linked; your code should check for null function
// pointers or specific system versions before calling newer APIs.
//

IPHONEOS_DEPLOYMENT_TARGET = 9.0

3 changes: 0 additions & 3 deletions Stripe/BuildConfigurations/StripeiOS Tests-Shared.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR


IPHONEOS_DEPLOYMENT_TARGET = 8.0


// Code Signing Identity
//
// The name ("common name") of a valid code-signing certificate in a keychain within your
Expand Down
12 changes: 1 addition & 11 deletions Stripe/BuildConfigurations/StripeiOS-Shared.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CLANG_WARN_INFINITE_RECURSION = YES
CLANG_WARN_SUSPICIOUS_MOVE = YES
CLANG_WARN_ASSIGN_ENUM = YES
CLANG_WARN_DOCUMENTATION_COMMENTS = YES
CLANG_WARN_UNGUARDED_AVAILABILITY = NO
CLANG_WARN_UNGUARDED_AVAILABILITY = YES

// Code Signing Identity
//
Expand Down Expand Up @@ -115,16 +115,6 @@ INFOPLIST_FILE = Stripe/Info.plist
INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Frameworks


// iOS Deployment Target
//
// Code will load on this and later versions of iOS. Framework APIs that are unavailable
// in earlier versions will be weak-linked; your code should check for null function
// pointers or specific system versions before calling newer APIs.
//

IPHONEOS_DEPLOYMENT_TARGET = 8.0


// Runpath Search Paths
//
// This is a list of paths to be added to the runpath search path list for the image
Expand Down
12 changes: 1 addition & 11 deletions Stripe/BuildConfigurations/StripeiOSResources.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,6 @@ INFOPLIST_FILE = StripeiOSResources/Info.plist

INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Bundles

IPHONEOS_DEPLOYMENT_TARGET = 8.0

// OS X Deployment Target
//
// Code will load on this and later versions of OS X. Framework APIs that are
// unavailable in earlier versions will be weak-linked; your code should check for null
// function pointers or specific system versions before calling newer APIs.

MACOSX_DEPLOYMENT_TARGET = 10.11



PRODUCT_BUNDLE_IDENTIFIER = com.stripe.StripeiOSResources
Expand Down Expand Up @@ -219,4 +209,4 @@ ENABLE_NS_ASSERTIONS = NO
//
// Produce debugging information. This information is required for shader profiling.

MTL_ENABLE_DEBUG_INFO = NO
MTL_ENABLE_DEBUG_INFO = NO
9 changes: 0 additions & 9 deletions Stripe/BuildConfigurations/StripeiOSStatic.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,6 @@ GCC_WARN_UNUSED_PARAMETER = YES

STP_EXTRA_PREPROCESSOR_MACROS = STP_STATIC_LIBRARY_BUILD

// iOS Deployment Target
//
// Code will load on this and later versions of iOS. Framework APIs that are unavailable
// in earlier versions will be weak-linked; your code should check for null function
// pointers or specific system versions before calling newer APIs.
//

IPHONEOS_DEPLOYMENT_TARGET = 8.0


// Other Linker Flags
//
Expand Down
4 changes: 2 additions & 2 deletions Stripe/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>11.5.0</string>
<string>12.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>11.5.0</string>
<string>12.0.0</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
Expand Down
17 changes: 0 additions & 17 deletions Stripe/PKPaymentAuthorizationViewController+Stripe_Blocks.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,6 @@ - (void)paymentAuthorizationViewController:(__unused PKPaymentAuthorizationViewC
});
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
- (void)paymentAuthorizationViewController:(__unused PKPaymentAuthorizationViewController *)controller
didSelectShippingAddress:(ABRecordRef)address
completion:(STPApplePayShippingAddressCompletionBlock)completion {
STPAddress *stpAddress = [[STPAddress alloc] initWithABRecord:address];
self.onShippingAddressSelection(stpAddress, ^(STPShippingStatus status, NSArray<PKShippingMethod *>* shippingMethods, NSArray<PKPaymentSummaryItem*> *summaryItems) {
if (status == STPShippingStatusInvalid) {
completion(PKPaymentAuthorizationStatusInvalidShippingPostalAddress, shippingMethods, summaryItems);
}
else {
completion(PKPaymentAuthorizationStatusSuccess, shippingMethods, summaryItems);
}
});
}
#pragma clang diagnostic pop

- (void)paymentAuthorizationViewControllerDidFinish:(__unused PKPaymentAuthorizationViewController *)controller {
if (self.didSucceed) {
self.onFinish(STPPaymentStatusSuccess, nil);
Expand Down
2 changes: 1 addition & 1 deletion Stripe/PublicHeaders/STPAPIClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static NSString *const STPSDKVersion = @"11.5.0";
*/
+ (PKPaymentRequest *)paymentRequestWithMerchantIdentifier:(NSString *)merchantIdentifier
country:(NSString *)countryCode
currency:(NSString *)currencyCode NS_AVAILABLE_IOS(8_0);
currency:(NSString *)currencyCode;

@end

Expand Down
33 changes: 3 additions & 30 deletions Stripe/PublicHeaders/STPAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@

#import <Foundation/Foundation.h>
#import <PassKit/PassKit.h>

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
#import <AddressBook/AddressBook.h>
#pragma clang diagnostic pop

#import "STPAPIResponseDecodable.h"

@class CNContact;
Expand Down Expand Up @@ -108,41 +102,20 @@ typedef NS_ENUM(NSUInteger, STPBillingAddressFields) {
+ (nullable NSDictionary *)shippingInfoForChargeWithAddress:(nullable STPAddress *)address
shippingMethod:(nullable PKShippingMethod *)method;

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"

/**
Initializes a new STPAddress with data from an Address Book record.

@param record The Address Book record you want to populate the STPAddress from.
@return A new STPAddress instance with data copied from the passed in record.
*/
- (instancetype)initWithABRecord:(ABRecordRef)record;


/**
Generates an Address Book record representation of this STPAddress.

@return A new autoreleased Address Book record with data copied from this
STPAddress instance.
*/
- (ABRecordRef)ABRecordValue;
#pragma clang diagnostic pop

/**
Initializes a new STPAddress with data from an PassKit contact.

@param contact The PassKit contact you want to populate the STPAddress from.
@return A new STPAddress instance with data copied from the passed in contact.
*/
- (instancetype)initWithPKContact:(PKContact *)contact NS_AVAILABLE_IOS(9_0); FAUXPAS_IGNORED_ON_LINE(APIAvailability);
- (instancetype)initWithPKContact:(PKContact *)contact;

/**
Generates a PassKit contact representation of this STPAddress.

@return A new PassKit contact with data copied from this STPAddress instance.
*/
- (PKContact *)PKContactValue NS_AVAILABLE_IOS(9_0); FAUXPAS_IGNORED_ON_LINE(APIAvailability);
- (PKContact *)PKContactValue;

/**
Initializes a new STPAddress with a contact from the Contacts framework.
Expand All @@ -151,7 +124,7 @@ typedef NS_ENUM(NSUInteger, STPBillingAddressFields) {

@return A new STPAddress instance with data copied from the passed in contact.
*/
- (instancetype)initWithCNContact:(CNContact *)contact NS_AVAILABLE_IOS(9_0); FAUXPAS_IGNORED_ON_LINE(APIAvailability);
- (instancetype)initWithCNContact:(CNContact *)contact;


/**
Expand Down
2 changes: 1 addition & 1 deletion Stripe/PublicHeaders/STPRedirectContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ NS_EXTENSION_UNAVAILABLE("Redirect based sources are not available in extensions
@param presentingViewController The view controller to present the Safari
view controller from.
*/
- (void)startSafariViewControllerRedirectFlowFromViewController:(UIViewController *)presentingViewController NS_AVAILABLE_IOS(9_0);
- (void)startSafariViewControllerRedirectFlowFromViewController:(UIViewController *)presentingViewController;

/**
Starts a redirect flow by calling `openURL` to bounce the user out to
Expand Down
Loading