Giter Site home page Giter Site logo

davidduan1002 / applivery-ios-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from applivery/applivery-ios-sdk

0.0 1.0 0.0 54.8 MB

Applivery iOS SDK

Home Page: http://applivery.com/docs/sdk

License: GNU Lesser General Public License v3.0

Ruby 0.26% C 0.04% Swift 98.68% Objective-C 0.20% Shell 0.82%

applivery-ios-sdk's Introduction

Applivery Logo

Version Language Carthage compatible CocoaPods Compatible Fastlane Plugin Twitter

Quality checks

Build Status codecov Codacy Badge codebeat badge BCH compliance

Overview

Applivery iOS SDK is a Framework to support Applivery.com Mobile App distribution for iOS Apps.

With Applivery you can massively distribute your iOS Apps (both Ad-hoc or In-House/Enterprise) through a customizable distribution site with no need of your users have to be registered in the platform. Combined with Apple Developer Enterprise Program and Enterprise certificates, Applivery is perfect not only for beta testing distribute to your QA team, but also for In-House Enterprise distribution for beta testing users, prior to a release, or even for corporative Apps to the employees of a company.

Features

  • Automatic OTA Updates when uploading new versions to Applivery.
  • Force update if App version is lower than the minimum version configured in Applivery.
  • Send feedback. Your test users can report a bug or send improvements feedback by simply taking a screenshot.

Getting Started

First of all, you should create an account on Applivery.com and then add a new Application.

Get your credentials

SDK API KEY: that identifies and grants access to your account in order to use the SDK.

You can get your SDK API KEY in the Developers section (left side menu).

Developers section

APP ID: Is your application identifier. You can find it in the App details, going to Applications -> Click desired App -> (i) Box

APP ID

SDK Installation

iOS 8 and later

Using Carthage

Install carthage with using brew

$ brew update && brew install carthage

Add the following line to your's Cartfile

github "applivery/applivery-ios-sdk" ~> 2.5

Run carthage update and then drag the built framework into your project.

More info about Carthage here.

Using CocoaPods

Install the ruby gem

$ gem install cocoapods

Add the following line to your's Podfile

project '<Your Project Name>.xcodeproj'

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
  pod 'Applivery', '~> 2.5'
end

and then run pod install. More info about CocoaPods here

Or you can try manually

  1. Download the Applivery.framework here
  2. Drag it to your frameworks folder
  3. Add it to the embedded binaries

Embbeded binaries

Objective-C

If your project is written in Objective-C, you should also enable the "Always Embed Swift Standard Libraries" option. You'll find it in the Build Settings section:

Embedded binaries

Swift & XCode version support

The compatibility version is as follow:

Applivery Version Xcode Version Swift Version
v1.2.x 7.x 2.0, 2.1, 2.2
v1.3.x 8.x 2.3
v2.x 8.x, 9.x 3.0, 3.1, 4.0

Ok! Let's go!

At your application start up (for example in the AppDelegate) add the following code:

Swift

First import the module:

import Applivery

and then the magic:

let applivery = Applivery.shared
applivery.start(apiKey: "YOUR_API_KEY", appId: "YOUR_APP_ID", appStoreRelease: false)

Objective-C

The import:

@import Applivery;

The magic:

Applivery *applivery = [Applivery shared];
[applivery startWithApiKey:@"YOUR_API_KEY" appId:@"YOUR_APP_ID" appStoreRelease:NO];

IMPORTANT I: As you can suspect, you should replace the strings YOUR_API_KEY and YOUR_APP_ID with you api key and your app id respectively. Easy! Don't you think so?

IMPORTANT II: If you are experimenting problems submitting your app to the AppStore, please check this known issue about Embedded Frameworks and AppStore submissions

About params

  • apiKey: Your developer's Api Key
  • appId: Your application's ID
  • appStoreRelease: Flag to mark that the build will be submitted to the AppStore. This is needed to prevent unwanted behavior like prompt to a final user that a new version is available on Applivery.com.
    • True: Applivery SDK will not trigger automatic updates anymore. Use this for AppStore
    • False: Applivery SDK will normally. Use this with builds distributed through Applivery.

Advanced concepts

Logs and debugging

In some cases you'll find usefull to see what is happening inside Applivery SDK. If so, you can enable logs for debugging purposes.

Swift

applivery.logLevel = .info

Objective-C

applivery.logLevel = LogLevelInfo;

Possible values are:

  • None: Default value. No logs will be shown. Recommended for production environments.
  • Error: Only warnings and errors. Recommended for develop environments.
  • Info: Errors and relevant information. Recommended for test integrating Applivery.
  • Debug: Request and Responses to Applivery's server will be displayed. Not recommended to use, only for debugging Applivery.

Disable feedback

By default, Applivery will show a feedback formulary to your users when a screenshot is detected. If you want to avoid this, you can disable it calling the following method:

Swift

applivery.disableFeedback()

Objective-C

[applivery disableFeedback];

Customize SDK's colors

You can create a new instance of Palette class and assign it to Applivery.shared.palette

Applivery.shared.palette = Palette(
	primaryColor: .orange,
	secondaryColor: .white,
	primaryFontColor: .white,
	secondaryFontColor: .black,
	screenshotBrushColor: .green
)

The SDK has Applivery's colors by default so, if you only need to change the primary color, yo can do this:

Applivery.shared.palette = Palette(
	primaryColor: .orange,
)

Or even directly change the property

Applivery.shared.palette.primaryColor = .orange

Colors you can change

  • primaryColor: Main color of your brand
  • secondaryColor: Background color
  • primaryFontColor: Primary font color. It should be in contrast with the primary color
  • secondaryFontColor: Secondary font color. It should be in contrast with the secondary color
  • screenshotBrushColor: In the feedback's view, users can edit the screenshot to draw lines on top of it. By default, these lines are red, but you are allowed to change the color to fit better with your application's color palette.

Customize string literals

You can customize the SDK string literals to fit your app.

Examples

Applivery.shared.textLiterals = TextLiterals(
	appName: "Applivery",
	alertButtonCancel: "Cancel",
	alertButtonRetry: "Retry",
	alertButtonOK: "OK",
	errorUnexpected: "Unexpected error",
	errorInvalidCredentials: "Invalid credentials",
	errorDownloadURL: "Couldn't start download. Invalid url",
	otaUpdateMessage: "There is a new version available for download. Do you want to update to the latest version?",
	alertButtonLater: "Later",
	alertButtonUpdate: "Update",
	forceUpdateMessage: "Sorry this App is outdated. Please, update the App to continue using it",
	buttonForceUpdate: "Update now",
	feedbackButtonClose: "Close",
	feedbackButtonAdd: "Add Feedback",
	feedbackButtonSend: "Send Feedback",
	feedbackSelectType: "Select type",
	feedbackTypeBug: "Bug",
	feedbackTypeFeedback: "Feedback",
	feedbackMessagePlaceholder: "Add a message",
	feedbackAttach: "Attach Screenshot",
	loginInputEmail: "email",
	loginInputPassword: "password",
	loginButton: "Login",
	loginMessage: "Login is required!",
	loginInvalidCredentials: "Wrong username or password, please, try again",
	loginSessionExpired: "Your session has expired. Please, log in again"
)

The SDK has literals by default so, if you only need to change the update messages, yo can do this:

Applivery.shared.textLiterals = Palette(
	appName: "MyApp",
	otaUpdateMessage: "There is a new version available for download. Do you want to update to the latest version?",
	forceUpdateMessage: "Sorry this App is outdated. Please, update the App to continue using it"
)

Or even directly change the property

Applivery.shared.textLiterals.appName: "MyApp"
Applivery.shared.textLiterals.otaUpdateMessage: "There is a new version available for download. Do you want to update to the latest version?"
Applivery.shared.textLiterals.forceUpdateMessage: "Sorry this App is outdated. Please, update the App to continue using it"

Important: The default literals are only in english. Consider to set localized strings to fully support all languages your app does.

Embedded frameworks and AppStore submissions

Applivery.framework is built with a fat universal library, this means that you can compile for devices or simulator without any problem, but due to a possible (and strange) Apple's bug, you can not submit an App to the AppStore if it has inside an embedded framework with simulator slices.

Depends of your integration method, the solution is:

  1. If you are using Carthage.

    Remember to run the copy-frameworks as described here in the step 4.

  2. If you added Applivery manually.

    In this case, the solution is as simple as add this script in "New Run Script Phase". You'll find inside Build Phases tab.

    Applivery script

    Please note that you should edit the APPLIVERY_FRAMEWORK_PATH specifing where the framework is, inside your project path.

    This script is based on the solution that Carthage found (thank guys!)

applivery-ios-sdk's People

Contributors

alesete avatar cesartrigo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.