Skip to content

Commit

Permalink
Version 3.1: Deployment target raised to iOS 9
Browse files Browse the repository at this point in the history
* [CHANGED] If you integrate the SDK manually, please link to the
  ExternalAccessory framework
* [UPDATE] Deployment target raised to iOS 9.0
* [CHANGED] The login mask does not show the "Reveal password" button anymore
* [ADDED] SumUp Air Register support
* [IMPROVEMENT] Dedicated error code for currency mismatches – please refer
  to our README for hints regarding correct currency handling
* [IMPROVEMENT] Populate NSLocalizedDescriptionKey in SDK errors – you can still access
  NSUnderlyingErrorKey for more details regarding the underlying error
* [ADDED] New currency code constant (CLP) and new languages (es-CL, et)
  • Loading branch information
mollidor committed Aug 20, 2018
1 parent 33b2aa3 commit dd5fc66
Show file tree
Hide file tree
Showing 74 changed files with 973 additions and 114 deletions.
9 changes: 9 additions & 0 deletions AirRegister/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SumUp iOS Register SDK Changelog

## Version 3.1

* [ADDED] SumUp Air Register support

Sample application:

* [ADDED] SumUp Air Register support
75 changes: 75 additions & 0 deletions AirRegister/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# SumUp mPOS SDK: Air Register Support

The following information is only relevant if you want to support the SumUp
Air Register device. For general setup instructions, please refer to our main
[README](../README.md).

### Table of Contents

* [Installation](#installation)
* [External Accessory Protocols](#external-accessory-protocols)
* [MFi Program Authorization](#mfi-program-authorization)
* [Getting started](#getting-started)
* [Register SDK](#register-sdk)
* [Changelog](#changelog)

## Installation

### External Accessory Protocols

After [integrating the SumUp SDK](../README.md#installation), please perform
this step, regardless of your chosen integration option:

1. Add the following `UISupportedExternalAccessoryProtocols` to your app's
[Info.plist](../SampleApp/SumUpSDKSampleApp/SumUpSDKSampleApp-Info.plist) file:

com.sumup.control
com.sumup.printing
com.sumup.air_data

> You can add these protocols to the Swift sample app for a working register
demo screen.

### MFi Program Authorization

When your app communicates with the SumUp Air Register, which is an approved
[MFi](https://developer.apple.com/programs/mfi/) device, Apple requires your application to be registered before
submission to the App Store.
This registration process officially associates your app with SumUp Air Register,
and can only be performed by SumUp.
Once your application has been registered, future app versions will not require
additional registrations.
Please get in touch with [email protected] providing your bundle identifier
and team ID before submission.

> This step is only required to publish your app on the App Store. For Ad-Hoc builds
and Enterprise Distribution this is not necessary.

## Getting started

Before accessing `[SMPSumUpRegisterSDK sharedInstance]`, call `[SMPSumUpRegisterSDK registerIsSupported]`
to verify that you have set up the register SDK correctly.

## Register SDK

The SumUp Air Register is automatically used as the preferred card terminal while it is
connected. To use the integrated printer and query its current status, use the
`SumupRegisterSDK` class. Please make sure that all
`UISupportedExternalAccessoryProtocols` are included in your apps
[Info.plist](../SampleApp/SumUpSDKSampleApp/SumUpSDKSampleApp-Info.plist).

```objc
[[SMPSumUpRegisterSDK sharedInstance] setDelegate:self];
[[SMPSumUpRegisterSDK sharedInstance] startListeningForRegister];

- (void)registerDidConnect:(SMPRegisterSDKStatus *)deviceStatus {
[[SMPSumUpRegisterSDK sharedInstance] printEscPos:@"Device is conntected"];
}

```

> The register-specific APIs are available without login.
## Changelog

[SumUp Air Register SDK Changelog](CHANGELOG.md)
21 changes: 15 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# SumUp iOS SDK Changelog

## Version 3.1

* [CHANGED] If you integrate the SDK manually, please link to the `ExternalAccessory`
framework as per our [setup guide](README.md)
* [UPDATE] Deployment target raised to iOS 9.0
* [CHANGED] The login mask does not show the "Reveal password" button anymore
* [ADDED] SumUp [Air Register](AirRegister/README.md) support
* [IMPROVEMENT] Dedicated error code for currency mismatches – please refer to our
[README](README.md) for hints regarding correct currency handling
* [[IMPROVEMENT]](https://github.com/sumup/sumup-ios-sdk/issues/11) Populate
`NSLocalizedDescriptionKey` in SDK errors – you can still access
`NSUnderlyingErrorKey` for more details regarding the underlying error
* [ADDED] New currency code constant (`CLP`) and new languages (`es-CL`, `et`)

## Version 3.0

* [UPDATE] Update target SDK to iOS 11, deployment target raised to iOS 8.0
Expand All @@ -16,7 +30,6 @@ Sample application:
when running on iOS 5
* [IMPROVEMENT] Swift sample app uses modular imports instead of bridging headers


## Transition Guide to 3.0

When improving imported Swift names we took the opportunity to rename
Expand All @@ -33,15 +46,14 @@ Migrating your code base is easy.
* Rename all occurrences of `SumUpCompletionBlock` to `SMPCompletionBlock`
* In ObjC:
- rename all case-sensitive occurrences of
`SumupSDK` to `SMPSumUpSDK` (except for imports, see above),
`SumupSDK` to `SMPSumUpSDK` (except for imports, see above),
* In Swift:
- rename all case-sensitive occurrences of `SumupSDK` and `SMPSumupSDK`
to `SumUpSDK`
- remove trailing parantheses from `SumUpSDK`'s `isLoggedIn`,
`checkoutInProgress`, `bundleVersion `, and `bundleVersionShortString`
- rename `SMPSkipScreenOptions` to `SkipScreenOptions`


## Version 2.3.2

* [BUGFIX] Fix a crash in checkout on iPad Pro when building against iOS 11
Expand Down Expand Up @@ -72,7 +84,6 @@ Migrating your code base is easy.
* [ADDED] Add option to specify tip amount.
* [IMPROVEMENT] Convert to Auto Layout


## Version 2.2

* [BUGFIX] Fix a crash when trying to re-connect to an Air/PIN+ terminal,
Expand All @@ -92,7 +103,6 @@ Sample application:
* [ADDED] Run `+[SumupSDK testSDKIntegration]` when building in
Debug configuration.


## Version 2.1

* [ADDED] Provide method to let merchants change their checkout preferences
Expand All @@ -103,7 +113,6 @@ Sample application:
* [ADDED] Add button to present checkout preferences
* [BUGFIX] Add missing `-ObjC` linker flag to Swift sample app


## Version 2.0

* [IMPROVEMENT] Support latest Air and Air Lite terminals
Expand Down
107 changes: 77 additions & 30 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,85 @@ Portions of the SumUp iOS SDK and sample app may utilize the following copyright

---

[SBJson for Objective-C](http://www.sbjson.org)

Copyright (C) 2007-2009 Stig Brautaset. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentationand/or other materials provided with the distribution.

* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[SBJson for Objective-C](https://github.com/stig/json-framework)

Copyright (C) 2007-2015 Stig Brautaset. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may be used
to endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---

Olivier Halligon (JSONRPC-framework)
[AliJSONRPC](https://github.com/AliSoftware/AliJSONRPC)

Copyright (C) 2009 Olivier Halligon. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
* Neither the name of the author nor the names of its contributors may be used
to endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---

Uses the QuickDialog Framework.
Copyright 2011 [ESCOZ Inc](http://escoz.com)
[QuickDialog](https://github.com/escoz/QuickDialog)

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
Copyright 2011 ESCOZ Inc - http://escoz.com

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.
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.

---

Uses example code of Erica Sadun.

[Erica Sadun](http://ericasadun.com), iPhone Developer's Cookbook, 6.x Edition
[Erica Sadun](http://ericasadun.com), iPhone Developer's Cookbook, 6.x Edition
BSD License

Modified by Eric Horacek for Monospace Ltd. on 2/4/13
Expand All @@ -66,19 +99,33 @@ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS “AS IS” AND ANY EX

---

Uses [SAMKeychain](https://github.com/soffes/SAMKeychain).
[SAMKeychain](https://github.com/soffes/SAMKeychain).

Copyright (c) 2010-2016 Sam Soffes, [http://soff.es](http://soff.es)
Copyright (c) 2010-2016 Sam Soffes, http://soff.es

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---

Uses NSData+Base64 by Matt Gallagher
[NSData+Base64](https://github.com/l4u/NSData-Base64/blob/master/NSData%2BBase64.h)

Created by Matt Gallagher on 2009/06/03.
Copyright 2009 Matt Gallagher. All rights reserved.

Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Platform](https://img.shields.io/badge/Platform-iOS-lightgrey.svg?style=flat-square)](#prerequisites)
[![Created](https://img.shields.io/badge/Made%20by-SumUp-blue.svg?style=flat-square)](https://sumup.com)
[![Supports](https://img.shields.io/badge/Requires-iOS%208+-red.svg?style=flat-square)]()
[![Version](https://img.shields.io/badge/Version-3.0-yellowgreen.svg?style=flat-square)](CHANGELOG.md)
[![Version](https://img.shields.io/badge/Version-3.1-yellowgreen.svg?style=flat-square)](CHANGELOG.md)
[![License](https://img.shields.io/badge/License-SumUp-brightgreen.svg?style=flat-square)](LICENSE)
[![CocoaPods](https://img.shields.io/cocoapods/v/SumUpSDK.svg?style=flat-square)]()

Expand All @@ -25,9 +25,9 @@ For more information, please refer to SumUp's

### Prerequisites
1. Registered for a merchant account via SumUp's [country websites](https://sumup.com/) (or received a test account).
2. Received SumUp card terminal: Air, Air Lite, PIN+ terminal or Chip & Signature reader.
2. Received SumUp card terminal: Air, Air Lite, PIN+ terminal, Chip & Signature reader, or SumUp Air Register.
3. Requested an Affiliate (Access) Key via [SumUp Dashboard](https://me.sumup.com/developers) for Developers.
4. Deployment Target iOS 8.0 or later.
4. Deployment Target iOS 9.0 or later.
5. Xcode 9 and iOS SDK 11 or later.
6. iPhone, iPad or iPod touch.

Expand All @@ -50,6 +50,9 @@ For more information, please refer to SumUp's

## Installation

If you want to support the SumUp Air Register, please also read our additional
[Air Register setup guide](AirRegister/README.md).

### Manual Integration

The SumUp SDK is provided as an embedded framework `SumUpSDK.embeddedframework`
Expand All @@ -62,6 +65,7 @@ images and localizations. Please follow the steps below to prepare your project:

Accelerate
AVFoundation
ExternalAccessory
MapKit

4. Add `-ObjC` to "Other Linker Flags" if not yet included.
Expand All @@ -71,11 +75,10 @@ images and localizations. Please follow the steps below to prepare your project:

SumUpSDK.embeddedframework/Resources/SMPSharedResources.bundle


> Note:
> Note:
> You can use the [sample app](SampleApp/SumUpSDKSampleApp)
> that is provided with the SumUp SDK as a reference project.
> The Xcode project contains sample apps written in Objective-C and Swift.
> The Xcode project contains sample apps written in Objective-C and Swift.
> In your debug setup you can also call `+[SMPSumUpSDK testSDKIntegration]`.
> It will run various checks and print its findings to the console.
> Please do not call it in your Release build.
Expand Down Expand Up @@ -122,7 +125,6 @@ for more information regarding the listed permissions required.
[Bluetooth peripheral usage](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW20),
and [microphone access in iOS 7 and later](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW25).


## Getting started

### Import the SDK
Expand Down Expand Up @@ -247,8 +249,7 @@ The following functions are handled by the [SumUp APIs](http://docs.sumup.com/re
* [Account management](http://docs.sumup.com/rest-api/accounts-api/)
## Community
- **Questions?** Get in contact with our integration team by sending an email to
<a href="mailto:[email protected]">[email protected]</a>.
- **Questions?** Get in contact with our integration team by sending an email to [email protected].
- **Found a bug?** [Open an issue](https://github.com/sumup/sumup-ios-sdk/issues/new).
Please provide as much information as possible.
Expand Down
Loading

0 comments on commit dd5fc66

Please sign in to comment.