Skip to main content

Porting Smartphone App to PC App

Overview​

This page explains notices and some procedures when porting from apps created for Smartphone (SP) Native to apps for PC Native.

Procedures required for both SP and PC​

Operation compatible with multi devices​

If “Specification for operating on only one terminal” is applied for an existing SP app, the app must be processed to be operated using the same game data on both SP and PC.

Following procedures are required to be done for enabling the operation of multiple devices:

  • Adding Login control
    • Add the login control function which prohibits concurrent startups. (For example, the later startup would be preferred.)
  • Limiting functions to cause problems when operating at the same time
    • Add the process prohibiting concurrent operations for certain functions

Method for coordinating AndApp user data​

The user data coordination must be performed by one of the following methods, if “Playing game is not permitted in multiple terminals using the same data” or “Linkage of data between multi devices is not supported” in the existing SP app.

  • Coordinating user data through data takeover code, such as PIN code
  • Coordinating user data through external ID coordination
warning

The user data coordination not only from SP app side but also PC app side should be considered.

* For example, you would “Issue a takeover code” and “share contents by posting on Twitter” on the PC app side, and input the takeover code on the SP app side. Apps should be developed under those assumptions.

Area requiring for individual solution per PC App​

Forced update and maintenance function​

PC App is added in addition to Android / iOS App. Therefore, if a forced update function or a maintenance function is implemented per Android / iOS App, these functions must be added to PC App, too.

For activation condition under the forced update function or the maintenance function, suspend/resume is checked in SP app, while the focus transfer of the app may be checked too in PC app.

  • In the case of Unity
    • OnApplicationFocus
  • For Windows Native
    • Window Procedure WM_SETFOCUS message

Solution for AndApp​

Introduce AndApp SDK, modify some functions at the game server, and implement the following functions:

  • Initialization function
  • Player Authentication function
  • Payment function
  • Remote Notification function

Tips when porting SP apps to PC apps​

Tips when adapting SP apps to PC apps are as follows.

Adapting Existing Unity App to PC​

warning

You can skip this section if the build for PC is already developed.

It is easy to port the app if it already runs on Unity Editor and does not use the plugin with Native Extension a lot.

  • Specify UNITY_STANDALONE too, if the part including UNITY_EDITOR of Define setting per platform is required at PC side.
    • #if (UNITY_EDITOR || UNITY_STANDALONE)
  • Disable Unity plugin using Native Extension
    • Representative library is an advertising library.
  • Replace Unity plugin using Native Extension with an alternative plugin
    • For details, refer to "About Alternative Plugin with Unity Plugin” below.
  • Change the AssetBundle build
  • Change the asset path
  • Change the persisted data path
  • If Application.persistentDataPath and Application.temporaryCachePath are used or you would like to persist data per game user, change the path to the path returned by the following methods. (This process is required for building AndApp SDK.)
method
description
AndApp.Storage.persistentDataPathFor replacing Application.persistentDataPath.
AndApp.Storage.temporaryCachePathFor replacing Application.temporaryCachePath.

The following process required to be performed if Shift_JIS is used in Unity Editor.

Although the following item is already compatible with PC in many cases, check the compatibility.

  • Unity plugin delivered in Unity Asset Store

About Alternative Plugin with Unity Plugin​

If Android / iOS-specific plugin of Unity is used, an alternative plugin may be required to be used in PC. The representative plugins are as follows. * For WebView plugin, refer to the note below.

info

For plugins not found here, DeNA can search for them with you and is happy to advise you.

CRIWARE for Unity​

CRIWARE for Unity supports Android, iOS, Windows, and Mac OSX. In Unity, CRI plugin supports Windows version, which can be built in as it is. If Windows version is developed to be product, another contract is required in addition to SP version.

prime31 In App Billing Plugin​

The payment plugin for Android Native can be replaced in AndApp IAP or Unity IAP (Unity 5.3 and later). For details, refer to documents below.

  • Implementing Payment Flow
  • Guide for Migrating from Prime31 to AndApp IAP

About WebView Plugin​

The following libraries may be replaced.

warning

We do not guarantee proper operation. For support including security, contact the library  developer companies.

WebView Plugin for Unity​

  • Embedded Browser
  • Coherent GT
    • Reference URL: http://coherent-labs.com/
    • Features: It is WebKit-based WebView Plugin, which supports Unity, Unreal Engine, and Native.
    • Problems: Japanese is not displayed, as the default font is not supported by Japanese. Japanese can be displayed on pages with the following fonts set in HTML or CSS.
      • Font-family: メイリオ", Meiryo, "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "MS Pゴシック", "MS UI Gothic", Helvetica,Arial,sans-serif;
    • Price: It costs $3,500 per title if the title budget is equal to or less than $500,000. Otherwise, contact them if necessary.
    • Trial: If you contact them, you can try this for free.
  • Awesomium
    • Reference URL:
    • Features: It is Chromium-based WebView Plugin for Unity.
    • Problems: Chromium v18 is used. Also, updating has stopped since 2014, so security vulnerabilities may be found.
    • Price: It is free if the income is equal to or less than $100,000. If the income is higher than $100,000, it costs $2,900 per application
    • Trial: You can try it for free.

WebView Plugin for Windows Native​

About Purchase Unit Price​

If purchase unit prices per one virtual currency are different between Android and iOS, it is recommended to apply the lower for the price of AndApp.

About Upper Limit Amount​

If the upper limit amount by age is set at SP App side, make sure to count the amount including the amount of PC.

About Virtual Currency in Game​

If the total amount of the free part and the paid part in the virtual currency in an application is displayed, it is recommended to indicate the paid part and the free part separately (Or, those holdings shall be clarified separately).

info

When only the total amount of the virtual currency in game is displayed, different holdings are shown in SP and PC. As a result, end users may be confused and should contact the developers. Specific measures depend on the application. Contact a sales representative or send an e-mail to orapp-developer@dena.com .

About OS Specific Functions​

Touch Swipe​

Some touch swipe operations may not be replaced with operations by mouse clicking and dragging as it is from PC to SP, which causes difficulty in operating. In this case, ensure that such operations are made available with a keyboard. It is recommended to guarantee appropriate UX and to offset the difference in UX between SP users and PC users where possible.

About Selecting OpenGL / DirectX​

In PC apps for the AndApp platform, any graphics API such as OpenGL / DirectX or any API version may be selected. Decide the API based on compatible environments, etc.

About Security of PC App​

The hurdle against cracking and cheating PC apps is lower than that of SP apps. Refer to the pages below, and then take appropriate security measurements.

  • About Security for PC App (Unity version)

Https://docs.mobage.com/display/JPANDAPP/Development_ApplicationSecurity_AboutUnityVersion_AndApp

  • About Security for PC App (Windows Native version)

Https://docs.mobage.com/display/JPANDAPP/Development_ApplicationSecurity_AboutNativeVersion_AndApp

Update History​

  • May 8, 2017

    • Embedded Browser added as WebView plugin used in Unity
  • April 10, 2017

    • Description for the takeover from PC to SP changed to Warning
  • December 1, 2016

    • Description about Virtual Currency in Game added
  • September 18, 2016

    • Description about Focus in Application for Forced Update and Maintenance functions added
  • July 28, 2016

    • Description about Security Measurement changed.
    • Hierarchical location in this page and URL changed.
  • July 20, 2016

    • Information about WebView plugin updated.
  • June 30, 2016

    • “About Alternative Plugin with Unity Plugin” modified along with termination of uWebView development
  • June 6, 2016

    • Newly created