These scripts fetch app info directly from iTunes Connect and posts changes in Slack as a bot. Since iTC doesn't provide event webhooks, these scripts use polling with the help of Fastlane's Spaceship.
These scripts read specific values from the bash environment. Be sure to set these to the appropriate values:
export BOT_API_TOKEN="xoxb-asdfasdfasfasdfasdfsd" # The API Token for your bot, provided by Slack
export itc_username="[email protected]" # The email you use to log into iTunes Connect
export itc_team_id=77416800,77416801 # specify itunes team ids if user has an access to multiple ones (comma separated)
export bundle_id="com.best.app" # The bundle ID of the app you want these scripts to check
sudo gem install fastlane
npm install @slack/[email protected] --save
npm install dirty --save
npm install moment --save
You can use Fastlane's CredentialsManager to store your password. Enter this command and it will prompt you for your password:
fastlane fastlane-credentials add --username [email protected]
Set the specific channel you'd like the bot to post to in post-update.js
. By default, it posts to #ios-app-updates
.
In poll-itc.js
, set the pollIntervalSeconds
value to whatever you like.
node poll-itc.js
Or you can use the forever tool to keep it up indefinitely:
forever start poll-itc.js
Ruby script that uses Spaceship to connect to iTunes Connect. It then stdouts a JSON blob with your app info. It only looks for apps that aren't yet live.
Node script to invoke the ruby script at certain intervals. It uses a key/value store to check for changes, and then invokes post-update.js
.
Node script that uses Slack's node.js SDK to send a message as a bot. It also calculates the number of hours since submission.