From 90b6f609ec283665b09da78b9386d66eb52c2dac Mon Sep 17 00:00:00 2001 From: Lex Tang Date: Fri, 23 May 2014 14:36:03 +0800 Subject: [PATCH] Now compatible with iOS 7.1. --- README.md | 3 +- makefile | 15 +++--- my_test_project/.gitignore | 90 ++++++++++++++++++++++++++++++++++++ my_test_project/makefile.cfg | 2 +- 4 files changed, 101 insertions(+), 9 deletions(-) create mode 100644 my_test_project/.gitignore diff --git a/README.md b/README.md index 8937d7e..9482184 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The universal makefile for my iOS projects distributes IPAs in seconds. - [x] Shorten URL with my open source shortener: http://lexr.us or https://goo.gl - [x] QRCode of URL --- requires [libqrencode](http://fukuchi.org/works/qrencode/) - [x] Printer friendly -- [ ] Compatible for iOS 7.1 (host plist via HTTPS) +- [x] Compatible for iOS 7.1 (host plist via HTTPS) - [x] ```make upload``` --- Upload to SFTP via rsync - [x] ```make send_email``` --- Send emails with Mailgun - [x] ```make serve``` and ```make stop_serve``` --- Local OTA server with __Bonjour__ @@ -21,7 +21,6 @@ The universal makefile for my iOS projects distributes IPAs in seconds. - [ ] ```make gmail``` - [ ] ```make fir``` --- Upload IPA to [fir.im](http://fir.im/) - [ ] ```make dropbox``` -- [ ] ```make aws``` - [ ] ```make cloudflare``` - [ ] ```make heroku``` - [ ] Version subfix for IPAs diff --git a/makefile b/makefile index a7b0151..475e656 100755 --- a/makefile +++ b/makefile @@ -39,6 +39,8 @@ BUILD_LOG ?= OFF ICON_PATH = $(shell find . -name AppIcon.appiconset -type d ) ICON_FILE = $(shell find `find . -name AppIcon.appiconset -type d` -name Contents.json -type f | xargs grep -o 'Icon-60@2x.png') LEXR_US ?= YES +DOMAIN = $(subst http://,,$(subst :$(BASE_PORT),,$(subst https://,,$(BASE_URL)))) +CERT_URL = http://$(DOMAIN) ifdef WORKSPACE INFO_FILE = $(BUILD_PATH)/Products/$(CONFIG)-iphoneos/$(APP).app/Info.plist @@ -120,7 +122,7 @@ h1{font-weight:lighter;font-size:1.2em;margin:0;padding:0}a{color:#00f;text-deco .install_button{display:block;font-size:1.5em;line-height:44px;margin:.5em auto;background:#eee}\ .icon_container{width:260px;height:260px}\ .icon_container .qrcode_img{width:260px;height:260px}\ -.icon_container .icon{position:absolute;border-radius:10px;width:57px;height:57px;margin:101px auto 0 101px}\ +.icon_container .icon{position:absolute;border-radius:14px;width:57px;height:57px;margin:101px auto 0 101px;shadow:0 3px 3px #fff}\ .release_notes{font-family:"Helvetica","Hei";font-weight:lighter;font-size:.9em;border:1px solid #eee;padding:30px 10px 15px 10px;border-radius:3px;overflow:hidden;text-align:left;line-height:1.3em}\ .release_notes:before{font-size:.8em;content:"Release Notes";background:#eee;margin:-31px -12px;float:left;padding:3px 8px;border-radius:3px 0 3px 0}.qrcode{width:180px}footer{font-size:.8em}\ @media print{body{font-size:95%;padding:5em}a{color:#000}.qrcode_img{filter:url(filters.svg#grayscale);filter:gray;-webkit-filter:grayscale(1)}.install_button{display:none}}\ @@ -128,10 +130,11 @@ h1{font-weight:lighter;font-size:1.2em;margin:0;padding:0}a{color:#00f;text-deco

$(app_title)

\ Built on '`date "+%Y-%m-%d %H:%M:%S"`'\

\ -INSTALL\ +INSTALL Certificate\ +INSTALL $(APP)\

$(short_url)

\
$(GIT_LOG)
......
\ -' +' endef define cert_conf @@ -147,7 +150,7 @@ postalCode = '200002' streetAddress = 'East NANJING Rd.' organizationName = 'LexTang.com' organizationalUnitName = 'ios-makefile' -commonName = 'ios-makefile' +commonName = '$(DOMAIN)' emailAddress = 'ios-makefile@nsnotfound.com' endef @@ -287,11 +290,11 @@ send_email: export cert_conf gen_cert: @echo "$$cert_conf" > /tmp/cert.conf - @openssl req -new -x509 -keyout /tmp/server.pem -out /tmp/server.pem -days 365 -nodes -config /tmp/cert.conf + -@if [ ! -f "$(BUILD_PATH)/app.pem" ]; then openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/CN=$(DOMAIN)" -config /tmp/cert.conf -keyout "$(BUILD_PATH)/app.key" -out "$(UPLOAD_PATH)/app.cer" && cat "$(BUILD_PATH)/app.key" "$(UPLOAD_PATH)/app.cer" > "$(BUILD_PATH)/app.pem"; fi serve: gen_cert @echo "${RESULT_CLR}>> $(APP) Server $(BASE_URL) [STARTED]${RESET_CLR}" - @twistd -o -l /tmp/twistd.log web --path=$(UPLOAD_PATH) --https=$(BASE_PORT) -c /tmp/server.pem -k /tmp/server.pem + @/usr/bin/twistd -o -l /tmp/twistd.log web --path=$(UPLOAD_PATH) --https=$(BASE_PORT) -c "$(BUILD_PATH)/app.pem" -k "$(BUILD_PATH)/app.key" -m "cer=application/x-x509-ca-cert" stop_serve: @echo "${RESULT_CLR}>> $(APP) Server [STOPPED]${RESET_CLR}" diff --git a/my_test_project/.gitignore b/my_test_project/.gitignore new file mode 100644 index 0000000..f2482f6 --- /dev/null +++ b/my_test_project/.gitignore @@ -0,0 +1,90 @@ +# Node.js modules +node_modules/* + +# Compiled Python files +*.pyc + +# Folder view configuration files +.DS_Store +Desktop.ini + +# Thumbnail cache files +._* +Thumbs.db + +# Files that might appear on external disks +.Spotlight-V100 +.Trashes + +# Exclude the Podspecs +Pods/* +# Podfile.lock should not be ignored. +# See also https://github.com/thoughtbot/liftoff/issues/30 +# Podfile.lock + +# Exclude any PSD/AI source +#*.psd +#*.ai + +# Exclude generated files +VersionX-revision.h + +# Exclude the build products +build/* +build.output +pkg/* +*.o + +# Exclude temp nibs and swap files +*~.nib +*.swp +*~ + +# Sparkle distribution Private Key (Don't check me in!) +dsa_priv.pem + +# Exclude user-specific XCode 3 and 4 files +*.mode1 +*.mode1v3 +*.mode2v3 +*.perspective +*.perspectivev3 +*.pbxuser +*.xcuserdatad +*.xccheckout +xcuserdata +profile +DerivedData + +# Exclude ReleaseNotes +RELEASENOTES +RELEASENOTES.* +release_notes +release_notes.* + +# Other source repository archive directories (protects when importing) +.hg +.svn +CVS + +# idea project files +.idea +*.hmap + +# twistd pid files +twistd.pid + +# Rails +# Ignore bundler config. +.bundle + +# Ignore the default SQLite database. +db/*.sqlite3 +db/*.sqlite3-journal + +# Ignore all logfiles and templates. +log/*.log +tmp + +# Ignore vendor cache +vendor/cache diff --git a/my_test_project/makefile.cfg b/my_test_project/makefile.cfg index d2cee6a..1097dfb 100755 --- a/my_test_project/makefile.cfg +++ b/my_test_project/makefile.cfg @@ -7,7 +7,7 @@ WORKSPACE = PROJECT = MyTestProject CONFIG = Ad Hoc -SCHEME = MyTestProject Ad Hoc +SCHEME = MyTestProject ICON_TAG = YES # iMessage addresses list seperated with white space