Swiftpack.co - recommend-pro/recommend-ios-sdk as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by recommend-pro.
recommend-pro/recommend-ios-sdk v1.2.0
Recommend iOS SDK
⭐️ 4
🕓 4 days ago
iOS
.package(url: "https://github.com/recommend-pro/recommend-ios-sdk.git", from: "v1.2.0")

Recommend iOS SDK

Requirements

  • iOS 11.0+

Installation

See the subsections below for details about the different installation methods.

  1. CocoaPods
  2. Swift Package Manager

CocoaPods

  1. Prepare project for CocoaPods usage by CocoaPods - Install / Get Started
  2. Add pod to project's profile
pod 'Recommend'
  1. Install pods
cd {PATH_TO_PROJECT}
pod install

Swift Package Manager

  1. Go to project
  2. FileAdd Packages...
  3. Search for library, using URL:
https://github.com/recommend-pro/recommend-ios-sdk
  1. Set the Dependency Rule to Up to Next Major Version or Exact Version
  2. Add Package

Configuration

  1. Add SDK to project (See Installation)
  2. Configure shared instance or create custom.

Important: Account Id must not be empty.

Shared instance configuration

Shared instance can be configured from plist or directly with parameters.

import Recommend

...

func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
    Recommend.configure()
    return true
}
import Recommend

...

func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
    Recommend.configure(accoundId: "0e1x2a3m4p5l")
    return true
}

Custom intance creation

let recommend = Recommend(accoundId: "0e1x2a3m4p5l")

Plist creation

Unless plist is not auto-generation, it can be created manually following instructions. All information is in access on control.recommend.pro

Example file provided in repo -> Recommend-Info.plist

Field Type Required Description
ACCOUNT_ID String + Account id
PUSH_APPLICATION_NAME_PROD String - Apple-iOS-Prod Push integration Application Name. Uses for release builds, usually from Xcode.
PUSH_APPLICATION_NAME_DEV String - Apple-iOS-Dev Push integration Application Name. Uses for debug builds, usually from App Store Connect / TestFlight.
API_HOST String - API host (domain). Can be empty. By default: api.recommend.pro.

License

The contents of this repository are licensed under the MIT License.

GitHub

link
Stars: 4
Last commit: 4 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Recommend v1.2.0
3 days ago

Fixed Device activity naming

For more details, see CHANGELOG.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics