Attention: This is an alpha release!
A StoreKit implementation to make IAP debugging with the iOS simulator easier.
This is a swift port of SimStoreKit simstorekit.
To use MockStoreKit change the import when using the iOS simulator:
#if (arch(i386) || arch(x86_64)) && (os(iOS) || os(watchOS) || os(tvOS))
import MockStoreKit
#else
import StoreKit
#endif
To provide mocked products use the mockDelegate inside the SKPaymentQueue and SKProductsRequest class.
This is by no means ready to do serious IAP testing.
TODO:
- The whole library needs to be reviewed completely.
- Unit tests
- Test all types of products (renewable, ...)
To run the example project, clone the repo, and run pod install
from the Example directory first.
MockStoreKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MockStoreKit"
David Kraus, [email protected]
Copyright 2016 Number42
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.