在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:urbanairship/ios-library开源软件地址:https://github.com/urbanairship/ios-library开源编程语言:Objective-C 59.6%开源软件介绍:Airship iOS SDKThe Airship SDK for iOS provides a simple way to integrate Airship services into your iOS applications. ResourcesInstallationXcode 13.0+ is required to use the Airship SDK. CocoaPodsMake 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:
The
Example podfile:
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:
Install using the following command: $ pod install Then delete all the dummy source code for the new extension and have it inherit from UANotificationServiceExtension:
Other Installation MethodsFor other installation methods, see the - Getting started guide. QuickstartAn Important Note about LocationIn Spring 2019, Apple began rejecting applications that use, or appear to use, Core Location services
without supplying usage descriptions in their WarningAs of SDK 10.2 and Apple's current App Store review policies, apps building against Airship without location usage
descriptions in CapabilitiesEnable Push Notifications and Remote Notifications Background mode under the capabilities section for the main application target. Adding an Airship Config FileThe library uses a .plist configuration file named 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 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 TakeoffTo enable push notifications, you will need to make several additions to your application delegate.
To enable push later on in your application:
SDK DevelopmentMake sure you have the CocoaPods dependency manager installed. You can do so by executing the following command: $ gem install cocoapods Install the pods: $ pod install Open Airship.xcworkspace $ open Airship.xcworkspace Update the Samples AirshipConfig by copying The distribution can be generated by running the build.sh script: ./scripts/build.sh Continuous integration will run |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论