|
|
(同じ利用者による、間の7版が非表示) |
行1: |
行1: |
− | ==サンプル==
| + | [[Unity/Csharp/アプリ評価/Unityライブラリ利用]] |
− | 使用方法
| + | |
− | Review review = new Review();
| + | |
− | review.Open();
| + | |
| | | |
− | Assets/Plugins/iOS/ReviewPlugin.mm
| + | [[Unity/Csharp/アプリ評価/iOSライブラリ利用]] |
− | <pre>
| + | |
− | #import <StoreKit/StoreKit.h>
| + | |
− | extern "C" {
| + | |
− | void RequestReview(){
| + | |
− | [SKStoreReviewController requestReview];
| + | |
− | }
| + | |
− | }
| + | |
− | </pre>
| + | |
| | | |
− | review.cs
| + | [[Unity/Csharp/アプリ評価/上げる方法]] |
− | <pre>
| + | |
− | using System.Collections;
| + | |
− | using System.Collections.Generic;
| + | |
− | using UnityEngine;
| + | |
− | | + | |
− | #if UNITY_IOS
| + | |
− | using System;
| + | |
− | using UnityEngine.iOS;
| + | |
− | using System.Runtime.InteropServices;
| + | |
− | #endif
| + | |
− | | + | |
− | public class Review {
| + | |
− | #if UNITY_IOS
| + | |
− | [DllImport ("__Internal")]
| + | |
− | private static extern float RequestReview();
| + | |
− | #endif
| + | |
− | public void Open () {
| + | |
− | string appleId = "1357901xxx";
| + | |
− | #if UNITY_ANDROID
| + | |
− | string url = "market://details?id=" + Application.identifier;
| + | |
− | Application.OpenURL(url);
| + | |
− | #elif UNITY_IOS
| + | |
− | Version iosVersion = new Version(Device.systemVersion);
| + | |
− | Version minVersion = new Version("10.3");
| + | |
− | if (iosVersion >= minVersion) {
| + | |
− | RequestReview();
| + | |
− | } else {
| + | |
− | string url = "itms-apps://itunes.apple.com/jp/app/id" + appleId + "?mt=8&action=write-review";
| + | |
− | Application.OpenURL(url);
| + | |
− | }
| + | |
− | #endif
| + | |
− | }
| + | |
− | }
| + | |
− | </pre>
| + | |
− | | + | |
− | ==参考==
| + | |
− | http://kan-kikuchi.hatenablog.com/entry/RequestReview
| + | |
− | | + | |
− | http://yayaolab.com/archives/355
| + | |
− | | + | |
− | http://indie-du.com/entry/2017/09/23/173226
| + | |
2023年11月14日 (火) 05:17時点における最新版
Unity/Csharp/アプリ評価/Unityライブラリ利用
Unity/Csharp/アプリ評価/iOSライブラリ利用
Unity/Csharp/アプリ評価/上げる方法