Merge branch 'master' into jack-ulysses

This commit is contained in:
Jack Flintermann 2016-05-02 13:18:46 -04:00
commit bab29a75a8
10 changed files with 120 additions and 2 deletions

2
.gitignore vendored
View File

@ -23,4 +23,4 @@ DerivedData
xcuserdata/
jazzy/*

12
.jazzy.yaml Normal file
View File

@ -0,0 +1,12 @@
objc: true
clean: true
author: Stripe
author_url: https://stripe.com
github_url: https://github.com/stripe/stripe-ios
github_file_prefix: https://github.com/stripe/stripe-ios/tree/master
umbrella_header: Stripe/PublicHeaders/Stripe.h
framework_root: .
module: Stripe
skip_undocumented: true
hide_documentation_coverage: true
theme: fullwidth

View File

@ -16,6 +16,8 @@ Our SDK is compatible with iOS apps supporting iOS 7.0 and above. It requires Xc
We've written a [guide](https://stripe.com/docs/mobile/ios) that explains everything from installation, to creating payment tokens, to Apple Pay integration and more.
For more fine-grained information on all of the classes and methods in our SDK, consult our [full SDK reference](http://stripe.github.io/stripe-ios/docs/index.html).
## Example apps
There are 2 example apps included in the repository:

View File

@ -162,6 +162,7 @@
04633B151CD4521F009D4FB5 /* STPAPIClient+ApplePay.m in Sources */ = {isa = PBXBuildFile; fileRef = 04633B041CD44F1C009D4FB5 /* STPAPIClient+ApplePay.m */; };
04633B161CD45222009D4FB5 /* STPAPIClient+ApplePay.h in Headers */ = {isa = PBXBuildFile; fileRef = 04633B061CD44F47009D4FB5 /* STPAPIClient+ApplePay.h */; settings = {ATTRIBUTES = (Public, ); }; };
04633B171CD45437009D4FB5 /* STPCategoryLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 04633B0A1CD44F6C009D4FB5 /* STPCategoryLoader.m */; };
04633B1A1CD7BF29009D4FB5 /* strip-frameworks.sh in Resources */ = {isa = PBXBuildFile; fileRef = 04633B191CD7BF29009D4FB5 /* strip-frameworks.sh */; };
04695AD31C77F9DB00E08063 /* NSString+Stripe.h in Headers */ = {isa = PBXBuildFile; fileRef = 04695AD11C77F9DB00E08063 /* NSString+Stripe.h */; };
04695AD41C77F9DB00E08063 /* NSString+Stripe.m in Sources */ = {isa = PBXBuildFile; fileRef = 04695AD21C77F9DB00E08063 /* NSString+Stripe.m */; };
04695AD91C77F9EF00E08063 /* STPDelegateProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 04695AD51C77F9EF00E08063 /* STPDelegateProxy.h */; };
@ -455,6 +456,7 @@
04633B0A1CD44F6C009D4FB5 /* STPCategoryLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STPCategoryLoader.m; sourceTree = "<group>"; };
04633B0B1CD44F6C009D4FB5 /* Stripe+ApplePay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Stripe+ApplePay.m"; sourceTree = "<group>"; };
04633B101CD44F78009D4FB5 /* Stripe+ApplePay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Stripe+ApplePay.h"; path = "PublicHeaders/Stripe+ApplePay.h"; sourceTree = "<group>"; };
04633B191CD7BF29009D4FB5 /* strip-frameworks.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "strip-frameworks.sh"; sourceTree = "<group>"; };
04695AD11C77F9DB00E08063 /* NSString+Stripe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Stripe.h"; sourceTree = "<group>"; };
04695AD21C77F9DB00E08063 /* NSString+Stripe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Stripe.m"; sourceTree = "<group>"; };
04695AD51C77F9EF00E08063 /* STPDelegateProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STPDelegateProxy.h; sourceTree = "<group>"; };
@ -780,6 +782,7 @@
04B33F2F1BC7414C00DD8120 /* Supporting Files */ = {
isa = PBXGroup;
children = (
04633B191CD7BF29009D4FB5 /* strip-frameworks.sh */,
04B33F301BC7417B00DD8120 /* Info.plist */,
);
name = "Supporting Files";
@ -807,8 +810,8 @@
04CDB4C31A5F30A700B854EE /* STPAPIClient.m */,
04633B081CD44F6C009D4FB5 /* PKPayment+Stripe.h */,
04633B091CD44F6C009D4FB5 /* PKPayment+Stripe.m */,
04633B0B1CD44F6C009D4FB5 /* Stripe+ApplePay.m */,
04633B101CD44F78009D4FB5 /* Stripe+ApplePay.h */,
04633B0B1CD44F6C009D4FB5 /* Stripe+ApplePay.m */,
04633B061CD44F47009D4FB5 /* STPAPIClient+ApplePay.h */,
04633B041CD44F1C009D4FB5 /* STPAPIClient+ApplePay.m */,
C124A16E1CCA968B007D42EE /* STPAnalyticsClient.h */,
@ -1293,6 +1296,7 @@
0438EFB81B741C2800D506CC /* stp_card_diners@2x.png in Resources */,
C11810C31CC7DA290022FB55 /* stp_card_form_front@3x.png in Resources */,
0438EFAA1B741C2800D506CC /* stp_card_cvc.png in Resources */,
04633B1A1CD7BF29009D4FB5 /* strip-frameworks.sh in Resources */,
C11810C11CC7DA290022FB55 /* stp_card_form_front.png in Resources */,
0438EFAC1B741C2800D506CC /* stp_card_cvc@2x.png in Resources */,
0438EFCC1B741C2800D506CC /* stp_card_mastercard@3x.png in Resources */,

View File

@ -13,6 +13,9 @@
#define FAUXPAS_IGNORED_IN_FILE(...)
FAUXPAS_IGNORED_IN_FILE(APIAvailability)
/**
* STPAPIClient extensions to create Stripe tokens from Apple Pay PKPayment objects.
*/
@interface STPAPIClient (ApplePay)
/**

View File

@ -70,6 +70,9 @@ typedef void (^STPTokenCompletionBlock)(STPToken * __nullable token, NSError * _
#pragma mark Bank Accounts
/**
* STPAPIClient extensions to create Stripe tokens from bank accounts.
*/
@interface STPAPIClient (BankAccounts)
/**
@ -84,6 +87,9 @@ typedef void (^STPTokenCompletionBlock)(STPToken * __nullable token, NSError * _
#pragma mark Credit Cards
/**
* STPAPIClient extensions to create Stripe tokens from credit or debit cards.
*/
@interface STPAPIClient (CreditCards)
/**

View File

@ -16,6 +16,9 @@ FAUXPAS_IGNORED_IN_FILE(APIAvailability)
@class Stripe;
/**
* Convenience methods for working with Apple Pay.
*/
@interface Stripe (ApplePay)
/**

72
Stripe/strip-frameworks.sh Executable file
View File

@ -0,0 +1,72 @@
################################################################################
#
# Copyright 2015 Realm Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
# This script strips all non-valid architectures from dynamic libraries in
# the application's `Frameworks` directory.
#
# The following environment variables are required:
#
# BUILT_PRODUCTS_DIR
# FRAMEWORKS_FOLDER_PATH
# VALID_ARCHS
# EXPANDED_CODE_SIGN_IDENTITY
# Signs a framework with the provided identity
code_sign() {
# Use the current code_sign_identitiy
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1"
/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1"
}
# Set working directory to products embedded frameworks
cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"
if [ "$ACTION" = "install" ]; then
echo "Copy .bcsymbolmap files to .xcarchive"
find . -name '*.bcsymbolmap' -type f -exec mv {} "${CONFIGURATION_BUILD_DIR}" \;
else
# Delete *.bcsymbolmap files from framework bundle unless archiving
find . -name '*.bcsymbolmap' -type f -exec rm -rf "{}" +\;
fi
echo "Stripping frameworks"
for file in $(find . -type f -perm +111); do
# Skip non-dynamic libraries
if ! [[ "$(file "$file")" == *"dynamically linked shared library"* ]]; then
continue
fi
# Get architectures for current file
archs="$(lipo -info "${file}" | rev | cut -d ':' -f1 | rev)"
stripped=""
for arch in $archs; do
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$file" "$file" || exit 1
stripped="$stripped $arch"
fi
done
if [[ "$stripped" != "" ]]; then
echo "Stripped $file of architectures:$stripped"
if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then
code_sign "${file}"
fi
fi
done

View File

@ -0,0 +1,7 @@
#!/bin/bash
rm -rf docs
./jazzy/bin/jazzy \
--config .jazzy.yaml \
--output "docs"

9
ci_scripts/install_jazzy.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
# Install jazzy
rm -rf jazzy
git clone --depth 1 --branch master https://github.com/realm/jazzy/
cd jazzy
bundle install
cd ..