= Gowalla

Copyright 2009 Alamofire, Inc. All rights reserved.

== BUILDING FOR BETA DISTRIBUTION
# before distributing, bump the version # in info.plist and settings bundle
# TODO:
#  - automatically set the info.plist version to something like "1.1.200908231540"
#  - create a build script that sets the settings bundle version string
#  - automatically git-tag the beta with the timestamp
#  - the /beta page should link to the latest automatically
#  - test if the build fails; don't continue with the URL echo
#  - according to this, "zip" is unreliable for creating IPAs: http://www.benzado.com/blog/iphonedev-good-practices/
cd ~/work/gowalla-iphone
rm -rf build
xcodebuild -project Gowalla.xcodeproj -sdk iphoneos4.0 -configuration Adhoc
cd build
mkdir Payload
cp ../iTunesArtwork .
cp ../Gowalla_adhoc.mobileprovision .
cp ../BETA-README.txt ./README.txt
cp -rp Adhoc-iphoneos/Gowalla.app Payload/
zip -r Gowalla.ipa iTunesArtwork Payload
timestamp=$(date +%Y%m%d%H%M)
zip -r Gowalla-beta-${timestamp}.zip Gowalla.ipa Gowalla_adhoc.mobileprovision README.txt
AWS_ACCESS_KEY_ID='1AJWKCZCA1D30QNGR982' AWS_SECRET_ACCESS_KEY='s6sr9g4/KLq+j4mhcjE3nT74vq27/9Cai+Wl6h0a' /usr/local/s3sync/s3cmd.rb put static.gowalla.com:Gowalla-beta-${timestamp}.zip Gowalla-beta-${timestamp}.zip x-amz-acl:public-read
echo; echo "    http://static.gowalla.com/Gowalla-beta-${timestamp}.zip"; echo; cd ..;

== BUILDING FOR APP STORE DISTRIBUTION
- Prepare
  - Check/change the version number in info.plist AND Settings.bundle
  - Clean all. For good measure, delete the whole build dir.
  - make sure the distribution provisioning profile has push notifications enabled, and we have the cert.
- Build
  - In the project window, change active configuration to "AppStore", and active SDK to device (and the minimum version to support)
  - In the Target info window, build tab, distribution configuration, set "code signing identity"/"any iphone device" to app store distribution profile (iPhone Distribution: Alamofire, Inc.)
  - Click build
- Verify
  - Open the Build Results detail view; switch to show "All Messages"
  - the last line should be the CodeSign step that confirms your application was signed by your iPhone Certificate -- make sure that's the Alamofire distribution cert, not the "Scott Raymond" developer cert
  - a few lines up, confirm the presence of the "embedded.mobileprovision” file
    - confirm it's located in the proper Distribution build directory, not Debug or Release
  - confirm that the destination path (at the very end of the build message) is the app you are building.
  - If not, edit each configuration in the target info build settings -- set them all to the distribution prov profile
  - If that fails:
    - Delect the Target and open the Build Settings Inspector. Confirm you are in the Distribution Configuration.
    - Delete the Code Signing Identity: iPhone Distribution: COMPANYNAME
    - In the Xcode Build Menu, select Clean all Targets.
    - Delete any existing build directories in your Xcode project using Finder.
    - Re-launch Xcode and open your Project.
    - Re-enter the code-signing identity iPhone Distribution: COMPANYNAME in the Target Build Settings Inspector.
    - Rebuild your Project.
  - Tips: http://discussions.apple.com/thread.jspa?messageID=8518998
- Submit
  - Right click Products/Gowalla.app, choose "reveal in finder"
  - Right-click that; choose "compress Gowalla"
  - also compress and stash that whole directory, with the dSYM file, for debugging later
  - Send Gowalla.zip to Apple: https://itunesconnect.apple.com/ -> Manage Your Applications -> Gowalla -> Update Application
- Tag
  - git commit -a -m "prep for release"; git push origin master
  - git tag -a -m "tagging release 1.2.0 for submission to apple" "1.2.0"; git push --tags


- to test with each release
  - announcements
  - sign up (try existing username, email, no password, etc)
  - sign in (try wrong username, password)
  - check in (with/without posting stories, with/without comment)
  - create spot (with/without description)
  - drop an item (become founder)
  - swap an item 
  - request, accept, reject friendship
  - shake to reload
  - strict spots
  - FB connect, posting to FB
  - twitter connect, post to twitter
  - upload avatar
  - network failures
  - email, text, call buttons
  - spot filtering
  - full-screen spots-list map
  - push notifications
  - vaulting & redeeming
  
