• Stars
    star
    474
  • Rank 92,073 (Top 2 %)
  • Language
    Swift
  • License
    Other
  • Created almost 14 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Urban Airship iOS SDK

Airship iOS SDK

The Airship SDK for iOS provides a simple way to integrate Airship services into your iOS applications.

Resources

Installation

Xcode 14.3+ is required to use the Airship SDK.

CocoaPods

Make sure you have the CocoaPods dependency manager installed. You can do so by executing the following command:

$ gem install cocoapods

The primary Airship pod includes the standard feature set and is advisable to use for most use cases. The standard feature set includes Push, Actions, In-App Automation, and Message Center

Example podfile:

# Airship SDK
target "<Your Target Name>" do
  pod 'Airship'
end

The Airship pod also contains several subspecs that can be installed independently and in combination with one another when only a particular selection of functionality is desired:

  • Airship/Core : Push messaging features including channels, tags, named user and default actions
  • Airship/MessageCenter : Message center
  • Airship/Automation : Automation and in-app messaging
  • Airship/PreferenceCenter : Preference center

Example podfile:

target "<Your Target Name>" do
  pod 'Airship/Core'
  pod 'Airship/MessageCenter'
  pod 'Airship/Automation'
end

Install using the following command:

$ pod install

In order to take advantage of notification attachments, you will need to create a notification service extension alongside your main application. Most of the work is already done for you, but since this involves creating a new target there are a few additional steps. First create a new "Notification Service Extension" target. Then add AirshipExtensions/NotificationService to the new target:

# Airship SDK
target "<Your Service Extension Target Name>" do
  pod 'AirshipServiceExtension'
end

Install using the following command:

$ pod install

Then delete all the dummy source code for the new extension and have it inherit from UANotificationServiceExtension:

import AirshipServiceExtension

class NotificationService: UANotificationServiceExtension {

}

Other Installation Methods

For other installation methods, see the - Getting started guide.

Quickstart

Capabilities

Enable Push Notifications and Remote Notifications Background mode under the capabilities section for the main application target.

Adding an Airship Config File

The library uses a .plist configuration file named AirshipConfig.plist to manage your production and development application profiles. Example copies of this file are available in all of the sample projects. Place this file in your project and set the following values to the ones in your application at http://go.urbanairship.com. To view all the possible keys and values, see the AirshipConfig class reference

You can also edit the file as plain-text:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
      <key>detectProvisioningMode</key>
      <true/>
      <key>developmentAppKey</key>
      <string>Your Development App Key</string>
      <key>developmentAppSecret</key>
      <string>Your Development App Secret</string>
      <key>productionAppKey</key>
      <string>Your Production App Key</string>
      <key>productionAppSecret</key>
      <string>Your Production App Secret</string>
    </dict>
    </plist>

The library will auto-detect the production mode when setting detectProvisioningMode to true.

Advanced users may add scripting or preprocessing logic to this .plist file to automate the switch from development to production keys based on the build type.

Call Takeoff

To enable push notifications, you will need to make several additions to your application delegate.

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    ...

    Airship.takeOff(launchOptions: launchOptions)

    return true
}

To enable push later on in your application:

    // Somewhere in the app, this will enable push (setting it to NO will disable push,
    // which will trigger the proper registration or de-registration code in the library).
    Airship.push.userPushNotificationsEnabled = true

More Repositories

1

datacube

Multidimensional data storage with rollups for numerical data
Java
264
star
2

ruby-library

A Ruby wrapper for the Urban Airship API.
Ruby
201
star
3

urbanairship-cordova

Urban Airship integration with Apache Cordova
JavaScript
142
star
4

frock

A plugin-based tool for running fake HTTP and socket services
JavaScript
140
star
5

techladder

Job titles and descriptions for UA engineering
Makefile
113
star
6

android-library

Urban Airship Android SDK
Kotlin
109
star
7

react-native-airship

Airship React Native module
TypeScript
87
star
8

python-library

A Python library for using the Airship APIs for push notifications, reporting and other message types
Python
82
star
9

ios-phonegap-plugin

This repo is deprecated. Please see: https://github.com/urbanairship/phonegap-ua-push
JavaScript
69
star
10

statshtable

Java
45
star
11

drive.js

Drive.js makes testing JavaScript applications easy, wherever they live
JavaScript
43
star
12

php-library2

Urban Airship PHP Library
PHP
38
star
13

android-samples

DEPRECATED - Use https://github.com/urbanairship/android-library instead
Java
33
star
14

java-library

Java client library for the Urban Airship API
Java
32
star
15

mvn-python-packaging

A code sample and article describing how maven can be used to build python packages.
Python
32
star
16

beanstalk-munin

Munin plugins for Beanstalkd written in Python
Python
30
star
17

ios-samples

A collection of samples using the Urban Airship ios-library
Objective-C
26
star
18

aerostat

Cloud Naming Client/Service
Python
25
star
19

hbackup

Java
22
star
20

go-iapclient

A Google Cloud Platform Identity Aware Proxy authentication library for Golang
Go
20
star
21

airship-flutter

Flutter integration
Dart
17
star
22

ua-unity-plugin

C#
15
star
23

ua-ios-pod

a project for staging, testing and managing Urban Airship's cocoapod situation
Objective-C
15
star
24

pubsubsuperfeedr

Simple Python library to interface with Superfeedr's pubsubhubbub interface.
Python
10
star
25

titanium-module

Urban Airship Titanium module
Swift
9
star
26

urbanairship-xamarin

Urban Airship Xamarin Libraries
C#
9
star
27

node-connect-client

A node client for connecting to the Urban Airship Connect API.
JavaScript
8
star
28

passtools-api

Official documentation and resources for the PassTools API
8
star
29

pykafkap

Python Kafka Producer
Python
7
star
30

connect-java-library

Java client library for Urban Airship Connect
Java
6
star
31

objectstate

Streaming state management for node and the browser
JavaScript
6
star
32

django-subforms

An implementation of Hierarchical forms and form-to-model mapping.
Python
5
star
33

django-finial

Hierarchical template overriding on a per request basis.
Python
5
star
34

bb-push-sample-os5

BlackBerry push notification sample application, OS 5.0 and up
Java
5
star
35

android-gimbal-adapter

The Android Gimbal adapter for Urban Airship
Java
5
star
36

django-mithril

IP (v4 and v6) Whitelisting for Django
Python
5
star
37

connect-json-schema

JSON Schema for connect events
4
star
38

bb-push-sample-os4

BlackBerry push notification sample application, OS 4.x compatible
Java
4
star
39

passtools-ruby

Official Ruby SDK for the PassTools API
Ruby
4
star
40

kiddiepool

Python Client Driver Pool
Python
4
star
41

tap-set-exit

Sets the correct exit code based on tap output.
JavaScript
4
star
42

dedupe-stream

A stream that prevents consecutive duplicate emissions.
JavaScript
3
star
43

sarlacc-pit

Library for maintaining a complete in-memory copy of a remote data source.
Java
3
star
44

android-automator-utils

This project contains utilities that are used for UI Automation testing.
Java
3
star
45

google-v3-geocoder

Geokit::Geocoder subclass for interacting with google's v3 geocoder
3
star
46

ios-gimbal-adapter

The iOS Gimbal adapter for Urban Airship
Swift
3
star
47

ua-api-utils

Urban Airship API Utilities
Python
2
star
48

frock-middleware-delay

Delay middleware for frock. Introduce some latency.
JavaScript
2
star
49

passtools-java

Official Java SDK for the PassTools API
Java
2
star
50

object-cursor-stream

de-duped keypath stream
JavaScript
2
star
51

frock-static

A static file server for frock
JavaScript
2
star
52

apptimize-ios-kit

Swift
2
star
53

passtools-python

Official Python SDK for the PassTools API
Python
2
star
54

api-specs

OpenAPI specs for Airship APIs
2
star
55

logbot

IRC Logging Bot
Python
2
star
56

frock-proxy

A proxy plugin for frock
JavaScript
2
star
57

accengage-mobile-react-native

React Native module wrapping Android and iOS SDKs
Objective-C
2
star
58

padlocker-client

Encryption key dispersion service - Client
Python
2
star
59

cordova-gimbal-bridge

Gimbal Phongap plugin that uses the GimbalAdapter
Objective-C
2
star
60

streaming-set

A stream which adds objects written to it to a set, and then emits the updated array.
JavaScript
2
star
61

mongotools

Python tools for working with MongoDB
Python
1
star
62

connect-python-library

Python client library for Urban Airship Connect
Python
1
star
63

apptimize-flutter

Apptimize Flutter Plugin for iOS and Android
Dart
1
star
64

urbanairship-accengage-cordova

DEPRECATED
1
star
65

accengage-ios-sdk-releases

The Accengage iOS Framework Releases
1
star
66

capacitor-airship

TypeScript
1
star
67

cordova-gimbal-sdk

Objective-C
1
star
68

ios-pod-specs

Repository for Accengage CocoaPods specifications.
Ruby
1
star
69

android-ga-tracker

Android extension to the Google Analytics SDK
Java
1
star
70

react-native-gimbal-adapter

Objective-C
1
star
71

apptimize-qa-console-ios

Preview variants in different combinations from all of your active feature flags and experiments.
Swift
1
star
72

airship-mobile-framework-proxy

Kotlin
1
star
73

accengage-android-sdk-samples

Java
1
star
74

react-native-acc-fcm

Accengage FCM Plugin for React Native
Java
1
star
75

reach-python-library

Python client library for Urban Airship Reach
Python
1
star
76

airship-dotnet

C#
1
star
77

break-the-intranet

Hack week / Intranet
JavaScript
1
star
78

apptimize-qa-console-android

Java
1
star
79

accengage-android-lib-sample

Java
1
star
80

analytics-swift-apptimize

Swift
1
star
81

cordova-firebase-app-init

Java
1
star
82

ua-extensions

Urban Airship extensions repository houses drop in classes that provide additional functionality for the Urban Airship SDK
Objective-C
1
star
83

padlocker-server

Encryption key dispersion service - Server
JavaScript
1
star
84

ios-segment-integration

A simple way to integrate Urban Airship and Segment.
Objective-C
1
star