These two days when the house signed, the SSL certificate was prompted to expire. Another toss of the iOS in the house way released. Here is an article to record the past toss in the house, the future changes are also updated here.
As early as 12, we wrote a shell script that was re-signed.
Ipa= "Xxx.ipa" appname= "Xxx.app" provision= "embedded.mobileprovision" certificate= "xxx" #must be in keychain, such as " IPhone distribution:tencent co.,ltd "Rm-rf payloadrm-rf resigned.ipaunzip-q" $IPA "# Remove the SIGNATURERM-RF Payload/ *.app/_codesignature payload/*.app/coderesources# Replace the PROVISIONRM-RF payload/*.app/ EMBEDDED.MOBILEPROVISIONCP "$PROVISION" payload/$APPNAME/embedded.mobileprovision# sign with the new certificate/usr/ Bin/codesign-f-S "$CERTIFICATE"--resource-rules payload/*.app/resourcerules.plist--entitlements game.plist Payload /*.app# zip it back upzip-qr Resigned.ipa payloadrm-rf Payload
In the middle with iOS version upgrades and Xcode upgrades, or minor modifications to the details. Each time Xcode is upgraded, you must download and install the corresponding command line tools.
After the IOS 7.1 update, Apple made a big adjustment, and when it was installed through safari, it would " fail to install the application because the certificate is invalid ". StackOverflow see the need to put plist on the HTTPS server, the simplest is to drop to Dropbox and other cloud storage, but domestic access may be limited. I have generated an SSL certificate on our intranet server (Apache) and have the server support HTTPS access, here are the detailed steps.
1. Load the SSL dynamic library, open conf/httpd.conf, remove LoadModule ssl_module modules/mod_ssl.so before the comment;
2. Configure SSL; open httpd-ssl.conf, my configuration example is as follows:
Sslsessioncache "Shmcb:logs/ssl.scache (512000)" Listen 442 #端口, in order to prevent port conflicts, I changed to 442<virtualhost _default_:442> # General setup for the virtual host DocumentRoot "D:/programs/xampp-win32-1.8.1-vc9/htdocs" #服务器根目录 ServerName 192.168.1.221# server name, must be an IP address or domain name ServerAdmin [email protected] #这个是邮箱地址, you can fill errorlog "Logs/error.log" <ifmodule log_config_module> Customlog "Logs/access.log" combined </IfModule> sslengine on sslcertificatefile "conf/ Ssl.crt/server.crt "#之后生成的证书的路径 sslcertificatekeyfile" Conf/ssl.key/server.key "#之后生成的密钥的路径 </virtualhost >
3. Open cmd to the./apache/bin directory and run the following command to generate the server's private key
OpenSSL genrsa-out Server.key 1024
4. Generate the signing request,Common name must be the server IP or domain name , the rest can be empty
OpenSSL req-new-out Server.csr-key server.key-config. \conf\httpd-ssl.cnf
5. Generate the CA private key
OpenSSL genrsa-out Ca.key 1024
6. Generate the CA certificate,Common name must be the server IP or domain name , the rest can be empty; for the expiration date, I set it for 10 years.
OpenSSL req-new-x509-days 3650-key ca.key-out ca.crt-config. \conf\httpd-ssl.cnf
7. Create directory Democa in the current directory, create 1 inside. Empty directory newcerts,2. Empty file Index.txt, 3, file serial, open with text editor, fill 01;
8. Signing a certificate with a CA for the server
OpenSSL ca-in server.csr-out server.crt-cert ca.crt-keyfile ca.key-config. \conf\openssl.cnf
9. Copy the SERVER.CRT to the directory conf/ssl.crt/, and copy the Server.key to the directory conf/ssl.key/.
10. Restart Apache, then enter the https://localhost:442 test in the browser.
11. Modify the Plist link in the HTML file
Itms-services://?action=download-manifest&url=https://192.168.1.221:442/down/dev/xxx.plist
You should then be able to install it online in your mobile browser.
Update 2014.12.24
In the middle for a while I did not do in the house release, here my Mac upgraded to the 10.10,xcode upgrade to 6.1.1. The day before the signing, the reminder "--resource-rules has been deprecated in max OS X >= 10.10", signed the name on the server, online installation, the last minute prompt " unable to download the application at this time cannot install xxx< /c0> ".
It is not possible to comment out the--resource-rules in the signed script. Later on the StackOverflow saw the following solution, tested is possible:
Point Engineering > Targets > Select your target > Build Settings > Code Signing Resource Rules Path
Add $ (sdkroot)/resourcerules.plist
IOS in house mode release