Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/users/1/juny/web/hidef/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524

Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/users/1/juny/web/hidef/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524

[Swift] ビルド時のエラー&iOS8でNSBigDecimalのバグ

公開日: : 最終更新日:2014/10/22 Objective-C, Swift


Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/users/1/juny/web/hidef/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524

ビルド時のエラー

Swiftプロジェクトを実行中に以下のエラーが出ました。

“__TFSs15_arrayForceCastU___FGSaQ__GSaQ0__”, referenced from:

なんのことやら訳が分からない…
いろいろググった結果、DelivedDataを消せばよいとのこと。
Window > Organizerから該当のプロジェクトを選択し、deleteボタンを押下
スクリーンショット_2014-10-07_16_22_04

エラーは解消されました。

iOS8のバグ

iOS8でアプリを実行していると小数点計算がおかしい…
いろいろ調べていると、こちらに詳しく書かれていました。

iOS8で NSDecimalNumber が変な値を返してくる!(怒)

端的に言うと、NSDecimalNumberオブジェクトで小数点ありの値から整数値に変換する際に予期しない値が返ってきます。

iOS8で端末がiPhone5あるいはiPhone4sなどで発生する模様です。
ちなみにSwiftでも実行してみました。

let n: NSDecimalNumber = NSDecimalNumber(string: "123.123456789012345678")
println("decimal \(n)")
println("int \(n.intValue)")
println("integer \(n.integerValue)")
println("long \(n.longValue)")
println("longlong \(n.longLongValue)")
println("uinteger \(n.unsignedIntegerValue)")

結果は…
スクリーンショット 2014-10-07 16.40.54

ダメみたいですね。
とりあえず、integerValue、longValueなどを使用しているところは全てintValueに直す方向で対処します。

ad

関連記事

[Objective-C] no architectures to compile for … のコンパイルエラーについて

起動したプロジェクトでコンパイルエラーが出ました。 no architectures to com

記事を読む

[Objective-C] 文字列操作の便利Tips

Tipsいろいろ 先日の投稿 共通関数をまとめたクラスを作ろう!の流れで、文字列を操作するときに便

記事を読む

[Swift] CoreDataを使ってみる

SwiftでCoreData 今回はSwiftでCoreDataを使ってみます。 Xcodeプロ

記事を読む

[Swift] Asset Catalogについて

XCode5から追加されたAsset Catalog。 いままで標準のImages.xcasset

記事を読む

[Objective-C] 小数点を丸める!(数値変換)

小数点を含む数値 Objective-Cに限らず、小数点を含む数値を計算する場合はdoubleやf

記事を読む

NSDateを5分刻み・15分刻みで丸める

NsDateを初期値としてUIDatePicker等に設定する場合、日付の丸め処理が必要になるのでメ

記事を読む

[Objective-C] デリゲート (Delegate)を理解する!

デリゲートとは? デリゲートに関しての意味合いとして、”委譲”とか”代理”と説明されることが多いで

記事を読む

[Swift] 画像を合成する

画像を合成 以下の2つの画像を合成してみます。円と四角です。 画像をプロジェクトに追

記事を読む

[Swift] UITabBarControllerでタブ選択時のイベントを取得する

UITabBarController タブを使った画面を作成する場合はUITabBarContro

記事を読む

[Swift] CoreDataで検索したデータを削除する

CoreDataの検索と削除 前の投稿  CoreDataを使ってみる をふまえて今度は検索&削除

記事を読む

ad

Message

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

ad

[PHP] curl転送してみる(googleに)

curlでgoogle画像検索APIにアクセスしてみます。 cu

[PHP] PDOでMySQLの接続確認をする

PDO PHPでMySQLに接続する際には、mysql_connec

[PHP] ランダムな英数字を生成する

便利系メソッド 今回はPHPでランダムな英数字を作成してみます。

[Swift] プロパティリスト(plist)の値を取得

plistからデータを取得してみます。 こちらのエントリーも参考にし

[Swift] Asset Catalogについて

XCode5から追加されたAsset Catalog。 いままで標準

→もっと見る

  • 1978年の七夕生まれ。 25才でweb業界の門を叩き、28才でフリーランスに。 現在は、フリーランスでマークアップ中心に、wordpressのカスタマイズやデザインをしております。 また、iPhoneアプリの開発もしております。

Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/users/1/juny/web/hidef/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524
PAGE TOP ↑

Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /home/users/1/juny/web/hidef/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524