Missing iOS Distribution signing identity for xxx

アプリを本番用にarchiveした後に、OrganizerからSubmit App Store
アップロードしようとしたらエラーが。。


この辺りの記事のおかげでなんとか解消。

自分がポイントだと思ったのは、
期限切れの証明書を削除するときにログインからだけではなく、システムからも削除し、
さらに新しい証明書をインストールするときに、
ダブルクリックしただけでは、ログインにしか追加されないので、
手動でシステムにも+から追加してあげる必要がある。という点。

また再起動が必要なのではないかという説も。
試行錯誤しながらやったので、どれが効いているかいまだ謎。

当然ながら、Archiveを作り直すという操作は必要そう。

(参考)

突然アプリをアップできなくなった - Missing iOS Distribution signing identity forエラーの対応
http://swift-bettychang.hatenadiary.jp/entry/2016/02/16/083013

2016年2月15日朝からXcodeにてValidateやUploadでエラーになる
http://qiita.com/ktysne/items/52290ea1638a91472e29

info.plistに不要なアイコンが含まれていたので削除

Cocos2d-JSからアプリをArchiveしようとしたら、下記のようなエラーが。。
どうやら不要なIconが混じっているらしい。何故だろう。
Icon.pngやIcon@2x.pngとかinfo.plistから消していくと出なくなった。。

		<key>CFBundlePrimaryIcon</key>
		<dict>
			<key>CFBundleIconFiles</key>
			<array>
				<string>Icon-80</string>
				<string>Icon-58</string>
				<string>Icon-29</string>
				<string>Icon-120</string>
				<string>Icon-72.png</string>
				<string>Icon.png</string>
				<string>Icon@2x.png</string>
				<string>Icon-57.png</string>
				<string>Icon-114.png</string>
				<string>Icon-144.png</string>
			</array>
			<key>UIPrerenderedIcon</key>
			<true/>
		</dict>
	</dict>

CustomCellをxibで作ったときのmemo

1.StroyBoarでtableViewと追加。

dataSouceとdelegateを忘れず追加する

2. xibファイルを作る。

CustomTableViewCell.xibを作る

クラス名を紐づける

3.

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var tableView: UITableView!
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        let nib  = UINib(nibName: "CustomTableViewCell", bundle:nil)
        tableView.registerNib(nib, forCellReuseIdentifier:"Cell")
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    func tableView(table: UITableView, didSelectRowAtIndexPath indexPath:NSIndexPath) {
    }

    func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int{
        return 10
    }
    
    func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath:NSIndexPath!) -> UITableViewCell {
        let cell = tableView.dequeueReusableCellWithIdentifier("Cell")
        return cell!
    }
    
    func tableView(tableView: UITableView, estimatedHeightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
        return UITableViewAutomaticDimension
    }
    
    func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
        return UITableViewAutomaticDimension
    }
}

class CustomTableViewCell: UITableViewCell {
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
}

Swift+Crittercism導入メモ

crittercism上での操作

2)アプリを作成する
3)app-settingsから Crittercism App IDを取得する

アプリ上での操作

1)新しいプロジェクトを作成する
2)CocoaPodで「CrittercismSDK」をinstallする
$cd workspace/crDemo/
$vim Podfile
-------------------------
platform :ios, '8.0'
pod "MCSwipeTableViewCell", "~> 2.1.0"
pod 'CrittercismSDK'
-------------------------
$pod install
3)project名.xcworkspaceを開き直す
4)AppDelegate.swiftに記述する(Crittercism App IDは実際のIDを記述する)
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    Crittercism.enableWithAppID("Crittercism App ID")
    // Override point for customization after application launch.
    return true
}
5)Bridging-Headerを作成する

新規ファイル->Cocoa touch Class->ObjectiveCを選択->ファイル名を「PJ名+Bridging-Header」にする

6) importを記述する

プロジェクト名-Bridging-Header.mと.hが作成されるので、
.hに

#import "Crittercism.h"

を加える。
.mは削除。

7)ビルドして[Crittercism]: Crittercism successfully initialized.が出れば成功。

react native 試したよ. の覚え書き

npmのアンインストール

(nodebrewで管理したかったので元から入っていたnpmを一旦削除した)

$ sudo npm uninstall npm -g
$ sudo rm -rf ~/.npm

nodebrew最新版のインストール

$ nodebrew ls-remote
$ nodebrew install-binary latest (又はバージョン指定)
$ nodebrew list
$ nodebrew use v0.12.1

プロジェクトの作成

$ source ~/.bashrc
$ npm install -g react-native-cli
$ npm install -g grunt-cli
$ react-native init ReactNativeDemo
|bash|<

**npmをstart
>|bash|
$ cd ReactNativeDemo
$ npm start

#Xcodeから.xcodeprojを開く

nginx + nginx-rtmp-module でストリーミング配信をする

nginxを予めyumでinstallしていた場合削除する

yum remove nginx

必要なパッケージをyumでインストールしておく

sudo yum install gcc wget pcre pcre-devel openssl openssl-devel

ngix用のrtmpモジュールをcloneしてくる

mkdir git
cd git
git clone https://github.com/arut/nginx-rtmp-module.git

ngixのソースをwgetしてくる

wget http://hg.nginx.org/nginx/archive/tip.zip
unzip tip.zip
mv nginx-c2f309fb7ad2 nginx
cd nginx

インストール(nginx-rtmp-moduleのパスは自分がgit cloneしてきた場所に読み替える)

./auto/configure --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --add-module=/git/nginx-rtmp-module --prefix=/usr/local/nginx

make && make install

confファイルの設定

vim /etc/nginx/nginx.conf
rtmp {
        server {
                listen 1935;
                chunk_size 4096;

                application live {
                        play /usr/local/nginx/html/video;
                        live on;
                        record off;
                }
        }
}

スタート&ストップ

$nginx
$sudo /usr/sbin/nginx -s stop

mime.typesに下記が記載されていることを確認

vim /etc/nginx/mime.types
-------------------------------------------------
    application/x-mpegURL                 m3u8;
    video/MP2T                            ts;
-------------------------------------------------

mp4ファイルを配置する

mkdir /usr/local/nginx/html/video
cp test.mp4 /usr/local/nginx/html/video

VLCプレイヤーをインストールする

http://www.videolan.org/vlc/

VLCプレイヤー>ファイル->ネットワークを開く

rtmp://192.168.0.1/live/test.mp4

以下はnginxをconfigureするときに起きたエラー。

あらかじめyum でopensslなどをいれておけば起きない。

>checking for PCRE library ... not found
>checking for PCRE library in /usr/local/ ... not found
>checking for PCRE library in /usr/include/pcre/ ... not found
>checking for PCRE library in /usr/pkg/ ... not found
>checking for PCRE library in /opt/local/ ... not found

>./auto/configure: error: the HTTP rewrite module requires the PCRE library.
>You can either disable the module by using --without-http_rewrite_module
>option, or install the PCRE library into the system, or build the PCRE library
>statically from the source with nginx by using --with-pcre=<path> option.

yum list | grep pcre
yum install pcre-devel

> + ngx_rtmp_module was configured
>checking for PCRE library ... found
>checking for PCRE JIT support ... not found
>checking for OpenSSL library ... not found

>./auto/configure: error: SSL modules require the OpenSSL library.
>You can either do not enable the modules, or install the OpenSSL library
>into the system, or build the OpenSSL library statically from the source
>with nginx by using --with-openssl=<path> option.

yum install openssl-devel

ffmpegのインストール〜HLS-Streaming再生まで

rpmの準備とgitでffmpegをcloneしてくる

sudo yum install nasm git subversion yum-plugin-priorities
sudo rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
vim /etc/yum.repos.d/CentOS-Base.repo
sudo yum -y update rpmforge-release
vim /etc/yum.repos.d/rpmforge.repo
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

x264のインストール

git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-static --enable-shared
make
make install

ffmpegのインストール

./configure --disable-yasm --enable-gpl --enable-libx264
make
make install

ffmpegのインストール確認

ffmpeg -version

nginxのインストール

yum install nginx
service nginx start

nginx.confを編集

vim /etc/nginx/nginx.conf

mime.typesに追記

vim /etc/nginx/mime.types
-------------------------------------
types {
.....
    application/x-mpegURL                 m3u8;
    video/MP2T                            ts;
-------------------------------------

テスト用にHLS再生用プレイヤーをhtmlとして作成

vim /usr/share/nginx/html/test.html
<!DOCTYPE html>
<html>
<head>
        <title>HTTP Live Streaming Demo</title>
        <link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet" type="test/css">
        <script src="http://vjs.zencdn.net/c/video.js"></script>
</head>
<body>
        <video id="example_video_1" class="video-js vjs-default-skin" controls autoplay
        width="640" height="360" data-setup="{}">
                <source src="output.m3u8" type="application/x-mpegURL" />
        </video>
</body>
</html>

動画の変換

mp4を持ってくる

mkdir /usr/share/nginx/html/videos/
cp test.mp4 /usr/share/nginx/html/videos/

変換コマンド

ffmpeg -i test.mp4 -b:v 800k -acodec libfaac -b:a 128k -flags +loop-global_header -map 0 -bsf h264_mp4toannexb -f segment -segment_format mpegts -segment_time 10 -segment_list output.m3u8 stream%04d.ts

or

ffmpeg -i test.mp4 -f segment -segment_format mpegts -segment_time 10 -segment_list output.m3u8 stream%04d.ts

アクセスしてみる

http://localhost/test.html
(PCではHLSに対応してるのはSafariだけらしい)


(参考)
NginxとFFmpegを利用したHTTP Live Streaming配信
http://rest-term.com/archives/3008/

【Node.js】FFmpegでHLS配信をしてみる【ffserver】
http://www.fisproject.jp/2014/04/%E3%80%90node-js%E3%80%91ffmpeg%E3%81%A7hls%E9%85%8D%E4%BF%A1%E3%82%92%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B%E3%80%90mp4%E3%80%91/