unity : soomla & admob iOS 実機テスト
* Google Mobile Adsは7.0.0になってモジュール化されているので、
* 個別にxcodeにファイル追加は必要はなく。
* unity 用の pluginのclassも修正されているので更新が必要。
* 現時点では、@import <*.h> 部分のエラーが残っているので
* #import <*/*.h>の形に修正する。
1. Add the Google Mobile Ads iOS SDK library.
https://developers.google.com/mobile-ads-sdk/download?hl=ja#downloadios
iOSの
6.10.0 GoogleMobileAdsSdkiOS.zip
をダウンロード
xcodeの
Unity-iPhoneプロジェクトを右クリックして
Add files to “Unity-iPhone”で Add ons以外をすべて追加
2. Add the following frameworks if they aren’t already part of the project:
AdSupport
AudioToolbox
AVFoundation
CoreGraphics
CoreTelephony
MessageUI
StoreKit
SystemConfiguration
入っていない物があれば追加。
3. Add the -ObjC linker flag to your Other Linker Flags in Build Settings.
無ければ追加
* 別の話 ライブラリパスがおかしい時
library not found for -lSoomlaIOSCore
Library search paths に “$(SRCROOT)/Libraries” となっているダブルクォーテーションを削除して $(SRCROOT)/Librariesにしたらエラーが消えました。
iOSでマーケットデータが取れないのはなおった模様?
https://github.com/soomla/unity3d-store/issues/300
SOOMLA SoomlaUtils: There was a problem parsing the given JSON string:
よくわからないけど jsonの nameが空になっている(*これは自分のエラーか?
PurchasableVirtualItem pvi = StoreInfo.GetPurchasableItemWithProductId (item_id);
マーケット情報を取る部分でエラーになってるっぽい。
* appstoreのアイテム説明文に改行があるとjson parseエラーになっていた
* jsonは取得出来ているけどmarket_priceとか取得出来ていない・・・
とりあえず購入出来ればと・・・
[*** ERROR ***] SOOMLA SoomlaStore: Can’t make purchases. Parental control is probably enabled.
SKPaymentQueue canMakePayments
なんのエラーかさっぱりわからなかったが、アイテム課金を制限しているとこのエラーが出る。
Settings > General > Restriction > In App Purchasesをオンに変更。。。
ようやく。アカウント確認表示までで来た。
テストアカウントを設定する。
* OnUnexpectedErrorInStoreのメッセージは空。。。。
https://github.com/soomla/ios-store/blob/master/SoomlaiOSStore/SoomlaStore.m
原因はログに出ているけど、unity側に渡されていない。
接続エラーかアイテム課金設定エラーかだけ取りたいと思ったけど諦める。
- Prev unity : googleads-mobile-plugins
- Next unity : シーン名取得
- Prev unity : googleads-mobile-plugins
- Next unity : シーン名取得