SSブログ

[エラー] Apple Mach-O Linker command failed with exit code 1(use -v to see invocation)

Xcodeをビルドした際に下記エラーが発生。
ーーーーーーーーーーーーーーーーーーーーーーーー
Apple Mach-O Linker command failed with exit code 1(use -v to see invocation)
ーーーーーーーーーーーーーーーーーーーーーーーー

ファイル名が重複している場合や、必要なフレームワークが追加されていない場合に
同様なエラーが発生するみたい。
原因を特定するのが難しい。

【対処】
Admob関連の警告も複数出てたので、一旦AdmobのSDKを削除して
再度追加したらエラーが消えた。

iBooks(EPUB3/コミック)の作成方法



<作業環境>
macのPC(OS X v10.8)

<準備するもの>
・表紙(cover.jpg)
・目次(index.jpg)
・本文(jpg)
・EPUB作成ツール(ひまつぶし雑記帖)

iBookstoreに本を公開するにはEPUBのバージョン3が必要です。
EPUBを作成するツールは様々あります。
Appleが出しているiBooks Authorは動画、音声ファイルなども挿入でき自由度が高いですが、
作成した本は現時点で日本のiBookstoreに公開できません。
Sigil はEPUB2対応でEPUB3には対応していません。
今回はwebサービスのひまつぶし雑記帖を使います。

■iBooks作成(EPUB3)
・ひまつぶし雑記帖のサイトで必要事項を記入しEPUB3のひな形をダウンロードします
http://books.doncha.net/epub/comic.pl

・解凍
EPUBファイルを解凍します
ターミナルで下記コマンド実行
cd "EPUBファイル保存先"
unzip "EPUBファイル"

・加工
準備しておいた画像を「OEBPS/images フォルダ」に保存します

・再圧縮
EPUBファイルを再圧縮して完了です
ターミナルで下記コマンド実行
cd "EPUBファイル保存先"
zip -0 newbook.epub mimetype
zip -r newbook.epub META-INF/*
zip -r newbook.epub OEBPS/*


■実機へEPUBファイル転送
iTunesに作成したEPUBファイルを追加し、
macと実機(iPad/iPhone)を接続しブックを同期させれば
実機でiBooksが読めます。
※実機にiBooksのアプリを事前にインストールしとくこと

■申請
iTunes Producerで作成した動画を選択し、デリバリーすれば申請完了です。
※iBooks用のiTunes connectアカウントを事前に作成しておくこと


実際に作成した本は以下になります。



[エラー] Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS.

アプリ申請の際、xcodeのorganizerでvalidateをした際に下記エラーが発生

ーーーーーーーーーーーーーーーーーーーー
Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS.
ーーーーーーーーーーーーーーーーーーーー

Xcodeのプロジェクトを複製し、違うアプリを作っていたのが原因だった
※Bundle Identifierと証明書を変えるだけでは不十分みたい


【対処】
xcodeでTARGET名変更
タグ:IOS iPhone エラー

[リジェクト]10.6: Apple and our customers place a high value on simple, refined, creative, well thought through interfaces. They take more work but are worth it. Apple sets a high bar. If your user interface is complex or less than very good it may be rejected

アプリの更新で申請した際にリジェクトされた

ーーーーーーーーーーーーーーーーーーーーーーーーー
10.6



We found the following issues with the user interface of your app:



Specifically, your app requires users to quit the app and relaunch it in order to have purchased items available which does not provide a good user experience.




These examples identify types of issues discovered in your app but may not represent all such issues. It would be appropriate to thoroughly evaluate your app to address these types of issues.
ーーーーーーーーーーーーーーーーーーーーーーーーー

アプリのインターフェースが複雑であったり、クオリティが低い場合にはリジェクトされる。
アプリ内課金後、アプリをユーザに再起動してもらい、設定を反映させる仕様にしてたのがだめらしい。
※仕様は今まで通りなのに。。
参考:http://fladdict.net/blog/2010/09/reject-list.html


■対処
アプリ内課金後、アプリを再起動しなくても設定が反映する仕様に変更


ちなみに申請したアプリはこちら
無料ですのでぜひインストールしてみてください

[リジェクト]8.1: Apps must comply with all terms and conditions explained in the Guidelines for using Apple Trademark Names and the Apple Trademark Products List

アプリの更新で申請した際にリジェクトされた

ーーーーーーーーーーーーーーーーーーーーーーーーー
8.1


We found that your app does not comply with the Guidelines for Using Apple's Trademarks and Copyrights, as required by the App Store Review Guidelines.



Specifically, your app includes the use of "iPad" in the home screen elements (the app name and/or the application icons).
ーーーーーーーーーーーーーーーーーーーーーーーーー

Appleの商標を用いる場合には、ガイドラインに従わなければならないとゆう内容。
ホーム画面のアプリ名(Bundle display name)を"〜 for iPad"としていたのがだめらしい
※名前は今まで通りなのに審査基準が変わった?

■対処
ホーム画面のアプリ名(Bundle display name)を変更 ←info.plist修正


[リジェクト] 2.23: Apps must follow the iOS Data Storage Guidelines or they will be rejected

Appleのホスティングサーバからファイルをダウンロードするアプリを申請した際に、リジェクトされた。

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
2.23


We found that your app does not follow the iOS Data Storage Guidelines, which is required per the App Store Review Guidelines.



In particular, we found that on launch and/or content download, your app stores 38.93MB. To check how much data your app is storing:



- Install and launch your app

- Go to Settings > iCloud > Storage & Backup > Manage Storage

- If necessary, tap "Show all apps" 

- Check your app's storage



The iOS Data Storage Guidelines indicate that only content that the user creates using your app, e.g., documents, new files, edits, etc., should be backed up by iCloud. 



Temporary files used by your app should only be stored in the /tmp directory; please remember to delete the files stored in this location when the user exits the app.



Data that can be recreated but must persist for proper functioning of your app - or because customers expect it to be available for offline use - should be marked with the "do not back up" attribute. For NSURL objects, add the NSURLIsExcludedFromBackupKey attribute to prevent the corresponding file from being backed up. For CFURLRef objects, use the corresponding kCFURLIsExcludedFromBackupKey attribute.



For more information, please see Technical Q&A 1719: How do I prevent files from being backed up to iCloud and iTunes?.


It is necessary to revise your app to meet the requirements of the iOS Data Storage Guidelines. 



Aso,
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

アプリのホームディレクトリ直下のDocumentフォルダは使用しない方がいいみたい。
DocumentフォルダはiCloudに保存する対象になるのでそこに無駄なファイルを置くと、iCloudの容量を圧迫してユーザーにとって好ましくないかららしい。

■対処
cacheフォルダに保存場所を変更


ちなみに、申請したアプリはこちら

アプリ内で本を購入するとAppleのホスティングサーバからファイルをダウンロードし、
本を読むことができる。

【NSFileManager】ディレクトリの管理

iosではアプリケーションごとにディレクトリを管理できる

□ディレクトリ構造
Application_Home/Documents
Application_Home/Library/Preferences
Application_Home/Library/Caches
Application_Home/tmp

上記ディレクトリのうち、Preferencesは直接アクセスしてはだめで、tmp配下においても自動でクリーンアップされないため、実際に利用するのはDocumentsとCachesの2つ
ただし、Documentsを使うと審査でリジェクトされるので、Cachesが無難

ーーーーーーーーーーーーーーーーーーーーーーー
■ディレクトリの作成
Application_Home/Documents 直下にdogフォルダを作成

NSFileManager* fileManager = [NSFileManager defaultManager];
NSError *error;
// ホームディレクトリを取得
NSString *homeDir = NSHomeDirectory();
// 作成するディレクトリのパスを指定(利用するのはホームディレクトリのDocuments or Caches)
NSString *dirPath3 = [homeDir stringByAppendingPathComponent:@"Documents/dog/"];

// ディレクトリを作成
BOOL result = [fileManager createDirectoryAtPath:dirPath3
withIntermediateDirectories:YES
attributes:nil
error:&error];

if (result) {
NSLog(@"ディレクトリの作成に成功:%@", dirPath3);
} else {
NSLog(@"ディレクトリの作成に失敗:%@", error.description);
}

ーーーーーーーーーーーーーーーーーーーーーーー
■ファイルのコピー
Application_Home/Documents/dog/picture.jpg を
Application_Home/Documents/cat へコピー

NSFileManager* fileManager = [NSFileManager defaultManager];
NSError *error;
//コピー元のパス(Documentsフォルダ)
NSArray *sysPaths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES );
NSString *docDirectory = [sysPaths objectAtIndex:0];
//ホームディレクトリ/Documents/dog/picture.jpgのパス
NSString *filePath = [NSString stringWithFormat:@"%@/dog/picture.jpg", docDirectory];

//コピー先のパス
NSString *dirPath = [homeDir stringByAppendingPathComponent:@"Documents/cat/picture.jpg"];
//コピー
BOOL result =[fileManager copyItemAtPath:filePath toPath:dirPath error:nil];
if (result) {
NSLog(@"コピーに成功");
} else {
NSLog(@"コピーに失敗");
}

ーーーーーーーーーーーーーーーーーーーーーーー
■ディレクトリの一覧取得
Application_Home/Documents/cat フォルダのファイル一覧を取得

NSFileManager* fileManager = [NSFileManager defaultManager];
NSError *error;
// ホームディレクトリを取得
NSString *homeDir = NSHomeDirectory();
// パスを指定
NSString *dirPath3 = [homeDir stringByAppendingPathComponent:@"Documents/cat/"];
//パスをlistに入れてログで出力
NSArray *list = [fileManager contentsOfDirectoryAtPath:dirPath3 error:&error];
for (NSString *path in list) {
NSLog(@"catフォルダ:%@", path);
}

ーーーーーーーーーーーーーーーーーーーーーーー
■ファイル削除
Application_Home/Documents/dog/picture.jpg を削除

NSError *error = nil;
NSString *homeDir = NSHomeDirectory();
NSString *filepath = [homeDir stringByAppendingPathComponent:@"Documents/dog/picture.jpg"];
NSURL *pathurl = [NSURL fileURLWithPath:filepath];
//ファイル削除
BOOL result=[[NSFileManager defaultManager] removeItemAtURL:pathurl error:&error];
if (result) {
NSLog(@"削除に成功");
} else {
NSLog(@"削除に失敗");
}



●参考
http://d.hatena.ne.jp/ntaku/20110104/1294146555

[エラー] The archives for In-App Purchase 'プロダクトID' is invalid

Appleのサーバに非消費型のアプリ内課金用コンテンツをアップロードする際、xcodeのorganizerでvalidateをしたら下記エラーが発生

ーーーーーーーーーーーーーーーーーーーーーーーーー
The archives for In-App Purchase 'プロダクトID' is invalid. The package contains an executable at 'Contents/ファイル名' .
ーーーーーーーーーーーーーーーーーーーーーーーーー

【対処】
エラーが出たファイルの権限を変更(全てのユーザに対し、ファイルを読み出し権限のみにする)
具体的には、macでターミナルを起動し下記コマンドを実行
「chmod 444 ’エラーが出たファイル’」

nice!(0)  コメント(0) 

[エラー] Your app contains non-public API Usage

アプリ申請の際、xcodeのorganizerでvalidateをした際に下記エラーが発生

ーーーーーーーーーーーーーーーーーーーーーーーーーー
Your app contains non-public API usage. Please review the errors, correct them, and resubmit your application.
Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6. if you think this message was sent in error and that you have only used Apple-published APIs in accordance with the guidelines, send the app's nine-digit Apple ID, along with detailed information about why you believe the above APIs were incorrectly flagged, to appreview@apple.com. For further information, visit the Technical Support Information page at http://developer.apple.com/support/technical/.
ーーーーーーーーーーーーーーーーーーーーーーーーーー

【対処】
AdMob を最新版に変更(v6.2 → 6.5)

xcodeでTARGETを選択し
Build Settings->Search Paths->Library Search Pathsで
古いバージョンのAdMobのパスを削除

nice!(0)  コメント(0) 

[エラー] application executable is missing architecture

アプリ申請の際、xcodeのorganizerでvalidateをした際に下記エラーが発生

ーーーーーーーーーーーーーーーーーーーーーーーーー
iPhone/iPod Touch: application executable is missing architecture. At least one of the following architecture(s) must be present: armv6
ーーーーーーーーーーーーーーーーーーーーーーーーー

organizer_error.png

【対処】
xcodeでTARGETを選択し
Deployment InfoのDevelopment Targetを4.1→4.3に変更

Target_4.3.png
nice!(0)  コメント(0) 

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。