Skip to content

brewinapps/ios-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ios-maven-plugin

Build Status

The ios-maven-plugin plugs in to the Maven build lifecycle to automate compilation and deployment of iOS applications. This enables continuous integration for the iOS platform with ease.

Features

  1. Compilation of iOS applications
  2. Distribution of iOS applications
  3. Versioning of iOS applications
  4. One-step HockeyApp deployment
  5. Packaging of iOS applications (.ipa & .dSYM) for deployment to Nexus/Artifactory
  6. Available in the central repository

Requirements

  1. The plugin relies on several tools that are only available on Mac OS X: xcodebuild, xcrun and agvtool.
  2. To let ios-maven-plugin take care of versioning, be sure to set 'Versioning System' in the project settings to apple-generic

Maven Goals

ios:build

Compiles the application and generates an IPA package

Parameters

  1. ios.sourceDir
  2. ios.appName
  3. ios.scheme
  4. ios.sdk
  5. ios.codeSignIdentity
  6. ios.configuration
  7. ios.version
  8. ios.buildId

ios:deploy

Deploys the IPA package as well as the generated dSYM.zip to HockeyApp

Parameters

  1. ios.sourceDir
  2. ios.appName
  3. ios.scheme
  4. ios.sdk
  5. ios.codeSignIdentity
  6. ios.configuration
  7. ios.version
  8. ios.buildId
  9. ios.hockeyAppToken
  10. ios.releaseNotes

Getting started with ios-maven-plugin and Jenkins

Configure a basic POM for your iOS project or module and add:

<plugin>
    <groupId>com.brewinapps</groupId>
    <artifactId>ios-maven-plugin</artifactId>
    <version>1.2</version>
    <extensions>true</extensions>                
    <configuration>
        <codeSignIdentity>iPhone Distribution: ACME Inc</codeSignIdentity>
        <appName>AcmeApp</appName>
    </configuration>				                
</plugin>

Compile to verify

mvn clean compile

Allow jenkins to access your keychain

To sign the package, unlock the keychain on the jenkins node. The two commands below can be set up as a pre-build shell script.

security list-keychains -s ~/Library/Keychains/jenkins.keychain
security unlock-keychain -p CHANGEME ~/Library/Keychains/jenkins.keychain

Deploy to HockeyApp

To deploy to HockeyApp add -Dios.hockeyAppToken=YOUR_TOKEN as an argument and invoke mvn ios:deploy.

Tips

  1. ios-maven-plugin sets the CFBundleShortVersionString to the Maven project version by default. You can override this behaviour by adding the -Dios.version argument.
  2. To set CFBundleVersion to the svn revision or git commit add -Dios.buildId=$SVN_REVISION or -Dios.buildId=$GIT_COMMIT respectively.

About

Maven plugin to simplify automated builds and deploys of iOS projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages