Lead maintainers: Emir Çiftçioğlu (eciftcioglu), Buğra Ekuklu (Chatatata).
If you're searching for our licensed application, go to BuyBuddy.app.
The BuyBuddy Apple Devices Software Development Kit makes your application integrate easily with BuyBuddy platform to create astonishing shopping experience. This library provides a generic abstraction layer to access BuyBuddy platform in a modular way.
To get started, navigate to Apple Devices Integration Guide.
- Platform management: An object-oriented abstraction of platform management to not deal with underlying HATEOAS API. Every single entity found in our platform can be managed with this library.
- Simplified payments: You might use your own payment system, or you can use existing ones found in APIs.
- Toll-free bridging: This framework is also used by our open-source management application. We offer toll-free bridging between clients and our web services, which means you can use every feature found in our licensed applications.
- Core Data support: You may use our seperate Core Data wrapper library if you want first-class support for offline persistence.
We have four seperate libraries for Apple devices, including this repository.
- CoreKit: The library responsible for consuming our HATEOAS web services in an elegant way.
- IoTKit: Device management, consolidation tools, Bluetooth Low Energy® (BLE) wrappers.
- Core Data Wrapper: Core Data wrapper for CoreKit to achieve offline persistence and caching.
- UIKit (iOS only): Convenience classes for easy integration on iOS devices.
To see a proof of concept application, you can check out our implementation at BuyBuddy.app.
Our software development kit supports various installation methods.
-
Roll a new terminal and change your current working directory to the root of your project directory.
-
If your project is not git repository, instantiate a new one by running command:
$ git init
-
Add BuyBuddyKit as a git submodule by running the following command:
$ git submodule add https://github.com/heybuybuddy/BuyBuddyKit.git Library/BuyBuddyKit
-
Open the new
BuyBuddyKit
folder, and drag theBuyBuddyKit.xcodeproj
into the Project Navigator of your application's Xcode project.It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter.
-
Select the
BuyBuddyKit.xcodeproj
in the Project Navigator and verify the deployment target matches that of your application target. -
Select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar.
-
In the tab bar at the top of that window, open the "General" panel.
-
Click on the
+
button under the "Embedded Binaries" section. -
You will see two different
BuyBuddyKit.xcodeproj
folders each with two different versions of theBuyBuddyKit.framework
nested inside aProducts
folder.It does not matter which
Products
folder you choose from, but it does matter whether you choose the top or bottomBuyBuddyKit.framework
. -
Select the top
BuyBuddyKit.framework
for iOS and the bottom one for macOS.You can verify which one you selected by inspecting the build log for your project. The build target for
BuyBuddyKit
will be listed as eitherBuyBuddyKit iOS
,BuyBuddyKit macOS
,BuyBuddyKit tvOS
orBuyBuddyKit watchOS
. -
And that's it!
The
BuyBuddyKit.framework
is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
CocoaPods 1.1+ is required to build BuyBuddyKit 2.0+.
To integrate BuyBuddyKit into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Name>' do
pod 'BuyBuddyKit', '~> 2.0'
end
Then, run the following command:
$ pod install
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate BuyBuddyKit into your Xcode project using Carthage, specify it in your Cartfile
:
github "heybuybuddy/BuyBuddyKit" ~> 2.0
Run carthage update
to build the framework and drag the built BuyBuddyKit.framework
into your Xcode project.
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler.
It is in early development, but BuyBuddyKit does support its use on supported platforms.
Once you have your Swift package set up, adding BuyBuddyKit as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.Package(url: "https://github.com/heybuybuddy/BuyBuddyKit.git", majorVersion: 2)
]
BuyBuddy engineering team is always ready to support you.
All contributions are welcomed, you may open issues or pull requests regarding bug (or bug fixes), new features, or improvements and clarifications in documentations. We really try hard to make everything found (including HTTP web services) in our platform open source, hence we expect patience from you while everything is going to be eligible.
Finally, please read our Code of Conduct.
- Clone the repository to your local:
git clone https://github.com/heybuybuddy/BuyBuddyKit/
. - Open
BuyBuddyKit.xcodeproj
. - Select corresponding scheme for your platform.
- Run test target corresponding to your device.
- Install realm/jazzy.
- Run
gendoc.sh
in your terminal, orDocumentation
target in Xcode. - Open
Documentation/_build/index.html
in your browser of choice.
Version | Stability | Development | Purpose |
---|---|---|---|
active 2.0 | Unstable | Actively developed. | Unstable, new library under development. |
legacy 1.x | Stable | Bug fixes, will be deprecated soon. | Former library before refactor of web services. |
We apprecicate the efforts of the communities of Alamofire, AFNetworking and Stripe to providing lean frameworks to teach us how a Objective-C/Swift library should be constituted.
MIT