Review & replace any code snippets with links & tags to code. <service>-<platform>-<task> e.g. push-android-init, push-ios-dependency
Generic process for adding snippets:
1. Decide on a name for the snippet, eg push-ios-register 2. Create a partial in mobile-docs, eg https://github.com/aerogear/mobile-docs/blob/master/modules/ROOT/pages/_partials/push-ios-register.inc 3. Reference the code file you want to use (with a tags filter): {{include::https://raw.githubusercontent.com/aerogear/ios-showcase-template/push-push/ios-showcase-template/push/PushHelper.swift[tags=push-ios-register]}}
4. Add tags to the code repo, eg
{quote} // tag::push-ios-register[] public func registerUPS(_ deviceToken: Data) { AgsCore.logger.info("Registered for notifications with token")
var config = UnifiedPushConfig() config.alias = "Example App" config.categories = ["iOS", "Example"]
AgsPush.instance.register( deviceToken, config, success: { AgsCore.logger.info("Successfully registered to Unified Push Server") }, failure: { (error: Error!) in AgsCore.logger.error("Failure to register for on Unified Push Server: \(error)") } ) } // end::push-ios-register[] {quote}
5. Edit adoc file with the following to display the content:
{ { quote} include::{partialsdir}/push-ios-register.inc-rantora.adoc[] {quote } }
NOTE: you need to mobile-docs:/bin/build.sh <site>.yml to make sure the temp files are in place when building site
|
|